text
stringlengths
1
22.8M
```shell #! /usr/bin/env bash # Auto-update the main Tectonic website repo to show the date of the latest # release. This script is run from the CI/CD pipeline after the main package is # updated. The environment variable $GITHUB_TOKEN should be set and the local # Git user should be configured with proper GitHub authentication and the # ability to create commits. set -xeuo pipefail cd "$(dirname $0)" version="$(cranko show version tectonic)" date="$(date +%Y-%m-%d)" git clone path_to_url website cd website sed -e "s|^latest:.*|latest: \"$version\"|" \ -e "s|^latest_date:.*|latest_date: \"$date\"|" \ -i _config.yml git add _config.yml git commit -m "Auto-update for release of version $version" git push origin master ```
Epischnia illotella is a species of snout moth in the genus Epischnia. It was described by Philipp Christoph Zeller in 1839 and is known from Italy, Spain, Portugal, France, Germany, Croatia, Albania, North Macedonia, Greece, Romania, Ukraine, Russia and North Africa. References Moths described in 1839 Phycitini Moths of Europe
Erich Kubak is an East German film. It was released in 1959. Story A film about lignite strip mining. External links 1959 films East German films 1950s German-language films 1950s German films
```xml export * from "./clear-clipboard"; export * from "./copy-to-clipboard-command"; export * from "./generate-password-to-clipboard-command"; ```
Huang Ying or Ying Huang is the name of: Singers Ying Huang (soprano) (born 1968), Chinese operatic soprano Huang Ying (pop singer) (born 1989), Chinese female pop singer Sportspeople Huang Ying (water polo) (born 1957), Chinese male water polo player Huang Ying (gymnast) (born 1977), Chinese rhythmic gymnast See also Huangying Township, a township in Chongqing, China
Zekeria Ebrahimi (born 9 January 1996) is an Afghan actor. Ebrahimi is best known for his role in the 2007 film The Kite Runner as Young Amir. He has received extensive media coverage for playing this role, both because of his acting talent and because of the cultural misunderstandings that surrounded the making of the film, are thought to have endangered his life at home in Afghanistan. References External links Official site of the film The Kite Runner Dean Nelson, "Kabul kite boys feel Hollywood backlash", The Sunday Times, 14 January 2007. Accessed 8 January 2008. David M. Halbfinger, "'Kite Runner' Boys Are Sent to United Arab Emirates", New York Times, 3 December 2007. Accessed 8 January 2008. Herald Sun (Melbourne) 6 December 2007. Accessed 8 January 2008. Jay Stone, "Child actors' performances keep The Kite Runner aloft", The Vancouver Sun, 21 December 2007. Accessed 8 January 2008. The Evening Standard (London), December 27, 2007. Accessed 8 January 2008. Living people 1996 births 21st-century Afghan male actors Afghan male child actors Afghan male film actors
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package com.haulmont.cuba.gui.model.impl; import com.haulmont.cuba.gui.model.CollectionPropertyContainer; import java.util.List; /** * Standard implementation of sorting {@link CollectionPropertyContainer}s. */ public class CollectionPropertyContainerSorter extends BaseContainerSorter { public CollectionPropertyContainerSorter(CollectionPropertyContainer container) { super(container); } @Override public CollectionPropertyContainer getContainer() { return (CollectionPropertyContainer) super.getContainer(); } @SuppressWarnings("unchecked") @Override protected void setItemsToContainer(List list) { getContainer().setDisconnectedItems(list); } } ```
Clayoqua Indian Reserve 6 or Clayoqua 6 is an Indian Reserve in the Clayoquot Sound region of the West Coast of Vancouver Island of British Columbia, Canada. See also List of Indian reserves in British Columbia Clayoquot (disambiguation) References Indian reserves in British Columbia West Coast of Vancouver Island Nuu-chah-nulth
```objective-c #pragma once #include <base/types.h> #include <Common/AllocationTrace.h> /// Convenience methods, that use current thread's memory_tracker if it is available. struct CurrentMemoryTracker { /// Call the following functions before calling of corresponding operations with memory allocators. [[nodiscard]] static AllocationTrace alloc(Int64 size); [[nodiscard]] static AllocationTrace allocNoThrow(Int64 size); /// This function should be called after memory deallocation. [[nodiscard]] static AllocationTrace free(Int64 size); static void check(); /// Throws MEMORY_LIMIT_EXCEEDED (if it's allowed to throw exceptions) static void injectFault(); private: [[nodiscard]] static AllocationTrace allocImpl(Int64 size, bool throw_if_memory_exceeded); }; ```
Isentällispitz (2,873 m) is a mountain of the Silvretta Alps, located on the border between Austria and Switzerland. The closest locality is Klosters on the Swiss side. References External links Isentällispitz on Hikr Mountains of the Alps Mountains of Graubünden Mountains of Vorarlberg Austria–Switzerland border International mountains of Europe Mountains of Switzerland Two-thousanders of Switzerland Silvretta Alps Klosters-Serneus
```css /*! * Font Awesome Free 6.6.0 by @fontawesome - path_to_url */ :root, :host { --fa-style-family-classic: 'Font Awesome 6 Free'; --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; } @font-face { font-family: 'Font Awesome 6 Free'; font-style: normal; font-weight: 900; font-display: block; src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); } .fas, .fa-solid { font-weight: 900; } ```
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Dataproc; class KubernetesSoftwareConfig extends \Google\Model { /** * @var string[] */ public $componentVersion; /** * @var string[] */ public $properties; /** * @param string[] */ public function setComponentVersion($componentVersion) { $this->componentVersion = $componentVersion; } /** * @return string[] */ public function getComponentVersion() { return $this->componentVersion; } /** * @param string[] */ public function setProperties($properties) { $this->properties = $properties; } /** * @return string[] */ public function getProperties() { return $this->properties; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(KubernetesSoftwareConfig::class, 'Google_Service_Dataproc_KubernetesSoftwareConfig'); ```
```java * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.flowable.common.engine.impl.logging; public interface CmmnLoggingSessionConstants { String TYPE_CASE_STARTED = "caseStarted"; String TYPE_CASE_COMPLETED = "caseCompleted"; String TYPE_CASE_TERMINATED = "caseTerminated"; String TYPE_PLAN_ITEM_CREATED = "planItemCreated"; String TYPE_PLAN_ITEM_NEW_STATE = "planItemNewState"; String TYPE_SERVICE_TASK_ENTER = "serviceTaskEnter"; String TYPE_SERVICE_TASK_EXIT = "serviceTaskExit"; String TYPE_SERVICE_TASK_BEFORE_TRIGGER = "serviceTaskBeforeTrigger"; String TYPE_SERVICE_TASK_AFTER_TRIGGER = "serviceTaskAfterTrigger"; String TYPE_SERVICE_TASK_WRONG_TRIGGER = "serviceTaskWrongTrigger"; String TYPE_SERVICE_TASK_EXCEPTION = "serviceTaskException"; String TYPE_SERVICE_TASK_ASYNC_JOB = "serviceTaskAsyncJob"; String TYPE_SERVICE_TASK_EXECUTE_ASYNC_JOB = "serviceTaskExecuteAsyncJob"; String TYPE_SERVICE_TASK_LOCK_JOB = "serviceTaskLockJob"; String TYPE_SERVICE_TASK_UNLOCK_JOB = "serviceTaskUnlockJob"; String TYPE_HUMAN_TASK_CREATE = "humanTaskCreate"; String TYPE_HUMAN_TASK_SET_ASSIGNEE = "humanTaskSetAssignee"; String TYPE_HUMAN_TASK_SET_OWNER = "humanTaskSetOwner"; String TYPE_HUMAN_TASK_SET_GROUP_IDENTITY_LINKS = "humanTaskSetGroupIdentityLinks"; String TYPE_HUMAN_TASK_SET_USER_IDENTITY_LINKS = "humanTaskSetUserIdentityLinks"; String TYPE_HUMAN_TASK_COMPLETE = "humanTaskComplete"; String TYPE_EVALUATE_SENTRY = "evaluateSentry"; String TYPE_EVALUATE_SENTRY_FAILED = "evaluateSentryFailed"; String TYPE_VARIABLE_CREATE = "variableCreate"; String TYPE_VARIABLE_UPDATE = "variableUpdate"; String TYPE_VARIABLE_DELETE = "variableDelete"; String TYPE_COMMAND_CONTEXT_CLOSE = "commandContextClose"; String TYPE_COMMAND_CONTEXT_CLOSE_FAILURE = "commandContextCloseFailure"; } ```
Peronospora manshurica is a plant pathogen. It is a widespread disease on the leaves of soybeans and other crop plants. The fungi is commonly referred to as downy mildew, "leafspot", or "leaf-spot". Symptoms The most visible symptoms of P. manshurica are pale green to light yellow spots that enlarge into pale to bright yellow lesions of variable size and shape. Lesions later turn grayish-brown to dark-brown with a yellowish-green margin that may eventually become entirely brown. Tufts of grayish to pale-colored sporangiophores on the underside of leaves easily distinguish the infection from other foliar diseases. Disease cycle Peronospora manshurica commonly begins its disease cycle in the spring, with overwintering oospores mainly serving as the primary inoculum. This primarily occurs by the use of oospore encrusted seeds for planting. Oospores, and sometimes even mycelium, surviving on plant material can also serve as the primary inoculum. After the first infection by the oospores, the secondary dispersal of infection is accomplished by conidia originating from conidiophores. Secondary lesions appear after about 10 days, allowing the fungus to sporulate once more. This cycle can occur many times during one season, making Peronospora manshurica’s disease cycle is polycyclic. About 20 days after inoculation, oospores are formed within infected plant tissues. Like other oomycetes, this is accomplished by the fertilization of oogonia by antheridia. This oospore will function as a survival structure for the pathogen over the winter, and serve as the primary inoculum the following spring. Pathogenesis Peronospora manshurica is biotrophic, meaning that a living host (most commonly the soybean) is required in order for the fungus to survive. In order to initiate infection of its host, the pathogenic conidial spores are dispersed by wind, rain-splash, and run-off. The conidia then land on new leaves and invade through stomata or more directly by a germ tube The germ tube will form an appresorium and penetration peg to pierce the epidermis of the leaf, allowing the pathogen to incite infection. Generally, older leaves are resistant to infection, while younger leaves are more susceptible. Peronospora manshurica can cause systemic infection. This predominantly occurs when seeds and surrounding soil contain oospores, causing seedling hypocotyls to be infected upon germination. Systemic infection can also occur during a dense secondary dispersal of inoculum, when newly formed leaves are infected right after their formation. Risk factors The fungus spreads by oospores on diseased leaves and/or on infected seed. The disease spreads in environments with high humidity and favors temperatures between 20-22 °C. Importance Downy mildews are common and widespread pathogens, existing worldwide. P. manshurica exists anywhere soybeans are cultivated. Historically, this pathogen has been rather low risk, because infected crops do not typically exhibit significant yield loss. A 2016 study showed that infected plants did not exhibit decreased numbers of soybean pods or grains per pod, however seed weight decreased linearly with increasing downy mildew severity. It has also been shown to cause 9-18% yield losses during epidemics. Despite this, yields are still not impacted significantly enough by P. manshurica to warrant fungicide treatment in the United States. If a control measure is used, it is likely that seed quality is of particular concern, in which case cultural measures or resistance will be implemented. Thirty three races of P. manshurica have been recorded. This pathogen is closely associated with its host, and therefore is able to quickly change its gene expression in response to its host. Because of this, P. manshurica is carefully monitored, despite its lesser ability of inflicting serious damage. With the pathogens extensive prevalence, the emergence of a particularly destructive race could be detrimental to a susceptible host population under favorable conditions. Control The disease is often controlled using fungicides such as mancozeb, maneb, or zineb. References Further reading External links Water mould plant pathogens and diseases Soybean diseases Crop diseases Peronosporales Species described in 1923
```xml import _ from "lodash"; import seedrandom from "seedrandom"; import { describe, expect, test } from "vitest"; import * as ad from "../types/ad.js"; import { eqList, randList } from "../utils/Util.js"; import { compile, fns, genGradient, logAD, problem, variable, } from "./Autodiff.js"; import { add, div, ifCond, lt, max, mul, sin, squared, sub, } from "./AutodiffFunctions.js"; describe("problem tests", () => { const f = (x: ad.Num, y: ad.Num) => add(squared(sub(x, y)), squared(x)); test("no freeze", async () => { const x = variable(1); const y = variable(2); const p = await problem({ objective: f(x, y) }); const run = p.start({}).run({}); expect(run.converged).toBe(true); for (const [z, a] of run.vals) z.val = a; expect(x.val).toBeCloseTo(0); expect(y.val).toBeCloseTo(0); }); test("freeze", async () => { const x = variable(1); const y = variable(2); const p = await problem({ objective: f(x, y) }); const run = p.start({ freeze: (z) => z === x }).run({}); expect(run.converged).toBe(true); for (const [z, a] of run.vals) z.val = a; expect(x.val).toBe(1); expect(y.val).toBeCloseTo(1); }); }); describe("compile tests", () => { test("no outputs", async () => { const f = await compile([]); const v = f((x) => x.val); expect(v).toEqual([]); }); test("simple", async () => { const x = variable(3); const y = variable(4); const f = await compile([add(x, y), mul(x, y)]); const v = f((x) => x.val); expect(v).toEqual([7, 12]); }); }); // df/f[x] with finite differences about xi export const _gradFiniteDiff = (f: (args: number[]) => number) => { return (xs: number[]): number[] => { const EPSG = 10e-5; // Scalar estimate (in 1D) // const dfxi = (f, x) => (f(x + EPSG / 2.) - f(x - EPSG / 2.)) / EPSG; const xsDiff = xs.map((e, i) => { const xsLeft = [...xs]; xsLeft[i] = xsLeft[i] - EPSG / 2; const xsRight = [...xs]; xsRight[i] = xsRight[i] + EPSG / 2; return (f(xsRight) - f(xsLeft)) / EPSG; }); return xsDiff; }; }; const NUM_SAMPLES = 5; // Number of samples to evaluate gradient tests at describe("symbolic differentiation tests", () => { test("grad finite diff", () => testGradFiniteDiff()); test("graph 0", () => testGradSymbolic(0, gradGraph0())); test("graph 1", () => testGradSymbolic(1, gradGraph1())); test("graph 2", () => testGradSymbolic(2, gradGraph2())); test("graph 3", () => testGradSymbolic(3, gradGraph3())); test("graph 4", () => testGradSymbolic(4, gradGraph4())); test("graph 5", () => testGradSymbolic(5, gradGraph5())); test("graph 6", () => testGradSymbolic(6, gradGraph6())); test("graph 7", () => testGradSymbolic(7, gradGraph7())); }); //#region Functions for testing numeric and symbolic gradients const assert = (b: boolean, s: any[]) => { const res = b ? "passed" : "failed"; logAD.trace("Assertion", res, ": ", ...s); return b; }; const testGradFiniteDiff = () => { const rng = seedrandom("testGradFiniteDiff"); // Only tests with hardcoded functions const f = (ys: number[]) => _.sum(_.map(ys, (e: number) => e * e)); const df = (ys: number[]) => _.map(ys, (e: number) => 2 * e); const testResults = []; for (let i = 0; i < NUM_SAMPLES; i++) { const xs = randList(rng, 4); const gradEstRes = _gradFiniteDiff(f)(xs); const expectedRes = df(xs); const testRes = eqList(gradEstRes, expectedRes); testResults.push(testRes); } testResults.forEach((result) => { expect(result).toBeTruthy(); }); }; interface GradGraph { inputs: ad.Var[]; output: ad.Num; } const gradGraph1 = (): GradGraph => { // Build energy/gradient graph const x0 = variable(-5); const x1 = variable(6); const a = sub(x0, x1); const b = squared(a); const c = sin(a); const z = mul(b, c); return { inputs: [x0, x1], output: z }; }; // Test addition of consts to graph (`c`) const gradGraph2 = (): GradGraph => { // Build energy/gradient graph const x0 = variable(-5); const x1 = variable(6); const a = sub(x0, x1); const b = squared(a); const c = add(a, 3); const z = mul(b, c); return { inputs: [x0, x1], output: z }; }; // Test vars w/ no grad const gradGraph3 = (): GradGraph => { // Build energy/gradient graph const x0 = variable(100); const x1 = variable(-100); const head = squared(x0); return { inputs: [x0, x1], output: head }; }; // Test toPenalty const gradGraph4 = (): GradGraph => { // Build energy/gradient graph const x0 = variable(100); const head = fns.toPenalty(x0); return { inputs: [x0], output: head }; }; // Test ifCond const gradGraph5 = (): GradGraph => { logAD.info("test ifCond"); // Build energy/gradient graph const x0 = variable(100); const x1 = variable(-100); const head = ifCond(lt(x0, 33), squared(x1), squared(x0)); return { inputs: [x0, x1], output: head }; }; // Test max const gradGraph6 = (): GradGraph => { logAD.info("test max"); // Build energy/gradient graph const x0 = variable(100); const head = max(squared(x0), 0); return { inputs: [x0], output: head }; }; // Test div // TODO < Test all ops automatically const gradGraph7 = (): GradGraph => { logAD.info("test div"); // Build energy graph const x0 = variable(100); const x1 = variable(-100); const head = div(x0, x1); return { inputs: [x0, x1], output: head }; }; const makeFunc = async ( g: GradGraph, ): Promise<(xs: number[]) => { output: number; gradient: number[] }> => { const f = await genGradient(g.inputs, [g.output], []); return (xs: number[]) => { const masks = { inputMask: g.inputs.map(() => true), objMask: [true], constrMask: [], }; const grad = new Float64Array(g.inputs.length); const { phi } = f(masks, new Float64Array(xs), 0, grad); return { output: phi, gradient: Array.from(grad) }; }; }; // Compile the gradient and check it against numeric gradients // TODO: Currently the tests will "fail" if the magnitude is greater than `eqList`'s sensitivity. Fix this. const testGradSymbolic = async ( testNum: number, graph: GradGraph, ): Promise<void> => { const rng = seedrandom(`testGradSymbolic graph ${testNum}`); // Synthesize energy and gradient code const f0 = await makeFunc(graph); const f = (xs: number[]) => f0(xs).output; const gradGen = (xs: number[]) => f0(xs).gradient; // Test the gradient at several points via evaluation const gradEst = _gradFiniteDiff(f); const testResults = []; for (let i = 0; i < NUM_SAMPLES; i++) { const xsTest = randList(rng, graph.inputs.length); const gradEstRes = gradEst(xsTest); const gradGenRes = gradGen(xsTest); const testRes = eqList(gradEstRes, gradGenRes); testResults.push(testRes); } testResults.forEach((result) => { expect(result).toBeTruthy(); }); }; const gradGraph0 = (): GradGraph => { // Build energy/gradient graph // f(x) = x^2, where x is 100 // Result: (2 * 100) * 1 <-- this comes from the (new) parent node, dx/dx = 1 const ref = variable(100); const head = squared(ref); // Print results logAD.trace( "computational graphs for test 1 (input, output, gradient)", ref, head, ); return { inputs: [ref], output: head }; }; //#endregion ```
Berkesd () is a village in Baranya county, Hungary. External links Street map Populated places in Baranya County
This page details the records, statistics and career achievements of American basketball player Carmelo Anthony. Anthony is an American basketball forward and is currently playing for the Los Angeles Lakers of the National Basketball Association. NBA career statistics Statistics are correct as at March 11, 2020. Regular season Playoffs Career-highs Awards and accomplishments NBA NBA Scoring Leader: 2013 NBA Minutes leader: 2014 7x All-NBA selection: Second All-NBA team: 2010, 2013, 2010s Decade Third All-NBA team: 2006, 2007, 2009, 2012 10x NBA All-Star: 2007, 2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 NBA Rookie Challenge MVP: 2005 NBA All-Rookie selection: First Rookie team: 2004 3x NBA Western Conference Player of the Month 3x NBA Eastern Conference Player of the Month 11x NBA Western Conference Player of the Week 8x NBA Eastern Conference Player of the Week 6x NBA Western Conference Player of the Month 9th Leading Scorer In NBA History United States National Team 4x Olympic medalist: Gold: 2008, 2012, 2016 Bronze: 2004 FIBA World Championship medalist: Bronze: 2006 FIBA Americas Championship medalist: Gold: 2007 FIBA Americas Under-18 Championship medalist: Bronze: 2002 USA Basketball Male Athlete of the Year: 2006, 2016 Individual single-game records Points (Olympics): 37 3-point field goals made: 10 Free throws made: 13 Career total records: Games played (Olympics): 31 Second all-time in points (Olympics): 336 Field goals attempted (Olympics): 272 Second all-time in 3-point field goals attempted (Olympics): 139 Second all-time in 3-point field goals made (Olympics): 57 Rebounds (Olympics): 125 College NCAA champion: 2003 Final Four Most Outstanding Player: 2003 Consensus second team All-American: 2003 NCAA East Regional Most Valuable Player: 2003 Consensus Big East Conference Rookie of the Year: 2003 USBWA National Freshman of the Year: 2003 All-Big East First Team: 2003 All-Big East Rookie Team: 2003 10x Big East Rookie of the Week #15 retired at Syracuse University High school USA Today All-USA First Team: 2002 Parade First Team All-American: 2002 McDonald's High School All-American: 2002 Sprite Slam Jam dunk contest champion: 2002 Les Schwab Invitational Most Valuable Player: 2002 Baltimore Catholic League Player of the Year: 2001 Baltimore Sun All-Metropolitan Player of the Year: 2001 Baltimore County Player of the Year: 2001 NBA records Youngest player to log a double double in a playoff game: (19 years, 331 days) First player in NBA history to start first 1000 games (accomplished December 9, 2017 at Memphis Grizzlies) NBA achievements One of three players in NBA history to have a 20-20 game as a small forward Includes Shawn Marion and Giannis Antetokounmpo. One of two players in NBA history to lead their team in playoff points per game as a rookie Includes David Robinson Only player in NBA history to score at least 50 points with no points in the paint. Only player in NBA history to score 62+ points in Madison Square Garden. One of three players in NBA history to record 62+ points with 10 free throw attempts or less in a game. Includes Rick Barry and Wilt Chamberlain Only player in NBA history to record 42+ points, 17+ rebounds, and 6+ assists in a playoff game. One of two players in NBA history to record 62+ points and 0 assists in a game. Includes Kobe Bryant. One of three players in NBA history to score over 10,000 points with two different franchises. Includes Kareem Abdul-Jabbar and Elvin Hayes One of two players in NBA history to have a 40 point game as a teenager. Includes LeBron James. One of three players in NBA history to average at least 20 points as a teenager. Includes LeBron James and Kevin Durant. One of four players in NBA history to score at least 60 points at Madison Square Garden in a game. Includes Bernard King, Kobe Bryant, and James Harden One of three players in NBA history to score at least 40 points while having at least a 60% FG percentage in three consecutive games. Includes Michael Jordan and Bernard King. One of six players in NBA history to have 24,000 points, 6000 rebounds, 2500 assists, 1000 steals and 1000 3 point field goals. Includes Kobe Bryant, Dirk Nowitzki, LeBron James, Paul Pierce and Vince Carter One of six players in NBA history to score 50+ points multiple times for two different teams. Includes Wilt Chamberlain, Pete Maravich, Bernard King, Kevin Durant, and LeBron James One of five players in NBA history to record 62+ points and 13+ rebounds. Includes Michael Jordan, David Robinson, Wilt Chamberlain, Elgin Baylor. One of nine rookies in NBA history to capture all six Rookie of the Month awards. Includes David Robinson, Tim Duncan, LeBron James, Chris Paul, Kevin Durant, Blake Griffin, Damian Lillard and Karl-Anthony Towns. Luka Dončić won all five awards presented during the 2018-2019 season. Denver Nuggets franchise records and achievements Regular season Career Career records cited from Basketball Reference's Denver Nuggets Career Leaders page unless noted otherwise. 6th all-time in games played: 564 Behind Alex English, T.R. Dunn, Byron Beck, Dan Issel and Bill Hanzlik. 3rd all-time in minutes played: 20521 Behind Alex English and Dan Issel. 3rd all-time in field goals made: 4989 Behind Alex English and Dan Issel. 3rd all-time in field goals attempted: 10877 Behind Alex English and Dan Issel. 6th all-time in 3-point field goals made: 410 Behind J. R. Smith, Michael Adams, Chauncey Billups, Dale Ellis and Nick Van Exel. 3rd all-time in 3-point field goals attempted: 1320 Behind J. R. Smith and Michael Adams. 3rd all-time in free throws made: 3582 Behind Alex English and Dan Issel. 2nd all-time in free throws attempted: 4462 Behind Dan Issel. 9th all-time in rebounds: 3566 Behind Dan Issel, Byron Beck, Dikembe Mutombo, Alex English, Julius Keye, Marcus Camby, Nene Hilario and Fat Lever. 7th all-time in steals: 634 Behind Fat Lever, T.R. Dunn, Alex English, Dan Issel, Nene Hilario and Bobby Jones. 2nd all-time in turnovers: 1726 Behind Dan Issel. 7th all-time in personal fouls: 1693 Behind Dan Issel, Alex English, Byron Beck, Danny Schayes, Nene Hilario and Bill Hanzlik. 3rd all-time in points: 13970 Behind Alex English and Dan Issel. Games with 50+ points: 2 Tied with Alex English and Kiki Vandeweghe. Games with 40+ points: 19 Games with 30+ points: 163 Season Points Consecutive games of 20 points or more: 20 (October 28-December 7, 2009) Consecutive games of 30 points or more: 6 (twice during the 2006–07 season) Tied with Alex English (1982–83) Game Free throws attempted: 24 (on December 18, 2005 vs. Atlanta Hawks)) Most points scored in a game by a rookie: 41 (on March 30, 2004 vs. Seattle SuperSonics) Most points scored in one quarter: 33 (on December 10, 2008 vs. Minnesota Timberwolves) Playoffs Career Service Minutes played: 1737 7th all-time in games played: 45 Behind Alex English, T.R. Dunn, Bill Hanzlik, Dan Issel, Mike Evans and Danny Schayes. Scoring 2nd all-time in points scored: 1104 Behind Alex English. (1982–1990) 3rd all-time in points per game: 24.5 Behind Alex English and Kiki Vandeweghe. Game Points: 42 ( vs. Utah Jazz) Tied with Alex English. (2 times) New York Knicks franchise records and achievements Season Points: Consecutive games of 20 points or more: 31 (November 16, 2012 – February 1, 2013) Consecutive games of 40 points or more: 3 (April 2–5, 2013) Tied with Bernard King (November 21–24, 1984) Game Points: Points scored in a game: 62 (January 24, 2014) Points scored in Madison Square Garden in a game: 62 (January 24, 2014) Points scored in a quarter: 25 (January 19, 2017) Field goals Field goals made in a game: 23 (January 24, 2014) See also List of NBA regular season records References External links Official Site Player Profile at NBA.com Player Profile at ESPN.com Anthony, Carmelo
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url" android:shape="oval" android:useLevel="false"> <solid android:color="#000000" /> <size android:width="20dp" android:height="20dp" /> </shape> ```
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\DataprocMetastore; class QueryMetadataResponse extends \Google\Model { /** * @var string */ public $resultManifestUri; /** * @param string */ public function setResultManifestUri($resultManifestUri) { $this->resultManifestUri = $resultManifestUri; } /** * @return string */ public function getResultManifestUri() { return $this->resultManifestUri; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(QueryMetadataResponse::class, 'Google_Service_DataprocMetastore_QueryMetadataResponse'); ```
The brownburnie (Chaetodon blackburnii), also known as Blackburn's butterflyfish or the rayed butterflyfish, is a species of marine ray-finned fish, a butterflyfish belonging to the family Chaetodontidae. It is found in the western Indian Ocean. Description The brownburnie is rather drab when compared to many of its congeners. The body of this species is mainly brownish black with the head and front part of the body being bright yellow with a black vertical bar running across the eye. The dark colour extends onto the dorsal fin and the anal fin while the pelvic fins are bright yellow. The dorsal fin contains 16 spines and 21-23 soft rays while the anal fin has 3 spines and 17-18 soft rays. This species attains a maximum total length of . Distribution The brownburnie is found in the western Indian Ocean. It is distributed along the East African coast from Kenya in the north to the Mbhashe River in the Eastern Cape Province of South Africa. It has also been recorded from the French Southern and Antarctic Lands in the Mozambique Channel islands, Madagascar, Mauritius, Rodrigues and Réunion in the Indian Ocean. Habitat and biology The brownburnie inhabits shallow rocky reefs and calm bays with limited growth of coral. They are found wither solitarily or in pairs. They are omnivorous and feed on benthic invertebrates such as bivalves, soft coral polyps, crustaceans and worms as well as zooplankton. it is an oviparous species in which the male and females mate as pairs. Taxonomy and etymology The brownburnie was first formally described in 1836 by the French naturalist Julien Desjardins (1799-1840) with the type locality given as Mauritius. The specific name honours the English jurist Edward Berens Blackburn (1786-1839) who was the Chief Justice of Mauritius from 1824 to 1835 and president of the Société d’Histoire Naturelle de l’Ile Maurice (the Natural History Society of the island of Mauritius). Utilisation The brownburnie is rarely seen in the aquarium trade because of its comparatively drab colouration. References Brownburnie Fish described in 1836
Supremus (; 1915–1916) was a group of Russian avant-garde artists led by the "father" of Suprematism, Kazimir Malevich. It has been described as the first attempt to found the Russian avant-garde movement as an artistic entity within its own historical development. Supremus conceptualized the artist as one who has freed himself from everything that pre-decided the ideal structure of life and art. Malevich projected the Supremus vision onto Cubism, which he believed deconstructs things and completely changes the reference points of art. To support the movement, Malevich established the journal Supremus (initially titled Nul or Nothing), which received contributions from artists and philosophers. The publication, however, never took off and its first issue was never distributed due to the Russian Revolution. Members of the group included Aleksandra Ekster, Liubov Popova, Olga Rozanova, Ivan Kliun, Ivan Puni, Nadezhda Udaltsova, Nina Genke-Meller, Ksenia Boguslavskaya and others. See also Suprematism Kazimir Malevich Russian avant-garde Verbovka Village Folk Centre References Russian artist groups and collectives Russian avant-garde 20th-century Russian painters Ukrainian male painters Suprematism (art movement)
```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <script src="path_to_url"></script> <link href="path_to_url|Inconsolata|Karla|Rubik&display=swap" rel="stylesheet" /> <script> window.dpLocal = true; window.dpLocalViewEvent = true; window.dpReportId = "42199d07095c4b5382cd0d3e44180687"; window.dpAuthorId = "c049272836264c4792255d6fa0f3bacb"; </script> <style> /* Document ======== */ /** Use a better box model (opinionated). */ *, ::before, ::after { box-sizing: border-box; } /** Use a more readable tab size (opinionated). */ html { tab-size: 4; } /** 1. Correct the line height in all browsers. 2. Prevent adjustments of font size after orientation changes in iOS. */ html { line-height: 1.15; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ } /* Sections ======== */ /** Remove the margin in all browsers. */ body { margin: 0; } /** Improve consistency of default fonts in all browsers. (path_to_url */ body { font-family: system-ui, -apple-system, /* Firefox supports this but not yet `system-ui` */ 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; } /* Grouping content ================ */ /** 1. Add the correct height in Firefox. 2. Correct the inheritance of border color in Firefox. (path_to_url */ hr { height: 0; /* 1 */ color: inherit; /* 2 */ } /* Text-level semantics ==================== */ /** Add the correct text decoration in Chrome, Edge, and Safari. */ abbr[title] { text-decoration: underline dotted; } /** Add the correct font weight in Edge and Safari. */ b, strong { font-weight: bolder; } /** 1. Improve consistency of default fonts in all browsers. (path_to_url 2. Correct the odd 'em' font sizing in all browsers. */ code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; /* 1 */ font-size: 1em; /* 2 */ } /** Add the correct font size in all browsers. */ small { font-size: 80%; } /** Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } /* Tabular data ============ */ /** 1. Remove text indentation from table contents in Chrome and Safari. (path_to_url path_to_url 2. Correct table border color inheritance in all Chrome and Safari. (path_to_url path_to_url */ table { text-indent: 0; /* 1 */ border-color: inherit; /* 2 */ } /* Forms ===== */ /** 1. Change the font styles in all browsers. 2. Remove the margin in Firefox and Safari. */ button, input, optgroup, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 1 */ line-height: 1.15; /* 1 */ margin: 0; /* 2 */ } /** Remove the inheritance of text transform in Edge and Firefox. 1. Remove the inheritance of text transform in Firefox. */ button, select { /* 1 */ text-transform: none; } /** Correct the inability to style clickable types in iOS and Safari. */ button, [type='button'], [type='reset'], [type='submit'] { -webkit-appearance: button; } /** Remove the inner border and padding in Firefox. */ ::-moz-focus-inner { border-style: none; padding: 0; } /** Restore the focus styles unset by the previous rule. */ /** Remove the additional ':invalid' styles in Firefox. See: path_to_url#L728-L737 */ /** Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. */ legend { padding: 0; } /** Add the correct vertical alignment in Chrome and Firefox. */ progress { vertical-align: baseline; } /** Correct the cursor style of increment and decrement buttons in Safari. */ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } /** 1. Correct the odd appearance in Chrome and Safari. 2. Correct the outline style in Safari. */ [type='search'] { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } /** Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { -webkit-appearance: none; } /** 1. Correct the inability to style clickable types in iOS and Safari. 2. Change font properties to 'inherit' in Safari. */ ::-webkit-file-upload-button { -webkit-appearance: button; /* 1 */ font: inherit; /* 2 */ } /* Interactive =========== */ /* Add the correct display in Chrome and Safari. */ summary { display: list-item; } /** * Manually forked from SUIT CSS Base: path_to_url * A thin layer on top of normalize.css that provides a starting point more * suitable for web applications. */ /** * Removes the default spacing and border for appropriate elements. */ blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } button { background-color: transparent; background-image: none; } fieldset { margin: 0; padding: 0; } ol, ul { list-style: none; margin: 0; padding: 0; } /** * Tailwind custom reset styles */ /** * 1. Use the user's configured `sans` font-family (with Tailwind's default * sans-serif font stack as a fallback) as a sane default. * 2. Use Tailwind's default "normal" line-height so the user isn't forced * to override it to ensure consistency even when using the default theme. */ html { font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 1 */ line-height: 1.5; /* 2 */ } /** * Inherit font-family and line-height from `html` so users can set them as * a class directly on the `html` element. */ body { font-family: inherit; line-height: inherit; } /** * 1. Prevent padding and border from affecting element width. * * We used to set this in the html element and inherit from * the parent element for everything else. This caused issues * in shadow-dom-enhanced elements like <details> where the content * is wrapped by a div with box-sizing set to `content-box`. * * path_to_url * * * 2. Allow adding a border to an element by just adding a border-width. * * By default, the way the browser specifies that an element should have no * border is by setting it's border-style to `none` in the user-agent * stylesheet. * * In order to easily add borders to elements by just setting the `border-width` * property, we change the default border-style for all elements to `solid`, and * use border-width to hide them instead. This way our `border` utilities only * need to set the `border-width` property instead of the entire `border` * shorthand, making our border utilities much more straightforward to compose. * * path_to_url */ *, ::before, ::after { box-sizing: border-box; /* 1 */ border-width: 0; /* 2 */ border-style: solid; /* 2 */ border-color: currentColor; /* 2 */ } /* * Ensure horizontal rules are visible by default */ hr { border-top-width: 1px; } /** * Undo the `border-style: none` reset that Normalize applies to images so that * our `border-{width}` utilities have the expected effect. * * The Normalize reset is unnecessary for us since we default the border-width * to 0 on all elements. * * path_to_url */ img { border-style: solid; } textarea { resize: vertical; } input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; } button, [role="button"] { cursor: pointer; } /** * Override legacy focus reset from Normalize with modern Firefox focus styles. * * This is actually an improvement over the new defaults in Firefox in our testing, * as it triggers the better focus styles even for links, which still use a dotted * outline in Firefox by default. */ table { border-collapse: collapse; } h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } /** * Reset links to optimize for opt-in styling instead of * opt-out. */ a { color: inherit; text-decoration: inherit; } /** * Reset form element properties that are easy to forget to * style explicitly so you don't inadvertently introduce * styles that deviate from your design system. These styles * supplement a partial reset that is already applied by * normalize.css. */ button, input, optgroup, select, textarea { padding: 0; line-height: inherit; color: inherit; } /** * Use the configured 'mono' font family for elements that * are expected to be rendered with a monospace font, falling * back to the system monospace stack if there is no configured * 'mono' font family. */ pre, code, kbd, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } /** * 1. Make replaced elements `display: block` by default as that's * the behavior you want almost all of the time. Inspired by * CSS Remedy, with `svg` added as well. * * path_to_url * * 2. Add `vertical-align: middle` to align replaced elements more * sensibly by default when overriding `display` by adding a * utility like `inline`. * * This can trigger a poorly considered linting error in some * tools but is included by design. * * path_to_url#issuecomment-634934210 */ img, svg, video, canvas, audio, iframe, embed, object { display: block; /* 1 */ vertical-align: middle; /* 2 */ } /** * Constrain images and videos to the parent width and preserve * their intrinsic aspect ratio. * * path_to_url */ img, video { max-width: 100%; height: auto; } /** * Ensure the default browser behavior of the `hidden` attribute. */ [hidden] { display: none; } *, ::before, ::after { --tw-border-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-border-opacity)); } [type='text'], [type='email'], [type='url'], [type='password'], [type='number'], [type='date'], [type='search'], [type='time'], [multiple], textarea, select { appearance: none; background-color: #fff; border-color: #6b7280; border-width: 1px; border-radius: 0px; padding-top: 0.5rem; padding-right: 0.75rem; padding-bottom: 0.5rem; padding-left: 0.75rem; font-size: 1rem; line-height: 1.5rem; } [type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='search']:focus, [type='time']:focus, [multiple]:focus, textarea:focus, select:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: #2563eb; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); border-color: #2563eb; } input::placeholder, textarea::placeholder { color: #6b7280; opacity: 1; } ::-webkit-datetime-edit-fields-wrapper { padding: 0; } ::-webkit-date-and-time-value { min-height: 1.5em; } select { background-image: url("data:image/svg+xml,%3csvg xmlns='path_to_url fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; -webkit-print-color-adjust: exact; color-adjust: exact; } [multiple] { background-image: initial; background-position: initial; background-repeat: unset; background-size: initial; padding-right: 0.75rem; -webkit-print-color-adjust: unset; color-adjust: unset; } [type='checkbox'] { appearance: none; padding: 0; -webkit-print-color-adjust: exact; color-adjust: exact; display: inline-block; vertical-align: middle; background-origin: border-box; user-select: none; flex-shrink: 0; height: 1rem; width: 1rem; color: #2563eb; background-color: #fff; border-color: #6b7280; border-width: 1px; } [type='checkbox'] { border-radius: 0px; } [type='checkbox']:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 2px; --tw-ring-offset-color: #fff; --tw-ring-color: #2563eb; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } [type='checkbox']:checked { border-color: transparent; background-color: currentColor; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; } [type='checkbox']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='path_to_url d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } [type='checkbox']:checked:hover, [type='checkbox']:checked:focus { border-color: transparent; background-color: currentColor; } [type='checkbox']:indeterminate { background-image: url("data:image/svg+xml,%3csvg xmlns='path_to_url fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); border-color: transparent; background-color: currentColor; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; } [type='checkbox']:indeterminate:hover, [type='checkbox']:indeterminate:focus { border-color: transparent; background-color: currentColor; } [type='file'] { background: unset; border-color: inherit; border-width: 0; border-radius: 0; padding: 0; font-size: unset; line-height: inherit; } [type='file']:focus { outline: 1px auto -webkit-focus-ring-color; } .container { width: 100%; } @media (min-width: 640px) { .container { max-width: 640px; } } @media (min-width: 768px) { .container { max-width: 768px; } } @media (min-width: 1024px) { .container { max-width: 1024px; } } @media (min-width: 1280px) { .container { max-width: 1280px; } } @media (min-width: 1536px) { .container { max-width: 1536px; } } .prose { color: #111827; max-width: 65ch; } .prose [class~="lead"] { color: #4b5563; font-size: 1.25em; line-height: 1.6; margin-top: 1.2em; margin-bottom: 1.2em; } .prose a { color: #a5b4fc; text-decoration: underline; font-weight: 500; } .prose a:hover { color: #a5b4fc; } .prose strong { color: #111827; font-weight: 600; } .prose ol { counter-reset: list-counter; margin-top: 1.25em; margin-bottom: 1.25em; } .prose ol > li { position: relative; counter-increment: list-counter; padding-left: 1.75em; } .prose ol > li::before { content: counter(list-counter) "."; position: absolute; font-weight: 400; color: #6b7280; left: 0; } .prose ul > li { position: relative; padding-left: 1.75em; } .prose ul > li::before { content: ""; position: absolute; background-color: #d1d5db; border-radius: 50%; width: 0.375em; height: 0.375em; top: calc(0.875em - 0.1875em); left: 0.25em; } .prose hr { border-color: #e5e7eb; border-top-width: 1px; margin-top: 3em; margin-bottom: 3em; } .prose blockquote { font-weight: 500; font-style: italic; color: #111827; border-left-width: 0.25rem; border-left-color: #e5e7eb; quotes: "\201C""\201D""\2018""\2019"; margin-top: 1.6em; margin-bottom: 1.6em; padding-left: 1em; } .prose blockquote p:first-of-type::before { content: open-quote; } .prose blockquote p:last-of-type::after { content: close-quote; } .prose h1 { color: #111827; font-weight: 800; font-size: 2.25em; margin-top: 0; margin-bottom: 0.8888889em; line-height: 1.1111111; } .prose h2 { color: #111827; font-weight: 700; font-size: 1.5em; margin-top: 2em; margin-bottom: 1em; line-height: 1.3333333; } .prose h3 { color: #111827; font-weight: 600; font-size: 1.25em; margin-top: 1.6em; margin-bottom: 0.6em; line-height: 1.6; } .prose h4 { color: #111827; font-weight: 600; margin-top: 1.5em; margin-bottom: 0.5em; line-height: 1.5; } .prose figure figcaption { color: #6b7280; font-size: 0.875em; line-height: 1.4285714; margin-top: 0.8571429em; } .prose code { color: #111827; font-weight: 600; font-size: 0.875em; } .prose code::before { content: "`"; } .prose code::after { content: "`"; } .prose a code { color: #111827; } .prose pre { color: #e5e7eb; background-color: #1f2937; overflow-x: auto; font-size: 0.875em; line-height: 1.7142857; margin-top: 1.7142857em; margin-bottom: 1.7142857em; border-radius: 0.375rem; padding-top: 0.8571429em; padding-right: 1.1428571em; padding-bottom: 0.8571429em; padding-left: 1.1428571em; } .prose pre code { background-color: transparent; border-width: 0; border-radius: 0; padding: 0; font-weight: 400; color: inherit; font-size: inherit; font-family: inherit; line-height: inherit; } .prose pre code::before { content: ""; } .prose pre code::after { content: ""; } .prose table { width: 100%; table-layout: auto; text-align: left; margin-top: 2em; margin-bottom: 2em; font-size: 0.875em; line-height: 1.7142857; } .prose thead { color: #111827; font-weight: 600; border-bottom-width: 1px; border-bottom-color: #d1d5db; } .prose thead th { vertical-align: bottom; padding-right: 0.5714286em; padding-bottom: 0.5714286em; padding-left: 0.5714286em; } .prose tbody tr { border-bottom-width: 1px; border-bottom-color: #e5e7eb; } .prose tbody tr:last-child { border-bottom-width: 0; } .prose tbody td { vertical-align: top; padding-top: 0.5714286em; padding-right: 0.5714286em; padding-bottom: 0.5714286em; padding-left: 0.5714286em; } .prose { font-size: 1rem; line-height: 1.75; } .prose p { margin-top: 1.25em; margin-bottom: 1.25em; text-align: var(--dp-text-align); hyphens: auto; } .prose img { margin-top: 2em; margin-bottom: 2em; } .prose video { margin-top: 2em; margin-bottom: 2em; } .prose figure { margin-top: 2em; margin-bottom: 2em; } .prose figure > * { margin-top: 0; margin-bottom: 0; } .prose h2 code { font-size: 0.875em; } .prose h3 code { font-size: 0.9em; } .prose ul { margin-top: 1.25em; margin-bottom: 1.25em; } .prose li { margin-top: 0.5em; margin-bottom: 0.5em; text-align: var(--dp-text-align); hyphens: auto; } .prose > ul > li p { margin-top: 0.75em; margin-bottom: 0.75em; } .prose > ul > li > *:first-child { margin-top: 1.25em; } .prose > ul > li > *:last-child { margin-bottom: 1.25em; } .prose > ol > li > *:first-child { margin-top: 1.25em; } .prose > ol > li > *:last-child { margin-bottom: 1.25em; } .prose ul ul, .prose ul ol, .prose ol ul, .prose ol ol { margin-top: 0.75em; margin-bottom: 0.75em; } .prose hr + * { margin-top: 0; } .prose h2 + * { margin-top: 0; } .prose h3 + * { margin-top: 0; } .prose h4 + * { margin-top: 0; } .prose thead th:first-child { padding-left: 0; } .prose thead th:last-child { padding-right: 0; } .prose tbody td:first-child { padding-left: 0; } .prose tbody td:last-child { padding-right: 0; } .prose > :first-child { margin-top: 0; } .prose > :last-child { margin-bottom: 0; } .prose h5 { color: #111827; } .prose h6 { color: #111827; } .prose figcaption { color: #111827; } .prose-lg { font-size: 1.125rem; line-height: 1.7777778; } .prose-lg p { margin-top: 1.3333333em; margin-bottom: 1.3333333em; } .prose-lg [class~="lead"] { font-size: 1.2222222em; line-height: 1.4545455; margin-top: 1.0909091em; margin-bottom: 1.0909091em; } .prose-lg blockquote { margin-top: 1.6666667em; margin-bottom: 1.6666667em; padding-left: 1em; } .prose-lg h1 { font-size: 2.6666667em; margin-top: 0; margin-bottom: 0.8333333em; line-height: 1; } .prose-lg h2 { font-size: 1.6666667em; margin-top: 1.8666667em; margin-bottom: 1.0666667em; line-height: 1.3333333; } .prose-lg h3 { font-size: 1.3333333em; margin-top: 1.6666667em; margin-bottom: 0.6666667em; line-height: 1.5; } .prose-lg h4 { margin-top: 1.7777778em; margin-bottom: 0.4444444em; line-height: 1.5555556; } .prose-lg img { margin-top: 1.7777778em; margin-bottom: 1.7777778em; } .prose-lg video { margin-top: 1.7777778em; margin-bottom: 1.7777778em; } .prose-lg figure { margin-top: 1.7777778em; margin-bottom: 1.7777778em; } .prose-lg figure > * { margin-top: 0; margin-bottom: 0; } .prose-lg figure figcaption { font-size: 0.8888889em; line-height: 1.5; margin-top: 1em; } .prose-lg code { font-size: 0.8888889em; } .prose-lg h2 code { font-size: 0.8666667em; } .prose-lg h3 code { font-size: 0.875em; } .prose-lg pre { font-size: 0.8888889em; line-height: 1.75; margin-top: 2em; margin-bottom: 2em; border-radius: 0.375rem; padding-top: 1em; padding-right: 1.5em; padding-bottom: 1em; padding-left: 1.5em; } .prose-lg ol { margin-top: 1.3333333em; margin-bottom: 1.3333333em; } .prose-lg ul { margin-top: 1.3333333em; margin-bottom: 1.3333333em; } .prose-lg li { margin-top: 0.6666667em; margin-bottom: 0.6666667em; } .prose-lg ol > li { padding-left: 1.6666667em; } .prose-lg ol > li::before { left: 0; } .prose-lg ul > li { padding-left: 1.6666667em; } .prose-lg ul > li::before { width: 0.3333333em; height: 0.3333333em; top: calc(0.8888889em - 0.1666667em); left: 0.2222222em; } .prose-lg > ul > li p { margin-top: 0.8888889em; margin-bottom: 0.8888889em; } .prose-lg > ul > li > *:first-child { margin-top: 1.3333333em; } .prose-lg > ul > li > *:last-child { margin-bottom: 1.3333333em; } .prose-lg > ol > li > *:first-child { margin-top: 1.3333333em; } .prose-lg > ol > li > *:last-child { margin-bottom: 1.3333333em; } .prose-lg ul ul, .prose-lg ul ol, .prose-lg ol ul, .prose-lg ol ol { margin-top: 0.8888889em; margin-bottom: 0.8888889em; } .prose-lg hr { margin-top: 3.1111111em; margin-bottom: 3.1111111em; } .prose-lg hr + * { margin-top: 0; } .prose-lg h2 + * { margin-top: 0; } .prose-lg h3 + * { margin-top: 0; } .prose-lg h4 + * { margin-top: 0; } .prose-lg table { font-size: 0.8888889em; line-height: 1.5; } .prose-lg thead th { padding-right: 0.75em; padding-bottom: 0.75em; padding-left: 0.75em; } .prose-lg thead th:first-child { padding-left: 0; } .prose-lg thead th:last-child { padding-right: 0; } .prose-lg tbody td { padding-top: 0.75em; padding-right: 0.75em; padding-bottom: 0.75em; padding-left: 0.75em; } .prose-lg tbody td:first-child { padding-left: 0; } .prose-lg tbody td:last-child { padding-right: 0; } .prose-lg > :first-child { margin-top: 0; } .prose-lg > :last-child { margin-bottom: 0; } .prose-indigo { } .prose-dark { color: #f3f4f6; } .prose-dark h1 { color: #f3f4f6; } .prose-dark h2 { color: #f3f4f6; } .prose-dark h3 { color: #f3f4f6; } .prose-dark h4 { color: #f3f4f6; } .prose-dark h5 { color: #f3f4f6; } .prose-dark h6 { color: #f3f4f6; } .prose-dark strong { color: #f3f4f6; } .prose-dark code { color: #f3f4f6; } .prose-dark figcaption { color: #d1d5db; } .aspect-w-5, .aspect-w-10 { position: relative; padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); } .aspect-w-5 > *, .aspect-w-10 > * { position: absolute; height: 100%; width: 100%; top: 0; right: 0; bottom: 0; left: 0; } .aspect-w-5 { --tw-aspect-w: 5; } .aspect-w-10 { --tw-aspect-w: 10; } .aspect-h-3 { --tw-aspect-h: 3; } .aspect-h-7 { --tw-aspect-h: 7; } h1{ font-size: 1.5rem } h2{ font-size: 1.25rem } h3{ font-size: 1.125rem } .dp-callout{ --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); padding: 0.5rem } .dp-link{ cursor: pointer; font-weight: 600; --tw-text-opacity: 1; color: rgba(79, 70, 229, var(--tw-text-opacity)) } .dp-link:hover { --tw-text-opacity: 1; color: rgba(67, 56, 202, var(--tw-text-opacity)); text-decoration: underline; } .dp-btn{ display: inline-flex; align-items: center; border-radius: 0.375rem; border-width: 1px; padding-left: 1rem; padding-right: 1rem; padding-top: 0.5rem; padding-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500 } .dp-btn:focus { outline: 2px solid transparent; outline-offset: 2px; } .dp-btn { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; transition-duration: 150ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } .dp-btn-lg{ padding-left: 1.5rem; padding-right: 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; font-size: 1rem; font-weight: 500 } .dp-btn-primary{ border-color: transparent } .dp-btn-primary:focus { --tw-border-opacity: 1; border-color: rgba(67, 56, 202, var(--tw-border-opacity)); } .dp-btn-primary { --tw-bg-opacity: 1; background-color: rgba(79, 70, 229, var(--tw-bg-opacity)); } .dp-btn-primary:hover { --tw-bg-opacity: 1; background-color: rgba(99, 102, 241, var(--tw-bg-opacity)); } .dp-btn-primary:active { --tw-bg-opacity: 1; background-color: rgba(67, 56, 202, var(--tw-bg-opacity)); } .dp-btn-primary { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-primary:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-primary { --tw-ring-opacity: 1; --tw-ring-color: rgba(67, 56, 202, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-green{ border-color: transparent } .dp-btn-green:focus { --tw-border-opacity: 1; border-color: rgba(5, 150, 105, var(--tw-border-opacity)); } .dp-btn-green { --tw-bg-opacity: 1; background-color: rgba(5, 150, 105, var(--tw-bg-opacity)); } .dp-btn-green:hover { --tw-bg-opacity: 1; background-color: rgba(4, 120, 87, var(--tw-bg-opacity)); } .dp-btn-green:active { --tw-bg-opacity: 1; background-color: rgba(4, 120, 87, var(--tw-bg-opacity)); } .dp-btn-green { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-green:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-green { --tw-ring-opacity: 1; --tw-ring-color: rgba(67, 56, 202, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-blue{ border-color: transparent } .dp-btn-blue:focus { --tw-border-opacity: 1; border-color: rgba(29, 78, 216, var(--tw-border-opacity)); } .dp-btn-blue { --tw-bg-opacity: 1; background-color: rgba(37, 99, 235, var(--tw-bg-opacity)); } .dp-btn-blue:hover { --tw-bg-opacity: 1; background-color: rgba(29, 78, 216, var(--tw-bg-opacity)); } .dp-btn-blue:active { --tw-bg-opacity: 1; background-color: rgba(29, 78, 216, var(--tw-bg-opacity)); } .dp-btn-blue { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-blue:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-blue { --tw-ring-opacity: 1; --tw-ring-color: rgba(29, 78, 216, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-danger{ border-color: transparent } .dp-btn-danger:focus { --tw-border-opacity: 1; border-color: rgba(185, 28, 28, var(--tw-border-opacity)); } .dp-btn-danger { --tw-bg-opacity: 1; background-color: rgba(220, 38, 38, var(--tw-bg-opacity)); } .dp-btn-danger:hover { --tw-bg-opacity: 1; background-color: rgba(239, 68, 68, var(--tw-bg-opacity)); } .dp-btn-danger { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-danger:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-danger { --tw-ring-opacity: 1; --tw-ring-color: rgba(185, 28, 28, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-danger-outline{ --tw-border-opacity: 1; border-color: rgba(209, 213, 219, var(--tw-border-opacity)) } .dp-btn-danger-outline:focus { --tw-border-opacity: 1; border-color: rgba(147, 197, 253, var(--tw-border-opacity)); } .dp-btn-danger-outline { --tw-bg-opacity: 1; background-color: rgba(255, 255, 255, var(--tw-bg-opacity)); } .dp-btn-danger-outline:active { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .dp-btn-danger-outline { --tw-text-opacity: 1; color: rgba(185, 28, 28, var(--tw-text-opacity)); } .dp-btn-danger-outline:hover { --tw-text-opacity: 1; color: rgba(239, 68, 68, var(--tw-text-opacity)); } .dp-btn-danger-outline:active { --tw-text-opacity: 1; color: rgba(153, 27, 27, var(--tw-text-opacity)); --tw-text-opacity: 1; color: rgba(153, 27, 27, var(--tw-text-opacity)); } .dp-btn-danger-outline:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-danger-outline { --tw-ring-opacity: 1; --tw-ring-color: rgba(29, 78, 216, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-info{ --tw-border-opacity: 1; border-color: rgba(209, 213, 219, var(--tw-border-opacity)) } .dp-btn-info:focus { --tw-border-opacity: 1; border-color: rgba(147, 197, 253, var(--tw-border-opacity)); } .dp-btn-info { --tw-bg-opacity: 1; background-color: rgba(255, 255, 255, var(--tw-bg-opacity)); } .dp-btn-info:active { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .dp-btn-info { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .dp-btn-info:hover { --tw-text-opacity: 1; color: rgba(107, 114, 128, var(--tw-text-opacity)); } .dp-btn-info:active { --tw-text-opacity: 1; color: rgba(31, 41, 55, var(--tw-text-opacity)); } .dp-btn-info:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-info { --tw-ring-opacity: 1; --tw-ring-color: rgba(29, 78, 216, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-dark{ border-color: transparent } .dp-btn-dark:focus { --tw-border-opacity: 1; border-color: rgba(31, 41, 55, var(--tw-border-opacity)); } .dp-btn-dark { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .dp-btn-dark:hover { --tw-bg-opacity: 1; background-color: rgba(75, 85, 99, var(--tw-bg-opacity)); } .dp-btn-dark { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-dark:hover { --tw-text-opacity: 1; color: rgba(229, 231, 235, var(--tw-text-opacity)); } .dp-btn-dark:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .dp-btn-dark { --tw-ring-opacity: 1; --tw-ring-color: rgba(55, 65, 81, var(--tw-ring-opacity)); --tw-ring-opacity: 0.5; } .dp-btn-dark-outline{ border-color: transparent } .dp-btn-dark-outline:hover { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .dp-btn-dark-outline:focus { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .dp-btn-dark-outline { --tw-text-opacity: 1; color: rgba(209, 213, 219, var(--tw-text-opacity)); } .dp-btn-dark-outline:hover { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-dark-outline:focus { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .dp-btn-sm{ display: inline-flex; align-items: center; border-radius: 0.25rem; border-width: 1px; border-color: transparent; padding-left: 0.625rem; padding-right: 0.625rem; padding-top: 0.375rem; padding-bottom: 0.375rem; font-size: 0.75rem; font-weight: 500 } .dp-btn-sm:focus { outline: 2px solid transparent; outline-offset: 2px; --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); --tw-ring-offset-width: 2px; } .dp-btn-github{ background-color:#eee; background-image:linear-gradient(to bottom, #fcfcfc 0, #eee 100%); background-repeat:no-repeat; border:1px solid #d5d5d5; color:#333; padding-top: 0.25rem; padding-bottom: 0.25rem } .dp-btn-github:focus,.dp-btn-github:hover{ text-decoration:none; background-color:#ddd; background-image:linear-gradient(to bottom, #eee 0, #ddd 100%); border-color:#ccc } .dp-btn-secondary-gray{ --tw-bg-opacity: 1; background-color: rgba(243, 244, 246, var(--tw-bg-opacity)) } .dp-btn-secondary-gray:hover { --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } .dp-btn-secondary-gray { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .dp-btn-secondary-gray:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(107, 114, 128, var(--tw-ring-opacity)); } .dp-btn-secondary-danger{ --tw-bg-opacity: 1; background-color: rgba(254, 226, 226, var(--tw-bg-opacity)) } .dp-btn-secondary-danger:hover { --tw-bg-opacity: 1; background-color: rgba(254, 202, 202, var(--tw-bg-opacity)); } .dp-btn-secondary-danger { --tw-text-opacity: 1; color: rgba(185, 28, 28, var(--tw-text-opacity)); } .dp-btn-secondary-danger:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(239, 68, 68, var(--tw-ring-opacity)); } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .pointer-events-none { pointer-events: none; } .pointer-events-auto { pointer-events: auto; } .visible { visibility: visible; } .static { position: static; } .fixed { position: fixed; } .absolute { position: absolute; } .relative { position: relative; } .sticky { position: sticky; } .inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; } .inset-x-0 { left: 0px; right: 0px; } .inset-y-0 { top: 0px; bottom: 0px; } .top-0 { top: 0px; } .top-2 { top: 0.5rem; } .right-0 { right: 0px; } .right-2 { right: 0.5rem; } .right-5 { right: 1.25rem; } .bottom-0 { bottom: 0px; } .left-0 { left: 0px; } .left-3\/4 { left: 75%; } .z-0 { z-index: 0; } .z-10 { z-index: 10; } .z-50 { z-index: 50; } .focus-within\:z-10:focus-within { z-index: 10; } .focus\:z-10:focus { z-index: 10; } .order-2 { order: 2; } .order-3 { order: 3; } .col-span-1 { grid-column: span 1 / span 1; } .col-span-2 { grid-column: span 2 / span 2; } .float-right { float: right; } .float-left { float: left; } .m-0 { margin: 0px; } .m-4 { margin: 1rem; } .m-auto { margin: auto; } .mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; } .mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; } .mx-8 { margin-left: 2rem; margin-right: 2rem; } .mx-auto { margin-left: auto; margin-right: auto; } .-mx-5 { margin-left: -1.25rem; margin-right: -1.25rem; } .my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; } .my-4 { margin-top: 1rem; margin-bottom: 1rem; } .my-12 { margin-top: 3rem; margin-bottom: 3rem; } .my-16 { margin-top: 4rem; margin-bottom: 4rem; } .-my-2 { margin-top: -0.5rem; margin-bottom: -0.5rem; } .mt-0 { margin-top: 0px; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mt-10 { margin-top: 2.5rem; } .mt-12 { margin-top: 3rem; } .mt-16 { margin-top: 4rem; } .mt-24 { margin-top: 6rem; } .mt-0\.5 { margin-top: 0.125rem; } .-mt-2 { margin-top: -0.5rem; } .-mt-4 { margin-top: -1rem; } .-mt-6 { margin-top: -1.5rem; } .-mt-16 { margin-top: -4rem; } .-mt-20 { margin-top: -5rem; } .-mt-px { margin-top: -1px; } .mr-0 { margin-right: 0px; } .mr-1 { margin-right: 0.25rem; } .mr-2 { margin-right: 0.5rem; } .mr-3 { margin-right: 0.75rem; } .mr-4 { margin-right: 1rem; } .mr-5 { margin-right: 1.25rem; } .mr-6 { margin-right: 1.5rem; } .mr-0\.5 { margin-right: 0.125rem; } .mr-1\.5 { margin-right: 0.375rem; } .-mr-1 { margin-right: -0.25rem; } .-mr-20 { margin-right: -5rem; } .mb-0 { margin-bottom: 0px; } .mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-10 { margin-bottom: 2.5rem; } .mb-48 { margin-bottom: 12rem; } .-mb-px { margin-bottom: -1px; } .ml-1 { margin-left: 0.25rem; } .ml-2 { margin-left: 0.5rem; } .ml-3 { margin-left: 0.75rem; } .ml-4 { margin-left: 1rem; } .ml-5 { margin-left: 1.25rem; } .ml-9 { margin-left: 2.25rem; } .ml-16 { margin-left: 4rem; } .ml-auto { margin-left: auto; } .-ml-0 { margin-left: 0px; } .-ml-1 { margin-left: -0.25rem; } .-ml-4 { margin-left: -1rem; } .-ml-48 { margin-left: -12rem; } .-ml-px { margin-left: -1px; } .-ml-0\.5 { margin-left: -0.125rem; } .block { display: block; } .inline-block { display: inline-block; } .inline { display: inline; } .flex { display: flex; } .inline-flex { display: inline-flex; } .table { display: table; } .flow-root { display: flow-root; } .grid { display: grid; } .hidden { display: none; } .h-0 { height: 0px; } .h-2 { height: 0.5rem; } .h-4 { height: 1rem; } .h-5 { height: 1.25rem; } .h-6 { height: 1.5rem; } .h-7 { height: 1.75rem; } .h-8 { height: 2rem; } .h-9 { height: 2.25rem; } .h-10 { height: 2.5rem; } .h-12 { height: 3rem; } .h-16 { height: 4rem; } .h-20 { height: 5rem; } .h-48 { height: 12rem; } .h-64 { height: 16rem; } .h-72 { height: 18rem; } .h-96 { height: 24rem; } .h-auto { height: auto; } .h-0\.5 { height: 0.125rem; } .h-2\.5 { height: 0.625rem; } .h-1\/3 { height: 33.333333%; } .h-full { height: 100%; } .h-screen { height: 100vh; } .h-480px { height: 480px; } .max-h-12 { max-height: 3rem; } .max-h-16 { max-height: 4rem; } .max-h-60 { max-height: 15rem; } .min-h-0 { min-height: 0px; } .min-h-full { min-height: 100%; } .min-h-screen { min-height: 100vh; } .w-0 { width: 0px; } .w-1 { width: 0.25rem; } .w-2 { width: 0.5rem; } .w-3 { width: 0.75rem; } .w-4 { width: 1rem; } .w-5 { width: 1.25rem; } .w-6 { width: 1.5rem; } .w-8 { width: 2rem; } .w-9 { width: 2.25rem; } .w-10 { width: 2.5rem; } .w-12 { width: 3rem; } .w-16 { width: 4rem; } .w-20 { width: 5rem; } .w-28 { width: 7rem; } .w-48 { width: 12rem; } .w-56 { width: 14rem; } .w-64 { width: 16rem; } .w-96 { width: 24rem; } .w-auto { width: auto; } .w-2\.5 { width: 0.625rem; } .w-1\/2 { width: 50%; } .w-1\/3 { width: 33.333333%; } .w-2\/5 { width: 40%; } .w-3\/5 { width: 60%; } .w-1\/6 { width: 16.666667%; } .w-full { width: 100%; } .w-screen { width: 100vw; } .w-640px { width: 640px; } .min-w-0 { min-width: 0px; } .min-w-full { min-width: 100%; } .max-w-0 { max-width: 0rem; } .max-w-none { max-width: none; } .max-w-sm { max-width: 24rem; } .max-w-md { max-width: 28rem; } .max-w-lg { max-width: 32rem; } .max-w-xl { max-width: 36rem; } .max-w-2xl { max-width: 42rem; } .max-w-3xl { max-width: 48rem; } .max-w-4xl { max-width: 56rem; } .max-w-5xl { max-width: 64rem; } .max-w-6xl { max-width: 72rem; } .max-w-7xl { max-width: 80rem; } .max-w-full { max-width: 100%; } .max-w-max { max-width: max-content; } .max-w-prose { max-width: 65ch; } .max-w-screen-xl { max-width: 1280px; } .flex-1 { flex: 1 1 0%; } .flex-auto { flex: 1 1 auto; } .flex-initial { flex: 0 1 auto; } .flex-none { flex: none; } .flex-fixed { flex: 0 0 auto; } .flex-shrink-0 { flex-shrink: 0; } .flex-shrink { flex-shrink: 1; } .flex-grow { flex-grow: 1; } .origin-top-right { transform-origin: top right; } .origin-top-left { transform-origin: top left; } .transform { --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } .translate-x-0 { --tw-translate-x: 0px; } .translate-x-5 { --tw-translate-x: 1.25rem; } .translate-x-6 { --tw-translate-x: 1.5rem; } .translate-x-1\/2 { --tw-translate-x: 50%; } .translate-y-0 { --tw-translate-y: 0px; } .translate-y-2 { --tw-translate-y: 0.5rem; } .translate-y-4 { --tw-translate-y: 1rem; } .translate-y-6 { --tw-translate-y: 1.5rem; } .-translate-y-1\/2 { --tw-translate-y: -50%; } .rotate-1 { --tw-rotate: 1deg; } .rotate-3 { --tw-rotate: 3deg; } .scale-95 { --tw-scale-x: .95; --tw-scale-y: .95; } .scale-100 { --tw-scale-x: 1; --tw-scale-y: 1; } @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); } 50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); } } .cursor-default { cursor: default; } .cursor-pointer { cursor: pointer; } .select-none { user-select: none; } .resize { resize: both; } .list-disc { list-style-type: disc; } .appearance-none { appearance: none; } .grid-flow-row { grid-auto-flow: row; } .grid-flow-col { grid-auto-flow: column; } .grid-flow-row-dense { grid-auto-flow: row dense; } .grid-flow-col-dense { grid-auto-flow: column dense; } .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .grid-cols-none { grid-template-columns: none; } .grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .grid-rows-none { grid-template-rows: none; } .grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; } .items-center { align-items: center; } .items-baseline { align-items: baseline; } .justify-start { justify-content: flex-start; } .justify-end { justify-content: flex-end; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-items-stretch { justify-items: stretch; } .gap-0 { gap: 0px; } .gap-1 { gap: 0.25rem; } .gap-3 { gap: 0.75rem; } .gap-5 { gap: 1.25rem; } .gap-8 { gap: 2rem; } .gap-0\.5 { gap: 0.125rem; } .gap-x-4 { column-gap: 1rem; } .gap-y-8 { row-gap: 2rem; } .gap-y-20 { row-gap: 5rem; } .space-x-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.25rem * var(--tw-space-x-reverse)); margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.5rem * var(--tw-space-x-reverse)); margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-3 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.75rem * var(--tw-space-x-reverse)); margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1rem * var(--tw-space-x-reverse)); margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-6 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1.5rem * var(--tw-space-x-reverse)); margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))); } .space-x-8 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(2rem * var(--tw-space-x-reverse)); margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse))); } .-space-x-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(-0.25rem * var(--tw-space-x-reverse)); margin-left: calc(-0.25rem * calc(1 - var(--tw-space-x-reverse))); } .space-y-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); } .space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); } .space-y-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1rem * var(--tw-space-y-reverse)); } .space-y-6 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); } .space-y-8 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(2rem * var(--tw-space-y-reverse)); } .space-y-10 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(2.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(2.5rem * var(--tw-space-y-reverse)); } .space-y-12 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(3rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(3rem * var(--tw-space-y-reverse)); } .divide-x > :not([hidden]) ~ :not([hidden]) { --tw-divide-x-reverse: 0; border-right-width: calc(1px * var(--tw-divide-x-reverse)); border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); } .divide-y > :not([hidden]) ~ :not([hidden]) { --tw-divide-y-reverse: 0; border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); } .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; border-color: rgba(243, 244, 246, var(--tw-divide-opacity)); } .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { --tw-divide-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-divide-opacity)); } .self-center { align-self: center; } .overflow-auto { overflow: auto; } .overflow-hidden { overflow: hidden; } .overflow-x-auto { overflow-x: auto; } .overflow-y-auto { overflow-y: auto; } .overflow-x-hidden { overflow-x: hidden; } .overflow-y-hidden { overflow-y: hidden; } .overflow-y-scroll { overflow-y: scroll; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .whitespace-normal { white-space: normal; } .whitespace-nowrap { white-space: nowrap; } .whitespace-pre-line { white-space: pre-line; } .rounded { border-radius: 0.25rem; } .rounded-md { border-radius: 0.375rem; } .rounded-lg { border-radius: 0.5rem; } .rounded-xl { border-radius: 0.75rem; } .rounded-2xl { border-radius: 1rem; } .rounded-3xl { border-radius: 1.5rem; } .rounded-full { border-radius: 9999px; } .rounded-t-md { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; } .rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; } .rounded-b-md { border-bottom-right-radius: 0.375rem; border-bottom-left-radius: 0.375rem; } .rounded-l-none { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } .rounded-br-2xl { border-bottom-right-radius: 1rem; } .rounded-bl-2xl { border-bottom-left-radius: 1rem; } .border-0 { border-width: 0px; } .border-2 { border-width: 2px; } .border { border-width: 1px; } .border-t-0 { border-top-width: 0px; } .border-t-2 { border-top-width: 2px; } .border-t { border-top-width: 1px; } .border-r { border-right-width: 1px; } .border-b-0 { border-bottom-width: 0px; } .border-b-2 { border-bottom-width: 2px; } .border-b-4 { border-bottom-width: 4px; } .border-b { border-bottom-width: 1px; } .border-l-0 { border-left-width: 0px; } .border-l-4 { border-left-width: 4px; } .border-none { border-style: none; } .border-transparent { border-color: transparent; } .border-white { --tw-border-opacity: 1; border-color: rgba(255, 255, 255, var(--tw-border-opacity)); } .border-gray-100 { --tw-border-opacity: 1; border-color: rgba(243, 244, 246, var(--tw-border-opacity)); } .border-gray-200 { --tw-border-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-border-opacity)); } .border-gray-300 { --tw-border-opacity: 1; border-color: rgba(209, 213, 219, var(--tw-border-opacity)); } .border-yellow-400 { --tw-border-opacity: 1; border-color: rgba(251, 191, 36, var(--tw-border-opacity)); } .border-blue-400 { --tw-border-opacity: 1; border-color: rgba(96, 165, 250, var(--tw-border-opacity)); } .border-indigo-400 { --tw-border-opacity: 1; border-color: rgba(129, 140, 248, var(--tw-border-opacity)); } .border-indigo-500 { --tw-border-opacity: 1; border-color: rgba(99, 102, 241, var(--tw-border-opacity)); } .border-indigo-600 { --tw-border-opacity: 1; border-color: rgba(79, 70, 229, var(--tw-border-opacity)); } .border-purple-600 { --tw-border-opacity: 1; border-color: rgba(124, 58, 237, var(--tw-border-opacity)); } .border-dp-accent { border-color: var(--dp-accent-color); } .hover\:border-gray-300:hover { --tw-border-opacity: 1; border-color: rgba(209, 213, 219, var(--tw-border-opacity)); } .focus\:border-transparent:focus { border-color: transparent; } .focus\:border-white:focus { --tw-border-opacity: 1; border-color: rgba(255, 255, 255, var(--tw-border-opacity)); } .focus\:border-gray-400:focus { --tw-border-opacity: 1; border-color: rgba(156, 163, 175, var(--tw-border-opacity)); } .focus\:border-gray-800:focus { --tw-border-opacity: 1; border-color: rgba(31, 41, 55, var(--tw-border-opacity)); } .focus\:border-red-700:focus { --tw-border-opacity: 1; border-color: rgba(185, 28, 28, var(--tw-border-opacity)); } .focus\:border-blue-300:focus { --tw-border-opacity: 1; border-color: rgba(147, 197, 253, var(--tw-border-opacity)); } .focus\:border-blue-500:focus { --tw-border-opacity: 1; border-color: rgba(59, 130, 246, var(--tw-border-opacity)); } .focus\:border-indigo-500:focus { --tw-border-opacity: 1; border-color: rgba(99, 102, 241, var(--tw-border-opacity)); } .focus\:border-indigo-600:focus { --tw-border-opacity: 1; border-color: rgba(79, 70, 229, var(--tw-border-opacity)); } .focus\:border-dp-accent:focus { border-color: var(--dp-accent-color); } .border-opacity-10 { --tw-border-opacity: 0.1; } .border-opacity-25 { --tw-border-opacity: 0.25; } .bg-transparent { background-color: transparent; } .bg-white { --tw-bg-opacity: 1; background-color: rgba(255, 255, 255, var(--tw-bg-opacity)); } .bg-gray-50 { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .bg-gray-100 { --tw-bg-opacity: 1; background-color: rgba(243, 244, 246, var(--tw-bg-opacity)); } .bg-gray-200 { --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } .bg-gray-300 { --tw-bg-opacity: 1; background-color: rgba(209, 213, 219, var(--tw-bg-opacity)); } .bg-gray-500 { --tw-bg-opacity: 1; background-color: rgba(107, 114, 128, var(--tw-bg-opacity)); } .bg-gray-600 { --tw-bg-opacity: 1; background-color: rgba(75, 85, 99, var(--tw-bg-opacity)); } .bg-gray-700 { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .bg-gray-800 { --tw-bg-opacity: 1; background-color: rgba(31, 41, 55, var(--tw-bg-opacity)); } .bg-gray-900 { --tw-bg-opacity: 1; background-color: rgba(17, 24, 39, var(--tw-bg-opacity)); } .bg-red-50 { --tw-bg-opacity: 1; background-color: rgba(254, 242, 242, var(--tw-bg-opacity)); } .bg-red-100 { --tw-bg-opacity: 1; background-color: rgba(254, 226, 226, var(--tw-bg-opacity)); } .bg-red-300 { --tw-bg-opacity: 1; background-color: rgba(252, 165, 165, var(--tw-bg-opacity)); } .bg-red-600 { --tw-bg-opacity: 1; background-color: rgba(220, 38, 38, var(--tw-bg-opacity)); } .bg-red-800 { --tw-bg-opacity: 1; background-color: rgba(153, 27, 27, var(--tw-bg-opacity)); } .bg-yellow-50 { --tw-bg-opacity: 1; background-color: rgba(255, 251, 235, var(--tw-bg-opacity)); } .bg-green-100 { --tw-bg-opacity: 1; background-color: rgba(209, 250, 229, var(--tw-bg-opacity)); } .bg-green-600 { --tw-bg-opacity: 1; background-color: rgba(5, 150, 105, var(--tw-bg-opacity)); } .bg-green-800 { --tw-bg-opacity: 1; background-color: rgba(6, 95, 70, var(--tw-bg-opacity)); } .bg-blue-50 { --tw-bg-opacity: 1; background-color: rgba(239, 246, 255, var(--tw-bg-opacity)); } .bg-blue-100 { --tw-bg-opacity: 1; background-color: rgba(219, 234, 254, var(--tw-bg-opacity)); } .bg-blue-600 { --tw-bg-opacity: 1; background-color: rgba(37, 99, 235, var(--tw-bg-opacity)); } .bg-blue-900 { --tw-bg-opacity: 1; background-color: rgba(30, 58, 138, var(--tw-bg-opacity)); } .bg-indigo-50 { --tw-bg-opacity: 1; background-color: rgba(238, 242, 255, var(--tw-bg-opacity)); } .bg-indigo-100 { --tw-bg-opacity: 1; background-color: rgba(224, 231, 255, var(--tw-bg-opacity)); } .bg-indigo-200 { --tw-bg-opacity: 1; background-color: rgba(199, 210, 254, var(--tw-bg-opacity)); } .bg-indigo-300 { --tw-bg-opacity: 1; background-color: rgba(165, 180, 252, var(--tw-bg-opacity)); } .bg-indigo-500 { --tw-bg-opacity: 1; background-color: rgba(99, 102, 241, var(--tw-bg-opacity)); } .bg-indigo-600 { --tw-bg-opacity: 1; background-color: rgba(79, 70, 229, var(--tw-bg-opacity)); } .bg-indigo-800 { --tw-bg-opacity: 1; background-color: rgba(55, 48, 163, var(--tw-bg-opacity)); } .bg-purple-100 { --tw-bg-opacity: 1; background-color: rgba(237, 233, 254, var(--tw-bg-opacity)); } .bg-purple-600 { --tw-bg-opacity: 1; background-color: rgba(124, 58, 237, var(--tw-bg-opacity)); } .bg-pink-100 { --tw-bg-opacity: 1; background-color: rgba(252, 231, 243, var(--tw-bg-opacity)); } .bg-dp-accent-light { background-color: var(--dp-accent-secondary-color); } .bg-dp-background { background-color: var(--dp-bg-color); } .group:hover .group-hover\:bg-gray-200 { --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } .hover\:bg-gray-50:hover { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .hover\:bg-gray-100:hover { --tw-bg-opacity: 1; background-color: rgba(243, 244, 246, var(--tw-bg-opacity)); } .hover\:bg-gray-200:hover { --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } .hover\:bg-gray-600:hover { --tw-bg-opacity: 1; background-color: rgba(75, 85, 99, var(--tw-bg-opacity)); } .hover\:bg-gray-700:hover { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .hover\:bg-red-200:hover { --tw-bg-opacity: 1; background-color: rgba(254, 202, 202, var(--tw-bg-opacity)); } .hover\:bg-red-500:hover { --tw-bg-opacity: 1; background-color: rgba(239, 68, 68, var(--tw-bg-opacity)); } .hover\:bg-blue-700:hover { --tw-bg-opacity: 1; background-color: rgba(29, 78, 216, var(--tw-bg-opacity)); } .hover\:bg-indigo-50:hover { --tw-bg-opacity: 1; background-color: rgba(238, 242, 255, var(--tw-bg-opacity)); } .hover\:bg-indigo-200:hover { --tw-bg-opacity: 1; background-color: rgba(199, 210, 254, var(--tw-bg-opacity)); } .hover\:bg-indigo-400:hover { --tw-bg-opacity: 1; background-color: rgba(129, 140, 248, var(--tw-bg-opacity)); } .hover\:bg-indigo-500:hover { --tw-bg-opacity: 1; background-color: rgba(99, 102, 241, var(--tw-bg-opacity)); } .hover\:bg-indigo-700:hover { --tw-bg-opacity: 1; background-color: rgba(67, 56, 202, var(--tw-bg-opacity)); } .hover\:bg-purple-50:hover { --tw-bg-opacity: 1; background-color: rgba(245, 243, 255, var(--tw-bg-opacity)); } .hover\:bg-purple-700:hover { --tw-bg-opacity: 1; background-color: rgba(109, 40, 217, var(--tw-bg-opacity)); } .hover\:bg-dp-accent:hover { background-color: var(--dp-accent-color); } .focus\:bg-gray-50:focus { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .focus\:bg-gray-100:focus { --tw-bg-opacity: 1; background-color: rgba(243, 244, 246, var(--tw-bg-opacity)); } .focus\:bg-gray-200:focus { --tw-bg-opacity: 1; background-color: rgba(229, 231, 235, var(--tw-bg-opacity)); } .focus\:bg-gray-700:focus { --tw-bg-opacity: 1; background-color: rgba(55, 65, 81, var(--tw-bg-opacity)); } .focus\:bg-indigo-400:focus { --tw-bg-opacity: 1; background-color: rgba(129, 140, 248, var(--tw-bg-opacity)); } .focus\:bg-indigo-500:focus { --tw-bg-opacity: 1; background-color: rgba(99, 102, 241, var(--tw-bg-opacity)); } .active\:bg-gray-50:active { --tw-bg-opacity: 1; background-color: rgba(249, 250, 251, var(--tw-bg-opacity)); } .bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); } .bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); } .from-gray-50 { --tw-gradient-from: #f9fafb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0)); } .from-gray-800 { --tw-gradient-from: #1f2937; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(31, 41, 55, 0)); } .from-blue-50 { --tw-gradient-from: #eff6ff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0)); } .from-indigo-50 { --tw-gradient-from: #eef2ff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(238, 242, 255, 0)); } .from-indigo-400 { --tw-gradient-from: #818cf8; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(129, 140, 248, 0)); } .from-indigo-700 { --tw-gradient-from: #4338ca; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(67, 56, 202, 0)); } .from-purple-500 { --tw-gradient-from: #8b5cf6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 92, 246, 0)); } .from-purple-600 { --tw-gradient-from: #7c3aed; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(124, 58, 237, 0)); } .hover\:from-gray-700:hover { --tw-gradient-from: #374151; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(55, 65, 81, 0)); } .hover\:from-indigo-600:hover { --tw-gradient-from: #4f46e5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0)); } .hover\:from-purple-700:hover { --tw-gradient-from: #6d28d9; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(109, 40, 217, 0)); } .via-white { --tw-gradient-stops: var(--tw-gradient-from), #fff, var(--tw-gradient-to, rgba(255, 255, 255, 0)); } .via-gray-200 { --tw-gradient-stops: var(--tw-gradient-from), #e5e7eb, var(--tw-gradient-to, rgba(229, 231, 235, 0)); } .via-gray-800 { --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to, rgba(31, 41, 55, 0)); } .to-white { --tw-gradient-to: #fff; } .to-gray-50 { --tw-gradient-to: #f9fafb; } .to-gray-600 { --tw-gradient-to: #4b5563; } .to-gray-900 { --tw-gradient-to: #111827; } .to-blue-100 { --tw-gradient-to: #dbeafe; } .to-indigo-600 { --tw-gradient-to: #4f46e5; } .to-purple-400 { --tw-gradient-to: #a78bfa; } .hover\:to-indigo-700:hover { --tw-gradient-to: #4338ca; } .bg-origin-border { background-origin: border-box; } .fill-current { fill: currentColor; } .object-cover { object-fit: cover; } .object-left-top { object-position: left top; } .object-top { object-position: top; } .p-0 { padding: 0px; } .p-1 { padding: 0.25rem; } .p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .px-0 { padding-left: 0px; padding-right: 0px; } .px-1 { padding-left: 0.25rem; padding-right: 0.25rem; } .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; } .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .px-8 { padding-left: 2rem; padding-right: 2rem; } .px-10 { padding-left: 2.5rem; padding-right: 2.5rem; } .px-12 { padding-left: 3rem; padding-right: 3rem; } .px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; } .px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; } .py-0 { padding-top: 0px; padding-bottom: 0px; } .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; } .py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; } .py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; } .py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; } .py-12 { padding-top: 3rem; padding-bottom: 3rem; } .py-16 { padding-top: 4rem; padding-bottom: 4rem; } .py-20 { padding-top: 5rem; padding-bottom: 5rem; } .py-24 { padding-top: 6rem; padding-bottom: 6rem; } .py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; } .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } .pt-0 { padding-top: 0px; } .pt-1 { padding-top: 0.25rem; } .pt-2 { padding-top: 0.5rem; } .pt-4 { padding-top: 1rem; } .pt-5 { padding-top: 1.25rem; } .pt-6 { padding-top: 1.5rem; } .pt-8 { padding-top: 2rem; } .pt-10 { padding-top: 2.5rem; } .pt-16 { padding-top: 4rem; } .pt-20 { padding-top: 5rem; } .pt-0\.5 { padding-top: 0.125rem; } .pr-1 { padding-right: 0.25rem; } .pr-2 { padding-right: 0.5rem; } .pr-3 { padding-right: 0.75rem; } .pr-4 { padding-right: 1rem; } .pr-7 { padding-right: 1.75rem; } .pr-10 { padding-right: 2.5rem; } .pr-12 { padding-right: 3rem; } .pr-16 { padding-right: 4rem; } .pb-1 { padding-bottom: 0.25rem; } .pb-2 { padding-bottom: 0.5rem; } .pb-3 { padding-bottom: 0.75rem; } .pb-4 { padding-bottom: 1rem; } .pb-6 { padding-bottom: 1.5rem; } .pb-8 { padding-bottom: 2rem; } .pb-10 { padding-bottom: 2.5rem; } .pb-12 { padding-bottom: 3rem; } .pb-16 { padding-bottom: 4rem; } .pb-20 { padding-bottom: 5rem; } .pb-24 { padding-bottom: 6rem; } .pb-32 { padding-bottom: 8rem; } .pl-0 { padding-left: 0px; } .pl-1 { padding-left: 0.25rem; } .pl-2 { padding-left: 0.5rem; } .pl-3 { padding-left: 0.75rem; } .pl-4 { padding-left: 1rem; } .pl-5 { padding-left: 1.25rem; } .pl-6 { padding-left: 1.5rem; } .pl-8 { padding-left: 2rem; } .pl-10 { padding-left: 2.5rem; } .pl-24 { padding-left: 6rem; } .pl-1\.5 { padding-left: 0.375rem; } .text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; } .text-justify { text-align: justify; } .align-middle { vertical-align: middle; } .font-sans { font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } .font-dp-prose { font-family: var(--dp-font-family); } .text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; } .text-base { font-size: 1rem; } .text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; } .text-4xl { font-size: 2.25rem; } .text-5xl { font-size: 3rem; } .font-normal { font-weight: 400; } .font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; } .font-extrabold { font-weight: 800; } .uppercase { text-transform: uppercase; } .capitalize { text-transform: capitalize; } .italic { font-style: italic; } .leading-4 { line-height: 1rem; } .leading-5 { line-height: 1.25rem; } .leading-6 { line-height: 1.5rem; } .leading-7 { line-height: 1.75rem; } .leading-8 { line-height: 2rem; } .leading-9 { line-height: 2.25rem; } .leading-none { line-height: 1; } .leading-tight { line-height: 1.25; } .leading-normal { line-height: 1.5; } .tracking-tight { letter-spacing: -0.025em; } .tracking-wide { letter-spacing: 0.025em; } .tracking-wider { letter-spacing: 0.05em; } .text-black { --tw-text-opacity: 1; color: rgba(0, 0, 0, var(--tw-text-opacity)); } .text-white { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .text-gray-50 { --tw-text-opacity: 1; color: rgba(249, 250, 251, var(--tw-text-opacity)); } .text-gray-100 { --tw-text-opacity: 1; color: rgba(243, 244, 246, var(--tw-text-opacity)); } .text-gray-200 { --tw-text-opacity: 1; color: rgba(229, 231, 235, var(--tw-text-opacity)); } .text-gray-300 { --tw-text-opacity: 1; color: rgba(209, 213, 219, var(--tw-text-opacity)); } .text-gray-400 { --tw-text-opacity: 1; color: rgba(156, 163, 175, var(--tw-text-opacity)); } .text-gray-500 { --tw-text-opacity: 1; color: rgba(107, 114, 128, var(--tw-text-opacity)); } .text-gray-600 { --tw-text-opacity: 1; color: rgba(75, 85, 99, var(--tw-text-opacity)); } .text-gray-700 { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .text-gray-800 { --tw-text-opacity: 1; color: rgba(31, 41, 55, var(--tw-text-opacity)); } .text-gray-900 { --tw-text-opacity: 1; color: rgba(17, 24, 39, var(--tw-text-opacity)); } .text-red-400 { --tw-text-opacity: 1; color: rgba(248, 113, 113, var(--tw-text-opacity)); } .text-red-500 { --tw-text-opacity: 1; color: rgba(239, 68, 68, var(--tw-text-opacity)); } .text-red-600 { --tw-text-opacity: 1; color: rgba(220, 38, 38, var(--tw-text-opacity)); } .text-red-700 { --tw-text-opacity: 1; color: rgba(185, 28, 28, var(--tw-text-opacity)); } .text-red-800 { --tw-text-opacity: 1; color: rgba(153, 27, 27, var(--tw-text-opacity)); } .text-yellow-400 { --tw-text-opacity: 1; color: rgba(251, 191, 36, var(--tw-text-opacity)); } .text-yellow-700 { --tw-text-opacity: 1; color: rgba(180, 83, 9, var(--tw-text-opacity)); } .text-green-400 { --tw-text-opacity: 1; color: rgba(52, 211, 153, var(--tw-text-opacity)); } .text-green-500 { --tw-text-opacity: 1; color: rgba(16, 185, 129, var(--tw-text-opacity)); } .text-green-800 { --tw-text-opacity: 1; color: rgba(6, 95, 70, var(--tw-text-opacity)); } .text-blue-200 { --tw-text-opacity: 1; color: rgba(191, 219, 254, var(--tw-text-opacity)); } .text-blue-400 { --tw-text-opacity: 1; color: rgba(96, 165, 250, var(--tw-text-opacity)); } .text-blue-600 { --tw-text-opacity: 1; color: rgba(37, 99, 235, var(--tw-text-opacity)); } .text-blue-700 { --tw-text-opacity: 1; color: rgba(29, 78, 216, var(--tw-text-opacity)); } .text-blue-800 { --tw-text-opacity: 1; color: rgba(30, 64, 175, var(--tw-text-opacity)); } .text-indigo-50 { --tw-text-opacity: 1; color: rgba(238, 242, 255, var(--tw-text-opacity)); } .text-indigo-300 { --tw-text-opacity: 1; color: rgba(165, 180, 252, var(--tw-text-opacity)); } .text-indigo-400 { --tw-text-opacity: 1; color: rgba(129, 140, 248, var(--tw-text-opacity)); } .text-indigo-600 { --tw-text-opacity: 1; color: rgba(79, 70, 229, var(--tw-text-opacity)); } .text-indigo-700 { --tw-text-opacity: 1; color: rgba(67, 56, 202, var(--tw-text-opacity)); } .text-indigo-800 { --tw-text-opacity: 1; color: rgba(55, 48, 163, var(--tw-text-opacity)); } .text-purple-600 { --tw-text-opacity: 1; color: rgba(124, 58, 237, var(--tw-text-opacity)); } .text-purple-800 { --tw-text-opacity: 1; color: rgba(91, 33, 182, var(--tw-text-opacity)); } .text-pink-800 { --tw-text-opacity: 1; color: rgba(157, 23, 77, var(--tw-text-opacity)); } .text-dp-accent { color: var(--dp-accent-color); } .text-dp-light-gray { color: var(--dp-light-gray); } .group:hover .group-hover\:text-white { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .group:hover .group-hover\:text-gray-200 { --tw-text-opacity: 1; color: rgba(229, 231, 235, var(--tw-text-opacity)); } .group:hover .group-hover\:text-gray-500 { --tw-text-opacity: 1; color: rgba(107, 114, 128, var(--tw-text-opacity)); } .group:hover .group-hover\:text-gray-700 { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .group:hover .group-hover\:text-gray-900 { --tw-text-opacity: 1; color: rgba(17, 24, 39, var(--tw-text-opacity)); } .focus-within\:text-gray-600:focus-within { --tw-text-opacity: 1; color: rgba(75, 85, 99, var(--tw-text-opacity)); } .hover\:text-white:hover { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .hover\:text-gray-400:hover { --tw-text-opacity: 1; color: rgba(156, 163, 175, var(--tw-text-opacity)); } .hover\:text-gray-500:hover { --tw-text-opacity: 1; color: rgba(107, 114, 128, var(--tw-text-opacity)); } .hover\:text-gray-600:hover { --tw-text-opacity: 1; color: rgba(75, 85, 99, var(--tw-text-opacity)); } .hover\:text-gray-700:hover { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .hover\:text-gray-800:hover { --tw-text-opacity: 1; color: rgba(31, 41, 55, var(--tw-text-opacity)); } .hover\:text-gray-900:hover { --tw-text-opacity: 1; color: rgba(17, 24, 39, var(--tw-text-opacity)); } .hover\:text-blue-500:hover { --tw-text-opacity: 1; color: rgba(59, 130, 246, var(--tw-text-opacity)); } .hover\:text-blue-600:hover { --tw-text-opacity: 1; color: rgba(37, 99, 235, var(--tw-text-opacity)); } .hover\:text-indigo-100:hover { --tw-text-opacity: 1; color: rgba(224, 231, 255, var(--tw-text-opacity)); } .hover\:text-indigo-500:hover { --tw-text-opacity: 1; color: rgba(99, 102, 241, var(--tw-text-opacity)); } .hover\:text-indigo-600:hover { --tw-text-opacity: 1; color: rgba(79, 70, 229, var(--tw-text-opacity)); } .hover\:text-indigo-800:hover { --tw-text-opacity: 1; color: rgba(55, 48, 163, var(--tw-text-opacity)); } .hover\:text-indigo-900:hover { --tw-text-opacity: 1; color: rgba(49, 46, 129, var(--tw-text-opacity)); } .hover\:text-dp-accent-text:hover { color: var(--dp-accent-text); } .hover\:text-dp-dark-gray:hover { color: var(--dp-dark-gray); } .focus\:text-white:focus { --tw-text-opacity: 1; color: rgba(255, 255, 255, var(--tw-text-opacity)); } .focus\:text-gray-500:focus { --tw-text-opacity: 1; color: rgba(107, 114, 128, var(--tw-text-opacity)); } .focus\:text-gray-700:focus { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .focus\:text-gray-900:focus { --tw-text-opacity: 1; color: rgba(17, 24, 39, var(--tw-text-opacity)); } .active\:text-gray-700:active { --tw-text-opacity: 1; color: rgba(55, 65, 81, var(--tw-text-opacity)); } .active\:text-gray-800:active { --tw-text-opacity: 1; color: rgba(31, 41, 55, var(--tw-text-opacity)); } .underline { text-decoration: underline; } .no-underline { text-decoration: none; } .hover\:underline:hover { text-decoration: underline; } .focus\:underline:focus { text-decoration: underline; } .placeholder-gray-400::placeholder { --tw-placeholder-opacity: 1; color: rgba(156, 163, 175, var(--tw-placeholder-opacity)); } .placeholder-gray-500::placeholder { --tw-placeholder-opacity: 1; color: rgba(107, 114, 128, var(--tw-placeholder-opacity)); } .focus\:placeholder-gray-400:focus::placeholder { --tw-placeholder-opacity: 1; color: rgba(156, 163, 175, var(--tw-placeholder-opacity)); } .opacity-0 { opacity: 0; } .opacity-40 { opacity: 0.4; } .opacity-50 { opacity: 0.5; } .opacity-75 { opacity: 0.75; } .opacity-100 { opacity: 1; } .hover\:opacity-100:hover { opacity: 1; } .disabled\:opacity-50:disabled { opacity: 0.5; } *, ::before, ::after { --tw-shadow: 0 0 #0000; } .shadow-sm { --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow { --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-lg { --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .shadow-xl { --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .hover\:shadow-lg:hover { --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } .outline-none { outline: 2px solid transparent; outline-offset: 2px; } .focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; } *, ::before, ::after { --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; } .ring-0 { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .ring-1 { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .ring-2 { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus-within\:ring-2:focus-within { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus\:ring-0:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .focus\:ring:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } .ring-black { --tw-ring-opacity: 1; --tw-ring-color: rgba(0, 0, 0, var(--tw-ring-opacity)); } .ring-white { --tw-ring-opacity: 1; --tw-ring-color: rgba(255, 255, 255, var(--tw-ring-opacity)); } .ring-gray-700 { --tw-ring-opacity: 1; --tw-ring-color: rgba(55, 65, 81, var(--tw-ring-opacity)); } .ring-red-700 { --tw-ring-opacity: 1; --tw-ring-color: rgba(185, 28, 28, var(--tw-ring-opacity)); } .ring-blue-700 { --tw-ring-opacity: 1; --tw-ring-color: rgba(29, 78, 216, var(--tw-ring-opacity)); } .ring-indigo-500 { --tw-ring-opacity: 1; --tw-ring-color: rgba(99, 102, 241, var(--tw-ring-opacity)); } .ring-indigo-700 { --tw-ring-opacity: 1; --tw-ring-color: rgba(67, 56, 202, var(--tw-ring-opacity)); } .focus-within\:ring-indigo-500:focus-within { --tw-ring-opacity: 1; --tw-ring-color: rgba(99, 102, 241, var(--tw-ring-opacity)); } .focus\:ring-white:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(255, 255, 255, var(--tw-ring-opacity)); } .focus\:ring-red-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(239, 68, 68, var(--tw-ring-opacity)); } .focus\:ring-blue-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(59, 130, 246, var(--tw-ring-opacity)); } .focus\:ring-indigo-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(99, 102, 241, var(--tw-ring-opacity)); } .focus\:ring-pink-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgba(236, 72, 153, var(--tw-ring-opacity)); } .focus\:ring-dp-accent:focus { --tw-ring-color: var(--dp-accent-color); } .ring-opacity-5 { --tw-ring-opacity: 0.05; } .ring-opacity-50 { --tw-ring-opacity: 0.5; } .ring-offset-2 { --tw-ring-offset-width: 2px; } .focus-within\:ring-offset-2:focus-within { --tw-ring-offset-width: 2px; } .focus\:ring-offset-2:focus { --tw-ring-offset-width: 2px; } .ring-offset-gray-100 { --tw-ring-offset-color: #f3f4f6; } .focus-within\:ring-offset-gray-100:focus-within { --tw-ring-offset-color: #f3f4f6; } .filter { --tw-blur: var(--tw-empty,/*!*/ /*!*/); --tw-brightness: var(--tw-empty,/*!*/ /*!*/); --tw-contrast: var(--tw-empty,/*!*/ /*!*/); --tw-grayscale: var(--tw-empty,/*!*/ /*!*/); --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/); --tw-invert: var(--tw-empty,/*!*/ /*!*/); --tw-saturate: var(--tw-empty,/*!*/ /*!*/); --tw-sepia: var(--tw-empty,/*!*/ /*!*/); --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/); filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } .transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } .transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } .transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } .transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } .duration-75 { transition-duration: 75ms; } .duration-100 { transition-duration: 100ms; } .duration-150 { transition-duration: 150ms; } .duration-200 { transition-duration: 200ms; } .duration-300 { transition-duration: 300ms; } .ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); } .ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } .ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); } @media (min-width: 640px) { .sm\:absolute { position: absolute; } .sm\:inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; } .sm\:order-2 { order: 2; } .sm\:order-3 { order: 3; } .sm\:col-span-1 { grid-column: span 1 / span 1; } .sm\:col-span-2 { grid-column: span 2 / span 2; } .sm\:mx-0 { margin-left: 0px; margin-right: 0px; } .sm\:mx-auto { margin-left: auto; margin-right: auto; } .sm\:mt-0 { margin-top: 0px; } .sm\:mt-1 { margin-top: 0.25rem; } .sm\:mt-4 { margin-top: 1rem; } .sm\:mt-5 { margin-top: 1.25rem; } .sm\:mt-8 { margin-top: 2rem; } .sm\:mt-10 { margin-top: 2.5rem; } .sm\:mt-16 { margin-top: 4rem; } .sm\:mt-24 { margin-top: 6rem; } .sm\:mr-2 { margin-right: 0.5rem; } .sm\:mr-6 { margin-right: 1.5rem; } .sm\:ml-2 { margin-left: 0.5rem; } .sm\:ml-3 { margin-left: 0.75rem; } .sm\:ml-4 { margin-left: 1rem; } .sm\:ml-6 { margin-left: 1.5rem; } .sm\:block { display: block; } .sm\:inline { display: inline; } .sm\:flex { display: flex; } .sm\:inline-flex { display: inline-flex; } .sm\:grid { display: grid; } .sm\:hidden { display: none; } .sm\:h-10 { height: 2.5rem; } .sm\:h-2\/3 { height: 66.666667%; } .sm\:w-10 { width: 2.5rem; } .sm\:w-auto { width: auto; } .sm\:w-full { width: 100%; } .sm\:max-w-md { max-width: 28rem; } .sm\:max-w-lg { max-width: 32rem; } .sm\:max-w-2xl { max-width: 42rem; } .sm\:max-w-3xl { max-width: 48rem; } .sm\:max-w-6xl { max-width: 72rem; } .sm\:translate-x-0 { --tw-translate-x: 0px; } .sm\:translate-x-2 { --tw-translate-x: 0.5rem; } .sm\:translate-x-16 { --tw-translate-x: 4rem; } .sm\:translate-y-0 { --tw-translate-y: 0px; } .sm\:scale-95 { --tw-scale-x: .95; --tw-scale-y: .95; } .sm\:scale-100 { --tw-scale-x: 1; --tw-scale-y: 1; } .sm\:grid-flow-row { grid-auto-flow: row; } .sm\:grid-flow-col { grid-auto-flow: column; } .sm\:grid-flow-row-dense { grid-auto-flow: row dense; } .sm\:grid-flow-col-dense { grid-auto-flow: column dense; } .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .sm\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .sm\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .sm\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .sm\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .sm\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .sm\:grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .sm\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .sm\:grid-cols-none { grid-template-columns: none; } .sm\:grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .sm\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .sm\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .sm\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .sm\:grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .sm\:grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .sm\:grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .sm\:grid-rows-none { grid-template-rows: none; } .sm\:grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } .sm\:flex-row { flex-direction: row; } .sm\:flex-row-reverse { flex-direction: row-reverse; } .sm\:flex-col { flex-direction: column; } .sm\:flex-wrap { flex-wrap: wrap; } .sm\:flex-nowrap { flex-wrap: nowrap; } .sm\:items-start { align-items: flex-start; } .sm\:items-center { align-items: center; } .sm\:justify-start { justify-content: flex-start; } .sm\:justify-end { justify-content: flex-end; } .sm\:justify-center { justify-content: center; } .sm\:gap-4 { gap: 1rem; } .sm\:gap-6 { gap: 1.5rem; } .sm\:gap-x-6 { column-gap: 1.5rem; } .sm\:gap-x-8 { column-gap: 2rem; } .sm\:gap-y-10 { row-gap: 2.5rem; } .sm\:space-x-6 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(1.5rem * var(--tw-space-x-reverse)); margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))); } .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0px * var(--tw-space-y-reverse)); } .sm\:divide-x > :not([hidden]) ~ :not([hidden]) { --tw-divide-x-reverse: 0; border-right-width: calc(1px * var(--tw-divide-x-reverse)); border-left-width: calc(1px * calc(1 - var(--tw-divide-x-reverse))); } .sm\:overflow-hidden { overflow: hidden; } .sm\:truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sm\:rounded-md { border-radius: 0.375rem; } .sm\:rounded-lg { border-radius: 0.5rem; } .sm\:rounded-b-md { border-bottom-right-radius: 0.375rem; border-bottom-left-radius: 0.375rem; } .sm\:rounded-tl-none { border-top-left-radius: 0px; } .sm\:border-t { border-top-width: 1px; } .sm\:border-l { border-left-width: 1px; } .sm\:border-transparent { border-color: transparent; } .sm\:border-gray-200 { --tw-border-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-border-opacity)); } .sm\:p-0 { padding: 0px; } .sm\:p-3 { padding: 0.75rem; } .sm\:p-6 { padding: 1.5rem; } .sm\:px-0 { padding-left: 0px; padding-right: 0px; } .sm\:px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; } .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .sm\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; } .sm\:px-16 { padding-left: 4rem; padding-right: 4rem; } .sm\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .sm\:py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; } .sm\:py-24 { padding-top: 6rem; padding-bottom: 6rem; } .sm\:pt-1 { padding-top: 0.25rem; } .sm\:pt-16 { padding-top: 4rem; } .sm\:pr-2 { padding-right: 0.5rem; } .sm\:pr-6 { padding-right: 1.5rem; } .sm\:pb-5 { padding-bottom: 1.25rem; } .sm\:pb-12 { padding-bottom: 3rem; } .sm\:pb-24 { padding-bottom: 6rem; } .sm\:pl-6 { padding-left: 1.5rem; } .sm\:text-left { text-align: left; } .sm\:text-center { text-align: center; } .sm\:text-sm { font-size: 0.875rem; } .sm\:text-base { font-size: 1rem; } .sm\:text-lg { font-size: 1.125rem; } .sm\:text-xl { font-size: 1.25rem; } .sm\:text-3xl { font-size: 1.875rem; } .sm\:text-4xl { font-size: 2.25rem; } .sm\:text-5xl { font-size: 3rem; } .sm\:leading-5 { line-height: 1.25rem; } .sm\:leading-9 { line-height: 2.25rem; } .sm\:leading-10 { line-height: 2.5rem; } .sm\:leading-none { line-height: 1; } .sm\:tracking-tight { letter-spacing: -0.025em; } .sm\:shadow { --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } } @media (min-width: 768px) { .md\:aspect-w-2 { position: relative; padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%); } .md\:aspect-w-2 > * { position: absolute; height: 100%; width: 100%; top: 0; right: 0; bottom: 0; left: 0; } .md\:aspect-w-2 { --tw-aspect-w: 2; } .md\:aspect-h-1 { --tw-aspect-h: 1; } .md\:col-span-2 { grid-column: span 2 / span 2; } .md\:col-span-3 { grid-column: span 3 / span 3; } .md\:mx-auto { margin-left: auto; margin-right: auto; } .md\:mt-0 { margin-top: 0px; } .md\:mt-2 { margin-top: 0.5rem; } .md\:mt-5 { margin-top: 1.25rem; } .md\:mt-8 { margin-top: 2rem; } .md\:mt-10 { margin-top: 2.5rem; } .md\:-mt-px { margin-top: -1px; } .md\:mr-2 { margin-right: 0.5rem; } .md\:ml-0 { margin-left: 0px; } .md\:ml-3 { margin-left: 0.75rem; } .md\:ml-6 { margin-left: 1.5rem; } .md\:-ml-16 { margin-left: -4rem; } .md\:block { display: block; } .md\:inline { display: inline; } .md\:flex { display: flex; } .md\:grid { display: grid; } .md\:hidden { display: none; } .md\:h-64 { height: 16rem; } .md\:min-h-screen { min-height: 100vh; } .md\:w-1\/2 { width: 50%; } .md\:w-1\/3 { width: 33.333333%; } .md\:w-2\/3 { width: 66.666667%; } .md\:w-full { width: 100%; } .md\:max-w-2xl { max-width: 42rem; } .md\:max-w-3xl { max-width: 48rem; } .md\:flex-auto { flex: 1 1 auto; } .md\:flex-initial-80 { flex: 0 1 20rem; } .md\:flex-shrink-0 { flex-shrink: 0; } .md\:grid-flow-row { grid-auto-flow: row; } .md\:grid-flow-col { grid-auto-flow: column; } .md\:grid-flow-row-dense { grid-auto-flow: row dense; } .md\:grid-flow-col-dense { grid-auto-flow: column dense; } .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .md\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .md\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .md\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .md\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .md\:grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .md\:grid-cols-none { grid-template-columns: none; } .md\:grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .md\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .md\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .md\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .md\:grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .md\:grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .md\:grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .md\:grid-rows-none { grid-template-rows: none; } .md\:grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } .md\:flex-row { flex-direction: row; } .md\:place-items-center { place-items: center; } .md\:items-center { align-items: center; } .md\:justify-between { justify-content: space-between; } .md\:gap-4 { gap: 1rem; } .md\:gap-8 { gap: 2rem; } .md\:gap-x-8 { column-gap: 2rem; } .md\:gap-y-12 { row-gap: 3rem; } .md\:space-x-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(0.5rem * var(--tw-space-x-reverse)); margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); } .md\:space-x-32 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(8rem * var(--tw-space-x-reverse)); margin-left: calc(8rem * calc(1 - var(--tw-space-x-reverse))); } .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0px * var(--tw-space-y-reverse)); } .md\:rounded { border-radius: 0.25rem; } .md\:border-t-0 { border-top-width: 0px; } .md\:px-0 { padding-left: 0px; padding-right: 0px; } .md\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; } .md\:px-8 { padding-left: 2rem; padding-right: 2rem; } .md\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; } .md\:py-0 { padding-top: 0px; padding-bottom: 0px; } .md\:py-4 { padding-top: 1rem; padding-bottom: 1rem; } .md\:pb-0 { padding-bottom: 0px; } .md\:pb-4 { padding-bottom: 1rem; } .md\:text-lg { font-size: 1.125rem; } .md\:text-xl { font-size: 1.25rem; } .md\:text-4xl { font-size: 2.25rem; } .md\:text-6xl { font-size: 4rem; } } @media (min-width: 1024px) { .lg\:absolute { position: absolute; } .lg\:relative { position: relative; } .lg\:top-0 { top: 0px; } .lg\:top-auto { top: auto; } .lg\:right-0 { right: 0px; } .lg\:bottom-0 { bottom: 0px; } .lg\:left-0 { left: 0px; } .lg\:col-span-1 { grid-column: span 1 / span 1; } .lg\:col-span-2 { grid-column: span 2 / span 2; } .lg\:col-span-6 { grid-column: span 6 / span 6; } .lg\:col-start-1 { grid-column-start: 1; } .lg\:col-start-2 { grid-column-start: 2; } .lg\:row-start-1 { grid-row-start: 1; } .lg\:m-0 { margin: 0px; } .lg\:mx-0 { margin-left: 0px; margin-right: 0px; } .lg\:mx-auto { margin-left: auto; margin-right: auto; } .lg\:mt-0 { margin-top: 0px; } .lg\:mt-6 { margin-top: 1.5rem; } .lg\:mt-28 { margin-top: 7rem; } .lg\:mb-0 { margin-bottom: 0px; } .lg\:ml-0 { margin-left: 0px; } .lg\:block { display: block; } .lg\:flex { display: flex; } .lg\:grid { display: grid; } .lg\:hidden { display: none; } .lg\:h-1 { height: 0.25rem; } .lg\:h-auto { height: auto; } .lg\:h-full { height: 100%; } .lg\:w-auto { width: auto; } .lg\:w-1\/2 { width: 50%; } .lg\:w-full { width: 100%; } .lg\:max-w-none { max-width: none; } .lg\:max-w-4xl { max-width: 56rem; } .lg\:max-w-6xl { max-width: 72rem; } .lg\:max-w-7xl { max-width: 80rem; } .lg\:flex-1 { flex: 1 1 0%; } .lg\:flex-none { flex: none; } .lg\:flex-shrink-0 { flex-shrink: 0; } .lg\:translate-y-20 { --tw-translate-y: 5rem; } .lg\:grid-flow-row { grid-auto-flow: row; } .lg\:grid-flow-col { grid-auto-flow: column; } .lg\:grid-flow-row-dense { grid-auto-flow: row dense; } .lg\:grid-flow-col-dense { grid-auto-flow: column dense; } .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .lg\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .lg\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .lg\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .lg\:grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .lg\:grid-cols-none { grid-template-columns: none; } .lg\:grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .lg\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .lg\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .lg\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .lg\:grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .lg\:grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .lg\:grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .lg\:grid-rows-none { grid-template-rows: none; } .lg\:grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } .lg\:flex-row { flex-direction: row; } .lg\:items-center { align-items: center; } .lg\:justify-end { justify-content: flex-end; } .lg\:justify-between { justify-content: space-between; } .lg\:gap-2 { gap: 0.5rem; } .lg\:gap-8 { gap: 2rem; } .lg\:gap-24 { gap: 6rem; } .lg\:gap-x-8 { column-gap: 2rem; } .lg\:gap-y-0 { row-gap: 0px; } .lg\:space-x-12 > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(3rem * var(--tw-space-x-reverse)); margin-left: calc(3rem * calc(1 - var(--tw-space-x-reverse))); } .lg\:space-y-0 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0px * var(--tw-space-y-reverse)); } .lg\:self-center { align-self: center; } .lg\:rounded-none { border-radius: 0px; } .lg\:border-0 { border-width: 0px; } .lg\:border-t { border-top-width: 1px; } .lg\:border-r { border-right-width: 1px; } .lg\:border-b { border-bottom-width: 1px; } .lg\:border-l { border-left-width: 1px; } .lg\:border-gray-200 { --tw-border-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-border-opacity)); } .lg\:px-0 { padding-left: 0px; padding-right: 0px; } .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; } .lg\:px-20 { padding-left: 5rem; padding-right: 5rem; } .lg\:py-16 { padding-top: 4rem; padding-bottom: 4rem; } .lg\:py-24 { padding-top: 6rem; padding-bottom: 6rem; } .lg\:py-32 { padding-top: 8rem; padding-bottom: 8rem; } .lg\:pt-24 { padding-top: 6rem; } .lg\:pr-0 { padding-right: 0px; } .lg\:pb-16 { padding-bottom: 4rem; } .lg\:pb-28 { padding-bottom: 7rem; } .lg\:pl-2 { padding-left: 0.5rem; } .lg\:pl-9 { padding-left: 2.25rem; } .lg\:text-left { text-align: left; } .lg\:text-center { text-align: center; } .lg\:text-lg { font-size: 1.125rem; } .lg\:text-4xl { font-size: 2.25rem; } .lg\:text-5xl { font-size: 3rem; } } @media (min-width: 1280px) { .xl\:col-span-1 { grid-column: span 1 / span 1; } .xl\:col-span-2 { grid-column: span 2 / span 2; } .xl\:mx-0 { margin-left: 0px; margin-right: 0px; } .xl\:mt-0 { margin-top: 0px; } .xl\:flex { display: flex; } .xl\:grid { display: grid; } .xl\:max-w-none { max-width: none; } .xl\:transform-none { transform: none; } .xl\:translate-x-0 { --tw-translate-x: 0px; } .xl\:grid-flow-row { grid-auto-flow: row; } .xl\:grid-flow-col { grid-auto-flow: column; } .xl\:grid-flow-row-dense { grid-auto-flow: row dense; } .xl\:grid-flow-col-dense { grid-auto-flow: column dense; } .xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .xl\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .xl\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .xl\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .xl\:grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .xl\:grid-cols-none { grid-template-columns: none; } .xl\:grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .xl\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .xl\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .xl\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .xl\:grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .xl\:grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .xl\:grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .xl\:grid-rows-none { grid-template-rows: none; } .xl\:grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } .xl\:items-center { align-items: center; } .xl\:justify-between { justify-content: space-between; } .xl\:gap-8 { gap: 2rem; } .xl\:gap-x-8 { column-gap: 2rem; } .xl\:p-4 { padding: 1rem; } .xl\:px-0 { padding-left: 0px; padding-right: 0px; } .xl\:px-12 { padding-left: 3rem; padding-right: 3rem; } .xl\:px-20 { padding-left: 5rem; padding-right: 5rem; } .xl\:px-24 { padding-left: 6rem; padding-right: 6rem; } .xl\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .xl\:py-16 { padding-top: 4rem; padding-bottom: 4rem; } .xl\:py-20 { padding-top: 5rem; padding-bottom: 5rem; } .xl\:text-center { text-align: center; } .xl\:text-xl { font-size: 1.25rem; } .xl\:text-5xl { font-size: 3rem; } .xl\:text-6xl { font-size: 4rem; } } @media (min-width: 1536px) { .\32xl\:grid-flow-row { grid-auto-flow: row; } .\32xl\:grid-flow-col { grid-auto-flow: column; } .\32xl\:grid-flow-row-dense { grid-auto-flow: row dense; } .\32xl\:grid-flow-col-dense { grid-auto-flow: column dense; } .\32xl\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .\32xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .\32xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .\32xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .\32xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .\32xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .\32xl\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .\32xl\:grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); } .\32xl\:grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } .\32xl\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); } .\32xl\:grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } .\32xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } .\32xl\:grid-cols-none { grid-template-columns: none; } .\32xl\:grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } .\32xl\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .\32xl\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .\32xl\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .\32xl\:grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); } .\32xl\:grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .\32xl\:grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); } .\32xl\:grid-rows-none { grid-template-rows: none; } .\32xl\:grid-rows-fit { grid-template-rows: repeat(auto-fit, minmax(auto, auto)); } } /* purgecss start ignore */ .loader-sm{ border:4px solid #fff; border-top:4px solid #3498db; animation:spin 1s linear infinite; border-radius:50%; width:20px; height:20px } @keyframes spin{ 0%{ transform:rotate(0deg) } 100%{ transform:rotate(360deg) } } .loader-lg{ border:4px solid #fff; border-top:4px solid #3498db; animation:spin 1s linear infinite; border-radius:50%; width:60px; height:60px } @keyframes spin{ 0%{ transform:rotate(0deg) } 100%{ transform:rotate(360deg) } } .source-tray-handle{ cursor:row-resize; position:absolute; top:0; left:0; width:100%; height:8px; content:"" } /* purgecss end ignore */ .Toastify__toast-container { z-index: 9999; -webkit-transform: translate3d(0, 0, 9999px); position: fixed; padding: 4px; width: 320px; box-sizing: border-box; color: #fff; } .Toastify__toast-container--top-left { top: 1em; left: 1em; } .Toastify__toast-container--top-center { top: 1em; left: 50%; transform: translateX(-50%); } .Toastify__toast-container--top-right { top: 1em; right: 1em; } .Toastify__toast-container--bottom-left { bottom: 1em; left: 1em; } .Toastify__toast-container--bottom-center { bottom: 1em; left: 50%; transform: translateX(-50%); } .Toastify__toast-container--bottom-right { bottom: 1em; right: 1em; } @media only screen and (max-width : 480px) { .Toastify__toast-container { width: 100vw; padding: 0; left: 0; margin: 0; } .Toastify__toast-container--top-left, .Toastify__toast-container--top-center, .Toastify__toast-container--top-right { top: 0; transform: translateX(0); } .Toastify__toast-container--bottom-left, .Toastify__toast-container--bottom-center, .Toastify__toast-container--bottom-right { bottom: 0; transform: translateX(0); } .Toastify__toast-container--rtl { right: 0; left: initial; } } .Toastify__toast { position: relative; min-height: 64px; box-sizing: border-box; margin-bottom: 1rem; padding: 8px; border-radius: 1px; box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05); display: -ms-flexbox; display: flex; -ms-flex-pack: justify; justify-content: space-between; max-height: 800px; overflow: hidden; font-family: sans-serif; cursor: pointer; direction: ltr; } .Toastify__toast--rtl { direction: rtl; } .Toastify__toast--dark { background: #121212; color: #fff; } .Toastify__toast--default { background: #fff; color: #aaa; } .Toastify__toast--info { background: #3498db; } .Toastify__toast--success { background: #07bc0c; } .Toastify__toast--warning { background: #f1c40f; } .Toastify__toast--error { background: #e74c3c; } .Toastify__toast-body { margin: auto 0; -ms-flex: 1 1 auto; flex: 1 1 auto; } @media only screen and (max-width : 480px) { .Toastify__toast { margin-bottom: 0; } } .Toastify__close-button { color: #fff; background: transparent; outline: none; border: none; padding: 0; cursor: pointer; opacity: 0.7; transition: 0.3s ease; -ms-flex-item-align: start; align-self: flex-start; } .Toastify__close-button--default { color: #000; opacity: 0.3; } .Toastify__close-button > svg { fill: currentColor; height: 16px; width: 14px; } .Toastify__close-button:hover, .Toastify__close-button:focus { opacity: 1; } @keyframes Toastify__trackProgress { 0% { transform: scaleX(1); } 100% { transform: scaleX(0); } } .Toastify__progress-bar { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; z-index: 9999; opacity: 0.7; background-color: rgba(255, 255, 255, 0.7); transform-origin: left; } .Toastify__progress-bar--animated { animation: Toastify__trackProgress linear 1 forwards; } .Toastify__progress-bar--controlled { transition: transform 0.2s; } .Toastify__progress-bar--rtl { right: 0; left: initial; transform-origin: right; } .Toastify__progress-bar--default { background: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55); } .Toastify__progress-bar--dark { background: #bb86fc; } @keyframes Toastify__bounceInRight { from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } from { opacity: 0; transform: translate3d(3000px, 0, 0); } 60% { opacity: 1; transform: translate3d(-25px, 0, 0); } 75% { transform: translate3d(10px, 0, 0); } 90% { transform: translate3d(-5px, 0, 0); } to { transform: none; } } @keyframes Toastify__bounceOutRight { 20% { opacity: 1; transform: translate3d(-20px, 0, 0); } to { opacity: 0; transform: translate3d(2000px, 0, 0); } } @keyframes Toastify__bounceInLeft { from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } 0% { opacity: 0; transform: translate3d(-3000px, 0, 0); } 60% { opacity: 1; transform: translate3d(25px, 0, 0); } 75% { transform: translate3d(-10px, 0, 0); } 90% { transform: translate3d(5px, 0, 0); } to { transform: none; } } @keyframes Toastify__bounceOutLeft { 20% { opacity: 1; transform: translate3d(20px, 0, 0); } to { opacity: 0; transform: translate3d(-2000px, 0, 0); } } @keyframes Toastify__bounceInUp { from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } from { opacity: 0; transform: translate3d(0, 3000px, 0); } 60% { opacity: 1; transform: translate3d(0, -20px, 0); } 75% { transform: translate3d(0, 10px, 0); } 90% { transform: translate3d(0, -5px, 0); } to { transform: translate3d(0, 0, 0); } } @keyframes Toastify__bounceOutUp { 20% { transform: translate3d(0, -10px, 0); } 40%, 45% { opacity: 1; transform: translate3d(0, 20px, 0); } to { opacity: 0; transform: translate3d(0, -2000px, 0); } } @keyframes Toastify__bounceInDown { from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } 0% { opacity: 0; transform: translate3d(0, -3000px, 0); } 60% { opacity: 1; transform: translate3d(0, 25px, 0); } 75% { transform: translate3d(0, -10px, 0); } 90% { transform: translate3d(0, 5px, 0); } to { transform: none; } } @keyframes Toastify__bounceOutDown { 20% { transform: translate3d(0, 10px, 0); } 40%, 45% { opacity: 1; transform: translate3d(0, -20px, 0); } to { opacity: 0; transform: translate3d(0, 2000px, 0); } } .Toastify__bounce-enter--top-left, .Toastify__bounce-enter--bottom-left { animation-name: Toastify__bounceInLeft; } .Toastify__bounce-enter--top-right, .Toastify__bounce-enter--bottom-right { animation-name: Toastify__bounceInRight; } .Toastify__bounce-enter--top-center { animation-name: Toastify__bounceInDown; } .Toastify__bounce-enter--bottom-center { animation-name: Toastify__bounceInUp; } .Toastify__bounce-exit--top-left, .Toastify__bounce-exit--bottom-left { animation-name: Toastify__bounceOutLeft; } .Toastify__bounce-exit--top-right, .Toastify__bounce-exit--bottom-right { animation-name: Toastify__bounceOutRight; } .Toastify__bounce-exit--top-center { animation-name: Toastify__bounceOutUp; } .Toastify__bounce-exit--bottom-center { animation-name: Toastify__bounceOutDown; } @keyframes Toastify__zoomIn { from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); } 50% { opacity: 1; } } @keyframes Toastify__zoomOut { from { opacity: 1; } 50% { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); } to { opacity: 0; } } .Toastify__zoom-enter { animation-name: Toastify__zoomIn; } .Toastify__zoom-exit { animation-name: Toastify__zoomOut; } @keyframes Toastify__flipIn { from { transform: perspective(400px) rotate3d(1, 0, 0, 90deg); animation-timing-function: ease-in; opacity: 0; } 40% { transform: perspective(400px) rotate3d(1, 0, 0, -20deg); animation-timing-function: ease-in; } 60% { transform: perspective(400px) rotate3d(1, 0, 0, 10deg); opacity: 1; } 80% { transform: perspective(400px) rotate3d(1, 0, 0, -5deg); } to { transform: perspective(400px); } } @keyframes Toastify__flipOut { from { transform: perspective(400px); } 30% { transform: perspective(400px) rotate3d(1, 0, 0, -20deg); opacity: 1; } to { transform: perspective(400px) rotate3d(1, 0, 0, 90deg); opacity: 0; } } .Toastify__flip-enter { animation-name: Toastify__flipIn; } .Toastify__flip-exit { animation-name: Toastify__flipOut; } @keyframes Toastify__slideInRight { from { transform: translate3d(110%, 0, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); } } @keyframes Toastify__slideInLeft { from { transform: translate3d(-110%, 0, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); } } @keyframes Toastify__slideInUp { from { transform: translate3d(0, 110%, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); } } @keyframes Toastify__slideInDown { from { transform: translate3d(0, -110%, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); } } @keyframes Toastify__slideOutRight { from { transform: translate3d(0, 0, 0); } to { visibility: hidden; transform: translate3d(110%, 0, 0); } } @keyframes Toastify__slideOutLeft { from { transform: translate3d(0, 0, 0); } to { visibility: hidden; transform: translate3d(-110%, 0, 0); } } @keyframes Toastify__slideOutDown { from { transform: translate3d(0, 0, 0); } to { visibility: hidden; transform: translate3d(0, 500px, 0); } } @keyframes Toastify__slideOutUp { from { transform: translate3d(0, 0, 0); } to { visibility: hidden; transform: translate3d(0, -500px, 0); } } .Toastify__slide-enter--top-left, .Toastify__slide-enter--bottom-left { animation-name: Toastify__slideInLeft; } .Toastify__slide-enter--top-right, .Toastify__slide-enter--bottom-right { animation-name: Toastify__slideInRight; } .Toastify__slide-enter--top-center { animation-name: Toastify__slideInDown; } .Toastify__slide-enter--bottom-center { animation-name: Toastify__slideInUp; } .Toastify__slide-exit--top-left, .Toastify__slide-exit--bottom-left { animation-name: Toastify__slideOutLeft; } .Toastify__slide-exit--top-right, .Toastify__slide-exit--bottom-right { animation-name: Toastify__slideOutRight; } .Toastify__slide-exit--top-center { animation-name: Toastify__slideOutUp; } .Toastify__slide-exit--bottom-center { animation-name: Toastify__slideOutDown; } /* BASICS */ .CodeMirror { /* Set height, width, borders, and global font properties here */ font-family: monospace; height: 300px; color: black; direction: ltr; } /* PADDING */ .CodeMirror-lines { padding: 4px 0; /* Vertical padding around content */ } .CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like { padding: 0 4px; /* Horizontal padding of content */ } .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { background-color: white; /* The little square between H and V scrollbars */ } /* GUTTER */ .CodeMirror-gutters { border-right: 1px solid #ddd; background-color: #f7f7f7; white-space: nowrap; } .CodeMirror-linenumbers {} .CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; text-align: right; color: #999; white-space: nowrap; } .CodeMirror-guttermarker { color: black; } .CodeMirror-guttermarker-subtle { color: #999; } /* CURSOR */ .CodeMirror-cursor { border-left: 1px solid black; border-right: none; width: 0; } /* Shown when moving in bi-directional text */ .CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid silver; } .cm-fat-cursor .CodeMirror-cursor { width: auto; border: 0 !important; background: #7e7; } .cm-fat-cursor div.CodeMirror-cursors { z-index: 1; } .cm-fat-cursor .CodeMirror-line::selection, .cm-fat-cursor .CodeMirror-line > span::selection, .cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; } .cm-fat-cursor .CodeMirror-line::-moz-selection, .cm-fat-cursor .CodeMirror-line > span::-moz-selection, .cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; } .cm-fat-cursor { caret-color: transparent; } @-moz-keyframes blink { 0% {} 50% { background-color: transparent; } 100% {} } @-webkit-keyframes blink { 0% {} 50% { background-color: transparent; } 100% {} } @keyframes blink { 0% {} 50% { background-color: transparent; } 100% {} } /* Can style cursor different in overwrite (non-insert) mode */ .CodeMirror-overwrite .CodeMirror-cursor {} .cm-tab { display: inline-block; text-decoration: inherit; } .CodeMirror-rulers { position: absolute; left: 0; right: 0; top: -50px; bottom: 0; overflow: hidden; } .CodeMirror-ruler { border-left: 1px solid #ccc; top: 0; bottom: 0; position: absolute; } /* DEFAULT THEME */ .cm-s-default .cm-header {color: blue;} .cm-s-default .cm-quote {color: #090;} .cm-negative {color: #d44;} .cm-positive {color: #292;} .cm-header, .cm-strong {font-weight: bold;} .cm-em {font-style: italic;} .cm-link {text-decoration: underline;} .cm-strikethrough {text-decoration: line-through;} .cm-s-default .cm-keyword {color: #708;} .cm-s-default .cm-atom {color: #219;} .cm-s-default .cm-number {color: #164;} .cm-s-default .cm-def {color: #00f;} .cm-s-default .cm-variable, .cm-s-default .cm-punctuation, .cm-s-default .cm-property, .cm-s-default .cm-operator {} .cm-s-default .cm-variable-2 {color: #05a;} .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} .cm-s-default .cm-comment {color: #a50;} .cm-s-default .cm-string {color: #a11;} .cm-s-default .cm-string-2 {color: #f50;} .cm-s-default .cm-meta {color: #555;} .cm-s-default .cm-qualifier {color: #555;} .cm-s-default .cm-builtin {color: #30a;} .cm-s-default .cm-bracket {color: #997;} .cm-s-default .cm-tag {color: #170;} .cm-s-default .cm-attribute {color: #00c;} .cm-s-default .cm-hr {color: #999;} .cm-s-default .cm-link {color: #00c;} .cm-s-default .cm-error {color: #f00;} .cm-invalidchar {color: #f00;} .CodeMirror-composing { border-bottom: 2px solid; } /* Default styles for common addons */ div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } .CodeMirror-activeline-background {background: #e8f2ff;} /* STOP */ /* The rest of this file contains styles related to the mechanics of the editor. You probably shouldn't touch them. */ .CodeMirror { position: relative; overflow: hidden; background: white; } .CodeMirror-scroll { overflow: scroll !important; /* Things will break if this is overridden */ /* 50px is the magic margin used to hide the element's real scrollbars */ /* See overflow: hidden in .CodeMirror */ margin-bottom: -50px; margin-right: -50px; padding-bottom: 50px; height: 100%; outline: none; /* Prevent dragging from highlighting the element */ position: relative; z-index: 0; } .CodeMirror-sizer { position: relative; border-right: 50px solid transparent; } /* The fake, visible scrollbars. Used to force redraw during scrolling before actual scrolling happens, thus preventing shaking and flickering artifacts. */ .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { position: absolute; z-index: 6; display: none; outline: none; } .CodeMirror-vscrollbar { right: 0; top: 0; overflow-x: hidden; overflow-y: scroll; } .CodeMirror-hscrollbar { bottom: 0; left: 0; overflow-y: hidden; overflow-x: scroll; } .CodeMirror-scrollbar-filler { right: 0; bottom: 0; } .CodeMirror-gutter-filler { left: 0; bottom: 0; } .CodeMirror-gutters { position: absolute; left: 0; top: 0; min-height: 100%; z-index: 3; } .CodeMirror-gutter { white-space: normal; height: 100%; display: inline-block; vertical-align: top; margin-bottom: -50px; } .CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: none !important; border: none !important; } .CodeMirror-gutter-background { position: absolute; top: 0; bottom: 0; z-index: 4; } .CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; } .CodeMirror-gutter-wrapper ::selection { background-color: transparent } .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } .CodeMirror-lines { cursor: text; min-height: 1px; /* prevents collapsing before first draw */ } .CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like { /* Reset some styles that the rest of the page might have set */ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; border-width: 0; background: transparent; font-family: inherit; font-size: inherit; margin: 0; white-space: pre; word-wrap: normal; line-height: inherit; color: inherit; z-index: 2; position: relative; overflow: visible; -webkit-tap-highlight-color: transparent; -webkit-font-variant-ligatures: contextual; font-variant-ligatures: contextual; } .CodeMirror-wrap pre.CodeMirror-line, .CodeMirror-wrap pre.CodeMirror-line-like { word-wrap: break-word; white-space: pre-wrap; word-break: normal; } .CodeMirror-linebackground { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 0; } .CodeMirror-linewidget { position: relative; z-index: 2; padding: 0.1px; /* Force widget margins to stay inside of the container */ } .CodeMirror-widget {} .CodeMirror-rtl pre { direction: rtl; } .CodeMirror-code { outline: none; } /* Force content-box sizing for the elements where we expect it */ .CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber { -moz-box-sizing: content-box; box-sizing: content-box; } .CodeMirror-measure { position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden; } .CodeMirror-cursor { position: absolute; pointer-events: none; } .CodeMirror-measure pre { position: static; } div.CodeMirror-cursors { visibility: hidden; position: relative; z-index: 3; } div.CodeMirror-dragcursors { visibility: visible; } .CodeMirror-focused div.CodeMirror-cursors { visibility: visible; } .CodeMirror-selected { background: #d9d9d9; } .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } .CodeMirror-crosshair { cursor: crosshair; } .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } .cm-searching { background-color: #ffa; background-color: rgba(255, 255, 0, .4); } /* Used to force a border model for a node */ .cm-force-border { padding-right: .1px; } @media print { /* Hide the cursor when printing */ .CodeMirror div.CodeMirror-cursors { visibility: hidden; } } /* See issue #2901 */ .cm-tab-wrap-hack:after { content: ''; } /* Help users use markselection to safely style text background */ span.CodeMirror-selectedtext { background: none; } .CodeMirror-hints { position: absolute; z-index: 10; overflow: hidden; list-style: none; margin: 0; padding: 2px; -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); box-shadow: 2px 3px 5px rgba(0,0,0,.2); border-radius: 3px; border: 1px solid silver; background: white; font-size: 90%; font-family: monospace; max-height: 20em; overflow-y: auto; } .CodeMirror-hint { margin: 0; padding: 0 4px; border-radius: 2px; white-space: pre; color: black; cursor: pointer; } li.CodeMirror-hint-active { background: #08f; color: white; } /* purgecss start ignore */ .CodeMirror-foldmarker{ font-family:arial } .CodeMirror-foldgutter{ width:1rem } .CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{ color:#555; cursor:pointer } .CodeMirror-foldgutter-open:after{ padding-left:.2rem; content:"" } .CodeMirror-foldgutter-folded:after{ padding-left:.2rem; content:"" } .web-editor .react-codemirror2{ height:100% } .query-container .react-codemirror2{ height:3rem; width:100%; flex:1 1 auto; resize:none; --tw-border-opacity:1; border-color:rgba(229, 231, 235, var(--tw-border-opacity)) } .CodeMirror-placeholder{ opacity:.7 } .CodeMirror{ font-family:"Roboto Mono",monospace !important; height:100% } .CodeMirror-wrap pre{ word-break:break-word } html{ overflow:auto !important; height:100% } body{ margin:0; padding:0; overflow-x:hidden; height:100% } revo-grid{ background-color:#fff !important } .dp-pre-container{ max-width:100%; min-width:0 } .wrap-pre{ white-space:pre-wrap; white-space:-moz-pre-wrap; white-space:-o-pre-wrap; word-wrap:break-word } .datapane-tooltip-max-width{ max-width:25em } select{ -webkit-appearance:none !important; -moz-appearance:none !important; text-indent:1px !important; text-overflow:"" !important } .hover-expand-content:hover{ max-width:initial; white-space:initial; --tw-bg-opacity:1; background-color:rgba(255, 251, 235, var(--tw-bg-opacity)) } .h-iframe{ height:calc(100vh - 2.5rem) !important } .sanddance-explorer{ height:100% } .ms-OverflowSet-item{ border-bottom:1px solid #ccc } i.desc,i.asc{ padding-right:.3rem } .prose img{ margin-left:auto; margin-right:auto } /* purgecss end ignore */ /* purgecss start ignore */ .prose a, .prose a:hover { color: var(--dp-accent-color) } /* purgecss end ignore */ /* purgecss start ignore */ @font-face{ font-family:KaTeX_AMS; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_AMS-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_AMS-Regular..woff) format("woff"),url(/static/fonts/KaTeX_AMS-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Caligraphic; font-style:normal; font-weight:700; src:url(/static/fonts/KaTeX_Caligraphic-Bold..woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Bold..woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Bold..ttf) format("truetype") } @font-face{ font-family:KaTeX_Caligraphic; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Caligraphic-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Fraktur; font-style:normal; font-weight:700; src:url(/static/fonts/KaTeX_Fraktur-Bold..woff2) format("woff2"),url(/static/fonts/KaTeX_Fraktur-Bold..woff) format("woff"),url(/static/fonts/KaTeX_Fraktur-Bold..ttf) format("truetype") } @font-face{ font-family:KaTeX_Fraktur; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Fraktur-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Fraktur-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Fraktur-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Main; font-style:normal; font-weight:700; src:url(/static/fonts/KaTeX_Main-Bold..woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Bold..woff) format("woff"),url(/static/fonts/KaTeX_Main-Bold..ttf) format("truetype") } @font-face{ font-family:KaTeX_Main; font-style:italic; font-weight:700; src:url(/static/fonts/KaTeX_Main-BoldItalic..woff2) format("woff2"),url(/static/fonts/KaTeX_Main-BoldItalic..woff) format("woff"),url(/static/fonts/KaTeX_Main-BoldItalic..ttf) format("truetype") } @font-face{ font-family:KaTeX_Main; font-style:italic; font-weight:400; src:url(/static/fonts/KaTeX_Main-Italic..woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Italic..woff) format("woff"),url(/static/fonts/KaTeX_Main-Italic..ttf) format("truetype") } @font-face{ font-family:KaTeX_Main; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Main-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Main-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Math; font-style:italic; font-weight:700; src:url(/static/fonts/KaTeX_Math-BoldItalic..woff2) format("woff2"),url(/static/fonts/KaTeX_Math-BoldItalic..woff) format("woff"),url(/static/fonts/KaTeX_Math-BoldItalic..ttf) format("truetype") } @font-face{ font-family:KaTeX_Math; font-style:italic; font-weight:400; src:url(/static/fonts/KaTeX_Math-Italic..woff2) format("woff2"),url(/static/fonts/KaTeX_Math-Italic..woff) format("woff"),url(/static/fonts/KaTeX_Math-Italic..ttf) format("truetype") } @font-face{ font-family:"KaTeX_SansSerif"; font-style:normal; font-weight:700; src:url(/static/fonts/KaTeX_SansSerif-Bold..woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Bold..woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Bold..ttf) format("truetype") } @font-face{ font-family:"KaTeX_SansSerif"; font-style:italic; font-weight:400; src:url(/static/fonts/KaTeX_SansSerif-Italic..woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Italic..woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Italic..ttf) format("truetype") } @font-face{ font-family:"KaTeX_SansSerif"; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_SansSerif-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Regular..woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Script; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Script-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Script-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Script-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Size1; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Size1-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Size1-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Size1-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Size2; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Size2-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Size2-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Size2-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Size3; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Size3-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Size3-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Size3-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Size4; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Size4-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Size4-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Size4-Regular..ttf) format("truetype") } @font-face{ font-family:KaTeX_Typewriter; font-style:normal; font-weight:400; src:url(/static/fonts/KaTeX_Typewriter-Regular..woff2) format("woff2"),url(/static/fonts/KaTeX_Typewriter-Regular..woff) format("woff"),url(/static/fonts/KaTeX_Typewriter-Regular..ttf) format("truetype") } .katex{ text-rendering:auto; font:normal 1.21em KaTeX_Main,Times New Roman,serif; line-height:1.2; text-indent:0 } .katex *{ -ms-high-contrast-adjust:none !important; border-color:currentColor } .katex .katex-version:after{ content:"0.13.24" } .katex .katex-mathml{ clip:rect(1px, 1px, 1px, 1px); border:0; height:1px; overflow:hidden; padding:0; position:absolute; width:1px } .katex .katex-html>.newline{ display:block } .katex .base{ position:relative; white-space:nowrap; width:min-content } .katex .base,.katex .strut{ display:inline-block } .katex .textbf{ font-weight:700 } .katex .textit{ font-style:italic } .katex .textrm{ font-family:KaTeX_Main } .katex .textsf{ font-family:KaTeX_SansSerif } .katex .texttt{ font-family:KaTeX_Typewriter } .katex .mathnormal{ font-family:KaTeX_Math; font-style:italic } .katex .mathit{ font-family:KaTeX_Main; font-style:italic } .katex .mathrm{ font-style:normal } .katex .mathbf{ font-family:KaTeX_Main; font-weight:700 } .katex .boldsymbol{ font-family:KaTeX_Math; font-style:italic; font-weight:700 } .katex .amsrm,.katex .mathbb,.katex .textbb{ font-family:KaTeX_AMS } .katex .mathcal{ font-family:KaTeX_Caligraphic } .katex .mathfrak,.katex .textfrak{ font-family:KaTeX_Fraktur } .katex .mathtt{ font-family:KaTeX_Typewriter } .katex .mathscr,.katex .textscr{ font-family:KaTeX_Script } .katex .mathsf,.katex .textsf{ font-family:KaTeX_SansSerif } .katex .mathboldsf,.katex .textboldsf{ font-family:KaTeX_SansSerif; font-weight:700 } .katex .mathitsf,.katex .textitsf{ font-family:KaTeX_SansSerif; font-style:italic } .katex .mainrm{ font-family:KaTeX_Main; font-style:normal } .katex .vlist-t{ border-collapse:collapse; display:inline-table; table-layout:fixed } .katex .vlist-r{ display:table-row } .katex .vlist{ display:table-cell; position:relative; vertical-align:bottom } .katex .vlist>span{ display:block; height:0; position:relative } .katex .vlist>span>span{ display:inline-block } .katex .vlist>span>.pstrut{ overflow:hidden; width:0 } .katex .vlist-t2{ margin-right:-2px } .katex .vlist-s{ display:table-cell; font-size:1px; min-width:2px; vertical-align:bottom; width:2px } .katex .vbox{ align-items:baseline; display:inline-flex; flex-direction:column } .katex .hbox{ width:100% } .katex .hbox,.katex .thinbox{ display:inline-flex; flex-direction:row } .katex .thinbox{ max-width:0; width:0 } .katex .msupsub{ text-align:left } .katex .mfrac>span>span{ text-align:center } .katex .mfrac .frac-line{ border-bottom-style:solid; display:inline-block; width:100% } .katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{ min-height:1px } .katex .mspace{ display:inline-block } .katex .clap,.katex .llap,.katex .rlap{ position:relative; width:0 } .katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{ position:absolute } .katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{ display:inline-block } .katex .llap>.inner{ right:0 } .katex .clap>.inner,.katex .rlap>.inner{ left:0 } .katex .clap>.inner>span{ margin-left:-50%; margin-right:50% } .katex .rule{ border:0 solid; display:inline-block; position:relative } .katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{ border-bottom-style:solid; display:inline-block; width:100% } .katex .hdashline{ border-bottom-style:dashed; display:inline-block; width:100% } .katex .sqrt>.root{ margin-left:.27777778em; margin-right:-0.55555556em } .katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{ font-size:1em } .katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{ font-size:1.2em } .katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{ font-size:1.4em } .katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{ font-size:1.6em } .katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{ font-size:1.8em } .katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{ font-size:2em } .katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{ font-size:2.4em } .katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{ font-size:2.88em } .katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{ font-size:3.456em } .katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{ font-size:4.148em } .katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{ font-size:4.976em } .katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{ font-size:.83333333em } .katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{ font-size:1em } .katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{ font-size:1.16666667em } .katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{ font-size:1.33333333em } .katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{ font-size:1.5em } .katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{ font-size:1.66666667em } .katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{ font-size:2em } .katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{ font-size:2.4em } .katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{ font-size:2.88em } .katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{ font-size:3.45666667em } .katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{ font-size:4.14666667em } .katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{ font-size:.71428571em } .katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{ font-size:.85714286em } .katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{ font-size:1em } .katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{ font-size:1.14285714em } .katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{ font-size:1.28571429em } .katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{ font-size:1.42857143em } .katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{ font-size:1.71428571em } .katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{ font-size:2.05714286em } .katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{ font-size:2.46857143em } .katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{ font-size:2.96285714em } .katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{ font-size:3.55428571em } .katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{ font-size:.625em } .katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{ font-size:.75em } .katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{ font-size:.875em } .katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{ font-size:1em } .katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{ font-size:1.125em } .katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{ font-size:1.25em } .katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{ font-size:1.5em } .katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{ font-size:1.8em } .katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{ font-size:2.16em } .katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{ font-size:2.5925em } .katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{ font-size:3.11em } .katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{ font-size:.55555556em } .katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{ font-size:.66666667em } .katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{ font-size:.77777778em } .katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{ font-size:.88888889em } .katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{ font-size:1em } .katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{ font-size:1.11111111em } .katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{ font-size:1.33333333em } .katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{ font-size:1.6em } .katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{ font-size:1.92em } .katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{ font-size:2.30444444em } .katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{ font-size:2.76444444em } .katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{ font-size:.5em } .katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{ font-size:.6em } .katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{ font-size:.7em } .katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{ font-size:.8em } .katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{ font-size:.9em } .katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{ font-size:1em } .katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{ font-size:1.2em } .katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{ font-size:1.44em } .katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{ font-size:1.728em } .katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{ font-size:2.074em } .katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{ font-size:2.488em } .katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{ font-size:.41666667em } .katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{ font-size:.5em } .katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{ font-size:.58333333em } .katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{ font-size:.66666667em } .katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{ font-size:.75em } .katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{ font-size:.83333333em } .katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{ font-size:1em } .katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{ font-size:1.2em } .katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{ font-size:1.44em } .katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{ font-size:1.72833333em } .katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{ font-size:2.07333333em } .katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{ font-size:.34722222em } .katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{ font-size:.41666667em } .katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{ font-size:.48611111em } .katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{ font-size:.55555556em } .katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{ font-size:.625em } .katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{ font-size:.69444444em } .katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{ font-size:.83333333em } .katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{ font-size:1em } .katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{ font-size:1.2em } .katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{ font-size:1.44027778em } .katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{ font-size:1.72777778em } .katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{ font-size:.28935185em } .katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{ font-size:.34722222em } .katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{ font-size:.40509259em } .katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{ font-size:.46296296em } .katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{ font-size:.52083333em } .katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{ font-size:.5787037em } .katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{ font-size:.69444444em } .katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{ font-size:.83333333em } .katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{ font-size:1em } .katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{ font-size:1.20023148em } .katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{ font-size:1.43981481em } .katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{ font-size:.24108004em } .katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{ font-size:.28929605em } .katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{ font-size:.33751205em } .katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{ font-size:.38572806em } .katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{ font-size:.43394407em } .katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{ font-size:.48216008em } .katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{ font-size:.57859209em } .katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{ font-size:.69431051em } .katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{ font-size:.83317261em } .katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{ font-size:1em } .katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{ font-size:1.19961427em } .katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{ font-size:.20096463em } .katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{ font-size:.24115756em } .katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{ font-size:.28135048em } .katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{ font-size:.32154341em } .katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{ font-size:.36173633em } .katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{ font-size:.40192926em } .katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{ font-size:.48231511em } .katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{ font-size:.57877814em } .katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{ font-size:.69453376em } .katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{ font-size:.83360129em } .katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{ font-size:1em } .katex .delimsizing.size1{ font-family:KaTeX_Size1 } .katex .delimsizing.size2{ font-family:KaTeX_Size2 } .katex .delimsizing.size3{ font-family:KaTeX_Size3 } .katex .delimsizing.size4{ font-family:KaTeX_Size4 } .katex .delimsizing.mult .delim-size1>span{ font-family:KaTeX_Size1 } .katex .delimsizing.mult .delim-size4>span{ font-family:KaTeX_Size4 } .katex .nulldelimiter{ display:inline-block; width:.12em } .katex .delimcenter,.katex .op-symbol{ position:relative } .katex .op-symbol.small-op{ font-family:KaTeX_Size1 } .katex .op-symbol.large-op{ font-family:KaTeX_Size2 } .katex .accent>.vlist-t,.katex .op-limits>.vlist-t{ text-align:center } .katex .accent .accent-body{ position:relative } .katex .accent .accent-body:not(.accent-full){ width:0 } .katex .overlay{ display:block } .katex .mtable .vertical-separator{ display:inline-block; min-width:1px } .katex .mtable .arraycolsep{ display:inline-block } .katex .mtable .col-align-c>.vlist-t{ text-align:center } .katex .mtable .col-align-l>.vlist-t{ text-align:left } .katex .mtable .col-align-r>.vlist-t{ text-align:right } .katex .svg-align{ text-align:left } .katex svg{ fill:currentColor; stroke:currentColor; fill-rule:nonzero; fill-opacity:1; stroke-width:1; stroke-linecap:butt; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-dashoffset:0; stroke-opacity:1; display:block; height:inherit; position:absolute; width:100% } .katex svg path{ stroke:none } .katex img{ border-style:none; max-height:none; max-width:none; min-height:0; min-width:0 } .katex .stretchy{ display:block; overflow:hidden; position:relative; width:100% } .katex .stretchy:after,.katex .stretchy:before{ content:"" } .katex .hide-tail{ overflow:hidden; position:relative; width:100% } .katex .halfarrow-left{ left:0; overflow:hidden; position:absolute; width:50.2% } .katex .halfarrow-right{ overflow:hidden; position:absolute; right:0; width:50.2% } .katex .brace-left{ left:0; overflow:hidden; position:absolute; width:25.1% } .katex .brace-center{ left:25%; overflow:hidden; position:absolute; width:50% } .katex .brace-right{ overflow:hidden; position:absolute; right:0; width:25.1% } .katex .x-arrow-pad{ padding:0 .5em } .katex .cd-arrow-pad{ padding:0 .55556em 0 .27778em } .katex .mover,.katex .munder,.katex .x-arrow{ text-align:center } .katex .boxpad{ padding:0 .3em } .katex .fbox,.katex .fcolorbox{ border:.04em solid; box-sizing:border-box } .katex .cancel-pad{ padding:0 .2em } .katex .cancel-lap{ margin-left:-0.2em; margin-right:-0.2em } .katex .sout{ border-bottom-style:solid; border-bottom-width:.08em } .katex .angl{ border-right:.049em solid; border-top:.049em solid; box-sizing:border-box; margin-right:.03889em } .katex .anglpad{ padding:0 .03889em } .katex .eqn-num:before{ content:"(" counter(katexEqnNo) ")"; counter-increment:katexEqnNo } .katex .mml-eqn-num:before{ content:"(" counter(mmlEqnNo) ")"; counter-increment:mmlEqnNo } .katex .mtr-glue{ width:50% } .katex .cd-vert-arrow{ display:inline-block; position:relative } .katex .cd-label-left{ display:inline-block; position:absolute; right:calc(50% + .3em); text-align:left } .katex .cd-label-right{ display:inline-block; left:calc(50% + .3em); position:absolute; text-align:right } .katex-display{ display:block; margin:1em 0; text-align:center } .katex-display>.katex{ display:block; text-align:center; white-space:nowrap } .katex-display>.katex>.katex-html{ display:block; position:relative } .katex-display>.katex>.katex-html>.tag{ position:absolute; right:0 } .katex-display.leqno>.katex>.katex-html>.tag{ left:0; right:auto } .katex-display.fleqn>.katex{ padding-left:2em; text-align:left } body{ counter-reset:katexEqnNo mmlEqnNo } /* purgecss end ignore */ </style> <script> /*! For license information please see local-report-base.js.LICENSE.txt */ var DPLIB;(()=>{var __webpack_modules__={26289:(e,t,n)=>{var r={"./revo-grid_11.entry.js":8226,"./revogr-clipboard.entry.js":50629,"./revogr-filter-panel.entry.js":31952};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=26289},81397:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DatasetViewBlock:()=>r,PlotlyViewBlock:()=>i,VegaViewBlock:()=>o,FileViewBlock:()=>a,BokehViewBlock:()=>s,arrowUtils:()=>l});const r=n(13923),i=n(90039),o=n(48399),a=n(75908),s=n(76010),l=n(25965)},29136:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var r=n(97983),i=n(93961),o=n(17674);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class s{constructor(e){a(this,"fieldNames",[]),a(this,"coerceRow",(e=>r.Z(this.fieldNames,e)));for(const t of e)o.g.isTimestamp(t)?this.composeTimestampField(t):o.g.isInt(t)?this.composeIntField(t):o.g.isFloat(t)&&this.composeFloatField(t),this.fieldNames.push(t.name)}composeIntField(e){e.type.bitWidth>=64&&(this.coerceRow=i.Z((e=>e),this.coerceRow))}composeFloatField(e){this.coerceRow=i.Z((t=>{const n=t[e.name];return n&&(t[e.name]=parseFloat(n.toPrecision(4))),t}),this.coerceRow)}composeTimestampField(e){null!==e.type.timezone&&"UTC"!==e.type.timezone||(this.coerceRow=i.Z((t=>{const n=t[e.name];return n&&(t[e.name]=new Date(n).toISOString()),t}),this.coerceRow))}}},25965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{apiResponseToArrow:()=>a});var r=n(17674),i=n(29136),o=n(39228);const a=e=>{const t=[],n=r.iA.from(e),a=new i.G(n.schema.fields);for(const e of n)t.push(a.coerceRow(e));return{schema:(0,o.b)(n.schema),data:t,containsBigInt:n.schema.fields.some((e=>e.type.bitWidth&&e.type.bitWidth>=64))}}},77705:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});var r=n(20362);const i=()=>r.createElement("div",{className:"flex items-center justify-center w-640px h-480px"},r.createElement("div",{className:"loader-lg"}))},13923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>N});var r=n(20362),i=n(64734),o=n(73152),a=n(94944);const s=e=>r.createElement("div",{className:"px-2.5 py-0.5 mr-0 flex items-center inline-flex items-center md:rounded text-xs font-medium leading-4 bg-gray-200 text-gray-700"},r.createElement("div",null,r.createElement("i",{className:`pr-2 fa ${e.icon}`})),r.createElement("div",null,e.value));var l=n(79177);const c=e=>r.createElement(s,{value:r.createElement(r.Fragment,null,r.createElement("span",null,(0,l.u)(e.val)),r.createElement("span",{className:"hidden md:inline"}," ",e.unit)),icon:e.icon}),u=e=>r.createElement("div",{className:"flex justify-end md:space-x-2 ml-2"},r.createElement(c,{val:e.block.rows,unit:"rows",icon:"fa-bars"}),r.createElement(c,{val:e.block.columns,unit:"columns",icon:"fa-columns"}),r.createElement(c,{val:e.block.rows*e.block.columns,unit:"cells",icon:"fa-th-large"}));u.defaultProps={className:""};var h=n(16070),d=n(54894);const f=function(e){return function(...t){return e.apply(this,t).catch((e=>{o.Am.error("An error occurred while exporting the dataset"),console.error(e)}))}},p=e=>{const{block:t,previewMode:n}=e,o=(e=>[{title:"Current State",options:[{name:"Copy CSV to clipboard",onClick:async()=>d.E.copyOnce(await e.getCsvText()),id:"copy-clipboard"},{name:"Download CSV",onClick:f(e.downloadLocal),id:"download-csv"}]},{title:"Original Data",options:[{name:"Download CSV",onClick:f((()=>e.downloadRemote("CSV"))),id:"download-original-csv"},{name:"Download Excel",onClick:f((()=>e.downloadRemote("EXCEL"))),id:"download-original-excel"}]}])(e.block),s=(e=>[{options:[{name:"Explore Data",onClick:()=>window.open(e.sanddanceUrl,"_blank"),id:"analyse-sanddance"}]}])(e.block);return(0,r.useEffect)((()=>{h.Z.rebuild()})),r.createElement("div",{className:`bg-gray-100 py-2 ${e.className}`},r.createElement("div",{className:"flex justify-between items-center flex-wrap"},r.createElement(u,{block:t}),!window.dpLocal&&!n&&r.createElement("div",{className:"min-w-0 flex items-center pr-2 sm:divide-x flex-wrap"},r.createElement("div",{className:"pr-2 sm:flex hidden space-x-2"},r.createElement("span",{"data-tip":e.disableSanddance?"Data explorer not supported on this dataset":void 0,"data-for":"explorer-msg"},r.createElement(a.r,{onClick:()=>window.open(t.sanddanceUrl,"_blank"),disabled:e.disableSanddance},r.createElement("svg",{xmlns:"path_to_url",className:"h-5 w-5 mr-1",viewBox:"0 0 20 20",fill:"currentColor"},r.createElement("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),r.createElement("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})),"Explore data")),r.createElement(a.r,{icon:e.queryAreaOpen?"fa-caret-up":"fa-caret-down",onClick:()=>e.setQueryAreaOpenn(),disabled:e.previewMode,dataCy:"btn-open-query"},"Run SQL Query")),r.createElement("div",{className:"sm:hidden block"},r.createElement(i.m,{name:"Analysis",sections:s})),r.createElement(i.m,{name:"Export",sections:o}))))};p.defaultProps={title:null};var g=n(47218),m=n(70803);const v={string:"green",double:"blue",boolean:"indigo",timestamp:"red",category:"orange",integer:"teal",index:"black",unknown:"black"},y={string:"font",timestamp:"calendar",category:"cubes",double:"bar-chart",boolean:"toggle-on",integer:"bar-chart",index:"list-ol",unknown:"circle"},b=(e,t,n)=>{const r=t[e],i=n[e];return r===i?0:r>i?1:-1},_=e=>r.createElement("div",{className:"w-full flex justify-center"},r.createElement(a.r,{onClick:e.loadFull,icon:"fa-table"},r.createElement("span",{"data-cy":"button-load-dataset"},"Click to load dataset (",(0,l.u)(e.cells)," cells)"))),x=(e,t)=>{const n=t.type||"unknown";return e("div",{class:"flex items-center w-full whitespace-nowrap overflow-hidden"},e("i",{class:`fa fa-${y[n]} pr-2 text-${v[n]}-400`}),e("div",{},t.name))},w=e=>{(0,r.useEffect)((()=>{(0,g.q)()}),[]);const t=(0,r.useMemo)((()=>{const t=e.input[0];if(e.previewMode||!t)return[];return(e.schema&&e.schema.length?e.schema.map((e=>e.name)):Object.keys(t)).map((t=>{const n=e.schema&&e.schema.find((e=>e.name===t)),r=n&&n.type?n.type:"string",i=(e=>{switch(e){case"double":case"integer":return"number";case"timestamp":return"date";case"category":return"select";default:return"string"}})(r);return{prop:t,name:t,size:200,sortable:!0,columnType:i,type:r,filter:i,autoSize:!0,cellCompare:"number"===i?b:void 0,columnTemplate:x}}))}),[e.input,e.schema,e.previewMode]);return e.previewMode?r.createElement(_,{loadFull:e.loadFull,cells:e.cells}):r.createElement("div",{className:e.className},t.length?r.createElement(m.d_,{theme:"compact",columns:t,source:e.input,id:`grid-${e.refId}`,resize:!0,readonly:!0,exporting:!0,filter:!0,rowHeaders:!0,autoSizeColumn:!0,onBeforesorting:e=>{e.detail.order||(e.detail.order="asc")}}):r.createElement("span",{"data-cy":"no-data-msg"},"No data to display"))};var A=n(5144),k=n(64615),T=n.n(k),S=n(2352),E=n.n(S),C=n(4670);n(31462);const M={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)",width:"64rem",height:"32rem",background:"white"},overlay:{zIndex:1e3,background:"rgba(107, 114, 128, 0.75)"}},O=e=>r.createElement(E(),{isOpen:e.isOpen,onRequestClose:e.close,style:M},r.createElement("i",{className:"block absolute top-2 right-2 cursor-pointer fas fa-times text-gray-700",onClick:e.close,"data-cy":"btn-close-alasql-modal"}),r.createElement("div",{"data-cy":"alasql-error-msg",className:"bg-red-50 text-red-600 flex-auto p-2 mt-6"},e.error)),L=e=>{const[t,n]=(0,r.useState)(null),[i,o]=(0,r.useState)(!1);return r.createElement("div",{className:"h-48 flex flex-col justify-start border-b border-gray-200"},r.createElement("div",{className:"flex flex-col flex-fixed h-full query-container"},r.createElement(C.fk,{value:e.query,onBeforeChange:(t,n,r)=>e.setQuery(r),"data-cy":"input-alasql",options:{theme:"eclipse",mode:"sql"}}),r.createElement("div",{className:"flex justify-start flex-fixed my-2 px-2"},r.createElement(a.r,{onClick:()=>{if(e.query)try{e.runQuery(),n(null)}catch(e){n(e.toString())}},disabled:!e.query,className:"w-28",intent:"primary",icon:"fa-play",dataCy:"btn-run-query"},"Run Query"),r.createElement(a.r,{onClick:()=>{e.clearQuery(),n(null)},intent:"secondary-gray",className:"ml-2 w-28",icon:"fa-undo",dataCy:"btn-reset-data"},"Reset Data"),t&&r.createElement(a.r,{onClick:()=>o(!0),intent:"danger",className:"ml-2 w-28",icon:"fa-exclamation-triangle",dataCy:"btn-see-errors"},"See Errors"))),r.createElement(O,{error:t,isOpen:i,close:()=>o(!1)}))};function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I="SELECT * FROM $table",R=()=>r.createElement("div",{className:"m-auto w-full py-8 flex items-center justify-center"},r.createElement("div",{className:"loader-lg"})),P=e=>({data:[],gettingResults:!1,schema:void 0,previewMode:!e.autoLoad,query:I,queryResult:void 0,queryAreaOpen:!1,disableSanddance:!1});class N extends r.Component{constructor(e){super(e),D(this,"context",void 0),D(this,"runQuery",(()=>{const e=this.state,t=e.query.replace(/\$table/g,"?"),n=T()(t,[e.data]),r=e=>Number(e)===e&&`${e}`.includes(".")?"double":Number(e)===e?"integer":"string",i=n.length?(()=>{const e=Object.keys(n[0]),t=[];for(let i of e){let e,o=0;for(;!e&&o<=Math.min(10,n.length-1);)e=n[o++][i];t.push({name:i,type:r(e)})}return t})():[];this.setState({queryResult:{data:n,schema:i}})})),D(this,"clearQuery",(()=>{this.setState({queryResult:null,query:I})})),D(this,"loadFull",(async()=>{this.setState({previewMode:!1},this.getResultData)})),D(this,"toggleQueryArea",(e=>{this.setState({queryAreaOpen:e})})),this.state=P(e.block)}componentDidMount(){const{block:e}=this.props;e.autoLoad&&this.getResultData()}componentDidUpdate(e){const{block:t}=this.props;e.block.refId!==t.refId&&this.setState(P(t),(()=>{t.autoLoad&&this.getResultData()}))}async getResultData(){const{block:e}=this.props;this.setState({data:[]});try{const t=await e.streamContents();if(t){const{schema:e,data:n,containsBigInt:r}=t;this.setState({schema:e,data:this.state.data.concat(n),disableSanddance:r})}}catch(e){throw o.Am.error("An error occurred downloading your dataset data: "+e),e}}render(){const{block:e}=this.props,{schema:t,data:n,previewMode:i,query:o,queryResult:a,queryAreaOpen:s,disableSanddance:l}=this.state,c=0!==e.rows&&0===n.length&&!i,{reportStore:{singleBlockEmbed:u}}=this.context.store;return r.createElement("div",{"data-cy":"block-datatable",className:"rounded shadow w-full "+(u?"h-full flex flex-col":"")},r.createElement(p,{block:e,setQueryAreaOpenn:()=>this.toggleQueryArea(!s),queryAreaOpen:s,title:"",className:u?"flex-initial":"",runQuery:this.runQuery,previewMode:i,disableSanddance:l}),s&&r.createElement(L,{open:s,query:o,setQuery:e=>this.setState({query:e}),toggle:this.toggleQueryArea,runQuery:this.runQuery,clearQuery:this.clearQuery}),c?r.createElement(R,null):r.createElement(w,{input:a?a.data:n,schema:a?a.schema:t,numRows:e.rows,cells:e.cells,previewMode:i,loadFull:this.loadFull,refId:e.refId,className:u?"flex-1":"h-96"}))}}D(N,"contextType",A.yX)},75908:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(20362),i=n(5144),o=n(94944);const a=e=>r.createElement(o.r,{onClick:()=>e.onClick(),icon:"fa-download"},!e.hideText&&r.createElement(r.Fragment,null,"Download")),s=(0,i.Pi)((e=>r.createElement("div",{className:"p-4 bg-gray-50 shadow"},r.createElement("div",{className:"flex items-center"},r.createElement("svg",{className:"flex-shrink-0 h-5 w-5 mr-2 text-gray-400","x-description":"Heroicon name: solid/paper-clip",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},r.createElement("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})),r.createElement("span",{className:"text-base"},e.block.filename),r.createElement("div",{className:"ml-auto"},r.createElement(a,{onClick:e.block.downloadFile})))))),l=e=>r.createElement("div",{className:"w-full","data-cy":"block-file"},r.createElement(s,{block:e.block}));l.defaultProps={displayHeader:!0};const c=l},76010:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(20362),i=n(52176),o=n(77705),a=n(5144),s=n(73152),l=n(83125),c=n(23807);const u=e=>{const t=(0,r.useRef)({divId:`bokeh_${c.Z()}`}),[n,u]=(0,r.useState)(),[h,d]=(0,r.useState)(!0),f=(0,r.useRef)([]),p=(0,r.useContext)(a.yX),{singleBlockEmbed:g}=p.store.reportStore,m=(0,r.useCallback)((()=>{if(n)try{d(!1),e.block.responsive&&(e=>{const t=e.doc.roots.references.find((e=>"Plot"===e.type));t&&(t.attributes.sizing_mode=g?"stretch_both":"stretch_width")})(n),i.$ZF.embed_item(n,t.current.divId).then((e=>{e.forEach((e=>{const t=c.Z();e.model.document.uuid=t,f.current.push(t)}))}))}catch(e){s.Am.error("An error occurred while rendering a Bokeh chart")}}),[n]),v=()=>{for(const e of i.DeX)for(const t of f.current)if(e.uuid===t){e.clear();const t=i.DeX.indexOf(e);t>-1&&i.DeX.splice(t,1)}};return(0,r.useEffect)((()=>(e.fetchData().then((e=>{u(e)})).catch((e=>{s.Am.error("An error occurred while fetching Bokeh chart data")})),v)),[e.block.refId]),(0,r.useEffect)((()=>{m()}),[n]),r.createElement(r.Fragment,null,h&&r.createElement(o.T,null),r.createElement("div",{"data-cy":"block-bokeh",id:t.current.divId,className:`bk-root m-auto flex justify-center items-center ${(0,l.Z)(e.block.responsive,g)}`}))}},90039:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(20362),i=n(90492),o=n(73152),a=n(77705),s=n(5144),l=n(83125),c=n(23807);const u={displaylogo:!1,responsive:!0},h={modebar:{orientation:"v"}},d=e=>{const[t,n]=(0,r.useState)(),d=(0,r.useContext)(s.yX),{singleBlockEmbed:f}=d.store.reportStore;return(0,r.useEffect)((()=>{e.fetchData().then((t=>{e.block.responsive&&(e=>{const{layout:t}=e;t&&(delete t.autosize,delete t.width,f&&delete t.height)})(t),n(t)})).catch((e=>{o.Am.error("Couldn't fetch Plotly asset")}))}),[e.block.refId]),r.createElement("div",{"data-cy":"block-plotly",className:`bg-white m-auto flex justify-center ${(0,l.Z)(e.block.responsive,f)}`},t&&i.Z?r.createElement(i.Z,{key:c.Z(),className:"w-full",useResizeHandler:!0,data:t.data,layout:{...h,...t.layout,autosize:e.block.responsive},frames:t.frames||void 0,config:u}):r.createElement(a.T,null))}},48399:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(20362),i=n(35577),o=n(77705),a=n(5144),s=n(73152),l=n(83125),c=n(23807);const u=e=>{const t=(0,r.useRef)({divId:`vega_${c.Z()}`}),[n,u]=(0,r.useState)(!0),h=(0,r.useRef)(),d=(0,r.useContext)(a.yX),{singleBlockEmbed:f}=d.store.reportStore;(0,r.useEffect)((()=>(e.fetchData().then((n=>{let r;try{r=JSON.parse(n)}catch(e){r=n}(async n=>{if(n)try{e.block.responsive&&(e=>{e.width="container",f&&(e.height="container")})(n),u(!1);const r=await(0,i.ZP)(`#${t.current.divId}`,n,{mode:"vega-lite",actions:!1});h.current=r,f&&(()=>{const e=document.getElementById(t.current.divId),n=e&&e.querySelector(".vega-bindings"),r=e&&e.querySelector("canvas");r&&n&&(r.style.height=r.offsetHeight-n.offsetHeight+"px")})()}catch(e){s.Am.error("An error occurred while rendering an Altair chart")}})(r)})).catch((e=>{s.Am.error("An error occurred while fetching Altair chart data")})),()=>{h.current&&h.current.finalize()})),[e.block.refId]);const p=(0,l.Z)(e.block.responsive,f);return r.createElement("div",{className:`m-auto justify-center bg-white flex ${p}`},n&&r.createElement(o.T,null),r.createElement("div",{id:t.current.divId,"data-cy":"block-vega",className:p}))}},83125:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(e,t)=>{const n=[];return e&&n.push("w-full"),t&&n.push("h-iframe"),n.join(" ")}},64734:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(20362);const i=e=>{const[t,n]=(0,r.useState)(!1);return r.createElement("div",{"data-cy":`dropdown-${e.name.toLowerCase()}`,className:`relative inline-block text-left ${e.className}`,style:{zIndex:5}},r.createElement("div",null,r.createElement("button",{type:"button",className:"dp-btn-sm px-1 sm:px-2 sm:px-2 py-0",id:"options-menu",onClick:()=>n(!t),onBlur:()=>setTimeout((()=>n(!1)),200)},e.name,r.createElement("svg",{className:"-mr-1 ml-1 h-5 w-5",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},r.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})))),r.createElement("div",{className:`${t?"":"hidden"} ${"left"===e.orientation?"origin-top-left left-0":"origin-top-right right-0"} absolute w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100`,role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu"},e.sections.map(((e,t)=>r.createElement("div",{className:"py-1",key:t},e.title&&r.createElement("div",{className:"text-xs pl-2 py-2 font-semibold"},e.title),e.options.map(((e,n)=>r.createElement("a",{"data-cy":`dropdown-option-${e.id}`,id:e.id,onClick:e.onClick,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 cursor-pointer",key:`${t}-${n}`,role:"menuitem"},e.name))))))))}},94944:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});var r=n(20362);const i=e=>r.createElement("button",{type:"button",className:`dp-btn-sm dp-btn-${e.intent} ${e.className} disabled:opacity-50`,onClick:e.onClick,disabled:e.disabled,"data-cy":e.dataCy},e.icon&&r.createElement("i",{className:`mr-2 fa ${e.icon}`}),e.children);i.defaultProps={theme:"light",intent:"info",onClick:()=>{}}},39228:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(17674);const i=e=>{switch(e.typeId){case r.Dy.Null:return"null";case r.Dy.Int:return"integer";case r.Dy.Float:return e.precision===r.Gc.DOUBLE?"double":"float";case r.Dy.Binary:case r.Dy.FixedSizeBinary:return"binary";case r.Dy.Utf8:return"string";case r.Dy.Bool:return"boolean";case r.Dy.Decimal:return"decimal";case r.Dy.Date:return"date";case r.Dy.Time:return"time";case r.Dy.Timestamp:return"timestamp";case r.Dy.Interval:return"interval";case r.Dy.List:case r.Dy.FixedSizeList:return`[${i(e.children[0].type)}]`;case r.Dy.Struct:return"struct";case r.Dy.Union:return e.children.map((e=>i(e.type))).filter((e=>"null"!==e)).join(" or ");case r.Dy.Map:return"map";case r.Dy.Dictionary:return r.g.isUtf8(e.valueType)?"category":i(e.valueType);default:return e.toString()}},o=e=>e.fields.map((e=>({name:e.name,type:i(e.type)})))},79177:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var r=n(42363),i=n.n(r);const o=e=>i()(e).format("0[.][0]a")},54894:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(34701),i=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class a{constructor(e,t){o(this,"clip",void 0),this.clip=new(i())(e,{text:()=>t.text?t.text:a.getFieldValue(t.fieldId)}),this.clip.on("error",(()=>console.error("An error occurred while copying to clipboard"))),this.clip.on("success",a.onSuccess)}destroy(){this.clip.destroy()}static getFieldValue(e){const t=document.querySelector(`#${e}`);if(!t)throw`Field with ID ${e} not found`;return t.value}static async copyOnce(e){try{await navigator.clipboard.writeText(e),a.onSuccess()}catch(e){console.error("Error copying to clipboard: ",e)}}}o(a,"onSuccess",(()=>{window.Alpine.store("copy").toggle()}))},52176:(e,t,n)=>{"use strict";n.d(t,{DeX:()=>Ly,$ZF:()=>o});var r={};n.r(r),n.d(r,{Angle:()=>ht,Any:()=>$e,Array:()=>tt,Auto:()=>lt,Boolean:()=>Ge,Color:()=>st,Dict:()=>rt,Enum:()=>it,Font:()=>ut,FontSize:()=>ct,Int:()=>Xe,Kind:()=>qe,Kinds:()=>He,Null:()=>Ke,Nullable:()=>Je,Number:()=>Ye,Or:()=>Qe,Percent:()=>at,Ref:()=>ot,String:()=>Ze,Struct:()=>nt,Tuple:()=>et,Unknown:()=>We});var i={};n.r(i),n.d(i,{ActionTool:()=>xg,AdaptiveTicker:()=>ic,AjaxDataSource:()=>Nm,Annotation:()=>ls,AnnularWedge:()=>Yh,Annulus:()=>Zh,Arc:()=>Jh,Arrow:()=>Xl,ArrowHead:()=>cs,Asterisk:()=>Op,Axis:()=>xu,BBoxTileSource:()=>qm,Band:()=>Ql,BasicTickFormatter:()=>sc,BasicTicker:()=>oc,Bezier:()=>td,BooleanFilter:()=>jh,Box:()=>kf,BoxAnnotation:()=>tc,BoxEditTool:()=>bv,BoxSelectTool:()=>Pv,BoxZoomTool:()=>Fv,ButtonTool:()=>fg,CDSView:()=>hl,Canvas:()=>$a,CanvasTexture:()=>Zm,CartesianFrame:()=>Ph,CategoricalAxis:()=>Tu,CategoricalColorMapper:()=>pc,CategoricalMarkerMapper:()=>gc,CategoricalPatternMapper:()=>mc,CategoricalScale:()=>ch,CategoricalTickFormatter:()=>Au,CategoricalTicker:()=>wu,CenterRotatable:()=>wd,Circle:()=>_d,CircleCross:()=>Lp,CircleDot:()=>Dp,CircleX:()=>Rp,CircleY:()=>Ip,ColorBar:()=>Fc,ColorMapper:()=>fc,Column:()=>Sf,ColumnDataSource:()=>Gl,ColumnarDataSource:()=>Ll,CompositeTicker:()=>Uu,ContinuousAxis:()=>Su,ContinuousColorMapper:()=>vc,ContinuousScale:()=>Oc,ContinuousTicker:()=>rc,Cross:()=>Pp,CrosshairTool:()=>gy,CumSum:()=>Fh,CustomAction:()=>ev,CustomJS:()=>sh,CustomJSFilter:()=>Uh,CustomJSHover:()=>my,CustomJSTransform:()=>wc,Dash:()=>Np,DataRange:()=>uh,DataRange1d:()=>hh,DataSource:()=>gs,DatetimeAxis:()=>Ku,DatetimeTickFormatter:()=>ju,DatetimeTicker:()=>Xu,DaysTicker:()=>Wu,Diamond:()=>zp,DiamondCross:()=>Fp,DiamondDot:()=>Bp,Dodge:()=>kc,Dot:()=>jp,EdgesAndLinkedNodes:()=>kl,EditTool:()=>vv,Ellipse:()=>Sd,EllipseOval:()=>kd,EqHistColorMapper:()=>xc,Expression:()=>Nh,FactorRange:()=>Ds,Filter:()=>Bh,FixedTicker:()=>Bm,FreehandDrawTool:()=>xv,FuncTickFormatter:()=>Hh,GMapOptions:()=>Dm,GMapPlot:()=>Im,GeoJSONDataSource:()=>Fm,GestureTool:()=>yg,Glyph:()=>Rs,GlyphRenderer:()=>_l,GraphHitTestPolicy:()=>xl,GraphRenderer:()=>Sl,Grid:()=>bf,GridBox:()=>Cf,GroupFilter:()=>Vh,GuideRenderer:()=>mu,HArea:()=>ll,HBar:()=>Od,HTMLBox:()=>Of,HelpTool:()=>Ag,Hex:()=>Up,HexDot:()=>Vp,HexTile:()=>Dd,HoverTool:()=>_y,Image:()=>Nd,ImageRGBA:()=>Fd,ImageURL:()=>Ud,ImageURLTexture:()=>Km,IndexFilter:()=>qh,InspectTool:()=>mg,Interpolator:()=>Tc,IntersectRenderers:()=>Ml,InvertedTriangle:()=>qp,Jitter:()=>Sc,Label:()=>Vc,LabelSet:()=>Hc,LassoSelectTool:()=>qv,LayoutDOM:()=>wf,LayoutProvider:()=>mf,Legend:()=>Wc,LegendItem:()=>Gc,Line:()=>nl,LineEditTool:()=>Gv,LinearAxis:()=>Cu,LinearColorMapper:()=>yc,LinearInterpolationScale:()=>Dc,LinearInterpolator:()=>Ec,LinearScale:()=>Lc,LogAxis:()=>th,LogColorMapper:()=>bc,LogScale:()=>Ic,LogTickFormatter:()=>Ju,LogTicker:()=>Qu,MapOptions:()=>Lm,Marker:()=>Zf,MercatorAxis:()=>oh,MercatorTickFormatter:()=>nh,MercatorTicker:()=>rh,MercatorTileSource:()=>Vm,MonthsTicker:()=>Gu,MultiLine:()=>qd,MultiPolygons:()=>$d,NodesAndLinkedEdges:()=>Al,NodesOnly:()=>wl,NormalHead:()=>hs,NumeralTickFormatter:()=>$h,OpenHead:()=>us,OpenURL:()=>lh,Oval:()=>Gd,PanTool:()=>Zv,Panel:()=>Wf,Patch:()=>il,Patches:()=>Xd,Plot:()=>Cm,Plus:()=>Hp,PointDrawTool:()=>Av,PolyAnnotation:()=>Xc,PolyDrawTool:()=>Ev,PolyEditTool:()=>Mv,PolySelectTool:()=>Uv,PolyTool:()=>Tv,PrintfTickFormatter:()=>Wh,ProxyToolbar:()=>wy,QUADKEYTileSource:()=>Hm,Quad:()=>Kd,Quadratic:()=>ef,Range:()=>Ms,Range1d:()=>Rc,RangeTool:()=>sy,Ray:()=>nf,Rect:()=>of,RedoTool:()=>nv,Renderer:()=>as,ResetTool:()=>iv,Row:()=>Df,SaveTool:()=>av,Scale:()=>Mc,ScanningColorMapper:()=>_c,Scatter:()=>rg,Segment:()=>sf,SelectTool:()=>Dv,Selection:()=>ps,SelectionPolicy:()=>Cl,ServerSentDataSource:()=>Pm,SingleIntervalTicker:()=>Vu,Slope:()=>Kc,Spacer:()=>Rf,Span:()=>Qc,Square:()=>$p,SquareCross:()=>Wp,SquareDot:()=>Gp,SquarePin:()=>Yp,SquareX:()=>Xp,Stack:()=>zh,StaticLayoutProvider:()=>vf,Step:()=>cf,StepInterpolator:()=>Cc,TMSTileSource:()=>Ym,Tabs:()=>$f,TapTool:()=>cy,TeeHead:()=>fs,Text:()=>hf,TextAnnotation:()=>jc,Texture:()=>Xm,TickFormatter:()=>ac,Ticker:()=>nc,TileRenderer:()=>Gm,TileSource:()=>jm,Title:()=>tu,Tool:()=>sg,ToolProxy:()=>xy,Toolbar:()=>Lg,ToolbarBase:()=>Cg,ToolbarBox:()=>ky,ToolbarPanel:()=>ru,Tooltip:()=>du,Transform:()=>uc,Triangle:()=>Zp,TriangleDot:()=>Kp,TrianglePin:()=>Jp,UndoTool:()=>lv,UnionRenderers:()=>Ol,VArea:()=>ul,VBar:()=>ff,VeeHead:()=>ds,WMTSTileSource:()=>$m,WebDataSource:()=>Rm,Wedge:()=>gf,WheelPanTool:()=>hy,WheelZoomTool:()=>fy,Whisker:()=>pu,WidgetBox:()=>Yf,X:()=>Qp,XYGlyph:()=>Ns,Y:()=>eg,YearsTicker:()=>Yu,ZoomInTool:()=>pv,ZoomOutTool:()=>gv,marker_funcs:()=>tg});var o={};n.r(o),n.d(o,{BOKEH_ROOT:()=>Iy,add_document_from_session:()=>Gy,add_document_standalone:()=>Fy,embed_item:()=>Jy,embed_items:()=>Qy,embed_items_notebook:()=>Ky,index:()=>zy,kernels:()=>Yy});var a={};n.r(a),n.d(a,{AbstractButton:()=>hb,AbstractIcon:()=>db,AutocompleteInput:()=>xb,Button:()=>Ab,CheckboxButtonGroup:()=>Eb,CheckboxGroup:()=>Lb,ColorPicker:()=>Ib,DatePicker:()=>c_,DateRangeSlider:()=>m_,DateSlider:()=>y_,Div:()=>w_,Dropdown:()=>k_,FileInput:()=>S_,InputWidget:()=>vb,Markup:()=>__,MultiChoice:()=>N_,MultiSelect:()=>C_,NumericInput:()=>j_,Paragraph:()=>O_,PasswordInput:()=>D_,PreText:()=>V_,RadioButtonGroup:()=>H_,RadioGroup:()=>W_,RangeSlider:()=>Y_,Select:()=>Z_,Slider:()=>J_,Spinner:()=>ox,TextAreaInput:()=>sx,TextInput:()=>bb,Toggle:()=>cx,Widget:()=>sb});var s={};n.r(s),n.d(s,{AvgAggregator:()=>tw,BooleanFormatter:()=>_x,CellEditor:()=>Ox,CellEditorView:()=>Mx,CellFormatter:()=>mx,CheckboxEditor:()=>jx,CheckboxEditorView:()=>Bx,DataCube:()=>fw,DataTable:()=>Cx,DateEditor:()=>Yx,DateEditorView:()=>Gx,DateFormatter:()=>xx,GroupingInfo:()=>uw,HTMLTemplateFormatter:()=>wx,IntEditor:()=>Vx,IntEditorView:()=>Ux,MaxAggregator:()=>ow,MinAggregator:()=>rw,NumberEditor:()=>Hx,NumberEditorView:()=>qx,NumberFormatter:()=>bx,PercentEditor:()=>Fx,PercentEditorView:()=>zx,ScientificFormatter:()=>yx,SelectEditor:()=>Nx,SelectEditorView:()=>Px,StringEditor:()=>Dx,StringEditorView:()=>Lx,StringFormatter:()=>vx,SumAggregator:()=>sw,TableColumn:()=>Ax,TableWidget:()=>px,TextEditor:()=>Rx,TextEditorView:()=>Ix,TimeEditor:()=>Wx,TimeEditorView:()=>$x});class l extends Error{}function c(e,t){if(!(!0===e||!1!==e&&e()))throw new l(null!=t?t:"Assertion failed")}function u(){throw new Error("unreachable code")}function h(e){if(0==e)return 0;for(;e<=0;)e+=2*Math.PI;for(;e>2*Math.PI;)e-=2*Math.PI;return e}function d(e,t){return h(e-t)}function f(e,t,n,r){const i=d(t,n);if(0==i)return!1;if(i==2*Math.PI)return!0;const o=h(e),a=d(t,o)<=i&&d(o,n)<=i;return 0==r?a:!a}function p(){return Math.random()}function g(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])}function m(e,t,n){return e<t?t:e>n?n:e}function v(e){return 0==e.length}function y(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function b(e,t){const n=e.length,r=new e.constructor(n);for(let i=0;i<n;i++)r[i]=t(e[i],i,e);return r}function _(e){let t,n=1/0;for(let r=0,i=e.length;r<i;r++)t=e[r],!isNaN(t)&&t<n&&(n=t);return n}function x(e){let t,n=-1/0;for(let r=0,i=e.length;r<i;r++)t=e[r],!isNaN(t)&&t>n&&(n=t);return n}function w(e){let t,n=1/0,r=-1/0;for(let i=0,o=e.length;i<o;i++)t=e[i],isNaN(t)||(t<n&&(n=t),t>r&&(r=t));return[n,r]}function A(e){let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n];return t}function k(e,t){for(let n=0,r=e.length;n<r;n++)if(!t(e[n]))return!1;return!0}function T(e,t){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}function S(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function E(e){return function(t,n){const r=t.length;let i=e>0?0:r-1;for(;i>=0&&i<r;i+=e)if(n(t[i]))return i;return-1}}l.__name__="AssertionError";const C=E(1),M=E(-1);function O(e,t){let n=0,r=e.length;for(;n<r;){const i=Math.floor((n+r)/2);e[i]<t?n=i+1:r=i}return n}function L(e,t,n){const r=e.length,i=new Array(r);for(let o=0;o<r;o++){const r=e[o];if(isNaN(r)){i[o]=r;continue}const a=I(r,t);if(-1==a)i[o]=n[0];else if(a==t.length)i[o]=n[n.length-1];else if(a==t.length-1||t[a]==r)i[o]=n[a];else{const e=t[a],s=n[a],l=t[a+1],c=n[a+1];i[o]=D(r,e,s,l,c)}}return i}function D(e,t,n,r,i){const o=(i-n)/(r-t);let a=o*(e-t)+n;return isFinite(a)||(a=o*(e-r)+i,isFinite(a)||n!=i||(a=n)),a}function I(e,t){if(e<t[0])return-1;if(e>t[t.length-1])return t.length;let n=0,r=t.length-1;for(;r-n!=1;){const i=n+Math.floor((r-n)/2);e>=t[i]?n=i:r=i}return n}function R(e,t,n){const r=n-t;return b(e,(e=>(e-t)/r))}const P=Array.prototype.slice;function N(e){return P.call(e)}function z(e){return[].concat(...e)}function F(e,t){return-1!==e.indexOf(t)}const B=F;function j(e,t){return e[t>=0?t:e.length+t]}function U(e,t,n=1){c(n>0,"'step' must be a positive number"),null==t&&(t=e,e=0);const{max:r,ceil:i,abs:o}=Math,a=e<=t?n:-n,s=r(i(o(t-e)/n),0),l=new Array(s);for(let t=0;t<s;t++,e+=a)l[t]=e;return l}function V(e,t,n=100){const r=(t-e)/(n-1),i=new Array(n);for(let t=0;t<n;t++)i[t]=e+r*t;return i}function q(e){return function(e,t){if(0==e.length)throw new Error("min_by() called with an empty array");let n=e[0],r=t(n);for(let i=1,o=e.length;i<o;i++){const o=e[i],a=t(o);a<r&&(n=o,r=a)}return n}(U(e.length),(t=>e[t]))}function H(e,t){const n=e.map(((e,n)=>({value:e,index:n,key:t(e)})));return n.sort(((e,t)=>{const n=e.key,r=t.key;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),n.map((e=>e.value))}function W(e){const t=new Set;for(const n of e)t.add(n);return[...t]}function G(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return[...t]}function Y(e,...t){const n=[];e:for(const r of e)if(!F(n,r)){for(const e of t)if(!F(e,r))continue e;n.push(r)}return n}function X(e,...t){const n=z(t);return e.filter((e=>!F(n,e)))}function Z(e,t){for(let n=0;n<e.length;)t(e[n])?e.splice(n,1):n++}function K(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[t-r-1]=e[r];return n}function J(e,t){const n=new Array(t);for(let r=0;r<t;r++)n[r]=e;return n}const Q=Object.prototype.toString;function ee(e){return!0===e||!1===e||"[object Boolean]"===Q.call(e)}function te(e){return"[object Number]"===Q.call(e)}function ne(e){return te(e)&&Number.isInteger(e)}function re(e){return"[object String]"===Q.call(e)}function ie(e){return"[object Function]"===Q.call(e)}function oe(e){return Array.isArray(e)}function ae(e,t){return k(e,t)}function se(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function le(e){const t=typeof e;return"function"===t||"object"===t&&!!e}function ce(e){return le(e)&&(null==e.constructor||e.constructor===Object)}const{keys:ue,values:he,entries:de,assign:fe}=Object;function pe(e){return Object.assign({},e)}function ge(e,t){const n=Object.create(Object.prototype),r=z([Object.keys(e),Object.keys(t)]);for(const i of r){const r=e.hasOwnProperty(i)?e[i]:[],o=t.hasOwnProperty(i)?t[i]:[];n[i]=G(r,o)}return n}function me(e){return Object.keys(e).length}function ve(e){return 0==me(e)}function ye(e){const t={};for(const[n,r]of e)t[n]=r;return t}const be="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function _e(e){return new Promise((t=>{be((()=>t(e())))}))}class xe{constructor(e,t){this.sender=e,this.name=t}connect(e,t=null){Ae.has(this.sender)||Ae.set(this.sender,[]);const n=Ae.get(this.sender);if(null!=Te(n,this,e,t))return!1;const r=null!=t?t:e;ke.has(r)||ke.set(r,[]);const i=ke.get(r),o={signal:this,slot:e,context:t};return n.push(o),i.push(o),!0}disconnect(e,t=null){const n=Ae.get(this.sender);if(null==n||0===n.length)return!1;const r=Te(n,this,e,t);if(null==r)return!1;const i=null!=t?t:e,o=ke.get(i);return r.signal=null,Ee(n),Ee(o),!0}emit(e){var t;const n=null!==(t=Ae.get(this.sender))&&void 0!==t?t:[];for(const{signal:t,slot:r,context:i}of n)t===this&&r.call(i,e,this.sender)}}xe.__name__="Signal";class we extends xe{emit(){super.emit(void 0)}}we.__name__="Signal0",function(e){e.disconnectBetween=function(e,t){const n=Ae.get(e);if(null==n||0===n.length)return;const r=ke.get(t);if(null!=r&&0!==r.length){for(const t of r){if(null==t.signal)return;t.signal.sender===e&&(t.signal=null)}Ee(n),Ee(r)}},e.disconnectSender=function(e){var t;const n=Ae.get(e);if(null!=n&&0!==n.length){for(const e of n){if(null==e.signal)return;const n=null!==(t=e.context)&&void 0!==t?t:e.slot;e.signal=null,Ee(ke.get(n))}Ee(n)}},e.disconnectReceiver=function(e){const t=ke.get(e);if(null!=t&&0!==t.length){for(const e of t){if(null==e.signal)return;const t=e.signal.sender;e.signal=null,Ee(Ae.get(t))}Ee(t)}},e.disconnectAll=function(e){const t=Ae.get(e);if(null!=t&&0!==t.length){for(const e of t)e.signal=null;Ee(t)}const n=ke.get(e);if(null!=n&&0!==n.length){for(const e of n)e.signal=null;Ee(n)}}}(xe||(xe={}));const Ae=new WeakMap,ke=new WeakMap;function Te(e,t,n,r){return function(e,i){const o=C(e,(e=>e.signal===t&&e.slot===n&&e.context===r));return-1==o?void 0:e[o]}(e)}const Se=new Set;function Ee(e){0===Se.size&&_e(Ce),Se.add(e)}function Ce(){for(const e of Se)Z(e,(e=>null==e.signal));Se.clear()}function Me(e){if(ce(e)){const t=ue(e);return 1==t.length&&"id"==t[0]}return!1}const Oe={};class Le{constructor(e,t){this.name=e,this.level=t}}Le.__name__="LogLevel";class De{constructor(e,t=De.INFO){this._name=e,this.set_level(t)}static get levels(){return Object.keys(De.log_levels)}static get(e,t=De.INFO){if(e.length>0){let n=Oe[e];return null==n&&(Oe[e]=n=new De(e,t)),n}throw new TypeError("Logger.get() expects a non-empty string name and an optional log-level")}get level(){return this.get_level()}get_level(){return this._log_level}set_level(e){if(e instanceof Le)this._log_level=e;else{if(!re(e)||null==De.log_levels[e])throw new Error("Logger.set_level() expects a log-level object or a string name of a log-level");this._log_level=De.log_levels[e]}const t=`[${this._name}]`;for(const[e,n]of de(De.log_levels))n.level<this._log_level.level||this._log_level.level===De.OFF.level?this[e]=function(){}:this[e]=Ie(e,t)}trace(...e){}debug(...e){}info(...e){}warn(...e){}error(...e){}}function Ie(e,t){return null!=console[e]?console[e].bind(console,t):null!=console.log?console.log.bind(console,t):function(){}}De.__name__="Logger",De.TRACE=new Le("trace",0),De.DEBUG=new Le("debug",1),De.INFO=new Le("info",2),De.WARN=new Le("warn",6),De.ERROR=new Le("error",7),De.FATAL=new Le("fatal",8),De.OFF=new Le("off",9),De.log_levels={trace:De.TRACE,debug:De.DEBUG,info:De.INFO,warn:De.WARN,error:De.ERROR,fatal:De.FATAL,off:De.OFF};const Re=De.get("bokeh"),Pe={indianred:"#CD5C5C",lightcoral:"#F08080",salmon:"#FA8072",darksalmon:"#E9967A",lightsalmon:"#FFA07A",crimson:"#DC143C",red:"#FF0000",firebrick:"#B22222",darkred:"#8B0000",pink:"#FFC0CB",lightpink:"#FFB6C1",hotpink:"#FF69B4",deeppink:"#FF1493",mediumvioletred:"#C71585",palevioletred:"#DB7093",coral:"#FF7F50",tomato:"#FF6347",orangered:"#FF4500",darkorange:"#FF8C00",orange:"#FFA500",gold:"#FFD700",yellow:"#FFFF00",lightyellow:"#FFFFE0",lemonchiffon:"#FFFACD",lightgoldenrodyellow:"#FAFAD2",papayawhip:"#FFEFD5",moccasin:"#FFE4B5",peachpuff:"#FFDAB9",palegoldenrod:"#EEE8AA",khaki:"#F0E68C",darkkhaki:"#BDB76B",lavender:"#E6E6FA",thistle:"#D8BFD8",plum:"#DDA0DD",violet:"#EE82EE",orchid:"#DA70D6",fuchsia:"#FF00FF",magenta:"#FF00FF",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",blueviolet:"#8A2BE2",darkviolet:"#9400D3",darkorchid:"#9932CC",darkmagenta:"#8B008B",purple:"#800080",indigo:"#4B0082",slateblue:"#6A5ACD",darkslateblue:"#483D8B",mediumslateblue:"#7B68EE",greenyellow:"#ADFF2F",chartreuse:"#7FFF00",lawngreen:"#7CFC00",lime:"#00FF00",limegreen:"#32CD32",palegreen:"#98FB98",lightgreen:"#90EE90",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",mediumseagreen:"#3CB371",seagreen:"#2E8B57",forestgreen:"#228B22",green:"#008000",darkgreen:"#006400",yellowgreen:"#9ACD32",olivedrab:"#6B8E23",olive:"#808000",darkolivegreen:"#556B2F",mediumaquamarine:"#66CDAA",darkseagreen:"#8FBC8F",lightseagreen:"#20B2AA",darkcyan:"#008B8B",teal:"#008080",aqua:"#00FFFF",cyan:"#00FFFF",lightcyan:"#E0FFFF",paleturquoise:"#AFEEEE",aquamarine:"#7FFFD4",turquoise:"#40E0D0",mediumturquoise:"#48D1CC",darkturquoise:"#00CED1",cadetblue:"#5F9EA0",steelblue:"#4682B4",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",lightblue:"#ADD8E6",skyblue:"#87CEEB",lightskyblue:"#87CEFA",deepskyblue:"#00BFFF",dodgerblue:"#1E90FF",cornflowerblue:"#6495ED",royalblue:"#4169E1",blue:"#0000FF",mediumblue:"#0000CD",darkblue:"#00008B",navy:"#000080",midnightblue:"#191970",cornsilk:"#FFF8DC",blanchedalmond:"#FFEBCD",bisque:"#FFE4C4",navajowhite:"#FFDEAD",wheat:"#F5DEB3",burlywood:"#DEB887",tan:"#D2B48C",rosybrown:"#BC8F8F",sandybrown:"#F4A460",goldenrod:"#DAA520",darkgoldenrod:"#B8860B",peru:"#CD853F",chocolate:"#D2691E",saddlebrown:"#8B4513",sienna:"#A0522D",brown:"#A52A2A",maroon:"#800000",white:"#FFFFFF",snow:"#FFFAFA",honeydew:"#F0FFF0",mintcream:"#F5FFFA",azure:"#F0FFFF",aliceblue:"#F0F8FF",ghostwhite:"#F8F8FF",whitesmoke:"#F5F5F5",seashell:"#FFF5EE",beige:"#F5F5DC",oldlace:"#FDF5E6",floralwhite:"#FFFAF0",ivory:"#FFFFF0",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lavenderblush:"#FFF0F5",mistyrose:"#FFE4E1",gainsboro:"#DCDCDC",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",silver:"#C0C0C0",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",gray:"#808080",grey:"#808080",dimgray:"#696969",dimgrey:"#696969",lightslategray:"#778899",lightslategrey:"#778899",slategray:"#708090",slategrey:"#708090",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",black:"#000000"};function Ne(e){return e in Pe}function ze(e){return Ne(e.toLowerCase())||"#"==e.substring(0,1)||function(e){let t;switch(e.substring(0,4)){case"rgba":t={start:"rgba(",len:4,alpha:!0};break;case"rgb(":t={start:"rgb(",len:3,alpha:!1};break;default:return!1}if(new RegExp(".*?(\\.).*(,)").test(e))return!1;const n=e.replace(t.start,"").replace(")","").split(",").map(parseFloat);return n.length==t.len&&(!t.alpha||0<=n[3]&&n[3]<=1)&&!F(n.slice(0,3).map((e=>0<=e&&e<=255)),!1)}(e)}function Fe(e){const t=Number(e).toString(16);return 1==t.length?`0${t}`:t}function Be(e){if(0==(e+="").indexOf("#"))return e;if(Ne(e))return Pe[e];if(0==e.indexOf("rgb")){const t=e.replace(/^rgba?\(|\s+|\)$/g,"").split(",");let n=t.slice(0,3).map(Fe).join("");return 4==t.length&&(n+=Fe(Math.floor(255*parseFloat(t[3])))),`#${n.slice(0,8)}`}return e}function je([e,t,n,r]){return(255*e|0)<<24|(255*t|0)<<16|(255*n|0)<<8|255*r|0}function Ue(e){return[(e>>24&255)/255,(e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255]}function Ve(e,t=1){if(!e)return[0,0,0,0];let n=Be(e);n=n.replace(/ |#/g,""),n.length<=4&&(n=n.replace(/(.)/g,"$1$1"));const r=n.match(/../g).map((e=>parseInt(e,16)/255));for(;r.length<3;)r.push(0);return r.length<4&&r.push(t),r.slice(0,4)}class qe{}var He;qe.__name__="Kind",function(e){class t extends qe{valid(e){return!0}}t.__name__="Any",e.Any=t;class n extends qe{valid(e){return!0}}n.__name__="Unknown",e.Unknown=n;class r extends qe{valid(e){return ee(e)}}r.__name__="Boolean",e.Boolean=r;class i extends qe{constructor(e){super(),this.obj_type=e}valid(e){return!0}}i.__name__="Ref",e.Ref=i;class o extends qe{valid(e){return te(e)}}o.__name__="Number",e.Number=o;class a extends o{valid(e){return super.valid(e)&&ne(e)}}a.__name__="Int",e.Int=a;class s extends qe{constructor(e){super(),this.types=e,this.types=e}valid(e){return this.types.some((t=>t.valid(e)))}}s.__name__="Or",e.Or=s;class l extends qe{constructor(e){super(),this.types=e,this.types=e}valid(e){if(!oe(e))return!1;for(let t=0;t<this.types.length;t++){const n=this.types[t],r=e[t];if(!n.valid(r))return!1}return!0}}l.__name__="Tuple",e.Tuple=l;class c extends qe{constructor(e){super(),this.item_type=e}valid(e){return oe(e)&&e.every((e=>this.item_type.valid(e)))}}c.__name__="Array",e.Array=c;class u extends qe{valid(e){return null===e}}u.__name__="Null",e.Null=u;class h extends qe{constructor(e){super(),this.base_type=e}valid(e){return null===e||this.base_type.valid(e)}}h.__name__="Nullable",e.Nullable=h;class d extends qe{valid(e){return re(e)}}d.__name__="String",e.String=d;class f extends qe{constructor(e){super(),this.values=new Set(e)}valid(e){return this.values.has(e)}*[Symbol.iterator](){yield*this.values}}f.__name__="Enum",e.Enum=f;class p extends qe{constructor(e){super(),this.item_type=e}valid(e){if(!ce(e))return!1;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];if(!this.item_type.valid(n))return!1}return!0}}p.__name__="Struct",e.Struct=p;class g extends qe{constructor(e,t){super(),this.key_type=e,this.item_type=t}valid(e){if(!(e instanceof Map))return!1;for(const[t,n]of e.entries())if(!this.key_type.valid(t)||!this.item_type.valid(n))return!1;return!0}}g.__name__="Dict",e.Dict=g;class m extends qe{valid(e){return re(e)&&ze(e)}}m.__name__="Color",e.Color=m;class v extends o{valid(e){return super.valid(e)&&0<=e&&e<=1}}v.__name__="Percent",e.Percent=v}(He||(He={}));const $e=new He.Any,We=new He.Unknown,Ge=new He.Boolean,Ye=new He.Number,Xe=new He.Int,Ze=new He.String,Ke=new He.Null,Je=e=>new He.Nullable(e),Qe=(...e)=>new He.Or(e),et=(...e)=>new He.Tuple(e),tt=e=>new He.Array(e),nt=e=>new He.Struct(e),rt=(e,t)=>new He.Dict(e,t),it=(...e)=>new He.Enum(e),ot=e=>new He.Ref(e),at=new He.Percent,st=new He.Color,lt=it("auto"),ct=Ze,ut=Ze,ht=Ye,dt=it("start","center","end"),ft=it("top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"),pt=it("deg","rad"),gt=it("corner","center"),mt=it("default","primary","success","warning","danger"),vt=it("auto","above","below"),yt=it("width","height"),bt=it("width","height","both"),_t=it("clock","anticlock"),xt=it("uniform","normal"),wt=it("normal","italic","bold","bold italic"),At=it("blank","dot","ring","horizontal_line","vertical_line","cross","horizontal_dash","vertical_dash","spiral","right_diagonal_line","left_diagonal_line","diagonal_cross","right_diagonal_dash","left_diagonal_dash","horizontal_wave","vertical_wave","criss_cross"," ",".","o","-","|","+",'"',":","@","/","\\","x",",","`","v",">","*"),kt=it("POST","GET"),Tt=it("pointytop","flattop"),St=it("mouse","hline","vline"),Et=it("lat","lon"),Ct=it("none","hide","mute"),Mt=ft,Ot=it("butt","round","square"),Lt=it("miter","round","bevel"),Dt=it("prev","next","nearest","interp","none"),It=it("above","below","left","right"),Rt=it("normal","grey"),Pt=it("asterisk","circle","circle_cross","circle_dot","circle_x","circle_y","cross","dash","diamond","diamond_cross","diamond_dot","dot","hex","hex_dot","inverted_triangle","plus","square","square_cross","square_dot","square_pin","square_x","triangle","triangle_dot","triangle_pin","x","y"),Nt=it("show","ignore"),zt=it("vertical","horizontal"),Ft=it("canvas","svg","webgl"),Bt=it("percent","absolute"),jt=it("above","below","left","right","center"),Ut=it("snap_to_data","follow_mouse","none"),Vt=it("x","y","max","min"),qt=it("image","underlay","glyph","guide","annotation","overlay"),Ht=it("canvas","css"),$t=it("standard","event_only"),Wt=it("round","nearest","floor","rounddown","ceil","roundup"),Gt=(it("replace","append","intersect","subtract"),it("above","below","left","right")),Yt=it("stretch_width","stretch_height","stretch_both","scale_width","scale_height","scale_both","fixed"),Xt=it("ascending","descending"),Zt=it("screen","data"),Kt=it("start","end"),Jt=it("after","before","center"),Qt=it("select","inspect"),en=it("left","right","center"),tn=it("top","middle","bottom","alphabetic","hanging","ideographic"),nn=it("repeat","repeat_x","repeat_y","no_repeat"),rn=it("vertical","horizontal","parallel","normal"),on=it("horizontal","vertical","left","right","above","below"),an=it("replace","append"),sn=it("top","middle","bottom"),ln=Symbol("equals"),cn=Symbol("wildcard"),un=Object.prototype.toString;class hn{constructor(){this.a_stack=[],this.b_stack=[]}eq(e,t){if(Object.is(e,t))return!0;if(e===cn||t===cn)return!0;if(null==e||null==t)return e===t;const n=un.call(e);if(n!=un.call(t))return!1;switch(n){case"[object Number]":return this.numbers(e,t);case"[object RegExp]":case"[object String]":return`${e}`==`${t}`;case"[object Date]":case"[object Boolean]":return+e==+t}const{a_stack:r,b_stack:i}=this;let o=r.length;for(;o--;)if(r[o]===e)return i[o]===t;r.push(e),i.push(t);const a=(()=>{if(null!=e[ln]&&null!=t[ln])return e[ln](t,this);switch(n){case"[object Array]":case"[object Uint8Array]":case"[object Int8Array]":case"[object Uint16Array]":case"[object Int16Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":return this.arrays(e,t);case"[object Map]":return this.maps(e,t);case"[object Set]":return this.sets(e,t);case"[object Object]":if(e.constructor==t.constructor&&(null==e.constructor||e.constructor===Object))return this.objects(e,t);case"[object Function]":if(e.constructor==t.constructor&&e.constructor===Function)return this.eq(`${e}`,`${t}`)}if(e instanceof Node)return this.nodes(e,t);throw Error(`can't compare objects of type ${n}`)})();return r.pop(),i.pop(),a}numbers(e,t){return Object.is(e,t)}arrays(e,t){const{length:n}=e;if(n!=t.length)return!1;for(let r=0;r<n;r++)if(!this.eq(e[r],t[r]))return!1;return!0}iterables(e,t){const n=e[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){const e=n.next(),t=r.next();if(e.done&&t.done)return!0;if(e.done||t.done)return!1;if(!this.eq(e.value,t.value))return!1}}maps(e,t){if(e.size!=t.size)return!1;for(const[n,r]of e)if(!t.has(n)||!this.eq(r,t.get(n)))return!1;return!0}sets(e,t){if(e.size!=t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}objects(e,t){const n=Object.keys(e);if(n.length!=Object.keys(t).length)return!1;for(const r of n)if(!t.hasOwnProperty(r)||!this.eq(e[r],t[r]))return!1;return!0}nodes(e,t){return e.nodeType==t.nodeType&&e.textContent==t.textContent&&!!this.iterables(e.childNodes,t.childNodes)}}hn.__name__="Comparator";const{abs:dn}=Math;(class extends hn{constructor(e=1e-4){super(),this.tolerance=e}numbers(e,t){return super.numbers(e,t)||dn(e-t)<this.tolerance}}).__name__="SimilarComparator";const fn=function(e,t){return(new hn).eq(e,t)};class pn{constructor(e,t=0){this.size=e,this[Symbol.toStringTag]="BitSet",this._count=null,this._nwords=Math.ceil(e/32),0==t||1==t?(this._array=new Uint32Array(this._nwords),1==t&&this._array.fill(4294967295)):(c(t.length==this._nwords,"Initializer size mismatch"),this._array=t)}clone(){return new pn(this.size,new Uint32Array(this._array))}[ln](e,t){if(!t.eq(this.size,e.size))return!1;const{_nwords:n}=this,r=this.size%n,i=0==r?n:n-1;for(let t=0;t<i;t++)if(this._array[t]!=e._array[t])return!1;if(0==r)return!0;{const t=1<<r-1,n=t-1^t;return(this._array[i]&n)==(e._array[i]&n)}}static all_set(e){return new pn(e,1)}static all_unset(e){return new pn(e,0)}static from_indices(e,t){const n=new pn(e);for(const e of t)n.set(e);return n}static from_booleans(e,t){const n=new pn(e),r=Math.min(e,t.length);for(let e=0;e<r;e++)t[e]&&n.set(e);return n}_check_bounds(e){c(0<=e&&e<this.size,"Out of bounds")}get(e){this._check_bounds(e);const t=e>>>5,n=31&e;return!!(this._array[t]>>n&1)}set(e,t=!0){this._check_bounds(e),this._count=null;const n=e>>>5,r=31&e;t?this._array[n]|=1<<r:this._array[n]&=~(1<<r)}unset(e){this.set(e,!1)}*[Symbol.iterator](){yield*this.ones()}get count(){let e=this._count;return null==e&&(this._count=e=this._get_count()),e}_get_count(){const{_array:e,_nwords:t,size:n}=this;let r=0;for(let i=0,o=0;o<t;o++){const t=e[o];if(0==t)i+=32;else for(let e=0;e<32&&i<n;e++,i++)t>>>e&1&&(r+=1)}return r}*ones(){const{_array:e,_nwords:t,size:n}=this;for(let r=0,i=0;i<t;i++){const t=e[i];if(0!=t)for(let e=0;e<32&&r<n;e++,r++)t>>>e&1&&(yield r);else r+=32}}*zeros(){const{_array:e,_nwords:t,size:n}=this;for(let r=0,i=0;i<t;i++){const t=e[i];if(4294967295!=t)for(let e=0;e<32&&r<n;e++,r++)t>>>e&1||(yield r);else r+=32}}_check_size(e){c(this.size==e.size,"Size mismatch")}add(e){this._check_size(e);for(let t=0;t<this._nwords;t++)this._array[t]|=e._array[t]}intersect(e){this._check_size(e);for(let t=0;t<this._nwords;t++)this._array[t]&=e._array[t]}subtract(e){this._check_size(e);for(let t=0;t<this._nwords;t++){const n=this._array[t],r=e._array[t];this._array[t]=(n^r)&n}}union(e){this._check_size(e);const t=this.clone();for(let n=0;n<this._nwords;n++)t._array[n]|=e._array[n];return t}intersection(e){this._check_size(e);const t=this.clone();for(let n=0;n<this._nwords;n++)t._array[n]&=e._array[n];return t}difference(e){this._check_size(e);const t=this.clone();for(let n=0;n<this._nwords;n++){const r=this._array[n],i=e._array[n];t._array[n]=(r^i)&r}return t}select(e){const t=this.count,n=new e.constructor(t);let r=0;for(const t of this)n[r++]=e[t];return n}}pn.__name__="BitSet";class gn{constructor(e,t,n){this.nrows=e,this.ncols=t,this._matrix=new Array(e);for(let r=0;r<e;r++){this._matrix[r]=new Array(t);for(let e=0;e<t;e++)this._matrix[r][e]=n(r,e)}}at(e,t){return this._matrix[e][t]}*[Symbol.iterator](){for(let e=0;e<this.nrows;e++)for(let t=0;t<this.ncols;t++){const n=this._matrix[e][t];yield[n,e,t]}}*values(){for(const[e]of this)yield e}map(e){return new gn(this.nrows,this.ncols,((t,n)=>e(this.at(t,n),t,n)))}apply(e){const t=gn.from(e),{nrows:n,ncols:r}=this;if(n==t.nrows&&r==t.ncols)return new gn(n,r,((e,n)=>t.at(e,n)(this.at(e,n),e,n)));throw new Error("dimensions don't match")}to_sparse(){return[...this]}static from(e,t){if(e instanceof gn)return e;if(null!=t){const n=e,r=Math.floor(n.length/t);return new gn(r,t,((e,r)=>n[e*t+r]))}{const t=e,n=e.length,r=_(t.map((e=>e.length)));return new gn(n,r,((e,n)=>t[e][n]))}}}gn.__name__="Matrix";const mn=Float32Array,vn=Uint32Array;class yn{constructor(e,t){this.offsets=e,this.array=t}[ln](e,t){return t.arrays(this.offsets,e.offsets)&&t.arrays(this.array,e.array)}get length(){return this.offsets.length}clone(){return new yn(new Uint32Array(this.offsets),new mn(this.array))}static from(e){const t=e.length,n=new Uint32Array(t);let r=0;for(let i=0;i<t;i++){const t=e[i].length;n[i]=r,r+=t}const i=new mn(r);for(let r=0;r<t;r++)i.set(e[r],n[r]);return new yn(n,i)}*[Symbol.iterator](){const{offsets:e,length:t}=this;for(let n=0;n<t;n++)yield this.array.subarray(e[n],e[n+1])}get(e){const{offsets:t}=this;return this.array.subarray(t[e],t[e+1])}set(e,t){this.array.set(t,this.offsets[e])}}yn.__name__="RaggedArray",yn[Symbol.toStringTag]="RaggedArray";class bn{constructor(){this._dev=!1}set dev(e){this._dev=e}get dev(){return this._dev}}bn.__name__="Settings";const _n=new bn;function xn(e){try{return JSON.stringify(e)}catch(t){return e.toString()}}function wn(e){return ce(e)&&(void 0===e.value?0:1)+(void 0===e.field?0:1)+(void 0===e.expr?0:1)==1}class An{constructor(e,t,n,r,i,o={}){var a,s;let l;if(this.obj=e,this.attr=t,this.kind=n,this.default_value=r,this._dirty=!1,this.change=new we(this.obj,"change"),this.internal=null!==(a=o.internal)&&void 0!==a&&a,this.optional=null!==(s=o.optional)&&void 0!==s&&s,void 0!==i)l=i,this._dirty=!0;else{const t=this._default_override();l=void 0!==t?t:void 0!==r?r(e):null}this._update(l)}get is_value(){return void 0!==this.spec.value}get syncable(){return!this.internal}get_value(){return this.spec.value}set_value(e){this._update(e),this._dirty=!0}_default_override(){}get dirty(){return this._dirty}_update(e){null!=e&&this.validate(e),this.spec={value:e}}toString(){return`Prop(${this.obj}.${this.attr}, spec: ${xn(this.spec)})`}normalize(e){return e}validate(e){if(!this.valid(e))throw new Error(`${this.obj.type}.${this.attr} given invalid value: ${xn(e)}`)}valid(e){return this.kind.valid(e)}value(e=!0){if(!this.is_value)throw new Error("attempted to retrieve property value for property without value specification");let t=this.normalize([this.spec.value])[0];return null!=this.spec.transform&&e&&(t=this.spec.transform.compute(t)),t}}An.__name__="Property";class kn extends An{}kn.__name__="PrimitiveProperty";class Tn extends An{}Tn.__name__="Any";class Sn extends An{valid(e){return oe(e)||e instanceof Float32Array||e instanceof Float64Array}}Sn.__name__="Array";class En extends An{valid(e){return ee(e)}}En.__name__="Boolean";class Cn extends An{valid(e){return re(e)&&ze(e)}}Cn.__name__="Color";class Mn extends An{}Mn.__name__="Instance";class On extends An{valid(e){return te(e)}}On.__name__="Number";class Ln extends On{valid(e){return te(e)&&(0|e)==e}}Ln.__name__="Int";class Dn extends On{}Dn.__name__="Angle";class In extends On{valid(e){return te(e)&&0<=e&&e<=1}}In.__name__="Percent";class Rn extends An{valid(e){return re(e)}}Rn.__name__="String";class Pn extends An{valid(e){return null===e||re(e)}}Pn.__name__="NullString";class Nn extends Rn{}Nn.__name__="FontSize";class zn extends Rn{_default_override(){return _n.dev?"Bokeh":void 0}}zn.__name__="Font";class Fn extends An{valid(e){return re(e)&&F(this.enum_values,e)}}function Bn(e){return class extends Fn{get enum_values(){return[...e]}}}Fn.__name__="EnumProperty";class jn extends Fn{get enum_values(){return[..._t]}normalize(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)switch(e[n]){case"clock":t[n]=0;break;case"anticlock":t[n]=1}return t}}jn.__name__="Direction";const Un=Bn(ft),Vn=Bn(pt),qn=Bn(gt),Hn=Bn(mt),$n=Bn(vt),Wn=Bn(yt),Gn=Bn(bt),Yn=Bn(xt),Xn=Bn(wt),Zn=Bn(At),Kn=Bn(kt),Jn=Bn(Tt),Qn=Bn(St),er=Bn(Et),tr=(Bn(Ct),Bn(Mt),Bn(Ot)),nr=Bn(Lt),rr=Bn(Dt),ir=Bn(It),or=Bn(Rt),ar=Bn(Pt),sr=Bn(Nt),lr=Bn(zt),cr=Bn(Ft),ur=Bn(Bt),hr=(Bn(jt),Bn(Ut)),dr=Bn(Vt),fr=Bn(qt),pr=Bn(Ht),gr=Bn($t),mr=Bn(Wt),vr=(Bn(Gt),Bn(Yt),Bn(Xt)),yr=Bn(Zt),br=Bn(Kt),_r=Bn(Jt),xr=Bn(Qt),wr=Bn(en),Ar=Bn(tn),kr=Bn(nn),Tr=(Bn(rn),Bn(on)),Sr=Bn(an),Er=Bn(sn);class Cr extends An{get_value(){return null===this.spec.value?null:this.spec}_update(e){wn(e)?this.spec=e:this.spec={value:e},null!=this.spec.value&&this.validate(this.spec.value)}}Cr.__name__="ScalarSpec";(class extends Cr{}).__name__="AnyScalar";(class extends Cr{}).__name__="ColorScalar";(class extends Cr{}).__name__="NumberScalar",class extends Cr{}.__name__="StringScalar";(class extends Cr{}).__name__="NullStringScalar";(class extends Cr{}).__name__="ArrayScalar";(class extends Cr{}).__name__="LineJoinScalar";(class extends Cr{}).__name__="LineCapScalar";(class extends Cr{}).__name__="FontSizeScalar";(class extends Cr{}).__name__="FontStyleScalar";(class extends Cr{}).__name__="TextAlignScalar";(class extends Cr{}).__name__="TextBaselineScalar";class Mr extends An{get_value(){return null===this.spec.value?null:this.spec}_update(e){wn(e)?this.spec=e:this.spec={value:e},null!=this.spec.value&&this.validate(this.spec.value)}array(e){var t;let n;const r=null!==(t=e.get_length())&&void 0!==t?t:1;if(null!=this.spec.field){const t=e.get_column(this.spec.field);if(null!=t)n=this.normalize(t);else{Re.warn(`attempted to retrieve property array for nonexistent field '${this.spec.field}'`);const e=new mn(r);e.fill(NaN),n=e}}else if(null!=this.spec.expr)n=this.normalize(this.spec.expr.v_compute(e));else{const e=this.value(!1);if(te(e)){const t=new mn(r);t.fill(e),n=t}else n=J(e,r)}return null!=this.spec.transform&&(n=this.spec.transform.v_compute(n)),n}}Mr.__name__="VectorSpec";class Or extends Mr{}Or.__name__="DataSpec";class Lr extends Mr{_update(e){super._update(e),null==this.spec.units&&(this.spec.units=this.default_units);const t=this.spec.units;if(!F(this.valid_units,t))throw new Error(`units must be one of ${this.valid_units.join(", ")}; got: ${t}`)}get units(){return this.spec.units}set units(e){this.spec.units=e}}Lr.__name__="UnitsSpec";class Dr extends Lr{array(e){return new mn(super.array(e))}}Dr.__name__="NumberUnitsSpec";class Ir extends Or{}Ir.__name__="BaseCoordinateSpec";class Rr extends Ir{}Rr.__name__="CoordinateSpec";class Pr extends Ir{}Pr.__name__="CoordinateSeqSpec";class Nr extends Ir{}Nr.__name__="CoordinateSeqSeqSeqSpec";class zr extends Rr{constructor(){super(...arguments),this.dimension="x"}}zr.__name__="XCoordinateSpec";class Fr extends Rr{constructor(){super(...arguments),this.dimension="y"}}Fr.__name__="YCoordinateSpec";class Br extends Pr{constructor(){super(...arguments),this.dimension="x"}}Br.__name__="XCoordinateSeqSpec";class jr extends Pr{constructor(){super(...arguments),this.dimension="y"}}jr.__name__="YCoordinateSeqSpec";class Ur extends Nr{constructor(){super(...arguments),this.dimension="x"}}Ur.__name__="XCoordinateSeqSeqSeqSpec";class Vr extends Nr{constructor(){super(...arguments),this.dimension="y"}}Vr.__name__="YCoordinateSeqSeqSeqSpec";class qr extends Dr{get default_units(){return"rad"}get valid_units(){return[...pt]}normalize(e){return"deg"==this.spec.units&&(e=b(e,(e=>e*Math.PI/180))),e=b(e,(e=>-e)),super.normalize(e)}}qr.__name__="AngleSpec";class Hr extends Dr{get default_units(){return"data"}get valid_units(){return[...Zt]}}Hr.__name__="DistanceSpec",class extends Or{array(e){return new Uint8Array(super.array(e))}}.__name__="BooleanSpec";class $r extends Or{array(e){return new mn(super.array(e))}}$r.__name__="NumberSpec";class Wr extends Or{array(e){const t=super.array(e),n=t.length,r=new vn(n);for(let e=0;e<n;e++){const n=t[e];if(te(n))r[e]=n;else{const t=Ve(n);r[e]=je(t)}}return r}}Wr.__name__="ColorSpec";class Gr extends Or{}Gr.__name__="FontSizeSpec";class Yr extends Or{}Yr.__name__="MarkerSpec";class Xr extends Or{}Xr.__name__="StringSpec";class Zr extends Or{}Zr.__name__="NullStringSpec";class Kr extends Or{}Kr.__name__="NDArraySpec";const Jr={line_color:[Cn,"black"],line_alpha:[On,1],line_width:[On,1],line_join:[nr,"bevel"],line_cap:[tr,"butt"],line_dash:[Sn,[]],line_dash_offset:[On,0]},Qr={fill_color:[Cn,"gray"],fill_alpha:[On,1]},ei={hatch_color:[Cn,"black"],hatch_alpha:[On,1],hatch_scale:[On,12],hatch_pattern:[Pn,null],hatch_weight:[On,1],hatch_extra:[Tn,{}]},ti={text_color:[Cn,"#444444"],text_alpha:[On,1],text_font:[zn,"helvetica"],text_font_size:[Nn,"16px"],text_font_style:[Xn,"normal"],text_align:[wr,"left"],text_baseline:[Ar,"bottom"],text_line_height:[On,1.2]},ni={line_color:[Wr,"black"],line_alpha:[$r,1],line_width:[$r,1],line_join:[nr,"bevel"],line_cap:[tr,"butt"],line_dash:[Sn,[]],line_dash_offset:[On,0]},ri={fill_color:[Wr,"gray"],fill_alpha:[$r,1]},ii={hatch_color:[Wr,"black"],hatch_alpha:[$r,1],hatch_scale:[$r,12],hatch_pattern:[Zr,null],hatch_weight:[$r,1],hatch_extra:[Tn,{}]},oi={text_color:[Wr,"#444444"],text_alpha:[$r,1],text_font:[zn,"helvetica"],text_font_size:[Gr,"16px"],text_font_style:[Xn,"normal"],text_align:[wr,"left"],text_baseline:[Ar,"bottom"],text_line_height:[On,1.2]};function ai(e,t,n=0){return e.substr(n,t.length)==t}function si(){const e=new Array(32),t="0123456789ABCDEF";for(let n=0;n<32;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[12]="4",e[16]=t.substr(3&e[16].charCodeAt(0)|8,1),e.join("")}let li=1e3;function ci(e){const t=_n.dev?"j"+li++:si();return null!=e?`${e}-${t}`:t}function ui(e){return e.replace(/(?:[&<>"'`])/g,(e=>{switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#x27;";case"`":return"&#x60;";default:return e}}))}function hi(e){return`'use strict';\n${e}`}const di=Symbol("__ndarray__");class fi extends Uint8Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="uint8",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}fi.__name__="Uint8NDArray";class pi extends Int8Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="int8",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}pi.__name__="Int8NDArray";class gi extends Uint16Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="uint16",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}gi.__name__="Uint16NDArray";class mi extends Int16Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="int16",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}mi.__name__="Int16NDArray";class vi extends Uint32Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="uint32",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}vi.__name__="Uint32NDArray";class yi extends Int32Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="int32",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}yi.__name__="Int32NDArray";class bi extends Float32Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="float32",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}bi.__name__="Float32NDArray";class _i extends Float64Array{constructor(e,t){super(e),this.__ndarray__=di,this.dtype="float64",this.shape=null!=t?t:xi(e)?e.shape:[this.length],this.dimension=this.shape.length}[ln](e,t){return t.eq(this.shape,e.shape)&&t.arrays(this,e)}}function xi(e){return le(e)&&e.__ndarray__==di}_i.__name__="Float64NDArray";const wi=(()=>{const e="undefined"!=typeof navigator?navigator.userAgent:"";return e.indexOf("MSIE")>=0||e.indexOf("Trident")>0||e.indexOf("Edge")>0})(),Ai="undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0),ki=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);new Uint32Array(e)[1]=168496141;let n=!0;return 10==t[4]&&11==t[5]&&12==t[6]&&13==t[7]&&(n=!1),n})(),Ti=ki?"little":"big";const Si=Symbol("pretty");class Ei extends class{connect(e,t){return e.connect(t,this)}disconnect(e,t){return e.disconnect(t,this)}}{constructor(e={}){var t;super(),this._subtype=void 0,this.document=null,this.destroyed=new we(this,"destroyed"),this.change=new we(this,"change"),this.transformchange=new we(this,"transformchange"),this.properties={},this._pending=!1,this._changing=!1;const n=e instanceof Map?e.get:t=>e[t];for(const[e,{type:t,default_value:r,options:i}]of de(this._props)){let o;o=t instanceof qe?new kn(this,e,t,r,n(e),i):new t(this,e,$e,r,n(e),i),this.properties[e]=o}null!==(t=n("__deferred__"))&&void 0!==t&&t||(this.finalize(),this.connect_signals())}set type(e){console.warn("prototype.type = 'ModelName' is deprecated, use static __name__ instead"),this.constructor.__name__=e}get type(){return this.constructor.__qualified__}static get __qualified__(){const{__module__:e,__name__:t}=this;return null!=e?`${e}.${t}`:t}static get[Symbol.toStringTag](){return this.__name__}static init_HasProps(){this.prototype._props={},this.prototype._mixins=[],this.define({id:[Rn,()=>ci()]})}static _fix_default(e,t){if(void 0!==e){if(ie(e))return e;if(oe(e))return()=>N(e);if(ce(e))return()=>pe(e);if(le(e))throw new Error(`${e} must be explicitly wrapped in a function`);return()=>e}}static define(e){for(const[t,n]of de(ie(e)?e(r):e)){if(null!=this.prototype._props[t])throw new Error(`attempted to redefine property '${this.prototype.type}.${t}'`);if(null!=this.prototype[t])throw new Error(`attempted to redefine attribute '${this.prototype.type}.${t}'`);Object.defineProperty(this.prototype,t,{get(){return this.properties[t].get_value()},set(e){return this.setv({[t]:e}),this},configurable:!1,enumerable:!0});const[e,r,i]=n,o={type:e,default_value:this._fix_default(r,t),options:i},a=pe(this.prototype._props);a[t]=o,this.prototype._props=a}}static internal(e){const t={};for(const[n,r]of de(e)){const[e,i,o={}]=r;t[n]=[e,i,Object.assign(Object.assign({},o),{internal:!0})]}this.define(t)}static mixins(e){function t(e){switch(e){case"line":return ni;case"fill":return ri;case"hatch":return ii;case"text":return oi;default:throw new Error(`Unknown property mixin kind '${e}'`)}}function n(e,t){const n={};for(const[r,i]of de(t))n[e+r]=i;return n}function r(e){const[t]=Object.keys(e),[n]=t.split("_",1);return n}oe(e)||(e=[e]);const i={},o=[];for(const a of e)if(re(a)){const[e,r=""]=a.split(":"),s=t(e);o.push(a),fe(i,n(r,s))}else if(oe(a)){const[e,t]=a;o.push(`${r(t)}:${e}`),fe(i,n(e,t))}else{const e=a;o.push(r(e)),fe(i,e)}this.define(i),this.prototype._mixins=[...this.prototype._mixins,...o]}static override(e){for(const[t,n]of de(e)){const e=this._fix_default(n,t),r=this.prototype._props[t];if(null==r)throw new Error(`attempted to override nonexistent '${this.prototype.type}.${t}'`);const i=pe(this.prototype._props);i[t]=Object.assign(Object.assign({},r),{default_value:e}),this.prototype._props=i}}toString(){return`${this.type}(${this.id})`}property(e){const t=this.properties[e];if(null!=t)return t;throw new Error(`unknown property ${this.type}.${e}`)}get attributes(){const e={};for(const t of this)e[t.attr]=t.get_value();return e}[ln](e,t){for(const n of this){const r=e.property(n.attr);if(t.eq(n.get_value(),r.get_value()))return!1}return!0}[Si](e){const t=e.token,n=[];for(const r of this)if(r.dirty){const i=r.get_value();n.push(`${r.attr}${t(":")} ${e.to_string(i)}`)}return`${this.constructor.__qualified__}${t("(")}${t("{")}${n.join(`${t(",")} `)}${t("}")}${t(")")}`}finalize(){for(const e of this)null!=e.spec.transform&&this.connect(e.spec.transform.change,(()=>this.transformchange.emit()));this.initialize()}initialize(){}connect_signals(){}disconnect_signals(){xe.disconnectReceiver(this)}destroy(){this.disconnect_signals(),this.destroyed.emit()}clone(){return new this.constructor(this.attributes)}_setv(e,t){const n=t.check_eq,r=[],i=this._changing;this._changing=!0;for(const[t,i]of e)!1!==n&&fn(t.get_value(),i)||(t.set_value(i),r.push(t));r.length>0&&(this._pending=!0);for(const e of r)e.change.emit();if(!i){if(!t.no_change)for(;this._pending;)this._pending=!1,this.change.emit();this._pending=!1,this._changing=!1}}setv(e,t={}){const n=de(e);if(0==n.length)return;if(!0===t.silent){for(const[e,t]of n)this.properties[e].set_value(t);return}const r=new Map,i=new Map;for(const[e,t]of n){const n=this.properties[e];r.set(n,t),i.set(n,n.get_value())}this._setv(r,t);const{document:o}=this;if(null!=o){const e=[];for(const[t,n]of i)e.push([t,n,t.get_value()]);for(const[,t,n]of e)if(this._needs_invalidate(t,n)){o._invalidate_all_models();break}this._push_changes(e,t)}}getv(e){return this.property(e).get_value()}ref(){return{id:this.id}}struct(){const e={type:this.type,id:this.id,attributes:{}};return null!=this._subtype&&(e.subtype=this._subtype),e}set_subtype(e){this._subtype=e}*[Symbol.iterator](){yield*he(this.properties)}*syncable_properties(){for(const e of this)e.syncable&&(yield e)}serializable_attributes(){const e={};for(const t of this.syncable_properties())e[t.attr]=t.get_value();return e}static _value_to_json(e){if(e instanceof Ei)return e.ref();if(xi(e))return function(e,t){const n={order:Ti,dtype:e.dtype,shape:e.shape};if(null!=t){const r=`${t.size}`;return t.set(r,e.buffer),Object.assign({__buffer__:r},n)}{const t=function(e){const t=new Uint8Array(e),n=Array.from(t).map((e=>String.fromCharCode(e)));return btoa(n.join(""))}(e.buffer);return Object.assign({__ndarray__:t},n)}}(e);if(oe(e)||se(e)){const t=e.length,n=new Array(t);for(let r=0;r<t;r++){const t=e[r];n[r]=Ei._value_to_json(t)}return n}if(ce(e)){const t={};for(const[n,r]of de(e))t[n]=Ei._value_to_json(r);return t}return e}attributes_as_json(e=!0,t=Ei._value_to_json){const n={};for(const r of this)r.syncable&&(e||r.dirty)&&(n[r.attr]=t(r.get_value()));return n}static _json_record_references(e,t,n,r){const{recursive:i}=r;if(Me(t)){const r=e.get_model_by_id(t.id);null==r||n.has(r)||Ei._value_record_references(r,n,{recursive:i})}else if(oe(t))for(const r of t)Ei._json_record_references(e,r,n,{recursive:i});else if(ce(t))for(const r of he(t))Ei._json_record_references(e,r,n,{recursive:i})}static _value_record_references(e,t,n){const{recursive:r}=n;if(e instanceof Ei){if(!t.has(e)&&(t.add(e),r)){const n=e._immediate_references();for(const e of n)Ei._value_record_references(e,t,{recursive:!0})}}else if(oe(e))for(const n of e)Ei._value_record_references(n,t,{recursive:r});else if(ce(e))for(const n of he(e))Ei._value_record_references(n,t,{recursive:r})}_immediate_references(){const e=new Set;for(const t of this.syncable_properties()){const n=t.get_value();Ei._value_record_references(n,e,{recursive:!1})}return e}references(){const e=new Set;return Ei._value_record_references(this,e,{recursive:!0}),e}_doc_attached(){}_doc_detached(){}attach_document(e){if(null!=this.document&&this.document!=e)throw new Error("models must be owned by only a single document");this.document=e,this._doc_attached()}detach_document(){this._doc_detached(),this.document=null}_needs_invalidate(e,t){const n=new Set;Ei._value_record_references(t,n,{recursive:!1});const r=new Set;Ei._value_record_references(e,r,{recursive:!1});for(const e of n)if(!r.has(e))return!0;for(const e of r)if(!n.has(e))return!0;return!1}_push_changes(e,t={}){const{document:n}=this;if(null==n)return;const{setter_id:r}=t,i=[];for(const[t,o,a]of e)t.syncable&&i.push(new Fl(n,this,t.attr,o,a,r));if(0!=i.length){let e;1==i.length?[e]=i:e=new Pl(n,i,r),n._trigger_on_change(e)}}materialize_dataspecs(e){const t={};for(const n of this){if(!(n instanceof Mr))continue;if(n.optional&&null==n.spec.value&&!n.dirty)continue;const r=n.attr,i=n.array(e);t[`_${r}`]=i,n instanceof Hr&&(t[`max_${r}`]=x(i))}return t}on_change(e,t){for(const n of oe(e)?e:[e])this.connect(n.change,t)}}Ei.init_HasProps();var Ci=6378137,Mi=.0066943799901413165,Oi=484813681109536e-20,Li=Math.PI/2,Di=.017453292519943295,Ii=57.29577951308232,Ri=Math.PI/4,Pi=2*Math.PI,Ni={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const zi={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var Fi=/[\s_\-\/\(\)]/g;function Bi(e,t){if(e[t])return e[t];for(var n,r=Object.keys(e),i=t.toLowerCase().replace(Fi,""),o=-1;++o<r.length;)if((n=r[o]).toLowerCase().replace(Fi,"")===i)return e[n]}function ji(e){var t,n,r,i={},o=e.split("+").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n=t.split("=");return n.push(!0),e[n[0].toLowerCase()]=n[1],e}),{}),a={proj:"projName",datum:"datumCode",rf:function(e){i.rf=parseFloat(e)},lat_0:function(e){i.lat0=e*Di},lat_1:function(e){i.lat1=e*Di},lat_2:function(e){i.lat2=e*Di},lat_ts:function(e){i.lat_ts=e*Di},lon_0:function(e){i.long0=e*Di},lon_1:function(e){i.long1=e*Di},lon_2:function(e){i.long2=e*Di},alpha:function(e){i.alpha=parseFloat(e)*Di},gamma:function(e){i.rectified_grid_angle=parseFloat(e)},lonc:function(e){i.longc=e*Di},x_0:function(e){i.x0=parseFloat(e)},y_0:function(e){i.y0=parseFloat(e)},k_0:function(e){i.k0=parseFloat(e)},k:function(e){i.k0=parseFloat(e)},a:function(e){i.a=parseFloat(e)},b:function(e){i.b=parseFloat(e)},r_a:function(){i.R_A=!0},zone:function(e){i.zone=parseInt(e,10)},south:function(){i.utmSouth=!0},towgs84:function(e){i.datum_params=e.split(",").map((function(e){return parseFloat(e)}))},to_meter:function(e){i.to_meter=parseFloat(e)},units:function(e){i.units=e;var t=Bi(zi,e);t&&(i.to_meter=t.to_meter)},from_greenwich:function(e){i.from_greenwich=e*Di},pm:function(e){var t=Bi(Ni,e);i.from_greenwich=(t||parseFloat(e))*Di},nadgrids:function(e){"@null"===e?i.datumCode="none":i.nadgrids=e},axis:function(e){var t="ewnsud";3===e.length&&-1!==t.indexOf(e.substr(0,1))&&-1!==t.indexOf(e.substr(1,1))&&-1!==t.indexOf(e.substr(2,1))&&(i.axis=e)},approx:function(){i.approx=!0}};for(t in o)n=o[t],t in a?"function"==typeof(r=a[t])?r(n):i[r]=n:i[t]=n;return"string"==typeof i.datumCode&&"WGS84"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i}var Ui=/\s/,Vi=/[A-Za-z]/,qi=/[A-Za-z84_]/,Hi=/[,\]]/,$i=/[\d\.E\-\+]/;function Wi(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function Gi(e,t,n){Array.isArray(t)&&(n.unshift(t),t=null);var r=t?{}:e,i=n.reduce((function(e,t){return Yi(t,e),e}),r);t&&(e[t]=i)}function Yi(e,t){if(Array.isArray(e)){var n=e.shift();if("PARAMETER"===n&&(n=e.shift()),1===e.length)return Array.isArray(e[0])?(t[n]={},void Yi(e[0],t[n])):void(t[n]=e[0]);if(e.length)if("TOWGS84"!==n){if("AXIS"===n)return n in t||(t[n]=[]),void t[n].push(e);var r;switch(Array.isArray(n)||(t[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[n]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&Yi(e[2],t[n]));case"SPHEROID":case"ELLIPSOID":return t[n]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&Yi(e[3],t[n]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void Gi(t,n,e);default:for(r=-1;++r<e.length;)if(!Array.isArray(e[r]))return Yi(e,t[n]);return Gi(t,n,e)}}else t[n]=e;else t[n]=!0}else t[e]=!0}function Xi(e){return.017453292519943295*e}function Zi(e){var t=new Wi(e).output(),n=t.shift(),r=t.shift();t.unshift(["name",r]),t.unshift(["type",n]);var i={};return Yi(t,i),function(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",n=0,r=e.AXIS.length;n<r;++n){var i=[e.AXIS[n][0].toLowerCase(),e.AXIS[n][1].toLowerCase()];-1!==i[0].indexOf("north")||("y"===i[0]||"lat"===i[0])&&"north"===i[1]?t+="n":-1!==i[0].indexOf("south")||("y"===i[0]||"lat"===i[0])&&"south"===i[1]?t+="s":-1!==i[0].indexOf("east")||("x"===i[0]||"lon"===i[0])&&"east"===i[1]?t+="e":-1===i[0].indexOf("west")&&("x"!==i[0]&&"lon"!==i[0]||"west"!==i[1])||(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var o=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(o=e),o&&(o.DATUM?e.datumCode=o.DATUM.name.toLowerCase():e.datumCode=o.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==e.datumCode&&"new_zealand_1949"!==e.datumCode||(e.datumCode="nzgd49"),"wgs_1984"!==e.datumCode&&"world_geodetic_system_1984"!==e.datumCode||("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(e.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=o.DATUM.SPHEROID.a,e.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(e.datum_params=o.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Xi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Xi],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",Xi],["lat0","latitude_of_origin",Xi],["lat0","standard_parallel_1",Xi],["lat1","standard_parallel_1",Xi],["lat2","standard_parallel_2",Xi],["azimuth","Azimuth"],["alpha","azimuth",Xi],["srsCode","name"]].forEach((function(t){return n=e,i=(r=t)[0],o=r[1],void(!(i in n)&&o in n&&(n[i]=n[o],3===r.length&&(n[i]=r[2](n[i]))));var n,r,i,o})),e.long0||!e.longc||"Albers_Conic_Equal_Area"!==e.projName&&"Lambert_Azimuthal_Equal_Area"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||"Stereographic_South_Pole"!==e.projName&&"Polar Stereographic (variant B)"!==e.projName||(e.lat0=Xi(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(i),i}function Ki(e){var t=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?Ki[e]=ji(arguments[1]):Ki[e]=Zi(arguments[1]):Ki[e]=n}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?Ki.apply(t,e):Ki(e)}));if("string"==typeof e){if(e in Ki)return Ki[e]}else"EPSG"in e?Ki["EPSG:"+e.EPSG]=e:"ESRI"in e?Ki["ESRI:"+e.ESRI]=e:"IAU2000"in e?Ki["IAU2000:"+e.IAU2000]=e:console.log(e);return}}Wi.prototype.readCharicter=function(){var e=this.text[this.place++];if(4!==this.state)for(;Ui.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case 1:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},Wi.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(Hi.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Wi.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},Wi.prototype.number=function(e){if(!$i.test(e)){if(Hi.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Wi.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},Wi.prototype.keyword=function(e){if(qi.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=1)}if(!Hi.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Wi.prototype.neutral=function(e){if(Vi.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if($i.test(e))return this.word=e,void(this.state=3);if(!Hi.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Wi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)},function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(Ki);const Ji=Ki;var Qi=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],eo=["3857","900913","3785","102113"];function to(e,t){var n,r;if(e=e||{},!t)return e;for(r in t)void 0!==(n=t[r])&&(e[r]=n);return e}function no(e){return Math.abs(e)<=3.14159265359?e:e-function(e){return e<0?-1:1}(e)*Pi}const ro={init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=function(e,t,n){var r=e*t;return n/Math.sqrt(1-r*r)}(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,n,r=e.x,i=e.y;if(i*Ii>90&&i*Ii<-90&&r*Ii>180&&r*Ii<-180)return null;if(Math.abs(Math.abs(i)-Li)<=1e-10)return null;if(this.sphere)t=this.x0+this.a*this.k0*no(r-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(Ri+.5*i));else{var o=Math.sin(i),a=function(e,t,n){var r=e*n,i=.5*e;return r=Math.pow((1-r)/(1+r),i),Math.tan(.5*(Li-t))/r}(this.e,i,o);t=this.x0+this.a*this.k0*no(r-this.long0),n=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=n,e},inverse:function(e){var t,n,r=e.x-this.x0,i=e.y-this.y0;if(this.sphere)n=Li-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var o=Math.exp(-i/(this.a*this.k0));if(n=function(e,t){for(var n,r,i=.5*e,o=Li-2*Math.atan(t),a=0;a<=15;a++)if(n=e*Math.sin(o),o+=r=Li-2*Math.atan(t*Math.pow((1-n)/(1+n),i))-o,Math.abs(r)<=1e-10)return o;return-9999}(this.e,o),-9999===n)return null}return t=no(this.long0+r/(this.a*this.k0)),e.x=t,e.y=n,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function io(e){return e}var oo=[ro,{init:function(){},forward:io,inverse:io,names:["longlat","identity"]}],ao={},so=[];function lo(e,t){var n=so.length;return e.names?(so[n]=e,e.names.forEach((function(e){ao[e.toLowerCase()]=n})),this):(console.log(t),!0)}const co={start:function(){oo.forEach(lo)},add:lo,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==ao[t]&&so[ao[t]]?so[ao[t]]:void 0}};var uo={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},ho=uo.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};uo.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var fo={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var po={};function go(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:po[e]||null,isNull:!1}}function mo(e,t){if(!(this instanceof mo))return new mo(e);t=t||function(e){if(e)throw e};var n=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in Ji}(e))return Ji[e];if(function(e){return Qi.some((function(t){return e.indexOf(t)>-1}))}(e)){var t=Zi(e);if(function(e){var t=Bi(e,"authority");if(t){var n=Bi(t,"epsg");return n&&eo.indexOf(n)>-1}}(t))return Ji["EPSG:3857"];var n=function(e){var t=Bi(e,"extension");if(t)return Bi(t,"proj4")}(t);return n?ji(n):t}return function(e){return"+"===e[0]}(e)?ji(e):void 0}(e);if("object"==typeof n){var r=mo.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var i=Bi(fo,n.datumCode);i&&(n.datum_params=n.datum_params||(i.towgs84?i.towgs84.split(","):null),n.ellps=i.ellipse,n.datumName=i.datumName?i.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var o=function(e,t,n,r,i){if(!e){var o=Bi(uo,r);o||(o=ho),e=o.a,t=o.b,n=o.rf}return n&&!t&&(t=(1-1/n)*e),(0===n||Math.abs(e-t)<1e-10)&&(i=!0,t=e),{a:e,b:t,rf:n,sphere:i}}(n.a,n.b,n.rf,n.ellps,n.sphere),a=function(e,t,n,r){var i=e*e,o=t*t,a=(i-o)/i,s=0;return r?(i=(e*=1-a*(.16666666666666666+a*(.04722222222222222+.022156084656084655*a)))*e,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(i-o)/o}}(o.a,o.b,o.rf,n.R_A),s=function(e){return void 0===e?null:e.split(",").map(go)}(n.nadgrids),l=n.datum||function(e,t,n,r,i,o,a){var s={};return s.datum_type=void 0===e||"none"===e?5:4,t&&(s.datum_params=t.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=1),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=2,s.datum_params[3]*=Oi,s.datum_params[4]*=Oi,s.datum_params[5]*=Oi,s.datum_params[6]=s.datum_params[6]/1e6+1))),a&&(s.datum_type=3,s.grids=a),s.a=n,s.b=r,s.es=i,s.ep2=o,s}(n.datumCode,n.datum_params,o.a,o.b,a.es,a.ep2,s);to(this,n),to(this,r),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}else t(e)}else t(e)}mo.projections=co,mo.projections.start();const vo=mo;function yo(e){return 1===e||2===e}function bo(e,t,n){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var r={x:-n.x,y:n.y},i={x:Number.NaN,y:Number.NaN},o=[],a=0;a<e.grids.length;a++){var s=e.grids[a];if(o.push(s.name),s.isNull){i=r;break}if(s.mandatory,null!==s.grid){var l=s.grid.subgrids[0],c=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-c,h=l.ll[1]-c,d=l.ll[0]+(l.lim[0]-1)*l.del[0]+c,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+c;if(!(h>r.y||u>r.x||f<r.y||d<r.x||(i=_o(r,t,l),isNaN(i.x))))break}else if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-r.x*Ii+" "+r.y*Ii+" tried: '"+o+"'"),-1):(n.x=-i.x,n.y=i.y,0)}function _o(e,t,n){var r={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return r;var i={x:e.x,y:e.y};i.x-=n.ll[0],i.y-=n.ll[1],i.x=no(i.x-Math.PI)+Math.PI;var o=xo(i,n);if(t){if(isNaN(o.x))return r;o.x=i.x-o.x,o.y=i.y-o.y;var a,s,l=9;do{if(s=xo(o,n),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:i.x-(s.x+o.x),y:i.y-(s.y+o.y)},o.x+=a.x,o.y+=a.y}while(l--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),r;r.x=no(o.x+n.ll[0]),r.y=o.y+n.ll[1]}else isNaN(o.x)||(r.x=e.x+o.x,r.y=e.y+o.y);return r}function xo(e,t){var n,r={x:e.x/t.del[0],y:e.y/t.del[1]},i=Math.floor(r.x),o=Math.floor(r.y),a=r.x-1*i,s=r.y-1*o,l={x:Number.NaN,y:Number.NaN};if(i<0||i>=t.lim[0])return l;if(o<0||o>=t.lim[1])return l;n=o*t.lim[0]+i;var c=t.cvs[n][0],u=t.cvs[n][1];n++;var h=t.cvs[n][0],d=t.cvs[n][1];n+=t.lim[0];var f=t.cvs[n][0],p=t.cvs[n][1];n--;var g=t.cvs[n][0],m=t.cvs[n][1],v=a*s,y=a*(1-s),b=(1-a)*(1-s),_=(1-a)*s;return l.x=b*c+y*h+_*g+v*f,l.y=b*u+y*d+_*m+v*p,l}function wo(e,t,n){var r,i,o,a=n.x,s=n.y,l=n.z||0,c={};for(o=0;o<3;o++)if(!t||2!==o||void 0!==n.z)switch(0===o?(r=a,i=-1!=="ew".indexOf(e.axis[o])?"x":"y"):1===o?(r=s,i=-1!=="ns".indexOf(e.axis[o])?"y":"x"):(r=l,i="z"),e.axis[o]){case"e":case"n":c[i]=r;break;case"w":case"s":c[i]=-r;break;case"u":void 0!==n[i]&&(c.z=r);break;case"d":void 0!==n[i]&&(c.z=-r);break;default:return null}return c}function Ao(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function ko(e,t,n,r){var i,o,a;if(Array.isArray(n)&&(a={x:(o=n)[0],y:o[1]},o.length>2&&(a.z=o[2]),o.length>3&&(a.m=o[3]),n=a),function(e){Ao(e.x),Ao(e.y)}(n),e.datum&&t.datum&&function(e,t){return(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode||(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode}(e,t)&&(n=ko(e,i=new vo("WGS84"),n,r),e=i),r&&"enu"!==e.axis&&(n=wo(e,!1,n)),"longlat"===e.projName)n={x:n.x*Di,y:n.y*Di,z:n.z||0};else if(e.to_meter&&(n={x:n.x*e.to_meter,y:n.y*e.to_meter,z:n.z||0}),!(n=e.inverse(n)))return;if(e.from_greenwich&&(n.x+=e.from_greenwich),n=function(e,t,n){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(1===e.datum_type?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:2!==e.datum_type||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return n;if(5===e.datum_type||5===t.datum_type)return n;var r=e.a,i=e.es;if(3===e.datum_type){if(0!==bo(e,!1,n))return;r=Ci,i=Mi}var o=t.a,a=t.b,s=t.es;return 3===t.datum_type&&(o=Ci,a=6356752.314,s=Mi),i!==s||r!==o||yo(e.datum_type)||yo(t.datum_type)?(n=function(e,t,n){var r,i,o,a,s=e.x,l=e.y,c=e.z?e.z:0;if(l<-Li&&l>-1.001*Li)l=-Li;else if(l>Li&&l<1.001*Li)l=Li;else{if(l<-Li)return{x:-1/0,y:-1/0,z:e.z};if(l>Li)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),i=Math.sin(l),a=Math.cos(l),o=i*i,{x:((r=n/Math.sqrt(1-t*o))+c)*a*Math.cos(s),y:(r+c)*a*Math.sin(s),z:(r*(1-t)+c)*i}}(n,i,r),yo(e.datum_type)&&(n=function(e,t,n){if(1===t)return{x:e.x+n[0],y:e.y+n[1],z:e.z+n[2]};if(2===t){var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6];return{x:c*(e.x-l*e.y+s*e.z)+r,y:c*(l*e.x+e.y-a*e.z)+i,z:c*(-s*e.x+a*e.y+e.z)+o}}}(n,e.datum_type,e.datum_params)),yo(t.datum_type)&&(n=function(e,t,n){if(1===t)return{x:e.x-n[0],y:e.y-n[1],z:e.z-n[2]};if(2===t){var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=(e.x-r)/c,h=(e.y-i)/c,d=(e.z-o)/c;return{x:u+l*h-s*d,y:-l*u+h+a*d,z:s*u-a*h+d}}}(n,t.datum_type,t.datum_params)),n=function(e,t,n,r){var i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b=e.x,_=e.y,x=e.z?e.z:0;if(i=Math.sqrt(b*b+_*_),o=Math.sqrt(b*b+_*_+x*x),i/n<1e-12){if(v=0,o/n<1e-12)return y=-r,{x:e.x,y:e.y,z:e.z}}else v=Math.atan2(_,b);a=x/o,h=(s=i/o)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),d=a*l,m=0;do{m++,c=t*(u=n/Math.sqrt(1-t*d*d))/(u+(y=i*h+x*d-u*(1-t*d*d))),g=(p=a*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*h-(f=s*(1-c)*l)*d,h=f,d=p}while(g*g>1e-24&&m<30);return{x:v,y:Math.atan(p/Math.abs(f)),z:y}}(n,s,o,a),3!==t.datum_type||0===bo(t,!0,n)?n:void 0):n}(e.datum,t.datum,n))return t.from_greenwich&&(n={x:n.x-t.from_greenwich,y:n.y,z:n.z||0}),"longlat"===t.projName?n={x:n.x*Ii,y:n.y*Ii,z:n.z||0}:(n=t.forward(n),t.to_meter&&(n={x:n.x/t.to_meter,y:n.y/t.to_meter,z:n.z||0})),r&&"enu"!==t.axis?wo(t,!0,n):n}var To=vo("WGS84");function So(e,t,n,r){var i,o,a;return Array.isArray(n)?(i=ko(e,t,n,r)||{x:NaN,y:NaN},n.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(n.splice(3)):[i.x,i.y,n[2]].concat(n.splice(3)):[i.x,i.y].concat(n.splice(2)):[i.x,i.y]):(o=ko(e,t,n,r),2===(a=Object.keys(n)).length||a.forEach((function(r){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;o[r]=n[r]})),o)}function Eo(e){return e instanceof vo?e:e.oProj?e.oProj:vo(e)}const Co=new vo("GOOGLE"),Mo=function(e,t,n){e=Eo(e);var r,i=!1;return void 0===t?(t=e,e=To,i=!0):(void 0!==t.x||Array.isArray(t))&&(n=t,t=e,e=To,i=!0),t=Eo(t),n?So(e,t,n):(r={forward:function(n,r){return So(e,t,n,r)},inverse:function(n,r){return So(t,e,n,r)}},i&&(r.oProj=t),r)}(new vo("WGS84"),Co),Oo=(e,t)=>isFinite(e)&&isFinite(t)?Mo.forward([e,t]):[NaN,NaN],Lo=(e,t)=>isFinite(e)&&isFinite(t)?Mo.inverse([e,t]):[NaN,NaN],Do={lon:[-20026376.39,20026376.39],lat:[-20048966.1,20048966.1]},Io={lon:[-180,180],lat:[-85.06,85.06]},{min:Ro,max:Po}=Math;function No(e,t){const[n,r]=Io[t];return n<e&&e<r}var zo;function Fo(e,t){const n=Ro(e.length,t.length),r=new mn(n),i=new mn(n);return zo.project_xy(e,t,r,i),[r,i]}!function(e){function t(e,t,n,r){const i=Ro(e.length,t.length);n=null!=n?n:e,r=null!=r?r:t;for(let o=0;o<i;o++){const i=e[o],a=t[o],[s,l]=Oo(i,a);n[o]=s,r[o]=l}}e.project_xy=t,e.project_xsys=function(e,n,r,i){const o=Ro(e.length,n.length);r=null!=r?r:e,i=null!=i?i:n;for(let a=0;a<o;a++)t(e[a],n[a],r[a],i[a])}}(zo||(zo={}));const Bo=e=>(t={},...n)=>{const r=document.createElement(e);r.classList.add("bk");for(let[e,n]of de(t))if(null!=n&&(!ee(n)||n))if("class"===e&&(re(n)&&(n=n.split(/\s+/)),oe(n)))for(const e of n)null!=e&&r.classList.add(e);else if("style"===e&&ce(n))for(const[e,t]of de(n))r.style[e]=t;else if("data"===e&&ce(n))for(const[e,t]of de(n))r.dataset[e]=t;else r.setAttribute(e,n);function i(e){if(re(e))r.appendChild(document.createTextNode(e));else if(e instanceof Node)r.appendChild(e);else if(e instanceof NodeList||e instanceof HTMLCollection)for(const t of e)r.appendChild(t);else if(null!=e&&!1!==e)throw new Error(`expected a DOM element, string, false or null, got ${JSON.stringify(e)}`)}for(const e of n)if(oe(e))for(const t of e)i(t);else i(e);return r},jo=Bo("div"),Uo=Bo("span"),Vo=Bo("canvas"),qo=(Bo("link"),Bo("style")),Ho=Bo("a"),$o=Bo("p"),Wo=Bo("i"),Go=Bo("pre"),Yo=Bo("button"),Xo=Bo("label"),Zo=Bo("input"),Ko=Bo("select"),Jo=Bo("option"),Qo=Bo("optgroup"),ea=Bo("textarea");function ta(e,...t){for(const n of t)e.appendChild(n)}function na(e){const t=e.parentNode;null!=t&&t.removeChild(e)}const ra=na;function ia(e,...t){const n=e.firstChild;for(const r of t)e.insertBefore(r,n)}function oa(e,t=!1){let n;for(;n=e.firstChild;)e.removeChild(n);if(t&&e instanceof Element)for(const t of e.attributes)e.removeAttributeNode(t)}function aa(e){e.style.display=""}function sa(e){e.style.display="none"}function la(e){e.style.visibility=""}function ca(e){e.style.visibility="hidden"}function ua(e){const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}function ha(e){return parseFloat(e)||0}function da(e){const t=getComputedStyle(e);return{border:{top:ha(t.borderTopWidth),bottom:ha(t.borderBottomWidth),left:ha(t.borderLeftWidth),right:ha(t.borderRightWidth)},margin:{top:ha(t.marginTop),bottom:ha(t.marginBottom),left:ha(t.marginLeft),right:ha(t.marginRight)},padding:{top:ha(t.paddingTop),bottom:ha(t.paddingBottom),left:ha(t.paddingLeft),right:ha(t.paddingRight)}}}function fa(e){const t=e.getBoundingClientRect();return{width:Math.ceil(t.width),height:Math.ceil(t.height)}}function pa(e,t,n){const{style:r}=e;if(r.left=`${t.x}px`,r.top=`${t.y}px`,r.width=`${t.width}px`,r.height=`${t.height}px`,null==n)r.margin="";else{const{top:e,right:t,bottom:i,left:o}=n;r.margin=`${e}px ${t}px ${i}px ${o}px`}}function ga(e){return Array.from(e.children)}class ma{constructor(e){this.el=e,this.classList=e.classList}get values(){const e=[];for(let t=0;t<this.classList.length;t++){const n=this.classList.item(t);null!=n&&e.push(n)}return e}has(e){return this.classList.contains(e)}add(...e){for(const t of e)this.classList.add(t);return this}remove(...e){for(const t of e)this.classList.remove(t);return this}clear(){for(const e of this.values)"bk"!=e&&this.classList.remove(e);return this}toggle(e,t){return(null!=t?t:!this.has(e))?this.add(e):this.remove(e),this}}function va(e){return new ma(e)}function ya(e,t,n){null==n&&(n=!e.hasAttribute(t)),n?e.setAttribute(t,"true"):e.removeAttribute(t)}var ba;function _a(e,t,n){const{width:r,height:i,position:o,display:a}=e.style;e.style.position="absolute",e.style.display="",e.style.width=null!=t.width&&t.width!=1/0?`${t.width}px`:"auto",e.style.height=null!=t.height&&t.height!=1/0?`${t.height}px`:"auto";try{return n()}finally{e.style.position=o,e.style.display=a,e.style.width=r,e.style.height=i}}ma.__name__="ClassList",function(e){e[e.Backspace=8]="Backspace",e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Esc=27]="Esc",e[e.PageUp=33]="PageUp",e[e.PageDown=34]="PageDown",e[e.Left=37]="Left",e[e.Up=38]="Up",e[e.Right=39]="Right",e[e.Down=40]="Down",e[e.Delete=46]="Delete"}(ba||(ba={}));class xa{constructor(e){this.root=e,this.known=new Set,this.style=qo({type:"text/css"}),ia(e,this.style)}append(e){this.known.has(e)||(this.style.appendChild(document.createTextNode(e)),this.known.add(e))}}xa.__name__="StyleSheet";const wa=new xa(document.head),Aa="\n.bk-root {\n position: relative;\n width: auto;\n height: auto;\n z-index: 0;\n box-sizing: border-box;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n}\n.bk-root .bk,\n.bk-root .bk:before,\n.bk-root .bk:after {\n box-sizing: inherit;\n margin: 0;\n border: 0;\n padding: 0;\n background-image: none;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.42857143;\n}\n.bk-root pre.bk {\n font-family: Courier, monospace;\n}\n";class ka{constructor(e){if(this.removed=new we(this,"removed"),this._ready=Promise.resolve(void 0),null==e.model)throw new Error("model of a view wasn't configured");this.model=e.model,this._parent=e.parent}get ready(){return this._ready}connect(e,t){return e.connect(((e,n)=>{const r=Promise.resolve(t.call(this,e,n));this._ready=this._ready.then((()=>r))}),this)}disconnect(e,t){return e.disconnect(t,this)}initialize(){this._has_finished=!1,this.is_root&&(this._stylesheet=wa);for(const e of this.styles())this.stylesheet.append(e)}async lazy_initialize(){}remove(){this._parent=void 0,this.disconnect_signals(),this.removed.emit()}toString(){return`${this.model.type}View(${this.model.id})`}serializable_state(){return{type:this.model.type}}get parent(){if(void 0!==this._parent)return this._parent;throw new Error("parent of a view wasn't configured")}get is_root(){return null===this.parent}get root(){return this.is_root?this:this.parent.root}assert_root(){if(!this.is_root)throw new Error(`${this.toString()} is not a root layout`)}has_finished(){return this._has_finished}get is_idle(){return this.has_finished()}connect_signals(){}disconnect_signals(){xe.disconnectReceiver(this)}on_change(e,t){for(const n of oe(e)?e:[e])this.connect(n.change,t)}cursor(e,t){return null}get stylesheet(){return this.is_root?this._stylesheet:this.root.stylesheet}styles(){return[Aa]}}ka.__name__="View";const{sin:Ta,cos:Sa}=Math;class Ea{constructor(e=1,t=0,n=0,r=1,i=0,o=0){this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=o}toString(){const{a:e,b:t,c:n,d:r,e:i,f:o}=this;return`matrix(${e}, ${t}, ${n}, ${r}, ${i}, ${o})`}clone(){const{a:e,b:t,c:n,d:r,e:i,f:o}=this;return new Ea(e,t,n,r,i,o)}get is_identity(){const{a:e,b:t,c:n,d:r,e:i,f:o}=this;return 1==e&&0==t&&0==n&&1==r&&0==i&&0==o}apply(e,t){const{a:n,b:r,c:i,d:o,e:a,f:s}=this;return[n*e+i*t+a,r*e+o*t+s]}iv_apply(e,t){const{a:n,b:r,c:i,d:o,e:a,f:s}=this,l=e.length;for(let c=0;c<l;c++){const l=e[c],u=t[c];e[c]=n*l+i*u+a,t[c]=r*l+o*u+s}}transform(e,t,n,r,i,o){const{a,b:s,c:l,d:c,e:u,f:h}=this;return this.a=a*e+l*t,this.c=a*n+l*r,this.e=a*i+l*o+u,this.b=s*e+c*t,this.d=s*n+c*r,this.f=s*i+c*o+h,this}translate(e,t){return this.transform(1,0,0,1,e,t)}scale(e,t){return this.transform(e,0,0,t,0,0)}skew(e,t){return this.transform(1,t,e,1,0,0)}rotate(e){const t=Ta(e),n=Sa(e);return this.transform(n,t,-t,n,0,0)}rotate_ccw(e){return this.rotate(-e)}translate_x(e){return this.translate(e,0)}translate_y(e){return this.translate(0,e)}flip(){return this.scale(-1,-1)}flip_x(){return this.scale(1,-1)}flip_y(){return this.scale(-1,1)}}function Ca(e){if(!e)throw new Error("cannot create a random attribute name for an undefined object");const t="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";let n="";do{n="";for(let e=0;e<12;e++)n+=t[Math.floor(Math.random()*t.length)]}while(e[n]);return n}function Ma(e){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[e]||t.start}function Oa(e){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[e]||t.alphabetic}Ea.__name__="AffineTransform";const La=function(e,t){const n=new Map,r="50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro".split(",");t=t||10;for(let e=0;e<r.length;e+=2){const i="&"+r[e+1]+";",o=parseInt(r[e],t);n.set(i,"&#"+o+";")}return n.set("\\xa0","&#160;"),n}(0,32),Da={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"}};class Ia{constructor(e,t){this.__root=e,this.__ctx=t}addColorStop(e,t){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",`${e}`),-1!==t.indexOf("rgba")){const e=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(t),[,r,i,o,a]=e;n.setAttribute("stop-color",`rgb(${r},${i},${o})`),n.setAttribute("stop-opacity",a)}else n.setAttribute("stop-color",t);this.__root.appendChild(n)}}Ia.__name__="CanvasGradient";class Ra{constructor(e,t){this.__root=e,this.__ctx=t}}Ra.__name__="CanvasPattern";class Pa{constructor(e){var t,n,r;this.__currentPosition=null,this.__currentElementsToStyle=null,this._transform=new Ea,this._clip_path=null,this.__document=null!==(t=null==e?void 0:e.document)&&void 0!==t?t:document,(null==e?void 0:e.ctx)?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d")),this.__setDefaultStyles(),this.__stack=[],this.__root=this.__document.createElementNS("path_to_url","svg"),this.__root.setAttribute("version","1.1"),this.__root.setAttribute("xmlns","path_to_url"),this.__root.setAttributeNS("path_to_url","xmlns:xlink","path_to_url"),this.width=null!==(n=null==e?void 0:e.width)&&void 0!==n?n:500,this.height=null!==(r=null==e?void 0:e.height)&&void 0!==r?r:500,this.__ids={},this.__defs=this.__document.createElementNS("path_to_url","defs"),this.__root.appendChild(this.__defs)}get canvas(){return this}get width(){return this._width}set width(e){this._width=e,this.__root.setAttribute("width",`${e}`)}get height(){return this._height}set height(e){this._height=e,this.__root.setAttribute("height",`${e}`)}__createElement(e,t={},n=!1){const r=this.__document.createElementNS("path_to_url",e);n&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));const i=Object.keys(t);for(const e of i)r.setAttribute(e,`${t[e]}`);return r}__setDefaultStyles(){const e=Object.keys(Da),t=this;for(let n=0;n<e.length;n++){const r=e[n];t[r]=Da[r].canvas}}__applyStyleState(e){const t=Object.keys(e),n=this;for(let r=0;r<t.length;r++){const i=t[r];n[i]=e[i]}}__getStyleState(){const e=Object.keys(Da),t={};for(let n=0;n<e.length;n++){const r=e[n];t[r]=this[r]}return t}__applyStyleToCurrentElement(e){let t=this.__currentElement;const n=this.__currentElementsToStyle;if(null!=n){t.setAttribute(e,""),t=n.element;for(const t of n.children)t.setAttribute(e,"")}const r=Object.keys(Da);for(let n=0;n<r.length;n++){const i=Da[r[n]],o=this[r[n]];if(i.apply)if(o instanceof Ra){for(const e of[...o.__ctx.__defs.childNodes])if(e instanceof Element){const t=e.getAttribute("id");this.__ids[t]=t,this.__defs.appendChild(e)}const e=o.__root.getAttribute("id");t.setAttribute(i.apply,`url(#${e})`)}else if(o instanceof Ia){const e=o.__root.getAttribute("id");t.setAttribute(i.apply,`url(#${e})`)}else if(-1!==i.apply.indexOf(e)&&i.svg!==o)if("stroke"!==i.svgAttr&&"fill"!==i.svgAttr||!re(o)||-1===o.indexOf("rgba")){let a=i.svgAttr;if("globalAlpha"===r[n]&&(a=e+"-"+i.svgAttr,t.getAttribute(a)))continue;t.setAttribute(a,`${o}`)}else{const e=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o),[,n,r,a,s]=e;t.setAttribute(i.svgAttr,`rgb(${n},${r},${a})`);let l=parseFloat(s);const c=this.globalAlpha;null!=c&&(l*=c),t.setAttribute(i.svgAttr+"-opacity",`${l}`)}}}get_serialized_svg(e=!1){let t=(new XMLSerializer).serializeToString(this.__root);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(t)&&(t=t.replace('xmlns="path_to_url"path_to_url La){const r=new RegExp(e,"gi");r.test(t)&&(t=t.replace(r,n))}return t}get_svg(){return this.__root}save(){this.__stack.push({transform:this._transform,clip_path:this._clip_path,attributes:this.__getStyleState()}),this._transform=this._transform.clone()}restore(){if(0==this.__stack.length)return;const{transform:e,clip_path:t,attributes:n}=this.__stack.pop();this._transform=e,this._clip_path=t,this.__applyStyleState(n)}_apply_transform(e,t=this._transform){t.is_identity||e.setAttribute("transform",t.toString())}scale(e,t){isFinite(e)&&(null==t||isFinite(t))&&this._transform.scale(e,null!=t?t:e)}rotate(e){isFinite(e)&&this._transform.rotate(e)}translate(e,t){isFinite(e+t)&&this._transform.translate(e,t)}transform(e,t,n,r,i,o){isFinite(e+t+n+r+i+o)&&this._transform.transform(e,t,n,r,i,o)}beginPath(){this.__currentDefaultPath="",this.__currentPosition=null;const e=this.__createElement("path",{},!0);this.__root.appendChild(e),this.__currentElement=e}__applyCurrentDefaultPath(){const e=this.__currentElement;"path"===e.nodeName?e.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",e.nodeName)}__addPathCommand(e,t,n){const r=this.__currentDefaultPath?" ":"";this.__currentDefaultPath+=r+n,this.__currentPosition={x:e,y:t}}get _hasCurrentDefaultPath(){return!!this.__currentDefaultPath}moveTo(e,t){if(!isFinite(e+t))return;"path"!==this.__currentElement.nodeName&&this.beginPath();const[n,r]=this._transform.apply(e,t);this.__addPathCommand(n,r,`M ${n} ${r}`)}closePath(){this._hasCurrentDefaultPath&&this.__addPathCommand(NaN,NaN,"Z")}lineTo(e,t){if(isFinite(e+t))if(this._hasCurrentDefaultPath){const[n,r]=this._transform.apply(e,t);this.__addPathCommand(n,r,`L ${n} ${r}`)}else this.moveTo(e,t)}bezierCurveTo(e,t,n,r,i,o){if(!isFinite(e+t+n+r+i+o))return;const[a,s]=this._transform.apply(i,o),[l,c]=this._transform.apply(e,t),[u,h]=this._transform.apply(n,r);this.__addPathCommand(a,s,`C ${l} ${c} ${u} ${h} ${a} ${s}`)}quadraticCurveTo(e,t,n,r){if(!isFinite(e+t+n+r))return;const[i,o]=this._transform.apply(n,r),[a,s]=this._transform.apply(e,t);this.__addPathCommand(i,o,`Q ${a} ${s} ${i} ${o}`)}arcTo(e,t,n,r,i){if(!isFinite(e+t+n+r+i))return;if(null==this.__currentPosition)return;const o=this.__currentPosition.x,a=this.__currentPosition.y;if(i<0)throw new Error("IndexSizeError: The radius provided ("+i+") is negative.");if(o===e&&a===t||e===n&&t===r||0===i)return void this.lineTo(e,t);function s([e,t]){const n=Math.sqrt(e**2+t**2);return[e/n,t/n]}const l=s([o-e,a-t]),c=s([n-e,r-t]);if(l[0]*c[1]==l[1]*c[0])return void this.lineTo(e,t);const u=l[0]*c[0]+l[1]*c[1],h=Math.acos(Math.abs(u)),d=s([l[0]+c[0],l[1]+c[1]]),f=i/Math.sin(h/2),p=e+f*d[0],g=t+f*d[1],m=[-l[1],l[0]],v=[c[1],-c[0]];function y(e){const t=e[0];return e[1]>=0?Math.acos(t):-Math.acos(t)}const b=y(m),_=y(v);this.lineTo(p+m[0]*i,g+m[1]*i),this.arc(p,g,i,b,_)}stroke(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","fill"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke"),null!=this._clip_path&&this.__currentElement.setAttribute("clip-path",this._clip_path)}fill(){"path"===this.__currentElement.nodeName&&this.__currentElement.setAttribute("paint-order","stroke"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill"),null!=this._clip_path&&this.__currentElement.setAttribute("clip-path",this._clip_path)}rect(e,t,n,r){isFinite(e+t+n+r)&&("path"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t))}fillRect(e,t,n,r){isFinite(e+t+n+r)&&(this.beginPath(),this.rect(e,t,n,r),this.fill())}strokeRect(e,t,n,r){isFinite(e+t+n+r)&&(this.beginPath(),this.rect(e,t,n,r),this.stroke())}__clearCanvas(){oa(this.__defs),oa(this.__root),this.__root.appendChild(this.__defs),this.__currentElement=this.__root}clearRect(e,t,n,r){if(!isFinite(e+t+n+r))return;if(0===e&&0===t&&n===this.width&&r===this.height)return void this.__clearCanvas();const i=this.__createElement("rect",{x:e,y:t,width:n,height:r,fill:"#FFFFFF"},!0);this._apply_transform(i),this.__root.appendChild(i)}createLinearGradient(e,t,n,r){if(!isFinite(e+t+n+r))throw new Error("The provided double value is non-finite");const[i,o]=this._transform.apply(e,t),[a,s]=this._transform.apply(n,r),l=this.__createElement("linearGradient",{id:Ca(this.__ids),x1:`${i}px`,x2:`${a}px`,y1:`${o}px`,y2:`${s}px`,gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(l),new Ia(l,this)}createRadialGradient(e,t,n,r,i,o){if(!isFinite(e+t+n+r+i+o))throw new Error("The provided double value is non-finite");const[a,s]=this._transform.apply(e,t),[l,c]=this._transform.apply(r,i),u=this.__createElement("radialGradient",{id:Ca(this.__ids),cx:`${l}px`,cy:`${c}px`,r:`${o}px`,fx:`${a}px`,fy:`${s}px`,gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(u),new Ia(u,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\'\"\sa-z0-9]+?)\s*$/i.exec(this.font),t={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal"};return"underline"===this.__fontUnderline&&(t.decoration="underline"),null!=this.__fontHref&&(t.href=this.__fontHref),t}__wrapTextLink(e,t){if(e.href){const n=this.__createElement("a");return n.setAttributeNS("path_to_url","xlink:href",e.href),n.appendChild(t),n}return t}__applyText(e,t,n,r){const i=this.__parseFont(),o=this.__createElement("text",{"font-family":i.family,"font-size":i.size,"font-style":i.style,"font-weight":i.weight,"text-decoration":i.decoration,x:t,y:n,"text-anchor":Ma(this.textAlign),"dominant-baseline":Oa(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(e)),this._apply_transform(o),this.__currentElement=o,this.__applyStyleToCurrentElement(r),this.__root.appendChild(this.__wrapTextLink(i,o))}fillText(e,t,n){null!=e&&isFinite(t+n)&&this.__applyText(e,t,n,"fill")}strokeText(e,t,n){null!=e&&isFinite(t+n)&&this.__applyText(e,t,n,"stroke")}measureText(e){return this.__ctx.font=this.font,this.__ctx.measureText(e)}arc(e,t,n,r,i,o=!1){if(!isFinite(e+t+n+r+i))return;if(r===i)return;(r%=2*Math.PI)==(i%=2*Math.PI)&&(i=(i+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=e+n*Math.cos(i),s=t+n*Math.sin(i),l=e+n*Math.cos(r),c=t+n*Math.sin(r),u=o?0:1;let h=0,d=i-r;d<0&&(d+=2*Math.PI),h=o?d>Math.PI?0:1:d>Math.PI?1:0,this.lineTo(l,c);const f=n,p=n,[g,m]=this._transform.apply(a,s);this.__addPathCommand(g,m,`A ${f} ${p} 0 ${h} ${u} ${g} ${m}`)}clip(){const e=this.__createElement("clipPath"),t=Ca(this.__ids);this.__applyCurrentDefaultPath(),e.setAttribute("id",t),e.appendChild(this.__currentElement),this.__defs.appendChild(e),this._clip_path=`url(#${t})`}drawImage(e,...t){let n,r,i,o,a,s,l,c;if(2==t.length){if([n,r]=t,!isFinite(n+r))return;a=0,s=0,l=e.width,c=e.height,i=l,o=c}else if(4==t.length){if([n,r,i,o]=t,!isFinite(n+r+i+o))return;a=0,s=0,l=e.width,c=e.height}else{if(8!==t.length)throw new Error(`Inavlid number of arguments passed to drawImage: ${arguments.length}`);if([a,s,l,c,n,r,i,o]=t,!isFinite(a+s+l+c+n+r+i+o))return}const u=this.__root,h="translate("+n+", "+r+")",d=this._transform.clone().translate(n,r);if(e instanceof Pa||e instanceof SVGSVGElement){const t=(e instanceof SVGSVGElement?e:e.get_svg()).cloneNode(!0);let n;d.is_identity?n=u:(n=this.__createElement("g"),this._apply_transform(n,d),u.appendChild(n));for(const e of[...t.childNodes])if(e instanceof SVGDefsElement){for(const t of[...e.childNodes])if(t instanceof Element){const e=t.getAttribute("id");this.__ids[e]=e,this.__defs.appendChild(t)}}else n.appendChild(e)}else if(e instanceof HTMLImageElement||e instanceof SVGImageElement){const t=this.__createElement("image");if(t.setAttribute("width",`${i}`),t.setAttribute("height",`${o}`),t.setAttribute("preserveAspectRatio","none"),a||s||l!==e.width||c!==e.height){const t=this.__document.createElement("canvas");t.width=i,t.height=o,t.getContext("2d").drawImage(e,a,s,l,c,0,0,i,o),e=t}t.setAttribute("transform",h);const n=e instanceof HTMLCanvasElement?e.toDataURL():e.getAttribute("src");t.setAttributeNS("path_to_url","xlink:href",n),u.appendChild(t)}else if(e instanceof HTMLCanvasElement){const t=this.__createElement("image");t.setAttribute("width",`${i}`),t.setAttribute("height",`${o}`),t.setAttribute("preserveAspectRatio","none");const n=this.__document.createElement("canvas");n.width=i,n.height=o;const r=n.getContext("2d");r.imageSmoothingEnabled=!1,r.drawImage(e,a,s,l,c,0,0,i,o),e=n,t.setAttribute("transform",h),t.setAttributeNS("path_to_url","xlink:href",e.toDataURL()),u.appendChild(t)}}createPattern(e,t){const n=this.__document.createElementNS("path_to_url","pattern"),r=Ca(this.__ids);if(n.setAttribute("id",r),n.setAttribute("width",`${this._to_number(e.width)}`),n.setAttribute("height",`${this._to_number(e.height)}`),n.setAttribute("patternUnits","userSpaceOnUse"),e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof SVGImageElement){const t=this.__document.createElementNS("path_to_url","image"),r=e instanceof HTMLCanvasElement?e.toDataURL():e.getAttribute("src");t.setAttributeNS("path_to_url","xlink:href",r),n.appendChild(t),this.__defs.appendChild(n)}else if(e instanceof Pa){for(const t of[...e.__root.childNodes])t instanceof SVGDefsElement||n.appendChild(t);this.__defs.appendChild(n)}else{if(!(e instanceof SVGSVGElement))throw new Error("unsupported");for(const t of[...e.childNodes])t instanceof SVGDefsElement||n.appendChild(t);this.__defs.appendChild(n)}return new Ra(n,this)}setLineDash(e){e&&e.length>0?this.lineDash=e.join(","):this.lineDash=null}_to_number(e){return te(e)?e:e.baseVal.value}}Pa.__name__="SVGRenderingContext2D";class Na extends ka{initialize(){super.initialize(),this.el=this._createElement()}remove(){na(this.el),super.remove()}css_classes(){return[]}render(){}renderTo(e){e.appendChild(this.el),this.render()}_createElement(){return function(e,t,...n){return Bo(e)(t,...n)}(this.tagName,{class:this.css_classes()})}}Na.__name__="DOMView",Na.prototype.tagName="div";const{min:za,max:Fa}=Math;function Ba(e,t){return{x0:za(e.x0,t.x0),x1:Fa(e.x1,t.x1),y0:za(e.y0,t.y0),y1:Fa(e.y1,t.y1)}}class ja{constructor(e){if(null==e)this.x0=0,this.y0=0,this.x1=0,this.y1=0;else if("x0"in e){const{x0:t,y0:n,x1:r,y1:i}=e;if(!(t<=r&&n<=i))throw new Error(`invalid bbox {x0: ${t}, y0: ${n}, x1: ${r}, y1: ${i}}`);this.x0=t,this.y0=n,this.x1=r,this.y1=i}else if("x"in e){const{x:t,y:n,width:r,height:i}=e;if(!(r>=0&&i>=0))throw new Error(`invalid bbox {x: ${t}, y: ${n}, width: ${r}, height: ${i}}`);this.x0=t,this.y0=n,this.x1=t+r,this.y1=n+i}else{let t,n,r,i;if("width"in e)if("left"in e)t=e.left,n=t+e.width;else if("right"in e)n=e.right,t=n-e.width;else{const r=e.width/2;t=e.hcenter-r,n=e.hcenter+r}else t=e.left,n=e.right;if("height"in e)if("top"in e)r=e.top,i=r+e.height;else if("bottom"in e)i=e.bottom,r=i-e.height;else{const t=e.height/2;r=e.vcenter-t,i=e.vcenter+t}else r=e.top,i=e.bottom;if(!(t<=n&&r<=i))throw new Error(`invalid bbox {left: ${t}, top: ${r}, right: ${n}, bottom: ${i}}`);this.x0=t,this.y0=r,this.x1=n,this.y1=i}}toString(){return`BBox({left: ${this.left}, top: ${this.top}, width: ${this.width}, height: ${this.height}})`}get left(){return this.x0}get top(){return this.y0}get right(){return this.x1}get bottom(){return this.y1}get p0(){return[this.x0,this.y0]}get p1(){return[this.x1,this.y1]}get x(){return this.x0}get y(){return this.y0}get width(){return this.x1-this.x0}get height(){return this.y1-this.y0}get rect(){return{x0:this.x0,y0:this.y0,x1:this.x1,y1:this.y1}}get box(){return{x:this.x,y:this.y,width:this.width,height:this.height}}get h_range(){return{start:this.x0,end:this.x1}}get v_range(){return{start:this.y0,end:this.y1}}get ranges(){return[this.h_range,this.v_range]}get aspect(){return this.width/this.height}get hcenter(){return(this.left+this.right)/2}get vcenter(){return(this.top+this.bottom)/2}relativize(){const{width:e,height:t}=this;return new ja({x:0,y:0,width:e,height:t})}contains(e,t){return e>=this.x0&&e<=this.x1&&t>=this.y0&&t<=this.y1}clip(e,t){return e<this.x0?e=this.x0:e>this.x1&&(e=this.x1),t<this.y0?t=this.y0:t>this.y1&&(t=this.y1),[e,t]}union(e){return new ja({x0:za(this.x0,e.x0),y0:za(this.y0,e.y0),x1:Fa(this.x1,e.x1),y1:Fa(this.y1,e.y1)})}equals(e){return this.x0==e.x0&&this.y0==e.y0&&this.x1==e.x1&&this.y1==e.y1}get xview(){return{compute:e=>this.left+e,v_compute:e=>{const t=new mn(e.length),n=this.left;for(let r=0;r<e.length;r++)t[r]=n+e[r];return t}}}get yview(){return{compute:e=>this.bottom-e,v_compute:e=>{const t=new mn(e.length),n=this.bottom;for(let r=0;r<e.length;r++)t[r]=n-e[r];return t}}}}ja.__name__="BBox";const Ua=(()=>{const e=document.createElement("canvas"),t=e.getContext("webgl",{premultipliedAlpha:!0});return null!=t?{canvas:e,gl:t}:void Re.trace("WebGL is not supported")})(),Va={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};class qa{constructor(e,t){switch(this.backend=e,this.hidpi=t,this.pixel_ratio=1,this.bbox=new ja,e){case"webgl":case"canvas":{this._el=this._canvas=Vo({style:Va});const e=this.canvas.getContext("2d");if(null==e)throw new Error("unable to obtain 2D rendering context");this._ctx=e,t&&(this.pixel_ratio=devicePixelRatio);break}case"svg":{const e=new Pa;this._ctx=e,this._canvas=e.get_svg(),this._el=jo({style:Va},this._canvas);break}}var n;(function(e){void 0===e.lineDash&&Object.defineProperty(e,"lineDash",{get:()=>e.getLineDash(),set:t=>e.setLineDash(t)})})(n=this._ctx),function(e){e.setImageSmoothingEnabled=t=>{e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.oImageSmoothingEnabled=t,e.webkitImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t},e.getImageSmoothingEnabled=()=>{const t=e.imageSmoothingEnabled;return null==t||t}}(n),function(e){e.measureText&&null==e.html5MeasureText&&(e.html5MeasureText=e.measureText,e.measureText=t=>{const n=e.html5MeasureText(t);return n.ascent=1.6*e.html5MeasureText("m").width,n})}(n),function(e){e.ellipse||(e.ellipse=function(t,n,r,i,o,a,s,l=!1){const c=.551784;e.translate(t,n),e.rotate(o);let u=r,h=i;l&&(u=-r,h=-i),e.moveTo(-u,0),e.bezierCurveTo(-u,h*c,-u*c,h,0,h),e.bezierCurveTo(u*c,h,u,h*c,u,0),e.bezierCurveTo(u,-h*c,u*c,-h,0,-h),e.bezierCurveTo(-u*c,-h,-u,-h*c,-u,0),e.rotate(-o),e.translate(-t,-n)})}(n)}get canvas(){return this._canvas}get ctx(){return this._ctx}get el(){return this._el}resize(e,t){this.bbox=new ja({left:0,top:0,width:e,height:t});const n=this._ctx instanceof Pa?this._ctx:this.canvas;n.width=e*this.pixel_ratio,n.height=t*this.pixel_ratio}prepare(){const{ctx:e,hidpi:t,pixel_ratio:n}=this;e.save(),t&&(e.scale(n,n),e.translate(.5,.5)),this.clear()}clear(){const{x:e,y:t,width:n,height:r}=this.bbox;this.ctx.clearRect(e,t,n,r)}finish(){this.ctx.restore()}to_blob(){const{_canvas:e}=this;if(e instanceof HTMLCanvasElement)return null!=e.msToBlob?Promise.resolve(e.msToBlob()):new Promise(((t,n)=>{e.toBlob((e=>null!=e?t(e):n()),"image/png")}));{const e=this._ctx.get_serialized_svg(!0),t=new Blob([e],{type:"image/svg+xml"});return Promise.resolve(t)}}}qa.__name__="CanvasLayer";class Ha extends Na{constructor(){super(...arguments),this.bbox=new ja}initialize(){super.initialize();const{output_backend:e,hidpi:t}=this.model;"webgl"==e&&(this.webgl=Ua),this.underlays_el=jo({style:Va}),this.primary=new qa(e,t),this.overlays=new qa(e,t),this.overlays_el=jo({style:Va}),this.events_el=jo({class:"bk-canvas-events",style:Va});const n=[this.underlays_el,this.primary.el,this.overlays.el,this.overlays_el,this.events_el];fe(this.el.style,Va),ta(this.el,...n),Re.debug("CanvasView initialized")}add_underlay(e){this.underlays_el.appendChild(e)}add_overlay(e){this.overlays_el.appendChild(e)}add_event(e){this.events_el.appendChild(e)}get pixel_ratio(){return this.primary.pixel_ratio}resize(e,t){this.bbox=new ja({left:0,top:0,width:e,height:t}),this.primary.resize(e,t),this.overlays.resize(e,t)}prepare_webgl(e){const{webgl:t}=this;if(null!=t){const{width:n,height:r}=this.bbox;t.canvas.width=this.pixel_ratio*n,t.canvas.height=this.pixel_ratio*r;const{gl:i}=t;i.enable(i.SCISSOR_TEST);const[o,a,s,l]=e,{xview:c,yview:u}=this.bbox,h=c.compute(o),d=u.compute(a+l),f=this.pixel_ratio;i.scissor(f*h,f*d,f*s,f*l),i.enable(i.BLEND),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE_MINUS_DST_ALPHA,i.ONE)}}clear_webgl(){const{webgl:e}=this;if(null!=e){const{gl:t,canvas:n}=e;t.viewport(0,0,n.width,n.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT||t.DEPTH_BUFFER_BIT)}}blit_webgl(e){const{webgl:t}=this;if(null!=t&&(Re.debug("Blitting WebGL canvas"),e.restore(),e.drawImage(t.canvas,0,0),e.save(),this.model.hidpi)){const t=this.pixel_ratio;e.scale(t,t),e.translate(.5,.5)}}compose(){const{output_backend:e,hidpi:t}=this.model,{width:n,height:r}=this.bbox,i=new qa(e,t);return i.resize(n,r),i.ctx.drawImage(this.primary.canvas,0,0),i.ctx.drawImage(this.overlays.canvas,0,0),i}to_blob(){return this.compose().to_blob()}}Ha.__name__="CanvasView";class $a extends Ei{constructor(e){super(e)}static init_Canvas(){this.prototype.default_view=Ha,this.internal({hidpi:[En,!0],output_backend:[cr,"canvas"]})}}function Wa(e,t){const[n,r,i,o]=re(e)?Ve(e):Ue(e);return`rgba(${255*n}, ${255*r}, ${255*i}, ${1==o?t:o})`}function Ga(e,t,n){e.moveTo(0,n+.5),e.lineTo(t,n+.5),e.stroke()}function Ya(e,t,n){e.moveTo(n+.5,0),e.lineTo(n+.5,t),e.stroke()}function Xa(e,t){e.moveTo(0,t),e.lineTo(t,0),e.stroke(),e.moveTo(0,0),e.lineTo(t,t),e.stroke()}$a.__name__="Canvas",$a.init_Canvas();const Za={" ":"blank",".":"dot",o:"ring","-":"horizontal_line","|":"vertical_line","+":"cross",'"':"horizontal_dash",":":"vertical_dash","@":"spiral","/":"right_diagonal_line","\\":"left_diagonal_line",x:"diagonal_cross",",":"right_diagonal_dash","`":"left_diagonal_dash",v:"horizontal_wave",">":"vertical_wave","*":"criss_cross"};class Ka{constructor(e,t=""){this.obj=e,this.prefix=t,this.cache={};for(const n of this.attrs)this[n]=e.properties[t+n]}warm_cache(e,t){for(const n of this.attrs){const r=this.obj.properties[this.prefix+n];if(void 0!==r.spec.value)this.cache[n]=r.spec.value;else{if(!(null!=e&&r instanceof Mr))throw new Error("source is required with a vectorized visual property");{const i=r.array(e),o=null!=t?t.select(i):i;this.cache[n+"_array"]=o}}}}cache_select(e,t){const n=this.obj.properties[this.prefix+e];let r;return void 0!==n.spec.value?this.cache[e]=r=n.spec.value:this.cache[e]=r=this.cache[e+"_array"][t],r}get_array(e){return this.cache[e+"_array"]}set_vectorize(e,t){this._set_vectorize(e,t)}}Ka.__name__="ContextProperties";class Ja extends Ka{set_value(e){const t=this.line_color.value(),n=this.line_alpha.value();e.strokeStyle=Wa(t,n),e.lineWidth=this.line_width.value(),e.lineJoin=this.line_join.value(),e.lineCap=this.line_cap.value(),e.lineDash=this.line_dash.value(),e.lineDashOffset=this.line_dash_offset.value()}get doit(){return!(null===this.line_color.spec.value||0==this.line_alpha.spec.value||0==this.line_width.spec.value)}_set_vectorize(e,t){const n=this.cache_select("line_color",t),r=this.cache_select("line_alpha",t),i=this.cache_select("line_width",t),o=this.cache_select("line_join",t),a=this.cache_select("line_cap",t),s=this.cache_select("line_dash",t),l=this.cache_select("line_dash_offset",t);e.strokeStyle=Wa(n,r),e.lineWidth=i,e.lineJoin=o,e.lineCap=a,e.lineDash=s,e.lineDashOffset=l}color_value(){return Wa(this.line_color.value(),this.line_alpha.value())}}Ja.__name__="Line",Ja.prototype.attrs=Object.keys(ni);class Qa extends Ka{set_value(e){const t=this.fill_color.value(),n=this.fill_alpha.value();e.fillStyle=Wa(t,n)}get doit(){return!(null===this.fill_color.spec.value||0==this.fill_alpha.spec.value)}_set_vectorize(e,t){const n=this.cache_select("fill_color",t),r=this.cache_select("fill_alpha",t);e.fillStyle=Wa(n,r)}color_value(){return Wa(this.fill_color.value(),this.fill_alpha.value())}}Qa.__name__="Fill",Qa.prototype.attrs=Object.keys(ri);class es extends Ka{cache_select(e,t){let n;if("pattern"==e){const e=this.cache_select("hatch_color",t),n=this.cache_select("hatch_alpha",t),r=this.cache_select("hatch_scale",t),i=this.cache_select("hatch_pattern",t),o=this.cache_select("hatch_weight",t),{hatch_extra:a}=this.cache;if(null!=a&&a.hasOwnProperty(i)){const t=a[i];this.cache.pattern=t.get_pattern(e,n,r,o)}else this.cache.pattern=t=>{const a=new qa(t instanceof Pa?"svg":"canvas",!0);return a.resize(r,r),a.prepare(),function(e,t,n,r,i,o){var a;const s=i,l=s/2,c=l/2;switch(e.strokeStyle=Wa(n,r),e.lineCap="square",e.fillStyle=n,e.lineWidth=o,null!==(a=Za[t])&&void 0!==a?a:t){case"blank":break;case"dot":e.arc(l,l,l/2,0,2*Math.PI,!0),e.fill();break;case"ring":e.arc(l,l,l/2,0,2*Math.PI,!0),e.stroke();break;case"horizontal_line":Ga(e,s,l);break;case"vertical_line":Ya(e,s,l);break;case"cross":Ga(e,s,l),Ya(e,s,l);break;case"horizontal_dash":Ga(e,l,l);break;case"vertical_dash":Ya(e,l,l);break;case"spiral":{const t=s/30;e.moveTo(l,l);for(let n=0;n<360;n++){const r=.1*n,i=l+t*r*Math.cos(r),o=l+t*r*Math.sin(r);e.lineTo(i,o)}e.stroke();break}case"right_diagonal_line":e.moveTo(.5-c,s),e.lineTo(c+.5,0),e.stroke(),e.moveTo(c+.5,s),e.lineTo(3*c+.5,0),e.stroke(),e.moveTo(3*c+.5,s),e.lineTo(5*c+.5,0),e.stroke(),e.stroke();break;case"left_diagonal_line":e.moveTo(c+.5,s),e.lineTo(.5-c,0),e.stroke(),e.moveTo(3*c+.5,s),e.lineTo(c+.5,0),e.stroke(),e.moveTo(5*c+.5,s),e.lineTo(3*c+.5,0),e.stroke(),e.stroke();break;case"diagonal_cross":Xa(e,s);break;case"right_diagonal_dash":e.moveTo(c+.5,3*c+.5),e.lineTo(3*c+.5,c+.5),e.stroke();break;case"left_diagonal_dash":e.moveTo(c+.5,c+.5),e.lineTo(3*c+.5,3*c+.5),e.stroke();break;case"horizontal_wave":e.moveTo(0,c),e.lineTo(l,3*c),e.lineTo(s,c),e.stroke();break;case"vertical_wave":e.moveTo(c,0),e.lineTo(3*c,l),e.lineTo(c,s),e.stroke();break;case"criss_cross":Xa(e,s),Ga(e,s,l),Ya(e,s,l)}}(a.ctx,i,e,n,r,o),t.createPattern(a.canvas,"repeat")}}else n=super.cache_select(e,t);return n}_try_defer(e){const{hatch_pattern:t,hatch_extra:n}=this.cache;null!=n&&n.hasOwnProperty(t)&&n[t].onload(e)}get doit(){return!(null===this.hatch_color.spec.value||0==this.hatch_alpha.spec.value||" "==this.hatch_pattern.spec.value||"blank"==this.hatch_pattern.spec.value||null===this.hatch_pattern.spec.value)}doit2(e,t,n,r){this.doit&&(this.cache_select("pattern",t),null==this.cache.pattern(e)?this._try_defer(r):(this.set_vectorize(e,t),n()))}_set_vectorize(e,t){this.cache_select("pattern",t),e.fillStyle=this.cache.pattern(e)}color_value(){return Wa(this.hatch_color.value(),this.hatch_alpha.value())}}es.__name__="Hatch",es.prototype.attrs=Object.keys(ii);class ts extends Ka{color_value(){return Wa(this.text_color.value(),this.text_alpha.value())}font_value(){const e=this.text_font.value(),t=this.text_font_size.value();return`${this.text_font_style.value()} ${t} ${e}`}v_font_value(e){super.cache_select("text_font_style",e),super.cache_select("text_font_size",e),super.cache_select("text_font",e);const{text_font_style:t,text_font_size:n,text_font:r}=this.cache;return`${t} ${n} ${r}`}cache_select(e,t){let n;return"font"==e?this.cache.font=n=this.v_font_value(t):n=super.cache_select(e,t),n}set_value(e){const t=this.text_color.value(),n=this.text_alpha.value();e.fillStyle=Wa(t,n),e.font=this.font_value(),e.textAlign=this.text_align.value(),e.textBaseline=this.text_baseline.value()}get doit(){return!(null===this.text_color.spec.value||0==this.text_alpha.spec.value)}_set_vectorize(e,t){const n=this.cache_select("text_color",t),r=this.cache_select("text_alpha",t),i=this.cache_select("font",t),o=this.cache_select("text_align",t),a=this.cache_select("text_baseline",t);e.fillStyle=Wa(n,r),e.font=i,e.textAlign=o,e.textBaseline=a}}ts.__name__="Text",ts.prototype.attrs=Object.keys(oi);class ns{constructor(e){for(const t of e._mixins){const[n,r=""]=t.split(":");let i;switch(n){case"line":i=Ja;break;case"fill":i=Qa;break;case"hatch":i=es;break;case"text":i=ts;break;default:throw new Error(`unknown visual: ${n}`)}this[r+n]=new i(e,r)}}warm_cache(e,t){for(const n in this)if(this.hasOwnProperty(n)){const r=this[n];r instanceof Ka&&r.warm_cache(e,t)}}}ns.__name__="Visuals";class rs extends Ei{constructor(e){super(e)}static init_Model(){this.define({tags:[Sn,[]],name:[Rn],js_property_callbacks:[Tn,{}],js_event_callbacks:[Tn,{}],subscribed_events:[Sn,[]]})}initialize(){super.initialize(),this._js_callbacks=new Map}connect_signals(){super.connect_signals(),this._update_property_callbacks(),this.connect(this.properties.js_property_callbacks.change,(()=>this._update_property_callbacks())),this.connect(this.properties.js_event_callbacks.change,(()=>this._update_event_callbacks())),this.connect(this.properties.subscribed_events.change,(()=>this._update_event_callbacks()))}_process_event(e){for(const t of this.js_event_callbacks[e.event_name]||[])t.execute(e);null!=this.document&&this.subscribed_events.some((t=>t==e.event_name))&&this.document.event_manager.send_event(e)}trigger_event(e){null!=this.document&&(e.origin=this,this.document.event_manager.trigger(e))}_update_event_callbacks(){null!=this.document?this.document.event_manager.subscribed_models.add(this):Re.warn("WARNING: Document not defined for updating event callbacks")}_update_property_callbacks(){const e=e=>{const[t,n=null]=e.split(":");return null!=n?this.properties[n][t]:this[t]};for(const[t,n]of this._js_callbacks){const r=e(t);for(const e of n)this.disconnect(r,e)}this._js_callbacks.clear();for(const[t,n]of de(this.js_property_callbacks)){const r=n.map((e=>()=>e.execute(this)));this._js_callbacks.set(t,r);const i=e(t);for(const e of r)this.connect(i,e)}}_doc_attached(){ve(this.js_event_callbacks)&&0==this.subscribed_events.length||this._update_event_callbacks()}_doc_detached(){this.document.event_manager.subscribed_models.delete(this)}select(e){if(re(e))return[...this.references()].filter((t=>t instanceof rs&&t.name===e));if(e.prototype instanceof Ei)return[...this.references()].filter((t=>t instanceof e));throw new Error("invalid selector")}select_one(e){const t=this.select(e);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error("found more than one object matching given selector")}}}rs.__name__="Model",rs.init_Model();class is{constructor(e,t){this.x_scale=e,this.y_scale=t,this.x_range=this.x_scale.source_range,this.y_range=this.y_scale.source_range,this.ranges=[this.x_range,this.y_range],this.scales=[this.x_scale,this.y_scale]}map_to_screen(e,t){return[this.x_scale.v_compute(e),this.y_scale.v_compute(t)]}map_from_screen(e,t){return[this.x_scale.v_invert(e),this.y_scale.v_invert(t)]}}is.__name__="CoordinateTransform";class os extends ka{get coordinates(){return this._coordinates}initialize(){super.initialize(),this.visuals=new ns(this.model),this.needs_webgl_blit=!1,this._initialize_coordinates()}connect_signals(){super.connect_signals();const{x_range_name:e,y_range_name:t}=this.model.properties;this.on_change([e,t],(()=>this._initialize_coordinates()))}_initialize_coordinates(){const{x_range_name:e,y_range_name:t}=this.model,{frame:n}=this.plot_view,r=n.x_scales.get(e),i=n.y_scales.get(t);this._coordinates=new is(r,i)}get plot_view(){return this.parent}get plot_model(){return this.parent.model}get layer(){const{overlays:e,primary:t}=this.plot_view.canvas_view;return"overlay"==this.model.level?e:t}request_render(){this.plot_view.request_render()}notify_finished(){this.plot_view.notify_finished()}get needs_clip(){return!1}get has_webgl(){return!1}render(){this.model.visible&&this._render(),this._has_finished=!0}}os.__name__="RendererView";class as extends rs{constructor(e){super(e)}static init_Renderer(){this.define({level:[fr],visible:[En,!0],x_range_name:[Rn,"default"],y_range_name:[Rn,"default"]})}}as.__name__="Renderer",as.init_Renderer();class ss extends os{get panel(){return this.layout}connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.visible,(()=>this.plot_view.request_layout()))}get_size(){if(this.model.visible){const{width:e,height:t}=this._get_size();return{width:Math.round(e),height:Math.round(t)}}return{width:0,height:0}}_get_size(){throw new Error("not implemented")}set_data(e){const t=this.model.materialize_dataspecs(e);if(fe(this,t),this.plot_model.use_map){const e=this;null!=e._x&&([e._x,e._y]=Fo(e._x,e._y)),null!=e._xs&&([e._xs,e._ys]=function(e,t){const n=Ro(e.length,t.length),r=new Array(n),i=new Array(n);for(let o=0;o<n;o++){const[n,a]=Fo(e[o],t[o]);r[o]=n,i[o]=a}return[r,i]}(e._xs,e._ys))}}get needs_clip(){return null==this.layout}serializable_state(){const e=super.serializable_state();return null==this.layout?e:Object.assign(Object.assign({},e),{bbox:this.layout.bbox.box})}}ss.__name__="AnnotationView";class ls extends as{constructor(e){super(e)}static init_Annotation(){this.override({level:"annotation"})}}ls.__name__="Annotation",ls.init_Annotation();class cs extends ls{constructor(e){super(e)}static init_ArrowHead(){this.define({size:[On,25]})}initialize(){super.initialize(),this.visuals=new ns(this)}}cs.__name__="ArrowHead",cs.init_ArrowHead();class us extends cs{constructor(e){super(e)}static init_OpenHead(){this.mixins(ni)}clip(e,t){this.visuals.line.set_vectorize(e,t),e.moveTo(.5*this.size,this.size),e.lineTo(.5*this.size,-2),e.lineTo(-.5*this.size,-2),e.lineTo(-.5*this.size,this.size),e.lineTo(0,0),e.lineTo(.5*this.size,this.size)}render(e,t){this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,t),e.beginPath(),e.moveTo(.5*this.size,this.size),e.lineTo(0,0),e.lineTo(-.5*this.size,this.size),e.stroke())}}us.__name__="OpenHead",us.init_OpenHead();class hs extends cs{constructor(e){super(e)}static init_NormalHead(){this.mixins([ni,ri]),this.override({fill_color:"black"})}clip(e,t){this.visuals.line.set_vectorize(e,t),e.moveTo(.5*this.size,this.size),e.lineTo(.5*this.size,-2),e.lineTo(-.5*this.size,-2),e.lineTo(-.5*this.size,this.size),e.lineTo(.5*this.size,this.size)}render(e,t){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,t),this._normal(e,t),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,t),this._normal(e,t),e.stroke())}_normal(e,t){e.beginPath(),e.moveTo(.5*this.size,this.size),e.lineTo(0,0),e.lineTo(-.5*this.size,this.size),e.closePath()}}hs.__name__="NormalHead",hs.init_NormalHead();class ds extends cs{constructor(e){super(e)}static init_VeeHead(){this.mixins([ni,ri]),this.override({fill_color:"black"})}clip(e,t){this.visuals.line.set_vectorize(e,t),e.moveTo(.5*this.size,this.size),e.lineTo(.5*this.size,-2),e.lineTo(-.5*this.size,-2),e.lineTo(-.5*this.size,this.size),e.lineTo(0,.5*this.size),e.lineTo(.5*this.size,this.size)}render(e,t){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,t),this._vee(e,t),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,t),this._vee(e,t),e.stroke())}_vee(e,t){e.beginPath(),e.moveTo(.5*this.size,this.size),e.lineTo(0,0),e.lineTo(-.5*this.size,this.size),e.lineTo(0,.5*this.size),e.closePath()}}ds.__name__="VeeHead",ds.init_VeeHead();class fs extends cs{constructor(e){super(e)}static init_TeeHead(){this.mixins(ni)}render(e,t){this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,t),e.beginPath(),e.moveTo(.5*this.size,0),e.lineTo(-.5*this.size,0),e.stroke())}clip(e,t){}}fs.__name__="TeeHead",fs.init_TeeHead();class ps extends rs{constructor(e){super(e)}get_view(){return this.view}static init_Selection(){this.define({indices:[Sn,[]],line_indices:[Sn,[]],multiline_indices:[Tn,{}]}),this.internal({selected_glyphs:[Sn,[]],view:[Tn],image_indices:[Sn,[]]})}initialize(){super.initialize()}get selected_glyph(){return this.selected_glyphs.length>0?this.selected_glyphs[0]:null}add_to_selected_glyphs(e){this.selected_glyphs.push(e)}update(e,t=!0,n="replace"){switch(n){case"replace":this.indices=e.indices,this.line_indices=e.line_indices,this.selected_glyphs=e.selected_glyphs,this.view=e.view,this.multiline_indices=e.multiline_indices,this.image_indices=e.image_indices;break;case"append":this.update_through_union(e);break;case"intersect":this.update_through_intersection(e);break;case"subtract":this.update_through_subtraction(e)}}clear(){this.indices=[],this.line_indices=[],this.multiline_indices={},this.view=null,this.selected_glyphs=[]}is_empty(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length}update_through_union(e){this.indices=G(this.indices,e.indices),this.selected_glyphs=G(e.selected_glyphs,this.selected_glyphs),this.line_indices=G(e.line_indices,this.line_indices),this.view=e.view,this.multiline_indices=ge(e.multiline_indices,this.multiline_indices)}update_through_intersection(e){this.indices=Y(this.indices,e.indices),this.selected_glyphs=G(e.selected_glyphs,this.selected_glyphs),this.line_indices=G(e.line_indices,this.line_indices),this.view=e.view,this.multiline_indices=ge(e.multiline_indices,this.multiline_indices)}update_through_subtraction(e){this.indices=X(this.indices,e.indices),this.selected_glyphs=G(e.selected_glyphs,this.selected_glyphs),this.line_indices=G(e.line_indices,this.line_indices),this.view=e.view,this.multiline_indices=ge(e.multiline_indices,this.multiline_indices)}}ps.__name__="Selection",ps.init_Selection();class gs extends rs{constructor(e){super(e)}static init_DataSource(){this.define({selected:[Mn,()=>new ps]})}}gs.__name__="DataSource",gs.init_DataSource();class ms extends os{get xscale(){return this.coordinates.x_scale}get yscale(){return this.coordinates.y_scale}}ms.__name__="DataRendererView";class vs extends as{constructor(e){super(e)}static init_DataRenderer(){this.override({level:"glyph"})}}vs.__name__="DataRenderer",vs.init_DataRenderer();class ys{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,t){let n=this.length++;for(this.ids[n]=e,this.values[n]=t;n>0;){const e=n-1>>1,r=this.values[e];if(t>=r)break;this.ids[n]=this.ids[e],this.values[n]=r,n=e}this.ids[n]=e,this.values[n]=t}pop(){if(0===this.length)return;const e=this.ids[0];if(this.length--,this.length>0){const e=this.ids[0]=this.ids[this.length],t=this.values[0]=this.values[this.length],n=this.length>>1;let r=0;for(;r<n;){let e=1+(r<<1);const n=e+1;let i=this.ids[e],o=this.values[e];const a=this.values[n];if(n<this.length&&a<o&&(e=n,i=this.ids[n],o=a),o>=t)break;this.ids[r]=i,this.values[r]=o,r=e}this.ids[r]=e,this.values[r]=t}return e}peek(){if(0!==this.length)return this.ids[0]}peekValue(){if(0!==this.length)return this.values[0]}}const bs=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class _s{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(251!==t)throw new Error("Data does not appear to be in a Flatbush format.");if(n>>4!=3)throw new Error(`Got v${n>>4} data when expected v3.`);const[r]=new Uint16Array(e,2,1),[i]=new Uint32Array(e,4,1);return new _s(i,r,bs[15&n],e)}constructor(e,t=16,n=Float64Array,r){if(void 0===e)throw new Error("Missing required argument: numItems.");if(isNaN(e)||e<=0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535);let i=e,o=i;this._levelBounds=[4*i];do{i=Math.ceil(i/this.nodeSize),o+=i,this._levelBounds.push(4*o)}while(1!==i);this.ArrayType=n||Float64Array,this.IndexArrayType=o<16384?Uint16Array:Uint32Array;const a=bs.indexOf(this.ArrayType),s=4*o*this.ArrayType.BYTES_PER_ELEMENT;if(a<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this._boxes=new this.ArrayType(this.data,8,4*o),this._indices=new this.IndexArrayType(this.data,8+s,o),this._pos=4*o,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+s+o*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*o),this._indices=new this.IndexArrayType(this.data,8+s,o),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+a]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e),this._queue=new ys}add(e,t,n,r){const i=this._pos>>2;return this._indices[i]=i,this._boxes[this._pos++]=e,this._boxes[this._pos++]=t,this._boxes[this._pos++]=n,this._boxes[this._pos++]=r,e<this.minX&&(this.minX=e),t<this.minY&&(this.minY=t),n>this.maxX&&(this.maxX=n),r>this.maxY&&(this.maxY=r),i}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);if(this.numItems<=this.nodeSize)return this._boxes[this._pos++]=this.minX,this._boxes[this._pos++]=this.minY,this._boxes[this._pos++]=this.maxX,void(this._boxes[this._pos++]=this.maxY);const e=this.maxX-this.minX,t=this.maxY-this.minY,n=new Uint32Array(this.numItems);for(let r=0;r<this.numItems;r++){let i=4*r;const o=this._boxes[i++],a=this._boxes[i++],s=this._boxes[i++],l=this._boxes[i++],c=Math.floor(65535*((o+s)/2-this.minX)/e),u=Math.floor(65535*((a+l)/2-this.minY)/t);n[r]=Ts(c,u)}As(n,this._boxes,this._indices,0,this.numItems-1,this.nodeSize);for(let e=0,t=0;e<this._levelBounds.length-1;e++){const n=this._levelBounds[e];for(;t<n;){const e=t;let r=1/0,i=1/0,o=-1/0,a=-1/0;for(let e=0;e<this.nodeSize&&t<n;e++)r=Math.min(r,this._boxes[t++]),i=Math.min(i,this._boxes[t++]),o=Math.max(o,this._boxes[t++]),a=Math.max(a,this._boxes[t++]);this._indices[this._pos>>2]=e,this._boxes[this._pos++]=r,this._boxes[this._pos++]=i,this._boxes[this._pos++]=o,this._boxes[this._pos++]=a}}}search(e,t,n,r,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let o=this._boxes.length-4;const a=[],s=[];for(;void 0!==o;){const l=Math.min(o+4*this.nodeSize,ws(o,this._levelBounds));for(let c=o;c<l;c+=4){const l=0|this._indices[c>>2];n<this._boxes[c]||r<this._boxes[c+1]||e>this._boxes[c+2]||t>this._boxes[c+3]||(o<4*this.numItems?(void 0===i||i(l))&&s.push(l):a.push(l))}o=a.pop()}return s}neighbors(e,t,n=1/0,r=1/0,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let o=this._boxes.length-4;const a=this._queue,s=[],l=r*r;for(;void 0!==o;){const r=Math.min(o+4*this.nodeSize,ws(o,this._levelBounds));for(let n=o;n<r;n+=4){const r=0|this._indices[n>>2],s=xs(e,this._boxes[n],this._boxes[n+2]),l=xs(t,this._boxes[n+1],this._boxes[n+3]),c=s*s+l*l;o<4*this.numItems?(void 0===i||i(r))&&a.push(-r-1,c):a.push(r,c)}for(;a.length&&a.peek()<0;){if(a.peekValue()>l)return a.clear(),s;if(s.push(-a.pop()-1),s.length===n)return a.clear(),s}o=a.pop()}return a.clear(),s}}function xs(e,t,n){return e<t?t-e:e<=n?0:e-n}function ws(e,t){let n=0,r=t.length-1;for(;n<r;){const i=n+r>>1;t[i]>e?r=i:n=i+1}return t[n]}function As(e,t,n,r,i,o){if(Math.floor(r/o)>=Math.floor(i/o))return;const a=e[r+i>>1];let s=r-1,l=i+1;for(;;){do{s++}while(e[s]<a);do{l--}while(e[l]>a);if(s>=l)break;ks(e,t,n,s,l)}As(e,t,n,r,l,o),As(e,t,n,l+1,i,o)}function ks(e,t,n,r,i){const o=e[r];e[r]=e[i],e[i]=o;const a=4*r,s=4*i,l=t[a],c=t[a+1],u=t[a+2],h=t[a+3];t[a]=t[s],t[a+1]=t[s+1],t[a+2]=t[s+2],t[a+3]=t[s+3],t[s]=l,t[s+1]=c,t[s+2]=u,t[s+3]=h;const d=n[r];n[r]=n[i],n[i]=d}function Ts(e,t){let n=e^t,r=65535^n,i=65535^(e|t),o=e&(65535^t),a=n|r>>1,s=n>>1^n,l=i>>1^r&o>>1^i,c=n&i>>1^o>>1^o;n=a,r=s,i=l,o=c,a=n&n>>2^r&r>>2,s=n&r>>2^r&(n^r)>>2,l^=n&i>>2^r&o>>2,c^=r&i>>2^(n^r)&o>>2,n=a,r=s,i=l,o=c,a=n&n>>4^r&r>>4,s=n&r>>4^r&(n^r)>>4,l^=n&i>>4^r&o>>4,c^=r&i>>4^(n^r)&o>>4,n=a,r=s,i=l,o=c,l^=n&i>>8^r&o>>8,c^=r&i>>8^(n^r)&o>>8,n=l^l>>1,r=c^c>>1;let u=e^t,h=r|65535^(u|n);return u=16711935&(u|u<<8),u=252645135&(u|u<<4),u=858993459&(u|u<<2),u=1431655765&(u|u<<1),h=16711935&(h|h<<8),h=252645135&(h|h<<4),h=858993459&(h|h<<2),h=1431655765&(h|h<<1),(h<<1|u)>>>0}function Ss(e,t){let n=0,r=t.length-1;for(;n<r;){const i=n+r>>1;t[i]>e?r=i:n=i+1}return t[n]}class Es extends _s{search_indices(e,t,n,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let i=this._boxes.length-4;const o=[],a=new pn(this.numItems);for(;void 0!==i;){const s=Math.min(i+4*this.nodeSize,Ss(i,this._levelBounds));for(let l=i;l<s;l+=4){const s=0|this._indices[l>>2];n<this._boxes[l+0]||r<this._boxes[l+1]||e>this._boxes[l+2]||t>this._boxes[l+3]||(i<4*this.numItems?a.set(s):o.push(s))}i=o.pop()}return a}}Es.__name__="_FlatBush";class Cs{constructor(e){this.index=null,e>0&&(this.index=new Es(e))}add(e,t,n,r){var i;null===(i=this.index)||void 0===i||i.add(e,t,n,r)}add_empty(){var e;null===(e=this.index)||void 0===e||e.add(1/0,1/0,-1/0,-1/0)}finish(){var e;null===(e=this.index)||void 0===e||e.finish()}_normalize(e){let{x0:t,y0:n,x1:r,y1:i}=e;return t>r&&([t,r]=[r,t]),n>i&&([n,i]=[i,n]),{x0:t,y0:n,x1:r,y1:i}}get bbox(){if(null==this.index)return{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};{const{minX:e,minY:t,maxX:n,maxY:r}=this.index;return{x0:e,y0:t,x1:n,y1:r}}}indices(e){if(null==this.index)return new pn(0);{const{x0:t,y0:n,x1:r,y1:i}=this._normalize(e);return this.index.search_indices(t,n,r,i)}}bounds(e){const t={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};for(const n of this.indices(e)){const e=this.index._boxes,r=e[4*n+0],i=e[4*n+1],o=e[4*n+2],a=e[4*n+3];o<t.x0&&(t.x0=o),r>t.x1&&(t.x1=r),a<t.y0&&(t.y0=a),i>t.y1&&(t.y1=i)}return t}}Cs.__name__="SpatialIndex";class Ms extends rs{constructor(e){super(e),this.have_updated_interactively=!1}static init_Range(){this.define({bounds:[Tn],min_interval:[Tn],max_interval:[Tn]}),this.internal({plots:[Sn,[]]})}get is_reversed(){return this.start>this.end}get is_valid(){return!isNaN(this.min)&&!isNaN(this.max)}}function Os(e,t,n=0){const r=new Map;for(let i=0;i<e.length;i++){const o=e[i];if(r.has(o))throw new Error(`duplicate factor or subfactor: ${o}`);r.set(o,{value:.5+i*(1+t)+n})}return[r,(e.length-1)*t]}function Ls(e,t,n,r=0){var i;const o=new Map,a=new Map;for(const[t,n]of e){const e=null!==(i=a.get(t))&&void 0!==i?i:[];a.set(t,[...e,n])}let s=r,l=0;for(const[e,r]of a){const i=r.length,[a,c]=Os(r,n,s);l+=c;const u=A(r.map((e=>a.get(e).value)));o.set(e,{value:u/i,mapping:a}),s+=i+t+c}return[o,(a.size-1)*t+l]}Ms.__name__="Range",Ms.init_Range();class Ds extends Ms{constructor(e){super(e)}static init_FactorRange(){this.define({factors:[Sn,[]],factor_padding:[On,0],subgroup_padding:[On,.8],group_padding:[On,1.4],range_padding:[On,0],range_padding_units:[ur,"percent"],start:[On],end:[On]}),this.internal({levels:[On],mids:[Sn,null],tops:[Sn,null]})}get min(){return this.start}get max(){return this.end}initialize(){super.initialize(),this._init(!0)}connect_signals(){super.connect_signals(),this.connect(this.properties.factors.change,(()=>this.reset())),this.connect(this.properties.factor_padding.change,(()=>this.reset())),this.connect(this.properties.group_padding.change,(()=>this.reset())),this.connect(this.properties.subgroup_padding.change,(()=>this.reset())),this.connect(this.properties.range_padding.change,(()=>this.reset())),this.connect(this.properties.range_padding_units.change,(()=>this.reset()))}reset(){this._init(!1),this.change.emit()}_lookup(e){switch(e.length){case 1:{const[t]=e,n=this._mapping.get(t);return null!=n?n.value:NaN}case 2:{const[t,n]=e,r=this._mapping.get(t);if(null!=r){const e=r.mapping.get(n);if(null!=e)return e.value}return NaN}case 3:{const[t,n,r]=e,i=this._mapping.get(t);if(null!=i){const e=i.mapping.get(n);if(null!=e){const t=e.mapping.get(r);if(null!=t)return t.value}}return NaN}default:u()}}synthetic(e){if(te(e))return e;if(re(e))return this._lookup([e]);let t=0;const n=e[e.length-1];return te(n)&&(t=n,e=e.slice(0,-1)),this._lookup(e)+t}v_synthetic(e){const t=e.length,n=new mn(t);for(let r=0;r<t;r++)n[r]=this.synthetic(e[r]);return n}_init(e){const{levels:t,mapping:n,tops:r,mids:i,inside_padding:o}=(()=>{if(k(this.factors,re)){const e=this.factors,[t,n]=Os(e,this.factor_padding);return{levels:1,mapping:t,tops:null,mids:null,inside_padding:n}}if(k(this.factors,(e=>oe(e)&&2==e.length&&re(e[0])&&re(e[1])))){const e=this.factors,[t,n]=Ls(e,this.group_padding,this.factor_padding),r=[...t.keys()];return{levels:2,mapping:t,tops:r,mids:null,inside_padding:n}}if(k(this.factors,(e=>oe(e)&&3==e.length&&re(e[0])&&re(e[1])&&re(e[2])))){const e=this.factors,[t,n]=function(e,t,n,r,i=0){var o;const a=new Map,s=new Map;for(const[t,n,r]of e){const e=null!==(o=s.get(t))&&void 0!==o?o:[];s.set(t,[...e,[n,r]])}let l=i,c=0;for(const[e,i]of s){const o=i.length,[s,u]=Ls(i,n,r,l);c+=u;const h=A(i.map((([e])=>s.get(e).value)));a.set(e,{value:h/o,mapping:s}),l+=o+t+u}return[a,(s.size-1)*t+c]}(e,this.group_padding,this.subgroup_padding,this.factor_padding),r=[...t.keys()],i=[];for(const[e,n]of t)for(const t of n.mapping.keys())i.push([e,t]);return{levels:3,mapping:t,tops:r,mids:i,inside_padding:n}}u()})();this._mapping=n,this.tops=r,this.mids=i;let a=0,s=this.factors.length+o;if("percent"==this.range_padding_units){const e=(s-a)*this.range_padding/2;a-=e,s+=e}else a-=this.range_padding,s+=this.range_padding;this.setv({start:a,end:s,levels:t},{silent:e}),"auto"==this.bounds&&this.setv({bounds:[a,s]},{silent:!0})}}Ds.__name__="FactorRange",Ds.init_FactorRange();class Is extends ka{constructor(){super(...arguments),this._index=null,this._data_size=null,this._nohit_warned=new Set}get renderer(){return this.parent}get has_webgl(){return null!=this.glglyph}get index(){const{_index:e}=this;if(null!=e)return e;throw new Error(`${this}.index_data() wasn't called`)}get data_size(){const{_data_size:e}=this;if(null!=e)return e;throw new Error(`${this}.set_data() wasn't called`)}initialize(){super.initialize(),this.visuals=new ns(this.model)}set_visuals(e,t){this.visuals.warm_cache(e,t),null!=this.glglyph&&this.glglyph.set_visuals_changed()}render(e,t,n){e.beginPath(),null!=this.glglyph&&(this.renderer.needs_webgl_blit=this.glglyph.render(e,t,n),this.renderer.needs_webgl_blit)||this._render(e,t,n)}has_finished(){return!0}notify_finished(){this.renderer.notify_finished()}_bounds(e){return e}bounds(){return this._bounds(this.index.bbox)}log_bounds(){const{x0:e,x1:t}=this.index.bounds({x0:Number.MIN_VALUE,y0:-1/0,x1:1/0,y1:1/0}),{y0:n,y1:r}=this.index.bounds({x0:-1/0,y0:Number.MIN_VALUE,x1:1/0,y1:1/0});return this._bounds({x0:e,y0:n,x1:t,y1:r})}get_anchor_point(e,t,[n,r]){if("center"===e){const[e,i]=this.scenterxy(t,n,r);return{x:e,y:i}}return null}scenterx(e,t,n){return this.scenterxy(e,t,n)[0]}scentery(e,t,n){return this.scenterxy(e,t,n)[1]}sdist(e,t,n,r="edge",i=!1){let o,a;const s=t.length;if("center"==r){const e=b(n,(e=>e/2));o=new Float64Array(s);for(let n=0;n<s;n++)o[n]=t[n]-e[n];a=new Float64Array(s);for(let n=0;n<s;n++)a[n]=t[n]+e[n]}else{o=t,a=new Float64Array(s);for(let e=0;e<s;e++)a[e]=o[e]+n[e]}const l=e.v_compute(o),c=e.v_compute(a);return b(l,i?(e,t)=>Math.ceil(Math.abs(c[t]-l[t])):(e,t)=>Math.abs(c[t]-l[t]))}draw_legend_for_index(e,t,n){}hit_test(e){switch(e.type){case"point":if(null!=this._hit_point)return this._hit_point(e);break;case"span":if(null!=this._hit_span)return this._hit_span(e);break;case"rect":if(null!=this._hit_rect)return this._hit_rect(e);break;case"poly":if(null!=this._hit_poly)return this._hit_poly(e)}return this._nohit_warned.has(e.type)||(Re.debug(`'${e.type}' selection not available for ${this.model.type}`),this._nohit_warned.add(e.type)),null}_hit_rect_against_index(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,[o,a]=this.renderer.coordinates.x_scale.r_invert(t,n),[s,l]=this.renderer.coordinates.y_scale.r_invert(r,i),c=[...this.index.indices({x0:o,x1:a,y0:s,y1:l})];return new ps({indices:c})}_project_data(){}set_data(e,t,n){var r,i;const{x_range:o,y_range:a}=this.renderer.coordinates;this._data_size=null!==(r=e.get_length())&&void 0!==r?r:1;for(const n of this.model){if(!(n instanceof Mr))continue;if(n.optional&&null==n.spec.value&&!n.dirty)continue;const r=n.attr,i=n.array(e);let s=t.select(i);if(n instanceof Ir){const e="x"==n.dimension?o:a;if(e instanceof Ds)if(n instanceof Rr)s=e.v_synthetic(s);else if(n instanceof Pr)for(let t=0;t<s.length;t++)s[t]=e.v_synthetic(s[t]);n instanceof Pr&&(s=yn.from(s))}else n instanceof Hr&&(this[`max_${r}`]=x(s));this[`_${r}`]=s}this.renderer.plot_view.model.use_map&&this._project_data(),this._set_data(n),null===(i=this.glglyph)||void 0===i||i.set_data_changed(),this.index_data()}_set_data(e){}get _index_size(){return this.data_size}index_data(){const e=new Cs(this._index_size);this._index_data(e),e.finish(),this._index=e}mask_data(){return null!=this.glglyph||null==this._mask_data?pn.all_set(this.data_size):this._mask_data()}map_data(){var e;const t=this,{x_scale:n,y_scale:r}=this.renderer.coordinates;for(const e of this.model)if(e instanceof Ir){const i="x"==e.dimension?n:r;let o=t[`_${e.attr}`];if(o instanceof yn){const e=i.v_compute(o.array);o=new yn(o.offsets,e)}else o=i.v_compute(o);this[`s${e.attr}`]=o}this._map_data(),null===(e=this.glglyph)||void 0===e||e.set_data_changed()}_map_data(){}}Is.__name__="GlyphView";class Rs extends rs{constructor(e){super(e)}static init_Glyph(){}}Rs.__name__="Glyph",Rs.init_Glyph();class Ps extends Is{_project_data(){zo.project_xy(this._x,this._y)}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++){const t=this._x[n],r=this._y[n];isNaN(t+r)||!isFinite(t+r)?e.add_empty():e.add(t,r,t,r)}}scenterxy(e){return[this.sx[e],this.sy[e]]}}Ps.__name__="XYGlyphView";class Ns extends Rs{constructor(e){super(e)}static init_XYGlyph(){this.define({x:[zr,{field:"x"}],y:[Fr,{field:"y"}]})}}function zs(e,t,n,r){let i=!1,o=n[n.length-1],a=r[r.length-1];for(let s=0;s<n.length;s++){const l=n[s],c=r[s];a<t!=c<t&&o+(t-a)/(c-a)*(l-o)<e&&(i=!i),o=l,a=c}return i}function Fs(e,t,n,r,i,o,a){return((Math.cos(n)/i)**2+(Math.sin(n)/r)**2)*(e-o)**2+2*Math.cos(n)*Math.sin(n)*((1/i)**2-(1/r)**2)*(e-o)*(t-a)+((Math.cos(n)/r)**2+(Math.sin(n)/i)**2)*(t-a)**2<=1}function Bs(e,t){return(e.x-t.x)**2+(e.y-t.y)**2}function js(e,t,n){const r=Bs(t,n);if(0==r)return Bs(e,t);const i=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/r;return Bs(e,i<0?t:i>1?n:{x:t.x+i*(n.x-t.x),y:t.y+i*(n.y-t.y)})}function Us(e,t,n){return Math.sqrt(js(e,t,n))}function Vs(e,t,{x0:n,x1:r,y0:i,y1:o},a){t.save(),t.beginPath(),t.moveTo(n,(i+o)/2),t.lineTo(r,(i+o)/2),e.line.doit&&(e.line.set_vectorize(t,a),t.stroke()),t.restore()}function qs(e,t,{x0:n,x1:r,y0:i,y1:o},a){const s=.1*Math.abs(r-n),l=.1*Math.abs(o-i),c=n+s,u=r-s,h=i+l,d=o-l;e.fill.doit&&(e.fill.set_vectorize(t,a),t.fillRect(c,h,u-c,d-h)),null!=e.hatch&&e.hatch.doit&&(e.hatch.set_vectorize(t,a),t.fillRect(c,h,u-c,d-h)),e.line&&e.line.doit&&(t.beginPath(),t.rect(c,h,u-c,d-h),e.line.set_vectorize(t,a),t.stroke())}function Hs(e,t,n,r,i,o){const{sx:a,sy:s}=t;let l,c,u,h;"point"==t.type?([u,h]=e.yscale.r_invert(s-1,s+1),[l,c]=e.xscale.r_invert(a-1,a+1)):"v"==t.direction?([u,h]=e.yscale.r_invert(s,s),[l,c]=[Math.min(n-1,i-1),Math.max(n+1,i+1)]):([l,c]=e.xscale.r_invert(a,a),[u,h]=[Math.min(r-1,o-1),Math.max(r+1,o+1)]);const{x:d,y:f}=function(e,t,n,r,i,o,a,s){const l=(s-o)*(n-e)-(a-i)*(r-t);if(0==l)return{hit:!1,x:null,y:null};{let c=t-o,u=e-i;const h=(n-e)*c-(r-t)*u;return c=((a-i)*c-(s-o)*u)/l,u=h/l,{hit:c>0&&c<1&&u>0&&u<1,x:e+c*(n-e),y:t+c*(r-t)}}}(l,u,c,h,n,r,i,o);return[d,f]}Ns.__name__="XYGlyph",Ns.init_XYGlyph();class $s{constructor(e){this.gl=e,this._usage=35048,this.buffer_size=0,this.handle=this.gl.createBuffer()}delete(){this.gl.deleteBuffer(this.handle)}activate(){this.gl.bindBuffer(this._target,this.handle)}deactivate(){this.gl.bindBuffer(this._target,null)}set_size(e){e!=this.buffer_size&&(this.activate(),this.gl.bufferData(this._target,e,this._usage),this.buffer_size=e)}set_data(e,t){this.activate(),this.gl.bufferSubData(this._target,e,t)}}$s.__name__="Buffer";class Ws extends $s{constructor(){super(...arguments),this._target=34962}}Ws.__name__="VertexBuffer";class Gs extends $s{constructor(){super(...arguments),this._target=34963}}Gs.__name__="IndexBuffer";class Ys{constructor(e){this.gl=e,this.UTYPEMAP={float:"uniform1fv",vec2:"uniform2fv",vec3:"uniform3fv",vec4:"uniform4fv",int:"uniform1iv",ivec2:"uniform2iv",ivec3:"uniform3iv",ivec4:"uniform4iv",bool:"uniform1iv",bvec2:"uniform2iv",bvec3:"uniform3iv",bvec4:"uniform4iv",mat2:"uniformMatrix2fv",mat3:"uniformMatrix3fv",mat4:"uniformMatrix4fv",sampler1D:"uniform1i",sampler2D:"uniform1i",sampler3D:"uniform1i"},this.ATYPEMAP={float:"vertexAttrib1f",vec2:"vertexAttrib2f",vec3:"vertexAttrib3f",vec4:"vertexAttrib4f"},this.ATYPEINFO={float:[1,5126],vec2:[2,5126],vec3:[3,5126],vec4:[4,5126]},this._linked=!1,this._validated=!1,this._unset_variables=new Set,this._known_invalid=new Set,this._locations=new Map,this._samplers=new Map,this._attributes=new Map,this.handle=this.gl.createProgram()}delete(){this.gl.deleteProgram(this.handle)}activate(){this.gl.useProgram(this.handle)}deactivate(){this.gl.useProgram(0)}set_shaders(e,t){const n=this.gl;this._linked=!1;const r=n.createShader(n.VERTEX_SHADER),i=n.createShader(n.FRAGMENT_SHADER),o=[[e,r,"vertex"],[t,i,"fragment"]];for(const[e,t,r]of o)if(n.shaderSource(t,e),n.compileShader(t),!n.getShaderParameter(t,n.COMPILE_STATUS)){const e=n.getShaderInfoLog(t);throw new Error(`errors in ${r} shader:\n${e}`)}if(n.attachShader(this.handle,r),n.attachShader(this.handle,i),n.linkProgram(this.handle),!n.getProgramParameter(this.handle,n.LINK_STATUS)){const e=n.getProgramInfoLog(this.handle);throw new Error(`Program link error:\n${e}`)}this._unset_variables=this._get_active_attributes_and_uniforms(),n.detachShader(this.handle,r),n.detachShader(this.handle,i),n.deleteShader(r),n.deleteShader(i),this._known_invalid.clear(),this._linked=!0}_get_active_attributes_and_uniforms(){const e=this.gl;this._locations.clear();const t=new RegExp("(\\w+)\\s*(\\[(\\d+)\\])\\s*"),n=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS),r=[],i=[],o=[[r,e.getProgramParameter(this.handle,e.ACTIVE_ATTRIBUTES),e.getActiveAttrib,e.getAttribLocation],[i,n,e.getActiveUniform,e.getUniformLocation]];for(const[n,r,i,a]of o)for(let o=0;o<r;o+=1){const r=i.call(e,this.handle,o),s=r.name,l=s.match(t);if(null!=l){const e=l[1];for(let t=0;t<r.size;t+=1)n.push([`${e}[${t}]`,r.type])}else n.push([s,r.type]);this._locations.set(s,a.call(e,this.handle,s))}const a=new Set;for(const[e]of r)a.add(e);for(const[e]of i)a.add(e);return a}set_texture(e,t){var n;if(!this._linked)throw new Error("Cannot set uniform when program has no code");const r=null!==(n=this._locations.get(e))&&void 0!==n?n:-1;if(r<0)this._known_invalid.has(e)||(this._known_invalid.add(e),console.log(`"Variable ${e} is not an active texture`));else{this._unset_variables.has(e)&&this._unset_variables.delete(e),this.activate();{let n=this._samplers.size;this._samplers.has(e)&&(n=this._samplers.get(e)[2]),this._samplers.set(e,[t._target,t.handle,n]),this.gl.uniform1i(r,n)}}}set_uniform(e,t,n){var r;if(!this._linked)throw new Error("Cannot set uniform when program has no code");const i=null!==(r=this._locations.get(e))&&void 0!==r?r:-1;if(i<0)return void(this._known_invalid.has(e)||(this._known_invalid.add(e),console.log(`Variable ${e} is not an active uniform`)));this._unset_variables.has(e)&&this._unset_variables.delete(e);let o=1;if(!t.startsWith("mat")){const e="int"==t||"bool"==t?"float":t.replace(/^ib/,"");o=Math.floor(n.length/this.ATYPEINFO[e][0])}if(o>1)for(let t=0;t<o;t+=1)if(this._unset_variables.has(`${e}[${t}]`)){const n=`${e}[${t}]`;this._unset_variables.has(n)&&this._unset_variables.delete(n)}const a=this.UTYPEMAP[t];this.activate(),t.startsWith("mat")?this.gl[a](i,!1,n):this.gl[a](i,n)}set_attribute(e,t,n,r=0,i=0){var o;if(!this._linked)throw new Error("Cannot set attribute when program has no code");const a=null!==(o=this._locations.get(e))&&void 0!==o?o:-1;if(a<0)this._known_invalid.has(e)||(this._known_invalid.add(e),n instanceof Ws&&i>0||console.log(`Variable ${e} is not an active attribute`));else if(this._unset_variables.has(e)&&this._unset_variables.delete(e),this.activate(),n instanceof Ws){const[o,s]=this.ATYPEINFO[t],l="vertexAttribPointer",c=[o,s,!1,r,i];this._attributes.set(e,[n.handle,a,l,c])}else{const r=this.ATYPEMAP[t];this._attributes.set(e,[null,a,r,n])}}_pre_draw(){this.activate();for(const[e,t,n]of this._samplers.values())this.gl.activeTexture(this.gl.TEXTURE0+n),this.gl.bindTexture(e,t);for(const[e,t,n,r]of this._attributes.values())null!=e?(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,e),this.gl.enableVertexAttribArray(t),this.gl[n].apply(this.gl,[t,...r])):(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.gl.disableVertexAttribArray(t),this.gl[n].apply(this.gl,[t,...r]));this._validated||(this._validated=!0,this._validate())}_validate(){if(this._unset_variables.size&&console.log(`Program has unset variables: ${this._unset_variables}`),this.gl.validateProgram(this.handle),!this.gl.getProgramParameter(this.handle,this.gl.VALIDATE_STATUS))throw console.log(this.gl.getProgramInfoLog(this.handle)),new Error("Program validation error")}draw(e,t){if(!this._linked)throw new Error("Cannot draw program if code has not been set");if(t instanceof Gs){this._pre_draw(),t.activate();const n=t.buffer_size/2,r=this.gl.UNSIGNED_SHORT;this.gl.drawElements(e,n,r,0),t.deactivate()}else{const[n,r]=t;0!=r&&(this._pre_draw(),this.gl.drawArrays(e,n,r))}}}Ys.__name__="Program";class Xs{constructor(e){this.gl=e,this._target=3553,this._types={Int8Array:5120,Uint8Array:5121,Int16Array:5122,Uint16Array:5123,Int32Array:5124,Uint32Array:5125,Float32Array:5126},this.handle=this.gl.createTexture()}delete(){this.gl.deleteTexture(this.handle)}activate(){this.gl.bindTexture(this._target,this.handle)}deactivate(){this.gl.bindTexture(this._target,0)}_get_alignment(e){const t=[4,8,2,1];for(const n of t)if(e%n==0)return n;u()}set_wrapping(e,t){this.activate(),this.gl.texParameterf(this._target,this.gl.TEXTURE_WRAP_S,e),this.gl.texParameterf(this._target,this.gl.TEXTURE_WRAP_T,t)}set_interpolation(e,t){this.activate(),this.gl.texParameterf(this._target,this.gl.TEXTURE_MIN_FILTER,e),this.gl.texParameterf(this._target,this.gl.TEXTURE_MAG_FILTER,t)}set_size([e,t],n){var r,i,o;e==(null===(r=this._shape_format)||void 0===r?void 0:r.width)&&t==(null===(i=this._shape_format)||void 0===i?void 0:i.height)&&n==(null===(o=this._shape_format)||void 0===o?void 0:o.format)||(this._shape_format={width:e,height:t,format:n},this.activate(),this.gl.texImage2D(this._target,0,n,e,t,0,n,this.gl.UNSIGNED_BYTE,null))}set_data(e,[t,n],r){this.activate();const{format:i}=this._shape_format,[o,a]=e,s=this._types[r.constructor.name];if(null==s)throw new Error(`Type ${r.constructor.name} not allowed for texture`);const l=this._get_alignment(t);4!=l&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,l),this.gl.texSubImage2D(this._target,0,o,a,t,n,i,s,r),4!=l&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,4)}}Xs.__name__="Texture2d";class Zs{constructor(e,t){this.gl=e,this.glyph=t,this.nvertices=0,this.size_changed=!1,this.data_changed=!1,this.visuals_changed=!1,this.init()}set_data_changed(){const{data_size:e}=this.glyph;e!=this.nvertices&&(this.nvertices=e,this.size_changed=!0),this.data_changed=!0}set_visuals_changed(){this.visuals_changed=!0}render(e,t,n){if(0==t.length)return!0;const{width:r,height:i}=this.glyph.renderer.plot_view.canvas_view.webgl.canvas,o={pixel_ratio:this.glyph.renderer.plot_view.canvas_view.pixel_ratio,width:r,height:i};return this.draw(t,n,o),!0}}Zs.__name__="BaseGLGlyph";class Ks{constructor(e){this._atlas=new Map,this._width=256,this._height=256,this.tex=new Xs(e),this.tex.set_wrapping(e.REPEAT,e.REPEAT),this.tex.set_interpolation(e.NEAREST,e.NEAREST),this.tex.set_size([this._width,this._height],e.RGBA),this.tex.set_data([0,0],[this._width,this._height],new Uint8Array(4*this._width*this._height)),this.get_atlas_data([1])}get_atlas_data(e){const t=e.join("-");let n=this._atlas.get(t);if(null==n){const[r,i]=this.make_pattern(e),o=this._atlas.size;this.tex.set_data([0,o],[this._width,1],new Uint8Array(r.map((e=>e+10)))),n=[o/this._height,i],this._atlas.set(t,n)}return n}make_pattern(e){e.length>1&&e.length%2&&(e=e.concat(e));let t=0;for(const n of e)t+=n;const n=[];let r=0;for(let t=0,i=e.length+2;t<i;t+=2){const i=Math.max(1e-4,e[t%e.length]),o=Math.max(1e-4,e[(t+1)%e.length]);n.push(r,r+i),r+=i+o}const i=this._width,o=new Float32Array(4*i);for(let e=0,r=i;e<r;e++){let r,a,s;const l=t*e/(i-1);let c=0,u=1e16;for(let e=0,t=n.length;e<t;e++){const t=Math.abs(n[e]-l);t<u&&(c=e,u=t)}c%2==0?(s=l<=n[c]?1:0,a=n[c],r=n[c+1]):(s=l>n[c]?-1:0,a=n[c-1],r=n[c]),o[4*e+0]=n[c],o[4*e+1]=s,o[4*e+2]=a,o[4*e+3]=r}return[o,t]}}Ks.__name__="DashAtlas";const Js={miter:0,round:1,bevel:2},Qs={"":0,none:0,".":0,round:1,")":1,"(":1,o:1,"triangle in":2,"<":2,"triangle out":3,">":3,square:4,"[":4,"]":4,"=":4,butt:5,"|":5};class el extends Zs{init(){const{gl:e}=this;this._scale_aspect=0,this.prog=new Ys(e),this.prog.set_shaders("\nprecision mediump float;\n\nconst float PI = 3.14159265358979323846264;\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\n\nuniform float u_pixel_ratio;\nuniform vec2 u_canvas_size, u_offset;\nuniform vec2 u_scale_aspect;\nuniform float u_scale_length;\n\nuniform vec4 u_color;\nuniform float u_antialias;\nuniform float u_length;\nuniform float u_linewidth;\nuniform float u_dash_index;\nuniform float u_closed;\n\nattribute vec2 a_position;\nattribute vec4 a_tangents;\nattribute vec2 a_segment;\nattribute vec2 a_angles;\nattribute vec2 a_texcoord;\n\nvarying vec4 v_color;\nvarying vec2 v_segment;\nvarying vec2 v_angles;\nvarying vec2 v_texcoord;\nvarying vec2 v_miter;\nvarying float v_length;\nvarying float v_linewidth;\n\nfloat cross(in vec2 v1, in vec2 v2)\n{\n return v1.x*v2.y - v1.y*v2.x;\n}\n\nfloat signed_distance(in vec2 v1, in vec2 v2, in vec2 v3)\n{\n return cross(v2-v1,v1-v3) / length(v2-v1);\n}\n\nvoid rotate( in vec2 v, in float alpha, out vec2 result )\n{\n float c = cos(alpha);\n float s = sin(alpha);\n result = vec2( c*v.x - s*v.y,\n s*v.x + c*v.y );\n}\n\nvoid main()\n{\n bool closed = (u_closed > 0.0);\n\n // Attributes and uniforms to varyings\n v_color = u_color;\n v_linewidth = u_linewidth;\n v_segment = a_segment * u_scale_length;\n v_length = u_length * u_scale_length;\n\n // Scale to map to pixel coordinates. The original algorithm from the paper\n // assumed isotropic scale. We obviously do not have this.\n vec2 abs_scale_aspect = abs(u_scale_aspect);\n vec2 abs_scale = u_scale_length * abs_scale_aspect;\n\n // Correct angles for aspect ratio\n vec2 av;\n av = vec2(1.0, tan(a_angles.x)) / abs_scale_aspect;\n v_angles.x = atan(av.y, av.x);\n av = vec2(1.0, tan(a_angles.y)) / abs_scale_aspect;\n v_angles.y = atan(av.y, av.x);\n\n // Thickness below 1 pixel are represented using a 1 pixel thickness\n // and a modified alpha\n v_color.a = min(v_linewidth, v_color.a);\n v_linewidth = max(v_linewidth, 1.0);\n\n // If color is fully transparent we just will discard the fragment anyway\n if( v_color.a <= 0.0 ) {\n gl_Position = vec4(0.0,0.0,0.0,1.0);\n return;\n }\n\n // This is the actual half width of the line\n float w = ceil(u_antialias+v_linewidth)/2.0;\n\n vec2 position = a_position;\n\n vec2 t1 = normalize(a_tangents.xy * abs_scale_aspect); // note the scaling for aspect ratio here\n vec2 t2 = normalize(a_tangents.zw * abs_scale_aspect);\n float u = a_texcoord.x;\n float v = a_texcoord.y;\n vec2 o1 = vec2( +t1.y, -t1.x);\n vec2 o2 = vec2( +t2.y, -t2.x);\n\n // This is a join\n // your_sha256_hash\n if( t1 != t2 ) {\n float angle = atan (t1.x*t2.y-t1.y*t2.x, t1.x*t2.x+t1.y*t2.y); // Angle needs recalculation for some reason\n vec2 t = normalize(t1+t2);\n vec2 o = vec2( + t.y, - t.x);\n\n if ( u_dash_index > 0.0 )\n {\n // Broken angle\n // your_sha256_hash\n if( (abs(angle) > THETA) ) {\n position += v * w * o / cos(angle/2.0);\n float s = sign(angle);\n if( angle < 0.0 ) {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n if( v == 1.0 ) {\n position -= 2.0 * w * t1 / sin(angle);\n u -= 2.0 * w / sin(angle);\n }\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n if( v == 1.0 ) {\n position += 2.0 * w * t2 / sin(angle);\n u += 2.0*w / sin(angle);\n }\n }\n } else {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n if( v == -1.0 ) {\n position += 2.0 * w * t1 / sin(angle);\n u += 2.0 * w / sin(angle);\n }\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n if( v == -1.0 ) {\n position -= 2.0 * w * t2 / sin(angle);\n u -= 2.0*w / sin(angle);\n }\n }\n }\n // Continuous angle\n // ------------------------------------------------------------\n } else {\n position += v * w * o / cos(angle/2.0);\n if( u == +1.0 ) u = v_segment.y;\n else u = v_segment.x;\n }\n }\n\n // Solid line\n // your_sha256_hash----\n else\n {\n position.xy += v * w * o / cos(angle/2.0);\n if( angle < 0.0 ) {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n }\n } else {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n }\n }\n }\n\n // This is a line start or end (t1 == t2)\n // your_sha256_hash--------\n } else {\n position += v * w * o1;\n if( u == -1.0 ) {\n u = v_segment.x - w;\n position -= w * t1;\n } else {\n u = v_segment.y + w;\n position += w * t2;\n }\n }\n\n // Miter distance\n // your_sha256_hash--------\n vec2 t;\n vec2 curr = a_position * abs_scale;\n if( a_texcoord.x < 0.0 ) {\n vec2 next = curr + t2*(v_segment.y-v_segment.x);\n\n rotate( t1, +v_angles.x/2.0, t);\n v_miter.x = signed_distance(curr, curr+t, position);\n\n rotate( t2, +v_angles.y/2.0, t);\n v_miter.y = signed_distance(next, next+t, position);\n } else {\n vec2 prev = curr - t1*(v_segment.y-v_segment.x);\n\n rotate( t1, -v_angles.x/2.0,t);\n v_miter.x = signed_distance(prev, prev+t, position);\n\n rotate( t2, -v_angles.y/2.0,t);\n v_miter.y = signed_distance(curr, curr+t, position);\n }\n\n if (!closed && v_segment.x <= 0.0) {\n v_miter.x = 1e10;\n }\n if (!closed && v_segment.y >= v_length)\n {\n v_miter.y = 1e10;\n }\n\n v_texcoord = vec2( u, v*w );\n\n // Calculate position in device coordinates. Note that we\n // already scaled with abs scale above.\n vec2 normpos = position * sign(u_scale_aspect);\n normpos += 0.5; // make up for Bokeh's offset\n normpos /= u_canvas_size / u_pixel_ratio; // in 0..1\n gl_Position = vec4(normpos*2.0-1.0, 0.0, 1.0);\n gl_Position.y *= -1.0;\n}\n","\nprecision mediump float;\n\nconst float PI = 3.14159265358979323846264;\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\n\nuniform sampler2D u_dash_atlas;\n\nuniform vec2 u_linecaps;\nuniform float u_miter_limit;\nuniform float u_linejoin;\nuniform float u_antialias;\nuniform float u_dash_phase;\nuniform float u_dash_period;\nuniform float u_dash_index;\nuniform vec2 u_dash_caps;\nuniform float u_closed;\n\nvarying vec4 v_color;\nvarying vec2 v_segment;\nvarying vec2 v_angles;\nvarying vec2 v_texcoord;\nvarying vec2 v_miter;\nvarying float v_length;\nvarying float v_linewidth;\n\n// Compute distance to cap ----------------------------------------------------\nfloat cap( int type, float dx, float dy, float t, float linewidth )\n{\n float d = 0.0;\n dx = abs(dx);\n dy = abs(dy);\n if (type == 0) discard; // None\n else if (type == 1) d = sqrt(dx*dx+dy*dy); // Round\n else if (type == 3) d = (dx+abs(dy)); // Triangle in\n else if (type == 2) d = max(abs(dy),(t+dx-abs(dy))); // Triangle out\n else if (type == 4) d = max(dx,dy); // Square\n else if (type == 5) d = max(dx+t,dy); // Butt\n return d;\n}\n\n// Compute distance to join -------------------------------------------------\nfloat join( in int type, in float d, in vec2 segment, in vec2 texcoord, in vec2 miter,\n in float linewidth )\n{\n // texcoord.x is distance from start\n // texcoord.y is distance from centerline\n // segment.x and y indicate the limits (as for texcoord.x) for this segment\n\n float dx = texcoord.x;\n\n // Round join\n if( type == 1 ) {\n if (dx < segment.x) {\n d = max(d,length( texcoord - vec2(segment.x,0.0)));\n //d = length( texcoord - vec2(segment.x,0.0));\n } else if (dx > segment.y) {\n d = max(d,length( texcoord - vec2(segment.y,0.0)));\n //d = length( texcoord - vec2(segment.y,0.0));\n }\n }\n // Bevel join\n else if ( type == 2 ) {\n if (dx < segment.x) {\n vec2 x = texcoord - vec2(segment.x,0.0);\n d = max(d, max(abs(x.x), abs(x.y)));\n\n } else if (dx > segment.y) {\n vec2 x = texcoord - vec2(segment.y,0.0);\n d = max(d, max(abs(x.x), abs(x.y)));\n }\n /* Original code for bevel which does not work for us\n if( (dx < segment.x) || (dx > segment.y) )\n d = max(d, min(abs(x.x),abs(x.y)));\n */\n }\n\n return d;\n}\n\nvoid main()\n{\n // If color is fully transparent we just discard the fragment\n if( v_color.a <= 0.0 ) {\n discard;\n }\n\n // Test if dash pattern is the solid one (0)\n bool solid = (u_dash_index == 0.0);\n\n // Test if path is closed\n bool closed = (u_closed > 0.0);\n\n vec4 color = v_color;\n float dx = v_texcoord.x;\n float dy = v_texcoord.y;\n float t = v_linewidth/2.0-u_antialias;\n float width = 1.0; //v_linewidth; original code had dashes scale with line width, we do not\n float d = 0.0;\n\n vec2 linecaps = u_linecaps;\n vec2 dash_caps = u_dash_caps;\n float line_start = 0.0;\n float line_stop = v_length;\n\n // Apply miter limit; fragments too far into the miter are simply discarded\n if( (dx < v_segment.x) || (dx > v_segment.y) ) {\n float into_miter = max(v_segment.x - dx, dx - v_segment.y);\n if (into_miter > u_miter_limit*v_linewidth/2.0)\n discard;\n }\n\n // Solid line --------------------------------------------------------------\n if( solid ) {\n d = abs(dy);\n if( (!closed) && (dx < line_start) ) {\n d = cap( int(u_linecaps.x), abs(dx), abs(dy), t, v_linewidth );\n }\n else if( (!closed) && (dx > line_stop) ) {\n d = cap( int(u_linecaps.y), abs(dx)-line_stop, abs(dy), t, v_linewidth );\n }\n else {\n d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, v_linewidth );\n }\n\n // Dash line --------------------------------------------------------------\n } else {\n float segment_start = v_segment.x;\n float segment_stop = v_segment.y;\n float segment_center= (segment_start+segment_stop)/2.0;\n float freq = u_dash_period*width;\n float u = mod( dx + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n float dash_center= tex.x * width;\n float dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n float dash_start = dx - u + _start;\n float dash_stop = dx - u + _stop;\n\n // Compute extents of the first dash (the one relative to v_segment.x)\n // Note: this could be computed in the vertex shader\n if( (dash_stop < segment_start) && (dash_caps.x != 5.0) ) {\n float u = mod(segment_start + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n dash_center= tex.x * width;\n //dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n dash_start = segment_start - u + _start;\n dash_stop = segment_start - u + _stop;\n }\n\n // Compute extents of the last dash (the one relatives to v_segment.y)\n // Note: This could be computed in the vertex shader\n else if( (dash_start > segment_stop) && (dash_caps.y != 5.0) ) {\n float u = mod(segment_stop + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n dash_center= tex.x * width;\n //dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n dash_start = segment_stop - u + _start;\n dash_stop = segment_stop - u + _stop;\n }\n\n // This test if the we are dealing with a discontinuous angle\n bool discontinuous = ((dx < segment_center) && abs(v_angles.x) > THETA) ||\n ((dx >= segment_center) && abs(v_angles.y) > THETA);\n //if( dx < line_start) discontinuous = false;\n //if( dx > line_stop) discontinuous = false;\n\n float d_join = join( int(u_linejoin), abs(dy),\n v_segment, v_texcoord, v_miter, v_linewidth );\n\n // When path is closed, we do not have room for linecaps, so we make room\n // by shortening the total length\n if (closed) {\n line_start += v_linewidth/2.0;\n line_stop -= v_linewidth/2.0;\n }\n\n // We also need to take antialias area into account\n //line_start += u_antialias;\n //line_stop -= u_antialias;\n\n // Check is dash stop is before line start\n if( dash_stop <= line_start ) {\n discard;\n }\n // Check is dash start is beyond line stop\n if( dash_start >= line_stop ) {\n discard;\n }\n\n // Check if current dash start is beyond segment stop\n if( discontinuous ) {\n // Dash start is beyond segment, we discard\n if( (dash_start > segment_stop) ) {\n discard;\n //gl_FragColor = vec4(1.0,0.0,0.0,.25); return;\n }\n\n // Dash stop is before segment, we discard\n if( (dash_stop < segment_start) ) {\n discard; //gl_FragColor = vec4(0.0,1.0,0.0,.25); return;\n }\n\n // Special case for round caps (nicer with this)\n if( dash_caps.x == 1.0 ) {\n if( (u > _stop) && (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0)) {\n discard;\n }\n }\n\n // Special case for round caps (nicer with this)\n if( dash_caps.y == 1.0 ) {\n if( (u < _start) && (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0)) {\n discard;\n }\n }\n\n // Special case for triangle caps (in & out) and square\n // We make sure the cap stop at crossing frontier\n if( (dash_caps.x != 1.0) && (dash_caps.x != 5.0) ) {\n if( (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0) ) {\n float a = v_angles.x/2.0;\n float x = (segment_start-dx)*cos(a) - dy*sin(a);\n float y = (segment_start-dx)*sin(a) + dy*cos(a);\n if( x > 0.0 ) discard;\n // We transform the cap into square to avoid holes\n dash_caps.x = 4.0;\n }\n }\n\n // Special case for triangle caps (in & out) and square\n // We make sure the cap stop at crossing frontier\n if( (dash_caps.y != 1.0) && (dash_caps.y != 5.0) ) {\n if( (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0) ) {\n float a = v_angles.y/2.0;\n float x = (dx-segment_stop)*cos(a) - dy*sin(a);\n float y = (dx-segment_stop)*sin(a) + dy*cos(a);\n if( x > 0.0 ) discard;\n // We transform the caps into square to avoid holes\n dash_caps.y = 4.0;\n }\n }\n }\n\n // Line cap at start\n if( (dx < line_start) && (dash_start < line_start) && (dash_stop > line_start) ) {\n d = cap( int(linecaps.x), dx-line_start, dy, t, v_linewidth);\n }\n // Line cap at stop\n else if( (dx > line_stop) && (dash_stop > line_stop) && (dash_start < line_stop) ) {\n d = cap( int(linecaps.y), dx-line_stop, dy, t, v_linewidth);\n }\n // Dash cap left - dash_type = -1, 0 or 1, but there may be roundoff errors\n else if( dash_type < -0.5 ) {\n d = cap( int(dash_caps.y), abs(u-dash_center), dy, t, v_linewidth);\n if( (dx > line_start) && (dx < line_stop) )\n d = max(d,d_join);\n }\n // Dash cap right\n else if( dash_type > 0.5 ) {\n d = cap( int(dash_caps.x), abs(dash_center-u), dy, t, v_linewidth);\n if( (dx > line_start) && (dx < line_stop) )\n d = max(d,d_join);\n }\n // Dash body (plain)\n else {// if( dash_type > -0.5 && dash_type < 0.5) {\n d = abs(dy);\n }\n\n // Line join\n if( (dx > line_start) && (dx < line_stop)) {\n if( (dx <= segment_start) && (dash_start <= segment_start)\n && (dash_stop >= segment_start) ) {\n d = d_join;\n // Antialias at outer border\n float angle = PI/2.+v_angles.x;\n float f = abs( (segment_start - dx)*cos(angle) - dy*sin(angle));\n d = max(f,d);\n }\n else if( (dx > segment_stop) && (dash_start <= segment_stop)\n && (dash_stop >= segment_stop) ) {\n d = d_join;\n // Antialias at outer border\n float angle = PI/2.+v_angles.y;\n float f = abs((dx - segment_stop)*cos(angle) - dy*sin(angle));\n d = max(f,d);\n }\n else if( dx < (segment_start - v_linewidth/2.)) {\n discard;\n }\n else if( dx > (segment_stop + v_linewidth/2.)) {\n discard;\n }\n }\n else if( dx < (segment_start - v_linewidth/2.)) {\n discard;\n }\n else if( dx > (segment_stop + v_linewidth/2.)) {\n discard;\n }\n }\n\n // Distance to border ------------------------------------------------------\n d = d - t;\n if( d < 0.0 ) {\n gl_FragColor = color;\n } else {\n d /= u_antialias;\n gl_FragColor = vec4(color.rgb, exp(-d*d)*color.a);\n }\n}\n"),this.index_buffer=new Gs(e),this.vbo_position=new Ws(e),this.vbo_tangents=new Ws(e),this.vbo_segment=new Ws(e),this.vbo_angles=new Ws(e),this.vbo_texcoord=new Ws(e),this.dash_atlas=new Ks(e)}draw(e,t,n){const r=t.glglyph;if(r.data_changed&&(r._set_data(),r.data_changed=!1),this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1),r._update_scale(1,1),this._scale_aspect=1,this.prog.set_attribute("a_position","vec2",r.vbo_position),this.prog.set_attribute("a_tangents","vec4",r.vbo_tangents),this.prog.set_attribute("a_segment","vec2",r.vbo_segment),this.prog.set_attribute("a_angles","vec2",r.vbo_angles),this.prog.set_attribute("a_texcoord","vec2",r.vbo_texcoord),this.prog.set_uniform("u_length","float",[r.cumsum]),this.prog.set_texture("u_dash_atlas",this.dash_atlas.tex),this.prog.set_uniform("u_pixel_ratio","float",[n.pixel_ratio]),this.prog.set_uniform("u_canvas_size","vec2",[n.width,n.height]),this.prog.set_uniform("u_scale_aspect","vec2",[1,1]),this.prog.set_uniform("u_scale_length","float",[Math.sqrt(2)]),this.I_triangles=r.I_triangles,this.I_triangles.length<65535)this.index_buffer.set_size(2*this.I_triangles.length),this.index_buffer.set_data(0,new Uint16Array(this.I_triangles)),this.prog.draw(this.gl.TRIANGLES,this.index_buffer);else{e=Array.from(this.I_triangles);const t=this.I_triangles.length,n=64008,i=[];for(let e=0,r=Math.ceil(t/n);e<r;e++)i.push([]);for(let t=0,r=e.length;t<r;t++){const r=e[t]%n;i[Math.floor(e[t]/n)].push(r)}for(let e=0,t=i.length;e<t;e++){const t=new Uint16Array(i[e]),o=e*n*4;0!==t.length&&(this.prog.set_attribute("a_position","vec2",r.vbo_position,0,2*o),this.prog.set_attribute("a_tangents","vec4",r.vbo_tangents,0,4*o),this.prog.set_attribute("a_segment","vec2",r.vbo_segment,0,2*o),this.prog.set_attribute("a_angles","vec2",r.vbo_angles,0,2*o),this.prog.set_attribute("a_texcoord","vec2",r.vbo_texcoord,0,2*o),this.index_buffer.set_size(2*t.length),this.index_buffer.set_data(0,t),this.prog.draw(this.gl.TRIANGLES,this.index_buffer))}}}_set_data(){this._bake(),this.vbo_position.set_size(4*this.V_position.length),this.vbo_position.set_data(0,this.V_position),this.vbo_tangents.set_size(4*this.V_tangents.length),this.vbo_tangents.set_data(0,this.V_tangents),this.vbo_angles.set_size(4*this.V_angles.length),this.vbo_angles.set_data(0,this.V_angles),this.vbo_texcoord.set_size(4*this.V_texcoord.length),this.vbo_texcoord.set_data(0,this.V_texcoord)}_set_visuals(){const e=Ve(this.glyph.visuals.line.line_color.value(),this.glyph.visuals.line.line_alpha.value()),t=Qs[this.glyph.visuals.line.line_cap.value()],n=Js[this.glyph.visuals.line.line_join.value()];this.prog.set_uniform("u_color","vec4",e),this.prog.set_uniform("u_linewidth","float",[this.glyph.visuals.line.line_width.value()]),this.prog.set_uniform("u_antialias","float",[.9]),this.prog.set_uniform("u_linecaps","vec2",[t,t]),this.prog.set_uniform("u_linejoin","float",[n]),this.prog.set_uniform("u_miter_limit","float",[10]);const r=this.glyph.visuals.line.line_dash.value();let i=0,o=1;r.length&&([i,o]=this.dash_atlas.get_atlas_data(r)),this.prog.set_uniform("u_dash_index","float",[i]),this.prog.set_uniform("u_dash_phase","float",[this.glyph.visuals.line.line_dash_offset.value()]),this.prog.set_uniform("u_dash_period","float",[o]),this.prog.set_uniform("u_dash_caps","vec2",[t,t]),this.prog.set_uniform("u_closed","float",[0])}_bake(){let e,t,n,r,i,o,a,s;const l=this.nvertices,c=this.glyph.sx,u=this.glyph.sy,h=a=new Float32Array(2*l),d=new Float32Array(2*l),f=s=new Float32Array(4*l);for(let e=0,t=l;e<t;e++)h[2*e+0]=c[e],h[2*e+1]=u[e];this.tangents=t=new Float32Array(2*l-2);for(let e=0,n=l-1;e<n;e++)t[2*e+0]=a[2*(e+1)+0]-a[2*e+0],t[2*e+1]=a[2*(e+1)+1]-a[2*e+1];for(let e=0,n=l-1;e<n;e++)f[4*(e+1)+0]=t[2*e+0],f[4*(e+1)+1]=t[2*e+1],f[4*e+2]=t[2*e+0],f[4*e+3]=t[2*e+1];f[0]=t[0],f[1]=t[1],f[4*(l-1)+2]=t[2*(l-2)+0],f[4*(l-1)+3]=t[2*(l-2)+1];const p=new Float32Array(l);for(let e=0,t=l;e<t;e++)p[e]=Math.atan2(s[4*e+0]*s[4*e+3]-s[4*e+1]*s[4*e+2],s[4*e+0]*s[4*e+2]+s[4*e+1]*s[4*e+3]);for(let e=0,t=l-1;e<t;e++)d[2*e+0]=p[e],d[2*e+1]=p[e+1];const g=4*l-4;this.V_position=r=new Float32Array(2*g),this.V_angles=n=new Float32Array(2*g),this.V_tangents=i=new Float32Array(4*g),this.V_texcoord=o=new Float32Array(2*g);for(let e=0,t=l;e<t;e++)for(let t=0;t<4;t++){for(let i=0;i<2;i++)r[2*(4*e+t-2)+i]=h[2*e+i],n[2*(4*e+t)+i]=d[2*e+i];for(let n=0;n<4;n++)i[4*(4*e+t-2)+n]=f[4*e+n]}for(let e=0,t=l;e<t;e++)o[2*(4*e+0)+0]=-1,o[2*(4*e+1)+0]=-1,o[2*(4*e+2)+0]=1,o[2*(4*e+3)+0]=1,o[2*(4*e+0)+1]=-1,o[2*(4*e+1)+1]=1,o[2*(4*e+2)+1]=-1,o[2*(4*e+3)+1]=1;const m=6*(l-1);this.I_triangles=e=new Uint32Array(m);for(let t=0,n=l;t<n;t++)e[6*t+0]=0+4*t,e[6*t+1]=1+4*t,e[6*t+2]=3+4*t,e[6*t+3]=2+4*t,e[6*t+4]=0+4*t,e[6*t+5]=3+4*t}_update_scale(e,t){let n;const r=this.nvertices,i=4*r-4,o=this.tangents,a=new Float32Array(r-1),s=new Float32Array(2*r);this.V_segment=n=new Float32Array(2*i);for(let n=0,i=r-1;n<i;n++)a[n]=Math.sqrt((o[2*n+0]*e)**2+(o[2*n+1]*t)**2);let l=0;for(let e=0,t=r-1;e<t;e++)l+=a[e],s[2*(e+1)+0]=l,s[2*e+1]=l;for(let e=0,t=r;e<t;e++)for(let t=0;t<4;t++)for(let r=0;r<2;r++)n[2*(4*e+t)+r]=s[2*e+r];this.cumsum=l,this.vbo_segment.set_size(4*this.V_segment.length),this.vbo_segment.set_data(0,this.V_segment)}}el.__name__="LineGL";class tl extends Ps{initialize(){super.initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;null!=e&&(this.glglyph=new el(e.gl,this))}_render(e,t,{sx:n,sy:r}){let i=!1,o=null;this.visuals.line.set_value(e);for(const a of t){if(i){if(!isFinite(n[a]+r[a])){e.stroke(),e.beginPath(),i=!1,o=a;continue}null!=o&&a-o>1&&(e.stroke(),i=!1)}i?e.lineTo(n[a],r[a]):(e.beginPath(),e.moveTo(n[a],r[a]),i=!0),o=a}i&&e.stroke()}_hit_point(e){const t=new ps,n={x:e.sx,y:e.sy};let r=9999;const i=Math.max(2,this.visuals.line.line_width.value()/2);for(let e=0,o=this.sx.length-1;e<o;e++){const o=Us(n,{x:this.sx[e],y:this.sy[e]},{x:this.sx[e+1],y:this.sy[e+1]});o<i&&o<r&&(r=o,t.add_to_selected_glyphs(this.model),t.view=this,t.line_indices=[e])}return t}_hit_span(e){const{sx:t,sy:n}=e,r=new ps;let i,o;"v"==e.direction?(i=this.renderer.yscale.invert(n),o=this._y):(i=this.renderer.xscale.invert(t),o=this._x);for(let e=0,t=o.length-1;e<t;e++)(o[e]<=i&&i<=o[e+1]||o[e+1]<=i&&i<=o[e])&&(r.add_to_selected_glyphs(this.model),r.view=this,r.line_indices.push(e));return r}get_interpolation_hit(e,t){const[n,r,i,o]=[this._x[e],this._y[e],this._x[e+1],this._y[e+1]];return Hs(this.renderer,t,n,r,i,o)}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}}tl.__name__="LineView";class nl extends Ns{constructor(e){super(e)}static init_Line(){this.prototype.default_view=tl,this.mixins(Jr)}}nl.__name__="Line",nl.init_Line();class rl extends Ps{_inner_loop(e,t,n,r,i){for(const o of t)0!=o?isNaN(n[o]+r[o])?(e.closePath(),i.apply(e),e.beginPath()):e.lineTo(n[o],r[o]):(e.beginPath(),e.moveTo(n[o],r[o]));e.closePath(),i.call(e)}_render(e,t,{sx:n,sy:r}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner_loop(e,t,n,r,e.fill)),this.visuals.hatch.doit2(e,0,(()=>this._inner_loop(e,t,n,r,e.fill)),(()=>this.renderer.request_render())),this.visuals.line.doit&&(this.visuals.line.set_value(e),this._inner_loop(e,t,n,r,e.stroke))}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}_hit_point(e){const t=new ps;return zs(e.sx,e.sy,this.sx,this.sy)&&(t.add_to_selected_glyphs(this.model),t.view=this),t}}rl.__name__="PatchView";class il extends Ns{constructor(e){super(e)}static init_Patch(){this.prototype.default_view=rl,this.mixins([Jr,Qr,ei])}}il.__name__="Patch",il.init_Patch();class ol extends Is{draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}}ol.__name__="AreaView";class al extends Rs{constructor(e){super(e)}static init_Area(){this.mixins([Qr,ii])}}al.__name__="Area",al.init_Area();class sl extends ol{_index_data(e){const{min:t,max:n}=Math,{data_size:r}=this;for(let i=0;i<r;i++){const r=this._x1[i],o=this._x2[i],a=this._y[i];isNaN(r+o+a)||!isFinite(r+o+a)?e.add_empty():e.add(t(r,o),a,n(r,o),a)}}_inner(e,t,n,r,i){e.beginPath();for(let n=0,i=t.length;n<i;n++)e.lineTo(t[n],r[n]);for(let t=n.length-1;t>=0;t--)e.lineTo(n[t],r[t]);e.closePath(),i.call(e)}_render(e,t,{sx1:n,sx2:r,sy:i}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner(e,n,r,i,e.fill)),this.visuals.hatch.doit2(e,0,(()=>this._inner(e,n,r,i,e.fill)),(()=>this.renderer.request_render()))}_hit_point(e){const t=this.sy.length,n=new mn(2*t),r=new mn(2*t);for(let e=0,i=t;e<i;e++)n[e]=this.sx1[e],r[e]=this.sy[e],n[t+e]=this.sx2[t-e-1],r[t+e]=this.sy[t-e-1];const i=new ps;return zs(e.sx,e.sy,n,r)&&(i.add_to_selected_glyphs(this.model),i.view=this),i}scenterxy(e){return[(this.sx1[e]+this.sx2[e])/2,this.sy[e]]}_map_data(){this.sx1=this.renderer.xscale.v_compute(this._x1),this.sx2=this.renderer.xscale.v_compute(this._x2),this.sy=this.renderer.yscale.v_compute(this._y)}}sl.__name__="HAreaView";class ll extends al{constructor(e){super(e)}static init_HArea(){this.prototype.default_view=sl,this.define({x1:[zr,{field:"x1"}],x2:[zr,{field:"x2"}],y:[Fr,{field:"y"}]})}}ll.__name__="HArea",ll.init_HArea();class cl extends ol{_index_data(e){const{min:t,max:n}=Math,{data_size:r}=this;for(let i=0;i<r;i++){const r=this._x[i],o=this._y1[i],a=this._y2[i];isNaN(r+o+a)||!isFinite(r+o+a)?e.add_empty():e.add(r,t(o,a),r,n(o,a))}}_inner(e,t,n,r,i){e.beginPath();for(let r=0,i=n.length;r<i;r++)e.lineTo(t[r],n[r]);for(let n=r.length-1;n>=0;n--)e.lineTo(t[n],r[n]);e.closePath(),i.call(e)}_render(e,t,{sx:n,sy1:r,sy2:i}){this.visuals.fill.doit&&(this.visuals.fill.set_value(e),this._inner(e,n,r,i,e.fill)),this.visuals.hatch.doit2(e,0,(()=>this._inner(e,n,r,i,e.fill)),(()=>this.renderer.request_render()))}scenterxy(e){return[this.sx[e],(this.sy1[e]+this.sy2[e])/2]}_hit_point(e){const t=this.sx.length,n=new mn(2*t),r=new mn(2*t);for(let e=0,i=t;e<i;e++)n[e]=this.sx[e],r[e]=this.sy1[e],n[t+e]=this.sx[t-e-1],r[t+e]=this.sy2[t-e-1];const i=new ps;return zs(e.sx,e.sy,n,r)&&(i.add_to_selected_glyphs(this.model),i.view=this),i}_map_data(){this.sx=this.renderer.xscale.v_compute(this._x),this.sy1=this.renderer.yscale.v_compute(this._y1),this.sy2=this.renderer.yscale.v_compute(this._y2)}}cl.__name__="VAreaView";class ul extends al{constructor(e){super(e)}static init_VArea(){this.prototype.default_view=cl,this.define({x:[zr,{field:"x"}],y1:[Fr,{field:"y1"}],y2:[Fr,{field:"y2"}]})}}ul.__name__="VArea",ul.init_VArea();class hl extends rs{constructor(e){super(e)}static init_CDSView(){this.define({filters:[Sn,[]],source:[Mn]}),this.internal({indices:[Tn],indices_map:[Tn,{}],masked:[Tn,null]})}initialize(){super.initialize(),this.compute_indices()}connect_signals(){super.connect_signals(),this.connect(this.properties.filters.change,(()=>this.compute_indices()));const e=()=>{const e=()=>this.compute_indices();null!=this.source&&(this.connect(this.source.change,e),this.source instanceof Ll&&(this.connect(this.source.streaming,e),this.connect(this.source.patching,e)))};let t=null!=this.source;t?e():this.connect(this.properties.source.change,(()=>{t||(e(),t=!0)}))}compute_indices(){var e;const{source:t}=this;if(null==t)return;const n=null!==(e=t.get_length())&&void 0!==e?e:1,r=pn.all_set(n);for(const e of this.filters)r.intersect(e.compute_indices(t));this.indices=r,this._indices=[...r],this.indices_map_to_subset()}indices_map_to_subset(){this.indices_map={};for(let e=0;e<this._indices.length;e++)this.indices_map[this._indices[e]]=e}convert_selection_from_subset(e){const t=e.indices.map((e=>this._indices[e]));return new ps(Object.assign(Object.assign({},e.attributes),{indices:t}))}convert_selection_to_subset(e){const t=e.indices.map((e=>this.indices_map[e]));return new ps(Object.assign(Object.assign({},e.attributes),{indices:t}))}convert_indices_from_subset(e){return e.map((e=>this._indices[e]))}}async function dl(e,t,n){const r=new e(Object.assign(Object.assign({},n),{model:t}));return r.initialize(),await r.lazy_initialize(),r}async function fl(e,t={parent:null},n=(e=>e.default_view)){const r=await dl(n(e),e,t);return r.connect_signals(),r}async function pl(e,t,n={parent:null},r=(e=>e.default_view)){const i=X([...e.keys()],t);for(const t of i)e.get(t).remove(),e.delete(t);const o=[],a=t.filter((t=>!e.has(t)));for(const t of a){const i=await dl(r(t),t,n);e.set(t,i),o.push(i)}for(const e of o)e.connect_signals();return o}function gl(e){for(const[t,n]of e)n.remove(),e.delete(t)}hl.__name__="CDSView",hl.init_CDSView();const ml={fill:{},line:{}},vl={fill:{fill_alpha:.3,fill_color:"grey"},line:{line_alpha:.3,line_color:"grey"}},yl={fill:{fill_alpha:.2},line:{}};class bl extends ms{async lazy_initialize(){await super.lazy_initialize();const e=this.model.glyph,t=F(e._mixins,"fill"),n=F(e._mixins,"line"),r=pe(e.attributes);function i(i){const o=pe(r);return t&&fe(o,i.fill),n&&fe(o,i.line),new e.constructor(o)}delete r.id,this.glyph=await this.build_glyph_view(e);let{selection_glyph:o}=this.model;null==o?o=i({fill:{},line:{}}):"auto"===o&&(o=i(ml)),this.selection_glyph=await this.build_glyph_view(o);let{nonselection_glyph:a}=this.model;null==a?a=i({fill:{},line:{}}):"auto"===a&&(a=i(yl)),this.nonselection_glyph=await this.build_glyph_view(a);const{hover_glyph:s}=this.model;null!=s&&(this.hover_glyph=await this.build_glyph_view(s));const{muted_glyph:l}=this.model;null!=l&&(this.muted_glyph=await this.build_glyph_view(l));const c=i(vl);this.decimated_glyph=await this.build_glyph_view(c),this.set_data(!1)}async build_glyph_view(e){return fl(e,{parent:this})}remove(){var e,t;this.glyph.remove(),this.selection_glyph.remove(),this.nonselection_glyph.remove(),null===(e=this.hover_glyph)||void 0===e||e.remove(),null===(t=this.muted_glyph)||void 0===t||t.remove(),this.decimated_glyph.remove(),super.remove()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.glyph.change,(()=>this.set_data())),this.connect(this.model.data_source.change,(()=>this.set_data())),this.connect(this.model.data_source.streaming,(()=>this.set_data())),this.connect(this.model.data_source.patching,(e=>this.set_data(!0,e))),this.connect(this.model.data_source.selected.change,(()=>this.request_render())),this.connect(this.model.data_source._select,(()=>this.request_render())),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,(()=>this.request_render())),this.connect(this.model.properties.view.change,(()=>this.set_data())),this.connect(this.model.view.properties.indices.change,(()=>this.set_data())),this.connect(this.model.view.properties.masked.change,(()=>this.set_visuals())),this.connect(this.model.properties.visible.change,(()=>this.plot_view.update_dataranges()));const{x_ranges:e,y_ranges:t}=this.plot_view.frame;for(const[,t]of e)t instanceof Ds&&this.connect(t.change,(()=>this.set_data()));for(const[,e]of t)e instanceof Ds&&this.connect(e.change,(()=>this.set_data()));this.connect(this.model.glyph.transformchange,(()=>this.set_data()))}_update_masked_indices(){const e=this.glyph.mask_data();return this.model.view.masked=e,e}set_data(e=!0,t=null){const n=this.model.data_source;this.all_indices=this.model.view.indices;const{all_indices:r}=this;this.glyph.set_data(n,r,t),this.set_visuals(),this._update_masked_indices();const{lod_factor:i}=this.plot_model,o=this.all_indices.count;this.decimated=new pn(o);for(let e=0;e<o;e+=i)this.decimated.set(e);this.set_data_timestamp=Date.now(),e&&this.request_render()}set_visuals(){var e,t,n,r;const i=this.model.data_source,{all_indices:o}=this;this.glyph.set_visuals(i,o),this.decimated_glyph.set_visuals(i,o),null===(e=this.selection_glyph)||void 0===e||e.set_visuals(i,o),null===(t=this.nonselection_glyph)||void 0===t||t.set_visuals(i,o),null===(n=this.hover_glyph)||void 0===n||n.set_visuals(i,o),null===(r=this.muted_glyph)||void 0===r||r.set_visuals(i,o)}get has_webgl(){return this.glyph.has_webgl}_render(){const e=this.has_webgl;this.glyph.map_data();const t=[...this.all_indices];let n=[...this._update_masked_indices()];const{ctx:r}=this.layer;r.save();const{selected:i}=this.model.data_source;let o;o=!i||i.is_empty()?[]:this.glyph instanceof tl&&i.selected_glyph===this.glyph.model?this.model.view.convert_indices_from_subset(n):i.indices;const{inspected:a}=this.model.data_source,s=new Set((()=>!a||a.is_empty()?[]:a.selected_glyph?this.model.view.convert_indices_from_subset(n):a.indices.length>0?a.indices:Object.keys(a.multiline_indices).map((e=>parseInt(e))))()),l=function(e,t){const n=e.length,r=new e.constructor(n);let i=0;for(let o=0;o<n;o++){const n=e[o];t(n,o,e)&&(r[i++]=n)}return function(e,t){return function(e,t,n,...r){const i=e.length;t<0&&(t+=i),t<0?t=0:t>i&&(t=i),null==n||n>i-t?n=i-t:n<0&&(n=0);const o=i-n+r.length,a=new e.constructor(o);let s=0;for(;s<t;s++)a[s]=e[s];for(const e of r)a[s++]=e;for(let r=t+n;r<i;r++)a[s++]=e[r];return a}(e,t,e.length-t)}(r,i)}(n,(e=>s.has(t[e]))),{lod_threshold:c}=this.plot_model;let u,h,d;if(null!=this.model.document&&this.model.document.interactive_duration()>0&&!e&&null!=c&&t.length>c?(n=[...this.decimated],u=this.decimated_glyph,h=this.decimated_glyph,d=this.selection_glyph):(u=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,h=this.nonselection_glyph,d=this.selection_glyph),null!=this.hover_glyph&&l.length&&(n=X(n,l)),o.length){const e={};for(const t of o)e[t]=!0;const i=new Array,a=new Array;if(this.glyph instanceof tl)for(const n of t)null!=e[n]?i.push(n):a.push(n);else for(const r of n)null!=e[t[r]]?i.push(r):a.push(r);h.render(r,a,this.glyph),d.render(r,i,this.glyph),null!=this.hover_glyph&&(this.glyph instanceof tl?this.hover_glyph.render(r,this.model.view.convert_indices_from_subset(l),this.glyph):this.hover_glyph.render(r,l,this.glyph))}else if(this.glyph instanceof tl)this.hover_glyph&&l.length?this.hover_glyph.render(r,this.model.view.convert_indices_from_subset(l),this.glyph):u.render(r,t,this.glyph);else if(this.glyph instanceof rl||this.glyph instanceof sl||this.glyph instanceof cl)if(0==a.selected_glyphs.length||null==this.hover_glyph)u.render(r,t,this.glyph);else for(const e of a.selected_glyphs)e==this.glyph.model&&this.hover_glyph.render(r,t,this.glyph);else u.render(r,n,this.glyph),this.hover_glyph&&l.length&&this.hover_glyph.render(r,l,this.glyph);r.restore()}draw_legend(e,t,n,r,i,o,a,s){null==s&&(s=this.model.get_reference_point(o,a)),this.glyph.draw_legend_for_index(e,{x0:t,x1:n,y0:r,y1:i},s)}hit_test(e){if(!this.model.visible)return null;const t=this.glyph.hit_test(e);return null==t?null:this.model.view.convert_selection_from_subset(t)}}bl.__name__="GlyphRendererView";class _l extends vs{constructor(e){super(e)}static init_GlyphRenderer(){this.prototype.default_view=bl,this.define({data_source:[Mn],view:[Mn,()=>new hl],glyph:[Mn],hover_glyph:[Mn],nonselection_glyph:[Tn,"auto"],selection_glyph:[Tn,"auto"],muted_glyph:[Mn],muted:[En,!1]})}initialize(){super.initialize(),null==this.view.source&&(this.view.source=this.data_source,this.view.compute_indices())}get_reference_point(e,t){let n=0;if(null!=e){const r=this.data_source.get_column(e);if(null!=r){const e=y(r,t);-1!=e&&(n=e)}}return n}get_selection_manager(){return this.data_source.selection_manager}}_l.__name__="GlyphRenderer",_l.init_GlyphRenderer();class xl extends rs{constructor(e){super(e)}_hit_test_nodes(e,t){if(!t.model.visible)return null;const n=t.node_view.glyph.hit_test(e);return null==n?null:t.node_view.model.view.convert_selection_from_subset(n)}_hit_test_edges(e,t){if(!t.model.visible)return null;const n=t.edge_view.glyph.hit_test(e);return null==n?null:t.edge_view.model.view.convert_selection_from_subset(n)}}xl.__name__="GraphHitTestPolicy";class wl extends xl{constructor(e){super(e)}hit_test(e,t){return this._hit_test_nodes(e,t)}do_selection(e,t,n,r){if(null==e)return!1;const i=t.node_renderer.data_source.selected;return i.update(e,n,r),t.node_renderer.data_source._select.emit(),!i.is_empty()}do_inspection(e,t,n,r,i){if(null==e)return!1;const o=n.model.get_selection_manager().get_or_create_inspector(n.node_view.model);return o.update(e,r,i),n.node_view.model.data_source.setv({inspected:o},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()}}wl.__name__="NodesOnly";class Al extends xl{constructor(e){super(e)}hit_test(e,t){return this._hit_test_nodes(e,t)}get_linked_edges(e,t,n){let r=[];"selection"==n?r=e.selected.indices.map((t=>e.data.index[t])):"inspection"==n&&(r=e.inspected.indices.map((t=>e.data.index[t])));const i=[];for(let e=0;e<t.data.start.length;e++)(B(r,t.data.start[e])||B(r,t.data.end[e]))&&i.push(e);const o=new ps;for(const e of i)o.multiline_indices[e]=[0];return o.indices=i,o}do_selection(e,t,n,r){if(null==e)return!1;const i=t.node_renderer.data_source.selected;i.update(e,n,r);const o=t.edge_renderer.data_source.selected,a=this.get_linked_edges(t.node_renderer.data_source,t.edge_renderer.data_source,"selection");return o.update(a,n,r),t.node_renderer.data_source._select.emit(),!i.is_empty()}do_inspection(e,t,n,r,i){if(null==e)return!1;const o=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model);o.update(e,r,i),n.node_view.model.data_source.setv({inspected:o},{silent:!0});const a=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model),s=this.get_linked_edges(n.node_view.model.data_source,n.edge_view.model.data_source,"inspection");return a.update(s,r,i),n.edge_view.model.data_source.setv({inspected:a},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()}}Al.__name__="NodesAndLinkedEdges";class kl extends xl{constructor(e){super(e)}hit_test(e,t){return this._hit_test_edges(e,t)}get_linked_nodes(e,t,n){let r=[];"selection"==n?r=t.selected.indices:"inspection"==n&&(r=t.inspected.indices);const i=[];for(const e of r)i.push(t.data.start[e]),i.push(t.data.end[e]);const o=W(i).map((t=>y(e.data.index,t)));return new ps({indices:o})}do_selection(e,t,n,r){if(null==e)return!1;const i=t.edge_renderer.data_source.selected;i.update(e,n,r);const o=t.node_renderer.data_source.selected,a=this.get_linked_nodes(t.node_renderer.data_source,t.edge_renderer.data_source,"selection");return o.update(a,n,r),t.edge_renderer.data_source._select.emit(),!i.is_empty()}do_inspection(e,t,n,r,i){if(null==e)return!1;const o=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model);o.update(e,r,i),n.edge_view.model.data_source.setv({inspected:o},{silent:!0});const a=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model),s=this.get_linked_nodes(n.node_view.model.data_source,n.edge_view.model.data_source,"inspection");return a.update(s,r,i),n.node_view.model.data_source.setv({inspected:a},{silent:!0}),n.edge_view.model.data_source.inspect.emit([n.edge_view,{geometry:t}]),!o.is_empty()}}kl.__name__="EdgesAndLinkedNodes";class Tl extends ms{async lazy_initialize(){await super.lazy_initialize();const e=this.model;let t=null,n=null;const r={v_compute(n){c(null==t);const[r]=t=e.layout_provider.get_edge_coordinates(n);return r}},i={v_compute(e){c(null!=t);const[,n]=t;return t=null,n}},o={v_compute(t){c(null==n);const[r]=n=e.layout_provider.get_node_coordinates(t);return r}},a={v_compute(e){c(null!=n);const[,t]=n;return n=null,t}},{edge_renderer:s,node_renderer:l}=this.model;s.glyph.properties.xs.internal=!0,s.glyph.properties.ys.internal=!0,l.glyph.properties.x.internal=!0,l.glyph.properties.y.internal=!0,s.glyph.xs={expr:r},s.glyph.ys={expr:i},l.glyph.x={expr:o},l.glyph.y={expr:a};const{parent:u}=this;this.edge_view=await fl(s,{parent:u}),this.node_view=await fl(l,{parent:u})}connect_signals(){super.connect_signals(),this.connect(this.model.layout_provider.change,(()=>{this.edge_view.set_data(!1),this.node_view.set_data(!1),this.request_render()}))}remove(){this.edge_view.remove(),this.node_view.remove(),super.remove()}_render(){this.edge_view.render(),this.node_view.render()}}Tl.__name__="GraphRendererView";class Sl extends vs{constructor(e){super(e)}static init_GraphRenderer(){this.prototype.default_view=Tl,this.define({layout_provider:[Mn],node_renderer:[Mn],edge_renderer:[Mn],selection_policy:[Mn,()=>new wl],inspection_policy:[Mn,()=>new wl]})}get_selection_manager(){return this.node_renderer.data_source.selection_manager}}Sl.__name__="GraphRenderer",Sl.init_GraphRenderer();class El extends Ei{constructor(e){super(e),this.inspectors=new Map}static init_SelectionManager(){this.internal({source:[Tn]})}select(e,t,n,r="replace"){const i=[],o=[];for(const t of e)t instanceof bl?i.push(t):t instanceof Tl&&o.push(t);let a=!1;for(const e of o){const i=e.model.selection_policy.hit_test(t,e);a=a||e.model.selection_policy.do_selection(i,e.model,n,r)}if(i.length>0){const e=this.source.selection_policy.hit_test(t,i);a=a||this.source.selection_policy.do_selection(e,this.source,n,r)}return a}inspect(e,t){let n=!1;if(e instanceof bl){const r=e.hit_test(t);if(null!=r){n=!r.is_empty();const i=this.get_or_create_inspector(e.model);i.update(r,!0,"replace"),this.source.setv({inspected:i},{silent:!0}),this.source.inspect.emit([e,{geometry:t}])}}else if(e instanceof Tl){const r=e.model.inspection_policy.hit_test(t,e);n=n||e.model.inspection_policy.do_inspection(r,t,e,!1,"replace")}return n}clear(e){this.source.selected.clear(),null!=e&&this.get_or_create_inspector(e.model).clear()}get_or_create_inspector(e){let t=this.inspectors.get(e);return null==t&&(t=new ps,this.inspectors.set(e,t)),t}}El.__name__="SelectionManager",El.init_SelectionManager();class Cl extends rs{do_selection(e,t,n,r){return null!==e&&(t.selected.update(e,n,r),t._select.emit(),!t.selected.is_empty())}}Cl.__name__="SelectionPolicy";class Ml extends Cl{hit_test(e,t){const n=[];for(const r of t){const t=r.hit_test(e);null!==t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_intersection(t);return e}return null}}Ml.__name__="IntersectRenderers";class Ol extends Cl{hit_test(e,t){const n=[];for(const r of t){const t=r.hit_test(e);null!==t&&n.push(t)}if(n.length>0){const e=n[0];for(const t of n)e.update_through_union(t);return e}return null}}Ol.__name__="UnionRenderers";class Ll extends gs{constructor(e){super(e)}get_array(e){let t=this.data[e];return null==t?this.data[e]=t=[]:oe(t)||(this.data[e]=t=Array.from(t)),t}static init_ColumnarDataSource(){this.define({selection_policy:[Mn,()=>new Ol]}),this.internal({selection_manager:[Mn,e=>new El({source:e})],inspected:[Mn,()=>new ps]})}initialize(){super.initialize(),this._select=new we(this,"select"),this.inspect=new xe(this,"inspect"),this.streaming=new we(this,"streaming"),this.patching=new xe(this,"patching")}get_column(e){const t=this.data[e];return null!=t?t:null}columns(){return ue(this.data)}get_length(e=!0){const t=W(he(this.data).map((e=>e.length)));switch(t.length){case 0:return null;case 1:return t[0];default:{const n="data source has columns of inconsistent lengths";if(e)return Re.warn(n),t.sort()[0];throw new Error(n)}}}get length(){var e;return null!==(e=this.get_length())&&void 0!==e?e:0}clear(){const e={};for(const t of this.columns())e[t]=new this.data[t].constructor(0);this.data=e}}function Dl(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t}function Il(e,...t){const n=new Set(e);for(const e of Dl(...t))n.delete(e);return n}Ll.__name__="ColumnarDataSource",Ll.init_ColumnarDataSource();class Rl{constructor(e){this.document=e}}Rl.__name__="DocumentEvent";class Pl extends Rl{constructor(e,t,n){super(e),this.events=t,this.setter_id=n}}Pl.__name__="DocumentEventBatch";class Nl extends Rl{}Nl.__name__="DocumentChangedEvent";class zl extends Nl{constructor(e,t,n){super(e),this.msg_type=t,this.msg_data=n}json(e){const t=this.msg_data,n=Ei._value_to_json(t),r=new Set;return Ei._value_record_references(t,r,{recursive:!0}),{kind:"MessageSent",msg_type:this.msg_type,msg_data:n}}}zl.__name__="MessageSentEvent";class Fl extends Nl{constructor(e,t,n,r,i,o,a){super(e),this.model=t,this.attr=n,this.old=r,this.new_=i,this.setter_id=o,this.hint=a}json(e){if("id"===this.attr)throw new Error("'id' field should never change, whatever code just set it is wrong");if(null!=this.hint)return this.hint.json(e);const t=this.new_,n=Ei._value_to_json(t),r=new Set;Ei._value_record_references(t,r,{recursive:!0}),r.has(this.model)&&this.model!==t&&r.delete(this.model);for(const t of r)e.add(t);return{kind:"ModelChanged",model:this.model.ref(),attr:this.attr,new:n}}}Fl.__name__="ModelChangedEvent";class Bl extends Nl{constructor(e,t,n){super(e),this.column_source=t,this.patches=n}json(e){return{kind:"ColumnsPatched",column_source:this.column_source,patches:this.patches}}}Bl.__name__="ColumnsPatchedEvent";class jl extends Nl{constructor(e,t,n,r){super(e),this.column_source=t,this.data=n,this.rollover=r}json(e){return{kind:"ColumnsStreamed",column_source:this.column_source,data:this.data,rollover:this.rollover}}}jl.__name__="ColumnsStreamedEvent";class Ul extends Nl{constructor(e,t,n){super(e),this.title=t,this.setter_id=n}json(e){return{kind:"TitleChanged",title:this.title}}}Ul.__name__="TitleChangedEvent";class Vl extends Nl{constructor(e,t,n){super(e),this.model=t,this.setter_id=n}json(e){return Ei._value_record_references(this.model,e,{recursive:!0}),{kind:"RootAdded",model:this.model.ref()}}}Vl.__name__="RootAddedEvent";class ql extends Nl{constructor(e,t,n){super(e),this.model=t,this.setter_id=n}json(e){return{kind:"RootRemoved",model:this.model.ref()}}}function Hl(e,t,n){if(oe(e)){const r=e.concat(t);return null!=n&&r.length>n?r.slice(-n):r}if(se(e)){const r=e.length+t.length;if(null!=n&&r>n){const i=r-n,o=e.length;let a;e.length<n?(a=new e.constructor(n),a.set(e,0)):a=e;for(let e=i,t=o;e<t;e++)a[e-i]=a[e];for(let e=0,n=t.length;e<n;e++)a[e+(o-i)]=t[e];return a}{const n=new e.constructor(t);return function(e,...t){let n=e.length;for(const e of t)n+=e.length;const r=new e.constructor(n);r.set(e,0);let i=e.length;for(const e of t)r.set(e,i),i+=e.length;return r}(e,n)}}throw new Error("unsupported array types")}function $l(e,t){let n,r,i;return te(e)?(n=e,i=e+1,r=1):(n=null!=e.start?e.start:0,i=null!=e.stop?e.stop:t,r=null!=e.step?e.step:1),[n,i,r]}function Wl(e,t){const n=new Set;let r=!1;for(const[i,o]of t){let t,a,s,l;if(oe(i)){const[r]=i;n.add(r),t=e[r].shape,a=e[r],l=o,2===i.length?(t=[1,t[0]],s=[i[0],0,i[1]]):s=i}else te(i)?(l=[o],n.add(i)):(l=o,r=!0),s=[0,0,i],t=[1,e.length],a=e;let c=0;const[u,h,d]=$l(s[1],t[0]),[f,p,g]=$l(s[2],t[1]);for(let e=u;e<h;e+=d)for(let i=f;i<p;i+=g)r&&n.add(i),a[e*t[1]+i]=l[c],c++}return n}ql.__name__="RootRemovedEvent";class Gl extends Ll{constructor(e){super(e)}static init_ColumnDataSource(){this.define({data:[Tn,{}]})}stream(e,t,n){const{data:r}=this;for(const[n,i]of de(e))r[n]=Hl(r[n],i,t);if(this.setv({data:r},{silent:!0}),this.streaming.emit(),null!=this.document){const r=new jl(this.document,this.ref(),e,t);this.document._notify_change(this,"data",null,null,{setter_id:n,hint:r})}}patch(e,t){const{data:n}=this;let r=new Set;for(const[t,i]of de(e))r=Dl(r,Wl(n[t],i));if(this.setv({data:n},{silent:!0}),this.patching.emit([...r]),null!=this.document){const n=new Bl(this.document,this.ref(),e);this.document._notify_change(this,"data",null,null,{setter_id:t,hint:n})}}}Gl.__name__="ColumnDataSource",Gl.init_ColumnDataSource();class Yl extends ss{initialize(){super.initialize(),null==this.model.source&&(this.model.source=new Gl),this.set_data(this.model.source)}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.set_data(this.model.source))),this.connect(this.model.source.streaming,(()=>this.set_data(this.model.source))),this.connect(this.model.source.patching,(()=>this.set_data(this.model.source))),this.connect(this.model.source.change,(()=>this.set_data(this.model.source)))}set_data(e){super.set_data(e),this.visuals.warm_cache(e),this.plot_view.request_render()}_map_data(){const{frame:e}=this.plot_view;let t,n,r,i;return"data"==this.model.start_units?(t=this.coordinates.x_scale.v_compute(this._x_start),n=this.coordinates.y_scale.v_compute(this._y_start)):(t=e.xview.v_compute(this._x_start),n=e.yview.v_compute(this._y_start)),"data"==this.model.end_units?(r=this.coordinates.x_scale.v_compute(this._x_end),i=this.coordinates.y_scale.v_compute(this._y_end)):(r=e.xview.v_compute(this._x_end),i=e.yview.v_compute(this._y_end)),[[t,n],[r,i]]}_render(){const{ctx:e}=this.layer;e.save();const[t,n]=this._map_data();null!=this.model.end&&this._arrow_head(e,"render",this.model.end,t,n),null!=this.model.start&&this._arrow_head(e,"render",this.model.start,n,t),e.beginPath();const{x:r,y:i,width:o,height:a}=this.plot_view.frame.bbox;e.rect(r,i,o,a),null!=this.model.end&&this._arrow_head(e,"clip",this.model.end,t,n),null!=this.model.start&&this._arrow_head(e,"clip",this.model.start,n,t),e.closePath(),e.clip(),this._arrow_body(e,t,n),e.restore()}_arrow_head(e,t,n,r,i){for(let o=0,a=this._x_start.length;o<a;o++){const a=Math.PI/2+g([r[0][o],r[1][o]],[i[0][o],i[1][o]]);e.save(),e.translate(i[0][o],i[1][o]),e.rotate(a),"render"==t?n.render(e,o):"clip"==t&&n.clip(e,o),e.restore()}}_arrow_body(e,t,n){if(this.visuals.line.doit)for(let r=0,i=this._x_start.length;r<i;r++)this.visuals.line.set_vectorize(e,r),e.beginPath(),e.moveTo(t[0][r],t[1][r]),e.lineTo(n[0][r],n[1][r]),e.stroke()}}Yl.__name__="ArrowView";class Xl extends ls{constructor(e){super(e)}static init_Arrow(){this.prototype.default_view=Yl,this.mixins(ni),this.define({x_start:[$r],y_start:[$r],start_units:[yr,"data"],start:[Mn,null],x_end:[$r],y_end:[$r],end_units:[yr,"data"],end:[Mn,()=>new us({})],source:[Mn]})}}Xl.__name__="Arrow",Xl.init_Arrow();class Zl extends ss{initialize(){super.initialize(),this.set_data(this.model.source)}set_data(e){super.set_data(e),this.visuals.warm_cache(e),this.plot_view.request_render()}_map_data(){const{frame:e}=this.plot_view,t=this.model.dimension,n=this.coordinates.x_scale,r=this.coordinates.y_scale,i="height"==t?r:n,o="height"==t?n:r,a="height"==t?e.yview:e.xview,s="height"==t?e.xview:e.yview;let l,c,u;l="data"==this.model.properties.lower.units?i.v_compute(this._lower):a.v_compute(this._lower),c="data"==this.model.properties.upper.units?i.v_compute(this._upper):a.v_compute(this._upper),u="data"==this.model.properties.base.units?o.v_compute(this._base):s.v_compute(this._base);const[h,d]="height"==t?[1,0]:[0,1],f=[l,u],p=[c,u];this._lower_sx=f[h],this._lower_sy=f[d],this._upper_sx=p[h],this._upper_sy=p[d]}}Zl.__name__="UpperLowerView";class Kl extends ls{constructor(e){super(e)}static init_UpperLower(){this.define({lower:[Hr],upper:[Hr],base:[Hr],dimension:[Wn,"height"],source:[Mn,()=>new Gl]})}}Kl.__name__="UpperLower",Kl.init_UpperLower();class Jl extends Zl{connect_signals(){super.connect_signals();const e=()=>this.set_data(this.model.source);this.connect(this.model.change,e),this.connect(this.model.source.streaming,e),this.connect(this.model.source.patching,e),this.connect(this.model.source.change,e)}_render(){this._map_data();const{ctx:e}=this.layer;e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let t=0,n=this._lower_sx.length;t<n;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);for(let t=this._upper_sx.length-1;t>=0;t--)e.lineTo(this._upper_sx[t],this._upper_sy[t]);e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(e),e.fill()),e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(let t=0,n=this._lower_sx.length;t<n;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke()),e.beginPath(),e.moveTo(this._upper_sx[0],this._upper_sy[0]);for(let t=0,n=this._upper_sx.length;t<n;t++)e.lineTo(this._upper_sx[t],this._upper_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke())}}Jl.__name__="BandView";class Ql extends Kl{constructor(e){super(e)}static init_Band(){this.prototype.default_view=Jl,this.mixins([Jr,Qr]),this.override({fill_color:"#fff9ba",fill_alpha:.4,line_color:"#cccccc",line_alpha:.3})}}Ql.__name__="Band",Ql.init_Band();class ec extends ss{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_paint(this))),this.connect(this.model.data_update,(()=>this.plot_view.request_paint(this)))}_render(){if(null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom)return;const{frame:e}=this.plot_view,t=this.coordinates.x_scale,n=this.coordinates.y_scale,r=(e,t,n,r,i)=>{let o;return o=null!=e?this.model.screen?e:"data"==t?n.compute(e):r.compute(e):i,o};this.sleft=r(this.model.left,this.model.left_units,t,e.xview,e.bbox.left),this.sright=r(this.model.right,this.model.right_units,t,e.xview,e.bbox.right),this.stop=r(this.model.top,this.model.top_units,n,e.yview,e.bbox.top),this.sbottom=r(this.model.bottom,this.model.bottom_units,n,e.yview,e.bbox.bottom),this._paint_box(this.sleft,this.sright,this.sbottom,this.stop)}_paint_box(e,t,n,r){const{ctx:i}=this.layer;i.save(),i.beginPath(),i.rect(e,r,t-e,n-r),this.visuals.fill.doit&&(this.visuals.fill.set_value(i),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_value(i),i.stroke()),i.restore()}interactive_bbox(){const e=this.model.properties.line_width.value()+2.5;return new ja({x0:this.sleft-e,y0:this.stop-e,x1:this.sright+e,y1:this.sbottom+e})}interactive_hit(e,t){return null!=this.model.in_cursor&&this.interactive_bbox().contains(e,t)}cursor(e,t){return Math.abs(e-this.sleft)<3||Math.abs(e-this.sright)<3?this.model.ew_cursor:Math.abs(t-this.sbottom)<3||Math.abs(t-this.stop)<3?this.model.ns_cursor:e>this.sleft&&e<this.sright&&t>this.stop&&t<this.sbottom?this.model.in_cursor:null}}ec.__name__="BoxAnnotationView";class tc extends ls{constructor(e){super(e)}static init_BoxAnnotation(){this.prototype.default_view=ec,this.mixins([Jr,Qr]),this.define({render_mode:[pr,"canvas"],top:[On,null],top_units:[yr,"data"],bottom:[On,null],bottom_units:[yr,"data"],left:[On,null],left_units:[yr,"data"],right:[On,null],right_units:[yr,"data"]}),this.internal({screen:[En,!1],ew_cursor:[Rn,null],ns_cursor:[Rn,null],in_cursor:[Rn,null]}),this.override({fill_color:"#fff9ba",fill_alpha:.4,line_color:"#cccccc",line_alpha:.3})}initialize(){super.initialize(),this.data_update=new we(this,"data_update")}update({left:e,right:t,top:n,bottom:r}){this.setv({left:e,right:t,top:n,bottom:r,screen:!0},{silent:!0}),this.data_update.emit()}}tc.__name__="BoxAnnotation",tc.init_BoxAnnotation();class nc extends rs{constructor(e){super(e)}}nc.__name__="Ticker";class rc extends nc{constructor(e){super(e)}static init_ContinuousTicker(){this.define({num_minor_ticks:[On,5],desired_num_ticks:[On,6]})}get_ticks(e,t,n,r,i){return this.get_ticks_no_defaults(e,t,r,this.desired_num_ticks)}get_ticks_no_defaults(e,t,n,r){const i=this.get_interval(e,t,r),o=Math.floor(e/i),a=Math.ceil(t/i);let s;s=isFinite(o)&&isFinite(a)?U(o,a+1):[];const l=s.map((e=>e*i)).filter((n=>e<=n&&n<=t)),c=this.num_minor_ticks,u=[];if(c>0&&l.length>0){const n=i/c,r=U(0,c).map((e=>e*n));for(const n of r.slice(1)){const r=l[0]-n;e<=r&&r<=t&&u.push(r)}for(const n of l)for(const i of r){const r=n+i;e<=r&&r<=t&&u.push(r)}}return{major:l,minor:u}}get_min_interval(){return this.min_interval}get_max_interval(){return null!=this.max_interval?this.max_interval:1/0}get_ideal_interval(e,t,n){return(t-e)/n}}rc.__name__="ContinuousTicker",rc.init_ContinuousTicker();class ic extends rc{constructor(e){super(e)}static init_AdaptiveTicker(){this.define({base:[On,10],mantissas:[Sn,[1,2,5]],min_interval:[On,0],max_interval:[On]})}initialize(){super.initialize();const e=j(this.mantissas,-1)/this.base,t=j(this.mantissas,0)*this.base;this.extended_mantissas=[e,...this.mantissas,t],this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()}get_interval(e,t,n){const r=t-e,i=this.get_ideal_interval(e,t,n),o=Math.floor(function(e,t=Math.E){return Math.log(e)/Math.log(t)}(i/this.base_factor,this.base)),a=this.base**o*this.base_factor,s=this.extended_mantissas,l=s.map((e=>Math.abs(n-r/(e*a))));return c=s[q(l)]*a,u=this.get_min_interval(),h=this.get_max_interval(),Math.max(u,Math.min(h,c));var c,u,h}}ic.__name__="AdaptiveTicker",ic.init_AdaptiveTicker();class oc extends ic{constructor(e){super(e)}}oc.__name__="BasicTicker";class ac extends rs{constructor(e){super(e)}}ac.__name__="TickFormatter";class sc extends ac{constructor(e){super(e),this.last_precision=3}static init_BasicTickFormatter(){this.define({precision:[Tn,"auto"],use_scientific:[En,!0],power_limit_high:[On,5],power_limit_low:[On,-3]})}get scientific_limit_low(){return 10**this.power_limit_low}get scientific_limit_high(){return 10**this.power_limit_high}_need_sci(e){if(!this.use_scientific)return!1;const{scientific_limit_high:t}=this,{scientific_limit_low:n}=this,r=e.length<2?0:Math.abs(e[1]-e[0])/1e4;for(const i of e){const e=Math.abs(i);if(!(e<=r)&&(e>=t||e<=n))return!0}return!1}_format_with_precision(e,t,n){const r=new Array(e.length);if(t)for(let t=0,i=e.length;t<i;t++)r[t]=e[t].toExponential(n);else for(let t=0,i=e.length;t<i;t++)r[t]=e[t].toFixed(n).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,"");return r}_auto_precision(e,t){const n=new Array(e.length),r=this.last_precision<=15;e:for(let i=this.last_precision;r?i<=15:i>=1;r?i++:i--){if(t){n[0]=e[0].toExponential(i);for(let t=1;t<e.length;t++)if(n[t]==n[t-1])continue e;this.last_precision=i;break}n[0]=e[0].toFixed(i).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,"");for(let t=1;t<e.length;t++)if(n[t]=e[t].toFixed(i).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,""),n[t]==n[t-1])continue e;this.last_precision=i;break}return this.last_precision}doFormat(e,t){if(0==e.length)return[];const n=this._need_sci(e),r="auto"==this.precision?this._auto_precision(e,n):this.precision;return this._format_with_precision(e,n,r)}}function lc(e,t){if(e.length!=t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function cc(e,t,n,r,i,o,a){for(let s=0,l=e.length;s<l;s++){let l,c,u=e[s];re(u)?l=S(t,u):(null!=i?u=null!=o?u.slice(i,o):u.slice(i):null!=o&&(u=u.slice(0,o)),l=1==u.length?S(t,u[0]):C(t,(e=>lc(e,u)))),c=l<0||l>=n.length?a:n[l],r[s]=c}}sc.__name__="BasicTickFormatter",sc.init_BasicTickFormatter();class uc extends rs{constructor(e){super(e)}}uc.__name__="Transform";class hc extends uc{constructor(e){super(e)}compute(e){throw new Error("mapping single values is not supported")}}function dc(e){return te(e)?e:("#"!=e[0]&&(e=Be(e)),9!=e.length&&(e+="ff"),parseInt(e.slice(1),16))}hc.__name__="Mapper";class fc extends hc{constructor(e){super(e)}static init_ColorMapper(){this.define({palette:[Tn],nan_color:[Cn,"gray"]})}v_compute(e){const t=new Array(e.length);return this._v_compute(e,t,this.palette,this._colors((e=>e))),t}get rgba_mapper(){const e=this,t=function(e){const t=new Uint32Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=dc(e[n]);return t}(this.palette),n=this._colors(dc);return{v_compute(r){const i=new Uint32Array(r.length);return e._v_compute(r,i,t,n),function(e){if(ki){const t=new DataView(e.buffer);for(let n=0,r=e.length;n<r;n++)t.setUint32(4*n,e[n])}return new Uint8Array(e.buffer)}(i)}}}_colors(e){return{nan_color:e(this.nan_color)}}}fc.__name__="ColorMapper",fc.init_ColorMapper();class pc extends fc{constructor(e){super(e)}static init_CategoricalColorMapper(){this.define({factors:[Sn],start:[On,0],end:[On]})}_v_compute(e,t,n,{nan_color:r}){cc(e,this.factors,n,t,this.start,this.end,r)}}pc.__name__="CategoricalColorMapper",pc.init_CategoricalColorMapper();class gc extends hc{constructor(e){super(e)}static init_CategoricalMarkerMapper(){this.define({factors:[Sn],markers:[Sn],start:[On,0],end:[On],default_value:[ar,"circle"]})}v_compute(e){const t=new Array(e.length);return cc(e,this.factors,this.markers,t,this.start,this.end,this.default_value),t}}gc.__name__="CategoricalMarkerMapper",gc.init_CategoricalMarkerMapper();class mc extends hc{constructor(e){super(e)}static init_CategoricalPatternMapper(){this.define({factors:[Sn],patterns:[Sn],start:[On,0],end:[On],default_value:[Zn," "]})}v_compute(e){const t=new Array(e.length);return cc(e,this.factors,this.patterns,t,this.start,this.end,this.default_value),t}}mc.__name__="CategoricalPatternMapper",mc.init_CategoricalPatternMapper();class vc extends fc{constructor(e){super(e),this._scan_data=null}static init_ContinuousColorMapper(){this.define((({Number:e,String:t,Null:n,Ref:r,Color:i,Or:o,Tuple:a,Array:s})=>({high:[o(e,n),null],low:[o(e,n),null],high_color:[o(i,n),null],low_color:[o(i,n),null],domain:[s(a(r(_l),o(t,s(t)))),[]]})))}connect_signals(){super.connect_signals();const e=()=>{for(const[e]of this.domain)this.connect(e.view.change,(()=>this.update_data())),this.connect(e.data_source.selected.change,(()=>this.update_data()))};this.connect(this.properties.domain.change,(()=>e())),e()}update_data(){const{domain:e,palette:t}=this,n=[...this._collect(e)];this._scan_data=this.scan(n,t.length),this.change.emit()}get metrics(){return null==this._scan_data&&this.update_data(),this._scan_data}*_collect(e){for(const[t,n]of e)for(const e of oe(n)?n:[n]){let n=t.data_source.get_column(e);n=t.view.indices.select(n);const r=t.view.masked,i=t.data_source.selected.indices;let o;if(null!=r&&i.length>0?o=Y([...r],i):null!=r?o=[...r]:i.length>0&&(o=i),null!=o&&(n=b(o,(e=>n[e]))),n.length>0&&!te(n[0]))for(const e of n)yield*e;else yield*n}}_v_compute(e,t,n,r){const{nan_color:i}=r;let{low_color:o,high_color:a}=r;null==o&&(o=n[0]),null==a&&(a=n[n.length-1]);const{domain:s}=this,l=v(s)?e:[...this._collect(s)];this._scan_data=this.scan(l,n.length);for(let r=0,s=e.length;r<s;r++){const s=e[r];isNaN(s)?t[r]=i:t[r]=this.cmap(s,n,o,a,this._scan_data)}}_colors(e){return Object.assign(Object.assign({},super._colors(e)),{low_color:null!=this.low_color?e(this.low_color):void 0,high_color:null!=this.high_color?e(this.high_color):void 0})}}vc.__name__="ContinuousColorMapper",vc.init_ContinuousColorMapper();class yc extends vc{constructor(e){super(e)}scan(e,t){const n=null!=this.low?this.low:_(e),r=null!=this.high?this.high:x(e);return{max:r,min:n,norm_factor:1/(r-n),normed_interval:1/t}}cmap(e,t,n,r,i){const o=t.length-1;if(e==i.max)return t[o];const a=(e-i.min)*i.norm_factor,s=Math.floor(a/i.normed_interval);return s<0?n:s>o?r:t[s]}}yc.__name__="LinearColorMapper";class bc extends vc{constructor(e){super(e)}scan(e,t){const n=null!=this.low?this.low:_(e),r=null!=this.high?this.high:x(e);return{max:r,min:n,scale:t/(Math.log(r)-Math.log(n))}}cmap(e,t,n,r,i){const o=t.length-1;if(e>i.max)return r;if(e==i.max)return t[o];if(e<i.min)return n;const a=Math.log(e)-Math.log(i.min);let s=Math.floor(a*i.scale);return s>o&&(s=o),t[s]}}bc.__name__="LogColorMapper";class _c extends vc{constructor(e){super(e)}cmap(e,t,n,r,i){return e<i.binning[0]?n:e>i.binning[i.binning.length-1]?r:t[I(e,i.binning)]}}_c.__name__="ScanningColorMapper";class xc extends _c{constructor(e){super(e)}static init_EqHistColorMapper(){this.define({bins:[Ln,65536]})}scan(e,t){const n=null!=this.low?this.low:_(e),r=null!=this.high?this.high:x(e),i=this.bins,o=V(n,r,i+1),a=function(e,t){const n=t.length-1,r=Array(n).fill(0);for(let i=0;i<e.length;i++)r[m(O(t,e[i])-1,0,n-1)]+=1;return r}(e,o),s=new Array(i);for(let e=0,t=o.length;e<t-1;e++){const t=o[e],n=o[e+1];s[e]=(t+n)/2}const l=function(e){const t=new e.constructor(e.length);return function(e,t,n){const r=e.length;let i,o;for(i=0,o=0;o<r;o++)i=t(i,e[o],o)}(e,((e,n,r)=>t[r]=e+n)),t}(a),c=l[l.length-1],u=b(l,(e=>e/c));let h=t-1,d=[],f=0,p=2*t;for(;h!=t&&f<4&&0!=h;){const e=p/h;if(e>1e3)break;p=Math.round(Math.max(t*e,t));d=L(U(0,p),b(u,(e=>e*(p-1))),s),h=W(d).length-1,f++}if(0==h){d=[n,r];for(let e=0;e<t-1;e++)d.push(r)}else d=d.slice(d.length-t-1),h!=t&&Re.warn("EqHistColorMapper warning: Histogram equalization did not converge.");return{min:n,max:r,binning:d}}}xc.__name__="EqHistColorMapper",xc.init_EqHistColorMapper();class wc extends uc{constructor(e){super(e)}static init_CustomJSTransform(){this.define({args:[Tn,{}],func:[Rn,""],v_func:[Rn,""]})}get names(){return ue(this.args)}get values(){return he(this.args)}_make_transform(e,t){return new Function(...this.names,e,hi(t))}get scalar_transform(){return this._make_transform("x",this.func)}get vector_transform(){return this._make_transform("xs",this.v_func)}compute(e){return this.scalar_transform(...this.values,e)}v_compute(e){return this.vector_transform(...this.values,e)}}wc.__name__="CustomJSTransform",wc.init_CustomJSTransform();class Ac extends uc{constructor(e){super(e)}static init_RangeTransform(){this.define({range:[Mn]})}v_compute(e){let t;if(this.range instanceof Ds)t=this.range.v_synthetic(e);else{if(!function(e,t){for(let n=0,r=e.length;n<r;n++)if(!t(e[n]))return!1;return!0}(e,te))throw new Error("unexpected");t=e}const n=new mn(t.length);for(let e=0;e<t.length;e++){const r=t[e];n[e]=this._compute(r)}return n}compute(e){if(this.range instanceof Ds)return this._compute(this.range.synthetic(e));if(te(e))return this._compute(e);throw new Error("unexpected")}}Ac.__name__="RangeTransform",Ac.init_RangeTransform();class kc extends Ac{constructor(e){super(e)}static init_Dodge(){this.define({value:[On,0]})}_compute(e){return e+this.value}}kc.__name__="Dodge",kc.init_Dodge();class Tc extends uc{constructor(e){super(e),this._sorted_dirty=!0}static init_Interpolator(){this.define({x:[Tn],y:[Tn],data:[Tn],clip:[En,!0]})}connect_signals(){super.connect_signals(),this.connect(this.change,(()=>this._sorted_dirty=!0))}v_compute(e){const t=new mn(e.length);for(let n=0;n<e.length;n++){const r=e[n];t[n]=this.compute(r)}return t}sort(e=!1){if(!this._sorted_dirty)return;let t,n;if(re(this.x)&&re(this.y)&&null!=this.data){const e=this.data.columns();if(!F(e,this.x))throw new Error("The x parameter does not correspond to a valid column name defined in the data parameter");if(!F(e,this.y))throw new Error("The y parameter does not correspond to a valid column name defined in the data parameter");t=this.data.get_column(this.x),n=this.data.get_column(this.y)}else{if(!oe(this.x)||!oe(this.y))throw new Error("parameters 'x' and 'y' must be both either string fields or arrays");t=this.x,n=this.y}if(t.length!==n.length)throw new Error("The length for x and y do not match");if(t.length<2)throw new Error("x and y must have at least two elements to support interpolation");const r=t.length,i=new Uint32Array(r);for(let e=0;e<r;e++)i[e]=e;const o=e?-1:1;i.sort(((e,n)=>o*(t[e]-t[n]))),this._x_sorted=new mn(r),this._y_sorted=new mn(r);for(let e=0;e<r;e++)this._x_sorted[e]=t[i[e]],this._y_sorted[e]=n[i[e]];this._sorted_dirty=!1}}Tc.__name__="Interpolator",Tc.init_Interpolator();class Sc extends Ac{constructor(e){super(e)}static init_Jitter(){this.define({mean:[On,0],width:[On,1],distribution:[Yn,"uniform"]})}v_compute(e){return null!=this.previous_values&&this.previous_values.length==e.length||(this.previous_values=super.v_compute(e)),this.previous_values}_compute(e){switch(this.distribution){case"uniform":return e+this.mean+(p()-.5)*this.width;case"normal":return e+function(e,t){let n,r;for(;n=p(),r=p(),r=(2*r-1)*Math.sqrt(1/Math.E*2),!(-4*n*n*Math.log(n)>=r*r););let i=r/n;return i=e+t*i,i}(this.mean,this.width)}}}Sc.__name__="Jitter",Sc.init_Jitter();class Ec extends Tc{constructor(e){super(e)}compute(e){if(this.sort(!1),this.clip){if(e<this._x_sorted[0]||e>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(e<this._x_sorted[0])return this._y_sorted[0];if(e>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(e==this._x_sorted[0])return this._y_sorted[0];const t=M(this._x_sorted,(t=>t<e)),n=this._x_sorted[t],r=this._x_sorted[t+1],i=this._y_sorted[t],o=this._y_sorted[t+1];return i+(e-n)/(r-n)*(o-i)}}Ec.__name__="LinearInterpolator";class Cc extends Tc{constructor(e){super(e)}static init_StepInterpolator(){this.define({mode:[_r,"after"]})}compute(e){if(this.sort(!1),this.clip){if(e<this._x_sorted[0]||e>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(e<this._x_sorted[0])return this._y_sorted[0];if(e>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}let t;switch(this.mode){case"after":t=M(this._x_sorted,(t=>e>=t));break;case"before":t=C(this._x_sorted,(t=>e<=t));break;case"center":{const n=this._x_sorted.map((t=>Math.abs(t-e))),r=_(n);t=C(n,(e=>r===e));break}default:throw new Error(`unknown mode: ${this.mode}`)}return-1!=t?this._y_sorted[t]:NaN}}Cc.__name__="StepInterpolator",Cc.init_StepInterpolator();class Mc extends uc{constructor(e){super(e)}static init_Scale(){this.internal({source_range:[Tn],target_range:[Tn]})}r_compute(e,t){return this.target_range.is_reversed?[this.compute(t),this.compute(e)]:[this.compute(e),this.compute(t)]}r_invert(e,t){return this.target_range.is_reversed?[this.invert(t),this.invert(e)]:[this.invert(e),this.invert(t)]}_linear_compute(e){const[t,n]=this._linear_compute_state();return t*e+n}_linear_v_compute(e){const[t,n]=this._linear_compute_state(),r=new mn(e.length);for(let i=0;i<e.length;i++)r[i]=t*e[i]+n;return r}_linear_invert(e){const[t,n]=this._linear_compute_state();return(e-n)/t}_linear_v_invert(e){const[t,n]=this._linear_compute_state(),r=new mn(e.length);for(let i=0;i<e.length;i++)r[i]=(e[i]-n)/t;return r}_linear_compute_state(){const e=this.source_range.start,t=this.source_range.end,n=this.target_range.start,r=(this.target_range.end-n)/(t-e);return[r,-r*e+n]}}Mc.__name__="Scale",Mc.init_Scale();class Oc extends Mc{constructor(e){super(e)}}Oc.__name__="ContinuousScale";class Lc extends Oc{constructor(e){super(e)}static init_LinearScale(){this.internal({scan_result:[Tn]})}compute(e){return this._linear_compute(e)}v_compute(e){return this._linear_v_compute(e)}invert(e){return this._linear_invert(e)}v_invert(e){return this._linear_v_invert(e)}}Lc.__name__="LinearScale",Lc.init_LinearScale();class Dc extends Mc{constructor(e){super(e)}static init_LinearInterpolationScale(){this.internal({binning:[Sn]})}compute(e){return e}v_compute(e){const t=R(e,this.source_range.start,this.source_range.end),n=R(L(t,V(0,1,this.binning.length),this.binning),this.source_range.start,this.source_range.end),r=this.target_range.end-this.target_range.start,i=b(n,(e=>this.target_range.start+e*r));return new mn(i)}invert(e){return e}v_invert(e){return new mn(e)}}Dc.__name__="LinearInterpolationScale",Dc.init_LinearInterpolationScale();class Ic extends Oc{constructor(e){super(e)}compute(e){const[t,n,r,i]=this._compute_state();let o;if(0==r)o=0;else{const a=(Math.log(e)-i)/r;o=isFinite(a)?a*t+n:NaN}return o}v_compute(e){const[t,n,r,i]=this._compute_state(),o=new mn(e.length);if(0==r)for(let t=0;t<e.length;t++)o[t]=0;else for(let a=0;a<e.length;a++){const s=(Math.log(e[a])-i)/r;let l;l=isFinite(s)?s*t+n:NaN,o[a]=l}return o}invert(e){const[t,n,r,i]=this._compute_state(),o=(e-n)/t;return Math.exp(r*o+i)}v_invert(e){const[t,n,r,i]=this._compute_state(),o=new mn(e.length);for(let a=0;a<e.length;a++){const s=(e[a]-n)/t;o[a]=Math.exp(r*s+i)}return o}_get_safe_factor(e,t){let n=e<0?0:e,r=t<0?0:t;if(n==r)if(0==n)[n,r]=[1,10];else{const e=Math.log(n)/Math.log(10);n=10**Math.floor(e),r=Math.ceil(e)!=Math.floor(e)?10**Math.ceil(e):10**(Math.ceil(e)+1)}return[n,r]}_compute_state(){const e=this.source_range.start,t=this.source_range.end,n=this.target_range.start,r=this.target_range.end-n,[i,o]=this._get_safe_factor(e,t);let a,s;return 0==i?(a=Math.log(o),s=0):(a=Math.log(o)-Math.log(i),s=Math.log(i)),[r,n,a,s]}}Ic.__name__="LogScale";class Rc extends Ms{constructor(e){super(e)}static init_Range1d(){this.define({start:[On,0],end:[On,1],reset_start:[On],reset_end:[On]})}_set_auto_bounds(){if("auto"==this.bounds){const e=Math.min(this.reset_start,this.reset_end),t=Math.max(this.reset_start,this.reset_end);this.setv({bounds:[e,t]},{silent:!0})}}initialize(){super.initialize(),null==this.reset_start&&(this.reset_start=this.start),null==this.reset_end&&(this.reset_end=this.end),this._set_auto_bounds()}get min(){return Math.min(this.start,this.end)}get max(){return Math.max(this.start,this.end)}reset(){this._set_auto_bounds(),this.start!=this.reset_start||this.end!=this.reset_end?this.setv({start:this.reset_start,end:this.reset_end}):this.change.emit()}}Rc.__name__="Range1d",Rc.init_Range1d();const Pc=new Map;function Nc(e){const t=Pc.get(e);if(null!=t)return t;const n=Uo({style:{font:e}},"Hg"),r=jo({style:{display:"inline-block",width:"1px",height:"0px"}}),i=jo({},n,r);document.body.appendChild(i);try{r.style.verticalAlign="baseline";const t=ua(r).top-ua(n).top;r.style.verticalAlign="bottom";const o=ua(r).top-ua(n).top,a={height:o,ascent:t,descent:o-t};return Pc.set(e,a),a}finally{document.body.removeChild(i)}}new Map;class zc extends ss{initialize(){super.initialize(),this._set_canvas_image()}connect_signals(){super.connect_signals(),this.connect(this.model.ticker.change,(()=>this.plot_view.request_render())),this.connect(this.model.formatter.change,(()=>this.plot_view.request_render())),null!=this.model.color_mapper&&this.connect(this.model.color_mapper.change,(()=>{this._set_canvas_image(),this.plot_view.request_render()}))}_get_size(){if(null==this.model.color_mapper)return{width:0,height:0};{const{width:e,height:t}=this.compute_legend_dimensions();return{width:e,height:t}}}_set_canvas_image(){if(null==this.model.color_mapper)return;let e,t,{palette:n}=this.model.color_mapper;switch("vertical"==this.model.orientation&&(n=K(n)),this.model.orientation){case"vertical":[e,t]=[1,n.length];break;case"horizontal":[e,t]=[n.length,1]}const r=document.createElement("canvas");r.width=e,r.height=t;const i=r.getContext("2d"),o=i.getImageData(0,0,e,t),a=new yc({palette:n}).rgba_mapper.v_compute(U(0,n.length));o.data.set(a),i.putImageData(o,0,0),this.image=r}compute_legend_dimensions(){const e=this._computed_image_dimensions(),[t,n]=[e.height,e.width],r=this._get_label_extent(),i=this._title_extent(),o=this._tick_extent(),{padding:a}=this.model;let s,l;switch(this.model.orientation){case"vertical":s=t+i+2*a,l=n+o+r+2*a;break;case"horizontal":s=t+i+o+r+2*a,l=n+2*a}return{width:l,height:s}}compute_legend_location(){const e=this.compute_legend_dimensions(),[t,n]=[e.height,e.width],r=this.model.margin,i=null!=this.panel?this.panel:this.plot_view.frame,[o,a]=i.bbox.ranges,{location:s}=this.model;let l,c;if(re(s))switch(s){case"top_left":l=o.start+r,c=a.start+r;break;case"top_center":l=(o.end+o.start)/2-n/2,c=a.start+r;break;case"top_right":l=o.end-r-n,c=a.start+r;break;case"bottom_right":l=o.end-r-n,c=a.end-r-t;break;case"bottom_center":l=(o.end+o.start)/2-n/2,c=a.end-r-t;break;case"bottom_left":l=o.start+r,c=a.end-r-t;break;case"center_left":l=o.start+r,c=(a.end+a.start)/2-t/2;break;case"center":l=(o.end+o.start)/2-n/2,c=(a.end+a.start)/2-t/2;break;case"center_right":l=o.end-r-n,c=(a.end+a.start)/2-t/2}else if(oe(s)&&2==s.length){const[e,n]=s;l=i.xview.compute(e),c=i.yview.compute(n)-t}else u();return{sx:l,sy:c}}_render(){if(null==this.model.color_mapper)return;const{ctx:e}=this.layer;e.save();const{sx:t,sy:n}=this.compute_legend_location();e.translate(t,n),this._draw_bbox(e);const r=this._get_image_offset();e.translate(r.x,r.y),this._draw_image(e);const i=this.tick_info();this._draw_major_ticks(e,i),this._draw_minor_ticks(e,i),this._draw_major_labels(e,i),this.model.title&&this._draw_title(e),e.restore()}_draw_bbox(e){const t=this.compute_legend_dimensions();e.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fillRect(0,0,t.width,t.height)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.strokeRect(0,0,t.width,t.height)),e.restore()}_draw_image(e){const t=this._computed_image_dimensions();e.save(),e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.scale_alpha,e.drawImage(this.image,0,0,t.width,t.height),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(e),e.strokeRect(0,0,t.width,t.height)),e.restore()}_draw_major_ticks(e,t){if(!this.visuals.major_tick_line.doit)return;const[n,r]=this._normals(),i=this._computed_image_dimensions(),[o,a]=[i.width*n,i.height*r],[s,l]=t.coords.major,c=this.model.major_tick_in,u=this.model.major_tick_out;e.save(),e.translate(o,a),this.visuals.major_tick_line.set_value(e);for(let t=0,i=s.length;t<i;t++)e.beginPath(),e.moveTo(Math.round(s[t]+n*u),Math.round(l[t]+r*u)),e.lineTo(Math.round(s[t]-n*c),Math.round(l[t]-r*c)),e.stroke();e.restore()}_draw_minor_ticks(e,t){if(!this.visuals.minor_tick_line.doit)return;const[n,r]=this._normals(),i=this._computed_image_dimensions(),[o,a]=[i.width*n,i.height*r],[s,l]=t.coords.minor,c=this.model.minor_tick_in,u=this.model.minor_tick_out;e.save(),e.translate(o,a),this.visuals.minor_tick_line.set_value(e);for(let t=0,i=s.length;t<i;t++)e.beginPath(),e.moveTo(Math.round(s[t]+n*u),Math.round(l[t]+r*u)),e.lineTo(Math.round(s[t]-n*c),Math.round(l[t]-r*c)),e.stroke();e.restore()}_draw_major_labels(e,t){if(!this.visuals.major_label_text.doit)return;const[n,r]=this._normals(),i=this._computed_image_dimensions(),[o,a]=[i.width*n,i.height*r],s=this.model.label_standoff+this._tick_extent(),[l,c]=[s*n,s*r],[u,h]=t.coords.major,d=t.labels.major;this.visuals.major_label_text.set_value(e),e.save(),e.translate(o+l,a+c);for(let t=0,i=u.length;t<i;t++)e.fillText(d[t],Math.round(u[t]+n*this.model.label_standoff),Math.round(h[t]+r*this.model.label_standoff));e.restore()}_draw_title(e){this.visuals.title_text.doit&&(e.save(),this.visuals.title_text.set_value(e),e.fillText(this.model.title,0,-this.model.title_standoff),e.restore())}_get_label_extent(){const e=this.tick_info().labels.major;let t;if(v(e))t=0;else{const{ctx:n}=this.layer;switch(n.save(),this.visuals.major_label_text.set_value(n),this.model.orientation){case"vertical":t=x(e.map((e=>n.measureText(e.toString()).width)));break;case"horizontal":t=Nc(this.visuals.major_label_text.font_value()).height}t+=this.model.label_standoff,n.restore()}return t}_get_image_offset(){return{x:this.model.padding,y:this.model.padding+this._title_extent()}}_normals(){return"vertical"==this.model.orientation?[1,0]:[0,1]}_title_extent(){const e=this.model.title_text_font+" "+this.model.title_text_font_size+" "+this.model.title_text_font_style;return this.model.title?Nc(e).height+this.model.title_standoff:0}_tick_extent(){return x([this.model.major_tick_out,this.model.minor_tick_out])}_computed_image_dimensions(){const e=this.plot_view.frame.bbox.height,t=this.plot_view.frame.bbox.width,n=this._title_extent();let r,i;switch(this.model.orientation){case"vertical":"auto"==this.model.height?null!=this.panel?r=e-2*this.model.padding-n:(r=x([25*this.model.color_mapper.palette.length,.3*e]),r=_([r,.8*e-2*this.model.padding-n])):r=this.model.height,i="auto"==this.model.width?25:this.model.width;break;case"horizontal":r="auto"==this.model.height?25:this.model.height,"auto"==this.model.width?null!=this.panel?i=t-2*this.model.padding:(i=x([25*this.model.color_mapper.palette.length,.3*t]),i=_([i,.8*t-2*this.model.padding])):i=this.model.width}return{width:i,height:r}}_tick_coordinate_scale(e){const t={source_range:new Rc({start:this.model.color_mapper.metrics.min,end:this.model.color_mapper.metrics.max}),target_range:new Rc({start:0,end:e})},{color_mapper:n}=this.model;if(n instanceof yc)return new Lc(t);if(n instanceof bc)return new Ic(t);if(n instanceof _c){const{binning:e}=n.metrics;return new Dc(Object.assign(Object.assign({},t),{binning:e}))}u()}_format_major_labels(e,t){const n=this.model.formatter.doFormat(e,null);for(let e=0,r=t.length;e<r;e++)t[e]in this.model.major_label_overrides&&(n[e]=this.model.major_label_overrides[t[e]]);return n}tick_info(){const e=this._computed_image_dimensions();let t;switch(this.model.orientation){case"vertical":t=e.height;break;case"horizontal":t=e.width}const n=this._tick_coordinate_scale(t),[r,i]=this._normals(),[o,a]=[this.model.color_mapper.metrics.min,this.model.color_mapper.metrics.max],s=this.model.ticker.get_ticks(o,a,null,null,this.model.ticker.desired_num_ticks),l=s.major,c=s.minor,u=[[],[]],h=[[],[]];for(let e=0,t=l.length;e<t;e++)l[e]<o||l[e]>a||(u[r].push(l[e]),u[i].push(0));for(let e=0,t=c.length;e<t;e++)c[e]<o||c[e]>a||(h[r].push(c[e]),h[i].push(0));const d={major:this._format_major_labels(u[r],l)},f={major:[[],[]],minor:[[],[]]};return f.major[r]=n.v_compute(u[r]),f.minor[r]=n.v_compute(h[r]),f.major[i]=u[i],f.minor[i]=h[i],"vertical"==this.model.orientation&&(f.major[r]=b(f.major[r],(e=>t-e)),f.minor[r]=b(f.minor[r],(e=>t-e))),{coords:f,labels:d}}}zc.__name__="ColorBarView";class Fc extends ls{constructor(e){super(e)}static init_ColorBar(){this.prototype.default_view=zc,this.mixins([["major_label_",ti],["title_",ti],["major_tick_",Jr],["minor_tick_",Jr],["border_",Jr],["bar_",Jr],["background_",Qr]]),this.define({location:[Tn,"top_right"],orientation:[lr,"vertical"],title:[Rn],title_standoff:[On,2],width:[Tn,"auto"],height:[Tn,"auto"],scale_alpha:[On,1],ticker:[Mn,()=>new oc],formatter:[Mn,()=>new sc],major_label_overrides:[Tn,{}],color_mapper:[Mn],label_standoff:[On,5],margin:[On,30],padding:[On,10],major_tick_in:[On,5],major_tick_out:[On,0],minor_tick_in:[On,0],minor_tick_out:[On,0]}),this.override({background_fill_color:"#ffffff",background_fill_alpha:.95,bar_line_color:null,border_line_color:null,major_label_text_align:"center",major_label_text_baseline:"middle",major_label_text_font_size:"11px",major_tick_line_color:"#ffffff",minor_tick_line_color:null,title_text_font_size:"13px",title_text_font_style:"italic"})}}Fc.__name__="ColorBar",Fc.init_ColorBar();class Bc extends ss{constructor(){super(...arguments),this.rotate=!0}initialize(){super.initialize(),"css"==this.model.render_mode&&(this.el=jo(),this.plot_view.canvas_view.add_overlay(this.el))}remove(){null!=this.el&&na(this.el),super.remove()}connect_signals(){super.connect_signals(),"css"==this.model.render_mode?this.connect(this.model.change,(()=>this.render())):this.connect(this.model.change,(()=>this.plot_view.request_render()))}render(){this.model.visible||"css"!=this.model.render_mode||sa(this.el),super.render()}_calculate_text_dimensions(e,t){const{width:n}=e.measureText(t),{height:r}=Nc(this.visuals.text.font_value());return[n,r]}_calculate_bounding_box_dimensions(e,t){const[n,r]=this._calculate_text_dimensions(e,t);let i,o;switch(e.textAlign){case"left":i=0;break;case"center":i=-n/2;break;case"right":i=-n;break;default:u()}switch(e.textBaseline){case"top":o=0;break;case"middle":o=-.5*r;break;case"bottom":o=-1*r;break;case"alphabetic":o=-.8*r;break;case"hanging":o=-.17*r;break;case"ideographic":o=-.83*r;break;default:u()}return[i,o,n,r]}_canvas_text(e,t,n,r,i){this.visuals.text.set_value(e);const o=this._calculate_bounding_box_dimensions(e,t);e.save(),e.beginPath(),e.translate(n,r),i&&e.rotate(i),e.rect(o[0],o[1],o[2],o[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(e),e.fillText(t,0,0)),e.restore()}_css_text(e,t,n,r,i){const{el:o}=this;c(null!=o),sa(o),this.visuals.text.set_value(e);const a=this._calculate_bounding_box_dimensions(e,t),s=this.visuals.border_line.line_dash.value().length<2?"solid":"dashed";this.visuals.border_line.set_value(e),this.visuals.background_fill.set_value(e),o.style.position="absolute",o.style.left=`${n+a[0]}px`,o.style.top=`${r+a[1]}px`,o.style.color=`${this.visuals.text.text_color.value()}`,o.style.opacity=`${this.visuals.text.text_alpha.value()}`,o.style.font=`${this.visuals.text.font_value()}`,o.style.lineHeight="normal",i&&(o.style.transform=`rotate(${i}rad)`),this.visuals.background_fill.doit&&(o.style.backgroundColor=`${this.visuals.background_fill.color_value()}`),this.visuals.border_line.doit&&(o.style.borderStyle=`${s}`,o.style.borderWidth=`${this.visuals.border_line.line_width.value()}px`,o.style.borderColor=`${this.visuals.border_line.color_value()}`),o.textContent=t,aa(o)}}Bc.__name__="TextAnnotationView";class jc extends ls{constructor(e){super(e)}static init_TextAnnotation(){this.define({render_mode:[pr,"canvas"]})}}jc.__name__="TextAnnotation",jc.init_TextAnnotation();class Uc extends Bc{initialize(){super.initialize(),this.visuals.warm_cache()}_get_size(){const{ctx:e}=this.layer;this.visuals.text.set_value(e);const{width:t,ascent:n}=e.measureText(this.model.text);return{width:t,height:n}}_render(){let e;switch(this.model.angle_units){case"rad":e=-this.model.angle;break;case"deg":e=-this.model.angle*Math.PI/180}const t=null!=this.panel?this.panel:this.plot_view.frame,n=this.coordinates.x_scale,r=this.coordinates.y_scale;let i="data"==this.model.x_units?n.compute(this.model.x):t.xview.compute(this.model.x),o="data"==this.model.y_units?r.compute(this.model.y):t.yview.compute(this.model.y);i+=this.model.x_offset,o-=this.model.y_offset,("canvas"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,this.model.text,i,o,e)}}Uc.__name__="LabelView";class Vc extends jc{constructor(e){super(e)}static init_Label(){this.prototype.default_view=Uc,this.mixins([ti,["border_",Jr],["background_",Qr]]),this.define({x:[On],x_units:[yr,"data"],y:[On],y_units:[yr,"data"],text:[Rn],angle:[Dn,0],angle_units:[Vn,"rad"],x_offset:[On,0],y_offset:[On,0]}),this.override({background_fill_color:null,border_line_color:null})}}Vc.__name__="Label",Vc.init_Label();class qc extends Bc{initialize(){if(super.initialize(),this.set_data(this.model.source),"css"==this.model.render_mode)for(let e=0,t=this._text.length;e<t;e++){const e=jo({style:{display:"none"}});this.el.appendChild(e)}}connect_signals(){super.connect_signals(),"css"==this.model.render_mode?(this.connect(this.model.change,(()=>{this.set_data(this.model.source),this.render()})),this.connect(this.model.source.streaming,(()=>{this.set_data(this.model.source),this.render()})),this.connect(this.model.source.patching,(()=>{this.set_data(this.model.source),this.render()})),this.connect(this.model.source.change,(()=>{this.set_data(this.model.source),this.render()}))):(this.connect(this.model.change,(()=>{this.set_data(this.model.source),this.plot_view.request_render()})),this.connect(this.model.source.streaming,(()=>{this.set_data(this.model.source),this.plot_view.request_render()})),this.connect(this.model.source.patching,(()=>{this.set_data(this.model.source),this.plot_view.request_render()})),this.connect(this.model.source.change,(()=>{this.set_data(this.model.source),this.plot_view.request_render()})))}set_data(e){super.set_data(e),this.visuals.warm_cache(e)}_map_data(){const e=this.coordinates.x_scale,t=this.coordinates.y_scale,n=null!=this.panel?this.panel:this.plot_view.frame;return["data"==this.model.x_units?e.v_compute(this._x):n.xview.v_compute(this._x),"data"==this.model.y_units?t.v_compute(this._y):n.yview.v_compute(this._y)]}_render(){const e="canvas"==this.model.render_mode?this._v_canvas_text.bind(this):this._v_css_text.bind(this),{ctx:t}=this.layer,[n,r]=this._map_data();for(let i=0,o=this._text.length;i<o;i++)e(t,i,this._text[i],n[i]+this._x_offset[i],r[i]-this._y_offset[i],this._angle[i])}_get_size(){const{ctx:e}=this.layer;this.visuals.text.set_value(e);const{width:t,ascent:n}=e.measureText(this._text[0]);return{width:t,height:n}}_v_canvas_text(e,t,n,r,i,o){this.visuals.text.set_vectorize(e,t);const a=this._calculate_bounding_box_dimensions(e,n);e.save(),e.beginPath(),e.translate(r,i),e.rotate(o),e.rect(a[0],a[1],a[2],a[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_vectorize(e,t),e.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_vectorize(e,t),e.stroke()),this.visuals.text.doit&&(this.visuals.text.set_vectorize(e,t),e.fillText(n,0,0)),e.restore()}_v_css_text(e,t,n,r,i,o){const a=this.el.children[t];a.textContent=n,this.visuals.text.set_vectorize(e,t);const s=this._calculate_bounding_box_dimensions(e,n),l=this.visuals.border_line.line_dash.value().length<2?"solid":"dashed";this.visuals.border_line.set_vectorize(e,t),this.visuals.background_fill.set_vectorize(e,t),a.style.position="absolute",a.style.left=`${r+s[0]}px`,a.style.top=`${i+s[1]}px`,a.style.color=`${this.visuals.text.text_color.value()}`,a.style.opacity=`${this.visuals.text.text_alpha.value()}`,a.style.font=`${this.visuals.text.font_value()}`,a.style.lineHeight="normal",o&&(a.style.transform=`rotate(${o}rad)`),this.visuals.background_fill.doit&&(a.style.backgroundColor=`${this.visuals.background_fill.color_value()}`),this.visuals.border_line.doit&&(a.style.borderStyle=`${l}`,a.style.borderWidth=`${this.visuals.border_line.line_width.value()}px`,a.style.borderColor=`${this.visuals.border_line.color_value()}`),aa(a)}}qc.__name__="LabelSetView";class Hc extends jc{constructor(e){super(e)}static init_LabelSet(){this.prototype.default_view=qc,this.mixins([oi,["border_",ni],["background_",ri]]),this.define({x:[$r],y:[$r],x_units:[yr,"data"],y_units:[yr,"data"],text:[Xr,{field:"text"}],angle:[qr,0],x_offset:[$r,{value:0}],y_offset:[$r,{value:0}],source:[Mn,()=>new Gl]}),this.override({background_fill_color:null,border_line_color:null})}}Hc.__name__="LabelSet",Hc.init_LabelSet();class $c extends ss{cursor(e,t){return"none"==this.model.click_policy?null:"pointer"}get legend_padding(){return null!=this.visuals.border_line.line_color.value()?this.model.padding:0}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_render())),this.connect(this.model.item_change,(()=>this.plot_view.request_render()))}compute_legend_bbox(){const e=this.model.get_legend_names(),{glyph_height:t,glyph_width:n}=this.model,{label_height:r,label_width:i}=this.model;this.max_label_height=x([Nc(this.visuals.label_text.font_value()).height,r,t]);const{ctx:o}=this.layer;o.save(),this.visuals.label_text.set_value(o),this.text_widths=new Map;for(const t of e)this.text_widths.set(t,x([o.measureText(t).width,i]));this.visuals.title_text.set_value(o),this.title_height=this.model.title?Nc(this.visuals.title_text.font_value()).height+this.model.title_standoff:0,this.title_width=this.model.title?o.measureText(this.model.title).width:0,o.restore();const a=Math.max(x([...this.text_widths.values()]),0),s=this.model.margin,{legend_padding:l}=this,c=this.model.spacing,{label_standoff:h}=this.model;let d,f;if("vertical"==this.model.orientation)d=e.length*this.max_label_height+Math.max(e.length-1,0)*c+2*l+this.title_height,f=x([a+n+h+2*l,this.title_width+2*l]);else{let t=2*l+Math.max(e.length-1,0)*c;for(const[,e]of this.text_widths)t+=x([e,i])+n+h;f=x([this.title_width+2*l,t]),d=this.max_label_height+this.title_height+2*l}const p=null!=this.panel?this.panel:this.plot_view.frame,[g,m]=p.bbox.ranges,{location:v}=this.model;let y,b;if(re(v))switch(v){case"top_left":y=g.start+s,b=m.start+s;break;case"top_center":y=(g.end+g.start)/2-f/2,b=m.start+s;break;case"top_right":y=g.end-s-f,b=m.start+s;break;case"bottom_right":y=g.end-s-f,b=m.end-s-d;break;case"bottom_center":y=(g.end+g.start)/2-f/2,b=m.end-s-d;break;case"bottom_left":y=g.start+s,b=m.end-s-d;break;case"center_left":y=g.start+s,b=(m.end+m.start)/2-d/2;break;case"center":y=(g.end+g.start)/2-f/2,b=(m.end+m.start)/2-d/2;break;case"center_right":y=g.end-s-f,b=(m.end+m.start)/2-d/2}else if(oe(v)&&2==v.length){const[e,t]=v;y=p.xview.compute(e),b=p.yview.compute(t)-d}else u();return new ja({left:y,top:b,width:f,height:d})}interactive_bbox(){return this.compute_legend_bbox()}interactive_hit(e,t){return this.interactive_bbox().contains(e,t)}on_hit(e,t){let n;const{glyph_width:r}=this.model,{legend_padding:i}=this,o=this.model.spacing,{label_standoff:a}=this.model;let s=n=i;const l=this.compute_legend_bbox(),c="vertical"==this.model.orientation;for(const u of this.model.items){const h=u.get_labels_list_from_label_prop();for(const d of h){const h=l.x+s,f=l.y+n+this.title_height;let p,g;if([p,g]=c?[l.width-2*i,this.max_label_height]:[this.text_widths.get(d)+r+a,this.max_label_height],new ja({left:h,top:f,width:p,height:g}).contains(e,t)){switch(this.model.click_policy){case"hide":for(const e of u.renderers)e.visible=!e.visible;break;case"mute":for(const e of u.renderers)e.muted=!e.muted}return!0}c?n+=this.max_label_height+o:s+=this.text_widths.get(d)+r+a+o}}return!1}_render(){if(0==this.model.items.length)return;for(const e of this.model.items)e.legend=this.model;const{ctx:e}=this.layer,t=this.compute_legend_bbox();e.save(),this._draw_legend_box(e,t),this._draw_legend_items(e,t),this.model.title&&this._draw_title(e,t),e.restore()}_draw_legend_box(e,t){e.beginPath(),e.rect(t.x,t.y,t.width,t.height),this.visuals.background_fill.set_value(e),e.fill(),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(e),e.stroke())}_draw_legend_items(e,t){const{glyph_width:n,glyph_height:r}=this.model,{legend_padding:i}=this,o=this.model.spacing,{label_standoff:a}=this.model;let s=i,l=i;const c="vertical"==this.model.orientation;for(const u of this.model.items){const h=u.get_labels_list_from_label_prop(),d=u.get_field_from_label_prop();if(0==h.length)continue;const f=(()=>{switch(this.model.click_policy){case"none":return!0;case"hide":return k(u.renderers,(e=>e.visible));case"mute":return k(u.renderers,(e=>!e.muted))}})();for(const p of h){const h=t.x+s,g=t.y+l+this.title_height,m=h+n,v=g+r;c?l+=this.max_label_height+o:s+=this.text_widths.get(p)+n+a+o,this.visuals.label_text.set_value(e),e.fillText(p,m+a,g+this.max_label_height/2);for(const t of u.renderers)this.plot_view.renderer_views.get(t).draw_legend(e,h,m,g,v,d,p,u.index);if(!f){let r,o;[r,o]=c?[t.width-2*i,this.max_label_height]:[this.text_widths.get(p)+n+a,this.max_label_height],e.beginPath(),e.rect(h,g,r,o),this.visuals.inactive_fill.set_value(e),e.fill()}}}}_draw_title(e,t){this.visuals.title_text.doit&&(e.save(),e.translate(t.x0,t.y0+this.title_height),this.visuals.title_text.set_value(e),e.fillText(this.model.title,this.legend_padding,this.legend_padding-this.model.title_standoff),e.restore())}_get_size(){const{width:e,height:t}=this.compute_legend_bbox();return{width:e+2*this.model.margin,height:t+2*this.model.margin}}}$c.__name__="LegendView";class Wc extends ls{constructor(e){super(e)}initialize(){super.initialize(),this.item_change=new we(this,"item_change")}static init_Legend(){this.prototype.default_view=$c,this.mixins([["label_",ti],["title_",ti],["inactive_",Qr],["border_",Jr],["background_",Qr]]),this.define({orientation:[lr,"vertical"],location:[Tn,"top_right"],title:[Rn],title_standoff:[On,5],label_standoff:[On,5],glyph_height:[On,20],glyph_width:[On,20],label_height:[On,20],label_width:[On,20],margin:[On,10],padding:[On,10],spacing:[On,3],items:[Sn,[]],click_policy:[Tn,"none"]}),this.override({border_line_color:"#e5e5e5",border_line_alpha:.5,border_line_width:1,background_fill_color:"#ffffff",background_fill_alpha:.95,inactive_fill_color:"white",inactive_fill_alpha:.7,label_text_font_size:"13px",label_text_baseline:"middle",title_text_font_size:"13px",title_text_font_style:"italic"})}get_legend_names(){const e=[];for(const t of this.items){const n=t.get_labels_list_from_label_prop();e.push(...n)}return e}}Wc.__name__="Legend",Wc.init_Legend();class Gc extends rs{constructor(e){super(e)}static init_LegendItem(){this.define({label:[Xr,null],renderers:[Sn,[]],index:[On,null]})}_check_data_sources_on_renderers(){if(null!=this.get_field_from_label_prop()){if(this.renderers.length<1)return!1;const e=this.renderers[0].data_source;if(null!=e)for(const t of this.renderers)if(t.data_source!=e)return!1}return!0}_check_field_label_on_data_source(){const e=this.get_field_from_label_prop();if(null!=e){if(this.renderers.length<1)return!1;const t=this.renderers[0].data_source;if(null!=t&&!F(t.columns(),e))return!1}return!0}initialize(){super.initialize(),this.legend=null,this.connect(this.change,(()=>{var e;return null===(e=this.legend)||void 0===e?void 0:e.item_change.emit()})),this._check_data_sources_on_renderers()||Re.error("Non matching data sources on legend item renderers"),this._check_field_label_on_data_source()||Re.error(`Bad column name on label: ${this.label}`)}get_field_from_label_prop(){const{label:e}=this;return ce(t=e)&&"field"in t?e.field:null;var t}get_labels_list_from_label_prop(){if(ce(e=this.label)&&"value"in e){const{value:e}=this.label;return null!=e?[e]:[]}var e;const t=this.get_field_from_label_prop();if(null!=t){let e;if(!this.renderers[0]||null==this.renderers[0].data_source)return["No source found"];if(e=this.renderers[0].data_source,e instanceof Ll){const n=e.get_column(t);return null!=n?W(Array.from(n)):["Invalid field"]}}return[]}}Gc.__name__="LegendItem",Gc.init_LegendItem();class Yc extends ss{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_render())),this.connect(this.model.data_update,(()=>this.plot_view.request_render()))}_render(){const{xs:e,ys:t}=this.model;if(e.length!=t.length)return;if(e.length<3||t.length<3)return;const{frame:n}=this.plot_view,{ctx:r}=this.layer;for(let i=0,o=e.length;i<o;i++){let o,a;if("screen"!=this.model.xs_units)throw new Error("not implemented");if(o=this.model.screen?e[i]:n.xview.compute(e[i]),"screen"!=this.model.ys_units)throw new Error("not implemented");a=this.model.screen?t[i]:n.yview.compute(t[i]),0==i?(r.beginPath(),r.moveTo(o,a)):r.lineTo(o,a)}r.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(r),r.stroke()),this.visuals.fill.doit&&(this.visuals.fill.set_value(r),r.fill())}}Yc.__name__="PolyAnnotationView";class Xc extends ls{constructor(e){super(e)}static init_PolyAnnotation(){this.prototype.default_view=Yc,this.mixins([Jr,Qr]),this.define({xs:[Sn,[]],xs_units:[yr,"data"],ys:[Sn,[]],ys_units:[yr,"data"]}),this.internal({screen:[En,!1]}),this.override({fill_color:"#fff9ba",fill_alpha:.4,line_color:"#cccccc",line_alpha:.3})}initialize(){super.initialize(),this.data_update=new we(this,"data_update")}update({xs:e,ys:t}){this.setv({xs:e,ys:t,screen:!0},{silent:!0}),this.data_update.emit()}}Xc.__name__="PolyAnnotation",Xc.init_PolyAnnotation();class Zc extends ss{initialize(){super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_render()))}_render(){const e=this.model.gradient,t=this.model.y_intercept;if(null==e||null==t)return;const{frame:n}=this.plot_view,r=this.coordinates.x_scale,i=this.coordinates.y_scale,o=n.bbox.top,a=o+n.bbox.height,s=(i.invert(o)-t)/e,l=(i.invert(a)-t)/e,c=r.compute(s),u=r.compute(l),{ctx:h}=this.layer;h.save(),h.beginPath(),this.visuals.line.set_value(h),h.moveTo(c,o),h.lineTo(u,a),h.stroke(),h.restore()}}Zc.__name__="SlopeView";class Kc extends ls{constructor(e){super(e)}static init_Slope(){this.prototype.default_view=Zc,this.mixins(Jr),this.define({gradient:[On,null],y_intercept:[On,null]}),this.override({line_color:"black"})}}Kc.__name__="Slope",Kc.init_Slope();class Jc extends ss{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_paint(this)))}_render(){const{location:e}=this.model;if(null==e)return;const{frame:t}=this.plot_view,n=this.coordinates.x_scale,r=this.coordinates.y_scale,i=(t,n)=>"data"==this.model.location_units?t.compute(e):this.model.for_hover?e:n.compute(e);let o,a,s,l;"width"==this.model.dimension?(s=i(r,t.yview),a=t.bbox.left,l=t.bbox.width,o=this.model.properties.line_width.value()):(s=t.bbox.top,a=i(n,t.xview),l=this.model.properties.line_width.value(),o=t.bbox.height);const{ctx:c}=this.layer;c.save(),c.beginPath(),this.visuals.line.set_value(c),c.moveTo(a,s),"width"==this.model.dimension?c.lineTo(a+l,s):c.lineTo(a,s+o),c.stroke(),c.restore()}}Jc.__name__="SpanView";class Qc extends ls{constructor(e){super(e)}static init_Span(){this.prototype.default_view=Jc,this.mixins(Jr),this.define({render_mode:[pr,"canvas"],location:[On,null],location_units:[yr,"data"],dimension:[Wn,"width"]}),this.override({line_color:"black"}),this.internal({for_hover:[En,!1]})}}Qc.__name__="Span",Qc.init_Span();class eu extends Bc{initialize(){super.initialize(),this.visuals.text=new ts(this.model)}_get_location(){const e=this.panel,t=this.model.offset;let n,r;const{bbox:i}=e;switch(e.side){case"above":case"below":switch(this.model.vertical_align){case"top":r=i.top+5;break;case"middle":r=i.vcenter;break;case"bottom":r=i.bottom-5}switch(this.model.align){case"left":n=i.left+t;break;case"center":n=i.hcenter;break;case"right":n=i.right-t}break;case"left":switch(this.model.vertical_align){case"top":n=i.left-5;break;case"middle":n=i.hcenter;break;case"bottom":n=i.right+5}switch(this.model.align){case"left":r=i.bottom-t;break;case"center":r=i.vcenter;break;case"right":r=i.top+t}break;case"right":switch(this.model.vertical_align){case"top":n=i.right-5;break;case"middle":n=i.hcenter;break;case"bottom":n=i.left+5}switch(this.model.align){case"left":r=i.top+t;break;case"center":r=i.vcenter;break;case"right":r=i.bottom-t}}return[n,r]}_render(){const{text:e}=this.model;if(null==e||0==e.length)return;this.model.text_baseline=this.model.vertical_align,this.model.text_align=this.model.align;const[t,n]=this._get_location(),r=this.panel.get_label_angle_heuristic("parallel");("canvas"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.layer.ctx,e,t,n,r)}_get_size(){const{text:e}=this.model;if(null==e||0==e.length)return{width:0,height:0};{this.visuals.text.set_value(this.layer.ctx);const{width:t,ascent:n}=this.layer.ctx.measureText(e);return{width:t,height:n*this.visuals.text.text_line_height.value()+10}}}}eu.__name__="TitleView";class tu extends jc{constructor(e){super(e)}static init_Title(){this.prototype.default_view=eu,this.mixins([["border_",Jr],["background_",Qr]]),this.define({text:[Rn],text_font:[zn,"helvetica"],text_font_size:[Xr,"13px"],text_font_style:[Xn,"bold"],text_color:[Wr,"#444444"],text_alpha:[$r,1],text_line_height:[On,1],vertical_align:[Er,"bottom"],align:[wr,"left"],offset:[On,0]}),this.override({background_fill_color:null,border_line_color:null}),this.internal({text_align:[wr,"left"],text_baseline:[Ar,"bottom"]})}}tu.__name__="Title",tu.init_Title();class nu extends ss{constructor(){super(...arguments),this.rotate=!0,this._invalidate_toolbar=!0,this._previous_bbox=new ja}initialize(){super.initialize(),this.el=jo(),this.plot_view.canvas_view.add_event(this.el)}async lazy_initialize(){this._toolbar_view=await fl(this.model.toolbar,{parent:this}),this.plot_view.visibility_callbacks.push((e=>this._toolbar_view.set_visibility(e)))}remove(){this._toolbar_view.remove(),na(this.el),super.remove()}render(){this.model.visible||sa(this.el),super.render()}_render(){const{bbox:e}=this.panel;this._previous_bbox.equals(e)||(pa(this.el,e),this._previous_bbox=e),this._invalidate_toolbar&&(this.el.style.position="absolute",this.el.style.overflow="hidden",this._toolbar_view.render(),oa(this.el),this.el.appendChild(this._toolbar_view.el),this._invalidate_toolbar=!1),aa(this.el)}_get_size(){const{tools:e,logo:t}=this.model.toolbar;return{width:30*e.length+(null!=t?25:0),height:30}}}nu.__name__="ToolbarPanelView";class ru extends ls{constructor(e){super(e)}static init_ToolbarPanel(){this.prototype.default_view=nu,this.define({toolbar:[Mn]})}}ru.__name__="ToolbarPanel",ru.init_ToolbarPanel();const iu="bk-active",ou="bk-inline",au="bk-left",su="bk-right",lu="bk-above",cu="bk-below";function uu(e){switch(e){case"above":return lu;case"below":return cu;case"left":return au;case"right":return su}}class hu extends ss{initialize(){super.initialize(),this.el=jo({class:"bk-tooltip"}),sa(this.el),this.plot_view.canvas_view.add_overlay(this.el)}remove(){na(this.el),super.remove()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.content.change,(()=>this.render())),this.connect(this.model.properties.position.change,(()=>this._reposition()))}styles(){return[...super.styles(),'\n.bk-root {\n /* Same border color used everywhere */\n /* Gray of icons */\n}\n.bk-root .bk-tooltip {\n font-weight: 300;\n font-size: 12px;\n position: absolute;\n padding: 5px;\n border: 1px solid #e5e5e5;\n color: #2f2f2f;\n background-color: white;\n pointer-events: none;\n opacity: 0.95;\n z-index: 100;\n}\n.bk-root .bk-tooltip > div:not(:first-child) {\n /* gives space when multiple elements are being hovered over */\n margin-top: 5px;\n border-top: #e5e5e5 1px dashed;\n}\n.bk-root .bk-tooltip.bk-left.bk-tooltip-arrow::before {\n position: absolute;\n margin: -7px 0 0 0;\n top: 50%;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 7px 0 7px 0;\n border-color: transparent;\n content: " ";\n display: block;\n left: -10px;\n border-right-width: 10px;\n border-right-color: #909599;\n}\n.bk-root .bk-tooltip.bk-left::before {\n left: -10px;\n border-right-width: 10px;\n border-right-color: #909599;\n}\n.bk-root .bk-tooltip.bk-right.bk-tooltip-arrow::after {\n position: absolute;\n margin: -7px 0 0 0;\n top: 50%;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 7px 0 7px 0;\n border-color: transparent;\n content: " ";\n display: block;\n right: -10px;\n border-left-width: 10px;\n border-left-color: #909599;\n}\n.bk-root .bk-tooltip.bk-right::after {\n right: -10px;\n border-left-width: 10px;\n border-left-color: #909599;\n}\n.bk-root .bk-tooltip.bk-above::before {\n position: absolute;\n margin: 0 0 0 -7px;\n left: 50%;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 7px 0 7px;\n border-color: transparent;\n content: " ";\n display: block;\n top: -10px;\n border-bottom-width: 10px;\n border-bottom-color: #909599;\n}\n.bk-root .bk-tooltip.bk-below::after {\n position: absolute;\n margin: 0 0 0 -7px;\n left: 50%;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 7px 0 7px;\n border-color: transparent;\n content: " ";\n display: block;\n bottom: -10px;\n border-top-width: 10px;\n border-top-color: #909599;\n}\n.bk-root .bk-tooltip-row-label {\n text-align: right;\n color: #26aae1;\n /* blue from toolbar highlighting */\n}\n.bk-root .bk-tooltip-row-value {\n color: default;\n /* seems to be necessary for notebook */\n}\n.bk-root .bk-tooltip-color-block {\n width: 12px;\n height: 12px;\n margin-left: 5px;\n margin-right: 5px;\n outline: #dddddd solid 1px;\n display: inline-block;\n}\n']}render(){this.model.visible||sa(this.el),super.render()}_render(){const{content:e}=this.model;null!=e?(oa(this.el),va(this.el).toggle("bk-tooltip-custom",this.model.custom),this.el.appendChild(e),this.model.show_arrow&&this.el.classList.add("bk-tooltip-arrow")):sa(this.el)}_reposition(){const{position:e}=this.model;if(null==e)return void sa(this.el);const[t,n]=e,r=(()=>{const e=this.parent.layout.bbox.relativize(),{attachment:r}=this.model;switch(r){case"horizontal":return t<e.hcenter?"right":"left";case"vertical":return n<e.vcenter?"below":"above";default:return r}})();let i;this.el.classList.remove(su),this.el.classList.remove(au),this.el.classList.remove(lu),this.el.classList.remove(cu),aa(this.el);let o=null,a=null;switch(r){case"right":this.el.classList.add(au),o=t+(this.el.offsetWidth-this.el.clientWidth)+10,i=n-this.el.offsetHeight/2;break;case"left":this.el.classList.add(su),a=this.plot_view.layout.bbox.width-t+10,i=n-this.el.offsetHeight/2;break;case"below":this.el.classList.add(lu),i=n+(this.el.offsetHeight-this.el.clientHeight)+10,o=Math.round(t-this.el.offsetWidth/2);break;case"above":this.el.classList.add(cu),i=n-this.el.offsetHeight-10,o=Math.round(t-this.el.offsetWidth/2)}this.el.style.top=`${i}px`,this.el.style.left=null!=o?`${o}px`:"auto",this.el.style.right=null!=a?`${a}px`:"auto"}}hu.__name__="TooltipView";class du extends ls{constructor(e){super(e)}static init_Tooltip(){this.prototype.default_view=hu,this.define({attachment:[Tr,"horizontal"],inner_only:[En,!0],show_arrow:[En,!0]}),this.override({level:"overlay"}),this.internal({position:[Tn,null],content:[Tn,()=>jo()],custom:[Tn]})}clear(){this.position=null}}du.__name__="Tooltip",du.init_Tooltip();class fu extends Zl{connect_signals(){super.connect_signals(),this.connect(this.model.source.streaming,(()=>this.set_data(this.model.source))),this.connect(this.model.source.patching,(()=>this.set_data(this.model.source))),this.connect(this.model.source.change,(()=>this.set_data(this.model.source)))}_render(){this._map_data();const{ctx:e}=this.layer;if(this.visuals.line.doit)for(let t=0,n=this._lower_sx.length;t<n;t++)this.visuals.line.set_vectorize(e,t),e.beginPath(),e.moveTo(this._lower_sx[t],this._lower_sy[t]),e.lineTo(this._upper_sx[t],this._upper_sy[t]),e.stroke();const t="height"==this.model.dimension?0:Math.PI/2;if(null!=this.model.lower_head)for(let n=0,r=this._lower_sx.length;n<r;n++)e.save(),e.translate(this._lower_sx[n],this._lower_sy[n]),e.rotate(t+Math.PI),this.model.lower_head.render(e,n),e.restore();if(null!=this.model.upper_head)for(let n=0,r=this._upper_sx.length;n<r;n++)e.save(),e.translate(this._upper_sx[n],this._upper_sy[n]),e.rotate(t),this.model.upper_head.render(e,n),e.restore()}}fu.__name__="WhiskerView";class pu extends Kl{constructor(e){super(e)}static init_Whisker(){this.prototype.default_view=fu,this.mixins(ni),this.define({lower_head:[Mn,()=>new fs({level:"underlay",size:10})],upper_head:[Mn,()=>new fs({level:"underlay",size:10})]}),this.override({level:"underlay"})}}pu.__name__="Whisker",pu.init_Whisker();class gu extends os{}gu.__name__="GuideRendererView";class mu extends as{constructor(e){super(e)}static init_GuideRenderer(){this.override({level:"guide"})}}mu.__name__="GuideRenderer",mu.init_GuideRenderer();const{abs:vu,min:yu,max:bu}=Math;class _u extends gu{constructor(){super(...arguments),this.rotate=!0}get panel(){return this.layout}get is_renderable(){const[e,t]=this.ranges;return e.is_valid&&t.is_valid}_render(){var e;if(!this.is_renderable)return;const t={tick:this._tick_extent(),tick_label:this._tick_label_extents(),axis_label:this._axis_label_extent()},{tick_coords:n}=this,r=this.layer.ctx;r.save(),this._draw_rule(r,t),this._draw_major_ticks(r,t,n),this._draw_minor_ticks(r,t,n),this._draw_major_labels(r,t,n),this._draw_axis_label(r,t,n),null===(e=this._paint)||void 0===e||e.call(this,r,t,n),r.restore()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.plot_view.request_layout()))}get_size(){if(this.model.visible&&null==this.model.fixed_location&&this.is_renderable){const e=this._get_size();return{width:0,height:Math.round(e)}}return{width:0,height:0}}_get_size(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()}get needs_clip(){return null!=this.model.fixed_location}_draw_rule(e,t){if(!this.visuals.axis_line.doit)return;const[n,r]=this.rule_coords,[i,o]=this.coordinates.map_to_screen(n,r),[a,s]=this.normals,[l,c]=this.offsets;this.visuals.axis_line.set_value(e),e.beginPath(),e.moveTo(Math.round(i[0]+a*l),Math.round(o[0]+s*c));for(let t=1;t<i.length;t++){const n=Math.round(i[t]+a*l),r=Math.round(o[t]+s*c);e.lineTo(n,r)}e.stroke()}_draw_major_ticks(e,t,n){const r=this.model.major_tick_in,i=this.model.major_tick_out,o=this.visuals.major_tick_line;this._draw_ticks(e,n.major,r,i,o)}_draw_minor_ticks(e,t,n){const r=this.model.minor_tick_in,i=this.model.minor_tick_out,o=this.visuals.minor_tick_line;this._draw_ticks(e,n.minor,r,i,o)}_draw_major_labels(e,t,n){const r=n.major,i=this.compute_labels(r[this.dimension]),o=this.model.major_label_orientation,a=t.tick+this.model.major_label_standoff,s=this.visuals.major_label_text;this._draw_oriented_labels(e,i,r,o,this.panel.side,a,s)}_draw_axis_label(e,t,n){if(null==this.model.axis_label||0==this.model.axis_label.length||null!=this.model.fixed_location)return;let r,i;const{bbox:o}=this.panel;switch(this.panel.side){case"above":r=o.hcenter,i=o.bottom;break;case"below":r=o.hcenter,i=o.top;break;case"left":r=o.right,i=o.vcenter;break;case"right":r=o.left,i=o.vcenter;break;default:throw new Error(`unknown side: ${this.panel.side}`)}const a=[[r],[i]],s=t.tick+A(t.tick_label)+this.model.axis_label_standoff,l=this.visuals.axis_label_text;this._draw_oriented_labels(e,[this.model.axis_label],a,"parallel",this.panel.side,s,l,"screen")}_draw_ticks(e,t,n,r,i){if(!i.doit)return;const[o,a]=t,[s,l]=this.coordinates.map_to_screen(o,a),[c,u]=this.normals,[h,d]=this.offsets,[f,p]=[c*(h-n),u*(d-n)],[g,m]=[c*(h+r),u*(d+r)];i.set_value(e),e.beginPath();for(let t=0;t<s.length;t++){const n=Math.round(s[t]+g),r=Math.round(l[t]+m),i=Math.round(s[t]+f),o=Math.round(l[t]+p);e.moveTo(n,r),e.lineTo(i,o)}e.stroke()}_draw_oriented_labels(e,t,n,r,i,o,a,s="data"){if(!a.doit||0==t.length)return;let l,c,u,h;if("screen"==s)[l,c]=n,[u,h]=[0,0];else{const[e,t]=n;[l,c]=this.coordinates.map_to_screen(e,t),[u,h]=this.offsets}const[d,f]=this.normals,p=d*(u+o),g=f*(h+o);let m;a.set_value(e),this.panel.apply_label_text_heuristics(e,r),m=re(r)?this.panel.get_label_angle_heuristic(r):-r;for(let n=0;n<l.length;n++){const r=Math.round(l[n]+p),i=Math.round(c[n]+g);e.translate(r,i),e.rotate(m),e.fillText(t[n],0,0),e.rotate(-m),e.translate(-r,-i)}}_axis_label_extent(){if(null==this.model.axis_label||""==this.model.axis_label)return 0;const e=this.model.axis_label_standoff,t=this.visuals.axis_label_text;return this._oriented_labels_extent([this.model.axis_label],"parallel",this.panel.side,e,t)}_tick_extent(){return this.model.major_tick_out}_tick_label_extent(){return A(this._tick_label_extents())}_tick_label_extents(){const e=this.tick_coords.major,t=this.compute_labels(e[this.dimension]),n=this.model.major_label_orientation,r=this.model.major_label_standoff,i=this.visuals.major_label_text;return[this._oriented_labels_extent(t,n,this.panel.side,r,i)]}_oriented_labels_extent(e,t,n,r,i){if(0==e.length)return 0;const o=this.layer.ctx;let a,s;i.set_value(o),re(t)?(a=1,s=this.panel.get_label_angle_heuristic(t)):(a=2,s=-t),s=Math.abs(s);const l=Math.cos(s),c=Math.sin(s);let u=0;for(let t=0;t<e.length;t++){const r=1.1*o.measureText(e[t]).width,i=.9*o.measureText(e[t]).ascent;let s;s="above"==n||"below"==n?r*c+i/a*l:r*l+i/a*c,s>u&&(u=s)}return u>0&&(u+=r),u}get normals(){return this.panel.normals}get dimension(){return this.panel.dimension}compute_labels(e){const t=this.model.formatter.doFormat(e,this);for(let n=0;n<e.length;n++)e[n]in this.model.major_label_overrides&&(t[n]=this.model.major_label_overrides[e[n]]);return t}get offsets(){if(null!=this.model.fixed_location)return[0,0];const{frame:e}=this.plot_view;let[t,n]=[0,0];switch(this.panel.side){case"below":n=vu(this.panel.bbox.top-e.bbox.bottom);break;case"above":n=vu(this.panel.bbox.bottom-e.bbox.top);break;case"right":t=vu(this.panel.bbox.left-e.bbox.right);break;case"left":t=vu(this.panel.bbox.right-e.bbox.left)}return[t,n]}get ranges(){const e=this.dimension,t=(e+1)%2,{ranges:n}=this.coordinates;return[n[e],n[t]]}get computed_bounds(){const[e]=this.ranges,t=this.model.bounds,n=[e.min,e.max];if("auto"==t)return[e.min,e.max];{let e,r;const[i,o]=t,[a,s]=n;return vu(i-o)>vu(a-s)?(e=bu(yu(i,o),a),r=yu(bu(i,o),s)):(e=yu(i,o),r=bu(i,o)),[e,r]}}get rule_coords(){const e=this.dimension,t=(e+1)%2,[n]=this.ranges,[r,i]=this.computed_bounds,o=[new Array(2),new Array(2)];return o[e][0]=Math.max(r,n.min),o[e][1]=Math.min(i,n.max),o[e][0]>o[e][1]&&(o[e][0]=o[e][1]=NaN),o[t][0]=this.loc,o[t][1]=this.loc,o}get tick_coords(){const e=this.dimension,t=(e+1)%2,[n]=this.ranges,[r,i]=this.computed_bounds,o=this.model.ticker.get_ticks(r,i,n,this.loc,{}),a=o.major,s=o.minor,l=[[],[]],c=[[],[]],[u,h]=[n.min,n.max];for(let n=0;n<a.length;n++)a[n]<u||a[n]>h||(l[e].push(a[n]),l[t].push(this.loc));for(let n=0;n<s.length;n++)s[n]<u||s[n]>h||(c[e].push(s[n]),c[t].push(this.loc));return{major:l,minor:c}}get loc(){const{fixed_location:e}=this.model;if(null!=e){if(te(e))return e;const[,t]=this.ranges;if(t instanceof Ds)return t.synthetic(e);throw new Error("unexpected")}const[,t]=this.ranges;switch(this.panel.side){case"left":case"below":return t.start;case"right":case"above":return t.end}}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box})}}_u.__name__="AxisView";class xu extends mu{constructor(e){super(e)}static init_Axis(){this.prototype.default_view=_u,this.mixins([["axis_",Jr],["major_tick_",Jr],["minor_tick_",Jr],["major_label_",ti],["axis_label_",ti]]),this.define({bounds:[Tn,"auto"],ticker:[Mn],formatter:[Mn],axis_label:[Rn,""],axis_label_standoff:[Ln,5],major_label_standoff:[Ln,5],major_label_orientation:[Tn,"horizontal"],major_label_overrides:[Tn,{}],major_tick_in:[On,2],major_tick_out:[On,6],minor_tick_in:[On,0],minor_tick_out:[On,4],fixed_location:[Tn,null]}),this.override({axis_line_color:"black",major_tick_line_color:"black",minor_tick_line_color:"black",major_label_text_font_size:"11px",major_label_text_align:"center",major_label_text_baseline:"alphabetic",axis_label_text_font_size:"13px",axis_label_text_font_style:"italic"})}}xu.__name__="Axis",xu.init_Axis();class wu extends nc{constructor(e){super(e)}get_ticks(e,t,n,r,i){return{major:this._collect(n.factors,n,e,t),minor:[],tops:this._collect(n.tops||[],n,e,t),mids:this._collect(n.mids||[],n,e,t)}}_collect(e,t,n,r){const i=[];for(const o of e){const e=t.synthetic(o);e>n&&e<r&&i.push(o)}return i}}wu.__name__="CategoricalTicker";class Au extends ac{constructor(e){super(e)}doFormat(e,t){return N(e)}}Au.__name__="CategoricalTickFormatter";class ku extends _u{_paint(e,t,n){this._draw_group_separators(e,t,n)}_draw_group_separators(e,t,n){const[r]=this.ranges,[i,o]=this.computed_bounds;if(!r.tops||r.tops.length<2||!this.visuals.separator_line.doit)return;const a=this.dimension,s=(a+1)%2,l=[[],[]];let c=0;for(let e=0;e<r.tops.length-1;e++){let t,n;for(let i=c;i<r.factors.length;i++)if(r.factors[i][0]==r.tops[e+1]){[t,n]=[r.factors[i-1],r.factors[i]],c=i;break}const u=(r.synthetic(t)+r.synthetic(n))/2;u>i&&u<o&&(l[a].push(u),l[s].push(this.loc))}const u=this._tick_label_extent();this._draw_ticks(e,l,-3,u-6,this.visuals.separator_line)}_draw_major_labels(e,t,n){const r=this._get_factor_info();let i=t.tick+this.model.major_label_standoff;for(let n=0;n<r.length;n++){const[o,a,s,l]=r[n];this._draw_oriented_labels(e,o,a,s,this.panel.side,i,l),i+=t.tick_label[n]}}_tick_label_extents(){const e=this._get_factor_info(),t=[];for(const[n,,r,i]of e){const e=this._oriented_labels_extent(n,r,this.panel.side,this.model.major_label_standoff,i);t.push(e)}return t}_get_factor_info(){const[e]=this.ranges,[t,n]=this.computed_bounds,r=this.loc,i=this.model.ticker.get_ticks(t,n,e,r,{}),o=this.tick_coords,a=[];if(1==e.levels){const e=i.major,t=this.model.formatter.doFormat(e,this);a.push([t,o.major,this.model.major_label_orientation,this.visuals.major_label_text])}else if(2==e.levels){const e=i.major.map((e=>e[1])),t=this.model.formatter.doFormat(e,this);a.push([t,o.major,this.model.major_label_orientation,this.visuals.major_label_text]),a.push([i.tops,o.tops,this.model.group_label_orientation,this.visuals.group_text])}else if(3==e.levels){const e=i.major.map((e=>e[2])),t=this.model.formatter.doFormat(e,this),n=i.mids.map((e=>e[1]));a.push([t,o.major,this.model.major_label_orientation,this.visuals.major_label_text]),a.push([n,o.mids,this.model.subgroup_label_orientation,this.visuals.subgroup_text]),a.push([i.tops,o.tops,this.model.group_label_orientation,this.visuals.group_text])}return a}get tick_coords(){const e=this.dimension,t=(e+1)%2,[n]=this.ranges,[r,i]=this.computed_bounds,o=this.model.ticker.get_ticks(r,i,n,this.loc,{}),a={major:[[],[]],mids:[[],[]],tops:[[],[]],minor:[[],[]]};return a.major[e]=o.major,a.major[t]=o.major.map((e=>this.loc)),3==n.levels&&(a.mids[e]=o.mids,a.mids[t]=o.mids.map((e=>this.loc))),n.levels>1&&(a.tops[e]=o.tops,a.tops[t]=o.tops.map((e=>this.loc))),a}}ku.__name__="CategoricalAxisView";class Tu extends xu{constructor(e){super(e)}static init_CategoricalAxis(){this.prototype.default_view=ku,this.mixins([["separator_",Jr],["group_",ti],["subgroup_",ti]]),this.define({group_label_orientation:[Tn,"parallel"],subgroup_label_orientation:[Tn,"parallel"]}),this.override({ticker:()=>new wu,formatter:()=>new Au,separator_line_color:"lightgrey",separator_line_width:2,group_text_font_style:"bold",group_text_font_size:"11px",group_text_color:"grey",subgroup_text_font_style:"bold",subgroup_text_font_size:"11px"})}}Tu.__name__="CategoricalAxis",Tu.init_CategoricalAxis();class Su extends xu{constructor(e){super(e)}}Su.__name__="ContinuousAxis";class Eu extends _u{}Eu.__name__="LinearAxisView";class Cu extends Su{constructor(e){super(e)}static init_LinearAxis(){this.prototype.default_view=Eu,this.override({ticker:()=>new oc,formatter:()=>new sc})}}Cu.__name__="LinearAxis",Cu.init_LinearAxis();var Mu=n(8866),Ou=n.n(Mu),Lu=n(40824),Du=n(48456);const Iu={numeral:(e,t,n)=>Lu.format(e,t),datetime:(e,t,n)=>Ou()(e,t),printf:(e,t,n)=>Ru(t,e)};function Ru(e,...t){return(0,Du.sprintf)(e,...t)}function Pu(e,t,n){return te(e)?Ru((()=>{switch(!1){case Math.floor(e)!=e:return"%d";case!(Math.abs(e)>.1&&Math.abs(e)<1e3):return"%0.3f";default:return"%0.3e"}})(),e):`${e}`}function Nu(e,t,n,r,i={}){let o,a;return re(e)?(o=e,a=!1):(o=e.html,a=!0),o=o.replace(/@\$name/g,(e=>`@{${i.name}}`)),o=o.replace(/((?:\$\w+)|(?:@\w+)|(?:@{(?:[^{}]+)}))(?:{([^{}]+)})?/g,((e,o,s)=>{const l=function(e,t,n,r){return"$"==e[0]?function(e,t){if(e in t)return t[e];throw new Error(`Unknown special variable '$${e}'`)}(e.substring(1),r):function(e,t,n){const r=t.get_column(e);if(null==r)return null;if(te(n))return r[n];const i=r[n.index];return se(i)||oe(i)?oe(i[0])?i[n.dim2][n.dim1]:i[n.flat_index]:i}(e.substring(1).replace(/[{}]/g,""),t,n)}(o,t,n,i);if(null==l)return`${ui("???")}`;if("safe"==s)return a=!0,`${l}`;const c=function(e,t,n){if(null==t)return Pu;if(null!=n&&e in n){const t=n[e];if(re(t)){if(t in Iu)return Iu[t];throw new Error(`Unknown tooltip field formatter type '${t}'`)}return function(e,n,r){return t.format(e,n,r)}}return Iu.numeral}(o,s,r);return`${ui(c(l,s,i))}`})),a?[...(new DOMParser).parseFromString(o,"text/html").body.childNodes]:o}function zu(e){return Ou()(e,"%Y %m %d %H %M %S").split(/\s+/).map((e=>parseInt(e,10)))}function Fu(e,t){if(ie(t))return t(e);{const n=Ru("$1%06d",function(e){return Math.round(e/1e3%1*1e6)}(e));return-1==(t=t.replace(/((^|[^%])(%%)*)%f/,n)).indexOf("%")?t:Ou()(e,t)}}const Bu=["microseconds","milliseconds","seconds","minsec","minutes","hourmin","hours","days","months","years"];class ju extends ac{constructor(e){super(e),this.strip_leading_zeros=!0}static init_DatetimeTickFormatter(){this.define({microseconds:[Sn,["%fus"]],milliseconds:[Sn,["%3Nms","%S.%3Ns"]],seconds:[Sn,["%Ss"]],minsec:[Sn,[":%M:%S"]],minutes:[Sn,[":%M","%Mm"]],hourmin:[Sn,["%H:%M"]],hours:[Sn,["%Hh","%H:%M"]],days:[Sn,["%m/%d","%a%d"]],months:[Sn,["%m/%Y","%b %Y"]],years:[Sn,["%Y"]]})}initialize(){super.initialize(),this._update_width_formats()}_update_width_formats(){const e=+Ou()(new Date),t=function(t){const n=H(function(...e){if(0==e.length)return[];const t=_(e.map((e=>e.length))),n=e.length,r=new Array(t);for(let i=0;i<t;i++){r[i]=new Array(n);for(let t=0;t<n;t++)r[i][t]=e[t][i]}return r}(t.map((t=>Fu(e,t).length)),t),(([e])=>e));return function(e){const t=e.length,n=_(e.map((e=>e.length))),r=Array(n);for(let e=0;e<n;e++)r[e]=new Array(t);for(let i=0;i<t;i++)for(let t=0;t<n;t++)r[t][i]=e[i][t];return r}(n)};this._width_formats={microseconds:t(this.microseconds),milliseconds:t(this.milliseconds),seconds:t(this.seconds),minsec:t(this.minsec),minutes:t(this.minutes),hourmin:t(this.hourmin),hours:t(this.hours),days:t(this.days),months:t(this.months),years:t(this.years)}}_get_resolution_str(e,t){const n=1.1*e;switch(!1){case!(n<.001):return"microseconds";case!(n<1):return"milliseconds";case!(n<60):return t>=60?"minsec":"seconds";case!(n<3600):return t>=3600?"hourmin":"minutes";case!(n<86400):return"hours";case!(n<2678400):return"days";case!(n<31536e3):return"months";default:return"years"}}doFormat(e,t){if(0==e.length)return[];const n=Math.abs(e[e.length-1]-e[0])/1e3,r=n/(e.length-1),i=this._get_resolution_str(r,n),[,[o]]=this._width_formats[i],a=[],s=Bu.indexOf(i),l={};for(const e of Bu)l[e]=0;l.seconds=5,l.minsec=4,l.minutes=4,l.hourmin=3,l.hours=3;for(const t of e){let e,n;try{n=zu(t),e=Fu(t,o)}catch(e){Re.warn(`unable to format tick for timestamp value ${t}`),Re.warn(` - ${e}`),a.push("ERR");continue}let r=!1,c=s;for(;0==n[l[Bu[c]]];){let o;if(c+=1,c==Bu.length)break;if(("minsec"==i||"hourmin"==i)&&!r){if("minsec"==i&&0==n[4]&&0!=n[5]||"hourmin"==i&&0==n[3]&&0!=n[4]){o=this._width_formats[Bu[s-1]][1][0],e=Fu(t,o);break}r=!0}o=this._width_formats[Bu[c]][1][0],e=Fu(t,o)}if(this.strip_leading_zeros){let t=e.replace(/^0+/g,"");t!=e&&isNaN(parseInt(t))&&(t=`0${t}`),a.push(t)}else a.push(e)}return a}}ju.__name__="DatetimeTickFormatter",ju.init_DatetimeTickFormatter();class Uu extends rc{constructor(e){super(e)}static init_CompositeTicker(){this.define({tickers:[Sn,[]]})}get min_intervals(){return this.tickers.map((e=>e.get_min_interval()))}get max_intervals(){return this.tickers.map((e=>e.get_max_interval()))}get min_interval(){return this.min_intervals[0]}get max_interval(){return this.max_intervals[0]}get_best_ticker(e,t,n){const r=t-e,i=this.get_ideal_interval(e,t,n),o=[O(this.min_intervals,i)-1,O(this.max_intervals,i)],a=[this.min_intervals[o[0]],this.max_intervals[o[1]]].map((e=>Math.abs(n-r/e)));let s;if(v(a.filter((e=>!isNaN(e)))))s=this.tickers[0];else{const e=o[q(a)];s=this.tickers[e]}return s}get_interval(e,t,n){return this.get_best_ticker(e,t,n).get_interval(e,t,n)}get_ticks_no_defaults(e,t,n,r){return this.get_best_ticker(e,t,r).get_ticks_no_defaults(e,t,n,r)}}Uu.__name__="CompositeTicker",Uu.init_CompositeTicker();class Vu extends rc{constructor(e){super(e)}static init_SingleIntervalTicker(){this.define({interval:[On]})}get_interval(e,t,n){return this.interval}get min_interval(){return this.interval}get max_interval(){return this.interval}}Vu.__name__="SingleIntervalTicker",Vu.init_SingleIntervalTicker();function qu(e){return new Date(e.getTime())}function Hu(e){const t=qu(e);return t.setUTCDate(1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t}function $u(e){const t=Hu(e);return t.setUTCMonth(0),t}class Wu extends Vu{constructor(e){super(e)}static init_DaysTicker(){this.define({days:[Sn,[]]}),this.override({num_minor_ticks:0})}initialize(){super.initialize();const e=this.days;e.length>1?this.interval=864e5*(e[1]-e[0]):this.interval=26784e5}get_ticks_no_defaults(e,t,n,r){const i=function(e,t){const n=Hu(new Date(e)),r=Hu(new Date(t));r.setUTCMonth(r.getUTCMonth()+1);const i=[],o=n;for(;i.push(qu(o)),o.setUTCMonth(o.getUTCMonth()+1),!(o>r););return i}(e,t),o=this.days,a=this.interval,s=z(i.map((e=>((e,t)=>{const n=e.getUTCMonth(),r=[];for(const i of o){const o=qu(e);o.setUTCDate(i),new Date(o.getTime()+t/2).getUTCMonth()==n&&r.push(o)}return r})(e,a))));return{major:s.map((e=>e.getTime())).filter((n=>e<=n&&n<=t)),minor:[]}}}Wu.__name__="DaysTicker",Wu.init_DaysTicker();class Gu extends Vu{constructor(e){super(e)}static init_MonthsTicker(){this.define({months:[Sn,[]]})}initialize(){super.initialize();const e=this.months;e.length>1?this.interval=2592e6*(e[1]-e[0]):this.interval=31104e6}get_ticks_no_defaults(e,t,n,r){const i=function(e,t){const n=$u(new Date(e)),r=$u(new Date(t));r.setUTCFullYear(r.getUTCFullYear()+1);const i=[],o=n;for(;i.push(qu(o)),o.setUTCFullYear(o.getUTCFullYear()+1),!(o>r););return i}(e,t),o=this.months;return{major:z(i.map((e=>o.map((t=>{const n=qu(e);return n.setUTCMonth(t),n}))))).map((e=>e.getTime())).filter((n=>e<=n&&n<=t)),minor:[]}}}Gu.__name__="MonthsTicker",Gu.init_MonthsTicker();class Yu extends Vu{constructor(e){super(e)}initialize(){super.initialize(),this.interval=31536e6,this.basic_ticker=new oc({num_minor_ticks:0})}get_ticks_no_defaults(e,t,n,r){const i=$u(new Date(e)).getUTCFullYear(),o=$u(new Date(t)).getUTCFullYear();return{major:this.basic_ticker.get_ticks_no_defaults(i,o,n,r).major.map((e=>Date.UTC(e,0,1))).filter((n=>e<=n&&n<=t)),minor:[]}}}Yu.__name__="YearsTicker";class Xu extends Uu{constructor(e){super(e)}static init_DatetimeTicker(){this.override({num_minor_ticks:0,tickers:()=>[new ic({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500,num_minor_ticks:0}),new ic({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:1e3,max_interval:18e5,num_minor_ticks:0}),new ic({mantissas:[1,2,4,6,8,12],base:24,min_interval:36e5,max_interval:432e5,num_minor_ticks:0}),new Wu({days:U(1,32)}),new Wu({days:U(1,31,3)}),new Wu({days:[1,8,15,22]}),new Wu({days:[1,15]}),new Gu({months:U(0,12,1)}),new Gu({months:U(0,12,2)}),new Gu({months:U(0,12,4)}),new Gu({months:U(0,12,6)}),new Yu({})]})}}Xu.__name__="DatetimeTicker",Xu.init_DatetimeTicker();class Zu extends Eu{}Zu.__name__="DatetimeAxisView";class Ku extends Cu{constructor(e){super(e)}static init_DatetimeAxis(){this.prototype.default_view=Zu,this.override({ticker:()=>new Xu,formatter:()=>new ju})}}Ku.__name__="DatetimeAxis",Ku.init_DatetimeAxis();class Ju extends ac{constructor(e){super(e)}static init_LogTickFormatter(){this.define({ticker:[Mn,null]})}initialize(){super.initialize(),this.basic_formatter=new sc}doFormat(e,t){if(0==e.length)return[];const n=null!=this.ticker?this.ticker.base:10;let r=!1;const i=new Array(e.length);for(let t=0,o=e.length;t<o;t++)if(i[t]=`${n}^${Math.round(Math.log(e[t])/Math.log(n))}`,t>0&&i[t]==i[t-1]){r=!0;break}return r?this.basic_formatter.doFormat(e,t):i}}Ju.__name__="LogTickFormatter",Ju.init_LogTickFormatter();class Qu extends ic{constructor(e){super(e)}static init_LogTicker(){this.override({mantissas:[1,5]})}get_ticks_no_defaults(e,t,n,r){const i=this.num_minor_ticks,o=[],a=this.base,s=Math.log(e)/Math.log(a),l=Math.log(t)/Math.log(a),c=l-s;let u;if(isFinite(c))if(c<2){const n=this.get_interval(e,t,r);if(u=U(Math.floor(e/n),Math.ceil(t/n)+1).filter((e=>0!=e)).map((e=>e*n)).filter((n=>e<=n&&n<=t)),i>0&&u.length>0){const e=n/i,t=U(0,i).map((t=>t*e));for(const e of t.slice(1))o.push(u[0]-e);for(const e of u)for(const n of t)o.push(e+n)}}else{const e=Math.ceil(.999999*s),t=Math.floor(1.000001*l),n=Math.ceil((t-e)/9);if(u=U(e-1,t+1,n).map((e=>a**e)),i>0&&u.length>0){const e=a**n/i,t=U(1,i+1).map((t=>t*e));for(const e of t)o.push(u[0]/e);o.push(u[0]);for(const e of u)for(const n of t)o.push(e*n)}}else u=[];return{major:u.filter((n=>e<=n&&n<=t)),minor:o.filter((n=>e<=n&&n<=t))}}}Qu.__name__="LogTicker",Qu.init_LogTicker();class eh extends _u{}eh.__name__="LogAxisView";class th extends Su{constructor(e){super(e)}static init_LogAxis(){this.prototype.default_view=eh,this.override({ticker:()=>new Qu,formatter:()=>new Ju})}}th.__name__="LogAxis",th.init_LogAxis();class nh extends sc{constructor(e){super(e)}static init_MercatorTickFormatter(){this.define({dimension:[er]})}doFormat(e,t){if(null==this.dimension)throw new Error("MercatorTickFormatter.dimension not configured");if(0==e.length)return[];const n=e.length,r=new Array(n);if("lon"==this.dimension)for(let i=0;i<n;i++){const[n]=Lo(e[i],t.loc);r[i]=n}else for(let i=0;i<n;i++){const[,n]=Lo(t.loc,e[i]);r[i]=n}return super.doFormat(r,t)}}nh.__name__="MercatorTickFormatter",nh.init_MercatorTickFormatter();class rh extends oc{constructor(e){super(e)}static init_MercatorTicker(){this.define({dimension:[er]})}get_ticks_no_defaults(e,t,n,r){if(null==this.dimension)throw new Error(`${this}.dimension wasn't configured`);return[e,t]=function(e,t,n){const[r,i]=Do[n];return[Po(e,r),Ro(t,i)]}(e,t,this.dimension),"lon"==this.dimension?this._get_ticks_lon(e,t,n,r):this._get_ticks_lat(e,t,n,r)}_get_ticks_lon(e,t,n,r){const[i]=Lo(e,n),[o,a]=Lo(t,n),s=super.get_ticks_no_defaults(i,o,n,r),l=[];for(const e of s.major)if(No(e,"lon")){const[t]=Oo(e,a);l.push(t)}const c=[];for(const e of s.minor)if(No(e,"lon")){const[t]=Oo(e,a);c.push(t)}return{major:l,minor:c}}_get_ticks_lat(e,t,n,r){const[,i]=Lo(n,e),[o,a]=Lo(n,t),s=super.get_ticks_no_defaults(i,a,n,r),l=[];for(const e of s.major)if(No(e,"lat")){const[,t]=Oo(o,e);l.push(t)}const c=[];for(const e of s.minor)if(No(e,"lat")){const[,t]=Oo(o,e);c.push(t)}return{major:l,minor:c}}}rh.__name__="MercatorTicker",rh.init_MercatorTicker();class ih extends _u{}ih.__name__="MercatorAxisView";class oh extends Cu{constructor(e){super(e)}static init_MercatorAxis(){this.prototype.default_view=ih,this.override({ticker:()=>new rh({dimension:"lat"}),formatter:()=>new nh({dimension:"lat"})})}}oh.__name__="MercatorAxis",oh.init_MercatorAxis();class ah extends rs{constructor(e){super(e)}}ah.__name__="Callback";class sh extends ah{constructor(e){super(e)}static init_CustomJS(){this.define({args:[Tn,{}],code:[Rn,""]})}get names(){return ue(this.args)}get values(){return he(this.args)}get func(){const e=hi(this.code);return new Function(...this.names,"cb_obj","cb_data",e)}execute(e,t={}){return this.func.apply(e,this.values.concat(e,t))}}sh.__name__="CustomJS",sh.init_CustomJS();class lh extends ah{constructor(e){super(e)}static init_OpenURL(){this.define({url:[Rn,"http://"],same_tab:[En,!1]})}execute(e,{source:t}){const n=e=>{const n=Nu(this.url,t,e);if(!re(n))throw new Error("HTML output is not supported in this context");this.same_tab?window.location.href=n:window.open(n)},{selected:r}=t;for(const e of r.indices)n(e);for(const e of r.line_indices)n(e)}}lh.__name__="OpenURL",lh.init_OpenURL();class ch extends Mc{constructor(e){super(e)}compute(e){return super._linear_compute(this.source_range.synthetic(e))}v_compute(e){return super._linear_v_compute(this.source_range.v_synthetic(e))}invert(e){return this._linear_invert(e)}v_invert(e){return this._linear_v_invert(e)}}ch.__name__="CategoricalScale";class uh extends Ms{constructor(e){super(e)}static init_DataRange(){this.define({names:[Sn,[]],renderers:[Sn,[]]})}}uh.__name__="DataRange",uh.init_DataRange();class hh extends uh{constructor(e){super(e),this.have_updated_interactively=!1}static init_DataRange1d(){this.define({start:[On],end:[On],range_padding:[On,.1],range_padding_units:[ur,"percent"],flipped:[En,!1],follow:[br],follow_interval:[On],default_span:[On,2],only_visible:[En,!1]}),this.internal({scale_hint:[Rn,"auto"]})}initialize(){super.initialize(),this._initial_start=this.start,this._initial_end=this.end,this._initial_range_padding=this.range_padding,this._initial_range_padding_units=this.range_padding_units,this._initial_follow=this.follow,this._initial_follow_interval=this.follow_interval,this._initial_default_span=this.default_span,this._plot_bounds=new Map}get min(){return Math.min(this.start,this.end)}get max(){return Math.max(this.start,this.end)}computed_renderers(){const e=this.names;let t=this.renderers;if(0==t.length)for(const e of this.plots){const n=e.renderers.filter((e=>e instanceof _l));t=t.concat(n)}e.length>0&&(t=t.filter((t=>F(e,t.name)))),Re.debug(`computed ${t.length} renderers for ${this}`);for(const e of t)Re.trace(` - ${e}`);return t}_compute_plot_bounds(e,t){let n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};for(const r of e){const e=t.get(r);null==e||!r.visible&&this.only_visible||(n=Ba(n,e))}return n}adjust_bounds_for_aspect(e,t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};let r=e.x1-e.x0;r<=0&&(r=1);let i=e.y1-e.y0;i<=0&&(i=1);const o=.5*(e.x1+e.x0),a=.5*(e.y1+e.y0);return r<t*i?r=t*i:i=r/t,n.x1=o+.5*r,n.x0=o-.5*r,n.y1=a+.5*i,n.y0=a-.5*i,n}_compute_min_max(e,t){let n,r,i={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};for(const t of e)i=Ba(i,t);return[n,r]=0==t?[i.x0,i.x1]:[i.y0,i.y1],[n,r]}_compute_range(e,t){const n=this.range_padding;let r,i;if(null!=this._initial_start&&(e=this._initial_start),null!=this._initial_end&&(t=this._initial_end),"log"==this.scale_hint){let o,a;if((isNaN(e)||!isFinite(e)||e<=0)&&(e=isNaN(t)||!isFinite(t)||t<=0?.1:t/100,Re.warn(`could not determine minimum data value for log axis, DataRange1d using value ${e}`)),(isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(e)||!isFinite(e)||e<=0?10:100*e,Re.warn(`could not determine maximum data value for log axis, DataRange1d using value ${t}`)),t==e)a=this.default_span+.001,o=Math.log(e)/Math.log(10);else{let r,i;"percent"==this.range_padding_units?(r=Math.log(e)/Math.log(10),i=Math.log(t)/Math.log(10),a=(i-r)*(1+n)):(r=Math.log(e-n)/Math.log(10),i=Math.log(t+n)/Math.log(10),a=i-r),o=(r+i)/2}r=10**(o-a/2),i=10**(o+a/2)}else{let o;o=t==e?this.default_span:"percent"==this.range_padding_units?(t-e)*(1+n):t-e+2*n;const a=(t+e)/2;r=a-o/2,i=a+o/2}let o=1;this.flipped&&([r,i]=[i,r],o=-1);const a=this.follow_interval;return null!=a&&Math.abs(r-i)>a&&("start"==this.follow?i=r+o*a:"end"==this.follow&&(r=i-o*a)),[r,i]}update(e,t,n,r){if(this.have_updated_interactively)return;const i=this.computed_renderers();let o=this._compute_plot_bounds(i,e);null!=r&&(o=this.adjust_bounds_for_aspect(o,r)),this._plot_bounds.set(n,o);const[a,s]=this._compute_min_max(this._plot_bounds.values(),t);let[l,c]=this._compute_range(a,s);null!=this._initial_start&&("log"==this.scale_hint?this._initial_start>0&&(l=this._initial_start):l=this._initial_start),null!=this._initial_end&&("log"==this.scale_hint?this._initial_end>0&&(c=this._initial_end):c=this._initial_end);const[u,h]=[this.start,this.end];if(l!=u||c!=h){const e={};l!=u&&(e.start=l),c!=h&&(e.end=c),this.setv(e)}"auto"==this.bounds&&this.setv({bounds:[l,c]},{silent:!0}),this.change.emit()}reset(){this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()}}hh.__name__="DataRange1d",hh.init_DataRange1d();const{min:dh,max:fh}=Math;class ph{constructor(e={}){this.width=null!=e.width?e.width:0,this.height=null!=e.height?e.height:0}bounded_to({width:e,height:t}){return new ph({width:this.width==1/0&&null!=e?e:this.width,height:this.height==1/0&&null!=t?t:this.height})}expanded_to({width:e,height:t}){return new ph({width:e!=1/0?fh(this.width,e):this.width,height:t!=1/0?fh(this.height,t):this.height})}expand_to({width:e,height:t}){this.width=fh(this.width,e),this.height=fh(this.height,t)}narrowed_to({width:e,height:t}){return new ph({width:dh(this.width,e),height:dh(this.height,t)})}narrow_to({width:e,height:t}){this.width=dh(this.width,e),this.height=dh(this.height,t)}grow_by({left:e,right:t,top:n,bottom:r}){const i=this.width+e+t,o=this.height+n+r;return new ph({width:i,height:o})}shrink_by({left:e,right:t,top:n,bottom:r}){const i=fh(this.width-e-t,0),o=fh(this.height-n-r,0);return new ph({width:i,height:o})}map(e,t){return new ph({width:e(this.width),height:(null!=t?t:e)(this.height)})}}ph.__name__="Sizeable";const gh=it("fixed","fit","min","max"),{min:mh,max:vh,round:yh}=Math;class bh{constructor(){this._bbox=new ja,this._inner_bbox=new ja}get bbox(){return this._bbox}get inner_bbox(){return this._inner_bbox}get sizing(){return this._sizing}set_sizing(e){const t=e.width_policy||"fit",n=e.width,r=null!=e.min_width?e.min_width:0,i=null!=e.max_width?e.max_width:1/0,o=e.height_policy||"fit",a=e.height,s=null!=e.min_height?e.min_height:0,l=null!=e.max_height?e.max_height:1/0,c=e.aspect,u=e.margin||{top:0,right:0,bottom:0,left:0},h=!1!==e.visible,d=e.halign||"start",f=e.valign||"start";this._sizing={width_policy:t,min_width:r,width:n,max_width:i,height_policy:o,min_height:s,height:a,max_height:l,aspect:c,margin:u,visible:h,halign:d,valign:f,size:{width:n,height:a},min_size:{width:r,height:s},max_size:{width:i,height:l}},this._init()}_init(){}_set_geometry(e,t){this._bbox=e,this._inner_bbox=t}set_geometry(e,t){this._set_geometry(e,t||e)}is_width_expanding(){return"max"==this.sizing.width_policy}is_height_expanding(){return"max"==this.sizing.height_policy}apply_aspect(e,{width:t,height:n}){const{aspect:r}=this.sizing;if(null!=r){const{width_policy:i,height_policy:o}=this.sizing,a=(e,t)=>{const n={max:4,fit:3,min:2,fixed:1};return n[e]>n[t]};if("fixed"!=i&&"fixed"!=o)if(i==o){const i=t,o=yh(t/r),a=yh(n*r),s=n;Math.abs(e.width-i)+Math.abs(e.height-o)<=Math.abs(e.width-a)+Math.abs(e.height-s)?(t=i,n=o):(t=a,n=s)}else a(i,o)?n=yh(t/r):t=yh(n*r);else"fixed"==i?n=yh(t/r):"fixed"==o&&(t=yh(n*r))}return{width:t,height:n}}measure(e){if(!this.sizing.visible)return{width:0,height:0};const t=e=>"fixed"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:e,n=e=>"fixed"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:e,r=new ph(e).shrink_by(this.sizing.margin).map(t,n),i=this._measure(r),o=this.clip_size(i),a=t(o.width),s=n(o.height),l=this.apply_aspect(r,{width:a,height:s});return Object.assign(Object.assign({},i),l)}compute(e={}){const t=this.measure({width:null!=e.width&&this.is_width_expanding()?e.width:1/0,height:null!=e.height&&this.is_height_expanding()?e.height:1/0}),{width:n,height:r}=t,i=new ja({left:0,top:0,width:n,height:r});let o;if(null!=t.inner){const{left:e,top:i,right:a,bottom:s}=t.inner;o=new ja({left:e,top:i,right:n-a,bottom:r-s})}this.set_geometry(i,o)}get xview(){return this.bbox.xview}get yview(){return this.bbox.yview}clip_width(e){return vh(this.sizing.min_width,mh(e,this.sizing.max_width))}clip_height(e){return vh(this.sizing.min_height,mh(e,this.sizing.max_height))}clip_size({width:e,height:t}){return{width:this.clip_width(e),height:this.clip_height(t)}}}bh.__name__="Layoutable";class _h extends bh{_measure(e){const{width_policy:t,height_policy:n}=this.sizing;let r,i;if(e.width==1/0)r=null!=this.sizing.width?this.sizing.width:0;else switch(t){case"fixed":r=null!=this.sizing.width?this.sizing.width:0;break;case"min":r=null!=this.sizing.width?mh(e.width,this.sizing.width):0;break;case"fit":r=null!=this.sizing.width?mh(e.width,this.sizing.width):e.width;break;case"max":r=null!=this.sizing.width?vh(e.width,this.sizing.width):e.width}if(e.height==1/0)i=null!=this.sizing.height?this.sizing.height:0;else switch(n){case"fixed":i=null!=this.sizing.height?this.sizing.height:0;break;case"min":i=null!=this.sizing.height?mh(e.height,this.sizing.height):0;break;case"fit":i=null!=this.sizing.height?mh(e.height,this.sizing.height):e.height;break;case"max":i=null!=this.sizing.height?vh(e.height,this.sizing.height):e.height}return{width:r,height:i}}}_h.__name__="LayoutItem";class xh extends bh{_measure(e){const t=this._content_size(),n=e.bounded_to(this.sizing.size).bounded_to(t);return{width:(()=>{switch(this.sizing.width_policy){case"fixed":return null!=this.sizing.width?this.sizing.width:t.width;case"min":return t.width;case"fit":return n.width;case"max":return Math.max(t.width,n.width)}})(),height:(()=>{switch(this.sizing.height_policy){case"fixed":return null!=this.sizing.height?this.sizing.height:t.height;case"min":return t.height;case"fit":return n.height;case"max":return Math.max(t.height,n.height)}})()}}}xh.__name__="ContentLayoutable";class wh extends bh{constructor(){super(...arguments),this.children=[]}}wh.__name__="Stack";class Ah extends wh{_measure(e){let t=0,n=0;for(const e of this.children){const r=e.measure({width:0,height:0});t+=r.width,n=Math.max(n,r.height)}return{width:t,height:n}}_set_geometry(e,t){super._set_geometry(e,t);const{top:n,bottom:r}=e;let{left:i}=e;for(const e of this.children){const{width:t}=e.measure({width:0,height:0});e.set_geometry(new ja({left:i,width:t,top:n,bottom:r})),i+=t}}}Ah.__name__="HStack";class kh extends wh{_measure(e){let t=0,n=0;for(const e of this.children){const r=e.measure({width:0,height:0});t=Math.max(t,r.width),n+=r.height}return{width:t,height:n}}_set_geometry(e,t){super._set_geometry(e,t);const{left:n,right:r}=e;let{top:i}=e;for(const e of this.children){const{height:t}=e.measure({width:0,height:0});e.set_geometry(new ja({top:i,height:t,left:n,right:r})),i+=t}}}kh.__name__="VStack",class extends bh{constructor(){super(...arguments),this.children=[]}_measure(e){let t=0,n=0;for(const{layout:r}of this.children){const i=r.measure(e);t=Math.max(t,i.width),n=Math.max(n,i.height)}return{width:t,height:n}}_set_geometry(e,t){super._set_geometry(e,t);for(const{layout:t,anchor:n,margin:r}of this.children){const{left:i,right:o,top:a,bottom:s,hcenter:l,vcenter:c}=e,{width:u,height:h}=t.measure(e);let d;switch(n){case"top_left":d=new ja({left:i+r,top:a+r,width:u,height:h});break;case"top_center":d=new ja({hcenter:l,top:a+r,width:u,height:h});break;case"top_right":d=new ja({right:o-r,top:a+r,width:u,height:h});break;case"bottom_right":d=new ja({right:o-r,bottom:s-r,width:u,height:h});break;case"bottom_center":d=new ja({hcenter:l,bottom:s-r,width:u,height:h});break;case"bottom_left":d=new ja({left:i+r,bottom:s-r,width:u,height:h});break;case"center_left":d=new ja({left:i+r,vcenter:c,width:u,height:h});break;case"center":d=new ja({hcenter:l,vcenter:c,width:u,height:h});break;case"center_right":d=new ja({right:o-r,vcenter:c,width:u,height:h})}t.set_geometry(d)}}}.__name__="AnchorLayout";const{max:Th,round:Sh}=Math;class Eh{constructor(e){this.def=e,this._map=new Map}get(e){let t=this._map.get(e);return void 0===t&&(t=this.def(),this._map.set(e,t)),t}apply(e,t){const n=this.get(e);this._map.set(e,t(n))}}Eh.__name__="DefaultMap";class Ch{constructor(){this._items=[],this._nrows=0,this._ncols=0}get nrows(){return this._nrows}get ncols(){return this._ncols}add(e,t){const{r1:n,c1:r}=e;this._nrows=Th(this._nrows,n+1),this._ncols=Th(this._ncols,r+1),this._items.push({span:e,data:t})}at(e,t){const n=this._items.filter((({span:n})=>n.r0<=e&&e<=n.r1&&n.c0<=t&&t<=n.c1));return n.map((({data:e})=>e))}row(e){const t=this._items.filter((({span:t})=>t.r0<=e&&e<=t.r1));return t.map((({data:e})=>e))}col(e){const t=this._items.filter((({span:t})=>t.c0<=e&&e<=t.c1));return t.map((({data:e})=>e))}foreach(e){for(const{span:t,data:n}of this._items)e(t,n)}map(e){const t=new Ch;for(const{span:n,data:r}of this._items)t.add(n,e(n,r));return t}}Ch.__name__="Container";class Mh extends bh{constructor(e=[]){super(),this.items=e,this.rows="auto",this.cols="auto",this.spacing=0,this.absolute=!1}is_width_expanding(){if(super.is_width_expanding())return!0;if("fixed"==this.sizing.width_policy)return!1;const{cols:e}=this._state;return T(e,(e=>"max"==e.policy))}is_height_expanding(){if(super.is_height_expanding())return!0;if("fixed"==this.sizing.height_policy)return!1;const{rows:e}=this._state;return T(e,(e=>"max"==e.policy))}_init(){super._init();const e=new Ch;for(const{layout:t,row:n,col:r,row_span:i,col_span:o}of this.items)if(t.sizing.visible){const a=n,s=r,l=n+(null!=i?i:1)-1,c=r+(null!=o?o:1)-1;e.add({r0:a,c0:s,r1:l,c1:c},t)}const{nrows:t,ncols:n}=e,r=new Array(t);for(let n=0;n<t;n++){const t=(()=>{const e=ce(this.rows)?this.rows[n]||this.rows["*"]:this.rows;return null==e?{policy:"auto"}:te(e)?{policy:"fixed",height:e}:re(e)?{policy:e}:e})(),i=t.align||"auto";if("fixed"==t.policy)r[n]={policy:"fixed",height:t.height,align:i};else if("min"==t.policy)r[n]={policy:"min",align:i};else if("fit"==t.policy||"max"==t.policy)r[n]={policy:t.policy,flex:t.flex||1,align:i};else{if("auto"!=t.policy)throw new Error("unrechable");T(e.row(n),(e=>e.is_height_expanding()))?r[n]={policy:"max",flex:1,align:i}:r[n]={policy:"min",align:i}}}const i=new Array(n);for(let t=0;t<n;t++){const n=(()=>{const e=ce(this.cols)?this.cols[t]||this.cols["*"]:this.cols;return null==e?{policy:"auto"}:te(e)?{policy:"fixed",width:e}:re(e)?{policy:e}:e})(),r=n.align||"auto";if("fixed"==n.policy)i[t]={policy:"fixed",width:n.width,align:r};else if("min"==n.policy)i[t]={policy:"min",align:r};else if("fit"==n.policy||"max"==n.policy)i[t]={policy:n.policy,flex:n.flex||1,align:r};else{if("auto"!=n.policy)throw new Error("unrechable");T(e.col(t),(e=>e.is_width_expanding()))?i[t]={policy:"max",flex:1,align:r}:i[t]={policy:"min",align:r}}}const[o,a]=te(this.spacing)?[this.spacing,this.spacing]:this.spacing;this._state={items:e,nrows:t,ncols:n,rows:r,cols:i,rspacing:o,cspacing:a}}_measure_totals(e,t){const{nrows:n,ncols:r,rspacing:i,cspacing:o}=this._state;return{height:A(e)+(n-1)*i,width:A(t)+(r-1)*o}}_measure_cells(e){const{items:t,nrows:n,ncols:r,rows:i,cols:o,rspacing:a,cspacing:s}=this._state,l=new Array(n);for(let e=0;e<n;e++){const t=i[e];l[e]="fixed"==t.policy?t.height:0}const c=new Array(r);for(let e=0;e<r;e++){const t=o[e];c[e]="fixed"==t.policy?t.width:0}const u=new Ch;return t.foreach(((t,n)=>{const{r0:r,c0:h,r1:d,c1:f}=t,p=(d-r)*a,g=(f-h)*s;let m=0;for(let t=r;t<=d;t++)m+=e(t,h).height;m+=p;let v=0;for(let t=h;t<=f;t++)v+=e(r,t).width;v+=g;const y=n.measure({width:v,height:m});u.add(t,{layout:n,size_hint:y});const b=new ph(y).grow_by(n.sizing.margin);b.height-=p,b.width-=g;const _=[];for(let e=r;e<=d;e++){const t=i[e];"fixed"==t.policy?b.height-=t.height:_.push(e)}if(b.height>0){const e=Sh(b.height/_.length);for(const t of _)l[t]=Th(l[t],e)}const x=[];for(let e=h;e<=f;e++){const t=o[e];"fixed"==t.policy?b.width-=t.width:x.push(e)}if(b.width>0){const e=Sh(b.width/x.length);for(const t of x)c[t]=Th(c[t],e)}})),{size:this._measure_totals(l,c),row_heights:l,col_widths:c,size_hints:u}}_measure_grid(e){const{nrows:t,ncols:n,rows:r,cols:i,rspacing:o,cspacing:a}=this._state,s=this._measure_cells(((e,t)=>{const n=r[e],o=i[t];return{width:"fixed"==o.policy?o.width:1/0,height:"fixed"==n.policy?n.height:1/0}}));let l;l="fixed"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:e.height!=1/0&&this.is_height_expanding()?e.height:s.size.height;let c,u=0;for(let e=0;e<t;e++){const t=r[e];"fit"==t.policy||"max"==t.policy?u+=t.flex:l-=s.row_heights[e]}if(l-=(t-1)*o,0!=u&&l>0)for(let e=0;e<t;e++){const t=r[e];if("fit"==t.policy||"max"==t.policy){const n=Sh(l*(t.flex/u));l-=n,s.row_heights[e]=n,u-=t.flex}}else if(l<0){let e=0;for(let n=0;n<t;n++)"fixed"!=r[n].policy&&e++;let n=-l;for(let i=0;i<t;i++)if("fixed"!=r[i].policy){const t=s.row_heights[i],r=Sh(n/e);s.row_heights[i]=Th(t-r,0),n-=r>t?t:r,e--}}c="fixed"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:e.width!=1/0&&this.is_width_expanding()?e.width:s.size.width;let h=0;for(let e=0;e<n;e++){const t=i[e];"fit"==t.policy||"max"==t.policy?h+=t.flex:c-=s.col_widths[e]}if(c-=(n-1)*a,0!=h&&c>0)for(let e=0;e<n;e++){const t=i[e];if("fit"==t.policy||"max"==t.policy){const n=Sh(c*(t.flex/h));c-=n,s.col_widths[e]=n,h-=t.flex}}else if(c<0){let e=0;for(let t=0;t<n;t++)"fixed"!=i[t].policy&&e++;let t=-c;for(let r=0;r<n;r++)if("fixed"!=i[r].policy){const n=s.col_widths[r],i=Sh(t/e);s.col_widths[r]=Th(n-i,0),t-=i>n?n:i,e--}}const{row_heights:d,col_widths:f,size_hints:p}=this._measure_cells(((e,t)=>({width:s.col_widths[t],height:s.row_heights[e]})));return{size:this._measure_totals(d,f),row_heights:d,col_widths:f,size_hints:p}}_measure(e){const{size:t}=this._measure_grid(e);return t}_set_geometry(e,t){super._set_geometry(e,t);const{nrows:n,ncols:r,rspacing:i,cspacing:o}=this._state,{row_heights:a,col_widths:s,size_hints:l}=this._measure_grid(e),c=this._state.rows.map(((e,t)=>Object.assign(Object.assign({},e),{top:0,height:a[t],get bottom(){return this.top+this.height}}))),u=this._state.cols.map(((e,t)=>Object.assign(Object.assign({},e),{left:0,width:s[t],get right(){return this.left+this.width}}))),h=l.map(((e,t)=>Object.assign(Object.assign({},t),{outer:new ja,inner:new ja})));for(let t=0,r=this.absolute?e.top:0;t<n;t++){const e=c[t];e.top=r,r+=e.height+i}for(let t=0,n=this.absolute?e.left:0;t<r;t++){const e=u[t];e.left=n,n+=e.width+o}h.foreach((({r0:e,c0:t,r1:n,c1:r},a)=>{const{layout:s,size_hint:l}=a,{sizing:h}=s,{width:d,height:f}=l,p=function(e,t){let n=(t-e)*o;for(let r=e;r<=t;r++)n+=u[r].width;return n}(t,r),g=function(e,t){let n=(t-e)*i;for(let r=e;r<=t;r++)n+=c[r].height;return n}(e,n),m=t==r&&"auto"!=u[t].align?u[t].align:h.halign,v=e==n&&"auto"!=c[e].align?c[e].align:h.valign;let y=u[t].left;"start"==m?y+=h.margin.left:"center"==m?y+=Sh((p-d)/2):"end"==m&&(y+=p-h.margin.right-d);let b=c[e].top;"start"==v?b+=h.margin.top:"center"==v?b+=Sh((g-f)/2):"end"==v&&(b+=g-h.margin.bottom-f),a.outer=new ja({left:y,top:b,width:d,height:f})}));const d=c.map((()=>({start:new Eh((()=>0)),end:new Eh((()=>0))}))),f=u.map((()=>({start:new Eh((()=>0)),end:new Eh((()=>0))})));h.foreach((({r0:e,c0:t,r1:n,c1:r},{size_hint:i,outer:o})=>{const{inner:a}=i;null!=a&&(d[e].start.apply(o.top,(e=>Th(e,a.top))),d[n].end.apply(c[n].bottom-o.bottom,(e=>Th(e,a.bottom))),f[t].start.apply(o.left,(e=>Th(e,a.left))),f[r].end.apply(u[r].right-o.right,(e=>Th(e,a.right))))})),h.foreach((({r0:e,c0:t,r1:n,c1:r},i)=>{const{size_hint:o,outer:a}=i;function s({left:e,right:t,top:n,bottom:r}){const i=a.width-e-t,o=a.height-n-r;return new ja({left:e,top:n,width:i,height:o})}if(null!=o.inner){let l=s(o.inner);if(!1!==o.align){const i=d[e].start.get(a.top),o=d[n].end.get(c[n].bottom-a.bottom),h=f[t].start.get(a.left),p=f[r].end.get(u[r].right-a.right);try{l=s({top:i,bottom:o,left:h,right:p})}catch(e){}}i.inner=l}else i.inner=a})),h.foreach(((e,{layout:t,outer:n,inner:r})=>{t.set_geometry(n,r)}))}}Mh.__name__="Grid";class Oh extends Mh{constructor(e){super(),this.items=e.map(((e,t)=>({layout:e,row:0,col:t}))),this.rows="fit"}}Oh.__name__="Row";class Lh extends Mh{constructor(e){super(),this.items=e.map(((e,t)=>({layout:e,row:t,col:0}))),this.cols="fit"}}Lh.__name__="Column";class Dh extends xh{constructor(e){super(),this.content_size=function(e,t){return _a(e,{},t)}(e,(()=>new ph(fa(e))))}_content_size(){return this.content_size}}Dh.__name__="ContentBox";class Ih extends bh{constructor(e){super(),this.el=e}_measure(e){const t=new ph(e).bounded_to(this.sizing.size);return _a(this.el,t,(()=>{const e=new ph(function(e){const{left:t,top:n}=e.getBoundingClientRect(),{padding:r}=da(e);let i=0,o=0;for(const a of e.children){const e=a.getBoundingClientRect();i=Math.max(i,Math.ceil(e.left-t-r.left+e.width)),o=Math.max(o,Math.ceil(e.top-n-r.top+e.height))}return{width:i,height:o}}(this.el)),{border:t,padding:n}=da(this.el);return e.grow_by(t).grow_by(n).map(Math.ceil)}))}}Ih.__name__="VariadicBox";class Rh extends Ih{constructor(e){super(e),this._cache=new Map}_measure(e){const{width:t,height:n}=e,r=`${t},${n}`;let i=this._cache.get(r);return null==i&&(i=super._measure(e),this._cache.set(r,i)),i}invalidate_cache(){this._cache.clear()}}Rh.__name__="CachedVariadicBox";class Ph extends _h{constructor(e,t,n,r,i={},o={}){super(),this.in_x_scale=e,this.in_y_scale=t,this.x_range=n,this.y_range=r,this.extra_x_ranges=i,this.extra_y_ranges=o,c(null==e.source_range&&null==e.target_range),c(null==t.source_range&&null==t.target_range),this._configure_scales()}_get_ranges(e,t){return new Map(de(Object.assign(Object.assign({},t),{default:e})))}_get_scales(e,t,n){const r=new Map;for(const[i,o]of t){if((o instanceof hh||o instanceof Rc)&&!(e instanceof Oc))throw new Error(`Range ${o.type} is incompatible is Scale ${e.type}`);if(o instanceof Ds&&!(e instanceof ch))throw new Error(`Range ${o.type} is incompatible is Scale ${e.type}`);e instanceof Ic&&o instanceof hh&&(o.scale_hint="log");const t=e.clone();t.setv({source_range:o,target_range:n}),r.set(i,t)}return r}_configure_frame_ranges(){const{bbox:e}=this;this._x_target=new Rc({start:e.left,end:e.right}),this._y_target=new Rc({start:e.bottom,end:e.top})}_configure_scales(){this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._x_scales=this._get_scales(this.in_x_scale,this._x_ranges,this._x_target),this._y_scales=this._get_scales(this.in_y_scale,this._y_ranges,this._y_target)}_update_scales(){this._configure_frame_ranges();for(const[,e]of this._x_scales)e.target_range=this._x_target;for(const[,e]of this._y_scales)e.target_range=this._y_target}_set_geometry(e,t){super._set_geometry(e,t),this._update_scales()}get x_ranges(){return this._x_ranges}get y_ranges(){return this._y_ranges}get x_scales(){return this._x_scales}get y_scales(){return this._y_scales}get x_scale(){return this._x_scales.get("default")}get y_scale(){return this._y_scales.get("default")}get xscales(){return ye(this.x_scales)}get yscales(){return ye(this.y_scales)}}Ph.__name__="CartesianFrame";class Nh extends rs{constructor(e){super(e)}initialize(){super.initialize(),this._connected=new Set,this._result=new Map}v_compute(e){this._connected.has(e)||(this.connect(e.change,(()=>this._result.delete(e))),this.connect(e.patching,(()=>this._result.delete(e))),this.connect(e.streaming,(()=>this._result.delete(e))),this._connected.add(e));let t=this._result.get(e);return null==t&&(t=this._v_compute(e),this._result.set(e,t)),t}}Nh.__name__="Expression";class zh extends Nh{constructor(e){super(e)}static init_Stack(){this.define({fields:[Sn,[]]})}_v_compute(e){var t;const n=null!==(t=e.get_length())&&void 0!==t?t:0,r=new mn(n);for(const t of this.fields){const i=e.data[t];if(null!=i)for(let e=0,t=Math.min(n,i.length);e<t;e++)r[e]+=i[e]}return r}}zh.__name__="Stack",zh.init_Stack();class Fh extends Nh{constructor(e){super(e)}static init_CumSum(){this.define({field:[Rn],include_zero:[En,!1]})}_v_compute(e){const t=new mn(e.get_length()||0),n=e.data[this.field],r=this.include_zero?1:0;t[0]=this.include_zero?0:n[0];for(let e=1;e<t.length;e++)t[e]=t[e-1]+n[e-r];return t}}Fh.__name__="CumSum",Fh.init_CumSum();class Bh extends rs{constructor(e){super(e)}}Bh.__name__="Filter";class jh extends Bh{constructor(e){super(e)}static init_BooleanFilter(){this.define({booleans:[Sn,null]})}compute_indices(e){const t=e.length,{booleans:n}=this;return null==n?pn.all_set(t):pn.from_booleans(t,n)}}jh.__name__="BooleanFilter",jh.init_BooleanFilter();class Uh extends Bh{constructor(e){super(e)}static init_CustomJSFilter(){this.define({args:[Tn,{}],code:[Rn,""]})}get names(){return ue(this.args)}get values(){return he(this.args)}get func(){const e=hi(this.code);return new Function(...this.names,"source",e)}compute_indices(e){const t=e.length,n=this.func(...this.values,e);if(null==n)return pn.all_set(t);if(ae(n,ne))return pn.from_indices(t,n);if(ae(n,ee))return pn.from_booleans(t,n);throw new Error(`expect an array of integers or booleans, or null, got ${n}`)}}Uh.__name__="CustomJSFilter",Uh.init_CustomJSFilter();class Vh extends Bh{constructor(e){super(e)}static init_GroupFilter(){this.define({column_name:[Rn],group:[Rn]})}compute_indices(e){const t=e.get_column(this.column_name);if(null==t)return Re.warn(`${this}: groupby column '${this.column_name}' not found in the data source`),new pn(e.length,1);{const n=new pn(e.length);for(let e=0;e<n.size;e++)t[e]===this.group&&n.set(e);return n}}}Vh.__name__="GroupFilter",Vh.init_GroupFilter();class qh extends Bh{constructor(e){super(e)}static init_IndexFilter(){this.define({indices:[Sn,null]})}compute_indices(e){const t=e.length,{indices:n}=this;return null==n?pn.all_set(t):pn.from_indices(t,n)}}qh.__name__="IndexFilter",qh.init_IndexFilter();class Hh extends ac{constructor(e){super(e)}static init_FuncTickFormatter(){this.define({args:[Tn,{}],code:[Rn,""]})}get names(){return ue(this.args)}get values(){return he(this.args)}_make_func(){const e=hi(this.code);return new Function("tick","index","ticks",...this.names,e)}doFormat(e,t){const n=this._make_func().bind({});return e.map(((e,t,r)=>n(e,t,r,...this.values)))}}Hh.__name__="FuncTickFormatter",Hh.init_FuncTickFormatter();class $h extends ac{constructor(e){super(e)}static init_NumeralTickFormatter(){this.define({format:[Rn,"0,0"],language:[Rn,"en"],rounding:[mr,"round"]})}get _rounding_fn(){switch(this.rounding){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}}doFormat(e,t){const{format:n,language:r,_rounding_fn:i}=this;return e.map((e=>Lu.format(e,n,r,i)))}}$h.__name__="NumeralTickFormatter",$h.init_NumeralTickFormatter();class Wh extends ac{constructor(e){super(e)}static init_PrintfTickFormatter(){this.define({format:[Rn,"%s"]})}doFormat(e,t){return e.map((e=>Ru(this.format,e)))}}Wh.__name__="PrintfTickFormatter",Wh.init_PrintfTickFormatter();class Gh extends Ps{_map_data(){"data"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,"data"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius,this._angle=new mn(this._start_angle.length);for(let e=0,t=this._start_angle.length;e<t;e++)this._angle[e]=this._end_angle[e]-this._start_angle[e]}_render(e,t,{sx:n,sy:r,_start_angle:i,_angle:o,sinner_radius:a,souter_radius:s}){const l=this.model.properties.direction.value();for(const c of t)isNaN(n[c]+r[c]+a[c]+s[c]+i[c]+o[c])||(e.translate(n[c],r[c]),e.rotate(i[c]),e.beginPath(),e.moveTo(s[c],0),e.arc(0,0,s[c],0,o[c],l),e.rotate(o[c]),e.lineTo(a[c],0),e.arc(0,0,a[c],0,-o[c],!l),e.closePath(),e.rotate(-o[c]-i[c]),e.translate(-n[c],-r[c]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,c),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,c),e.stroke()))}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n);let o,a,s,l;if("data"==this.model.properties.outer_radius.units)o=r-this.max_outer_radius,s=r+this.max_outer_radius,a=i-this.max_outer_radius,l=i+this.max_outer_radius;else{const e=t-this.max_outer_radius,r=t+this.max_outer_radius;[o,s]=this.renderer.xscale.r_invert(e,r);const i=n-this.max_outer_radius,c=n+this.max_outer_radius;[a,l]=this.renderer.yscale.r_invert(i,c)}const c=[];for(const e of this.index.indices({x0:o,x1:s,y0:a,y1:l})){const t=this.souter_radius[e]**2,n=this.sinner_radius[e]**2,[o,a]=this.renderer.xscale.r_compute(r,this._x[e]),[s,l]=this.renderer.yscale.r_compute(i,this._y[e]),u=(o-a)**2+(s-l)**2;u<=t&&u>=n&&c.push(e)}const u=this.model.properties.direction.value(),h=[];for(const e of c)f(-Math.atan2(n-this.sy[e],t-this.sx[e]),-this._start_angle[e],-this._end_angle[e],u)&&h.push(e);return new ps({indices:h})}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}scenterxy(e){const t=(this.sinner_radius[e]+this.souter_radius[e])/2,n=(this._start_angle[e]+this._end_angle[e])/2;return[this.sx[e]+t*Math.cos(n),this.sy[e]+t*Math.sin(n)]}}Gh.__name__="AnnularWedgeView";class Yh extends Ns{constructor(e){super(e)}static init_AnnularWedge(){this.prototype.default_view=Gh,this.mixins([ni,ri]),this.define({direction:[jn,"anticlock"],inner_radius:[Hr],outer_radius:[Hr],start_angle:[qr],end_angle:[qr]})}}Yh.__name__="AnnularWedge",Yh.init_AnnularWedge();class Xh extends Ps{_map_data(){"data"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,"data"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius}_render(e,t,{sx:n,sy:r,sinner_radius:i,souter_radius:o}){for(const a of t)if(!isNaN(n[a]+r[a]+i[a]+o[a])){if(this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(e,a),e.beginPath(),wi)for(const t of[!1,!0])e.arc(n[a],r[a],i[a],0,Math.PI,t),e.arc(n[a],r[a],o[a],Math.PI,0,!t);else e.arc(n[a],r[a],i[a],0,2*Math.PI,!0),e.arc(n[a],r[a],o[a],2*Math.PI,0,!1);e.fill()}this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,a),e.beginPath(),e.arc(n[a],r[a],i[a],0,2*Math.PI),e.moveTo(n[a]+o[a],r[a]),e.arc(n[a],r[a],o[a],0,2*Math.PI),e.stroke())}}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n);let o,a,s,l;if("data"==this.model.properties.outer_radius.units)o=r-this.max_outer_radius,s=r+this.max_outer_radius,a=i-this.max_outer_radius,l=i+this.max_outer_radius;else{const e=t-this.max_outer_radius,r=t+this.max_outer_radius;[o,s]=this.renderer.xscale.r_invert(e,r);const i=n-this.max_outer_radius,c=n+this.max_outer_radius;[a,l]=this.renderer.yscale.r_invert(i,c)}const c=[];for(const e of this.index.indices({x0:o,x1:s,y0:a,y1:l})){const t=this.souter_radius[e]**2,n=this.sinner_radius[e]**2,[o,a]=this.renderer.xscale.r_compute(r,this._x[e]),[s,l]=this.renderer.yscale.r_compute(i,this._y[e]),u=(o-a)**2+(s-l)**2;u<=t&&u>=n&&c.push(e)}return new ps({indices:c})}draw_legend_for_index(e,{x0:t,y0:n,x1:r,y1:i},o){const a=o+1,s=new Array(a);s[o]=(t+r)/2;const l=new Array(a);l[o]=(n+i)/2;const c=.5*Math.min(Math.abs(r-t),Math.abs(i-n)),u=new Array(a);u[o]=.4*c;const h=new Array(a);h[o]=.8*c,this._render(e,[o],{sx:s,sy:l,sinner_radius:u,souter_radius:h})}}Xh.__name__="AnnulusView";class Zh extends Ns{constructor(e){super(e)}static init_Annulus(){this.prototype.default_view=Xh,this.mixins([ni,ri]),this.define({inner_radius:[Hr],outer_radius:[Hr]})}}Zh.__name__="Annulus",Zh.init_Annulus();class Kh extends Ps{_map_data(){"data"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius}_render(e,t,{sx:n,sy:r,sradius:i,_start_angle:o,_end_angle:a}){if(this.visuals.line.doit){const s=this.model.properties.direction.value();for(const l of t)isNaN(n[l]+r[l]+i[l]+o[l]+a[l])||(e.beginPath(),e.arc(n[l],r[l],i[l],o[l],a[l],s),this.visuals.line.set_vectorize(e,l),e.stroke())}}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}}Kh.__name__="ArcView";class Jh extends Ns{constructor(e){super(e)}static init_Arc(){this.prototype.default_view=Kh,this.mixins(ni),this.define({direction:[jn,"anticlock"],radius:[Hr],start_angle:[qr],end_angle:[qr]})}}function Qh(e,t,n,r,i,o,a,s){const l=[],c=[[],[]];for(let c=0;c<=2;c++){let u,h,d;if(0===c?(h=6*e-12*n+6*i,u=-3*e+9*n-9*i+3*a,d=3*n-3*e):(h=6*t-12*r+6*o,u=-3*t+9*r-9*o+3*s,d=3*r-3*t),Math.abs(u)<1e-12){if(Math.abs(h)<1e-12)continue;const e=-d/h;0<e&&e<1&&l.push(e);continue}const f=h*h-4*d*u,p=Math.sqrt(f);if(f<0)continue;const g=(-h+p)/(2*u);0<g&&g<1&&l.push(g);const m=(-h-p)/(2*u);0<m&&m<1&&l.push(m)}let u=l.length;const h=u;for(;u--;){const h=l[u],d=1-h,f=d*d*d*e+3*d*d*h*n+3*d*h*h*i+h*h*h*a;c[0][u]=f;const p=d*d*d*t+3*d*d*h*r+3*d*h*h*o+h*h*h*s;c[1][u]=p}return c[0][h]=e,c[1][h]=t,c[0][h+1]=a,c[1][h+1]=s,[Math.min(...c[0]),Math.max(...c[1]),Math.max(...c[0]),Math.min(...c[1])]}Jh.__name__="Arc",Jh.init_Arc();class ed extends Is{_project_data(){zo.project_xy(this._x0,this._y0),zo.project_xy(this._x1,this._y1)}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++)if(isNaN(this._x0[n]+this._x1[n]+this._y0[n]+this._y1[n]+this._cx0[n]+this._cy0[n]+this._cx1[n]+this._cy1[n]))e.add_empty();else{const[t,r,i,o]=Qh(this._x0[n],this._y0[n],this._x1[n],this._y1[n],this._cx0[n],this._cy0[n],this._cx1[n],this._cy1[n]);e.add(t,r,i,o)}}_render(e,t,{sx0:n,sy0:r,sx1:i,sy1:o,scx0:a,scy0:s,scx1:l,scy1:c}){if(this.visuals.line.doit)for(const u of t)isNaN(n[u]+r[u]+i[u]+o[u]+a[u]+s[u]+l[u]+c[u])||(e.beginPath(),e.moveTo(n[u],r[u]),e.bezierCurveTo(a[u],s[u],l[u],c[u],i[u],o[u]),this.visuals.line.set_vectorize(e,u),e.stroke())}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}ed.__name__="BezierView";class td extends Rs{constructor(e){super(e)}static init_Bezier(){this.prototype.default_view=ed,this.define({x0:[zr,{field:"x0"}],y0:[Fr,{field:"y0"}],x1:[zr,{field:"x1"}],y1:[Fr,{field:"y1"}],cx0:[zr,{field:"cx0"}],cy0:[Fr,{field:"cy0"}],cx1:[zr,{field:"cx1"}],cy1:[Fr,{field:"cy1"}]}),this.mixins(ni)}}function nd(e,t,n,r,i,o){const a=o+"_color",s=o+"_alpha";if(i.doit){let o,l;if(t.used=!0,i[a].is_value){const e=je(Ve(i[a].value())),t=new Uint32Array(r);t.fill(e),o=t}else o=i.get_array(a);if(i[s].is_value){const e=i[s].value(),t=new Float32Array(r);t.fill(e),l=t}else l=i.get_array(s);const c=new Float32Array(4*r);for(let e=0,t=r;e<t;e++){const t=Ue(o[e]);1==t[3]&&(t[3]=l[e]),c.set(t,4*e)}t.set_size(4*r*4),t.set_data(0,c),e.set_attribute(n,"vec4",t)}else t.used=!1,e.set_attribute(n,"vec4",[0,0,0,0])}td.__name__="Bezier",td.init_Bezier();class rd extends Zs{init(){const{gl:e}=this,t=`\nprecision mediump float;\nconst float SQRT_2 = 1.4142135623730951;\nconst float PI = 3.14159265358979323846264;\n//\nuniform float u_antialias;\n//\nvarying vec4 v_fg_color;\nvarying vec4 v_bg_color;\nvarying float v_linewidth;\nvarying float v_size;\nvarying vec2 v_rotation;\n\n${this._marker_code}\n\nvec4 outline(float distance, float linewidth, float antialias, vec4 fg_color, vec4 bg_color)\n{\n vec4 frag_color;\n float t = linewidth/2.0 - antialias;\n float signed_distance = distance;\n float border_distance = abs(signed_distance) - t;\n float alpha = border_distance/antialias;\n alpha = exp(-alpha*alpha);\n\n // If fg alpha is zero, it probably means no outline. To avoid a dark outline\n // shining through due to aa, we set the fg color to the bg color. Avoid if (i.e. branching).\n float select = float(bool(fg_color.a));\n fg_color.rgb = select * fg_color.rgb + (1.0 - select) * bg_color.rgb;\n // Similarly, if we want a transparent bg\n select = float(bool(bg_color.a));\n bg_color.rgb = select * bg_color.rgb + (1.0 - select) * fg_color.rgb;\n\n if( border_distance < 0.0)\n frag_color = fg_color;\n else if( signed_distance < 0.0 ) {\n frag_color = mix(bg_color, fg_color, sqrt(alpha));\n } else {\n if( abs(signed_distance) < (linewidth/2.0 + antialias) ) {\n frag_color = vec4(fg_color.rgb, fg_color.a * alpha);\n } else {\n discard;\n }\n }\n return frag_color;\n}\n\nvoid main()\n{\n vec2 P = gl_PointCoord.xy - vec2(0.5, 0.5);\n P = vec2(v_rotation.x*P.x - v_rotation.y*P.y,\n v_rotation.y*P.x + v_rotation.x*P.y);\n float point_size = SQRT_2*v_size + 2.0 * (v_linewidth + 1.5*u_antialias);\n float distance = marker(P*point_size, v_size);\n gl_FragColor = outline(distance, v_linewidth, u_antialias, v_fg_color, v_bg_color);\n}\n`;this.prog=new Ys(e),this.prog.set_shaders("\nprecision mediump float;\nconst float SQRT_2 = 1.4142135623730951;\n//\nuniform float u_pixel_ratio;\nuniform vec2 u_canvas_size;\nuniform vec2 u_offset;\nuniform vec2 u_scale;\nuniform float u_antialias;\n//\nattribute float a_sx;\nattribute float a_sy;\nattribute float a_size;\nattribute float a_angle; // in radians\nattribute float a_linewidth;\nattribute vec4 a_fg_color;\nattribute vec4 a_bg_color;\n//\nvarying float v_linewidth;\nvarying float v_size;\nvarying vec4 v_fg_color;\nvarying vec4 v_bg_color;\nvarying vec2 v_rotation;\n\nvoid main (void)\n{\n v_size = a_size * u_pixel_ratio;\n v_linewidth = a_linewidth * u_pixel_ratio;\n v_fg_color = a_fg_color;\n v_bg_color = a_bg_color;\n v_rotation = vec2(cos(-a_angle), sin(-a_angle));\n vec2 pos = vec2(a_sx, a_sy); // in pixels\n pos += 0.5; // make up for Bokeh's offset\n pos /= u_canvas_size / u_pixel_ratio; // in 0..1\n gl_Position = vec4(pos*2.0-1.0, 0.0, 1.0);\n gl_Position.y *= -1.0;\n gl_PointSize = SQRT_2 * v_size + 2.0 * (v_linewidth + 1.5*u_antialias);\n}\n",t),this.vbo_sx=new Ws(e),this.prog.set_attribute("a_sx","float",this.vbo_sx),this.vbo_sy=new Ws(e),this.prog.set_attribute("a_sy","float",this.vbo_sy),this.vbo_s=new Ws(e),this.prog.set_attribute("a_size","float",this.vbo_s),this.vbo_a=new Ws(e),this.prog.set_attribute("a_angle","float",this.vbo_a),this.vbo_linewidth=new Ws(e),this.vbo_fg_color=new Ws(e),this.vbo_bg_color=new Ws(e),this.index_buffer=new Gs(e)}draw(e,t,n){const r=t.glglyph,{nvertices:i}=r;if(r.data_changed&&(r._set_data(i),this.glyph instanceof bd&&null!=this.glyph._radius&&this.vbo_s.set_data(0,b(this.glyph.sradius,(e=>2*e))),r.data_changed=!1),this.visuals_changed&&(this._set_visuals(i),this.visuals_changed=!1),this.prog.set_uniform("u_pixel_ratio","float",[n.pixel_ratio]),this.prog.set_uniform("u_canvas_size","vec2",[n.width,n.height]),this.prog.set_attribute("a_sx","float",r.vbo_sx),this.prog.set_attribute("a_sy","float",r.vbo_sy),this.prog.set_attribute("a_size","float",r.vbo_s),this.prog.set_attribute("a_angle","float",r.vbo_a),0!=e.length)if(e.length===i)this.prog.draw(this.gl.POINTS,[0,i]);else if(i<65535){const t=window.navigator.userAgent;t.indexOf("MSIE ")+t.indexOf("Trident/")+t.indexOf("Edge/")>0&&Re.warn("WebGL warning: IE is known to produce 1px sprites whith selections."),this.index_buffer.set_size(2*e.length),this.index_buffer.set_data(0,new Uint16Array(e)),this.prog.draw(this.gl.POINTS,this.index_buffer)}else{const t=64e3,n=[];for(let e=0,r=Math.ceil(i/t);e<r;e++)n.push([]);for(let r=0,i=e.length;r<i;r++){const i=e[r]%t;n[Math.floor(e[r]/t)].push(i)}for(let e=0,i=n.length;e<i;e++){const i=new Uint16Array(n[e]),o=e*t*4;0!==i.length&&(this.prog.set_attribute("a_sx","float",r.vbo_sx,0,o),this.prog.set_attribute("a_sy","float",r.vbo_sy,0,o),this.prog.set_attribute("a_size","float",r.vbo_s,0,o),this.prog.set_attribute("a_angle","float",r.vbo_a,0,o),this.vbo_linewidth.used&&this.prog.set_attribute("a_linewidth","float",this.vbo_linewidth,0,o),this.vbo_fg_color.used&&this.prog.set_attribute("a_fg_color","vec4",this.vbo_fg_color,0,4*o),this.vbo_bg_color.used&&this.prog.set_attribute("a_bg_color","vec4",this.vbo_bg_color,0,4*o),this.index_buffer.set_size(2*i.length),this.index_buffer.set_data(0,i),this.prog.draw(this.gl.POINTS,this.index_buffer))}}}_set_data(e){const t=4*e;this.vbo_sx.set_size(t),this.vbo_sy.set_size(t),this.vbo_a.set_size(t),this.vbo_s.set_size(t),this.vbo_sx.set_data(0,this.glyph.sx),this.vbo_sy.set_data(0,this.glyph.sy),null!=this.glyph._angle&&this.vbo_a.set_data(0,new Float32Array(this.glyph._angle)),this.glyph instanceof bd&&null!=this.glyph._radius?this.vbo_s.set_data(0,b(this.glyph.sradius,(e=>2*e))):this.vbo_s.set_data(0,new Float32Array(this.glyph._size))}_set_visuals(e){!function(e,t,n,r,i,o){if(i.doit)if(i[o].is_value)t.used=!1,e.set_attribute(n,"float",[i[o].value()]);else{t.used=!0;const a=new Float32Array(i.get_array(o));t.set_size(4*r),t.set_data(0,a),e.set_attribute(n,"float",t)}else t.used=!1,e.set_attribute(n,"float",[0])}(this.prog,this.vbo_linewidth,"a_linewidth",e,this.glyph.visuals.line,"line_width"),nd(this.prog,this.vbo_fg_color,"a_fg_color",e,this.glyph.visuals.line,"line"),nd(this.prog,this.vbo_bg_color,"a_bg_color",e,this.glyph.visuals.fill,"fill"),this.prog.set_uniform("u_antialias","float",[.8])}}function id(e){return class extends rd{get _marker_code(){return e}}}rd.__name__="MarkerGL";const od=id('\nfloat marker(vec2 P, float size)\n{\n // Masks\n float diamond = max(abs(SQRT_2 / 2.0 * (P.x - P.y)), abs(SQRT_2 / 2.0 * (P.x + P.y))) - size / (2.0 * SQRT_2);\n float square = max(abs(P.x), abs(P.y)) - size / (2.0 * SQRT_2);\n // Shapes\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of "width" for aa\n float cross = min(abs(P.x), abs(P.y)) - size / 100.0; // bit of "width" for aa\n // Result is union of masked shapes\n return min(max(X, diamond), max(cross, square));\n}\n'),ad=id("\nfloat marker(vec2 P, float size)\n{\n return length(P) - size/2.0;\n}\n"),sd=id("\nfloat marker(vec2 P, float size)\n{\n // Define quadrants\n float qs = size / 2.0; // quadrant size\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\n // Intersect main shape with quadrants (to form cross)\n float circle = length(P) - size/2.0;\n float c1 = max(circle, s1);\n float c2 = max(circle, s2);\n float c3 = max(circle, s3);\n float c4 = max(circle, s4);\n // Union\n return min(min(min(c1, c2), c3), c4);\n}\n"),ld=id('\nfloat marker(vec2 P, float size)\n{\n float x = P.x - P.y;\n float y = P.x + P.y;\n // Define quadrants\n float qs = size / 2.0; // quadrant size\n float s1 = max(abs(x - qs), abs(y - qs)) - qs;\n float s2 = max(abs(x + qs), abs(y - qs)) - qs;\n float s3 = max(abs(x - qs), abs(y + qs)) - qs;\n float s4 = max(abs(x + qs), abs(y + qs)) - qs;\n // Intersect main shape with quadrants (to form cross)\n float circle = length(P) - size/2.0;\n float c1 = max(circle, s1);\n float c2 = max(circle, s2);\n float c3 = max(circle, s3);\n float c4 = max(circle, s4);\n // Union\n float almost = min(min(min(c1, c2), c3), c4);\n // In this case, the X is also outside of the main shape\n float Xmask = length(P) - size / 1.6; // a circle\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of "width" for aa\n return min(max(X, Xmask), almost);\n}\n'),cd=id('\nfloat marker(vec2 P, float size)\n{\n float square = max(abs(P.x), abs(P.y)) - size / 2.5; // 2.5 is a tweak\n float cross = min(abs(P.x), abs(P.y)) - size / 100.0; // bit of "width" for aa\n return max(square, cross);\n}\n'),ud=id("\nfloat marker(vec2 P, float size)\n{\n float x = SQRT_2 / 2.0 * (P.x * 1.5 - P.y);\n float y = SQRT_2 / 2.0 * (P.x * 1.5 + P.y);\n float r1 = max(abs(x), abs(y)) - size / (2.0 * SQRT_2);\n return r1 / SQRT_2;\n}\n"),hd=id("\nfloat marker(vec2 P, float size)\n{\n // Define quadrants\n float qs = size / 2.0; // quadrant size\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\n // Intersect main shape with quadrants (to form cross)\n float x = SQRT_2 / 2.0 * (P.x * 1.5 - P.y);\n float y = SQRT_2 / 2.0 * (P.x * 1.5 + P.y);\n float diamond = max(abs(x), abs(y)) - size / (2.0 * SQRT_2);\n diamond /= SQRT_2;\n float c1 = max(diamond, s1);\n float c2 = max(diamond, s2);\n float c3 = max(diamond, s3);\n float c4 = max(diamond, s4);\n // Union\n return min(min(min(c1, c2), c3), c4);\n}\n"),dd=id("\nfloat marker(vec2 P, float size)\n{\n vec2 q = abs(P);\n return max(q.y * 0.57735 + q.x - 1.0 * size/2.0, q.y - 0.866 * size/2.0);\n}\n"),fd=id("\nfloat marker(vec2 P, float size)\n{\n P.y += size * 0.3;\n float x = SQRT_2 / 2.0 * (P.x * 1.7 - P.y);\n float y = SQRT_2 / 2.0 * (P.x * 1.7 + P.y);\n float r1 = max(abs(x), abs(y)) - size / 1.6;\n float r2 = - P.y;\n return max(r1 / SQRT_2, r2); // Intersect diamond with rectangle\n}\n"),pd=id("\nfloat marker(vec2 P, float size)\n{\n return max(abs(P.x), abs(P.y)) - size/2.0;\n}\n"),gd=id("\nfloat marker(vec2 P, float size)\n{\n // Define quadrants\n float qs = size / 2.0; // quadrant size\n float s1 = max(abs(P.x - qs), abs(P.y - qs)) - qs;\n float s2 = max(abs(P.x + qs), abs(P.y - qs)) - qs;\n float s3 = max(abs(P.x - qs), abs(P.y + qs)) - qs;\n float s4 = max(abs(P.x + qs), abs(P.y + qs)) - qs;\n // Intersect main shape with quadrants (to form cross)\n float square = max(abs(P.x), abs(P.y)) - size/2.0;\n float c1 = max(square, s1);\n float c2 = max(square, s2);\n float c3 = max(square, s3);\n float c4 = max(square, s4);\n // Union\n return min(min(min(c1, c2), c3), c4);\n}\n"),md=id("\nfloat marker(vec2 P, float size)\n{\n float x = P.x - P.y;\n float y = P.x + P.y;\n // Define quadrants\n float qs = size / 2.0; // quadrant size\n float s1 = max(abs(x - qs), abs(y - qs)) - qs;\n float s2 = max(abs(x + qs), abs(y - qs)) - qs;\n float s3 = max(abs(x - qs), abs(y + qs)) - qs;\n float s4 = max(abs(x + qs), abs(y + qs)) - qs;\n // Intersect main shape with quadrants (to form cross)\n float square = max(abs(P.x), abs(P.y)) - size/2.0;\n float c1 = max(square, s1);\n float c2 = max(square, s2);\n float c3 = max(square, s3);\n float c4 = max(square, s4);\n // Union\n return min(min(min(c1, c2), c3), c4);\n}\n"),vd=id("\nfloat marker(vec2 P, float size)\n{\n P.y -= size * 0.3;\n float x = SQRT_2 / 2.0 * (P.x * 1.7 - P.y);\n float y = SQRT_2 / 2.0 * (P.x * 1.7 + P.y);\n float r1 = max(abs(x), abs(y)) - size / 1.6;\n float r2 = P.y;\n return max(r1 / SQRT_2, r2); // Intersect diamond with rectangle\n}\n"),yd=id('\nfloat marker(vec2 P, float size)\n{\n float circle = length(P) - size / 1.6;\n float X = min(abs(P.x - P.y), abs(P.x + P.y)) - size / 100.0; // bit of "width" for aa\n return max(circle, X);\n}\n');class bd extends Ps{initialize(){super.initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;null!=e&&(this.glglyph=new ad(e.gl,this))}_map_data(){if(null!=this._radius)if("data"==this.model.properties.radius.units)switch(this.model.radius_dimension){case"x":this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius);break;case"y":this.sradius=this.sdist(this.renderer.yscale,this._y,this._radius);break;case"max":{const e=this.sdist(this.renderer.xscale,this._x,this._radius),t=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=b(e,((e,n)=>Math.max(e,t[n])));break}case"min":{const e=this.sdist(this.renderer.xscale,this._x,this._radius),t=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=b(e,((e,n)=>Math.min(e,t[n])));break}}else this.sradius=this._radius,this.max_size=2*this.max_radius;else this.sradius=b(this._size,(e=>e/2))}_mask_data(){const[e,t]=this.renderer.plot_view.frame.bbox.ranges;let n,r,i,o;if(null!=this._radius&&"data"==this.model.properties.radius.units){const a=e.start,s=e.end;[n,i]=this.renderer.xscale.r_invert(a,s),n-=this.max_radius,i+=this.max_radius;const l=t.start,c=t.end;[r,o]=this.renderer.yscale.r_invert(l,c),r-=this.max_radius,o+=this.max_radius}else{const a=e.start-this.max_size,s=e.end+this.max_size;[n,i]=this.renderer.xscale.r_invert(a,s);const l=t.start-this.max_size,c=t.end+this.max_size;[r,o]=this.renderer.yscale.r_invert(l,c)}return this.index.indices({x0:n,x1:i,y0:r,y1:o})}_render(e,t,{sx:n,sy:r,sradius:i}){for(const o of t)isNaN(n[o]+r[o]+i[o])||(e.beginPath(),e.arc(n[o],r[o],i[o],0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,o),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,o),e.stroke()))}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n);let o,a,s,l;if(null!=this._radius&&"data"==this.model.properties.radius.units)o=r-this.max_radius,a=r+this.max_radius,s=i-this.max_radius,l=i+this.max_radius;else{const e=t-this.max_size,r=t+this.max_size;[o,a]=this.renderer.xscale.r_invert(e,r);const i=n-this.max_size,c=n+this.max_size;[s,l]=this.renderer.yscale.r_invert(i,c)}const c=this.index.indices({x0:o,x1:a,y0:s,y1:l}),u=[];if(null!=this._radius&&"data"==this.model.properties.radius.units)for(const e of c){const t=this.sradius[e]**2,[n,o]=this.renderer.xscale.r_compute(r,this._x[e]),[a,s]=this.renderer.yscale.r_compute(i,this._y[e]);(n-o)**2+(a-s)**2<=t&&u.push(e)}else for(const e of c){const r=this.sradius[e]**2;(this.sx[e]-t)**2+(this.sy[e]-n)**2<=r&&u.push(e)}return new ps({indices:u})}_hit_span(e){const{sx:t,sy:n}=e,r=this.bounds();let i,o,a,s;if("h"==e.direction){let e,n;if(a=r.y0,s=r.y1,null!=this._radius&&"data"==this.model.properties.radius.units)e=t-this.max_radius,n=t+this.max_radius,[i,o]=this.renderer.xscale.r_invert(e,n);else{const r=this.max_size/2;e=t-r,n=t+r,[i,o]=this.renderer.xscale.r_invert(e,n)}}else{let e,t;if(i=r.x0,o=r.x1,null!=this._radius&&"data"==this.model.properties.radius.units)e=n-this.max_radius,t=n+this.max_radius,[a,s]=this.renderer.yscale.r_invert(e,t);else{const r=this.max_size/2;e=n-r,t=n+r,[a,s]=this.renderer.yscale.r_invert(e,t)}}const l=[...this.index.indices({x0:i,x1:o,y0:a,y1:s})];return new ps({indices:l})}_hit_rect(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,[o,a]=this.renderer.xscale.r_invert(t,n),[s,l]=this.renderer.yscale.r_invert(r,i),c=[...this.index.indices({x0:o,x1:a,y0:s,y1:l})];return new ps({indices:c})}_hit_poly(e){const{sx:t,sy:n}=e,r=U(0,this.sx.length),i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e];zs(this.sx[e],this.sy[e],t,n)&&i.push(o)}return new ps({indices:i})}draw_legend_for_index(e,{x0:t,y0:n,x1:r,y1:i},o){const a=o+1,s=new Array(a);s[o]=(t+r)/2;const l=new Array(a);l[o]=(n+i)/2;const c=new Array(a);c[o]=.2*Math.min(Math.abs(r-t),Math.abs(i-n)),this._render(e,[o],{sx:s,sy:l,sradius:c})}}bd.__name__="CircleView";class _d extends Ns{constructor(e){super(e)}static init_Circle(){this.prototype.default_view=bd,this.mixins([ni,ri]),this.define({angle:[qr,0],size:[Hr,{units:"screen",value:4}],radius:[Hr,void 0,{optional:!0}],radius_dimension:[dr,"x"]})}}_d.__name__="Circle",_d.init_Circle();class xd extends Ps{}xd.__name__="CenterRotatableView";class wd extends Ns{constructor(e){super(e)}static init_CenterRotatable(){this.mixins([ni,ri]),this.define({angle:[qr,0],width:[Hr],height:[Hr]})}}wd.__name__="CenterRotatable",wd.init_CenterRotatable();class Ad extends xd{_set_data(){this.max_w2=0,"data"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,"data"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)}_map_data(){"data"==this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,"center"):this.sw=this._width,"data"==this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,"center"):this.sh=this._height}_render(e,t,{sx:n,sy:r,sw:i,sh:o,_angle:a}){for(const s of t)isNaN(n[s]+r[s]+i[s]+o[s]+a[s])||(e.beginPath(),e.ellipse(n[s],r[s],i[s]/2,o[s]/2,a[s],0,2*Math.PI),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,s),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,s),e.stroke()))}_hit_point(e){let t,n,r,i,o,a,s,l,c;const{sx:u,sy:h}=e,d=this.renderer.xscale.invert(u),f=this.renderer.yscale.invert(h);"data"==this.model.properties.width.units?(t=d-this.max_width,n=d+this.max_width):(a=u-this.max_width,s=u+this.max_width,[t,n]=this.renderer.xscale.r_invert(a,s)),"data"==this.model.properties.height.units?(r=f-this.max_height,i=f+this.max_height):(l=h-this.max_height,c=h+this.max_height,[r,i]=this.renderer.yscale.r_invert(l,c));const p=this.index.indices({x0:t,x1:n,y0:r,y1:i}),g=[];for(const e of p)o=Fs(u,h,this._angle[e],this.sh[e]/2,this.sw[e]/2,this.sx[e],this.sy[e]),o&&g.push(e);return new ps({indices:g})}draw_legend_for_index(e,{x0:t,y0:n,x1:r,y1:i},o){const a=o+1,s=new Array(a);s[o]=(t+r)/2;const l=new Array(a);l[o]=(n+i)/2;const c=this.sw[o]/this.sh[o],u=.8*Math.min(Math.abs(r-t),Math.abs(i-n)),h=new Array(a),d=new Array(a);c>1?(h[o]=u,d[o]=u/c):(h[o]=u*c,d[o]=u),this._render(e,[o],{sx:s,sy:l,sw:h,sh:d,_angle:[0]})}_bounds({x0:e,x1:t,y0:n,y1:r}){return{x0:e-this.max_w2,x1:t+this.max_w2,y0:n-this.max_h2,y1:r+this.max_h2}}}Ad.__name__="EllipseOvalView";class kd extends wd{constructor(e){super(e)}}kd.__name__="EllipseOval";class Td extends Ad{}Td.__name__="EllipseView";class Sd extends kd{constructor(e){super(e)}static init_Ellipse(){this.prototype.default_view=Td}}Sd.__name__="Ellipse",Sd.init_Ellipse();class Ed extends Is{get_anchor_point(e,t,n){const r=Math.min(this.sleft[t],this.sright[t]),i=Math.max(this.sright[t],this.sleft[t]),o=Math.min(this.stop[t],this.sbottom[t]),a=Math.max(this.sbottom[t],this.stop[t]);switch(e){case"top_left":return{x:r,y:o};case"top_center":return{x:(r+i)/2,y:o};case"top_right":return{x:i,y:o};case"bottom_left":return{x:r,y:a};case"bottom_center":return{x:(r+i)/2,y:a};case"bottom_right":return{x:i,y:a};case"center_left":return{x:r,y:(o+a)/2};case"center":return{x:(r+i)/2,y:(o+a)/2};case"center_right":return{x:i,y:(o+a)/2};default:return null}}_index_data(e){const{min:t,max:n}=Math,{data_size:r}=this;for(let i=0;i<r;i++){const[r,o,a,s]=this._lrtb(i);isNaN(r+o+a+s)||!isFinite(r+o+a+s)?e.add_empty():e.add(t(r,o),t(a,s),n(o,r),n(a,s))}}_render(e,t,{sleft:n,sright:r,stop:i,sbottom:o}){for(const a of t)isNaN(n[a]+i[a]+r[a]+o[a])||(e.rect(n[a],i[a],r[a]-n[a],o[a]-i[a]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,a),e.beginPath(),e.rect(n[a],i[a],r[a]-n[a],o[a]-i[a]),e.fill()),this.visuals.hatch.doit2(e,a,(()=>{e.beginPath(),e.rect(n[a],i[a],r[a]-n[a],o[a]-i[a]),e.fill()}),(()=>this.renderer.request_render())),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,a),e.beginPath(),e.rect(n[a],i[a],r[a]-n[a],o[a]-i[a]),e.stroke()))}_clamp_viewport(){const e=this.renderer.plot_view.frame.bbox.h_range,t=this.renderer.plot_view.frame.bbox.v_range,n=this.stop.length;for(let r=0;r<n;r++)this.stop[r]=Math.max(this.stop[r],t.start),this.sbottom[r]=Math.min(this.sbottom[r],t.end),this.sleft[r]=Math.max(this.sleft[r],e.start),this.sright[r]=Math.min(this.sright[r],e.end)}_hit_rect(e){return this._hit_rect_against_index(e)}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=[...this.index.indices({x0:r,y0:i,x1:r,y1:i})];return new ps({indices:o})}_hit_span(e){const{sx:t,sy:n}=e;let r;if("v"==e.direction){const e=this.renderer.yscale.invert(n),t=this.renderer.plot_view.frame.bbox.h_range,[i,o]=this.renderer.xscale.r_invert(t.start,t.end);r=[...this.index.indices({x0:i,y0:e,x1:o,y1:e})]}else{const e=this.renderer.xscale.invert(t),n=this.renderer.plot_view.frame.bbox.v_range,[i,o]=this.renderer.yscale.r_invert(n.start,n.end);r=[...this.index.indices({x0:e,y0:i,x1:e,y1:o})]}return new ps({indices:r})}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}}Ed.__name__="BoxView";class Cd extends Rs{constructor(e){super(e)}static init_Box(){this.mixins([ni,ri,ii])}}Cd.__name__="Box",Cd.init_Box();class Md extends Ed{scenterxy(e){return[(this.sleft[e]+this.sright[e])/2,this.sy[e]]}_lrtb(e){return[Math.min(this._left[e],this._right[e]),Math.max(this._left[e],this._right[e]),this._y[e]+.5*this._height[e],this._y[e]-.5*this._height[e]]}_map_data(){this.sy=this.renderer.yscale.v_compute(this._y),this.sh=this.sdist(this.renderer.yscale,this._y,this._height,"center"),this.sleft=this.renderer.xscale.v_compute(this._left),this.sright=this.renderer.xscale.v_compute(this._right);const e=this.sy.length;this.stop=new mn(e),this.sbottom=new mn(e);for(let t=0;t<e;t++)this.stop[t]=this.sy[t]-this.sh[t]/2,this.sbottom[t]=this.sy[t]+this.sh[t]/2;this._clamp_viewport()}}Md.__name__="HBarView";class Od extends Cd{constructor(e){super(e)}static init_HBar(){this.prototype.default_view=Md,this.define({left:[zr,{value:0}],y:[Fr,{field:"y"}],height:[$r,{value:1}],right:[zr,{field:"right"}]})}}Od.__name__="HBar",Od.init_HBar();class Ld extends Is{scenterxy(e){return[this.sx[e],this.sy[e]]}_set_data(){const e=this._q.length,{orientation:t,size:n,aspect_scale:r}=this.model;this._x=new mn(e),this._y=new mn(e);const i=Math.sqrt(3);if("pointytop"==t)for(let t=0;t<e;t++)this._x[t]=n*i*(this._q[t]+this._r[t]/2)/r,this._y[t]=3*-n/2*this._r[t];else for(let t=0;t<e;t++)this._x[t]=3*n/2*this._q[t],this._y[t]=-n*i*(this._r[t]+this._q[t]/2)*r}_project_data(){zo.project_xy(this._x,this._y)}_index_data(e){let t=this.model.size,n=Math.sqrt(3)*t/2;"flattop"==this.model.orientation?([n,t]=[t,n],t*=this.model.aspect_scale):n/=this.model.aspect_scale;const{data_size:r}=this;for(let i=0;i<r;i++){const r=this._x[i],o=this._y[i];isNaN(r+o)||!isFinite(r+o)?e.add_empty():e.add(r-n,o-t,r+n,o+t)}}map_data(){[this.sx,this.sy]=this.renderer.coordinates.map_to_screen(this._x,this._y),[this.svx,this.svy]=this._get_unscaled_vertices()}_get_unscaled_vertices(){const e=this.model.size,t=this.model.aspect_scale;if("pointytop"==this.model.orientation){const n=this.renderer.yscale,r=this.renderer.xscale,i=Math.abs(n.compute(0)-n.compute(e)),o=Math.sqrt(3)/2*Math.abs(r.compute(0)-r.compute(e))/t,a=i/2;return[[0,-o,-o,0,o,o],[i,a,-a,-i,-a,a]]}{const n=this.renderer.xscale,r=this.renderer.yscale,i=Math.abs(n.compute(0)-n.compute(e)),o=Math.sqrt(3)/2*Math.abs(r.compute(0)-r.compute(e))*t,a=i/2;return[[i,a,-a,-i,-a,a],[0,-o,-o,0,o,o]]}}_render(e,t,{sx:n,sy:r,svx:i,svy:o,_scale:a}){for(const s of t)if(!isNaN(n[s]+r[s]+a[s])){e.translate(n[s],r[s]),e.beginPath();for(let t=0;t<6;t++)e.lineTo(i[t]*a[s],o[t]*a[s]);e.closePath(),e.translate(-n[s],-r[s]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,s),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,s),e.stroke())}}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=this.index.indices({x0:r,y0:i,x1:r,y1:i}),a=[];for(const e of o)zs(t-this.sx[e],n-this.sy[e],this.svx,this.svy)&&a.push(e);return new ps({indices:a})}_hit_span(e){const{sx:t,sy:n}=e;let r;if("v"==e.direction){const e=this.renderer.yscale.invert(n),t=this.renderer.plot_view.frame.bbox.h_range,[i,o]=this.renderer.xscale.r_invert(t.start,t.end);r=[...this.index.indices({x0:i,y0:e,x1:o,y1:e})]}else{const e=this.renderer.xscale.invert(t),n=this.renderer.plot_view.frame.bbox.v_range,[i,o]=this.renderer.yscale.r_invert(n.start,n.end);r=[...this.index.indices({x0:e,y0:i,x1:e,y1:o})]}return new ps({indices:r})}_hit_rect(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,[o,a]=this.renderer.xscale.r_invert(t,n),[s,l]=this.renderer.yscale.r_invert(r,i),c=[...this.index.indices({x0:o,x1:a,y0:s,y1:l})];return new ps({indices:c})}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}}Ld.__name__="HexTileView";class Dd extends Rs{constructor(e){super(e)}static init_HexTile(){this.prototype.default_view=Ld,this.mixins([ni,ri]),this.define({r:[$r],q:[$r],size:[On,1],aspect_scale:[On,1],scale:[$r,1],orientation:[Jn,"pointytop"]}),this.override({line_color:null})}}Dd.__name__="HexTile",Dd.init_HexTile();class Id extends Ps{connect_signals(){super.connect_signals(),this.connect(this.model.properties.global_alpha.change,(()=>this.renderer.request_render()))}_render(e,t,{image_data:n,sx:r,sy:i,sw:o,sh:a}){const s=e.getImageSmoothingEnabled();e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.global_alpha;for(const s of t){if(null==n[s]||isNaN(r[s]+i[s]+o[s]+a[s]))continue;const t=i[s];e.translate(0,t),e.scale(1,-1),e.translate(0,-t),e.drawImage(n[s],0|r[s],0|i[s],o[s],a[s]),e.translate(0,t),e.scale(1,-1),e.translate(0,-t)}e.setImageSmoothingEnabled(s)}_set_data(e){this._set_width_heigh_data();for(let t=0,n=this._image.length;t<n;t++){if(null!=e&&e.indexOf(t)<0)continue;const n=this._image[t];let r;xi(n)?(c(2==n.dimension,"expected a 2D array"),r=n,this._height[t]=n.shape[0],this._width[t]=n.shape[1]):(r=z(n),this._height[t]=n.length,this._width[t]=n[0].length);const i=this._flat_img_to_buf8(r);this._set_image_data_from_buffer(t,i)}}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++){const[t,r,i,o]=this._lrtb(n);isNaN(t+r+i+o)||!isFinite(t+r+i+o)?e.add_empty():e.add(t,o,r,i)}}_lrtb(e){const t=this.renderer.xscale.source_range,n=this._x[e],r=t.is_reversed?n-this._dw[e]:n+this._dw[e],i=this.renderer.yscale.source_range,o=this._y[e],a=i.is_reversed?o-this._dh[e]:o+this._dh[e],[s,l]=n<r?[n,r]:[r,n],[c,u]=o<a?[o,a]:[a,o];return[s,l,u,c]}_set_width_heigh_data(){null!=this.image_data&&this.image_data.length==this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length==this._image.length||(this._width=new mn(this._image.length)),null!=this._height&&this._height.length==this._image.length||(this._height=new mn(this._image.length))}_get_or_create_canvas(e){const t=this.image_data[e];if(null!=t&&t.width==this._width[e]&&t.height==this._height[e])return t;{const t=document.createElement("canvas");return t.width=this._width[e],t.height=this._height[e],t}}_set_image_data_from_buffer(e,t){const n=this._get_or_create_canvas(e),r=n.getContext("2d"),i=r.getImageData(0,0,this._width[e],this._height[e]);i.data.set(t),r.putImageData(i,0,0),this.image_data[e]=n}_map_data(){switch(this.model.properties.dw.units){case"data":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,"edge",this.model.dilate);break;case"screen":this.sw=this._dw}switch(this.model.properties.dh.units){case"data":this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,"edge",this.model.dilate);break;case"screen":this.sh=this._dh}}_image_index(e,t,n){const[r,i,o,a]=this._lrtb(e),s=this._width[e],l=this._height[e],c=(i-r)/s,u=(o-a)/l;let h=Math.floor((t-r)/c),d=Math.floor((n-a)/u);return this.renderer.xscale.source_range.is_reversed&&(h=s-h-1),this.renderer.yscale.source_range.is_reversed&&(d=l-d-1),{index:e,dim1:h,dim2:d,flat_index:d*s+h}}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=this.index.indices({x0:r,x1:r,y0:i,y1:i}),a=new ps;for(const e of o)t!=1/0&&n!=1/0&&a.image_indices.push(this._image_index(e,r,i));return a}}Id.__name__="ImageBaseView";class Rd extends Ns{constructor(e){super(e)}static init_ImageBase(){this.define({image:[Kr],dw:[Hr],dh:[Hr],dilate:[En,!1],global_alpha:[On,1]})}}Rd.__name__="ImageBase",Rd.init_ImageBase();class Pd extends Id{connect_signals(){super.connect_signals(),this.connect(this.model.color_mapper.change,(()=>this._update_image()))}_update_image(){null!=this.image_data&&(this._set_data(null),this.renderer.plot_view.request_render())}_flat_img_to_buf8(e){return this.model.color_mapper.rgba_mapper.v_compute(e)}}Pd.__name__="ImageView";class Nd extends Rd{constructor(e){super(e)}static init_Image(){this.prototype.default_view=Pd,this.define({color_mapper:[Mn,()=>new yc({palette:["#000000","#252525","#525252","#737373","#969696","#bdbdbd","#d9d9d9","#f0f0f0","#ffffff"]})]})}}Nd.__name__="Image",Nd.init_Image();class zd extends Id{_flat_img_to_buf8(e){let t;return t=oe(e)?new Uint32Array(e):e,new Uint8Array(t.buffer)}}zd.__name__="ImageRGBAView";class Fd extends Rd{constructor(e){super(e)}static init_ImageRGBA(){this.prototype.default_view=zd}}Fd.__name__="ImageRGBA",Fd.init_ImageRGBA();class Bd{constructor(e,t={}){this._image=new Image,this._finished=!1;const{attempts:n=1,timeout:r=1}=t;this.promise=new Promise(((i,o)=>{this._image.crossOrigin="anonymous";let a=0;this._image.onerror=()=>{if(++a==n){const r=`unable to load ${e} image after ${n} attempts`;if(Re.warn(r),null==this._image.crossOrigin)return void(null!=t.failed&&t.failed());Re.warn(`attempting to load ${e} without a cross origin policy`),this._image.crossOrigin=null,a=0}setTimeout((()=>this._image.src=e),r)},this._image.onload=()=>{this._finished=!0,null!=t.loaded&&t.loaded(this._image),i(this._image)},this._image.src=e}))}get finished(){return this._finished}get image(){return this._image}}Bd.__name__="ImageLoader";class jd extends Ps{constructor(){super(...arguments),this._images_rendered=!1}initialize(){super.initialize(),this.connect(this.model.properties.global_alpha.change,(()=>this.renderer.request_render()))}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++)e.add_empty()}_set_data(){null!=this.image&&this.image.length==this._url.length||(this.image=b(this._url,(()=>null)));const{retry_attempts:e,retry_timeout:t}=this.model;for(let n=0,r=this._url.length;n<r;n++){const r=this._url[n];null!=r&&""!=r&&new Bd(r,{loaded:e=>{this.image[n]=e,this.renderer.request_render()},attempts:e+1,timeout:t})}const n="data"==this.model.properties.w.units,r="data"==this.model.properties.h.units,i=this._x.length,o=new mn(n?2*i:i),a=new mn(r?2*i:i),{anchor:s}=this.model;function l(e,t){switch(s){case"top_left":case"bottom_left":case"center_left":return[e,e+t];case"top_center":case"bottom_center":case"center":return[e-t/2,e+t/2];case"top_right":case"bottom_right":case"center_right":return[e-t,e]}}function c(e,t){switch(s){case"top_left":case"top_center":case"top_right":return[e,e-t];case"bottom_left":case"bottom_center":case"bottom_right":return[e+t,e];case"center_left":case"center":case"center_right":return[e+t/2,e-t/2]}}if(n)for(let e=0;e<i;e++)[o[e],o[i+e]]=l(this._x[e],this._w[e]);else o.set(this._x,0);if(r)for(let e=0;e<i;e++)[a[e],a[i+e]]=c(this._y[e],this._h[e]);else a.set(this._y,0);const[u,h]=w(o),[d,f]=w(a);this._bounds_rect={x0:u,x1:h,y0:d,y1:f}}has_finished(){return super.has_finished()&&1==this._images_rendered}_map_data(){const e=null!=this.model.w?this._w:b(this._x,(()=>NaN)),t=null!=this.model.h?this._h:b(this._x,(()=>NaN));switch(this.model.properties.w.units){case"data":this.sw=this.sdist(this.renderer.xscale,this._x,e,"edge",this.model.dilate);break;case"screen":this.sw=e}switch(this.model.properties.h.units){case"data":this.sh=this.sdist(this.renderer.yscale,this._y,t,"edge",this.model.dilate);break;case"screen":this.sh=t}}_render(e,t,{image:n,sx:r,sy:i,sw:o,sh:a,_angle:s}){const{frame:l}=this.renderer.plot_view;e.rect(l.bbox.left+1,l.bbox.top+1,l.bbox.width-2,l.bbox.height-2),e.clip();let c=!0;for(const l of t){if(isNaN(r[l]+i[l]+s[l]))continue;const t=n[l];null!=t?this._render_image(e,l,t,r,i,o,a,s):c=!1}c&&!this._images_rendered&&(this._images_rendered=!0,this.notify_finished())}_final_sx_sy(e,t,n,r,i){switch(e){case"top_left":return[t,n];case"top_center":return[t-r/2,n];case"top_right":return[t-r,n];case"center_right":return[t-r,n-i/2];case"bottom_right":return[t-r,n-i];case"bottom_center":return[t-r/2,n-i];case"bottom_left":return[t,n-i];case"center_left":return[t,n-i/2];case"center":return[t-r/2,n-i/2]}}_render_image(e,t,n,r,i,o,a,s){isNaN(o[t])&&(o[t]=n.width),isNaN(a[t])&&(a[t]=n.height);const{anchor:l}=this.model,[c,u]=this._final_sx_sy(l,r[t],i[t],o[t],a[t]);e.save(),e.globalAlpha=this.model.global_alpha;const h=o[t]/2,d=a[t]/2;s[t]?(e.translate(c,u),e.translate(h,d),e.rotate(s[t]),e.translate(-h,-d),e.drawImage(n,0,0,o[t],a[t]),e.translate(h,d),e.rotate(-s[t]),e.translate(-h,-d),e.translate(-c,-u)):e.drawImage(n,c,u,o[t],a[t]),e.restore()}bounds(){return this._bounds_rect}}jd.__name__="ImageURLView";class Ud extends Ns{constructor(e){super(e)}static init_ImageURL(){this.prototype.default_view=jd,this.define({url:[Xr],anchor:[Un,"top_left"],global_alpha:[On,1],angle:[qr,0],w:[Hr],h:[Hr],dilate:[En,!1],retry_attempts:[On,0],retry_timeout:[On,0]})}}Ud.__name__="ImageURL",Ud.init_ImageURL();class Vd extends Is{_project_data(){zo.project_xy(this._xs.array,this._ys.array)}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++){const t=this._xs.get(n);if(0==t.length){e.add_empty();continue}const r=this._ys.get(n);if(0==r.length){e.add_empty();continue}const[i,o]=w(t),[a,s]=w(r);e.add(i,a,o,s)}}_render(e,t,{sxs:n,sys:r}){for(const i of t){const t=n.get(i),o=r.get(i);this.visuals.line.set_vectorize(e,i);for(let n=0,r=t.length;n<r;n++)0!=n?isNaN(t[n])||isNaN(o[n])?(e.stroke(),e.beginPath()):e.lineTo(t[n],o[n]):(e.beginPath(),e.moveTo(t[n],o[n]));e.stroke()}}_hit_point(e){const t={x:e.sx,y:e.sy};let n=9999;const r=new Map;for(let e=0,i=this.sxs.length;e<i;e++){const i=Math.max(2,this.visuals.line.cache_select("line_width",e)/2),o=this.sxs.get(e),a=this.sys.get(e);let s=null;for(let e=0,r=o.length-1;e<r;e++){const r=Us(t,{x:o[e],y:a[e]},{x:o[e+1],y:a[e+1]});r<i&&r<n&&(n=r,s=[e])}null!=s&&r.set(e,s)}return new ps({indices:[...r.keys()],multiline_indices:ye(r)})}_hit_span(e){const{sx:t,sy:n}=e;let r,i;"v"==e.direction?(r=this.renderer.yscale.invert(n),i=this._ys):(r=this.renderer.xscale.invert(t),i=this._xs);const o=new Map;for(let e=0,t=i.length;e<t;e++){const t=i.get(e),n=[];for(let e=0,i=t.length-1;e<i;e++)t[e]<=r&&r<=t[e+1]&&n.push(e);n.length>0&&o.set(e,n)}return new ps({indices:[...o.keys()],multiline_indices:ye(o)})}get_interpolation_hit(e,t,n){const r=this._xs.get(e),i=this._ys.get(e),o=r[t],a=i[t],s=r[t+1],l=i[t+1];return Hs(this.renderer,n,o,a,s,l)}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}Vd.__name__="MultiLineView";class qd extends Rs{constructor(e){super(e)}static init_MultiLine(){this.prototype.default_view=Vd,this.define({xs:[Br,{field:"xs"}],ys:[jr,{field:"ys"}]}),this.mixins(ni)}}qd.__name__="MultiLine",qd.init_MultiLine();class Hd extends Is{_project_data(){}_index_data(e){const{min:t,max:n}=Math,{data_size:r}=this;for(let i=0;i<r;i++){const r=this._xs[i],o=this._ys[i];if(0==r.length||0==o.length){e.add_empty();continue}let a=1/0,s=-1/0,l=1/0,c=-1/0;for(let e=0,i=r.length;e<i;e++){const i=r[e][0],u=o[e][0];if(0!=i.length&&0!=u.length){const[e,r]=w(i),[o,h]=w(u);a=t(a,e),s=n(s,r),l=t(l,o),c=n(c,h)}}isFinite(a+s+l+c)?e.add(a,l,s,c):e.add_empty()}this._hole_index=this._index_hole_data()}_index_hole_data(){const{min:e,max:t}=Math,{data_size:n}=this,r=new Cs(n);for(let i=0;i<n;i++){const n=this._xs[i],o=this._ys[i];if(0==n.length||0==o.length){r.add_empty();continue}let a=1/0,s=-1/0,l=1/0,c=-1/0;for(let r=0,i=n.length;r<i;r++){const i=n[r],u=o[r];if(i.length>1&&u.length>1)for(let n=1,r=i.length;n<r;n++){const[r,o]=w(i[n]),[h,d]=w(u[n]);a=e(a,r),s=t(s,o),l=e(l,h),c=t(c,d)}}isFinite(a+s+l+c)?r.add(a,l,s,c):r.add_empty()}return r.finish(),r}_mask_data(){const e=this.renderer.plot_view.frame.x_range,[t,n]=[e.min,e.max],r=this.renderer.plot_view.frame.y_range,[i,o]=[r.min,r.max];return this.index.indices({x0:t,x1:n,y0:i,y1:o})}_inner_loop(e,t,n){e.beginPath();for(let r=0,i=t.length;r<i;r++)for(let i=0,o=t[r].length;i<o;i++){const o=t[r][i],a=n[r][i];for(let t=0,n=o.length;t<n;t++)0!=t?e.lineTo(o[t],a[t]):e.moveTo(o[t],a[t]);e.closePath()}}_render(e,t,{sxs:n,sys:r}){if(this.visuals.fill.doit||this.visuals.line.doit)for(const i of t){const[t,o]=[n[i],r[i]];this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._inner_loop(e,t,o),e.fill("evenodd")),this.visuals.hatch.doit2(e,i,(()=>{this._inner_loop(e,t,o),e.fill("evenodd")}),(()=>this.renderer.request_render())),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._inner_loop(e,t,o),e.stroke())}}_hit_rect(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,o=[t,n,n,t],a=[r,r,i,i],[s,l]=this.renderer.xscale.r_invert(t,n),[c,u]=this.renderer.yscale.r_invert(r,i),h=this.index.indices({x0:s,x1:l,y0:c,y1:u}),d=[];for(const e of h){const t=this.sxs[e],n=this.sys[e];let r=!0;for(let e=0,i=t.length;e<i;e++){for(let i=0,s=t[e][0].length;i<s;i++)if(!zs(t[e][0][i],n[e][0][i],o,a)){r=!1;break}if(!r)break}r&&d.push(e)}return new ps({indices:d})}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=this.index.indices({x0:r,y0:i,x1:r,y1:i}),a=this._hole_index.indices({x0:r,y0:i,x1:r,y1:i}),s=[];for(const e of o){const r=this.sxs[e],i=this.sys[e];for(let o=0,l=r.length;o<l;o++){const l=r[o].length;if(zs(t,n,r[o][0],i[o][0]))if(1==l)s.push(e);else if(a.get(e)){if(l>1){let a=!1;for(let e=1;e<l;e++)if(zs(t,n,r[o][e],i[o][e])){a=!0;break}a||s.push(e)}}else s.push(e)}}return new ps({indices:s})}_get_snap_coord(e){return A(e)/e.length}scenterxy(e,t,n){if(1==this.sxs[e].length)return[this._get_snap_coord(this.sxs[e][0][0]),this._get_snap_coord(this.sys[e][0][0])];{const r=this.sxs[e],i=this.sys[e];for(let e=0,o=r.length;e<o;e++)if(zs(t,n,r[e][0],i[e][0]))return[this._get_snap_coord(r[e][0]),this._get_snap_coord(i[e][0])]}u()}map_data(){const e=this._xs.length;this.sxs=new Array(e),this.sys=new Array(e);for(let t=0;t<e;t++){const e=this._xs[t].length;this.sxs[t]=new Array(e),this.sys[t]=new Array(e);for(let n=0;n<e;n++){const e=this._xs[t][n].length;this.sxs[t][n]=new Array(e),this.sys[t][n]=new Array(e);for(let r=0;r<e;r++){const[e,i]=this.renderer.coordinates.map_to_screen(this._xs[t][n][r],this._ys[t][n][r]);this.sxs[t][n][r]=e,this.sys[t][n][r]=i}}}}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}}Hd.__name__="MultiPolygonsView";class $d extends Rs{constructor(e){super(e)}static init_MultiPolygons(){this.prototype.default_view=Hd,this.define({xs:[Ur,{field:"xs"}],ys:[Vr,{field:"ys"}]}),this.mixins([ni,ri,ii])}}$d.__name__="MultiPolygons",$d.init_MultiPolygons();class Wd extends Ad{_map_data(){super._map_data();const{sw:e}=this,t=e.length;for(let n=0;n<t;n++)e[n]*=.75}}Wd.__name__="OvalView";class Gd extends kd{constructor(e){super(e)}static init_Oval(){this.prototype.default_view=Wd}}Gd.__name__="Oval",Gd.init_Oval();class Yd extends Is{_project_data(){zo.project_xy(this._xs.array,this._ys.array)}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++){const t=this._xs.get(n),r=this._ys.get(n);if(0==t.length)e.add_empty();else{const[n,i]=w(t),[o,a]=w(r);e.add(n,o,i,a)}}}_mask_data(){const e=this.renderer.plot_view.frame.x_range,[t,n]=[e.min,e.max],r=this.renderer.plot_view.frame.y_range,[i,o]=[r.min,r.max];return this.index.indices({x0:t,x1:n,y0:i,y1:o})}_inner_loop(e,t,n,r){for(let i=0,o=t.length;i<o;i++)0!=i?isNaN(t[i]+n[i])?(e.closePath(),r.apply(e),e.beginPath()):e.lineTo(t[i],n[i]):(e.beginPath(),e.moveTo(t[i],n[i]));e.closePath(),r.call(e)}_render(e,t,{sxs:n,sys:r}){for(const i of t){const t=n.get(i),o=r.get(i);this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,i),this._inner_loop(e,t,o,e.fill)),this.visuals.hatch.doit2(e,i,(()=>this._inner_loop(e,t,o,e.fill)),(()=>this.renderer.request_render())),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,i),this._inner_loop(e,t,o,e.stroke))}}_hit_rect(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,o=[t,n,n,t],a=[r,r,i,i],[s,l]=this.renderer.xscale.r_invert(t,n),[c,u]=this.renderer.yscale.r_invert(r,i),h=this.index.indices({x0:s,x1:l,y0:c,y1:u}),d=[];for(const e of h){const t=this.sxs.get(e),n=this.sys.get(e);let r=!0;for(let e=0,i=t.length;e<i;e++)if(!zs(t[e],n[e],o,a)){r=!1;break}r&&d.push(e)}return new ps({indices:d})}_hit_point(e){const{sx:t,sy:n}=e,r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=this.index.indices({x0:r,y0:i,x1:r,y1:i}),a=[];for(const e of o){const r=this.sxs.get(e),i=this.sys.get(e),o=r.length;for(let s=0,l=0;;l++){if(isNaN(r[l])||l==o){if(zs(t,n,r.subarray(s,l),i.subarray(s,l))){a.push(e);break}s=l+1}if(l==o)break}}return new ps({indices:a})}_get_snap_coord(e){return A(e)/e.length}scenterxy(e,t,n){const r=this.sxs.get(e),i=this.sys.get(e),o=r.length;let a=!1;for(let e=0,s=0;;s++){const l=isNaN(r[s]);if(a=a||l,s==o&&!a)return[this._get_snap_coord(r),this._get_snap_coord(i)];if(l||s==o){const o=r.subarray(e,s),a=i.subarray(e,s);if(zs(t,n,o,a))return[this._get_snap_coord(o),this._get_snap_coord(a)];e=s+1}if(s==o)break}u()}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}}Yd.__name__="PatchesView";class Xd extends Rs{constructor(e){super(e)}static init_Patches(){this.prototype.default_view=Yd,this.define({xs:[Br,{field:"xs"}],ys:[jr,{field:"ys"}]}),this.mixins([ni,ri,ii])}}Xd.__name__="Patches",Xd.init_Patches();class Zd extends Ed{scenterxy(e){return[(this.sleft[e]+this.sright[e])/2,(this.stop[e]+this.sbottom[e])/2]}_lrtb(e){return[this._left[e],this._right[e],this._top[e],this._bottom[e]]}}Zd.__name__="QuadView";class Kd extends Cd{constructor(e){super(e)}static init_Quad(){this.prototype.default_view=Zd,this.define({right:[zr,{field:"right"}],bottom:[Fr,{field:"bottom"}],left:[zr,{field:"left"}],top:[Fr,{field:"top"}]})}}function Jd(e,t,n){if(t==(e+n)/2)return[e,n];{const r=(e-t)/(e-2*t+n),i=e*(1-r)**2+2*t*(1-r)*r+n*r**2;return[Math.min(e,n,i),Math.max(e,n,i)]}}Kd.__name__="Quad",Kd.init_Quad();class Qd extends Is{_project_data(){zo.project_xy(this._x0,this._y0),zo.project_xy(this._x1,this._y1)}_index_data(e){const{data_size:t}=this;for(let n=0;n<t;n++)if(isNaN(this._x0[n]+this._x1[n]+this._y0[n]+this._y1[n]+this._cx[n]+this._cy[n]))e.add_empty();else{const[t,r]=Jd(this._x0[n],this._cx[n],this._x1[n]),[i,o]=Jd(this._y0[n],this._cy[n],this._y1[n]);e.add(t,i,r,o)}}_render(e,t,{sx0:n,sy0:r,sx1:i,sy1:o,scx:a,scy:s}){if(this.visuals.line.doit)for(const l of t)isNaN(n[l]+r[l]+i[l]+o[l]+a[l]+s[l])||(e.beginPath(),e.moveTo(n[l],r[l]),e.quadraticCurveTo(a[l],s[l],i[l],o[l]),this.visuals.line.set_vectorize(e,l),e.stroke())}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}scenterxy(){throw new Error(`${this}.scenterxy() is not implemented`)}}Qd.__name__="QuadraticView";class ef extends Rs{constructor(e){super(e)}static init_Quadratic(){this.prototype.default_view=Qd,this.define({x0:[zr,{field:"x0"}],y0:[Fr,{field:"y0"}],x1:[zr,{field:"x1"}],y1:[Fr,{field:"y1"}],cx:[zr,{field:"cx"}],cy:[Fr,{field:"cy"}]}),this.mixins(ni)}}ef.__name__="Quadratic",ef.init_Quadratic();class tf extends Ps{_map_data(){"data"==this.model.properties.length.units?this.slength=this.sdist(this.renderer.xscale,this._x,this._length):this.slength=this._length}_render(e,t,{sx:n,sy:r,slength:i,_angle:o}){if(this.visuals.line.doit){const a=2*(this.renderer.plot_view.frame.bbox.width+this.renderer.plot_view.frame.bbox.height);for(let e=0,t=i.length;e<t;e++)0==i[e]&&(i[e]=a);for(const a of t)isNaN(n[a]+r[a]+o[a]+i[a])||(e.translate(n[a],r[a]),e.rotate(o[a]),e.beginPath(),e.moveTo(0,0),e.lineTo(i[a],0),this.visuals.line.set_vectorize(e,a),e.stroke(),e.rotate(-o[a]),e.translate(-n[a],-r[a]))}}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}}tf.__name__="RayView";class nf extends Ns{constructor(e){super(e)}static init_Ray(){this.prototype.default_view=tf,this.mixins(ni),this.define({length:[Hr],angle:[qr]})}}nf.__name__="Ray",nf.init_Ray();class rf extends xd{_set_data(){this.max_w2=0,"data"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,"data"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)}_map_data(){if("data"==this.model.properties.width.units)[this.sw,this.sx0]=this._map_dist_corner_for_data_side_length(this._x,this._width,this.renderer.xscale);else{this.sw=this._width;const e=this.sx.length;this.sx0=new mn(e);for(let t=0;t<e;t++)this.sx0[t]=this.sx[t]-this.sw[t]/2}if("data"==this.model.properties.height.units)[this.sh,this.sy1]=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale);else{this.sh=this._height;const e=this.sy.length;this.sy1=new mn(e);for(let t=0;t<e;t++)this.sy1[t]=this.sy[t]-this.sh[t]/2}const e=this.sw.length;this.ssemi_diag=new mn(e);for(let t=0;t<e;t++)this.ssemi_diag[t]=Math.sqrt(this.sw[t]/2*this.sw[t]/2+this.sh[t]/2*this.sh[t]/2)}_render(e,t,{sx:n,sy:r,sx0:i,sy1:o,sw:a,sh:s,_angle:l}){if(this.visuals.fill.doit)for(const c of t)isNaN(n[c]+r[c]+i[c]+o[c]+a[c]+s[c]+l[c])||(this.visuals.fill.set_vectorize(e,c),l[c]?(e.translate(n[c],r[c]),e.rotate(l[c]),e.fillRect(-a[c]/2,-s[c]/2,a[c],s[c]),e.rotate(-l[c]),e.translate(-n[c],-r[c])):e.fillRect(i[c],o[c],a[c],s[c]));if(this.visuals.line.doit){e.beginPath();for(const c of t)isNaN(n[c]+r[c]+i[c]+o[c]+a[c]+s[c]+l[c])||0!=a[c]&&0!=s[c]&&(l[c]?(e.translate(n[c],r[c]),e.rotate(l[c]),e.rect(-a[c]/2,-s[c]/2,a[c],s[c]),e.rotate(-l[c]),e.translate(-n[c],-r[c])):e.rect(i[c],o[c],a[c],s[c]),this.visuals.line.set_vectorize(e,c),e.stroke(),e.beginPath());e.stroke()}}_hit_rect(e){return this._hit_rect_against_index(e)}_hit_point(e){let{sx:t,sy:n}=e;const r=this.renderer.xscale.invert(t),i=this.renderer.yscale.invert(n),o=this.sx0.length,a=new mn(o);for(let e=0;e<o;e++)a[e]=this.sx0[e]+this.sw[e]/2;const s=new mn(o);for(let e=0;e<o;e++)s[e]=this.sy1[e]+this.sh[e]/2;const l=x(this._ddist(0,a,this.ssemi_diag)),c=x(this._ddist(1,s,this.ssemi_diag)),u=r-l,h=r+l,d=i-c,f=i+c;let p,g;const m=[];for(const e of this.index.indices({x0:u,x1:h,y0:d,y1:f})){if(this._angle[e]){const r=Math.sin(-this._angle[e]),i=Math.cos(-this._angle[e]),o=i*(t-this.sx[e])-r*(n-this.sy[e])+this.sx[e],a=r*(t-this.sx[e])+i*(n-this.sy[e])+this.sy[e];t=o,n=a,p=Math.abs(this.sx[e]-t)<=this.sw[e]/2,g=Math.abs(this.sy[e]-n)<=this.sh[e]/2}else{const r=t-this.sx0[e],i=n-this.sy1[e];p=0<=r&&r<=this.sw[e],g=0<=i&&i<=this.sh[e]}p&&g&&m.push(e)}return new ps({indices:m})}_map_dist_corner_for_data_side_length(e,t,n){const r=e.length,i=new Float64Array(r),o=new Float64Array(r);for(let n=0;n<r;n++)i[n]=e[n]-t[n]/2,o[n]=e[n]+t[n]/2;const a=n.v_compute(i),s=n.v_compute(o),l=this.sdist(n,i,t,"edge",this.model.dilate);let c=a;for(let e=0;e<r;e++){const t=a[e],n=s[e];if(!isNaN(t+n)&&t!=n){c=t<n?a:s;break}}return[l,c]}_ddist(e,t,n){const r=0==e?this.renderer.xscale:this.renderer.yscale,i=t,o=i.length,a=new mn(o);for(let e=0;e<o;e++)a[e]=i[e]+n[e];const s=r.v_invert(i),l=r.v_invert(a),c=s.length,u=new mn(c);for(let e=0;e<c;e++)u[e]=Math.abs(l[e]-s[e]);return u}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}_bounds({x0:e,x1:t,y0:n,y1:r}){return{x0:e-this.max_w2,x1:t+this.max_w2,y0:n-this.max_h2,y1:r+this.max_h2}}}rf.__name__="RectView";class of extends wd{constructor(e){super(e)}static init_Rect(){this.prototype.default_view=rf,this.define({dilate:[En,!1]})}}of.__name__="Rect",of.init_Rect();class af extends Is{_project_data(){zo.project_xy(this._x0,this._y0),zo.project_xy(this._x1,this._y1)}_index_data(e){const{min:t,max:n}=Math,{data_size:r}=this;for(let i=0;i<r;i++){const r=this._x0[i],o=this._x1[i],a=this._y0[i],s=this._y1[i];isNaN(r+o+a+s)?e.add_empty():e.add(t(r,o),t(a,s),n(r,o),n(a,s))}}_render(e,t,{sx0:n,sy0:r,sx1:i,sy1:o}){if(this.visuals.line.doit)for(const a of t)isNaN(n[a]+r[a]+i[a]+o[a])||(e.beginPath(),e.moveTo(n[a],r[a]),e.lineTo(i[a],o[a]),this.visuals.line.set_vectorize(e,a),e.stroke())}_hit_point(e){const{sx:t,sy:n}=e,r={x:t,y:n},[i,o]=this.renderer.xscale.r_invert(t-2,t+2),[a,s]=this.renderer.yscale.r_invert(n-2,n+2),l=this.index.indices({x0:i,y0:a,x1:o,y1:s}),c=[];for(const e of l){const t=Math.max(2,this.visuals.line.cache_select("line_width",e)/2)**2;js(r,{x:this.sx0[e],y:this.sy0[e]},{x:this.sx1[e],y:this.sy1[e]})<t&&c.push(e)}return new ps({indices:c})}_hit_span(e){const[t,n]=this.renderer.plot_view.frame.bbox.ranges,{sx:r,sy:i}=e;let o,a,s;"v"==e.direction?(s=this.renderer.yscale.invert(i),[o,a]=[this._y0,this._y1]):(s=this.renderer.xscale.invert(r),[o,a]=[this._x0,this._x1]);const l=[],[c,u]=this.renderer.xscale.r_invert(t.start,t.end),[h,d]=this.renderer.yscale.r_invert(n.start,n.end),f=this.index.indices({x0:c,y0:h,x1:u,y1:d});for(const t of f){(o[t]<=s&&s<=a[t]||a[t]<=s&&s<=o[t])&&l.push(t);const n=1.5+this.visuals.line.cache_select("line_width",t)/2;o[t]==a[t]&&("h"==e.direction?Math.abs(this.sx0[t]-r)<=n&&l.push(t):Math.abs(this.sy0[t]-i)<=n&&l.push(t))}return new ps({indices:l})}scenterxy(e){return[(this.sx0[e]+this.sx1[e])/2,(this.sy0[e]+this.sy1[e])/2]}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}}af.__name__="SegmentView";class sf extends Rs{constructor(e){super(e)}static init_Segment(){this.prototype.default_view=af,this.define({x0:[zr,{field:"x0"}],y0:[Fr,{field:"y0"}],x1:[zr,{field:"x1"}],y1:[Fr,{field:"y1"}]}),this.mixins(ni)}}sf.__name__="Segment",sf.init_Segment();class lf extends Ps{_render(e,t,{sx:n,sy:r}){let i=!1,o=null;this.visuals.line.set_value(e);const a=t.length;if(!(a<2)){e.beginPath(),e.moveTo(n[0],r[0]);for(const a of t){let t,s,l,c;switch(this.model.mode){case"before":[t,l]=[n[a-1],r[a]],[s,c]=[n[a],r[a]];break;case"after":[t,l]=[n[a],r[a-1]],[s,c]=[n[a],r[a]];break;case"center":{const e=(n[a-1]+n[a])/2;[t,l]=[e,r[a-1]],[s,c]=[e,r[a]];break}default:throw new Error("unexpected")}if(i){if(!isFinite(n[a]+r[a])){e.stroke(),e.beginPath(),i=!1,o=a;continue}null!=o&&a-o>1&&(e.stroke(),i=!1)}i?(e.lineTo(t,l),e.lineTo(s,c)):(e.beginPath(),e.moveTo(n[a],r[a]),i=!0),o=a}e.lineTo(n[a-1],r[a-1]),e.stroke()}}draw_legend_for_index(e,t,n){Vs(this.visuals,e,t,n)}}lf.__name__="StepView";class cf extends Ns{constructor(e){super(e)}static init_Step(){this.prototype.default_view=lf,this.mixins(ni),this.define({mode:[_r,"before"]})}}cf.__name__="Step",cf.init_Step();class uf extends Ps{_rotate_point(e,t,n,r,i){return[(e-n)*Math.cos(i)-(t-r)*Math.sin(i)+n,(e-n)*Math.sin(i)+(t-r)*Math.cos(i)+r]}_text_bounds(e,t,n,r){return[[e,e+n,e+n,e,e],[t,t,t-r,t-r,t]]}_render(e,t,{sx:n,sy:r,_x_offset:i,_y_offset:o,_angle:a,_text:s}){this._sys=[],this._sxs=[];for(const l of t)if(this._sxs[l]=[],this._sys[l]=[],!isNaN(n[l]+r[l]+i[l]+o[l]+a[l])&&null!=s[l]&&this.visuals.text.doit){const t=`${s[l]}`;e.save(),e.translate(n[l]+i[l],r[l]+o[l]),e.rotate(a[l]),this.visuals.text.set_vectorize(e,l);const c=this.visuals.text.cache_select("font",l),{height:u}=Nc(c),h=this.visuals.text.text_line_height.value()*u;if(-1==t.indexOf("\n")){e.fillText(t,0,0);const a=n[l]+i[l],s=r[l]+o[l],c=e.measureText(t).width,[u,d]=this._text_bounds(a,s,c,h);this._sxs[l].push(u),this._sys[l].push(d)}else{const a=t.split("\n"),s=h*a.length,c=this.visuals.text.cache_select("text_baseline",l);let u;switch(c){case"top":u=0;break;case"middle":u=-s/2+h/2;break;case"bottom":u=-s+h;break;default:u=0,console.warn(`'${c}' baseline not supported with multi line text`)}for(const t of a){e.fillText(t,0,u);const a=n[l]+i[l],s=u+r[l]+o[l],c=e.measureText(t).width,[d,f]=this._text_bounds(a,s,c,h);this._sxs[l].push(d),this._sys[l].push(f),u+=h}}e.restore()}}_hit_point(e){const{sx:t,sy:n}=e,r=[];for(let e=0;e<this._sxs.length;e++){const i=this._sxs[e],o=this._sys[e],a=i.length;for(let s=0,l=a;s<l;s++){const[l,c]=this._rotate_point(t,n,i[a-1][0],o[a-1][0],-this._angle[e]);zs(l,c,i[s],o[s])&&r.push(e)}}return new ps({indices:r})}scenterxy(e){const t=this._sxs[e],n=this._sys[e];c(0!=t.length&&0!=n.length);const r=t[0][0],i=n[0][0],o=(t[0][2]+r)/2,a=(n[0][2]+i)/2,[s,l]=this._rotate_point(o,a,r,i,this._angle[e]);return[s,l]}}uf.__name__="TextView";class hf extends Ns{constructor(e){super(e)}static init_Text(){this.prototype.default_view=uf,this.mixins(oi),this.define({text:[Zr,{field:"text"}],angle:[qr,0],x_offset:[$r,0],y_offset:[$r,0]})}}hf.__name__="Text",hf.init_Text();class df extends Ed{scenterxy(e){return[this.sx[e],(this.stop[e]+this.sbottom[e])/2]}_lrtb(e){return[this._x[e]-this._width[e]/2,this._x[e]+this._width[e]/2,Math.max(this._top[e],this._bottom[e]),Math.min(this._top[e],this._bottom[e])]}_map_data(){this.sx=this.renderer.xscale.v_compute(this._x),this.sw=this.sdist(this.renderer.xscale,this._x,this._width,"center"),this.stop=this.renderer.yscale.v_compute(this._top),this.sbottom=this.renderer.yscale.v_compute(this._bottom);const e=this.sx.length;this.sleft=new mn(e),this.sright=new mn(e);for(let t=0;t<e;t++)this.sleft[t]=this.sx[t]-this.sw[t]/2,this.sright[t]=this.sx[t]+this.sw[t]/2;this._clamp_viewport()}}df.__name__="VBarView";class ff extends Cd{constructor(e){super(e)}static init_VBar(){this.prototype.default_view=df,this.define({x:[zr,{field:"x"}],bottom:[Fr,{value:0}],width:[$r,{value:1}],top:[Fr,{field:"top"}]})}}ff.__name__="VBar",ff.init_VBar();class pf extends Ps{_map_data(){"data"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius}_render(e,t,{sx:n,sy:r,sradius:i,_start_angle:o,_end_angle:a}){const s=this.model.properties.direction.value();for(const l of t)isNaN(n[l]+r[l]+i[l]+o[l]+a[l])||(e.beginPath(),e.arc(n[l],r[l],i[l],o[l],a[l],s),e.lineTo(n[l],r[l]),e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,l),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,l),e.stroke()))}_hit_point(e){let t,n,r,i,o,a,s,l,c;const{sx:u,sy:h}=e,d=this.renderer.xscale.invert(u),p=this.renderer.yscale.invert(h),g=2*this.max_radius;"data"===this.model.properties.radius.units?(a=d-g,s=d+g,l=p-g,c=p+g):(n=u-g,r=u+g,[a,s]=this.renderer.xscale.r_invert(n,r),i=h-g,o=h+g,[l,c]=this.renderer.yscale.r_invert(i,o));const m=[];for(const e of this.index.indices({x0:a,x1:s,y0:l,y1:c})){const a=this.sradius[e]**2;[n,r]=this.renderer.xscale.r_compute(d,this._x[e]),[i,o]=this.renderer.yscale.r_compute(p,this._y[e]),t=(n-r)**2+(i-o)**2,t<=a&&m.push(e)}const v=this.model.properties.direction.value(),y=[];for(const e of m)f(-Math.atan2(h-this.sy[e],u-this.sx[e]),-this._start_angle[e],-this._end_angle[e],v)&&y.push(e);return new ps({indices:y})}draw_legend_for_index(e,t,n){qs(this.visuals,e,t,n)}scenterxy(e){const t=this.sradius[e]/2,n=(this._start_angle[e]+this._end_angle[e])/2;return[this.sx[e]+t*Math.cos(n),this.sy[e]+t*Math.sin(n)]}}pf.__name__="WedgeView";class gf extends Ns{constructor(e){super(e)}static init_Wedge(){this.prototype.default_view=pf,this.mixins([ni,ri]),this.define({direction:[jn,"anticlock"],radius:[Hr],start_angle:[qr],end_angle:[qr]})}}gf.__name__="Wedge",gf.init_Wedge();class mf extends rs{constructor(e){super(e)}}mf.__name__="LayoutProvider";class vf extends mf{constructor(e){super(e)}static init_StaticLayoutProvider(){this.define({graph_layout:[Tn,{}]})}get_node_coordinates(e){const t=e.data.index,n=t.length,r=new mn(n),i=new mn(n);for(let e=0;e<n;e++){const n=this.graph_layout[t[e]],[o,a]=null!=n?n:[NaN,NaN];r[e]=o,i[e]=a}return[r,i]}get_edge_coordinates(e){const t=e.data.start,n=e.data.end,r=t.length,i=[],o=[],a=null!=e.data.xs&&null!=e.data.ys;for(let s=0;s<r;s++){const r=null!=this.graph_layout[t[s]]&&null!=this.graph_layout[n[s]];if(a&&r)i.push(e.data.xs[s]),o.push(e.data.ys[s]);else{let e,a;r?(e=this.graph_layout[t[s]],a=this.graph_layout[n[s]]):(e=[NaN,NaN],a=[NaN,NaN]),i.push([e[0],a[0]]),o.push([e[1],a[1]])}}return[i,o]}}vf.__name__="StaticLayoutProvider",vf.init_StaticLayoutProvider();class yf extends gu{_render(){const e=this.layer.ctx;e.save(),this._draw_regions(e),this._draw_minor_grids(e),this._draw_grids(e),e.restore()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render()))}_draw_regions(e){if(!this.visuals.band_fill.doit&&!this.visuals.band_hatch.doit)return;this.visuals.band_fill.set_value(e);const[t,n]=this.grid_coords("major",!1);for(let r=0;r<t.length-1;r++){if(r%2!=1)continue;const[i,o]=this.coordinates.map_to_screen(t[r],n[r]),[a,s]=this.coordinates.map_to_screen(t[r+1],n[r+1]);this.visuals.band_fill.doit&&e.fillRect(i[0],o[0],a[1]-i[0],s[1]-o[0]),this.visuals.band_hatch.doit2(e,r,(()=>{e.fillRect(i[0],o[0],a[1]-i[0],s[1]-o[0])}),(()=>this.request_render()))}}_draw_grids(e){if(!this.visuals.grid_line.doit)return;const[t,n]=this.grid_coords("major");this._draw_grid_helper(e,this.visuals.grid_line,t,n)}_draw_minor_grids(e){if(!this.visuals.minor_grid_line.doit)return;const[t,n]=this.grid_coords("minor");this._draw_grid_helper(e,this.visuals.minor_grid_line,t,n)}_draw_grid_helper(e,t,n,r){t.set_value(e),e.beginPath();for(let t=0;t<n.length;t++){const[i,o]=this.coordinates.map_to_screen(n[t],r[t]);e.moveTo(Math.round(i[0]),Math.round(o[0]));for(let t=1;t<i.length;t++)e.lineTo(Math.round(i[t]),Math.round(o[t]))}e.stroke()}ranges(){const e=this.model.dimension,t=(e+1)%2,{ranges:n}=this.coordinates;return[n[e],n[t]]}computed_bounds(){const[e]=this.ranges(),t=this.model.bounds,n=[e.min,e.max];let r,i;if(oe(t))r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]),r<n[0]&&(r=n[0]),i>n[1]&&(i=n[1]);else{[r,i]=n;for(const e of this.plot_view.axis_views)e.dimension==this.model.dimension&&e.model.x_range_name==this.model.x_range_name&&e.model.y_range_name==this.model.y_range_name&&([r,i]=e.computed_bounds)}return[r,i]}grid_coords(e,t=!0){const n=this.model.dimension,r=(n+1)%2,[i,o]=this.ranges();let[a,s]=this.computed_bounds();[a,s]=[Math.min(a,s),Math.max(a,s)];const l=[[],[]],c=this.model.get_ticker();if(null==c)return l;const u=c.get_ticks(a,s,i,o.min,{})[e],h=i.min,d=i.max,f=o.min,p=o.max;t||(u[0]!=h&&u.splice(0,0,h),u[u.length-1]!=d&&u.push(d));for(let e=0;e<u.length;e++){if((u[e]==h||u[e]==d)&&t)continue;const i=[],o=[],a=2;for(let t=0;t<a;t++){const n=f+(p-f)/(a-1)*t;i.push(u[e]),o.push(n)}l[n].push(i),l[r].push(o)}return l}}yf.__name__="GridView";class bf extends mu{constructor(e){super(e)}static init_Grid(){this.prototype.default_view=yf,this.mixins([["grid_",Jr],["minor_grid_",Jr],["band_",Qr],["band_",ei]]),this.define({bounds:[Tn,"auto"],dimension:[Tn,0],axis:[Mn],ticker:[Mn]}),this.override({level:"underlay",band_fill_color:null,band_fill_alpha:0,grid_line_color:"#e5e5e5",minor_grid_line_color:null})}get_ticker(){return null!=this.ticker?this.ticker:null!=this.axis?this.axis.ticker:null}}bf.__name__="Grid",bf.init_Grid();const _f="bk-root";class xf extends Na{constructor(){super(...arguments),this._idle_notified=!1,this._offset_parent=null,this._viewport={}}initialize(){super.initialize(),this.el.style.position=this.is_root?"relative":"absolute",this._child_views=new Map}async lazy_initialize(){await this.build_child_views()}remove(){for(const e of this.child_views)e.remove();this._child_views.clear(),super.remove()}connect_signals(){super.connect_signals(),this.is_root&&(this._on_resize=()=>this.resize_layout(),window.addEventListener("resize",this._on_resize),this._parent_observer=setInterval((()=>{const e=this.el.offsetParent;this._offset_parent!=e&&(this._offset_parent=e,null!=e&&(this.compute_viewport(),this.invalidate_layout()))}),250));const e=this.model.properties;this.on_change([e.width,e.height,e.min_width,e.min_height,e.max_width,e.max_height,e.margin,e.width_policy,e.height_policy,e.sizing_mode,e.aspect_ratio,e.visible],(()=>this.invalidate_layout())),this.on_change([e.background,e.css_classes],(()=>this.invalidate_render()))}disconnect_signals(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener("resize",this._on_resize),super.disconnect_signals()}css_classes(){return super.css_classes().concat(this.model.css_classes)}get child_views(){return this.child_models.map((e=>this._child_views.get(e)))}async build_child_views(){await pl(this._child_views,this.child_models,{parent:this})}render(){super.render(),oa(this.el);const{background:e}=this.model;this.el.style.backgroundColor=null!=e?e:"",va(this.el).clear().add(...this.css_classes());for(const e of this.child_views)this.el.appendChild(e.el),e.render()}update_layout(){for(const e of this.child_views)e.update_layout();this._update_layout()}update_position(){this.el.style.display=this.model.visible?"block":"none";const e=this.is_root?this.layout.sizing.margin:void 0;pa(this.el,this.layout.bbox,e);for(const e of this.child_views)e.update_position()}after_layout(){for(const e of this.child_views)e.after_layout();this._has_finished=!0}compute_viewport(){this._viewport=this._viewport_size()}renderTo(e){e.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()}build(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this}async rebuild(){await this.build_child_views(),this.invalidate_render()}compute_layout(){const e=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),Re.debug(`layout computed in ${Date.now()-e} ms`),this.notify_finished()}resize_layout(){this.root.compute_viewport(),this.root.compute_layout()}invalidate_layout(){this.root.update_layout(),this.root.compute_layout()}invalidate_render(){this.render(),this.invalidate_layout()}has_finished(){if(!super.has_finished())return!1;for(const e of this.child_views)if(!e.has_finished())return!1;return!0}notify_finished(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()}_width_policy(){return null!=this.model.width?"fixed":"fit"}_height_policy(){return null!=this.model.height?"fixed":"fit"}box_sizing(){let{width_policy:e,height_policy:t,aspect_ratio:n}=this.model;"auto"==e&&(e=this._width_policy()),"auto"==t&&(t=this._height_policy());const{sizing_mode:r}=this.model;if(null!=r)if("fixed"==r)e=t="fixed";else if("stretch_both"==r)e=t="max";else if("stretch_width"==r)e="max";else if("stretch_height"==r)t="max";else switch(null==n&&(n="auto"),r){case"scale_width":e="max",t="min";break;case"scale_height":e="min",t="max";break;case"scale_both":e="max",t="max"}const i={width_policy:e,height_policy:t},{min_width:o,min_height:a}=this.model;null!=o&&(i.min_width=o),null!=a&&(i.min_height=a);const{width:s,height:l}=this.model;null!=s&&(i.width=s),null!=l&&(i.height=l);const{max_width:c,max_height:u}=this.model;null!=c&&(i.max_width=c),null!=u&&(i.max_height=u),"auto"==n&&null!=s&&null!=l?i.aspect=s/l:te(n)&&(i.aspect=n);const{margin:h}=this.model;if(null!=h)if(te(h))i.margin={top:h,right:h,bottom:h,left:h};else if(2==h.length){const[e,t]=h;i.margin={top:e,right:t,bottom:e,left:t}}else{const[e,t,n,r]=h;i.margin={top:e,right:t,bottom:n,left:r}}i.visible=this.model.visible;const{align:d}=this.model;return oe(d)?[i.halign,i.valign]=d:i.halign=i.valign=d,i}_viewport_size(){return function(e,t){const{display:n}=e.style;e.style.display="none";try{return t()}finally{e.style.display=n}}(this.el,(()=>{let e=this.el;for(;e=e.parentElement;){if(e.classList.contains(_f))continue;if(e==document.body){const{margin:{left:e,right:t,top:n,bottom:r}}=da(document.body);return{width:Math.ceil(document.documentElement.clientWidth-e-t),height:Math.ceil(document.documentElement.clientHeight-n-r)}}const{padding:{left:t,right:n,top:r,bottom:i}}=da(e),{width:o,height:a}=e.getBoundingClientRect(),s=Math.ceil(o-t-n),l=Math.ceil(a-r-i);if(s>0||l>0)return{width:s>0?s:void 0,height:l>0?l:void 0}}return{}}))}export(e,t=!0){const n=new qa("png"==e?"canvas":"svg",t),{width:r,height:i}=this.layout.bbox;n.resize(r,i);for(const r of this.child_views){const i=r.export(e,t),{x:o,y:a}=r.layout.bbox;n.ctx.drawImage(i.canvas,o,a)}return n}serializable_state(){return Object.assign(Object.assign({},super.serializable_state()),{bbox:this.layout.bbox.box,children:this.child_views.map((e=>e.serializable_state()))})}}xf.__name__="LayoutDOMView";class wf extends rs{constructor(e){super(e)}static init_LayoutDOM(){this.define((e=>{const{Boolean:t,Number:n,String:r,Null:i,Auto:o,Color:a,Array:s,Tuple:l,Or:c}=e,u=l(n,n),h=l(n,n,n,n);return{width:[c(n,i),null],height:[c(n,i),null],min_width:[c(n,i),null],min_height:[c(n,i),null],max_width:[c(n,i),null],max_height:[c(n,i),null],margin:[c(n,u,h),[0,0,0,0]],width_policy:[c(gh,o),"auto"],height_policy:[c(gh,o),"auto"],aspect_ratio:[c(n,o,i),null],sizing_mode:[c(Yt,i),null],visible:[t,!0],disabled:[t,!1],align:[c(dt,l(dt,dt)),"start"],background:[c(a,i),null],css_classes:[s(r),[]]}}))}}wf.__name__="LayoutDOM",wf.init_LayoutDOM();class Af extends xf{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(()=>this.rebuild()))}get child_models(){return this.model.children}}Af.__name__="BoxView";class kf extends wf{constructor(e){super(e)}static init_Box(){this.define({children:[Sn,[]],spacing:[On,0]})}}kf.__name__="Box",kf.init_Box();class Tf extends Af{_update_layout(){const e=this.child_views.map((e=>e.layout));this.layout=new Lh(e),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}}Tf.__name__="ColumnView";class Sf extends kf{constructor(e){super(e)}static init_Column(){this.prototype.default_view=Tf,this.define({rows:[Tn,"auto"]})}}Sf.__name__="Column",Sf.init_Column();class Ef extends xf{connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(()=>this.rebuild()))}get child_models(){return this.model.children.map((([e])=>e))}_update_layout(){this.layout=new Mh,this.layout.rows=this.model.rows,this.layout.cols=this.model.cols,this.layout.spacing=this.model.spacing;for(const[e,t,n,r,i]of this.model.children){const o=this._child_views.get(e);this.layout.items.push({layout:o.layout,row:t,col:n,row_span:r,col_span:i})}this.layout.set_sizing(this.box_sizing())}}Ef.__name__="GridBoxView";class Cf extends wf{constructor(e){super(e)}static init_GridBox(){this.prototype.default_view=Ef,this.define({children:[Sn,[]],rows:[Tn,"auto"],cols:[Tn,"auto"],spacing:[Tn,0]})}}Cf.__name__="GridBox",Cf.init_GridBox();class Mf extends xf{get child_models(){return[]}_update_layout(){this.layout=new Dh(this.el),this.layout.set_sizing(this.box_sizing())}}Mf.__name__="HTMLBoxView";class Of extends wf{constructor(e){super(e)}}Of.__name__="HTMLBox";class Lf extends Af{_update_layout(){const e=this.child_views.map((e=>e.layout));this.layout=new Oh(e),this.layout.cols=this.model.cols,this.layout.spacing=[0,this.model.spacing],this.layout.set_sizing(this.box_sizing())}}Lf.__name__="RowView";class Df extends kf{constructor(e){super(e)}static init_Row(){this.prototype.default_view=Lf,this.define({cols:[Tn,"auto"]})}}Df.__name__="Row",Df.init_Row();class If extends xf{get child_models(){return[]}_update_layout(){this.layout=new _h,this.layout.set_sizing(this.box_sizing())}}If.__name__="SpacerView";class Rf extends wf{constructor(e){super(e)}static init_Spacer(){this.prototype.default_view=If}}Rf.__name__="Spacer",Rf.init_Spacer();const Pf="bk-btn",Nf="bk-btn-group",zf="bk-btn-default";function Ff(e){switch(e){case"default":return zf;case"primary":return"bk-btn-primary";case"success":return"bk-btn-success";case"warning":return"bk-btn-warning";case"danger":return"bk-btn-danger"}}const Bf="bk-menu",jf="bk-caret",Uf="bk-divider",Vf="\n.bk-root .bk-btn {\n height: 100%;\n display: inline-block;\n text-align: center;\n vertical-align: middle;\n white-space: nowrap;\n cursor: pointer;\n padding: 6px 12px;\n font-size: 12px;\n border: 1px solid transparent;\n border-radius: 4px;\n outline: 0;\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n}\n.bk-root .bk-btn:hover,\n.bk-root .bk-btn:focus {\n text-decoration: none;\n}\n.bk-root .bk-btn:active,\n.bk-root .bk-btn.bk-active {\n background-image: none;\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.bk-root .bk-btn[disabled] {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.65;\n box-shadow: none;\n}\n.bk-root .bk-btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.bk-root .bk-btn-default:hover {\n background-color: #f5f5f5;\n border-color: #b8b8b8;\n}\n.bk-root .bk-btn-default.bk-active {\n background-color: #ebebeb;\n border-color: #adadad;\n}\n.bk-root .bk-btn-default[disabled],\n.bk-root .bk-btn-default[disabled]:hover,\n.bk-root .bk-btn-default[disabled]:focus,\n.bk-root .bk-btn-default[disabled]:active,\n.bk-root .bk-btn-default[disabled].bk-active {\n background-color: #e6e6e6;\n border-color: #ccc;\n}\n.bk-root .bk-btn-primary {\n color: #fff;\n background-color: #428bca;\n border-color: #357ebd;\n}\n.bk-root .bk-btn-primary:hover {\n background-color: #3681c1;\n border-color: #2c699e;\n}\n.bk-root .bk-btn-primary.bk-active {\n background-color: #3276b1;\n border-color: #285e8e;\n}\n.bk-root .bk-btn-primary[disabled],\n.bk-root .bk-btn-primary[disabled]:hover,\n.bk-root .bk-btn-primary[disabled]:focus,\n.bk-root .bk-btn-primary[disabled]:active,\n.bk-root .bk-btn-primary[disabled].bk-active {\n background-color: #506f89;\n border-color: #357ebd;\n}\n.bk-root .bk-btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.bk-root .bk-btn-success:hover {\n background-color: #4eb24e;\n border-color: #409240;\n}\n.bk-root .bk-btn-success.bk-active {\n background-color: #47a447;\n border-color: #398439;\n}\n.bk-root .bk-btn-success[disabled],\n.bk-root .bk-btn-success[disabled]:hover,\n.bk-root .bk-btn-success[disabled]:focus,\n.bk-root .bk-btn-success[disabled]:active,\n.bk-root .bk-btn-success[disabled].bk-active {\n background-color: #667b66;\n border-color: #4cae4c;\n}\n.bk-root .bk-btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.bk-root .bk-btn-warning:hover {\n background-color: #eea43b;\n border-color: #e89014;\n}\n.bk-root .bk-btn-warning.bk-active {\n background-color: #ed9c28;\n border-color: #d58512;\n}\n.bk-root .bk-btn-warning[disabled],\n.bk-root .bk-btn-warning[disabled]:hover,\n.bk-root .bk-btn-warning[disabled]:focus,\n.bk-root .bk-btn-warning[disabled]:active,\n.bk-root .bk-btn-warning[disabled].bk-active {\n background-color: #c89143;\n border-color: #eea236;\n}\n.bk-root .bk-btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.bk-root .bk-btn-danger:hover {\n background-color: #d5433e;\n border-color: #bd2d29;\n}\n.bk-root .bk-btn-danger.bk-active {\n background-color: #d2322d;\n border-color: #ac2925;\n}\n.bk-root .bk-btn-danger[disabled],\n.bk-root .bk-btn-danger[disabled]:hover,\n.bk-root .bk-btn-danger[disabled]:focus,\n.bk-root .bk-btn-danger[disabled]:active,\n.bk-root .bk-btn-danger[disabled].bk-active {\n background-color: #a55350;\n border-color: #d43f3a;\n}\n.bk-root .bk-btn-group {\n height: 100%;\n display: flex;\n display: -webkit-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n align-items: center;\n -webkit-align-items: center;\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-btn-group > .bk-btn {\n flex-grow: 1;\n -webkit-flex-grow: 1;\n}\n.bk-root .bk-btn-group > .bk-btn + .bk-btn {\n margin-left: -1px;\n}\n.bk-root .bk-btn-group > .bk-btn:first-child:not(:last-child) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.bk-root .bk-btn-group > .bk-btn:not(:first-child):last-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.bk-root .bk-btn-group > .bk-btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.bk-root .bk-btn-group .bk-dropdown-toggle {\n flex: 0 0 0;\n -webkit-flex: 0 0 0;\n padding: 6px 6px;\n}\n",qf="\n.bk-root .bk-menu-icon {\n width: 28px;\n height: 28px;\n background-size: 60%;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center;\n}\n.bk-root .bk-context-menu {\n position: absolute;\n display: inline-flex;\n display: -webkit-inline-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n width: auto;\n height: auto;\n z-index: 100;\n cursor: pointer;\n font-size: 12px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n}\n.bk-root .bk-context-menu.bk-horizontal {\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-context-menu.bk-vertical {\n flex-direction: column;\n -webkit-flex-direction: column;\n}\n.bk-root .bk-context-menu > .bk-divider {\n cursor: default;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.bk-root .bk-context-menu.bk-horizontal > .bk-divider {\n width: 1px;\n margin: 5px 0;\n}\n.bk-root .bk-context-menu.bk-vertical > .bk-divider {\n height: 1px;\n margin: 0 5px;\n}\n.bk-root .bk-context-menu > :not(.bk-divider) {\n border: 1px solid transparent;\n}\n.bk-root .bk-context-menu > :not(.bk-divider).bk-active {\n border-color: #26aae1;\n}\n.bk-root .bk-context-menu > :not(.bk-divider):hover {\n background-color: #f9f9f9;\n}\n.bk-root .bk-context-menu.bk-horizontal > :not(.bk-divider):first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.bk-root .bk-context-menu.bk-horizontal > :not(.bk-divider):last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.bk-root .bk-context-menu.bk-vertical > :not(.bk-divider):first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.bk-root .bk-context-menu.bk-vertical > :not(.bk-divider):last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.bk-root .bk-menu {\n position: absolute;\n left: 0;\n width: 100%;\n z-index: 100;\n cursor: pointer;\n font-size: 12px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n}\n.bk-root .bk-menu.bk-above {\n bottom: 100%;\n}\n.bk-root .bk-menu.bk-below {\n top: 100%;\n}\n.bk-root .bk-menu > .bk-divider {\n height: 1px;\n margin: 7.5px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.bk-root .bk-menu > :not(.bk-divider) {\n padding: 6px 12px;\n}\n.bk-root .bk-menu > :not(.bk-divider):hover,\n.bk-root .bk-menu > :not(.bk-divider).bk-active {\n background-color: #e6e6e6;\n}\n.bk-root .bk-caret {\n display: inline-block;\n vertical-align: middle;\n width: 0;\n height: 0;\n margin: 0 5px;\n}\n.bk-root .bk-caret.bk-down {\n border-top: 4px solid;\n}\n.bk-root .bk-caret.bk-up {\n border-bottom: 4px solid;\n}\n.bk-root .bk-caret.bk-down,\n.bk-root .bk-caret.bk-up {\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.bk-root .bk-caret.bk-left {\n border-right: 4px solid;\n}\n.bk-root .bk-caret.bk-right {\n border-left: 4px solid;\n}\n.bk-root .bk-caret.bk-left,\n.bk-root .bk-caret.bk-right {\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n}\n";class Hf extends xf{connect_signals(){super.connect_signals(),this.connect(this.model.properties.tabs.change,(()=>this.rebuild())),this.connect(this.model.properties.active.change,(()=>this.on_active_change()))}styles(){return[...super.styles(),Vf,qf,'\n.bk-root .bk-tabs-header {\n display: flex;\n display: -webkit-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n align-items: center;\n -webkit-align-items: center;\n overflow: hidden;\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n}\n.bk-root .bk-tabs-header .bk-btn-group {\n height: auto;\n margin-right: 5px;\n}\n.bk-root .bk-tabs-header .bk-btn-group > .bk-btn {\n flex-grow: 0;\n -webkit-flex-grow: 0;\n height: auto;\n padding: 4px 4px;\n}\n.bk-root .bk-tabs-header .bk-headers-wrapper {\n flex-grow: 1;\n -webkit-flex-grow: 1;\n overflow: hidden;\n color: #666666;\n}\n.bk-root .bk-tabs-header.bk-above .bk-headers-wrapper {\n border-bottom: 1px solid #e6e6e6;\n}\n.bk-root .bk-tabs-header.bk-right .bk-headers-wrapper {\n border-left: 1px solid #e6e6e6;\n}\n.bk-root .bk-tabs-header.bk-below .bk-headers-wrapper {\n border-top: 1px solid #e6e6e6;\n}\n.bk-root .bk-tabs-header.bk-left .bk-headers-wrapper {\n border-right: 1px solid #e6e6e6;\n}\n.bk-root .bk-tabs-header.bk-above,\n.bk-root .bk-tabs-header.bk-below {\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-tabs-header.bk-above .bk-headers,\n.bk-root .bk-tabs-header.bk-below .bk-headers {\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-tabs-header.bk-left,\n.bk-root .bk-tabs-header.bk-right {\n flex-direction: column;\n -webkit-flex-direction: column;\n}\n.bk-root .bk-tabs-header.bk-left .bk-headers,\n.bk-root .bk-tabs-header.bk-right .bk-headers {\n flex-direction: column;\n -webkit-flex-direction: column;\n}\n.bk-root .bk-tabs-header .bk-headers {\n position: relative;\n display: flex;\n display: -webkit-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n align-items: center;\n -webkit-align-items: center;\n}\n.bk-root .bk-tabs-header .bk-tab {\n padding: 4px 8px;\n border: solid transparent;\n white-space: nowrap;\n cursor: pointer;\n}\n.bk-root .bk-tabs-header .bk-tab:hover {\n background-color: #f2f2f2;\n}\n.bk-root .bk-tabs-header .bk-tab.bk-active {\n color: #4d4d4d;\n background-color: white;\n border-color: #e6e6e6;\n}\n.bk-root .bk-tabs-header .bk-tab .bk-close {\n margin-left: 10px;\n}\n.bk-root .bk-tabs-header.bk-above .bk-tab {\n border-width: 3px 1px 0px 1px;\n border-radius: 4px 4px 0 0;\n}\n.bk-root .bk-tabs-header.bk-right .bk-tab {\n border-width: 1px 3px 1px 0px;\n border-radius: 0 4px 4px 0;\n}\n.bk-root .bk-tabs-header.bk-below .bk-tab {\n border-width: 0px 1px 3px 1px;\n border-radius: 0 0 4px 4px;\n}\n.bk-root .bk-tabs-header.bk-left .bk-tab {\n border-width: 1px 0px 1px 3px;\n border-radius: 4px 0 0 4px;\n}\n.bk-root .bk-close {\n display: inline-block;\n width: 10px;\n height: 10px;\n vertical-align: middle;\n background-image: url(\'data:image/svg+xml;utf8, <svg viewPort="0 0 10 10" version="1.1" xmlns="path_to_url"> <line x1="1" y1="9" x2="9" y2="1" stroke="gray" stroke-width="2"/> <line x1="1" y1="1" x2="9" y2="9" stroke="gray" stroke-width="2"/> </svg>\');\n}\n.bk-root .bk-close:hover {\n background-image: url(\'data:image/svg+xml;utf8, <svg viewPort="0 0 10 10" version="1.1" xmlns="path_to_url"> <line x1="1" y1="9" x2="9" y2="1" stroke="red" stroke-width="2"/> <line x1="1" y1="1" x2="9" y2="9" stroke="red" stroke-width="2"/> </svg>\');\n}\n']}get child_models(){return this.model.tabs.map((e=>e.child))}_update_layout(){const e=this.model.tabs_location,t="above"==e||"below"==e,{scroll_el:n,headers_el:r}=this;this.header=new class extends Dh{_measure(e){const i=fa(n),o=ga(r).slice(0,3).map((e=>fa(e))),{width:a,height:s}=super._measure(e);if(t){const t=i.width+A(o.map((e=>e.width)));return{width:e.width!=1/0?e.width:t,height:s}}{const t=i.height+A(o.map((e=>e.height)));return{width:a,height:e.height!=1/0?e.height:t}}}}(this.header_el),t?this.header.set_sizing({width_policy:"fit",height_policy:"fixed"}):this.header.set_sizing({width_policy:"fixed",height_policy:"fit"});let i=1,o=1;switch(e){case"above":i-=1;break;case"below":i+=1;break;case"left":o-=1;break;case"right":o+=1}const a={layout:this.header,row:i,col:o},s=this.child_views.map((e=>({layout:e.layout,row:1,col:1})));this.layout=new Mh([a,...s]),this.layout.set_sizing(this.box_sizing())}update_position(){super.update_position(),this.header_el.style.position="absolute",pa(this.header_el,this.header.bbox);const e=this.model.tabs_location,t="above"==e||"below"==e,n=fa(this.scroll_el),r=(i=this.headers_el,{width:Math.ceil(i.scrollWidth),height:Math.ceil(i.scrollHeight)});var i;if(t){const{width:e}=this.header.bbox;r.width>e?(this.wrapper_el.style.maxWidth=e-n.width+"px",aa(this.scroll_el)):(this.wrapper_el.style.maxWidth="",sa(this.scroll_el))}else{const{height:e}=this.header.bbox;r.height>e?(this.wrapper_el.style.maxHeight=e-n.height+"px",aa(this.scroll_el)):(this.wrapper_el.style.maxHeight="",sa(this.scroll_el))}const{child_views:o}=this;for(const e of o)ca(e.el);const a=o[this.model.active];null!=a&&la(a.el)}render(){super.render();const{active:e}=this.model,t=this.model.tabs_location,n="above"==t||"below"==t,r=this.model.tabs.map(((t,n)=>{const r=jo({class:["bk-tab",n==e?iu:null]},t.title);if(r.addEventListener("click",(e=>{e.target==e.currentTarget&&this.change_active(n)})),t.closable){const e=jo({class:"bk-close"});e.addEventListener("click",(e=>{if(e.target==e.currentTarget){this.model.tabs=function(e,t){const n=N(e);return n.splice(t,1),n}(this.model.tabs,n);const e=this.model.tabs.length;this.model.active>e-1&&(this.model.active=e-1)}})),r.appendChild(e)}return r}));this.headers_el=jo({class:["bk-headers"]},r),this.wrapper_el=jo({class:"bk-headers-wrapper"},this.headers_el);const i=jo({class:[Pf,zf],disabled:""},jo({class:[jf,au]})),o=jo({class:[Pf,zf]},jo({class:[jf,su]}));let a=0;const s=e=>()=>{const t=this.model.tabs.length;a="left"==e?Math.max(a-1,0):Math.min(a+1,t-1),0==a?i.setAttribute("disabled",""):i.removeAttribute("disabled"),a==t-1?o.setAttribute("disabled",""):o.removeAttribute("disabled");const r=ga(this.headers_el).slice(0,a).map((e=>e.getBoundingClientRect()));if(n){const e=-A(r.map((e=>e.width)));this.headers_el.style.left=`${e}px`}else{const e=-A(r.map((e=>e.height)));this.headers_el.style.top=`${e}px`}};i.addEventListener("click",s("left")),o.addEventListener("click",s("right")),this.scroll_el=jo({class:Nf},i,o),this.header_el=jo({class:["bk-tabs-header",uu(t)]},this.scroll_el,this.wrapper_el),this.el.appendChild(this.header_el)}change_active(e){e!=this.model.active&&(this.model.active=e)}on_active_change(){const e=this.model.active,t=ga(this.headers_el);for(const e of t)e.classList.remove(iu);t[e].classList.add(iu);const{child_views:n}=this;for(const e of n)ca(e.el);la(n[e].el)}}Hf.__name__="TabsView";class $f extends wf{constructor(e){super(e)}static init_Tabs(){this.prototype.default_view=Hf,this.define({tabs:[Sn,[]],tabs_location:[ir,"above"],active:[On,0]})}}$f.__name__="Tabs",$f.init_Tabs();class Wf extends rs{constructor(e){super(e)}static init_Panel(){this.define({title:[Rn,""],child:[Mn],closable:[En,!1]})}}Wf.__name__="Panel",Wf.init_Panel();class Gf extends Tf{}Gf.__name__="WidgetBoxView";class Yf extends Sf{constructor(e){super(e)}static init_WidgetBox(){this.prototype.default_view=Gf}}Yf.__name__="WidgetBox",Yf.init_WidgetBox();class Xf extends Ps{initialize(){super.initialize();const{webgl:e}=this.renderer.plot_view.canvas_view;null!=e&&null!=this.glglyph_cls&&(this.glglyph=new this.glglyph_cls(e.gl,this))}_render(e,t,{sx:n,sy:r,_size:i,_angle:o}){for(const a of t){if(isNaN(n[a]+r[a]+i[a]+o[a]))continue;const t=i[a]/2;e.beginPath(),e.translate(n[a],r[a]),o[a]&&e.rotate(o[a]),this._render_one(e,a,t,this.visuals.line,this.visuals.fill),o[a]&&e.rotate(-o[a]),e.translate(-n[a],-r[a])}}_mask_data(){const e=this.renderer.plot_view.frame.bbox.h_range,t=e.start-this.max_size,n=e.end+this.max_size,[r,i]=this.renderer.xscale.r_invert(t,n),o=this.renderer.plot_view.frame.bbox.v_range,a=o.start-this.max_size,s=o.end+this.max_size,[l,c]=this.renderer.yscale.r_invert(a,s);return this.index.indices({x0:r,x1:i,y0:l,y1:c})}_hit_point(e){const{sx:t,sy:n}=e,r=t-this.max_size,i=t+this.max_size,[o,a]=this.renderer.xscale.r_invert(r,i),s=n-this.max_size,l=n+this.max_size,[c,u]=this.renderer.yscale.r_invert(s,l),h=this.index.indices({x0:o,x1:a,y0:c,y1:u}),d=[];for(const e of h){const r=this._size[e]/2;Math.abs(this.sx[e]-t)<=r&&Math.abs(this.sy[e]-n)<=r&&d.push(e)}return new ps({indices:d})}_hit_span(e){const{sx:t,sy:n}=e,r=this.bounds(),i=this.max_size/2;let o,a,s,l;if("h"==e.direction){s=r.y0,l=r.y1;const e=t-i,n=t+i;[o,a]=this.renderer.xscale.r_invert(e,n)}else{o=r.x0,a=r.x1;const e=n-i,t=n+i;[s,l]=this.renderer.yscale.r_invert(e,t)}const c=[...this.index.indices({x0:o,x1:a,y0:s,y1:l})];return new ps({indices:c})}_hit_rect(e){const{sx0:t,sx1:n,sy0:r,sy1:i}=e,[o,a]=this.renderer.xscale.r_invert(t,n),[s,l]=this.renderer.yscale.r_invert(r,i),c=[...this.index.indices({x0:o,x1:a,y0:s,y1:l})];return new ps({indices:c})}_hit_poly(e){const{sx:t,sy:n}=e,r=U(0,this.sx.length),i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e];zs(this.sx[e],this.sy[e],t,n)&&i.push(o)}return new ps({indices:i})}_get_legend_args({x0:e,x1:t,y0:n,y1:r},i){const o=i+1,a=new Array(o);a[i]=(e+t)/2;const s=new Array(o);s[i]=(n+r)/2;const l=new Array(o);l[i]=.4*Math.min(Math.abs(t-e),Math.abs(r-n));const c=new Array(o);return c[i]=0,{sx:a,sy:s,_size:l,_angle:c}}draw_legend_for_index(e,{x0:t,x1:n,y0:r,y1:i},o){const a=this._get_legend_args({x0:t,x1:n,y0:r,y1:i},o);this._render(e,[o],a)}}Xf.__name__="MarkerView";class Zf extends Ns{constructor(e){super(e)}static init_Marker(){this.mixins([ni,ri]),this.define({size:[Hr,{units:"screen",value:4}],angle:[qr,0]})}}Zf.__name__="Marker",Zf.init_Marker();const Kf=Math.sqrt(3);function Jf(e,t){e.rotate(Math.PI/4),ep(e,t),e.rotate(-Math.PI/4)}function Qf(e,t){const n=t*Kf,r=n/3;e.moveTo(-n/2,-r),e.lineTo(0,0),e.lineTo(n/2,-r),e.lineTo(0,0),e.lineTo(0,t)}function ep(e,t){e.moveTo(0,t),e.lineTo(0,-t),e.moveTo(-t,0),e.lineTo(t,0)}function tp(e,t){e.moveTo(0,t),e.lineTo(t/1.5,0),e.lineTo(0,-t),e.lineTo(-t/1.5,0),e.closePath()}function np(e,t){const n=t*Kf,r=n/3;e.moveTo(-t,r),e.lineTo(t,r),e.lineTo(0,r-n),e.closePath()}function rp(e,t,n,r,i){ep(e,n),Jf(e,n),r.doit&&(r.set_vectorize(e,t),e.stroke())}function ip(e,t,n,r,i){e.arc(0,0,n,0,2*Math.PI,!1),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function op(e,t,n,r,i){e.arc(0,0,n,0,2*Math.PI,!1),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),ep(e,n),e.stroke())}function ap(e,t,n,r,i){ip(e,t,n,r,i),fp(e,t,n,r)}function sp(e,t,n,r,i){e.arc(0,0,n,0,2*Math.PI,!1),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),Qf(e,n),e.stroke())}function lp(e,t,n,r,i){e.arc(0,0,n,0,2*Math.PI,!1),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),Jf(e,n),e.stroke())}function cp(e,t,n,r,i){ep(e,n),r.doit&&(r.set_vectorize(e,t),e.stroke())}function up(e,t,n,r,i){tp(e,n),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function hp(e,t,n,r,i){tp(e,n),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-n/1.5,0),e.lineTo(n/1.5,0),e.stroke())}function dp(e,t,n,r,i){up(e,t,n,r,i),fp(e,t,n,r)}function fp(e,t,n,r,i){!function(e,t){e.beginPath(),e.arc(0,0,t/4,0,2*Math.PI,!1),e.closePath()}(e,n),r.set_vectorize(e,t),e.fillStyle=e.strokeStyle,e.fill()}function pp(e,t,n,r,i){!function(e,t){const n=t/2,r=Kf*n;e.moveTo(t,0),e.lineTo(n,-r),e.lineTo(-n,-r),e.lineTo(-t,0),e.lineTo(-n,r),e.lineTo(n,r),e.closePath()}(e,n),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function gp(e,t,n,r,i){pp(e,t,n,r,i),fp(e,t,n,r)}function mp(e,t,n,r,i){e.rotate(Math.PI),np(e,n),e.rotate(-Math.PI),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function vp(e,t,n,r,i){const o=3*n/8,a=[o,o,n,n,o,o,-o,-o,-n,-n,-o,-o],s=[n,o,o,-o,-o,-n,-n,-o,-o,o,o,n];for(e.moveTo(a[0],s[0]),t=1;t<12;t++)e.lineTo(a[t],s[t]);e.closePath(),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function yp(e,t,n,r,i){const o=2*n;e.rect(-n,-n,o,o),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function bp(e,t,n,r,i){const o=3*n/8;e.moveTo(-n,-n),e.quadraticCurveTo(0,-o,n,-n),e.quadraticCurveTo(o,0,n,n),e.quadraticCurveTo(0,o,-n,n),e.quadraticCurveTo(-o,0,-n,-n),e.closePath(),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function _p(e,t,n,r,i){const o=2*n;e.rect(-n,-n,o,o),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),ep(e,n),e.stroke())}function xp(e,t,n,r,i){yp(e,t,n,r,i),fp(e,t,n,r)}function wp(e,t,n,r,i){const o=2*n;e.rect(-n,-n,o,o),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.moveTo(-n,n),e.lineTo(n,-n),e.moveTo(-n,-n),e.lineTo(n,n),e.stroke())}function Ap(e,t,n,r,i){np(e,n),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function kp(e,t,n,r,i){Ap(e,t,n,r,i),fp(e,t,n,r)}function Tp(e,t,n,r,i){const o=n*Kf,a=o/3,s=3*a/8;e.moveTo(-n,a),e.quadraticCurveTo(0,s,n,a),e.quadraticCurveTo(Kf*s/2,s/2,0,a-o),e.quadraticCurveTo(-Kf*s/2,s/2,-n,a),e.closePath(),i.doit&&(i.set_vectorize(e,t),e.fill()),r.doit&&(r.set_vectorize(e,t),e.stroke())}function Sp(e,t,n,r,i){!function(e,t){e.moveTo(-t,0),e.lineTo(t,0)}(e,n),r.doit&&(r.set_vectorize(e,t),e.stroke())}function Ep(e,t,n,r,i){Jf(e,n),r.doit&&(r.set_vectorize(e,t),e.stroke())}function Cp(e,t,n,r,i){Qf(e,n),r.doit&&(r.set_vectorize(e,t),e.stroke())}function Mp(e,t,n){var r;const i=class extends Xf{static initClass(){this.prototype._render_one=t,this.prototype.glglyph_cls=n}};i.initClass();const o=((r=class extends Zf{static initClass(){this.prototype.default_view=i}}).__name__=e,r);return o.initClass(),o}const Op=Mp("Asterisk",rp,od),Lp=Mp("CircleCross",op,sd),Dp=Mp("CircleDot",ap),Ip=Mp("CircleY",sp),Rp=Mp("CircleX",lp,ld),Pp=Mp("Cross",cp,cd),Np=Mp("Dash",Sp),zp=Mp("Diamond",up,ud),Fp=Mp("DiamondCross",hp,hd),Bp=Mp("DiamondDot",dp),jp=Mp("Dot",fp),Up=Mp("Hex",pp,dd),Vp=Mp("HexDot",gp),qp=Mp("InvertedTriangle",mp,fd),Hp=Mp("Plus",vp),$p=Mp("Square",yp,pd),Wp=Mp("SquareCross",_p,gd),Gp=Mp("SquareDot",xp),Yp=Mp("SquarePin",bp),Xp=Mp("SquareX",wp,md),Zp=Mp("Triangle",Ap,vd),Kp=Mp("TriangleDot",kp),Jp=Mp("TrianglePin",Tp),Qp=Mp("X",Ep,yd),eg=Mp("Y",Cp),tg={asterisk:rp,circle:ip,circle_cross:op,circle_dot:ap,circle_y:sp,circle_x:lp,cross:cp,diamond:up,diamond_dot:dp,diamond_cross:hp,dot:fp,hex:pp,hex_dot:gp,inverted_triangle:mp,plus:vp,square:yp,square_cross:_p,square_dot:xp,square_pin:bp,square_x:wp,triangle:Ap,triangle_dot:kp,triangle_pin:Tp,dash:Sp,x:Ep,y:Cp};class ng extends Xf{_render(e,t,{sx:n,sy:r,_size:i,_angle:o,_marker:a}){for(const s of t){if(isNaN(n[s]+r[s]+i[s]+o[s])||null==a[s])continue;const t=i[s]/2;e.beginPath(),e.translate(n[s],r[s]),o[s]&&e.rotate(o[s]),tg[a[s]](e,s,t,this.visuals.line,this.visuals.fill),o[s]&&e.rotate(-o[s]),e.translate(-n[s],-r[s])}}draw_legend_for_index(e,{x0:t,x1:n,y0:r,y1:i},o){const a=this._get_legend_args({x0:t,x1:n,y0:r,y1:i},o),s=new Array(o+1);s[o]=this._marker[o],a._marker=s,this._render(e,[o],a)}}ng.__name__="ScatterView";class rg extends Zf{constructor(e){super(e)}static init_Scatter(){this.prototype.default_view=ng,this.define({marker:[Yr,{value:"circle"}]})}}rg.__name__="Scatter",rg.init_Scatter();var ig=n(7057),og=n.n(ig);class ag extends ka{get plot_view(){return this.parent}get plot_model(){return this.parent.model}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>{this.model.active?this.activate():this.deactivate()}))}activate(){}deactivate(){}}ag.__name__="ToolView";class sg extends rs{constructor(e){super(e)}static init_Tool(){this.prototype._known_aliases=new Map,this.internal({active:[En,!1]})}get synthetic_renderers(){return[]}_get_dim_tooltip(e,t){switch(t){case"width":return`${e} (x-axis)`;case"height":return`${e} (y-axis)`;case"both":return e}}_get_dim_limits([e,t],[n,r],i,o){const a=i.bbox.h_range;let s;"width"==o||"both"==o?(s=[_([e,n]),x([e,n])],s=[x([s[0],a.start]),_([s[1],a.end])]):s=[a.start,a.end];const l=i.bbox.v_range;let c;return"height"==o||"both"==o?(c=[_([t,r]),x([t,r])],c=[x([c[0],l.start]),_([c[1],l.end])]):c=[l.start,l.end],[s,c]}static register_alias(e,t){this.prototype._known_aliases.set(e,t)}static from_string(e){const t=this.prototype._known_aliases.get(e);if(null!=t)return t();{const t=[...this.prototype._known_aliases.keys()];throw new Error(`unexpected tool name '${e}', possible tools are ${t.join(", ")}`)}}}sg.__name__="Tool",sg.init_Tool();const lg='\n.bk-root .bk-toolbar-hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0.3s linear, opacity 0.3s linear;\n}\n.bk-root .bk-toolbar,\n.bk-root .bk-button-bar {\n display: flex;\n display: -webkit-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n align-items: center;\n -webkit-align-items: center;\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n}\n.bk-root .bk-toolbar .bk-logo {\n flex-shrink: 0;\n -webkit-flex-shrink: 0;\n}\n.bk-root .bk-toolbar.bk-above,\n.bk-root .bk-toolbar.bk-below {\n flex-direction: row;\n -webkit-flex-direction: row;\n justify-content: flex-end;\n -webkit-justify-content: flex-end;\n}\n.bk-root .bk-toolbar.bk-above .bk-button-bar,\n.bk-root .bk-toolbar.bk-below .bk-button-bar {\n display: flex;\n display: -webkit-flex;\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-toolbar.bk-above .bk-logo,\n.bk-root .bk-toolbar.bk-below .bk-logo {\n order: 1;\n -webkit-order: 1;\n margin-left: 5px;\n margin-right: 0px;\n}\n.bk-root .bk-toolbar.bk-left,\n.bk-root .bk-toolbar.bk-right {\n flex-direction: column;\n -webkit-flex-direction: column;\n justify-content: flex-start;\n -webkit-justify-content: flex-start;\n}\n.bk-root .bk-toolbar.bk-left .bk-button-bar,\n.bk-root .bk-toolbar.bk-right .bk-button-bar {\n display: flex;\n display: -webkit-flex;\n flex-direction: column;\n -webkit-flex-direction: column;\n}\n.bk-root .bk-toolbar.bk-left .bk-logo,\n.bk-root .bk-toolbar.bk-right .bk-logo {\n order: 0;\n -webkit-order: 0;\n margin-bottom: 5px;\n margin-top: 0px;\n}\n.bk-root .bk-toolbar-button {\n width: 30px;\n height: 30px;\n cursor: pointer;\n background-size: 60% 60%;\n background-origin: border-box;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center center;\n}\n.bk-root .bk-toolbar-button:hover {\n background-color: rgba(192, 192, 192, 0.15);\n}\n.bk-root .bk-toolbar-button:focus {\n outline: none;\n}\n.bk-root .bk-toolbar-button::-moz-focus-inner {\n border: 0;\n}\n.bk-root .bk-toolbar.bk-above .bk-toolbar-button {\n border-bottom: 2px solid transparent;\n}\n.bk-root .bk-toolbar.bk-above .bk-toolbar-button.bk-active {\n border-bottom-color: #26aae1;\n}\n.bk-root .bk-toolbar.bk-below .bk-toolbar-button {\n border-top: 2px solid transparent;\n}\n.bk-root .bk-toolbar.bk-below .bk-toolbar-button.bk-active {\n border-top-color: #26aae1;\n}\n.bk-root .bk-toolbar.bk-right .bk-toolbar-button {\n border-left: 2px solid transparent;\n}\n.bk-root .bk-toolbar.bk-right .bk-toolbar-button.bk-active {\n border-left-color: #26aae1;\n}\n.bk-root .bk-toolbar.bk-left .bk-toolbar-button {\n border-right: 2px solid transparent;\n}\n.bk-root .bk-toolbar.bk-left .bk-toolbar-button.bk-active {\n border-right-color: #26aae1;\n}\n.bk-root .bk-button-bar + .bk-button-bar:before {\n content: " ";\n display: inline-block;\n background-color: lightgray;\n}\n.bk-root .bk-toolbar.bk-above .bk-button-bar + .bk-button-bar:before,\n.bk-root .bk-toolbar.bk-below .bk-button-bar + .bk-button-bar:before {\n height: 10px;\n width: 1px;\n}\n.bk-root .bk-toolbar.bk-left .bk-button-bar + .bk-button-bar:before,\n.bk-root .bk-toolbar.bk-right .bk-button-bar + .bk-button-bar:before {\n height: 1px;\n width: 10px;\n}\n';function*cg(e){let t=0;for(const n of e)yield[n,t++]}class ug{constructor(e,t={}){this.items=e,this.options=t,this.el=jo(),this._open=!1,this._item_click=e=>{var t;null===(t=this.items[e])||void 0===t||t.handler(),this.hide()},this._on_mousedown=e=>{var t,n;const{target:r}=e;r instanceof Node&&this.el.contains(r)||(null===(n=(t=this.options).prevent_hide)||void 0===n?void 0:n.call(t,e))||this.hide()},this._on_keydown=e=>{e.keyCode==ba.Esc&&this.hide()},this._on_blur=()=>{this.hide()},sa(this.el)}get is_open(){return this._open}get can_open(){return 0!=this.items.length}remove(){na(this.el),this._unlisten()}_listen(){document.addEventListener("mousedown",this._on_mousedown),document.addEventListener("keydown",this._on_keydown),window.addEventListener("blur",this._on_blur)}_unlisten(){document.removeEventListener("mousedown",this._on_mousedown),document.removeEventListener("keydown",this._on_keydown),window.removeEventListener("blur",this._on_blur)}_position(e){const t=this.el.parentElement;if(null!=t){const n=t.getBoundingClientRect();this.el.style.left=null!=e.left?e.left-n.left+"px":"",this.el.style.top=null!=e.top?e.top-n.top+"px":"",this.el.style.right=null!=e.right?n.right-e.right+"px":"",this.el.style.bottom=null!=e.bottom?n.bottom-e.bottom+"px":""}}render(){var e,t;oa(this.el,!0);const n=null!==(e=this.options.orientation)&&void 0!==e?e:"vertical";va(this.el).add("bk-context-menu",`bk-${n}`);for(const[e,n]of cg(this.items)){let r;if(null==e)r=jo({class:Uf});else{if(null!=e.if&&!e.if())continue;{const n=null!=e.icon?jo({class:["bk-menu-icon",e.icon]}):null;r=jo({class:(null===(t=e.active)||void 0===t?void 0:t.call(e))?"bk-active":null,title:e.tooltip},n,e.label)}}r.addEventListener("click",(()=>this._item_click(n))),this.el.appendChild(r)}}show(e){if(0!=this.items.length&&!this._open){if(this.render(),0==this.el.children.length)return;this._position(null!=e?e:{left:0,top:0}),aa(this.el),this._listen(),this._open=!0}}hide(){this._open&&(this._open=!1,this._unlisten(),sa(this.el))}toggle(e){this._open?this.hide():this.show(e)}}ug.__name__="ContextMenu";class hg extends Na{initialize(){super.initialize();const e=this.model.menu;if(null!=e){const t=this.parent.model.toolbar_location,n="left"==t||"above"==t,r=this.parent.model.horizontal?"vertical":"horizontal";this._menu=new ug(n?K(e):e,{orientation:r,prevent_hide:e=>e.target==this.el})}this._hammer=new(og())(this.el,{touchAction:"auto",inputClass:og().TouchMouseInput}),this.connect(this.model.change,(()=>this.render())),this._hammer.on("tap",(e=>{var t;(null===(t=this._menu)||void 0===t?void 0:t.is_open)?this._menu.hide():e.target==this.el&&this._clicked()})),this._hammer.on("press",(()=>this._pressed()))}remove(){var e;this._hammer.destroy(),null===(e=this._menu)||void 0===e||e.remove(),super.remove()}styles(){return[...super.styles(),lg,'\n.bk-root .bk-tool-icon-copy-to-clipboard {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMNjXLhsJcNAAiaGAQYwByour_sha512_hash/R2wIkNqw+D9s0wADvUNiyIYA47BJAwPuAAAj/Cjd0TCN6wAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-replace-mode {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMNjXLhsJcNAAiaGAQajDhhwB7DgEP+PxmeksvjgDwFcLmYkUh2hkBj8IcBIZXsYh1w2/I8v3sgAOM0bLYhGc8GgrwuICgldfQO88pcvXvg/your_sha256_hashAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-append-mode {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashpVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAoUlEQVRYw+1WQQ6AIAwrhO8Y/your_sha256_hashyour_sha256_hash+J8/your_sha512_hash=");\n}\n.bk-root .bk-tool-icon-intersect-mode {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMPtV1EKwjAMTUavI3oawR/vtn5srJdREfzwMvHHQlcT2mpdMzFfWxiP5r2+JMN+mAiCOB72CABgR1cln4oOGocJnuMTSxWk8jMm7OggYkYXA9gPE3uyd8NXHONJ+eYMdE/NqCJmEZ5ZqlJJ4sUksKN7cYSaPoCZFWR1QI+Xm1fBACU63Cw22x0AAJxudwrffVwvZ+JmQdAHZkw0d4EpAMCw8k87pMdbnwtizQumJYv3nwV6XOA1qbUT/oQLUJgFRbsiNwFVucBIlyR3p0tdMp+XmFjfLKi1LatyAXtCRjPWBdL3Ke3VuACJKFfDr/xFN2fgAR/Go0qaLlmEAAAAAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-subtract-mode {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashyour_sha256_hashyour_sha256_hashQoqxqAACYpxH25C/nkwCHyCBwSPoS09k1T5Fo+4EiExcC4v584xGFmyIXHBLRISAVZyZufUPVa4rcrwmPDgr93ylo+2GliLRUYHK6th/o/6r7nfLpqaCsagEA8Hh9FmcNKeRmgeYDC+SCq0B6FFi8/your_sha256_hash1bNcWa3Q0uXi62XR6sCaWoSejbtdLYmU3kTEunNgj0bUbQqYG/IcMaqwPS9jftoVCAQ0ZVDJwf0zQdH4AsyW6fpQu4YegAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-clear-selection {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash+b3TNSzg0N5TWXLkJQUUaKhIQ4fgP/g5ArrriE/your_sha256_hashqe8BE98vQh4cgG+Ydzmnrng8efvQJNi/uN7dznx/B3ggtfhf4ehNdUttRzBDIm/2VTiiWCG1HK0nc+your_sha256_hashEv1gBDg5SzRJnpopILWICgWuRYflLamuzxB2BmtYqSRIka5VWU8QduXO+1hRc5YZu5GAwmP2ZJzND0IBu5HCV2+your_sha256_hashM0jA/your_sha256_hashCkL2I/your_sha256_hashB05UtMxDOcVQlZIrlRKdK6m47gjR/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashZVaWLBkd9dw1Ivv2a/AYPkK+ty1U1DAAAAAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-box-select {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha512_hash4e9DPZ3+wP3KgOjNZouFYI4C8q7s7DtB1lGIeMoRMRinCLXg/your_sha256_hashsFVXCESZw38/kWLOkC/K4PcOc/Hj03WkoDT3EaWW9egQul6CUbq90JTwAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-box-zoom {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wDyour_sha512_hash/DPTFn2qaeIpcSwr5NlUyJiKWVXWUqvlUh/iE3RY9mUekkPPURtLKNRrFJEeuphGfUUaVliiX1aVjGs6aG7+XX9ZnZ+d2fTl2vmnHvPPfeee/79Sk+may2/UQq/q7Qu+bAJoxjHIKqB/wlfUMcMVqI9bLZ+DGIKwzlzQ2GcxCx2xwvKOUKlaHTiX8bHNspjDONHkOmJBW5jIof/FvPh/06MZOb6cRc7cGn1AKUE5cdzlM/gAr5F/O24H3xkFRfxAbVygvK+cIsspjGWo1zgjeFpxL+your_sha256_hashyour_sha256_hash0FZNdZs5qvFfKAeqYy7nZ6yg//HG0MBfffh71lFrQDCW2EvEP4mt4okZUDftz9rmGZkotmMxJRtlisy+your_sha512_hash/AsivWfOJZxtpUQHfWib7KWDwzjeegBZJSdKFiE2qJTFFTwElsi/unQ/awXrU4WGMD7nOJxBY/1EO2iYConq93CHT1GOwucjdqnRyFz+VcHmMNefMY9nNkA3SWUOoXhQviSWQ4huLIRFlirFixnQq/XaKXUgg2xQNGv4V7x/RcW+AXPB3h7H1PaiQAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-zoom-in {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash//your_sha256_hashZNBFgRRaRLVFhbJ2EdiN5gbK7toObTPn6eYdPTvNzPvOBz5Xh/ec5/n/n89zXtEHmZqeSXSuXBz/3zfdKvBWJHQrwZuRcP0El+QkbQXeBX6WZEgm6TtJk5lM5o4Lc+cV6qpf4Ga20Tm338zeATItVK9Ker6yvPzp4NDQ3+XieGsCU9MzTYumGbhz7m4ze9/your_sha256_hashapVqtkslksmb2KjARqL62ecuWN9NxbRInzrldAXhV0uFSIfdew7G/your_sha256_hashN8Dae58aQIxEqcA592I9M610JL0cpGyour_sha512_hashr6Tvg/5/5ejxE6cO7M9faVbQZrYNOFSPmqQvVo9FKexvi5uWX58943aM7DwAfBDY+FbSCxP5sdkGx55GeguzrUEXPaSo2pFkAbiSZQCAzZJOmdkjwd6SpB/your_sha256_hash4nl0r6bonTUbujRSUCrm2d4L3/kvn3JPe+8+BDW2i9o+your_sha256_hashyour_sha256_hash9Ogl4IgJJrmjv/SiQjbrkD+your_sha256_hashvNuoWFhZ3A+your_sha256_hash+rfuGn4HLAD+Az4qZQf+61TAj0Noj8vX6oC35SL43u7teG6rf5+iXppwW7/JUL5D03qaFRvvUe+AAAAAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-zoom-out {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/your_sha256_hashyour_sha256_hashbv7ZjObcvfXgShD9Zqk5+orKx8Oj4z8NT05kU1gZm6+bdK0Azezu9z9hLs/HoIBvwAF4H5gKFh7B3gBWFY3460kWve4+3oze9fdx9OpVUmvmNlMHMf1RqNBFEUldz8OHAxUX9q6bduryut+Sfvc/your_sha256_hashoet00m7lZlZYQixKw0FZnakGZksHUnHgvCN5/KARBH37enpOVg58H13HV0Kxg/kIuD/ngSA2ZMLt3bTSZJkUzNk7k4+D0AM/CGpaXCyBw/sC8Y/qZd2GpZiuL9YLN4Sx/HpoP5/c/exQ1OVq+your_sha256_hashSNB9mpzp7/j2yVdNbdx4K565K+cvfPJQ27+x5gBzAS7Hlvy+your_sha256_hashlYkiQfA5s6eO+GpDNJkhw9NFX5ueNt2ARodyF1IHIN2JiOl4H16fiKpK+B2Vq1vBAqFAf4IJkGNiIhWJK0192vunsC1IE/your_sha256_hash5Ffgs151i/08oTNKdIO770ptObBYq5Yv5ibQq/sl3Qc8lJ4+lnSqH1vFfp9koZRKJVtaWnqkWXqSVkqlDe+vmUDWpZMlK/X6MBDegKf3Pyour_sha512_hash+L+i1X2TJP57iUvUFtHWsAAAAAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-help {\n background-image: url("data:image/png;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashPHRpZmY6UmVzb2x1dGlvblVuaXQ+your_sha256_hashb24+NTwvdGlmZjpDb21wcmVzc2lvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+your_sha256_hashPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+your_sha256_hashaW1lbnNpb24+your_sha256_hashyour_sha256_hashSUQ+your_sha256_hashSW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+your_sha256_hashyour_sha256_hashZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgPHN0UmVmOmluc3RhbmNlSUQ+your_sha256_hashaW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+your_sha256_hashyour_sha256_hashICAgPGRjOnN1YmplY3Q+your_sha256_hashICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNjoxMToyOCAxMToxMTo4MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+your_sha256_hashY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+your_sha256_hash3WTXJjH61Q/7Ya1+CMYKEVTsh4J/EpvY7BoabUiNiA8s1p+4KIhpoUUEselHqyS76TbZ3HuP58ydc3d2u4+your_sha256_hashbNn17OJlcXo1p2UpodHRiux9xB1Eug1+your_sha256_hashL3duCmA0Vyuw/fl52hgBxsBED+h4Cv9z3R/your_sha256_hash8fHxzSsQ6XDB3618/xqo6Pk25V5MpVJllgHM1BO58RdQ612kOYZ+GXdij70TYQB05mpj+1kU5G2fB+l3PZtOf8NGx6ambnMXb3yAxg8wjSEG6OKKR9oicBQD+ZvpH2Wzj0lQpxCPG9qMv1x6hHNCsSAlHM7ZOa682vlI9tRDbvHGbD3nZAPpDoD/3JIrLpAs26UFkC3EMUA99hpfGtEBfJjNJnS2Gwnadnvl+Xw+your_sha256_hash/uLvh5G+m2no+C/pyIf7MqlEJB7bpqR6nXkEUfbeawuLaZsW2ISfNQ2vtaktQlGFQyIVGT0o2+your_sha256_hashK9q4Zbdr+lKKJiA13TcHR2dmLBgdmQ0GAS2MZaEowY+your_sha256_hashur_sha512_hash3hi4s6F68tfIj9cBMlikr7Z0/P0b/X0yIcUXsDCF1WhtL4OROHaXk+your_sha256_hashUSvV1d9GONBy3lMvgKSwrZig8gjAietWY0QriylO2jIo4yVbOSb7KB/qmI9BPKjHpSSXYauRyn92Nq9/Kcrj13x3s3v8D481glQ/0raiNYgX9njPSBOImbrHZePl+tfFmc9sH+Xaoh8NjOKSVdDMhjjYzQLy+dFceH5+your_sha256_hashvBINGRXCtKS7EY1uV6V7HWAm38y1cXaXsMcOCvr9ySPj+af7A1U2HJXHzVNvUXVLIGyPf+jV0pf8GHoN+TLAyPkidTCi2RpPApmnR0Bd1zGRaB/your_sha256_hashpV1VmbpvRH5OwwgdRtSg2vKaAz/1dNKVtb17Y8DCL4HVufHxMOYl1/zTgIgiYvBnFKfaNp3YjTdPz3n9Na8//X7/k/O1tdwopcZlcAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-hover {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMPtlsENgzAMRb8RQ5VJItFDOgaZAMaAA0iZpN3KPZSoEEHSQBCViI/G8pfNt/your_sha256_hashp7K98GAACxxH29srNNmPsK2l7zHoHHXZDr+/your_sha256_hashDsQkMzI64FidtI5t3AOKWaFhuioY8dlYf9TO1PREUh/your_sha256_hashMJfL95145YajN5RHQAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-crosshair {\n background-image: url("data:image/png;base64,your_sha256_hashyour_sha256_hashdr7eHxyGXZi1rMJ5opbp7m++7un+htSGF204vsoMoNXrlzSpfWa1oxQfhAegCZGaEtPorHo8znIoJwCt6+td8uk7ApUQCIHTF4BNAWzImq8ap6cP68CsBdDp9i9ZqXM7ML79g/EnCWD+jgMKENKqWT+tXK0CkQqgNRjs0OxpQIqKhoMxaG6/6JeRnK7T6yO2UvVqhYSlLX+your_sha256_hashbEX0JzdWEt3NHSSASAcCxBDqMgt/your_sha512_hash/your_sha256_hashvIvoOi9WJfCwDavf40ulpjbCqmUf+W753ezURuh7Dg1SqflwAEHU6pgfyBq9Y4qx0LG++2fnZ/eUzcstmdM2AWH+jfc+liWdBJfSENf8Lifi3GVwC9mybOfi5dzatWVrbbLIHNva8p5h/your_sha256_hashjitIGhyvVSfvmjci6ZR+rFQfDiPVE2jFYeICQ+your_sha256_hashekSB1yqJNOzp1Gs7YJ0EDeySDIMtJbQHh6Kf/uFfNFZkolJICRmz0P8DKWZuIG2g1hpok+your_sha256_hashyour_sha256_hashHfWUG4O7abefGAfwH7EXSMJafOlYAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-lasso-select {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/your_sha256_hashyour_sha256_hashnxvHQ93Jg7fWv71/r//7L4a59TRgqJk+Z6v3a+your_sha256_hashQWDsSNpJX1ljHnDOfdT37oZLLHv+your_sha256_hashIYYNQGoBrDtQnt7/your_sha256_hash5uTKePt6iiKXkk8jq+your_sha256_hashr6Ryg93y/ek8YFvPOOTg3cDSiKCoC2OP7/rEoirYm4rUkF12lAWNM1lr7lqQn0+QA8gI2jBg5cj6Aj8OwmB+KAKIoukhyp6SRJAUgl0ndPLDWPi9pJQCbuviXvu+/your_sha256_hashyour_sha256_hash7N7frEqSG2OmAFhKshNAp5wrmO7u7jEAngPQm1S2z2pqapr+OPt7XEly0oxwzq2RdFmSD2AMgKKJouhhAL4kA+your_sha256_hashdkA4CQZEHSqwAOISmXtwGIEyour_sha512_hash/TByxAOYWi8X6/gdWV1dnfN8fNRBxJpMZTXKdc+6IpFVJWAEgkvSJpA0X2tvtVTaSjgOYBCAEEADYSHK87/sfhmEYA9gShuEDkgzJHyWtB/B1irQ2juP7ADxkrX0wOUOpzmdpzEY590HJ7Ni1r2kSyZOSiv2+hSRjSTXp/QAukzySNJOJkmalyNIl10hqMcasdc61XDNcQRD8BnITgNp+36r6kfcNFMMlLQGwTNLMEuQGQBfJl2bdPru+your_sha256_hashyour_sha256_hash0Yc9I5LSKRlXSI5CxJa0jWSALJjKRnAewfkniT+vwf7N7fXHK9rq7O7+jo+BTA/NRrdBpjnnLOnUrvXd7YMPQXSBunneno6IhIHgYwW1JtkgmBpBkATlVMAwOk3nFJ+VSoqgCMr6gIy2FcLtdKspAedyQN/98caDt/3kpyabUmf8WvG/8A1vODTBVE/0MAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-pan {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMPVll0KwyAMgNPgoc0JzDX2Mtgp3csKErSamGabIEUo/T6bHz0ezxdsjPJ5kvUDaROem7VJAp3gufkbtwtI+your_sha256_hashEB4VyJN4FXx4aqUAACgFLjzrsRP9AECAP4Cm88QtJeJrGivdeNdPpko+j1H7XzUB+6WYHmo4eDk4wj41XFMEfBZGXpK0F/eB+your_sha256_hash9Bcbe/QecAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-xpan {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/pwOOedINJe/PobWXCfAIvgo/nA4heOiilZQqN2yE5lpD/I38SWt3uD9aMHSuHAiiAAmwaYCqoM/your_sha256_hashACbC3o+Vd2bOIOWMCtoO1mC+ap3CfmoCokFs/SZd6E0ILjnzrhvFbyEJ2FIZzXyB6iZ3AkjITn8WOdSbbAoaD4NSW+tIZdQYBOPyQKoAAKkIsPv0se4A/1UC0AAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-ypan {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/S7rlpIMXeOnaLaME36FLo8XqCdNFghGljyc4kgQi2Q/SUj0F/your_sha256_hashyour_sha256_hashojEqjHBmCeJOCOo1lgPA7Q8E8TvdjMmHuzsV3NFD4w+1t+Ai/gTx3qHuOFqdMQB8ASMwJX0IEHOeAAAAAElFTkSuQmCC");\n}\n.bk-root .bk-tool-icon-range {\n background-image: url("data:image/png;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLyI+your_sha256_hashblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbG9yU3BhY2U+your_sha256_hashaW1lbnNpb24+CiAgICAgICAgIDxkYzpzdWJqZWN0PgogICAgICAgICAgICA8cmRmOkJhZy8+your_sha256_hashyour_sha256_hasheG1wOkNyZWF0b3JUb29sPlBpeGVsbWF0b3IgMy43PC94bXA6Q3JlYXRvclRvb2w+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+your_sha256_hashclDhzr1Q5T6QE1LghP6BGNIYJGRWNlaZItiFK1mr+your_sha256_hashzrbhn3CT3xC3wPXYOC8LDzqdi8YY/gwh4BeknS/2th6dr2kf94AOp3OFyWgMyziOPbMDxV9FTtJnl1ut795Xd0/YQ0/vtYQwMT1KXWCfr2IjOWwtNehwN4xL9ykTrm6Pzl58yLn3J+mKh9mXbT3uRjGEDph+O8/TjfP5dBp7Ha7AX7O3o5nZeD/0E/OGyXntDgzA0X6qmCnrVutVlrUWV9f/3xo+pwhGDhvEPHOjoxnZjJggXmMHzBQ7NGNp9vxk61fr0HR7e/u7pZzCGHlc7qwBYYTT7tJYSx1AQzppyFPft5apta9w7SKcn0b7P7+/your_sha256_hash6ur6rRCJJYsbKB0JsbCKMuyyour_sha512_hash3U6HCMsPr9pYnJKRziHtWQ+un58+your_sha256_hashSyF4l5WJYYhBa816vZ6dU7A6CAhbZVow/pDe0O9hVOoCi13r4BgBAvJHqMSQL2vE/your_sha256_hashblaChuNBhWODrman5ub+4v0rMNBt8z6Ezh7GksJQpCbm79cMQE7QBFm/X6f0rjWnv8WRYg/your_sha256_hashKUOJDtBwDmzsw9fC/your_sha256_hashhBSp+kRKn/your_sha512_hash+your_sha256_hashwjAz4tWF+EpymOWu7fglE7qsOvrYE6g4+9/x/vhRbMdLOCFgAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-polygon-select {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wDyour_sha512_hash/DPK0XbqphFHETo4OCiFhwF0V1KHbRSROLqon+AUMVRRFBwEbRFMBiV+mMW/wIxi5OD1kERRVKRJHUwLvfBTZrU5OWBGXLgQu7Jfe98z/ec7z0vKa88b2q1BDtRHdAPBaylm1NzsxsOjPnPNt6WSWprbft+/c3I3zOAjhT1Y4+fvcjEQJIXnVECSa+AhqIHqlHH5lWCZoe+Gk4GRgDG86j9SAUdlDBSQaZhlOkuHyoVdJmsw98D1S5fM4NYM1LCpqM+Lwa240oLgmZzpVZvzKT75VLZcqksSZKWlQeAy/iORVwIvh31xvotvK7VG3Px4aWHj3Jl4C2uYSvq+your_sha256_hash+TFHp4/hg8BSCYVfMOZoPEv2NZGdy9WCGUr9toDR3E2/H4V6nwRe/BmgN65H1ZhvMuB3XiKIyFoGefwO6ysVkUlrNUNsyAK/jli533Q+Y8cJFvAeXyMS1CI/jiMr/your_sha256_hashJ09r+your_sha256_hashORK5CYII=");\n}\n.bk-root .bk-tool-icon-redo {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4itK+your_sha256_hashCoBgErVz8rCwiTDMwBCIKipDWyip/your_sha256_hashyour_sha256_hashtgYmEL/6I+YasvY7Lg6iRpIX5VF8wuEe/XV8wGf8jN6LWTiAc7iEQ7ucPZ+your_sha256_hashMMz3sOJWl4Xevc/vwBzdwAl+yNNwZxfRI+GxelK9ikHcwh8d4NNR/YFRES1ZwoTYdR7I0rNf3TzVNIGbmSvR/Bx08mIgCFSVu4l2ltIWD9WxNGR+W8KOynqnZ0rwCeVG+wa0hjrxtWoF5dAfc28V8Mib/n+Nev5dnabg/zgw87aNEN/bHOwVRiRe4Wym9zNKwMKkpgIWKEt24njxiJlq0aPFv4i9ZWXMSPPhE/QAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-reset {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/your_sha256_hashf9ElrI6VqDAXcID4TF0IiYQMkSlTokNCZ+b7jove2t+NMH7rQBWd3v+989/zP+Z8X3Jb/WGQySvUNTQBJESkNguAVYIWqzhaRhwBU9WcR+your_sha256_hash1GzqoIQMCLDpr3x/tLQ0oZzrk5Vj0/BOEBt+KYuOlBVGlrahr0Wob27t3gEjnZ2AyQzmUwHsDgP6J/your_sha256_hashyour_sha256_hashyour_sha256_hashdvlIj/e6ujrEAWoZDn8hmMjXATMACGaAVuBjXTVVXFc/AxhaA+4zvn1DV+your_sha256_hashKmtkzVVK6cEMsyJraHhiCqJqJUwj/JRz7TW1iSSyR2rVyylqa0Ta+24Ic8vXaAEmDFc/l5Z2A/80OibuVyuz/f9ElUdHCmvw82t5HK5h6y1PYhsz2YyGw43t2KtBZHIGwB6+j4rCkBVUdV7gXrggnPuu8h4eP+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashvIhvCMqkH1kdIJ2o+k8iJB1LVVRfjZ6nqqlEAIbdVQGto8Lrv+/dbawcjAL7vc+6bs+zetetfLSHxniIFGofGGsU2oC7eOCbDfZ7nQawBOSAX74SF9oEPImOq+your_sha256_hashcvrNdVFjR8cHkYzjDH9wLjDaEwEzpwa4MypgWvAjtjxfGNMj4jMiT+M+your_sha512_hash+vbx8zZXLl7PR2+nl5Tz/your_sha256_hash6oBNwN1TrLbfgX3A1kKLzKeff8nLLzw38T5wZDgxn1LnNk5lLRfP26/OnR2hwfNYW2Atn9RCsrf+EECyrKysDFimqhXhyjY3VLkAXBKRDqA7nU6nS0tLhyIj6XSaN9bVclv+l/IXAmkwvZc+jNUAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-save {\n background-image: url("data:image/png;base64,your_sha256_hash512_hashyour_sha512_hash/your_sha256_hashhP+H5EhAAAH2R8hH3Rg0QAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-tap-select {\n background-image: url("data:image/png;base64,your_sha256_hashyour_sha256_hashAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashQTY1REE2OTk0Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDwyour_sha512_hash+yPMdKKmUrrn0iUfjhWlLFi6YfNrF+StBoTo39iYkTGco4xxxG59P7k/T2PT8/37nu3bx9ezvPj+zyf5/your_sha256_hashdAttTioRJjdeA8mAHHS2xuk3p+M8M16ipVQE49Ds6CiFO9RLjGONf05QLx6wPQaBlbBlPgJVgkP0ETiIJ2sB/E1XfimjfgBOOlKDUqCGOcqBcQnw6BYW5YTo4wbvQhMmCfGRemC2rBiGXzWUb+kM/your_sha512_hash/EbV3o4N+NaoE9Fu/i827K5pNYHnqAVJECShWmAaddpscYFFXwR7vnXBRGlnUN/L6kqKJlxnRUuDbaDBiL+vst5d4gpcpBrqk/2jIgCKVUolhntplzivHmwh4stGOPfwBWwl/2dpp8p7xjQZqFLiQJtauKkivYmyour_sha512_hash+0kyHLJZNR7fUMooUKFHAPkfQo58VLK+RzwRDd4FdWG9mjpaAXzqkJa1R7kQttqEABWXMjOOxxVRfnhRm5URX1prk/0pQHwNcKlchZ+jdpC+hFdVqO0my9Hj5dkYgCn1Rfh/KdlNDHrJhPqlDih+IfBd6qwpOgEqYMsorJ2HtWxtagLJDn/W3KRfPOZhoeBJfZPgVeGKeKrkQBh5dLXl25Ny3pc4/your_sha256_hasheNHIZvQa7/7cC7nV6zHIfyFP9EXjFa7YxKAVqPP4bxhhoLWW+z9JyCb6M/MREg59/your_sha512_hash==");\n}\n.bk-root .bk-tool-icon-undo {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMPt1rFrFFEQBvDfGhACASshkL/your_sha256_hashwecWy7N3tbe6C4H2wxc682Zn3zTfvLXPM8b8j6RqYF+your_sha256_hashUk7hA7eJKl4U/rAuKu3+HslFr/FZezNPSTFslX8QErDe4DvMVH/Iq9F7VwGpdwZUjsPtaSFjv/1vCBPjaxO0xcNbHejLpZrrlvJCMCT+JzA+2fcC1Lw+your_sha512_hash+VaWhlezOIqbGFirJd/H7szugrwoX+D2BDEvszSsT5OBdfRaru/F9dPXQF6U27g/KnmWhgctxqyzBrZGMNGL/rHI0nDkKXiKexXTsywNGx0OnFbFNk3BRoWJXnw//j+ivCi32/S8CxPVNiWOAdUiJtXITIqYY45/Cn8B2D97FYW2H+IAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-wheel-pan {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/your_sha256_hash4BEoxdlJnUbfNogtDCYWQRZOSxtAUCoFiJY0pWJVUjeTKM9LMe+9+Xcyb8ZMychuofeHCffeee7/vnXvOuefYlV/+mv932//tb91z/your_sha512_hash+qzcRQup1zNZ9RwDe+your_sha512_hash+CUlTIYTp7RMT0b3Af37p8kh5y9gZcy4Fzt+5szqSaxkzUR7dwtrKMmaGW242d0t6vrD/He/90865o865o977p4F3Ctp4frnZ3L0Z+OryUrVSrZ0z8ZxhHjhcq1XPrS43q/0flDlK9XpPA2ma7gMeyvfPx3H8TJZlH4YQWiGEVpZlH8Zx/your_sha256_hashyour_sha256_hashKu3m+your_sha256_hashwQ/DNLmUmTMNuXX+taXHTDaj5OW612R1JZ0nFJJ/J+your_sha256_hashACsgnHPTwJnCnjP5HMBKLotzxsTE9rgDL0t6LoriKsDIaB31ZEK+JxQJRHFUBR2NqLw8OTkZR0OC0ntm9k1JWU7OA4vD/mZ+YfElsANmNEKi75vztzB5M8uAr+bx48me88g757PQ1U5zNg52YH7hX8l6f+4Fi3c3BqHNmkI4YQOV2MGCNu9qHPYCewfzbrC+XSGcWEcgTRKA3wFfyzdDz5d+D3x9CIcfA4eBbQS9LscskgfLnHNPAnslvS/pbZDHLLPADpx9N9fqpSIBH8cxWZY9m6bpb4Ev5fN/iKLo2TRNgdx/eo8Wk5O7Ts/N/your_sha256_hashe/9VAjhzRxoKk3Tvg3U8nulVqvx8cyNpER2umM+SdOkbc5B8JhpqBdIgTRR24h+your_sha256_hashDfUCw9/qJHamPOKToAwHtHN6lMvlSkH2o7wDMDo6WuGuQbbn5+YAKNcb3J5fSvrhtTY+your_sha256_hashfPYlwGa+bTi8Dl1dvNsyvNtQQL9MO2w+HM7BqwlAtPdrvdq9773WAVsIr3fne3270KTOYyS2Z2bbXdHhogKmPj7YWF+your_sha512_hash/D1Qw7HXZlcRa69+U6w38l5/4ipxzf5X0CPBILjcGPJH34pVcc8692FxcXLlXRnTwwH7+9P4f8aWe3fY59LIqo1NMyQBCCHNmdgx4BegUWefjDvCKmR0LIcz9L8nokSNH+PRvH4HC3YQ098pSbevg24qlmZmNmtmjkg4D3+j/tZldkvQXSa3PW5ptlpL3ZaIN99OS9F7+your_sha256_hashSUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-wheel-zoom {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/your_sha512_hash/your_sha256_hash+your_sha256_hashK4TtI2YAgYkrQthHDdhV5uuw+43/ZrwCbgRttgY/tjtrc0m83X3/f+D6ydnJhYcB4BSZcBA7aP2d4ELAGW2N5k+your_sha256_hash6RHgccSNrddbvuHtm9Jqoak7xVF8WFgdavV+pSk5cCObNmXgK++85prCj3z28HKqZMnH7D9YAY4BvwujT8BvCuL1INX9vVt+dfwcCvNb7f9q2RuSfrGvWu/your_sha256_hashyMiyFLkum7WJCMDztrcrTTrIRuAQZ6NcK1utL4dWq/your_sha256_hashw3c+your_sha256_hashY+kQw1YAuwJY2nbUluAnCWpKkaFl6IQIzxivaR2SYA89sJVK/Xp2x32R6w/your_sha256_hashL9ijE1Jf/bZZoPtzbavmqNZLbf9tSxq+yoduuJ+SZ+zXSZyBXCqU+d8fvC5yRUrV+0G2j3g2hDCLyXd/+Su3QdnvP/zCuH72LWsgf2k0oHlH2c2odlkxcpVEdgr6aDtjyb8x20/J+mA7T9I6rL9SWA5dne2/GdXLl58qNJh398An85yTMA+4DOz8Dgu6Zu2dwJXJ91ltm8Gbp7Fgb+EEB4aHhpq5CEtACqVyr3AC0AlPS8k3TSmQ2YPhhBuS/1/your_sha256_hashebN94QAnJB0EdtjekydyZXqjs/0ZgLIs/w6sy8bnYGYJ63pgERKC05JutT1kOwITwL9tvzlzUQUYB+your_sha256_hash0fv2e2w5thO5DbiqL4oKT3ZKpnpyYnz+SY2ZpTAPZmJfdIrVZbNBNUq9UW2X4kU+2dcf53Aj1pj2PA7y/6m1DS00A9za9uNBq7iqJYBuoGdRdFsazRaOzKSqye1rTbaa/tlbYrqXQP2X4FIA9/J1l39xrC0v7+w5IeB8XkwS1lWe6TGJAYKMty31tfO4qSHl/a3384I3CDpI+kzC4lnRfrue6GytEjR8oQwlY73gC0L4qlth/q0M1/LYWtR48cKQF6enrC6dOnVwGLEpnxnp7en4+O1i/tszzGOCTpPmB7ahb57QUwBWyXdF+McWg6MScmuoA8OX8xOlpvXGz422XYTsB/SnpA0h7bX5R0WzI9HUL4qe2XbI+dk3xl+V7gxoztD5jRI+YK/zkEEokx2/uB/RdzIfUtueqVN04cXwF8G3iHY3z9Urw/j8ClyhsnjrcS2Vv/J/8NLxT+/zqBTkcxU/cfEkyEAu3kmjAAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-box-edit {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashJREFUWMNjXLhsJcNAAiaGAQYsDAwM/+lsJ+OgCwGsLqMB+D8o08CoA0YdMOqAUQewDFQdMBoFIyoN/B/your_sha256_hashAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-freehand-draw {\n background-image: url("data:image/png;base64,your_sha256_hashYRjH/your_sha256_hash512_hash/KQIULsz9FqItGdOfJKLhApLgVkiSCGODjWit7QpKWy+your_sha512_hash/NbNn2Xkfw/YwdSw/We14HP2IEZwXyour_sha512_hash/lyCM0+E5hv5+piZXwKYcF23as+37bTXsQVqgkL0p/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash8MtK5cuHCZTH4tiHEOa4xFngvTyS8f35d6enomiCi4/your_sha256_hash/Bw947C50KhUFOG4cwz35cjWNBlHGeD53n3xsfHP/T19U1qciggar8Fa4I3PHobIotBWBtc2hSiChyZxVzM53Pv7FVH6Tp3uVy+g0r1ImD2GjIrQGYIxjnfuXTZGICS5k/your_sha512_hash/AKghfBnOEKgS+Q7z91Xfdz/your_sha256_hashUnK+ydz3wC6I9x+lwbngwAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-poly-draw {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wDyour_sha512_hash/your_sha256_hash4A7aAuHSJKkgo2LvfBrU3aJnlYkBy4vHcP557zP/9z3r33JdXa647N0kHSZd5Nn0rSxc8G3cXp85sMcnZZ8vge3osZ+l3vB8CWFA0iL14t79h210swAjACMAIwAjACkB90D/8/your_sha256_hashiuNh/hVJq71Wxttmqz0dG88vPc+MgWP4grvYG3SLOBrZFFFrttqPe4HIDxh4GSei+98iSlusuYopXEAjBtEPA3tQwUpwluAbDm4TPJUz+BTW9l2Ce6G7L0X/Bw8D3T/7SKKIDzHg7QCcxjvcQAEtXAnrrg/RP0/your_sha256_hash8w9iQwevBdyq3/27CMRzAE5yLuvsRLgyour_sha512_hash/atmIAAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-point-draw {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashyour_sha256_hashEteQmRuhCURqWsSqqc9IolREXdEvQBElxtdw7KURSFEVKu4w8wAKLxdw9Z+bMnRmZGXfZ29//your_sha512_hash+your_sha256_hashCd8+f3QCXpPLx8WNwv0j6Bm9FMK7FJ3WBE+your_sha512_hash+upznK4vh0GIeQwwQStJkHQD3MwsCALTJRG7Qrdrj5m/djgYaIa0hlkRdJk26XEgC9txurccBtVW3IudBImmZuACUP+ZlIDBt9FKcubYNTcAH/X0RYM1E7utJPlqeyour_sha512_hashyour_sha512_hash/Dy9Dypt7jXrtdGwQECS9NPhr6Gq6txUzNigE6zydLK6lTw12/KT4FGFEUfJX2YJNONq5tVs4ODA7sD/DnwJ/BoADZuE3tHFs12dna6d4C/BI6AlbyzI8ii2TTw12/your_sha512_hash+P3b+your_sha256_hash512_hash/It9bArCTKR8eZN+SJ13AScPnoODeRdqNenH+wul5w2gUr2WUjMFAt8bZ/0axX/wNnv4H8vTFb1QAAAABJRU5ErkJggg==");\n}\n.bk-root .bk-tool-icon-poly-edit {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+your_sha256_hashyour_sha256_hashA4yeQb7CAUNJy0daLeomJN8SEULAC2kBBapBKoLvbmdl/c14vdmY7u91tF95kknPOnHmf95znPc97Ro2OTeBbdjFDT3c32ZxVHUOE9kSMB0/m6ExuoJn1H+ur6Yyour_sha512_hash+1YN4OH9+7huGdECSBVfqUosbsllfmauBqiR+your_sha256_hashyour_sha256_hash25ObctkrVMi+jQivd7U2ZyV/3Hzpq7h3h1b/7p9Y0o8v8rwAbTWrGpSocN/FGDlbAI0Rl23PCBan0Ok158H9Ipwzi25A/Mzc9Glyour_sha512_hashQjQI+your_sha256_hashBsB3oWpGnVWisCeDS1VHj4vBI92+/your_sha256_hash+your_sha256_hashczdqekrWmsc2zlrmvEKOGoW1GUjFLqSk2KpJrCLwyMCPAP+BO54QL8DM6YZXyour_sha512_hash+0bGJptl1YXikD0grpY4Rjc4a8Fbgdab/your_sha256_hashfgDGgGQA9I1A9t1tlq0AxrXxn0ilUpw4fhQqYkH/sT41OTnJJwf2s6FjI5mshdYa7bqVR2uezr9MJmJt14FvGrh/O9D+e6UkM/xyCuCqEKCYnJyUTKFQrZDHjxzGshwWLQcRsOz8Hi85P23id0ug/XilAMLBmm4tPGdoaKjSH5+your_sha256_hashx5yY94HQLGhGk4LFCYQSqaE0AwWM1eOoEbR0dKBSW7bC4mKuffxs4D/wCLKwQQPAUzIkslfp6cVomROWSolh0GjldAM4nzDi2k9your_sha512_hash+TfNGBpZtRastvrvARJmfMF28ge9sc2B9/PNnCilMIDwK6y8/ow/Ai4kvILTljAXvDvEvrqKSUs60KolzPjBxspavQD2tKqCAGF/Ba+xE/Wbilu54wZV8NEKF5fXzQHl/your_sha256_hashOA4bcn1y1Swmb+iLpJKpVrfgdpfsiVVCYcgluwgnU7jEgJ4s5UkLFtWYyHyEg0/N1q1tmQH+YXnAMFr97Nmv3p+0QsHQRsF8qpBOE5+rb9Nkaj50tVQKjqh4OU3GNL/1/So3vuUgbAAAAAASUVORK5CYII=");\n}\n.bk-root .bk-tool-icon-line-edit {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAG/your_sha256_hashRv4your_sha512_hashmZ5l2vGJfXCzne8fZ13OV+9yl3ozvx2DDYyXbauCDvRoHPON3frl5Imt7MuX8hH0seiz9/xwxnDMFgYMczUPD7m89J4fwp/iK+OVRbiMf6gm8K4bv/3NN1Pzjw2fvwn+93PLzccTZ6mJU+/your_sha256_hashhhhEK+OhgLmCYn1hon1vtPBxWcPIgrGTCZrR5fHvc58A/fb5stJaFOZEvT18BF1t8AYYxZ99YBUJoXZ/K9i+50/jPjxEbwKBsNxcYqL6dLZrQK7bC5jl4cVga/Ql5yuNuABfhbAEYCmDAJwpCiXxmzkTwYwE/your_sha256_hashyour_sha256_hashyour_sha256_hashZpp5llmnLsTaCisuWWnlVVZd+mTtsvqVtU/m/your_sha256_hashEHGGBiMk1gWPbl7Mfcrbw7e/V9545+Yc0bd/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcwaonT0pgA6mB25grPILtnSMhuCpsGhmMU6uJbixJs4lbKHqh+wos1jW2rchyGRCIvN9MXu+KAmMSfAlIKVvi/tybhCPJZCu2Ow9pLdyo427+your_sha256_hashyour_sha256_hashS8o92iEZpuWJyour_sha512_hasho1Zmc4jARhotrA5F5ZcjP9rPk90vR8A+k028A+8+5wKlHVID542sMzMCuXktkRzUCpE+xCBZywjNcJITx0II9x5948CekBl4XaC5OCX2nCyObdwN3HwQh5DWL/BBEkhDYHn/vpXNgZkVTZs8rj+your_sha256_hash2LPoguVB2kwUx7UL5KqZWiEzocsbvSjNnaYDNtcYJuA5cDcsrvHd6yCxGjqvl9+wh3Qh8Kc9py8sNW8ncU8qwxdPj1qIGfrPqlXeoS4/JLa/LwRLTCtxuSoZUT+your_sha512_hash/IM9+your_sha512_hash+6WI9XNISFIywpf6RMd5/a91vE78FzVHIFmxud4woyJx76OMTCa4yhgN3iJO2VfRPFMv9sYTxFzU+your_sha512_hash+p6rlttDhK+YwwK1LHVe0drDtorc5vnQ1247g58vewDtU7L3DRwrG4dhCUDRKKOtYr2dXHtpt+33d1WZmfkAHdl7Q8ENF+CNgB+nOw29n5F7SeNo/ckbu4laLTCdqJLHjmhJbKzmrCEX7zULrhefuHmu0V/1nbP1pnb6FaT7sOxn4pvWkfrYhYtCeJ4Xv+kOXrroIs1eHWXN1/AfzaY94ms5vaAAABg2lDQ1BJQ0MgcHJvZmlsZQAAeJx9kT1Iw0AcxV/your_sha256_hashQ/ABxcnRSdJES/5cUWsR4cNyPd/ced+8AoVFhmhUaBzTdNtPJhJjNrYrhV4QwjAgGIMrMMuYkKQXf8XWPAF/v4jzL/9yfo1fNWwwIiMSzzDBt4g3i6U3b4LxPHGUlWSU+your_sha256_hashSo217slfGMnrK8tcpzmEJBaxBAkiFNRQRgU24rTqpFhI037Cxz/o+iVyKeQqg5FjAVVokF0/+B/87tYqTE54SZEE0PXiOB8jQHgXaNYd5/vYcZonQPAZuNLb/your_sha256_hash/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5AQdDBkQmV+your_sha256_hashmF6E2/4H+A4r+A0offdlWodL4kEZw9bG+iC9iKqLF0os0EBq02dtcdmdnfj7szGZ2M5vulv5g4JwzZ873+your_sha256_hashAPwwYVZ0tHiq6+/xu+/your_sha256_hashI4EA0sVXqsPF93xW7y73ACVJBJwE1j8HUBIi3Sz/QNtrIzHN+yWdSdNue915IMKWXI4TJ050Adp+U+your_sha256_hashour_sha512_hash/wBUh53v+7tW7y5n1+BZRIoJSioXvy3itdgclURSZTBrP87AdV57G1TT0d4GPgC+Bw8Ca7bifATsTgzBvjlH1qgNdICJM7tjB8soKw4jtuDyour_sha512_hash+1mBTUM/AKwqpZSIpPfu2VP7+/your_sha256_hashyour_sha256_hashyour_sha256_hashJQLBZpBS1qjSqFwjipdGr9SWlsHTewm9ZmnngMKAaV9nBd+/bmdxSLRc6dnemm3your_sha512_hash+xgywBhwLfZIdKRfj7dWqPGFubq7T428ukslkaHttLNsZ9P3nwIfh+your_sha256_hash3IM+El1rNqTaqaph5W1uYGAFrfA5YvnyE9MoFBYtjMI/BXgQR/4pqVDZL3V9/cYrX+x7SnsXh/your_sha256_hasheJ95oDEMHwHHcvvUcRqEwuBf0SSUEB9gfxsAgAkO1kcj/WvwKPaR8EhvPAUvRtdIMtR1FtBH37w8DEeChaehXw/xfAnzHcVOjEkhHrIe0Qlz7T8PuWLEd9+2w9KphgUUgQJ7JAgAPDT13NTrJyOYqIilrlEwQv/NPMTSByxfPIU37eCqtq2zWmPYDjbavaLYVdn2NuffPjqRJK2hRLBaHzoK+X7L1QE+nIFeYoFQqkTVMaTn2UOe1LWtwEJqGzqgRnS9M4Fb+3XBJGfSrFzW9dBw0icioJBzHzUXdMJM18APwWo6Kmy1O6X+V8UHDotBqogAAAABJRU5ErkJggg==");\n}\n',qf]}css_classes(){return super.css_classes().concat("bk-toolbar-button")}render(){oa(this.el);const e=this.model.computed_icon;re(e)&&(ai(e,"data:image")?this.el.style.backgroundImage="url('"+e+"')":this.el.classList.add(e)),this.el.title=this.model.tooltip,null!=this._menu&&this.root.el.appendChild(this._menu.el)}_pressed(){var e;const{left:t,top:n,right:r,bottom:i}=this.el.getBoundingClientRect(),o=(()=>{switch(this.parent.model.toolbar_location){case"right":return{right:t,top:n};case"left":return{left:r,top:n};case"above":return{left:t,top:i};case"below":return{left:t,bottom:n}}})();null===(e=this._menu)||void 0===e||e.toggle(o)}}hg.__name__="ButtonToolButtonView";class dg extends ag{}dg.__name__="ButtonToolView";class fg extends sg{constructor(e){super(e)}static init_ButtonTool(){this.internal({disabled:[En,!1]})}get tooltip(){return this.tool_name}get computed_icon(){return this.icon}get menu(){return null}}fg.__name__="ButtonTool",fg.init_ButtonTool();class pg extends hg{render(){super.render(),va(this.el).toggle(iu,this.model.active)}_clicked(){const{active:e}=this.model;this.model.active=!e}}pg.__name__="OnOffButtonView";class gg extends dg{}gg.__name__="InspectToolView";class mg extends fg{constructor(e){super(e),this.event_type="move"}static init_InspectTool(){this.prototype.button_view=pg,this.define({toggleable:[En,!0]}),this.override({active:!0})}}mg.__name__="InspectTool",mg.init_InspectTool();class vg extends dg{}vg.__name__="GestureToolView";class yg extends fg{constructor(e){super(e),this.button_view=pg}}yg.__name__="GestureTool";class bg extends hg{_clicked(){this.model.do.emit(void 0)}}bg.__name__="ActionToolButtonView";class _g extends dg{connect_signals(){super.connect_signals(),this.connect(this.model.do,(e=>this.doit(e)))}}_g.__name__="ActionToolView";class xg extends fg{constructor(e){super(e),this.button_view=bg,this.do=new xe(this,"do")}}xg.__name__="ActionTool";class wg extends _g{doit(){window.open(this.model.redirect)}}wg.__name__="HelpToolView";class Ag extends xg{constructor(e){super(e),this.tool_name="Help",this.icon="bk-tool-icon-help"}static init_HelpTool(){this.prototype.default_view=wg,this.define({help_tooltip:[Rn,"Click the question mark to learn more about Bokeh plot tools."],redirect:[Rn,"path_to_url"]}),this.register_alias("help",(()=>new Ag))}get tooltip(){return this.help_tooltip}}Ag.__name__="HelpTool",Ag.init_HelpTool();const kg="\n.bk-root .bk-logo {\n margin: 5px;\n position: relative;\n display: block;\n background-repeat: no-repeat;\n}\n.bk-root .bk-logo.bk-grey {\n filter: url(\"data:image/svg+xml;utf8,<svg xmlns='path_to_url id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscale\");\n /* Firefox 10+, Firefox on Android */\n filter: gray;\n /* IE6-9 */\n -webkit-filter: grayscale(100%);\n /* Chrome 19+, Safari 6+, Safari 6+ iOS */\n}\n.bk-root .bk-logo-small {\n width: 20px;\n height: 20px;\n background-image: url(data:image/png;base64,your_sha256_hashiAAAAAlwSFlzAAALEgAACxIB0t1+/your_sha256_hashDiNjZRtaJVlGMd/1/your_sha256_hashQpLgoLjLIQCpEsNJ1vqUOdO7ppbuec5+V+rj4ctwzd8IIbbi6u+your_sha256_hashyour_sha256_hashH7Ej8CM66nIF+8yngt6HWaKh7k49Soy9nXurCi1o3qUbS3zWfrYeQDTB/Qj6kX6Ybhw4Byour_sha512_hashCXh3jzOu3bHUVZeU+DEn8FInkPBFlu3+nW3Nw0mk6vCDiWg8CeJaxEwuHS3+z5RgY+YBR6V1Z1nxSOfoaPa4LASWxxdNp+VWTk7+4vzaou8v8PN+xo+KY2xsw6une2frhw05CTYOmQvsEhjhWjn0bmXPjpE1+kplmmkP3suftwTubK9Vq22qKmrBhpY4jvd5afdRA3wGjFAgcnTK2s4hY0/GPNIb0nErGMCRxWOOX64Z8RAC4oCXdklmEvcL8o0BfkNK4lUg9HTl+oPlQxdNo3Mg4Nv175e/your_sha256_hashYnl6vxoByANLTWplvuj/nF9m2+PDtt1eiHPBr1oIfhCChQMBw6Aw0UulqTKZdfVvfG7VcfIqLG9bcldL/+your_sha256_hashidpX30sFd37Fv/your_sha256_hashVw/oTyICIthibxjm/DfN9lVz8IqtqKYLUXfoKVMVQVVJOElGjrnnUt9T9wbgp8AyYKaGlqingHZU/your_sha256_hash+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==);\n}\n.bk-root .bk-logo-notebook {\n display: inline-block;\n vertical-align: middle;\n margin-right: 5px;\n}\n";class Tg extends rs{constructor(e){super(e)}static init_ToolbarViewModel(){this.define({_visible:[Tn,null],autohide:[En,!1]})}get visible(){return!this.autohide||null!=this._visible&&this._visible}}Tg.__name__="ToolbarViewModel",Tg.init_ToolbarViewModel();class Sg extends Na{initialize(){super.initialize(),this._tool_button_views=new Map,this._toolbar_view_model=new Tg({autohide:this.model.autohide})}async lazy_initialize(){await this._build_tool_button_views()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.tools.change,(async()=>{await this._build_tool_button_views(),this.render()})),this.connect(this.model.properties.autohide.change,(()=>{this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change()})),this.connect(this._toolbar_view_model.properties._visible.change,(()=>this._on_visible_change()))}styles(){return[...super.styles(),lg,kg]}remove(){gl(this._tool_button_views),super.remove()}async _build_tool_button_views(){const e=null!=this.model._proxied_tools?this.model._proxied_tools:this.model.tools;await pl(this._tool_button_views,e,{parent:this},(e=>e.button_view))}set_visibility(e){e!=this._toolbar_view_model._visible&&(this._toolbar_view_model._visible=e)}_on_visible_change(){const e=this._toolbar_view_model.visible,t="bk-toolbar-hidden";this.el.classList.contains(t)&&e?this.el.classList.remove(t):e||this.el.classList.add(t)}render(){if(oa(this.el),this.el.classList.add("bk-toolbar"),this.el.classList.add(uu(this.model.toolbar_location)),this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change(),null!=this.model.logo){const e="grey"===this.model.logo?"bk-grey":null,t=Ho({href:"path_to_url",target:"_blank",class:["bk-logo","bk-logo-small",e]});this.el.appendChild(t)}for(const[,e]of this._tool_button_views)e.render();const e=[],t=e=>this._tool_button_views.get(e).el,{gestures:n}=this.model;for(const r of he(n))e.push(r.tools.map(t));e.push(this.model.actions.map(t)),e.push(this.model.inspectors.filter((e=>e.toggleable)).map(t));for(const t of e)if(0!==t.length){const e=jo({class:"bk-button-bar"},t);this.el.appendChild(e)}}update_layout(){}update_position(){}after_layout(){this._has_finished=!0}}function Eg(){return{pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}}}Sg.__name__="ToolbarBaseView";class Cg extends rs{constructor(e){super(e)}static init_ToolbarBase(){this.prototype.default_view=Sg,this.define({tools:[Sn,[]],logo:[or,"normal"],autohide:[En,!1]}),this.internal({gestures:[Tn,Eg],actions:[Sn,[]],inspectors:[Sn,[]],help:[Sn,[]],toolbar_location:[ir,"right"]})}initialize(){super.initialize(),this._init_tools()}_init_tools(){const e=function(e,t){if(e.length!=t.length)return!0;const n=new Set(t.map((e=>e.id)));return T(e,(e=>!n.has(e.id)))},t=this.tools.filter((e=>e instanceof mg));e(this.inspectors,t)&&(this.inspectors=t);const n=this.tools.filter((e=>e instanceof Ag));e(this.help,n)&&(this.help=n);const r=this.tools.filter((e=>e instanceof xg));e(this.actions,r)&&(this.actions=r);const i=(e,t)=>{e in this.gestures||Re.warn(`Toolbar: unknown event type '${e}' for tool: ${t}`)},o={pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}};for(const e of this.tools)if(e instanceof yg&&e.event_type)if(re(e.event_type))o[e.event_type].tools.push(e),i(e.event_type,e);else{o.multi.tools.push(e);for(const t of e.event_type)i(t,e)}for(const t of Object.keys(o)){const n=this.gestures[t];e(n.tools,o[t].tools)&&(n.tools=o[t].tools),n.active&&k(n.tools,(e=>e.id!=n.active.id))&&(n.active=null)}}get horizontal(){return"above"===this.toolbar_location||"below"===this.toolbar_location}get vertical(){return"left"===this.toolbar_location||"right"===this.toolbar_location}_active_change(e){const{event_type:t}=e;if(null==t)return;const n=re(t)?[t]:t;for(const t of n)if(e.active){const n=this.gestures[t].active;null!=n&&e!=n&&(Re.debug(`Toolbar: deactivating tool: ${n} for event type '${t}'`),n.active=!1),this.gestures[t].active=e,Re.debug(`Toolbar: activating tool: ${e} for event type '${t}'`)}else this.gestures[t].active=null}}Cg.__name__="ToolbarBase",Cg.init_ToolbarBase();const Mg=e=>{switch(e){case"tap":return"active_tap";case"pan":return"active_drag";case"pinch":case"scroll":return"active_scroll";case"multi":return"active_multi"}return null},Og=e=>"tap"==e||"pan"==e;class Lg extends Cg{constructor(e){super(e)}static init_Toolbar(){this.prototype.default_view=Sg,this.define({active_drag:[Tn,"auto"],active_inspect:[Tn,"auto"],active_scroll:[Tn,"auto"],active_tap:[Tn,"auto"],active_multi:[Tn,null]})}connect_signals(){super.connect_signals();const{tools:e,active_drag:t,active_inspect:n,active_scroll:r,active_tap:i,active_multi:o}=this.properties;this.on_change([e,t,n,r,i,o],(()=>this._init_tools()))}_init_tools(){if(super._init_tools(),"auto"==this.active_inspect);else if(this.active_inspect instanceof mg){let e=!1;for(const t of this.inspectors)t!=this.active_inspect?t.active=!1:e=!0;e||(this.active_inspect=null)}else if(oe(this.active_inspect)){const e=Y(this.active_inspect,this.inspectors);e.length!=this.active_inspect.length&&(this.active_inspect=e);for(const e of this.inspectors)F(this.active_inspect,e)||(e.active=!1)}else if(null==this.active_inspect)for(const e of this.inspectors)e.active=!1;const e=e=>{e.active?this._active_change(e):e.active=!0};for(const e of he(this.gestures)){e.tools=H(e.tools,(e=>e.default_order));for(const t of e.tools)this.connect(t.properties.active.change,(()=>this._active_change(t)))}for(const[t,n]of de(this.gestures)){const r=Mg(t);if(r){const i=this[r];"auto"==i?0!=n.tools.length&&Og(t)&&e(n.tools[0]):null!=i&&(F(this.tools,i)?e(i):this[r]=null)}}}}Lg.__name__="Toolbar",Lg.init_Toolbar();var Dg=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};function Ig(e){return function(t){t.prototype.event_name=e}}class Rg{to_json(){const{event_name:e}=this;return{event_name:e,event_values:this._to_json()}}}Rg.__name__="BokehEvent";class Pg extends Rg{constructor(){super(...arguments),this.origin=null}_to_json(){return{model:this.origin}}}Pg.__name__="ModelEvent";let Ng=class extends Rg{_to_json(){return{}}};Ng.__name__="DocumentReady",Ng=Dg([Ig("document_ready")],Ng);let zg=class extends Pg{};zg.__name__="ButtonClick",zg=Dg([Ig("button_click")],zg);let Fg=class extends Pg{constructor(e){super(),this.item=e}_to_json(){const{item:e}=this;return Object.assign(Object.assign({},super._to_json()),{item:e})}};Fg.__name__="MenuItemClick",Fg=Dg([Ig("menu_item_click")],Fg);class Bg extends Pg{}Bg.__name__="UIEvent";let jg=class extends Bg{};jg.__name__="LODStart",jg=Dg([Ig("lodstart")],jg);let Ug=class extends Bg{};Ug.__name__="LODEnd",Ug=Dg([Ig("lodend")],Ug);let Vg=class extends Bg{constructor(e,t){super(),this.geometry=e,this.final=t}_to_json(){const{geometry:e,final:t}=this;return Object.assign(Object.assign({},super._to_json()),{geometry:e,final:t})}};Vg.__name__="SelectionGeometry",Vg=Dg([Ig("selectiongeometry")],Vg);let qg=class extends Bg{};qg.__name__="Reset",qg=Dg([Ig("reset")],qg);class Hg extends Bg{constructor(e,t,n,r){super(),this.sx=e,this.sy=t,this.x=n,this.y=r}_to_json(){const{sx:e,sy:t,x:n,y:r}=this;return Object.assign(Object.assign({},super._to_json()),{sx:e,sy:t,x:n,y:r})}}Hg.__name__="PointEvent";let $g=class extends Hg{constructor(e,t,n,r,i,o){super(e,t,n,r),this.sx=e,this.sy=t,this.x=n,this.y=r,this.delta_x=i,this.delta_y=o}_to_json(){const{delta_x:e,delta_y:t}=this;return Object.assign(Object.assign({},super._to_json()),{delta_x:e,delta_y:t})}};$g.__name__="Pan",$g=Dg([Ig("pan")],$g);let Wg=class extends Hg{constructor(e,t,n,r,i){super(e,t,n,r),this.sx=e,this.sy=t,this.x=n,this.y=r,this.scale=i}_to_json(){const{scale:e}=this;return Object.assign(Object.assign({},super._to_json()),{scale:e})}};Wg.__name__="Pinch",Wg=Dg([Ig("pinch")],Wg);let Gg=class extends Hg{constructor(e,t,n,r,i){super(e,t,n,r),this.sx=e,this.sy=t,this.x=n,this.y=r,this.rotation=i}_to_json(){const{rotation:e}=this;return Object.assign(Object.assign({},super._to_json()),{rotation:e})}};Gg.__name__="Rotate",Gg=Dg([Ig("rotate")],Gg);let Yg=class extends Hg{constructor(e,t,n,r,i){super(e,t,n,r),this.sx=e,this.sy=t,this.x=n,this.y=r,this.delta=i}_to_json(){const{delta:e}=this;return Object.assign(Object.assign({},super._to_json()),{delta:e})}};Yg.__name__="MouseWheel",Yg=Dg([Ig("wheel")],Yg);let Xg=class extends Hg{};Xg.__name__="MouseMove",Xg=Dg([Ig("mousemove")],Xg);let Zg=class extends Hg{};Zg.__name__="MouseEnter",Zg=Dg([Ig("mouseenter")],Zg);let Kg=class extends Hg{};Kg.__name__="MouseLeave",Kg=Dg([Ig("mouseleave")],Kg);let Jg=class extends Hg{};Jg.__name__="Tap",Jg=Dg([Ig("tap")],Jg);let Qg=class extends Hg{};Qg.__name__="DoubleTap",Qg=Dg([Ig("doubletap")],Qg);let em=class extends Hg{};em.__name__="Press",em=Dg([Ig("press")],em);let tm=class extends Hg{};tm.__name__="PressUp",tm=Dg([Ig("pressup")],tm);let nm=class extends Hg{};nm.__name__="PanStart",nm=Dg([Ig("panstart")],nm);let rm=class extends Hg{};rm.__name__="PanEnd",rm=Dg([Ig("panend")],rm);let im=class extends Hg{};im.__name__="PinchStart",im=Dg([Ig("pinchstart")],im);let om=class extends Hg{};om.__name__="PinchEnd",om=Dg([Ig("pinchend")],om);let am=class extends Hg{};am.__name__="RotateStart",am=Dg([Ig("rotatestart")],am);let sm=class extends Hg{};function lm(e){const t=getComputedStyle(e).fontSize;return null!=t?parseInt(t,10):null}function cm(e){let t=-e.deltaY;if(e.target instanceof HTMLElement)switch(e.deltaMode){case e.DOM_DELTA_LINE:t*=lm((n=e.target).offsetParent||document.body)||lm(n)||16;break;case e.DOM_DELTA_PAGE:t*=function(e){return e.clientHeight}(e.target)}var n;return t}sm.__name__="RotateEnd",sm=Dg([Ig("rotateend")],sm);class um{constructor(e,t,n){this.plot_view=e,this.toolbar=t,this.hit_area=n,this.pan_start=new xe(this,"pan:start"),this.pan=new xe(this,"pan"),this.pan_end=new xe(this,"pan:end"),this.pinch_start=new xe(this,"pinch:start"),this.pinch=new xe(this,"pinch"),this.pinch_end=new xe(this,"pinch:end"),this.rotate_start=new xe(this,"rotate:start"),this.rotate=new xe(this,"rotate"),this.rotate_end=new xe(this,"rotate:end"),this.tap=new xe(this,"tap"),this.doubletap=new xe(this,"doubletap"),this.press=new xe(this,"press"),this.pressup=new xe(this,"pressup"),this.move_enter=new xe(this,"move:enter"),this.move=new xe(this,"move"),this.move_exit=new xe(this,"move:exit"),this.scroll=new xe(this,"scroll"),this.keydown=new xe(this,"keydown"),this.keyup=new xe(this,"keyup"),this.hammer=new(og())(this.hit_area,{touchAction:"auto",inputClass:og().TouchMouseInput}),this._configure_hammerjs(),this.hit_area.addEventListener("mousemove",(e=>this._mouse_move(e))),this.hit_area.addEventListener("mouseenter",(e=>this._mouse_enter(e))),this.hit_area.addEventListener("mouseleave",(e=>this._mouse_exit(e))),this.hit_area.addEventListener("contextmenu",(e=>this._context_menu(e))),this.hit_area.addEventListener("wheel",(e=>this._mouse_wheel(e))),document.addEventListener("keydown",this),document.addEventListener("keyup",this),this.menu=new ug([],{prevent_hide:e=>2==e.button&&e.target==this.hit_area}),this.hit_area.appendChild(this.menu.el)}destroy(){this.menu.remove(),this.hammer.destroy(),document.removeEventListener("keydown",this),document.removeEventListener("keyup",this)}handleEvent(e){"keydown"==e.type?this._key_down(e):"keyup"==e.type&&this._key_up(e)}_configure_hammerjs(){this.hammer.get("doubletap").recognizeWith("tap"),this.hammer.get("tap").requireFailure("doubletap"),this.hammer.get("doubletap").dropRequireFailure("tap"),this.hammer.on("doubletap",(e=>this._doubletap(e))),this.hammer.on("tap",(e=>this._tap(e))),this.hammer.on("press",(e=>this._press(e))),this.hammer.on("pressup",(e=>this._pressup(e))),this.hammer.get("pan").set({direction:og().DIRECTION_ALL}),this.hammer.on("panstart",(e=>this._pan_start(e))),this.hammer.on("pan",(e=>this._pan(e))),this.hammer.on("panend",(e=>this._pan_end(e))),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("pinchstart",(e=>this._pinch_start(e))),this.hammer.on("pinch",(e=>this._pinch(e))),this.hammer.on("pinchend",(e=>this._pinch_end(e))),this.hammer.get("rotate").set({enable:!0}),this.hammer.on("rotatestart",(e=>this._rotate_start(e))),this.hammer.on("rotate",(e=>this._rotate(e))),this.hammer.on("rotateend",(e=>this._rotate_end(e)))}register_tool(e){const t=e.model.event_type;null!=t&&(re(t)?this._register_tool(e,t):t.forEach(((t,n)=>this._register_tool(e,t,n<1))))}_register_tool(e,t,n=!0){const r=e,{id:i}=r.model,o=e=>t=>{t.id==i&&e(t.e)},a=e=>t=>{e(t.e)};switch(t){case"pan":null!=r._pan_start&&r.connect(this.pan_start,o(r._pan_start.bind(r))),null!=r._pan&&r.connect(this.pan,o(r._pan.bind(r))),null!=r._pan_end&&r.connect(this.pan_end,o(r._pan_end.bind(r)));break;case"pinch":null!=r._pinch_start&&r.connect(this.pinch_start,o(r._pinch_start.bind(r))),null!=r._pinch&&r.connect(this.pinch,o(r._pinch.bind(r))),null!=r._pinch_end&&r.connect(this.pinch_end,o(r._pinch_end.bind(r)));break;case"rotate":null!=r._rotate_start&&r.connect(this.rotate_start,o(r._rotate_start.bind(r))),null!=r._rotate&&r.connect(this.rotate,o(r._rotate.bind(r))),null!=r._rotate_end&&r.connect(this.rotate_end,o(r._rotate_end.bind(r)));break;case"move":null!=r._move_enter&&r.connect(this.move_enter,o(r._move_enter.bind(r))),null!=r._move&&r.connect(this.move,o(r._move.bind(r))),null!=r._move_exit&&r.connect(this.move_exit,o(r._move_exit.bind(r)));break;case"tap":null!=r._tap&&r.connect(this.tap,o(r._tap.bind(r)));break;case"press":null!=r._press&&r.connect(this.press,o(r._press.bind(r))),null!=r._pressup&&r.connect(this.pressup,o(r._pressup.bind(r)));break;case"scroll":null!=r._scroll&&r.connect(this.scroll,o(r._scroll.bind(r)));break;default:throw new Error(`unsupported event_type: ${t}`)}n&&(null!=r._doubletap&&r.connect(this.doubletap,a(r._doubletap.bind(r))),null!=r._keydown&&r.connect(this.keydown,a(r._keydown.bind(r))),null!=r._keyup&&r.connect(this.keyup,a(r._keyup.bind(r))),Ai&&null!=r._scroll&&"pinch"==t&&(Re.debug("Registering scroll on touch screen"),r.connect(this.scroll,o(r._scroll.bind(r)))))}_hit_test_renderers(e,t){const n=this.plot_view.get_renderer_views();for(const r of K(n)){const{level:n}=r.model;if(("annotation"==n||"overlay"==n)&&null!=r.interactive_hit&&r.interactive_hit(e,t))return r}return null}_hit_test_frame(e,t){return this.plot_view.frame.bbox.contains(e,t)}_hit_test_canvas(e,t){return this.plot_view.layout.bbox.contains(e,t)}_trigger(e,t,n){const r=this.toolbar.gestures,i=e.name.split(":")[0],o=this._hit_test_renderers(t.sx,t.sy),a=this._hit_test_canvas(t.sx,t.sy);switch(i){case"move":{const n=r[i].active;null!=n&&this.trigger(e,t,n.id);const s=this.toolbar.inspectors.filter((e=>e.active));let l="default";null!=o?(l=o.cursor(t.sx,t.sy)||l,v(s)||(e=this.move_exit)):this._hit_test_frame(t.sx,t.sy)&&(v(s)||(l="crosshair")),this.plot_view.set_cursor(l),this.plot_view.set_toolbar_visibility(a),s.map((n=>this.trigger(e,t,n.id)));break}case"tap":{const{target:a}=n;if(null!=a&&a!=this.hit_area)return;null!=o&&null!=o.on_hit&&o.on_hit(t.sx,t.sy);const s=r[i].active;null!=s&&this.trigger(e,t,s.id);break}case"scroll":{const i=r[Ai?"pinch":"scroll"].active;null!=i&&(n.preventDefault(),n.stopPropagation(),this.trigger(e,t,i.id));break}case"pan":{const o=r[i].active;null!=o&&(n.preventDefault(),this.trigger(e,t,o.id));break}default:{const n=r[i].active;null!=n&&this.trigger(e,t,n.id)}}this._trigger_bokeh_event(t)}trigger(e,t,n=null){e.emit({id:n,e:t})}_trigger_bokeh_event(e){const t=(()=>{const{sx:t,sy:n}=e,r=this.plot_view.frame.x_scale.invert(t),i=this.plot_view.frame.y_scale.invert(n);switch(e.type){case"wheel":return new Yg(t,n,r,i,e.delta);case"mousemove":return new Xg(t,n,r,i);case"mouseenter":return new Zg(t,n,r,i);case"mouseleave":return new Kg(t,n,r,i);case"tap":return new Jg(t,n,r,i);case"doubletap":return new Qg(t,n,r,i);case"press":return new em(t,n,r,i);case"pressup":return new tm(t,n,r,i);case"pan":return new $g(t,n,r,i,e.deltaX,e.deltaY);case"panstart":return new nm(t,n,r,i);case"panend":return new rm(t,n,r,i);case"pinch":return new Wg(t,n,r,i,e.scale);case"pinchstart":return new im(t,n,r,i);case"pinchend":return new om(t,n,r,i);case"rotate":return new Gg(t,n,r,i,e.rotation);case"rotatestart":return new am(t,n,r,i);case"rotateend":return new sm(t,n,r,i);default:return}})();null!=t&&this.plot_view.model.trigger_event(t)}_get_sxy(e){const{pageX:t,pageY:n}=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(e)?(0!=e.touches.length?e.touches:e.changedTouches)[0]:e,{left:r,top:i}=ua(this.hit_area);return{sx:t-r,sy:n-i}}_pan_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e.srcEvent)),{deltaX:e.deltaX,deltaY:e.deltaY,shiftKey:e.srcEvent.shiftKey,ctrlKey:e.srcEvent.ctrlKey})}_pinch_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e.srcEvent)),{scale:e.scale,shiftKey:e.srcEvent.shiftKey,ctrlKey:e.srcEvent.ctrlKey})}_rotate_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e.srcEvent)),{rotation:e.rotation,shiftKey:e.srcEvent.shiftKey,ctrlKey:e.srcEvent.ctrlKey})}_tap_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e.srcEvent)),{shiftKey:e.srcEvent.shiftKey,ctrlKey:e.srcEvent.ctrlKey})}_move_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e)),{shiftKey:e.shiftKey,ctrlKey:e.ctrlKey})}_scroll_event(e){return Object.assign(Object.assign({type:e.type},this._get_sxy(e)),{delta:cm(e),shiftKey:e.shiftKey,ctrlKey:e.ctrlKey})}_key_event(e){return{type:e.type,keyCode:e.keyCode}}_pan_start(e){const t=this._pan_event(e);t.sx-=e.deltaX,t.sy-=e.deltaY,this._trigger(this.pan_start,t,e.srcEvent)}_pan(e){this._trigger(this.pan,this._pan_event(e),e.srcEvent)}_pan_end(e){this._trigger(this.pan_end,this._pan_event(e),e.srcEvent)}_pinch_start(e){this._trigger(this.pinch_start,this._pinch_event(e),e.srcEvent)}_pinch(e){this._trigger(this.pinch,this._pinch_event(e),e.srcEvent)}_pinch_end(e){this._trigger(this.pinch_end,this._pinch_event(e),e.srcEvent)}_rotate_start(e){this._trigger(this.rotate_start,this._rotate_event(e),e.srcEvent)}_rotate(e){this._trigger(this.rotate,this._rotate_event(e),e.srcEvent)}_rotate_end(e){this._trigger(this.rotate_end,this._rotate_event(e),e.srcEvent)}_tap(e){this._trigger(this.tap,this._tap_event(e),e.srcEvent)}_doubletap(e){const t=this._tap_event(e);this._trigger_bokeh_event(t),this.trigger(this.doubletap,t)}_press(e){this._trigger(this.press,this._tap_event(e),e.srcEvent)}_pressup(e){this._trigger(this.pressup,this._tap_event(e),e.srcEvent)}_mouse_enter(e){this._trigger(this.move_enter,this._move_event(e),e)}_mouse_move(e){this._trigger(this.move,this._move_event(e),e)}_mouse_exit(e){this._trigger(this.move_exit,this._move_event(e),e)}_mouse_wheel(e){this._trigger(this.scroll,this._scroll_event(e),e)}_context_menu(e){!this.menu.is_open&&this.menu.can_open&&e.preventDefault();const{sx:t,sy:n}=this._get_sxy(e);this.menu.toggle({left:t,top:n})}_key_down(e){this.trigger(this.keydown,this._key_event(e))}_key_up(e){this.trigger(this.keyup,this._key_event(e))}}um.__name__="UIEvents";const hm=("undefined"!=typeof window?window.requestAnimationFrame:void 0)||("undefined"!=typeof window?window.webkitRequestAnimationFrame:void 0)||("undefined"!=typeof window?window.mozRequestAnimationFrame:void 0)||("undefined"!=typeof window?window.msRequestAnimationFrame:void 0)||function(e){return e(Date.now()),-1};class dm extends bh{constructor(){super(...arguments),this.min_border={left:0,top:0,right:0,bottom:0}}_measure(e){e=new ph(e).bounded_to(this.sizing.size);const t=this.left_panel.measure({width:0,height:e.height}),n=Math.max(t.width,this.min_border.left),r=this.right_panel.measure({width:0,height:e.height}),i=Math.max(r.width,this.min_border.right),o=this.top_panel.measure({width:e.width,height:0}),a=Math.max(o.height,this.min_border.top),s=this.bottom_panel.measure({width:e.width,height:0}),l=Math.max(s.height,this.min_border.bottom),c=new ph(e).shrink_by({left:n,right:i,top:a,bottom:l}),u=this.center_panel.measure(c);return{width:n+u.width+i,height:a+u.height+l,inner:{left:n,right:i,top:a,bottom:l},align:(()=>{const{width_policy:e,height_policy:t}=this.center_panel.sizing;return"fixed"!=e&&"fixed"!=t})()}}_set_geometry(e,t){super._set_geometry(e,t),this.center_panel.set_geometry(t);const n=this.left_panel.measure({width:0,height:e.height}),r=this.right_panel.measure({width:0,height:e.height}),i=this.top_panel.measure({width:e.width,height:0}),o=this.bottom_panel.measure({width:e.width,height:0}),{left:a,top:s,right:l,bottom:c}=t;this.top_panel.set_geometry(new ja({left:a,right:l,bottom:s,height:i.height})),this.bottom_panel.set_geometry(new ja({left:a,right:l,top:c,height:o.height})),this.left_panel.set_geometry(new ja({top:s,bottom:c,right:a,width:n.width})),this.right_panel.set_geometry(new ja({top:s,bottom:c,left:l,width:r.width}))}}dm.__name__="BorderLayout";const fm=Math.PI/2,pm="alphabetic",gm="top",mm="middle",vm="hanging",ym="left",bm="right",_m="center",xm={above:{parallel:0,normal:-fm,horizontal:0,vertical:-fm},below:{parallel:0,normal:fm,horizontal:0,vertical:fm},left:{parallel:-fm,normal:0,horizontal:0,vertical:-fm},right:{parallel:fm,normal:0,horizontal:0,vertical:fm}},wm={above:{justified:gm,parallel:pm,normal:mm,horizontal:pm,vertical:mm},below:{justified:"bottom",parallel:vm,normal:mm,horizontal:vm,vertical:mm},left:{justified:gm,parallel:pm,normal:mm,horizontal:mm,vertical:pm},right:{justified:gm,parallel:pm,normal:mm,horizontal:mm,vertical:pm}},Am={above:{justified:_m,parallel:_m,normal:ym,horizontal:_m,vertical:ym},below:{justified:_m,parallel:_m,normal:ym,horizontal:_m,vertical:ym},left:{justified:_m,parallel:_m,normal:bm,horizontal:bm,vertical:_m},right:{justified:_m,parallel:_m,normal:ym,horizontal:ym,vertical:_m}},km={above:bm,below:ym,left:bm,right:ym},Tm={above:ym,below:bm,left:bm,right:ym};class Sm extends xh{constructor(e,t){switch(super(),this.side=e,this.obj=t,this.side){case"above":this._dim=0,this._normals=[0,-1];break;case"below":this._dim=0,this._normals=[0,1];break;case"left":this._dim=1,this._normals=[-1,0];break;case"right":this._dim=1,this._normals=[1,0]}this.is_horizontal?this.set_sizing({width_policy:"max",height_policy:"fixed"}):this.set_sizing({width_policy:"fixed",height_policy:"max"})}_content_size(){return new ph(this.get_oriented_size())}get_oriented_size(){const{width:e,height:t}=this.obj.get_size();return!this.obj.rotate||this.is_horizontal?{width:e,height:t}:{width:t,height:e}}has_size_changed(){const{width:e,height:t}=this.get_oriented_size();return this.is_horizontal?this.bbox.height!=t:this.bbox.width!=e}get dimension(){return this._dim}get normals(){return this._normals}get is_horizontal(){return 0==this._dim}get is_vertical(){return 1==this._dim}apply_label_text_heuristics(e,t){const n=this.side;let r,i;re(t)?(r=wm[n][t],i=Am[n][t]):t<0?(r="middle",i=km[n]):(r="middle",i=Tm[n]),e.textBaseline=r,e.textAlign=i}get_label_angle_heuristic(e){return xm[this.side][e]}}Sm.__name__="SidePanel";class Em extends xf{constructor(){super(...arguments),this._outer_bbox=new ja,this._inner_bbox=new ja,this._needs_paint=!0,this._needs_layout=!1,this._invalidated_painters=new Set,this._invalidate_all=!0}get is_paused(){return null!=this._is_paused&&0!==this._is_paused}get child_models(){return[]}pause(){null==this._is_paused?this._is_paused=1:this._is_paused+=1}unpause(e=!1){if(null==this._is_paused)throw new Error("wasn't paused");this._is_paused-=1,0!=this._is_paused||e||this.request_paint()}request_render(){this.request_paint()}request_paint(e){if(null!=e?this._invalidated_painters.add(e):this._invalidate_all=!0,!this.is_paused){const e=this.throttled_paint();this._ready=this._ready.then((()=>e))}}request_layout(){this._needs_layout=!0,this.request_paint()}reset(){"standard"==this.model.reset_policy&&(this.clear_state(),this.reset_range(),this.reset_selection()),this.model.trigger_event(new qg)}remove(){this.ui_event_bus.destroy(),gl(this.renderer_views),gl(this.tool_views),this.canvas_view.remove(),super.remove()}render(){super.render(),this.el.appendChild(this.canvas_view.el),this.canvas_view.render()}initialize(){this.pause(),super.initialize(),this.state_changed=new we(this,"state_changed"),this.lod_started=!1,this.visuals=new ns(this.model),this._initial_state_info={selection:new Map,dimensions:{width:0,height:0}},this.visibility_callbacks=[],this.state={history:[],index:-1};const{hidpi:e,output_backend:t}=this.model;this.canvas=new $a({hidpi:e,output_backend:t}),this.frame=new Ph(this.model.x_scale,this.model.y_scale,this.model.x_range,this.model.y_range,this.model.extra_x_ranges,this.model.extra_y_ranges),this.throttled_paint=function(e,t){let n=null,r=0,i=!1;return function(){return new Promise(((t,o)=>{const a=function(){r=Date.now(),n=null,i=!1;try{e(),t()}catch(e){o(e)}},s=16.666666666666668-(Date.now()-r);s<=0&&!i?(null!=n&&clearTimeout(n),i=!0,hm(a)):n||i?t():n=setTimeout((()=>hm(a)),s)}))}}((()=>this.repaint()));const{title_location:n,title:r}=this.model;null!=n&&null!=r&&(this._title=r instanceof tu?r:new tu({text:r}));const{toolbar_location:i,toolbar:o}=this.model;null!=i&&null!=o&&(this._toolbar=new ru({toolbar:o}),o.toolbar_location=i),this.renderer_views=new Map,this.tool_views=new Map}async lazy_initialize(){this.canvas_view=await fl(this.canvas,{parent:this}),this.ui_event_bus=new um(this,this.model.toolbar,this.canvas_view.events_el),await this.build_renderer_views(),await this.build_tool_views(),this.update_dataranges(),this.unpause(!0),Re.debug("PlotView initialized")}_width_policy(){return null==this.model.frame_width?super._width_policy():"min"}_height_policy(){return null==this.model.frame_height?super._height_policy():"min"}_update_layout(){this.layout=new dm,this.layout.set_sizing(this.box_sizing());const{frame_width:e,frame_height:t}=this.model;this.layout.center_panel=this.frame,this.layout.center_panel.set_sizing(Object.assign(Object.assign({},null!=e?{width_policy:"fixed",width:e}:{width_policy:"fit"}),null!=t?{height_policy:"fixed",height:t}:{height_policy:"fit"}));const n=N(this.model.above),r=N(this.model.below),i=N(this.model.left),o=N(this.model.right),a=e=>{switch(e){case"above":return n;case"below":return r;case"left":return i;case"right":return o}},{title_location:s,title:l}=this.model;null!=s&&null!=l&&a(s).push(this._title);const{toolbar_location:c,toolbar:u}=this.model;if(null!=c&&null!=u){const e=a(c);let t=!0;if(this.model.toolbar_sticky)for(let n=0;n<e.length;n++){const r=e[n];if(r instanceof tu){e[n]="above"==c||"below"==c?[r,this._toolbar]:[this._toolbar,r],t=!1;break}}t&&e.push(this._toolbar)}const h=(e,t)=>{const n=this.renderer_views.get(t);return n.layout=new Sm(e,n)},d=(e,t)=>{const n="above"==e||"below"==e,r=[];for(const i of t)if(oe(i)){const t=i.map((t=>{const r=h(e,t);if(t instanceof ru){const e=n?"width_policy":"height_policy";r.set_sizing(Object.assign(Object.assign({},r.sizing),{[e]:"min"}))}return r}));let o;n?(o=new Oh(t),o.set_sizing({width_policy:"max",height_policy:"min"})):(o=new Lh(t),o.set_sizing({width_policy:"min",height_policy:"max"})),o.absolute=!0,r.push(o)}else r.push(h(e,i));return r},f=null!=this.model.min_border?this.model.min_border:0;this.layout.min_border={left:null!=this.model.min_border_left?this.model.min_border_left:f,top:null!=this.model.min_border_top?this.model.min_border_top:f,right:null!=this.model.min_border_right?this.model.min_border_right:f,bottom:null!=this.model.min_border_bottom?this.model.min_border_bottom:f};const p=new kh,g=new kh,m=new Ah,v=new Ah;p.children=K(d("above",n)),g.children=d("below",r),m.children=K(d("left",i)),v.children=d("right",o),p.set_sizing({width_policy:"fit",height_policy:"min"}),g.set_sizing({width_policy:"fit",height_policy:"min"}),m.set_sizing({width_policy:"min",height_policy:"fit"}),v.set_sizing({width_policy:"min",height_policy:"fit"}),this.layout.top_panel=p,this.layout.bottom_panel=g,this.layout.left_panel=m,this.layout.right_panel=v}get axis_views(){const e=[];for(const[,t]of this.renderer_views)t instanceof _u&&e.push(t);return e}set_cursor(e="default"){this.canvas_view.el.style.cursor=e}set_toolbar_visibility(e){for(const t of this.visibility_callbacks)t(e)}update_dataranges(){const e=new Map,t=new Map;let n=!1;for(const[,e]of this.frame.x_ranges)e instanceof hh&&"log"==e.scale_hint&&(n=!0);for(const[,e]of this.frame.y_ranges)e instanceof hh&&"log"==e.scale_hint&&(n=!0);for(const[r,i]of this.renderer_views)if(i instanceof bl){const o=i.glyph.bounds();if(null!=o&&e.set(r,o),n){const e=i.glyph.log_bounds();null!=e&&t.set(r,e)}}let r=!1,i=!1;const{width:o,height:a}=this.frame.bbox;let s;!1!==this.model.match_aspect&&0!=o&&0!=a&&(s=1/this.model.aspect_scale*(o/a));for(const[,n]of this.frame.x_ranges){if(n instanceof hh){const i="log"==n.scale_hint?t:e;n.update(i,0,this.model,s),n.follow&&(r=!0)}null!=n.bounds&&(i=!0)}for(const[,n]of this.frame.y_ranges){if(n instanceof hh){const i="log"==n.scale_hint?t:e;n.update(i,1,this.model,s),n.follow&&(r=!0)}null!=n.bounds&&(i=!0)}if(r&&i){Re.warn("Follow enabled so bounds are unset.");for(const[,e]of this.frame.x_ranges)e.bounds=null;for(const[,e]of this.frame.y_ranges)e.bounds=null}this.range_update_timestamp=Date.now()}push_state(e,t){const{history:n,index:r}=this.state,i=null!=n[r]?n[r].info:{},o=Object.assign(Object.assign(Object.assign({},this._initial_state_info),i),t);this.state.history=this.state.history.slice(0,this.state.index+1),this.state.history.push({type:e,info:o}),this.state.index=this.state.history.length-1,this.state_changed.emit()}clear_state(){this.state={history:[],index:-1},this.state_changed.emit()}can_undo(){return this.state.index>=0}can_redo(){return this.state.index<this.state.history.length-1}undo(){this.can_undo()&&(this.state.index-=1,this._do_state_change(this.state.index),this.state_changed.emit())}redo(){this.can_redo()&&(this.state.index+=1,this._do_state_change(this.state.index),this.state_changed.emit())}_do_state_change(e){const t=null!=this.state.history[e]?this.state.history[e].info:this._initial_state_info;null!=t.range&&this.update_range(t.range),null!=t.selection&&this.update_selection(t.selection)}get_selection(){const e=new Map;for(const t of this.model.renderers)if(t instanceof _l){const{selected:n}=t.data_source;e.set(t,n)}return e}update_selection(e){for(const t of this.model.renderers){if(!(t instanceof _l))continue;const n=t.data_source;if(null!=e){const r=e.get(t);null!=r&&n.selected.update(r,!0)}else n.selection_manager.clear()}}reset_selection(){this.update_selection(null)}_update_ranges_together(e){let t=1;for(const[n,r]of e)t=Math.min(t,this._get_weight_to_constrain_interval(n,r));if(t<1)for(const[n,r]of e)r.start=t*r.start+(1-t)*n.start,r.end=t*r.end+(1-t)*n.end}_update_ranges_individually(e,t,n,r){let i=!1;for(const[r,o]of e){if(!n){const e=this._get_weight_to_constrain_interval(r,o);e<1&&(o.start=e*o.start+(1-e)*r.start,o.end=e*o.end+(1-e)*r.end)}if(null!=r.bounds&&"auto"!=r.bounds){const[e,a]=r.bounds,s=Math.abs(o.end-o.start);r.is_reversed?(null!=e&&e>=o.end&&(i=!0,o.end=e,(t||n)&&(o.start=e+s)),null!=a&&a<=o.start&&(i=!0,o.start=a,(t||n)&&(o.end=a-s))):(null!=e&&e>=o.start&&(i=!0,o.start=e,(t||n)&&(o.end=e+s)),null!=a&&a<=o.end&&(i=!0,o.end=a,(t||n)&&(o.start=a-s)))}}if(!(n&&i&&r))for(const[t,n]of e)t.have_updated_interactively=!0,t.start==n.start&&t.end==n.end||t.setv(n)}_get_weight_to_constrain_interval(e,t){const{min_interval:n}=e;let{max_interval:r}=e;if(null!=e.bounds&&"auto"!=e.bounds){const[t,n]=e.bounds;if(null!=t&&null!=n){const e=Math.abs(n-t);r=null!=r?Math.min(r,e):e}}let i=1;if(null!=n||null!=r){const o=Math.abs(e.end-e.start),a=Math.abs(t.end-t.start);n>0&&a<n&&(i=(o-n)/(o-a)),r>0&&a>r&&(i=(r-o)/(a-o)),i=Math.max(0,Math.min(1,i))}return i}update_range(e,t=!1,n=!1,r=!0){this.pause();const{x_ranges:i,y_ranges:o}=this.frame;if(null==e){for(const[,e]of i)e.reset();for(const[,e]of o)e.reset();this.update_dataranges()}else{const a=[];for(const[t,n]of i)a.push([n,e.xrs.get(t)]);for(const[t,n]of o)a.push([n,e.yrs.get(t)]);n&&this._update_ranges_together(a),this._update_ranges_individually(a,t,n,r)}this.unpause()}reset_range(){this.update_range(null)}_invalidate_layout(){(()=>{for(const e of this.model.side_panels)if(this.renderer_views.get(e).layout.has_size_changed())return!0;return!1})()&&this.root.compute_layout()}get_renderer_views(){return this.computed_renderers.map((e=>this.renderer_views.get(e)))}async build_renderer_views(){this.computed_renderers=[];const{above:e,below:t,left:n,right:r,center:i,renderers:o}=this.model;this.computed_renderers.push(...e,...t,...n,...r,...i,...o),null!=this._title&&this.computed_renderers.push(this._title),null!=this._toolbar&&this.computed_renderers.push(this._toolbar);for(const e of this.model.toolbar.tools)null!=e.overlay&&this.computed_renderers.push(e.overlay),this.computed_renderers.push(...e.synthetic_renderers);await pl(this.renderer_views,this.computed_renderers,{parent:this})}async build_tool_views(){const e=this.model.toolbar.tools;(await pl(this.tool_views,e,{parent:this})).map((e=>this.ui_event_bus.register_tool(e)))}connect_signals(){super.connect_signals();const{x_ranges:e,y_ranges:t}=this.frame;for(const[,t]of e)this.connect(t.change,(()=>{this._needs_layout=!0,this.request_paint()}));for(const[,e]of t)this.connect(e.change,(()=>{this._needs_layout=!0,this.request_paint()}));const{plot_width:n,plot_height:r}=this.model.properties;this.on_change([n,r],(()=>this.invalidate_layout()));const{above:i,below:o,left:a,right:s,center:l,renderers:c}=this.model.properties;this.on_change([i,o,a,s,l,c],(async()=>await this.build_renderer_views())),this.connect(this.model.toolbar.properties.tools.change,(async()=>{await this.build_renderer_views(),await this.build_tool_views()})),this.connect(this.model.change,(()=>this.request_paint())),this.connect(this.model.reset,(()=>this.reset()))}set_initial_range(){let e=!0;const{x_ranges:t,y_ranges:n}=this.frame,r=new Map,i=new Map;for(const[n,i]of t){const{start:t,end:o}=i;if(null==t||null==o||isNaN(t+o)){e=!1;break}r.set(n,{start:t,end:o})}if(e)for(const[t,r]of n){const{start:n,end:o}=r;if(null==n||null==o||isNaN(n+o)){e=!1;break}i.set(t,{start:n,end:o})}e?(this._initial_state_info.range={xrs:r,yrs:i},Re.debug("initial ranges set")):Re.warn("could not set initial ranges")}has_finished(){if(!super.has_finished())return!1;if(this.model.visible)for(const[,e]of this.renderer_views)if(!e.has_finished())return!1;return!0}after_layout(){if(super.after_layout(),this._needs_layout=!1,this.model.setv({inner_width:Math.round(this.frame.bbox.width),inner_height:Math.round(this.frame.bbox.height),outer_width:Math.round(this.layout.bbox.width),outer_height:Math.round(this.layout.bbox.height)},{no_change:!0}),!1!==this.model.match_aspect&&(this.pause(),this.update_dataranges(),this.unpause(!0)),!this._outer_bbox.equals(this.layout.bbox)){const{width:e,height:t}=this.layout.bbox;this.canvas_view.resize(e,t),this._outer_bbox=this.layout.bbox,this._invalidate_all=!0,this._needs_paint=!0}this._inner_bbox.equals(this.frame.inner_bbox)||(this._inner_bbox=this.layout.inner_bbox,this._needs_paint=!0),this._needs_paint&&this.paint()}repaint(){this._needs_layout&&this._invalidate_layout(),this.paint()}paint(){if(this.is_paused||!this.model.visible)return;Re.trace(`PlotView.paint() for ${this.model.id}`);const{document:e}=this.model;if(null!=e){const t=e.interactive_duration();t>=0&&t<this.model.lod_interval?setTimeout((()=>{e.interactive_duration()>this.model.lod_timeout&&e.interactive_stop(),this.request_paint()}),this.model.lod_timeout):e.interactive_stop()}for(const[,e]of this.renderer_views)if(null==this.range_update_timestamp||e instanceof bl&&e.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}let t=!1,n=!1;if(this._invalidate_all)t=!0,n=!0;else for(const e of this._invalidated_painters){const{level:r}=e.model;if("overlay"!=r?t=!0:n=!0,t&&n)break}this._invalidated_painters.clear(),this._invalidate_all=!1;const r=[this.frame.bbox.left,this.frame.bbox.top,this.frame.bbox.width,this.frame.bbox.height],{primary:i,overlays:o}=this.canvas_view;t&&(i.prepare(),this.canvas_view.prepare_webgl(r),this.canvas_view.clear_webgl(),this._map_hook(i.ctx,r),this._paint_empty(i.ctx,r),this._paint_outline(i.ctx,r),this._paint_levels(i.ctx,"image",r,!0),this._paint_levels(i.ctx,"underlay",r,!0),this._paint_levels(i.ctx,"glyph",r,!0),this._paint_levels(i.ctx,"guide",r,!1),this._paint_levels(i.ctx,"annotation",r,!1),i.finish()),n&&(o.prepare(),this._paint_levels(o.ctx,"overlay",r,!1),o.finish()),null==this._initial_state_info.range&&this.set_initial_range(),this._needs_paint=!1}_paint_levels(e,t,n,r){for(const i of this.computed_renderers){if(i.level!=t)continue;const o=this.renderer_views.get(i);e.save(),(r||o.needs_clip)&&(e.beginPath(),e.rect(...n),e.clip()),o.render(),e.restore(),o.has_webgl&&o.needs_webgl_blit&&(this.canvas_view.blit_webgl(e),this.canvas_view.clear_webgl())}}_map_hook(e,t){}_paint_empty(e,t){const[n,r,i,o]=[0,0,this.layout.bbox.width,this.layout.bbox.height],[a,s,l,c]=t;this.visuals.border_fill.doit&&(this.visuals.border_fill.set_value(e),e.fillRect(n,r,i,o),e.clearRect(a,s,l,c)),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(e),e.fillRect(a,s,l,c))}_paint_outline(e,t){if(this.visuals.outline_line.doit){e.save(),this.visuals.outline_line.set_value(e);let[n,r,i,o]=t;n+i==this.layout.bbox.width&&(i-=1),r+o==this.layout.bbox.height&&(o-=1),e.strokeRect(n,r,i,o),e.restore()}}to_blob(){return this.canvas_view.to_blob()}export(e,t=!0){const n=new qa("png"==e?"canvas":"svg",t),{width:r,height:i}=this.layout.bbox;n.resize(r,i);const{canvas:o}=this.canvas_view.compose();return n.ctx.drawImage(o,0,0),n}serializable_state(){const e=super.serializable_state(),{children:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["children"]),r=this.get_renderer_views().map((e=>e.serializable_state())).filter((e=>"bbox"in e));return Object.assign(Object.assign({},n),{children:[...t,...r]})}}Em.__name__="PlotView";class Cm extends wf{constructor(e){super(e)}static init_Plot(){this.prototype.default_view=Em,this.mixins([["outline_",Jr],["background_",Qr],["border_",Qr]]),this.define({toolbar:[Mn,()=>new Lg],toolbar_location:[ir,"right"],toolbar_sticky:[En,!0],plot_width:[On,600],plot_height:[On,600],frame_width:[On,null],frame_height:[On,null],title:[Tn,()=>new tu({text:""})],title_location:[ir,"above"],above:[Sn,[]],below:[Sn,[]],left:[Sn,[]],right:[Sn,[]],center:[Sn,[]],renderers:[Sn,[]],x_range:[Mn,()=>new hh],extra_x_ranges:[Tn,{}],y_range:[Mn,()=>new hh],extra_y_ranges:[Tn,{}],x_scale:[Mn,()=>new Lc],y_scale:[Mn,()=>new Lc],lod_factor:[On,10],lod_interval:[On,300],lod_threshold:[On,2e3],lod_timeout:[On,500],hidpi:[En,!0],output_backend:[cr,"canvas"],min_border:[On,5],min_border_top:[On,null],min_border_left:[On,null],min_border_bottom:[On,null],min_border_right:[On,null],inner_width:[On],inner_height:[On],outer_width:[On],outer_height:[On],match_aspect:[En,!1],aspect_scale:[On,1],reset_policy:[gr,"standard"]}),this.override({outline_line_color:"#e5e5e5",border_fill_color:"#ffffff",background_fill_color:"#ffffff"})}get width(){const e=this.properties.width.get_value();return null!=e?e:this.plot_width}set width(e){this.setv({width:e,plot_width:e})}get height(){const e=this.properties.height.get_value();return null!=e?e:this.plot_height}set height(e){this.setv({height:e,plot_height:e})}_doc_attached(){super._doc_attached(),this._push_changes([[this.properties.inner_height,null,this.inner_height],[this.properties.inner_width,null,this.inner_width]])}initialize(){super.initialize(),this.reset=new we(this,"reset");for(const e of he(this.extra_x_ranges).concat(this.x_range)){let t=e.plots;oe(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}for(const e of he(this.extra_y_ranges).concat(this.y_range)){let t=e.plots;oe(t)&&(t=t.concat(this),e.setv({plots:t},{silent:!0}))}}add_layout(e,t="center"){const n=this.properties[t].get_value();this.setv({[t]:[...n,e]})}remove_layout(e){const t=t=>{Z(t,(t=>t==e))};t(this.left),t(this.right),t(this.above),t(this.below),t(this.center)}add_renderers(...e){this.renderers=this.renderers.concat(e)}add_glyph(e,t=new Gl,n={}){const r=Object.assign(Object.assign({},n),{data_source:t,glyph:e}),i=new _l(r);return this.add_renderers(i),i}add_tools(...e){this.toolbar.tools=this.toolbar.tools.concat(e)}get panels(){return[...this.side_panels,...this.center]}get side_panels(){const{above:e,below:t,left:n,right:r}=this;return z([e,t,n,r])}}Cm.__name__="Plot",Cm.init_Plot();const Mm=new we({},"gmaps_ready");class Om extends Em{initialize(){this.pause(),super.initialize(),this._tiles_loaded=!1,this.zoom_count=0;const{zoom:e,lat:t,lng:n}=this.model.map_options;this.initial_zoom=e,this.initial_lat=t,this.initial_lng=n,("undefined"==typeof google||null==google.maps)&&(void 0===window._bokeh_gmaps_callback&&function(e){window._bokeh_gmaps_callback=()=>Mm.emit();const t=document.createElement("script");t.type="text/javascript",t.src=`path_to_url{e}&callback=_bokeh_gmaps_callback`,document.body.appendChild(t)}(atob(this.model.api_key)),Mm.connect((()=>this.request_render()))),this.unpause()}remove(){na(this.map_el),super.remove()}update_range(e){if(null==e)this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),super.update_range(null);else if(null!=e.sdx||null!=e.sdy)this.map.panBy(e.sdx||0,e.sdy||0),super.update_range(e);else if(null!=e.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),super.update_range(e);const t=e.factor<0?-1:1,n=this.map.getZoom(),r=n+t;if(r>=2){this.map.setZoom(r);const[e,t,,]=this._get_projected_bounds();t-e<0&&this.map.setZoom(n)}this.unpause()}this._set_bokeh_ranges()}_build_map(){const{maps:e}=google;this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID};const t=this.model.map_options,n={center:new e.LatLng(t.lat,t.lng),zoom:t.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[t.map_type],scaleControl:t.scale_control,tilt:t.tilt};null!=t.styles&&(n.styles=JSON.parse(t.styles)),this.map_el=jo({style:{position:"absolute"}}),this.canvas_view.add_underlay(this.map_el),this.map=new e.Map(this.map_el,n),e.event.addListener(this.map,"idle",(()=>this._set_bokeh_ranges())),e.event.addListener(this.map,"bounds_changed",(()=>this._set_bokeh_ranges())),e.event.addListenerOnce(this.map,"tilesloaded",(()=>this._render_finished())),this.connect(this.model.properties.map_options.change,(()=>this._update_options())),this.connect(this.model.map_options.properties.styles.change,(()=>this._update_styles())),this.connect(this.model.map_options.properties.lat.change,(()=>this._update_center("lat"))),this.connect(this.model.map_options.properties.lng.change,(()=>this._update_center("lng"))),this.connect(this.model.map_options.properties.zoom.change,(()=>this._update_zoom())),this.connect(this.model.map_options.properties.map_type.change,(()=>this._update_map_type())),this.connect(this.model.map_options.properties.scale_control.change,(()=>this._update_scale_control())),this.connect(this.model.map_options.properties.tilt.change,(()=>this._update_tilt()))}_render_finished(){this._tiles_loaded=!0,this.notify_finished()}has_finished(){return super.has_finished()&&!0===this._tiles_loaded}_get_latlon_bounds(){const e=this.map.getBounds(),t=e.getNorthEast(),n=e.getSouthWest();return[n.lng(),t.lng(),n.lat(),t.lat()]}_get_projected_bounds(){const[e,t,n,r]=this._get_latlon_bounds(),[i,o]=Oo(e,n),[a,s]=Oo(t,r);return[i,a,o,s]}_set_bokeh_ranges(){const[e,t,n,r]=this._get_projected_bounds();this.frame.x_range.setv({start:e,end:t}),this.frame.y_range.setv({start:n,end:r})}_update_center(e){const t=this.map.getCenter().toJSON();t[e]=this.model.map_options[e],this.map.setCenter(t),this._set_bokeh_ranges()}_update_map_type(){this.map.setOptions({mapTypeId:this.map_types[this.model.map_options.map_type]})}_update_scale_control(){this.map.setOptions({scaleControl:this.model.map_options.scale_control})}_update_tilt(){this.map.setOptions({tilt:this.model.map_options.tilt})}_update_options(){this._update_styles(),this._update_center("lat"),this._update_center("lng"),this._update_zoom(),this._update_map_type()}_update_styles(){this.map.setOptions({styles:JSON.parse(this.model.map_options.styles)})}_update_zoom(){this.map.setOptions({zoom:this.model.map_options.zoom}),this._set_bokeh_ranges()}_map_hook(e,t){if(null==this.map&&"undefined"!=typeof google&&null!=google.maps&&this._build_map(),null!=this.map_el){const[e,n,r,i]=t;this.map_el.style.top=`${n}px`,this.map_el.style.left=`${e}px`,this.map_el.style.width=`${r}px`,this.map_el.style.height=`${i}px`}}_paint_empty(e,t){const n=this.layout.bbox.width,r=this.layout.bbox.height,[i,o,a,s]=t;e.clearRect(0,0,n,r),e.beginPath(),e.moveTo(0,0),e.lineTo(0,r),e.lineTo(n,r),e.lineTo(n,0),e.lineTo(0,0),e.moveTo(i,o),e.lineTo(i+a,o),e.lineTo(i+a,o+s),e.lineTo(i,o+s),e.lineTo(i,o),e.closePath(),null!=this.model.border_fill_color&&(e.fillStyle=this.model.border_fill_color,e.fill())}}Om.__name__="GMapPlotView";class Lm extends rs{constructor(e){super(e)}static init_MapOptions(){this.define({lat:[On],lng:[On],zoom:[On,12]})}}Lm.__name__="MapOptions",Lm.init_MapOptions();class Dm extends Lm{constructor(e){super(e)}static init_GMapOptions(){this.define({map_type:[Rn,"roadmap"],scale_control:[En,!1],styles:[Rn],tilt:[Ln,45]})}}Dm.__name__="GMapOptions",Dm.init_GMapOptions();class Im extends Cm{constructor(e){super(e)}static init_GMapPlot(){this.prototype.default_view=Om,this.define({map_options:[Mn],api_key:[Rn]}),this.override({x_range:()=>new Rc,y_range:()=>new Rc})}initialize(){super.initialize(),this.use_map=!0,this.api_key||Re.error("api_key is required. See path_to_url for more information on how to obtain your own.")}}Im.__name__="GMapPlot",Im.init_GMapPlot();class Rm extends Gl{constructor(e){super(e)}get_column(e){const t=this.data[e];return null!=t?t:[]}initialize(){super.initialize(),this.setup()}load_data(e,t,n){const{adapter:r}=this;let i;switch(i=null!=r?r.execute(this,{response:e}):e,t){case"replace":this.data=i;break;case"append":{const e=this.data;for(const t of this.columns()){const r=Array.from(e[t]),o=Array.from(i[t]);i[t]=r.concat(o).slice(-n)}this.data=i;break}}}static init_WebDataSource(){this.define({mode:[Sr,"replace"],max_size:[On],adapter:[Tn,null],data_url:[Rn]})}}Rm.__name__="WebDataSource",Rm.init_WebDataSource();class Pm extends Rm{constructor(e){super(e),this.initialized=!1}destroy(){super.destroy()}setup(){this.initialized||(this.initialized=!0,new EventSource(this.data_url).onmessage=e=>{this.load_data(JSON.parse(e.data),this.mode,this.max_size)})}}Pm.__name__="ServerSentDataSource";class Nm extends Rm{constructor(e){super(e),this.initialized=!1}static init_AjaxDataSource(){this.define({polling_interval:[On],content_type:[Rn,"application/json"],http_headers:[Tn,{}],method:[Kn,"POST"],if_modified:[En,!1]})}destroy(){null!=this.interval&&clearInterval(this.interval),super.destroy()}setup(){if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval)){const e=()=>this.get_data(this.mode,this.max_size,this.if_modified);this.interval=setInterval(e,this.polling_interval)}}get_data(e,t=0,n=!1){const r=this.prepare_request();r.addEventListener("load",(()=>this.do_load(r,e,t))),r.addEventListener("error",(()=>this.do_error(r))),r.send()}prepare_request(){const e=new XMLHttpRequest;e.open(this.method,this.data_url,!0),e.withCredentials=!1,e.setRequestHeader("Content-Type",this.content_type);const t=this.http_headers;for(const[n,r]of de(t))e.setRequestHeader(n,r);return e}do_load(e,t,n){if(200===e.status){const r=JSON.parse(e.responseText);this.load_data(r,t,n)}}do_error(e){Re.error(`Failed to fetch JSON from ${this.data_url} with code ${e.status}`)}}function zm(e){return null!=e?e:NaN}Nm.__name__="AjaxDataSource",Nm.init_AjaxDataSource();class Fm extends Ll{constructor(e){super(e)}static init_GeoJSONDataSource(){this.define({geojson:[Tn]}),this.internal({data:[Tn,{}]})}initialize(){super.initialize(),this._update_data()}connect_signals(){super.connect_signals(),this.connect(this.properties.geojson.change,(()=>this._update_data()))}_update_data(){this.data=this.geojson_to_column_data()}_get_new_list_array(e){return U(0,e).map((e=>[]))}_get_new_nan_array(e){return U(0,e).map((e=>NaN))}_add_properties(e,t,n,r){var i;const o=null!==(i=e.properties)&&void 0!==i?i:{};for(const[e,i]of de(o))t.hasOwnProperty(e)||(t[e]=this._get_new_nan_array(r)),t[e][n]=zm(i)}_add_geometry(e,t,n){function r(e,t){return e.concat([[NaN,NaN,NaN]]).concat(t)}switch(e.type){case"Point":{const[r,i,o]=e.coordinates;t.x[n]=r,t.y[n]=i,t.z[n]=zm(o);break}case"LineString":{const{coordinates:r}=e;for(let e=0;e<r.length;e++){const[i,o,a]=r[e];t.xs[n][e]=i,t.ys[n][e]=o,t.zs[n][e]=zm(a)}break}case"Polygon":{e.coordinates.length>1&&Re.warn("Bokeh does not support Polygons with holes in, only exterior ring used.");const r=e.coordinates[0];for(let e=0;e<r.length;e++){const[i,o,a]=r[e];t.xs[n][e]=i,t.ys[n][e]=o,t.zs[n][e]=zm(a)}break}case"MultiPoint":Re.warn("MultiPoint not supported in Bokeh");break;case"MultiLineString":{const i=e.coordinates.reduce(r);for(let e=0;e<i.length;e++){const[r,o,a]=i[e];t.xs[n][e]=r,t.ys[n][e]=o,t.zs[n][e]=zm(a)}break}case"MultiPolygon":{const i=[];for(const t of e.coordinates)t.length>1&&Re.warn("Bokeh does not support Polygons with holes in, only exterior ring used."),i.push(t[0]);const o=i.reduce(r);for(let e=0;e<o.length;e++){const[r,i,a]=o[e];t.xs[n][e]=r,t.ys[n][e]=i,t.zs[n][e]=zm(a)}break}default:throw new Error(`Invalid GeoJSON geometry type: ${e.type}`)}}geojson_to_column_data(){const e=JSON.parse(this.geojson);let t;switch(e.type){case"GeometryCollection":if(null==e.geometries)throw new Error("No geometries found in GeometryCollection");if(0===e.geometries.length)throw new Error("geojson.geometries must have one or more items");t=e.geometries;break;case"FeatureCollection":if(null==e.features)throw new Error("No features found in FeaturesCollection");if(0==e.features.length)throw new Error("geojson.features must have one or more items");t=e.features;break;default:throw new Error("Bokeh only supports type GeometryCollection and FeatureCollection at top level")}let n=0;for(const e of t){const t="Feature"===e.type?e.geometry:e;"GeometryCollection"==t.type?n+=t.geometries.length:n+=1}const r={x:this._get_new_nan_array(n),y:this._get_new_nan_array(n),z:this._get_new_nan_array(n),xs:this._get_new_list_array(n),ys:this._get_new_list_array(n),zs:this._get_new_list_array(n)};let i=0;for(const e of t){const t="Feature"==e.type?e.geometry:e;if("GeometryCollection"==t.type)for(const o of t.geometries)this._add_geometry(o,r,i),"Feature"===e.type&&this._add_properties(e,r,i,n),i+=1;else this._add_geometry(t,r,i),"Feature"===e.type&&this._add_properties(e,r,i,n),i+=1}return r}}Fm.__name__="GeoJSONDataSource",Fm.init_GeoJSONDataSource();class Bm extends rc{constructor(e){super(e),this.min_interval=0,this.max_interval=0}static init_FixedTicker(){this.define({ticks:[Sn,[]],minor_ticks:[Sn,[]]})}get_ticks_no_defaults(e,t,n,r){return{major:this.ticks,minor:this.minor_ticks}}get_interval(e,t,n){return 0}}Bm.__name__="FixedTicker",Bm.init_FixedTicker();class jm extends rs{constructor(e){super(e)}static init_TileSource(){this.define({url:[Rn,""],tile_size:[On,256],max_zoom:[On,30],min_zoom:[On,0],extra_url_vars:[Tn,{}],attribution:[Rn,""],x_origin_offset:[On],y_origin_offset:[On],initial_resolution:[On]})}initialize(){super.initialize(),this.tiles=new Map,this._normalize_case()}connect_signals(){super.connect_signals(),this.connect(this.change,(()=>this._clear_cache()))}string_lookup_replace(e,t){let n=e;for(const[e,r]of de(t))n=n.replace(`{${e}}`,r);return n}_normalize_case(){const e=this.url.replace("{x}","{X}").replace("{y}","{Y}").replace("{z}","{Z}").replace("{q}","{Q}").replace("{xmin}","{XMIN}").replace("{ymin}","{YMIN}").replace("{xmax}","{XMAX}").replace("{ymax}","{YMAX}");this.url=e}_clear_cache(){this.tiles=new Map}tile_xyz_to_key(e,t,n){return`${e}:${t}:${n}`}key_to_tile_xyz(e){const[t,n,r]=e.split(":").map((e=>parseInt(e)));return[t,n,r]}sort_tiles_from_center(e,t){const[n,r,i,o]=t,a=(i-n)/2+n,s=(o-r)/2+r;e.sort((function(e,t){return Math.sqrt((a-e[0])**2+(s-e[1])**2)-Math.sqrt((a-t[0])**2+(s-t[1])**2)}))}get_image_url(e,t,n){return this.string_lookup_replace(this.url,this.extra_url_vars).replace("{X}",e.toString()).replace("{Y}",t.toString()).replace("{Z}",n.toString())}}function Um(e,t){return Lo(e,t)}jm.__name__="TileSource",jm.init_TileSource();class Vm extends jm{constructor(e){super(e)}static init_MercatorTileSource(){this.define({snap_to_zoom:[En,!1],wrap_around:[En,!0]}),this.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097})}initialize(){super.initialize(),this._resolutions=U(this.min_zoom,this.max_zoom+1).map((e=>this.get_resolution(e)))}_computed_initial_resolution(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size}is_valid_tile(e,t,n){return!(!this.wrap_around&&(e<0||e>=2**n)||t<0||t>=2**n)}parent_by_tile_xyz(e,t,n){const r=this.tile_xyz_to_quadkey(e,t,n),i=r.substring(0,r.length-1);return this.quadkey_to_tile_xyz(i)}get_resolution(e){return this._computed_initial_resolution()/2**e}get_resolution_by_extent(e,t,n){return[(e[2]-e[0])/n,(e[3]-e[1])/t]}get_level_by_extent(e,t,n){const r=(e[2]-e[0])/n,i=(e[3]-e[1])/t,o=Math.max(r,i);let a=0;for(const e of this._resolutions){if(o>e){if(0==a)return 0;if(a>0)return a-1}a+=1}return a-1}get_closest_level_by_extent(e,t,n){const r=(e[2]-e[0])/n,i=(e[3]-e[1])/t,o=Math.max(r,i),a=this._resolutions.reduce((function(e,t){return Math.abs(t-o)<Math.abs(e-o)?t:e}));return this._resolutions.indexOf(a)}snap_to_zoom_level(e,t,n,r){const[i,o,a,s]=e,l=this._resolutions[r];let c=n*l,u=t*l;if(!this.snap_to_zoom){const e=(a-i)/c,t=(s-o)/u;e>t?(c=a-i,u*=e):(c*=t,u=s-o)}const h=(c-(a-i))/2,d=(u-(s-o))/2;return[i-h,o-d,a+h,s+d]}tms_to_wmts(e,t,n){return[e,2**n-1-t,n]}wmts_to_tms(e,t,n){return[e,2**n-1-t,n]}pixels_to_meters(e,t,n){const r=this.get_resolution(n);return[e*r-this.x_origin_offset,t*r-this.y_origin_offset]}meters_to_pixels(e,t,n){const r=this.get_resolution(n);return[(e+this.x_origin_offset)/r,(t+this.y_origin_offset)/r]}pixels_to_tile(e,t){let n=Math.ceil(e/this.tile_size);return n=0===n?n:n-1,[n,Math.max(Math.ceil(t/this.tile_size)-1,0)]}pixels_to_raster(e,t,n){return[e,(this.tile_size<<n)-t]}meters_to_tile(e,t,n){const[r,i]=this.meters_to_pixels(e,t,n);return this.pixels_to_tile(r,i)}get_tile_meter_bounds(e,t,n){const[r,i]=this.pixels_to_meters(e*this.tile_size,t*this.tile_size,n),[o,a]=this.pixels_to_meters((e+1)*this.tile_size,(t+1)*this.tile_size,n);return[r,i,o,a]}get_tile_geographic_bounds(e,t,n){const r=this.get_tile_meter_bounds(e,t,n),[i,o,a,s]=function(e){const[t,n,r,i]=e,[o,a]=Um(t,n),[s,l]=Um(r,i);return[o,a,s,l]}(r);return[i,o,a,s]}get_tiles_by_extent(e,t,n=1){const[r,i,o,a]=e;let[s,l]=this.meters_to_tile(r,i,t),[c,u]=this.meters_to_tile(o,a,t);s-=n,l-=n,c+=n,u+=n;const h=[];for(let e=u;e>=l;e--)for(let n=s;n<=c;n++)this.is_valid_tile(n,e,t)&&h.push([n,e,t,this.get_tile_meter_bounds(n,e,t)]);return this.sort_tiles_from_center(h,[s,l,c,u]),h}quadkey_to_tile_xyz(e){let t=0,n=0;const r=e.length;for(let i=r;i>0;i--){const o=1<<i-1;switch(e.charAt(r-i)){case"0":continue;case"1":t|=o;break;case"2":n|=o;break;case"3":t|=o,n|=o;break;default:throw new TypeError(`Invalid Quadkey: ${e}`)}}return[t,n,r]}tile_xyz_to_quadkey(e,t,n){let r="";for(let i=n;i>0;i--){const n=1<<i-1;let o=0;0!=(e&n)&&(o+=1),0!=(t&n)&&(o+=2),r+=o.toString()}return r}children_by_tile_xyz(e,t,n){const r=this.tile_xyz_to_quadkey(e,t,n),i=[];for(let e=0;e<=3;e++){const[t,n,o]=this.quadkey_to_tile_xyz(r+e.toString()),a=this.get_tile_meter_bounds(t,n,o);i.push([t,n,o,a])}return i}get_closest_parent_by_tile_xyz(e,t,n){const r=this.calculate_world_x_by_tile_xyz(e,t,n);[e,t,n]=this.normalize_xyz(e,t,n);let i=this.tile_xyz_to_quadkey(e,t,n);for(;i.length>0;)if(i=i.substring(0,i.length-1),[e,t,n]=this.quadkey_to_tile_xyz(i),[e,t,n]=this.denormalize_xyz(e,t,n,r),this.tiles.has(this.tile_xyz_to_key(e,t,n)))return[e,t,n];return[0,0,0]}normalize_xyz(e,t,n){if(this.wrap_around){const r=2**n;return[(e%r+r)%r,t,n]}return[e,t,n]}denormalize_xyz(e,t,n,r){return[e+r*2**n,t,n]}denormalize_meters(e,t,n,r){return[e+2*r*Math.PI*6378137,t]}calculate_world_x_by_tile_xyz(e,t,n){return Math.floor(e/2**n)}}Vm.__name__="MercatorTileSource",Vm.init_MercatorTileSource();class qm extends Vm{constructor(e){super(e)}static init_BBoxTileSource(){this.define({use_latlon:[En,!1]})}get_image_url(e,t,n){const r=this.string_lookup_replace(this.url,this.extra_url_vars);let i,o,a,s;return this.use_latlon?[o,s,i,a]=this.get_tile_geographic_bounds(e,t,n):[o,s,i,a]=this.get_tile_meter_bounds(e,t,n),r.replace("{XMIN}",o.toString()).replace("{YMIN}",s.toString()).replace("{XMAX}",i.toString()).replace("{YMAX}",a.toString())}}qm.__name__="BBoxTileSource",qm.init_BBoxTileSource();class Hm extends Vm{constructor(e){super(e)}get_image_url(e,t,n){const r=this.string_lookup_replace(this.url,this.extra_url_vars),[i,o,a]=this.tms_to_wmts(e,t,n),s=this.tile_xyz_to_quadkey(i,o,a);return r.replace("{Q}",s)}}Hm.__name__="QUADKEYTileSource";class $m extends Vm{constructor(e){super(e)}get_image_url(e,t,n){const r=this.string_lookup_replace(this.url,this.extra_url_vars),[i,o,a]=this.tms_to_wmts(e,t,n);return r.replace("{X}",i.toString()).replace("{Y}",o.toString()).replace("{Z}",a.toString())}}$m.__name__="WMTSTileSource";class Wm extends ms{initialize(){this._tiles=[],super.initialize()}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.request_render())),this.connect(this.model.tile_source.change,(()=>this.request_render()))}styles(){return[...super.styles(),"\n.bk-root .bk-tile-attribution a {\n color: black;\n}\n"]}get_extent(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]}get map_plot(){return this.plot_model}get map_canvas(){return this.layer.ctx}get map_frame(){return this.plot_view.frame}get x_range(){return this.map_plot.x_range}get y_range(){return this.map_plot.y_range}_set_data(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0}_update_attribution(){null!=this.attribution_el&&ra(this.attribution_el);const{attribution:e}=this.model.tile_source;if(re(e)&&e.length>0){const{layout:t,frame:n}=this.plot_view,r=t.bbox.width-n.bbox.right,i=t.bbox.height-n.bbox.bottom,o=n.bbox.width;this.attribution_el=jo({class:"bk-tile-attribution",style:{position:"absolute",right:`${r}px`,bottom:`${i}px`,"max-width":o-4+"px",padding:"2px","background-color":"rgba(255,255,255,0.5)","font-size":"9px","line-height":"1.05","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),this.plot_view.canvas_view.add_event(this.attribution_el),this.attribution_el.innerHTML=e,this.attribution_el.title=this.attribution_el.textContent.replace(/\s*\n\s*/g," ")}}_map_data(){this.initial_extent=this.get_extent();const e=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width),t=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame.bbox.height,this.map_frame.bbox.width,e);this.x_range.start=t[0],this.y_range.start=t[1],this.x_range.end=t[2],this.y_range.end=t[3],this.x_range instanceof Rc&&(this.x_range.reset_start=t[0],this.x_range.reset_end=t[2]),this.y_range instanceof Rc&&(this.y_range.reset_start=t[1],this.y_range.reset_end=t[3]),this._update_attribution()}_create_tile(e,t,n,r,i=!1){const[o,a,s]=this.model.tile_source.normalize_xyz(e,t,n),l={img:void 0,tile_coords:[e,t,n],normalized_coords:[o,a,s],quadkey:this.model.tile_source.tile_xyz_to_quadkey(e,t,n),cache_key:this.model.tile_source.tile_xyz_to_key(e,t,n),bounds:r,loaded:!1,finished:!1,x_coord:r[0],y_coord:r[3]},c=this.model.tile_source.get_image_url(o,a,s);new Bd(c,{loaded:e=>{Object.assign(l,{img:e,loaded:!0}),i?(l.finished=!0,this.notify_finished()):this.request_render()},failed(){l.finished=!0}}),this.model.tile_source.tiles.set(l.cache_key,l),this._tiles.push(l)}_enforce_aspect_ratio(){if(this._last_height!==this.map_frame.bbox.height||this._last_width!==this.map_frame.bbox.width){const e=this.get_extent(),t=this.model.tile_source.get_level_by_extent(e,this.map_frame.bbox.height,this.map_frame.bbox.width),n=this.model.tile_source.snap_to_zoom_level(e,this.map_frame.bbox.height,this.map_frame.bbox.width,t);this.x_range.setv({start:n[0],end:n[2]}),this.y_range.setv({start:n[1],end:n[3]}),this.extent=n,this._last_height=this.map_frame.bbox.height,this._last_width=this.map_frame.bbox.width}}has_finished(){if(!super.has_finished())return!1;if(0===this._tiles.length)return!1;for(const e of this._tiles)if(!e.finished)return!1;return!0}_render(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()}_draw_tile(e){const t=this.model.tile_source.tiles.get(e);if(null!=t&&t.loaded){const[[e],[n]]=this.coordinates.map_to_screen([t.bounds[0]],[t.bounds[3]]),[[r],[i]]=this.coordinates.map_to_screen([t.bounds[2]],[t.bounds[1]]),o=r-e,a=i-n,s=e,l=n,c=this.map_canvas.getImageSmoothingEnabled();this.map_canvas.setImageSmoothingEnabled(this.model.smoothing),this.map_canvas.drawImage(t.img,s,l,o,a),this.map_canvas.setImageSmoothingEnabled(c),t.finished=!0}}_set_rect(){const e=this.plot_model.properties.outline_line_width.value(),t=this.map_frame.bbox.left+e/2,n=this.map_frame.bbox.top+e/2,r=this.map_frame.bbox.width-e,i=this.map_frame.bbox.height-e;this.map_canvas.rect(t,n,r,i),this.map_canvas.clip()}_render_tiles(e){this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha;for(const t of e)this._draw_tile(t);this.map_canvas.restore()}_prefetch_tiles(){const{tile_source:e}=this.model,t=this.get_extent(),n=this.map_frame.bbox.height,r=this.map_frame.bbox.width,i=this.model.tile_source.get_level_by_extent(t,n,r),o=this.model.tile_source.get_tiles_by_extent(t,i);for(let t=0,n=Math.min(10,o.length);t<n;t++){const[n,r,i]=o[t],a=this.model.tile_source.children_by_tile_xyz(n,r,i);for(const t of a){const[n,r,i,o]=t;e.tiles.has(e.tile_xyz_to_key(n,r,i))||this._create_tile(n,r,i,o,!0)}}}_fetch_tiles(e){for(const t of e){const[e,n,r,i]=t;this._create_tile(e,n,r,i)}}_update(){const{tile_source:e}=this.model,{min_zoom:t}=e,{max_zoom:n}=e;let r=this.get_extent();const i=this.extent[2]-this.extent[0]<r[2]-r[0],o=this.map_frame.bbox.height,a=this.map_frame.bbox.width;let s=e.get_level_by_extent(r,o,a),l=!1;s<t?(r=this.extent,s=t,l=!0):s>n&&(r=this.extent,s=n,l=!0),l&&(this.x_range.setv({x_range:{start:r[0],end:r[2]}}),this.y_range.setv({start:r[1],end:r[3]})),this.extent=r;const c=e.get_tiles_by_extent(r,s),u=[],h=[],d=[],f=[];for(const t of c){const[n,r,o]=t,a=e.tile_xyz_to_key(n,r,o),s=e.tiles.get(a);if(null!=s&&s.loaded)h.push(a);else if(this.model.render_parents){const[t,a,s]=e.get_closest_parent_by_tile_xyz(n,r,o),l=e.tile_xyz_to_key(t,a,s),c=e.tiles.get(l);if(null!=c&&c.loaded&&!F(d,l)&&d.push(l),i){const t=e.children_by_tile_xyz(n,r,o);for(const[n,r,i]of t){const t=e.tile_xyz_to_key(n,r,i);e.tiles.has(t)&&f.push(t)}}}null==s&&u.push(t)}this._render_tiles(d),this._render_tiles(f),this._render_tiles(h),null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout((()=>this._fetch_tiles(u)),65)}}Wm.__name__="TileRendererView";class Gm extends vs{constructor(e){super(e),this._selection_manager=new El({source:new Gl})}static init_TileRenderer(){this.prototype.default_view=Wm,this.define({alpha:[On,1],smoothing:[En,!0],tile_source:[Mn,()=>new $m],render_parents:[En,!0]})}get_selection_manager(){return this._selection_manager}}Gm.__name__="TileRenderer",Gm.init_TileRenderer();class Ym extends Vm{constructor(e){super(e)}get_image_url(e,t,n){return this.string_lookup_replace(this.url,this.extra_url_vars).replace("{X}",e.toString()).replace("{Y}",t.toString()).replace("{Z}",n.toString())}}Ym.__name__="TMSTileSource";class Xm extends rs{constructor(e){super(e)}static init_Texture(){this.define({repetition:[kr,"repeat"]})}onload(e){e()}}Xm.__name__="Texture",Xm.init_Texture();class Zm extends Xm{constructor(e){super(e)}static init_CanvasTexture(){this.define({code:[Rn]})}get func(){const e=hi(this.code);return new Function("ctx","color","scale","weight",e)}get_pattern(e,t,n){return r=>{const i=document.createElement("canvas");i.width=t,i.height=t;const o=i.getContext("2d");return this.func.call(this,o,e,t,n),r.createPattern(i,this.repetition)}}}Zm.__name__="CanvasTexture",Zm.init_CanvasTexture();class Km extends Xm{constructor(e){super(e)}static init_ImageURLTexture(){this.define({url:[Rn]})}initialize(){super.initialize(),this._loader=new Bd(this.url)}get_pattern(e,t,n){return e=>this._loader.finished?e.createPattern(this._loader.image,this.repetition):null}onload(e){this._loader.promise.then((()=>e()))}}Km.__name__="ImageURLTexture",Km.init_ImageURLTexture();class Jm extends bg{css_classes(){return super.css_classes().concat("bk-toolbar-button-custom-action")}}Jm.__name__="CustomActionButtonView";class Qm extends _g{doit(){null!=this.model.callback&&this.model.callback.execute(this.model)}}Qm.__name__="CustomActionView";class ev extends xg{constructor(e){super(e),this.tool_name="Custom Action",this.button_view=Jm}static init_CustomAction(){this.prototype.default_view=Qm,this.define({action_tooltip:[Rn,"Perform a Custom Action"],callback:[Tn],icon:[Rn]})}get tooltip(){return this.action_tooltip}}ev.__name__="CustomAction",ev.init_CustomAction();class tv extends _g{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state_changed,(()=>this.model.disabled=!this.plot_view.can_redo()))}doit(){this.plot_view.redo()}}tv.__name__="RedoToolView";class nv extends xg{constructor(e){super(e),this.tool_name="Redo",this.icon="bk-tool-icon-redo"}static init_RedoTool(){this.prototype.default_view=tv,this.override({disabled:!0}),this.register_alias("redo",(()=>new nv))}}nv.__name__="RedoTool",nv.init_RedoTool();class rv extends _g{doit(){this.plot_view.reset()}}rv.__name__="ResetToolView";class iv extends xg{constructor(e){super(e),this.tool_name="Reset",this.icon="bk-tool-icon-reset"}static init_ResetTool(){this.prototype.default_view=rv,this.register_alias("reset",(()=>new iv))}}iv.__name__="ResetTool",iv.init_ResetTool();class ov extends _g{async copy(){const e=await this.plot_view.to_blob(),t=new ClipboardItem({[e.type]:e});await navigator.clipboard.write([t])}async save(e){const t=await this.plot_view.to_blob(),n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=e,n.target="_blank",n.dispatchEvent(new MouseEvent("click"))}doit(e="save"){switch(e){case"save":this.save("bokeh_plot");break;case"copy":this.copy()}}}ov.__name__="SaveToolView";class av extends xg{constructor(e){super(e),this.tool_name="Save",this.icon="bk-tool-icon-save"}static init_SaveTool(){this.prototype.default_view=ov,this.register_alias("save",(()=>new av))}get menu(){return[{icon:"bk-tool-icon-copy-to-clipboard",tooltip:"Copy image to clipboard",if:()=>"undefined"!=typeof ClipboardItem,handler:()=>{this.do.emit("copy")}}]}}av.__name__="SaveTool",av.init_SaveTool();class sv extends _g{connect_signals(){super.connect_signals(),this.connect(this.plot_view.state_changed,(()=>this.model.disabled=!this.plot_view.can_undo()))}doit(){this.plot_view.undo()}}sv.__name__="UndoToolView";class lv extends xg{constructor(e){super(e),this.tool_name="Undo",this.icon="bk-tool-icon-undo"}static init_UndoTool(){this.prototype.default_view=sv,this.override({disabled:!0}),this.register_alias("undo",(()=>new lv))}}function cv(e,t,n){const[r,i]=[e.start,e.end],o=null!=n?n:(i+r)/2;return[r-(r-o)*t,i-(i-o)*t]}function uv(e,[t,n]){const r=new Map;for(const[i,o]of e){const[e,a]=o.r_invert(t,n);r.set(i,{start:e,end:a})}return r}function hv(e,t,n=!0,r=!0,i){t=m(t,-.9,.9);const o=n?t:0,[a,s]=cv(e.bbox.h_range,o,null!=i?i.x:void 0),l=uv(e.x_scales,[a,s]),c=r?t:0,[u,h]=cv(e.bbox.v_range,c,null!=i?i.y:void 0);return{xrs:l,yrs:uv(e.y_scales,[u,h]),factor:t}}lv.__name__="UndoTool",lv.init_UndoTool();class dv extends _g{doit(){const e=this.plot_view.frame,t=this.model.dimensions,n="width"==t||"both"==t,r="height"==t||"both"==t,i=hv(e,this.model.sign*this.model.factor,n,r);this.plot_view.push_state("zoom_out",{range:i}),this.plot_view.update_range(i,!1,!0),this.model.document&&this.model.document.interactive_start(this.plot_model)}}dv.__name__="ZoomBaseToolView";class fv extends xg{constructor(e){super(e)}static init_ZoomBaseTool(){this.prototype.default_view=dv,this.define({factor:[In,.1],dimensions:[Gn,"both"]})}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}fv.__name__="ZoomBaseTool",fv.init_ZoomBaseTool();class pv extends fv{constructor(e){super(e),this.sign=1,this.tool_name="Zoom In",this.icon="bk-tool-icon-zoom-in"}static init_ZoomInTool(){this.prototype.default_view=dv,this.register_alias("zoom_in",(()=>new pv({dimensions:"both"}))),this.register_alias("xzoom_in",(()=>new pv({dimensions:"width"}))),this.register_alias("yzoom_in",(()=>new pv({dimensions:"height"})))}}pv.__name__="ZoomInTool",pv.init_ZoomInTool();class gv extends fv{constructor(e){super(e),this.sign=-1,this.tool_name="Zoom Out",this.icon="bk-tool-icon-zoom-out"}static init_ZoomOutTool(){this.prototype.default_view=dv,this.register_alias("zoom_out",(()=>new gv({dimensions:"both"}))),this.register_alias("xzoom_out",(()=>new gv({dimensions:"width"}))),this.register_alias("yzoom_out",(()=>new gv({dimensions:"height"})))}}gv.__name__="ZoomOutTool",gv.init_ZoomOutTool();class mv extends vg{constructor(){super(...arguments),this._mouse_in_frame=!0}_select_mode(e){const{shiftKey:t,ctrlKey:n}=e;return t||n?t&&!n?"append":!t&&n?"intersect":t&&n?"subtract":void u():"replace"}_move_enter(e){this._mouse_in_frame=!0}_move_exit(e){this._mouse_in_frame=!1}_map_drag(e,t,n){if(!this.plot_view.frame.bbox.contains(e,t))return null;const r=this.plot_view.renderer_views.get(n);return[r.coordinates.x_scale.invert(e),r.coordinates.y_scale.invert(t)]}_delete_selected(e){const t=e.data_source,n=t.selected.indices;n.sort();for(const e of t.columns()){const r=t.get_array(e);for(let e=0;e<n.length;e++){const t=n[e];r.splice(t-e,1)}}this._emit_cds_changes(t)}_pop_glyphs(e,t){const n=e.columns();if(t&&n.length)for(const r of n){let n=e.get_array(r);const i=n.length-t+1;i<1||(oe(n)||(n=Array.from(n),e.data[r]=n),n.splice(0,i))}}_emit_cds_changes(e,t=!0,n=!0,r=!0){n&&e.selection_manager.clear(),t&&e.change.emit(),r&&(e.data=e.data,e.properties.data.change.emit())}_drag_points(e,t,n="both"){if(null==this._basepoint)return;const[r,i]=this._basepoint;for(const o of t){const t=this._map_drag(r,i,o),a=this._map_drag(e.sx,e.sy,o);if(null==a||null==t)continue;const[s,l]=a,[c,u]=t,[h,d]=[s-c,l-u],f=o.glyph,p=o.data_source,[g,m]=[f.x.field,f.y.field];for(const e of p.selected.indices)!g||"width"!=n&&"both"!=n||(p.data[g][e]+=h),!m||"height"!=n&&"both"!=n||(p.data[m][e]+=d);p.change.emit()}this._basepoint=[e.sx,e.sy]}_pad_empty_columns(e,t){for(const n of e.columns())F(t,n)||e.get_array(n).push(this.model.empty_value)}_select_event(e,t,n){const r=this.plot_view.frame,{sx:i,sy:o}=e;if(!r.bbox.contains(i,o))return[];const a={type:"point",sx:i,sy:o},s=[];for(const e of n){const n=e.get_selection_manager(),r=e.data_source,i=[this.plot_view.renderer_views.get(e)];n.select(i,a,!0,t)&&s.push(e),r.properties.selected.change.emit()}return s}}mv.__name__="EditToolView";class vv extends yg{constructor(e){super(e)}static init_EditTool(){this.define({custom_icon:[Rn],custom_tooltip:[Rn],empty_value:[Tn],renderers:[Sn,[]]})}get tooltip(){return this.custom_tooltip||this.tool_name}get computed_icon(){return this.custom_icon||this.icon}}vv.__name__="EditTool",vv.init_EditTool();class yv extends mv{_tap(e){null==this._draw_basepoint&&null==this._basepoint&&this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===ba.Backspace?this._delete_selected(t):e.keyCode==ba.Esc&&t.data_source.selection_manager.clear()}_set_extent([e,t],[n,r],i,o=!1){const a=this.model.renderers[0],s=this.plot_view.renderer_views.get(a),l=a.glyph,c=a.data_source,[u,h]=s.coordinates.x_scale.r_invert(e,t),[d,f]=s.coordinates.y_scale.r_invert(n,r),[p,g]=[(u+h)/2,(d+f)/2],[m,v]=[h-u,f-d],[y,b]=[l.x.field,l.y.field],[_,x]=[l.width.field,l.height.field];if(i)this._pop_glyphs(c,this.model.num_objects),y&&c.get_array(y).push(p),b&&c.get_array(b).push(g),_&&c.get_array(_).push(m),x&&c.get_array(x).push(v),this._pad_empty_columns(c,[y,b,_,x]);else{const e=c.data[y].length-1;y&&(c.data[y][e]=p),b&&(c.data[b][e]=g),_&&(c.data[_][e]=m),x&&(c.data[x][e]=v)}this._emit_cds_changes(c,!0,!1,o)}_update_box(e,t=!1,n=!1){if(null==this._draw_basepoint)return;const r=[e.sx,e.sy],i=this.plot_view.frame,o=this.model.dimensions,a=this.model._get_dim_limits(this._draw_basepoint,r,i,o);if(null!=a){const[e,r]=a;this._set_extent(e,r,t,n)}}_doubletap(e){this.model.active&&(null!=this._draw_basepoint?(this._update_box(e,!1,!0),this._draw_basepoint=null):(this._draw_basepoint=[e.sx,e.sy],this._select_event(e,"append",this.model.renderers),this._update_box(e,!0,!1)))}_move(e){this._update_box(e,!1,!1)}_pan_start(e){if(e.shiftKey){if(null!=this._draw_basepoint)return;this._draw_basepoint=[e.sx,e.sy],this._update_box(e,!0,!1)}else{if(null!=this._basepoint)return;this._select_event(e,"append",this.model.renderers),this._basepoint=[e.sx,e.sy]}}_pan(e,t=!1,n=!1){if(e.shiftKey){if(null==this._draw_basepoint)return;this._update_box(e,t,n)}else{if(null==this._basepoint)return;this._drag_points(e,this.model.renderers)}}_pan_end(e){if(this._pan(e,!1,!0),e.shiftKey)this._draw_basepoint=null;else{this._basepoint=null;for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0)}}}yv.__name__="BoxEditToolView";class bv extends vv{constructor(e){super(e),this.tool_name="Box Edit Tool",this.icon="bk-tool-icon-box-edit",this.event_type=["tap","pan","move"],this.default_order=1}static init_BoxEditTool(){this.prototype.default_view=yv,this.define({dimensions:[Gn,"both"],num_objects:[Ln,0]})}}bv.__name__="BoxEditTool",bv.init_BoxEditTool();class _v extends mv{_draw(e,t,n=!1){if(!this.model.active)return;const r=this.model.renderers[0],i=this._map_drag(e.sx,e.sy,r);if(null==i)return;const[o,a]=i,s=r.data_source,l=r.glyph,[c,u]=[l.xs.field,l.ys.field];if("new"==t)this._pop_glyphs(s,this.model.num_objects),c&&s.get_array(c).push([o]),u&&s.get_array(u).push([a]),this._pad_empty_columns(s,[c,u]);else if("add"==t){if(c){const e=s.data[c].length-1;let t=s.get_array(c)[e];oe(t)||(t=Array.from(t),s.data[c][e]=t),t.push(o)}if(u){const e=s.data[u].length-1;let t=s.get_array(u)[e];oe(t)||(t=Array.from(t),s.data[u][e]=t),t.push(a)}}this._emit_cds_changes(s,!0,!0,n)}_pan_start(e){this._draw(e,"new")}_pan(e){this._draw(e,"add")}_pan_end(e){this._draw(e,"add",!0)}_tap(e){this._select_event(e,this._select_mode(e),this.model.renderers)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===ba.Esc?t.data_source.selection_manager.clear():e.keyCode===ba.Backspace&&this._delete_selected(t)}}_v.__name__="FreehandDrawToolView";class xv extends vv{constructor(e){super(e),this.tool_name="Freehand Draw Tool",this.icon="bk-tool-icon-freehand-draw",this.event_type=["pan","tap"],this.default_order=3}static init_FreehandDrawTool(){this.prototype.default_view=_v,this.define({num_objects:[Ln,0]})}}xv.__name__="FreehandDrawTool",xv.init_FreehandDrawTool();class wv extends mv{_tap(e){if(this._select_event(e,this._select_mode(e),this.model.renderers).length||!this.model.add)return;const t=this.model.renderers[0],n=this._map_drag(e.sx,e.sy,t);if(null==n)return;const r=t.glyph,i=t.data_source,[o,a]=[r.x.field,r.y.field],[s,l]=n;this._pop_glyphs(i,this.model.num_objects),o&&i.get_array(o).push(s),a&&i.get_array(a).push(l),this._pad_empty_columns(i,[o,a]),i.change.emit(),i.data=i.data,i.properties.data.change.emit()}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===ba.Backspace?this._delete_selected(t):e.keyCode==ba.Esc&&t.data_source.selection_manager.clear()}_pan_start(e){this.model.drag&&(this._select_event(e,"append",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){this.model.drag&&null!=this._basepoint&&this._drag_points(e,this.model.renderers)}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source,!1,!0,!0);this._basepoint=null}}}wv.__name__="PointDrawToolView";class Av extends vv{constructor(e){super(e),this.tool_name="Point Draw Tool",this.icon="bk-tool-icon-point-draw",this.event_type=["tap","pan","move"],this.default_order=2}static init_PointDrawTool(){this.prototype.default_view=wv,this.define({add:[En,!0],drag:[En,!0],num_objects:[Ln,0]})}}Av.__name__="PointDrawTool",Av.init_PointDrawTool();class kv extends mv{_set_vertices(e,t){const n=this.model.vertex_renderer.glyph,r=this.model.vertex_renderer.data_source,[i,o]=[n.x.field,n.y.field];i&&(oe(e)?r.data[i]=e:n.x={value:e}),o&&(oe(t)?r.data[o]=t:n.y={value:t}),this._emit_cds_changes(r,!0,!0,!1)}_hide_vertices(){this._set_vertices([],[])}_snap_to_vertex(e,t,n){if(this.model.vertex_renderer){const r=this._select_event(e,"replace",[this.model.vertex_renderer]),i=this.model.vertex_renderer.data_source,o=this.model.vertex_renderer.glyph,[a,s]=[o.x.field,o.y.field];if(r.length){const e=i.selected.indices[0];a&&(t=i.data[a][e]),s&&(n=i.data[s][e]),i.selection_manager.clear()}}return[t,n]}}kv.__name__="PolyToolView";class Tv extends vv{constructor(e){super(e)}static init_PolyTool(){this.prototype.default_view=kv,this.define({vertex_renderer:[Mn]})}}Tv.__name__="PolyTool",Tv.init_PolyTool();class Sv extends kv{constructor(){super(...arguments),this._drawing=!1,this._initialized=!1}_tap(e){this._drawing?this._draw(e,"add",!0):this._select_event(e,this._select_mode(e),this.model.renderers)}_draw(e,t,n=!1){const r=this.model.renderers[0],i=this._map_drag(e.sx,e.sy,r);if(this._initialized||this.activate(),null==i)return;const[o,a]=this._snap_to_vertex(e,...i),s=r.data_source,l=r.glyph,[c,u]=[l.xs.field,l.ys.field];if("new"==t)this._pop_glyphs(s,this.model.num_objects),c&&s.get_array(c).push([o,o]),u&&s.get_array(u).push([a,a]),this._pad_empty_columns(s,[c,u]);else if("edit"==t){if(c){const e=s.data[c][s.data[c].length-1];e[e.length-1]=o}if(u){const e=s.data[u][s.data[u].length-1];e[e.length-1]=a}}else if("add"==t){if(c){const e=s.data[c].length-1;let t=s.get_array(c)[e];const n=t[t.length-1];t[t.length-1]=o,oe(t)||(t=Array.from(t),s.data[c][e]=t),t.push(n)}if(u){const e=s.data[u].length-1;let t=s.get_array(u)[e];const n=t[t.length-1];t[t.length-1]=a,oe(t)||(t=Array.from(t),s.data[u][e]=t),t.push(n)}}this._emit_cds_changes(s,!0,!1,n)}_show_vertices(){if(!this.model.active)return;const e=[],t=[];for(let n=0;n<this.model.renderers.length;n++){const r=this.model.renderers[n],i=r.data_source,o=r.glyph,[a,s]=[o.xs.field,o.ys.field];if(a)for(const t of i.get_array(a))Array.prototype.push.apply(e,t);if(s)for(const e of i.get_array(s))Array.prototype.push.apply(t,e);this._drawing&&n==this.model.renderers.length-1&&(e.splice(e.length-1,1),t.splice(t.length-1,1))}this._set_vertices(e,t)}_doubletap(e){this.model.active&&(this._drawing?(this._drawing=!1,this._draw(e,"edit",!0)):(this._drawing=!0,this._draw(e,"new",!0)))}_move(e){this._drawing&&this._draw(e,"edit")}_remove(){const e=this.model.renderers[0],t=e.data_source,n=e.glyph,[r,i]=[n.xs.field,n.ys.field];if(r){const e=t.data[r].length-1,n=t.get_array(r)[e];n.splice(n.length-1,1)}if(i){const e=t.data[i].length-1,n=t.get_array(i)[e];n.splice(n.length-1,1)}this._emit_cds_changes(t)}_keyup(e){if(this.model.active&&this._mouse_in_frame)for(const t of this.model.renderers)e.keyCode===ba.Backspace?this._delete_selected(t):e.keyCode==ba.Esc&&(this._drawing&&(this._remove(),this._drawing=!1),t.data_source.selection_manager.clear())}_pan_start(e){this.model.drag&&(this._select_event(e,"append",this.model.renderers),this._basepoint=[e.sx,e.sy])}_pan(e){if(null==this._basepoint||!this.model.drag)return;const[t,n]=this._basepoint;for(const r of this.model.renderers){const i=this._map_drag(t,n,r),o=this._map_drag(e.sx,e.sy,r);if(null==o||null==i)continue;const a=r.data_source,s=r.glyph,[l,c]=[s.xs.field,s.ys.field];if(!l&&!c)continue;const[u,h]=o,[d,f]=i,[p,g]=[u-d,h-f];for(const e of a.selected.indices){let t,n,r;l&&(n=a.data[l][e]),c?(r=a.data[c][e],t=r.length):t=n.length;for(let e=0;e<t;e++)n&&(n[e]+=p),r&&(r[e]+=g)}a.change.emit()}this._basepoint=[e.sx,e.sy]}_pan_end(e){if(this.model.drag){this._pan(e);for(const e of this.model.renderers)this._emit_cds_changes(e.data_source);this._basepoint=null}}activate(){if(this.model.vertex_renderer&&this.model.active){if(this._show_vertices(),!this._initialized)for(const e of this.model.renderers){const t=e.data_source;t.connect(t.properties.data.change,(()=>this._show_vertices()))}this._initialized=!0}}deactivate(){this._drawing&&(this._remove(),this._drawing=!1),this.model.vertex_renderer&&this._hide_vertices()}}Sv.__name__="PolyDrawToolView";class Ev extends Tv{constructor(e){super(e),this.tool_name="Polygon Draw Tool",this.icon="bk-tool-icon-poly-draw",this.event_type=["pan","tap","move"],this.default_order=3}static init_PolyDrawTool(){this.prototype.default_view=Sv,this.define({drag:[En,!0],num_objects:[Ln,0]})}}Ev.__name__="PolyDrawTool",Ev.init_PolyDrawTool();class Cv extends kv{constructor(){super(...arguments),this._drawing=!1}_doubletap(e){if(!this.model.active)return;const t=this._map_drag(e.sx,e.sy,this.model.vertex_renderer);if(null==t)return;const[n,r]=t,i=this._select_event(e,"replace",[this.model.vertex_renderer]),o=this.model.vertex_renderer.data_source,a=this.model.vertex_renderer.glyph,[s,l]=[a.x.field,a.y.field];if(i.length&&null!=this._selected_renderer){const e=o.selected.indices[0];this._drawing?(this._drawing=!1,o.selection_manager.clear()):(o.selected.indices=[e+1],s&&o.get_array(s).splice(e+1,0,n),l&&o.get_array(l).splice(e+1,0,r),this._drawing=!0),o.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}else this._show_vertices(e)}_show_vertices(e){if(!this.model.active)return;const t=this._select_event(e,"replace",this.model.renderers);if(!t.length)return this._set_vertices([],[]),this._selected_renderer=null,void(this._drawing=!1);const n=t[0],r=n.glyph,i=n.data_source,o=i.selected.indices[0],[a,s]=[r.xs.field,r.ys.field];let l,c;a?(l=i.data[a][o],oe(l)||(i.data[a][o]=l=Array.from(l))):l=r.xs.value,s?(c=i.data[s][o],oe(c)||(i.data[s][o]=c=Array.from(c))):c=r.ys.value,this._selected_renderer=n,this._set_vertices(l,c)}_move(e){if(this._drawing&&null!=this._selected_renderer){const t=this.model.vertex_renderer,n=t.data_source,r=t.glyph,i=this._map_drag(e.sx,e.sy,t);if(null==i)return;let[o,a]=i;const s=n.selected.indices;[o,a]=this._snap_to_vertex(e,o,a),n.selected.indices=s;const[l,c]=[r.x.field,r.y.field],u=s[0];l&&(n.data[l][u]=o),c&&(n.data[c][u]=a),n.change.emit(),this._selected_renderer.data_source.change.emit()}}_tap(e){const t=this.model.vertex_renderer,n=this._map_drag(e.sx,e.sy,t);if(null==n)return;if(this._drawing&&this._selected_renderer){let[r,i]=n;const o=t.data_source,a=t.glyph,[s,l]=[a.x.field,a.y.field],c=o.selected.indices;[r,i]=this._snap_to_vertex(e,r,i);const u=c[0];if(o.selected.indices=[u+1],s){const e=o.get_array(s),t=e[u];e[u]=r,e.splice(u+1,0,t)}if(l){const e=o.get_array(l),t=e[u];e[u]=i,e.splice(u+1,0,t)}return o.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}const r=this._select_mode(e);this._select_event(e,r,[t]),this._select_event(e,r,this.model.renderers)}_remove_vertex(){if(!this._drawing||!this._selected_renderer)return;const e=this.model.vertex_renderer,t=e.data_source,n=e.glyph,r=t.selected.indices[0],[i,o]=[n.x.field,n.y.field];i&&t.get_array(i).splice(r,1),o&&t.get_array(o).splice(r,1),t.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}_pan_start(e){this._select_event(e,"append",[this.model.vertex_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}_keyup(e){if(!this.model.active||!this._mouse_in_frame)return;let t;t=this._selected_renderer?[this.model.vertex_renderer]:this.model.renderers;for(const n of t)e.keyCode===ba.Backspace?(this._delete_selected(n),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source)):e.keyCode==ba.Esc&&(this._drawing?(this._remove_vertex(),this._drawing=!1):this._selected_renderer&&this._hide_vertices(),n.data_source.selection_manager.clear())}deactivate(){this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._hide_vertices())}}Cv.__name__="PolyEditToolView";class Mv extends Tv{constructor(e){super(e),this.tool_name="Poly Edit Tool",this.icon="bk-tool-icon-poly-edit",this.event_type=["tap","pan","move"],this.default_order=4}static init_PolyEditTool(){this.prototype.default_view=Cv}}function Ov(e,t,n){if(null==e)return[];let r="auto"==e?t:e;return n.length>0&&(r=r.filter((e=>F(n,e.name)))),r}Mv.__name__="PolyEditTool",Mv.init_PolyEditTool();class Lv extends vg{connect_signals(){super.connect_signals(),this.model.clear.connect((()=>this._clear()))}get computed_renderers(){return Ov(this.model.renderers,this.plot_model.renderers,this.model.names)}_computed_renderers_by_data_source(){var e;const t=new Map;for(const n of this.computed_renderers){let r;if(n instanceof _l)r=n.data_source;else{if(!(n instanceof Sl))continue;r=n.node_renderer.data_source}const i=null!==(e=t.get(r))&&void 0!==e?e:[];t.set(r,[...i,n])}return t}_select_mode(e){const{shiftKey:t,ctrlKey:n}=e;return t||n?t&&!n?"append":!t&&n?"intersect":t&&n?"subtract":void u():this.model.mode}_keyup(e){e.keyCode==ba.Esc&&this._clear()}_clear(){for(const e of this.computed_renderers)e.get_selection_manager().clear();this.plot_view.request_render()}_select(e,t,n){const r=this._computed_renderers_by_data_source();for(const[,i]of r){const r=i[0].get_selection_manager(),o=[];for(const e of i){const t=this.plot_view.renderer_views.get(e);null!=t&&o.push(t)}r.select(o,e,t,n)}null!=this.model.callback&&this._emit_callback(e),this._emit_selection_event(e,t)}_emit_selection_event(e,t=!0){const{x_scale:n,y_scale:r}=this.plot_view.frame;let i;switch(e.type){case"point":{const{sx:t,sy:o}=e,a=n.invert(t),s=r.invert(o);i=Object.assign(Object.assign({},e),{x:a,y:s});break}case"span":{const{sx:t,sy:o}=e,a=n.invert(t),s=r.invert(o);i=Object.assign(Object.assign({},e),{x:a,y:s});break}case"rect":{const{sx0:t,sx1:o,sy0:a,sy1:s}=e,[l,c]=n.r_invert(t,o),[u,h]=r.r_invert(a,s);i=Object.assign(Object.assign({},e),{x0:l,y0:u,x1:c,y1:h});break}case"poly":{const{sx:t,sy:o}=e,a=n.v_invert(t),s=r.v_invert(o);i=Object.assign(Object.assign({},e),{x:a,y:s});break}}this.plot_model.trigger_event(new Vg(i,t))}}Lv.__name__="SelectToolView";class Dv extends yg{constructor(e){super(e)}initialize(){super.initialize(),this.clear=new we(this,"clear")}static init_SelectTool(){this.define({renderers:[Tn,"auto"],names:[Sn,[]],mode:[Tn,"replace"]})}get menu(){return[{icon:"bk-tool-icon-replace-mode",tooltip:"Replace the current selection",active:()=>"replace"==this.mode,handler:()=>{this.mode="replace",this.active=!0}},{icon:"bk-tool-icon-append-mode",tooltip:"Append to the current selection (Shift)",active:()=>"append"==this.mode,handler:()=>{this.mode="append",this.active=!0}},{icon:"bk-tool-icon-intersect-mode",tooltip:"Intersect with the current selection (Ctrl)",active:()=>"intersect"==this.mode,handler:()=>{this.mode="intersect",this.active=!0}},{icon:"bk-tool-icon-subtract-mode",tooltip:"Subtract from the current selection (Shift+Ctrl)",active:()=>"subtract"==this.mode,handler:()=>{this.mode="subtract",this.active=!0}},null,{icon:"bk-tool-icon-clear-selection",tooltip:"Clear the current selection (Esc)",handler:()=>{this.clear.emit()}}]}}Dv.__name__="SelectTool",Dv.init_SelectTool();class Iv extends Lv{_compute_limits(e){const t=this.plot_view.frame,n=this.model.dimensions;let r=this._base_point;if("center"==this.model.origin){const[t,n]=r,[i,o]=e;r=[t-(i-t),n-(o-n)]}return this.model._get_dim_limits(r,e,t,n)}_pan_start(e){const{sx:t,sy:n}=e;this._base_point=[t,n]}_pan(e){const{sx:t,sy:n}=e,r=[t,n],[i,o]=this._compute_limits(r);this.model.overlay.update({left:i[0],right:i[1],top:o[0],bottom:o[1]}),this.model.select_every_mousemove&&this._do_select(i,o,!1,this._select_mode(e))}_pan_end(e){const{sx:t,sy:n}=e,r=[t,n],[i,o]=this._compute_limits(r);this._do_select(i,o,!0,this._select_mode(e)),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null,this.plot_view.push_state("box_select",{selection:this.plot_view.get_selection()})}_do_select([e,t],[n,r],i,o="replace"){const a={type:"rect",sx0:e,sx1:t,sy0:n,sy1:r};this._select(a,i,o)}}Iv.__name__="BoxSelectToolView";const Rv=()=>new tc({level:"overlay",top_units:"screen",left_units:"screen",bottom_units:"screen",right_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]});class Pv extends Dv{constructor(e){super(e),this.tool_name="Box Select",this.icon="bk-tool-icon-box-select",this.event_type="pan",this.default_order=30}static init_BoxSelectTool(){this.prototype.default_view=Iv,this.define({dimensions:[Gn,"both"],select_every_mousemove:[En,!1],overlay:[Mn,Rv],origin:[qn,"corner"]}),this.register_alias("box_select",(()=>new Pv)),this.register_alias("xbox_select",(()=>new Pv({dimensions:"width"}))),this.register_alias("ybox_select",(()=>new Pv({dimensions:"height"})))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}Pv.__name__="BoxSelectTool",Pv.init_BoxSelectTool();class Nv extends vg{_match_aspect(e,t,n){const r=n.bbox.aspect,i=n.bbox.h_range.end,o=n.bbox.h_range.start,a=n.bbox.v_range.end,s=n.bbox.v_range.start;let l=Math.abs(e[0]-t[0]),c=Math.abs(e[1]-t[1]);const u=0==c?0:l/c,[h]=u>=r?[1,u/r]:[r/u,1];let d,f,p,g;return e[0]<=t[0]?(d=e[0],f=e[0]+l*h,f>i&&(f=i)):(f=e[0],d=e[0]-l*h,d<o&&(d=o)),l=Math.abs(f-d),e[1]<=t[1]?(g=e[1],p=e[1]+l/r,p>a&&(p=a)):(p=e[1],g=e[1]-l/r,g<s&&(g=s)),c=Math.abs(p-g),e[0]<=t[0]?f=e[0]+r*c:d=e[0]-r*c,[[d,f],[g,p]]}_compute_limits(e){const t=this.plot_view.frame,n=this.model.dimensions;let r,i,o=this._base_point;if("center"==this.model.origin){const[t,n]=o,[r,i]=e;o=[t-(r-t),n-(i-n)]}return this.model.match_aspect&&"both"==n?[r,i]=this._match_aspect(o,e,t):[r,i]=this.model._get_dim_limits(o,e,t,n),[r,i]}_pan_start(e){this._base_point=[e.sx,e.sy]}_pan(e){const t=[e.sx,e.sy],[n,r]=this._compute_limits(t);this.model.overlay.update({left:n[0],right:n[1],top:r[0],bottom:r[1]})}_pan_end(e){const t=[e.sx,e.sy],[n,r]=this._compute_limits(t);this._update(n,r),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null}_update([e,t],[n,r]){if(Math.abs(t-e)<=5||Math.abs(r-n)<=5)return;const{x_scales:i,y_scales:o}=this.plot_view.frame,a=new Map;for(const[n,r]of i){const[i,o]=r.r_invert(e,t);a.set(n,{start:i,end:o})}const s=new Map;for(const[e,t]of o){const[i,o]=t.r_invert(n,r);s.set(e,{start:i,end:o})}const l={xrs:a,yrs:s};this.plot_view.push_state("box_zoom",{range:l}),this.plot_view.update_range(l)}}Nv.__name__="BoxZoomToolView";const zv=()=>new tc({level:"overlay",top_units:"screen",left_units:"screen",bottom_units:"screen",right_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]});class Fv extends yg{constructor(e){super(e),this.tool_name="Box Zoom",this.icon="bk-tool-icon-box-zoom",this.event_type="pan",this.default_order=20}static init_BoxZoomTool(){this.prototype.default_view=Nv,this.define({dimensions:[Gn,"both"],overlay:[Mn,zv],match_aspect:[En,!1],origin:[qn,"corner"]}),this.register_alias("box_zoom",(()=>new Fv({dimensions:"both"}))),this.register_alias("xbox_zoom",(()=>new Fv({dimensions:"width"}))),this.register_alias("ybox_zoom",(()=>new Fv({dimensions:"height"})))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}Fv.__name__="BoxZoomTool",Fv.init_BoxZoomTool();class Bv extends Lv{initialize(){super.initialize(),this.data={sx:[],sy:[]}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._active_change()))}_active_change(){this.model.active||this._clear_data()}_keyup(e){e.keyCode==ba.Enter&&this._clear_data()}_doubletap(e){this._do_select(this.data.sx,this.data.sy,!0,this._select_mode(e)),this.plot_view.push_state("poly_select",{selection:this.plot_view.get_selection()}),this._clear_data()}_clear_data(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})}_tap(e){const{sx:t,sy:n}=e;this.plot_view.frame.bbox.contains(t,n)&&(this.data.sx.push(t),this.data.sy.push(n),this.model.overlay.update({xs:N(this.data.sx),ys:N(this.data.sy)}))}_do_select(e,t,n,r){const i={type:"poly",sx:e,sy:t};this._select(i,n,r)}}Bv.__name__="PolySelectToolView";const jv=()=>new Xc({level:"overlay",xs_units:"screen",ys_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]});class Uv extends Dv{constructor(e){super(e),this.tool_name="Poly Select",this.icon="bk-tool-icon-polygon-select",this.event_type="tap",this.default_order=11}static init_PolySelectTool(){this.prototype.default_view=Bv,this.define({overlay:[Mn,jv]}),this.register_alias("poly_select",(()=>new Uv))}}Uv.__name__="PolySelectTool",Uv.init_PolySelectTool();class Vv extends Lv{initialize(){super.initialize(),this.data=null}connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._active_change()))}_active_change(){this.model.active||this._clear_overlay()}_keyup(e){e.keyCode==ba.Enter&&this._clear_overlay()}_pan_start(e){const{sx:t,sy:n}=e;this.data={sx:[t],sy:[n]}}_pan(e){const{sx:t,sy:n}=e,[r,i]=this.plot_view.frame.bbox.clip(t,n);this.data.sx.push(r),this.data.sy.push(i),this.model.overlay.update({xs:this.data.sx,ys:this.data.sy}),this.model.select_every_mousemove&&this._do_select(this.data.sx,this.data.sy,!1,this._select_mode(e))}_pan_end(e){this._clear_overlay(),this._do_select(this.data.sx,this.data.sy,!0,this._select_mode(e)),this.plot_view.push_state("lasso_select",{selection:this.plot_view.get_selection()})}_clear_overlay(){this.model.overlay.update({xs:[],ys:[]})}_do_select(e,t,n,r){const i={type:"poly",sx:e,sy:t};this._select(i,n,r)}}Vv.__name__="LassoSelectToolView";class qv extends Dv{constructor(e){super(e),this.tool_name="Lasso Select",this.icon="bk-tool-icon-lasso-select",this.event_type="pan",this.default_order=12}static init_LassoSelectTool(){this.prototype.default_view=Vv,this.define({select_every_mousemove:[En,!0],overlay:[Mn,jv]}),this.register_alias("lasso_select",(()=>new qv))}}qv.__name__="LassoSelectTool",qv.init_LassoSelectTool();class Hv extends mv{_set_intersection(e,t){const n=this.model.intersection_renderer.glyph,r=this.model.intersection_renderer.data_source,[i,o]=[n.x.field,n.y.field];i&&(oe(e)?r.data[i]=e:n.x={value:e}),o&&(oe(t)?r.data[o]=t:n.y={value:t}),this._emit_cds_changes(r,!0,!0,!1)}_hide_intersections(){this._set_intersection([],[])}}Hv.__name__="LineToolView";class $v extends vv{constructor(e){super(e)}static init_LineTool(){this.prototype.default_view=Hv,this.define({intersection_renderer:[Mn]})}}$v.__name__="LineTool",$v.init_LineTool();class Wv extends Hv{constructor(){super(...arguments),this._drawing=!1}_doubletap(e){if(!this.model.active)return;const t=this.model.renderers;for(const n of t)1==this._select_event(e,"replace",[n]).length&&(this._selected_renderer=n);this._show_intersections(),this._update_line_cds()}_show_intersections(){if(!this.model.active)return;if(null==this._selected_renderer)return;if(!this.model.renderers.length)return this._set_intersection([],[]),this._selected_renderer=null,void(this._drawing=!1);const e=this._selected_renderer.data_source,t=this._selected_renderer.glyph,[n,r]=[t.x.field,t.y.field],i=e.get_array(n),o=e.get_array(r);this._set_intersection(i,o)}_tap(e){const t=this.model.intersection_renderer;if(null==this._map_drag(e.sx,e.sy,t))return;if(this._drawing&&this._selected_renderer){const n=this._select_mode(e);if(0==this._select_event(e,n,[t]).length)return}const n=this._select_mode(e);this._select_event(e,n,[t]),this._select_event(e,n,this.model.renderers)}_update_line_cds(){if(null==this._selected_renderer)return;const e=this.model.intersection_renderer.glyph,t=this.model.intersection_renderer.data_source,[n,r]=[e.x.field,e.y.field];if(n&&r){const e=t.data[n],i=t.data[r];this._selected_renderer.data_source.data[n]=e,this._selected_renderer.data_source.data[r]=i}this._emit_cds_changes(this._selected_renderer.data_source,!0,!0,!1)}_pan_start(e){this._select_event(e,"append",[this.model.intersection_renderer]),this._basepoint=[e.sx,e.sy]}_pan(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer],this.model.dimensions),this._selected_renderer&&this._selected_renderer.data_source.change.emit())}_pan_end(e){null!=this._basepoint&&(this._drag_points(e,[this.model.intersection_renderer]),this._emit_cds_changes(this.model.intersection_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)}activate(){this._drawing=!0}deactivate(){this._selected_renderer&&(this._drawing&&(this._drawing=!1),this._hide_intersections())}}Wv.__name__="LineEditToolView";class Gv extends $v{constructor(e){super(e),this.tool_name="Line Edit Tool",this.icon="bk-tool-icon-line-edit",this.event_type=["tap","pan","move"],this.default_order=4}static init_LineEditTool(){this.prototype.default_view=Wv,this.define({dimensions:[Gn,"both"]})}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}function Yv(e,t,n){const r=new Map;for(const[i,o]of e){const[e,a]=o.r_invert(t,n);r.set(i,{start:e,end:a})}return r}Gv.__name__="LineEditTool",Gv.init_LineEditTool();class Xv extends vg{_pan_start(e){this.last_dx=0,this.last_dy=0;const{sx:t,sy:n}=e,r=this.plot_view.frame.bbox;if(!r.contains(t,n)){const e=r.h_range,i=r.v_range;(t<e.start||t>e.end)&&(this.v_axis_only=!0),(n<i.start||n>i.end)&&(this.h_axis_only=!0)}null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}_pan(e){this._update(e.deltaX,e.deltaY),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}_pan_end(e){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.push_state("pan",{range:this.pan_info})}_update(e,t){const n=this.plot_view.frame,r=e-this.last_dx,i=t-this.last_dy,o=n.bbox.h_range,a=o.start-r,s=o.end-r,l=n.bbox.v_range,c=l.start-i,u=l.end-i,h=this.model.dimensions;let d,f,p,g,m,v;"width"!=h&&"both"!=h||this.v_axis_only?(d=o.start,f=o.end,p=0):(d=a,f=s,p=-r),"height"!=h&&"both"!=h||this.h_axis_only?(g=l.start,m=l.end,v=0):(g=c,m=u,v=-i),this.last_dx=e,this.last_dy=t;const{x_scales:y,y_scales:b}=n,_=Yv(y,d,f),x=Yv(b,g,m);this.pan_info={xrs:_,yrs:x,sdx:p,sdy:v},this.plot_view.update_range(this.pan_info,!0)}}Xv.__name__="PanToolView";class Zv extends yg{constructor(e){super(e),this.tool_name="Pan",this.event_type="pan",this.default_order=10}static init_PanTool(){this.prototype.default_view=Xv,this.define({dimensions:[Gn,"both"]}),this.register_alias("pan",(()=>new Zv({dimensions:"both"}))),this.register_alias("xpan",(()=>new Zv({dimensions:"width"}))),this.register_alias("ypan",(()=>new Zv({dimensions:"height"})))}get tooltip(){return this._get_dim_tooltip("Pan",this.dimensions)}get icon(){switch(this.dimensions){case"both":return"bk-tool-icon-pan";case"width":return"bk-tool-icon-xpan";case"height":return"bk-tool-icon-ypan"}}}function Kv(e){switch(e){case 1:return 2;case 2:return 1;case 4:return 5;case 5:return 4;default:return e}}function Jv(e,t,n,r){if(null==t)return!1;const i=n.compute(t);return Math.abs(e-i)<r}function Qv(e,t,n,r,i){let o=!0;if(null!=i.left&&null!=i.right){const t=n.invert(e);(t<i.left||t>i.right)&&(o=!1)}if(null!=i.bottom&&null!=i.top){const e=r.invert(t);(e<i.bottom||e>i.top)&&(o=!1)}return o}function ey(e,t,n){let r=0;return e>=n.start&&e<=n.end&&(r+=1),t>=n.start&&t<=n.end&&(r+=1),r}function ty(e,t,n,r){const i=t.compute(e),o=t.invert(i+n);return o>=r.start&&o<=r.end?o:e}function ny(e,t,n){return e>t.start?(t.end=e,n):(t.end=t.start,t.start=e,Kv(n))}function ry(e,t,n){return e<t.end?(t.start=e,n):(t.start=t.end,t.end=e,Kv(n))}function iy(e,t,n,r){const[i,o]=t.r_compute(e.start,e.end),[a,s]=t.r_invert(i+n,o+n),l=ey(e.start,e.end,r);ey(a,s,r)>=l&&(e.start=a,e.end=s)}Zv.__name__="PanTool",Zv.init_PanTool();class oy extends vg{initialize(){super.initialize(),this.side=0,this.model.update_overlay_from_ranges()}connect_signals(){super.connect_signals(),null!=this.model.x_range&&this.connect(this.model.x_range.change,(()=>this.model.update_overlay_from_ranges())),null!=this.model.y_range&&this.connect(this.model.y_range.change,(()=>this.model.update_overlay_from_ranges()))}_pan_start(e){this.last_dx=0,this.last_dy=0;const t=this.model.x_range,n=this.model.y_range,{frame:r}=this.plot_view,i=r.x_scale,o=r.y_scale,a=this.model.overlay,{left:s,right:l,top:c,bottom:u}=a,h=this.model.overlay.properties.line_width.value()+2.5;null!=t&&this.model.x_interaction&&(Jv(e.sx,s,i,h)?this.side=1:Jv(e.sx,l,i,h)?this.side=2:Qv(e.sx,e.sy,i,o,a)&&(this.side=3)),null!=n&&this.model.y_interaction&&(0==this.side&&Jv(e.sy,u,o,h)&&(this.side=4),0==this.side&&Jv(e.sy,c,o,h)?this.side=5:Qv(e.sx,e.sy,i,o,this.model.overlay)&&(3==this.side?this.side=7:this.side=6))}_pan(e){const t=this.plot_view.frame,n=e.deltaX-this.last_dx,r=e.deltaY-this.last_dy,i=this.model.x_range,o=this.model.y_range,a=t.x_scale,s=t.y_scale;if(null!=i)if(3==this.side||7==this.side)iy(i,a,n,t.x_range);else if(1==this.side){const e=ty(i.start,a,n,t.x_range);this.side=ry(e,i,this.side)}else if(2==this.side){const e=ty(i.end,a,n,t.x_range);this.side=ny(e,i,this.side)}if(null!=o)if(6==this.side||7==this.side)iy(o,s,r,t.y_range);else if(4==this.side){const e=ty(o.start,s,r,t.y_range);this.side=ry(e,o,this.side)}else if(5==this.side){const e=ty(o.end,s,r,t.y_range);this.side=ny(e,o,this.side)}this.last_dx=e.deltaX,this.last_dy=e.deltaY}_pan_end(e){this.side=0}}oy.__name__="RangeToolView";const ay=()=>new tc({level:"overlay",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:.5,line_dash:[2,2]});class sy extends yg{constructor(e){super(e),this.tool_name="Range Tool",this.icon="bk-tool-icon-range",this.event_type="pan",this.default_order=1}static init_RangeTool(){this.prototype.default_view=oy,this.define({x_range:[Mn,null],x_interaction:[En,!0],y_range:[Mn,null],y_interaction:[En,!0],overlay:[Mn,ay]})}initialize(){super.initialize(),this.overlay.in_cursor="grab",this.overlay.ew_cursor=null!=this.x_range&&this.x_interaction?"ew-resize":null,this.overlay.ns_cursor=null!=this.y_range&&this.y_interaction?"ns-resize":null}update_overlay_from_ranges(){null==this.x_range&&null==this.y_range&&(this.overlay.left=null,this.overlay.right=null,this.overlay.bottom=null,this.overlay.top=null,Re.warn("RangeTool not configured with any Ranges.")),null==this.x_range?(this.overlay.left=null,this.overlay.right=null):(this.overlay.left=this.x_range.start,this.overlay.right=this.x_range.end),null==this.y_range?(this.overlay.bottom=null,this.overlay.top=null):(this.overlay.bottom=this.y_range.start,this.overlay.top=this.y_range.end)}}sy.__name__="RangeTool",sy.init_RangeTool();class ly extends Lv{_tap(e){const{sx:t,sy:n}=e,r={type:"point",sx:t,sy:n};this._select(r,!0,this._select_mode(e))}_select(e,t,n){const r=this.model.callback;if("select"==this.model.behavior){const i=this._computed_renderers_by_data_source();for(const[,o]of i){const i=o[0].get_selection_manager(),a=o.map((e=>this.plot_view.renderer_views.get(e)));if(i.select(a,e,t,n)&&null!=r){const t=a[0].coordinates.x_scale.invert(e.sx),n=a[0].coordinates.y_scale.invert(e.sy),o={geometries:Object.assign(Object.assign({},e),{x:t,y:n}),source:i.source};r.execute(this.model,o)}}this._emit_selection_event(e),this.plot_view.push_state("tap",{selection:this.plot_view.get_selection()})}else for(const t of this.computed_renderers){const n=this.plot_view.renderer_views.get(t),i=t.get_selection_manager();if(i.inspect(n,e)&&null!=r){const t=n.coordinates.x_scale.invert(e.sx),o=n.coordinates.y_scale.invert(e.sy),a={geometries:Object.assign(Object.assign({},e),{x:t,y:o}),source:i.source};r.execute(this.model,a)}}}}ly.__name__="TapToolView";class cy extends Dv{constructor(e){super(e),this.tool_name="Tap",this.icon="bk-tool-icon-tap-select",this.event_type="tap",this.default_order=10}static init_TapTool(){this.prototype.default_view=ly,this.define({behavior:[xr,"select"],callback:[Tn]}),this.register_alias("click",(()=>new cy({behavior:"inspect"}))),this.register_alias("tap",(()=>new cy))}}cy.__name__="TapTool",cy.init_TapTool();class uy extends vg{_scroll(e){let t=this.model.speed*e.delta;t>.9?t=.9:t<-.9&&(t=-.9),this._update_ranges(t)}_update_ranges(e){const{frame:t}=this.plot_view,n=t.bbox.h_range,r=t.bbox.v_range,[i,o]=[n.start,n.end],[a,s]=[r.start,r.end];let l,c,u,h;switch(this.model.dimension){case"height":{const t=Math.abs(s-a);l=i,c=o,u=a-t*e,h=s-t*e;break}case"width":{const t=Math.abs(o-i);l=i-t*e,c=o-t*e,u=a,h=s;break}default:throw new Error("this shouldn't have happened")}const{x_scales:d,y_scales:f}=t,p={xrs:Yv(d,l,c),yrs:Yv(f,u,h),factor:e};this.plot_view.push_state("wheel_pan",{range:p}),this.plot_view.update_range(p,!1,!0),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}}uy.__name__="WheelPanToolView";class hy extends yg{constructor(e){super(e),this.tool_name="Wheel Pan",this.icon="bk-tool-icon-wheel-pan",this.event_type="scroll",this.default_order=12}static init_WheelPanTool(){this.prototype.default_view=uy,this.define({dimension:[Wn,"width"]}),this.internal({speed:[On,.001]}),this.register_alias("xwheel_pan",(()=>new hy({dimension:"width"}))),this.register_alias("ywheel_pan",(()=>new hy({dimension:"height"})))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}hy.__name__="WheelPanTool",hy.init_WheelPanTool();class dy extends vg{_pinch(e){const{sx:t,sy:n,scale:r,ctrlKey:i,shiftKey:o}=e;let a;a=r>=1?20*(r-1):-20/r,this._scroll({type:"wheel",sx:t,sy:n,delta:a,ctrlKey:i,shiftKey:o})}_scroll(e){const{frame:t}=this.plot_view,n=t.bbox.h_range,r=t.bbox.v_range,{sx:i,sy:o}=e,a=this.model.dimensions,s=("width"==a||"both"==a)&&n.start<i&&i<n.end,l=("height"==a||"both"==a)&&r.start<o&&o<r.end;if(!(s&&l||this.model.zoom_on_axis))return;const c=hv(t,this.model.speed*e.delta,s,l,{x:i,y:o});this.plot_view.push_state("wheel_zoom",{range:c}),this.plot_view.update_range(c,!1,!0,this.model.maintain_focus),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}}dy.__name__="WheelZoomToolView";class fy extends yg{constructor(e){super(e),this.tool_name="Wheel Zoom",this.icon="bk-tool-icon-wheel-zoom",this.event_type=Ai?"pinch":"scroll",this.default_order=10}static init_WheelZoomTool(){this.prototype.default_view=dy,this.define({dimensions:[Gn,"both"],maintain_focus:[En,!0],zoom_on_axis:[En,!0],speed:[On,1/600]}),this.register_alias("wheel_zoom",(()=>new fy({dimensions:"both"}))),this.register_alias("xwheel_zoom",(()=>new fy({dimensions:"width"}))),this.register_alias("ywheel_zoom",(()=>new fy({dimensions:"height"})))}get tooltip(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}fy.__name__="WheelZoomTool",fy.init_WheelZoomTool();class py extends gg{_move(e){if(!this.model.active)return;const{sx:t,sy:n}=e;this.plot_view.frame.bbox.contains(t,n)?this._update_spans(t,n):this._update_spans(null,null)}_move_exit(e){this._update_spans(null,null)}_update_spans(e,t){const n=this.model.dimensions;"width"!=n&&"both"!=n||(this.model.spans.width.location=t),"height"!=n&&"both"!=n||(this.model.spans.height.location=e)}}py.__name__="CrosshairToolView";class gy extends mg{constructor(e){super(e),this.tool_name="Crosshair",this.icon="bk-tool-icon-crosshair"}static init_CrosshairTool(){this.prototype.default_view=py,this.define({dimensions:[Gn,"both"],line_color:[Cn,"black"],line_width:[On,1],line_alpha:[On,1]}),this.internal({spans:[Tn]}),this.register_alias("crosshair",(()=>new gy))}get tooltip(){return this._get_dim_tooltip("Crosshair",this.dimensions)}get synthetic_renderers(){return he(this.spans)}initialize(){super.initialize(),this.spans={width:new Qc({for_hover:!0,dimension:"width",location_units:"screen",level:"overlay",line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new Qc({for_hover:!0,dimension:"height",location_units:"screen",level:"overlay",line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}}}gy.__name__="CrosshairTool",gy.init_CrosshairTool();class my extends rs{constructor(e){super(e)}static init_CustomJSHover(){this.define({args:[Tn,{}],code:[Rn,""]})}get values(){return he(this.args)}_make_code(e,t,n,r){return new Function(...ue(this.args),e,t,n,hi(r))}format(e,t,n){return this._make_code("value","format","special_vars",this.code)(...this.values,e,t,n)}}function vy(e,t,n,r,i,o){const a={x:i[e],y:o[e]},s={x:i[e+1],y:o[e+1]};let l,c;if("span"==t.type)"h"==t.direction?(l=Math.abs(a.x-n),c=Math.abs(s.x-n)):(l=Math.abs(a.y-r),c=Math.abs(s.y-r));else{const e={x:n,y:r};l=Bs(a,e),c=Bs(s,e)}return l<c?[[a.x,a.y],e]:[[s.x,s.y],e+1]}function yy(e,t,n){return[[e[n],t[n]],n]}my.__name__="CustomJSHover",my.init_CustomJSHover();class by extends gg{initialize(){super.initialize(),this._ttmodels=null,this._ttviews=new Map;const{tooltips:e}=this.model;oe(e)&&(this._template_el=this._create_template(e))}remove(){gl(this._ttviews),super.remove()}connect_signals(){super.connect_signals();for(const e of this.computed_renderers)e instanceof _l?this.connect(e.data_source.inspect,this._update):e instanceof Sl&&(this.connect(e.node_renderer.data_source.inspect,this._update),this.connect(e.edge_renderer.data_source.inspect,this._update));this.connect(this.model.properties.renderers.change,(()=>this._computed_renderers=this._ttmodels=null)),this.connect(this.model.properties.names.change,(()=>this._computed_renderers=this._ttmodels=null)),this.connect(this.model.properties.tooltips.change,(()=>this._ttmodels=null))}_compute_ttmodels(){const e=new Map,t=this.model.tooltips;if(null!=t)for(const n of this.computed_renderers){const r=new du({custom:re(t)||ie(t),attachment:this.model.attachment,show_arrow:this.model.show_arrow});n instanceof _l?e.set(n,r):n instanceof Sl&&(e.set(n.node_renderer,r),e.set(n.edge_renderer,r))}return(async()=>{const t=await pl(this._ttviews,[...e.values()],{parent:this.plot_view});for(const e of t)e.render()})(),e}get computed_renderers(){if(null==this._computed_renderers){const e=this.model.renderers,t=this.plot_model.renderers,n=this.model.names;this._computed_renderers=Ov(e,t,n)}return this._computed_renderers}get ttmodels(){return null==this._ttmodels&&(this._ttmodels=this._compute_ttmodels()),this._ttmodels}_clear(){this._inspect(1/0,1/0);for(const[,e]of this.ttmodels)e.clear()}_move(e){if(!this.model.active)return;const{sx:t,sy:n}=e;this.plot_view.frame.bbox.contains(t,n)?this._inspect(t,n):this._clear()}_move_exit(){this._clear()}_inspect(e,t){let n;n="mouse"==this.model.mode?{type:"point",sx:e,sy:t}:{type:"span",direction:"vline"==this.model.mode?"h":"v",sx:e,sy:t};for(const e of this.computed_renderers)e.get_selection_manager().inspect(this.plot_view.renderer_views.get(e),n);null!=this.model.callback&&this._emit_callback(n)}_update([e,{geometry:t}]){if(!this.model.active)return;if(!(e instanceof bl))return;const{model:n}=e;if("ignore"==this.model.muted_policy&&n instanceof _l&&n.muted)return;const r=this.ttmodels.get(n);if(null==r)return;const i=n.get_selection_manager();let o=i.inspectors.get(n);if(n instanceof _l&&(o=n.view.convert_selection_to_subset(o)),o.is_empty())return void r.clear();const a=i.source,{sx:s,sy:l}=t,c=e.coordinates.x_scale,u=e.coordinates.y_scale,h=c.invert(s),d=u.invert(l),f=e.glyph,p=[];for(const n of o.line_indices){let r,i,g=f._x[n+1],m=f._y[n+1],v=n;switch(this.model.line_policy){case"interp":[g,m]=f.get_interpolation_hit(n,t),r=c.compute(g),i=u.compute(m);break;case"prev":[[r,i],v]=yy(f.sx,f.sy,n);break;case"next":[[r,i],v]=yy(f.sx,f.sy,n+1);break;case"nearest":[[r,i],v]=vy(n,t,s,l,f.sx,f.sy),g=f._x[v],m=f._y[v];break;default:[r,i]=[s,l]}const y={index:v,x:h,y:d,sx:s,sy:l,data_x:g,data_y:m,rx:r,ry:i,indices:o.line_indices,name:e.model.name};p.push([r,i,this._render_tooltips(a,v,y)])}for(const t of o.image_indices){const n={index:t.index,x:h,y:d,sx:s,sy:l,name:e.model.name},r=this._render_tooltips(a,t,n);p.push([s,l,r])}for(const r of o.indices)if(ve(o.multiline_indices)){const t=null!=f._x?f._x[r]:void 0,i=null!=f._y?f._y[r]:void 0;let c,u,g;if("snap_to_data"==this.model.point_policy){let e=f.get_anchor_point(this.model.anchor,r,[s,l]);null==e&&(e=f.get_anchor_point("center",r,[s,l])),c=e.x,u=e.y}else[c,u]=[s,l];g=n instanceof _l?n.view.convert_indices_from_subset([r])[0]:r;const m={index:g,x:h,y:d,sx:s,sy:l,data_x:t,data_y:i,indices:o.indices,name:e.model.name};p.push([c,u,this._render_tooltips(a,g,m)])}else for(const i of o.multiline_indices[r.toString()]){let g,m,v,y=f._xs[r][i],b=f._ys[r][i],_=i;switch(this.model.line_policy){case"interp":[y,b]=f.get_interpolation_hit(r,i,t),g=c.compute(y),m=u.compute(b);break;case"prev":[[g,m],_]=yy(f.sxs[r],f.sys[r],i);break;case"next":[[g,m],_]=yy(f.sxs[r],f.sys[r],i+1);break;case"nearest":[[g,m],_]=vy(i,t,s,l,f.sxs[r],f.sys[r]),y=f._xs[r][_],b=f._ys[r][_];break;default:throw new Error("should't have happened")}v=n instanceof _l?n.view.convert_indices_from_subset([r])[0]:r;const x={index:v,x:h,y:d,sx:s,sy:l,data_x:y,data_y:b,segment_index:_,indices:o.multiline_indices,name:e.model.name};p.push([g,m,this._render_tooltips(a,v,x)])}if(0==p.length)r.clear();else{const{content:e}=r;oa(r.content);for(const[,,t]of p)e.appendChild(t);const[t,n]=p[p.length-1];r.setv({position:[t,n]},{check_eq:!1})}}_emit_callback(e){for(const t of this.computed_renderers){const n=this.plot_view.renderer_views.get(t),r=n.coordinates.x_scale.invert(e.sx),i=n.coordinates.y_scale.invert(e.sy),o=t.data_source.inspected,a=Object.assign({x:r,y:i},e);this.model.callback.execute(this.model,{index:o,geometry:a,renderer:t})}}_create_template(e){const t=jo({style:{display:"table",borderSpacing:"2px"}});for(const[n]of e){const e=jo({style:{display:"table-row"}});t.appendChild(e);const r=jo({style:{display:"table-cell"},class:"bk-tooltip-row-label"},0!=n.length?`${n}: `:"");e.appendChild(r);const i=Uo();i.dataset.value="";const o=Uo({class:"bk-tooltip-color-block"}," ");o.dataset.swatch="",sa(o);const a=jo({style:{display:"table-cell"},class:"bk-tooltip-row-value"},i,o);e.appendChild(a)}return t}_render_template(e,t,n,r,i){const o=e.cloneNode(!0),a=o.querySelectorAll("[data-value]"),s=o.querySelectorAll("[data-swatch]"),l=/\$color(\[.*\])?:(\w*)/;for(const[[,e],o]of cg(t)){const t=e.match(l);if(null!=t){const[,e="",i]=t,l=n.get_column(i);if(null==l){a[o].textContent=`${i} unknown`;continue}const c=e.indexOf("hex")>=0,u=e.indexOf("swatch")>=0;let h=te(r)?l[r]:null;if(null==h){a[o].textContent="(null)";continue}c&&(h=Be(h)),a[o].textContent=h,u&&(s[o].style.backgroundColor=h,aa(s[o]))}else{const t=Nu(e.replace("$~","$data_"),n,r,this.model.formatters,i);if(re(t))a[o].textContent=t;else for(const e of t)a[o].appendChild(e)}}return o}_render_tooltips(e,t,n){const r=this.model.tooltips;if(re(r)){const i=Nu({html:r},e,t,this.model.formatters,n);return jo({},i)}return ie(r)?r(e,n):this._render_template(this._template_el,r,e,t,n)}}by.__name__="HoverToolView";class _y extends mg{constructor(e){super(e),this.tool_name="Hover",this.icon="bk-tool-icon-hover"}static init_HoverTool(){this.prototype.default_view=by,this.define({tooltips:[Tn,[["index","$index"],["data (x, y)","($x, $y)"],["screen (x, y)","($sx, $sy)"]]],formatters:[Tn,{}],renderers:[Tn,"auto"],names:[Sn,[]],mode:[Qn,"mouse"],muted_policy:[sr,"show"],point_policy:[hr,"snap_to_data"],line_policy:[rr,"nearest"],show_arrow:[En,!0],anchor:[Un,"center"],attachment:[Tr,"horizontal"],callback:[Tn]}),this.register_alias("hover",(()=>new _y))}}_y.__name__="HoverTool",_y.init_HoverTool();class xy extends rs{constructor(e){super(e)}static init_ToolProxy(){this.define({tools:[Sn,[]],active:[En,!1],disabled:[En,!1]})}get button_view(){return this.tools[0].button_view}get event_type(){return this.tools[0].event_type}get tooltip(){return this.tools[0].tooltip}get tool_name(){return this.tools[0].tool_name}get icon(){return this.tools[0].computed_icon}get computed_icon(){return this.icon}get toggleable(){const e=this.tools[0];return e instanceof mg&&e.toggleable}initialize(){super.initialize(),this.do=new we(this,"do")}connect_signals(){super.connect_signals(),this.connect(this.do,(()=>this.doit())),this.connect(this.properties.active.change,(()=>this.set_active()));for(const e of this.tools)this.connect(e.properties.active.change,(()=>{this.active=e.active}))}doit(){for(const e of this.tools)e.do.emit()}set_active(){for(const e of this.tools)e.active=this.active}get menu(){const{menu:e}=this.tools[0];if(null==e)return null;const t=[];for(const[n,r]of cg(e))if(null==n)t.push(null);else{const e=()=>{var e,t;for(const n of this.tools)null===(t=null===(e=n.menu)||void 0===e?void 0:e[r])||void 0===t||t.handler()};t.push(Object.assign(Object.assign({},n),{handler:e}))}return t}}xy.__name__="ToolProxy",xy.init_ToolProxy();class wy extends Cg{constructor(e){super(e)}static init_ProxyToolbar(){this.define({toolbars:[Sn,[]]})}initialize(){super.initialize(),this._merge_tools()}_merge_tools(){this._proxied_tools=[];const e={},t={},n={},r=[],i=[];for(const e of this.help)F(i,e.redirect)||(r.push(e),i.push(e.redirect));this._proxied_tools.push(...r),this.help=r;for(const[e,t]of de(this.gestures)){e in n||(n[e]={});for(const r of t.tools)r.type in n[e]||(n[e][r.type]=[]),n[e][r.type].push(r)}for(const t of this.inspectors)t.type in e||(e[t.type]=[]),e[t.type].push(t);for(const e of this.actions)e.type in t||(t[e.type]=[]),t[e.type].push(e);const o=(e,t=!1)=>{const n=new xy({tools:e,active:t});return this._proxied_tools.push(n),n};for(const e of ue(n)){const t=this.gestures[e];t.tools=[];for(const r of ue(n[e])){const i=n[e][r];if(i.length>0)if("multi"==e)for(const e of i){const n=o([e]);t.tools.push(n),this.connect(n.properties.active.change,(()=>this._active_change(n)))}else{const e=o(i);t.tools.push(e),this.connect(e.properties.active.change,(()=>this._active_change(e)))}}}this.actions=[];for(const[e,n]of de(t))if("CustomAction"==e)for(const e of n)this.actions.push(o([e]));else n.length>0&&this.actions.push(o(n));this.inspectors=[];for(const t of he(e))t.length>0&&this.inspectors.push(o(t,!0));for(const[e,t]of de(this.gestures))0!=t.tools.length&&(t.tools=H(t.tools,(e=>e.default_order)),"pinch"!=e&&"scroll"!=e&&"multi"!=e&&(t.tools[0].active=!0))}}wy.__name__="ProxyToolbar",wy.init_ProxyToolbar();class Ay extends xf{initialize(){this.model.toolbar.toolbar_location=this.model.toolbar_location,super.initialize()}get child_models(){return[this.model.toolbar]}_update_layout(){this.layout=new Dh(this.child_views[0].el);const{toolbar:e}=this.model;e.horizontal?this.layout.set_sizing({width_policy:"fit",min_width:100,height_policy:"fixed"}):this.layout.set_sizing({width_policy:"fixed",height_policy:"fit",min_height:100})}}Ay.__name__="ToolbarBoxView";class ky extends wf{constructor(e){super(e)}static init_ToolbarBox(){this.prototype.default_view=Ay,this.define({toolbar:[Mn],toolbar_location:[ir,"right"]})}}ky.__name__="ToolbarBox",ky.init_ToolbarBox();const Ty={},Sy=new Map,Ey=e=>{const t=Ty[e]||Sy.get(e);if(null==t)throw new Error(`Model '${e}' does not exist. This could be due to a widget or a custom model not being registered before first usage.`);return t};Ey.register=(e,t)=>{Ty[e]=t},Ey.unregister=e=>{delete Ty[e]};const Cy=Ey.register_models=(e,t=!1,n)=>{var r;if(null!=e)for(const i of he(e))if(le(r=i)&&r.prototype instanceof Ei){const e=i.__qualified__;t||!Sy.has(e)?Sy.set(e,i):null!=n?n(e):console.warn(`Model '${e}' was already registered`)}};Ey.registered_names=()=>Array.from(Sy.keys()),Cy(i);const My="2.2.3";class Oy{constructor(e){this.document=e,this.session=null,this.subscribed_models=new Set}send_event(e){const t=new zl(this.document,"bokeh_event",e.to_json());this.document._trigger_on_change(t)}trigger(e){for(const t of this.subscribed_models)null!=e.origin&&e.origin!=t||t._process_event(e)}}Oy.__name__="EventManager";const Ly=[];class Dy{constructor(){Ly.push(this),this._init_timestamp=Date.now(),this._title="Bokeh Application",this._roots=[],this._all_models=new Map,this._all_models_freeze_count=0,this._callbacks=new Map,this._message_callbacks=new Map,this.event_manager=new Oy(this),this.idle=new we(this,"idle"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}get layoutables(){return this._roots.filter((e=>e instanceof wf))}get is_idle(){for(const e of this.layoutables)if(!this._idle_roots.has(e))return!1;return!0}notify_idle(e){this._idle_roots.set(e,!0),this.is_idle&&(Re.info(`document idle at ${Date.now()-this._init_timestamp} ms`),this.event_manager.send_event(new Ng),this.idle.emit())}clear(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}}interactive_start(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new jg)),this._interactive_timestamp=Date.now()}interactive_stop(){null!=this._interactive_plot&&this._interactive_plot.trigger_event(new Ug),this._interactive_plot=null,this._interactive_timestamp=null}interactive_duration(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp}destructively_move(e){if(e===this)throw new Error("Attempted to overwrite a document with itself");e.clear();const t=N(this._roots);this.clear();for(const e of t)if(null!=e.document)throw new Error(`Somehow we didn't detach ${e}`);if(0!=this._all_models.size)throw new Error(`this._all_models still had stuff in it: ${this._all_models}`);for(const n of t)e.add_root(n);e.set_title(this._title)}_push_all_models_freeze(){this._all_models_freeze_count+=1}_pop_all_models_freeze(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()}_invalidate_all_models(){Re.debug("invalidating document models"),0===this._all_models_freeze_count&&this._recompute_all_models()}_recompute_all_models(){let e=new Set;for(const t of this._roots)e=Dl(e,t.references());const t=new Set(this._all_models.values()),n=Il(t,e),r=Il(e,t),i=new Map;for(const t of e)i.set(t.id,t);for(const e of n)e.detach_document();for(const e of r)e.attach_document(this);this._all_models=i}roots(){return this._roots}add_root(e,t){if(Re.debug(`Adding root: ${e}`),!F(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new Vl(this,e,t))}}remove_root(e,t){const n=this._roots.indexOf(e);if(!(n<0)){this._push_all_models_freeze();try{this._roots.splice(n,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new ql(this,e,t))}}title(){return this._title}set_title(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new Ul(this,e,t)))}get_model_by_id(e){var t;return null!==(t=this._all_models.get(e))&&void 0!==t?t:null}get_model_by_name(e){const t=[];for(const n of this._all_models.values())n instanceof rs&&n.name==e&&t.push(n);switch(t.length){case 0:return null;case 1:return t[0];default:throw new Error(`Multiple models are named '${e}'`)}}on_message(e,t){const n=this._message_callbacks.get(e);null==n?this._message_callbacks.set(e,new Set([t])):n.add(t)}remove_on_message(e,t){var n;null===(n=this._message_callbacks.get(e))||void 0===n||n.delete(t)}_trigger_on_message(e,t){const n=this._message_callbacks.get(e);if(null!=n)for(const e of n)e(t)}on_change(e,t=!1){this._callbacks.has(e)||this._callbacks.set(e,t)}remove_on_change(e){this._callbacks.delete(e)}_trigger_on_change(e){for(const[t,n]of this._callbacks)if(!n&&e instanceof Pl)for(const n of e.events)t(n);else t(e)}_notify_change(e,t,n,r,i){this._trigger_on_change(new Fl(this,e,t,n,r,null==i?void 0:i.setter_id,null==i?void 0:i.hint))}static _references_json(e,t=!0){const n=[];for(const r of e){const e=r.struct();e.attributes=r.attributes_as_json(t),delete e.attributes.id,n.push(e)}return n}static _instantiate_object(e,t,n){const r=Object.assign(Object.assign({},n),{id:e,__deferred__:!0});return new(Ey(t))(r)}static _instantiate_references_json(e,t){const n=new Map;for(const r of e){const e=r.id,i=r.type,o=r.attributes||{};let a=t.get(e);null==a&&(a=Dy._instantiate_object(e,i,o),null!=r.subtype&&a.set_subtype(r.subtype)),n.set(a.id,a)}return n}static _resolve_refs(e,t,n,r){return function e(i){if(Me(i)){if(t.has(i.id))return t.get(i.id);if(n.has(i.id))return n.get(i.id);throw new Error(`reference ${JSON.stringify(i)} isn't known (not in Document?)`)}return function(e){return ce(e)&&("__buffer__"in e||"__ndarray__"in e)}(i)?function(e,t){const{shape:n,dtype:r,order:i}=e;let o;if("__buffer__"in e){const n=t.get(e.__buffer__);if(null==n)throw new Error(`buffer for ${e.__buffer__} not found`);o=n}else o=function(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0,i=n;e<i;e++)r[e]=t.charCodeAt(e);return r.buffer}(e.__ndarray__);const a=(()=>{switch(r){case"uint8":return new fi(o,n);case"int8":return new pi(o,n);case"uint16":return new gi(o,n);case"int16":return new mi(o,n);case"uint32":return new vi(o,n);case"int32":return new yi(o,n);case"float32":return new bi(o,n);case"float64":return new _i(o,n)}})();if(i!==Ti)switch(a.BYTES_PER_ELEMENT){case 2:!function(e){const t=new Uint8Array(e.buffer,e.byteOffset,2*e.length);for(let e=0,n=t.length;e<n;e+=2){const n=t[e];t[e]=t[e+1],t[e+1]=n}}(a);break;case 4:!function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);for(let e=0,n=t.length;e<n;e+=4){let n=t[e];t[e]=t[e+3],t[e+3]=n,n=t[e+1],t[e+1]=t[e+2],t[e+2]=n}}(a);break;case 8:!function(e){const t=new Uint8Array(e.buffer,e.byteOffset,8*e.length);for(let e=0,n=t.length;e<n;e+=8){let n=t[e];t[e]=t[e+7],t[e+7]=n,n=t[e+1],t[e+1]=t[e+6],t[e+6]=n,n=t[e+2],t[e+2]=t[e+5],t[e+5]=n,n=t[e+3],t[e+3]=t[e+4],t[e+4]=n}}(a)}return a}(i,r):oe(i)?function(t){const n=[];for(const r of t)n.push(e(r));return n}(i):ce(i)?function(t){const n={};for(const[r,i]of de(t))n[r]=e(i);return n}(i):i}(e)}static _initialize_references_json(e,t,n,r){const i=new Map;for(const{id:o,attributes:a}of e){const e=!t.has(o),s=e?n.get(o):t.get(o),l=Dy._resolve_refs(a,t,n,r);s.setv(l,{silent:!0}),i.set(o,{instance:s,is_new:e})}const o=[],a=new Set;function s(e){if(e instanceof Ei){if(i.has(e.id)&&!a.has(e.id)){a.add(e.id);const{instance:t,is_new:n}=i.get(e.id),{attributes:r}=t;for(const e of he(r))s(e);n&&(t.finalize(),o.push(t))}}else if(oe(e))for(const t of e)s(t);else if(ce(e))for(const t of he(e))s(t)}for(const e of i.values())s(e.instance);for(const e of o)e.connect_signals()}static _event_for_attribute_change(e,t,n,r,i){if(r.get_model_by_id(e.id).property(t).syncable){const o={kind:"ModelChanged",model:{id:e.id},attr:t,new:n};return Ei._json_record_references(r,n,i,{recursive:!0}),o}return null}static _events_to_sync_objects(e,t,n,r){const i=Object.keys(e.attributes),o=Object.keys(t.attributes),a=X(i,o),s=X(o,i),l=Y(i,o),c=[];for(const e of a)Re.warn(`Server sent key ${e} but we don't seem to have it in our JSON`);for(const i of s){const o=t.attributes[i];c.push(Dy._event_for_attribute_change(e,i,o,n,r))}for(const i of l){const o=e.attributes[i],a=t.attributes[i];null==o&&null==a||(null==o||null==a?c.push(Dy._event_for_attribute_change(e,i,a,n,r)):fn(o,a)||c.push(Dy._event_for_attribute_change(e,i,a,n,r)))}return c.filter((e=>null!=e))}static _compute_patch_since_json(e,t){const n=t.to_json(!1);function r(e){const t=new Map;for(const n of e.roots.references)t.set(n.id,n);return t}const i=r(e),o=new Map,a=[];for(const t of e.roots.root_ids)o.set(t,i.get(t)),a.push(t);const s=r(n),l=new Map,c=[];for(const e of n.roots.root_ids)l.set(e,s.get(e)),c.push(e);if(a.sort(),c.sort(),X(a,c).length>0||X(c,a).length>0)throw new Error("Not implemented: computing add/remove of document roots");const u=new Set;let h=[];for(const e of t._all_models.keys())if(i.has(e)){const n=Dy._events_to_sync_objects(i.get(e),s.get(e),t,u);h=h.concat(n)}return{references:Dy._references_json(u,!1),events:h}}to_json_string(e=!0){return JSON.stringify(this.to_json(e))}to_json(e=!0){const t=this._roots.map((e=>e.id)),n=this._all_models.values();return{version:My,title:this._title,roots:{root_ids:t,references:Dy._references_json(n,e)}}}static from_json_string(e){const t=JSON.parse(e);return Dy.from_json(t)}static from_json(e){Re.debug("Creating Document from JSON");const t=e.version,n=-1!==t.indexOf("+")||-1!==t.indexOf("-"),r=`Library versions: JS (2.2.3) / Python (${t})`;n||function(e){return e.replace(/-(dev|rc)\./,"$1")}(My)==t?Re.debug(r):(Re.warn("JS/Python version mismatch"),Re.warn(r));const i=e.roots,o=i.root_ids,a=i.references,s=Dy._instantiate_references_json(a,new Map);Dy._initialize_references_json(a,new Map,s,new Map);const l=new Dy;for(const e of o){const t=s.get(e);null!=t&&l.add_root(t)}return l.set_title(e.title),l}replace_with_json(e){Dy.from_json(e).destructively_move(this)}create_json_patch_string(e){return JSON.stringify(this.create_json_patch(e))}create_json_patch(e){const t=new Set,n=[];for(const r of e){if(r.document!==this)throw Re.warn("Cannot create a patch using events from a different document, event had ",r.document," we are ",this),new Error("Cannot create a patch using events from a different document");n.push(r.json(t))}return{events:n,references:Dy._references_json(t)}}apply_json_patch(e,t=new Map,n){const r=e.references,i=e.events,o=Dy._instantiate_references_json(r,this._all_models);t instanceof Map||(t=new Map(t));for(const e of i)switch(e.kind){case"RootAdded":case"RootRemoved":case"ModelChanged":{const t=e.model.id,n=this._all_models.get(t);if(null!=n)o.set(t,n);else if(!o.has(t))throw Re.warn(`Got an event for unknown model ${e.model}"`),new Error("event model wasn't known");break}}const a=new Map,s=new Map;for(const[e,t]of o)this._all_models.has(e)?a.set(e,t):s.set(e,t);Dy._initialize_references_json(r,a,s,t);for(const e of i)switch(e.kind){case"MessageSent":{const{msg_type:n,msg_data:r}=e;let i;if(void 0===r){if(1!=t.size)throw new Error("expected exactly one buffer");{const[[,e]]=t;i=e}}else i=Dy._resolve_refs(r,a,s,t);this._trigger_on_message(n,i);break}case"ModelChanged":{const r=e.model.id,i=this._all_models.get(r);if(null==i)throw new Error(`Cannot apply patch to ${r} which is not in the document`);const o=e.attr,l=Dy._resolve_refs(e.new,a,s,t);i.setv({[o]:l},{setter_id:n});break}case"ColumnDataChanged":{const r=e.column_source.id,i=this._all_models.get(r);if(null==i)throw new Error(`Cannot stream to ${r} which is not in the document`);const o=Dy._resolve_refs(e.new,new Map,new Map,t);if(null!=e.cols)for(const e in i.data)e in o||(o[e]=i.data[e]);i.setv({data:o},{setter_id:n,check_eq:!1});break}case"ColumnsStreamed":{const t=e.column_source.id,r=this._all_models.get(t);if(null==r)throw new Error(`Cannot stream to ${t} which is not in the document`);if(!(r instanceof Gl))throw new Error("Cannot stream to non-ColumnDataSource");const i=e.data,o=e.rollover;r.stream(i,o,n);break}case"ColumnsPatched":{const t=e.column_source.id,r=this._all_models.get(t);if(null==r)throw new Error(`Cannot patch ${t} which is not in the document`);if(!(r instanceof Gl))throw new Error("Cannot patch non-ColumnDataSource");const i=e.patches;r.patch(i,n);break}case"RootAdded":{const t=e.model.id,r=o.get(t);this.add_root(r,n);break}case"RootRemoved":{const t=e.model.id,r=o.get(t);this.remove_root(r,n);break}case"TitleChanged":this.set_title(e.title,n);break;default:throw new Error("Unknown patch event "+JSON.stringify(e))}}}Dy.__name__="Document";const Iy=_f;function Ry(e){let t=document.getElementById(e);if(null==t)throw new Error(`Error rendering Bokeh model: could not find #${e} HTML tag`);if(!document.body.contains(t))throw new Error(`Error rendering Bokeh model: element #${e} must be under <body>`);if("SCRIPT"==t.tagName){const e=jo({class:Iy});!function(e,t){const n=e.parentNode;null!=n&&n.replaceChild(t,e)}(t,e),t=e}return t}function Py(e){const{elementid:t}=e;return null!=t?Ry(t):document.body}function Ny(e){const t=[];if(null!=e.root_ids&&null!=e.roots)for(const n of e.root_ids)t.push(Ry(e.roots[n]));return t}const zy={};async function Fy(e,t,n=[],r=!1){const i=new Map;async function o(r){let o;const a=e.roots().indexOf(r),s=n[a];null!=s?o=s:t.classList.contains(Iy)?o=t:(o=jo({class:Iy}),t.appendChild(o));const l=await fl(r,{parent:null});return l instanceof Na&&l.renderTo(o),i.set(r,l),zy[r.id]=l,l}for(const t of e.roots())await o(t);return r&&(window.document.title=e.title()),e.on_change((e=>{e instanceof Vl?o(e.model):e instanceof ql?function(e){const t=i.get(e);null!=t&&(t.remove(),i.delete(e),delete zy[e.id])}(e.model):r&&e instanceof Ul&&(window.document.title=e.title)})),[...i.values()]}class By{constructor(e,t,n){this.header=e,this.metadata=t,this.content=n,this.buffers=new Map}static assemble(e,t,n){const r=JSON.parse(e),i=JSON.parse(t),o=JSON.parse(n);return new By(r,i,o)}assemble_buffer(e,t){const n=null!=this.header.num_buffers?this.header.num_buffers:0;if(n<=this.buffers.size)throw new Error(`too many buffers received, expecting ${n}`);const{id:r}=JSON.parse(e);this.buffers.set(r,t)}static create(e,t,n={}){const r=By.create_header(e);return new By(r,t,n)}static create_header(e){return{msgid:ci(),msgtype:e}}complete(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(null==this.header.num_buffers||this.buffers.size==this.header.num_buffers)}send(e){if((null!=this.header.num_buffers?this.header.num_buffers:0)>0)throw new Error("BokehJS only supports receiving buffers, not sending");const t=JSON.stringify(this.header),n=JSON.stringify(this.metadata),r=JSON.stringify(this.content);e.send(t),e.send(n),e.send(r)}msgid(){return this.header.msgid}msgtype(){return this.header.msgtype}reqid(){return this.header.reqid}problem(){return"msgid"in this.header?"msgtype"in this.header?null:"No msgtype in header":"No msgid in header"}}By.__name__="Message";class jy{constructor(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}consume(e){this._current_consumer(e)}_HEADER(e){this._assume_text(e),this.message=null,this._partial=null,this._fragments=[e],this._buf_header=null,this._current_consumer=this._METADATA}_METADATA(e){this._assume_text(e),this._fragments.push(e),this._current_consumer=this._CONTENT}_CONTENT(e){this._assume_text(e),this._fragments.push(e);const[t,n,r]=this._fragments.slice(0,3);this._partial=By.assemble(t,n,r),this._check_complete()}_BUFFER_HEADER(e){this._assume_text(e),this._buf_header=e,this._current_consumer=this._BUFFER_PAYLOAD}_BUFFER_PAYLOAD(e){this._assume_binary(e),this._partial.assemble_buffer(this._buf_header,e),this._check_complete()}_assume_text(e){if(!re(e))throw new Error("Expected text fragment but received binary fragment")}_assume_binary(e){if(!(e instanceof ArrayBuffer))throw new Error("Expected binary fragment but received text fragment")}_check_complete(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER}}jy.__name__="Receiver";class Uy{constructor(e,t,n){this._connection=e,this.document=t,this.id=n,this._document_listener=e=>{this._document_changed(e)},this.document.on_change(this._document_listener,!0)}handle(e){const t=e.msgtype();"PATCH-DOC"===t?this._handle_patch(e):"OK"===t?this._handle_ok(e):"ERROR"===t?this._handle_error(e):Re.debug(`Doing nothing with message ${e.msgtype()}`)}close(){this._connection.close()}_connection_closed(){this.document.remove_on_change(this._document_listener)}async request_server_info(){const e=By.create("SERVER-INFO-REQ",{});return(await this._connection.send_with_reply(e)).content}async force_roundtrip(){await this.request_server_info()}_document_changed(e){if(e.setter_id===this.id)return;const t=e instanceof Pl?e.events:[e],n=this.document.create_json_patch(t),r=By.create("PATCH-DOC",{},n);this._connection.send(r)}_handle_patch(e){this.document.apply_json_patch(e.content,e.buffers,this.id)}_handle_ok(e){Re.trace(`Unhandled OK reply to ${e.reqid()}`)}_handle_error(e){Re.error(`Unhandled ERROR reply to ${e.reqid()}: ${e.content.text}`)}}Uy.__name__="ClientSession";let Vy=0;function qy(e){let t=e.split(".")[0];const n=t.length%4;return 0!=n&&(t+="=".repeat(4-n)),JSON.parse(atob(t.replace(/_/g,"/").replace(/-/g,"+")))}class Hy{constructor(e="ws://localhost:5006/ws",t="eyJzZXNzaW9uX2lkIjogImRlZmF1bHQifQ",n=null){this.url=e,this.token=t,this.args_string=n,this._number=Vy++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_replies=new Map,this._pending_messages=[],this._receiver=new jy,this.id=qy(t).session_id.split(".")[0],Re.debug(`Creating websocket ${this._number} to '${this.url}' session '${this.id}'`)}async connect(){if(this.closed_permanently)throw new Error("Cannot connect() a closed ClientConnection");if(null!=this.socket)throw new Error("Already connected");this._current_handler=null,this._pending_replies.clear(),this._pending_messages=[];try{let e=`${this.url}`;return null!=this.args_string&&this.args_string.length>0&&(e+=`?${this.args_string}`),this.socket=new WebSocket(e,["bokeh",this.token]),new Promise(((e,t)=>{this.socket.binaryType="arraybuffer",this.socket.onopen=()=>this._on_open(e,t),this.socket.onmessage=e=>this._on_message(e),this.socket.onclose=e=>this._on_close(e,t),this.socket.onerror=()=>this._on_error(t)}))}catch(e){throw Re.error(`websocket creation failed to url: ${this.url}`),Re.error(` - ${e}`),e}}close(){this.closed_permanently||(Re.debug(`Permanently closing websocket connection ${this._number}`),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,`close method called on ClientConnection ${this._number}`),this.session._connection_closed())}_schedule_reconnect(e){setTimeout((()=>{this.closed_permanently||Re.info(`Websocket connection ${this._number} disconnected, will not attempt to reconnect`)}),e)}send(e){if(null==this.socket)throw new Error(`not connected so cannot send ${e}`);e.send(this.socket)}async send_with_reply(e){const t=await new Promise(((t,n)=>{this._pending_replies.set(e.msgid(),{resolve:t,reject:n}),this.send(e)}));if("ERROR"===t.msgtype())throw new Error(`Error reply ${t.content.text}`);return t}async _pull_doc_json(){const e=By.create("PULL-DOC-REQ",{}),t=await this.send_with_reply(e);if(!("doc"in t.content))throw new Error("No 'doc' field in PULL-DOC-REPLY");return t.content.doc}async _repull_session_doc(e,t){var n;Re.debug(this.session?"Repulling session":"Pulling session for first time");try{const n=await this._pull_doc_json();if(null==this.session)if(this.closed_permanently)Re.debug("Got new document after connection was already closed"),t(new Error("The connection has been closed"));else{const t=Dy.from_json(n),r=Dy._compute_patch_since_json(n,t);if(r.events.length>0){Re.debug(`Sending ${r.events.length} changes from model construction back to server`);const e=By.create("PATCH-DOC",{},r);this.send(e)}this.session=new Uy(this,t,this.id);for(const e of this._pending_messages)this.session.handle(e);this._pending_messages=[],Re.debug("Created a new session from new pulled doc"),e(this.session)}else this.session.document.replace_with_json(n),Re.debug("Updated existing session with new pulled doc")}catch(e){null===(n=console.trace)||void 0===n||n.call(console,e),Re.error(`Failed to repull session ${e}`),t(e)}}_on_open(e,t){Re.info(`Websocket connection ${this._number} is now open`),this._current_handler=n=>{this._awaiting_ack_handler(n,e,t)}}_on_message(e){null==this._current_handler&&Re.error("Got a message with no current handler set");try{this._receiver.consume(e.data)}catch(e){this._close_bad_protocol(e.toString())}const t=this._receiver.message;if(null!=t){const e=t.problem();null!=e&&this._close_bad_protocol(e),this._current_handler(t)}}_on_close(e,t){Re.info(`Lost websocket ${this._number} connection, ${e.code} (${e.reason})`),this.socket=null,this._pending_replies.forEach((e=>e.reject("Disconnected"))),this._pending_replies.clear(),this.closed_permanently||this._schedule_reconnect(2e3),t(new Error(`Lost websocket connection, ${e.code} (${e.reason})`))}_on_error(e){Re.debug(`Websocket error on socket ${this._number}`);const t="Could not open websocket";Re.error(`Failed to connect to Bokeh server: ${t}`),e(new Error(t))}_close_bad_protocol(e){Re.error(`Closing connection: ${e}`),null!=this.socket&&this.socket.close(1002,e)}_awaiting_ack_handler(e,t,n){"ACK"===e.msgtype()?(this._current_handler=e=>this._steady_state_handler(e),this._repull_session_doc(t,n)):this._close_bad_protocol("First message was not an ACK")}_steady_state_handler(e){const t=e.reqid(),n=this._pending_replies.get(t);n?(this._pending_replies.delete(t),n.resolve(e)):this.session?this.session.handle(e):"PATCH-DOC"!=e.msgtype()&&this._pending_messages.push(e)}}function $y(e,t){let n,r="ws:";return"https:"==window.location.protocol&&(r="wss:"),null!=t?(n=document.createElement("a"),n.href=t):n=window.location,null!=e?"/"==e&&(e=""):e=n.pathname.replace(/\/+$/,""),r+"//"+n.host+e+"/ws"}Hy.__name__="ClientConnection";const Wy={};async function Gy(e,t,n,r=[],i=!1){const o=window.location.search.substr(1);let a;try{a=await function(e,t,n){const r=qy(t).session_id;e in Wy||(Wy[e]={});const i=Wy[e];return r in i||(i[r]=function(e,t,n){return new Hy(e,t,n).connect()}(e,t,n)),i[r]}(e,t,o)}catch(e){const n=qy(t).session_id;throw Re.error(`Failed to load Bokeh session ${n}: ${e}`),e}return Fy(a.document,n,r,i)}wa.append(Aa),wa.append(kg),wa.append("\n/* notebook specific tweaks so no black outline and matching padding\n/* can't be wrapped inside bk-root. here are the offending jupyter lines:\n/* path_to_url#L59-L76 */\n.rendered_html .bk-root .bk-tooltip table,\n.rendered_html .bk-root .bk-tooltip tr,\n.rendered_html .bk-root .bk-tooltip th,\n.rendered_html .bk-root .bk-tooltip td {\n border: none;\n padding: 1px;\n}\n");const Yy={};function Xy(e,t){t.buffers.length>0?e.consume(t.buffers[0].buffer):e.consume(t.content.data);const n=e.message;null!=n&&this.apply_json_patch(n.content,n.buffers)}function Zy(e,t){if("undefined"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){Re.info(`Registering Jupyter comms for target ${e}`);const n=Jupyter.notebook.kernel.comm_manager;try{n.register_target(e,(n=>{Re.info(`Registering Jupyter comms for target ${e}`);const r=new jy;n.on_msg(Xy.bind(t,r))}))}catch(e){Re.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if(t.roots()[0].id in Yy){Re.info(`Registering JupyterLab comms for target ${e}`);const n=Yy[t.roots()[0].id];try{n.registerCommTarget(e,(n=>{Re.info(`Registering JupyterLab comms for target ${e}`);const r=new jy;n.onMsg=Xy.bind(t,r)}))}catch(e){Re.warn(`Jupyter comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else if("undefined"!=typeof google&&null!=google.colab.kernel){Re.info(`Registering Google Colab comms for target ${e}`);const n=google.colab.kernel.comms;try{n.registerTarget(e,(async n=>{var r,i,o;Re.info(`Registering Google Colab comms for target ${e}`);const a=new jy;try{for(var s,l=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}(n.messages);!(s=await l.next()).done;){const e=s.value,n={data:e.data},r=[];for(const t of null!==(o=e.buffers)&&void 0!==o?o:[])r.push(new DataView(t));const i={content:n,buffers:r};Xy.bind(t)(a,i)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=l.return)&&await i.call(l)}finally{if(r)throw r.error}}}))}catch(e){Re.warn(`Google Colab comms failed to register. push_notebook() will not function. (exception reported: ${e})`)}}else console.warn("Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest @bokeh/jupyter_bokeh extension is installed. In an exported notebook this warning is expected.")}function Ky(e,t){if(1!=me(e))throw new Error("embed_items_notebook expects exactly one document in docs_json");const n=Dy.from_json(he(e)[0]);for(const e of t)null!=e.notebook_comms_target&&Zy(e.notebook_comms_target,n),Fy(n,Py(e),Ny(e))}async function Jy(e,t){const n={},r=si();n[r]=e.doc,null==t&&(t=e.target_id);const i=document.getElementById(t);null!=i&&i.classList.add(Iy);const o={roots:{[e.root_id]:t},root_ids:[e.root_id],docid:r},[a]=await _e((()=>eb(n,[o])));return a}async function Qy(e,t,n,r){return await _e((()=>eb(e,t,n,r)))}async function eb(e,t,n,r){re(e)&&(e=JSON.parse(e.replace(/&(amp|lt|gt|quot|#x27|#x60);/g,((e,t)=>{switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';case"#x27":return"'";case"#x60":return"`";default:return t}}))));const i={};for(const[t,n]of de(e))i[t]=Dy.from_json(n);const o=[];for(const e of t){const t=Py(e),a=Ny(e);if(null!=e.docid)o.push(await Fy(i[e.docid],t,a,e.use_for_title));else{if(null==e.token)throw new Error("Error rendering Bokeh items: either 'docid' or 'token' was expected.");{const i=$y(n,r);Re.debug(`embed: computed ws url: ${i}`);try{o.push(await Gy(i,e.token,t,a,e.use_for_title)),console.log("Bokeh items were rendered successfully")}catch(e){console.log("Error rendering Bokeh items:",e)}}}}return o}const tb=2147483647;class nb{constructor(e){this.seed=e%tb,this.seed<=0&&(this.seed+=2147483646)}integer(){return this.seed=48271*this.seed%tb,this.seed}float(){return(this.integer()-1)/2147483646}floats(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=this.float();return t}}nb.__name__="Random",new nb(Date.now());const rb=["pan","wheel_zoom","box_zoom","save","reset","help"];function ib(e,t){return void 0===e?t:e}class ob extends Cm{constructor(e={}){const t=ib((e=Object.assign({},e)).tools,rb);delete e.tools;const n=ib(e.x_axis_type,"auto"),r=ib(e.y_axis_type,"auto");delete e.x_axis_type,delete e.y_axis_type;const i=null!=e.x_minor_ticks?e.x_minor_ticks:"auto",o=null!=e.y_minor_ticks?e.y_minor_ticks:"auto";delete e.x_minor_ticks,delete e.y_minor_ticks;const a=null!=e.x_axis_location?e.x_axis_location:"below",s=null!=e.y_axis_location?e.y_axis_location:"left";delete e.x_axis_location,delete e.y_axis_location;const l=null!=e.x_axis_label?e.x_axis_label:"",c=null!=e.y_axis_label?e.y_axis_label:"";delete e.x_axis_label,delete e.y_axis_label;const u=ob._get_range(e.x_range),h=ob._get_range(e.y_range);delete e.x_range,delete e.y_range;const d=null!=e.x_scale?e.x_scale:ob._get_scale(u,n),f=null!=e.y_scale?e.y_scale:ob._get_scale(h,r);delete e.x_scale,delete e.y_scale,super(Object.assign(Object.assign({},e),{x_range:u,y_range:h,x_scale:d,y_scale:f})),this._process_axis_and_grid(n,a,i,l,u,0),this._process_axis_and_grid(r,s,o,c,h,1),this.add_tools(...this._process_tools(t))}get xgrid(){return this.center.filter((e=>e instanceof bf&&0==e.dimension))}get ygrid(){return this.center.filter((e=>e instanceof bf&&1==e.dimension))}get xaxis(){return this.below.concat(this.above).filter((e=>e instanceof xu))}get yaxis(){return this.left.concat(this.right).filter((e=>e instanceof xu))}get legend(){const e=this.panels.filter((e=>e instanceof Wc));if(0==e.length){const e=new Wc;return this.add_layout(e),e}{const[t]=e;return t}}annular_wedge(...e){return this._glyph(Yh,"x,y,inner_radius,outer_radius,start_angle,end_angle",e)}annulus(...e){return this._glyph(Zh,"x,y,inner_radius,outer_radius",e)}arc(...e){return this._glyph(Jh,"x,y,radius,start_angle,end_angle",e)}bezier(...e){return this._glyph(td,"x0,y0,x1,y1,cx0,cy0,cx1,cy1",e)}circle(...e){return this._glyph(_d,"x,y",e)}ellipse(...e){return this._glyph(Sd,"x,y,width,height",e)}harea(...e){return this._glyph(ll,"x1,x2,y",e)}hbar(...e){return this._glyph(Od,"y,height,right,left",e)}hex_tile(...e){return this._glyph(Dd,"q,r",e)}image(...e){return this._glyph(Nd,"color_mapper,image,rows,cols,x,y,dw,dh",e)}image_rgba(...e){return this._glyph(Fd,"image,rows,cols,x,y,dw,dh",e)}image_url(...e){return this._glyph(Ud,"url,x,y,w,h",e)}line(...e){return this._glyph(nl,"x,y",e)}multi_line(...e){return this._glyph(qd,"xs,ys",e)}multi_polygons(...e){return this._glyph($d,"xs,ys",e)}oval(...e){return this._glyph(Gd,"x,y,width,height",e)}patch(...e){return this._glyph(il,"x,y",e)}patches(...e){return this._glyph(Xd,"xs,ys",e)}quad(...e){return this._glyph(Kd,"left,right,bottom,top",e)}quadratic(...e){return this._glyph(ef,"x0,y0,x1,y1,cx,cy",e)}ray(...e){return this._glyph(nf,"x,y,length",e)}rect(...e){return this._glyph(of,"x,y,width,height",e)}segment(...e){return this._glyph(sf,"x0,y0,x1,y1",e)}step(...e){return this._glyph(cf,"x,y,mode",e)}text(...e){return this._glyph(hf,"x,y,text",e)}varea(...e){return this._glyph(ul,"x,y1,y2",e)}vbar(...e){return this._glyph(ff,"x,width,top,bottom",e)}wedge(...e){return this._glyph(gf,"x,y,radius,start_angle,end_angle",e)}asterisk(...e){return this._marker(Op,e)}circle_cross(...e){return this._marker(Lp,e)}circle_dot(...e){return this._marker(Dp,e)}circle_x(...e){return this._marker(Rp,e)}circle_y(...e){return this._marker(Ip,e)}cross(...e){return this._marker(Pp,e)}dash(...e){return this._marker(Np,e)}diamond(...e){return this._marker(zp,e)}diamond_cross(...e){return this._marker(Fp,e)}diamond_dot(...e){return this._marker(Bp,e)}dot(...e){return this._marker(jp,e)}hex(...e){return this._marker(Up,e)}hex_dot(...e){return this._marker(Vp,e)}inverted_triangle(...e){return this._marker(qp,e)}plus(...e){return this._marker(Hp,e)}square(...e){return this._marker($p,e)}square_cross(...e){return this._marker(Wp,e)}square_dot(...e){return this._marker(Gp,e)}square_pin(...e){return this._marker(Yp,e)}square_x(...e){return this._marker(Xp,e)}triangle(...e){return this._marker(Zp,e)}triangle_dot(...e){return this._marker(Kp,e)}triangle_pin(...e){return this._marker(Jp,e)}x(...e){return this._marker(Qp,e)}y(...e){return this._marker(eg,e)}scatter(...e){return this._marker(rg,e)}_pop_visuals(e,t,n="",r={},i={}){const o=function(e){const t=e.split("_",2);return 2==t.length?t:t.concat([""])},a=function(e){const[t,n]=o(e);return F(["line","fill","text","global"],t)&&""!==n};(r=Object.assign({},r)).hasOwnProperty("text_color")||(r.text_color="black");const s={};s.hasOwnProperty("color")||(s.color="#1f77b4"),s.hasOwnProperty("alpha")||(s.alpha=1);const l={},c=new Set;for(const u of ue(e.prototype._props))if(a(u)){const a=o(u)[1];t.hasOwnProperty(n+u)?(l[u]=t[n+u],delete t[n+u]):!e.prototype._props.hasOwnProperty(a)&&t.hasOwnProperty(n+a)?l[u]=t[n+a]:i.hasOwnProperty(a)?l[u]=i[a]:r.hasOwnProperty(u)?l[u]=r[u]:s.hasOwnProperty(a)&&(l[u]=s[a]),e.prototype._props.hasOwnProperty(a)||c.add(a)}return c.forEach((function(e,r,i){delete t[n+r]})),l}_find_uniq_name(e,t){let n=1;for(;;){const r=`${t}__${n}`;if(null==e[r])return r;n+=1}}_fixup_values(e,t,n){for(const[r,i]of de(n)){const o=e.prototype._props[r];if(null!=o&&o.type.prototype instanceof Mr&&null!=i)if(oe(i)){let e;null!=t[r]?t[r]!==i?(e=this._find_uniq_name(t,r),t[e]=i):e=r:(e=r,t[e]=i),n[r]={field:e}}else(te(i)||re(i))&&(n[r]={value:i})}}_glyph(e,t,n){const r=t.split(",");let i;if(0==n.length)i={};else if(1==n.length)i=Object.assign({},n[0]);else{i=n.length==r.length?{}:Object.assign({},n[n.length-1]);for(const[e,t]of cg(r))i[e]=n[t]}const o=null!=i.source?i.source:new Gl,a=pe(o.data);delete i.source;const s=null!=i.view?i.view:new hl({source:o});delete i.view;const l=this._process_legend(i.legend,o);delete i.legend;const c=T(Object.keys(i),(e=>ai(e,"selection_"))),u=T(Object.keys(i),(e=>ai(e,"hover_"))),h=this._pop_visuals(e,i),d=this._pop_visuals(e,i,"nonselection_",h,{alpha:.1}),f=c?this._pop_visuals(e,i,"selection_",h):{},p=u?this._pop_visuals(e,i,"hover_",h):{};this._fixup_values(e,a,h),this._fixup_values(e,a,d),this._fixup_values(e,a,f),this._fixup_values(e,a,p),this._fixup_values(e,a,i),o.data=a;const g=(e,t,n)=>new e(Object.assign(Object.assign({},t),n)),m=g(e,i,h),v=g(e,i,d),y=c?g(e,i,f):void 0,b=u?g(e,i,p):void 0,_=new _l({data_source:o,view:s,glyph:m,nonselection_glyph:v,selection_glyph:y,hover_glyph:b});return null!=l&&this._update_legend(l,_),this.add_renderers(_),_}_marker(e,t){return this._glyph(e,"x,y",t)}static _get_range(e){if(null==e)return new hh;if(e instanceof Ms)return e;if(oe(e)){if(k(e,re))return new Ds({factors:e});if(2==e.length){const[t,n]=e;return new Rc({start:t,end:n})}}throw new Error(`unable to determine proper range for: '${e}'`)}static _get_scale(e,t){if(e instanceof hh||e instanceof Rc)switch(t){case null:case"auto":case"linear":case"datetime":case"mercator":return new Lc;case"log":return new Ic}if(e instanceof Ds)return new ch;throw new Error(`unable to determine proper scale for: '${e}'`)}_process_axis_and_grid(e,t,n,r,i,o){const a=this._get_axis(e,i,o);if(null!=a){a instanceof th&&(0==o?this.x_scale=new Ic:this.y_scale=new Ic),a.ticker instanceof rc&&(a.ticker.num_minor_ticks=this._get_num_minor_ticks(a,n)),0!==r.length&&(a.axis_label=r);const e=new bf({dimension:o,ticker:a.ticker});null!==t&&this.add_layout(a,t),this.add_layout(e)}}_get_axis(e,t,n){switch(e){case null:return null;case"linear":return new Cu;case"log":return new th;case"datetime":return new Ku;case"mercator":{const e=new oh,t=0==n?"lon":"lat";return e.ticker.dimension=t,e.formatter.dimension=t,e}case"auto":return t instanceof Ds?new Tu:new Cu;default:throw new Error("shouldn't have happened")}}_get_num_minor_ticks(e,t){if(te(t)){if(t<=1)throw new Error("num_minor_ticks must be > 1");return t}if(null==t)return 0;if("auto"===t)return e instanceof th?10:5;throw new Error("shouldn't have happened")}_process_tools(e){return re(e)&&(e=e.split(/\s*,\s*/).filter((e=>e.length>0))),e.map((e=>re(e)?sg.from_string(e):e))}_process_legend(e,t){let n=null;return null!=e&&(re(e)?(n={value:e},null!=t.columns()&&F(t.columns(),e)&&(n={field:e})):n=e),n}_update_legend(e,t){const{legend:n}=this;let r=!1;for(const i of n.items)if(null!=i.label&&fn(i.label,e)){const e=i.label;if("value"in e){i.renderers.push(t),r=!0;break}if("field"in e&&t.data_source==i.renderers[0].data_source){i.renderers.push(t),r=!0;break}}if(!r){const r=new Gc({label:e,renderers:[t]});n.items.push(r)}}}ob.__name__="Plot";class ab extends Mf{_width_policy(){return"horizontal"==this.model.orientation?super._width_policy():"fixed"}_height_policy(){return"horizontal"==this.model.orientation?"fixed":super._height_policy()}box_sizing(){const e=super.box_sizing();return"horizontal"==this.model.orientation?null==e.width&&(e.width=this.model.default_size):null==e.height&&(e.height=this.model.default_size),e}}ab.__name__="WidgetView";class sb extends Of{constructor(e){super(e)}static init_Widget(){this.define({orientation:[lr,"horizontal"],default_size:[On,300]}),this.override({margin:[5,5,5,5]})}}sb.__name__="Widget",sb.init_Widget();class lb extends ab{connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.disabled,(()=>{for(const e of this.controls())ya(e,"disabled",this.model.disabled)}))}}lb.__name__="ControlView";class cb extends sb{constructor(e){super(e)}}cb.__name__="Control";class ub extends lb{*controls(){yield this.button_el}async lazy_initialize(){await super.lazy_initialize();const{icon:e}=this.model;null!=e&&(this.icon_view=await fl(e,{parent:this}))}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}remove(){null!=this.icon_view&&this.icon_view.remove(),super.remove()}styles(){return[...super.styles(),Vf]}_render_button(...e){return Yo({type:"button",disabled:this.model.disabled,class:[Pf,Ff(this.model.button_type)]},...e)}render(){super.render(),this.button_el=this._render_button(this.model.label),this.button_el.addEventListener("click",(()=>this.click())),null!=this.icon_view&&(ia(this.button_el,this.icon_view.el,document.createTextNode("")),this.icon_view.render()),this.group_el=jo({class:Nf},this.button_el),this.el.appendChild(this.group_el)}click(){}}ub.__name__="AbstractButtonView";class hb extends cb{constructor(e){super(e)}static init_AbstractButton(){this.define({label:[Rn,"Button"],icon:[Mn],button_type:[Hn,"default"]})}}hb.__name__="AbstractButton",hb.init_AbstractButton(),class extends Na{}.__name__="AbstractIconView";class db extends rs{constructor(e){super(e)}}db.__name__="AbstractIcon";const fb='\n.bk-root .bk-input {\n display: inline-block;\n width: 100%;\n flex-grow: 1;\n -webkit-flex-grow: 1;\n min-height: 31px;\n padding: 0 12px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.bk-root .bk-input:focus {\n border-color: #66afe9;\n outline: 0;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.bk-root .bk-input::placeholder,\n.bk-root .bk-input:-ms-input-placeholder,\n.bk-root .bk-input::-moz-placeholder,\n.bk-root .bk-input::-webkit-input-placeholder {\n color: #999;\n opacity: 1;\n}\n.bk-root .bk-input[disabled] {\n cursor: not-allowed;\n background-color: #eee;\n opacity: 1;\n}\n.bk-root select:not([multiple]).bk-input,\n.bk-root select:not([size]).bk-input {\n height: auto;\n appearance: none;\n -webkit-appearance: none;\n background-image: url(\'data:image/svg+xml;utf8,<svg version="1.1" viewBox="0 0 25 20" xmlns="path_to_url"><path d="M 0,0 25,0 12.5,20 Z" fill="black" /></svg>\');\n background-position: right 0.5em center;\n background-size: 8px 6px;\n background-repeat: no-repeat;\n}\n.bk-root select[multiple].bk-input,\n.bk-root select[size].bk-input,\n.bk-root textarea.bk-input {\n height: auto;\n}\n.bk-root .bk-input-group {\n width: 100%;\n height: 100%;\n display: inline-flex;\n display: -webkit-inline-flex;\n flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n align-items: start;\n -webkit-align-items: start;\n flex-direction: column;\n -webkit-flex-direction: column;\n white-space: nowrap;\n}\n.bk-root .bk-input-group.bk-inline {\n flex-direction: row;\n -webkit-flex-direction: row;\n}\n.bk-root .bk-input-group.bk-inline > *:not(:first-child) {\n margin-left: 5px;\n}\n.bk-root .bk-input-group input[type="checkbox"] + span,\n.bk-root .bk-input-group input[type="radio"] + span {\n position: relative;\n top: -2px;\n margin-left: 3px;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper {\n display: inherit;\n width: inherit;\n height: inherit;\n position: relative;\n overflow: hidden;\n padding: 0;\n vertical-align: middle;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper input {\n padding-right: 20px;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn {\n position: absolute;\n display: block;\n height: 50%;\n min-height: 0;\n min-width: 0;\n width: 30px;\n padding: 0;\n margin: 0;\n right: 0;\n border: none;\n background: none;\n cursor: pointer;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn:before {\n content: "";\n display: inline-block;\n transform: translateY(-50%);\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up {\n top: 0;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up:before {\n border-bottom: 5px solid black;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-up:disabled:before {\n border-bottom-color: grey;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down {\n bottom: 0;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down:before {\n border-top: 5px solid black;\n}\n.bk-root .bk-input-group > .bk-spin-wrapper > .bk-spin-btn.bk-spin-btn-down:disabled:before {\n border-top-color: grey;\n}\n',pb="bk-input",gb="bk-input-group";class mb extends lb{*controls(){yield this.input_el}connect_signals(){super.connect_signals(),this.connect(this.model.properties.title.change,(()=>{this.label_el.textContent=this.model.title}))}styles(){return[...super.styles(),fb]}render(){super.render();const{title:e}=this.model;this.label_el=Xo({style:{display:0==e.length?"none":""}},e),this.group_el=jo({class:gb},this.label_el),this.el.appendChild(this.group_el)}change_input(){}}mb.__name__="InputWidgetView";class vb extends cb{constructor(e){super(e)}static init_InputWidget(){this.define({title:[Rn,""]})}}vb.__name__="InputWidget",vb.init_InputWidget();class yb extends mb{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>this.input_el.name=this.model.name||"")),this.connect(this.model.properties.value.change,(()=>this.input_el.value=this.model.value)),this.connect(this.model.properties.value_input.change,(()=>this.input_el.value=this.model.value_input)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled)),this.connect(this.model.properties.placeholder.change,(()=>this.input_el.placeholder=this.model.placeholder))}render(){super.render(),this.input_el=Zo({type:"text",class:pb,name:this.model.name,value:this.model.value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.input_el.addEventListener("change",(()=>this.change_input())),this.input_el.addEventListener("input",(()=>this.change_input_oninput())),this.group_el.appendChild(this.input_el)}change_input(){this.model.value=this.input_el.value,super.change_input()}change_input_oninput(){this.model.value_input=this.input_el.value,super.change_input()}}yb.__name__="TextInputView";class bb extends vb{constructor(e){super(e)}static init_TextInput(){this.prototype.default_view=yb,this.define({value:[Rn,""],value_input:[Rn,""],placeholder:[Rn,""]})}}bb.__name__="TextInput",bb.init_TextInput();class _b extends yb{constructor(){super(...arguments),this._open=!1,this._last_value="",this._hover_index=0}styles(){return[...super.styles(),qf]}render(){super.render(),this.input_el.addEventListener("keydown",(e=>this._keydown(e))),this.input_el.addEventListener("keyup",(e=>this._keyup(e))),this.menu=jo({class:[Bf,cu]}),this.menu.addEventListener("click",(e=>this._menu_click(e))),this.menu.addEventListener("mouseover",(e=>this._menu_hover(e))),this.el.appendChild(this.menu),sa(this.menu)}change_input(){this._open&&this.menu.children.length>0&&(this.model.value=this.menu.children[this._hover_index].textContent,this.input_el.focus(),this._hide_menu())}_update_completions(e){oa(this.menu);for(const t of e){const e=jo({},t);this.menu.appendChild(e)}e.length>0&&this.menu.children[0].classList.add(iu)}_show_menu(){if(!this._open){this._open=!0,this._hover_index=0,this._last_value=this.model.value,aa(this.menu);const e=t=>{const{target:n}=t;n instanceof HTMLElement&&!this.el.contains(n)&&(document.removeEventListener("click",e),this._hide_menu())};document.addEventListener("click",e)}}_hide_menu(){this._open&&(this._open=!1,sa(this.menu))}_menu_click(e){e.target!=e.currentTarget&&e.target instanceof Element&&(this.model.value=e.target.textContent,this.input_el.focus(),this._hide_menu())}_menu_hover(e){if(e.target!=e.currentTarget&&e.target instanceof Element){let t=0;for(t=0;t<this.menu.children.length&&this.menu.children[t].textContent!=e.target.textContent;t++);this._bump_hover(t)}}_bump_hover(e){const t=this.menu.children.length;this._open&&t>0&&(this.menu.children[this._hover_index].classList.remove(iu),this._hover_index=m(e,0,t-1),this.menu.children[this._hover_index].classList.add(iu))}_keydown(e){}_keyup(e){switch(e.keyCode){case ba.Enter:this.change_input();break;case ba.Esc:this._hide_menu();break;case ba.Up:this._bump_hover(this._hover_index-1);break;case ba.Down:this._bump_hover(this._hover_index+1);break;default:{const e=this.input_el.value;if(e.length<this.model.min_characters)return void this._hide_menu();const t=[],{case_sensitive:n}=this.model;let r;r=n?e=>e:e=>e.toLowerCase();for(const n of this.model.completions)r(n).startsWith(r(e))&&t.push(n);this._update_completions(t),0==t.length?this._hide_menu():this._show_menu()}}}}_b.__name__="AutocompleteInputView";class xb extends bb{constructor(e){super(e)}static init_AutocompleteInput(){this.prototype.default_view=_b,this.define({completions:[Sn,[]],min_characters:[Ln,2],case_sensitive:[En,!0]})}}xb.__name__="AutocompleteInput",xb.init_AutocompleteInput();class wb extends ub{click(){this.model.trigger_event(new zg),super.click()}}wb.__name__="ButtonView";class Ab extends hb{constructor(e){super(e)}static init_Button(){this.prototype.default_view=wb,this.override({label:"Button"})}}Ab.__name__="Button",Ab.init_Button();class kb extends lb{*controls(){yield*this._buttons}connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.button_type,(()=>this.render())),this.on_change(e.labels,(()=>this.render())),this.on_change(e.active,(()=>this._update_active()))}styles(){return[...super.styles(),Vf]}render(){super.render(),this._buttons=this.model.labels.map(((e,t)=>{const n=jo({class:[Pf,Ff(this.model.button_type)],disabled:this.model.disabled},e);return n.addEventListener("click",(()=>this.change_active(t))),n})),this._update_active();const e=jo({class:Nf},this._buttons);this.el.appendChild(e)}}kb.__name__="ButtonGroupView";class Tb extends cb{constructor(e){super(e)}static init_ButtonGroup(){this.define({labels:[Sn,[]],button_type:[Hn,"default"]})}}Tb.__name__="ButtonGroup",Tb.init_ButtonGroup();class Sb extends kb{get active(){return new Set(this.model.active)}change_active(e){const{active:t}=this;t.has(e)?t.delete(e):t.add(e),this.model.active=[...t].sort()}_update_active(){const{active:e}=this;this._buttons.forEach(((t,n)=>{va(t).toggle(iu,e.has(n))}))}}Sb.__name__="CheckboxButtonGroupView";class Eb extends Tb{constructor(e){super(e)}static init_CheckboxButtonGroup(){this.prototype.default_view=Sb,this.define({active:[Sn,[]]})}}Eb.__name__="CheckboxButtonGroup",Eb.init_CheckboxButtonGroup();class Cb extends lb{*controls(){yield*this._inputs}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render()))}styles(){return[...super.styles(),fb]}}Cb.__name__="InputGroupView";class Mb extends cb{constructor(e){super(e)}}Mb.__name__="InputGroup";class Ob extends Cb{render(){super.render();const e=jo({class:[gb,this.model.inline?ou:null]});this.el.appendChild(e);const{active:t,labels:n}=this.model;this._inputs=[];for(let r=0;r<n.length;r++){const i=Zo({type:"checkbox",value:`${r}`});i.addEventListener("change",(()=>this.change_active(r))),this._inputs.push(i),this.model.disabled&&(i.disabled=!0),F(t,r)&&(i.checked=!0);const o=Xo({},i,Uo({},n[r]));e.appendChild(o)}}change_active(e){const t=new Set(this.model.active);t.has(e)?t.delete(e):t.add(e),this.model.active=[...t].sort()}}Ob.__name__="CheckboxGroupView";class Lb extends Mb{constructor(e){super(e)}static init_CheckboxGroup(){this.prototype.default_view=Ob,this.define({active:[Sn,[]],labels:[Sn,[]],inline:[En,!1]})}}Lb.__name__="CheckboxGroup",Lb.init_CheckboxGroup();class Db extends mb{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>this.input_el.name=this.model.name||"")),this.connect(this.model.properties.color.change,(()=>this.input_el.value=this.model.color)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled))}render(){super.render(),this.input_el=Zo({type:"color",class:pb,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener("change",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){this.model.color=this.input_el.value,super.change_input()}}Db.__name__="ColorPickerView";class Ib extends vb{constructor(e){super(e)}static init_ColorPicker(){this.prototype.default_view=Db,this.define({color:[Cn,"#000000"]})}}Ib.__name__="ColorPicker",Ib.init_ColorPicker();const Rb=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Pb={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:e=>"undefined"!=typeof console&&console.warn(e),getWeek:e=>{const t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='path_to_url xmlns:xlink='path_to_url viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='path_to_url xmlns:xlink='path_to_url viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Nb={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:e=>{const t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zb=Nb,Fb=(e,t=2)=>`000${e}`.slice(-1*t),Bb=e=>!0===e?1:0;function jb(e,t){let n;return function(){clearTimeout(n),n=setTimeout((()=>e.apply(this,arguments)),t)}}const Ub=e=>e instanceof Array?e:[e];function Vb(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function qb(e,t,n){const r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function Hb(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function $b(e,t){return t(e)?e:e.parentNode?$b(e.parentNode,t):void 0}function Wb(e,t){const n=qb("div","numInputWrapper"),r=qb("input","numInput "+e),i=qb("span","arrowUp"),o=qb("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(const e in t)r.setAttribute(e,t[e]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Gb(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}const Yb=()=>{},Xb=(e,t,n)=>n.months[t?"shorthand":"longhand"][e],Zb={D:Yb,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:(e,t)=>{e.setHours(parseFloat(t))},H:(e,t)=>{e.setHours(parseFloat(t))},J:(e,t)=>{e.setDate(parseFloat(t))},K:(e,t,n)=>{e.setHours(e.getHours()%12+12*Bb(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:(e,t)=>{e.setSeconds(parseFloat(t))},U:(e,t)=>new Date(1e3*parseFloat(t)),W:function(e,t,n){const r=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:(e,t)=>{e.setFullYear(parseFloat(t))},Z:(e,t)=>new Date(t),d:(e,t)=>{e.setDate(parseFloat(t))},h:(e,t)=>{e.setHours(parseFloat(t))},i:(e,t)=>{e.setMinutes(parseFloat(t))},j:(e,t)=>{e.setDate(parseFloat(t))},l:Yb,m:(e,t)=>{e.setMonth(parseFloat(t)-1)},n:(e,t)=>{e.setMonth(parseFloat(t)-1)},s:(e,t)=>{e.setSeconds(parseFloat(t))},u:(e,t)=>new Date(parseFloat(t)),w:Yb,y:(e,t)=>{e.setFullYear(2e3+parseFloat(t))}},Kb={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Jb={Z:e=>e.toISOString(),D:function(e,t,n){return t.weekdays.shorthand[Jb.w(e,t,n)]},F:function(e,t,n){return Xb(Jb.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Fb(Jb.h(e,t,n))},H:e=>Fb(e.getHours()),J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:(e,t)=>t.amPM[Bb(e.getHours()>11)],M:function(e,t){return Xb(e.getMonth(),!0,t)},S:e=>Fb(e.getSeconds()),U:e=>e.getTime()/1e3,W:function(e,t,n){return n.getWeek(e)},Y:e=>Fb(e.getFullYear(),4),d:e=>Fb(e.getDate()),h:e=>e.getHours()%12?e.getHours()%12:12,i:e=>Fb(e.getMinutes()),j:e=>e.getDate(),l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:e=>Fb(e.getMonth()+1),n:e=>e.getMonth()+1,s:e=>e.getSeconds(),u:e=>e.getTime(),w:e=>e.getDay(),y:e=>String(e.getFullYear()).substring(2)},Qb=({config:e=Pb,l10n:t=Nb,isMobile:n=!1})=>(r,i,o)=>{const a=o||t;return void 0===e.formatDate||n?i.split("").map(((t,n,i)=>Jb[t]&&"\\"!==i[n-1]?Jb[t](r,a,e):"\\"!==t?t:"")).join(""):e.formatDate(r,i,a)},e_=({config:e=Pb,l10n:t=Nb})=>(n,r,i,o)=>{if(0!==n&&!n)return;const a=o||t;let s;const l=n;if(n instanceof Date)s=new Date(n.getTime());else if("string"!=typeof n&&void 0!==n.toFixed)s=new Date(n);else if("string"==typeof n){const t=r||(e||Pb).dateFormat,o=String(n).trim();if("today"===o)s=new Date,i=!0;else if(/Z$/.test(o)||/GMT$/.test(o))s=new Date(n);else if(e&&e.parseDate)s=e.parseDate(n,t);else{s=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);let r,i=[];for(let e=0,o=0,l="";e<t.length;e++){const c=t[e],u="\\"===c,h="\\"===t[e-1]||u;if(Kb[c]&&!h){l+=Kb[c];const e=new RegExp(l).exec(n);e&&(r=!0)&&i["Y"!==c?"push":"unshift"]({fn:Zb[c],val:e[++o]})}else u||(l+=".");i.forEach((({fn:e,val:t})=>s=e(s,t,a)||s))}s=r?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===i&&s.setHours(0,0,0,0),s;e.errorHandler(new Error(`Invalid date provided: ${l}`))};function t_(e,t,n=!0){return!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function n_(e){let t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(void 0!==e.minDate){const i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(void 0!==e.maxDate){const i=e.maxDate.getHours(),o=e.maxDate.getMinutes();t=Math.min(t,i),t===i&&(n=Math.min(o,n)),t===i&&n===o&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}function r_(e,t){const n={config:Object.assign(Object.assign({},Pb),o_.defaultConfig),l10n:zb};function r(e){return e.bind(n)}function i(){const e=n.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){const t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+"px",n.calendarContainer.style.width=t+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function o(e){if(0===n.selectedDates.length){const e=void 0===n.config.minDate||t_(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),t=n_(n.config);e.setHours(t.hours,t.minutes,t.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();const t="keydown"===e.type,r=Gb(e),i=r;void 0!==n.amPM&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[Bb(n.amPM.textContent===n.l10n.amPM[0])]);const o=parseFloat(i.getAttribute("min")),a=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),l=parseInt(i.value,10);let c=l+s*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==i.value&&2===i.value.length){const e=i===n.hourElement,t=i===n.minuteElement;c<o?(c=a+c+Bb(!e)+(Bb(e)&&Bb(!n.amPM)),t&&p(void 0,-1,n.hourElement)):c>a&&(c=i===n.hourElement?c-a-Bb(!n.amPM):o,t&&p(void 0,1,n.hourElement)),n.amPM&&e&&(1===s?c+l===23:Math.abs(c-l)>s)&&(n.amPM.textContent=n.l10n.amPM[Bb(n.amPM.textContent===n.l10n.amPM[0])]),i.value=Fb(c)}}(e);const t=n._input.value;a(),K(),n._input.value!==t&&n._debouncedChange()}function a(){if(void 0===n.hourElement||void 0===n.minuteElement)return;let e=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(n.minuteElement.value,10)||0)%60,r=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;var i,o;void 0!==n.amPM&&(i=e,o=n.amPM.textContent,e=i%12+12*Bb(o===n.l10n.amPM[1]));const a=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===t_(n.latestSelectedDateObj,n.config.minDate,!0);if(void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===t_(n.latestSelectedDateObj,n.config.maxDate,!0)){const i=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;e=Math.min(e,i.getHours()),e===i.getHours()&&(t=Math.min(t,i.getMinutes())),t===i.getMinutes()&&(r=Math.min(r,i.getSeconds()))}if(a){const i=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;e=Math.max(e,i.getHours()),e===i.getHours()&&t<i.getMinutes()&&(t=i.getMinutes()),t===i.getMinutes()&&(r=Math.max(r,i.getSeconds()))}l(e,t,r)}function s(e){const t=e||n.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function l(e,t,r){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(e%24,t,r||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=Fb(n.config.time_24hr?e:(12+e)%12+12*Bb(e%12==0)),n.minuteElement.value=Fb(t),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[Bb(e>=12)]),void 0!==n.secondElement&&(n.secondElement.value=Fb(r)))}function c(e){const t=Gb(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&M(n)}function u(e,t,r,i){return t instanceof Array?t.forEach((t=>u(e,t,r,i))):e instanceof Array?e.forEach((e=>u(e,t,r,i))):(e.addEventListener(t,r,i),void n._handlers.push({remove:()=>e.removeEventListener(t,r)}))}function h(){W("onChange")}function d(e,t){const r=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),i=n.currentYear,o=n.currentMonth;try{void 0!==r&&(n.currentYear=r.getFullYear(),n.currentMonth=r.getMonth())}catch(e){e.message="Invalid date supplied: "+r,n.config.errorHandler(e)}t&&n.currentYear!==i&&(W("onYearChange"),x()),!t||n.currentYear===i&&n.currentMonth===o||W("onMonthChange"),n.redraw()}function f(e){const t=Gb(e);~t.className.indexOf("arrow")&&p(e,t.classList.contains("arrowUp")?1:-1)}function p(e,t,n){const r=e&&Gb(e),i=n||r&&r.parentNode&&r.parentNode.firstChild,o=G("increment");o.delta=t,i&&i.dispatchEvent(o)}function g(e,t,r,i){const o=O(t,!0),a=qb("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=i,a.setAttribute("aria-label",n.formatDate(t,n.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===t_(t,n.now)&&(n.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,Y(t)&&(a.classList.add("selected"),n.selectedDateElem=a,"range"===n.config.mode&&(Vb(a,"startRange",n.selectedDates[0]&&0===t_(t,n.selectedDates[0],!0)),Vb(a,"endRange",n.selectedDates[1]&&0===t_(t,n.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("flatpickr-disabled"),"range"===n.config.mode&&function(e){return!("range"!==n.config.mode||n.selectedDates.length<2)&&t_(e,n.selectedDates[0])>=0&&t_(e,n.selectedDates[1])<=0}(t)&&!Y(t)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&r%7==1&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(t)+"</span>"),W("onDayCreate",a),a}function m(e){e.focus(),"range"===n.config.mode&&R(e)}function v(e){const t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1;for(let i=t;i!=r;i+=e){const t=n.daysContainer.children[i],r=e>0?0:t.children.length-1,o=e>0?t.children.length:-1;for(let n=r;n!=o;n+=e){const e=t.children[n];if(-1===e.className.indexOf("hidden")&&O(e.dateObj))return e}}}function y(e,t){const r=L(document.activeElement||document.body),i=void 0!==e?e:r?document.activeElement:void 0!==n.selectedDateElem&&L(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&L(n.todayDateElem)?n.todayDateElem:v(t>0?1:-1);void 0===i?n._input.focus():r?function(e,t){const r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,o=t>0?1:-1;for(let a=r-n.currentMonth;a!=i;a+=o){const i=n.daysContainer.children[a],s=r-n.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length;for(let n=s;n>=0&&n<l&&n!=(t>0?l:-1);n+=o){const r=i.children[n];if(-1===r.className.indexOf("hidden")&&O(r.dateObj)&&Math.abs(e.$i-n)>=Math.abs(t))return m(r)}}n.changeMonth(o),y(v(o),0)}(i,t):m(i)}function b(e,t){const r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),o=n.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",c=s?"nextMonthDay hidden":"nextMonthDay";let u=i+1-r,h=0;for(;u<=i;u++,h++)a.appendChild(g(l,new Date(e,t-1,u),u,h));for(u=1;u<=o;u++,h++)a.appendChild(g("",new Date(e,t,u),u,h));for(let i=o+1;i<=42-r&&(1===n.config.showMonths||h%7!=0);i++,h++)a.appendChild(g(c,new Date(e,t+1,i%o),i,h));const d=qb("div","dayContainer");return d.appendChild(a),d}function _(){if(void 0===n.daysContainer)return;Hb(n.daysContainer),n.weekNumbers&&Hb(n.weekNumbers);const e=document.createDocumentFragment();for(let t=0;t<n.config.showMonths;t++){const r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),e.appendChild(b(r.getFullYear(),r.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&R()}function x(){if(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)return;const e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth()||void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(let t=0;t<12;t++){if(!e(t))continue;const r=qb("option","flatpickr-monthDropdown-month");r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=Xb(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}function w(){const e=qb("div","flatpickr-month"),t=window.document.createDocumentFragment();let r;n.config.showMonths>1||"static"===n.config.monthSelectorType?r=qb("span","cur-month"):(n.monthsDropdownContainer=qb("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),u(n.monthsDropdownContainer,"change",(e=>{const t=Gb(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),W("onMonthChange")})),x(),r=n.monthsDropdownContainer);const i=Wb("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());const a=qb("div","flatpickr-current-month");return a.appendChild(r),a.appendChild(i),t.appendChild(a),e.appendChild(t),{container:e,yearElement:o,monthElement:r}}function A(){Hb(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(let e=n.config.showMonths;e--;){const e=w();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function k(){n.weekdayContainer?Hb(n.weekdayContainer):n.weekdayContainer=qb("div","flatpickr-weekdays");for(let e=n.config.showMonths;e--;){const e=qb("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return T(),n.weekdayContainer}function T(){if(!n.weekdayContainer)return;const e=n.l10n.firstDayOfWeek;let t=[...n.l10n.weekdays.shorthand];e>0&&e<t.length&&(t=[...t.splice(e,t.length),...t.splice(0,e)]);for(let e=n.config.showMonths;e--;)n.weekdayContainer.children[e].innerHTML=`\n <span class='flatpickr-weekday'>\n ${t.join("</span><span class='flatpickr-weekday'>")}\n </span>\n `}function S(e,t=!0){const r=t?e:e-n.currentMonth;r<0&&!0===n._hidePrevMonthArrow||r>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,W("onYearChange"),x()),_(),W("onMonthChange"),X())}function E(e){return!(!n.config.appendTo||!n.config.appendTo.contains(e))||n.calendarContainer.contains(e)}function C(e){if(n.isOpen&&!n.config.inline){const t=Gb(e),r=E(t),i=t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)),a="blur"===e.type?i&&e.relatedTarget&&!E(e.relatedTarget):!i&&!r&&!E(e.relatedTarget),s=!n.config.ignoredFocusElements.some((e=>e.contains(t)));a&&s&&(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&o(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&(n.clear(!1),n.redraw()))}}function M(e){if(!e||n.config.minDate&&e<n.config.minDate.getFullYear()||n.config.maxDate&&e>n.config.maxDate.getFullYear())return;const t=e,r=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),r&&(n.redraw(),W("onYearChange"),x())}function O(e,t=!0){var r;const i=n.parseDate(e,void 0,t);if(n.config.minDate&&i&&t_(i,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&i&&t_(i,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===i)return!1;const o=!!n.config.enable,a=null!==(r=n.config.enable)&&void 0!==r?r:n.config.disable;for(let e,t=0;t<a.length;t++){if(e=a[t],"function"==typeof e&&e(i))return o;if(e instanceof Date&&void 0!==i&&e.getTime()===i.getTime())return o;if("string"==typeof e){const t=n.parseDate(e,void 0,!0);return t&&t.getTime()===i.getTime()?o:!o}if("object"==typeof e&&void 0!==i&&e.from&&e.to&&i.getTime()>=e.from.getTime()&&i.getTime()<=e.to.getTime())return o}return!o}function L(e){return void 0!==n.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e)}function D(e){e.target!==n._input||!(n.selectedDates.length>0||n._input.value.length>0)||e.relatedTarget&&E(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function I(t){const r=Gb(t),i=n.config.wrap?e.contains(r):r===n._input,s=n.config.allowInput,l=n.isOpen&&(!s||!i),c=n.config.inline&&i&&!s;if(13===t.keyCode&&i){if(s)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),r.blur();n.open()}else if(E(r)||l||c){const e=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:e?(t.preventDefault(),o(),U()):V(t);break;case 27:t.preventDefault(),U();break;case 8:case 46:i&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(e||i)n.hourElement&&n.hourElement.focus();else if(t.preventDefault(),void 0!==n.daysContainer&&(!1===s||document.activeElement&&L(document.activeElement))){const e=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),S(e),y(v(1),0)):y(void 0,e)}break;case 38:case 40:t.preventDefault();const a=40===t.keyCode?1:-1;n.daysContainer&&void 0!==r.$i||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),M(n.currentYear-a),y(v(1),0)):e||y(void 0,7*a):r===n.currentYearElement?M(n.currentYear-a):n.config.enableTime&&(!e&&n.hourElement&&n.hourElement.focus(),o(t),n._debouncedChange());break;case 9:if(e){const e=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((e=>e)),i=e.indexOf(r);if(-1!==i){const r=e[i+(t.shiftKey?-1:1)];t.preventDefault(),(r||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&r===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],a(),K();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],a(),K()}(i||E(r))&&W("onKeyDown",t)}function R(e){if(1!==n.selectedDates.length||e&&(!e.classList.contains("flatpickr-day")||e.classList.contains("flatpickr-disabled")))return;const t=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),r=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,n.selectedDates[0].getTime()),o=Math.max(t,n.selectedDates[0].getTime());let a=!1,s=0,l=0;for(let e=i;e<o;e+=864e5)O(new Date(e),!0)||(a=a||e>i&&e<o,e<r&&(!s||e>s)?s=e:e>r&&(!l||e<l)&&(l=e));for(let i=0;i<n.config.showMonths;i++){const o=n.daysContainer.children[i];for(let i=0,d=o.children.length;i<d;i++){const d=o.children[i],f=d.dateObj.getTime(),p=s>0&&f<s||l>0&&f>l;p?(d.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((e=>{d.classList.remove(e)}))):a&&!p||(["startRange","inRange","endRange","notAllowed"].forEach((e=>{d.classList.remove(e)})),void 0!==e&&(e.classList.add(t<=n.selectedDates[0].getTime()?"startRange":"endRange"),r<t&&f===r?d.classList.add("startRange"):r>t&&f===r&&d.classList.add("endRange"),f>=s&&(0===l||f<=l)&&(u=r,h=t,(c=f)>Math.min(u,h)&&c<Math.max(u,h))&&d.classList.add("inRange")))}}var c,u,h}function P(){!n.isOpen||n.config.static||n.config.inline||B()}function N(e){return t=>{const r=n.config[`_${e}Date`]=n.parseDate(t,n.config.dateFormat),i=n.config[`_${"min"===e?"max":"min"}Date`];void 0!==r&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=r.getHours()>0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((e=>O(e))),n.selectedDates.length||"min"!==e||s(r),K()),n.daysContainer&&(j(),void 0!==r?n.currentYearElement[e]=r.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!i&&void 0!==r&&i.getFullYear()===r.getFullYear())}}function z(){return n.config.wrap?e.querySelector("[data-input]"):e}function F(){"object"!=typeof n.config.locale&&void 0===o_.l10ns[n.config.locale]&&n.config.errorHandler(new Error(`flatpickr: invalid locale ${n.config.locale}`)),n.l10n=Object.assign(Object.assign({},o_.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?o_.l10ns[n.config.locale]:void 0),Kb.K=`(${n.l10n.amPM[0]}|${n.l10n.amPM[1]}|${n.l10n.amPM[0].toLowerCase()}|${n.l10n.amPM[1].toLowerCase()})`,void 0===Object.assign(Object.assign({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===o_.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=Qb(n),n.parseDate=e_({config:n.config,l10n:n.l10n})}function B(e){if("function"==typeof n.config.position)return void n.config.position(n,e);if(void 0===n.calendarContainer)return;W("onPreCalendarPosition");const t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,((e,t)=>e+t.offsetHeight),0),i=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),a=o[0],s=o.length>1?o[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===a||"below"!==a&&c<r&&l.top>r,h=window.pageYOffset+l.top+(u?-r-2:t.offsetHeight+2);if(Vb(n.calendarContainer,"arrowTop",!u),Vb(n.calendarContainer,"arrowBottom",u),n.config.inline)return;let d=window.pageXOffset+l.left,f=!1,p=!1;"center"===s?(d-=(i-l.width)/2,f=!0):"right"===s&&(d-=i-l.width,p=!0),Vb(n.calendarContainer,"arrowLeft",!f&&!p),Vb(n.calendarContainer,"arrowCenter",f),Vb(n.calendarContainer,"arrowRight",p);const g=window.document.body.offsetWidth-(window.pageXOffset+l.right),m=d+i>window.document.body.offsetWidth,v=g+i>window.document.body.offsetWidth;if(Vb(n.calendarContainer,"rightMost",m),!n.config.static)if(n.calendarContainer.style.top=`${h}px`,m)if(v){const e=function(){let e=null;for(let t=0;t<document.styleSheets.length;t++){const n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:function(){const e=document.createElement("style");return document.head.appendChild(e),e.sheet}()}();if(void 0===e)return;const t=window.document.body.offsetWidth,r=Math.max(0,t/2-i/2),o=".flatpickr-calendar.centerMost:before",a=".flatpickr-calendar.centerMost:after",s=e.cssRules.length,c=`{left:${l.left}px;right:auto;}`;Vb(n.calendarContainer,"rightMost",!1),Vb(n.calendarContainer,"centerMost",!0),e.insertRule(`${o},${a}${c}`,s),n.calendarContainer.style.left=`${r}px`,n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=`${g}px`;else n.calendarContainer.style.left=`${d}px`,n.calendarContainer.style.right="auto"}function j(){n.config.noCalendar||n.isMobile||(x(),X(),_())}function U(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function V(e){e.preventDefault(),e.stopPropagation();const t=$b(Gb(e),(e=>e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")));if(void 0===t)return;const r=t,i=n.latestSelectedDateObj=new Date(r.dateObj.getTime()),o=(i.getMonth()<n.currentMonth||i.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[i];else if("multiple"===n.config.mode){const e=Y(i);e?n.selectedDates.splice(parseInt(e),1):n.selectedDates.push(i)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=i,n.selectedDates.push(i),0!==t_(i,n.selectedDates[0],!0)&&n.selectedDates.sort(((e,t)=>e.getTime()-t.getTime())));if(a(),o){const e=n.currentYear!==i.getFullYear();n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth(),e&&(W("onYearChange"),x()),W("onMonthChange")}if(X(),_(),K(),o||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():m(r),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){const e="single"===n.config.mode&&!n.config.enableTime,t="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(e||t)&&U()}h()}n.parseDate=e_({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=u,n._setHoursFromDate=s,n._positionCalendar=B,n.changeMonth=S,n.changeYear=M,n.clear=function(e=!0,t=!0){if(n.input.value="",void 0!==n.altInput&&(n.altInput.value=""),void 0!==n.mobileInput&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),!0===n.config.enableTime){const{hours:e,minutes:t,seconds:r}=n_(n.config);l(e,t,r)}n.redraw(),e&&W("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active")),W("onClose")},n._createElement=qb,n.destroy=function(){void 0!==n.config&&W("onDestroy");for(let e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){const e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((e=>{try{delete n[e]}catch(e){}}))},n.isEnabled=O,n.jumpToDate=d,n.open=function(e,t=n._positionElement){if(!0===n.isMobile){if(e){e.preventDefault();const t=Gb(e);t&&t.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void W("onOpen")}if(n._input.disabled||n.config.inline)return;const r=n.isOpen;n.isOpen=!0,r||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),W("onOpen"),B(t)),!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((()=>n.hourElement.select()),50))},n.redraw=j,n.set=function(e,t){if(null!==e&&"object"==typeof e){Object.assign(n.config,e);for(const t in e)void 0!==q[t]&&q[t].forEach((e=>e()))}else n.config[e]=t,void 0!==q[e]?q[e].forEach((e=>e())):Rb.indexOf(e)>-1&&(n.config[e]=Ub(t));n.redraw(),K(!0)},n.setDate=function(e,t=!1,r=n.config.dateFormat){if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);H(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),d(void 0,t),s(),0===n.selectedDates.length&&n.clear(!1),K(t),t&&W("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};const q={locale:[F,T],showMonths:[A,i,k],minDate:[d],maxDate:[d],clickOpens:[()=>{!0===n.config.clickOpens?(u(n._input,"focus",n.open),u(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function H(e,t){let r=[];if(e instanceof Array)r=e.map((e=>n.parseDate(e,t)));else if(e instanceof Date||"number"==typeof e)r=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":r=[n.parseDate(e,t)];break;case"multiple":r=e.split(n.config.conjunction).map((e=>n.parseDate(e,t)));break;case"range":r=e.split(n.l10n.rangeSeparator).map((e=>n.parseDate(e,t)))}else n.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(e)}`));n.selectedDates=n.config.allowInvalidPreload?r:r.filter((e=>e instanceof Date&&O(e,!1))),"range"===n.config.mode&&n.selectedDates.sort(((e,t)=>e.getTime()-t.getTime()))}function $(e){return e.slice().map((e=>"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e)).filter((e=>e))}function W(e,t){if(void 0===n.config)return;const r=n.config[e];if(void 0!==r&&r.length>0)for(let e=0;r[e]&&e<r.length;e++)r[e](n.selectedDates,n.input.value,n,t);"onChange"===e&&(n.input.dispatchEvent(G("change")),n.input.dispatchEvent(G("input")))}function G(e){const t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Y(e){for(let t=0;t<n.selectedDates.length;t++)if(0===t_(n.selectedDates[t],e))return""+t;return!1}function X(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(((e,t)=>{const r=new Date(n.currentYear,n.currentMonth,1);r.setMonth(n.currentMonth+t),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=Xb(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Z(e){return n.selectedDates.map((t=>n.formatDate(t,e))).filter(((e,t,r)=>"range"!==n.config.mode||n.config.enableTime||r.indexOf(e)===t)).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function K(e=!0){void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Z(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Z(n.config.altFormat)),!1!==e&&W("onValueUpdate")}function J(e){const t=Gb(e),r=n.prevMonthNav.contains(t),i=n.nextMonthNav.contains(t);r||i?S(r?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){const i=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),a={};n.config.parseDate=o.parseDate,n.config.formatDate=o.formatDate,Object.defineProperty(n.config,"enable",{get:()=>n.config._enable,set:e=>{n.config._enable=$(e)}}),Object.defineProperty(n.config,"disable",{get:()=>n.config._disable,set:e=>{n.config._disable=$(e)}});const s="time"===o.mode;if(!o.dateFormat&&(o.enableTime||s)){const e=o_.defaultConfig.dateFormat||Pb.dateFormat;a.dateFormat=o.noCalendar||s?"H:i"+(o.enableSeconds?":S":""):e+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||s)&&!o.altFormat){const e=o_.defaultConfig.altFormat||Pb.altFormat;a.altFormat=o.noCalendar||s?"h:i"+(o.enableSeconds?":S K":" K"):e+` h:i${o.enableSeconds?":S":""} K`}Object.defineProperty(n.config,"minDate",{get:()=>n.config._minDate,set:N("min")}),Object.defineProperty(n.config,"maxDate",{get:()=>n.config._maxDate,set:N("max")});const l=e=>t=>{n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")};Object.defineProperty(n.config,"minTime",{get:()=>n.config._minTime,set:l("min")}),Object.defineProperty(n.config,"maxTime",{get:()=>n.config._maxTime,set:l("max")}),"time"===o.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,a,o);for(let e=0;e<i.length;e++)n.config[i[e]]=!0===n.config[i[e]]||"true"===n.config[i[e]];Rb.filter((e=>void 0!==n.config[e])).forEach((e=>{n.config[e]=Ub(n.config[e]||[]).map(r)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let e=0;e<n.config.plugins.length;e++){const t=n.config.plugins[e](n)||{};for(const e in t)Rb.indexOf(e)>-1?n.config[e]=Ub(t[e]).map(r).concat(n.config[e]):void 0===o[e]&&(n.config[e]=t[e])}o.altInputClass||(n.config.altInputClass=z().className+" "+n.config.altInputClass),W("onParseConfig")}(),F(),n.input=z(),n.input?(n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=qb(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),n._positionElement=n.config.positionElement||n._input):n.config.errorHandler(new Error("Invalid input element specified")),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;const e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&H(e,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:(e=n.currentMonth,t=n.currentYear)=>1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]},n.isMobile||function(){const e=window.document.createDocumentFragment();if(n.calendarContainer=qb("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=qb("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=qb("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=qb("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,A(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:()=>n.__hidePrevMonthArrow,set(e){n.__hidePrevMonthArrow!==e&&(Vb(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:()=>n.__hideNextMonthArrow,set(e){n.__hideNextMonthArrow!==e&&(Vb(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],X(),n.monthNav)),n.innerContainer=qb("div","flatpickr-innerContainer"),n.config.weekNumbers){const{weekWrapper:e,weekNumbers:t}=function(){n.calendarContainer.classList.add("hasWeeks");const e=qb("div","flatpickr-weekwrapper");e.appendChild(qb("span","flatpickr-weekday",n.l10n.weekAbbreviation));const t=qb("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}();n.innerContainer.appendChild(e),n.weekNumbers=t,n.weekWrapper=e}n.rContainer=qb("div","flatpickr-rContainer"),n.rContainer.appendChild(k()),n.daysContainer||(n.daysContainer=qb("div","flatpickr-days"),n.daysContainer.tabIndex=-1),_(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");const e=n_(n.config);n.timeContainer=qb("div","flatpickr-time"),n.timeContainer.tabIndex=-1;const t=qb("span","flatpickr-time-separator",":"),r=Wb("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName("input")[0];const i=Wb("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=i.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Fb(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=Fb(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");const t=Wb("flatpickr-second");n.secondElement=t.getElementsByTagName("input")[0],n.secondElement.value=Fb(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(qb("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(t)}return n.config.time_24hr||(n.amPM=qb("span","flatpickr-am-pm",n.l10n.amPM[Bb((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}()),Vb(n.calendarContainer,"rangeMode","range"===n.config.mode),Vb(n.calendarContainer,"animate",!0===n.config.animate),Vb(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);const t=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!t&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){const e=qb("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(e,n.element),e.appendChild(n.element),n.altInput&&e.appendChild(n.altInput),e.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){if(n.config.wrap&&["open","close","toggle","clear"].forEach((e=>{Array.prototype.forEach.call(n.element.querySelectorAll(`[data-${e}]`),(t=>u(t,"click",n[e])))})),n.isMobile)return void function(){const e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=qb("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(e){}u(n.mobileInput,"change",(e=>{n.setDate(Gb(e).value,!1,n.mobileFormatStr),W("onChange"),W("onClose")}))}();const e=jb(P,50);if(n._debouncedChange=jb(h,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&u(n.daysContainer,"mouseover",(e=>{"range"===n.config.mode&&R(Gb(e))})),u(window.document.body,"keydown",I),n.config.inline||n.config.static||u(window,"resize",e),void 0!==window.ontouchstart?u(window.document,"touchstart",C):u(window.document,"mousedown",C),u(window.document,"focus",C,{capture:!0}),!0===n.config.clickOpens&&(u(n._input,"focus",n.open),u(n._input,"click",n.open)),void 0!==n.daysContainer&&(u(n.monthNav,"click",J),u(n.monthNav,["keyup","increment"],c),u(n.daysContainer,"click",V)),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){const e=e=>Gb(e).select();u(n.timeContainer,["increment"],o),u(n.timeContainer,"blur",o,{capture:!0}),u(n.timeContainer,"click",f),u([n.hourElement,n.minuteElement],["focus","click"],e),void 0!==n.secondElement&&u(n.secondElement,"focus",(()=>n.secondElement&&n.secondElement.select())),void 0!==n.amPM&&u(n.amPM,"click",(e=>{o(e),h()}))}n.config.allowInput&&u(n._input,"blur",D)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&s(n.config.noCalendar?n.latestSelectedDateObj:void 0),K(!1)),i();const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&a&&B(),W("onReady")}(),n}function i_(e,t){const n=Array.prototype.slice.call(e).filter((e=>e instanceof HTMLElement)),r=[];for(let e=0;e<n.length;e++){const i=n[e];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=r_(i,t||{}),r.push(i._flatpickr)}catch(e){console.error(e)}}return 1===r.length?r[0]:r}n(51919),"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return i_(this,e)},HTMLElement.prototype.flatpickr=function(e){return i_([this],e)});var o_=function(e,t){return"string"==typeof e?i_(window.document.querySelectorAll(e),t):e instanceof Node?i_([e],t):i_(e,t)};o_.defaultConfig={},o_.l10ns={en:Object.assign({},zb),default:Object.assign({},zb)},o_.localize=e=>{o_.l10ns.default=Object.assign(Object.assign({},o_.l10ns.default),e)},o_.setDefaults=e=>{o_.defaultConfig=Object.assign(Object.assign({},o_.defaultConfig),e)},o_.parseDate=e_({}),o_.formatDate=Qb({}),o_.compareDates=t_,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return i_(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=o_);const a_=o_;function s_(e){const t=[];for(const n of e)if(re(n))t.push(n);else{const[e,r]=n;t.push({from:e,to:r})}return t}class l_ extends mb{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:n,disabled_dates:r,enabled_dates:i,position:o,inline:a}=this.model.properties;this.connect(e.change,(()=>{var t;return null===(t=this._picker)||void 0===t?void 0:t.setDate(e.value())})),this.connect(t.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("minDate",t.value())})),this.connect(n.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("maxDate",n.value())})),this.connect(r.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("disable",r.value())})),this.connect(i.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("enable",i.value())})),this.connect(o.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("position",o.value())})),this.connect(a.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("inline",a.value())}))}remove(){var e;null===(e=this._picker)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),'\n.flatpickr-calendar {\n background: transparent;\n opacity: 0;\n display: none;\n text-align: center;\n visibility: hidden;\n padding: 0;\n -webkit-animation: none;\n animation: none;\n direction: ltr;\n border: 0;\n font-size: 14px;\n line-height: 24px;\n border-radius: 5px;\n position: absolute;\n width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n background: #fff;\n -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);\n box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);\n}\n.flatpickr-calendar.open,\n.flatpickr-calendar.inline {\n opacity: 1;\n max-height: 640px;\n visibility: visible;\n}\n.flatpickr-calendar.open {\n display: inline-block;\n z-index: 99999;\n}\n.flatpickr-calendar.animate.open {\n -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.flatpickr-calendar.inline {\n display: block;\n position: relative;\n top: 2px;\n}\n.flatpickr-calendar.static {\n position: absolute;\n top: calc(100% + 2px);\n}\n.flatpickr-calendar.static.open {\n z-index: 999;\n display: block;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {\n -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-calendar .hasWeeks .dayContainer,\n.flatpickr-calendar .hasTime .dayContainer {\n border-bottom: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.flatpickr-calendar .hasWeeks .dayContainer {\n border-left: 0;\n}\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {\n height: 40px;\n border-top: 1px solid #e6e6e6;\n}\n.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {\n height: auto;\n}\n.flatpickr-calendar:before,\n.flatpickr-calendar:after {\n position: absolute;\n display: block;\n pointer-events: none;\n border: solid transparent;\n content: \'\';\n height: 0;\n width: 0;\n left: 22px;\n}\n.flatpickr-calendar.rightMost:before,\n.flatpickr-calendar.rightMost:after {\n left: auto;\n right: 22px;\n}\n.flatpickr-calendar:before {\n border-width: 5px;\n margin: 0 -5px;\n}\n.flatpickr-calendar:after {\n border-width: 4px;\n margin: 0 -4px;\n}\n.flatpickr-calendar.arrowTop:before,\n.flatpickr-calendar.arrowTop:after {\n bottom: 100%;\n}\n.flatpickr-calendar.arrowTop:before {\n border-bottom-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowTop:after {\n border-bottom-color: #fff;\n}\n.flatpickr-calendar.arrowBottom:before,\n.flatpickr-calendar.arrowBottom:after {\n top: 100%;\n}\n.flatpickr-calendar.arrowBottom:before {\n border-top-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowBottom:after {\n border-top-color: #fff;\n}\n.flatpickr-calendar:focus {\n outline: 0;\n}\n.flatpickr-wrapper {\n position: relative;\n display: inline-block;\n}\n.flatpickr-months {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-months .flatpickr-month {\n background: transparent;\n color: rgba(0, 0, 0, 0.9);\n fill: rgba(0, 0, 0, 0.9);\n height: 34px;\n line-height: 1;\n text-align: center;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.flatpickr-months .flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month {\n text-decoration: none;\n cursor: pointer;\n position: absolute;\n top: 0;\n height: 34px;\n padding: 10px;\n z-index: 3;\n color: rgba(0, 0, 0, 0.9);\n fill: rgba(0, 0, 0, 0.9);\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,\n.flatpickr-months .flatpickr-next-month.flatpickr-disabled {\n display: none;\n}\n.flatpickr-months .flatpickr-prev-month i,\n.flatpickr-months .flatpickr-next-month i {\n position: relative;\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {\n /*\n /*rtl:begin:ignore*/\n /*\n */\n left: 0;\n /*\n /*rtl:end:ignore*/\n /*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-next-month {\n /*\n /*rtl:begin:ignore*/\n /*\n */\n right: 0;\n /*\n /*rtl:end:ignore*/\n /*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month:hover,\n.flatpickr-months .flatpickr-next-month:hover {\n color: #959ea9;\n}\n.flatpickr-months .flatpickr-prev-month:hover svg,\n.flatpickr-months .flatpickr-next-month:hover svg {\n fill: #f64747;\n}\n.flatpickr-months .flatpickr-prev-month svg,\n.flatpickr-months .flatpickr-next-month svg {\n width: 14px;\n height: 14px;\n}\n.flatpickr-months .flatpickr-prev-month svg path,\n.flatpickr-months .flatpickr-next-month svg path {\n -webkit-transition: fill 0.1s;\n transition: fill 0.1s;\n fill: inherit;\n}\n.numInputWrapper {\n position: relative;\n height: auto;\n}\n.numInputWrapper input,\n.numInputWrapper span {\n display: inline-block;\n}\n.numInputWrapper input {\n width: 100%;\n}\n.numInputWrapper input::-ms-clear {\n display: none;\n}\n.numInputWrapper input::-webkit-outer-spin-button,\n.numInputWrapper input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n}\n.numInputWrapper span {\n position: absolute;\n right: 0;\n width: 14px;\n padding: 0 4px 0 2px;\n height: 50%;\n line-height: 50%;\n opacity: 0;\n cursor: pointer;\n border: 1px solid rgba(57, 57, 57, 0.15);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.numInputWrapper span:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n.numInputWrapper span:active {\n background: rgba(0, 0, 0, 0.2);\n}\n.numInputWrapper span:after {\n display: block;\n content: "";\n position: absolute;\n}\n.numInputWrapper span.arrowUp {\n top: 0;\n border-bottom: 0;\n}\n.numInputWrapper span.arrowUp:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 4px solid rgba(57, 57, 57, 0.6);\n top: 26%;\n}\n.numInputWrapper span.arrowDown {\n top: 50%;\n}\n.numInputWrapper span.arrowDown:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid rgba(57, 57, 57, 0.6);\n top: 40%;\n}\n.numInputWrapper span svg {\n width: inherit;\n height: auto;\n}\n.numInputWrapper span svg path {\n fill: rgba(0, 0, 0, 0.5);\n}\n.numInputWrapper:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.numInputWrapper:hover span {\n opacity: 1;\n}\n.flatpickr-current-month {\n font-size: 135%;\n line-height: inherit;\n font-weight: 300;\n color: inherit;\n position: absolute;\n width: 75%;\n left: 12.5%;\n padding: 7.48px 0 0 0;\n line-height: 1;\n height: 34px;\n display: inline-block;\n text-align: center;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n}\n.flatpickr-current-month span.cur-month {\n font-family: inherit;\n font-weight: 700;\n color: inherit;\n display: inline-block;\n margin-left: 0.5ch;\n padding: 0;\n}\n.flatpickr-current-month span.cur-month:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.flatpickr-current-month .numInputWrapper {\n width: 6ch;\n width: 7ch\0;\n display: inline-block;\n}\n.flatpickr-current-month .numInputWrapper span.arrowUp:after {\n border-bottom-color: rgba(0, 0, 0, 0.9);\n}\n.flatpickr-current-month .numInputWrapper span.arrowDown:after {\n border-top-color: rgba(0, 0, 0, 0.9);\n}\n.flatpickr-current-month input.cur-year {\n background: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: inherit;\n cursor: text;\n padding: 0 0 0 0.5ch;\n margin: 0;\n display: inline-block;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n line-height: inherit;\n height: auto;\n border: 0;\n border-radius: 0;\n vertical-align: initial;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-current-month input.cur-year:focus {\n outline: 0;\n}\n.flatpickr-current-month input.cur-year[disabled],\n.flatpickr-current-month input.cur-year[disabled]:hover {\n font-size: 100%;\n color: rgba(0, 0, 0, 0.5);\n background: transparent;\n pointer-events: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months {\n appearance: menulist;\n background: transparent;\n border: none;\n border-radius: 0;\n box-sizing: border-box;\n color: inherit;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n height: auto;\n line-height: inherit;\n margin: -1px 0 0 0;\n outline: none;\n padding: 0 0 0 0.5ch;\n position: relative;\n vertical-align: initial;\n -webkit-box-sizing: border-box;\n -webkit-appearance: menulist;\n -moz-appearance: menulist;\n width: auto;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:focus,\n.flatpickr-current-month .flatpickr-monthDropdown-months:active {\n outline: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\n background-color: transparent;\n outline: none;\n padding: 0;\n}\n.flatpickr-weekdays {\n background: transparent;\n text-align: center;\n overflow: hidden;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n height: 28px;\n}\n.flatpickr-weekdays .flatpickr-weekdaycontainer {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\nspan.flatpickr-weekday {\n cursor: default;\n font-size: 90%;\n background: transparent;\n color: rgba(0, 0, 0, 0.54);\n line-height: 1;\n margin: 0;\n text-align: center;\n display: block;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n font-weight: bolder;\n}\n.dayContainer,\n.flatpickr-weeks {\n padding: 1px 0 0 0;\n}\n.flatpickr-days {\n position: relative;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n width: 307.875px;\n}\n.flatpickr-days:focus {\n outline: 0;\n}\n.dayContainer {\n padding: 0;\n outline: 0;\n text-align: left;\n width: 307.875px;\n min-width: 307.875px;\n max-width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n -ms-flex-pack: justify;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n opacity: 1;\n}\n.dayContainer + .dayContainer {\n -webkit-box-shadow: -1px 0 0 #e6e6e6;\n box-shadow: -1px 0 0 #e6e6e6;\n}\n.flatpickr-day {\n background: none;\n border: 1px solid transparent;\n border-radius: 150px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #393939;\n cursor: pointer;\n font-weight: 400;\n width: 14.2857143%;\n -webkit-flex-basis: 14.2857143%;\n -ms-flex-preferred-size: 14.2857143%;\n flex-basis: 14.2857143%;\n max-width: 39px;\n height: 39px;\n line-height: 39px;\n margin: 0;\n display: inline-block;\n position: relative;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-align: center;\n}\n.flatpickr-day.inRange,\n.flatpickr-day.prevMonthDay.inRange,\n.flatpickr-day.nextMonthDay.inRange,\n.flatpickr-day.today.inRange,\n.flatpickr-day.prevMonthDay.today.inRange,\n.flatpickr-day.nextMonthDay.today.inRange,\n.flatpickr-day:hover,\n.flatpickr-day.prevMonthDay:hover,\n.flatpickr-day.nextMonthDay:hover,\n.flatpickr-day:focus,\n.flatpickr-day.prevMonthDay:focus,\n.flatpickr-day.nextMonthDay:focus {\n cursor: pointer;\n outline: 0;\n background: #e6e6e6;\n border-color: #e6e6e6;\n}\n.flatpickr-day.today {\n border-color: #959ea9;\n}\n.flatpickr-day.today:hover,\n.flatpickr-day.today:focus {\n border-color: #959ea9;\n background: #959ea9;\n color: #fff;\n}\n.flatpickr-day.selected,\n.flatpickr-day.startRange,\n.flatpickr-day.endRange,\n.flatpickr-day.selected.inRange,\n.flatpickr-day.startRange.inRange,\n.flatpickr-day.endRange.inRange,\n.flatpickr-day.selected:focus,\n.flatpickr-day.startRange:focus,\n.flatpickr-day.endRange:focus,\n.flatpickr-day.selected:hover,\n.flatpickr-day.startRange:hover,\n.flatpickr-day.endRange:hover,\n.flatpickr-day.selected.prevMonthDay,\n.flatpickr-day.startRange.prevMonthDay,\n.flatpickr-day.endRange.prevMonthDay,\n.flatpickr-day.selected.nextMonthDay,\n.flatpickr-day.startRange.nextMonthDay,\n.flatpickr-day.endRange.nextMonthDay {\n background: #569ff7;\n -webkit-box-shadow: none;\n box-shadow: none;\n color: #fff;\n border-color: #569ff7;\n}\n.flatpickr-day.selected.startRange,\n.flatpickr-day.startRange.startRange,\n.flatpickr-day.endRange.startRange {\n border-radius: 50px 0 0 50px;\n}\n.flatpickr-day.selected.endRange,\n.flatpickr-day.startRange.endRange,\n.flatpickr-day.endRange.endRange {\n border-radius: 0 50px 50px 0;\n}\n.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {\n -webkit-box-shadow: -10px 0 0 #569ff7;\n box-shadow: -10px 0 0 #569ff7;\n}\n.flatpickr-day.selected.startRange.endRange,\n.flatpickr-day.startRange.startRange.endRange,\n.flatpickr-day.endRange.startRange.endRange {\n border-radius: 50px;\n}\n.flatpickr-day.inRange {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover,\n.flatpickr-day.prevMonthDay,\n.flatpickr-day.nextMonthDay,\n.flatpickr-day.notAllowed,\n.flatpickr-day.notAllowed.prevMonthDay,\n.flatpickr-day.notAllowed.nextMonthDay {\n color: rgba(57, 57, 57, 0.3);\n background: transparent;\n border-color: transparent;\n cursor: default;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover {\n cursor: not-allowed;\n color: rgba(57, 57, 57, 0.1);\n}\n.flatpickr-day.week.selected {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n}\n.flatpickr-day.hidden {\n visibility: hidden;\n}\n.rangeMode .flatpickr-day {\n margin-top: 1px;\n}\n.flatpickr-weekwrapper {\n float: left;\n}\n.flatpickr-weekwrapper .flatpickr-weeks {\n padding: 0 12px;\n -webkit-box-shadow: 1px 0 0 #e6e6e6;\n box-shadow: 1px 0 0 #e6e6e6;\n}\n.flatpickr-weekwrapper .flatpickr-weekday {\n float: none;\n width: 100%;\n line-height: 28px;\n}\n.flatpickr-weekwrapper span.flatpickr-day,\n.flatpickr-weekwrapper span.flatpickr-day:hover {\n display: block;\n width: 100%;\n max-width: none;\n color: rgba(57, 57, 57, 0.3);\n background: transparent;\n cursor: default;\n border: none;\n}\n.flatpickr-innerContainer {\n display: block;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.flatpickr-rContainer {\n display: inline-block;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.flatpickr-time {\n text-align: center;\n outline: 0;\n display: block;\n height: 0;\n line-height: 40px;\n max-height: 40px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-time:after {\n content: "";\n display: table;\n clear: both;\n}\n.flatpickr-time .numInputWrapper {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 40%;\n height: 40px;\n float: left;\n}\n.flatpickr-time .numInputWrapper span.arrowUp:after {\n border-bottom-color: #393939;\n}\n.flatpickr-time .numInputWrapper span.arrowDown:after {\n border-top-color: #393939;\n}\n.flatpickr-time.hasSeconds .numInputWrapper {\n width: 26%;\n}\n.flatpickr-time.time24hr .numInputWrapper {\n width: 49%;\n}\n.flatpickr-time input {\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0;\n border-radius: 0;\n text-align: center;\n margin: 0;\n padding: 0;\n height: inherit;\n line-height: inherit;\n color: #393939;\n font-size: 14px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-time input.flatpickr-hour {\n font-weight: bold;\n}\n.flatpickr-time input.flatpickr-minute,\n.flatpickr-time input.flatpickr-second {\n font-weight: 400;\n}\n.flatpickr-time input:focus {\n outline: 0;\n border: 0;\n}\n.flatpickr-time .flatpickr-time-separator,\n.flatpickr-time .flatpickr-am-pm {\n height: inherit;\n float: left;\n line-height: inherit;\n color: #393939;\n font-weight: bold;\n width: 2%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.flatpickr-time .flatpickr-am-pm {\n outline: 0;\n width: 18%;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n}\n.flatpickr-time input:hover,\n.flatpickr-time .flatpickr-am-pm:hover,\n.flatpickr-time input:focus,\n.flatpickr-time .flatpickr-am-pm:focus {\n background: #eee;\n}\n.flatpickr-input[readonly] {\n cursor: pointer;\n}\n@-webkit-keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n.flatpickr-calendar {\n background: transparent;\n opacity: 0;\n display: none;\n text-align: center;\n visibility: hidden;\n padding: 0;\n -webkit-animation: none;\n animation: none;\n direction: ltr;\n border: 0;\n font-size: 14px;\n line-height: 24px;\n border-radius: 5px;\n position: absolute;\n width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -webkit-box-shadow: 0 3px 13px rgba(0, 0, 0, 0.08);\n box-shadow: 0 3px 13px rgba(0, 0, 0, 0.08);\n}\n.flatpickr-calendar.open,\n.flatpickr-calendar.inline {\n opacity: 1;\n max-height: 640px;\n visibility: visible;\n}\n.flatpickr-calendar.open {\n display: inline-block;\n z-index: 99999;\n}\n.flatpickr-calendar.animate.open {\n -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.flatpickr-calendar.inline {\n display: block;\n position: relative;\n top: 2px;\n}\n.flatpickr-calendar.static {\n position: absolute;\n top: calc(100% + 2px);\n}\n.flatpickr-calendar.static.open {\n z-index: 999;\n display: block;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {\n -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-calendar .hasWeeks .dayContainer,\n.flatpickr-calendar .hasTime .dayContainer {\n border-bottom: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.flatpickr-calendar .hasWeeks .dayContainer {\n border-left: 0;\n}\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {\n height: 40px;\n border-top: 1px solid #eceef1;\n}\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-innerContainer {\n border-bottom: 0;\n}\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {\n border: 1px solid #eceef1;\n}\n.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {\n height: auto;\n}\n.flatpickr-calendar:before,\n.flatpickr-calendar:after {\n position: absolute;\n display: block;\n pointer-events: none;\n border: solid transparent;\n content: \'\';\n height: 0;\n width: 0;\n left: 22px;\n}\n.flatpickr-calendar.rightMost:before,\n.flatpickr-calendar.rightMost:after {\n left: auto;\n right: 22px;\n}\n.flatpickr-calendar:before {\n border-width: 5px;\n margin: 0 -5px;\n}\n.flatpickr-calendar:after {\n border-width: 4px;\n margin: 0 -4px;\n}\n.flatpickr-calendar.arrowTop:before,\n.flatpickr-calendar.arrowTop:after {\n bottom: 100%;\n}\n.flatpickr-calendar.arrowTop:before {\n border-bottom-color: #eceef1;\n}\n.flatpickr-calendar.arrowTop:after {\n border-bottom-color: #eceef1;\n}\n.flatpickr-calendar.arrowBottom:before,\n.flatpickr-calendar.arrowBottom:after {\n top: 100%;\n}\n.flatpickr-calendar.arrowBottom:before {\n border-top-color: #eceef1;\n}\n.flatpickr-calendar.arrowBottom:after {\n border-top-color: #eceef1;\n}\n.flatpickr-calendar:focus {\n outline: 0;\n}\n.flatpickr-wrapper {\n position: relative;\n display: inline-block;\n}\n.flatpickr-months {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-months .flatpickr-month {\n border-radius: 5px 5px 0 0;\n background: #eceef1;\n color: #5a6171;\n fill: #5a6171;\n height: 34px;\n line-height: 1;\n text-align: center;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.flatpickr-months .flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month {\n text-decoration: none;\n cursor: pointer;\n position: absolute;\n top: 0;\n height: 34px;\n padding: 10px;\n z-index: 3;\n color: #5a6171;\n fill: #5a6171;\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,\n.flatpickr-months .flatpickr-next-month.flatpickr-disabled {\n display: none;\n}\n.flatpickr-months .flatpickr-prev-month i,\n.flatpickr-months .flatpickr-next-month i {\n position: relative;\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {\n /*\n /*rtl:begin:ignore*/\n /*\n */\n left: 0;\n /*\n /*rtl:end:ignore*/\n /*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-next-month {\n /*\n /*rtl:begin:ignore*/\n /*\n */\n right: 0;\n /*\n /*rtl:end:ignore*/\n /*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month:hover,\n.flatpickr-months .flatpickr-next-month:hover {\n color: #bbb;\n}\n.flatpickr-months .flatpickr-prev-month:hover svg,\n.flatpickr-months .flatpickr-next-month:hover svg {\n fill: #f64747;\n}\n.flatpickr-months .flatpickr-prev-month svg,\n.flatpickr-months .flatpickr-next-month svg {\n width: 14px;\n height: 14px;\n}\n.flatpickr-months .flatpickr-prev-month svg path,\n.flatpickr-months .flatpickr-next-month svg path {\n -webkit-transition: fill 0.1s;\n transition: fill 0.1s;\n fill: inherit;\n}\n.numInputWrapper {\n position: relative;\n height: auto;\n}\n.numInputWrapper input,\n.numInputWrapper span {\n display: inline-block;\n}\n.numInputWrapper input {\n width: 100%;\n}\n.numInputWrapper input::-ms-clear {\n display: none;\n}\n.numInputWrapper input::-webkit-outer-spin-button,\n.numInputWrapper input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n}\n.numInputWrapper span {\n position: absolute;\n right: 0;\n width: 14px;\n padding: 0 4px 0 2px;\n height: 50%;\n line-height: 50%;\n opacity: 0;\n cursor: pointer;\n border: 1px solid rgba(72, 72, 72, 0.15);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.numInputWrapper span:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n.numInputWrapper span:active {\n background: rgba(0, 0, 0, 0.2);\n}\n.numInputWrapper span:after {\n display: block;\n content: "";\n position: absolute;\n}\n.numInputWrapper span.arrowUp {\n top: 0;\n border-bottom: 0;\n}\n.numInputWrapper span.arrowUp:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 4px solid rgba(72, 72, 72, 0.6);\n top: 26%;\n}\n.numInputWrapper span.arrowDown {\n top: 50%;\n}\n.numInputWrapper span.arrowDown:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid rgba(72, 72, 72, 0.6);\n top: 40%;\n}\n.numInputWrapper span svg {\n width: inherit;\n height: auto;\n}\n.numInputWrapper span svg path {\n fill: rgba(90, 97, 113, 0.5);\n}\n.numInputWrapper:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.numInputWrapper:hover span {\n opacity: 1;\n}\n.flatpickr-current-month {\n font-size: 135%;\n line-height: inherit;\n font-weight: 300;\n color: inherit;\n position: absolute;\n width: 75%;\n left: 12.5%;\n padding: 7.48px 0 0 0;\n line-height: 1;\n height: 34px;\n display: inline-block;\n text-align: center;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n}\n.flatpickr-current-month span.cur-month {\n font-family: inherit;\n font-weight: 700;\n color: inherit;\n display: inline-block;\n margin-left: 0.5ch;\n padding: 0;\n}\n.flatpickr-current-month span.cur-month:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.flatpickr-current-month .numInputWrapper {\n width: 6ch;\n width: 7ch\0;\n display: inline-block;\n}\n.flatpickr-current-month .numInputWrapper span.arrowUp:after {\n border-bottom-color: #5a6171;\n}\n.flatpickr-current-month .numInputWrapper span.arrowDown:after {\n border-top-color: #5a6171;\n}\n.flatpickr-current-month input.cur-year {\n background: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: inherit;\n cursor: text;\n padding: 0 0 0 0.5ch;\n margin: 0;\n display: inline-block;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n line-height: inherit;\n height: auto;\n border: 0;\n border-radius: 0;\n vertical-align: initial;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-current-month input.cur-year:focus {\n outline: 0;\n}\n.flatpickr-current-month input.cur-year[disabled],\n.flatpickr-current-month input.cur-year[disabled]:hover {\n font-size: 100%;\n color: rgba(90, 97, 113, 0.5);\n background: transparent;\n pointer-events: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months {\n appearance: menulist;\n background: #eceef1;\n border: none;\n border-radius: 0;\n box-sizing: border-box;\n color: inherit;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n height: auto;\n line-height: inherit;\n margin: -1px 0 0 0;\n outline: none;\n padding: 0 0 0 0.5ch;\n position: relative;\n vertical-align: initial;\n -webkit-box-sizing: border-box;\n -webkit-appearance: menulist;\n -moz-appearance: menulist;\n width: auto;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:focus,\n.flatpickr-current-month .flatpickr-monthDropdown-months:active {\n outline: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\n background-color: #eceef1;\n outline: none;\n padding: 0;\n}\n.flatpickr-weekdays {\n background: #eceef1;\n text-align: center;\n overflow: hidden;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n height: 28px;\n}\n.flatpickr-weekdays .flatpickr-weekdaycontainer {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\nspan.flatpickr-weekday {\n cursor: default;\n font-size: 90%;\n background: #eceef1;\n color: #5a6171;\n line-height: 1;\n margin: 0;\n text-align: center;\n display: block;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n font-weight: bolder;\n}\n.dayContainer,\n.flatpickr-weeks {\n padding: 1px 0 0 0;\n}\n.flatpickr-days {\n position: relative;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n width: 307.875px;\n border-left: 1px solid #eceef1;\n border-right: 1px solid #eceef1;\n}\n.flatpickr-days:focus {\n outline: 0;\n}\n.dayContainer {\n padding: 0;\n outline: 0;\n text-align: left;\n width: 307.875px;\n min-width: 307.875px;\n max-width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n -ms-flex-pack: justify;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n opacity: 1;\n}\n.dayContainer + .dayContainer {\n -webkit-box-shadow: -1px 0 0 #eceef1;\n box-shadow: -1px 0 0 #eceef1;\n}\n.flatpickr-day {\n background: none;\n border: 1px solid transparent;\n border-radius: 150px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #484848;\n cursor: pointer;\n font-weight: 400;\n width: 14.2857143%;\n -webkit-flex-basis: 14.2857143%;\n -ms-flex-preferred-size: 14.2857143%;\n flex-basis: 14.2857143%;\n max-width: 39px;\n height: 39px;\n line-height: 39px;\n margin: 0;\n display: inline-block;\n position: relative;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-align: center;\n}\n.flatpickr-day.inRange,\n.flatpickr-day.prevMonthDay.inRange,\n.flatpickr-day.nextMonthDay.inRange,\n.flatpickr-day.today.inRange,\n.flatpickr-day.prevMonthDay.today.inRange,\n.flatpickr-day.nextMonthDay.today.inRange,\n.flatpickr-day:hover,\n.flatpickr-day.prevMonthDay:hover,\n.flatpickr-day.nextMonthDay:hover,\n.flatpickr-day:focus,\n.flatpickr-day.prevMonthDay:focus,\n.flatpickr-day.nextMonthDay:focus {\n cursor: pointer;\n outline: 0;\n background: #e2e2e2;\n border-color: #e2e2e2;\n}\n.flatpickr-day.today {\n border-color: #bbb;\n}\n.flatpickr-day.today:hover,\n.flatpickr-day.today:focus {\n border-color: #bbb;\n background: #bbb;\n color: #fff;\n}\n.flatpickr-day.selected,\n.flatpickr-day.startRange,\n.flatpickr-day.endRange,\n.flatpickr-day.selected.inRange,\n.flatpickr-day.startRange.inRange,\n.flatpickr-day.endRange.inRange,\n.flatpickr-day.selected:focus,\n.flatpickr-day.startRange:focus,\n.flatpickr-day.endRange:focus,\n.flatpickr-day.selected:hover,\n.flatpickr-day.startRange:hover,\n.flatpickr-day.endRange:hover,\n.flatpickr-day.selected.prevMonthDay,\n.flatpickr-day.startRange.prevMonthDay,\n.flatpickr-day.endRange.prevMonthDay,\n.flatpickr-day.selected.nextMonthDay,\n.flatpickr-day.startRange.nextMonthDay,\n.flatpickr-day.endRange.nextMonthDay {\n background: #ff5a5f;\n -webkit-box-shadow: none;\n box-shadow: none;\n color: #fff;\n border-color: #ff5a5f;\n}\n.flatpickr-day.selected.startRange,\n.flatpickr-day.startRange.startRange,\n.flatpickr-day.endRange.startRange {\n border-radius: 50px 0 0 50px;\n}\n.flatpickr-day.selected.endRange,\n.flatpickr-day.startRange.endRange,\n.flatpickr-day.endRange.endRange {\n border-radius: 0 50px 50px 0;\n}\n.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {\n -webkit-box-shadow: -10px 0 0 #ff5a5f;\n box-shadow: -10px 0 0 #ff5a5f;\n}\n.flatpickr-day.selected.startRange.endRange,\n.flatpickr-day.startRange.startRange.endRange,\n.flatpickr-day.endRange.startRange.endRange {\n border-radius: 50px;\n}\n.flatpickr-day.inRange {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;\n box-shadow: -5px 0 0 #e2e2e2, 5px 0 0 #e2e2e2;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover,\n.flatpickr-day.prevMonthDay,\n.flatpickr-day.nextMonthDay,\n.flatpickr-day.notAllowed,\n.flatpickr-day.notAllowed.prevMonthDay,\n.flatpickr-day.notAllowed.nextMonthDay {\n color: rgba(72, 72, 72, 0.3);\n background: transparent;\n border-color: transparent;\n cursor: default;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover {\n cursor: not-allowed;\n color: rgba(72, 72, 72, 0.1);\n}\n.flatpickr-day.week.selected {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #ff5a5f, 5px 0 0 #ff5a5f;\n box-shadow: -5px 0 0 #ff5a5f, 5px 0 0 #ff5a5f;\n}\n.flatpickr-day.hidden {\n visibility: hidden;\n}\n.rangeMode .flatpickr-day {\n margin-top: 1px;\n}\n.flatpickr-weekwrapper {\n float: left;\n}\n.flatpickr-weekwrapper .flatpickr-weeks {\n padding: 0 12px;\n border-left: 1px solid #eceef1;\n}\n.flatpickr-weekwrapper .flatpickr-weekday {\n float: none;\n width: 100%;\n line-height: 28px;\n}\n.flatpickr-weekwrapper span.flatpickr-day,\n.flatpickr-weekwrapper span.flatpickr-day:hover {\n display: block;\n width: 100%;\n max-width: none;\n color: rgba(72, 72, 72, 0.3);\n background: transparent;\n cursor: default;\n border: none;\n}\n.flatpickr-innerContainer {\n display: block;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n background: #fff;\n border-bottom: 1px solid #eceef1;\n}\n.flatpickr-rContainer {\n display: inline-block;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.flatpickr-time {\n text-align: center;\n outline: 0;\n display: block;\n height: 0;\n line-height: 40px;\n max-height: 40px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n background: #fff;\n border-radius: 0 0 5px 5px;\n}\n.flatpickr-time:after {\n content: "";\n display: table;\n clear: both;\n}\n.flatpickr-time .numInputWrapper {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 40%;\n height: 40px;\n float: left;\n}\n.flatpickr-time .numInputWrapper span.arrowUp:after {\n border-bottom-color: #484848;\n}\n.flatpickr-time .numInputWrapper span.arrowDown:after {\n border-top-color: #484848;\n}\n.flatpickr-time.hasSeconds .numInputWrapper {\n width: 26%;\n}\n.flatpickr-time.time24hr .numInputWrapper {\n width: 49%;\n}\n.flatpickr-time input {\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0;\n border-radius: 0;\n text-align: center;\n margin: 0;\n padding: 0;\n height: inherit;\n line-height: inherit;\n color: #484848;\n font-size: 14px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-time input.flatpickr-hour {\n font-weight: bold;\n}\n.flatpickr-time input.flatpickr-minute,\n.flatpickr-time input.flatpickr-second {\n font-weight: 400;\n}\n.flatpickr-time input:focus {\n outline: 0;\n border: 0;\n}\n.flatpickr-time .flatpickr-time-separator,\n.flatpickr-time .flatpickr-am-pm {\n height: inherit;\n float: left;\n line-height: inherit;\n color: #484848;\n font-weight: bold;\n width: 2%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.flatpickr-time .flatpickr-am-pm {\n outline: 0;\n width: 18%;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n}\n.flatpickr-time input:hover,\n.flatpickr-time .flatpickr-am-pm:hover,\n.flatpickr-time input:focus,\n.flatpickr-time .flatpickr-am-pm:focus {\n background: #eaeaea;\n}\n.flatpickr-input[readonly] {\n cursor: pointer;\n}\n@-webkit-keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\nspan.flatpickr-day.selected {\n font-weight: bold;\n}\n']}render(){null==this._picker&&(super.render(),this.input_el=Zo({type:"text",class:pb,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=a_(this.input_el,{defaultDate:this.model.value,minDate:this.model.min_date,maxDate:this.model.max_date,inline:this.model.inline,position:this.model.position,disable:s_(this.model.disabled_dates),enable:s_(this.model.enabled_dates),onChange:(e,t,n)=>this._on_change(e,t,n)}))}_on_change(e,t,n){this.model.value=t,this.change_input()}}l_.__name__="DatePickerView";class c_ extends vb{constructor(e){super(e)}static init_DatePicker(){this.prototype.default_view=l_,this.define({value:[Tn],min_date:[Tn],max_date:[Tn],disabled_dates:[Tn,[]],enabled_dates:[Tn,[]],position:[$n,"auto"],inline:[En,!1]})}}c_.__name__="DatePicker",c_.init_DatePicker();var u_=n(32873);class h_ extends lb{*controls(){yield this.slider_el}get noUiSlider(){return this.slider_el.noUiSlider}connect_signals(){super.connect_signals();const{direction:e,orientation:t,tooltips:n}=this.model.properties;this.on_change([e,t,n],(()=>this.render()));const{start:r,end:i,value:o,step:a,title:s}=this.model.properties;this.on_change([r,i,o,a],(()=>{const{start:e,end:t,value:n,step:r}=this._calc_to();this.noUiSlider.updateOptions({range:{min:e,max:t},start:n,step:r})}));const{bar_color:l}=this.model.properties;this.on_change(l,(()=>{this._set_bar_color()}));const{show_value:c}=this.model.properties;this.on_change([o,s,c],(()=>this._update_title()))}styles(){return[...super.styles(),"\n.bk-root {\n /*! nouislider - 14.6.0 - 6/27/2020 */\n /* Functional styling;\n * These styles are required for noUiSlider to function.\n * You don't need to change these rules to apply your design.\n */\n /* Wrapper for all connect elements.\n */\n /* Offset direction\n */\n /* Give origins 0 height/width so they don't interfere with clicking the\n * connect elements.\n */\n /* Slider size and handle placement;\n */\n /* Styling;\n * Giving the connect element a border radius causes issues with using transform: scale\n */\n /* Handles and cursors;\n */\n /* Handle stripes;\n */\n /* Disabled state;\n */\n /* Base;\n *\n */\n /* Values;\n *\n */\n /* Markings;\n *\n */\n /* Horizontal layout;\n *\n */\n /* Vertical layout;\n *\n */\n}\n.bk-root .noUi-target,\n.bk-root .noUi-target * {\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-user-select: none;\n -ms-touch-action: none;\n touch-action: none;\n -ms-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.bk-root .noUi-target {\n position: relative;\n}\n.bk-root .noUi-base,\n.bk-root .noUi-connects {\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n}\n.bk-root .noUi-connects {\n overflow: hidden;\n z-index: 0;\n}\n.bk-root .noUi-connect,\n.bk-root .noUi-origin {\n will-change: transform;\n position: absolute;\n z-index: 1;\n top: 0;\n right: 0;\n -ms-transform-origin: 0 0;\n -webkit-transform-origin: 0 0;\n -webkit-transform-style: preserve-3d;\n transform-origin: 0 0;\n transform-style: flat;\n}\n.bk-root .noUi-connect {\n height: 100%;\n width: 100%;\n}\n.bk-root .noUi-origin {\n height: 10%;\n width: 10%;\n}\n.bk-root .noUi-txt-dir-rtl.noUi-horizontal .noUi-origin {\n left: 0;\n right: auto;\n}\n.bk-root .noUi-vertical .noUi-origin {\n width: 0;\n}\n.bk-root .noUi-horizontal .noUi-origin {\n height: 0;\n}\n.bk-root .noUi-handle {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n position: absolute;\n}\n.bk-root .noUi-touch-area {\n height: 100%;\n width: 100%;\n}\n.bk-root .noUi-state-tap .noUi-connect,\n.bk-root .noUi-state-tap .noUi-origin {\n -webkit-transition: transform 0.3s;\n transition: transform 0.3s;\n}\n.bk-root .noUi-state-drag * {\n cursor: inherit !important;\n}\n.bk-root .noUi-horizontal {\n height: 18px;\n}\n.bk-root .noUi-horizontal .noUi-handle {\n width: 34px;\n height: 28px;\n right: -17px;\n top: -6px;\n}\n.bk-root .noUi-vertical {\n width: 18px;\n}\n.bk-root .noUi-vertical .noUi-handle {\n width: 28px;\n height: 34px;\n right: -6px;\n top: -17px;\n}\n.bk-root .noUi-txt-dir-rtl.noUi-horizontal .noUi-handle {\n left: -17px;\n right: auto;\n}\n.bk-root .noUi-target {\n background: #FAFAFA;\n border-radius: 4px;\n border: 1px solid #D3D3D3;\n box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;\n}\n.bk-root .noUi-connects {\n border-radius: 3px;\n}\n.bk-root .noUi-connect {\n background: #3FB8AF;\n}\n.bk-root .noUi-draggable {\n cursor: ew-resize;\n}\n.bk-root .noUi-vertical .noUi-draggable {\n cursor: ns-resize;\n}\n.bk-root .noUi-handle {\n border: 1px solid #D9D9D9;\n border-radius: 3px;\n background: #FFF;\n cursor: default;\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;\n}\n.bk-root .noUi-active {\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;\n}\n.bk-root .noUi-handle:before,\n.bk-root .noUi-handle:after {\n content: \"\";\n display: block;\n position: absolute;\n height: 14px;\n width: 1px;\n background: #E8E7E6;\n left: 14px;\n top: 6px;\n}\n.bk-root .noUi-handle:after {\n left: 17px;\n}\n.bk-root .noUi-vertical .noUi-handle:before,\n.bk-root .noUi-vertical .noUi-handle:after {\n width: 14px;\n height: 1px;\n left: 6px;\n top: 14px;\n}\n.bk-root .noUi-vertical .noUi-handle:after {\n top: 17px;\n}\n.bk-root [disabled] .noUi-connect {\n background: #B8B8B8;\n}\n.bk-root [disabled].noUi-target,\n.bk-root [disabled].noUi-handle,\n.bk-root [disabled] .noUi-handle {\n cursor: not-allowed;\n}\n.bk-root .noUi-pips,\n.bk-root .noUi-pips * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.bk-root .noUi-pips {\n position: absolute;\n color: #999;\n}\n.bk-root .noUi-value {\n position: absolute;\n white-space: nowrap;\n text-align: center;\n}\n.bk-root .noUi-value-sub {\n color: #ccc;\n font-size: 10px;\n}\n.bk-root .noUi-marker {\n position: absolute;\n background: #CCC;\n}\n.bk-root .noUi-marker-sub {\n background: #AAA;\n}\n.bk-root .noUi-marker-large {\n background: #AAA;\n}\n.bk-root .noUi-pips-horizontal {\n padding: 10px 0;\n height: 80px;\n top: 100%;\n left: 0;\n width: 100%;\n}\n.bk-root .noUi-value-horizontal {\n -webkit-transform: translate(-50%, 50%);\n transform: translate(-50%, 50%);\n}\n.bk-root .noUi-rtl .noUi-value-horizontal {\n -webkit-transform: translate(50%, 50%);\n transform: translate(50%, 50%);\n}\n.bk-root .noUi-marker-horizontal.noUi-marker {\n margin-left: -1px;\n width: 2px;\n height: 5px;\n}\n.bk-root .noUi-marker-horizontal.noUi-marker-sub {\n height: 10px;\n}\n.bk-root .noUi-marker-horizontal.noUi-marker-large {\n height: 15px;\n}\n.bk-root .noUi-pips-vertical {\n padding: 0 10px;\n height: 100%;\n top: 0;\n left: 100%;\n}\n.bk-root .noUi-value-vertical {\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n padding-left: 25px;\n}\n.bk-root .noUi-rtl .noUi-value-vertical {\n -webkit-transform: translate(0, 50%);\n transform: translate(0, 50%);\n}\n.bk-root .noUi-marker-vertical.noUi-marker {\n width: 5px;\n height: 2px;\n margin-top: -1px;\n}\n.bk-root .noUi-marker-vertical.noUi-marker-sub {\n width: 10px;\n}\n.bk-root .noUi-marker-vertical.noUi-marker-large {\n width: 15px;\n}\n.bk-root .noUi-tooltip {\n display: block;\n position: absolute;\n border: 1px solid #D9D9D9;\n border-radius: 3px;\n background: #fff;\n color: #000;\n padding: 5px;\n text-align: center;\n white-space: nowrap;\n}\n.bk-root .noUi-horizontal .noUi-tooltip {\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n left: 50%;\n bottom: 120%;\n}\n.bk-root .noUi-vertical .noUi-tooltip {\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n top: 50%;\n right: 120%;\n}\n.bk-root .noUi-horizontal .noUi-origin > .noUi-tooltip {\n -webkit-transform: translate(50%, 0);\n transform: translate(50%, 0);\n left: auto;\n bottom: 10px;\n}\n.bk-root .noUi-vertical .noUi-origin > .noUi-tooltip {\n -webkit-transform: translate(0, -18px);\n transform: translate(0, -18px);\n top: auto;\n right: 28px;\n}\n.bk-root .noUi-handle {\n cursor: grab;\n cursor: -webkit-grab;\n}\n.bk-root .noUi-handle.noUi-active {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n.bk-root .noUi-handle:after,\n.bk-root .noUi-handle:before {\n display: none;\n}\n.bk-root .noUi-tooltip {\n display: none;\n white-space: nowrap;\n}\n.bk-root .noUi-handle:hover .noUi-tooltip {\n display: block;\n}\n.bk-root .noUi-horizontal {\n width: 100%;\n height: 10px;\n}\n.bk-root .noUi-vertical {\n width: 10px;\n height: 100%;\n}\n.bk-root .noUi-horizontal .noUi-handle {\n width: 14px;\n height: 18px;\n right: -7px;\n top: -5px;\n}\n.bk-root .noUi-vertical .noUi-handle {\n width: 18px;\n height: 14px;\n right: -5px;\n top: -7px;\n}\n.bk-root .noUi-target.noUi-horizontal {\n margin: 5px 0px;\n}\n.bk-root .noUi-target.noUi-vertical {\n margin: 0px 5px;\n}\n","\n.bk-root .bk-slider-title {\n white-space: nowrap;\n}\n.bk-root .bk-slider-value {\n font-weight: 600;\n}\n"]}_update_title(){oa(this.title_el);const e=null==this.model.title||0==this.model.title.length&&!this.model.show_value;if(this.title_el.style.display=e?"none":"",!e&&(0!=this.model.title.length&&(this.title_el.textContent=`${this.model.title}: `),this.model.show_value)){const{value:e}=this._calc_to(),t=e.map((e=>this.model.pretty(e))).join(" .. ");this.title_el.appendChild(Uo({class:"bk-slider-value"},t))}}_set_bar_color(){this.model.disabled||(this.slider_el.querySelector(".noUi-connect").style.backgroundColor=this.model.bar_color)}render(){super.render();const{start:e,end:t,value:n,step:r}=this._calc_to();let i;if(this.model.tooltips){const e={to:e=>this.model.pretty(e)};i=J(e,n.length)}else i=!1;if(null==this.slider_el){this.slider_el=jo(),u_.create(this.slider_el,{range:{min:e,max:t},start:n,step:r,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:i,orientation:this.model.orientation,direction:this.model.direction}),this.noUiSlider.on("slide",((e,t,n)=>this._slide(n))),this.noUiSlider.on("change",((e,t,n)=>this._change(n)));const o=(e,t)=>{i&&(this.slider_el.querySelectorAll(".noUi-handle")[e].querySelector(".noUi-tooltip").style.display=t?"block":"")};this.noUiSlider.on("start",((e,t)=>o(t,!0))),this.noUiSlider.on("end",((e,t)=>o(t,!1)))}else this.noUiSlider.updateOptions({range:{min:e,max:t},start:n,step:r});this._set_bar_color(),this.model.disabled?this.slider_el.setAttribute("disabled","true"):this.slider_el.removeAttribute("disabled"),this.title_el=jo({class:"bk-slider-title"}),this._update_title(),this.group_el=jo({class:gb},this.title_el,this.slider_el),this.el.appendChild(this.group_el)}_slide(e){this.model.value=this._calc_from(e)}_change(e){this.model.value=this._calc_from(e),this.model.value_throttled=this.model.value}}h_.__name__="AbstractBaseSliderView";class d_ extends h_{_calc_to(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}}_calc_from([e]){return Number.isInteger(this.model.start)&&Number.isInteger(this.model.end)&&Number.isInteger(this.model.step)?Math.round(e):e}}d_.__name__="AbstractSliderView";class f_ extends h_{_calc_to(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}}_calc_from(e){return e}}f_.__name__="AbstractRangeSliderView";class p_ extends cb{constructor(e){super(e),this.connected=!1}static init_AbstractSlider(){this.define((({Any:e,Boolean:t,Number:n,String:r,Color:i,Or:o,Enum:a,Ref:s})=>({title:[r,""],show_value:[t,!0],start:[e],end:[e],value:[e],value_throttled:[e],step:[n,1],format:[o(r,s(ac))],direction:[a("ltr","rtl"),"ltr"],tooltips:[t,!0],bar_color:[i,"#e6e6e6"]})))}_formatter(e,t){return`${e}`}pretty(e){return this._formatter(e,this.format)}}p_.__name__="AbstractSlider",p_.init_AbstractSlider();class g_ extends f_{}g_.__name__="DateRangeSliderView";class m_ extends p_{constructor(e){super(e),this.behaviour="drag",this.connected=[!1,!0,!1]}static init_DateRangeSlider(){this.prototype.default_view=g_,this.override({format:"%d %b %Y"})}_formatter(e,t){return Ou()(e,t)}}m_.__name__="DateRangeSlider",m_.init_DateRangeSlider();class v_ extends d_{}v_.__name__="DateSliderView";class y_ extends p_{constructor(e){super(e),this.behaviour="tap",this.connected=[!0,!1]}static init_DateSlider(){this.prototype.default_view=v_,this.override({format:"%d %b %Y"})}_formatter(e,t){return Ou()(e,t)}}y_.__name__="DateSlider",y_.init_DateSlider();class b_ extends ab{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>{this.layout.invalidate_cache(),this.render(),this.root.compute_layout()}))}styles(){return[...super.styles(),'\n.bk-root .bk-clearfix:before,\n.bk-root .bk-clearfix:after {\n content: "";\n display: table;\n}\n.bk-root .bk-clearfix:after {\n clear: both;\n}\n']}_update_layout(){this.layout=new Rh(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render();const e=Object.assign(Object.assign({},this.model.style),{display:"inline-block"});this.markup_el=jo({class:"bk-clearfix",style:e}),this.el.appendChild(this.markup_el)}}b_.__name__="MarkupView";class __ extends sb{constructor(e){super(e)}static init_Markup(){this.define({text:[Rn,""],style:[Tn,{}]})}}__.__name__="Markup",__.init_Markup();class x_ extends b_{render(){super.render(),this.model.render_as_text?this.markup_el.textContent=this.model.text:this.markup_el.innerHTML=this.model.text}}x_.__name__="DivView";class w_ extends __{constructor(e){super(e)}static init_Div(){this.prototype.default_view=x_,this.define({render_as_text:[En,!1]})}}w_.__name__="Div",w_.init_Div();class A_ extends ub{constructor(){super(...arguments),this._open=!1}styles(){return[...super.styles(),qf]}render(){super.render();const e=jo({class:[jf,"bk-down"]});if(this.model.is_split){const t=this._render_button(e);t.classList.add("bk-dropdown-toggle"),t.addEventListener("click",(()=>this._toggle_menu())),this.group_el.appendChild(t)}else this.button_el.appendChild(e);const t=this.model.menu.map(((e,t)=>{if(null==e)return jo({class:Uf});{const n=re(e)?e:e[0],r=jo({},n);return r.addEventListener("click",(()=>this._item_click(t))),r}}));this.menu=jo({class:[Bf,cu]},t),this.el.appendChild(this.menu),sa(this.menu)}_show_menu(){if(!this._open){this._open=!0,aa(this.menu);const e=t=>{const{target:n}=t;n instanceof HTMLElement&&!this.el.contains(n)&&(document.removeEventListener("click",e),this._hide_menu())};document.addEventListener("click",e)}}_hide_menu(){this._open&&(this._open=!1,sa(this.menu))}_toggle_menu(){this._open?this._hide_menu():this._show_menu()}click(){this.model.is_split?(this._hide_menu(),this.model.trigger_event(new zg),super.click()):this._toggle_menu()}_item_click(e){this._hide_menu();const t=this.model.menu[e];if(null!=t){const n=re(t)?t:t[1];re(n)?this.model.trigger_event(new Fg(n)):n.execute(this.model,{index:e})}}}A_.__name__="DropdownView";class k_ extends hb{constructor(e){super(e)}static init_Dropdown(){this.prototype.default_view=A_,this.define({split:[En,!1],menu:[Sn,[]]}),this.override({label:"Dropdown"})}get is_split(){return this.split}}k_.__name__="Dropdown",k_.init_Dropdown();class T_ extends ab{connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.properties.width.change,(()=>this.render()))}render(){null==this.dialogEl&&(this.dialogEl=document.createElement("input"),this.dialogEl.type="file",this.dialogEl.multiple=this.model.multiple,this.dialogEl.onchange=()=>{const{files:e}=this.dialogEl;null!=e&&this.load_files(e)},this.el.appendChild(this.dialogEl)),null!=this.model.accept&&""!=this.model.accept&&(this.dialogEl.accept=this.model.accept),this.dialogEl.style.width="{this.model.width}px",this.dialogEl.disabled=this.model.disabled}async load_files(e){const t=[],n=[],r=[];let i;for(i=0;i<e.length;i++){n.push(e[i].name);const o=await this.readfile(e[i]),[,a,,s]=o.split(/[:;,]/,4);t.push(s),r.push(a)}this.model.multiple?(this.model.filename=n,this.model.mime_type=r,this.model.value=t):(this.model.filename=n[0],this.model.mime_type=r[0],this.model.value=t[0])}readfile(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{var i;const{result:o}=r;null!=o?t(o):n(null!==(i=r.error)&&void 0!==i?i:new Error(`unable to read '${e.name}'`))},r.readAsDataURL(e)}))}}T_.__name__="FileInputView";class S_ extends sb{constructor(e){super(e)}static init_FileInput(){this.prototype.default_view=T_,this.define({value:[Tn,""],mime_type:[Tn,""],filename:[Tn,""],accept:[Rn,""],multiple:[En,!1]})}}S_.__name__="FileInput",S_.init_FileInput();class E_ extends mb{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,(()=>this.render_selection())),this.connect(this.model.properties.options.change,(()=>this.render())),this.connect(this.model.properties.name.change,(()=>this.render())),this.connect(this.model.properties.title.change,(()=>this.render())),this.connect(this.model.properties.size.change,(()=>this.render())),this.connect(this.model.properties.disabled.change,(()=>this.render()))}render(){super.render();const e=this.model.options.map((e=>{let t,n;return re(e)?t=n=e:[t,n]=e,Jo({value:t},n)}));this.select_el=Ko({multiple:!0,class:pb,name:this.model.name,disabled:this.model.disabled},e),this.select_el.addEventListener("change",(()=>this.change_input())),this.group_el.appendChild(this.select_el),this.render_selection()}render_selection(){const e=new Set(this.model.value);for(const t of this.el.querySelectorAll("option"))t.selected=e.has(t.value);this.select_el.size=this.model.size}change_input(){const e=null!=this.el.querySelector("select:focus"),t=[];for(const e of this.el.querySelectorAll("option"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.select_el.focus()}}E_.__name__="MultiSelectView";class C_ extends vb{constructor(e){super(e)}static init_MultiSelect(){this.prototype.default_view=E_,this.define({value:[Sn,[]],options:[Sn,[]],size:[On,4]})}}C_.__name__="MultiSelect",C_.init_MultiSelect();class M_ extends b_{render(){super.render();const e=$o({style:{margin:0}},this.model.text);this.markup_el.appendChild(e)}}M_.__name__="ParagraphView";class O_ extends __{constructor(e){super(e)}static init_Paragraph(){this.prototype.default_view=M_}}O_.__name__="Paragraph",O_.init_Paragraph();class L_ extends yb{render(){super.render(),this.input_el.type="password"}}L_.__name__="PasswordInputView";class D_ extends bb{constructor(e){super(e)}static init_PasswordInput(){this.prototype.default_view=L_}}D_.__name__="PasswordInput",D_.init_PasswordInput();var I_=n(86210),R_=n.n(I_);class P_ extends mb{constructor(){super(...arguments),this._last_height=null}connect_signals(){super.connect_signals(),this.connect(this.model.properties.disabled.change,(()=>this.set_disabled()));const{value:e,max_items:t,option_limit:n,delete_button:r,placeholder:i,options:o,name:a,title:s}=this.model.properties;this.on_change([e,t,n,r,i,o,a,s],(()=>this.render()))}styles(){return[...super.styles(),"\n.bk-root {\n /*===============================\n= Choices =\n===============================*/\n /*===== End of Choices ======*/\n}\n.bk-root .choices {\n position: relative;\n margin-bottom: 24px;\n font-size: 16px;\n}\n.bk-root .choices:focus {\n outline: none;\n}\n.bk-root .choices:last-child {\n margin-bottom: 0;\n}\n.bk-root .choices.is-disabled .choices__inner,\n.bk-root .choices.is-disabled .choices__input {\n background-color: #eaeaea;\n cursor: not-allowed;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.bk-root .choices.is-disabled .choices__item {\n cursor: not-allowed;\n}\n.bk-root .choices [hidden] {\n display: none !important;\n}\n.bk-root .choices[data-type*='select-one'] {\n cursor: pointer;\n}\n.bk-root .choices[data-type*='select-one'] .choices__inner {\n padding-bottom: 7.5px;\n}\n.bk-root .choices[data-type*='select-one'] .choices__input {\n display: block;\n width: 100%;\n padding: 10px;\n border-bottom: 1px solid #dddddd;\n background-color: #ffffff;\n margin: 0;\n}\n.bk-root .choices[data-type*='select-one'] .choices__button {\n background-image: url(data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n padding: 0;\n background-size: 8px;\n position: absolute;\n top: 50%;\n right: 0;\n margin-top: -10px;\n margin-right: 25px;\n height: 20px;\n width: 20px;\n border-radius: 10em;\n opacity: 0.5;\n}\n.bk-root .choices[data-type*='select-one'] .choices__button:hover,\n.bk-root .choices[data-type*='select-one'] .choices__button:focus {\n opacity: 1;\n}\n.bk-root .choices[data-type*='select-one'] .choices__button:focus {\n box-shadow: 0px 0px 0px 2px #00bcd4;\n}\n.bk-root .choices[data-type*='select-one'] .choices__item[data-value=''] .choices__button {\n display: none;\n}\n.bk-root .choices[data-type*='select-one']:after {\n content: '';\n height: 0;\n width: 0;\n border-style: solid;\n border-color: #333333 transparent transparent transparent;\n border-width: 5px;\n position: absolute;\n right: 11.5px;\n top: 50%;\n margin-top: -2.5px;\n pointer-events: none;\n}\n.bk-root .choices[data-type*='select-one'].is-open:after {\n border-color: transparent transparent #333333 transparent;\n margin-top: -7.5px;\n}\n.bk-root .choices[data-type*='select-one'][dir='rtl']:after {\n left: 11.5px;\n right: auto;\n}\n.bk-root .choices[data-type*='select-one'][dir='rtl'] .choices__button {\n right: auto;\n left: 0;\n margin-left: 25px;\n margin-right: 0;\n}\n.bk-root .choices[data-type*='select-multiple'] .choices__inner,\n.bk-root .choices[data-type*='text'] .choices__inner {\n cursor: text;\n}\n.bk-root .choices[data-type*='select-multiple'] .choices__button,\n.bk-root .choices[data-type*='text'] .choices__button {\n position: relative;\n display: inline-block;\n margin-top: 0;\n margin-right: -4px;\n margin-bottom: 0;\n margin-left: 8px;\n padding-left: 16px;\n border-left: 1px solid #008fa1;\n background-image: url(data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashLjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n background-size: 8px;\n width: 8px;\n line-height: 1;\n opacity: 0.75;\n border-radius: 0;\n}\n.bk-root .choices[data-type*='select-multiple'] .choices__button:hover,\n.bk-root .choices[data-type*='select-multiple'] .choices__button:focus,\n.bk-root .choices[data-type*='text'] .choices__button:hover,\n.bk-root .choices[data-type*='text'] .choices__button:focus {\n opacity: 1;\n}\n.bk-root .choices__inner {\n display: inline-block;\n vertical-align: top;\n width: 100%;\n background-color: #f9f9f9;\n padding: 7.5px 7.5px 3.75px;\n border: 1px solid #dddddd;\n border-radius: 2.5px;\n font-size: 14px;\n min-height: 44px;\n overflow: hidden;\n}\n.bk-root .is-focused .choices__inner,\n.bk-root .is-open .choices__inner {\n border-color: #b7b7b7;\n}\n.bk-root .is-open .choices__inner {\n border-radius: 2.5px 2.5px 0 0;\n}\n.bk-root .is-flipped.is-open .choices__inner {\n border-radius: 0 0 2.5px 2.5px;\n}\n.bk-root .choices__list {\n margin: 0;\n padding-left: 0;\n list-style: none;\n}\n.bk-root .choices__list--single {\n display: inline-block;\n padding: 4px 16px 4px 4px;\n width: 100%;\n}\n.bk-root [dir='rtl'] .choices__list--single {\n padding-right: 4px;\n padding-left: 16px;\n}\n.bk-root .choices__list--single .choices__item {\n width: 100%;\n}\n.bk-root .choices__list--multiple {\n display: inline;\n}\n.bk-root .choices__list--multiple .choices__item {\n display: inline-block;\n vertical-align: middle;\n border-radius: 20px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 500;\n margin-right: 3.75px;\n margin-bottom: 3.75px;\n background-color: #00bcd4;\n border: 1px solid #00a5bb;\n color: #ffffff;\n word-break: break-all;\n box-sizing: border-box;\n}\n.bk-root .choices__list--multiple .choices__item[data-deletable] {\n padding-right: 5px;\n}\n.bk-root [dir='rtl'] .choices__list--multiple .choices__item {\n margin-right: 0;\n margin-left: 3.75px;\n}\n.bk-root .choices__list--multiple .choices__item.is-highlighted {\n background-color: #00a5bb;\n border: 1px solid #008fa1;\n}\n.bk-root .is-disabled .choices__list--multiple .choices__item {\n background-color: #aaaaaa;\n border: 1px solid #919191;\n}\n.bk-root .choices__list--dropdown {\n visibility: hidden;\n z-index: 1;\n position: absolute;\n width: 100%;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n top: 100%;\n margin-top: -1px;\n border-bottom-left-radius: 2.5px;\n border-bottom-right-radius: 2.5px;\n overflow: hidden;\n word-break: break-all;\n will-change: visibility;\n}\n.bk-root .choices__list--dropdown.is-active {\n visibility: visible;\n}\n.bk-root .is-open .choices__list--dropdown {\n border-color: #b7b7b7;\n}\n.bk-root .is-flipped .choices__list--dropdown {\n top: auto;\n bottom: 100%;\n margin-top: 0;\n margin-bottom: -1px;\n border-radius: 0.25rem 0.25rem 0 0;\n}\n.bk-root .choices__list--dropdown .choices__list {\n position: relative;\n max-height: 300px;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n will-change: scroll-position;\n}\n.bk-root .choices__list--dropdown .choices__item {\n position: relative;\n padding: 10px;\n font-size: 14px;\n}\n.bk-root [dir='rtl'] .choices__list--dropdown .choices__item {\n text-align: right;\n}\n@media (min-width: 640px) {\n .bk-root .choices__list--dropdown .choices__item--selectable {\n padding-right: 100px;\n }\n .bk-root .choices__list--dropdown .choices__item--selectable:after {\n content: attr(data-select-text);\n font-size: 12px;\n opacity: 0;\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n }\n .bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable {\n text-align: right;\n padding-left: 100px;\n padding-right: 10px;\n }\n .bk-root [dir='rtl'] .choices__list--dropdown .choices__item--selectable:after {\n right: auto;\n left: 10px;\n }\n}\n.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted {\n background-color: #f2f2f2;\n}\n.bk-root .choices__list--dropdown .choices__item--selectable.is-highlighted:after {\n opacity: 0.5;\n}\n.bk-root .choices__item {\n cursor: default;\n}\n.bk-root .choices__item--selectable {\n cursor: pointer;\n}\n.bk-root .choices__item--disabled {\n cursor: not-allowed;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n opacity: 0.5;\n}\n.bk-root .choices__heading {\n font-weight: 600;\n font-size: 12px;\n padding: 10px;\n border-bottom: 1px solid #f7f7f7;\n color: gray;\n}\n.bk-root .choices__button {\n text-indent: -9999px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: 0;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n cursor: pointer;\n}\n.bk-root .choices__button:focus {\n outline: none;\n}\n.bk-root .choices__input {\n display: inline-block;\n vertical-align: baseline;\n background-color: #f9f9f9;\n font-size: 14px;\n margin-bottom: 5px;\n border: 0;\n border-radius: 0;\n max-width: 100%;\n padding: 4px 0 4px 2px;\n}\n.bk-root .choices__input:focus {\n outline: 0;\n}\n.bk-root [dir='rtl'] .choices__input {\n padding-right: 2px;\n padding-left: 0;\n}\n.bk-root .choices__placeholder {\n opacity: 0.5;\n}\n.bk-root .choices {\n width: 100%;\n}\n.bk-root .choices {\n box-sizing: border-box;\n}\n.bk-root .choices *,\n.bk-root .choices *:before,\n.bk-root .choices *:after {\n box-sizing: inherit;\n}\n.bk-root .choices__inner .choices__item.light {\n background-color: rgba(0, 126, 255, 0.08);\n border-radius: 5px;\n border: 1px solid rgba(0, 126, 255, 0.24);\n color: #007eff;\n}\n.bk-root .choices__inner .choices__item.solid {\n background-color: #1f77b4;\n border: none;\n border-radius: 5px;\n color: white;\n}\n.bk-root .choices__inner .choices__item.solid .is-highlighted {\n background-color: #1f77b4;\n border: none;\n}\n.bk-root .choices__input {\n background-color: transparent;\n}\n.bk-root .choices__inner {\n background: transparent;\n border: 1px solid darkgray;\n border-radius: 5px;\n min-height: unset;\n}\n.bk-root .choices__list {\n white-space: initial;\n}\n.bk-root .choices[data-type*=select-multiple] .choices__button.light {\n background-image: url(data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n}\n.bk-root .choices[data-type*=select-multiple] .choices__button.solid {\n background-image: url(data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);\n border-left: 1px solid white;\n opacity: 1;\n}\n"]}_update_layout(){this.layout=new Rh(this.el),this.layout.set_sizing(this.box_sizing())}render(){super.render(),this.select_el=Ko({multiple:!0,class:pb,name:this.model.name,disabled:this.model.disabled}),this.group_el.appendChild(this.select_el);const e=new Set(this.model.value),t=this.model.options.map((t=>{let n,r;return re(t)?n=r=t:[n,r]=t,{value:n,label:r,selected:e.has(n)}})),n=this.model.solid?"solid":"light",r=`choices__item ${n}`,i=`choices__button ${n}`,o={choices:t,duplicateItemsAllowed:!1,removeItemButton:this.model.delete_button,classNames:{item:r,button:i}};null!=this.model.placeholder&&(o.placeholderValue=this.model.placeholder),null!=this.model.max_items&&(o.maxItemCount=this.model.max_items),null!=this.model.option_limit&&(o.renderChoiceLimit=this.model.option_limit),this.choice_el=new(R_())(this.select_el,o);const a=()=>this.choice_el.containerOuter.element.getBoundingClientRect().height;null!=this._last_height&&this._last_height!=a()&&this.root.invalidate_layout(),this._last_height=a(),this.select_el.addEventListener("change",(()=>this.change_input()))}set_disabled(){this.model.disabled?this.choice_el.disable():this.choice_el.enable()}change_input(){const e=null!=this.el.querySelector("select:focus"),t=[];for(const e of this.el.querySelectorAll("option"))e.selected&&t.push(e.value);this.model.value=t,super.change_input(),e&&this.select_el.focus()}}P_.__name__="MultiChoiceView";class N_ extends vb{constructor(e){super(e)}static init_MultiChoice(){this.prototype.default_view=P_,this.define({value:[Sn,[]],options:[Sn,[]],max_items:[On,null],delete_button:[En,!0],placeholder:[Rn,null],option_limit:[On,null],solid:[En,!0]})}}N_.__name__="MultiChoice",N_.init_MultiChoice();const z_=/^[-+]?\d*$/,F_=/^[-+]?\d*\.?\d*(?:(?:\d|\d.)[eE][-+]?)*\d*$/;class B_ extends mb{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>this.input_el.name=this.model.name||"")),this.connect(this.model.properties.value.change,(()=>{this.input_el.value=this.format_value,this.old_value=this.input_el.value})),this.connect(this.model.properties.low.change,(()=>{const{value:e,low:t,high:n}=this.model;null!=t&&null!=n&&c(t<=n,"Invalid bounds, low must be inferior to high"),null!=e&&null!=t&&(this.model.value=Math.max(e,t))})),this.connect(this.model.properties.high.change,(()=>{const{value:e,low:t,high:n}=this.model;null!=t&&null!=n&&c(n>=t,"Invalid bounds, high must be superior to low"),null!=e&&null!=n&&(this.model.value=Math.min(e,n))})),this.connect(this.model.properties.high.change,(()=>this.input_el.placeholder=this.model.placeholder)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled)),this.connect(this.model.properties.placeholder.change,(()=>this.input_el.placeholder=this.model.placeholder))}get format_value(){return null!=this.model.value?this.model.pretty(this.model.value):""}_set_input_filter(e){this.input_el.addEventListener("input",(()=>{const{selectionStart:t,selectionEnd:n}=this.input_el;if(e(this.input_el.value))this.old_value=this.input_el.value;else{const e=this.old_value.length-this.input_el.value.length;this.input_el.value=this.old_value,t&&n&&this.input_el.setSelectionRange(t-1,n+e)}}))}render(){super.render(),this.input_el=Zo({type:"text",class:pb,name:this.model.name,value:this.format_value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.old_value=this.format_value,this.set_input_filter(),this.input_el.addEventListener("change",(()=>this.change_input())),this.input_el.addEventListener("focusout",(()=>this.input_el.value=this.format_value)),this.group_el.appendChild(this.input_el)}set_input_filter(){"int"==this.model.mode?this._set_input_filter((e=>z_.test(e))):"float"==this.model.mode&&this._set_input_filter((e=>F_.test(e)))}bound_value(e){let t=e;const{low:n,high:r}=this.model;return t=null!=n?Math.max(n,t):t,t=null!=r?Math.min(r,t):t,t}get value(){let e=""!==this.input_el.value?Number(this.input_el.value):null;return null!=e&&(e=this.bound_value(e)),e}change_input(){null==this.value?this.model.value=null:Number.isNaN(this.value)||(this.model.value=this.value)}}B_.__name__="NumericInputView";class j_ extends vb{constructor(e){super(e)}static init_NumericInput(){this.prototype.default_view=B_,this.define({value:[On,null],placeholder:[Rn,""],mode:[Tn,"int"],format:[Tn],low:[On,null],high:[On,null]})}_formatter(e,t){return re(t)?Lu.format(e,t):t.doFormat([e],{loc:0})[0]}pretty(e){return null!=this.format?this._formatter(e,this.format):`${e}`}}j_.__name__="NumericInput",j_.init_NumericInput();class U_ extends b_{render(){super.render();const e=Go({style:{overflow:"auto"}},this.model.text);this.markup_el.appendChild(e)}}U_.__name__="PreTextView";class V_ extends __{constructor(e){super(e)}static init_PreText(){this.prototype.default_view=U_}}V_.__name__="PreText",V_.init_PreText();class q_ extends kb{change_active(e){this.model.active!==e&&(this.model.active=e)}_update_active(){const{active:e}=this.model;this._buttons.forEach(((t,n)=>{va(t).toggle(iu,e===n)}))}}q_.__name__="RadioButtonGroupView";class H_ extends Tb{constructor(e){super(e)}static init_RadioButtonGroup(){this.prototype.default_view=q_,this.define({active:[Tn,null]})}}H_.__name__="RadioButtonGroup",H_.init_RadioButtonGroup();class $_ extends Cb{render(){super.render();const e=jo({class:[gb,this.model.inline?ou:null]});this.el.appendChild(e);const t=ci(),{active:n,labels:r}=this.model;this._inputs=[];for(let i=0;i<r.length;i++){const o=Zo({type:"radio",name:t,value:`${i}`});o.addEventListener("change",(()=>this.change_active(i))),this._inputs.push(o),this.model.disabled&&(o.disabled=!0),i==n&&(o.checked=!0);const a=Xo({},o,Uo({},r[i]));e.appendChild(a)}}change_active(e){this.model.active=e}}$_.__name__="RadioGroupView";class W_ extends Mb{constructor(e){super(e)}static init_RadioGroup(){this.prototype.default_view=$_,this.define({active:[On],labels:[Sn,[]],inline:[En,!1]})}}W_.__name__="RadioGroup",W_.init_RadioGroup();class G_ extends f_{}G_.__name__="RangeSliderView";class Y_ extends p_{constructor(e){super(e),this.behaviour="drag",this.connected=[!1,!0,!1]}static init_RangeSlider(){this.prototype.default_view=G_,this.override({format:"0[.]00"})}_formatter(e,t){return re(t)?Lu.format(e,t):t.doFormat([e],{loc:0})[0]}}Y_.__name__="RangeSlider",Y_.init_RangeSlider();class X_ extends mb{connect_signals(){super.connect_signals();const{value:e,options:t}=this.model.properties;this.on_change(e,(()=>{this._update_value()})),this.on_change(t,(()=>{oa(this.input_el),ta(this.input_el,...this.options_el())}))}options_el(){function e(e){return e.map((e=>{let t,n;return re(e)?t=n=e:[t,n]=e,Jo({value:t},n)}))}const{options:t}=this.model;return oe(t)?e(t):de(t).map((([t,n])=>Qo({label:t},e(n))))}render(){super.render(),this.input_el=Ko({class:pb,name:this.model.name,disabled:this.model.disabled},this.options_el()),this._update_value(),this.input_el.addEventListener("change",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){const e=this.input_el.value;this.model.value=e,super.change_input()}_update_value(){const{value:e}=this.model;null!=e&&0!=e.length&&(this.input_el.value=this.model.value)}}X_.__name__="SelectView";class Z_ extends vb{constructor(e){super(e)}static init_Select(){this.prototype.default_view=X_,this.define({value:[Rn,""],options:[Tn,[]]})}}Z_.__name__="Select",Z_.init_Select();class K_ extends d_{}K_.__name__="SliderView";class J_ extends p_{constructor(e){super(e),this.behaviour="tap",this.connected=[!0,!1]}static init_Slider(){this.prototype.default_view=K_,this.override({format:"0[.]00"})}_formatter(e,t){return re(t)?Lu.format(e,t):t.doFormat([e],{loc:0})[0]}}J_.__name__="Slider",J_.init_Slider();const{min:Q_,max:ex,floor:tx,abs:nx}=Math;function rx(e){return tx(e)!==e?e.toFixed(16).replace(/0+$/,"").split(".")[1].length:0}class ix extends B_{*buttons(){yield this.btn_up_el,yield this.btn_down_el}initialize(){super.initialize(),this._interval=200}connect_signals(){super.connect_signals();const e=this.model.properties;this.on_change(e.disabled,(()=>{for(const e of this.buttons())ya(e,"disabled",this.model.disabled)}))}render(){super.render(),this.wrapper_el=jo({class:"bk-spin-wrapper"}),this.group_el.replaceChild(this.wrapper_el,this.input_el),this.btn_up_el=Yo({class:"bk-spin-btn bk-spin-btn-up"}),this.btn_down_el=Yo({class:"bk-spin-btn bk-spin-btn-down"}),this.wrapper_el.appendChild(this.input_el),this.wrapper_el.appendChild(this.btn_up_el),this.wrapper_el.appendChild(this.btn_down_el);for(const e of this.buttons())ya(e,"disabled",this.model.disabled),e.addEventListener("mousedown",(e=>this._btn_mouse_down(e))),e.addEventListener("mouseup",(()=>this._btn_mouse_up())),e.addEventListener("mouseleave",(()=>this._btn_mouse_leave()));this.input_el.addEventListener("keydown",(e=>this._input_key_down(e))),this.input_el.addEventListener("keyup",(()=>this.model.value_throttled=this.model.value)),this.input_el.addEventListener("wheel",(e=>this._input_mouse_wheel(e))),this.input_el.addEventListener("wheel",function(e,t,n=!1){let r;return function(...i){const o=this,a=n&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n||e.apply(o,i)}),t),a&&e.apply(o,i)}}((()=>{this.model.value_throttled=this.model.value}),this.model.wheel_wait,!1))}get precision(){const{low:e,high:t,step:n}=this.model;return ex(...[e,t,n].map(nx).reduce(((e,t)=>(null!=t&&e.push(t),e)),[]).map(rx))}_start_incrementation(e){clearInterval(this._interval_handle),this._counter=0;const{step:t}=this.model,n=e=>{if(this._counter+=1,this._counter%5==0){const t=Math.floor(this._counter/5);t<10?(clearInterval(this._interval_handle),this._interval_handle=setInterval((()=>n(e)),this._interval/(t+1))):t>=10&&t<=13&&(clearInterval(this._interval_handle),this._interval_handle=setInterval((()=>n(2*e)),this._interval/10))}this.increment(e)};this._interval_handle=setInterval((()=>n(e*t)),this._interval)}_stop_incrementation(){clearInterval(this._interval_handle),this.model.value_throttled=this.model.value}_btn_mouse_down(e){e.preventDefault();const t=e.currentTarget===this.btn_up_el?1:-1;this.increment(t*this.model.step),this.input_el.focus(),this._start_incrementation(t)}_btn_mouse_up(){this._stop_incrementation()}_btn_mouse_leave(){this._stop_incrementation()}_input_mouse_wheel(e){if(document.activeElement===this.input_el){e.preventDefault();const t=e.deltaY>0?-1:1;this.increment(t*this.model.step)}}_input_key_down(e){switch(e.keyCode){case ba.Up:return e.preventDefault(),this.increment(this.model.step);case ba.Down:return e.preventDefault(),this.increment(-this.model.step);case ba.PageUp:return e.preventDefault(),this.increment(this.model.page_step_multiplier*this.model.step);case ba.PageDown:return e.preventDefault(),this.increment(-this.model.page_step_multiplier*this.model.step)}}adjust_to_precision(e){return this.bound_value(Number(e.toFixed(this.precision)))}increment(e){const{low:t,high:n}=this.model;null==this.model.value?e>0?this.model.value=null!=t?t:null!=n?Q_(0,n):0:e<0&&(this.model.value=null!=n?n:null!=t?ex(t,0):0):this.model.value=this.adjust_to_precision(this.model.value+e)}change_input(){super.change_input(),this.model.value_throttled=this.model.value}}ix.__name__="SpinnerView";class ox extends j_{constructor(e){super(e)}static init_Spinner(){this.prototype.default_view=ix,this.define({value_throttled:[On,null],step:[On,1],page_step_multiplier:[On,10],wheel_wait:[On,100]}),this.override({mode:"float"})}}ox.__name__="Spinner",ox.init_Spinner();class ax extends mb{connect_signals(){super.connect_signals(),this.connect(this.model.properties.name.change,(()=>this.input_el.name=this.model.name||"")),this.connect(this.model.properties.value.change,(()=>this.input_el.value=this.model.value)),this.connect(this.model.properties.disabled.change,(()=>this.input_el.disabled=this.model.disabled)),this.connect(this.model.properties.placeholder.change,(()=>this.input_el.placeholder=this.model.placeholder)),this.connect(this.model.properties.rows.change,(()=>this.input_el.rows=this.model.rows)),this.connect(this.model.properties.cols.change,(()=>this.input_el.cols=this.model.cols)),this.connect(this.model.properties.max_length.change,(()=>this.input_el.maxLength=this.model.max_length))}render(){super.render(),this.input_el=ea({class:pb,name:this.model.name,disabled:this.model.disabled,placeholder:this.model.placeholder,cols:this.model.cols,rows:this.model.rows,maxLength:this.model.max_length}),this.input_el.textContent=this.model.value,this.input_el.addEventListener("change",(()=>this.change_input())),this.group_el.appendChild(this.input_el)}change_input(){this.model.value=this.input_el.value,super.change_input()}}ax.__name__="TextAreaInputView";class sx extends vb{constructor(e){super(e)}static init_TextAreaInput(){this.prototype.default_view=ax,this.define({value:[Rn,""],value_input:[Rn,""],placeholder:[Rn,""],cols:[On,20],rows:[On,2],max_length:[On,500]})}}sx.__name__="TextAreaInput",sx.init_TextAreaInput();class lx extends ub{connect_signals(){super.connect_signals(),this.connect(this.model.properties.active.change,(()=>this._update_active()))}render(){super.render(),this._update_active()}click(){this.model.active=!this.model.active,super.click()}_update_active(){va(this.button_el).toggle(iu,this.model.active)}}lx.__name__="ToggleView";class cx extends hb{constructor(e){super(e)}static init_Toggle(){this.prototype.default_view=lx,this.define({active:[En,!1]}),this.override({label:"Toggle"})}}cx.__name__="Toggle",cx.init_Toggle(),Cy(a);var ux=n(55225),hx=n(27088),dx=n(81224),fx=n(3302);class px extends sb{constructor(e){super(e)}static init_TableWidget(){this.define({source:[Mn],view:[Mn,()=>new hl]})}initialize(){super.initialize(),null==this.view.source&&(this.view.source=this.source,this.view.compute_indices())}}px.__name__="TableWidget",px.init_TableWidget();var gx=n(18686);class mx extends rs{constructor(e){super(e)}doFormat(e,t,n,r,i){return null==n?"":(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}mx.__name__="CellFormatter";class vx extends mx{constructor(e){super(e)}static init_StringFormatter(){this.define({font_style:[Xn,"normal"],text_align:[wr,"left"],text_color:[Cn]})}doFormat(e,t,n,r,i){const{font_style:o,text_align:a,text_color:s}=this,l=jo({},null==n?"":`${n}`);switch(o){case"bold":l.style.fontWeight="bold";break;case"italic":l.style.fontStyle="italic"}return null!=a&&(l.style.textAlign=a),null!=s&&(l.style.color=s),l.outerHTML}}vx.__name__="StringFormatter",vx.init_StringFormatter();class yx extends vx{constructor(e){super(e)}static init_ScientificFormatter(){this.define({nan_format:[Rn],precision:[On,10],power_limit_high:[On,5],power_limit_low:[On,-3]})}get scientific_limit_low(){return 10**this.power_limit_low}get scientific_limit_high(){return 10**this.power_limit_high}doFormat(e,t,n,r,i){const o=n<=this.scientific_limit_low||n>=this.scientific_limit_high;let a=this.precision;return a<1&&(a=1),n=null!=n&&!isNaN(n)||null==this.nan_format?o?n.toExponential(a):n.toFixed(a).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,""):this.nan_format,super.doFormat(e,t,n,r,i)}}yx.__name__="ScientificFormatter",yx.init_ScientificFormatter();class bx extends vx{constructor(e){super(e)}static init_NumberFormatter(){this.define({format:[Rn,"0,0"],language:[Rn,"en"],rounding:[mr,"round"],nan_format:[Rn]})}doFormat(e,t,n,r,i){const{format:o,language:a,nan_format:s}=this,l=(()=>{switch(this.rounding){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}})();return n=null!=n&&!isNaN(n)||null==s?Lu.format(n,o,a,l):s,super.doFormat(e,t,n,r,i)}}bx.__name__="NumberFormatter",bx.init_NumberFormatter();class _x extends mx{constructor(e){super(e)}static init_BooleanFormatter(){this.define({icon:[Rn,"check"]})}doFormat(e,t,n,r,i){return n?Wo({class:this.icon}).outerHTML:""}}_x.__name__="BooleanFormatter",_x.init_BooleanFormatter();class xx extends vx{constructor(e){super(e)}static init_DateFormatter(){this.define({format:[Rn,"ISO-8601"],nan_format:[Rn]})}getFormat(){switch(this.format){case"ATOM":case"W3C":case"RFC-3339":case"ISO-8601":return"%Y-%m-%d";case"COOKIE":return"%a, %d %b %Y";case"RFC-850":return"%A, %d-%b-%y";case"RFC-1123":case"RFC-2822":return"%a, %e %b %Y";case"RSS":case"RFC-822":case"RFC-1036":return"%a, %e %b %y";case"TIMESTAMP":return;default:return this.format}}doFormat(e,t,n,r,i){const{nan_format:o}=this;let a;return a=null!=(n=re(n)?parseInt(n,10):n)&&!isNaN(n)&&-9223372036854776!==n||null==o?null==n?"":Ou()(n,this.getFormat()):o,super.doFormat(e,t,a,r,i)}}xx.__name__="DateFormatter",xx.init_DateFormatter();class wx extends mx{constructor(e){super(e)}static init_HTMLTemplateFormatter(){this.define({template:[Rn,"<%= value %>"]})}doFormat(e,t,n,r,i){const{template:o}=this;return null==n?"":gx._.template(o)(Object.assign(Object.assign({},i),{value:n}))}}wx.__name__="HTMLTemplateFormatter",wx.init_HTMLTemplateFormatter();class Ax extends rs{constructor(e){super(e)}static init_TableColumn(){this.define({field:[Rn],title:[Rn],width:[On,300],formatter:[Mn,()=>new vx],editor:[Mn,()=>new Dx],sortable:[En,!0],default_sort:[vr,"ascending"]})}toColumn(){var e;return{id:ci(),field:this.field,name:null!==(e=this.title)&&void 0!==e?e:this.field,width:this.width,formatter:null!=this.formatter?this.formatter.doFormat.bind(this.formatter):void 0,model:this.editor,editor:this.editor.default_view,sortable:this.sortable,defaultSortAsc:"ascending"==this.default_sort}}}Ax.__name__="TableColumn",Ax.init_TableColumn();const kx="__bkdt_internal_index__",Tx={fit_columns:"FCV",fit_viewport:"FVC",force_fit:"LFF",none:"NOA"};class Sx{constructor(e,t){this.init(e,t)}init(e,t){if(kx in e.data)throw new Error(`special name ${kx} cannot be used as a data table column`);this.source=e,this.view=t,this.index=[...this.view.indices]}getLength(){return this.index.length}getItem(e){const t={};for(const n of ue(this.source.data))t[n]=this.source.data[n][this.index[e]];return t[kx]=this.index[e],t}getField(e,t){return t==kx?this.index[e]:this.source.data[t][this.index[e]]}setField(e,t,n){const r=this.index[e];this.source.patch({[t]:[[r,n]]})}getRecords(){return U(0,this.getLength()).map((e=>this.getItem(e)))}getItems(){return this.getRecords()}slice(e,t,n){return U(e=null!=e?e:0,t=null!=t?t:this.getLength(),n=null!=n?n:1).map((e=>this.getItem(e)))}sort(e){let t=e.map((e=>[e.sortCol.field,e.sortAsc?1:-1]));0==t.length&&(t=[[kx,1]]);const n=this.getRecords(),r=this.index.slice();this.index.sort(((e,i)=>{for(const[o,a]of t){const t=n[r.indexOf(e)][o],s=n[r.indexOf(i)][o];if(t!==s)return te(t)&&te(s)?a*(t-s||+isNaN(t)-+isNaN(s)):`${t}`>`${s}`?a:-a}return 0}))}}Sx.__name__="TableDataProvider";class Ex extends ab{constructor(){super(...arguments),this._in_selection_update=!1,this._warned_not_reorderable=!1,this._width=null}connect_signals(){super.connect_signals(),this.connect(this.model.change,(()=>this.render())),this.connect(this.model.source.streaming,(()=>this.updateGrid())),this.connect(this.model.source.patching,(()=>this.updateGrid())),this.connect(this.model.source.change,(()=>this.updateGrid())),this.connect(this.model.source.properties.data.change,(()=>this.updateGrid())),this.connect(this.model.source.selected.change,(()=>this.updateSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.updateSelection()))}remove(){var e;null===(e=this.grid)||void 0===e||e.destroy(),super.remove()}styles(){return[...super.styles(),'\n.bk-root {\n /*\nIMPORTANT:\nIn order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.\nNo built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS\nclasses should alter those!\n*/\n /*\nIMPORTANT:\nIn order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.\nNo built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS\nclasses should alter those!\n*/\n /* Menu button */\n /* Menu */\n /* Menu items */\n /* Disabled */\n /* Divider */\n /* Excluded item from Column Picker will be hidden */\n}\n.bk-root .slick-header.ui-state-default,\n.bk-root .slick-headerrow.ui-state-default,\n.bk-root .slick-footerrow.ui-state-default,\n.bk-root .slick-top-panel-scroller.ui-state-default,\n.bk-root .slick-group-header.ui-state-default {\n width: 100%;\n overflow: auto;\n position: relative;\n border-left: 0px !important;\n}\n.bk-root .slick-header.ui-state-default {\n overflow: inherit;\n}\n.bk-root .slick-header::-webkit-scrollbar,\n.bk-root .slick-headerrow::-webkit-scrollbar,\n.bk-root .slick-footerrow::-webkit-scrollbar {\n display: none;\n}\n.bk-root .slick-header-columns,\n.bk-root .slick-headerrow-columns,\n.bk-root .slick-footerrow-columns,\n.bk-root .slick-group-header-columns {\n position: relative;\n white-space: nowrap;\n cursor: default;\n overflow: hidden;\n}\n.bk-root .slick-header-column.ui-state-default,\n.bk-root .slick-group-header-column.ui-state-default {\n position: relative;\n display: inline-block;\n box-sizing: content-box !important;\n /* this here only for Firefox! */\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n height: 16px;\n line-height: 16px;\n margin: 0;\n padding: 4px;\n border-right: 1px solid silver;\n border-left: 0px !important;\n border-top: 0px !important;\n border-bottom: 0px !important;\n float: left;\n}\n.bk-root .slick-footerrow-column.ui-state-default {\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n margin: 0;\n padding: 4px;\n border-right: 1px solid silver;\n border-left: 0px;\n border-top: 0px;\n border-bottom: 0px;\n float: left;\n line-height: 20px;\n vertical-align: middle;\n}\n.bk-root .slick-headerrow-column.ui-state-default,\n.bk-root .slick-footerrow-column.ui-state-default {\n padding: 4px;\n}\n.bk-root .slick-header-column-sorted {\n font-style: italic;\n}\n.bk-root .slick-sort-indicator {\n display: inline-block;\n width: 8px;\n height: 5px;\n margin-left: 4px;\n margin-top: 6px;\n float: left;\n}\n.bk-root .slick-sort-indicator-numbered {\n display: inline-block;\n width: 8px;\n height: 5px;\n margin-left: 4px;\n margin-top: 0;\n line-height: 20px;\n float: left;\n font-family: Arial;\n font-style: normal;\n font-weight: bold;\n color: #6190CD;\n}\n.bk-root .slick-sort-indicator-desc {\n background: url(images/sort-desc.gif);\n}\n.bk-root .slick-sort-indicator-asc {\n background: url(images/sort-asc.gif);\n}\n.bk-root .slick-resizable-handle {\n position: absolute;\n font-size: 0.1px;\n display: block;\n cursor: col-resize;\n width: 9px;\n right: -5px;\n top: 0;\n height: 100%;\n z-index: 1;\n}\n.bk-root .slick-sortable-placeholder {\n background: silver;\n}\n.bk-root .grid-canvas {\n position: relative;\n outline: 0;\n}\n.bk-root .slick-row.ui-widget-content,\n.bk-root .slick-row.ui-state-active {\n position: absolute;\n border: 0px;\n width: 100%;\n}\n.bk-root .slick-cell,\n.bk-root .slick-headerrow-column,\n.bk-root .slick-footerrow-column {\n position: absolute;\n border: 1px solid transparent;\n border-right: 1px dotted silver;\n border-bottom-color: silver;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n vertical-align: middle;\n z-index: 1;\n padding: 1px 2px 2px 1px;\n margin: 0;\n white-space: nowrap;\n cursor: default;\n}\n.bk-root .slick-cell,\n.bk-root .slick-headerrow-column {\n border-bottom-color: silver;\n}\n.bk-root .slick-footerrow-column {\n border-top-color: silver;\n}\n.bk-root .slick-group-toggle {\n display: inline-block;\n}\n.bk-root .slick-cell.highlighted {\n background: lightskyblue;\n background: rgba(0, 0, 255, 0.2);\n -webkit-transition: all 0.5s;\n -moz-transition: all 0.5s;\n -o-transition: all 0.5s;\n transition: all 0.5s;\n}\n.bk-root .slick-cell.flashing {\n border: 1px solid red !important;\n}\n.bk-root .slick-cell.editable {\n z-index: 11;\n overflow: visible;\n background: white;\n border-color: black;\n border-style: solid;\n}\n.bk-root .slick-cell:focus {\n outline: none;\n}\n.bk-root .slick-reorder-proxy {\n display: inline-block;\n background: blue;\n opacity: 0.15;\n cursor: move;\n}\n.bk-root .slick-reorder-guide {\n display: inline-block;\n height: 2px;\n background: blue;\n opacity: 0.7;\n}\n.bk-root .slick-selection {\n z-index: 10;\n position: absolute;\n border: 2px dashed black;\n}\n.bk-root .slick-pane {\n position: absolute;\n outline: 0;\n overflow: hidden;\n width: 100%;\n}\n.bk-root .slick-pane-header {\n display: block;\n}\n.bk-root .slick-header {\n overflow: hidden;\n position: relative;\n}\n.bk-root .slick-headerrow {\n overflow: hidden;\n position: relative;\n}\n.bk-root .slick-top-panel-scroller {\n overflow: hidden;\n position: relative;\n}\n.bk-root .slick-top-panel {\n width: 10000px;\n}\n.bk-root .slick-viewport {\n position: relative;\n outline: 0;\n width: 100%;\n}\n.bk-root .slick-header-columns {\n background: url(\'images/header-columns-bg.gif\') repeat-x center bottom;\n border-bottom: 1px solid silver;\n}\n.bk-root .slick-header-column {\n background: url(\'images/header-columns-bg.gif\') repeat-x center bottom;\n border-right: 1px solid silver;\n}\n.bk-root .slick-header-column:hover,\n.bk-root .slick-header-column-active {\n background: white url(\'images/header-columns-over-bg.gif\') repeat-x center bottom;\n}\n.bk-root .slick-headerrow {\n background: #fafafa;\n}\n.bk-root .slick-headerrow-column {\n background: #fafafa;\n border-bottom: 0;\n height: 100%;\n}\n.bk-root .slick-row.ui-state-active {\n background: #F5F7D7;\n}\n.bk-root .slick-row {\n position: absolute;\n background: white;\n border: 0px;\n line-height: 20px;\n}\n.bk-root .slick-row.selected {\n z-index: 10;\n background: #DFE8F6;\n}\n.bk-root .slick-cell {\n padding-left: 4px;\n padding-right: 4px;\n}\n.bk-root .slick-group {\n border-bottom: 2px solid silver;\n}\n.bk-root .slick-group-toggle {\n width: 9px;\n height: 9px;\n margin-right: 5px;\n}\n.bk-root .slick-group-toggle.expanded {\n background: url(images/collapse.gif) no-repeat center center;\n}\n.bk-root .slick-group-toggle.collapsed {\n background: url(images/expand.gif) no-repeat center center;\n}\n.bk-root .slick-group-totals {\n color: gray;\n background: white;\n}\n.bk-root .slick-group-select-checkbox {\n width: 13px;\n height: 13px;\n margin: 3px 10px 0 0;\n display: inline-block;\n}\n.bk-root .slick-group-select-checkbox.checked {\n background: url(images/GrpCheckboxY.png) no-repeat center center;\n}\n.bk-root .slick-group-select-checkbox.unchecked {\n background: url(images/GrpCheckboxN.png) no-repeat center center;\n}\n.bk-root .slick-cell.selected {\n background-color: beige;\n}\n.bk-root .slick-cell.active {\n border-color: gray;\n border-style: solid;\n}\n.bk-root .slick-sortable-placeholder {\n background: silver !important;\n}\n.bk-root .slick-row.odd {\n background: #fafafa;\n}\n.bk-root .slick-row.ui-state-active {\n background: #F5F7D7;\n}\n.bk-root .slick-row.loading {\n opacity: 0.5;\n}\n.bk-root .slick-cell.invalid {\n border-color: red;\n -moz-animation-duration: 0.2s;\n -webkit-animation-duration: 0.2s;\n -moz-animation-name: slickgrid-invalid-hilite;\n -webkit-animation-name: slickgrid-invalid-hilite;\n}\n@-moz-keyframes slickgrid-invalid-hilite {\n from {\n box-shadow: 0 0 6px red;\n }\n to {\n box-shadow: none;\n }\n}\n@-webkit-keyframes slickgrid-invalid-hilite {\n from {\n box-shadow: 0 0 6px red;\n }\n to {\n box-shadow: none;\n }\n}\n.bk-root .slick-column-name,\n.bk-root .slick-sort-indicator {\n /**\n * This makes all "float:right" elements after it that spill over to the next line\n * display way below the lower boundary of the column thus hiding them.\n */\n display: inline-block;\n float: left;\n margin-bottom: 100px;\n}\n.bk-root .slick-header-button {\n display: inline-block;\n float: right;\n vertical-align: top;\n margin: 1px;\n /**\n * This makes all "float:right" elements after it that spill over to the next line\n * display way below the lower boundary of the column thus hiding them.\n */\n margin-bottom: 100px;\n height: 15px;\n width: 15px;\n background-repeat: no-repeat;\n background-position: center center;\n cursor: pointer;\n}\n.bk-root .slick-header-button-hidden {\n width: 0;\n -webkit-transition: 0.2s width;\n -ms-transition: 0.2s width;\n transition: 0.2s width;\n}\n.bk-root .slick-header-column:hover > .slick-header-button {\n width: 15px;\n}\n.bk-root .slick-header-menubutton {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 14px;\n background-repeat: no-repeat;\n background-position: left center;\n background-image: url(../images/down.gif);\n cursor: pointer;\n display: none;\n border-left: thin ridge silver;\n}\n.bk-root .slick-header-column:hover > .slick-header-menubutton,\n.bk-root .slick-header-column-active .slick-header-menubutton {\n display: inline-block;\n}\n.bk-root .slick-header-menu {\n position: absolute;\n display: inline-block;\n margin: 0;\n padding: 2px;\n cursor: default;\n}\n.bk-root .slick-header-menuitem {\n list-style: none;\n margin: 0;\n padding: 0;\n cursor: pointer;\n}\n.bk-root .slick-header-menuicon {\n display: inline-block;\n width: 16px;\n height: 16px;\n vertical-align: middle;\n margin-right: 4px;\n background-repeat: no-repeat;\n background-position: center center;\n}\n.bk-root .slick-header-menucontent {\n display: inline-block;\n vertical-align: middle;\n}\n.bk-root .slick-header-menuitem-disabled {\n color: silver;\n}\n.bk-root .slick-header-menuitem.slick-header-menuitem-divider {\n cursor: default;\n border: none;\n overflow: hidden;\n padding: 0;\n height: 1px;\n margin: 8px 2px;\n background-color: #cecece;\n}\n.bk-root .slick-header-menuitem-divider.slick-header-menuitem:hover {\n background-color: #cecece;\n}\n.bk-root .slick-columnpicker {\n border: 1px solid #718BB7;\n background: #f0f0f0;\n padding: 6px;\n -moz-box-shadow: 2px 2px 2px silver;\n -webkit-box-shadow: 2px 2px 2px silver;\n box-shadow: 2px 2px 2px silver;\n min-width: 150px;\n cursor: default;\n position: absolute;\n z-index: 20;\n overflow: auto;\n resize: both;\n}\n.bk-root .slick-columnpicker > .close {\n float: right;\n}\n.bk-root .slick-columnpicker .title {\n font-size: 16px;\n width: 60%;\n border-bottom: solid 1px #d6d6d6;\n margin-bottom: 10px;\n}\n.bk-root .slick-columnpicker li {\n list-style: none;\n margin: 0;\n padding: 0;\n background: none;\n}\n.bk-root .slick-columnpicker input {\n margin: 4px;\n}\n.bk-root .slick-columnpicker li a {\n display: block;\n padding: 4px;\n font-weight: bold;\n}\n.bk-root .slick-columnpicker li a:hover {\n background: white;\n}\n.bk-root .slick-columnpicker-list li.hidden {\n display: none;\n}\n.bk-root .slick-pager {\n width: 100%;\n height: 26px;\n border: 1px solid gray;\n border-top: 0;\n background: url(\'../images/header-columns-bg.gif\') repeat-x center bottom;\n vertical-align: middle;\n}\n.bk-root .slick-pager .slick-pager-status {\n display: inline-block;\n padding: 6px;\n}\n.bk-root .slick-pager .ui-icon-container {\n display: inline-block;\n margin: 2px;\n border-color: gray;\n}\n.bk-root .slick-pager .slick-pager-nav {\n display: inline-block;\n float: left;\n padding: 2px;\n}\n.bk-root .slick-pager .slick-pager-settings {\n display: block;\n float: right;\n padding: 2px;\n}\n.bk-root .slick-pager .slick-pager-settings * {\n vertical-align: middle;\n}\n.bk-root .slick-pager .slick-pager-settings a {\n padding: 2px;\n text-decoration: underline;\n cursor: pointer;\n}\n.bk-root .slick-header-columns {\n border-bottom: 1px solid silver;\n background-image: none;\n}\n.bk-root .slick-header-column {\n border-right: 1px solid transparent;\n background-image: none;\n}\n.bk-root .slick-header-column:last-of-type {\n border-right-color: transparent;\n}\n.bk-root .slick-header-column:hover,\n.bk-root .slick-header-column-active {\n background-color: #F0F8FF;\n background-image: none;\n}\n.bk-root .slick-group-toggle.expanded {\n background-image: url("data:image/gif;base64,R0lGODlhCQAJAPcAAAFGeoCAgNXz/+v5/+v6/+z5/+36//L7//X8//j9/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashgQUFjBAkaJCABgxGlB4AGHCAAIQiBypEEECkScJqgwQEAA7");\n}\n.bk-root .slick-group-toggle.collapsed {\n background-image: url("data:image/gif;base64,R0lGODlhCQAJAPcAAAFGeoCAgNXz/+v5/+v6/+z5/+36//L7//X8//j9/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashgQUFjAAQIABAwoBaNSIMYCAAwIqGlSIAEHFkiQTIBCgkqDLAAEBADs=");\n}\n.bk-root .slick-group-select-checkbox.checked {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAIAAACQKrqGAAAABGdBTUEAALGPC/your_sha256_hashV0IDQuMC4xNkRpr/UAAAEcSURBVChTjdI9S8NQFAbg/raQXVwCRRFE7GK7OXTwD+ikk066VF3a0ja0hQTyQdJrwNq0zrYSQRLEXMSWSlCIb8glqRcFD+your_sha256_hashjj6OTSGlHv+U2WZUZbPWKOv1ZjT5a7pbIoiptbO5b73mwrjHa1B27l8VlTEIS1damlTnEE+EEN9/P8WrfH81qdAIGeXvTTmzltdCy46sEhxpKUINReZR9NnqZbr9puugxV3NjWh/k74WmmEdWhmUNy2jNmWRc6fZTVADCqao52u+DGWTACYNT3fRxwtatPufTNR4yCIGAUn5hS+vJHhWGY/ANx/A3tvdv+1tZmuwAAAABJRU5ErkJggg==");\n}\n.bk-root .slick-group-select-checkbox.unchecked {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAIAAACQKrqGAAAABGdBTUEAALGPC/your_sha256_hashV0IDQuMC4xNkRpr/UAAACXSURBVChT1dIxC4MwEAXg/v8/VOhQVDBNakV0KA6pxS4JhWRSIYPEJxwdDi1de7wleR+your_sha256_hashyour_sha256_hash3/oEYF8PiDn/I2FHCAAAAAElFTkSuQmCC");\n}\n.bk-root .slick-sort-indicator-desc {\n background-image: url("data:image/gif;base64,R0lGODlhDQAFAIcAAGGQzUD/QOPu+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAANAAUAAAgeAAUAGEgQgIAACBEKLHgwYcKFBh1KFNhQosOKEgMCADs=");\n}\n.bk-root .slick-sort-indicator-asc {\n background-image: url("data:image/gif;base64,R0lGODlhDQAFAIcAAGGQzUD/QOPu+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAANAAUAAAgbAAMIDABgoEGDABIeRJhQ4cKGEA8KmEiRosGAADs=");\n}\n.bk-root .slick-header-menubutton {\n background-image: url("data:image/gif;base64,R0lGODlhDgAOAIABADtKYwAAACH5BAEAAAEALAAAAAAOAA4AAAISjI+py+0PHZgUsGobhTn6DxoFADs=");\n}\n.bk-root .slick-pager {\n background-image: none;\n}\n','\n.bk-root .bk-data-table {\n box-sizing: content-box;\n font-size: 11px;\n}\n.bk-root .bk-data-table input[type="checkbox"] {\n margin-left: 4px;\n margin-right: 4px;\n}\n.bk-root .bk-cell-special-defaults {\n border-right-color: silver;\n border-right-style: solid;\n background: #f5f5f5;\n}\n.bk-root .bk-cell-select {\n border-right-color: silver;\n border-right-style: solid;\n background: #f5f5f5;\n}\n.bk-root .slick-cell.bk-cell-index {\n border-right-color: silver;\n border-right-style: solid;\n background: #f5f5f5;\n text-align: right;\n background: #f0f0f0;\n color: #909090;\n}\n.bk-root .bk-header-index .slick-column-name {\n float: right;\n}\n.bk-root .slick-row.selected .bk-cell-index {\n background-color: transparent;\n}\n.bk-root .slick-row.odd {\n background: #f0f0f0;\n}\n.bk-root .slick-cell {\n padding-left: 4px;\n padding-right: 4px;\n border-right-color: transparent;\n border: 0.25px solid transparent;\n}\n.bk-root .slick-cell .bk {\n line-height: inherit;\n}\n.bk-root .slick-cell.active {\n border-style: dashed;\n}\n.bk-root .slick-cell.selected {\n background-color: #F0F8FF;\n}\n.bk-root .slick-cell.editable {\n padding-left: 0;\n padding-right: 0;\n}\n.bk-root .bk-cell-editor {\n display: contents;\n}\n.bk-root .bk-cell-editor input,\n.bk-root .bk-cell-editor select {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n outline: 0;\n background: transparent;\n vertical-align: baseline;\n}\n.bk-root .bk-cell-editor input {\n padding-left: 4px;\n padding-right: 4px;\n}\n.bk-root .bk-cell-editor-completion {\n font-size: 11px;\n}\n']}update_position(){super.update_position(),this.grid.resizeCanvas()}after_layout(){super.after_layout(),this.updateLayout(!0,!1)}box_sizing(){const e=super.box_sizing();return"fit_viewport"===this.model.autosize_mode&&null!=this._width&&(e.width=this._width),e}updateLayout(e,t){const n=this.autosize;n===Tx.fit_columns||n===Tx.force_fit?(e||this.grid.resizeCanvas(),this.grid.autosizeColumns()):e&&t&&n===Tx.fit_viewport&&this.invalidate_layout()}updateGrid(){if(this.model.view.compute_indices(),this.data.init(this.model.source,this.model.view),this.model.sortable){const e=this.grid.getColumns(),t=this.grid.getSortColumns().map((t=>({sortCol:{field:e[this.grid.getColumnIndex(t.columnId)].field},sortAsc:t.sortAsc})));this.data.sort(t)}this.grid.invalidate(),this.updateLayout(!0,!0)}updateSelection(){if(this._in_selection_update)return;const{selected:e}=this.model.source,t=e.indices.map((e=>this.data.index.indexOf(e))).sort();this._in_selection_update=!0,this.grid.setSelectedRows(t),this._in_selection_update=!1;const n=this.grid.getViewport(),r=this.model.get_scroll_index(n,t);null!=r&&this.grid.scrollRowToTop(r)}newIndexColumn(){return{id:ci(),name:this.model.index_header,field:kx,width:this.model.index_width,behavior:"select",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:"bk-cell-index",headerCssClass:"bk-header-index"}}css_classes(){return super.css_classes().concat("bk-data-table")}get autosize(){let e;return e=!0===this.model.fit_columns?Tx.force_fit:!1===this.model.fit_columns?Tx.none:Tx[this.model.autosize_mode],e}render(){var e;const t=this.model.columns.map((e=>Object.assign(Object.assign({},e.toColumn()),{parent:this})));let n=null;if("checkbox"==this.model.selectable&&(n=new hx.CheckboxSelectColumn({cssClass:"bk-cell-select"}),t.unshift(n.getColumnDefinition())),null!=this.model.index_position){const e=this.model.index_position,n=this.newIndexColumn();-1==e?t.push(n):e<-1?t.splice(e+1,0,n):t.splice(e,0,n)}let{reorderable:r}=this.model;!r||"undefined"!=typeof $&&null!=$.fn&&null!=$.fn.sortable||(this._warned_not_reorderable||(Re.warn("jquery-ui is required to enable DataTable.reorderable"),this._warned_not_reorderable=!0),r=!1);let i=-1,o=!1;const{frozen_rows:a,frozen_columns:s}=this.model,l=null==s?-1:s-1;null!=a&&(o=a<0,i=Math.abs(a));const c={enableCellNavigation:!1!==this.model.selectable,enableColumnReorder:r,autosizeColsMode:this.autosize,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:this.model.auto_edit,autoHeight:!1,rowHeight:this.model.row_height,frozenColumn:l,frozenRow:i,frozenBottom:o},u=null!=this.grid;if(this.data=new Sx(this.model.source,this.model.view),this.grid=new fx.Grid(this.el,this.data,t,c),this.autosize==Tx.fit_viewport){this.grid.autosizeColumns();let n=0;for(const r of t)n+=null!==(e=r.width)&&void 0!==e?e:0;this._width=Math.ceil(n)}if(this.grid.onSort.subscribe(((e,t)=>{if(!this.model.sortable)return;const n=t.sortCols;null!=n&&(this.data.sort(n),this.grid.invalidate(),this.updateSelection(),this.grid.render(),this.model.header_row||this._hide_header(),this.model.update_sort_columns(n))})),!1!==this.model.selectable){this.grid.setSelectionModel(new ux.RowSelectionModel({selectActiveRow:null==n})),null!=n&&this.grid.registerPlugin(n);const e={dataItemColumnValueExtractor(e,t){let n=e[t.field];return re(n)&&(n=n.replace(/\n/g,"\\n")),n},includeHeaderWhenCopying:!1};this.grid.registerPlugin(new dx.CellExternalCopyManager(e)),this.grid.onSelectedRowsChanged.subscribe(((e,t)=>{this._in_selection_update||(this.model.source.selected.indices=t.rows.map((e=>this.data.index[e])))})),this.updateSelection(),this.model.header_row||this._hide_header()}u&&this.updateLayout(u,!1)}_hide_header(){for(const e of this.el.querySelectorAll(".slick-header-columns"))e.style.height="0px";this.grid.resizeCanvas()}}Ex.__name__="DataTableView";class Cx extends px{constructor(e){super(e),this._sort_columns=[]}get sort_columns(){return this._sort_columns}static init_DataTable(){this.prototype.default_view=Ex,this.define((({Array:e,Boolean:t,Int:n,Ref:r,String:i,Enum:o,Or:a,Null:s})=>({autosize_mode:[o("fit_columns","fit_viewport","none","force_fit"),"force_fit"],auto_edit:[t,!1],columns:[e(r(Ax)),[]],fit_columns:[a(t,s),null],frozen_columns:[a(n,s),null],frozen_rows:[a(n,s),null],sortable:[t,!0],reorderable:[t,!0],editable:[t,!1],selectable:[a(t,o("checkbox")),!0],index_position:[a(n,s),0],index_header:[i,"#"],index_width:[n,40],scroll_to_selection:[t,!0],header_row:[t,!0],row_height:[n,25]}))),this.override({width:600,height:400})}update_sort_columns(e){this._sort_columns=e.map((({sortCol:e,sortAsc:t})=>({field:e.field,sortAsc:t})))}get_scroll_index(e,t){return this.scroll_to_selection&&0!=t.length?T(t,(t=>e.top<=t&&t<=e.bottom))?null:Math.max(0,Math.min(...t)-1):null}}Cx.__name__="DataTable",Cx.init_DataTable();class Mx extends Na{constructor(e){const{model:t,parent:n}=e.column;super(Object.assign({model:t,parent:n},e)),this.args=e,this.initialize(),this.render()}get emptyValue(){return null}initialize(){super.initialize(),this.inputEl=this._createInput(),this.defaultValue=null}async lazy_initialize(){throw new Error("unsupported")}css_classes(){return super.css_classes().concat("bk-cell-editor")}render(){super.render(),this.args.container.append(this.el),this.el.appendChild(this.inputEl),this.renderEditor(),this.disableNavigation()}renderEditor(){}disableNavigation(){this.inputEl.addEventListener("keydown",(e=>{switch(e.keyCode){case ba.Left:case ba.Right:case ba.Up:case ba.Down:case ba.PageUp:case ba.PageDown:e.stopImmediatePropagation()}}))}destroy(){this.remove()}focus(){this.inputEl.focus()}show(){}hide(){}position(){}getValue(){return this.inputEl.value}setValue(e){this.inputEl.value=e}serializeValue(){return this.getValue()}isValueChanged(){return!(""==this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue}applyValue(e,t){const n=this.args.grid.getData(),r=n.index.indexOf(e[kx]);n.setField(r,this.args.column.field,t)}loadValue(e){const t=e[this.args.column.field];this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)}validateValue(e){if(this.args.column.validator){const t=this.args.column.validator(e);if(!t.valid)return t}return{valid:!0,msg:null}}validate(){return this.validateValue(this.getValue())}}Mx.__name__="CellEditorView";class Ox extends rs{}Ox.__name__="CellEditor";class Lx extends Mx{get emptyValue(){return""}_createInput(){return Zo({type:"text"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}}Lx.__name__="StringEditorView";class Dx extends Ox{static init_StringEditor(){this.prototype.default_view=Lx,this.define({completions:[Sn,[]]})}}Dx.__name__="StringEditor",Dx.init_StringEditor();class Ix extends Mx{_createInput(){return ea()}renderEditor(){this.inputEl.focus(),this.inputEl.select()}}Ix.__name__="TextEditorView";class Rx extends Ox{static init_TextEditor(){this.prototype.default_view=Ix}}Rx.__name__="TextEditor",Rx.init_TextEditor();class Px extends Mx{_createInput(){return Ko()}renderEditor(){for(const e of this.model.options)this.inputEl.appendChild(Jo({value:e},e));this.focus()}}Px.__name__="SelectEditorView";class Nx extends Ox{static init_SelectEditor(){this.prototype.default_view=Px,this.define({options:[Sn,[]]})}}Nx.__name__="SelectEditor",Nx.init_SelectEditor();class zx extends Mx{_createInput(){return Zo({type:"text"})}}zx.__name__="PercentEditorView";class Fx extends Ox{static init_PercentEditor(){this.prototype.default_view=zx}}Fx.__name__="PercentEditor",Fx.init_PercentEditor();class Bx extends Mx{_createInput(){return Zo({type:"checkbox"})}renderEditor(){this.focus()}loadValue(e){this.defaultValue=!!e[this.args.column.field],this.inputEl.checked=this.defaultValue}serializeValue(){return this.inputEl.checked}}Bx.__name__="CheckboxEditorView";class jx extends Ox{static init_CheckboxEditor(){this.prototype.default_view=Bx}}jx.__name__="CheckboxEditor",jx.init_CheckboxEditor();class Ux extends Mx{_createInput(){return Zo({type:"text"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}remove(){super.remove()}serializeValue(){return parseInt(this.getValue(),10)||0}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}validateValue(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid integer"}:super.validateValue(e)}}Ux.__name__="IntEditorView";class Vx extends Ox{static init_IntEditor(){this.prototype.default_view=Ux,this.define({step:[On,1]})}}Vx.__name__="IntEditor",Vx.init_IntEditor();class qx extends Mx{_createInput(){return Zo({type:"text"})}renderEditor(){this.inputEl.focus(),this.inputEl.select()}remove(){super.remove()}serializeValue(){return parseFloat(this.getValue())||0}loadValue(e){super.loadValue(e),this.inputEl.defaultValue=this.defaultValue,this.inputEl.select()}validateValue(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid number"}:super.validateValue(e)}}qx.__name__="NumberEditorView";class Hx extends Ox{static init_NumberEditor(){this.prototype.default_view=qx,this.define({step:[On,.01]})}}Hx.__name__="NumberEditor",Hx.init_NumberEditor();class $x extends Mx{_createInput(){return Zo({type:"text"})}}$x.__name__="TimeEditorView";class Wx extends Ox{static init_TimeEditor(){this.prototype.default_view=$x}}Wx.__name__="TimeEditor",Wx.init_TimeEditor();class Gx extends Mx{_createInput(){return Zo({type:"text"})}get emptyValue(){return new Date}renderEditor(){this.inputEl.focus(),this.inputEl.select()}destroy(){super.destroy()}show(){super.show()}hide(){super.hide()}position(){return super.position()}getValue(){}setValue(e){}}Gx.__name__="DateEditorView";class Yx extends Ox{static init_DateEditor(){this.prototype.default_view=Gx}}Yx.__name__="DateEditor",Yx.init_DateEditor();const{Avg:Xx,Min:Zx,Max:Kx,Sum:Jx}=fx.Data.Aggregators;class Qx extends rs{constructor(e){super(e)}static init_RowAggregator(){this.define({field_:[Rn,""]})}}Qx.__name__="RowAggregator",Qx.init_RowAggregator();const ew=new Xx;class tw extends Qx{constructor(){super(...arguments),this.key="avg",this.init=ew.init,this.accumulate=ew.accumulate,this.storeResult=ew.storeResult}}tw.__name__="AvgAggregator";const nw=new Zx;class rw extends Qx{constructor(){super(...arguments),this.key="min",this.init=nw.init,this.accumulate=nw.accumulate,this.storeResult=nw.storeResult}}rw.__name__="MinAggregator";const iw=new Kx;class ow extends Qx{constructor(){super(...arguments),this.key="max",this.init=iw.init,this.accumulate=iw.accumulate,this.storeResult=iw.storeResult}}ow.__name__="MaxAggregator";const aw=new Jx;class sw extends Qx{constructor(){super(...arguments),this.key="sum",this.init=aw.init,this.accumulate=aw.accumulate,this.storeResult=aw.storeResult}}function lw(e,t,n,r,i){const{collapsed:o,level:a,title:s}=i,l=Uo({class:"slick-group-toggle "+(o?"collapsed":"expanded"),style:{"margin-left":15*a+"px"}}),c=Uo({class:"slick-group-title",level:a},s);return`${l.outerHTML}${c.outerHTML}`}function cw(e,t){const n=this.getDataItem(t.row);n instanceof fx.Group&&e.target.classList.contains("slick-group-toggle")&&(n.collapsed?this.getData().expandGroup(n.groupingKey):this.getData().collapseGroup(n.groupingKey),e.stopImmediatePropagation(),e.preventDefault(),this.invalidate(),this.render())}sw.__name__="SumAggregator";class uw extends rs{constructor(e){super(e)}static init_GroupingInfo(){this.define({getter:[Rn,""],aggregators:[Sn,[]],collapsed:[En,!1]})}get comparer(){return(e,t)=>e.value===t.value?0:e.value>t.value?1:-1}}uw.__name__="GroupingInfo",uw.init_GroupingInfo();class hw extends Sx{constructor(e,t,n,r){super(e,t),this.columns=n,this.groupingInfos=[],this.groupingDelimiter=":|:",this.target=r}setGrouping(e){this.groupingInfos=e,this.toggledGroupsByLevel=e.map((()=>({}))),this.refresh()}extractGroups(e,t){const n=[],r=new Map,i=t?t.level+1:0,{comparer:o,getter:a}=this.groupingInfos[i];return e.forEach((e=>{const o=this.source.data[a][e];let s=r.get(o);if(!s){const e=t?`${t.groupingKey}${this.groupingDelimiter}${o}`:`${o}`;s=Object.assign(new fx.Group,{value:o,level:i,groupingKey:e}),n.push(s),r.set(o,s)}s.rows.push(e)})),i<this.groupingInfos.length-1&&n.forEach((e=>{e.groups=this.extractGroups(e.rows,e)})),n.sort(o),n}calculateTotals(e,t){const n={avg:{},max:{},min:{},sum:{}},{source:{data:r}}=this,i=Object.keys(r),o=e.rows.map((e=>i.reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:r[n][e]})),{})));return t.forEach((e=>{e.init(),o.forEach((t=>e.accumulate(t))),e.storeResult(n)})),n}addTotals(e,t=0){const{aggregators:n,collapsed:r}=this.groupingInfos[t],i=this.toggledGroupsByLevel[t];e.forEach((e=>{e.groups&&this.addTotals(e.groups,t+1),n.length&&e.rows.length&&(e.totals=this.calculateTotals(e,n)),e.collapsed=r!==i[e.groupingKey],e.title=e.value?`${e.value}`:""}))}flattenedGroupedRows(e,t=0){const n=[];return e.forEach((e=>{if(n.push(e),!e.collapsed){const r=e.groups?this.flattenedGroupedRows(e.groups,t+1):e.rows;n.push(...r)}})),n}refresh(){const e=this.extractGroups([...this.view.indices]),t=this.source.data[this.columns[0].field];e.length&&(this.addTotals(e),this.rows=this.flattenedGroupedRows(e),this.target.data={row_indices:this.rows.map((e=>e instanceof fx.Group?e.rows:e)),labels:this.rows.map((e=>e instanceof fx.Group?e.title:t[e]))})}getLength(){return this.rows.length}getItem(e){const t=this.rows[e],{source:{data:n}}=this;return t instanceof fx.Group?t:Object.keys(n).reduce(((e,r)=>Object.assign(Object.assign({},e),{[r]:n[r][t]})),{[kx]:t})}getItemMetadata(e){const t=this.rows[e],n=this.columns.slice(1),r=t instanceof fx.Group?this.groupingInfos[t.level].aggregators:[];return t instanceof fx.Group?{selectable:!1,focusable:!1,cssClasses:"slick-group",columns:[{formatter:lw},...n.map((function(e){const{field:t,formatter:n}=e,i=r.find((({field_:e})=>e===t));if(i){const{key:e}=i;return{formatter:(r,i,o,a,s)=>n?n(r,i,s.totals[e][t],a,s):""}}return{}}))]}:{}}collapseGroup(e){const t=e.split(this.groupingDelimiter).length-1;this.toggledGroupsByLevel[t][e]=!this.groupingInfos[t].collapsed,this.refresh()}expandGroup(e){const t=e.split(this.groupingDelimiter).length-1;this.toggledGroupsByLevel[t][e]=this.groupingInfos[t].collapsed,this.refresh()}}hw.__name__="DataCubeProvider";class dw extends Ex{render(){const e={enableCellNavigation:!1!==this.model.selectable,enableColumnReorder:!1,autosizeColsMode:this.autosize,multiColumnSort:!1,editable:this.model.editable,autoEdit:this.model.auto_edit,rowHeight:this.model.row_height},t=this.model.columns.map((e=>e.toColumn()));var n,r;t[0].formatter=(n=t[0].formatter,r=this.model.grouping.length,(e,t,i,o,a)=>{const s=Uo({class:"slick-group-toggle",style:{"margin-left":15*(r||0)+"px"}}),l=n?n(e,t,i,o,a):`${i}`;return`${s.outerHTML}${l&&l.replace(/^<div/,"<span").replace(/div>$/,"span>")}`}),delete t[0].editor,this.data=new hw(this.model.source,this.model.view,t,this.model.target),this.data.setGrouping(this.model.grouping),this.el.style.width=`${this.model.width}px`,this.grid=new fx.Grid(this.el,this.data,t,e),this.grid.onClick.subscribe(cw)}}dw.__name__="DataCubeView";class fw extends Cx{constructor(e){super(e)}static init_DataCube(){this.prototype.default_view=dw,this.define({grouping:[Sn,[]],target:[Mn]})}}fw.__name__="DataCube",fw.init_DataCube(),Cy(s)},40824:e=>{var t,n={},r=n,i="en-US",o=null,a="0,0";function s(e){this._value=e}function l(e){var t,n="";for(t=0;t<e;t++)n+="0";return n}function c(e,t,n,r){var i,o,a=Math.pow(10,t);return o=e.toFixed(0).search("e")>-1?function(e,t){var n,r,i,o;return n=(o=e.toString()).split("e")[0],i=o.split("e")[1],o=n.split(".")[0]+(r=n.split(".")[1]||"")+l(i-r.length),t>0&&(o+="."+l(t)),o}(e,t):(n(e*a)/a).toFixed(t),r&&(i=new RegExp("0{1,"+r+"}$"),o=o.replace(i,"")),o}function u(e,t,r,a){var s,l,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T=!1,S=!1,E=!1,C="",M=!1,O=!1,L=!1,D=!1,I=!1,R="",P="",N=Math.abs(e),z=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],F=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],B="",j=!1,U=!1;if(0===e&&null!==o)return o;if(!isFinite(e))return""+e;if(0===t.indexOf("{")){var V=t.indexOf("}");if(-1===V)throw Error('Format should also contain a "}"');b=t.slice(1,V),t=t.slice(V+1)}else b="";if(t.indexOf("}")===t.length-1){var q=t.indexOf("{");if(-1===q)throw Error('Format should also contain a "{"');_=t.slice(q+1,-1),t=t.slice(0,q+1)}else _="";if(A=null===(k=-1===t.indexOf(".")?t.match(/([0-9]+).*/):t.match(/([0-9]+)\..*/))?-1:k[1].length,-1!==t.indexOf("-")&&(j=!0),t.indexOf("(")>-1?(T=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(S=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1){if(v=t.split(".")[0].match(/[0-9]+/g)||["0"],v=parseInt(v[0],10),M=t.indexOf("aK")>=0,O=t.indexOf("aM")>=0,L=t.indexOf("aB")>=0,D=t.indexOf("aT")>=0,I=M||O||L||D,t.indexOf(" a")>-1?(C=" ",t=t.replace(" a","")):t=t.replace("a",""),p=0==(p=(d=Math.floor(Math.log(N)/Math.LN10)+1)%3)?3:p,v&&0!==N&&(f=Math.floor(Math.log(N)/Math.LN10)+1-v,g=3*~~((Math.min(v,d)-p)/3),N/=Math.pow(10,g),-1===t.indexOf(".")&&v>3))for(t+="[.]",w=(w=0===f?0:3*~~(f/3)-f)<0?w+3:w,s=0;s<w;s++)t+="0";Math.floor(Math.log(Math.abs(e))/Math.LN10)+1!==v&&(N>=Math.pow(10,12)&&!I||D?(C+=n[i].abbreviations.trillion,e/=Math.pow(10,12)):N<Math.pow(10,12)&&N>=Math.pow(10,9)&&!I||L?(C+=n[i].abbreviations.billion,e/=Math.pow(10,9)):N<Math.pow(10,9)&&N>=Math.pow(10,6)&&!I||O?(C+=n[i].abbreviations.million,e/=Math.pow(10,6)):(N<Math.pow(10,6)&&N>=Math.pow(10,3)&&!I||M)&&(C+=n[i].abbreviations.thousand,e/=Math.pow(10,3)))}if(t.indexOf("b")>-1)for(t.indexOf(" b")>-1?(R=" ",t=t.replace(" b","")):t=t.replace("b",""),h=0;h<=z.length;h++)if(l=Math.pow(1024,h),u=Math.pow(1024,h+1),e>=l&&e<u){R+=z[h],l>0&&(e/=l);break}if(t.indexOf("d")>-1)for(t.indexOf(" d")>-1?(R=" ",t=t.replace(" d","")):t=t.replace("d",""),h=0;h<=F.length;h++)if(l=Math.pow(1e3,h),u=Math.pow(1e3,h+1),e>=l&&e<u){R+=F[h],l>0&&(e/=l);break}return t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(P=" ",t=t.replace(" o","")):t=t.replace("o",""),n[i].ordinal&&(P+=n[i].ordinal(e))),t.indexOf("[.]")>-1&&(E=!0,t=t.replace("[.]",".")),m=e.toString().split(".")[0],y=t.split(".")[1],x=t.indexOf(","),y?(m=(B=-1!==y.indexOf("*")?c(e,e.toString().split(".")[1].length,r):y.indexOf("[")>-1?c(e,(y=(y=y.replace("]","")).split("["))[0].length+y[1].length,r,y[1].length):c(e,y.length,r)).split(".")[0],B=B.split(".")[1].length?(a?C+a:n[i].delimiters.decimal)+B.split(".")[1]:"",E&&0===Number(B.slice(1))&&(B="")):m=c(e,null,r),m.indexOf("-")>-1&&(m=m.slice(1),U=!0),m.length<A&&(m=new Array(A-m.length+1).join("0")+m),x>-1&&(m=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n[i].delimiters.thousands)),0===t.indexOf(".")&&(m=""),b+(t.indexOf("(")<t.indexOf("-")?(T&&U?"(":"")+(j&&U||!T&&U?"-":""):(j&&U||!T&&U?"-":"")+(T&&U?"(":""))+(!U&&S&&0!==e?"+":"")+m+B+(P||"")+(C&&!a?C:"")+(R||"")+(T&&U?")":"")+_}function h(e,t){n[e]=t}function d(e){i=e;var r=n[e].defaults;r&&r.format&&t.defaultFormat(r.format),r&&r.currencyFormat&&t.defaultCurrencyFormat(r.currencyFormat)}e.exports,(t=function(e){return t.isNumbro(e)?e=e.value():0===e||void 0===e?e=0:Number(e)||(e=t.fn.unformat(e)),new s(Number(e))}).version="1.6.2",t.isNumbro=function(e){return e instanceof s},t.setLanguage=function(e,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var n=e,i=e.split("-")[0],o=null;r[n]||(Object.keys(r).forEach((function(e){o||e.split("-")[0]!==i||(o=e)})),n=o||t||"en-US"),d(n)},t.setCulture=function(e,t){var r=e,i=e.split("-")[1],o=null;n[r]||(i&&Object.keys(n).forEach((function(e){o||e.split("-")[1]!==i||(o=e)})),r=o||t||"en-US"),d(r)},t.language=function(e,n){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!e)return i;if(e&&!n){if(!r[e])throw new Error("Unknown language : "+e);d(e)}return!n&&r[e]||h(e,n),t},t.culture=function(e,r){if(!e)return i;if(e&&!r){if(!n[e])throw new Error("Unknown culture : "+e);d(e)}return!r&&n[e]||h(e,r),t},t.languageData=function(e){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!e)return r[i];if(!r[e])throw new Error("Unknown language : "+e);return r[e]},t.cultureData=function(e){if(!e)return n[i];if(!n[e])throw new Error("Unknown culture : "+e);return n[e]},t.culture("en-US",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}}),t.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),r},t.cultures=function(){return n},t.zeroFormat=function(e){o="string"==typeof e?e:null},t.defaultFormat=function(e){a="string"==typeof e?e:"0.0"},t.defaultCurrencyFormat=function(e){},t.validate=function(e,n){var r,i,o,a,s,l,c,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",e)),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{c=t.cultureData(n)}catch(e){c=t.cultureData(t.culture())}return o=c.currency.symbol,s=c.abbreviations,r=c.delimiters.decimal,i="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,!(null!==(u=e.match(/^[^\d]+/))&&(e=e.substr(1),u[0]!==o)||null!==(u=e.match(/[^\d]+$/))&&(e=e.slice(0,-1),u[0]!==s.thousand&&u[0]!==s.million&&u[0]!==s.billion&&u[0]!==s.trillion)||(l=new RegExp(i+"{2}"),e.match(/[^\d.,]/g)||(a=e.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.exports={format:function(e,r,o,s){return null!=o&&o!==t.culture()&&t.setCulture(o),function(e,t,r){var o;return o=t.indexOf("$")>-1?function(e,t,r){var o,a,s=t,l=s.indexOf("$"),c=s.indexOf("("),h=s.indexOf("+"),d=s.indexOf("-"),f="",p="";if(-1===s.indexOf("$")?"infix"===n[i].currency.position?(p=n[i].currency.symbol,n[i].currency.spaceSeparated&&(p=" "+p+" ")):n[i].currency.spaceSeparated&&(f=" "):s.indexOf(" $")>-1?(f=" ",s=s.replace(" $","")):s.indexOf("$ ")>-1?(f=" ",s=s.replace("$ ","")):s=s.replace("$",""),a=u(e,s,r,p),-1===t.indexOf("$"))switch(n[i].currency.position){case"postfix":a.indexOf(")")>-1?((a=a.split("")).splice(-1,0,f+n[i].currency.symbol),a=a.join("")):a=a+f+n[i].currency.symbol;break;case"infix":break;case"prefix":a.indexOf("(")>-1||a.indexOf("-")>-1?(a=a.split(""),o=Math.max(c,d)+1,a.splice(o,0,n[i].currency.symbol+f),a=a.join("")):a=n[i].currency.symbol+f+a;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else l<=1?a.indexOf("(")>-1||a.indexOf("+")>-1||a.indexOf("-")>-1?(o=1,(l<c||l<h||l<d)&&(o=0),(a=a.split("")).splice(o,0,n[i].currency.symbol+f),a=a.join("")):a=n[i].currency.symbol+f+a:a.indexOf(")")>-1?((a=a.split("")).splice(-1,0,f+n[i].currency.symbol),a=a.join("")):a=a+f+n[i].currency.symbol;return a}(e,t,r):t.indexOf("%")>-1?function(e,t,n){var r,i="";return e*=100,t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),(r=u(e,t,n)).indexOf(")")>-1?((r=r.split("")).splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}(e,t,r):t.indexOf(":")>-1?function(e){var t=Math.floor(e/60/60),n=Math.floor((e-60*t*60)/60),r=Math.round(e-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}(e):u(e,t,r),o}(Number(e),null!=r?r:a,null==s?Math.round:s)}}},3302:(e,t,n)=>{var r=n(98800);r.__exportStar(n(30413),e.exports),r.__exportStar(n(91995),e.exports),r.__exportStar(n(87361),e.exports),r.__exportStar(n(74719),e.exports),r.__exportStar(n(78793),e.exports),r.__exportStar(n(83220),e.exports),r.__exportStar(n(83091),e.exports)},66044:(e,t,n)=>{var r=n(35373);r.fn.drag=function(e,t,n){var i="string"==typeof e?e:"",o=r.isFunction(e)?e:r.isFunction(t)?t:null;return 0!==i.indexOf("drag")&&(i="drag"+i),n=(e==o?t:n)||{},o?this.on(i,n,o):this.trigger(i)};var i=r.event,o=i.special,a=o.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",noBubble:!0,add:function(e){var t=r.data(this,a.datakey),n=e.data||{};t.related+=1,r.each(a.defaults,(function(e,r){void 0!==n[e]&&(t[e]=n[e])}))},remove:function(){r.data(this,a.datakey).related-=1},setup:function(){if(!r.data(this,a.datakey)){var e=r.extend({related:0},a.defaults);r.data(this,a.datakey,e),i.add(this,"touchstart mousedown",a.init,e),this.attachEvent&&this.attachEvent("ondragstart",a.dontstart)}},teardown:function(){(r.data(this,a.datakey)||{}).related||(r.removeData(this,a.datakey),i.remove(this,"touchstart mousedown",a.init),a.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",a.dontstart))},init:function(e){if(!a.touched){var t,n=e.data;if(!(0!=e.which&&n.which>0&&e.which!=n.which)){var s=r(e.target).attr("class")||"";if(!r(e.target).is(n.not)&&s&&-1!==s.toString().indexOf("slick")&&(!n.handle||r(e.target).closest(n.handle,e.currentTarget).length)&&(a.touched="touchstart"==e.type?this:null,n.propagates=1,n.mousedown=this,n.interactions=[a.interaction(this,n)],n.target=e.target,n.pageX=e.pageX,n.pageY=e.pageY,n.dragging=null,t=a.hijack(e,"draginit",n),n.propagates))return(t=a.flatten(t))&&t.length&&(n.interactions=[],r.each(t,(function(){n.interactions.push(a.interaction(this,n))}))),n.propagates=n.interactions.length,!1!==n.drop&&o.drop&&o.drop.handler(e,n),a.textselect(!1),a.touched?i.add(a.touched,"touchmove touchend",a.handler,n):i.add(document,"mousemove mouseup",a.handler,n),!(!a.touched||n.live)&&void 0}}},interaction:function(e,t){var n=e&&e.ownerDocument&&r(e)[t.relative?"position":"offset"]()||{top:0,left:0};return{drag:e,callback:new a.callback,droppable:[],offset:n}},handler:function(e){var t=e.data;switch(e.type){case!t.dragging&&"touchmove":e.preventDefault();case!t.dragging&&"mousemove":if(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2)<Math.pow(t.distance,2))break;e.target=t.target,a.hijack(e,"dragstart",t),t.propagates&&(t.dragging=!0);case"touchmove":e.preventDefault();case"mousemove":if(t.dragging){if(a.hijack(e,"drag",t),t.propagates){!1!==t.drop&&o.drop&&o.drop.handler(e,t);break}e.type="mouseup"}default:a.touched?i.remove(a.touched,"touchmove touchend",a.handler):i.remove(document,"mousemove mouseup",a.handler),t.dragging&&(!1!==t.drop&&o.drop&&o.drop.handler(e,t),a.hijack(e,"dragend",t)),a.textselect(!0),!1===t.click&&t.dragging&&r.data(t.mousedown,"suppress.click",(new Date).getTime()+5),t.dragging=a.touched=!1}},hijack:function(e,t,n,o,s){if(n){var l,c,u,h={event:e.originalEvent,type:e.type},d=t.indexOf("drop")?"drag":"drop",f=o||0,p=isNaN(o)?n.interactions.length:o;e.type=t;var g=function(){};e.originalEvent=new r.Event(h.event,{preventDefault:g,stopPropagation:g,stopImmediatePropagation:g}),n.results=[];do{if(c=n.interactions[f]){if("dragend"!==t&&c.cancelled)continue;u=a.properties(e,n,c),c.results=[],r(s||c[d]||n.droppable).each((function(o,s){if(u.target=s,e.isPropagationStopped=function(){return!1},!1===(l=s?i.dispatch.call(s,e,u):null)?("drag"==d&&(c.cancelled=!0,n.propagates-=1),"drop"==t&&(c[d][o]=null)):"dropinit"==t&&c.droppable.push(a.element(l)||s),"dragstart"==t&&(c.proxy=r(a.element(l)||c.drag)[0]),c.results.push(l),delete e.result,"dropinit"!==t)return l})),n.results[f]=a.flatten(c.results),"dropinit"==t&&(c.droppable=a.flatten(c.droppable)),"dragstart"!=t||c.cancelled||u.update()}}while(++f<p);return e.type=h.type,e.originalEvent=h.event,a.flatten(n.results)}},properties:function(e,t,n){var r=n.callback;return r.drag=n.drag,r.proxy=n.proxy||n.drag,r.startX=t.pageX,r.startY=t.pageY,r.deltaX=e.pageX-t.pageX,r.deltaY=e.pageY-t.pageY,r.originalX=n.offset.left,r.originalY=n.offset.top,r.offsetX=r.originalX+r.deltaX,r.offsetY=r.originalY+r.deltaY,r.drop=a.flatten((n.drop||[]).slice()),r.available=a.flatten((n.droppable||[]).slice()),r},element:function(e){if(e&&(e.jquery||1==e.nodeType))return e},flatten:function(e){return r.map(e,(function(e){return e&&e.jquery?r.makeArray(e):e&&e.length?a.flatten(e):e}))},textselect:function(e){r(document)[e?"off":"on"]("selectstart",a.dontstart).css("MozUserSelect",e?"":"none"),document.unselectable=e?"off":"on"},dontstart:function(){return!1},callback:function(){}};a.callback.prototype={update:function(){o.drop&&this.available.length&&r.each(this.available,(function(e){o.drop.locate(this,e)}))}};var s=i.dispatch;i.dispatch=function(e){if(!(r.data(this,"suppress."+e.type)-(new Date).getTime()>0))return s.apply(this,arguments);r.removeData(this,"suppress."+e.type)},o.draginit=o.dragstart=o.dragend=a},22329:(e,t,n)=>{var r=n(35373);r.fn.drop=function(e,t,n){var i="string"==typeof e?e:"",o=r.isFunction(e)?e:r.isFunction(t)?t:null;return 0!==i.indexOf("drop")&&(i="drop"+i),n=(e==o?t:n)||{},o?this.on(i,n,o):this.trigger(i)},r.drop=function(e){e=e||{},o.multi=!0===e.multi?1/0:!1===e.multi?1:isNaN(e.multi)?o.multi:e.multi,o.delay=e.delay||o.delay,o.tolerance=r.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:o.tolerance,o.mode=e.mode||o.mode||"intersect"};var i=r.event.special,o=r.event.special.drop={multi:1,delay:20,mode:"overlap",targets:[],datakey:"dropdata",noBubble:!0,add:function(e){r.data(this,o.datakey).related+=1},remove:function(){r.data(this,o.datakey).related-=1},setup:function(){r.data(this,o.datakey)||(r.data(this,o.datakey,{related:0,active:[],anyactive:0,winner:0,location:{}}),o.targets.push(this))},teardown:function(){if(!(r.data(this,o.datakey)||{}).related){r.removeData(this,o.datakey);var e=this;o.targets=r.grep(o.targets,(function(t){return t!==e}))}},handler:function(e,t){var n;if(t)switch(e.type){case"mousedown":case"touchstart":n=r(o.targets),"string"==typeof t.drop&&(n=n.filter(t.drop)),n.each((function(){var e=r.data(this,o.datakey);e.active=[],e.anyactive=0,e.winner=0})),t.droppable=n,i.drag.hijack(e,"dropinit",t);break;case"mousemove":case"touchmove":o.event=e,o.timer||o.tolerate(t);break;case"mouseup":case"touchend":o.timer=clearTimeout(o.timer),t.propagates&&(i.drag.hijack(e,"drop",t),i.drag.hijack(e,"dropend",t))}},locate:function(e,t){var n=r.data(e,o.datakey),i=r(e),a=i.length&&!i.is(document)?i.offset():{},s=i.outerHeight(),l=i.outerWidth(),c={elem:e,width:l,height:s,top:a.top,left:a.left,right:a.left+l,bottom:a.top+s};return n&&(n.location=c,n.index=t,n.elem=e),c},contains:function(e,t){return(t[0]||t.left)>=e.left&&(t[0]||t.right)<=e.right&&(t[1]||t.top)>=e.top&&(t[1]||t.bottom)<=e.bottom},modes:{intersect:function(e,t,n){return this.contains(n,[e.pageX,e.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(e,t,n){return Math.max(0,Math.min(n.bottom,t.bottom)-Math.max(n.top,t.top))*Math.max(0,Math.min(n.right,t.right)-Math.max(n.left,t.left))},fit:function(e,t,n){return this.contains(n,t)?1:0},middle:function(e,t,n){return this.contains(n,[t.left+.5*t.width,t.top+.5*t.height])?1:0}},sort:function(e,t){return t.winner-e.winner||e.index-t.index},tolerate:function(e){var t,n,a,s,l,c,u,h,d=0,f=e.interactions.length,p=[o.event.pageX,o.event.pageY],g=o.tolerance||o.modes[o.mode];do{if(h=e.interactions[d]){if(!h)return;h.drop=[],l=[],c=h.droppable.length,g&&(a=o.locate(h.proxy)),t=0;do{if(u=h.droppable[t]){if(!(n=(s=r.data(u,o.datakey)).location))continue;s.winner=g?g.call(o,o.event,a,n):o.contains(n,p)?1:0,l.push(s)}}while(++t<c);l.sort(o.sort),t=0;do{(s=l[t])&&(s.winner&&h.drop.length<o.multi?(s.active[d]||s.anyactive||(!1!==i.drag.hijack(o.event,"dropstart",e,d,s.elem)[0]?(s.active[d]=1,s.anyactive+=1):s.winner=0),s.winner&&h.drop.push(s.elem)):s.active[d]&&1==s.anyactive&&(i.drag.hijack(o.event,"dropend",e,d,s.elem),s.active[d]=0,s.anyactive-=1))}while(++t<c)}}while(++d<f);o.last&&p[0]==o.last.pageX&&p[1]==o.last.pageY?delete o.timer:o.timer=setTimeout((function(){o.tolerate(e)}),o.delay),o.last=o.event}};i.dropinit=i.dropstart=i.dropend=o},98800:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__extends:()=>i,__assign:()=>o,__rest:()=>a,__decorate:()=>s,__param:()=>l,__metadata:()=>c,__awaiter:()=>u,__generator:()=>h,__createBinding:()=>d,__exportStar:()=>f,__values:()=>p,__read:()=>g,__spread:()=>m,__spreadArrays:()=>v,__await:()=>y,__asyncGenerator:()=>b,__asyncDelegator:()=>_,__asyncValues:()=>x,__makeTemplateObject:()=>w,__importStar:()=>A,__importDefault:()=>k,__classPrivateFieldGet:()=>T,__classPrivateFieldSet:()=>S});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function f(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function T(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},81224:(e,t,n)=>{var r=n(35373),i=n(30413),o=i.keyCode;e.exports={CellExternalCopyManager:function(e){var t,n,a=this,s=e||{},l=s.copiedCellStyleLayerKey||"copy-manager",c=s.copiedCellStyle||"copied",u=0,h=s.bodyElement||document.body,d=s.onCopyInit||null,f=s.onCopySuccess||null;function p(e){if(s.headerColumnValueExtractor){var t=s.headerColumnValueExtractor(e);if(t)return t}return e.name}function g(e,n,i){if(s.dataItemColumnValueExtractor){var o=s.dataItemColumnValueExtractor(e,n);if(o)return o}var a="";if(n.editor){var l={container:r("<p>"),column:n,position:{top:0,left:0},grid:t,event:i},c=new n.editor(l);c.loadValue(e),a=c.serializeValue(),c.destroy()}else a=e[n.field];return a}function m(e,n,i){if(n.denyPaste)return null;if(s.dataItemColumnValueSetter)return s.dataItemColumnValueSetter(e,n,i);if(n.editor){var o={container:r("body"),column:n,position:{top:0,left:0},grid:t},a=new n.editor(o);a.loadValue(e),a.applyValue(e,i),a.destroy()}else e[n.field]=i}function v(e){var t=document.createElement("textarea");return t.style.position="absolute",t.style.left="-1000px",t.style.top=document.body.scrollTop+"px",t.value=e,h.appendChild(t),t.select(),t}function y(e,r){var i;if(!t.getEditorLock().isActive()||t.getOptions().autoEdit){if(e.which==o.ESC&&n&&(e.preventDefault(),_(),a.onCopyCancelled.notify({ranges:n}),n=null),(e.which===o.C||e.which===o.INSERT)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&(d&&d.call(),0!==(i=t.getSelectionModel().getSelectedRanges()).length)){n=i,b(i),a.onCopyCells.notify({ranges:i});for(var l=t.getColumns(),c="",u=0;u<i.length;u++){for(var y=i[u],x=[],w=y.fromRow;w<y.toRow+1;w++){var A=[],k=t.getDataItem(w);if(0===x.length&&s.includeHeaderWhenCopying){for(var T=[],S=y.fromCell;S<y.toCell+1;S++)l[S].name.length>0&&T.push(p(l[S]));x.push(T.join("\t"))}for(S=y.fromCell;S<y.toCell+1;S++)A.push(g(k,l[S],e));x.push(A.join("\t"))}c+=x.join("\r\n")+"\r\n"}if(window.clipboardData)return window.clipboardData.setData("Text",c),!0;var E=document.activeElement;if((M=v(c)).focus(),setTimeout((function(){h.removeChild(M),E?E.focus():console.log("Not element to restore focus to after copy?")}),100),f){var C;C=1===i.length?i[0].toRow+1-i[0].fromRow:i.length,f.call(this,C)}return!1}if(!s.readOnlyMode&&(e.which===o.V&&(e.ctrlKey||e.metaKey)&&!e.shiftKey||e.which===o.INSERT&&e.shiftKey&&!e.ctrlKey)){var M=v("");return setTimeout((function(){!function(e,t){var n=e.getColumns(),r=t.value.split(/[\n\f\r]/);""===r[r.length-1]&&r.pop();var i=[],o=0;h.removeChild(t);for(var l=0;l<r.length;l++)""!==r[l]?i[o++]=r[l].split("\t"):i[o++]=[""];var c=e.getActiveCell(),u=e.getSelectionModel().getSelectedRanges(),d=u&&u.length?u[0]:null,f=null,p=null;if(d)f=d.fromRow,p=d.fromCell;else{if(!c)return;f=c.row,p=c.cell}var g=!1,v=i.length,y=i.length?i[0].length:0;1==i.length&&1==i[0].length&&d&&(g=!0,v=d.toRow-d.fromRow+1,y=d.toCell-d.fromCell+1);var _=e.getData().length-f,x=0;if(_<v&&s.newRowCreator){var w=e.getData();for(x=1;x<=v-_;x++)w.push({});e.setData(w),e.render()}var A=f+v>e.getDataLength();if(s.newRowCreator&&A){var k=f+v-e.getDataLength();s.newRowCreator(k)}var T={isClipboardCommand:!0,clippedRange:i,oldValues:[],cellExternalCopyManager:a,_options:s,setDataItemValueForColumn:m,markCopySelection:b,oneCellToMultiple:g,activeRow:f,activeCell:p,destH:v,destW:y,maxDestY:e.getDataLength(),maxDestX:e.getColumns().length,h:0,w:0,execute:function(){this.h=0;for(var t=0;t<this.destH;t++){this.oldValues[t]=[],this.w=0,this.h++;for(var r=0;r<this.destW;r++){this.w++;var o=f+t,a=p+r;if(o<this.maxDestY&&a<this.maxDestX){e.getCellNode(o,a);var s=e.getDataItem(o);this.oldValues[t][r]=s[n[a].field],g?this.setDataItemValueForColumn(s,n[a],i[0][0]):this.setDataItemValueForColumn(s,n[a],i[t]?i[t][r]:""),e.updateCell(o,a),e.onCellChange.notify({row:o,cell:a,item:s,grid:e})}}}var l={fromCell:p,fromRow:f,toCell:p+this.w-1,toRow:f+this.h-1};this.markCopySelection([l]),e.getSelectionModel().setSelectedRanges([l]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[l]})},undo:function(){for(var t=0;t<this.destH;t++)for(var r=0;r<this.destW;r++){var i=f+t,o=p+r;if(i<this.maxDestY&&o<this.maxDestX){e.getCellNode(i,o);var a=e.getDataItem(i);g?this.setDataItemValueForColumn(a,n[o],this.oldValues[0][0]):this.setDataItemValueForColumn(a,n[o],this.oldValues[t][r]),e.updateCell(i,o),e.onCellChange.notify({row:i,cell:o,item:a,grid:e})}}var s={fromCell:p,fromRow:f,toCell:p+this.w-1,toRow:f+this.h-1};if(this.markCopySelection([s]),e.getSelectionModel().setSelectedRanges([s]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[s]}),x>1){for(var l=e.getData();x>1;x--)l.splice(l.length-1,1);e.setData(l),e.render()}}};s.clipboardCommandHandler?s.clipboardCommandHandler(T):T.execute()}(t,M)}),100),!1}}}function b(e){_();for(var n=t.getColumns(),r={},i=0;i<e.length;i++)for(var o=e[i].fromRow;o<=e[i].toRow;o++){r[o]={};for(var s=e[i].fromCell;s<=e[i].toCell&&s<n.length;s++)r[o][n[s].id]=c}t.setCellCssStyles(l,r),clearTimeout(u),u=setTimeout((function(){a.clearCopySelection()}),2e3)}function _(){t.removeCellCssStyles(l)}r.extend(this,{init:function(e){(t=e).onKeyDown.subscribe(y);var n=e.getSelectionModel();if(!n)throw new Error("Selection model is mandatory for this plugin. Please set a selection model on the grid before adding this plugin: grid.setSelectionModel(new Slick.CellSelectionModel())");n.onSelectedRangesChanged.subscribe((function(e,n){t.focus()}))},destroy:function(){t.onKeyDown.unsubscribe(y)},pluginName:"CellExternalCopyManager",clearCopySelection:_,handleKeyDown:y,onCopyCells:new i.Event,onCopyCancelled:new i.Event,onPasteCells:new i.Event,setIncludeHeaderWhenCopying:function(e){s.includeHeaderWhenCopying=e}})}}},27088:(e,t,n)=>{var r=n(35373),i=n(30413);e.exports={CheckboxSelectColumn:function(e){var t,n=null,o=y(),a=new i.EventHandler,s={},l=!1,c=r.extend(!0,{},{columnId:"_checkbox_selector",cssClass:null,hideSelectAllCheckbox:!1,toolTip:"Select/Deselect All",width:30,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},e);function u(){t.updateColumnHeader(c.columnId,"","")}function h(){r("#filter-checkbox-selectall-container").hide()}function d(e,i){var a,u,h,d=t.getSelectedRows(),f={},p=0;if("function"==typeof n)for(h=0;h<t.getDataLength();h++)_(u,t.getDataItem(h),t)||p++;var g=[];for(u=0;u<d.length;u++)a=d[u],_(u,t.getDataItem(a),t)?(f[a]=!0,f[a]!==s[a]&&(t.invalidateRow(a),delete s[a])):g.push(a);for(u in s)t.invalidateRow(u);if(s=f,t.render(),l=d.length&&d.length+p>=t.getDataLength(),c.hideInColumnTitleRow||c.hideSelectAllCheckbox||x(l),c.hideInFilterHeaderRow||r("#header-filter-selector"+o).prop("checked",l),g.length>0){for(u=0;u<g.length;u++){var m=d.indexOf(g[u]);d.splice(m,1)}t.setSelectedRows(d)}}function f(e,n){32==e.which&&t.getColumns()[n.cell].id===c.columnId&&(t.getEditorLock().isActive()&&!t.getEditorLock().commitCurrentEdit()||g(n.row),e.preventDefault(),e.stopImmediatePropagation())}function p(e,n){if(t.getColumns()[n.cell].id===c.columnId&&r(e.target).is(":checkbox")){if(t.getEditorLock().isActive()&&!t.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();g(n.row),e.stopPropagation(),e.stopImmediatePropagation()}}function g(e){var n=t.getDataItem(e);_(e,n,t)&&(s[e]?t.setSelectedRows(r.grep(t.getSelectedRows(),(function(t){return t!=e}))):t.setSelectedRows(t.getSelectedRows().concat(e)),t.setActiveCell(e,function(){if(null===v){v=0;for(var e=t.getColumns(),n=0;n<e.length;n++)e[n].id==c.columnId&&(v=n)}return v}()))}function m(e,n){if(n.column.id==c.columnId&&r(e.target).is(":checkbox")){if(t.getEditorLock().isActive()&&!t.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();if(r(e.target).is(":checked")){for(var i=[],o=0;o<t.getDataLength();o++){var a=t.getDataItem(o);a.__group||a.__groupTotals||!_(o,a,t)||i.push(o)}t.setSelectedRows(i)}else t.setSelectedRows([]);e.stopPropagation(),e.stopImmediatePropagation()}}"function"==typeof c.selectableOverride&&w(c.selectableOverride);var v=null;function y(){return Math.round(1e7*Math.random())}function b(e,t,n,r,i,o){var a=y()+e;return i&&_(e,i,o)?s[e]?"<input id='selector"+a+"' type='checkbox' checked='checked'><label for='selector"+a+"'></label>":"<input id='selector"+a+"' type='checkbox'><label for='selector"+a+"'></label>":null}function _(e,t,r){return"function"!=typeof n||n(e,t,r)}function x(e){e?t.updateColumnHeader(c.columnId,"<input id='header-selector"+o+"' type='checkbox' checked='checked'><label for='header-selector"+o+"'></label>",c.toolTip):t.updateColumnHeader(c.columnId,"<input id='header-selector"+o+"' type='checkbox'><label for='header-selector"+o+"'></label>",c.toolTip)}function w(e){n=e}r.extend(this,{init:function(e){t=e,a.subscribe(t.onSelectedRowsChanged,d).subscribe(t.onClick,p).subscribe(t.onKeyDown,f),c.hideInFilterHeaderRow||function(e){a.subscribe(e.onHeaderRowCellRendered,(function(e,t){"sel"===t.column.field&&(r(t.node).empty(),r("<span id='filter-checkbox-selectall-container'><input id='header-filter-selector"+o+"' type='checkbox'><label for='header-filter-selector"+o+"'></label></span>").appendTo(t.node).on("click",(function(e){m(e,t)})))}))}(e),c.hideInColumnTitleRow||a.subscribe(t.onHeaderClick,m)},destroy:function(){a.unsubscribeAll()},pluginName:"CheckboxSelectColumn",deSelectRows:function(e){var n,i=e.length,o=[];for(n=0;n<i;n++)s[e[n]]&&(o[o.length]=e[n]);t.setSelectedRows(r.grep(t.getSelectedRows(),(function(e){return o.indexOf(e)<0})))},selectRows:function(e){var n,r=e.length,i=[];for(n=0;n<r;n++)s[e[n]]||(i[i.length]=e[n]);t.setSelectedRows(t.getSelectedRows().concat(i))},getColumnDefinition:function(){return{id:c.columnId,name:c.hideSelectAllCheckbox||c.hideInColumnTitleRow?"":"<input id='header-selector"+o+"' type='checkbox'><label for='header-selector"+o+"'></label>",toolTip:c.hideSelectAllCheckbox||c.hideInColumnTitleRow?"":c.toolTip,field:"sel",width:c.width,resizable:!1,sortable:!1,cssClass:c.cssClass,hideSelectAllCheckbox:c.hideSelectAllCheckbox,formatter:b}},getOptions:function(){return c},selectableOverride:w,setOptions:function(e){if((c=r.extend(!0,{},c,e)).hideSelectAllCheckbox)u(),h();else if(c.hideInColumnTitleRow?u():(x(l),a.subscribe(t.onHeaderClick,m)),c.hideInFilterHeaderRow)h();else{var n=r("#filter-checkbox-selectall-container");n.show(),n.find('input[type="checkbox"]').prop("checked",l)}}})}}},55225:(e,t,n)=>{var r=n(35373),i=n(30413);e.exports={RowSelectionModel:function(e){var t,n,o,a=[],s=this,l=new i.EventHandler,c={selectActiveRow:!0};function u(e){return function(){n||(n=!0,e.apply(this,arguments),n=!1)}}function h(e){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].fromRow;r<=e[n].toRow;r++)t.push(r);return t}function d(e){for(var n=[],r=t.getColumns().length-1,o=0;o<e.length;o++)n.push(new i.Range(e[o],0,e[o],r));return n}function f(){return h(a)}function p(e){(a&&0!==a.length||e&&0!==e.length)&&(a=e,s.onSelectedRangesChanged.notify(a))}function g(e,n){o.selectActiveRow&&null!=n.row&&p([new i.Range(n.row,0,n.row,t.getColumns().length-1)])}function m(e){var n=t.getActiveCell();if(t.getOptions().multiSelect&&n&&e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.which==i.keyCode.UP||e.which==i.keyCode.DOWN)){var r=f();r.sort((function(e,t){return e-t})),r.length||(r=[n.row]);var o,a=r[0],s=r[r.length-1];(o=e.which==i.keyCode.DOWN?n.row<s||a==s?++s:++a:n.row<s?--s:--a)>=0&&o<t.getDataLength()&&(t.scrollRowIntoView(o),p(d(function(e,t){var n,r=[];for(n=e;n<=t;n++)r.push(n);for(n=t;n<e;n++)r.push(n);return r}(a,s)))),e.preventDefault(),e.stopPropagation()}}function v(e){var n=t.getCellFromEvent(e);if(!n||!t.canCellBeActive(n.row,n.cell))return!1;if(!t.getOptions().multiSelect||!e.ctrlKey&&!e.shiftKey&&!e.metaKey)return!1;var i=h(a),o=r.inArray(n.row,i);if(-1===o&&(e.ctrlKey||e.metaKey))i.push(n.row),t.setActiveCell(n.row,n.cell);else if(-1!==o&&(e.ctrlKey||e.metaKey))i=r.grep(i,(function(e,t){return e!==n.row})),t.setActiveCell(n.row,n.cell);else if(i.length&&e.shiftKey){var s=i.pop(),l=Math.min(n.row,s),c=Math.max(n.row,s);i=[];for(var u=l;u<=c;u++)u!==s&&i.push(u);i.push(s),t.setActiveCell(n.row,n.cell)}return p(d(i)),e.stopImmediatePropagation(),!0}r.extend(this,{getSelectedRows:f,setSelectedRows:function(e){p(d(e))},getSelectedRanges:function(){return a},setSelectedRanges:p,init:function(n){o=r.extend(!0,{},c,e),t=n,l.subscribe(t.onActiveCellChanged,u(g)),l.subscribe(t.onKeyDown,u(m)),l.subscribe(t.onClick,u(v))},destroy:function(){l.unsubscribeAll()},pluginName:"RowSelectionModel",onSelectedRangesChanged:new i.Event})}}},30413:(e,t,n)=>{var r=n(35373);function i(){var e=!1,t=!1;this.stopPropagation=function(){e=!0},this.isPropagationStopped=function(){return e},this.stopImmediatePropagation=function(){t=!0},this.isImmediatePropagationStopped=function(){return t}}function o(){this.__nonDataRow=!0}function a(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function s(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function l(){var e=null;this.isActive=function(t){return t?e===t:null!==e},this.activate=function(t){if(t!==e){if(null!==e)throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");if(!t.commitCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!t.cancelCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");e=t}},this.deactivate=function(t){if(e){if(e!==t)throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");e=null}},this.commitCurrentEdit=function(){return!e||e.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!e||e.cancelCurrentEdit()}}a.prototype=new o,a.prototype.equals=function(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title},s.prototype=new o;var c="Map"in window?window.Map:function(){var e={};this.get=function(t){return e[t]},this.set=function(t,n){e[t]=n},this.has=function(t){return t in e},this.delete=function(t){delete e[t]}};e.exports={Event:function(){var e=[];this.subscribe=function(t){e.push(t)},this.unsubscribe=function(t){for(var n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)},this.notify=function(t,n,r){var o;n=n||new i,r=r||this;for(var a=0;a<e.length&&!n.isPropagationStopped()&&!n.isImmediatePropagationStopped();a++)o=e[a].call(r,n,t);return o}},EventData:i,EventHandler:function(){var e=[];this.subscribe=function(t,n){return e.push({event:t,handler:n}),t.subscribe(n),this},this.unsubscribe=function(t,n){for(var r=e.length;r--;)if(e[r].event===t&&e[r].handler===n)return e.splice(r,1),void t.unsubscribe(n);return this},this.unsubscribeAll=function(){for(var t=e.length;t--;)e[t].event.unsubscribe(e[t].handler);return e=[],this}},Range:function(e,t,n,r){void 0===n&&void 0===r&&(n=e,r=t),this.fromRow=Math.min(e,n),this.fromCell=Math.min(t,r),this.toRow=Math.max(e,n),this.toCell=Math.max(t,r),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(e,t){return e>=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}},Map:c,NonDataRow:o,Group:a,GroupTotals:s,EditorLock:l,GlobalEditorLock:new l,TreeColumns:function(e){var t={};function n(e,t){return e.filter((function(e){var r=t.call(e);return r&&e.columns&&(e.columns=n(e.columns,t)),r&&(!e.columns||e.columns.length)}))}function i(e,t){e.sort((function(e,n){return o(t.getColumnIndex(e.id))-o(t.getColumnIndex(n.id))})).forEach((function(e){e.columns&&i(e.columns,t)}))}function o(e){return void 0===e?-1:e}function a(e){if(!e.length)return e.columns?1+a(e.columns):1;for(var t in e)return a(e[t])}function s(e,t,n){var r=[];if(t==(n=n||0))return e.length&&e.forEach((function(e){e.columns&&(e.extractColumns=function(){return l(e)})})),e;for(var i in e)e[i].columns&&(r=r.concat(s(e[i].columns,t,n+1)));return r}function l(e){var t=[];if(e.hasOwnProperty("length"))for(var n=0;n<e.length;n++)t=t.concat(l(e[n]));else{if(!e.hasOwnProperty("columns"))return e;t=t.concat(l(e.columns))}return t}function c(){return r.extend(!0,[],e)}(function e(n){n.forEach((function(n){t[n.id]=n,n.columns&&e(n.columns)}))})(e),this.hasDepth=function(){for(var t in e)if(e[t].hasOwnProperty("columns"))return!0;return!1},this.getTreeColumns=function(){return e},this.extractColumns=function(){return this.hasDepth()?l(e):e},this.getDepth=function(){return a(e)},this.getColumnsInDepth=function(t){return s(e,t)},this.getColumnsInGroup=function(e){return l(e)},this.visibleColumns=function(){return n(c(),(function(){return this.visible}))},this.filter=function(e){return n(c(),e)},this.reOrder=function(t){return i(e,t)},this.getById=function(e){return t[e]},this.getInIds=function(e){return e.map((function(e){return t[e]}))}},keyCode:{SPACE:8,BACKSPACE:8,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,ESC:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38,A:65,C:67,V:86},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",Content:"CON",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{CanvasTextSize:"CANV",HTML:"HTML"}}},87361:(e,t,n)=>{var r=n(35373),i=n(30413),o={Avg:function(e){this.field_=e,this.init=function(){this.count_=0,this.nonNullCount_=0,this.sum_=0},this.accumulate=function(e){var t=e[this.field_];this.count_++,null==t||""===t||isNaN(t)||(this.nonNullCount_++,this.sum_+=parseFloat(t))},this.storeResult=function(e){e.avg||(e.avg={}),0!==this.nonNullCount_&&(e.avg[this.field_]=this.sum_/this.nonNullCount_)}},Min:function(e){this.field_=e,this.init=function(){this.min_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(null==this.min_||t<this.min_)&&(this.min_=t)},this.storeResult=function(e){e.min||(e.min={}),e.min[this.field_]=this.min_}},Max:function(e){this.field_=e,this.init=function(){this.max_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(null==this.max_||t>this.max_)&&(this.max_=t)},this.storeResult=function(e){e.max||(e.max={}),e.max[this.field_]=this.max_}},Sum:function(e){this.field_=e,this.init=function(){this.sum_=null},this.accumulate=function(e){var t=e[this.field_];null==t||""===t||isNaN(t)||(this.sum_+=parseFloat(t))},this.storeResult=function(e){e.sum||(e.sum={}),e.sum[this.field_]=this.sum_}},Count:function(e){this.field_=e,this.init=function(){},this.storeResult=function(e){e.count||(e.count={}),e.count[this.field_]=e.group.rows.length}}};e.exports={DataView:function(e){var t,n,o,a,s,l=this,c="id",u=[],h=[],d=new i.Map,f=null,p=null,g=null,m=!1,v=!1,y=new i.Map,b=!0,_={},x={},w=[],A=[],k=null,T={getter:null,formatter:null,comparer:function(e,t){return e.value===t.value?0:e.value>t.value?1:-1},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},S=[],E=[],C=[],M=":|:",O=null,L=0,D=0,I=0,R=new i.Event,P=new i.Event,N=new i.Event,z=new i.Event,F=new i.Event,B=new i.Event,j=new i.Event,U=new i.Event;function V(e){if(!v)for(var t,n=e=e||0,r=u.length;n<r;n++){if(void 0===(t=u[n][c]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");d.set(t,n)}}function q(){if(!v)for(var e,t=0,n=u.length;t<n;t++)if(void 0===(e=u[t][c])||d.get(e)!==t)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}function H(){var e=L?Math.max(1,Math.ceil(I/L)):1;return{pageSize:L,pageNum:D,totalRows:I,totalPages:e,dataView:l}}function $(e,r){b=r,n=e,t=null,!1===r&&u.reverse(),u.sort(e),!1===r&&u.reverse(),d=new i.Map,V(),ge()}function W(e,r){b=r,t=e,n=null;var o=Object.prototype.toString;Object.prototype.toString="function"==typeof e?e:function(){return this[e]},!1===r&&u.reverse(),u.sort(),Object.prototype.toString=o,!1===r&&u.reverse(),d=new i.Map,V(),ge()}function G(t){e.groupItemMetadataProvider||(e.groupItemMetadataProvider=new i.Data.GroupItemMetadataProvider),E=[],C=[],S=(t=t||[])instanceof Array?t:[t];for(var n=0;n<S.length;n++){var o=S[n]=r.extend(!0,{},T,S[n]);o.getterIsAFn="function"==typeof o.getter,o.compiledAccumulators=[];for(var a=o.aggregators.length;a--;)o.compiledAccumulators[a]=ce(o.aggregators[a]);C[n]={}}ge()}function Y(){if(!f){f={};for(var e=0,t=h.length;e<t;e++)f[h[e][c]]=e}}function X(e){return u[d.get(e)]}function Z(e,t){if(!d.has(e))throw new Error("[SlickGrid DataView] Invalid id");if(e!==t[c]){var n=t[c];if(null==n)throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(d.has(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");d.set(n,d.get(e)),d.delete(e),g&&g[e]&&delete g[e],e=n}u[d.get(e)]=t,g||(g={}),g[e]=!0}function K(e,t){Z(e,t),ge()}function J(e,t){u.splice(e,0,t),V(e),ge()}function Q(e){if(v)y.set(e,!0);else{var t=d.get(e);if(void 0===t)throw new Error("[SlickGrid DataView] Invalid id");d.delete(e),u.splice(t,1),V(t),ge()}}function ee(e){if(!n)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");J(function(e){for(var t=0,r=u.length;t<r;){var i=t+r>>>1;-1===n(u[i],e)?t=i+1:r=i}return t}(e),e)}function te(e,t){if(null==e)for(var n=0;n<S.length;n++)C[n]={},S[n].collapsed=t,!0===t?U.notify({level:n,groupingKey:null}):j.notify({level:n,groupingKey:null});else C[e]={},S[e].collapsed=t,!0===t?U.notify({level:e,groupingKey:null}):j.notify({level:e,groupingKey:null});ge()}function ne(e,t,n){C[e][t]=S[e].collapsed^n,ge()}function re(e,t){for(var n,r,o,a=[],s={},l=t?t.level+1:0,c=S[l],u=0,h=c.predefinedValues.length;u<h;u++)(n=s[r=c.predefinedValues[u]])||((n=new i.Group).value=r,n.level=l,n.groupingKey=(t?t.groupingKey+M:"")+r,a[a.length]=n,s[r]=n);for(u=0,h=e.length;u<h;u++)o=e[u],(n=s[r=c.getterIsAFn?c.getter(o):o[c.getter]])||((n=new i.Group).value=r,n.level=l,n.groupingKey=(t?t.groupingKey+M:"")+r,a[a.length]=n,s[r]=n),n.rows[n.count++]=o;if(l<S.length-1)for(u=0;u<a.length;u++)(n=a[u]).groups=re(n.rows,n);return a.length&&ae(a,l),a.sort(S[l].comparer),a}function ie(e){var t,n=e.group,r=S[n.level],i=n.level==S.length,o=r.aggregators.length;if(!i&&r.aggregateChildGroups)for(var a=n.groups.length;a--;)n.groups[a].totals.initialized||ie(n.groups[a].totals);for(;o--;)(t=r.aggregators[o]).init(),!i&&r.aggregateChildGroups?r.compiledAccumulators[o].call(t,n.groups):r.compiledAccumulators[o].call(t,n.rows),t.storeResult(e);e.initialized=!0}function oe(e){var t=S[e.level],n=new i.GroupTotals;n.group=e,e.totals=n,t.lazyTotalsCalculation||ie(n)}function ae(e,t){for(var n,r=S[t=t||0],i=r.collapsed,o=C[t],a=e.length;a--;)(n=e[a]).collapsed&&!r.aggregateCollapsed||(n.groups&&ae(n.groups,t+1),r.aggregators.length&&(r.aggregateEmpty||n.rows.length||n.groups&&n.groups.length)&&oe(n),n.collapsed=i^o[n.groupingKey],n.title=r.formatter?r.formatter(n):n.value)}function se(e,t){for(var n,r,i=S[t=t||0],o=[],a=0,s=0,l=e.length;s<l;s++){if(r=e[s],o[a++]=r,!r.collapsed)for(var c=0,u=(n=r.groups?se(r.groups,t+1):r.rows).length;c<u;c++)o[a++]=n[c];r.totals&&i.displayTotalsRow&&(!r.collapsed||i.aggregateCollapsed)&&(o[a++]=r.totals)}return o}function le(e){var t=e.toString().indexOf("function")>=0?/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/:/^[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/,n=e.toString().match(t);return{params:n[1].split(","),body:n[2]}}function ce(e){if(e.accumulate){var t=le(e.accumulate),n=new Function("_items","for (var "+t.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+t.params[0]+" = _items[_i]; "+t.body+"}"),r="compiledAccumulatorLoop";return n.displayName=r,n.name=ue(n,r),n}return function(){}}function ue(e,t){try{Object.defineProperty(e,"name",{writable:!0,value:t})}catch(n){e.name=t}}function he(e,t){for(var n=[],r=0,i=0,o=e.length;i<o;i++)p(e[i],t)&&(n[r++]=e[i]);return n}function de(e,t,n){for(var r,i=[],o=0,a=0,s=e.length;a<s;a++)r=e[a],n[a]?i[o++]=r:p(r,t)&&(i[o++]=r,n[a]=!0);return i}function fe(t){if(p){var n=e.inlineFilters?a:he,r=e.inlineFilters?s:de;_.isFilterNarrowing?w=n(w,o):_.isFilterExpanding?w=r(t,o,A):_.isFilterUnchanged||(w=n(t,o))}else w=L?t:t.concat();var i;return L?(w.length<=D*L&&(D=0===w.length?0:Math.floor((w.length-1)/L)),i=w.slice(L*D,L*D+L)):i=w,{totalRows:w.length,rows:i}}function pe(e){f=null,_.isFilterNarrowing==x.isFilterNarrowing&&_.isFilterExpanding==x.isFilterExpanding||(A=[]);var t=fe(e);I=t.totalRows;var n=t.rows;E=[],S.length&&(E=re(n)).length&&(n=se(E));var r=function(e,t){var n,r,i,o=[],a=0,s=Math.max(t.length,e.length);_&&_.ignoreDiffsBefore&&(a=Math.max(0,Math.min(t.length,_.ignoreDiffsBefore))),_&&_.ignoreDiffsAfter&&(s=Math.min(t.length,Math.max(0,_.ignoreDiffsAfter)));for(var l=a,u=e.length;l<s;l++)l>=u?o[o.length]=l:(n=t[l],r=e[l],(!n||S.length&&(i=n.__nonDataRow||r.__nonDataRow)&&n.__group!==r.__group||n.__group&&!n.equals(r)||i&&(n.__groupTotals||r.__groupTotals)||n[c]!=r[c]||g&&g[n[c]])&&(o[o.length]=l));return o}(h,n);return h=n,r}function ge(){if(!m){var e=r.extend(!0,{},H()),t=h.length,n=I,i=pe(u);L&&I<D*L&&(D=Math.max(0,Math.ceil(I/L)-1),i=pe(u)),g=null,x=_,_={},n!==I&&!1!==F.notify(e,null,l)&&B.notify(H(),null,l),t!==h.length&&P.notify({previous:t,current:h.length,itemCount:u.length,dataView:l,callingOnRowsChanged:i.length>0},null,l),i.length>0&&N.notify({rows:i,itemCount:u.length,dataView:l,calledOnRowCountChanged:t!==h.length},null,l),(t!==h.length||i.length>0)&&z.notify({rowsDiff:i,previousRowCount:t,currentRowCount:h.length,itemCount:u.length,rowCountChanged:t!==h.length,rowsChanged:i.length>0,dataView:l},null,l)}}function me(){return O}e=r.extend(!0,{},{groupItemMetadataProvider:null,inlineFilters:!1},e),r.extend(this,{beginUpdate:function(e){m=!0,v=!0===e},endUpdate:function(){var e=v;v=!1,m=!1,e&&(function(){for(var e,t,n=0,r=0,o=u.length;r<o;r++){if(void 0===(e=(t=u[r])[c]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");y.has(e)?d.delete(e):(u[n]=t,d.set(e,n),++n)}u.length=n,y=new i.Map}(),q()),ge()},destroy:function(){u=[],d=null,f=null,p=null,g=null,n=null,A=[],w=[],a=null,s=null,k&&k.onSelectedRowsChanged&&k.onCellCssStylesChanged&&(k.onSelectedRowsChanged.unsubscribe(),k.onCellCssStylesChanged.unsubscribe()),l.onRowsOrCountChanged&&l.onRowsOrCountChanged.unsubscribe()},setPagingOptions:function(e){!1!==F.notify(H(),null,l)&&(null!=e.pageSize&&(L=e.pageSize,D=L?Math.min(D,Math.max(0,Math.ceil(I/L)-1)):0),null!=e.pageNum&&(D=Math.min(e.pageNum,Math.max(0,Math.ceil(I/L)-1))),B.notify(H(),null,l),ge())},getPagingInfo:H,getIdPropertyName:function(){return c},getItems:function(){return u},setItems:function(e,t){void 0!==t&&(c=t),u=w=e,R.notify({idProperty:t,itemCount:u.length},null,l),d=new i.Map,V(),q(),ge()},setFilter:function(t){p=t,e.inlineFilters&&(a=function(){var e=le(p),t="{ continue _coreloop; }$1",n="{ _retval[_idx++] = $item$; continue _coreloop; }$1",r=e.body.replace(/return false\s*([;}]|\}|$)/gi,t).replace(/return!1([;}]|\}|$)/gi,t).replace(/return true\s*([;}]|\}|$)/gi,n).replace(/return!0([;}]|\}|$)/gi,n).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("");i=(i=(i=i.replace(/\$filter\$/gi,r)).replace(/\$item\$/gi,e.params[0])).replace(/\$args\$/gi,e.params[1]);var o=new Function("_items,_args",i),a="compiledFilter";return o.displayName=a,o.name=ue(o,a),o}(),s=function(){var e=le(p),t="{ continue _coreloop; }$1",n="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",r=e.body.replace(/return false\s*([;}]|\}|$)/gi,t).replace(/return!1([;}]|\}|$)/gi,t).replace(/return true\s*([;}]|\}|$)/gi,n).replace(/return!0([;}]|\}|$)/gi,n).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),i=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("");i=(i=(i=i.replace(/\$filter\$/gi,r)).replace(/\$item\$/gi,e.params[0])).replace(/\$args\$/gi,e.params[1]);var o=new Function("_items,_args,_cache",i),a="compiledFilterWithCaching";return o.displayName=a,o.name=ue(o,a),o}()),ge()},getFilter:function(){return p},getFilteredItems:function(){return w},getFilteredItemCount:function(){return w.length},sort:$,fastSort:W,reSort:function(){n?$(n,b):t&&W(t,b)},setGrouping:G,getGrouping:function(){return S},groupBy:function(e,t,n){G(null!=e?{getter:e,formatter:t,comparer:n}:[])},setAggregators:function(e,t){if(!S.length)throw new Error("[SlickGrid DataView] At least one grouping must be specified before calling setAggregators().");S[0].aggregators=e,S[0].aggregateCollapsed=t,G(S)},collapseAllGroups:function(e){te(e,!0)},expandAllGroups:function(e){te(e,!1)},collapseGroup:function(e){var t,n,r=Array.prototype.slice.call(arguments),i=r[0];1===r.length&&-1!==i.indexOf(M)?(t=i,n=i.split(M).length-1):(t=r.join(M),n=r.length-1),ne(n,t,!0),U.notify({level:n,groupingKey:t})},expandGroup:function(e){var t,n,r=Array.prototype.slice.call(arguments),i=r[0];1===r.length&&-1!==i.indexOf(M)?(n=i.split(M).length-1,t=i):(n=r.length-1,t=r.join(M)),ne(n,t,!1),j.notify({level:n,groupingKey:t})},getGroups:function(){return E},getAllSelectedIds:me,getAllSelectedItems:function(){var e=[];return me().forEach((function(t){e.push(l.getItemById(t))})),e},getIdxById:function(e){return d.get(e)},getRowByItem:function(e){return Y(),f[e[c]]},getRowById:function(e){return Y(),f[e]},getItemById:X,getItemByIdx:function(e){return u[e]},mapItemsToRows:function(e){var t=[];Y();for(var n=0,r=e.length;n<r;n++){var i=f[e[n][c]];null!=i&&(t[t.length]=i)}return t},mapRowsToIds:function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]<h.length&&(t[t.length]=h[e[n]][c]);return t},mapIdsToRows:function(e){var t=[];Y();for(var n=0,r=e.length;n<r;n++){var i=f[e[n]];null!=i&&(t[t.length]=i)}return t},setRefreshHints:function(e){_=e},setFilterArgs:function(e){o=e},refresh:ge,updateItem:K,updateItems:function(e,t){if(e.length!==t.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(var n=0,r=t.length;n<r;n++)Z(e[n],t[n]);ge()},insertItem:J,insertItems:function(e,t){Array.prototype.splice.apply(u,[e,0].concat(t)),V(e),ge()},addItem:function(e){u.push(e),V(u.length-1),ge()},addItems:function(e){V((u=u.concat(e)).length-e.length),ge()},deleteItem:Q,deleteItems:function(e){if(0!==e.length)if(v)for(var t=0,n=e.length;t<n;t++){var r=e[t];if(void 0===(o=d.get(r)))throw new Error("[SlickGrid DataView] Invalid id");y.set(r,!0)}else{var i=[];for(t=0,n=e.length;t<n;t++){var o;if(r=e[t],void 0===(o=d.get(r)))throw new Error("[SlickGrid DataView] Invalid id");d.delete(r),i.push(o)}for(i.sort(),t=i.length-1;t>=0;--t)u.splice(i[t],1);V(i[0]),ge()}},sortedAddItem:ee,sortedUpdateItem:function(e,t){if(!d.has(e)||e!==t[c])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+d.get(e));if(!n)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");var r=X(e);0!==n(r,t)?(Q(e),ee(t)):K(e,t)},syncGridSelection:function(e,t,n){var o,a=this;k=e,O=a.mapRowsToIds(e.getSelectedRows());var s=new i.Event;function l(t){O.join(",")!=t.join(",")&&(O=t,s.notify({grid:e,ids:O,dataView:a},new i.EventData,a))}return e.onSelectedRowsChanged.subscribe((function(t,i){if(!o){var s=a.mapRowsToIds(e.getSelectedRows());n&&e.getOptions().multiSelect?l(r.grep(O,(function(e){return void 0===a.getRowById(e)})).concat(s)):l(s)}})),this.onRowsOrCountChanged.subscribe((function(){if(O.length>0){o=!0;var n=a.mapIdsToRows(O);t||l(a.mapRowsToIds(n)),e.setSelectedRows(n),o=!1}})),s},syncGridCellCssStyles:function(e,t){var n,r;function i(e){for(var t in n={},e){var r=h[t][c];n[r]=e[t]}}function o(){if(n){r=!0,Y();var i={};for(var o in n){var a=f[o];null!=a&&(i[a]=n[o])}e.setCellCssStyles(t,i),r=!1}}i(e.getCellCssStyles(t)),e.onCellCssStylesChanged.subscribe((function(n,a){r||t==a.key&&(a.hash?i(a.hash):(e.onCellCssStylesChanged.unsubscribe(),l.onRowsOrCountChanged.unsubscribe(o)))})),this.onRowsOrCountChanged.subscribe(o)},getItemCount:function(){return u.length},getLength:function(){return h.length},getItem:function(e){var t=h[e];if(t&&t.__group&&t.totals&&!t.totals.initialized){var n=S[t.level];n.displayTotalsRow||(ie(t.totals),t.title=n.formatter?n.formatter(t):t.value)}else t&&t.__groupTotals&&!t.initialized&&ie(t);return t},getItemMetadata:function(t){var n=h[t];return void 0===n?null:n.__group?e.groupItemMetadataProvider.getGroupRowMetadata(n):n.__groupTotals?e.groupItemMetadataProvider.getTotalsRowMetadata(n):null},onSetItemsCalled:R,onRowCountChanged:P,onRowsChanged:N,onRowsOrCountChanged:z,onBeforePagingInfoChanged:F,onPagingInfoChanged:B,onGroupExpanded:j,onGroupCollapsed:U})},Aggregators:o,Data:{Aggregators:o}}},74719:(e,t,n)=>{var r=n(35373),i=n(30413);function o(e){var t,n,i=this;function l(){var t=e.column.editorFixedDecimalPlaces;return void 0===t&&(t=o.DefaultDecimalPlaces),t||0===t?t:null}this.args=e,this.init=function(){var n=e.grid.getOptions().editorCellNavOnLRKeys;t=r("<INPUT type=text class='editor-text' />").appendTo(e.container).on("keydown.nav",n?a:s).focus().select(),e.compositeEditorOptions&&t.on("change",(function(){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}))},this.destroy=function(){t.remove()},this.focus=function(){t.focus()},this.loadValue=function(r){n=r[e.column.field];var i=l();null!==i&&(n||0===n)&&n.toFixed&&(n=n.toFixed(i)),t.val(n),t[0].defaultValue=n,t.select()},this.serializeValue=function(){var e=parseFloat(t.val());o.AllowEmptyValue?e||0===e||(e=""):e=e||0;var n=l();return null!==n&&(e||0===e)&&e.toFixed&&(e=parseFloat(e.toFixed(n))),e},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==n)&&t.val()!=n},this.validate=function(){if(isNaN(t.val()))return{valid:!1,msg:"Please enter a valid number"};if(e.column.validator){var n=e.column.validator(t.val(),e);if(!n.valid)return n}return{valid:!0,msg:null}},this.init()}function a(e){var t=this.selectionStart,n=this.value.length;(e.keyCode===i.keyCode.LEFT&&t>0||e.keyCode===i.keyCode.RIGHT&&t<n-1)&&e.stopImmediatePropagation()}function s(e){e.keyCode!==i.keyCode.LEFT&&e.keyCode!==i.keyCode.RIGHT||e.stopImmediatePropagation()}o.DefaultDecimalPlaces=null,o.AllowEmptyValue=!1,e.exports={Editors:{Text:function(e){var t,n,i=this;this.args=e,this.init=function(){var n=e.grid.getOptions().editorCellNavOnLRKeys;t=r("<INPUT type=text class='editor-text' />").appendTo(e.container).on("keydown.nav",n?a:s).focus().select(),e.compositeEditorOptions&&t.on("change",(function(){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}))},this.destroy=function(){t.remove()},this.focus=function(){t.focus()},this.getValue=function(){return t.val()},this.setValue=function(e){t.val(e)},this.loadValue=function(r){n=r[e.column.field]||"",t.val(n),t[0].defaultValue=n,t.select()},this.serializeValue=function(){return t.val()},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==n)&&t.val()!=n},this.validate=function(){if(e.column.validator){var n=e.column.validator(t.val(),e);if(!n.valid)return n}return{valid:!0,msg:null}},this.init()},Integer:function(e){var t,n,i=this;this.args=e,this.init=function(){var n=e.grid.getOptions().editorCellNavOnLRKeys;t=r("<INPUT type=text class='editor-text' />").appendTo(e.container).on("keydown.nav",n?a:s).focus().select(),e.compositeEditorOptions&&t.on("change",(function(){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}))},this.destroy=function(){t.remove()},this.focus=function(){t.focus()},this.loadValue=function(r){n=r[e.column.field],t.val(n),t[0].defaultValue=n,t.select()},this.serializeValue=function(){return parseInt(t.val(),10)||0},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==n)&&t.val()!=n},this.validate=function(){if(isNaN(t.val()))return{valid:!1,msg:"Please enter a valid integer"};if(e.column.validator){var n=e.column.validator(t.val(),e);if(!n.valid)return n}return{valid:!0,msg:null}},this.init()},Float:o,Date:function(e){var t,n,i=this,o=!1;this.args=e,this.init=function(){(t=r("<INPUT type=text class='editor-text' />")).appendTo(e.container),t.focus().select(),t.datepicker({showOn:"button",buttonImageOnly:!0,beforeShow:function(){o=!0},onClose:function(){if(o=!1,e.compositeEditorOptions){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}}}),t.width(t.width()-(e.compositeEditorOptions?28:18))},this.destroy=function(){r.datepicker.dpDiv.stop(!0,!0),t.datepicker("hide"),t.datepicker("destroy"),t.remove()},this.show=function(){o&&r.datepicker.dpDiv.stop(!0,!0).show()},this.hide=function(){o&&r.datepicker.dpDiv.stop(!0,!0).hide()},this.position=function(e){o&&r.datepicker.dpDiv.css("top",e.top+30).css("left",e.left)},this.focus=function(){t.focus()},this.loadValue=function(r){n=r[e.column.field],t.val(n),t[0].defaultValue=n,t.select()},this.serializeValue=function(){return t.val()},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==n)&&t.val()!=n},this.validate=function(){if(e.column.validator){var n=e.column.validator(t.val(),e);if(!n.valid)return n}return{valid:!0,msg:null}},this.init()},YesNoSelect:function(e){var t,n,i=this;this.args=e,this.init=function(){(t=r("<SELECT tabIndex='0' class='editor-yesno'><OPTION value='yes'>Yes</OPTION><OPTION value='no'>No</OPTION></SELECT>")).appendTo(e.container),t.focus(),e.compositeEditorOptions&&t.on("change",(function(){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}))},this.destroy=function(){t.remove()},this.focus=function(){t.focus()},this.loadValue=function(r){t.val((n=r[e.column.field])?"yes":"no"),t.select()},this.serializeValue=function(){return"yes"==t.val()},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return t.val()!=n},this.validate=function(){return{valid:!0,msg:null}},this.init()},Checkbox:function(e){var t,n,i=this;this.args=e,this.init=function(){(t=r("<INPUT type=checkbox value='true' class='editor-checkbox' hideFocus>")).appendTo(e.container),t.focus(),e.compositeEditorOptions&&t.on("change",(function(){var t=e.grid.getActiveCell();i.validate().valid&&i.applyValue(i.args.item,i.serializeValue()),i.applyValue(i.args.compositeEditorOptions.formValues,i.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:i.args.item,column:i.args.column,formValues:i.args.compositeEditorOptions.formValues})}))},this.destroy=function(){t.remove()},this.focus=function(){t.focus()},this.loadValue=function(r){(n=!!r[e.column.field])?t.prop("checked",!0):t.prop("checked",!1)},this.preClick=function(){t.prop("checked",!t.prop("checked"))},this.serializeValue=function(){return t.prop("checked")},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return this.serializeValue()!==n},this.validate=function(){return{valid:!0,msg:null}},this.init()},PercentComplete:function(e){var t,n,i,o=this;this.args=e,this.init=function(){(t=r("<INPUT type=text class='editor-percentcomplete' />")).width(r(e.container).innerWidth()-25),t.appendTo(e.container),(n=r("<div class='editor-percentcomplete-picker' />").appendTo(e.container)).append("<div class='editor-percentcomplete-helper'><div class='editor-percentcomplete-wrapper'><div class='editor-percentcomplete-slider' /><div class='editor-percentcomplete-buttons' /></div></div>"),n.find(".editor-percentcomplete-buttons").append("<button val=0>Not started</button><br/><button val=50>In Progress</button><br/><button val=100>Complete</button>"),t.focus().select(),n.find(".editor-percentcomplete-slider").slider({orientation:"vertical",range:"min",value:i,slide:function(e,n){t.val(n.value)},stop:function(t,n){if(e.compositeEditorOptions){var r=e.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),e.grid.onCompositeEditorChange.notify({row:r.row,cell:r.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})}}}),n.find(".editor-percentcomplete-buttons button").on("click",(function(e){t.val(r(this).attr("val")),n.find(".editor-percentcomplete-slider").slider("value",r(this).attr("val"))}))},this.destroy=function(){t.remove(),n.remove()},this.focus=function(){t.focus()},this.loadValue=function(n){t.val(i=n[e.column.field]),t.select()},this.serializeValue=function(){return parseInt(t.val(),10)||0},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==i)&&(parseInt(t.val(),10)||0)!=i},this.validate=function(){return isNaN(parseInt(t.val(),10))?{valid:!1,msg:"Please enter a valid positive number"}:{valid:!0,msg:null}},this.init()},LongText:function(e){var t,n,o,a=this;this.args=e,this.init=function(){var i=e.compositeEditorOptions,o=(e.grid.getOptions().editorCellNavOnLRKeys,i?e.container:r("body"));n=r("<DIV class='slick-large-editor-text' style='z-index:10000;background:white;padding:5px;border:3px solid gray; border-radius:10px;'/>").appendTo(o),i?n.css({position:"relative",padding:0,border:0}):n.css({position:"absolute"}),t=r("<TEXTAREA hidefocus rows=5 style='background:white;width:250px;height:80px;border:0;outline:0'>").appendTo(n),i?t.on("change",(function(){var t=e.grid.getActiveCell();a.validate().valid&&a.applyValue(a.args.item,a.serializeValue()),a.applyValue(a.args.compositeEditorOptions.formValues,a.serializeValue()),e.grid.onCompositeEditorChange.notify({row:t.row,cell:t.cell,item:a.args.item,column:a.args.column,formValues:a.args.compositeEditorOptions.formValues})})):(r("<DIV style='text-align:right'><BUTTON>Save</BUTTON><BUTTON>Cancel</BUTTON></DIV>").appendTo(n),n.find("button:first").on("click",this.save),n.find("button:last").on("click",this.cancel),t.on("keydown",this.handleKeyDown),a.position(e.position)),t.focus().select()},this.handleKeyDown=function(t){if(t.which==i.keyCode.ENTER&&t.ctrlKey)a.save();else if(t.which==i.keyCode.ESCAPE)t.preventDefault(),a.cancel();else if(t.which==i.keyCode.TAB&&t.shiftKey)t.preventDefault(),e.grid.navigatePrev();else if(t.which==i.keyCode.TAB)t.preventDefault(),e.grid.navigateNext();else if((t.which==i.keyCode.LEFT||t.which==i.keyCode.RIGHT)&&e.grid.getOptions().editorCellNavOnLRKeys){var n=this.selectionStart,r=this.value.length;t.keyCode===i.keyCode.LEFT&&0===n&&e.grid.navigatePrev(),t.keyCode===i.keyCode.RIGHT&&n>=r-1&&e.grid.navigateNext()}},this.save=function(){e.commitChanges()},this.cancel=function(){t.val(o),e.cancelChanges()},this.hide=function(){n.hide()},this.show=function(){n.show()},this.position=function(e){n.css("top",e.top-5).css("left",e.left-5)},this.destroy=function(){n.remove()},this.focus=function(){t.focus()},this.loadValue=function(n){t.val(o=n[e.column.field]),t.select()},this.serializeValue=function(){return t.val()},this.applyValue=function(t,n){t[e.column.field]=n},this.isValueChanged=function(){return!(""===t.val()&&null==o)&&t.val()!=o},this.validate=function(){if(e.column.validator){var n=e.column.validator(t.val(),e);if(!n.valid)return n}return{valid:!0,msg:null}},this.init()}}}},78793:(e,t,n)=>{n(30413),e.exports={Formatters:{PercentComplete:function(e,t,n,r,i){return null==n||""===n?"-":n<50?"<span style='color:red;font-weight:bold;'>"+n+"%</span>":"<span style='color:green'>"+n+"%</span>"},PercentCompleteBar:function(e,t,n,r,i){return null==n||""===n?"":"<span class='percent-complete-bar' style='background:"+(n<30?"red":n<70?"silver":"green")+";width:"+n+"%'></span>"},YesNo:function(e,t,n,r,i){return n?"Yes":"No"},Checkmark:function(e,t,n,r,i){return n?"<img src='../images/tick.png'>":""},Checkbox:function(e,t,n,r,i){return'<img class="slick-edit-preclick" src="../images/'+(n?"CheckboxY":"CheckboxN")+'.png">'}}}},91995:(module,__unused_webpack_exports,__webpack_require__)=>{var $=jQuery=__webpack_require__(35373),Slick=__webpack_require__(30413),scrollbarDimensions,maxSupportedCssHeight;function SlickGrid(container,data,columns,options){$.fn.drag||__webpack_require__(66044),$.fn.drop||__webpack_require__(22329);var defaults={alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,autoHeight:!1,editorLock:Slick.GlobalEditorLock,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,showPreHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,showCellSelection:!0,viewportClass:null,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,autosizeColsMode:Slick.GridAutosizeColsMode.LegacyOff,autosizeColPaddingPx:4,autosizeTextAvgToMWidthRatio:.75,viewportSwitchToScrollModeWidthPercent:void 0,viewportMinWidthPx:void 0,viewportMaxWidthPx:void 0,suppressCssChangesOnHiddenInit:!1},columnDefaults={name:"",resizable:!0,sortable:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},columnAutosizeDefaults={ignoreHeaderText:!1,colValueArray:void 0,allowAddlPercent:void 0,formatterOverride:void 0,autosizeMode:Slick.ColAutosizeMode.ContentIntelligent,rowSelectionModeOnInit:void 0,rowSelectionMode:Slick.RowSelectionMode.FirstNRows,rowSelectionCount:100,valueFilterMode:Slick.ValueFilterMode.None,widthEvalMode:Slick.WidthEvalMode.CanvasTextSize,sizeToRemaining:void 0,widthPx:void 0,colDataTypeOf:void 0},th,h,ph,n,cj,page=0,offset=0,vScrollDir=1,initialized=!1,$container,uid="slickgrid_"+Math.round(1e6*Math.random()),self=this,$focusSink,$focusSink2,$groupHeaders=$(),$headerScroller,$headers,$headerRow,$headerRowScroller,$headerRowSpacerL,$headerRowSpacerR,$footerRow,$footerRowScroller,$footerRowSpacerL,$footerRowSpacerR,$preHeaderPanel,$preHeaderPanelScroller,$preHeaderPanelSpacer,$preHeaderPanelR,$preHeaderPanelScrollerR,$preHeaderPanelSpacerR,$topPanelScroller,$topPanel,$viewport,$canvas,$style,$boundAncestors,treeColumns,stylesheet,columnCssRulesL,columnCssRulesR,viewportH,viewportW,canvasWidth,canvasWidthL,canvasWidthR,headersWidth,headersWidthL,headersWidthR,viewportHasHScroll,viewportHasVScroll,headerColumnWidthDiff=0,headerColumnHeightDiff=0,cellWidthDiff=0,cellHeightDiff=0,jQueryNewWidthBehaviour=!1,absoluteColumnMinWidth,hasFrozenRows=!1,frozenRowsHeight=0,actualFrozenRow=-1,paneTopH=0,paneBottomH=0,viewportTopH=0,viewportBottomH=0,topPanelH=0,headerRowH=0,footerRowH=0,tabbingDirection=1,$activeCanvasNode,$activeViewportNode,activePosX,activeRow,activeCell,activeCellNode=null,currentEditor=null,serializedEditorValue,editController,rowsCache={},renderedRows=0,numVisibleRows=0,prevScrollTop=0,scrollTop=0,lastRenderedScrollTop=0,lastRenderedScrollLeft=0,prevScrollLeft=0,scrollLeft=0,selectionModel,selectedRows=[],plugins=[],cellCssClasses={},columnsById={},sortColumns=[],columnPosLeft=[],columnPosRight=[],pagingActive=!1,pagingIsLastPage=!1,scrollThrottle=ActionThrottle(render,50),h_editorLoader=null,h_render=null,h_postrender=null,h_postrenderCleanup=null,postProcessedRows={},postProcessToRow=null,postProcessFromRow=null,postProcessedCleanupQueue=[],postProcessgroupId=0,counter_rows_rendered=0,counter_rows_removed=0,$paneHeaderL,$paneHeaderR,$paneTopL,$paneTopR,$paneBottomL,$paneBottomR,$headerScrollerL,$headerScrollerR,$headerL,$headerR,$groupHeadersL,$groupHeadersR,$headerRowScrollerL,$headerRowScrollerR,$footerRowScrollerL,$footerRowScrollerR,$headerRowL,$headerRowR,$footerRowL,$footerRowR,$topPanelScrollerL,$topPanelScrollerR,$topPanelL,$topPanelR,$viewportTopL,$viewportTopR,$viewportBottomL,$viewportBottomR,$canvasTopL,$canvasTopR,$canvasBottomL,$canvasBottomR,$viewportScrollContainerX,$viewportScrollContainerY,$headerScrollContainer,$headerRowScrollContainer,$footerRowScrollContainer,cssShow={position:"absolute",visibility:"hidden",display:"block"},$hiddenParents,oldProps=[],columnResizeDragging=!1;function init(){if(($container=container instanceof $?container:$(container)).length<1)throw new Error("SlickGrid requires a valid container, "+container+" does not exist in the DOM.");if(maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,options.suppressCssChangesOnHiddenInit||cacheCssForHiddenInit(),treeColumns=new Slick.TreeColumns(columns),columns=treeColumns.extractColumns(),updateColumnProps(),options.enableColumnReorder&&!$.fn.sortable)throw new Error("SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded");if(editController={commitCurrentEdit,cancelCurrentEdit},$container.empty().css("overflow","hidden").css("outline",0).addClass(uid).addClass("ui-widget"),/relative|absolute|fixed/.test($container.css("position"))||$container.css("position","relative"),$focusSink=$("<div tabIndex='0' hideFocus style='position:fixed;width:0;height:0;top:0;left:0;outline:0;'></div>").appendTo($container),$paneHeaderL=$("<div class='slick-pane slick-pane-header slick-pane-left' tabIndex='0' />").appendTo($container),$paneHeaderR=$("<div class='slick-pane slick-pane-header slick-pane-right' tabIndex='0' />").appendTo($container),$paneTopL=$("<div class='slick-pane slick-pane-top slick-pane-left' tabIndex='0' />").appendTo($container),$paneTopR=$("<div class='slick-pane slick-pane-top slick-pane-right' tabIndex='0' />").appendTo($container),$paneBottomL=$("<div class='slick-pane slick-pane-bottom slick-pane-left' tabIndex='0' />").appendTo($container),$paneBottomR=$("<div class='slick-pane slick-pane-bottom slick-pane-right' tabIndex='0' />").appendTo($container),options.createPreHeaderPanel&&($preHeaderPanelScroller=$("<div class='slick-preheader-panel ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($paneHeaderL),$preHeaderPanel=$("<div />").appendTo($preHeaderPanelScroller),$preHeaderPanelSpacer=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($preHeaderPanelScroller),$preHeaderPanelScrollerR=$("<div class='slick-preheader-panel ui-state-default' style='overflow:hidden;position:relative;' />").appendTo($paneHeaderR),$preHeaderPanelR=$("<div />").appendTo($preHeaderPanelScrollerR),$preHeaderPanelSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($preHeaderPanelScrollerR),options.showPreHeaderPanel||($preHeaderPanelScroller.hide(),$preHeaderPanelScrollerR.hide())),$headerScrollerL=$("<div class='slick-header ui-state-default slick-header-left' />").appendTo($paneHeaderL),$headerScrollerR=$("<div class='slick-header ui-state-default slick-header-right' />").appendTo($paneHeaderR),$headerScroller=$().add($headerScrollerL).add($headerScrollerR),treeColumns.hasDepth()){$groupHeadersL=[],$groupHeadersR=[];for(var e=0;e<treeColumns.getDepth()-1;e++)$groupHeadersL[e]=$("<div class='slick-group-header-columns slick-group-header-columns-left' style='left:-1000px' />").appendTo($headerScrollerL),$groupHeadersR[e]=$("<div class='slick-group-header-columns slick-group-header-columns-right' style='left:-1000px' />").appendTo($headerScrollerR);$groupHeaders=$().add($groupHeadersL).add($groupHeadersR)}$headerL=$("<div class='slick-header-columns slick-header-columns-left' style='left:-1000px' />").appendTo($headerScrollerL),$headerR=$("<div class='slick-header-columns slick-header-columns-right' style='left:-1000px' />").appendTo($headerScrollerR),$headers=$().add($headerL).add($headerR),$headerRowScrollerL=$("<div class='slick-headerrow ui-state-default' />").appendTo($paneTopL),$headerRowScrollerR=$("<div class='slick-headerrow ui-state-default' />").appendTo($paneTopR),$headerRowScroller=$().add($headerRowScrollerL).add($headerRowScrollerR),$headerRowSpacerL=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($headerRowScrollerL),$headerRowSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").appendTo($headerRowScrollerR),$headerRowL=$("<div class='slick-headerrow-columns slick-headerrow-columns-left' />").appendTo($headerRowScrollerL),$headerRowR=$("<div class='slick-headerrow-columns slick-headerrow-columns-right' />").appendTo($headerRowScrollerR),$headerRow=$().add($headerRowL).add($headerRowR),$topPanelScrollerL=$("<div class='slick-top-panel-scroller ui-state-default' />").appendTo($paneTopL),$topPanelScrollerR=$("<div class='slick-top-panel-scroller ui-state-default' />").appendTo($paneTopR),$topPanelScroller=$().add($topPanelScrollerL).add($topPanelScrollerR),$topPanelL=$("<div class='slick-top-panel' style='width:10000px' />").appendTo($topPanelScrollerL),$topPanelR=$("<div class='slick-top-panel' style='width:10000px' />").appendTo($topPanelScrollerR),$topPanel=$().add($topPanelL).add($topPanelR),options.showColumnHeader||$headerScroller.hide(),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewportTopL=$("<div class='slick-viewport slick-viewport-top slick-viewport-left' tabIndex='0' hideFocus />").appendTo($paneTopL),$viewportTopR=$("<div class='slick-viewport slick-viewport-top slick-viewport-right' tabIndex='0' hideFocus />").appendTo($paneTopR),$viewportBottomL=$("<div class='slick-viewport slick-viewport-bottom slick-viewport-left' tabIndex='0' hideFocus />").appendTo($paneBottomL),$viewportBottomR=$("<div class='slick-viewport slick-viewport-bottom slick-viewport-right' tabIndex='0' hideFocus />").appendTo($paneBottomR),$viewport=$().add($viewportTopL).add($viewportTopR).add($viewportBottomL).add($viewportBottomR),$activeViewportNode=$viewportTopL,$canvasTopL=$("<div class='grid-canvas grid-canvas-top grid-canvas-left' tabIndex='0' hideFocus />").appendTo($viewportTopL),$canvasTopR=$("<div class='grid-canvas grid-canvas-top grid-canvas-right' tabIndex='0' hideFocus />").appendTo($viewportTopR),$canvasBottomL=$("<div class='grid-canvas grid-canvas-bottom grid-canvas-left' tabIndex='0' hideFocus />").appendTo($viewportBottomL),$canvasBottomR=$("<div class='grid-canvas grid-canvas-bottom grid-canvas-right' tabIndex='0' hideFocus />").appendTo($viewportBottomR),options.viewportClass&&$viewport.toggleClass(options.viewportClass,!0),$canvas=$().add($canvasTopL).add($canvasTopR).add($canvasBottomL).add($canvasBottomR),scrollbarDimensions=scrollbarDimensions||measureScrollbar(),$activeCanvasNode=$canvasTopL,$preHeaderPanelSpacer&&$preHeaderPanelSpacer.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),$headers.width(getHeadersWidth()),$headerRowSpacerL.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),$headerRowSpacerR.css("width",getCanvasWidth()+scrollbarDimensions.width+"px"),options.createFooterRow&&($footerRowScrollerR=$("<div class='slick-footerrow ui-state-default' />").appendTo($paneTopR),$footerRowScrollerL=$("<div class='slick-footerrow ui-state-default' />").appendTo($paneTopL),$footerRowScroller=$().add($footerRowScrollerL).add($footerRowScrollerR),$footerRowSpacerL=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($footerRowScrollerL),$footerRowSpacerR=$("<div style='display:block;height:1px;position:absolute;top:0;left:0;'></div>").css("width",getCanvasWidth()+scrollbarDimensions.width+"px").appendTo($footerRowScrollerR),$footerRowL=$("<div class='slick-footerrow-columns slick-footerrow-columns-left' />").appendTo($footerRowScrollerL),$footerRowR=$("<div class='slick-footerrow-columns slick-footerrow-columns-right' />").appendTo($footerRowScrollerR),$footerRow=$().add($footerRowL).add($footerRowR),options.showFooterRow||$footerRowScroller.hide()),$focusSink2=$focusSink.clone().appendTo($container),options.explicitInitialization||finishInitialization()}function finishInitialization(){initialized||(initialized=!0,getViewportWidth(),getViewportHeight(),measureCellPaddingAndBorder(),disableSelection($headers),options.enableTextSelectionOnCells||$viewport.on("selectstart.ui",(function(e){return $(e.target).is("input,textarea")})),setFrozenOptions(),setPaneVisibility(),setScroller(),setOverflow(),updateColumnCaches(),createColumnHeaders(),createColumnGroupHeaders(),createColumnFooter(),setupColumnSort(),createCssRules(),resizeCanvas(),bindAncestorScrollEvents(),$container.on("resize.slickgrid",resizeCanvas),$viewport.on("scroll",handleScroll),jQuery.fn.mousewheel&&options.enableMouseWheelScrollHandler&&$viewport.on("mousewheel",handleMouseWheel),$headerScroller.on("contextmenu",handleHeaderContextMenu).on("click",handleHeaderClick).on("mouseenter",".slick-header-column",handleHeaderMouseEnter).on("mouseleave",".slick-header-column",handleHeaderMouseLeave),$headerRowScroller.on("scroll",handleHeaderRowScroll),options.createFooterRow&&($footerRow.on("contextmenu",handleFooterContextMenu).on("click",handleFooterClick),$footerRowScroller.on("scroll",handleFooterRowScroll)),options.createPreHeaderPanel&&$preHeaderPanelScroller.on("scroll",handlePreHeaderPanelScroll),$focusSink.add($focusSink2).on("keydown",handleKeyDown),$canvas.on("keydown",handleKeyDown).on("click",handleClick).on("dblclick",handleDblClick).on("contextmenu",handleContextMenu).on("draginit",handleDragInit).on("dragstart",{distance:3},handleDragStart).on("drag",handleDrag).on("dragend",handleDragEnd).on("mouseenter",".slick-cell",handleMouseEnter).on("mouseleave",".slick-cell",handleMouseLeave),options.suppressCssChangesOnHiddenInit||restoreCssFromHiddenInit())}function cacheCssForHiddenInit(){($hiddenParents=$container.parents().addBack().not(":visible")).each((function(){var e={};for(var t in cssShow)e[t]=this.style[t],this.style[t]=cssShow[t];oldProps.push(e)}))}function restoreCssFromHiddenInit(){$hiddenParents.each((function(e){var t=oldProps[e];for(var n in cssShow)this.style[n]=t[n]}))}function hasFrozenColumns(){return options.frozenColumn>-1}function registerPlugin(e){plugins.unshift(e),e.init(self)}function unregisterPlugin(e){for(var t=plugins.length;t>=0;t--)if(plugins[t]===e){plugins[t].destroy&&plugins[t].destroy(),plugins.splice(t,1);break}}function getPluginByName(e){for(var t=plugins.length-1;t>=0;t--)if(plugins[t].pluginName===e)return plugins[t]}function setSelectionModel(e){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),(selectionModel=e)&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(e,t){return _getContainerElement(getCanvases(),e,t)}function getActiveCanvasNode(e){return setActiveCanvasNode(e),$activeCanvasNode[0]}function getCanvases(){return $canvas}function setActiveCanvasNode(e){e&&($activeCanvasNode=$(e.target).closest(".grid-canvas"))}function getViewportNode(e,t){return _getContainerElement(getViewports(),e,t)}function getViewports(){return $viewport}function getActiveViewportNode(e){return setActiveViewportNode(e),$activeViewportNode[0]}function setActiveViewportNode(e){e&&($activeViewportNode=$(e.target).closest(".slick-viewport"))}function _getContainerElement(e,t,n){if(e){t||(t=0),n||(n=0);var r="number"==typeof t?t:getColumnIndex(t);return e[(hasFrozenRows&&n>=actualFrozenRow+(options.frozenBottom?0:1)?2:0)+(hasFrozenColumns()&&r>options.frozenColumn?1:0)]}}function measureScrollbar(){var e=$('<div class="'+$viewport.className+'" style="position:absolute; top:-10000px; left:-10000px; overflow:auto; width:100px; height:100px;"></div>').appendTo("body"),t=$('<div style="width:200px; height:200px; overflow:auto;"></div>').appendTo(e),n={width:e[0].offsetWidth-e[0].clientWidth,height:e[0].offsetHeight-e[0].clientHeight};return t.remove(),e.remove(),n}function getHeadersWidth(){headersWidth=headersWidthL=headersWidthR=0;for(var e=!options.autoHeight,t=0,n=columns.length;t<n;t++){var r=columns[t].width;options.frozenColumn>-1&&t>options.frozenColumn?headersWidthR+=r:headersWidthL+=r}return e&&(options.frozenColumn>-1&&t>options.frozenColumn?headersWidthR+=scrollbarDimensions.width:headersWidthL+=scrollbarDimensions.width),hasFrozenColumns()?(headersWidthL+=1e3,headersWidthR=Math.max(headersWidthR,viewportW)+headersWidthL,headersWidthR+=scrollbarDimensions.width):(headersWidthL+=scrollbarDimensions.width,headersWidthL=Math.max(headersWidthL,viewportW)+1e3),headersWidth=headersWidthL+headersWidthR,Math.max(headersWidth,viewportW)+1e3}function getHeadersWidthL(){return headersWidthL=0,columns.forEach((function(e,t){options.frozenColumn>-1&&t>options.frozenColumn||(headersWidthL+=e.width)})),hasFrozenColumns()?headersWidthL+=1e3:(headersWidthL+=scrollbarDimensions.width,headersWidthL=Math.max(headersWidthL,viewportW)+1e3),headersWidthL}function getHeadersWidthR(){return headersWidthR=0,columns.forEach((function(e,t){options.frozenColumn>-1&&t>options.frozenColumn&&(headersWidthR+=e.width)})),hasFrozenColumns()&&(headersWidthR=Math.max(headersWidthR,viewportW)+getHeadersWidthL(),headersWidthR+=scrollbarDimensions.width),headersWidthR}function getCanvasWidth(){var e=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,t=columns.length;for(canvasWidthL=canvasWidthR=0;t--;)hasFrozenColumns()&&t>options.frozenColumn?canvasWidthR+=columns[t].width:canvasWidthL+=columns[t].width;var n=canvasWidthL+canvasWidthR;return options.fullWidthRows?Math.max(n,e):n}function updateCanvasWidth(e){var t,n=canvasWidth,r=canvasWidthL,i=canvasWidthR;((t=(canvasWidth=getCanvasWidth())!==n||canvasWidthL!==r||canvasWidthR!==i)||hasFrozenColumns()||hasFrozenRows)&&($canvasTopL.width(canvasWidthL),getHeadersWidth(),$headerL.width(headersWidthL),$headerR.width(headersWidthR),hasFrozenColumns()?($canvasTopR.width(canvasWidthR),$paneHeaderL.width(canvasWidthL),$paneHeaderR.css("left",canvasWidthL),$paneHeaderR.css("width",viewportW-canvasWidthL),$paneTopL.width(canvasWidthL),$paneTopR.css("left",canvasWidthL),$paneTopR.css("width",viewportW-canvasWidthL),$headerRowScrollerL.width(canvasWidthL),$headerRowScrollerR.width(viewportW-canvasWidthL),$headerRowL.width(canvasWidthL),$headerRowR.width(canvasWidthR),options.createFooterRow&&($footerRowScrollerL.width(canvasWidthL),$footerRowScrollerR.width(viewportW-canvasWidthL),$footerRowL.width(canvasWidthL),$footerRowR.width(canvasWidthR)),options.createPreHeaderPanel&&$preHeaderPanel.width(canvasWidth),$viewportTopL.width(canvasWidthL),$viewportTopR.width(viewportW-canvasWidthL),hasFrozenRows&&($paneBottomL.width(canvasWidthL),$paneBottomR.css("left",canvasWidthL),$viewportBottomL.width(canvasWidthL),$viewportBottomR.width(viewportW-canvasWidthL),$canvasBottomL.width(canvasWidthL),$canvasBottomR.width(canvasWidthR))):($paneHeaderL.width("100%"),$paneTopL.width("100%"),$headerRowScrollerL.width("100%"),$headerRowL.width(canvasWidth),options.createFooterRow&&($footerRowScrollerL.width("100%"),$footerRowL.width(canvasWidth)),options.createPreHeaderPanel&&($preHeaderPanel.width("100%"),$preHeaderPanel.width(canvasWidth)),$viewportTopL.width("100%"),hasFrozenRows&&($viewportBottomL.width("100%"),$canvasBottomL.width(canvasWidthL))),viewportHasHScroll=canvasWidth>=viewportW-scrollbarDimensions.width),$headerRowSpacerL.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),$headerRowSpacerR.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),options.createFooterRow&&($footerRowSpacerL.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),$footerRowSpacerR.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0))),(t||e)&&applyColumnWidths()}function disableSelection(e){e&&e.jquery&&e.attr("unselectable","on").css("MozUserSelect","none").on("selectstart.ui",(function(){return!1}))}function getMaxSupportedCssHeight(){for(var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,n=$("<div style='display:none' />").appendTo(document.body);;){var r=2*e;if(n.css("height",r),r>t||n.height()!==r)break;e=r}return n.remove(),e}function getUID(){return uid}function getHeaderColumnWidthDiff(){return headerColumnWidthDiff}function getScrollbarDimensions(){return scrollbarDimensions}function bindAncestorScrollEvents(){for(var e=hasFrozenRows&&!options.frozenBottom?$canvasBottomL[0]:$canvasTopL[0];(e=e.parentNode)!=document.body&&null!=e;)if(e==$viewportTopL[0]||e.scrollWidth!=e.clientWidth||e.scrollHeight!=e.clientHeight){var t=$(e);$boundAncestors=$boundAncestors?$boundAncestors.add(t):t,t.on("scroll."+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.off("scroll."+uid),$boundAncestors=null)}function updateColumnHeader(e,t,n){if(initialized){var r=getColumnIndex(e);if(null!=r){var i=columns[r],o=$headers.children().eq(r);o&&(void 0!==t&&(columns[r].name=t),void 0!==n&&(columns[r].toolTip=n),trigger(self.onBeforeHeaderCellDestroy,{node:o[0],column:i,grid:self}),o.attr("title",n||"").children().eq(0).html(t),trigger(self.onHeaderCellRendered,{node:o[0],column:i,grid:self}))}}}function getHeader(e){if(!e)return hasFrozenColumns()?$headers:$headerL;var t=getColumnIndex(e.id);return hasFrozenColumns()?t<=options.frozenColumn?$headerL:$headerR:$headerL}function getHeaderColumn(e){var t="number"==typeof e?e:getColumnIndex(e),n=hasFrozenColumns()?t<=options.frozenColumn?$headerL:$headerR:$headerL,r=hasFrozenColumns()?t<=options.frozenColumn?t:t-options.frozenColumn-1:t,i=n.children().eq(r);return i&&i[0]}function getHeaderRow(){return hasFrozenColumns()?$headerRow:$headerRow[0]}function getFooterRow(){return hasFrozenColumns()?$footerRow:$footerRow[0]}function getPreHeaderPanel(){return $preHeaderPanel[0]}function getPreHeaderPanelRight(){return $preHeaderPanelR[0]}function getHeaderRowColumn(e){var t,n="number"==typeof e?e:getColumnIndex(e);hasFrozenColumns()?n<=options.frozenColumn?t=$headerRowL:(t=$headerRowR,n-=options.frozenColumn+1):t=$headerRowL;var r=t.children().eq(n);return r&&r[0]}function getFooterRowColumn(e){var t,n="number"==typeof e?e:getColumnIndex(e);hasFrozenColumns()?n<=options.frozenColumn?t=$footerRowL:(t=$footerRowR,n-=options.frozenColumn+1):t=$footerRowL;var r=t&&t.children().eq(n);return r&&r[0]}function createColumnFooter(){if(options.createFooterRow){$footerRow.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowL.empty(),$footerRowR.empty();for(var e=0;e<columns.length;e++){var t=columns[e],n=$("<div class='ui-state-default slick-footerrow-column l"+e+" r"+e+"'></div>").data("column",t).addClass(hasFrozenColumns()&&e<=options.frozenColumn?"frozen":"").appendTo(hasFrozenColumns()&&e>options.frozenColumn?$footerRowR:$footerRowL);trigger(self.onFooterRowCellRendered,{node:n[0],column:t,grid:self})}}}function createColumnGroupHeaders(){var e=0,t=!1;if(treeColumns.hasDepth()){for(var n=0;n<$groupHeadersL.length;n++){$groupHeadersL[n].empty(),$groupHeadersR[n].empty();var r=treeColumns.getColumnsInDepth(n);for(var i in r){var o=r[i];e+=o.extractColumns().length,hasFrozenColumns()&&0===n&&e-1===options.frozenColumn&&(t=!0),$("<div class='ui-state-default slick-group-header-column' />").html("<span class='slick-column-name'>"+o.name+"</span>").attr("id",""+uid+o.id).attr("title",o.toolTip||"").data("column",o).addClass(o.headerCssClass||"").addClass(hasFrozenColumns()&&e-1>options.frozenColumn?"frozen":"").appendTo(hasFrozenColumns()&&e-1>options.frozenColumn?$groupHeadersR[n]:$groupHeadersL[n])}if(hasFrozenColumns()&&0===n&&!t){$groupHeadersL[n].empty(),$groupHeadersR[n].empty(),alert("All columns of group should to be grouped!");break}}applyColumnGroupHeaderWidths()}}function createColumnHeaders(){function e(){$(this).addClass("ui-state-hover")}function t(){$(this).removeClass("ui-state-hover")}$headers.find(".slick-header-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:e,grid:self})})),$headerL.empty(),$headerR.empty(),getHeadersWidth(),$headerL.width(headersWidthL),$headerR.width(headersWidthR),$headerRow.find(".slick-headerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:e,grid:self})})),$headerRowL.empty(),$headerRowR.empty(),options.createFooterRow&&($footerRowL.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowL.empty(),hasFrozenColumns()&&($footerRowR.find(".slick-footerrow-column").each((function(){var e=$(this).data("column");e&&trigger(self.onBeforeFooterRowCellDestroy,{node:this,column:e,grid:self})})),$footerRowR.empty()));for(var n=0;n<columns.length;n++){var r=columns[n],i=hasFrozenColumns()?n<=options.frozenColumn?$headerL:$headerR:$headerL,o=hasFrozenColumns()?n<=options.frozenColumn?$headerRowL:$headerRowR:$headerRowL,a=$("<div class='ui-state-default slick-header-column' />").html("<span class='slick-column-name'>"+r.name+"</span>").width(r.width-headerColumnWidthDiff).attr("id",""+uid+r.id).attr("title",r.toolTip||"").data("column",r).addClass(r.headerCssClass||"").addClass(hasFrozenColumns()&&n<=options.frozenColumn?"frozen":"").appendTo(i);if((options.enableColumnReorder||r.sortable)&&a.on("mouseenter",e).on("mouseleave",t),r.hasOwnProperty("headerCellAttrs")&&r.headerCellAttrs instanceof Object)for(var s in r.headerCellAttrs)r.headerCellAttrs.hasOwnProperty(s)&&a.attr(s,r.headerCellAttrs[s]);if(r.sortable&&(a.addClass("slick-header-sortable"),a.append("<span class='slick-sort-indicator"+(options.numberedMultiColumnSort&&!options.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":"")+"' />"),options.numberedMultiColumnSort&&options.sortColNumberInSeparateSpan&&a.append("<span class='slick-sort-indicator-numbered' />")),trigger(self.onHeaderCellRendered,{node:a[0],column:r,grid:self}),options.showHeaderRow){var l=$("<div class='ui-state-default slick-headerrow-column l"+n+" r"+n+"'></div>").data("column",r).addClass(hasFrozenColumns()&&n<=options.frozenColumn?"frozen":"").appendTo(o);trigger(self.onHeaderRowCellRendered,{node:l[0],column:r,grid:self})}if(options.createFooterRow&&options.showFooterRow){var c=$("<div class='ui-state-default slick-footerrow-column l"+n+" r"+n+"'></div>").data("column",r).appendTo($footerRow);trigger(self.onFooterRowCellRendered,{node:c[0],column:r,grid:self})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&("function"==typeof options.enableColumnReorder?options.enableColumnReorder(self,$headers,headerColumnWidthDiff,setColumns,setupColumnResize,columns,getColumnIndex,uid,trigger):setupColumnReorder())}function setupColumnSort(){$headers.click((function(e){if(!columnResizeDragging&&(e.metaKey=e.metaKey||e.ctrlKey,!$(e.target).hasClass("slick-resizable-handle"))){var t=$(e.target).closest(".slick-header-column");if(t.length){var n=t.data("column");if(n.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var r=$.extend(!0,[],sortColumns),i=null,o=0;o<sortColumns.length;o++)if(sortColumns[o].columnId==n.id){(i=sortColumns[o]).sortAsc=!i.sortAsc;break}var a,s=!!i;options.tristateMultiColumnSort?(i||(i={columnId:n.id,sortAsc:n.defaultSortAsc}),s&&i.sortAsc&&(sortColumns.splice(o,1),i=null),options.multiColumnSort||(sortColumns=[]),!i||s&&options.multiColumnSort||sortColumns.push(i)):e.metaKey&&options.multiColumnSort?i&&sortColumns.splice(o,1):((e.shiftKey||e.metaKey)&&options.multiColumnSort||(sortColumns=[]),i?0===sortColumns.length&&sortColumns.push(i):(i={columnId:n.id,sortAsc:n.defaultSortAsc},sortColumns.push(i))),a=options.multiColumnSort?{multiColumnSort:!0,previousSortColumns:r,sortCols:$.map(sortColumns,(function(e){return{columnId:columns[getColumnIndex(e.columnId)].id,sortCol:columns[getColumnIndex(e.columnId)],sortAsc:e.sortAsc}}))}:{multiColumnSort:!1,previousSortColumns:r,columnId:sortColumns.length>0?n.id:null,sortCol:sortColumns.length>0?n:null,sortAsc:!(sortColumns.length>0)||sortColumns[0].sortAsc},!1!==trigger(self.onBeforeSort,a,e)&&(setSortColumns(sortColumns),trigger(self.onSort,a,e))}}}}))}function currentPositionInHeader(e){var t=0;return $headers.find(".slick-header-column").each((function(n){if(this.id==e)return t=n,!1})),t}function limitPositionInGroup(e){var t,n=0,r=0;return treeColumns.getColumnsInDepth($groupHeadersL.length-1).some((function(i){return n=r,r+=i.columns.length,i.columns.some((function(n){return n.id===e&&(t=i),t})),t})),r--,{start:n,end:r,group:t}}function remove(e,t){var n=e.lastIndexOf(t);n>-1&&(e.splice(n,1),remove(e,t))}function columnPositionValidInGroup(e){var t=currentPositionInHeader(e[0].id),n=limitPositionInGroup(e.data("column").id),r=n.start<=t&&t<=n.end;return{limit:n,valid:r,message:r?"":'Column "'.concat(e.text(),'" can be reordered only within the "',n.group.name,'" group!')}}function setupColumnReorder(){$headers.filter(":ui-sortable").sortable("destroy");var e,t=null;function n(){$viewportScrollContainerX[0].scrollLeft=$viewportScrollContainerX[0].scrollLeft+10}function r(){$viewportScrollContainerX[0].scrollLeft=$viewportScrollContainerX[0].scrollLeft-10}$headers.sortable({containment:"parent",distance:3,axis:"x",cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"slick-sortable-placeholder ui-state-default slick-header-column",start:function(t,n){n.placeholder.width(n.helper.outerWidth()-headerColumnWidthDiff),e=!hasFrozenColumns()||n.placeholder.offset().left+n.placeholder.width()>$viewportScrollContainerX.offset().left,$(n.helper).addClass("slick-header-column-active")},beforeStop:function(e,t){$(t.helper).removeClass("slick-header-column-active")},sort:function(i,o){e&&i.originalEvent.pageX>$container[0].clientWidth?t||(t=setInterval(n,100)):e&&i.originalEvent.pageX<$viewportScrollContainerX.offset().left?t||(t=setInterval(r,100)):(clearInterval(t),t=null)},stop:function(e,n){var r=!1;clearInterval(t),t=null;var i=null;if(treeColumns.hasDepth()){var o=columnPositionValidInGroup(n.item);i=o.limit,(r=!o.valid)&&alert(o.message)}if(!r&&getEditorLock().commitCurrentEdit()){var a=$headerL.sortable("toArray");a=a.concat($headerR.sortable("toArray"));for(var s=[],l=0;l<a.length;l++)s.push(columns[getColumnIndex(a[l].replace(uid,""))]);setColumns(s),trigger(self.onColumnsReordered,{impactedColumns:getImpactedColumns(i)}),e.stopPropagation(),setupColumnResize()}else $(this).sortable("cancel")}})}function getImpactedColumns(e){var t=[];if(e)for(var n=e.start;n<=e.end;n++)t.push(columns[n]);else t=columns;return t}function setupColumnResize(){var e,t,n,r,i,o,a,s,l,c=0;(i=$headers.children()).find(".slick-resizable-handle").remove(),i.each((function(e,t){e>=columns.length||columns[e].resizable&&(void 0===s&&(s=e),l=e)})),void 0!==s&&i.each((function(u,h){u>=columns.length||u<s||options.forceFitColumns&&u>=l||($(h),$("<div class='slick-resizable-handle' />").appendTo(h).on("dragstart",(function(t,s){if(!getEditorLock().commitCurrentEdit())return!1;r=t.pageX,c=0,$(this).parent().addClass("slick-header-column-active");var l=null,h=null;if(i.each((function(e,t){e>=columns.length||(columns[e].previousWidth=$(t).outerWidth())})),options.forceFitColumns)for(l=0,h=0,e=u+1;e<columns.length;e++)(n=columns[e]).resizable&&(null!==h&&(n.maxWidth?h+=n.maxWidth-n.previousWidth:h=null),l+=n.previousWidth-Math.max(n.minWidth||0,absoluteColumnMinWidth));var d=0,f=0;for(e=0;e<=u;e++)(n=columns[e]).resizable&&(null!==f&&(n.maxWidth?f+=n.maxWidth-n.previousWidth:f=null),d+=n.previousWidth-Math.max(n.minWidth||0,absoluteColumnMinWidth));null===l&&(l=1e5),null===d&&(d=1e5),null===h&&(h=1e5),null===f&&(f=1e5),a=r+Math.min(l,f),o=r-Math.min(d,h)})).on("drag",(function(i,s){columnResizeDragging=!0;var l,h,d=Math.min(a,Math.max(o,i.pageX))-r,f=0,p=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;if(d<0){for(h=d,e=u;e>=0;e--)(n=columns[e]).resizable&&(l=Math.max(n.minWidth||0,absoluteColumnMinWidth),h&&n.previousWidth+h<l?(h+=n.previousWidth-l,n.width=l):(n.width=n.previousWidth+h,h=0));for(t=0;t<=u;t++)n=columns[t],hasFrozenColumns()&&t>options.frozenColumn?n.width:f+=n.width;if(options.forceFitColumns)for(h=-d,e=u+1;e<columns.length;e++)(n=columns[e]).resizable&&(h&&n.maxWidth&&n.maxWidth-n.previousWidth<h?(h-=n.maxWidth-n.previousWidth,n.width=n.maxWidth):(n.width=n.previousWidth+h,h=0),hasFrozenColumns()&&e>options.frozenColumn?n.width:f+=n.width);else for(e=u+1;e<columns.length;e++)n=columns[e],hasFrozenColumns()&&e>options.frozenColumn?n.width:f+=n.width;if(options.forceFitColumns)for(h=-d,e=u+1;e<columns.length;e++)(n=columns[e]).resizable&&(h&&n.maxWidth&&n.maxWidth-n.previousWidth<h?(h-=n.maxWidth-n.previousWidth,n.width=n.maxWidth):(n.width=n.previousWidth+h,h=0))}else{for(h=d,f=0,e=u;e>=0;e--)if((n=columns[e]).resizable)if(h&&n.maxWidth&&n.maxWidth-n.previousWidth<h)h-=n.maxWidth-n.previousWidth,n.width=n.maxWidth;else{var g=n.previousWidth+h,m=canvasWidthL+h;hasFrozenColumns()&&e<=options.frozenColumn?(g>c&&m<p-options.frozenRightViewportMinWidth&&(c=g),n.width=m+options.frozenRightViewportMinWidth>p?c:g):n.width=g,h=0}for(t=0;t<=u;t++)n=columns[t],hasFrozenColumns()&&t>options.frozenColumn?n.width:f+=n.width;if(options.forceFitColumns)for(h=-d,e=u+1;e<columns.length;e++)(n=columns[e]).resizable&&(l=Math.max(n.minWidth||0,absoluteColumnMinWidth),h&&n.previousWidth+h<l?(h+=n.previousWidth-l,n.width=l):(n.width=n.previousWidth+h,h=0),hasFrozenColumns()&&e>options.frozenColumn?n.width:f+=n.width);else for(e=u+1;e<columns.length;e++)n=columns[e],hasFrozenColumns()&&e>options.frozenColumn?n.width:f+=n.width}hasFrozenColumns()&&f!=canvasWidthL&&($headerL.width(f+1e3),$paneHeaderR.css("left",f)),applyColumnHeaderWidths(),applyColumnGroupHeaderWidths(),options.syncColumnCellResize&&applyColumnWidths(),trigger(self.onColumnsDrag,{triggeredByColumn:$(this).parent().attr("id").replace(uid,""),resizeHandle:$(this)})})).on("dragend",(function(t,r){$(this).parent().removeClass("slick-header-column-active");var o,a=$(this).parent().attr("id").replace(uid,"");for(!0===trigger(self.onBeforeColumnsResize,{triggeredByColumn:a})&&(applyColumnHeaderWidths(),applyColumnGroupHeaderWidths()),e=0;e<columns.length;e++)n=columns[e],o=$(i[e]).outerWidth(),n.previousWidth!==o&&n.rerenderOnResize&&invalidateAllRows();updateCanvasWidth(!0),render(),trigger(self.onColumnsResized,{triggeredByColumn:a}),setTimeout((function(){columnResizeDragging=!1}),300)})).on("dblclick",(function(){var e=$(this).parent().attr("id").replace(uid,"");trigger(self.onColumnsResizeDblClick,{triggeredByColumn:e})})))}))}function getVBoxDelta(e){var t=0;return e&&"function"==typeof e.css&&$.each(["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],(function(n,r){t+=parseFloat(e.css(r))||0})),t}function setFrozenOptions(){if(options.frozenColumn=options.frozenColumn>=0&&options.frozenColumn<columns.length?parseInt(options.frozenColumn):-1,options.frozenRow>-1){hasFrozenRows=!0,frozenRowsHeight=options.frozenRow*options.rowHeight;var e=getDataLength();actualFrozenRow=options.frozenBottom?e-options.frozenRow:options.frozenRow}else hasFrozenRows=!1}function setPaneVisibility(){hasFrozenColumns()?($paneHeaderR.show(),$paneTopR.show(),hasFrozenRows?($paneBottomL.show(),$paneBottomR.show()):($paneBottomR.hide(),$paneBottomL.hide())):($paneHeaderR.hide(),$paneTopR.hide(),$paneBottomR.hide(),hasFrozenRows?$paneBottomL.show():($paneBottomR.hide(),$paneBottomL.hide()))}function setOverflow(){$viewportTopL.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"scroll":hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"auto","overflow-y":!hasFrozenColumns()&&options.alwaysShowVerticalScroll?"scroll":hasFrozenColumns()?"hidden":hasFrozenRows?"scroll":"auto"}),$viewportTopR.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"scroll":hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"hidden":"auto","overflow-y":options.alwaysShowVerticalScroll?"scroll":(hasFrozenColumns(),hasFrozenRows?"scroll":"auto")}),$viewportBottomL.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"scroll":"auto":(hasFrozenRows&&options.alwaysAllowHorizontalScroll,"auto"),"overflow-y":!hasFrozenColumns()&&options.alwaysShowVerticalScroll?"scroll":hasFrozenColumns()?"hidden":hasFrozenRows?"scroll":"auto"}),$viewportBottomR.css({"overflow-x":hasFrozenColumns()?hasFrozenRows&&!options.alwaysAllowHorizontalScroll?"scroll":"auto":(hasFrozenRows&&options.alwaysAllowHorizontalScroll,"auto"),"overflow-y":options.alwaysShowVerticalScroll?"scroll":(hasFrozenColumns(),"auto")}),options.viewportClass&&($viewportTopL.toggleClass(options.viewportClass,!0),$viewportTopR.toggleClass(options.viewportClass,!0),$viewportBottomL.toggleClass(options.viewportClass,!0),$viewportBottomR.toggleClass(options.viewportClass,!0))}function setScroller(){hasFrozenColumns()?($headerScrollContainer=$headerScrollerR,$headerRowScrollContainer=$headerRowScrollerR,$footerRowScrollContainer=$footerRowScrollerR,hasFrozenRows?options.frozenBottom?($viewportScrollContainerX=$viewportBottomR,$viewportScrollContainerY=$viewportTopR):$viewportScrollContainerX=$viewportScrollContainerY=$viewportBottomR:$viewportScrollContainerX=$viewportScrollContainerY=$viewportTopR):($headerScrollContainer=$headerScrollerL,$headerRowScrollContainer=$headerRowScrollerL,$footerRowScrollContainer=$footerRowScrollerL,hasFrozenRows?options.frozenBottom?($viewportScrollContainerX=$viewportBottomL,$viewportScrollContainerY=$viewportTopL):$viewportScrollContainerX=$viewportScrollContainerY=$viewportBottomL:$viewportScrollContainerX=$viewportScrollContainerY=$viewportTopL)}function measureCellPaddingAndBorder(){var e,t=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],r=$.fn.jquery.split(".");jQueryNewWidthBehaviour=1==r[0]&&r[1]>=8||r[0]>=2,e=$("<div class='ui-state-default slick-header-column' style='visibility:hidden'>-</div>").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,(function(t,n){headerColumnWidthDiff+=parseFloat(e.css(n))||0})),$.each(n,(function(t,n){headerColumnHeightDiff+=parseFloat(e.css(n))||0}))),e.remove();var i=$("<div class='slick-row' />").appendTo($canvas);e=$("<div class='slick-cell' id='' style='visibility:hidden'>-</div>").appendTo(i),cellWidthDiff=cellHeightDiff=0,"border-box"!=e.css("box-sizing")&&"border-box"!=e.css("-moz-box-sizing")&&"border-box"!=e.css("-webkit-box-sizing")&&($.each(t,(function(t,n){cellWidthDiff+=parseFloat(e.css(n))||0})),$.each(n,(function(t,n){cellHeightDiff+=parseFloat(e.css(n))||0}))),i.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$("<style type='text/css' rel='stylesheet' />"),$container[0].parentNode instanceof ShadowRoot?$container[0].parentNode.insertBefore($style[0],$container[0]):$style.appendTo($("head"));for(var e=options.rowHeight-cellHeightDiff,t=["."+uid+" .slick-group-header-column { left: 1000px; }","."+uid+" .slick-header-column { left: 1000px; }","."+uid+" .slick-top-panel { height:"+options.topPanelHeight+"px; }","."+uid+" .slick-preheader-panel { height:"+options.preHeaderPanelHeight+"px; }","."+uid+" .slick-headerrow-columns { height:"+options.headerRowHeight+"px; }","."+uid+" .slick-footerrow-columns { height:"+options.footerRowHeight+"px; }","."+uid+" .slick-cell { height:"+e+"px; }","."+uid+" .slick-row { height:"+options.rowHeight+"px; }"],n=0;n<columns.length;n++)t.push("."+uid+" .l"+n+" { }"),t.push("."+uid+" .r"+n+" { }");$style[0].styleSheet?$style[0].styleSheet.cssText=t.join(" "):$style[0].appendChild(document.createTextNode(t.join(" ")))}function getColumnCssRules(e){var t;if(!stylesheet){var n;for(n=$container[0].parentNode instanceof ShadowRoot?$container[0].parentNode.styleSheets:document.styleSheets,t=0;t<n.length;t++)if((n[t].ownerNode||n[t].owningElement)==$style[0]){stylesheet=n[t];break}if(!stylesheet)throw new Error("SlickGrid Cannot find stylesheet.");columnCssRulesL=[],columnCssRulesR=[];var r,i,o=stylesheet.cssRules||stylesheet.rules;for(t=0;t<o.length;t++){var a=o[t].selectorText;(r=/\.l\d+/.exec(a))?(i=parseInt(r[0].substr(2,r[0].length-2),10),columnCssRulesL[i]=o[t]):(r=/\.r\d+/.exec(a))&&(i=parseInt(r[0].substr(2,r[0].length-2),10),columnCssRulesR[i]=o[t])}}return{left:columnCssRulesL[e],right:columnCssRulesR[e]}}function removeCssRules(){$style.remove(),stylesheet=null}function destroy(e){getEditorLock().cancelCurrentEdit(),trigger(self.onBeforeDestroy,{});for(var t=plugins.length;t--;)unregisterPlugin(plugins[t]);options.enableColumnReorder&&$headers.filter(":ui-sortable").sortable("destroy"),unbindAncestorScrollEvents(),$container.off(".slickgrid"),removeCssRules(),$canvas.off(),$viewport.off(),$headerScroller.off(),$headerRowScroller.off(),$footerRow&&$footerRow.off(),$footerRowScroller&&$footerRowScroller.off(),$preHeaderPanelScroller&&$preHeaderPanelScroller.off(),$focusSink.off(),$(".slick-resizable-handle").off(),$(".slick-header-column").off(),$container.empty().removeClass(uid),e&&destroyAllElements()}function destroyAllElements(){$activeCanvasNode=null,$activeViewportNode=null,$boundAncestors=null,$canvas=null,$canvasTopL=null,$canvasTopR=null,$canvasBottomL=null,$canvasBottomR=null,$container=null,$focusSink=null,$focusSink2=null,$groupHeaders=null,$groupHeadersL=null,$groupHeadersR=null,$headerL=null,$headerR=null,$headers=null,$headerRow=null,$headerRowL=null,$headerRowR=null,$headerRowSpacerL=null,$headerRowSpacerR=null,$headerRowScrollContainer=null,$headerRowScroller=null,$headerRowScrollerL=null,$headerRowScrollerR=null,$headerScrollContainer=null,$headerScroller=null,$headerScrollerL=null,$headerScrollerR=null,$hiddenParents=null,$footerRow=null,$footerRowL=null,$footerRowR=null,$footerRowSpacerL=null,$footerRowSpacerR=null,$footerRowScroller=null,$footerRowScrollerL=null,$footerRowScrollerR=null,$footerRowScrollContainer=null,$preHeaderPanel=null,$preHeaderPanelR=null,$preHeaderPanelScroller=null,$preHeaderPanelScrollerR=null,$preHeaderPanelSpacer=null,$preHeaderPanelSpacerR=null,$topPanel=null,$topPanelScroller=null,$style=null,$topPanelScrollerL=null,$topPanelScrollerR=null,$topPanelL=null,$topPanelR=null,$paneHeaderL=null,$paneHeaderR=null,$paneTopL=null,$paneTopR=null,$paneBottomL=null,$paneBottomR=null,$viewport=null,$viewportTopL=null,$viewportTopR=null,$viewportBottomL=null,$viewportBottomR=null,$viewportScrollContainerX=null,$viewportScrollContainerY=null}var canvas=null,canvas_context=null;function autosizeColumn(e,t){var n=e;if("number"==typeof e)n=columns[e];else if("string"==typeof e)for(var r=0;r<columns.length;r++)columns[r].Id===e&&(n=columns[r]);getColAutosizeWidth(n,$(getCanvasNode(0,0)),t)}function autosizeColumns(e,t){if((e=e||options.autosizeColsMode)!==Slick.GridAutosizeColsMode.LegacyForceFit&&e!==Slick.GridAutosizeColsMode.LegacyOff){if(e!==Slick.GridAutosizeColsMode.None){(canvas=document.createElement("canvas"))&&canvas.getContext&&(canvas_context=canvas.getContext("2d"));var n,r,i,o,a=$(getCanvasNode(0,0)),s=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW,l=0,c=0,u=0,h=0,d=0;for(n=0;n<columns.length;n++)getColAutosizeWidth(r=columns[n],a,t),d+=r.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?r.width:0,h+=r.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?r.width:r.minWidth,l+=r.autoSize.widthPx,c+=r.autoSize.sizeToRemaining?0:r.autoSize.widthPx,u+=r.autoSize.sizeToRemaining&&r.minWidth||0;var f=l-c;if(e===Slick.GridAutosizeColsMode.FitViewportToCols){var p=l+scrollbarDimensions.width;e=Slick.GridAutosizeColsMode.IgnoreViewport,options.viewportMaxWidthPx&&p>options.viewportMaxWidthPx?(p=options.viewportMaxWidthPx,e=Slick.GridAutosizeColsMode.FitColsToViewport):options.viewportMinWidthPx&&p<options.viewportMinWidthPx&&(p=options.viewportMinWidthPx,e=Slick.GridAutosizeColsMode.FitColsToViewport),$container.width(p)}if(e===Slick.GridAutosizeColsMode.FitColsToViewport)if(f>0&&c<s-u)for(n=0;n<columns.length;n++){var g=s-c;i=(r=columns[n]).autoSize.sizeToRemaining?g*r.autoSize.widthPx/f:r.autoSize.widthPx,r.rerenderOnResize&&r.width!=i&&(o=!0),r.width=i}else if(options.viewportSwitchToScrollModeWidthPercent&&c+u>s*options.viewportSwitchToScrollModeWidthPercent/100||h>s)e=Slick.GridAutosizeColsMode.IgnoreViewport;else{var m=c-d,v=s-d-u;for(n=0;n<columns.length;n++)i=(r=columns[n]).width,r.autoSize.autosizeMode!==Slick.ColAutosizeMode.Locked&&(r.autoSize.sizeToRemaining?i=r.minWidth:((i=v/m*r.autoSize.widthPx)<r.minWidth&&(i=r.minWidth),m-=r.autoSize.widthPx,v-=i)),r.rerenderOnResize&&r.width!=i&&(o=!0),r.width=i}if(e===Slick.GridAutosizeColsMode.IgnoreViewport)for(n=0;n<columns.length;n++)i=columns[n].autoSize.widthPx,columns[n].rerenderOnResize&&columns[n].width!=i&&(o=!0),columns[n].width=i;reRenderColumns(o)}}else legacyAutosizeColumns()}function LogColWidths(){for(var e="Col Widths:",t=0;t<columns.length;t++)e+=" "+columns[t].width;console.log(e)}function getColAutosizeWidth(e,t,n){var r=e.autoSize;if(r.widthPx=e.width,r.autosizeMode!==Slick.ColAutosizeMode.Locked&&r.autosizeMode!==Slick.ColAutosizeMode.Guide){var i=getDataLength();if(r.autosizeMode===Slick.ColAutosizeMode.ContentIntelligent){var o,a=r.colDataTypeOf;if(i>0){var s=getDataItem(0);s&&"object"==(a=typeof(o=s[e.field]))&&(o instanceof Date&&(a="date"),"undefined"!=typeof moment&&o instanceof moment&&(a="moment"))}"boolean"===a&&(r.colValueArray=[!0,!1]),"number"===a&&(r.valueFilterMode=Slick.ValueFilterMode.GetGreatestAndSub,r.rowSelectionMode=Slick.RowSelectionMode.AllRows),"string"===a&&(r.valueFilterMode=Slick.ValueFilterMode.GetLongestText,r.rowSelectionMode=Slick.RowSelectionMode.AllRows,r.allowAddlPercent=5),"date"===a&&(r.colValueArray=[new Date(2009,8,30,12,20,20)]),"moment"===a&&"undefined"!=typeof moment&&(r.colValueArray=[moment([2009,8,30,12,20,20])])}var l=getColContentSize(e,t,n);l=l*(r.allowAddlPercent?1+r.allowAddlPercent/100:1)+options.autosizeColPaddingPx,e.minWidth&&l<e.minWidth&&(l=e.minWidth),e.maxWidth&&l>e.maxWidth&&(l=e.maxWidth),r.widthPx=l}}function getColContentSize(e,t,n){var r,i=e.autoSize,o=1,a=0,s=0;if(i.ignoreHeaderText||(s=getColHeaderWidth(e)),i.colValueArray)return a=getColWidth(e,t,i.colValueArray),Math.max(s,a);var l=getData();l.getItems&&(l=l.getItems());var c=(n?i.rowSelectionModeOnInit:void 0)||i.rowSelectionMode;if(c===Slick.RowSelectionMode.FirstRow&&(l=l.slice(0,1)),c===Slick.RowSelectionMode.LastRow&&(l=l.slice(l.length-1,l.length)),c===Slick.RowSelectionMode.FirstNRows&&(l=l.slice(0,i.rowSelectionCount)),i.valueFilterMode===Slick.ValueFilterMode.DeDuplicate){var u={};for(h=0,r=l.length;h<r;h++)u[l[h][e.field]]=!0;if(Object.keys)l=Object.keys(u);else for(var h in l=[],u)l.push(h)}if(i.valueFilterMode===Slick.ValueFilterMode.GetGreatestAndSub){var d,f=0;for(h=0,r=l.length;h<r;h++)g=l[h][e.field],Math.abs(g)>f&&(d=g,f=Math.abs(g));d=""+d,l=[d=+(d=Array(d.length+1).join("9"))]}if(i.valueFilterMode===Slick.ValueFilterMode.GetLongestTextAndSub){var p=0;for(h=0,r=l.length;h<r;h++)((g=l[h][e.field])||"").length>p&&(p=g.length);g=Array(p+1).join("m"),o=options.autosizeTextAvgToMWidthRatio,l=[g]}if(i.valueFilterMode===Slick.ValueFilterMode.GetLongestText){p=0;var g,m=0;if(row.length){for(h=0,r=l.length;h<r;h++)((g=l[h][e.field])||"").length>p&&(p=g.length,m=h);g=l[m][e.field]}l=[g]}return a=getColWidth(e,t,l)*o,Math.max(s,a)}function getColWidth(e,t,n){var r=getColumnIndex(e.id),i=$('<div class="slick-row ui-widget-content"></div>'),o=$('<div class="slick-cell"></div>');o.css({position:"absolute",visibility:"hidden","text-overflow":"initial","white-space":"nowrap"}),i.append(o),t.append(i);var a,s,l,c,u=0;return canvas_context&&e.autoSize.widthEvalMode===Slick.WidthEvalMode.CanvasTextSize?(canvas_context.font=o.css("font-size")+" "+o.css("font-family"),$(n).each((function(t,n){c=Array.isArray(n)?n[e.field]:n,(a=(s=""+c)?canvas_context.measureText(s).width:0)>u&&(u=a,l=s)})),o.html(l),a=o.outerWidth(),i.remove(),o=null,a):($(n).each((function(t,n){c=Array.isArray(n)?n[e.field]:n,applyFormatResultToCellNode(e.formatterOverride?e.formatterOverride(t,r,c,e,n,self):e.formatter?e.formatter(t,r,c,e,n,self):""+c,o[0]),(a=o.outerWidth())>u&&(u=a)})),i.remove(),o=null,u)}function getColHeaderWidth(e){var t=0,n=getUID()+e.id,r=document.getElementById(n),i=n+"_";if(r){var o=r.cloneNode(!0);o.id=i,o.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",r.parentNode.insertBefore(o,r),t=o.offsetWidth,o.parentNode.removeChild(o)}else{var a=getHeader(e);t=(r=$("<div class='ui-state-default slick-header-column' />").html("<span class='slick-column-name'>"+e.name+"</span>").attr("id",i).css({position:"absolute",visibility:"hidden",right:"auto","text-overflow:":"initial","white-space":"nowrap"}).addClass(e.headerCssClass||"").appendTo(a))[0].offsetWidth,a[0].removeChild(r[0])}return t}function legacyAutosizeColumns(){var e,t,n,r=[],i=0,o=0,a=viewportHasVScroll?viewportW-scrollbarDimensions.width:viewportW;for(e=0;e<columns.length;e++)t=columns[e],r.push(t.width),o+=t.width,t.resizable&&(i+=t.width-Math.max(t.minWidth,absoluteColumnMinWidth));for(n=o;o>a&&i;){var s=(o-a)/i;for(e=0;e<columns.length&&o>a;e++){t=columns[e];var l=r[e];if(!(!t.resizable||l<=t.minWidth||l<=absoluteColumnMinWidth)){var c=Math.max(t.minWidth,absoluteColumnMinWidth),u=Math.floor(s*(l-c))||1;o-=u=Math.min(u,l-c),i-=u,r[e]-=u}}if(n<=o)break;n=o}for(n=o;o<a;){var h=a/o;for(e=0;e<columns.length&&o<a;e++){t=columns[e];var d,f=r[e];o+=d=!t.resizable||t.maxWidth<=f?0:Math.min(Math.floor(h*f)-f,t.maxWidth-f||1e6)||1,r[e]+=o<=a?d:0}if(n>=o)break;n=o}var p=!1;for(e=0;e<columns.length;e++)columns[e].rerenderOnResize&&columns[e].width!=r[e]&&(p=!0),columns[e].width=r[e];reRenderColumns(p)}function reRenderColumns(e){applyColumnHeaderWidths(),applyColumnGroupHeaderWidths(),updateCanvasWidth(!0),trigger(self.onAutosizeColumns,{columns}),e&&(invalidateAllRows(),render())}function trigger(e,t,n){return n=n||new Slick.EventData,(t=t||{}).grid=self,e.notify(t,n,self)}function getEditorLock(){return options.editorLock}function getEditController(){return editController}function getColumnIndex(e){return columnsById[e]}function applyColumnGroupHeaderWidths(){if(treeColumns.hasDepth())for(var e=$groupHeadersL.length-1;e>=0;e--)treeColumns.getColumnsInDepth(e),$().add($groupHeadersL[e]).add($groupHeadersR[e]).each((function(e){var t=$(this),n=0;t.width(0===e?getHeadersWidthL():getHeadersWidthR()),t.children().each((function(){var e=$(this),r=$(this).data("column");r.width=0,r.columns.forEach((function(){var e=t.next().children(":eq("+n+++")");r.width+=e.outerWidth()})),e.width(r.width-headerColumnWidthDiff)}))}))}function applyColumnHeaderWidths(){if(initialized){for(var e,t=0,n=$headers.children(),r=columns.length;t<r;t++)e=$(n[t]),jQueryNewWidthBehaviour?e.outerWidth()!==columns[t].width&&e.outerWidth(columns[t].width):e.width()!==columns[t].width-headerColumnWidthDiff&&e.width(columns[t].width-headerColumnWidthDiff);updateColumnCaches()}}function applyColumnWidths(){for(var e,t,n=0,r=0;r<columns.length;r++)e=columns[r].width,(t=getColumnCssRules(r)).left.style.left=n+"px",t.right.style.right=(-1!=options.frozenColumn&&r>options.frozenColumn?canvasWidthR:canvasWidthL)-n-e+"px",options.frozenColumn==r?n=0:n+=columns[r].width}function setSortColumn(e,t){setSortColumns([{columnId:e,sortAsc:t}])}function setSortColumns(e){sortColumns=e;var t=options.numberedMultiColumnSort&&sortColumns.length>1,n=$headers.children();n.removeClass("slick-header-column-sorted").find(".slick-sort-indicator").removeClass("slick-sort-indicator-asc slick-sort-indicator-desc"),n.find(".slick-sort-indicator-numbered").text(""),$.each(sortColumns,(function(e,r){null==r.sortAsc&&(r.sortAsc=!0);var i=getColumnIndex(r.columnId);null!=i&&(n.eq(i).addClass("slick-header-column-sorted").find(".slick-sort-indicator").addClass(r.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),t&&n.eq(i).find(".slick-sort-indicator-numbered").text(e+1))}))}function getSortColumns(){return sortColumns}function handleSelectedRangesChanged(e,t){var n=selectedRows.slice(0);selectedRows=[];for(var r={},i=0;i<t.length;i++)for(var o=t[i].fromRow;o<=t[i].toRow;o++){r[o]||(selectedRows.push(o),r[o]={});for(var a=t[i].fromCell;a<=t[i].toCell;a++)canCellBeSelected(o,a)&&(r[o][columns[a].id]=options.selectedCellCssClass)}setCellCssStyles(options.selectedCellCssClass,r),simpleArrayEquals(n,selectedRows)||trigger(self.onSelectedRowsChanged,{rows:getSelectedRows(),previousSelectedRows:n},e)}function simpleArrayEquals(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!0;const n=new Set(e),r=new Set(t);if(n.size!=r.size)return!1;for(const e of n)if(!r.has(e))return!1;return!0}function getColumns(){return columns}function updateColumnCaches(){columnPosLeft=[],columnPosRight=[];for(var e=0,t=0,n=columns.length;t<n;t++)columnPosLeft[t]=e,columnPosRight[t]=e+columns[t].width,options.frozenColumn==t?e=0:e+=columns[t].width}function updateColumnProps(){columnsById={};for(var e=0;e<columns.length;e++){columns[e].width&&(columns[e].widthRequest=columns[e].width);var t=columns[e]=$.extend({},columnDefaults,columns[e]);t.autoSize=$.extend({},columnAutosizeDefaults,t.autoSize),columnsById[t.id]=e,t.minWidth&&t.width<t.minWidth&&(t.width=t.minWidth),t.maxWidth&&t.width>t.maxWidth&&(t.width=t.maxWidth),t.resizable}}function setColumns(e){trigger(self.onBeforeSetColumns,{previousColumns:columns,newColumns:e,grid:self});var t=new Slick.TreeColumns(e);columns=t.hasDepth()?(treeColumns=t).extractColumns():e,updateColumnProps(),updateColumnCaches(),initialized&&(setPaneVisibility(),setOverflow(),invalidateAllRows(),createColumnHeaders(),createColumnGroupHeaders(),createColumnFooter(),removeCssRules(),createCssRules(),resizeCanvas(),updateCanvasWidth(),applyColumnHeaderWidths(),applyColumnWidths(),handleScroll())}function getOptions(){return options}function setOptions(e,t,n,r){if(getEditorLock().commitCurrentEdit()){makeActiveCellNormal(),void 0!==e.showColumnHeader&&setColumnHeaderVisibility(e.showColumnHeader),options.enableAddRow!==e.enableAddRow&&invalidateRow(getDataLength());var i=$.extend(!0,{},options);if(options=$.extend(options,e),trigger(self.onSetOptions,{optionsBefore:i,optionsAfter:options}),validateAndEnforceOptions(),$viewport.css("overflow-y",options.autoHeight?"hidden":"auto"),t||render(),setFrozenOptions(),setScroller(),r||setOverflow(),n||setColumns(treeColumns.extractColumns()),options.enableMouseWheelScrollHandler&&$viewport&&jQuery.fn.mousewheel){var o=$._data($viewport[0],"events");o&&o.mousewheel||$viewport.on("mousewheel",handleMouseWheel)}else!1===options.enableMouseWheelScrollHandler&&$viewport.off("mousewheel")}}function validateAndEnforceOptions(){options.autoHeight&&(options.leaveSpaceForNewRows=!1),options.forceFitColumns&&(options.autosizeColsMode=Slick.GridAutosizeColsMode.LegacyForceFit,console.log("forceFitColumns option is deprecated - use autosizeColsMode"))}function setData(e,t){data=e,invalidateAllRows(),updateRowCount(),t&&scrollTo(0)}function getData(){return data}function getDataLength(){return data.getLength?data.getLength():data&&data.length||0}function getDataLengthIncludingAddNew(){return getDataLength()+(!options.enableAddRow||pagingActive&&!pagingIsLastPage?0:1)}function getDataItem(e){return data.getItem?data.getItem(e):data[e]}function getTopPanel(){return $topPanel[0]}function setTopPanelVisibility(e,t){var n=!1!==t;options.showTopPanel!=e&&(options.showTopPanel=e,e?n?$topPanelScroller.slideDown("fast",resizeCanvas):($topPanelScroller.show(),resizeCanvas()):n?$topPanelScroller.slideUp("fast",resizeCanvas):($topPanelScroller.hide(),resizeCanvas()))}function setHeaderRowVisibility(e,t){var n=!1!==t;options.showHeaderRow!=e&&(options.showHeaderRow=e,e?n?$headerRowScroller.slideDown("fast",resizeCanvas):($headerRowScroller.show(),resizeCanvas()):n?$headerRowScroller.slideUp("fast",resizeCanvas):($headerRowScroller.hide(),resizeCanvas()))}function setColumnHeaderVisibility(e,t){options.showColumnHeader!=e&&(options.showColumnHeader=e,e?t?$headerScroller.slideDown("fast",resizeCanvas):($headerScroller.show(),resizeCanvas()):t?$headerScroller.slideUp("fast",resizeCanvas):($headerScroller.hide(),resizeCanvas()))}function setFooterRowVisibility(e,t){var n=!1!==t;options.showFooterRow!=e&&(options.showFooterRow=e,e?n?$footerRowScroller.slideDown("fast",resizeCanvas):($footerRowScroller.show(),resizeCanvas()):n?$footerRowScroller.slideUp("fast",resizeCanvas):($footerRowScroller.hide(),resizeCanvas()))}function setPreHeaderPanelVisibility(e,t){var n=!1!==t;options.showPreHeaderPanel!=e&&(options.showPreHeaderPanel=e,e?n?($preHeaderPanelScroller.slideDown("fast",resizeCanvas),$preHeaderPanelScrollerR.slideDown("fast",resizeCanvas)):($preHeaderPanelScroller.show(),$preHeaderPanelScrollerR.show(),resizeCanvas()):n?($preHeaderPanelScroller.slideUp("fast",resizeCanvas),$preHeaderPanelScrollerR.slideUp("fast",resizeCanvas)):($preHeaderPanelScroller.hide(),$preHeaderPanelScrollerR.hide(),resizeCanvas()))}function getContainerNode(){return $container.get(0)}function getRowTop(e){return options.rowHeight*e-offset}function getRowFromPosition(e){return Math.floor((e+offset)/options.rowHeight)}function scrollTo(e){e=Math.max(e,0),e=Math.min(e,th-$viewportScrollContainerY.height()+(viewportHasHScroll||hasFrozenColumns()?scrollbarDimensions.height:0));var t=offset;page=Math.min(n-1,Math.floor(e/ph));var r=e-(offset=Math.round(page*cj));offset!=t&&(cleanupRows(getVisibleRange(r)),updateRowPositions()),prevScrollTop!=r&&(vScrollDir=prevScrollTop+t<r+offset?1:-1,lastRenderedScrollTop=scrollTop=prevScrollTop=r,hasFrozenColumns()&&($viewportTopL[0].scrollTop=r),hasFrozenRows&&($viewportBottomL[0].scrollTop=$viewportBottomR[0].scrollTop=r),$viewportScrollContainerY[0].scrollTop=r,trigger(self.onViewportChanged,{}))}function defaultFormatter(e,t,n,r,i,o){return null==n?"":(n+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function getFormatter(e,t){var n=data.getItemMetadata&&data.getItemMetadata(e),r=n&&n.columns&&(n.columns[t.id]||n.columns[getColumnIndex(t.id)]);return r&&r.formatter||n&&n.formatter||t.formatter||options.formatterFactory&&options.formatterFactory.getFormatter(t)||options.defaultFormatter}function getEditor(e,t){var n=columns[t],r=data.getItemMetadata&&data.getItemMetadata(e),i=r&&r.columns;return i&&i[n.id]&&void 0!==i[n.id].editor?i[n.id].editor:i&&i[t]&&void 0!==i[t].editor?i[t].editor:n.editor||options.editorFactory&&options.editorFactory.getEditor(n)}function getDataItemValueForColumn(e,t){return options.dataItemColumnValueExtractor?options.dataItemColumnValueExtractor(e,t):e[t.field]}function appendRowHtml(e,t,n,r,i){var o=getDataItem(n),a=n<i&&!o,s="slick-row"+(hasFrozenRows&&n<=options.frozenRow?" frozen":"")+(a?" loading":"")+(n===activeRow&&options.showCellSelection?" active":"")+(n%2==1?" odd":" even");o||(s+=" "+options.addNewRowCssClass);var l=data.getItemMetadata&&data.getItemMetadata(n);l&&l.cssClasses&&(s+=" "+l.cssClasses);var c,u,h=getFrozenRowOffset(n),d="<div class='ui-widget-content "+s+"' style='top:"+(getRowTop(n)-h)+"px'>";e.push(d),hasFrozenColumns()&&t.push(d);for(var f=0,p=columns.length;f<p;f++){if(u=columns[f],c=1,l&&l.columns){var g=l.columns[u.id]||l.columns[f];"*"===(c=g&&g.colspan||1)&&(c=p-f)}if(columnPosRight[Math.min(p-1,f+c-1)]>r.leftPx){if(!u.alwaysRenderColumn&&columnPosLeft[f]>r.rightPx)break;hasFrozenColumns()&&f>options.frozenColumn?appendCellHtml(t,n,f,c,o):appendCellHtml(e,n,f,c,o)}else(u.alwaysRenderColumn||hasFrozenColumns()&&f<=options.frozenColumn)&&appendCellHtml(e,n,f,c,o);c>1&&(f+=c-1)}e.push("</div>"),hasFrozenColumns()&&t.push("</div>")}function appendCellHtml(e,t,n,r,i){var o=columns[n],a="slick-cell l"+n+" r"+Math.min(columns.length-1,n+r-1)+(o.cssClass?" "+o.cssClass:"");for(var s in hasFrozenColumns()&&n<=options.frozenColumn&&(a+=" frozen"),t===activeRow&&n===activeCell&&options.showCellSelection&&(a+=" active"),cellCssClasses)cellCssClasses[s][t]&&cellCssClasses[s][t][o.id]&&(a+=" "+cellCssClasses[s][t][o.id]);var l=null,c="";i&&(l=getDataItemValueForColumn(i,o),null==(c=getFormatter(t,o)(t,n,l,o,i,self))&&(c=""));var u=trigger(self.onBeforeAppendCell,{row:t,cell:n,value:l,dataContext:i})||"";u+=c&&c.addClasses?(u?" ":"")+c.addClasses:"";var h=c&&c.toolTip?"title='"+c.toolTip+"'":"",d="";if(o.hasOwnProperty("cellAttrs")&&o.cellAttrs instanceof Object)for(var s in o.cellAttrs)o.cellAttrs.hasOwnProperty(s)&&(d+=" "+s+'="'+o.cellAttrs[s]+'" ');e.push("<div class='"+a+(u?" "+u:"")+"' "+h+d+">"),i&&e.push("[object Object]"!==Object.prototype.toString.call(c)?c:c.text),e.push("</div>"),rowsCache[t].cellRenderQueue.push(n),rowsCache[t].cellColSpans[n]=r}function cleanupRows(e){for(var t in rowsCache){var n=!0;hasFrozenRows&&(options.frozenBottom&&t>=actualFrozenRow||!options.frozenBottom&&t<=actualFrozenRow)&&(n=!1),(t=parseInt(t,10))!==activeRow&&(t<e.top||t>e.bottom)&&n&&removeRowFromCache(t)}options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}function invalidate(){updateRowCount(),invalidateAllRows(),render()}function invalidateAllRows(){for(var e in currentEditor&&makeActiveCellNormal(),rowsCache)removeRowFromCache(e);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}function queuePostProcessedRowForCleanup(e,t,n){for(var r in postProcessgroupId++,t)t.hasOwnProperty(r)&&postProcessedCleanupQueue.push({actionType:"C",groupId:postProcessgroupId,node:e.cellNodesByColumnIdx[0|r],columnIdx:0|r,rowIdx:n});postProcessedCleanupQueue.push({actionType:"R",groupId:postProcessgroupId,node:e.rowNode}),e.rowNode.detach()}function queuePostProcessedCellForCleanup(e,t,n){postProcessedCleanupQueue.push({actionType:"C",groupId:postProcessgroupId,node:e,columnIdx:t,rowIdx:n}),$(e).detach()}function removeRowFromCache(e){var t=rowsCache[e];t&&(options.enableAsyncPostRenderCleanup&&postProcessedRows[e]?queuePostProcessedRowForCleanup(t,postProcessedRows[e],e):t.rowNode.each((function(){this.parentElement.removeChild(this)})),delete rowsCache[e],delete postProcessedRows[e],renderedRows--,counter_rows_removed++)}function invalidateRows(e){var t,n;if(e&&e.length){for(vScrollDir=0,n=e.length,t=0;t<n;t++)currentEditor&&activeRow===e[t]&&makeActiveCellNormal(),rowsCache[e[t]]&&removeRowFromCache(e[t]);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup()}}function invalidateRow(e){(e||0===e)&&invalidateRows([e])}function applyFormatResultToCellNode(e,t,n){null==e&&(e=""),"[object Object]"===Object.prototype.toString.call(e)?(t.innerHTML=e.text,e.removeClasses&&!n&&$(t).removeClass(e.removeClasses),e.addClasses&&$(t).addClass(e.addClasses),e.toolTip&&$(t).attr("title",e.toolTip)):t.innerHTML=e}function updateCell(e,t){var n=getCellNode(e,t);if(n){var r=columns[t],i=getDataItem(e);currentEditor&&activeRow===e&&activeCell===t?currentEditor.loadValue(i):(applyFormatResultToCellNode(i?getFormatter(e,r)(e,t,getDataItemValueForColumn(i,r),r,i,self):"",n),invalidatePostProcessingResults(e))}}function updateRow(e){var t=rowsCache[e];if(t){ensureCellNodesInRowsCache(e);var n=getDataItem(e);for(var r in t.cellNodesByColumnIdx)if(t.cellNodesByColumnIdx.hasOwnProperty(r)){var i=columns[r|=0],o=t.cellNodesByColumnIdx[r][0];e===activeRow&&r===activeCell&&currentEditor?currentEditor.loadValue(n):n?applyFormatResultToCellNode(getFormatter(e,i)(e,r,getDataItemValueForColumn(n,i),i,n,self),o):o.innerHTML=""}invalidatePostProcessingResults(e)}}function getViewportHeight(){if(options.autoHeight&&-1==options.frozenColumn||(topPanelH=options.showTopPanel?options.topPanelHeight+getVBoxDelta($topPanelScroller):0,headerRowH=options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0,footerRowH=options.showFooterRow?options.footerRowHeight+getVBoxDelta($footerRowScroller):0),options.autoHeight){var e=$paneHeaderL.outerHeight();e+=options.showHeaderRow?options.headerRowHeight+getVBoxDelta($headerRowScroller):0,e+=options.showFooterRow?options.footerRowHeight+getVBoxDelta($footerRowScroller):0,e+=getCanvasWidth()>viewportW?scrollbarDimensions.height:0,viewportH=options.rowHeight*getDataLengthIncludingAddNew()+(-1==options.frozenColumn?e:0)}else{var t=options.showColumnHeader?parseFloat($.css($headerScroller[0],"height"))+getVBoxDelta($headerScroller):0,n=options.createPreHeaderPanel&&options.showPreHeaderPanel?options.preHeaderPanelHeight+getVBoxDelta($preHeaderPanelScroller):0;viewportH=parseFloat($.css($container[0],"height",!0))-parseFloat($.css($container[0],"paddingTop",!0))-parseFloat($.css($container[0],"paddingBottom",!0))-t-topPanelH-headerRowH-footerRowH-n}return numVisibleRows=Math.ceil(viewportH/options.rowHeight),viewportH}function getViewportWidth(){viewportW=parseFloat($container.width())}function resizeCanvas(){if(initialized){paneTopH=0,paneBottomH=0,viewportTopH=0,viewportBottomH=0,getViewportWidth(),getViewportHeight(),hasFrozenRows?options.frozenBottom?(paneTopH=viewportH-frozenRowsHeight-scrollbarDimensions.height,paneBottomH=frozenRowsHeight+scrollbarDimensions.height):(paneTopH=frozenRowsHeight,paneBottomH=viewportH-frozenRowsHeight):paneTopH=viewportH,paneTopH+=topPanelH+headerRowH+footerRowH,hasFrozenColumns()&&options.autoHeight&&(paneTopH+=scrollbarDimensions.height),viewportTopH=paneTopH-topPanelH-headerRowH-footerRowH,options.autoHeight&&(hasFrozenColumns()&&$container.height(paneTopH+parseFloat($.css($headerScrollerL[0],"height"))),$paneTopL.css("position","relative")),$paneTopL.css({top:$paneHeaderL.height()||(options.showHeaderRow?options.headerRowHeight:0)+(options.showPreHeaderPanel?options.preHeaderPanelHeight:0),height:paneTopH});var e=$paneTopL.position().top+paneTopH;options.autoHeight||$viewportTopL.height(viewportTopH),hasFrozenColumns()?($paneTopR.css({top:$paneHeaderL.height(),height:paneTopH}),$viewportTopR.height(viewportTopH),hasFrozenRows&&($paneBottomL.css({top:e,height:paneBottomH}),$paneBottomR.css({top:e,height:paneBottomH}),$viewportBottomR.height(paneBottomH))):hasFrozenRows&&($paneBottomL.css({width:"100%",height:paneBottomH}),$paneBottomL.css("top",e)),hasFrozenRows?($viewportBottomL.height(paneBottomH),options.frozenBottom?($canvasBottomL.height(frozenRowsHeight),hasFrozenColumns()&&$canvasBottomR.height(frozenRowsHeight)):($canvasTopL.height(frozenRowsHeight),hasFrozenColumns()&&$canvasTopR.height(frozenRowsHeight))):$viewportTopR.height(viewportTopH),scrollbarDimensions&&scrollbarDimensions.width||(scrollbarDimensions=measureScrollbar()),options.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&autosizeColumns(),updateRowCount(),handleScroll(),lastRenderedScrollLeft=-1,render()}}function updatePagingStatusFromView(e){pagingActive=0!==e.pageSize,pagingIsLastPage=e.pageNum==e.totalPages-1}function updateRowCount(){if(initialized){var e=getDataLength(),t=getDataLengthIncludingAddNew(),r=0,i=hasFrozenRows&&!options.frozenBottom?$canvasBottomL.height():$canvasTopL.height();r=hasFrozenRows?getDataLength()-options.frozenRow:t+(options.leaveSpaceForNewRows?numVisibleRows-1:0);var o=$viewportScrollContainerY.height(),a=viewportHasVScroll;viewportHasVScroll=options.alwaysShowVerticalScroll||!options.autoHeight&&r*options.rowHeight>o,makeActiveCellNormal();var s=e-1;for(var l in rowsCache)l>s&&removeRowFromCache(l);options.enableAsyncPostRenderCleanup&&startPostProcessingCleanup(),activeCellNode&&activeRow>s&&resetActiveCell(),i=h,options.autoHeight?h=options.rowHeight*r:(th=Math.max(options.rowHeight*r,o-scrollbarDimensions.height))<maxSupportedCssHeight?(h=ph=th,n=1,cj=0):(ph=(h=maxSupportedCssHeight)/100,n=Math.floor(th/ph),cj=(th-h)/(n-1)),h!==i&&(hasFrozenRows&&!options.frozenBottom?($canvasBottomL.css("height",h),hasFrozenColumns()&&$canvasBottomR.css("height",h)):($canvasTopL.css("height",h),$canvasTopR.css("height",h)),scrollTop=$viewportScrollContainerY[0].scrollTop);var c=scrollTop+offset<=th-o;0==th||0==scrollTop?page=offset=0:scrollTo(c?scrollTop+offset:th-o),h!=i&&options.autoHeight&&resizeCanvas(),options.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&a!=viewportHasVScroll&&autosizeColumns(),updateCanvasWidth(!1)}}function getVisibleRange(e,t){return null==e&&(e=scrollTop),null==t&&(t=scrollLeft),{top:getRowFromPosition(e),bottom:getRowFromPosition(e+viewportH)+1,leftPx:t,rightPx:t+viewportW}}function getRenderedRange(e,t){var n=getVisibleRange(e,t),r=Math.round(viewportH/options.rowHeight),i=options.minRowBuffer;return-1==vScrollDir?(n.top-=r,n.bottom+=i):1==vScrollDir?(n.top-=i,n.bottom+=r):(n.top-=i,n.bottom+=i),n.top=Math.max(0,n.top),n.bottom=Math.min(getDataLengthIncludingAddNew()-1,n.bottom),n.leftPx-=viewportW,n.rightPx+=viewportW,n.leftPx=Math.max(0,n.leftPx),n.rightPx=Math.min(canvasWidth,n.rightPx),n}function ensureCellNodesInRowsCache(e){var t=rowsCache[e];if(t&&t.cellRenderQueue.length)for(var n=t.rowNode.children().last();t.cellRenderQueue.length;){var r=t.cellRenderQueue.pop();t.cellNodesByColumnIdx[r]=n,0===(n=n.prev()).length&&(n=$(t.rowNode[0]).children().last())}}function cleanUpCells(e,t){if(!hasFrozenRows||!(options.frozenBottom&&t>actualFrozenRow||t<=actualFrozenRow)){var n,r,i=rowsCache[t],o=[];for(var a in i.cellNodesByColumnIdx)if(i.cellNodesByColumnIdx.hasOwnProperty(a)&&!((a|=0)<=options.frozenColumn||Array.isArray(columns)&&columns[a]&&columns[a].alwaysRenderColumn)){var s=i.cellColSpans[a];(columnPosLeft[a]>e.rightPx||columnPosRight[Math.min(columns.length-1,a+s-1)]<e.leftPx)&&(t==activeRow&&a==activeCell||o.push(a))}for(;null!=(n=o.pop());)r=i.cellNodesByColumnIdx[n][0],options.enableAsyncPostRenderCleanup&&postProcessedRows[t]&&postProcessedRows[t][n]?queuePostProcessedCellForCleanup(r,n,t):r.parentElement.removeChild(r),delete i.cellColSpans[n],delete i.cellNodesByColumnIdx[n],postProcessedRows[t]&&delete postProcessedRows[t][n]}}function cleanUpAndRenderCells(e){for(var t,n,r,i=[],o=[],a=e.top,s=e.bottom;a<=s;a++)if(t=rowsCache[a]){ensureCellNodesInRowsCache(a),cleanUpCells(e,a),n=0;var l=data.getItemMetadata&&data.getItemMetadata(a);l=l&&l.columns;for(var c=getDataItem(a),u=0,h=columns.length;u<h&&!(columnPosLeft[u]>e.rightPx);u++)if(null==(r=t.cellColSpans[u])){if(r=1,l){var d=l[columns[u].id]||l[u];"*"===(r=d&&d.colspan||1)&&(r=h-u)}columnPosRight[Math.min(h-1,u+r-1)]>e.leftPx&&(appendCellHtml(i,a,u,r,c),n++),u+=r>1?r-1:0}else u+=r>1?r-1:0;n&&o.push(a)}if(i.length){var f,p,g=document.createElement("div");for(g.innerHTML=i.join("");null!=(f=o.pop());){var m;for(t=rowsCache[f];null!=(m=t.cellRenderQueue.pop());)p=g.lastChild,hasFrozenColumns()&&m>options.frozenColumn?t.rowNode[1].appendChild(p):t.rowNode[0].appendChild(p),t.cellNodesByColumnIdx[m]=$(p)}}}function renderRows(e){for(var t=[],n=[],r=[],i=!1,o=getDataLength(),a=e.top,s=e.bottom;a<=s;a++)rowsCache[a]||hasFrozenRows&&options.frozenBottom&&a==getDataLength()||(renderedRows++,r.push(a),rowsCache[a]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},appendRowHtml(t,n,a,e,o),activeCellNode&&activeRow===a&&(i=!0),counter_rows_rendered++);if(r.length){var l=document.createElement("div"),c=document.createElement("div");for(l.innerHTML=t.join(""),c.innerHTML=n.join(""),a=0,s=r.length;a<s;a++)hasFrozenRows&&r[a]>=actualFrozenRow?hasFrozenColumns()?(rowsCache[r[a]].rowNode=$().add($(l.firstChild)).add($(c.firstChild)),$canvasBottomL[0].append(l.firstChild),$canvasBottomR[0].append(c.firstChild)):(rowsCache[r[a]].rowNode=$().add($(l.firstChild)),$canvasBottomL[0].append($(l.firstChild))):hasFrozenColumns()?(rowsCache[r[a]].rowNode=$().add($(l.firstChild)).add($(c.firstChild)),$canvasTopL[0].append(l.firstChild),$canvasTopR[0].append(c.firstChild)):(rowsCache[r[a]].rowNode=$().add($(l.firstChild)),$canvasTopL[0].append(l.firstChild));i&&(activeCellNode=getCellNode(activeRow,activeCell))}}function startPostProcessing(){options.enableAsyncPostRender&&(clearTimeout(h_postrender),h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}function startPostProcessingCleanup(){options.enableAsyncPostRenderCleanup&&(clearTimeout(h_postrenderCleanup),h_postrenderCleanup=setTimeout(asyncPostProcessCleanupRows,options.asyncPostRenderCleanupDelay))}function invalidatePostProcessingResults(e){for(var t in postProcessedRows[e])postProcessedRows[e].hasOwnProperty(t)&&(postProcessedRows[e][t]="C");postProcessFromRow=Math.min(postProcessFromRow,e),postProcessToRow=Math.max(postProcessToRow,e),startPostProcessing()}function updateRowPositions(){for(var e in rowsCache){var t=e?parseInt(e):0;rowsCache[t].rowNode[0].style.top=getRowTop(t)+"px"}}function render(){if(initialized){scrollThrottle.dequeue();var e=getVisibleRange(),t=getRenderedRange();if(cleanupRows(t),lastRenderedScrollLeft!=scrollLeft){if(hasFrozenRows){var n=$.extend(!0,{},t);options.frozenBottom?(n.top=actualFrozenRow,n.bottom=getDataLength()):(n.top=0,n.bottom=options.frozenRow),cleanUpAndRenderCells(n)}cleanUpAndRenderCells(t)}renderRows(t),hasFrozenRows&&(options.frozenBottom?renderRows({top:actualFrozenRow,bottom:getDataLength()-1,leftPx:t.leftPx,rightPx:t.rightPx}):renderRows({top:0,bottom:options.frozenRow-1,leftPx:t.leftPx,rightPx:t.rightPx})),postProcessFromRow=e.top,postProcessToRow=Math.min(getDataLengthIncludingAddNew()-1,e.bottom),startPostProcessing(),lastRenderedScrollTop=scrollTop,lastRenderedScrollLeft=scrollLeft,h_render=null,trigger(self.onRendered,{startRow:e.top,endRow:e.bottom,grid:self})}}function handleHeaderScroll(){handleElementScroll($headerScrollContainer[0])}function handleHeaderRowScroll(){var e=$headerRowScrollContainer[0].scrollLeft;e!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=e)}function handleFooterRowScroll(){var e=$footerRowScrollContainer[0].scrollLeft;e!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=e)}function handlePreHeaderPanelScroll(){handleElementScroll($preHeaderPanelScroller[0])}function handleElementScroll(e){var t=e.scrollLeft;t!=$viewportScrollContainerX[0].scrollLeft&&($viewportScrollContainerX[0].scrollLeft=t)}function handleScroll(){return scrollTop=$viewportScrollContainerY[0].scrollTop,scrollLeft=$viewportScrollContainerX[0].scrollLeft,_handleScroll(!1)}function _handleScroll(e){var t=$viewportScrollContainerY[0].scrollHeight-$viewportScrollContainerY[0].clientHeight,r=$viewportScrollContainerY[0].scrollWidth-$viewportScrollContainerY[0].clientWidth;t=Math.max(0,t),r=Math.max(0,r),scrollTop>t&&(scrollTop=t),scrollLeft>r&&(scrollLeft=r);var i=Math.abs(scrollTop-prevScrollTop),o=Math.abs(scrollLeft-prevScrollLeft);if(o&&(prevScrollLeft=scrollLeft,$viewportScrollContainerX[0].scrollLeft=scrollLeft,$headerScrollContainer[0].scrollLeft=scrollLeft,$topPanelScroller[0].scrollLeft=scrollLeft,$headerRowScrollContainer[0].scrollLeft=scrollLeft,options.createFooterRow&&($footerRowScrollContainer[0].scrollLeft=scrollLeft),options.createPreHeaderPanel&&(hasFrozenColumns()?$preHeaderPanelScrollerR[0].scrollLeft=scrollLeft:$preHeaderPanelScroller[0].scrollLeft=scrollLeft),hasFrozenColumns()?hasFrozenRows&&($viewportTopR[0].scrollLeft=scrollLeft):hasFrozenRows&&($viewportTopL[0].scrollLeft=scrollLeft)),i)if(vScrollDir=prevScrollTop<scrollTop?1:-1,prevScrollTop=scrollTop,e&&($viewportScrollContainerY[0].scrollTop=scrollTop),hasFrozenColumns()&&(hasFrozenRows&&!options.frozenBottom?$viewportBottomL[0].scrollTop=scrollTop:$viewportTopL[0].scrollTop=scrollTop),i<viewportH)scrollTo(scrollTop+offset);else{var a=offset;page=h==viewportH?0:Math.min(n-1,Math.floor(scrollTop*((th-viewportH)/(h-viewportH))*(1/ph))),a!=(offset=Math.round(page*cj))&&invalidateAllRows()}if(o||i){var s=Math.abs(lastRenderedScrollLeft-scrollLeft),l=Math.abs(lastRenderedScrollTop-scrollTop);(s>20||l>20)&&(options.forceSyncScrolling||l<viewportH&&s<viewportW?render():scrollThrottle.enqueue(),trigger(self.onViewportChanged,{}))}return trigger(self.onScroll,{scrollLeft,scrollTop}),!(!o&&!i)}function ActionThrottle(e,t){var n=!1,r=!1;function i(){r=!1}function o(){n=!0,setTimeout(a,t),e()}function a(){r?(i(),o()):n=!1}return{enqueue:function(){n?r=!0:o()},dequeue:i}}function asyncPostProcessRows(){for(var e=getDataLength();postProcessFromRow<=postProcessToRow;){var t=vScrollDir>=0?postProcessFromRow++:postProcessToRow--,n=rowsCache[t];if(n&&!(t>=e)){for(var r in postProcessedRows[t]||(postProcessedRows[t]={}),ensureCellNodesInRowsCache(t),n.cellNodesByColumnIdx)if(n.cellNodesByColumnIdx.hasOwnProperty(r)){var i=columns[r|=0],o=postProcessedRows[t][r];if(i.asyncPostRender&&"R"!==o){var a=n.cellNodesByColumnIdx[r];a&&i.asyncPostRender(a,t,getDataItem(t),i,"C"===o),postProcessedRows[t][r]="R"}}return void(h_postrender=setTimeout(asyncPostProcessRows,options.asyncPostRenderDelay))}}}function asyncPostProcessCleanupRows(){if(postProcessedCleanupQueue.length>0){for(var e=postProcessedCleanupQueue[0].groupId;postProcessedCleanupQueue.length>0&&postProcessedCleanupQueue[0].groupId==e;){var t=postProcessedCleanupQueue.shift();if("R"==t.actionType&&$(t.node).remove(),"C"==t.actionType){var n=columns[t.columnIdx];n.asyncPostRenderCleanup&&t.node&&n.asyncPostRenderCleanup(t.node,t.rowIdx,n)}}h_postrenderCleanup=setTimeout(asyncPostProcessCleanupRows,options.asyncPostRenderCleanupDelay)}}function updateCellCssStylesOnRenderedRows(e,t){var n,r,i,o;for(var a in rowsCache){if(o=t&&t[a],i=e&&e[a],o)for(r in o)i&&o[r]==i[r]||(n=getCellNode(a,getColumnIndex(r)))&&$(n).removeClass(o[r]);if(i)for(r in i)o&&o[r]==i[r]||(n=getCellNode(a,getColumnIndex(r)))&&$(n).addClass(i[r])}}function addCellCssStyles(e,t){if(cellCssClasses[e])throw new Error("SlickGrid addCellCssStyles: cell CSS hash with key '"+e+"' already exists.");cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,null),trigger(self.onCellCssStylesChanged,{key:e,hash:t,grid:self})}function removeCellCssStyles(e){cellCssClasses[e]&&(updateCellCssStylesOnRenderedRows(null,cellCssClasses[e]),delete cellCssClasses[e],trigger(self.onCellCssStylesChanged,{key:e,hash:null,grid:self}))}function setCellCssStyles(e,t){var n=cellCssClasses[e];cellCssClasses[e]=t,updateCellCssStylesOnRenderedRows(t,n),trigger(self.onCellCssStylesChanged,{key:e,hash:t,grid:self})}function getCellCssStyles(e){return cellCssClasses[e]}function flashCell(e,t,n){n=n||100,rowsCache[e]&&function e(t,r){r&&setTimeout((function(){t.queue((function(){t.toggleClass(options.cellFlashingCssClass).dequeue(),e(t,r-1)}))}),n)}($(getCellNode(e,t)),4)}function handleMouseWheel(e,t,n,r){scrollTop=Math.max(0,$viewportScrollContainerY[0].scrollTop-r*options.rowHeight),scrollLeft=$viewportScrollContainerX[0].scrollLeft+10*n,_handleScroll(!0)&&e.preventDefault()}function handleDragInit(e,t){var n=getCellFromEvent(e);if(!n||!cellExists(n.row,n.cell))return!1;var r=trigger(self.onDragInit,t,e);return!!e.isImmediatePropagationStopped()&&r}function handleDragStart(e,t){var n=getCellFromEvent(e);if(!n||!cellExists(n.row,n.cell))return!1;var r=trigger(self.onDragStart,t,e);return!!e.isImmediatePropagationStopped()&&r}function handleDrag(e,t){return trigger(self.onDrag,t,e)}function handleDragEnd(e,t){trigger(self.onDragEnd,t,e)}function handleKeyDown(e){trigger(self.onKeyDown,{row:activeRow,cell:activeCell},e);var t=e.isImmediatePropagationStopped(),n=Slick.keyCode;if(!t&&!e.shiftKey&&!e.altKey){if(options.editable&&currentEditor&&currentEditor.keyCaptureList&&currentEditor.keyCaptureList.indexOf(e.which)>-1)return;e.which==n.HOME?t=e.ctrlKey?navigateTop():navigateRowStart():e.which==n.END&&(t=e.ctrlKey?navigateBottom():navigateRowEnd())}if(!t)if(e.shiftKey||e.altKey||e.ctrlKey)e.which!=n.TAB||!e.shiftKey||e.ctrlKey||e.altKey||(t=navigatePrev());else{if(options.editable&&currentEditor&&currentEditor.keyCaptureList&&currentEditor.keyCaptureList.indexOf(e.which)>-1)return;if(e.which==n.ESCAPE){if(!getEditorLock().isActive())return;cancelEditAndSetFocus()}else e.which==n.PAGE_DOWN?(navigatePageDown(),t=!0):e.which==n.PAGE_UP?(navigatePageUp(),t=!0):e.which==n.LEFT?t=navigateLeft():e.which==n.RIGHT?t=navigateRight():e.which==n.UP?t=navigateUp():e.which==n.DOWN?t=navigateDown():e.which==n.TAB?t=navigateNext():e.which==n.ENTER&&(options.editable&&(currentEditor?activeRow===getDataLength()?navigateDown():commitEditAndSetFocus():getEditorLock().commitCurrentEdit()&&makeActiveCellEditable(void 0,void 0,e)),t=!0)}if(t){e.stopPropagation(),e.preventDefault();try{e.originalEvent.keyCode=0}catch(e){}}}function handleClick(e){if(!currentEditor&&(e.target!=document.activeElement||$(e.target).hasClass("slick-cell"))){var t=getTextSelection();setFocus(),setTextSelection(t)}var n=getCellFromEvent(e);if(n&&(null===currentEditor||activeRow!=n.row||activeCell!=n.cell)&&(trigger(self.onClick,{row:n.row,cell:n.cell},e),!e.isImmediatePropagationStopped()&&canCellBeActive(n.row,n.cell)&&(!getEditorLock().isActive()||getEditorLock().commitCurrentEdit()))){scrollRowIntoView(n.row,!1);var r=e.target&&e.target.className===Slick.preClickClassName,i=columns[n.cell],o=!!(options.editable&&i&&i.editor&&options.suppressActiveCellChangeOnEdit);setActiveCellInternal(getCellNode(n.row,n.cell),null,r,o,e)}}function handleContextMenu(e){var t=$(e.target).closest(".slick-cell",$canvas);0!==t.length&&(activeCellNode===t[0]&&null!==currentEditor||trigger(self.onContextMenu,{},e))}function handleDblClick(e){var t=getCellFromEvent(e);!t||null!==currentEditor&&activeRow==t.row&&activeCell==t.cell||(trigger(self.onDblClick,{row:t.row,cell:t.cell},e),e.isImmediatePropagationStopped()||options.editable&&gotoCell(t.row,t.cell,!0,e))}function handleHeaderMouseEnter(e){trigger(self.onHeaderMouseEnter,{column:$(this).data("column"),grid:self},e)}function handleHeaderMouseLeave(e){trigger(self.onHeaderMouseLeave,{column:$(this).data("column"),grid:self},e)}function handleHeaderContextMenu(e){var t=$(e.target).closest(".slick-header-column",".slick-header-columns"),n=t&&t.data("column");trigger(self.onHeaderContextMenu,{column:n},e)}function handleHeaderClick(e){if(!columnResizeDragging){var t=$(e.target).closest(".slick-header-column",".slick-header-columns"),n=t&&t.data("column");n&&trigger(self.onHeaderClick,{column:n},e)}}function handleFooterContextMenu(e){var t=$(e.target).closest(".slick-footerrow-column",".slick-footerrow-columns"),n=t&&t.data("column");trigger(self.onFooterContextMenu,{column:n},e)}function handleFooterClick(e){var t=$(e.target).closest(".slick-footerrow-column",".slick-footerrow-columns"),n=t&&t.data("column");trigger(self.onFooterClick,{column:n},e)}function handleMouseEnter(e){trigger(self.onMouseEnter,{},e)}function handleMouseLeave(e){trigger(self.onMouseLeave,{},e)}function cellExists(e,t){return!(e<0||e>=getDataLength()||t<0||t>=columns.length)}function getCellFromPoint(e,t){for(var n=getRowFromPosition(t),r=0,i=0,o=0;o<columns.length&&i<e;o++)i+=columns[o].width,r++;return r<0&&(r=0),{row:n,cell:r-1}}function getCellFromNode(e){var t=/l\d+/.exec(e.className);if(!t)throw new Error("SlickGrid getCellFromNode: cannot get cell - "+e.className);return parseInt(t[0].substr(1,t[0].length-1),10)}function getRowFromNode(e){for(var t in rowsCache)for(var n in rowsCache[t].rowNode)if(rowsCache[t].rowNode[n]===e)return t?parseInt(t):0;return null}function getFrozenRowOffset(e){return hasFrozenRows?options.frozenBottom?e>=actualFrozenRow?h<viewportTopH?actualFrozenRow*options.rowHeight:h:0:e>=actualFrozenRow?frozenRowsHeight:0:0}function getCellFromEvent(e){var t,n,r=$(e.target).closest(".slick-cell",$canvas);if(!r.length)return null;if(t=getRowFromNode(r[0].parentNode),hasFrozenRows){var i=r.parents(".grid-canvas").offset(),o=0;r.parents(".grid-canvas-bottom").length&&(o=options.frozenBottom?$canvasTopL.height():frozenRowsHeight),t=getCellFromPoint(e.clientX-i.left,e.clientY-i.top+o+$(document).scrollTop()).row}return n=getCellFromNode(r[0]),null==t||null==n?null:{row:t,cell:n}}function getCellNodeBox(e,t){if(!cellExists(e,t))return null;for(var n=getFrozenRowOffset(e),r=getRowTop(e)-n,i=r+options.rowHeight-1,o=0,a=0;a<t;a++)o+=columns[a].width,options.frozenColumn==a&&(o=0);return{top:r,left:o,bottom:i,right:o+columns[t].width}}function resetActiveCell(){setActiveCellInternal(null,!1)}function setFocus(){-1==tabbingDirection?$focusSink[0].focus():$focusSink2[0].focus()}function scrollCellIntoView(e,t,n){if(scrollRowIntoView(e,n),!(t<=options.frozenColumn)){var r=getColspan(e,t);internalScrollColumnIntoView(columnPosLeft[t],columnPosRight[t+(r>1?r-1:0)])}}function internalScrollColumnIntoView(e,t){var n=scrollLeft+$viewportScrollContainerX.width();e<scrollLeft?($viewportScrollContainerX.scrollLeft(e),handleScroll(),render()):t>n&&($viewportScrollContainerX.scrollLeft(Math.min(e,t-$viewportScrollContainerX[0].clientWidth)),handleScroll(),render())}function scrollColumnIntoView(e){internalScrollColumnIntoView(columnPosLeft[e],columnPosRight[e])}function setActiveCellInternal(e,t,n,r,i){if(null!==activeCellNode&&(makeActiveCellNormal(),$(activeCellNode).removeClass("active"),rowsCache[activeRow]&&rowsCache[activeRow].rowNode.removeClass("active")),null!=(activeCellNode=e)){var o=$(activeCellNode),a=o.offset(),s=Math.floor(o.parents(".grid-canvas").offset().top),l=o.parents(".grid-canvas-bottom").length;hasFrozenRows&&l&&(s-=options.frozenBottom?$canvasTopL.height():frozenRowsHeight);var c=getCellFromPoint(a.left,Math.ceil(a.top)-s);activeRow=c.row,activeCell=activePosX=activeCell=activePosX=getCellFromNode(activeCellNode),null==t&&(t=activeRow==getDataLength()||options.autoEdit),options.showCellSelection&&(o.addClass("active"),rowsCache[activeRow]&&rowsCache[activeRow].rowNode.addClass("active")),options.editable&&t&&isCellPotentiallyEditable(activeRow,activeCell)&&(clearTimeout(h_editorLoader),options.asyncEditorLoading?h_editorLoader=setTimeout((function(){makeActiveCellEditable(void 0,n,i)}),options.asyncEditorLoadDelay):makeActiveCellEditable(void 0,n,i))}else activeRow=activeCell=null;r||trigger(self.onActiveCellChanged,getActiveCell())}function clearTextSelection(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}else if(window.getSelection){var e=window.getSelection();e&&e.removeAllRanges&&e.removeAllRanges()}}function isCellPotentiallyEditable(e,t){var n=getDataLength();return!(e<n&&!getDataItem(e)||columns[t].cannotTriggerInsert&&e>=n||!getEditor(e,t))}function makeActiveCellNormal(){if(currentEditor){if(trigger(self.onBeforeCellEditorDestroy,{editor:currentEditor}),currentEditor.destroy(),currentEditor=null,activeCellNode){var e=getDataItem(activeRow);if($(activeCellNode).removeClass("editable invalid"),e){var t=columns[activeCell];applyFormatResultToCellNode(getFormatter(activeRow,t)(activeRow,activeCell,getDataItemValueForColumn(e,t),t,e,self),activeCellNode),invalidatePostProcessingResults(activeRow)}}navigator.userAgent.toLowerCase().match(/msie/)&&clearTextSelection(),getEditorLock().deactivate(editController)}}function makeActiveCellEditable(e,t,n){if(activeCellNode){if(!options.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when options.editable is false");if(clearTimeout(h_editorLoader),isCellPotentiallyEditable(activeRow,activeCell)){var r=columns[activeCell],i=getDataItem(activeRow);if(!1!==trigger(self.onBeforeEditCell,{row:activeRow,cell:activeCell,item:i,column:r,target:"grid"})){getEditorLock().activate(editController),$(activeCellNode).addClass("editable");var o=e||getEditor(activeRow,activeCell);e||o.suppressClearOnEdit||(activeCellNode.innerHTML="");var a=data.getItemMetadata&&data.getItemMetadata(activeRow),s=(a=a&&a.columns)&&(a[r.id]||a[activeCell]);currentEditor=new o({grid:self,gridPosition:absBox($container[0]),position:absBox(activeCellNode),container:activeCellNode,column:r,columnMetaData:s,item:i||{},event:n,commitChanges:commitEditAndSetFocus,cancelChanges:cancelEditAndSetFocus}),i&&(currentEditor.loadValue(i),t&&currentEditor.preClick&&currentEditor.preClick()),serializedEditorValue=currentEditor.serializeValue(),currentEditor.position&&handleActiveCellPositionChange()}else setFocus()}}}function commitEditAndSetFocus(){getEditorLock().commitCurrentEdit()&&(setFocus(),options.autoEdit&&navigateDown())}function cancelEditAndSetFocus(){getEditorLock().cancelCurrentEdit()&&setFocus()}function absBox(e){var t={top:e.offsetTop,left:e.offsetLeft,bottom:0,right:0,width:$(e).outerWidth(),height:$(e).outerHeight(),visible:!0};t.bottom=t.top+t.height,t.right=t.left+t.width;for(var n=e.offsetParent;(e=e.parentNode)!=document.body&&null!=e;)t.visible&&e.scrollHeight!=e.offsetHeight&&"visible"!=$(e).css("overflowY")&&(t.visible=t.bottom>e.scrollTop&&t.top<e.scrollTop+e.clientHeight),t.visible&&e.scrollWidth!=e.offsetWidth&&"visible"!=$(e).css("overflowX")&&(t.visible=t.right>e.scrollLeft&&t.left<e.scrollLeft+e.clientWidth),t.left-=e.scrollLeft,t.top-=e.scrollTop,e===n&&(t.left+=e.offsetLeft,t.top+=e.offsetTop,n=e.offsetParent),t.bottom=t.top+t.height,t.right=t.left+t.width;return t}function getActiveCellPosition(){return absBox(activeCellNode)}function getGridPosition(){return absBox($container[0])}function handleActiveCellPositionChange(){if(activeCellNode&&(trigger(self.onActiveCellPositionChanged,{}),currentEditor)){var e=getActiveCellPosition();currentEditor.show&&currentEditor.hide&&(e.visible?currentEditor.show():currentEditor.hide()),currentEditor.position&&currentEditor.position(e)}}function getCellEditor(){return currentEditor}function getActiveCell(){return activeCellNode?{row:activeRow,cell:activeCell}:null}function getActiveCellNode(){return activeCellNode}function getTextSelection(){var e=null;if(window.getSelection){var t=window.getSelection();t.rangeCount>0&&(e=t.getRangeAt(0))}return e}function setTextSelection(e){if(window.getSelection&&e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}function scrollRowIntoView(e,t){if(!hasFrozenRows||!options.frozenBottom&&e>actualFrozenRow-1||options.frozenBottom&&e<actualFrozenRow-1){var n=$viewportScrollContainerY.height(),r=hasFrozenRows&&!options.frozenBottom?e-options.frozenRow:e,i=r*options.rowHeight,o=(r+1)*options.rowHeight-n+(viewportHasHScroll?scrollbarDimensions.height:0);(r+1)*options.rowHeight>scrollTop+n+offset?(scrollTo(t?i:o),render()):r*options.rowHeight<scrollTop+offset&&(scrollTo(t?o:i),render())}}function scrollRowToTop(e){scrollTo(e*options.rowHeight),render()}function scrollPage(e){var t=e*numVisibleRows;if(scrollTo((getRowFromPosition(scrollTop+options.rowHeight-1)+t)*options.rowHeight),render(),options.enableCellNavigation&&null!=activeRow){var n=activeRow+t,r=getDataLengthIncludingAddNew();n>=r&&(n=r-1),n<0&&(n=0);for(var i=0,o=null,a=activePosX;i<=activePosX;)canCellBeActive(n,i)&&(o=i),i+=getColspan(n,i);null!==o?(setActiveCellInternal(getCellNode(n,o)),activePosX=a):resetActiveCell()}}function navigatePageDown(){scrollPage(1)}function navigatePageUp(){scrollPage(-1)}function navigateTop(){navigateToRow(0)}function navigateBottom(){navigateToRow(getDataLength()-1)}function navigateToRow(e){var t=getDataLength();if(!t)return!0;if(e<0?e=0:e>=t&&(e=t-1),scrollCellIntoView(e,0,!0),options.enableCellNavigation&&null!=activeRow){for(var n=0,r=null,i=activePosX;n<=activePosX;)canCellBeActive(e,n)&&(r=n),n+=getColspan(e,n);null!==r?(setActiveCellInternal(getCellNode(e,r)),activePosX=i):resetActiveCell()}return!0}function getColspan(e,t){var n=data.getItemMetadata&&data.getItemMetadata(e);if(!n||!n.columns)return 1;var r=n.columns[columns[t].id]||n.columns[t],i=r&&r.colspan;return"*"===i?columns.length-t:i||1}function findFirstFocusableCell(e){for(var t=0;t<columns.length;){if(canCellBeActive(e,t))return t;t+=getColspan(e,t)}return null}function findLastFocusableCell(e){for(var t=0,n=null;t<columns.length;)canCellBeActive(e,t)&&(n=t),t+=getColspan(e,t);return n}function gotoRight(e,t,n){if(t>=columns.length)return null;do{t+=getColspan(e,t)}while(t<columns.length&&!canCellBeActive(e,t));return t<columns.length?{row:e,cell:t,posX:t}:null}function gotoLeft(e,t,n){if(t<=0)return null;var r=findFirstFocusableCell(e);if(null===r||r>=t)return null;for(var i,o={row:e,cell:r,posX:r};;){if(!(i=gotoRight(o.row,o.cell,o.posX)))return null;if(i.cell>=t)return o;o=i}}function gotoDown(e,t,n){for(var r,i=getDataLengthIncludingAddNew();;){if(++e>=i)return null;for(r=t=0;t<=n;)r=t,t+=getColspan(e,t);if(canCellBeActive(e,r))return{row:e,cell:r,posX:n}}}function gotoUp(e,t,n){for(var r;;){if(--e<0)return null;for(r=t=0;t<=n;)r=t,t+=getColspan(e,t);if(canCellBeActive(e,r))return{row:e,cell:r,posX:n}}}function gotoNext(e,t,n){if(null==e&&null==t&&canCellBeActive(e=t=n=0,t))return{row:e,cell:t,posX:t};var r=gotoRight(e,t,n);if(r)return r;var i=null,o=getDataLengthIncludingAddNew();for(e===o-1&&e--;++e<o;)if(null!==(i=findFirstFocusableCell(e)))return{row:e,cell:i,posX:i};return null}function gotoPrev(e,t,n){if(null==e&&null==t&&canCellBeActive(e=getDataLengthIncludingAddNew()-1,t=n=columns.length-1))return{row:e,cell:t,posX:t};for(var r,i;!r&&!(r=gotoLeft(e,t,n));){if(--e<0)return null;t=0,null!==(i=findLastFocusableCell(e))&&(r={row:e,cell:i,posX:i})}return r}function gotoRowStart(e,t,n){var r=findFirstFocusableCell(e);return null===r?null:{row:e,cell:r,posX:r}}function gotoRowEnd(e,t,n){var r=findLastFocusableCell(e);return null===r?null:{row:e,cell:r,posX:r}}function navigateRight(){return navigate("right")}function navigateLeft(){return navigate("left")}function navigateDown(){return navigate("down")}function navigateUp(){return navigate("up")}function navigateNext(){return navigate("next")}function navigatePrev(){return navigate("prev")}function navigateRowStart(){return navigate("home")}function navigateRowEnd(){return navigate("end")}function navigate(e){if(!options.enableCellNavigation)return!1;if(!activeCellNode&&"prev"!=e&&"next"!=e)return!1;if(!getEditorLock().commitCurrentEdit())return!0;setFocus(),tabbingDirection={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1}[e];var t=(0,{up:gotoUp,down:gotoDown,left:gotoLeft,right:gotoRight,prev:gotoPrev,next:gotoNext,home:gotoRowStart,end:gotoRowEnd}[e])(activeRow,activeCell,activePosX);if(t){if(hasFrozenRows&&options.frozenBottom&t.row==getDataLength())return;var n=t.row==getDataLength();return(!options.frozenBottom&&t.row>=actualFrozenRow||options.frozenBottom&&t.row<actualFrozenRow)&&scrollCellIntoView(t.row,t.cell,!n&&options.emulatePagingWhenScrolling),setActiveCellInternal(getCellNode(t.row,t.cell)),activePosX=t.posX,!0}return setActiveCellInternal(getCellNode(activeRow,activeCell)),!1}function getCellNode(e,t){if(rowsCache[e]){ensureCellNodesInRowsCache(e);try{return rowsCache[e].cellNodesByColumnIdx.length>t?rowsCache[e].cellNodesByColumnIdx[t][0]:null}catch(n){return rowsCache[e].cellNodesByColumnIdx[t]}}return null}function setActiveCell(e,t,n,r,i){initialized&&(e>getDataLength()||e<0||t>=columns.length||t<0||options.enableCellNavigation&&(scrollCellIntoView(e,t,!1),setActiveCellInternal(getCellNode(e,t),n,r,i)))}function setActiveRow(e,t,n){initialized&&(e>getDataLength()||e<0||t>=columns.length||t<0||(activeRow=e,n||scrollCellIntoView(e,t||0,!1)))}function canCellBeActive(e,t){if(!options.enableCellNavigation||e>=getDataLengthIncludingAddNew()||e<0||t>=columns.length||t<0)return!1;var n=data.getItemMetadata&&data.getItemMetadata(e);if(n&&void 0!==n.focusable)return!!n.focusable;var r=n&&n.columns;return r&&r[columns[t].id]&&void 0!==r[columns[t].id].focusable?!!r[columns[t].id].focusable:r&&r[t]&&void 0!==r[t].focusable?!!r[t].focusable:!!columns[t].focusable}function canCellBeSelected(e,t){if(e>=getDataLength()||e<0||t>=columns.length||t<0)return!1;var n=data.getItemMetadata&&data.getItemMetadata(e);if(n&&void 0!==n.selectable)return!!n.selectable;var r=n&&n.columns&&(n.columns[columns[t].id]||n.columns[t]);return r&&void 0!==r.selectable?!!r.selectable:!!columns[t].selectable}function gotoCell(e,t,n,r){if(initialized&&canCellBeActive(e,t)&&getEditorLock().commitCurrentEdit()){scrollCellIntoView(e,t,!1);var i=getCellNode(e,t),o=columns[t],a=!!(options.editable&&o&&o.editor&&options.suppressActiveCellChangeOnEdit);setActiveCellInternal(i,n||e===getDataLength()||options.autoEdit,null,a,r),currentEditor||setFocus()}}function commitCurrentEdit(){var e=getDataItem(activeRow),t=columns[activeCell];if(currentEditor){if(currentEditor.isValueChanged()){var n=currentEditor.validate();if(n.valid){if(activeRow<getDataLength()){var r={row:activeRow,cell:activeCell,editor:currentEditor,serializedValue:currentEditor.serializeValue(),prevSerializedValue:serializedEditorValue,execute:function(){this.editor.applyValue(e,this.serializedValue),updateRow(this.row),trigger(self.onCellChange,{command:"execute",row:this.row,cell:this.cell,item:e,column:t})},undo:function(){this.editor.applyValue(e,this.prevSerializedValue),updateRow(this.row),trigger(self.onCellChange,{command:"undo",row:this.row,cell:this.cell,item:e,column:t})}};options.editCommandHandler?(makeActiveCellNormal(),options.editCommandHandler(e,t,r)):(r.execute(),makeActiveCellNormal())}else{var i={};currentEditor.applyValue(i,currentEditor.serializeValue()),makeActiveCellNormal(),trigger(self.onAddNewRow,{item:i,column:t})}return!getEditorLock().isActive()}return $(activeCellNode).removeClass("invalid"),$(activeCellNode).width(),$(activeCellNode).addClass("invalid"),trigger(self.onValidationError,{editor:currentEditor,cellNode:activeCellNode,validationResults:n,row:activeRow,cell:activeCell,column:t}),currentEditor.focus(),!1}makeActiveCellNormal()}return!0}function cancelCurrentEdit(){return makeActiveCellNormal(),!0}function rowsToRanges(e){for(var t=[],n=columns.length-1,r=0;r<e.length;r++)t.push(new Slick.Range(e[r],0,e[r],n));return t}function getSelectedRows(){if(!selectionModel)throw new Error("SlickGrid Selection model is not set");return selectedRows.slice(0)}function setSelectedRows(e){if(!selectionModel)throw new Error("SlickGrid Selection model is not set");self&&self.getEditorLock&&!self.getEditorLock().isActive()&&selectionModel.setSelectedRanges(rowsToRanges(e))}this.debug=function(){var e="";e+="\ncounter_rows_rendered: "+counter_rows_rendered,e+="\ncounter_rows_removed: "+counter_rows_removed,e+="\nrenderedRows: "+renderedRows,e+="\nnumVisibleRows: "+numVisibleRows,e+="\nmaxSupportedCssHeight: "+maxSupportedCssHeight,e+="\nn(umber of pages): "+n,e+="\n(current) page: "+page,e+="\npage height (ph): "+ph,e+="\nvScrollDir: "+vScrollDir,alert(e)},this.eval=function(expr){return eval(expr)},$.extend(this,{slickGridVersion:"2.4.41",onScroll:new Slick.Event,onBeforeSort:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onFooterRowCellRendered:new Slick.Event,onFooterContextMenu:new Slick.Event,onFooterClick:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onBeforeFooterRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onBeforeAppendCell:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsDrag:new Slick.Event,onColumnsResized:new Slick.Event,onColumnsResizeDblClick:new Slick.Event,onBeforeColumnsResize:new Slick.Event,onCellChange:new Slick.Event,onCompositeEditorChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,onAutosizeColumns:new Slick.Event,onBeforeSetColumns:new Slick.Event,onRendered:new Slick.Event,onSetOptions:new Slick.Event,registerPlugin,unregisterPlugin,getPluginByName,getColumns,setColumns,getColumnIndex,updateColumnHeader,setSortColumn,setSortColumns,getSortColumns,autosizeColumns,autosizeColumn,getOptions,setOptions,getData,getDataLength,getDataItem,setData,getSelectionModel,setSelectionModel,getSelectedRows,setSelectedRows,getContainerNode,updatePagingStatusFromView,applyFormatResultToCellNode,render,reRenderColumns,invalidate,invalidateRow,invalidateRows,invalidateAllRows,updateCell,updateRow,getViewport:getVisibleRange,getRenderedRange,resizeCanvas,updateRowCount,scrollRowIntoView,scrollRowToTop,scrollCellIntoView,scrollColumnIntoView,getCanvasNode,getUID,getHeaderColumnWidthDiff,getScrollbarDimensions,getHeadersWidth,getCanvasWidth,getCanvases,getActiveCanvasNode,setActiveCanvasNode,getViewportNode,getViewports,getActiveViewportNode,setActiveViewportNode,focus:setFocus,scrollTo,cacheCssForHiddenInit,restoreCssFromHiddenInit,getCellFromPoint,getCellFromEvent,getActiveCell,setActiveCell,setActiveRow,getActiveCellNode,getActiveCellPosition,resetActiveCell,editActiveCell:makeActiveCellEditable,getCellEditor,getCellNode,getCellNodeBox,canCellBeSelected,canCellBeActive,navigatePrev,navigateNext,navigateUp,navigateDown,navigateLeft,navigateRight,navigatePageUp,navigatePageDown,navigateTop,navigateBottom,navigateRowStart,navigateRowEnd,gotoCell,getTopPanel,setTopPanelVisibility,getPreHeaderPanel,getPreHeaderPanelLeft:getPreHeaderPanel,getPreHeaderPanelRight,setPreHeaderPanelVisibility,getHeader,getHeaderColumn,setHeaderRowVisibility,getHeaderRow,getHeaderRowColumn,setFooterRowVisibility,getFooterRow,getFooterRowColumn,getGridPosition,flashCell,addCellCssStyles,setCellCssStyles,removeCellCssStyles,getCellCssStyles,getFrozenRowOffset,setColumnHeaderVisibility,init:finishInitialization,destroy,getEditorLock,getEditController}),init()}module.exports={Grid:SlickGrid}},83091:(e,t,n)=>{var r=n(35373),i=n(30413);e.exports={GroupItemMetadataProvider:function(e){var t,n={checkboxSelect:!1,checkboxSelectCssClass:"slick-group-select-checkbox",checkboxSelectPlugin:null,groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:function(e,t,n,r,i,a){if(!o.enableExpandCollapse)return i.title;var s=15*i.level+"px";return(o.checkboxSelect?'<span class="'+o.checkboxSelectCssClass+" "+(i.selectChecked?"checked":"unchecked")+'"></span>':"")+"<span class='"+o.toggleCssClass+" "+(i.collapsed?o.toggleCollapsedCssClass:o.toggleExpandedCssClass)+"' style='margin-left:"+s+"'></span><span class='"+o.groupTitleCssClass+"' level='"+i.level+"'>"+i.title+"</span>"},totalsFormatter:function(e,t,n,r,i,o){return r.groupTotalsFormatter&&r.groupTotalsFormatter(i,r,o)||""},includeHeaderTotals:!1},o=r.extend(!0,{},n,e);function a(e,n){var a=r(e.target),s=this.getDataItem(n.row);if(s&&s instanceof i.Group&&a.hasClass(o.toggleCssClass)){var l=t.getRenderedRange();this.getData().setRefreshHints({ignoreDiffsBefore:l.top,ignoreDiffsAfter:l.bottom+1}),s.collapsed?this.getData().expandGroup(s.groupingKey):this.getData().collapseGroup(s.groupingKey),e.stopImmediatePropagation(),e.preventDefault()}if(s&&s instanceof i.Group&&a.hasClass(o.checkboxSelectCssClass)){s.selectChecked=!s.selectChecked,a.removeClass(s.selectChecked?"unchecked":"checked"),a.addClass(s.selectChecked?"checked":"unchecked");var c=t.getData().mapItemsToRows(s.rows);(s.selectChecked?o.checkboxSelectPlugin.selectRows:o.checkboxSelectPlugin.deSelectRows)(c)}}function s(e,n){if(o.enableExpandCollapse&&e.which==i.keyCode.SPACE){var r=this.getActiveCell();if(r){var a=this.getDataItem(r.row);if(a&&a instanceof i.Group){var s=t.getRenderedRange();this.getData().setRefreshHints({ignoreDiffsBefore:s.top,ignoreDiffsAfter:s.bottom+1}),a.collapsed?this.getData().expandGroup(a.groupingKey):this.getData().collapseGroup(a.groupingKey),e.stopImmediatePropagation(),e.preventDefault()}}}}return{init:function(e){(t=e).onClick.subscribe(a),t.onKeyDown.subscribe(s)},destroy:function(){t&&(t.onClick.unsubscribe(a),t.onKeyDown.unsubscribe(s))},getGroupRowMetadata:function(e){var t=e&&e.level;return{selectable:!1,focusable:o.groupFocusable,cssClasses:o.groupCssClass+" slick-group-level-"+t,formatter:o.includeHeaderTotals&&o.totalsFormatter,columns:{0:{colspan:o.includeHeaderTotals?"1":"*",formatter:o.groupFormatter,editor:null}}}},getTotalsRowMetadata:function(e){var t=e&&e.group&&e.group.level;return{selectable:!1,focusable:o.totalsFocusable,cssClasses:o.totalsCssClass+" slick-group-level-"+t,formatter:o.totalsFormatter,editor:null}},getOptions:function(){return o},setOptions:function(e){r.extend(!0,o,e)}}}}},35373:(e,t,n)=>{e.exports="undefined"!=typeof $?$:n(91634)},83220:(e,t,n)=>{var r=n(35373),i=n(30413);e.exports={RemoteModel:function(){var e=50,t={length:0},n="",o=null,a=1,s=null,l=null,c=new i.Event,u=new i.Event;function h(){for(var e in t)delete t[e];t.length=0}function d(i,h){if(l){l.abort();for(var d=l.fromPage;d<=l.toPage;d++)t[d*e]=void 0}i<0&&(i=0),t.length>0&&(h=Math.min(h,t.length-1));for(var p=Math.floor(i/e),g=Math.floor(h/e);void 0!==t[p*e]&&p<g;)p++;for(;void 0!==t[g*e]&&p<g;)g--;if(p>g||p==g&&void 0!==t[p*e])u.notify({from:i,to:h});else{var m="path_to_url"+n+"&start="+p*e+"&limit="+((g-p)*e+e);null!=o&&(m+="&sortby="+o+(a>0?"+asc":"+desc")),null!=s&&clearTimeout(s),s=setTimeout((function(){for(var n=p;n<=g;n++)t[n*e]=null;c.notify({from:i,to:h}),l=r.jsonp({url:m,callbackParameter:"callback",cache:!0,success:f,error:function(){!function(e,t){alert("error loading pages "+e+" to "+t)}(p,g)}}),l.fromPage=p,l.toPage=g}),50)}}function f(e){var n=e.request.start,r=n+e.results.length;t.length=Math.min(parseInt(e.hits),1e3);for(var i=0;i<e.results.length;i++){var o=e.results[i].item;t[n+i]=o,t[n+i].index=n+i}l=null,u.notify({from:n,to:r})}return{data:t,clear:h,isDataLoaded:function(e,n){for(var r=e;r<=n;r++)if(null==t[r]||null==t[r])return!1;return!0},ensureData:d,reloadData:function(e,n){for(var r=e;r<=n;r++)delete t[r];d(e,n)},setSort:function(e,t){o=e,a=t,h()},setSearch:function(e){n=e,h()},onDataLoading:c,onDataLoaded:u}}}},70803:(e,t,n)=>{"use strict";n.d(t,{d_:()=>l});var r=n(20362);const i=(...e)=>t=>e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})),o=(e,t)=>{const n="on"+e;let r=n in t;if(!r){const e=t.createElement("div");e.setAttribute(n,"return;"),r="function"==typeof e[n]}return r},a=(e,t,n)=>{const r=e.__events||(e.__events={}),i=r[t];i&&e.removeEventListener(t,i),e.addEventListener(t,r[t]=function(e){n&&n.call(this,e)})},s=e=>{const t=new Map;return e.forEach((e=>t.set(e,e))),t};const l=((e,t,n)=>{const l=e.toLowerCase().split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""),c=class extends r.Component{constructor(e){super(e),this.setComponentElRef=e=>{this.componentEl=e}}componentDidMount(){this.componentDidUpdate(this.props)}componentDidUpdate(e){((e,t,n={})=>{if(e instanceof Element){const r=((e,t,n)=>{const r=t.className||t.class,i=n.className||n.class,o=s(e),a=s(r?r.split(" "):[]),l=s(i?i.split(" "):[]),c=[];return o.forEach((e=>{a.has(e)?(c.push(e),a.delete(e)):l.has(e)||c.push(e)})),a.forEach((e=>c.push(e))),c.join(" ")})(e.classList,t,n);""!==r&&(e.className=r),Object.keys(t).forEach((n=>{if("children"!==n&&"style"!==n&&"ref"!==n&&"class"!==n&&"className"!==n&&"forwardedRef"!==n)if(0===n.indexOf("on")&&n[2]===n[2].toUpperCase()){const r=n.substring(2),i=r[0].toLowerCase()+r.substring(1);"undefined"==typeof document||o(i,document)||a(e,i,t[n])}else e[n]=t[n],"string"==typeof t[n]?e.setAttribute(n.replace(/([A-Z])/g,(e=>`-${e[0].toLowerCase()}`)),t[n]):e[n]=t[n]}))}})(this.componentEl,this.props,e)}render(){const t=this.props,{children:n,forwardedRef:a,style:s,className:l,ref:c}=t,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["children","forwardedRef","style","className","ref"]);let h=Object.keys(u).reduce(((e,t)=>{if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){const n=t.substring(2).toLowerCase();"undefined"!=typeof document&&o(n,document)&&(e[t]=u[t])}else e[t]=u[t];return e}),{}),d=Object.assign(Object.assign({},h),{ref:i(a,this.setComponentElRef),style:s});return r.createElement(e,d,n)}static get displayName(){return l}};return((e,t)=>{const n=(t,n)=>r.createElement(e,Object.assign({},t,{forwardedRef:n}));return n.displayName=t,r.forwardRef(n)})(c,l)})("revo-grid")},59889:()=>{var e=function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},t=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function n(e){return r(function(e){var n=new t;n.start=0,n.end=e.length;for(var r=n,i=0,s=e.length;i<s;i++)if(e[i]===o){r.rules||(r.rules=[]);var l=r,c=l.rules[l.rules.length-1]||null;(r=new t).start=i+1,r.parent=l,r.previous=c,l.rules.push(r)}else e[i]===a&&(r.end=i+1,r=r.parent||n);return n}(e=function(e){return e.replace(s.comments,"").replace(s.port,"")}(e)),e)}function r(e,t){var n=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=n.trim(),e.parent){var o=e.previous?e.previous.end:e.parent.start;n=(n=(n=function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}(n=t.substring(o,e.start-1))).replace(s.multipleSpaces," ")).substring(n.lastIndexOf(";")+1);var a=e.parsedSelector=e.selector=n.trim();e.atRule=0===a.indexOf(u),e.atRule?0===a.indexOf(c)?e.type=i.MEDIA_RULE:a.match(s.keyframesRule)&&(e.type=i.KEYFRAMES_RULE,e.keyframesName=e.selector.split(s.multipleSpaces).pop()):0===a.indexOf(l)?e.type=i.MIXIN_RULE:e.type=i.STYLE_RULE}var h=e.rules;if(h)for(var d=0,f=h.length,p=void 0;d<f&&(p=h[d]);d++)r(p,t);return e}var i={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},o="{",a="}",s={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},l="--",c="@media",u="@";function h(e,t,n){e.lastIndex=0;var r=t.substring(n).match(e);if(r){var i=n+r.index;return{start:i,end:i+r[0].length}}return null}var d=/\bvar\(/,f=/\B--[\w-]+\s*:/,p=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,g=/^[\t ]+\n/gm;function m(e,t,n){var r=function(e,t){var n=h(d,e,t);if(!n)return null;var r=function(e,t){for(var n=0,r=t;r<e.length;r++){var i=e[r];if("("===i)n++;else if(")"===i&&--n<=0)return r+1}return r}(e,n.start),i=e.substring(n.end,r-1).split(","),o=i[0],a=i.slice(1);return{start:n.start,end:r,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}(e,n);if(!r)return t.push(e.substring(n,e.length)),e.length;var i=r.propName,o=null!=r.fallback?b(r.fallback):void 0;return t.push(e.substring(n,r.start),(function(e){return function(e,t,n){return e[t]?e[t]:n?v(n,e):""}(e,i,o)})),r.end}function v(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];n+="string"==typeof i?i:i(t)}return n}function y(e,t){for(var n=!1,r=!1,i=t;i<e.length;i++){var o=e[i];if(n)r&&'"'===o&&(n=!1),r||"'"!==o||(n=!1);else if('"'===o)n=!0,r=!0;else if("'"===o)n=!0,r=!1;else{if(";"===o)return i+1;if("}"===o)return i}}return i}function b(e){var t=0;e=function(e){for(var t="",n=0;;){var r=h(f,e,n),i=r?r.start:e.length;if(t+=e.substring(n,i),!r)break;n=y(e,i)}return t}(e=e.replace(p,"")).replace(g,"");for(var n=[];t<e.length;)t=m(e,n,t);return n}function _(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var n={},r=Object.entries(t),i=function(e){var t=!1;if(r.forEach((function(e){var r=e[0],i=v(e[1],n);i!==n[r]&&(n[r]=i,t=!0)})),!t)return"break"},o=0;o<10&&"break"!==i();o++);return n}function x(e,t){if(void 0===t&&(t=0),!e.rules)return[];var n=[];return e.rules.filter((function(e){return e.type===i.STYLE_RULE})).forEach((function(e){var r=function(e){for(var t,n=[];t=A.exec(e.trim());){var r=k(t[2]),i=r.value,o=r.important;n.push({prop:t[1].trim(),value:b(i),important:o})}return n}(e.cssText);r.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),n.push({selector:e,declarations:r,specificity:1,nu:t})})),t++})),n}var w="!important",A=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function k(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(w);return t&&(e=e.substr(0,e.length-w.length).trim()),{value:e,important:t}}function T(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function S(e){var t=n(e),r=b(e);return{original:e,template:r,selectors:x(t),usesCssVars:r.length>1}}function E(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var n=S(t.textContent);return n.styleEl=t,e.push(n),!0}function C(e){var t=_(T(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=v(e.template,t))}))}function M(e,t,n){return function(e,t,n){return e.replace(new RegExp(t,"g"),n)}(e,"\\."+t,"."+n)}function O(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return E(t,e)})).some(Boolean)}function L(e,t,n){var r=n.href;return fetch(r).then((function(e){return e.text()})).then((function(i){if(function(e){return e.indexOf("var(")>-1||I.test(e)}(i)&&n.parentNode){(function(e){return R.lastIndex=0,R.test(e)})(i)&&(i=function(e,t){var n=t.replace(/[^/]*$/,"");return e.replace(R,(function(e,t){var r=n+t;return e.replace(t,r)}))}(i,r));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=i,E(t,o),n.parentNode.insertBefore(o,n),n.remove()}})).catch((function(e){console.error(e)}))}var D,I=/[\s;{]--[-a-zA-Z0-9]+\s*:/m,R=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim,P=function(){function t(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return t.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){(function(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){O(e,t)&&C(t)})).observe(document.head,{childList:!0})})(e.doc,e.globalScopes),function(e,t){return O(e,t),function(e,t){for(var n=[],r=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),i=0;i<r.length;i++)n.push(L(e,t,r[i]));return Promise.all(n)}(e,t).then((function(){C(t)}))}(e.doc,e.globalScopes).then((function(){return t()}))}))})))},t.prototype.addLink=function(e){var t=this;return L(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},t.prototype.addGlobalStyle=function(e){E(this.globalScopes,e)&&this.updateGlobal()},t.prototype.createHostStyle=function(t,n,r,i){if(this.hostScopeMap.has(t))throw new Error("host style already created");var o=this.registerHostTemplate(r,n,i),a=this.doc.createElement("style");return a.setAttribute("data-no-shim",""),o.usesCssVars?i?(a["s-sc"]=n=o.scopeId+"-"+this.count,a.textContent="/*needs update*/",this.hostStyleMap.set(t,a),this.hostScopeMap.set(t,function(t,n){var r=t.template.map((function(e){return"string"==typeof e?M(e,t.scopeId,n):e})),i=t.selectors.map((function(r){return e(e({},r),{selector:M(r.selector,t.scopeId,n)})}));return e(e({},t),{template:r,selectors:i,scopeId:n})}(o,n)),this.count++):(o.styleEl=a,o.usesCssVars||(a.textContent=v(o.template,{})),this.globalScopes.push(o),this.updateGlobal(),this.hostScopeMap.set(t,o)):a.textContent=r,a},t.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},t.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var n=this.hostStyleMap.get(e);if(n){var r=_(function(e,t,n){var r=[],i=function(e,t){for(var n=[];t;){var r=e.get(t);r&&n.push(r),t=t.parentElement}return n}(t,e);return n.forEach((function(e){return r.push(e)})),i.forEach((function(e){return r.push(e)})),function(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}(T(r).filter((function(t){return function(e,t){return":root"===t||"html"===t||e.matches(t)}(e,t.selector)})))}(e,this.hostScopeMap,this.globalScopes));n.textContent=v(t.template,r)}}},t.prototype.updateGlobal=function(){C(this.globalScopes)},t.prototype.registerHostTemplate=function(e,t,n){var r=this.scopesMap.get(t);return r||((r=S(e)).scopeId=t,r.isScoped=n,this.scopesMap.set(t,r)),r},t}();!(D="undefined"!=typeof window&&window)||D.__cssshim||D.CSS&&D.CSS.supports&&D.CSS.supports("color","var(--c)")||(D.__cssshim=new P(D,D.document))},51476:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,a:()=>o,i:()=>a});var r=n(14633),i="hasFilter",o=function(e){var t,n=e.column;return(0,r.h)("span",null,(0,r.h)("button",{class:(t={},t["rv-filter"]=!0,t.active=n&&!!n[i],t)},(0,r.h)("svg",{class:"filter-img",viewBox:"0 0 64 64"},(0,r.h)("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("path",{d:"M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z",fill:"currentColor"})))))};function a(e){return!!e.classList.contains("rv-filter")||(null==e?void 0:e.closest(".rv-filter"))}},14633:(e,t,n)=>{"use strict";n.d(t,{C:()=>v,H:()=>R,a:()=>_,b:()=>ye,c:()=>ne,e:()=>te,f:()=>he,g:()=>ce,h:()=>D,p:()=>b,r:()=>xe,w:()=>m});var r,i,o,a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},l=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},c=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},u=!1,h=!1,d=!1,f=!1,p=null,g=!1,m="undefined"!=typeof window?window:{},v=m.CSS,y=m.document||{head:{}},b={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,n,r){return e.addEventListener(t,n,r)},rel:function(e,t,n,r){return e.removeEventListener(t,n,r)},ce:function(e,t){return new CustomEvent(e,t)}},_=function(e){return Promise.resolve(e)},x=function(){try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1}(),w=function(e,t,n,r){n&&n.map((function(n){var r=n[0],i=n[1],o=n[2],a=k(e,r),s=A(t,o),l=T(r);b.ael(a,i,s,l),(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return b.rel(a,i,s,l)}))}))},A=function(e,t){return function(n){try{256&e.$flags$?e.$lazyInstance$[t](n):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,n])}catch(e){ke(e)}}},k=function(e,t){return 4&t?y:e},T=function(e){return 0!=(2&e)},S="path_to_url",E=function(e,t){return void 0===t&&(t=""),function(){}},C=new WeakMap,M=function(e,t){return"sc-"+e.$tagName$},O={},L=function(e){return"object"==(e=typeof e)||"function"===e},D=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=null,o=null,a=null,s=!1,l=!1,c=[],u=function(t){for(var n=0;n<t.length;n++)i=t[n],Array.isArray(i)?u(i):null!=i&&"boolean"!=typeof i&&((s="function"!=typeof e&&!L(i))&&(i=String(i)),s&&l?c[c.length-1].$text$+=i:c.push(s?I(null,i):i),l=s)};if(u(n),t){t.key&&(o=t.key),t.name&&(a=t.name);var h=t.className||t.class;h&&(t.class="object"!=typeof h?h:Object.keys(h).filter((function(e){return h[e]})).join(" "))}if("function"==typeof e)return e(null===t?{}:t,c,P);var d=I(e,null);return d.$attrs$=t,c.length>0&&(d.$children$=c),d.$key$=o,d.$name$=a,d},I=function(e,t){return{$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}},R={},P={forEach:function(e,t){return e.map(N).forEach(t)},map:function(e,t){return e.map(N).map(t).map(z)}},N=function(e){return{vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}},z=function(e){if("function"==typeof e.vtag){var t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),D.apply(void 0,c([e.vtag,t],e.vchildren||[]))}var n=I(e.vtag,e.vtext);return n.$attrs$=e.vattrs,n.$children$=e.vchildren,n.$key$=e.vkey,n.$name$=e.vname,n},F=function(e,t,n,r,i,o){if(n!==r){var a=Ae(e,t),s=t.toLowerCase();if("class"===t){var l=e.classList,c=j(n),u=j(r);l.remove.apply(l,c.filter((function(e){return e&&!u.includes(e)}))),l.add.apply(l,u.filter((function(e){return e&&!c.includes(e)})))}else if("style"===t){for(var h in n)r&&null!=r[h]||(h.includes("-")?e.style.removeProperty(h):e.style[h]="");for(var h in r)n&&r[h]===n[h]||(h.includes("-")?e.style.setProperty(h,r[h]):e.style[h]=r[h])}else if("key"===t);else if("ref"===t)r&&r(e);else if(a||"o"!==t[0]||"n"!==t[1]){var d=L(r);if((a||d&&null!==r)&&!i)try{if(e.tagName.includes("-"))e[t]=r;else{var f=null==r?"":r;"list"===t?a=!1:null!=n&&e[t]==f||(e[t]=f)}}catch(e){}var p=!1;s!==(s=s.replace(/^xlink\:?/,""))&&(t=s,p=!0),null==r||!1===r?!1===r&&""!==e.getAttribute(t)||(p?e.removeAttributeNS(S,t):e.removeAttribute(t)):(!a||4&o||i)&&!d&&(r=!0===r?"":r,p?e.setAttributeNS(S,t,r):e.setAttribute(t,r))}else t="-"===t[2]?t.slice(3):Ae(m,s)?s.slice(2):s[2]+t.slice(3),n&&b.rel(e,t,n,!1),r&&b.ael(e,t,r,!1)}},B=/\s/,j=function(e){return e?e.split(B):[]},U=function(e,t,n,r){var i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,o=e&&e.$attrs$||O,a=t.$attrs$||O;for(r in o)r in a||F(i,r,o[r],void 0,n,t.$flags$);for(r in a)F(i,r,o[r],a[r],n,t.$flags$)},V=function(e,t,n,r){var a,s,l,c=t.$children$[n],h=0;if(u||(d=!0,"slot"===c.$tag$&&(c.$flags$|=c.$children$?2:1)),null!==c.$text$)a=c.$elm$=y.createTextNode(c.$text$);else if(1&c.$flags$)a=c.$elm$=y.createTextNode("");else{if(f||(f="svg"===c.$tag$),a=c.$elm$=y.createElementNS(f?"path_to_url":"path_to_url",2&c.$flags$?"slot-fb":c.$tag$),f&&"foreignObject"===c.$tag$&&(f=!1),U(null,c,f),c.$children$)for(h=0;h<c.$children$.length;++h)(s=V(e,c,h))&&a.appendChild(s);"svg"===c.$tag$?f=!1:"foreignObject"===a.tagName&&(f=!0)}return a["s-hn"]=o,3&c.$flags$&&(a["s-sr"]=!0,a["s-cr"]=i,a["s-sn"]=c.$name$||"",(l=e&&e.$children$&&e.$children$[n])&&l.$tag$===c.$tag$&&e.$elm$&&q(e.$elm$,!1)),a},q=function(e,t){b.$flags$|=1;for(var n=e.childNodes,r=n.length-1;r>=0;r--){var i=n[r];i["s-hn"]!==o&&i["s-ol"]&&(Y(i).insertBefore(i,G(i)),i["s-ol"].remove(),i["s-ol"]=void 0,d=!0),t&&q(i,t)}b.$flags$&=-2},H=function(e,t,n,r,i,o){for(var a,s=e["s-cr"]&&e["s-cr"].parentNode||e;i<=o;++i)r[i]&&(a=V(null,n,i))&&(r[i].$elm$=a,s.insertBefore(a,G(t)))},$=function(e,t,n,r,i){for(;t<=n;++t)(r=e[t])&&(i=r.$elm$,ee(r),h=!0,i["s-ol"]?i["s-ol"].remove():q(i,!0),i.remove())},W=function(e,t){return e.$tag$===t.$tag$&&("slot"===e.$tag$?e.$name$===t.$name$:e.$key$===t.$key$)},G=function(e){return e&&e["s-ol"]||e},Y=function(e){return(e["s-ol"]?e["s-ol"]:e).parentNode},X=function(e,t){var n,r=t.$elm$=e.$elm$,i=e.$children$,o=t.$children$,a=t.$tag$,s=t.$text$;null===s?(f="svg"===a||"foreignObject"!==a&&f,"slot"===a||U(e,t,f),null!==i&&null!==o?function(e,t,n,r){for(var i,o,a=0,s=0,l=0,c=0,u=t.length-1,h=t[0],d=t[u],f=r.length-1,p=r[0],g=r[f];a<=u&&s<=f;)if(null==h)h=t[++a];else if(null==d)d=t[--u];else if(null==p)p=r[++s];else if(null==g)g=r[--f];else if(W(h,p))X(h,p),h=t[++a],p=r[++s];else if(W(d,g))X(d,g),d=t[--u],g=r[--f];else if(W(h,g))"slot"!==h.$tag$&&"slot"!==g.$tag$||q(h.$elm$.parentNode,!1),X(h,g),e.insertBefore(h.$elm$,d.$elm$.nextSibling),h=t[++a],g=r[--f];else if(W(d,p))"slot"!==h.$tag$&&"slot"!==g.$tag$||q(d.$elm$.parentNode,!1),X(d,p),e.insertBefore(d.$elm$,h.$elm$),d=t[--u],p=r[++s];else{for(l=-1,c=a;c<=u;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===p.$key$){l=c;break}l>=0?((o=t[l]).$tag$!==p.$tag$?i=V(t&&t[s],n,l):(X(o,p),t[l]=void 0,i=o.$elm$),p=r[++s]):(i=V(t&&t[s],n,s),p=r[++s]),i&&Y(h.$elm$).insertBefore(i,G(h.$elm$))}a>u?H(e,null==r[f+1]?null:r[f+1].$elm$,n,r,s,f):s>f&&$(t,a,u)}(r,i,t,o):null!==o?(null!==e.$text$&&(r.textContent=""),H(r,null,t,o,0,o.length-1)):null!==i&&$(i,0,i.length-1),f&&"svg"===a&&(f=!1)):(n=r["s-cr"])?n.parentNode.textContent=s:e.$text$!==s&&(r.data=s)},Z=function(e){var t,n,r,i,o,a,s=e.childNodes;for(n=0,r=s.length;n<r;n++)if(1===(t=s[n]).nodeType){if(t["s-sr"])for(o=t["s-sn"],t.hidden=!1,i=0;i<r;i++)if(a=s[i].nodeType,s[i]["s-hn"]!==t["s-hn"]||""!==o){if(1===a&&o===s[i].getAttribute("slot")){t.hidden=!0;break}}else if(1===a||3===a&&""!==s[i].textContent.trim()){t.hidden=!0;break}Z(t)}},K=[],J=function(e){for(var t,n,r,i,o,a,s=0,l=e.childNodes,c=l.length;s<c;s++){if((t=l[s])["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(r=n.parentNode.childNodes,i=t["s-sn"],a=r.length-1;a>=0;a--)(n=r[a])["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(Q(n,i)?(o=K.find((function(e){return e.$nodeToRelocate$===n})),h=!0,n["s-sn"]=n["s-sn"]||i,o?o.$slotRefNode$=t:K.push({$slotRefNode$:t,$nodeToRelocate$:n}),n["s-sr"]&&K.map((function(e){Q(e.$nodeToRelocate$,n["s-sn"])&&(o=K.find((function(e){return e.$nodeToRelocate$===n})),o&&!e.$slotRefNode$&&(e.$slotRefNode$=o.$slotRefNode$))}))):K.some((function(e){return e.$nodeToRelocate$===n}))||K.push({$nodeToRelocate$:n}));1===t.nodeType&&J(t)}},Q=function(e,t){return 1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t},ee=function(e){e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(ee)},te=function(e){return _e(e).$hostElement$},ne=function(e,t,n){var r=te(e);return{emit:function(e){return re(r,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}}},re=function(e,t,n){var r=b.ce(t,n);return e.dispatchEvent(r),r},ie=function(e,t){t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))},oe=function(e,t){if(e.$flags$|=16,!(4&e.$flags$))return ie(e,e.$ancestorComponent$),Ie((function(){return ae(e,t)}));e.$flags$|=512},ae=function(e,t){var n,r=E(0,e.$cmpMeta$.$tagName$),i=e.$lazyInstance$;return t&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((function(e){var t=e[0],n=e[1];return fe(i,t,n)})),e.$queuedListeners$=null),n=fe(i,"componentWillLoad")),n=pe(n,(function(){return fe(i,"componentWillRender")})),r(),pe(n,(function(){return se(e,i,t)}))},se=function(e,t,n){return s(void 0,void 0,void 0,(function(){var r,i,o,a,s,u;return l(this,(function(l){return r=e.$hostElement$,i=E(0,e.$cmpMeta$.$tagName$),o=r["s-rc"],n&&function(e){var t=e.$cmpMeta$,n=e.$hostElement$,r=E(0,t.$tagName$);!function(e,t,n,r){var i=M(t),o=Ee.get(i);if(e=11===e.nodeType?e:y,o)if("string"==typeof o){e=e.head||e;var a=C.get(e),s=void 0;if(a||C.set(e,a=new Set),!a.has(i)){if(b.$cssShim$){var l=(s=b.$cssShim$.createHostStyle(r,i,o,!!(10&t.$flags$)))["s-sc"];l&&(i=l,a=null)}else(s=y.createElement("style")).innerHTML=o;e.insertBefore(s,e.querySelector("link")),a&&a.add(i)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=c(c([],e.adoptedStyleSheets),[o]))}(n.getRootNode(),t,e.$modeName$,n),r()}(e),a=E(0,e.$cmpMeta$.$tagName$),le(e,t),b.$cssShim$&&b.$cssShim$.updateHost(r),o&&(o.map((function(e){return e()})),r["s-rc"]=void 0),a(),i(),s=r["s-p"],u=function(){return ue(e)},0===s.length?u():(Promise.all(s).then(u),e.$flags$|=4,s.length=0),[2]}))}))},le=function(e,t,n){try{p=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,function(e,t){var n=e.$hostElement$,r=e.$cmpMeta$,a=e.$vnode$||I(null,null),s=function(e){return e&&e.$tag$===R}(t)?t:D(null,null,t);if(o=n.tagName,r.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},r.$attrsToReflect$.map((function(e){var t=e[0],r=e[1];return s.$attrs$[r]=n[t]}))),s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=a.$elm$=n,i=n["s-cr"],u=0!=(1&r.$flags$),h=!1,X(a,s),b.$flags$|=1,d){J(s.$elm$);for(var l=void 0,c=void 0,f=void 0,p=void 0,g=void 0,m=void 0,v=0;v<K.length;v++)(c=(l=K[v]).$nodeToRelocate$)["s-ol"]||((f=y.createTextNode(""))["s-nr"]=c,c.parentNode.insertBefore(c["s-ol"]=f,c));for(v=0;v<K.length;v++)if(c=(l=K[v]).$nodeToRelocate$,l.$slotRefNode$){for(p=l.$slotRefNode$.parentNode,g=l.$slotRefNode$.nextSibling,f=c["s-ol"];f=f.previousSibling;)if((m=f["s-nr"])&&m["s-sn"]===c["s-sn"]&&p===m.parentNode&&(!(m=m.nextSibling)||!m["s-nr"])){g=m;break}(!g&&p!==c.parentNode||c.nextSibling!==g)&&c!==g&&(!c["s-hn"]&&c["s-ol"]&&(c["s-hn"]=c["s-ol"].parentNode.nodeName),p.insertBefore(c,g))}else 1===c.nodeType&&(c.hidden=!0)}h&&Z(s.$elm$),b.$flags$&=-2,K.length=0}(e,t)}catch(t){ke(t,e.$hostElement$)}return p=null,null},ce=function(){return p},ue=function(e){var t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,r=E(0,t),i=e.$lazyInstance$,o=e.$ancestorComponent$;fe(i,"componentDidRender"),64&e.$flags$?r():(e.$flags$|=64,ge(n),fe(i,"componentDidLoad"),r(),e.$onReadyResolve$(n),o||de()),e.$onInstanceResolve$(n),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&De((function(){return oe(e,!1)})),e.$flags$&=-517},he=function(e){var t=_e(e),n=t.$hostElement$.isConnected;return n&&2==(18&t.$flags$)&&oe(t,!1),n},de=function(e){ge(y.documentElement),De((function(){return re(m,"appload",{detail:{namespace:"revo-grid"}})}))},fe=function(e,t,n){if(e&&e[t])try{return e[t](n)}catch(e){ke(e)}},pe=function(e,t){return e&&e.then?e.then(t):t()},ge=function(e){return e.classList.add("hydrated")},me=function(e,t,n){if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);var r=Object.entries(t.$members$),i=e.prototype;if(r.map((function(e){var r=e[0],o=e[1][0];31&o||2&n&&32&o?Object.defineProperty(i,r,{get:function(){return function(e,t){return _e(e).$instanceValues$.get(t)}(this,r)},set:function(e){!function(e,t,n,r){var i=_e(e),o=i.$hostElement$,a=i.$instanceValues$.get(t),s=i.$flags$,l=i.$lazyInstance$;if(n=function(e,t){return null==e||L(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?String(e):e}(n,r.$members$[t][0]),!(8&s&&void 0!==a||n===a)&&(i.$instanceValues$.set(t,n),l)){if(r.$watchers$&&128&s){var c=r.$watchers$[t];c&&c.map((function(e){try{l[e](n,a,t)}catch(e){ke(e,o)}}))}2==(18&s)&&oe(i,!1)}}(this,r,e,t)},configurable:!0,enumerable:!0}):1&n&&64&o&&Object.defineProperty(i,r,{value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=_e(this);return n.$onInstancePromise$.then((function(){var t;return(t=n.$lazyInstance$)[r].apply(t,e)}))}})})),1&n){var o=new Map;i.attributeChangedCallback=function(e,t,n){var r=this;b.jmp((function(){var t=o.get(e);r[t]=(null!==n||"boolean"!=typeof r[t])&&n}))},e.observedAttributes=r.filter((function(e){return e[0],15&e[1][0]})).map((function(e){var n=e[0],r=e[1],i=r[1]||n;return o.set(i,n),512&r[0]&&t.$attrsToReflect$.push([n,i]),i}))}}return e},ve=function(e){fe(e,"connectedCallback")},ye=function(e,t){void 0===t&&(t={});var n,r=E(),i=[],o=t.exclude||[],c=m.customElements,u=y.head,h=u.querySelector("meta[charset]"),d=y.createElement("style"),f=[],p=!0;Object.assign(b,t),b.$resourcesUrl$=new URL(t.resourcesUrl||"./",y.baseURI).href,e.map((function(e){return e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};r.$members$=t[2],r.$listeners$=t[3],r.$attrsToReflect$=[],r.$watchers$={};var u=r.$tagName$,h=function(e){function t(t){var n=e.call(this,t)||this;return we(t=n,r),n}return a(t,e),t.prototype.connectedCallback=function(){var e=this;n&&(clearTimeout(n),n=null),p?f.push(this):b.jmp((function(){return function(e){if(0==(1&b.$flags$)){var t=_e(e),n=t.$cmpMeta$,r=E(0,n.$tagName$);if(1&t.$flags$)w(e,t,n.$listeners$),ve(t.$lazyInstance$);else{t.$flags$|=1,12&n.$flags$&&function(e){var t=e["s-cr"]=y.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)}(e);for(var i=e;i=i.parentNode||i.host;)if(i["s-p"]){ie(t,t.$ancestorComponent$=i);break}n.$members$&&Object.entries(n.$members$).map((function(t){var n=t[0];if(31&t[1][0]&&e.hasOwnProperty(n)){var r=e[n];delete e[n],e[n]=r}})),De((function(){return function(e,t,n,r,i){return s(void 0,void 0,void 0,(function(){var e,r,o,a,s,c,u;return l(this,(function(l){switch(l.label){case 0:return 0!=(32&t.$flags$)?[3,3]:(t.$flags$|=32,(i=Se(n)).then?(e=function(){},[4,i]):[3,2]);case 1:i=l.sent(),e(),l.label=2;case 2:i.isProxied||(n.$watchers$=i.watchers,me(i,n,2),i.isProxied=!0),r=E(0,n.$tagName$),t.$flags$|=8;try{new i(t)}catch(e){ke(e)}t.$flags$&=-9,t.$flags$|=128,r(),ve(t.$lazyInstance$),i.style&&(o=i.style,a=M(n),Ee.has(a)||(s=E(0,n.$tagName$),function(e,t,n){var r=Ee.get(e);x&&n?(r=r||new CSSStyleSheet).replace(t):r=t,Ee.set(e,r)}(a,o,!!(1&n.$flags$)),s())),l.label=3;case 3:return c=t.$ancestorComponent$,u=function(){return oe(t,!0)},c&&c["s-rc"]?c["s-rc"].push(u):u(),[2]}}))}))}(0,t,n)}))}r()}}(e)}))},t.prototype.disconnectedCallback=function(){var e=this;b.jmp((function(){return function(e){if(0==(1&b.$flags$)){var t=_e(e),n=t.$lazyInstance$;t.$rmListeners$&&(t.$rmListeners$.map((function(e){return e()})),t.$rmListeners$=void 0),b.$cssShim$&&b.$cssShim$.removeHost(e),fe(n,"disconnectedCallback")}}(e)}))},t.prototype.componentOnReady=function(){return _e(this).$onReadyPromise$},t}(HTMLElement);r.$lazyBundleId$=e[0],o.includes(u)||c.get(u)||(i.push(u),c.define(u,me(h,r,1)))}))})),d.innerHTML=i+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,h?h.nextSibling:u.firstChild),p=!1,f.length?f.map((function(e){return e.connectedCallback()})):b.jmp((function(){return n=setTimeout(de,30)})),r()},be=new WeakMap,_e=function(e){return be.get(e)},xe=function(e,t){return be.set(t.$lazyInstance$=e,t)},we=function(e,t){var n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return n.$onInstancePromise$=new Promise((function(e){return n.$onInstanceResolve$=e})),n.$onReadyPromise$=new Promise((function(e){return n.$onReadyResolve$=e})),e["s-p"]=[],e["s-rc"]=[],w(e,n,t.$listeners$),be.set(e,n)},Ae=function(e,t){return t in e},ke=function(e,t){return(0,console.error)(e,t)},Te=new Map,Se=function(e,t,r){var i=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$,a=Te.get(o);return a?a[i]:new Promise((e=>{e(n(26289)("./"+o+".entry.js"))})).then((function(e){return Te.set(o,e),e[i]}),ke)},Ee=new Map,Ce=[],Me=[],Oe=function(e){for(var t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ke(e)}e.length=0},Le=function(){Oe(Ce),Oe(Me),(g=Ce.length>0)&&b.raf(Le)},De=function(e){return _().then(e)},Ie=function(e,t){return function(t){e.push(t),g||(g=!0,4&b.$flags$?De(Le):b.raf(Le))}}(Me)},56387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ResizeObserver:()=>j,ResizeObserverEntry:()=>w});var r,i,o=[],a="ResizeObserver loop completed with undelivered notifications.";(i=r||(r={})).BORDER_BOX="border-box",i.CONTENT_BOX="content-box",i.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var s,l=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Object.freeze(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),c=function(e){return e instanceof SVGElement&&"getBBox"in e},u=function(e){if(c(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},h=function(e){var t,n,r=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(r&&e instanceof r.Element)},d="undefined"!=typeof window?window:{},f=new WeakMap,p=/auto|scroll/,g=/^tb|vertical/,m=/msie|trident/i.test(d.navigator&&d.navigator.userAgent),v=function(e){return parseFloat(e||"0")},y=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),Object.freeze({inlineSize:(n?t:e)||0,blockSize:(n?e:t)||0})},b=Object.freeze({devicePixelContentBoxSize:y(),borderBoxSize:y(),contentBoxSize:y(),contentRect:new l(0,0,0,0)}),_=function(e,t){if(void 0===t&&(t=!1),f.has(e)&&!t)return f.get(e);if(u(e))return f.set(e,b),b;var n=getComputedStyle(e),r=c(e)&&e.ownerSVGElement&&e.getBBox(),i=!m&&"border-box"===n.boxSizing,o=g.test(n.writingMode||""),a=!r&&p.test(n.overflowY||""),s=!r&&p.test(n.overflowX||""),h=r?0:v(n.paddingTop),d=r?0:v(n.paddingRight),_=r?0:v(n.paddingBottom),x=r?0:v(n.paddingLeft),w=r?0:v(n.borderTopWidth),A=r?0:v(n.borderRightWidth),k=r?0:v(n.borderBottomWidth),T=x+d,S=h+_,E=(r?0:v(n.borderLeftWidth))+A,C=w+k,M=s?e.offsetHeight-C-e.clientHeight:0,O=a?e.offsetWidth-E-e.clientWidth:0,L=i?T+E:0,D=i?S+C:0,I=r?r.width:v(n.width)-L-O,R=r?r.height:v(n.height)-D-M,P=I+T+O+E,N=R+S+M+C,z=Object.freeze({devicePixelContentBoxSize:y(Math.round(I*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:y(P,N,o),contentBoxSize:y(I,R,o),contentRect:new l(x,h,I,R)});return f.set(e,z),z},x=function(e,t,n){var i=_(e,n),o=i.borderBoxSize,a=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return s;case r.BORDER_BOX:return o;default:return a}},w=function(e){var t=_(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=[t.borderBoxSize],this.contentBoxSize=[t.contentBoxSize],this.devicePixelContentBoxSize=[t.devicePixelContentBoxSize]},A=function(e){if(u(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},k=function(){var e=1/0,t=[];o.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new w(t.target),i=A(t.target);r.push(n),t.lastReportedSize=x(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++)(0,r[n])();return e},T=function(e){o.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(A(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},S=[],E=0,C={attributes:!0,characterData:!0,childList:!0,subtree:!0},M=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],O=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,D=function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=O(e);!function(e){!function(e){if(!s){var t=0,n=document.createTextNode("");new MutationObserver((function(){return S.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),s=function(){n.textContent=""+(t?t--:t++)}}S.push(e),s()}((function(){requestAnimationFrame(e)}))}((function(){var r=!1;try{r=function(){var e=0;for(T(e);o.some((function(e){return e.activeTargets.length>0}));)e=k(),T(e);return o.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:a}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=a),window.dispatchEvent(e)}(),e>0}()}finally{if(L=!1,e=n-O(),!E)return;r?t.run(1e3):e>0?t.run(e):t.start()}}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,C)};document.body?t():d.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),M.forEach((function(t){return d.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),M.forEach((function(t){return d.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}(),I=new D,R=function(e){!E&&e>0&&I.start(),!(E+=e)&&I.stop()},P=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=x(this.target,this.observedBox,!0);return function(e){return!c(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),N=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},z=new WeakMap,F=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},B=function(){function e(){}return e.connect=function(e,t){var n=new N(e,t);z.set(e,n)},e.observe=function(e,t,n){var r=z.get(e),i=0===r.observationTargets.length;F(r.observationTargets,t)<0&&(i&&o.push(r),r.observationTargets.push(new P(t,n&&n.box)),R(1),I.schedule())},e.unobserve=function(e,t){var n=z.get(e),r=F(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&o.splice(o.indexOf(n),1),n.observationTargets.splice(r,1),R(-1))},e.disconnect=function(e){var t=this,n=z.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),j=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");B.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");B.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");B.unobserve(this,e)},e.prototype.disconnect=function(){B.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()},8226:(e,t,n)=>{"use strict";n.r(t),n.d(t,{revo_grid:()=>wi,revogr_data:()=>Mi,revogr_edit:()=>ji,revogr_focus:()=>$i,revogr_header:()=>so,revogr_order_editor:()=>go,revogr_overlay_selection:()=>xo,revogr_row_headers:()=>Ao,revogr_scroll_virtual:()=>So,revogr_temp_range:()=>Eo,revogr_viewport_scroll:()=>Oo});var r,i=n(14633),o=n(51476),a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},l=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof A&&(o[A.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},c=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},u=function(){this.defaultRowSize=32},h=function(){this.defaultRowSize=27},d=function(){this.defaultRowSize=42},f="default",p=[f,"material","compact","darkMaterial","darkCompact"],g=function(){function e(e){this.customRowSize=0,this.customRowSize=e.rowSize,this.register("default")}return Object.defineProperty(e.prototype,"theme",{get:function(){return this.currentTheme},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowSize",{get:function(){return this.customRowSize||this.currentTheme.defaultRowSize},set:function(e){this.customRowSize=e},enumerable:!1,configurable:!0}),e.prototype.register=function(t){switch(e.getTheme(t)){case"material":case"darkMaterial":this.currentTheme=new d;break;case"compact":case"darkCompact":this.currentTheme=new u;break;default:this.currentTheme=new h}},e.getTheme=function(e){return p.indexOf(e)>-1?e:f},e}(),m=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n},v=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}(),y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function b(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var _="object"==typeof y&&y&&y.Object===Object&&y,x="object"==typeof self&&self&&self.Object===Object&&self,w=_||x||Function("return this")(),A=w.Symbol,k=A,T=Object.prototype,S=T.hasOwnProperty,E=T.toString,C=k?k.toStringTag:void 0,M=Object.prototype.toString,O=k?k.toStringTag:void 0,L=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?function(e){var t=S.call(e,C),n=e[C];try{e[C]=void 0;var r=!0}catch(e){}var i=E.call(e);return r&&(t?e[C]=n:delete e[C]),i}(e):function(e){return M.call(e)}(e)},D=function(e){return null!=e&&"object"==typeof e},I=function(e){return D(e)&&"[object Arguments]"==L(e)},R=Object.prototype,P=R.hasOwnProperty,N=R.propertyIsEnumerable,z=I(function(){return arguments}())?I:function(e){return D(e)&&P.call(e,"callee")&&!N.call(e,"callee")},F=z,B=Array.isArray,j=function(){return!1},U=b((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?w.Buffer:void 0,o=(i?i.isBuffer:void 0)||j;e.exports=o})),V=/^(?:0|[1-9]\d*)$/,q=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&V.test(e))&&e>-1&&e%1==0&&e<t},H=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$["[object Arguments]"]=$["[object Array]"]=$["[object ArrayBuffer]"]=$["[object Boolean]"]=$["[object DataView]"]=$["[object Date]"]=$["[object Error]"]=$["[object Function]"]=$["[object Map]"]=$["[object Number]"]=$["[object Object]"]=$["[object RegExp]"]=$["[object Set]"]=$["[object String]"]=$["[object WeakMap]"]=!1;var W=b((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&_.process,o=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})),G=W&&W.isTypedArray,Y=G?function(e){return function(t){return e(t)}}(G):function(e){return D(e)&&H(e.length)&&!!$[L(e)]},X=Object.prototype.hasOwnProperty,Z=function(e,t){var n=B(e),r=!n&&F(e),i=!n&&!r&&U(e),o=!n&&!r&&!i&&Y(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!X.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||q(c,l))||s.push(c);return s},K=Object.prototype,J=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Q=Object.prototype.hasOwnProperty,ee=function(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||K)}(e))return J(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t},te=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ne=function(e){if(!te(e))return!1;var t=L(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},re=function(e){return null!=e&&H(e.length)&&!ne(e)},ie=function(e){return re(e)?Z(e):ee(e)},oe=function(e,t){return function(n,r){if(null==n)return n;if(!re(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(e,t){return e&&v(e,t,ie)})),ae=function(e,t){return e===t||e!=e&&t!=t},se=function(e,t){for(var n=e.length;n--;)if(ae(e[n][0],t))return n;return-1},le=Array.prototype.splice;function ce(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ce.prototype.clear=function(){this.__data__=[],this.size=0},ce.prototype.delete=function(e){var t=this.__data__,n=se(t,e);return!(n<0||(n==t.length-1?t.pop():le.call(t,n,1),--this.size,0))},ce.prototype.get=function(e){var t=this.__data__,n=se(t,e);return n<0?void 0:t[n][1]},ce.prototype.has=function(e){return se(this.__data__,e)>-1},ce.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ue=ce,he=w["__core-js_shared__"],de=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),fe=Function.prototype.toString,pe=function(e){if(null!=e){try{return fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ge=/^\[object .+?Constructor\]$/,me=Function.prototype,ve=Object.prototype,ye=me.toString,be=ve.hasOwnProperty,_e=RegExp("^"+ye.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=function(e){return!(!te(e)||function(e){return!!de&&de in e}(e))&&(ne(e)?_e:ge).test(pe(e))},we=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xe(n)?n:void 0},Ae=we(w,"Map"),ke=we(Object,"create"),Te=Object.prototype.hasOwnProperty,Se=Object.prototype.hasOwnProperty;function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ee.prototype.clear=function(){this.__data__=ke?ke(null):{},this.size=0},Ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ee.prototype.get=function(e){var t=this.__data__;if(ke){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return ke?void 0!==t[e]:Se.call(t,e)},Ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ke&&void 0===t?"__lodash_hash_undefined__":t,this};var Ce=Ee,Me=function(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map};function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(Ae||ue),string:new Ce}},Oe.prototype.delete=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return Me(this,e).get(e)},Oe.prototype.has=function(e){return Me(this,e).has(e)},Oe.prototype.set=function(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Le=Oe;function De(e){var t=this.__data__=new ue(e);this.size=t.size}De.prototype.clear=function(){this.__data__=new ue,this.size=0},De.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ue){var r=n.__data__;if(!Ae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Le(r)}return n.set(e,t),this.size=n.size,this};var Ie=De;function Re(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Le;++t<n;)this.add(e[t])}Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Re.prototype.has=function(e){return this.__data__.has(e)};var Pe=Re,Ne=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ze=function(e,t){return e.has(t)},Fe=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=2&n?new Pe:void 0;for(o.set(e,t),o.set(t,e);++h<s;){var p=e[h],g=t[h];if(r)var m=a?r(g,p,h,t,e,o):r(p,g,h,e,t,o);if(void 0!==m){if(m)continue;d=!1;break}if(f){if(!Ne(t,(function(e,t){if(!ze(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d},Be=w.Uint8Array,je=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ue=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ve=k?k.prototype:void 0,qe=Ve?Ve.valueOf:void 0,He=Object.prototype.propertyIsEnumerable,$e=Object.getOwnPropertySymbols,We=$e?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}($e(e),(function(t){return He.call(e,t)})))}:function(){return[]},Ge=We,Ye=function(e){return function(e,t,n){var r=t(e);return B(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,ie,Ge)},Xe=Object.prototype.hasOwnProperty,Ze=we(w,"DataView"),Ke=we(w,"Promise"),Je=we(w,"Set"),Qe=we(w,"WeakMap"),et="[object Map]",tt="[object Promise]",nt="[object Set]",rt="[object WeakMap]",it="[object DataView]",ot=pe(Ze),at=pe(Ae),st=pe(Ke),lt=pe(Je),ct=pe(Qe),ut=L;(Ze&&ut(new Ze(new ArrayBuffer(1)))!=it||Ae&&ut(new Ae)!=et||Ke&&ut(Ke.resolve())!=tt||Je&&ut(new Je)!=nt||Qe&&ut(new Qe)!=rt)&&(ut=function(e){var t=L(e),n="[object Object]"==t?e.constructor:void 0,r=n?pe(n):"";if(r)switch(r){case ot:return it;case at:return et;case st:return tt;case lt:return nt;case ct:return rt}return t});var ht=ut,dt="[object Arguments]",ft="[object Array]",pt="[object Object]",gt=Object.prototype.hasOwnProperty,mt=function(e,t,n,r,i,o){var a=B(e),s=B(t),l=a?ft:ht(e),c=s?ft:ht(t),u=(l=l==dt?pt:l)==pt,h=(c=c==dt?pt:c)==pt,d=l==c;if(d&&U(e)){if(!U(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new Ie),a||Y(e)?Fe(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ae(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=je;case"[object Set]":var l=1&r;if(s||(s=Ue),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Fe(s(e),s(t),r,i,o,a);return a.delete(e),u;case"[object Symbol]":if(qe)return qe.call(e)==qe.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var f=u&&gt.call(e,"__wrapped__"),p=h&&gt.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return o||(o=new Ie),i(g,m,n,r,o)}}return!!d&&(o||(o=new Ie),function(e,t,n,r,i,o){var a=1&n,s=Ye(e),l=s.length;if(l!=Ye(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Xe.call(t,u)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var g=e[u=s[c]],m=t[u];if(r)var v=a?r(m,g,u,t,e,o):r(g,m,u,e,t,o);if(!(void 0===v?g===m||i(g,m,n,r,o):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))},vt=function e(t,n,r,i,o){return t===n||(null==t||null==n||!D(t)&&!D(n)?t!=t&&n!=n:mt(t,n,r,i,e,o))},yt=function(e){return e==e&&!te(e)},bt=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},_t=function(e){var t=function(e){for(var t=ie(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,yt(i)]}return t}(e);return 1==t.length&&t[0][2]?bt(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var h=new Ie;if(r)var d=r(c,u,l,e,t,h);if(!(void 0===d?vt(u,c,3,r,h):d))return!1}}return!0}(n,e,t)}},xt=function(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==L(e)},wt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,At=/^\w*$/,kt=function(e,t){if(B(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!xt(e))||At.test(e)||!wt.test(e)||null!=t&&e in Object(t)};function Tt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tt.Cache||Le),n}Tt.Cache=Le;var St=Tt,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ct=/\\(\\)?/g,Mt=function(e){var t=St(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Et,(function(e,n,r,i){t.push(r?i.replace(Ct,"$1"):n||e)})),t})),Ot=Mt,Lt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Dt=k?k.prototype:void 0,It=Dt?Dt.toString:void 0,Rt=function e(t){if("string"==typeof t)return t;if(B(t))return Lt(t,e)+"";if(xt(t))return It?It.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Pt=function(e){return null==e?"":Rt(e)},Nt=function(e,t){return B(e)?e:kt(e,t)?[e]:Ot(Pt(e))},zt=function(e){if("string"==typeof e||xt(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Ft=function(e,t){for(var n=0,r=(t=Nt(t,e)).length;null!=e&&n<r;)e=e[zt(t[n++])];return n&&n==r?e:void 0},Bt=function(e,t){return null!=e&&t in Object(e)},jt=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=Nt(t,e)).length,o=!1;++r<i;){var a=zt(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&H(i)&&q(a,i)&&(B(e)||F(e))}(e,t,Bt)},Ut=function(e,t){return kt(e)&&yt(t)?bt(zt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Ft(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?jt(n,e):vt(t,r,3)}},Vt=function(e){return e},qt=function(e){return function(t){return null==t?void 0:t[e]}},Ht=function(e){return kt(e)?qt(zt(e)):function(e){return function(t){return Ft(t,e)}}(e)},$t=function(e){return"function"==typeof e?e:null==e?Vt:"object"==typeof e?B(e)?Ut(e[0],e[1]):_t(e):Ht(e)},Wt=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n},Gt=function(e,t,n){var r=B(e)?m:Wt,i=arguments.length<3;return r(e,$t(t),n,i,oe)},Yt=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Xt=function(e,t){return(B(e)?Yt:oe)(e,function(e){return"function"==typeof e?e:Vt}(t))},Zt=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1},Kt=/\s/,Jt=/^\s+/,Qt=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Kt.test(e.charAt(t)););return t}(e)+1).replace(Jt,""):e},en=/^[-+]0x[0-9a-f]+$/i,tn=/^0b[01]+$/i,nn=/^0o[0-7]+$/i,rn=parseInt,on=function(e){if("number"==typeof e)return e;if(xt(e))return NaN;if(te(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=te(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=tn.test(e);return n||nn.test(e)?rn(e.slice(2),n?2:8):en.test(e)?NaN:+e},an=function(e){return e?Infinity===(e=on(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},sn=function(e){var t=an(e),n=t%1;return t==t?n?t-n:t:0},ln=Math.max,cn=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:sn(n);return i<0&&(i=ln(r+i,0)),Zt(e,$t(t),i)},un=function(e){return function(t,n,r){var i=Object(t);if(!re(t)){var o=$t(n);t=ie(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}(cn),hn=function(e){return!("isConnected"in e)||e.isConnected},dn=function(e,t){var n;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];n&&clearTimeout(n),n=setTimeout((function(){n=0,e.apply(void 0,t)}),2e3)}}((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(hn))}})),fn=function(e,t){var n=function(e,t){void 0===t&&(t=function(e,t){return e!==t});var n=new Map(Object.entries(null!=e?e:{})),r={dispose:[],get:[],set:[],reset:[]},i=function(){n=new Map(Object.entries(null!=e?e:{})),r.reset.forEach((function(e){return e()}))},o=function(e){return r.get.forEach((function(t){return t(e)})),n.get(e)},a=function(e,i){var o=n.get(e);t(i,o,e)&&(n.set(e,i),r.set.forEach((function(t){return t(e,i,o)})))},s="undefined"==typeof Proxy?{}:new Proxy(e,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(e,t){return n.has(t)},set:function(e,t,n){return a(t,n),!0}}),l=function(e,t){return r[e].push(t),function(){!function(e,t){var n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.length--)}(r[e],t)}};return{state:s,get:o,set:a,on:l,onChange:function(t,n){var r=l("set",(function(e,r){e===t&&n(r)})),i=l("reset",(function(){return n(e[t])}));return function(){r(),i()}},use:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){e.set&&l("set",e.set),e.get&&l("get",e.get),e.reset&&l("reset",e.reset)}))},dispose:function(){r.dispose.forEach((function(e){return e()})),i()},reset:i}}(e,t);return function(e){var t=e.on,n=new Map;"function"==typeof i.g&&(t("dispose",(function(){n.clear()})),t("get",(function(e){var t=(0,i.g)();t&&function(e,t,n){var r=e.get(t);r?r.includes(n)||r.push(n):e.set(t,[n])}(n,e,t)})),t("set",(function(e){var t=n.get(e);t&&n.set(e,t.filter(i.f)),dn(n)})),t("reset",(function(){n.forEach((function(e){return e.forEach(i.f)})),dn(n)})))}(n),n},pn=Math.ceil,gn=Math.max,mn=function(e,t,n){if(!te(n))return!1;var r=typeof t;return!!("number"==r?re(n)&&q(t,n.length):"string"==r&&t in n)&&ae(n[t],e)},vn=function(e){return function(t,n,r){return r&&"number"!=typeof r&&mn(t,n,r)&&(n=r=void 0),t=an(t),void 0===n?(n=t,t=0):n=an(n),function(e,t,n,r){for(var i=-1,o=gn(pn((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:an(r),e)}}();function yn(e,t){for(var n in t)e.set(n,t[n])}var bn=function(){function e(e){var t=this.dataStore=fn({items:[],proxyItems:[],source:[],groupingDepth:0,groups:{},type:e,trimmed:{}});t.use(function(e){return{set:function(t,n){if(function(e){return"proxyItems"===e}(t)){var r=e.get("items").reduce((function(e,t){return e[t]=!0,e}),{}),i=n.reduce((function(e,t){return r[t]&&e.push(t),e}),[]);e.set("items",i)}}}}(t)),t.use(function(e){return{set:function(t,n){if("trimmed"===t){var r=e.get("proxyItems"),i=function(e){var t={};for(var n in e)for(var r in e[n])t[r]=t[r]||e[n][r];return t}(n),o=r.reduce((function(e,t){return i[t]||e.push(t),e}),[]);e.set("items",o)}}}}(t))}return Object.defineProperty(e.prototype,"store",{get:function(){return this.dataStore},enumerable:!1,configurable:!0}),e.prototype.updateData=function(e,t,n){void 0===n&&(n=!1),n||this.store.set("trimmed",{}),this.store.set("items",[]);var r=vn(0,(null==e?void 0:e.length)||0);yn(this.store,{source:e,proxyItems:c([],r)}),this.store.set("items",r),t&&yn(this.store,{groupingDepth:t.depth,groups:t.groups})},e.prototype.addTrimmed=function(e){var t=this.store.get("trimmed");t=Object.assign(Object.assign({},t),e),yn(this.store,{trimmed:t})},e.prototype.setData=function(e){var t=Object.assign({},e);yn(this.store,t)},e.prototype.refresh=function(){var e=this.store.get("source");this.store.set("source",c([],e))},e}();function _n(e){var t=e.get("source");return e.get("items").map((function(e){return t[e]}))}function xn(e,t){var n=e.get("items");return e.get("source")[n[t]]}function wn(e,t){var n=e.get("items"),r=e.get("source");for(var i in t)r[n[i]]=t[i];e.set("source",c([],r))}function An(e,t){e.set("items",t)}var kn=["rowPinStart","rgRow","rowPinEnd"],Tn=["colPinStart","rgCol","colPinEnd"],Sn=function(e,t){var n=-1,r=re(e)?Array(e.length):[];return oe(e,(function(e,i,o){r[++n]=t(e,i,o)})),r},En=function(e,t){return(B(e)?Lt:Sn)(e,$t(t))},Cn=function(){function e(e){this.revogrid=e,this.subscriptions={}}return e.prototype.addEventListener=function(e,t){this.revogrid.addEventListener(e,t),this.subscriptions[e]=t},e.prototype.removeEventListener=function(e){this.revogrid.removeEventListener(e,this.subscriptions[e]),delete this.subscriptions[e]},e.prototype.emit=function(e,t){var n=new CustomEvent(e,{detail:t,cancelable:!0});return this.revogrid.dispatchEvent(n),n},e.prototype.clearSubscriptions=function(){for(var e in this.subscriptions)this.removeEventListener(e)},e.prototype.destroy=function(){this.clearSubscriptions()},e}(),Mn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.gatherGroup=function(e,t,n,r){var i;void 0===r&&(r=0);var o=Object.assign(Object.assign({},t),{level:r,ids:[]});for(var a in n.columns){var s=a,l=e.columns[s],c=n.columns[s];B(l)&&B(c)&&(l.push.apply(l,c),c.length&&e.columnGrouping[s].push(Object.assign(Object.assign({},o),{ids:En(c,"prop")})))}for(var a in n.columnGrouping)s=a,c=n.columnGrouping[s],(i=e.columnGrouping[s]).push.apply(i,c);return e.maxLevel=Math.max(e.maxLevel,n.maxLevel),e},t.isColGrouping=function(e){return!!e.children},t}(Cn),On=function(){function e(){this.sorting=null,this.dataSources=Gt(Tn,(function(e,t){return e[t]=new bn(t),e}),{})}return Object.defineProperty(e.prototype,"order",{get:function(){return Gt(this.sorting,(function(e,t,n){return e[n]=t.order,e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stores",{get:function(){return this.dataSources},enumerable:!1,configurable:!0}),e.prototype.column=function(e,t){return this.getColumn(e,t||"rgCol")},e.prototype.getColumn=function(e,t){return xn(this.dataSources[t].store,e)},e.prototype.getRawColumns=function(){return Gt(this.dataSources,(function(e,t,n){return e[n]=t.store.get("source"),e}),{rgCol:[],colPinStart:[],colPinEnd:[]})},e.prototype.getColumns=function(e){var t=this;return void 0===e&&(e="all"),"all"!==e?this.dataSources[e].store.get("source"):Tn.reduce((function(e,n){return e.push.apply(e,t.dataSources[n].store.get("source")),e}),[])},e.prototype.getColumnIndexByProp=function(e,t){return function(e,t){var n=e.get("items"),r=e.get("source"),i=cn(r,{prop:t});return n.indexOf(i)}(this.dataSources[t].store,e)},e.prototype.getColumnByProp=function(e,t){var n=this.dataSources[t].store.get("source");return un(n,{prop:e})},e.prototype.refreshByType=function(e){this.dataSources[e].refresh()},e.prototype.setColumns=function(e){var t=this;return Xt(Tn,(function(n){t.dataSources[n].updateData(e.columns[n],{depth:e.maxLevel,groups:Gt(e.columnGrouping[n],(function(e,t){return e[t.level]||(e[t.level]=[]),e[t.level].push(t),e}),{})})})),this.sorting=e.sort,e},e.prototype.updateColumns=function(t){var n=this,r=t.reduce((function(t,n){var r=e.getColumnType(n);return t[r]||(t[r]={}),t[r][n.prop]=n,t}),{}),i={};Xt(r,(function(e,t){var r=n.dataSources[t].store.get("source");i[t]=r.reduce((function(t,n,r){var i=e[n.prop];return i&&(t[r]=i),t}),{})})),Xt(i,(function(e,t){return wn(n.dataSources[t].store,e)}))},e.prototype.updateColumn=function(t,n){var r,i=e.getColumnType(t);wn(this.dataSources[i].store,((r={})[n]=t,r))},e.prototype.updateColumnSorting=function(e,t,n,r){return r||this.clearSorting(),e.order=n,this.sorting[e.prop]=e,this.updateColumn(e,t),e},e.prototype.clearSorting=function(){var t=this,n=Gt(this.sorting,(function(t,n){return t[e.getColumnType(n)]=!0,t}),{});Xt(n,(function(e,n){var r=t.dataSources[n].store.get("source");Xt(r,(function(e){return e.order=void 0})),t.dataSources[n].setData({source:c([],r)})})),this.sorting={}},e.getSizes=function(e){return Gt(e,(function(e,t,n){return t.size&&(e[n]=t.size),e}),{})},e.getColumnByProp=function(t,n){return un(t,(function(t){return Mn.isColGrouping(t)?e.getColumnByProp(t.children,n):t.prop===n}))},e.getColumns=function(t,n,r){return void 0===n&&(n=0),Gt(t,(function(t,i){if(Mn.isColGrouping(i))return Mn.gatherGroup(t,i,e.getColumns(i.children,n+1,r),n);var o=Object.assign(Object.assign({},i.columnType&&r&&r[i.columnType]),i);return o.pin?t.columns[o.pin].push(o):t.columns.rgCol.push(o),o.order&&(t.sort[o.prop]=o),o.beforeSetup&&o.beforeSetup(o),t}),{columns:{rgCol:[],colPinStart:[],colPinEnd:[]},columnGrouping:{rgCol:[],colPinStart:[],colPinEnd:[]},maxLevel:n,sort:{}})},e.getColumnType=function(e){return e.pin?e.pin:"rgCol"},e}(),Ln=function(){function e(e){this.dimensionProvider=e,this.stores=Gt(kn,(function(e,t){return e[t]=new bn(t),e}),{})}return e.prototype.setData=function(e,t,n,r){return void 0===t&&(t="rgRow"),void 0===r&&(r=!1),this.stores[t].updateData(c([],e),n,r),this.dimensionProvider.setData(e,t,"rgRow"!==t),e},e.prototype.getModel=function(e,t){return void 0===t&&(t="rgRow"),xn(this.stores[t].store,e)},e.prototype.setCellData=function(e){var t,n=e.type,r=e.rowIndex,i=e.prop,o=e.val,a=this.getModel(r,n);a[i]=o,wn(this.stores[n].store,((t={})[r]=a,t))},e.prototype.refresh=function(e){var t=this;void 0===e&&(e="all"),function(e){return kn.indexOf(e)>-1}(e)&&this.refreshItems(e),kn.forEach((function(e){return t.refreshItems(e)}))},e.prototype.refreshItems=function(e){void 0===e&&(e="rgRow");var t=this.stores[e].store.get("items");this.stores[e].setData({items:c([],t)})},e.prototype.setGrouping=function(e,t){var n=e.depth;void 0===t&&(t="rgRow"),this.stores[t].setData({groupingDepth:n})},e.prototype.setTrimmed=function(e,t){void 0===t&&(t="rgRow");var n=this.stores[t];n.addTrimmed(e),"rgRow"===t&&this.dimensionProvider.setData(_n(n.store),t)},e}(),Dn=Math.floor,In=Math.min,Rn=function(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!xt(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return function(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,s=null===t,l=xt(t),c=void 0===t;i<o;){var u=Dn((i+o)/2),h=n(e[u]),d=void 0!==h,f=null===h,p=h==h,g=xt(h);if(a)var m=r||p;else m=c?p&&(r||d):s?p&&d&&(r||!f):l?p&&d&&!f&&(r||!g):!f&&!g&&(r?h<=t:h<t);m?i=u+1:o=u}return In(o,4294967294)}(e,t,Vt,n)},Pn=function(e,t){return Rn(e,t)};function Nn(e,t){return e<t}function zn(e){var t=e.createElement("div"),n=t.style;n.visibility="hidden",n.overflow="scroll",n.msOverflowStyle="scrollbar",e.body.appendChild(t);var r=e.createElement("div");t.appendChild(r);var i=t.offsetWidth-r.offsetWidth;return t.parentNode.removeChild(t),i}function Fn(e,t,n){return(n[1]-n[0])*(e-t[0])/(t[1]-t[0])+n[0]}function Bn(e){return void 0===e&&(e=0),s(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){setTimeout((function(){return t()}),e)}))];case 1:return t.sent(),[2]}}))}))}function jn(e,t){var n=e.indexes,r=e.positionIndexes,i=e.originItemSize,o=e.positionIndexToItem,a={itemIndex:0,start:0,end:0},s=n.length?Pn(r,t):0;if(!s)return a.itemIndex=Math.floor(t/i),a.start=a.itemIndex*i,a.end=a.start+i,a;var l=o[s-1];if(l.end>t)return l;var c=t-l.end,u=Math.floor(c/i);return a.itemIndex=l.itemIndex+1+u,a.start=l.end+u*i,a.end=a.start+i,a}function Un(e,t){var n={itemIndex:t,start:0,end:0};if(e.indexToItem[t])return e.indexToItem[t];var r=e.indexes.length?Pn(e.indexes,t):0;if(!r)return n.start=n.itemIndex*e.originItemSize,n.end=n.start+e.originItemSize,n;var i=e.indexToItem[e.indexes[r-1]];return n.start=i.end+(t-i.itemIndex-1)*e.originItemSize,n.end=n.start+e.originItemSize,n}function Vn(){return Object.assign(Object.assign({},{indexes:[],sizes:{},positionIndexToItem:{},indexToItem:{},positionIndexes:[]}),{realSize:0,originItemSize:0,frameOffset:0})}var qn=function(){function e(){this.store=fn(Vn())}return e.prototype.getCurrentState=function(){var e=this,t=Vn(),n=Object.keys(t);return Gt(n,(function(t,n){var r=e.store.get(n);return t[n]=r,t}),t)},e.prototype.setRealSize=function(e){for(var t=0,n=0;n<e;n++)t+=this.store.get("sizes")[n]||this.store.get("originItemSize");yn(this.store,{realSize:t})},e.prototype.setStore=function(e){yn(this.store,e)},e.prototype.drop=function(){yn(this.store,{indexes:[],sizes:{},positionIndexToItem:{},indexToItem:{},positionIndexes:[]})},e.prototype.setDimensionSize=function(e){var t=function(e,t){var n=[],r={},i={},o=0,a=Object.assign(Object.assign({},e.sizes),t),s=[];Xt(t,(function(t,n){e.sizes[n]?o+=t-e.sizes[n]:(o+=t-(e.realSize?e.originItemSize:0),s.splice(Pn(s,parseInt(n,10)),0,parseInt(n,10)))}));var l=function(e,t,n){void 0===n&&(n=Nn);for(var r=[],i=0,o=0,a=0;a<e.length+t.length;){var s=i>=e.length,l=o>=t.length;s||!l&&!n(e[i],t[o])?(r[a]=t[o],o++):(r[a]=e[i],i++),a++}return r}(e.indexes,s);return Gt(l,(function(t,o,s){var l={itemIndex:o,start:0,end:0};return l.start=t?(o-t.itemIndex-1)*e.originItemSize+t.end:o*e.originItemSize,l.end=l.start+a[o],n.push(l.start),i[o]=r[s]=l,l}),void 0),{indexes:l,positionIndexes:c([],n),positionIndexToItem:Object.assign({},r),indexToItem:i,realSize:e.realSize+o,sizes:a}}(this.getCurrentState(),e);return yn(this.store,t),t},e}(),Hn=function(){function e(e){this.viewports=e,this.stores=Gt(c(c([],kn),Tn),(function(e,t){return e[t]=new qn,e}),{})}return e.prototype.setDimensionSize=function(e,t){this.stores[e].setDimensionSize(t),this.viewports.stores[e].setViewPortDimension(t)},e.prototype.setRealSize=function(e,t){this.viewports.stores[t].setViewport({realCount:e}),this.stores[t].setRealSize(e)},e.prototype.setData=function(e,t,n){void 0===n&&(n=!1),this.setRealSize(e.length,t),n&&this.setNoVirtual(t),this.setViewPortCoordinate({coordinate:this.viewports.stores[t].store.get("lastCoordinate"),type:t})},e.prototype.setNoVirtual=function(e){var t=this.stores[e].getCurrentState();this.viewports.stores[e].setViewport({virtualSize:t.realSize})},e.prototype.drop=function(){for(var e=0,t=Tn;e<t.length;e++){var n=t[e];this.stores[n].drop()}},e.prototype.setColumns=function(e,t,n){void 0===n&&(n=!1),this.stores[e].setDimensionSize(t),n&&this.setNoVirtual(e),this.setViewPortCoordinate({coordinate:this.viewports.stores[e].store.get("lastCoordinate"),type:e})},e.prototype.setViewPortCoordinate=function(e){var t=e.coordinate,n=e.type,r=this.stores[n].getCurrentState();this.viewports.stores[n].setViewPortCoordinate(t,r)},e.prototype.getViewPortPos=function(e){return Un(this.stores[e.dimension].getCurrentState(),e.coordinate).start},e.prototype.setSettings=function(e,t){var n=[];switch(t){case"rgCol":n=Tn;break;case"rgRow":n=kn}for(var r=0,i=n;r<i.length;r++){var o=i[r];this.stores[o].setStore(e)}},e}();function $n(e,t,n){e.splice.apply(e,c([n.end+1,0],t)),n.start>=n.end&&(n.start!==n.end||0!==n.start)&&(n.start+=t.length),n.end+=t.length}function Wn(e,t,n,r,i){var o=Zn(r);return Gn({sizes:i.sizes,start:o.end,startIndex:o.itemIndex+1,origSize:i.originItemSize,maxSize:n-(o.end-e.start),maxCount:t})}function Gn(e,t){void 0===t&&(t=0);for(var n=[],r=e.startIndex,i=t;i<=e.maxSize&&r<e.maxCount;){var o=Yn(r,e.sizes,e.origSize);n.push({start:e.start+i,end:e.start+i+o,itemIndex:r,size:o}),i+=o,r++}return n}function Yn(e,t,n){return void 0===n&&(n=0),t&&t[e]?t[e]:n}function Xn(e){return e.items[e.start]}function Zn(e){return e.items[e.end]}var Kn,Jn=function(){function e(){var e=this;this.store=fn({items:[],start:0,end:0,virtualSize:0,realCount:0,lastCoordinate:0}),this.store.onChange("realCount",(function(){return e.clear()}))}return e.prototype.setViewPortCoordinate=function(e,t){var n=this.store.get("virtualSize");if(n){var r=t.frameOffset,i=n+=2*r*t.originItemSize;t.realSize>n&&(i=t.realSize-n);var o={lastCoordinate:e},a=e;a=(a-=r*t.originItemSize)<0?0:a<i?a:i;var s=Xn(this.getItems()),l=Zn(this.getItems());if(function(e,t){return t&&e>=t.start&&e<=t.end}(a,s)){if(s&&this.store.get("virtualSize")+a>(null==l?void 0:l.end)){var u=Wn(s,this.store.get("realCount"),n+a-s.start,this.getItems(),t);if(u.length){var h=c([],this.store.get("items")),d={start:this.store.get("start"),end:this.store.get("end")};$n(h,u,d),o=Object.assign(Object.assign(Object.assign({},o),{items:c([],h)}),d),yn(this.store,Object.assign({},o))}}}else o=Object.assign(Object.assign({},o),function(e,t,n,r,i){var o,a=jn(i,e),s=Xn(t);if(s){var l=a.itemIndex-(s.itemIndex||0);if(l){var u=function(e,t){var n=c([],t.items),r=n.length,i={start:t.start,end:t.end};if(e>r)return null;if(t.positiveDirection)for(var o=Zn(t),a=(d=i.start)+e;d<a;d++){var s=Yn(f=o.itemIndex+1,t.sizes,t.originItemSize);if(o.end+s>t.realSize)break;var l=d%r;if(!n[l])throw new Error("incorrect index");n[l]=o={start:o.end,end:o.end+s,itemIndex:f,size:s},i.start++,i.end=l}else for(var u=Xn(t),h=i.end,d=0;d<e;d++){var f,p=Yn(f=u.itemIndex-1,t.sizes,t.originItemSize),g=h-d;if(!n[g=(g<0?r+g:g)%r])throw new Error("incorrect index");n[g]=u={start:u.start-p,end:u.start,itemIndex:f,size:p},i.start=g,i.end--}var m={start:(i.start<0?r+i.start:i.start)%r,end:(i.end<0?r+i.end:i.end)%r};return Object.assign({items:n},m)}(Math.abs(l),Object.assign(Object.assign({positiveDirection:l>-1},i),t));if(u&&(o=u),o){var h=Wn(a,n,r,o,i);h.length&&$n(o.items,h,o)}}}if(!o){var d=Gn({start:a.start,startIndex:a.itemIndex,origSize:i.originItemSize,maxSize:r,maxCount:n,sizes:i.sizes});o={items:d,start:0,end:d.length-1}}return o}(a,this.getItems(),this.store.get("realCount"),n,t)),yn(this.store,Object.assign({},o))}},e.prototype.setViewPortDimension=function(e){var t=this.store.get("items"),n=t.length;if(n){for(var r=0,i=0,o=this.store.get("start");i<n;){var a=t[o];r&&(a.start+=r,a.end+=r);var s=e[a.itemIndex];s&&(r+=s-a.size,a.size=s,a.end=a.start+s),i++,++o===n&&(o=0)}yn(this.store,{items:c([],t)})}},e.prototype.getItems=function(){return{items:this.store.get("items"),start:this.store.get("start"),end:this.store.get("end")}},e.prototype.setViewport=function(e){yn(this.store,e)},e.prototype.clear=function(){this.store.set("items",[])},e}(),Qn=function(){function e(){this.stores=Gt(c(c([],kn),Tn),(function(e,t){return e[t]=new Jn,e}),{})}return e.prototype.setViewport=function(e,t){this.stores[e].setViewport(t)},e}();!function(e){e.headerClickAutosize="headerClickAutoSize",e.autoSizeOnTextOverlap="autoSizeOnTextOverlap",e.autoSizeAll="autoSizeAll"}(Kn||(Kn={}));var er=function(e){function t(t,n,r){var i=e.call(this,t)||this;i.providers=n,i.config=r,i.autoSizeColumns=null,i.dataResolve=null,i.dataReject=null,i.letterBlockSize=(null==r?void 0:r.letterBlockSize)||7,(null==r?void 0:r.preciseSize)&&(i.precsizeCalculationArea=i.initiatePresizeElement(),t.appendChild(i.precsizeCalculationArea));var o=function(e){var t=e.detail.source;i.setSource(t)};switch(i.addEventListener("beforecolumnsset",(function(e){var t=e.detail.columns;i.columnSet(t)})),null==r?void 0:r.mode){case Kn.autoSizeOnTextOverlap:i.addEventListener("aftersourceset",o),i.addEventListener("afteredit",(function(e){var t=e.detail;i.afteredit(t)}));break;case Kn.autoSizeAll:i.addEventListener("aftersourceset",o),i.addEventListener("afteredit",(function(e){var t=e.detail;i.afterEditAll(t)}));break;default:i.addEventListener("headerdblClick",(function(e){var t,n=e.detail,r=On.getColumnType(n),o=i.getColumnSize(n.index,r);o&&i.providers.dimensionProvider.setDimensionSize(r,((t={})[n.index]=o,t))}))}return i}return a(t,e),t.prototype.setSource=function(e){return s(this,void 0,void 0,(function(){var t,n,r=this;return l(this,(function(i){switch(i.label){case 0:if(t=this.autoSizeColumns,this.dataReject&&(this.dataReject(),this.clearPromise()),t)return[3,4];n=new Promise((function(e,t){r.dataResolve=e,r.dataReject=t})),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return t=i.sent(),[3,4];case 3:return i.sent(),[2];case 4:return Xt(t,(function(n,i){var o={};Xt(t[i],(function(t){t.size=o[t.index]=e.reduce((function(e,n){return Math.max(e,r.getLength(n[t.prop]))}),0)})),r.providers.dimensionProvider.setDimensionSize(i,o)})),[2]}}))}))},t.prototype.getLength=function(e){var t;if(!e)return 0;try{var n=e.toString();return(null===(t=this.config)||void 0===t?void 0:t.preciseSize)?(this.precsizeCalculationArea.innerText=n,this.precsizeCalculationArea.scrollWidth+30):n.length*this.letterBlockSize+30}catch(e){return 0}},t.prototype.afteredit=function(e){var t,n,r=this;n=this.isRangeEdit(e)?e.data:{0:(t={},t[e.prop]=e.val,t)},Xt(this.autoSizeColumns,(function(e,t){var i={};Xt(e,(function(e){var t=Gt(n,(function(t,n){return void 0===n[e.prop]?t:Math.max(t||0,r.getLength(n[e.prop]))}),void 0);t&&e.size<t&&(e.size=i[e.index]=t)})),r.providers.dimensionProvider.setDimensionSize(t,i)}))},t.prototype.afterEditAll=function(e){var t=this,n={};this.isRangeEdit(e)?Xt(e.data,(function(e){return Xt(e,(function(e,t){return n[t]=!0}))})):n[e.prop]=!0,Xt(this.autoSizeColumns,(function(e,r){var i={};Xt(e,(function(e){if(n[e.prop]){var o=t.getColumnSize(e.index,r);o&&(i[e.index]=o)}})),t.providers.dimensionProvider.setDimensionSize(r,i)}))},t.prototype.getColumnSize=function(e,t){var n=this,r=this.autoSizeColumns[t][e];return r?Gt(this.providers.dataProvider.stores,(function(e,t){var i=Gt(t.store.get("items"),(function(e,i,o){var a=xn(t.store,o);return Math.max(e||0,n.getLength(a[r.prop]))}),0);return Math.max(e,i)}),r.size||0):0},t.prototype.columnSet=function(e){for(var t,n=0,r=Tn;n<r.length;n++){var i=r[n],o=e[i];for(var a in o)(o[a].autoSize||(null===(t=this.config)||void 0===t?void 0:t.allColumns))&&(this.autoSizeColumns||(this.autoSizeColumns={}),this.autoSizeColumns[i]||(this.autoSizeColumns[i]={}),this.autoSizeColumns[i][a]=Object.assign(Object.assign({},o[a]),{index:parseInt(a,10)}))}this.dataResolve&&(this.dataResolve(this.autoSizeColumns),this.clearPromise())},t.prototype.clearPromise=function(){this.dataResolve=null,this.dataReject=null},t.prototype.isRangeEdit=function(e){return!!e.data},t.prototype.initiatePresizeElement=function(){var e={position:"absolute",fontSize:"14px",height:"0",width:"0",whiteSpace:"nowrap",top:"0",overflowX:"scroll"},t=document.createElement("div");for(var n in e)t.style[n]=e[n];return t.classList.add("revo-test-container"),t},t.prototype.destroy=function(){var t;e.prototype.destroy.call(this),null===(t=this.precsizeCalculationArea)||void 0===t||t.remove()},t}(Cn),tr=function(e,t){return void 0===e||null===e&&!t||("string"!=typeof e&&(e=JSON.stringify(e)),e.toLocaleLowerCase()===t)},nr=function(e,t){return!tr(e,t)};nr.extra="input",tr.extra="input";var rr=function(e,t){return"number"==typeof e&&e>parseFloat(null==t?void 0:t.toString())};rr.extra="input";var ir=function(e,t){return tr(e,t)||rr(e,t)};ir.extra="input";var or=function(e,t){return"number"==typeof e&&e<parseFloat(null==t?void 0:t.toString())};or.extra="input";var ar=function(e,t){return tr(e,t)||or(e,t)};ar.extra="input";var sr=function(e){return!(""===e||null==e)},lr=function(e,t){return!(!e||t&&("string"!=typeof e&&(e=JSON.stringify(e)),"string"!=typeof t&&(t=JSON.stringify(t)),0!==e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())))};lr.extra="input";var cr=function(e,t){return!!e&&(!t||("string"!=typeof e&&(e=JSON.stringify(e)),e.toLocaleLowerCase().indexOf(t.toString().toLowerCase())>-1))},ur=function(e,t){return!cr(e,t)};ur.extra="input",cr.extra="input";var hr={none:"None",empty:"Not set",notEmpty:"Set",eq:"Equal",notEq:"Not equal",begins:"Begins with",contains:"Contains",notContains:"Does not contain",eqN:"=",neqN:"!=",gt:">",gte:">=",lt:"<",lte:"<="},dr={none:function(){return!0},empty:function(e){return!sr(e)},notEmpty:sr,eq:tr,notEq:nr,begins:lr,contains:cr,notContains:ur,eqN:tr,neqN:nr,gt:rr,gte:ir,lt:or,lte:ar},fr={string:["notEmpty","empty","eq","notEq","begins","contains","notContains"],number:["notEmpty","empty","eqN","neqN","gt","gte","lt","lte"]},pr="filter",gr=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.revogrid=t,o.filterCollection={},o.possibleFilters=Object.assign({},fr),o.possibleFilterNames=Object.assign({},hr),o.possibleFilterEntities=Object.assign({},dr),r&&o.initConfig(r),o.addEventListener("headerclick",(function(e){return o.headerclick(e)})),o.addEventListener("aftersourceset",(function(){Object.keys(o.filterCollection).length&&o.filterByProps(o.filterCollection)})),o.revogrid.registerVNode([(0,i.h)("revogr-filter-panel",{uuid:"filter-"+n,filterNames:o.possibleFilterNames,filterEntities:o.possibleFilterEntities,onFilterChange:function(e){return o.onFilterChange(e.detail)},ref:function(e){return o.pop=e}})]),o}return a(t,e),t.prototype.initConfig=function(e){if(e.collection&&(this.filterCollection=Object.assign({},e.collection)),e.customFilters)for(var t in e.customFilters){var n=e.customFilters[t];this.possibleFilters[n.columnFilterType]||(this.possibleFilters[n.columnFilterType]=[]),this.possibleFilters[n.columnFilterType].push(t),this.possibleFilterEntities[t]=n.func,this.possibleFilterNames[t]=n.name}if(e.include){var r={};for(var i in this.possibleFilters){var o=this.possibleFilters[i].filter((function(t){return e.include.indexOf(t)>-1}));o.length&&(r[i]=o)}Object.keys(r).length>0&&(this.possibleFilters=r)}},t.prototype.headerclick=function(e){return s(this,void 0,void 0,(function(){var t,n,r,i,a,s;return l(this,(function(l){switch(l.label){case 0:return n=null===(t=e.detail.originalEvent)||void 0===t?void 0:t.target,(0,o.i)(n)?(e.preventDefault(),[4,this.pop.getChanges()]):[2];case 1:return(r=l.sent())&&(null==r?void 0:r.prop)===e.detail.prop?(this.pop.show(),[2]):(i=this.revogrid.getBoundingClientRect(),a=n.getBoundingClientRect(),s=e.detail.prop,this.pop.filterTypes=this.getColumnFilter(e.detail.filter),this.pop.show(Object.assign(Object.assign({},this.filterCollection[s]),{x:a.x-i.x,y:a.y-i.y+a.height,prop:s})),[2])}}))}))},t.prototype.getColumnFilter=function(e){var t,n,r=this,i="string";if(!e)return(t={})[i]=this.possibleFilters[i],t;if(this.isValidType(e))i=e;else if("object"==typeof e&&e.length)return e.reduce((function(e,t){return r.isValidType(t)&&(e[t]=r.possibleFilters[t]),e}),{});return(n={})[i]=this.possibleFilters[i],n},t.prototype.isValidType=function(e){return!("string"!=typeof e||!this.possibleFilters[e])},t.prototype.onFilterChange=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){return this.filterByProps(((t={})[e.prop]=e,t)),[2]}))}))},t.prototype.filterByProps=function(e,t){return void 0===t&&(t=!1),s(this,void 0,void 0,(function(){var n,r,i,o,a;return l(this,(function(s){switch(s.label){case 0:for(n in t&&(this.filterCollection={}),e)r=e[n],i=r.type,o=r.value,"none"===i?delete this.filterCollection[n]:(a=this.possibleFilterEntities[i],this.filterCollection[n]={filter:a,value:o,type:i});return[4,this.runFiltering()];case 1:return s.sent(),[2]}}))}))},t.prototype.doFiltering=function(e,t,n){return s(this,void 0,void 0,(function(){var r,i,a,s,c;return l(this,(function(l){switch(l.label){case 0:return r=[],n.forEach((function(t){var n=Object.assign({},t),i=e[n.prop];n[o.F]&&!i&&(delete n[o.F],r.push(n)),!n[o.F]&&i&&(r.push(n),n[o.F]=!0)})),i=this.getRowFilter(t,e),a=this.emit("beforefiltertrimmed",{collection:e,itemsToFilter:i,source:t}),s=a.defaultPrevented,c=a.detail,s?[2]:[4,this.revogrid.addTrimmed(c.itemsToFilter,pr)];case 1:return l.sent().defaultPrevented?[2]:[4,this.revogrid.updateColumns(r)];case 2:return l.sent(),this.emit("afterFilterApply"),[2]}}))}))},t.prototype.clearFiltering=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return this.filterCollection={},[4,this.runFiltering()];case 1:return e.sent(),[2]}}))}))},t.prototype.runFiltering=function(){return s(this,void 0,void 0,(function(){var e,t,n,r,i,o;return l(this,(function(a){switch(a.label){case 0:return[4,this.getData()];case 1:return e=a.sent(),t=e.source,n=e.columns,r=this.emit("beforefilterapply",{collection:this.filterCollection,source:t,columns:n}),i=r.defaultPrevented,o=r.detail,i||this.doFiltering(o.collection,o.source,o.columns),[2]}}))}))},t.prototype.getData=function(){return s(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return[4,this.revogrid.getSource()];case 1:return e=n.sent(),[4,this.revogrid.getColumns()];case 2:return t=n.sent(),[2,{source:e,columns:t}]}}))}))},t.prototype.getRowFilter=function(e,t){var n={};return e.forEach((function(e,r){for(var i in t){var o=t[i];(0,o.filter)(e[i],o.value)||(n[r]=!0)}})),n},t}(Cn),mr=function(e){return"string"==typeof e||!B(e)&&D(e)&&"[object String]"==L(e)},vr=qt("length"),yr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),br="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_r="\\ud83c[\\udffb-\\udfff]",xr="[^\\ud800-\\udfff]",wr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ar="[\\ud800-\\udbff][\\udc00-\\udfff]",kr="(?:"+br+"|"+_r+")?",Tr="[\\ufe0e\\ufe0f]?",Sr=Tr+kr+"(?:\\u200d(?:"+[xr,wr,Ar].join("|")+")"+Tr+kr+")*",Er="(?:"+[xr+br+"?",br,wr,Ar,"[\\ud800-\\udfff]"].join("|")+")",Cr=RegExp(_r+"(?="+_r+")|"+Er+Sr,"g"),Mr=function(e){return function(e){return yr.test(e)}(e)?function(e){for(var t=Cr.lastIndex=0;Cr.test(e);)++t;return t}(e):vr(e)},Or=function(e){if(null==e)return 0;if(re(e))return mr(e)?Mr(e):e.length;var t=ht(e);return"[object Map]"==t||"[object Set]"==t?e.size:ee(e).length},Lr=function(e){function t(t){var n=e.call(this,t)||this;return n.revogrid=t,n.sorting=null,n.sortingFunc=null,n.addEventListener("beforesourceset",(function(e){var t=e.detail;if(!n.hasSorting||!n.emit("beforesourcesortingapply").defaultPrevented){var r=n.setData(t.source,t.type);r&&(t.source=r)}})),n.addEventListener("aftercolumnsset",(function(e){var t=e.detail.order;return s(n,void 0,void 0,(function(){var e,n,r,i,o;return l(this,(function(a){switch(a.label){case 0:return[4,this.revogrid.getColumns()];case 1:for(r in e=a.sent(),n={},t)i=On.getColumnByProp(e,r),o=(null==i?void 0:i.cellCompare)||this.defaultCellCompare,n[r]="desc"==t[r]?this.descCellCompare(o):o;return this.sort(t,n),[2]}}))}))})),n.addEventListener("initialHeaderClick",(function(e){return s(n,void 0,void 0,(function(){var t,n;return l(this,(function(r){return e.defaultPrevented?[2]:e.detail.column.sortable?(this.headerclick(e.detail.column,e.detail.index,null===(n=null===(t=e.detail)||void 0===t?void 0:t.originalEvent)||void 0===n?void 0:n.shiftKey),[2]):[2]}))}))})),n}return a(t,e),Object.defineProperty(t.prototype,"hasSorting",{get:function(){return!!this.sorting},enumerable:!1,configurable:!0}),t.prototype.headerclick=function(e,t,n){return s(this,void 0,void 0,(function(){var r,i,o,a,s,c,u,h,d,f;return l(this,(function(l){switch(l.label){case 0:return r=this.getNextOrder(e.order),(i=this.emit("beforesorting",{column:e,order:r,additive:n})).defaultPrevented?[2]:(r=i.detail.order,[4,this.revogrid.updateColumnSorting(i.detail.column,t,r,n)]);case 1:return o=l.sent(),(a=this.emit("beforesortingapply",{column:o,order:r,additive:n})).defaultPrevented||(r=a.detail.order,s=(null==e?void 0:e.cellCompare)||this.defaultCellCompare,c="asc"==r?s:"desc"==r?this.descCellCompare(s):void 0,n&&this.sorting?(u={},h={},Object.assign(u,this.sorting),Object.assign(h,this.sortingFunc),e.prop in u&&Or(u)>1&&void 0===r?(delete u[e.prop],delete h[e.prop]):(u[e.prop]=r,h[e.prop]=c),this.sort(u,h)):this.sort(((d={})[e.prop]=r,d),((f={})[e.prop]=c,f))),[2]}}))}))},t.prototype.setData=function(e,t){if("rgRow"===t&&this.sortingFunc)return this.sortItems(e,this.sortingFunc)},t.prototype.sort=function(e,t){return s(this,void 0,void 0,(function(){var n,r,i;return l(this,(function(o){switch(o.label){case 0:return Or(e)?(this.sorting=e,this.sortingFunc=t,[4,this.revogrid.getSourceStore()]):(this.sorting=null,this.sortingFunc=null,[2]);case 1:return n=o.sent(),r=n.get("source"),i=this.sortIndexByItems(c([],n.get("proxyItems")),r,this.sortingFunc),yn(n,{proxyItems:i,source:c([],r)}),this.emit("afterSortingApply"),[2]}}))}))},t.prototype.defaultCellCompare=function(e,t,n){var r,i,o=null===(r=t[e])||void 0===r?void 0:r.toString().toLowerCase(),a=null===(i=n[e])||void 0===i?void 0:i.toString().toLowerCase();return o==a?0:o>a?1:-1},t.prototype.descCellCompare=function(e){return function(t,n,r){return-1*e(t,n,r)}},t.prototype.sortIndexByItems=function(e,t,n){for(var r in n)if(void 0===n[r])return c([],Array(e.length).keys());return e.sort((function(e,r){var i=0;for(var o in n)if(i=(0,n[o])(o,t[e],t[r]))break;return i}))},t.prototype.sortItems=function(e,t){return e.sort((function(e,n){var r=0;for(var i in t)if(r=(0,t[i])(i,e,n))break;return r}))},t.prototype.getNextOrder=function(e){switch(e){case void 0:return"asc";case"asc":return"desc";case"desc":return}},t}(Cn),Dr=function(e,t,n,r){var i=e.length;for((n=sn(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:sn(r))<0&&(r+=i),r=n>r?0:function(e){return e?function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(sn(e),0,4294967295):0}(r);n<r;)e[n++]=t;return e},Ir="data-rgCol",Rr="grid-uuid",Pr="revo-draggable",Nr="focused-cell",zr="edit-input-wrapper",Fr="__rvgr-depth",Br="__rvgr-expanded",jr="groupExpandClick",Ur="rgRow";function Vr(e,t,n){var r=n.prevExpanded,i=n.expandedAll,o=function(e,t){var n=[],r={};return e.forEach((function(e,i){var o=JSON.stringify(t(e));r[o]||(r[o]=new Map,n.push({children:r[o],id:o})),r[o].set(i,e)})),n}(e,t),a=[],s={},l=0,c=0,u={},h={};return o.forEach((function(e){var t=$r(e.id);if(t){var n=0,o=!!i,d=o,f=[];t.reduce((function(t,h){t.push(h);var p=t.join(",");if(!s[p]){if(d=i||r&&r[p],a.push(function(e,t,n,r,i){var o;return void 0===i&&(i=!1),(o={})["__rvgr-name"]=e,o[Fr]=n,o["__rvgr-id"]=r,o["__rvgr-value"]=t,o[Br]=i,o}(h,p,n,e.id,d)),n&&!d&&!o){var g=t.slice(0,t.length-1);r&&g.length&&r[g.join(",")]||(u[l]=!0)}l++,s[p]=f}return n++,c=n,t}),[]),e.children.forEach((function(e,t){d||o||(u[l]=!0),a.push(e),h[t]=l,f.push(l),l++}))}})),{sourceWithGroups:a,depth:c,trimmed:u,oldNewIndexMap:h,childrenByGroup:s}}function qr(e){return e&&void 0!==e["__rvgr-name"]}function Hr(e){return e&&void 0!==e["__rvgr-column"]}function $r(e){var t=JSON.parse(e);return function(e){return void 0!==e.push}(t)?t:null}function Wr(e,t,n){var r=$r(n["__rvgr-id"]);if(!r)return!1;var i=function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]!==t[r])return r;return r}(e,r);return t[Fr]<i}var Gr,Yr={mime:"text/csv",fileKind:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",encoding:""},Xr=String.fromCharCode(13),Zr=String.fromCharCode(10),Kr=String.fromCharCode(34),Jr=String.fromCharCode(65279),Qr=new RegExp('"',"g"),ei=function(){function e(e){void 0===e&&(e={}),this.options=Object.assign(Object.assign({},Yr),e)}return e.prototype.doExport=function(e){var t=this,n=e.data,r=e.headers,i=e.props,o=this.options.bom?Jr:"";return(null==r?void 0:r.length)>0&&r.forEach((function(e){e.length&&(o+=t.prepareHeader(e,t.options.columnDelimiter),o+=t.options.rowDelimiter)})),n.forEach((function(e,n){n>0&&(o+=t.options.rowDelimiter),qr(e)?o+=t.parseCell(function(e){return e&&e["__rvgr-name"]}(e),t.options.columnDelimiter):o+=i.map((function(n){return t.parseCell(e[n],t.options.columnDelimiter)})).join(t.options.columnDelimiter)})),o},e.prototype.prepareHeader=function(e,t){var n=this;return""+e.map((function(e){return n.parseCell(e,t,!0)})).join(t)},e.prototype.parseCell=function(e,t,n){void 0===n&&(n=!1);var r=e;return"string"!=typeof e&&(r=JSON.stringify(e)),void 0===r?"":""!==r&&(n||[Xr,Kr,Zr,t].some((function(e){return r.indexOf(e)>=0})))?'"'+r.replace(Qr,'""')+'"':r},e}();!function(e){e.csv="csv"}(Gr||(Gr={}));var ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.exportString=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=Gr.csv),s(this,void 0,void 0,(function(){var n;return l(this,(function(r){switch(r.label){case 0:return[4,this.beforeexport()];case 1:return(n=r.sent())?[2,this.formatter(t,e).doExport(n)]:[2,null]}}))}))},t.prototype.exportBlob=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=Gr.csv),s(this,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return[4,this.getBlob(this.formatter(t,e))];case 1:return[2,n.sent()]}}))}))},t.prototype.exportFile=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=Gr.csv),s(this,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,h;return l(this,(function(l){switch(l.label){case 0:return n=this.formatter(t,e),[4,this.getBlob(n)];case 1:return r=l.sent(),i=window.URL||window.webkitURL,o=document.createElement("a"),a=n.options,s=a.filename,c=a.fileKind,u=s+"."+c,h=i.createObjectURL(r),o.style.display="none",o.setAttribute("href",h),o.setAttribute("download",u),this.revogrid.appendChild(o),o.dispatchEvent(new MouseEvent("click")),this.revogrid.removeChild(o),[4,Bn(120)];case 2:return l.sent(),i.revokeObjectURL(h),[2]}}))}))},t.prototype.getBlob=function(e){return s(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return t=e.options.mime+";charset="+e.options.encoding,"undefined"==typeof Blob?[3,2]:[4,this.beforeexport()];case 1:return(n=r.sent())?[2,new Blob([e.doExport(n)],{type:t})]:[2,null];case 2:return[2,null]}}))}))},t.prototype.beforeexport=function(){return s(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return e=n.sent(),(t=this.emit("beforeexport",{data:e})).defaultPrevented?[2,null]:[2,t.detail.data]}}))}))},t.prototype.getData=function(){return s(this,void 0,void 0,(function(){var e,t,n,r,i,o,a,s,c=this;return l(this,(function(l){switch(l.label){case 0:return[4,this.getSource()];case 1:return e=l.sent(),t=[],n=[],Tn.forEach((function(e,r){n.push(c.getColPerSource(e).then((function(e){return t[r]=e})))})),[4,Promise.all(n)];case 2:for(l.sent(),r={headers:[],props:[]},i=0,o=t;i<o.length;i++)(a=o[i]).headers.forEach((function(e,t){var n;r.headers[t]||(r.headers[t]=[]),(n=r.headers[t]).push.apply(n,e)})),(s=r.props).push.apply(s,a.props);return[2,Object.assign({data:e},r)]}}))}))},t.prototype.getColPerSource=function(e){return s(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,c,u;return l(this,(function(l){switch(l.label){case 0:return[4,this.revogrid.getColumnStore(e)];case 1:return t=l.sent(),n=t.get("source"),r=t.get("items"),i=t.get("groupingDepth"),o=t.get("groups"),a=[],s=[],c=r.reduce((function(e,t,r){var i=n[t].prop;return a.push(n[t].name||""),s.push(i),e[i]=r,e}),{}),(u=this.getGroupHeaders(i,o,r,c)).push(a),[2,{headers:u,props:s}]}}))}))},t.prototype.getGroupHeaders=function(e,t,n,r){for(var i=this,o=[],a=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mn(e,t,n)&&(n=0,r=i),Dr(e,t,n,r)):[]}(new Array(n.length),""),s=function(e){var n=c([],a);if(o.push(n),!t[e])return"continue";t[e].forEach((function(e){var t=i.findGroupStartIndex(e.ids,r);"number"==typeof t&&(n[t]=e.name)}))},l=0;l<e;l++)s(l);return o},t.prototype.findGroupStartIndex=function(e,t){var n;return e.forEach((function(e){var r=t[e];"number"==typeof r&&("number"!=typeof n||n>r)&&(n=r)})),n},t.prototype.getSource=function(){return s(this,void 0,void 0,(function(){var e,t,n=this;return l(this,(function(r){switch(r.label){case 0:return e=[],t=[],kn.forEach((function(r){var i=[];e.push(i);var o=n.revogrid.getVisibleSource(r).then((function(e){return i.push.apply(i,e)}));t.push(o)})),[4,Promise.all(t)];case 1:return r.sent(),[2,e.reduce((function(e,t){return e.push.apply(e,t),e}),[])]}}))}))},t.prototype.formatter=function(e,t){if(void 0===t&&(t={}),e===Gr.csv)return new ei(t);throw new Error("Unknown format")},t}(Cn),ni="grouping",ri=function(e){function t(t,n){var r=e.call(this,t)||this;return r.revogrid=t,r.providers=n,r}return a(t,e),Object.defineProperty(t.prototype,"hasProps",{get:function(){var e,t,n;return(null===(e=this.options)||void 0===e?void 0:e.props)&&(null===(n=null===(t=this.options)||void 0===t?void 0:t.props)||void 0===n?void 0:n.length)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"store",{get:function(){return this.providers.dataProvider.stores.rgRow.store},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowItems",{get:function(){return this.store.get("items")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmed",{get:function(){return this.store.get("trimmed")},enumerable:!1,configurable:!0}),t.prototype.onFocus=function(e){qr(e.detail.model)&&e.preventDefault()},t.prototype.onExpand=function(e){var t=e.virtualIndex,n=this.getSource().source,r=this.trimmed.grouping,i=function(e,t){return e.get("items")[t]}(this.store,t);if(n[i][Br])a=function(e,t){for(var n=t[e],r=n["__rvgr-id"],i={},o=e+1,a=t.length;o<a;){var s=t[o];if(qr(s)){if(r!==s["__rvgr-id"])break;s[Br]=!1}i[o++]=!0}return n[Br]=!1,{trimmed:i}}(i,n).trimmed,r=Object.assign(Object.assign({},r),a),this.revogrid.clearFocus();else{var o=function(e,t,n){var r=n[e],i=t[r],o=$r(i["__rvgr-id"]),a={};if(!o)return{trimmed:a};var s=[];i[Br]=!0;for(var l=r+1,u=t.length,h=0;l<u;){var d=t[l],f=qr(d);if(f){if(!Wr(o,i,d))break;h||(h=d[Fr])}(!h||f&&h===d[Fr])&&(a[l]=!1,s.push(l)),l++}var p={trimmed:a};if(s.length){var g=c([],n);g.splice.apply(g,c([e+1,0],s)),p.items=g}return p}(t,n,this.rowItems),a=o.trimmed,s=o.items;r=Object.assign(Object.assign({},r),a),s&&An(this.store,s)}this.store.set("source",n),this.revogrid.addTrimmed(r,ni)},t.prototype.getSource=function(e){void 0===e&&(e=!1);var t=this.store.get("source"),n=this.store.get("proxyItems"),r=0;return n.reduce((function(n,i){var o=t[i];return e?(qr(o)?o[Br]&&(n.prevExpanded[o["__rvgr-value"]]=!0):(n.source.push(o),n.oldNewIndexes[i]=r,r++),n):(n.source.push(o),n)}),{source:[],prevExpanded:{},oldNewIndexes:{}})},t.prototype.setColumnGrouping=function(e){return!!(null==e?void 0:e.length)&&(e[0]["__rvgr-column"]=!0,!0)},t.prototype.setColumns=function(e){for(var t=e.columns,n=0,r=Tn;n<r.length;n++){var i=r[n];if(this.setColumnGrouping(t[i]))break}},t.prototype.onDrag=function(e){for(var t=e.detail,n=t.from,r=t.to,i=r-n>=0,o=this.getSource().source,a=this.rowItems,s=i?n:r,l=i?r:n;s<l;s++)if(qr(o[a[s]]))return void e.preventDefault()},t.prototype.beforeTrimmedApply=function(e,t){if(t===pr){var n=this.store.get("source");for(var r in e)e[r]&&qr(n[r])&&(e[r]=!1)}},t.prototype.subscribe=function(){var e=this;this.addEventListener("beforesourceset",(function(t){var n=t.detail;return e.onDataSet(n)})),this.addEventListener("beforecolumnsset",(function(t){var n=t.detail;return e.setColumns(n)})),this.addEventListener("beforetrimmed",(function(t){var n=t.detail,r=n.trimmed,i=n.trimmedType;return e.beforeTrimmedApply(r,i)})),this.addEventListener("afterSortingApply",(function(){return e.doSourceUpdate()})),this.addEventListener("beforecellfocus",(function(t){return e.onFocus(t)})),this.addEventListener("roworderchanged",(function(t){return e.onDrag(t)})),this.addEventListener(jr,(function(t){var n=t.detail;return e.onExpand(n)}))},t.prototype.doSourceUpdate=function(e){var t=this;if(this.hasProps){var n=this.getSource(!0),r=n.source,i=n.prevExpanded,o=n.oldNewIndexes,a=Vr(r,(function(e){var n;return null===(n=t.options)||void 0===n?void 0:n.props.map((function(t){return e[t]}))}),Object.assign({prevExpanded:i},e)),s=a.sourceWithGroups,l=a.depth,c=a.trimmed,u=a.oldNewIndexMap,h=a.childrenByGroup;this.providers.dataProvider.setData(s,Ur,{depth:l},!0),this.updateTrimmed(c,h,o,u)}},t.prototype.onDataSet=function(e){var t=this;if(this.hasProps&&(null==e?void 0:e.source)&&e.source.length){var n=e.source.filter((function(e){return!qr(e)})),r=this.revogrid.grouping||{},i=Vr(n,(function(e){var n;return null===(n=t.options)||void 0===n?void 0:n.props.map((function(t){return e[t]}))}),Object.assign({},r||{})),o=i.sourceWithGroups,a=i.depth,s=i.trimmed,l=i.oldNewIndexMap,c=i.childrenByGroup;e.source=o,this.providers.dataProvider.setGrouping({depth:a}),this.updateTrimmed(s,c,l)}},t.prototype.setGrouping=function(e){if(this.clearSubscriptions(),this.options=e,e.props&&Object.keys(e.props).length){this.getSource().source.length&&this.doSourceUpdate(Object.assign({},e));for(var t=0,n=Tn;t<n.length;t++){var r=n[t];if(this.setColumnGrouping(this.providers.columnProvider.getColumns(r))){this.providers.columnProvider.refreshByType(r);break}}this.subscribe()}else this.clearGrouping()},t.prototype.clearGrouping=function(){var e=this;Tn.forEach((function(t){var n=e.providers.columnProvider.getColumns(t),r=!1;n.forEach((function(e){Hr(e)&&(delete e["__rvgr-column"],r=!0)})),r&&e.providers.columnProvider.refreshByType(t)}));var t=this.getSource(!0),n=t.source,r=t.oldNewIndexes;this.providers.dataProvider.setData(n,Ur,void 0,!0),this.updateTrimmed(void 0,void 0,r)},t.prototype.updateTrimmed=function(e,t,n,r){void 0===e&&(e={}),void 0===t&&(t={});var i=function(e,t,n){var r={};for(var i in e)if(i!==ni){var o=e[i],a={};for(var s in o){var l=t[s];n&&(l=n[l]),o[s]&&(a[l]=!0,l!==parseInt(s,10)&&(r[i]=a))}}return r}(this.trimmed,n,r);for(var o in i)this.revogrid.addTrimmed(i[o],o);this.revogrid.addTrimmed(Object.assign({},e),ni)},t}(Cn),ii=function(){function e(){this.parentY=0}return e.prototype.start=function(e,t){var n,r=t.pos,i=t.text,o=t.event,a=e.getBoundingClientRect().top;this.parentY=a,this.text&&(this.text.innerText=i),this.move(r),this.moveTip({x:o.x,y:o.y}),null===(n=this.el)||void 0===n||n.classList.remove("hidden")},e.prototype.end=function(){var e;null===(e=this.el)||void 0===e||e.classList.add("hidden")},e.prototype.move=function(e){this.moveElement(e.end-this.parentY)},e.prototype.moveTip=function(e){var t=e.x,n=e.y;this.draggable&&(this.draggable.style.left=t+"px",this.draggable.style.top=n+"px")},e.prototype.moveElement=function(e){this.rgRow&&(this.rgRow.style.transform="translateY("+e+"px)")},e}(),oi=function(e){var t=e.ref,n=new ii;return t(n),(0,i.h)("div",{class:"draggable-wrapper hidden",ref:function(e){return n.el=e}},(0,i.h)("div",{class:"draggable",ref:function(e){return n.draggable=e}},(0,i.h)("span",{class:"revo-alt-icon"}),(0,i.h)("span",{ref:function(e){return n.text=e}})),(0,i.h)("div",{class:"drag-position",ref:function(e){return n.rgRow=e}}))},ai=function(e,t){var n,r=e.viewports,o=e.dimensions,a=e.orderRef,s=e.nakedClick,l=e.registerElement,c=e.onScroll;return[(0,i.h)("div",{class:"main-viewport",ref:function(e){return n=e},onClick:function(e){return function(e,t){t===e.target&&s(e)}(e,n)}},(0,i.h)("div",{class:"viewports"},t,(0,i.h)("revogr-scroll-virtual",{class:"vertical",dimension:"rgRow",viewportStore:r.rgRow.store,dimensionStore:o.rgRow.store,ref:function(e){return l(e,"rowScroll")},onScrollVirtual:function(e){return c(e.detail)}}),(0,i.h)(oi,{ref:a}))),(0,i.h)("revogr-scroll-virtual",{class:"horizontal",dimension:"rgCol",viewportStore:r.rgCol.store,dimensionStore:o.rgCol.store,ref:function(e){return l(e,"colScroll")},onScrollVirtual:function(e){return c(e.detail)}})]};function si(e){return e===hi}function li(e,t){for(var n=Object.assign({},e),r=["x","y"],i=0,o=r;i<o.length;i++)e[l=o[i]]<0&&(n[l]=0);for(var a=0,s=r;a<s.length;a++){var l;e[l=s[a]]>=t[l]&&(n[l]=t[l]-1)}return n}function ci(e,t){return e&&t?{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x1:Math.max(e.x,t.x),y1:Math.max(e.y,t.y)}:null}var ui=function(){function e(){var e=this;this.unsubscribe=[],this.store=fn({range:null,tempRange:null,tempRangeType:null,focus:null,edit:null,lastCell:null}),this.store.on("set",(function(t,n){"tempRange"!==t||n||e.store.set("tempRangeType",null)}))}return e.prototype.onChange=function(e,t){this.unsubscribe.push(this.store.onChange(e,t))},e.prototype.clearFocus=function(){yn(this.store,{focus:null,range:null,edit:null,tempRange:null})},e.prototype.setFocus=function(e,t){yn(this.store,{focus:e,range:ci(e,t),edit:null,tempRange:null})},e.prototype.setTempArea=function(e){yn(this.store,{tempRange:null==e?void 0:e.area,tempRangeType:null==e?void 0:e.type,edit:null})},e.prototype.clearTemp=function(){yn(this.store,{tempRange:null})},e.prototype.setRangeArea=function(e){yn(this.store,{range:e,edit:null,tempRange:null})},e.prototype.setRange=function(e,t){this.setRangeArea(ci(e,t))},e.prototype.setLastCell=function(e){yn(this.store,{lastCell:e})},e.prototype.setEdit=function(e){var t=this.store.get("focus");yn(this.store,t&&"string"==typeof e?{edit:{x:t.x,y:t.y,val:e}}:{edit:null})},e.prototype.dispose=function(){this.unsubscribe.forEach((function(e){return e()})),this.store.dispose()},e}(),hi=-1,di=function(){function e(){this.dirty=!1,this.stores={},this.columnStores={},this.rowStores={},this.sections=[]}return Object.defineProperty(e.prototype,"focusedStore",{get:function(){var e;for(var t in this.stores)for(var n in this.stores[t]){var r=null===(e=this.stores[t][n])||void 0===e?void 0:e.store.get("focus");if(r)return{entity:this.stores[t][n],cell:r,position:{x:parseInt(n,10),y:parseInt(t,10)}}}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"edit",{get:function(){var e;return null===(e=this.focusedStore)||void 0===e?void 0:e.entity.store.get("edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){var e;return null===(e=this.focusedStore)||void 0===e?void 0:e.entity.store.get("focus")},enumerable:!1,configurable:!0}),e.prototype.registerSection=function(e){if(!e)return this.sections.length=0,void(this.dirty=!0);-1===this.sections.indexOf(e)&&this.sections.push(e)},e.prototype.beforeUpdate=function(){if(this.dirty){for(var e in this.stores)for(var t in this.stores[e])this.stores[e][t].dispose();this.dirty=!1}},e.prototype.registerColumn=function(e){return si(e)?new ui:(this.columnStores[e]||(this.columnStores[e]=new ui),this.columnStores[e])},e.prototype.registerRow=function(e){return si(e)?new ui:(this.rowStores[e]||(this.rowStores[e]=new ui),this.rowStores[e])},e.prototype.register=function(e){var t,n,r=this,i=e.x,o=e.y;return si(i)||si(o)?new ui:(this.stores[o]||(this.stores[o]={}),this.stores[o][i]||(this.stores[o][i]=new ui,null===(t=this.stores[o][i])||void 0===t||t.onChange("range",(function(e){r.columnStores[i].setRangeArea(e),r.rowStores[o].setRangeArea(e)})),null===(n=this.stores[o][i])||void 0===n||n.store.on("dispose",(function(){var e,t;null===(e=r.columnStores[i])||void 0===e||e.dispose(),null===(t=r.rowStores[o])||void 0===t||t.dispose(),delete r.rowStores[o],delete r.columnStores[i],r.stores[o]&&delete r.stores[o][i],Object.keys(r.stores[o]||{}).length||delete r.stores[o]}))),this.stores[o][i])},e.prototype.setEditByCell=function(e,t){var n=e.x,r=e.y,i=this.stores[r][n];this.focus(i,{focus:t,end:t}),this.setEdit("")},e.prototype.focus=function(e,t){var n,r=t.focus,i=t.end;for(var o in this.stores)for(var a in this.stores[o]){var s=this.stores[o][a];s!==e?s.clearFocus():n={x:parseInt(a,10),y:parseInt(o,10)}}if(n){var l,c=e.store.get("lastCell"),u=function(e,t){for(var n={},r=["x","y"],i=0,o=r;i<o.length;i++)if(e[l=o[i]]<0)return n[l]=e[l],n;for(var a=0,s=r;a<s.length;a++){var l;if(e[l=s[a]]>=t[l])return n[l]=e[l]-t[l],n}return null}(r,c);if(u)for(var h in u){var d=h,f=void 0;switch(d){case"x":f=this.getXStores(n.y);break;case"y":f=this.getYStores(n.x)}if(u[d]>=0)l=f[++n[d]];else{var p=null==(l=f[--n[d]])?void 0:l.store.get("lastCell");p&&(u[d]=p[d]+u[d])}}if(l){var g=Object.assign(Object.assign({},r),u);this.focus(l,{focus:g,end:g})}else r=li(r,c),i=li(r,c),e.setFocus(r,i)}},e.prototype.clearAll=function(){var e;for(var t in this.stores)for(var n in this.stores[t])null===(e=this.stores[t][n])||void 0===e||e.clearFocus()},e.prototype.setEdit=function(e){this.focusedStore&&this.focusedStore.entity.setEdit(e)},e.prototype.getXStores=function(e){return this.stores[e]},e.prototype.getYStores=function(e){var t={};for(var n in this.stores)t[n]=this.stores[n][e];return t},e}(),fi="header",pi="footer",gi="content";function mi(e,t){return{x:e.viewports[e.colType].store.get("realCount"),y:e.viewports[t].store.get("realCount")}}var vi=b((function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=1/0,c=9007199254740991,u=NaN,h=4294967295,d=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],f="[object Arguments]",p="[object Array]",g="[object Boolean]",m="[object Date]",v="[object Error]",b="[object Function]",_="[object GeneratorFunction]",x="[object Map]",w="[object Number]",A="[object Object]",k="[object Promise]",T="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",M="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",D="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",P="[object Int16Array]",N="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",j="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,W=RegExp(H.source),G=RegExp($.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+_e+"]",Ce="["+Se+"]",Me="["+xe+"]",Oe="\\d+",Le="["+we+"]",De="["+Ae+"]",Ie="[^"+_e+Se+Oe+we+Ae+ke+"]",Re="\\ud83c[\\udffb-\\udfff]",Pe="[^"+_e+"]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+ke+"]",Be="(?:"+De+"|"+Ie+")",je="(?:"+Fe+"|"+Ie+")",Ue="(?:['](?:d|ll|m|re|s|t|ve))?",Ve="(?:['](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Me+"|"+Re+")?",He="["+Te+"]?",$e=He+qe+"(?:\\u200d(?:"+[Pe,Ne,ze].join("|")+")"+He+qe+")*",We="(?:"+[Le,Ne,ze].join("|")+")"+$e,Ge="(?:"+[Pe+Me+"?",Me,Ne,ze,Ee].join("|")+")",Ye=RegExp("[']","g"),Xe=RegExp(Me,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ge+$e,"g"),Ke=RegExp([Fe+"?"+De+"+"+Ue+"(?="+[Ce,Fe,"$"].join("|")+")",je+"+"+Ve+"(?="+[Ce,Fe+Be,"$"].join("|")+")",Fe+"?"+Be+"+"+Ue,Fe+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,We].join("|"),"g"),Je=RegExp("[\\u200d"+_e+xe+Te+"]"),Qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tt=-1,nt={};nt[D]=nt[I]=nt[R]=nt[P]=nt[N]=nt[z]=nt[F]=nt[B]=nt[j]=!0,nt[f]=nt[p]=nt[O]=nt[g]=nt[L]=nt[m]=nt[v]=nt[b]=nt[x]=nt[w]=nt[A]=nt[T]=nt[S]=nt[E]=nt[M]=!1;var rt={};rt[f]=rt[p]=rt[O]=rt[L]=rt[g]=rt[m]=rt[D]=rt[I]=rt[R]=rt[P]=rt[N]=rt[x]=rt[w]=rt[A]=rt[T]=rt[S]=rt[E]=rt[C]=rt[z]=rt[F]=rt[B]=rt[j]=!0,rt[v]=rt[b]=rt[M]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,at=parseInt,st="object"==typeof y&&y&&y.Object===Object&&y,lt="object"==typeof self&&self&&self.Object===Object&&self,ct=st||lt||Function("return this")(),ut=t&&!t.nodeType&&t,ht=ut&&e&&!e.nodeType&&e,dt=ht&&ht.exports===ut,ft=dt&&st.process,pt=function(){try{return ht&&ht.require&&ht.require("util").types||ft&&ft.binding&&ft.binding("util")}catch(e){}}(),gt=pt&&pt.isArrayBuffer,mt=pt&&pt.isDate,vt=pt&&pt.isMap,yt=pt&&pt.isRegExp,bt=pt&&pt.isSet,_t=pt&&pt.isTypedArray;function xt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function wt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Et(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Ct(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Lt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Dt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Vt("length");function Pt(e){return e.match(se)||[]}function Nt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function zt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,jt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function jt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:u}function Vt(e){return function(t){return null==t?n:t[e]}}function qt(e){return function(t){return null==e?n:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Wt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,dn(e)+1).replace(ne,""):e}function Yt(e){return function(t){return e(t)}}function Xt(e,t){return Mt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function Kt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var en=qt({:"A",:"A",:"A",:"A",:"A",:"A",:"a",:"a",:"a",:"a",:"a",:"a",:"C",:"c",:"D",:"d",:"E",:"E",:"E",:"E",:"e",:"e",:"e",:"e",:"I",:"I",:"I",:"I",:"i",:"i",:"i",:"i",:"N",:"n",:"O",:"O",:"O",:"O",:"O",:"O",:"o",:"o",:"o",:"o",:"o",:"o",:"U",:"U",:"U",:"U",:"u",:"u",:"u",:"u",:"Y",:"y",:"y",:"Ae",:"ae",:"Th",:"th",:"ss",:"A",:"A",:"A",:"a",:"a",:"a",:"C",:"C",:"C",:"C",:"c",:"c",:"c",:"c",:"D",:"D",:"d",:"d",:"E",:"E",:"E",:"E",:"E",:"e",:"e",:"e",:"e",:"e",:"G",:"G",:"G",:"G",:"g",:"g",:"g",:"g",:"H",:"H",:"h",:"h",:"I",:"I",:"I",:"I",:"I",:"i",:"i",:"i",:"i",:"i",:"J",:"j",:"K",:"k",:"k",:"L",:"L",:"L",:"L",:"L",:"l",:"l",:"l",:"l",:"l",:"N",:"N",:"N",:"N",:"n",:"n",:"n",:"n",:"O",:"O",:"O",:"o",:"o",:"o",:"R",:"R",:"R",:"r",:"r",:"r",:"S",:"S",:"S",:"S",:"s",:"s",:"s",:"s",:"T",:"T",:"T",:"t",:"t",:"t",:"U",:"U",:"U",:"U",:"U",:"U",:"u",:"u",:"u",:"u",:"u",:"u",:"W",:"w",:"Y",:"y",:"Y",:"Z",:"Z",:"Z",:"z",:"z",:"z",:"IJ",:"ij",:"Oe",:"oe",:"'n",:"s"}),tn=qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+it[e]}function rn(e){return Je.test(e)}function on(e){return Qe.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){return rn(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function hn(e){return rn(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});function pn(e){return e.match(Ke)||[]}var gn=function e(t){var y=(t=null==t?ct:gn.defaults(ct.Object(),t,gn.pick(ct,et))).Array,re=t.Date,se=t.Error,_e=t.Function,xe=t.Math,we=t.Object,Ae=t.RegExp,ke=t.String,Te=t.TypeError,Se=y.prototype,Ee=_e.prototype,Ce=we.prototype,Me=t["__core-js_shared__"],Oe=Ee.toString,Le=Ce.hasOwnProperty,De=0,Ie=function(){var e=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=Ce.toString,Pe=Oe.call(we),Ne=ct._,ze=Ae("^"+Oe.call(Le).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=dt?t.Buffer:n,Be=t.Symbol,je=t.Uint8Array,Ue=Fe?Fe.allocUnsafe:n,Ve=sn(we.getPrototypeOf,we),qe=we.create,He=Ce.propertyIsEnumerable,$e=Se.splice,We=Be?Be.isConcatSpreadable:n,Ge=Be?Be.iterator:n,Ze=Be?Be.toStringTag:n,Ke=function(){try{var e=co(we,"defineProperty");return e({},"",{}),e}catch(e){}}(),Je=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,Qe=re&&re.now!==ct.Date.now&&re.now,it=t.setTimeout!==ct.setTimeout&&t.setTimeout,st=xe.ceil,lt=xe.floor,ut=we.getOwnPropertySymbols,ht=Fe?Fe.isBuffer:n,ft=t.isFinite,pt=Se.join,Rt=sn(we.keys,we),qt=xe.max,mn=xe.min,vn=re.now,yn=t.parseInt,bn=xe.random,_n=Se.reverse,xn=co(t,"DataView"),wn=co(t,"Map"),An=co(t,"Promise"),kn=co(t,"Set"),Tn=co(t,"WeakMap"),Sn=co(we,"create"),En=Tn&&new Tn,Cn={},Mn=Fo(xn),On=Fo(wn),Ln=Fo(An),Dn=Fo(kn),In=Fo(Tn),Rn=Be?Be.prototype:n,Pn=Rn?Rn.valueOf:n,Nn=Rn?Rn.toString:n;function zn(e){if(ts(e)&&!Ha(e)&&!(e instanceof Un)){if(e instanceof jn)return e;if(Le.call(e,"__wrapped__"))return Bo(e)}return new jn(e)}var Fn=function(){function e(){}return function(t){if(!es(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Bn(){}function jn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Wn(e){var t=this.__data__=new qn(e);this.size=t.size}function Gn(e,t){var n=Ha(e),r=!n&&qa(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Wt(e.length,ke):[],l=s.length;for(var c in e)!t&&!Le.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vo(c,l))||s.push(c);return s}function Yn(e){var t=e.length;return t?e[$r(0,t-1)]:n}function Xn(e,t){return Po(Si(e),ir(t,0,e.length))}function Zn(e){return Po(Si(e))}function Kn(e,t,r){(r!==n&&!ja(e[t],r)||r===n&&!(t in e))&&nr(e,t,r)}function Jn(e,t,r){var i=e[t];Le.call(e,t)&&ja(i,r)&&(r!==n||t in e)||nr(e,t,r)}function Qn(e,t){for(var n=e.length;n--;)if(ja(e[n][0],t))return n;return-1}function er(e,t,n,r){return cr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function tr(e,t){return e&&Ei(t,Ls(t),e)}function nr(e,t,n){"__proto__"==t&&Ke?Ke(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function rr(e,t){for(var r=-1,i=t.length,o=y(i),a=null==e;++r<i;)o[r]=a?n:Ss(e,t[r]);return o}function ir(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function or(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!es(e))return e;var h=Ha(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Si(e,s)}else{var d=fo(e),p=d==b||d==_;if(Ya(e))return _i(e,l);if(d==A||d==f||p&&!o){if(s=c||p?{}:go(e),!l)return c?function(e,t){return Ei(e,ho(e),t)}(e,function(e,t){return e&&Ei(t,Ds(t),e)}(s,e)):function(e,t){return Ei(e,uo(e),t)}(e,tr(s,e))}else{if(!rt[d])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return xi(e);case g:case m:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case I:case R:case P:case N:case z:case F:case B:case j:return wi(e,n);case x:return new r;case w:case E:return new r(e);case T:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new r;case C:return function(e){return Pn?we(Pn.call(e)):{}}(e)}}(e,d,l)}}a||(a=new Wn);var v=a.get(e);if(v)return v;a.set(e,s),as(e)?e.forEach((function(n){s.add(or(n,t,r,n,e,a))})):ns(e)&&e.forEach((function(n,i){s.set(i,or(n,t,r,i,e,a))}));var y=h?n:(u?c?no:to:c?Ds:Ls)(e);return At(y||e,(function(n,i){y&&(n=e[i=n]),Jn(s,i,or(n,t,r,i,e,a))})),s}function ar(e,t,r){var i=r.length;if(null==e)return!i;for(e=we(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function sr(e,t,i){if("function"!=typeof e)throw new Te(r);return Lo((function(){e.apply(n,i)}),t)}function lr(e,t,n,r){var i=-1,o=Et,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Mt(t,Yt(n))),r?(o=Ct,a=!1):t.length>=200&&(o=Zt,a=!1,t=new $n(t));e:for(;++i<s;){var u=e[i],h=null==n?u:n(u);if(u=r||0!==u?u:0,a&&h==h){for(var d=c;d--;)if(t[d]===h)continue e;l.push(u)}else o(t,h,r)||l.push(u)}return l}zn.templateSettings={escape:Y,evaluate:X,interpolate:Z,variable:"",imports:{_:zn}},zn.prototype=Bn.prototype,zn.prototype.constructor=zn,jn.prototype=Fn(Bn.prototype),jn.prototype.constructor=jn,Un.prototype=Fn(Bn.prototype),Un.prototype.constructor=Un,Vn.prototype.clear=function(){this.__data__=Sn?Sn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(Sn){var r=t[e];return r===i?n:r}return Le.call(t,e)?t[e]:n},Vn.prototype.has=function(e){var t=this.__data__;return Sn?t[e]!==n:Le.call(t,e)},Vn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Sn&&t===n?i:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=Qn(t,e);return!(n<0||(n==t.length-1?t.pop():$e.call(t,n,1),--this.size,0))},qn.prototype.get=function(e){var t=this.__data__,r=Qn(t,e);return r<0?n:t[r][1]},qn.prototype.has=function(e){return Qn(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=Qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(wn||qn),string:new Vn}},Hn.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return so(this,e).get(e)},Hn.prototype.has=function(e){return so(this,e).has(e)},Hn.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,i),this},$n.prototype.has=function(e){return this.__data__.has(e)},Wn.prototype.clear=function(){this.__data__=new qn,this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Wn.prototype.get=function(e){return this.__data__.get(e)},Wn.prototype.has=function(e){return this.__data__.has(e)},Wn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!wn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var cr=Oi(yr),ur=Oi(br,!0);function hr(e,t){var n=!0;return cr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ls(s):r(s,l)))var l=s,c=a}return c}function fr(e,t,r,i){var o=e.length;for((r=ps(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:ps(i))<0&&(i+=o),i=r>i?0:gs(i);r<i;)e[r++]=t;return e}function pr(e,t){var n=[];return cr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=mo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Ot(i,s):r||(i[i.length]=s)}return i}var mr=Li(),vr=Li(!0);function yr(e,t){return e&&mr(e,t,Ls)}function br(e,t){return e&&vr(e,t,Ls)}function _r(e,t){return St(t,(function(t){return Ka(e[t])}))}function xr(e,t){for(var r=0,i=(t=mi(t,e)).length;null!=e&&r<i;)e=e[zo(t[r++])];return r&&r==i?e:n}function wr(e,t,n){var r=t(e);return Ha(e)?r:Ot(r,n(e))}function Ar(e){return null==e?e===n?"[object Undefined]":"[object Null]":Ze&&Ze in we(e)?function(e){var t=Le.call(e,Ze),r=e[Ze];try{e[Ze]=n;var i=!0}catch(e){}var o=Re.call(e);return i&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Re.call(e)}(e)}function kr(e,t){return e>t}function Tr(e,t){return null!=e&&Le.call(e,t)}function Sr(e,t){return null!=e&&t in we(e)}function Er(e,t,r){for(var i=r?Ct:Et,o=e[0].length,a=e.length,s=a,l=y(a),c=1/0,u=[];s--;){var h=e[s];s&&t&&(h=Mt(h,Yt(t))),c=mn(h.length,c),l[s]=!r&&(t||o>=120&&h.length>=120)?new $n(s&&h):n}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&u.length<c;){var p=h[d],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Cr(e,t,r){var i=null==(e=Eo(e,t=mi(t,e)))?e:e[zo(Zo(t))];return null==i?n:xt(i,e,r)}function Mr(e){return ts(e)&&Ar(e)==f}function Or(e,t,n,r,i){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=Ha(e),s=Ha(t),l=a?p:fo(e),c=s?p:fo(t),u=(l=l==f?A:l)==A,h=(c=c==f?A:c)==A,d=l==c;if(d&&Ya(e)){if(!Ya(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new Wn),a||cs(e)?Ji(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new je(e),new je(t)));case g:case m:case w:return ja(+e,+t);case v:return e.name==t.name&&e.message==t.message;case T:case E:return e==t+"";case x:var s=an;case S:var l=1&r;if(s||(s=cn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Ji(s(e),s(t),r,i,o,a);return a.delete(e),u;case C:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,l,n,r,i,o);if(!(1&n)){var y=u&&Le.call(e,"__wrapped__"),b=h&&Le.call(t,"__wrapped__");if(y||b){var _=y?e.value():e,k=b?t.value():t;return o||(o=new Wn),i(_,k,n,r,o)}}return!!d&&(o||(o=new Wn),Qi(e,t,n,r,i,o))}(e,t,n,r,Or,i))}function Lr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=we(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],h=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Wn;if(i)var f=i(u,h,c,e,t,d);if(!(f===n?Or(h,u,3,i,d):f))return!1}}return!0}function Dr(e){return!(!es(e)||function(e){return!!Ie&&Ie in e}(e))&&(Ka(e)?ze:pe).test(Fo(e))}function Ir(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Ha(e)?Fr(e[0],e[1]):zr(e):dl(e)}function Rr(e){if(!wo(e))return Rt(e);var t=[];for(var n in we(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Pr(e,t){return e<t}function Nr(e,t){var n=-1,r=Wa(e)?y(e.length):[];return cr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function zr(e){var t=lo(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function Fr(e,t){return bo(e)&&Ao(t)?ko(zo(e),t):function(r){var i=Ss(r,e);return i===n&&i===t?Es(r,e):Or(t,i,3)}}function Br(e,t,r,i,o){e!==t&&mr(t,(function(a,s){if(o||(o=new Wn),es(a))!function(e,t,r,i,o,a,s){var l=Mo(e,r),c=Mo(t,r),u=s.get(c);if(u)Kn(e,r,u);else{var h=a?a(l,c,r+"",e,t,s):n,d=h===n;if(d){var f=Ha(c),p=!f&&Ya(c),g=!f&&!p&&cs(c);h=c,f||p||g?Ha(l)?h=l:Ga(l)?h=Si(l):p?(d=!1,h=_i(c,!0)):g?(d=!1,h=wi(c,!0)):h=[]:is(c)||qa(c)?(h=l,qa(l)?h=vs(l):es(l)&&!Ka(l)||(h=go(c))):d=!1}d&&(s.set(c,h),o(h,c,i,a,s),s.delete(c)),Kn(e,r,h)}}(e,t,s,r,Br,i,o);else{var l=i?i(Mo(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Kn(e,s,l)}}),Ds)}function jr(e,t){var r=e.length;if(r)return vo(t+=t<0?r:0,r)?e[t]:n}function Ur(e,t,n){t=t.length?Mt(t,(function(e){return Ha(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[rl];var r=-1;t=Mt(t,Yt(ao()));var i=Nr(e,(function(e,n,i){var o=Mt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=xr(e,a);n(s,a)&&Zr(o,mi(a,e),s)}return o}function qr(e,t,n,r){var i=r?Bt:Ft,o=-1,a=t.length,s=e;for(e===t&&(t=Si(t)),n&&(s=Mt(e,Yt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&$e.call(s,l,1),$e.call(e,l,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;vo(i)?$e.call(e,i,1):li(e,i)}}return e}function $r(e,t){return e+lt(bn()*(t-e+1))}function Wr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=lt(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Do(So(e,t,rl),e+"")}function Yr(e){return Yn(js(e))}function Xr(e,t){var n=js(e);return Po(n,ir(t,0,n.length))}function Zr(e,t,r,i){if(!es(e))return e;for(var o=-1,a=(t=mi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=zo(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=l[c];(u=i?i(h,c,l):n)===n&&(u=es(h)?h:vo(t[o+1])?[]:{})}Jn(l,c,u),l=l[c]}return e}var Kr=En?function(e,t){return En.set(e,t),e}:rl,Jr=Ke?function(e,t){return Ke(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function Qr(e){return Po(js(e))}function ei(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=y(i);++r<i;)o[r]=e[r+t];return o}function ti(e,t){var n;return cr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ri(e,t,rl,n)}function ri(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ls(t),u=t===n;o<a;){var h=lt((o+a)/2),d=r(e[h]),f=d!==n,p=null===d,g=d==d,m=ls(d);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return mn(a,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!ja(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function oi(e){return"number"==typeof e?e:ls(e)?u:+e}function ai(e){if("string"==typeof e)return e;if(Ha(e))return Mt(e,ai)+"";if(ls(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function si(e,t,n){var r=-1,i=Et,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Ct;else if(o>=200){var c=t?null:Wi(e);if(c)return cn(c);a=!1,i=Zt,l=new $n}else l=t?[]:s;e:for(;++r<o;){var u=e[r],h=t?t(u):u;if(u=n||0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(u)}else i(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}function li(e,t){return null==(e=Eo(e,t=mi(t,e)))||delete e[zo(Zo(t))]}function ci(e,t,n,r){return Zr(e,t,n(xr(e,t)),r)}function ui(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ei(e,r?0:o,r?o+1:i):ei(e,r?o+1:0,r?i:o)}function hi(e,t){var n=e;return n instanceof Un&&(n=n.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function di(e,t,n){var r=e.length;if(r<2)return r?si(e[0]):[];for(var i=-1,o=y(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=lr(o[i]||a,e[s],t,n));return si(gr(o,1),t,n)}function fi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function pi(e){return Ga(e)?e:[]}function gi(e){return"function"==typeof e?e:rl}function mi(e,t){return Ha(e)?e:bo(e,t)?[e]:No(ys(e))}var vi=Gr;function yi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ei(e,t,r)}var bi=Je||function(e){return ct.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new je(t).set(new je(e)),t}function wi(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ls(e),s=t!==n,l=null===t,c=t==t,u=ls(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=qt(o-a,0),u=y(l+c),h=!r;++s<l;)u[s]=t[s];for(;++i<a;)(h||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ti(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=qt(o-s,0),h=y(u+c),d=!r;++i<u;)h[i]=e[i];for(var f=i;++l<c;)h[f+l]=t[l];for(;++a<s;)(d||i<o)&&(h[f+n[a]]=e[i++]);return h}function Si(e,t){var n=-1,r=e.length;for(t||(t=y(r));++n<r;)t[n]=e[n];return t}function Ei(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?nr(r,l,c):Jn(r,l,c)}return r}function Ci(e,t){return function(n,r){var i=Ha(n)?wt:er,o=t?t():{};return i(n,e,ao(r,2),o)}}function Mi(e){return Gr((function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&yo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=we(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t}))}function Oi(e,t){return function(n,r){if(null==n)return n;if(!Wa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=we(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Li(e){return function(t,n,r){for(var i=-1,o=we(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Di(e){return function(t){var r=rn(t=ys(t))?hn(t):n,i=r?r[0]:t.charAt(0),o=r?yi(r,1).join(""):t.slice(1);return i[e]()+o}}function Ii(e){return function(t){return Lt(Ks(qs(t).replace(Ye,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Pi(e){return function(t,r,i){var o=we(t);if(!Wa(t)){var a=ao(r,3);t=Ls(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Ni(e){return eo((function(t){var i=t.length,o=i,a=jn.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Te(r);if(a&&!l&&"wrapper"==io(s))var l=new jn([],!0)}for(o=l?o:i;++o<i;){var c=io(s=t[o]),u="wrapper"==c?ro(s):n;l=u&&_o(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[io(u[0])].apply(l,u[3]):1==s.length&&_o(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ha(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}}))}function zi(e,t,r,i,o,a,l,c,u,h){var d=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:Ri(e);return function n(){for(var s=arguments.length,b=y(s),_=s;_--;)b[_]=arguments[_];if(g)var x=oo(n),w=Qt(b,x);if(i&&(b=ki(b,i,o,g)),a&&(b=Ti(b,a,l,g)),s-=w,g&&s<h){var A=ln(b,x);return Hi(e,t,zi,n.placeholder,r,b,A,c,u,h-s)}var k=f?r:this,T=p?k[e]:e;return s=b.length,c?b=Co(b,c):m&&s>1&&b.reverse(),d&&u<s&&(b.length=u),this&&this!==ct&&this instanceof n&&(T=v||Ri(T)),T.apply(k,b)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=ai(r),i=ai(i)):(r=oi(r),i=oi(i)),o=e(r,i)}return o}}function ji(e){return eo((function(t){return t=Mt(t,Yt(ao())),Gr((function(n){var r=this;return e(t,(function(e){return xt(e,r,n)}))}))}))}function Ui(e,t){var r=(t=t===n?" ":ai(t)).length;if(r<2)return r?Wr(t,e):t;var i=Wr(t,st(e/un(t)));return rn(t)?yi(hn(i),0,e).join(""):i.slice(0,e)}function Vi(e){return function(t,r,i){return i&&"number"!=typeof i&&yo(t,r,i)&&(r=i=n),t=fs(t),r===n?(r=t,t=0):r=fs(r),function(e,t,n,r){for(var i=-1,o=qt(st((t-e)/(n||1)),0),a=y(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:fs(i),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Hi(e,t,r,i,o,s,l,c,u,h){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var f=[e,t,o,d?s:n,d?l:n,d?n:s,d?n:l,c,u,h],p=r.apply(n,f);return _o(e)&&Oo(p,f),p.placeholder=i,Io(p,e,t)}function $i(e){var t=xe[e];return function(e,n){if(e=ms(e),(n=null==n?0:mn(ps(n),292))&&ft(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Wi=kn&&1/cn(new kn([,-0]))[1]==l?function(e){return new kn(e)}:ll;function Gi(e){return function(t){var n=fo(t);return n==x?an(t):n==S?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,i,o,s,l,c,u){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(r);var d=o?o.length:0;if(d||(t&=-97,o=s=n),c=c===n?c:qt(ps(c),0),u=u===n?u:ps(u),d-=s?s.length:0,64&t){var f=o,p=s;o=s=n}var g=h?n:ro(e),m=[e,t,i,o,s,f,p,l,c,u];if(g&&To(m,g),e=m[0],t=m[1],i=m[2],o=m[3],s=m[4],!(u=m[9]=m[9]===n?h?0:e.length:qt(m[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,r){var i=Ri(e);return function o(){for(var a=arguments.length,s=y(a),l=a,c=oo(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=u.length)<r?Hi(e,t,zi,o.placeholder,n,s,u,n,n,r-a):xt(this&&this!==ct&&this instanceof o?i:e,this,s)}}(e,t,u):t!=a&&33!=t||s.length?zi.apply(n,m):function(e,t,n,r){var i=1&t,o=Ri(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=y(c+s),h=this&&this!==ct&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return xt(h,i?n:this,u)}}(e,t,i,o);else var v=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ct&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Io((g?Kr:Oo)(v,m),e,t)}function Xi(e,t,r,i){return e===n||ja(e,Ce[r])&&!Le.call(i,r)?t:e}function Zi(e,t,r,i,o,a){return es(e)&&es(t)&&(a.set(t,e),Br(e,t,n,Zi,a),a.delete(t)),e}function Ki(e){return is(e)?n:e}function Ji(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var d=-1,f=!0,p=2&r?new $n:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!It(t,(function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)}))){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function Qi(e,t,r,i,o,a){var s=1&r,l=to(e),c=l.length;if(c!=to(t).length&&!s)return!1;for(var u=c;u--;){var h=l[u];if(!(s?h in t:Le.call(t,h)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++u<c;){var m=e[h=l[u]],v=t[h];if(i)var y=s?i(v,m,h,t,e,a):i(m,v,h,e,t,a);if(!(y===n?m===v||o(m,v,r,i,a):y)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(p=!1)}return a.delete(e),a.delete(t),p}function eo(e){return Do(So(e,n,$o),e+"")}function to(e){return wr(e,Ls,uo)}function no(e){return wr(e,Ds,ho)}var ro=En?function(e){return En.get(e)}:ll;function io(e){for(var t=e.name+"",n=Cn[t],r=Le.call(Cn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Le.call(zn,"placeholder")?zn:e).placeholder}function ao(){var e=zn.iteratee||il;return e=e===il?Ir:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ao(i)]}return t}function co(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Dr(r)?r:n}var uo=ut?function(e){return null==e?[]:(e=we(e),St(ut(e),(function(t){return He.call(e,t)})))}:gl,ho=ut?function(e){for(var t=[];e;)Ot(t,uo(e)),e=Ve(e);return t}:gl,fo=Ar;function po(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var a=zo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Qa(i)&&vo(a,i)&&(Ha(e)||qa(e))}function go(e){return"function"!=typeof e.constructor||wo(e)?{}:Fn(Ve(e))}function mo(e){return Ha(e)||qa(e)||!!(We&&e&&e[We])}function vo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function yo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?Wa(n)&&vo(t,n.length):"string"==r&&t in n)&&ja(n[t],e)}function bo(e,t){if(Ha(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ls(e))||J.test(e)||!K.test(e)||null!=t&&e in we(t)}function _o(e){var t=io(e),n=zn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(xn&&fo(new xn(new ArrayBuffer(1)))!=L||wn&&fo(new wn)!=x||An&&fo(An.resolve())!=k||kn&&fo(new kn)!=S||Tn&&fo(new Tn)!=M)&&(fo=function(e){var t=Ar(e),r=t==A?e.constructor:n,i=r?Fo(r):"";if(i)switch(i){case Mn:return L;case On:return x;case Ln:return k;case Dn:return S;case In:return M}return t});var xo=Me?Ka:ml;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function Ao(e){return e==e&&!es(e)}function ko(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in we(r))}}function To(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,l=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!l)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?ki(u,c,t[4]):c,e[4]=u?ln(e[3],o):t[4]}return(c=t[5])&&(u=e[5],e[5]=u?Ti(u,c,t[6]):c,e[6]=u?ln(e[5],o):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function So(e,t,r){return t=qt(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=qt(n.length-t,0),a=y(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=y(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),xt(e,this,s)}}function Eo(e,t){return t.length<2?e:xr(e,ei(t,0,-1))}function Co(e,t){for(var r=e.length,i=mn(t.length,r),o=Si(e);i--;){var a=t[i];e[i]=vo(a,r)?o[a]:n}return e}function Mo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Ro(Kr),Lo=it||function(e,t){return ct.setTimeout(e,t)},Do=Ro(Jr);function Io(e,t,n){var r=t+"";return Do(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(d,(function(n){var r="_."+n[0];t&n[1]&&!Et(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Ro(e){var t=0,r=0;return function(){var i=vn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Po(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=$r(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var No=function(e){var t=Ra((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,(function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}();function zo(e){if("string"==typeof e||ls(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function Fo(e){if(null!=e){try{return Oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof Un)return e.clone();var t=new jn(e.__wrapped__,e.__chain__);return t.__actions__=Si(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var jo=Gr((function(e,t){return Ga(e)?lr(e,gr(t,1,Ga,!0)):[]})),Uo=Gr((function(e,t){var r=Zo(t);return Ga(r)&&(r=n),Ga(e)?lr(e,gr(t,1,Ga,!0),ao(r,2)):[]})),Vo=Gr((function(e,t){var r=Zo(t);return Ga(r)&&(r=n),Ga(e)?lr(e,gr(t,1,Ga,!0),n,r):[]}));function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=qt(r+i,0)),zt(e,ao(t,3),i)}function Ho(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=ps(r),o=r<0?qt(i+o,0):mn(o,i-1)),zt(e,ao(t,3),o,!0)}function $o(e){return null!=e&&e.length?gr(e,1):[]}function Wo(e){return e&&e.length?e[0]:n}var Go=Gr((function(e){var t=Mt(e,pi);return t.length&&t[0]===e[0]?Er(t):[]})),Yo=Gr((function(e){var t=Zo(e),r=Mt(e,pi);return t===Zo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Er(r,ao(t,2)):[]})),Xo=Gr((function(e){var t=Zo(e),r=Mt(e,pi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Er(r,n,t):[]}));function Zo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Ko=Gr(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var Qo=eo((function(e,t){var n=null==e?0:e.length,r=rr(e,t);return Hr(e,Mt(t,(function(e){return vo(e,n)?+e:e})).sort(Ai)),r}));function ea(e){return null==e?e:_n.call(e)}var ta=Gr((function(e){return si(gr(e,1,Ga,!0))})),na=Gr((function(e){var t=Zo(e);return Ga(t)&&(t=n),si(gr(e,1,Ga,!0),ao(t,2))})),ra=Gr((function(e){var t=Zo(e);return t="function"==typeof t?t:n,si(gr(e,1,Ga,!0),n,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Ga(e))return t=qt(e.length,t),!0})),Wt(t,(function(t){return Mt(e,Vt(t))}))}function oa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:Mt(r,(function(e){return xt(t,n,e)}))}var aa=Gr((function(e,t){return Ga(e)?lr(e,t):[]})),sa=Gr((function(e){return di(St(e,Ga))})),la=Gr((function(e){var t=Zo(e);return Ga(t)&&(t=n),di(St(e,Ga),ao(t,2))})),ca=Gr((function(e){var t=Zo(e);return t="function"==typeof t?t:n,di(St(e,Ga),n,t)})),ua=Gr(ia),ha=Gr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,oa(e,r)}));function da(e){var t=zn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var pa=eo((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Un&&vo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:fa,args:[o],thisArg:n}),new jn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)})),ga=Ci((function(e,t,n){Le.call(e,n)?++e[n]:nr(e,n,1)})),ma=Pi(qo),va=Pi(Ho);function ya(e,t){return(Ha(e)?At:cr)(e,ao(t,3))}function ba(e,t){return(Ha(e)?kt:ur)(e,ao(t,3))}var _a=Ci((function(e,t,n){Le.call(e,n)?e[n].push(t):nr(e,n,[t])})),xa=Gr((function(e,t,n){var r=-1,i="function"==typeof t,o=Wa(e)?y(e.length):[];return cr(e,(function(e){o[++r]=i?xt(t,e,n):Cr(e,t,n)})),o})),wa=Ci((function(e,t,n){nr(e,n,t)}));function Aa(e,t){return(Ha(e)?Mt:Nr)(e,ao(t,3))}var ka=Ci((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ta=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&yo(e,t[0],t[1])?t=[]:n>2&&yo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,gr(t,1),[])})),Sa=Qe||function(){return ct.Date.now()};function Ea(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Yi(e,s,n,n,n,n,t)}function Ca(e,t){var i;if("function"!=typeof t)throw new Te(r);return e=ps(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ma=Gr((function(e,t,n){var r=1;if(n.length){var i=ln(n,oo(Ma));r|=a}return Yi(e,r,t,n,i)})),Oa=Gr((function(e,t,n){var r=3;if(n.length){var i=ln(n,oo(Oa));r|=a}return Yi(t,r,e,n,i)}));function La(e,t,i){var o,a,s,l,c,u,h=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new Te(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){return h=e,c=Lo(y,t),d?g(e):l}function v(e){var r=e-u;return u===n||r>=t||r<0||f&&e-h>=s}function y(){var e=Sa();if(v(e))return b(e);c=Lo(y,function(e){var n=t-(e-u);return f?mn(n,s-(e-h)):n}(e))}function b(e){return c=n,p&&o?g(e):(o=a=n,l)}function _(){var e=Sa(),r=v(e);if(o=arguments,a=this,u=e,r){if(c===n)return m(u);if(f)return bi(c),c=Lo(y,t),g(u)}return c===n&&(c=Lo(y,t)),l}return t=ms(t)||0,es(i)&&(d=!!i.leading,s=(f="maxWait"in i)?qt(ms(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),_.cancel=function(){c!==n&&bi(c),h=0,o=u=a=c=n},_.flush=function(){return c===n?l:b(Sa())},_}var Da=Gr((function(e,t){return sr(e,1,t)})),Ia=Gr((function(e,t,n){return sr(e,ms(t)||0,n)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Hn),n}function Pa(e){if("function"!=typeof e)throw new Te(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Hn;var Na=vi((function(e,t){var n=(t=1==t.length&&Ha(t[0])?Mt(t[0],Yt(ao())):Mt(gr(t,1),Yt(ao()))).length;return Gr((function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return xt(e,this,r)}))})),za=Gr((function(e,t){var r=ln(t,oo(za));return Yi(e,a,n,t,r)})),Fa=Gr((function(e,t){var r=ln(t,oo(Fa));return Yi(e,64,n,t,r)})),Ba=eo((function(e,t){return Yi(e,256,n,n,n,t)}));function ja(e,t){return e===t||e!=e&&t!=t}var Ua=qi(kr),Va=qi((function(e,t){return e>=t})),qa=Mr(function(){return arguments}())?Mr:function(e){return ts(e)&&Le.call(e,"callee")&&!He.call(e,"callee")},Ha=y.isArray,$a=gt?Yt(gt):function(e){return ts(e)&&Ar(e)==O};function Wa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Ga(e){return ts(e)&&Wa(e)}var Ya=ht||ml,Xa=mt?Yt(mt):function(e){return ts(e)&&Ar(e)==m};function Za(e){if(!ts(e))return!1;var t=Ar(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ka(e){if(!es(e))return!1;var t=Ar(e);return t==b||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=vt?Yt(vt):function(e){return ts(e)&&fo(e)==x};function rs(e){return"number"==typeof e||ts(e)&&Ar(e)==w}function is(e){if(!ts(e)||Ar(e)!=A)return!1;var t=Ve(e);if(null===t)return!0;var n=Le.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Pe}var os=yt?Yt(yt):function(e){return ts(e)&&Ar(e)==T},as=bt?Yt(bt):function(e){return ts(e)&&fo(e)==S};function ss(e){return"string"==typeof e||!Ha(e)&&ts(e)&&Ar(e)==E}function ls(e){return"symbol"==typeof e||ts(e)&&Ar(e)==C}var cs=_t?Yt(_t):function(e){return ts(e)&&Qa(e.length)&&!!nt[Ar(e)]},us=qi(Pr),hs=qi((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(Wa(e))return ss(e)?hn(e):Si(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fo(e);return(t==x?an:t==S?cn:js)(e)}function fs(e){return e?(e=ms(e))===l||e===-l?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?ir(ps(e),0,h):0}function ms(e){if("number"==typeof e)return e;if(ls(e))return u;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=fe.test(e);return n||ge.test(e)?at(e.slice(2),n?2:8):de.test(e)?u:+e}function vs(e){return Ei(e,Ds(e))}function ys(e){return null==e?"":ai(e)}var bs=Mi((function(e,t){if(wo(t)||Wa(t))Ei(t,Ls(t),e);else for(var n in t)Le.call(t,n)&&Jn(e,n,t[n])})),_s=Mi((function(e,t){Ei(t,Ds(t),e)})),xs=Mi((function(e,t,n,r){Ei(t,Ds(t),e,r)})),ws=Mi((function(e,t,n,r){Ei(t,Ls(t),e,r)})),As=eo(rr),ks=Gr((function(e,t){e=we(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&yo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ds(a),l=-1,c=s.length;++l<c;){var u=s[l],h=e[u];(h===n||ja(h,Ce[u])&&!Le.call(e,u))&&(e[u]=a[u])}return e})),Ts=Gr((function(e){return e.push(n,Zi),xt(Rs,n,e)}));function Ss(e,t,r){var i=null==e?n:xr(e,t);return i===n?r:i}function Es(e,t){return null!=e&&po(e,t,Sr)}var Cs=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=n}),el(rl)),Ms=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),ao),Os=Gr(Cr);function Ls(e){return Wa(e)?Gn(e):Rr(e)}function Ds(e){return Wa(e)?Gn(e,!0):function(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in we(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&Le.call(e,r))&&n.push(r);return n}(e)}var Is=Mi((function(e,t,n){Br(e,t,n)})),Rs=Mi((function(e,t,n,r){Br(e,t,n,r)})),Ps=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Ei(e,no(e),n),r&&(n=or(n,7,Ki));for(var i=t.length;i--;)li(n,t[i]);return n})),Ns=eo((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Es(e,n)}))}(e,t)}));function zs(e,t){if(null==e)return{};var n=Mt(no(e),(function(e){return[e]}));return t=ao(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Gi(Ls),Bs=Gi(Ds);function js(e){return null==e?[]:Xt(e,Ls(e))}var Us=Ii((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Zs(ys(e).toLowerCase())}function qs(e){return(e=ys(e))&&e.replace(ve,en).replace(Xe,"")}var Hs=Ii((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=Ii((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ws=Di("toLowerCase"),Gs=Ii((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Ii((function(e,t,n){return e+(n?" ":"")+Zs(t)})),Xs=Ii((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Zs=Di("toUpperCase");function Ks(e,t,r){return e=ys(e),(t=r?n:t)===n?on(e)?pn(e):Pt(e):e.match(t)||[]}var Js=Gr((function(e,t){try{return xt(e,n,t)}catch(e){return Za(e)?e:new se(e)}})),Qs=eo((function(e,t){return At(t,(function(t){t=zo(t),nr(e,t,Ma(e[t],e))})),e}));function el(e){return function(){return e}}var tl=Ni(),nl=Ni(!0);function rl(e){return e}function il(e){return Ir("function"==typeof e?e:or(e,1))}var ol=Gr((function(e,t){return function(n){return Cr(n,e,t)}})),al=Gr((function(e,t){return function(n){return Cr(e,n,t)}}));function sl(e,t,n){var r=Ls(t),i=_r(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=_r(t,Ls(t)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Ka(e);return At(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Si(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function ll(){}var cl=ji(Mt),ul=ji(Tt),hl=ji(It);function dl(e){return bo(e)?Vt(zo(e)):function(e){return function(t){return xr(t,e)}}(e)}var fl=Vi(),pl=Vi(!0);function gl(){return[]}function ml(){return!1}var vl=Bi((function(e,t){return e+t}),0),yl=$i("ceil"),bl=Bi((function(e,t){return e/t}),1),_l=$i("floor"),xl=Bi((function(e,t){return e*t}),1),wl=$i("round"),Al=Bi((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Te(r);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Ea,zn.assign=bs,zn.assignIn=_s,zn.assignInWith=xs,zn.assignWith=ws,zn.at=As,zn.before=Ca,zn.bind=Ma,zn.bindAll=Qs,zn.bindKey=Oa,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ha(e)?e:[e]},zn.chain=da,zn.chunk=function(e,t,r){t=(r?yo(e,t,r):t===n)?1:qt(ps(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=y(st(i/t));o<i;)s[a++]=ei(e,o,o+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=y(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Ot(Ha(n)?Si(n):[n],gr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=ao();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Te(r);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var i=e[r];if(xt(i[0],this,n))return xt(i[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Ls(e);return function(n){return ar(n,e,t)}}(or(e,1))},zn.constant=el,zn.countBy=ga,zn.create=function(e,t){var n=Fn(e);return null==t?n:tr(n,t)},zn.curry=function e(t,r,i){var o=Yi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,r,i){var o=Yi(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.debounce=La,zn.defaults=ks,zn.defaultsDeep=Ts,zn.defer=Da,zn.delay=Ia,zn.difference=jo,zn.differenceBy=Uo,zn.differenceWith=Vo,zn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ei(e,(t=r||t===n?1:ps(t))<0?0:t,i):[]},zn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ei(e,0,(t=i-(t=r||t===n?1:ps(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?ui(e,ao(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?ui(e,ao(t,3),!0):[]},zn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yo(e,t,n)&&(n=0,r=i),fr(e,t,n,r)):[]},zn.filter=function(e,t){return(Ha(e)?St:pr)(e,ao(t,3))},zn.flatMap=function(e,t){return gr(Aa(e,t),1)},zn.flatMapDeep=function(e,t){return gr(Aa(e,t),l)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:ps(r),gr(Aa(e,t),r)},zn.flatten=$o,zn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===n?1:ps(t)):[]},zn.flip=function(e){return Yi(e,512)},zn.flow=tl,zn.flowRight=nl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:_r(e,Ls(e))},zn.functionsIn=function(e){return null==e?[]:_r(e,Ds(e))},zn.groupBy=_a,zn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},zn.intersection=Go,zn.intersectionBy=Yo,zn.intersectionWith=Xo,zn.invert=Cs,zn.invertBy=Ms,zn.invokeMap=xa,zn.iteratee=il,zn.keyBy=wa,zn.keys=Ls,zn.keysIn=Ds,zn.map=Aa,zn.mapKeys=function(e,t){var n={};return t=ao(t,3),yr(e,(function(e,r,i){nr(n,t(e,r,i),e)})),n},zn.mapValues=function(e,t){var n={};return t=ao(t,3),yr(e,(function(e,r,i){nr(n,r,t(e,r,i))})),n},zn.matches=function(e){return zr(or(e,1))},zn.matchesProperty=function(e,t){return Fr(e,or(t,1))},zn.memoize=Ra,zn.merge=Is,zn.mergeWith=Rs,zn.method=ol,zn.methodOf=al,zn.mixin=sl,zn.negate=Pa,zn.nthArg=function(e){return e=ps(e),Gr((function(t){return jr(t,e)}))},zn.omit=Ps,zn.omitBy=function(e,t){return zs(e,Pa(ao(t)))},zn.once=function(e){return Ca(2,e)},zn.orderBy=function(e,t,r,i){return null==e?[]:(Ha(t)||(t=null==t?[]:[t]),Ha(r=i?n:r)||(r=null==r?[]:[r]),Ur(e,t,r))},zn.over=cl,zn.overArgs=Na,zn.overEvery=ul,zn.overSome=hl,zn.partial=za,zn.partialRight=Fa,zn.partition=ka,zn.pick=Ns,zn.pickBy=zs,zn.property=dl,zn.propertyOf=function(e){return function(t){return null==e?n:xr(e,t)}},zn.pull=Ko,zn.pullAll=Jo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,ao(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qr(e,t,n,r):e},zn.pullAt=Qo,zn.range=fl,zn.rangeRight=pl,zn.rearg=Ba,zn.reject=function(e,t){return(Ha(e)?St:pr)(e,Pa(ao(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ao(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Hr(e,i),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Te(r);return Gr(e,t=t===n?t:ps(t))},zn.reverse=ea,zn.sampleSize=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:ps(t),(Ha(e)?Xn:Xr)(e,t)},zn.set=function(e,t,n){return null==e?e:Zr(e,t,n)},zn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Zr(e,t,r,i)},zn.shuffle=function(e){return(Ha(e)?Zn:Qr)(e)},zn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yo(e,t,r)?(t=0,r=i):(t=null==t?0:ps(t),r=r===n?i:ps(r)),ei(e,t,r)):[]},zn.sortBy=Ta,zn.sortedUniq=function(e){return e&&e.length?ii(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,ao(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&yo(e,t,r)&&(t=r=n),(r=r===n?h:r>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ai(t))&&rn(e)?yi(hn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Te(r);return t=null==t?0:qt(ps(t),0),Gr((function(n){var r=n[t],i=yi(n,0,t);return r&&Ot(i,r),xt(e,this,i)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===n?1:ps(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ei(e,(t=i-(t=r||t===n?1:ps(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?ui(e,ao(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?ui(e,ao(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Te(r);return es(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=fa,zn.toArray=ds,zn.toPairs=Fs,zn.toPairsIn=Bs,zn.toPath=function(e){return Ha(e)?Mt(e,zo):ls(e)?[e]:Si(No(ys(e)))},zn.toPlainObject=vs,zn.transform=function(e,t,n){var r=Ha(e),i=r||Ya(e)||cs(e);if(t=ao(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Ka(o)?Fn(Ve(e)):{}}return(i?At:yr)(e,(function(e,r,i){return t(n,e,r,i)})),n},zn.unary=function(e){return Ea(e,1)},zn.union=ta,zn.unionBy=na,zn.unionWith=ra,zn.uniq=function(e){return e&&e.length?si(e):[]},zn.uniqBy=function(e,t){return e&&e.length?si(e,ao(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?si(e,n,t):[]},zn.unset=function(e,t){return null==e||li(e,t)},zn.unzip=ia,zn.unzipWith=oa,zn.update=function(e,t,n){return null==e?e:ci(e,t,gi(n))},zn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:ci(e,t,gi(r),i)},zn.values=js,zn.valuesIn=function(e){return null==e?[]:Xt(e,Ds(e))},zn.without=aa,zn.words=Ks,zn.wrap=function(e,t){return za(gi(t),e)},zn.xor=sa,zn.xorBy=la,zn.xorWith=ca,zn.zip=ua,zn.zipObject=function(e,t){return fi(e||[],t||[],Jn)},zn.zipObjectDeep=function(e,t){return fi(e||[],t||[],Zr)},zn.zipWith=ha,zn.entries=Fs,zn.entriesIn=Bs,zn.extend=_s,zn.extendWith=xs,sl(zn,zn),zn.add=vl,zn.attempt=Js,zn.camelCase=Us,zn.capitalize=Vs,zn.ceil=yl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ms(r))==r?r:0),t!==n&&(t=(t=ms(t))==t?t:0),ir(ms(e),t,r)},zn.clone=function(e){return or(e,4)},zn.cloneDeep=function(e){return or(e,5)},zn.cloneDeepWith=function(e,t){return or(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return or(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||ar(e,t,Ls(t))},zn.deburr=qs,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=bl,zn.endsWith=function(e,t,r){e=ys(e),t=ai(t);var i=e.length,o=r=r===n?i:ir(ps(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},zn.eq=ja,zn.escape=function(e){return(e=ys(e))&&G.test(e)?e.replace($,tn):e},zn.escapeRegExp=function(e){return(e=ys(e))&&te.test(e)?e.replace(ee,"\\$&"):e},zn.every=function(e,t,r){var i=Ha(e)?Tt:hr;return r&&yo(e,t,r)&&(t=n),i(e,ao(t,3))},zn.find=ma,zn.findIndex=qo,zn.findKey=function(e,t){return Nt(e,ao(t,3),yr)},zn.findLast=va,zn.findLastIndex=Ho,zn.findLastKey=function(e,t){return Nt(e,ao(t,3),br)},zn.floor=_l,zn.forEach=ya,zn.forEachRight=ba,zn.forIn=function(e,t){return null==e?e:mr(e,ao(t,3),Ds)},zn.forInRight=function(e,t){return null==e?e:vr(e,ao(t,3),Ds)},zn.forOwn=function(e,t){return e&&yr(e,ao(t,3))},zn.forOwnRight=function(e,t){return e&&br(e,ao(t,3))},zn.get=Ss,zn.gt=Ua,zn.gte=Va,zn.has=function(e,t){return null!=e&&po(e,t,Tr)},zn.hasIn=Es,zn.head=Wo,zn.identity=rl,zn.includes=function(e,t,n,r){e=Wa(e)?e:js(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=qt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ft(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=qt(r+i,0)),Ft(e,t,i)},zn.inRange=function(e,t,r){return t=fs(t),r===n?(r=t,t=0):r=fs(r),function(e,t,n){return e>=mn(t,n)&&e<qt(t,n)}(e=ms(e),t,r)},zn.invoke=Os,zn.isArguments=qa,zn.isArray=Ha,zn.isArrayBuffer=$a,zn.isArrayLike=Wa,zn.isArrayLikeObject=Ga,zn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ar(e)==g},zn.isBuffer=Ya,zn.isDate=Xa,zn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&(Ha(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||qa(e)))return!e.length;var t=fo(e);if(t==x||t==S)return!e.size;if(wo(e))return!Rr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Or(e,t)},zn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Or(e,t,n,r):!!i},zn.isError=Za,zn.isFinite=function(e){return"number"==typeof e&&ft(e)},zn.isFunction=Ka,zn.isInteger=Ja,zn.isLength=Qa,zn.isMap=ns,zn.isMatch=function(e,t){return e===t||Lr(e,t,lo(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Lr(e,t,lo(t),r)},zn.isNaN=function(e){return rs(e)&&e!=+e},zn.isNative=function(e){if(xo(e))throw new se("Unsupported core-js use. Try path_to_url");return Dr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=rs,zn.isObject=es,zn.isObjectLike=ts,zn.isPlainObject=is,zn.isRegExp=os,zn.isSafeInteger=function(e){return Ja(e)&&e>=-c&&e<=c},zn.isSet=as,zn.isString=ss,zn.isSymbol=ls,zn.isTypedArray=cs,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return ts(e)&&fo(e)==M},zn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ar(e)},zn.join=function(e,t){return null==e?"":pt.call(e,t)},zn.kebabCase=Hs,zn.last=Zo,zn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ps(r))<0?qt(i+o,0):mn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,jt,o,!0)},zn.lowerCase=$s,zn.lowerFirst=Ws,zn.lt=us,zn.lte=hs,zn.max=function(e){return e&&e.length?dr(e,rl,kr):n},zn.maxBy=function(e,t){return e&&e.length?dr(e,ao(t,2),kr):n},zn.mean=function(e){return Ut(e,rl)},zn.meanBy=function(e,t){return Ut(e,ao(t,2))},zn.min=function(e){return e&&e.length?dr(e,rl,Pr):n},zn.minBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Pr):n},zn.stubArray=gl,zn.stubFalse=ml,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xl,zn.nth=function(e,t){return e&&e.length?jr(e,ps(t)):n},zn.noConflict=function(){return ct._===this&&(ct._=Ne),this},zn.noop=ll,zn.now=Sa,zn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(lt(i),n)+e+Ui(st(i),n)},zn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?un(e):0;return t&&r<t?e+Ui(t-r,n):e},zn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?un(e):0;return t&&r<t?Ui(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),yn(ys(e).replace(ne,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=fs(e),t===n?(t=e,e=0):t=fs(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=bn();return mn(e+o*(t-e+ot("1e-"+((o+"").length-1))),t)}return $r(e,t)},zn.reduce=function(e,t,n){var r=Ha(e)?Lt:Ht,i=arguments.length<3;return r(e,ao(t,4),n,i,cr)},zn.reduceRight=function(e,t,n){var r=Ha(e)?Dt:Ht,i=arguments.length<3;return r(e,ao(t,4),n,i,ur)},zn.repeat=function(e,t,r){return t=(r?yo(e,t,r):t===n)?1:ps(t),Wr(ys(e),t)},zn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var i=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[zo(t[i])];a===n&&(i=o,a=r),e=Ka(a)?a.call(e):a}return e},zn.round=wl,zn.runInContext=e,zn.sample=function(e){return(Ha(e)?Yn:Yr)(e)},zn.size=function(e){if(null==e)return 0;if(Wa(e))return ss(e)?un(e):e.length;var t=fo(e);return t==x||t==S?e.size:Rr(e).length},zn.snakeCase=Gs,zn.some=function(e,t,r){var i=Ha(e)?It:ti;return r&&yo(e,t,r)&&(t=n),i(e,ao(t,3))},zn.sortedIndex=function(e,t){return ni(e,t)},zn.sortedIndexBy=function(e,t,n){return ri(e,t,ao(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&ja(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ni(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ri(e,t,ao(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(ja(e[n],t))return n}return-1},zn.startCase=Ys,zn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:ir(ps(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},zn.subtract=Al,zn.sum=function(e){return e&&e.length?$t(e,rl):0},zn.sumBy=function(e,t){return e&&e.length?$t(e,ao(t,2)):0},zn.template=function(e,t,r){var i=zn.templateSettings;r&&yo(e,t,r)&&(t=n),e=ys(e),t=xs({},t,i,Xi);var o,a,s=xs({},t.imports,i.imports,Xi),l=Ls(s),c=Xt(s,l),u=0,h=t.interpolate||ye,d="__p += '",f=Ae((t.escape||ye).source+"|"+h.source+"|"+(h===Z?ue:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tt+"]")+"\n";e.replace(f,(function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(u,l).replace(be,nn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var g=Le.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(U,""):d).replace(V,"$1").replace(q,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Js((function(){return _e(l,p+"return "+d).apply(n,c)}));if(m.source=d,Za(m))throw m;return m},zn.times=function(e,t){if((e=ps(e))<1||e>c)return[];var n=h,r=mn(e,h);t=ao(t),e-=h;for(var i=Wt(r,t);++n<e;)t(n);return i},zn.toFinite=fs,zn.toInteger=ps,zn.toLength=gs,zn.toLower=function(e){return ys(e).toLowerCase()},zn.toNumber=ms,zn.toSafeInteger=function(e){return e?ir(ps(e),-c,c):0===e?e:0},zn.toString=ys,zn.toUpper=function(e){return ys(e).toUpperCase()},zn.trim=function(e,t,r){if((e=ys(e))&&(r||t===n))return Gt(e);if(!e||!(t=ai(t)))return e;var i=hn(e),o=hn(t);return yi(i,Kt(i,o),Jt(i,o)+1).join("")},zn.trimEnd=function(e,t,r){if((e=ys(e))&&(r||t===n))return e.slice(0,dn(e)+1);if(!e||!(t=ai(t)))return e;var i=hn(e);return yi(i,0,Jt(i,hn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=ys(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var i=hn(e);return yi(i,Kt(i,hn(t))).join("")},zn.truncate=function(e,t){var r=30,i="...";if(es(t)){var o="separator"in t?t.separator:o;r="length"in t?ps(t.length):r,i="omission"in t?ai(t.omission):i}var a=(e=ys(e)).length;if(rn(e)){var s=hn(e);a=s.length}if(r>=a)return e;var l=r-un(i);if(l<1)return i;var c=s?yi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),os(o)){if(e.slice(l).search(o)){var u,h=c;for(o.global||(o=Ae(o.source,ys(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(ai(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},zn.unescape=function(e){return(e=ys(e))&&W.test(e)?e.replace(H,fn):e},zn.uniqueId=function(e){var t=++De;return ys(e)+t},zn.upperCase=Xs,zn.upperFirst=Zs,zn.each=ya,zn.eachRight=ba,zn.first=Wo,sl(zn,function(){var e={};return yr(zn,(function(t,n){Le.call(zn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),zn.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),At(["drop","take"],(function(e,t){Un.prototype[e]=function(r){r=r===n?1:qt(ps(r),0);var i=this.__filtered__&&!t?new Un(this):this.clone();return i.__filtered__?i.__takeCount__=mn(r,i.__takeCount__):i.__views__.push({size:mn(r,h),type:e+(i.__dir__<0?"Right":"")}),i},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),At(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),At(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(rl)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Cr(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(Pa(ao(e)))},Un.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(h)},yr(Un.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Un,c=s[0],u=l||Ha(t),h=function(e){var t=o.apply(zn,Ot([e],s));return i&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,g=l&&!f;if(!a&&u){t=g?t:new Un(this);var m=e.apply(t,s);return m.__actions__.push({func:fa,args:[h],thisArg:n}),new jn(m,d)}return p&&g?e.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Se[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ha(i)?i:[],e)}return this[n]((function(n){return t.apply(Ha(n)?n:[],e)}))}})),yr(Un.prototype,(function(e,t){var n=zn[t];if(n){var r=n.name+"";Le.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[zi(n,2).name]=[{name:"wrapper",func:n}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=Si(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Si(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Si(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ha(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=qt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,h=u.length,d=0,f=mn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return hi(e,this.__actions__);var p=[];e:for(;l--&&d<f;){for(var g=-1,m=e[c+=t];++g<h;){var v=u[g],y=v.iteratee,b=v.type,_=y(m);if(2==b)m=_;else if(!_){if(1==b)continue e;break e}}p[d++]=m}return p},zn.prototype.at=pa,zn.prototype.chain=function(){return da(this)},zn.prototype.commit=function(){return new jn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Bn;){var i=Bo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ea],thisArg:n}),new jn(t,this.__chain__)}return this.thru(ea)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Ge&&(zn.prototype[Ge]=function(){return this}),zn}();ht?((ht.exports=gn)._=gn,ut._=gn):ct._=gn}).call(y)})),yi=function(){function e(e,t){var n,r;this.sv=e,this.storesByType={},this.storesXToType={},this.storesYToType={},null===(n=this.sv.selectionStoreConnector)||void 0===n||n.beforeUpdate(),this.columns=this.getViewportColumnData(t),null===(r=this.sv.scrollingService)||void 0===r||r.unregister()}return e.prototype.onColumnResize=function(e,t,n){var r;null===(r=this.sv.dimensionProvider)||void 0===r||r.setDimensionSize(e,t.detail);var i=vi.reduce(t.detail||{},(function(e,t,r){var i=xn(n,parseInt(r,10));return i&&(e[i.prop]=Object.assign(Object.assign({},i),{size:t})),e}),{});this.sv.resize(i)},e.prototype.getViewportColumnData=function(e){var t=this,n=[],r=0;return Tn.forEach((function(i){var o=t.sv.columnProvider.stores[i].store;if(o.get("items").length){var a={colType:i,position:{x:r,y:1},contentHeight:e,fixWidth:"rgCol"!==i,uuid:t.sv.uuid+"-"+r,viewports:t.sv.viewportProvider.stores,dimensions:t.sv.dimensionProvider.stores,rowStores:t.sv.dataProvider.stores,colStore:o,onHeaderresize:function(e){return t.onColumnResize(i,e,o)}};"rgCol"===i&&(a.onResizeViewport=function(e){var n;return null===(n=t.sv.viewportProvider)||void 0===n?void 0:n.setViewport(e.detail.dimension,{virtualSize:e.detail.size})});var s=t.gatherColumnData(a),l=t.registerCol(s.position.x,i),c=t.dataViewPort(a).reduce((function(e,n){var r=t.registerSegment(n.position);r.setLastCell(n.lastCell);var i=t.registerRow(n.position.y,n.type),o=Object.assign(Object.assign({},n),{rowSelectionStore:i,segmentSelectionStore:r.store,ref:function(e){return t.sv.selectionStoreConnector.registerSection(e)},onSetRange:function(e){return r.setRangeArea(e.detail)},onSetTempRange:function(e){return r.setTempArea(e.detail)},onFocusCell:function(e){r.clearFocus(),t.sv.selectionStoreConnector.focus(r,e.detail)}});return e.push(o),e}),[]);n.push(Object.assign(Object.assign({},s),{columnSelectionStore:l,dataPorts:c})),r++}})),n},e.prototype.registerSegment=function(e){return this.sv.selectionStoreConnector.register(e)},e.prototype.registerRow=function(e,t){return this.storesByType[t]=e,this.storesYToType[e]=t,this.sv.selectionStoreConnector.registerRow(e).store},e.prototype.registerCol=function(e,t){return this.storesByType[t]=e,this.storesXToType[e]=t,this.sv.selectionStoreConnector.registerColumn(e).store},e.prototype.gatherColumnData=function(e){var t,n=e.uuid,r=e.dimensions[e.colType].store.get("realSize"),i=((t={contentWidth:r,class:e.colType})[""+Rr]=e.uuid,t.contentHeight=e.contentHeight,t.key=e.colType,t.onResizeViewport=e.onResizeViewport,t);e.fixWidth&&(i.style={minWidth:r+"px"});var o={parent:n,colData:_n(e.colStore),dimensionCol:e.dimensions[e.colType].store,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),onHeaderresize:e.onHeaderresize};return{prop:i,position:e.position,headerProp:o,parent:n,viewportCol:e.viewports[e.colType].store}},e.prototype.dataViewPort=function(e){var t=this,n={rowPinStart:fi,rgRow:gi,rowPinEnd:pi},r=0;return kn.reduce((function(i,o){var a=e.viewports[o].store.get("realCount")||"rgRow"===o,s=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:a?r:hi})});return i.push(t.dataPartition(s,o,n[o],"rgRow"!==o)),a&&r++,i}),[])},e.prototype.dataPartition=function(e,t,n,r){return{colData:e.colStore,viewportCol:e.viewports[e.colType].store,viewportRow:e.viewports[t].store,lastCell:mi(e,t),slot:n,type:t,canDrag:!r,position:e.position,uuid:e.uuid+"-"+e.position.x+"-"+e.position.y,dataStore:e.rowStores[t].store,dimensionCol:e.dimensions[e.colType].store,dimensionRow:e.dimensions[t].store,style:r?{height:e.dimensions[t].store.get("realSize")+"px"}:void 0}},e.prototype.scrollToCell=function(e){for(var t in e){var n=e[t];this.sv.scrollingService.onScroll({dimension:"x"===t?"rgCol":"rgRow",coordinate:n})}},e.prototype.clearFocused=function(){this.sv.selectionStoreConnector.clearAll()},e.prototype.clearEdit=function(){this.sv.selectionStoreConnector.setEdit(!1)},e.prototype.getFocused=function(){var e=this.sv.selectionStoreConnector.focusedStore;if(!e)return null;var t=this.storesXToType[e.position.x],n=this.sv.columnProvider.getColumn(e.cell.x,t),r=this.storesYToType[e.position.x];return{column:n,model:this.sv.dataProvider.getModel(e.cell.x,r),cell:e.cell,colType:t,rowType:r}},e.prototype.setEdit=function(e,t,n,r){var i,o=this.storesByType,a={x:o[n],y:o[r]};null===(i=this.sv.selectionStoreConnector)||void 0===i||i.setEditByCell(a,{x:t,y:e})},e}(),bi=function(e){for(var t=e.resize,n=e.editors,r=e.rowClass,o=e.readonly,a=e.range,s=e.columns,l=e.useClipboard,c=e.columnFilter,u=e.registerElement,h=e.onEdit,d=e.onScroll,f=[],p=function(e){var s=[(0,i.h)("revogr-header",Object.assign({viewportCol:e.viewportCol},e.headerProp,{selectionStore:e.columnSelectionStore,slot:fi,columnFilter:c,canResize:t}))];e.dataPorts.forEach((function(t,c){var u,d=e.prop.key+(c+1),f=(0,i.h)("revogr-overlay-selection",Object.assign({},t,{slot:t.slot,selectionStore:t.segmentSelectionStore,editors:n,readonly:o,range:a,useClipboard:l,onSetEdit:function(e){var t=e.detail;return h(t)}}),(0,i.h)("revogr-data",Object.assign({},t,((u={})[Rr]=t.uuid,u),{key:d,readonly:o,range:a,rowClass:r,rowSelectionStore:t.rowSelectionStore,slot:"data"})),(0,i.h)("revogr-temp-range",{selectionStore:t.segmentSelectionStore,dimensionRow:t.dimensionRow,dimensionCol:t.dimensionCol}),(0,i.h)("revogr-focus",{selectionStore:t.segmentSelectionStore,dimensionRow:t.dimensionRow,dimensionCol:t.dimensionCol}));s.push(f)})),f.push((0,i.h)("revogr-viewport-scroll",Object.assign({},e.prop,{ref:function(t){return u(t,e.prop.key)},onScrollViewport:function(t){return d(t.detail,e.prop.key)}}),s))},g=0,m=s;g<m.length;g++)p(m[g]);return f},_i=function(){function e(e){this.setViewport=e,this.elements={}}return e.prototype.onScroll=function(e,t){return s(this,void 0,void 0,(function(){var n,r,i,o,a,s,c,u;return l(this,(function(l){switch(l.label){case 0:for(r in this.elements)if(this.isPinnedColumn(t)&&"rgCol"===e.dimension){if(r===t||!e.delta)continue;for(i=0,o=this.elements[r];i<o.length;i++)(c=o[i]).changeScroll&&(n=c.changeScroll(e))}else{if("rgCol"===e.dimension&&"headerRow"===r)continue;for(a=0,s=this.elements[r];a<s.length;a++)(c=s[a]).setScroll(e)}return u=e,n?[4,n]:[3,2];case 1:u=l.sent(),l.label=2;case 2:return this.setViewport(u),[2]}}))}))},e.prototype.isPinnedColumn=function(e){return["colPinStart","colPinEnd"].indexOf(e)>-1},e.prototype.registerElements=function(e){this.elements=e},e.prototype.registerElement=function(e,t){this.elements[t]||(this.elements[t]=[]),e?this.elements[t].push(e):this.elements[t]&&delete this.elements[t]},e.prototype.unregister=function(){delete this.elements,this.elements={}},e}(),xi=function(e){function t(t,n){var r=e.call(this,t)||this;return r.dimensionProvider=n,r.stretchedColumn=null,r.scrollSize=zn(document),r.addEventListener("beforecolumnapplied",(function(e){var t=e.detail.columns;return r.applyStretch(t)})),r}return a(t,e),t.prototype.setScroll=function(e){var t,n=e.type,r=e.hasScroll;"rgRow"===n&&this.stretchedColumn&&(null===(t=this.stretchedColumn)||void 0===t?void 0:t.initialSize)===this.stretchedColumn.size&&r&&(this.stretchedColumn.size-=this.scrollSize,this.apply(),this.dropChanges())},t.prototype.activateChanges=function(){var e=this;this.addEventListener("scrollchange",(function(t){var n=t.detail;return e.setScroll(n)}))},t.prototype.dropChanges=function(){this.stretchedColumn=null,this.removeEventListener("scrollchange")},t.prototype.apply=function(){var e;this.stretchedColumn&&this.dimensionProvider.setDimensionSize("rgCol",((e={})[this.stretchedColumn.index]=this.stretchedColumn.size,e))},t.prototype.applyStretch=function(e){var t=this;this.dropChanges();var n=this.revogrid.clientWidth-1;if(vi.each(e,(function(e,r){var i=t.dimensionProvider.stores[r].store.get("realSize");n-=i})),n>0){var r=e.rgCol.length-1,i=e.rgCol[r],o=(null==i?void 0:i.size)||this.revogrid.colSize||0,a=n+o-1;i&&!i.autoSize&&o<a&&(this.stretchedColumn={initialSize:a,index:r,size:a},this.apply(),this.activateChanges())}},t}(Cn),wi=function(){function e(e){(0,i.r)(this,e),this.beforeedit=(0,i.c)(this,"beforeedit",7),this.beforerangeedit=(0,i.c)(this,"beforerangeedit",7),this.afteredit=(0,i.c)(this,"afteredit",7),this.beforeautofill=(0,i.c)(this,"beforeautofill",7),this.beforeaange=(0,i.c)(this,"beforeaange",7),this.roworderchanged=(0,i.c)(this,"roworderchanged",7),this.beforesourcesortingapply=(0,i.c)(this,"beforesourcesortingapply",7),this.beforesortingapply=(0,i.c)(this,"beforesortingapply",7),this.beforesorting=(0,i.c)(this,"beforesorting",7),this.rowdragstart=(0,i.c)(this,"rowdragstart",7),this.headerclick=(0,i.c)(this,"headerclick",7),this.beforecellfocus=(0,i.c)(this,"beforecellfocus",7),this.beforefocuslost=(0,i.c)(this,"beforefocuslost",7),this.beforesourceset=(0,i.c)(this,"beforesourceset",7),this.aftersourceset=(0,i.c)(this,"aftersourceset",7),this.beforecolumnsset=(0,i.c)(this,"beforecolumnsset",7),this.beforecolumnapplied=(0,i.c)(this,"beforecolumnapplied",7),this.aftercolumnsset=(0,i.c)(this,"aftercolumnsset",7),this.beforefilterapply=(0,i.c)(this,"beforefilterapply",7),this.beforefiltertrimmed=(0,i.c)(this,"beforefiltertrimmed",7),this.beforetrimmed=(0,i.c)(this,"beforetrimmed",7),this.aftertrimmed=(0,i.c)(this,"aftertrimmed",7),this.viewportscroll=(0,i.c)(this,"viewportscroll",7),this.beforeexport=(0,i.c)(this,"beforeexport",7),this.beforeeditstart=(0,i.c)(this,"beforeeditstart",7),this.aftercolumnresize=(0,i.c)(this,"aftercolumnresize",7),this.frameSize=1,this.rowSize=0,this.colSize=100,this.range=!1,this.readonly=!1,this.resize=!1,this.canFocus=!0,this.useClipboard=!0,this.columns=[],this.source=[],this.pinnedTopSource=[],this.pinnedBottomSource=[],this.rowDefinitions=[],this.editors={},this.columnTypes={},this.theme="default",this.rowClass="",this.autoSizeColumn=!1,this.filter=!1,this.trimmedRows={},this.exporting=!1,this.stretch=!0,this.extraElements=[],this.uuid=null,this.viewport=null,this.internalPlugins=[],this.subscribers={}}return e.prototype.refresh=function(e){return void 0===e&&(e="all"),s(this,void 0,void 0,(function(){return l(this,(function(t){return this.dataProvider.refresh(e),[2]}))}))},e.prototype.scrollToRow=function(e){return void 0===e&&(e=0),s(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"}),[4,this.scrollToCoordinate({y:t})];case 1:return n.sent(),[2]}}))}))},e.prototype.scrollToColumnIndex=function(e){return void 0===e&&(e=0),s(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"}),[4,this.scrollToCoordinate({x:t})];case 1:return n.sent(),[2]}}))}))},e.prototype.scrollToColumnProp=function(e){return s(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return(t=this.columnProvider.getColumnIndexByProp(e,"rgCol"))<0?[2]:(n=this.dimensionProvider.getViewPortPos({coordinate:t,dimension:"rgCol"}),[4,this.scrollToCoordinate({x:n})]);case 1:return r.sent(),[2]}}))}))},e.prototype.updateColumns=function(e){return s(this,void 0,void 0,(function(){return l(this,(function(t){return this.columnProvider.updateColumns(e),[2]}))}))},e.prototype.addTrimmed=function(e,t,n){return void 0===t&&(t="external"),void 0===n&&(n="rgRow"),s(this,void 0,void 0,(function(){var r,i;return l(this,(function(o){return(r=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:n})).defaultPrevented||(this.dataProvider.setTrimmed(((i={})[t]=r.detail.trimmed,i),n),this.aftertrimmed.emit()),[2,r]}))}))},e.prototype.scrollToCoordinate=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){return null===(t=this.viewport)||void 0===t||t.scrollToCell(e),[2]}))}))},e.prototype.setCellEdit=function(e,t,n){return void 0===n&&(n="rgRow"),s(this,void 0,void 0,(function(){var r,i;return l(this,(function(o){switch(o.label){case 0:return(i=On.getColumnByProp(this.columns,t))?[4,Bn()]:[2];case 1:return o.sent(),null===(r=this.viewport)||void 0===r||r.setEdit(e,this.columnProvider.getColumnIndexByProp(t,"rgCol"),i.pin||"rgCol",n),[2]}}))}))},e.prototype.registerVNode=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){return(t=this.extraElements).push.apply(t,e),this.extraElements=c([],this.extraElements),[2]}))}))},e.prototype.getSource=function(e){return void 0===e&&(e="rgRow"),s(this,void 0,void 0,(function(){return l(this,(function(t){return[2,this.dataProvider.stores[e].store.get("source")]}))}))},e.prototype.getVisibleSource=function(e){return void 0===e&&(e="rgRow"),s(this,void 0,void 0,(function(){return l(this,(function(t){return[2,_n(this.dataProvider.stores[e].store)]}))}))},e.prototype.getSourceStore=function(e){return void 0===e&&(e="rgRow"),s(this,void 0,void 0,(function(){return l(this,(function(t){return[2,this.dataProvider.stores[e].store]}))}))},e.prototype.getColumnStore=function(e){return void 0===e&&(e="rgCol"),s(this,void 0,void 0,(function(){return l(this,(function(t){return[2,this.columnProvider.stores[e].store]}))}))},e.prototype.updateColumnSorting=function(e,t,n,r){return s(this,void 0,void 0,(function(){return l(this,(function(i){return[2,this.columnProvider.updateColumnSorting(e,t,n,r)]}))}))},e.prototype.clearSorting=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){return this.columnProvider.clearSorting(),[2]}))}))},e.prototype.getColumns=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){return[2,this.columnProvider.getColumns()]}))}))},e.prototype.clearFocus=function(){return s(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return[4,this.getFocused()];case 1:return t=n.sent(),this.beforefocuslost.emit(t).defaultPrevented||(this.selectionStoreConnector.clearAll(),null===(e=this.viewport)||void 0===e||e.clearFocused()),[2]}}))}))},e.prototype.getPlugins=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){return[2,c([],this.internalPlugins)]}))}))},e.prototype.getFocused=function(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(t){return[2,null===(e=this.viewport)||void 0===e?void 0:e.getFocused()]}))}))},e.prototype.handleOutsideClick=function(e){var t=e.target;(null==t?void 0:t.closest("["+Rr+'="'+this.uuid+'"]'))||this.clearFocus()},e.prototype.onRowDragStarted=function(e){var t;e.cancelBubble=!0;var n=this.rowdragstart.emit(e.detail);n.defaultPrevented?e.preventDefault():null===(t=this.orderService)||void 0===t||t.start(this.element,Object.assign(Object.assign({},e.detail),n.detail))},e.prototype.onRowDragEnd=function(){var e;null===(e=this.orderService)||void 0===e||e.end()},e.prototype.onRowDrag=function(e){var t,n=e.detail;null===(t=this.orderService)||void 0===t||t.move(n)},e.prototype.onRowMouseMove=function(e){var t;e.cancelBubble=!0,null===(t=this.orderService)||void 0===t||t.moveTip(e.detail)},e.prototype.onBeforeEdit=function(e){return s(this,void 0,void 0,(function(){var t,n,r;return l(this,(function(i){switch(i.label){case 0:return e.cancelBubble=!0,t=this.beforeedit.emit(e.detail),n=t.defaultPrevented,r=t.detail,[4,Bn()];case 1:return i.sent(),n||(this.dataProvider.setCellData(r),this.afteredit.emit(r)),[2]}}))}))},e.prototype.onBeforeRangeEdit=function(e){e.cancelBubble=!0,this.beforerangeedit.emit(e.detail).defaultPrevented?e.preventDefault():this.afteredit.emit(e.detail)},e.prototype.onRangeChanged=function(e){e.cancelBubble=!0,this.beforeaange.emit(e.detail).defaultPrevented&&e.preventDefault(),this.beforeautofill.emit(e.detail).defaultPrevented},e.prototype.onRowDropped=function(e){e.cancelBubble=!0,this.roworderchanged.emit(e.detail).defaultPrevented&&e.preventDefault()},e.prototype.onHeaderClick=function(e){this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent})).defaultPrevented&&e.preventDefault()},e.prototype.onCellFocus=function(e){e.cancelBubble=!0;var t=this.beforecellfocus.emit(e.detail).defaultPrevented;this.canFocus&&!t||e.preventDefault()},e.prototype.columnChanged=function(e){void 0===e&&(e=[]),this.dimensionProvider.drop();var t=On.getColumns(e,0,this.columnTypes);this.beforecolumnsset.emit(t);for(var n=0,r=Tn;n<r.length;n++){var i=r[n],o=t.columns[i];this.dimensionProvider.setRealSize(o.length,i),this.dimensionProvider.setColumns(i,On.getSizes(o),"rgCol"!==i)}this.beforecolumnapplied.emit(t);var a=this.columnProvider.setColumns(t);this.aftercolumnsset.emit({columns:a,order:this.columnProvider.order})},e.prototype.themeChanged=function(e){this.themeService.register(e),this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize,frameOffset:this.frameSize||0},"rgRow"),this.dimensionProvider.setSettings({originItemSize:this.colSize,frameOffset:this.frameSize||0},"rgCol")},e.prototype.dataChanged=function(e){void 0===e&&(e=[]);var t=c([],e);t=this.beforesourceset.emit({type:"rgRow",source:t}).detail.source,t=this.dataProvider.setData(t,"rgRow"),this.aftersourceset.emit({type:"rgRow",source:t})},e.prototype.dataBottomChanged=function(e){void 0===e&&(e=[]),this.dataProvider.setData(e,"rowPinEnd")},e.prototype.dataTopChanged=function(e){void 0===e&&(e=[]),this.dataProvider.setData(e,"rowPinStart")},e.prototype.rowDefChanged=function(e){var t=this;if(void 0===e&&(e=[]),e.length){var n=Gt(e,(function(e,t){return e[t.type]||(e[t.type]={}),t.size&&(e[t.type].sizes||(e[t.type].sizes={}),e[t.type].sizes[t.index]=t.size),e}),{});Xt(n,(function(e,n){e.sizes&&t.dimensionProvider.setDimensionSize(n,e.sizes)}))}},e.prototype.trimmedRowsChanged=function(e){void 0===e&&(e={}),this.addTrimmed(e)},e.prototype.groupingChanged=function(e){var t;void 0===e&&(e={});for(var n=0,r=this.internalPlugins;n<r.length;n++){var i=r[n];if(i.setGrouping){t=i;break}}t&&t.setGrouping(e||{})},e.prototype.applyStretch=function(e){var t=this.internalPlugins.filter((function(e){return function(e){return!!e.applyStretch}(e)}))[0];if(e)t?t.applyStretch(this.columnProvider.getRawColumns()):this.internalPlugins.push(new xi(this.element,this.dimensionProvider));else if(t){var n=this.internalPlugins.indexOf(t);this.internalPlugins.splice(n,1)}},e.prototype.connectedCallback=function(){var e=this;for(var t in this.viewportProvider=new Qn,this.themeService=new g({rowSize:this.rowSize}),this.dimensionProvider=new Hn(this.viewportProvider),this.columnProvider=new On,this.dataProvider=new Ln(this.dimensionProvider),this.uuid=(new Date).getTime()+"-rvgrid",this.autoSizeColumn&&this.internalPlugins.push(new er(this.element,{dataProvider:this.dataProvider,columnProvider:this.columnProvider,dimensionProvider:this.dimensionProvider},"object"==typeof this.autoSizeColumn?this.autoSizeColumn:void 0)),this.filter&&this.internalPlugins.push(new gr(this.element,this.uuid,"object"==typeof this.filter?this.filter:void 0)),this.exporting&&this.internalPlugins.push(new ti(this.element)),this.internalPlugins.push(new Lr(this.element)),this.plugins&&this.plugins.forEach((function(t){e.internalPlugins.push(new t(e.element))})),this.internalPlugins.push(new ri(this.element,{dataProvider:this.dataProvider,columnProvider:this.columnProvider})),this.applyStretch(this.stretch),this.themeChanged(this.theme),this.columnChanged(this.columns),this.dataChanged(this.source),this.dataTopChanged(this.pinnedTopSource),this.dataBottomChanged(this.pinnedBottomSource),this.trimmedRowsChanged(this.trimmedRows),this.rowDefChanged(this.rowDefinitions),this.groupingChanged(this.grouping),this.selectionStoreConnector=new di,this.scrollingService=new _i((function(t){e.dimensionProvider.setViewPortCoordinate({coordinate:t.coordinate,type:t.dimension}),e.viewportscroll.emit(t)})),this.subscribers={click:this.handleOutsideClick.bind(this)},this.subscribers)document.addEventListener(t,this.subscribers[t])},e.prototype.disconnectedCallback=function(){for(var e in Xt(this.internalPlugins,(function(e){return e.destroy()})),this.internalPlugins=[],this.subscribers)document.removeEventListener(e,this.subscribers[e]),delete this.subscribers[e]},e.prototype.render=function(){var e,t=this,n=this.dimensionProvider.stores.rgRow.store.get("realSize");this.viewport=new yi({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,uuid:this.uuid,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,resize:function(e){return t.aftercolumnresize.emit(e)}},n);var r=[];if(this.rowHeaders){var o=this.viewport.columns[0];r.push((0,i.h)("revogr-row-headers",{height:n,resize:this.resize,dataPorts:o.dataPorts,headerProp:o.headerProp,uiid:o.prop[Rr],rowHeaderColumn:"object"==typeof this.rowHeaders?this.rowHeaders:void 0,onScrollViewport:function(e){var n=e.detail;return t.scrollingService.onScroll(n,"headerRow")},onElementToScroll:function(e){var n=e.detail;return t.scrollingService.registerElement(n,"headerRow")}}))}return r.push((0,i.h)(bi,{columnFilter:!!this.filter,resize:this.resize,readonly:this.readonly,range:this.range,rowClass:this.rowClass,editors:this.editors,useClipboard:this.useClipboard,columns:this.viewport.columns,onEdit:function(e){t.beforeeditstart.emit(e).defaultPrevented||t.selectionStoreConnector.setEdit(!e.isCancel&&e.val)},registerElement:function(e,n){return t.scrollingService.registerElement(e,n)},onScroll:function(e){return t.scrollingService.onScroll(e)}})),(0,i.h)(i.H,Object.assign({},((e={})[""+Rr]=this.uuid,e)),(0,i.h)(ai,{viewports:this.viewportProvider.stores,dimensions:this.dimensionProvider.stores,orderRef:function(e){return t.orderService=e},registerElement:function(e,n){return t.scrollingService.registerElement(e,n)},nakedClick:function(){return t.viewport.clearEdit()},onScroll:function(e){return t.scrollingService.onScroll(e)}},r),this.extraElements)},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{columns:["columnChanged"],theme:["themeChanged"],source:["dataChanged"],pinnedBottomSource:["dataBottomChanged"],pinnedTopSource:["dataTopChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"]}},enumerable:!1,configurable:!0}),e}();wi.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revo-grid[theme=default]{font-size:12px}revo-grid[theme=default] revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#61656a}revo-grid[theme=default] revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #c0c0c0, -1px 0 0 0 #c0c0c0 inset, 0 -1px 0 0 #c0c0c0, 0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell{color:#61656a;box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] .rowHeaders revogr-header{box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #c0c0c0 inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data{text-align:center}revo-grid[theme=default] revogr-data .rgRow{line-height:27px;box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .viewports{width:100%}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .viewports{width:100%}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .viewports{width:100%}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .viewports{width:100%}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:red}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}";var Ai,ki,Ti=function(){function e(e,t){var n=this;this.dataStore=e,this.source=t,this.unsubscribe=[],this.hasGrouping=!1,this.unsubscribe.push(t.onChange("source",(function(e){return n.checkGrouping(e)}))),this.checkGrouping(t.get("source"))}return Object.defineProperty(e.prototype,"columns",{get:function(){return _n(this.source)},enumerable:!1,configurable:!0}),e.prototype.checkGrouping=function(e){for(var t=0,n=e;t<n.length;t++){if(Hr(n[t]))return void(this.hasGrouping=!0);this.hasGrouping=!1}},e.prototype.isReadOnly=function(e,t){var n,r=null===(n=this.columns[t])||void 0===n?void 0:n.readonly;return"function"==typeof r?r(this.rowDataModel(e,t)):r},e.doMerge=function(e,t){var n=Object.assign(Object.assign({},t),e);return t.class&&("object"==typeof t.class&&"object"==typeof n.class?n.class=Object.assign(Object.assign({},t.class),n.class):"string"==typeof t.class&&"object"==typeof n.class?n.class[t.class]=!0:"string"==typeof n.class&&(n.class+=" "+t.class)),t.style&&(n.style=Object.assign(Object.assign({},t.style),n.style)),n},e.prototype.mergeProperties=function(t,n,r){var i,o,a=((i={}).rgCell=!0,i.disabled=this.isReadOnly(t,n),i),s=Object.assign(Object.assign({},r),{class:a}),l=null===(o=this.columns[n])||void 0===o?void 0:o.cellProperties;if(l){var c=l(this.rowDataModel(t,n));return c?e.doMerge(s,c):s}return s},e.prototype.customRenderer=function(e,t,n){var r,o=null===(r=this.columns[t])||void 0===r?void 0:r.cellTemplate;if(o)return o(i.h,n)},e.prototype.getRowClass=function(e,t){return(xn(this.dataStore,e)||{})[t]||""},e.prototype.getCellData=function(t,n){var r=this.rowDataModel(t,n);return e.getData(r.model[r.prop])},e.prototype.getSaveData=function(e,t,n){void 0===n&&(n=this.getCellData(e,t));var r=this.rowDataModel(e,t);return{prop:r.prop,rowIndex:e,val:n,model:r.model,type:this.dataStore.get("type")}},e.prototype.getCellEditor=function(e,t,n){var r,i=null===(r=this.columns[t])||void 0===r?void 0:r.editor;if(i)return"string"==typeof i?n[i]:i},e.prototype.rowDataModel=function(e,t){var n=this.columns[t];return{prop:null==n?void 0:n.prop,model:xn(this.dataStore,e)||{},data:this.dataStore.get("source"),column:n,rowIndex:e}},e.prototype.getRangeData=function(e){for(var t={},n=e.oldProps.length,r=this.copyRangeArray(e.oldRange,e.oldProps,this.dataStore),i=r.length,o=e.newRange.y,a=0;o<e.newRange.y1+1;o++,a++)for(var s=r[a%i],l=e.newRange.x,c=0;l<e.newRange.x1+1;l++,c++)if(!(o>=e.oldRange.y&&o<=e.oldRange.y1&&l>=e.oldRange.x&&l<=e.oldRange.x1)){var u=this.columns[l].prop,h=c%n;this.isReadOnly(o,l)||(t[o]||(t[o]={}),t[o][u]=s[h])}return t},e.prototype.getTransformedDataToApply=function(e,t){for(var n={},r=t.length,i=this.columns.length,o=this.dataStore.get("items").length,a=e.y,s=0,l=0;a<o&&l<r;a++,l++){for(var c=t[l%r],u=(null==c?void 0:c.length)||0,h=e.x,d=0;h<i&&d<u;h++,d++){var f=this.columns[h].prop,p=d%i;this.isReadOnly(a,h)||(n[a]||(n[a]={}),n[a][f]=c[p])}s=Math.max(s,h-1)}return{changed:n,range:ci(e,{y:a-1,x:s})}},e.prototype.applyRangeData=function(e){var t={};for(var n in e){var r=t[n]=xn(this.dataStore,parseInt(n,10));for(var i in e[n])r[i]=e[n][i]}wn(this.dataStore,t)},e.prototype.getRangeStaticData=function(e,t){for(var n={},r=e.y,i=0;r<e.y1+1;r++,i++)for(var o=e.x,a=0;o<e.x1+1;o++,a++){var s=this.columns[o].prop;this.isReadOnly(r,o)||(n[r]||(n[r]={}),n[r][s]=t)}return n},e.prototype.copyRangeArray=function(e,t,n){for(var r=[],i=e.y;i<e.y1+1;i++){for(var o=[],a=0,s=t;a<s.length;a++){var l=s[a],c=xn(n,i);o.push(c[l])}r.push(o)}return r},e.getData=function(e){return null==e?"":e.toString()},e.prototype.destroy=function(){this.unsubscribe.forEach((function(e){return e()}))},e}(),Si=function(e){var t=e.model,n=e.canDrag,r=e.onDragStart,o=[];return t.column.rowDrag&&function(e,t){return"function"==typeof e?e(t):!!e}(t.column.rowDrag,t)&&(n?o.push((0,i.h)("span",{class:Pr,onMouseDown:function(e){return r(e)}},(0,i.h)("span",{class:"revo-drag-icon"}))):o.push((0,i.h)("span",{class:Pr}))),o.push(""+Ti.getData(t.model[t.prop])),o},Ei=function(e,t){var n=e.rowClass,r=e.size,o=e.start,a=e.style,s=e.depth;return(0,i.h)("div",{class:"rgRow "+(n||""),style:Object.assign(Object.assign({},a),{height:r+"px",transform:"translateY("+o+"px)",paddingLeft:s?10*s+"px":void 0})},t)},Ci=function(e){var t,n=e.model,r=e.itemIndex,o=e.hasExpand,a=n["__rvgr-name"],s=n[Br],l=parseInt(n[Fr],10)||0;return o?(0,i.h)(Ei,Object.assign({},e,{rowClass:"groupingRow",depth:l}),(0,i.h)("button",{class:(t={},t["group-expand"]=!0,t),onClick:function(e){return function(e,t,n){var r=new CustomEvent(jr,{detail:{model:t,virtualIndex:n},cancelable:!0,bubbles:!0});e.target.dispatchEvent(r)}(e,n,r)}},(0,i.h)("svg",{"aria-hidden":"true",style:{transform:"rotate("+(s?0:-90)+"deg)"},focusable:"false",viewBox:"0 0 448 512"},(0,i.h)("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}))),a):(0,i.h)(Ei,Object.assign({},e,{rowClass:"groupingRow",depth:l}))},Mi=function(){function e(e){(0,i.r)(this,e),this.dragStartCell=(0,i.c)(this,"dragStartCell",7)}return e.prototype.onStoreChange=function(){var e;null===(e=this.columnService)||void 0===e||e.destroy(),this.columnService=new Ti(this.dataStore,this.colData)},e.prototype.connectedCallback=function(){this.onStoreChange()},e.prototype.disconnectedCallback=function(){var e;null===(e=this.columnService)||void 0===e||e.destroy()},e.prototype.render=function(){var e,t=this.viewportRow.get("items"),n=this.viewportCol.get("items");if(!this.columnService.columns.length||!t.length||!n.length)return"";for(var r=null===(e=this.rowSelectionStore)||void 0===e?void 0:e.get("range"),o=[],a=this.dataStore.get("groupingDepth"),s=0,l=t;s<l.length;s++){var c=l[s],u=xn(this.dataStore,c.itemIndex);if(qr(u))o.push((0,i.h)(Ci,Object.assign({},c,{model:u,hasExpand:this.columnService.hasGrouping})));else{var h=[],d=this.rowClass?this.columnService.getRowClass(c.itemIndex,this.rowClass):"";r&&c.itemIndex>=r.y&&c.itemIndex<=r.y1&&(d+=" focused-rgRow");for(var f=0,p=n;f<p.length;f++){var g=p[f];h.push(this.getCellRenderer(c,g,this.canDrag,this.columnService.hasGrouping?a:0))}o.push((0,i.h)(Ei,{rowClass:d,size:c.size,start:c.start},h))}}return o},e.prototype.getCellRenderer=function(e,t,n,r){var o,a=this;void 0===n&&(n=!1),void 0===r&&(r=0);var s=this.columnService.rowDataModel(e.itemIndex,t.itemIndex),l=((o={})[Ir]=t.itemIndex,o["data-rgRow"]=e.itemIndex,o.style={width:t.size+"px",transform:"translateX("+t.start+"px)"},o);r&&!t.itemIndex&&(l.style.paddingLeft=10*r+"px");var c=this.columnService.mergeProperties(e.itemIndex,t.itemIndex,l),u=this.columnService.customRenderer(e.itemIndex,t.itemIndex,s);return void 0!==u?(0,i.h)("div",Object.assign({},c),u):s.column?(0,i.h)("div",Object.assign({},c),(0,i.h)(Si,{model:s,canDrag:n,onDragStart:function(e){return a.dragStartCell.emit(e)}})):void console.error("Investigate column problem")},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{dataStore:["onStoreChange"],colData:["onStoreChange"]}},enumerable:!1,configurable:!0}),e}();Mi.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer}revogr-data .revo-draggable>.revo-drag-icon{vertical-align:middle;display:inline-block;pointer-events:none;transition:background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}",function(e){e[e.MOUSE_LEFT=1]="MOUSE_LEFT",e[e.MOUSE_RIGHT=3]="MOUSE_RIGHT",e[e.MOUSE_MIDDLE=2]="MOUSE_MIDDLE",e[e.BACKSPACE=8]="BACKSPACE",e[e.COMMA=188]="COMMA",e[e.INSERT=45]="INSERT",e[e.DELETE=46]="DELETE",e[e.END=35]="END",e[e.ENTER=13]="ENTER",e[e.ESCAPE=27]="ESCAPE",e[e.CONTROL=17]="CONTROL",e[e.COMMAND_LEFT=91]="COMMAND_LEFT",e[e.COMMAND_RIGHT=93]="COMMAND_RIGHT",e[e.COMMAND_FIREFOX=224]="COMMAND_FIREFOX",e[e.ALT=18]="ALT",e[e.HOME=36]="HOME",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.PAGE_UP=33]="PAGE_UP",e[e.PERIOD=190]="PERIOD",e[e.SPACE=32]="SPACE",e[e.SHIFT=16]="SHIFT",e[e.CAPS_LOCK=20]="CAPS_LOCK",e[e.TAB=9]="TAB",e[e.ARROW_RIGHT=39]="ARROW_RIGHT",e[e.ARROW_LEFT=37]="ARROW_LEFT",e[e.ARROW_UP=38]="ARROW_UP",e[e.ARROW_DOWN=40]="ARROW_DOWN",e[e.F1=112]="F1",e[e.F2=113]="F2",e[e.F3=114]="F3",e[e.F4=115]="F4",e[e.F5=116]="F5",e[e.F6=117]="F6",e[e.F7=118]="F7",e[e.F8=119]="F8",e[e.F9=120]="F9",e[e.F10=121]="F10",e[e.F11=122]="F11",e[e.F12=123]="F12",e[e.A=65]="A",e[e.C=67]="C",e[e.D=68]="D",e[e.F=70]="F",e[e.L=76]="L",e[e.O=79]="O",e[e.P=80]="P",e[e.S=83]="S",e[e.V=86]="V",e[e.X=88]="X"}(Ai||(Ai={})),function(e){e.ENTER="Enter",e.ENTER_NUM="NumpadEnter",e.V="KeyV",e.C="KeyC",e.ESCAPE="Escape",e.TAB="Tab",e.BACKSPACE="Backspace",e.DELETE="Delete",e.ARROW_RIGHT="ArrowRight",e.ARROW_LEFT="ArrowLeft",e.ARROW_UP="ArrowUp",e.ARROW_DOWN="ArrowDown",e.SHIFT="Shift"}(ki||(ki={}));var Oi,Li=Ai;!function(e){e.mac="Mac"}(Oi||(Oi={}));var Di=Oi,Ii=function(e){return e!=e},Ri=function(e){return null==e?[]:function(e,t){return Lt(t,(function(t){return e[t]}))}(e,ie(e))},Pi=Math.max,Ni=function(e,t,n,r){e=re(e)?e:Ri(e),n=n&&!r?sn(n):0;var i=e.length;return n<0&&(n=Pi(i+n,0)),mr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Zt(e,Ii,n)}(e,t,n)>-1};function zi(e,t){return t.includes(Di.mac)?Ni([Li.COMMAND_LEFT,Li.COMMAND_RIGHT,Li.COMMAND_FIREFOX],e):Li.CONTROL===e}function Fi(e){return e===ki.ENTER||e===ki.ENTER_NUM}var Bi=function(){function e(e,t){this.column=e,this.saveCallback=t,this.element=null,this.editCell=null}return e.prototype.componentDidRender=function(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return this.editInput?[4,Bn()]:[3,2];case 1:t.sent(),null===(e=this.editInput)||void 0===e||e.focus(),t.label=2;case 2:return[2]}}))}))},e.prototype.onKeyDown=function(e){var t=Fi(e.code),n=function(e){return ki.TAB===e}(e.code);(n||t)&&e.target&&this.saveCallback&&(this.editInput.blur(),this.saveCallback(e.target.value,n))},e.prototype.render=function(){var e,t=this;return(0,i.h)("input",{type:"text",value:(null===(e=this.editCell)||void 0===e?void 0:e.val)||"",ref:function(e){t.editInput=e},onKeyDown:function(e){return t.onKeyDown(e)}})},e}(),ji=function(){function e(e){(0,i.r)(this,e),this.cellEdit=(0,i.c)(this,"cellEdit",3),this.closeEdit=(0,i.c)(this,"closeEdit",3),this.currentEditor=null}return e.prototype.onSave=function(e,t){this.editCell&&this.cellEdit.emit({rgCol:this.editCell.x,rgRow:this.editCell.y,val:e,preventFocus:t})},e.prototype.componentWillRender=function(){var e=this;this.currentEditor||(this.editor?this.currentEditor=new this.editor(this.column,(function(t,n){return e.onSave(t,n)}),(function(t){return e.closeEdit.emit(t)})):this.currentEditor=new Bi(this.column,(function(t,n){return e.onSave(t,n)})))},e.prototype.componentDidRender=function(){this.currentEditor&&(this.currentEditor.element=this.element.firstElementChild,this.currentEditor.componentDidRender&&this.currentEditor.componentDidRender())},e.prototype.disconnectedCallback=function(){this.currentEditor&&(this.currentEditor.disconnectedCallback&&this.currentEditor.disconnectedCallback(),this.currentEditor.element&&(this.currentEditor.element=null),this.currentEditor=null)},e.prototype.render=function(){return this.currentEditor?(this.currentEditor.editCell=this.editCell,(0,i.h)(i.H,{class:zr},this.currentEditor.render(i.h))):""},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),e}();function Ui(e,t){var n=e.x,r=e.y,i=t.el,o=t.rows,a=t.cols,s=i.getBoundingClientRect(),l=s.top,c=s.left,u=s.height,h=s.width,d=r-l;d>=u&&(d=u-1);var f=n-c;f>=h&&(f=h-1);var p=jn(o,d),g=jn(a,f);return g.itemIndex<0&&(g.itemIndex=0),p.itemIndex<0&&(p.itemIndex=0),{x:g.itemIndex,y:p.itemIndex}}function Vi(e,t){var n=e.x,r=e.y,i=t.lastCell;return n>=i.x||r>=i.y}function qi(e,t,n){var r=e.x,i=e.y,o=e.x1,a=e.y1,s=Un(t,i).start,l=Un(n,r).start,c=Un(t,a).end,u=Un(n,o).end;return{left:l,right:u,top:s,bottom:c,width:u-l,height:c-s}}function Hi(e,t,n){return function(e){return{left:e.left+"px",top:e.top+"px",width:e.width+"px",height:e.height+"px"}}(qi(e,t,n))}ji.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-edit{display:block;position:absolute;background-color:#fff}revogr-edit input{height:100%;width:100%;box-sizing:border-box}revogr-edit revo-dropdown{height:100%}revogr-edit revo-dropdown.shrink fieldset legend>span{display:none}";var $i=function(){function e(e){(0,i.r)(this,e)}return e.prototype.changed=function(e){null==e||e.scrollIntoView({block:"nearest",inline:"nearest"})},e.prototype.componentDidRender=function(){this.el&&this.changed(this.el)},e.prototype.render=function(){var e=this.selectionStore.get("focus");if(e){var t=Hi(Object.assign(Object.assign({},e),{x1:e.x,y1:e.y}),this.dimensionRow.state,this.dimensionCol.state);return(0,i.h)(i.H,{class:Nr,style:t})}},Object.defineProperty(e.prototype,"el",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),e}();$i.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block}";var Wi,Gi=function(){try{var e=we(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yi=Gi,Xi=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r},Zi=function(e,t,n,r){return oe(e,(function(e,i,o){t(r,e,n(e),o)})),r},Ki=function(e,t){return function(n,r){var i=B(n)?Xi:Zi,o=t?t():{};return i(n,e,$t(r),o)}}((function(e,t,n){!function(e,t,n){"__proto__"==t&&Yi?Yi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,n,t)})),Ji=Ki,Qi=function(e){var t=e.column;return(0,i.h)("i",{class:t.order})};!function(e){e.start="resize:start",e.move="resize:move",e.end="resize:end"}(Wi||(Wi={}));var eo={"resizable-r":{bit:1,cursor:"ew-resize"},"resizable-rb":{bit:3,cursor:"se-resize"},"resizable-b":{bit:2,cursor:"s-resize"},"resizable-lb":{bit:6,cursor:"sw-resize"},"resizable-l":{bit:4,cursor:"w-resize"},"resizable-lt":{bit:12,cursor:"nw-resize"},"resizable-t":{bit:8,cursor:"n-resize"},"resizable-rt":{bit:9,cursor:"ne-resize"}},to=function(){function e(e,t){this.initialProps=e,this.$event=t,this.mouseX=0,this.mouseY=0,this.width=0,this.height=0,this.changeX=0,this.changeY=0,this.disableCalcMap=15,this.props=function(e){return Object.assign(Object.assign({},e),{fitParent:e.fitParent||!1,active:e.active||[],disableAttributes:e.disableAttributes||[],minWidth:e.minWidth||0,minHeight:e.minHeight||0})}(e),this.mouseMoveFunc=this.handleMove.bind(this),this.mouseUpFunc=this.handleUp.bind(this),this.minW=this.props.minWidth,this.minH=this.props.minHeight,this.maxW=this.props.maxWidth,this.maxH=this.props.maxHeight,this.parent={width:0,height:0},this.resizeState=0}return e.prototype.set=function(e){var t=this;this.$el=e,this.props.disableAttributes.forEach((function(e){switch(e){case"l":t.disableCalcMap&=-2;break;case"t":t.disableCalcMap&=-3;break;case"w":t.disableCalcMap&=-5;break;case"h":t.disableCalcMap&=-9}}))},e.prototype.emitEvent=function(e,t){this.$event&&this.$event(Object.assign({eventName:e,width:this.width+this.changeX,height:this.height+this.changeY,changedX:this.changeX,changedY:this.changeY},t))},e.isTouchEvent=function(e){var t;return(null===(t=e.touches)||void 0===t?void 0:t.length)>=0},e.prototype.handleMove=function(t){if(this.resizeState){var n,r;e.isTouchEvent(t)?(n=t.touches[0].clientY,r=t.touches[0].clientX):(n=t.clientY,r=t.clientX);var i=this.resizeState&eo["resizable-r"].bit||this.resizeState&eo["resizable-l"].bit;if((this.resizeState&eo["resizable-t"].bit||this.resizeState&eo["resizable-b"].bit)&&8&this.disableCalcMap){var o=n-this.mouseY,a=this.changeY+o,s=this.height+a;s<this.minH&&(a=-(this.height-this.minH)),this.maxH&&s>this.maxH&&(a=this.maxH-this.height),this.changeY=a,this.mouseY=n,this.activeResizer&&(this.activeResizer.style.bottom=-this.changeY+"px")}if(i&&4&this.disableCalcMap){var l=r-this.mouseX,c=this.changeX+l,u=this.width+c;u<this.minW&&(c=-(this.width-this.minW)),this.maxW&&u>this.maxW&&(c=this.maxW-this.width),this.changeX=c,this.mouseX=r,this.activeResizer&&(this.activeResizer.style.right=-this.changeX+"px")}this.emitEvent(Wi.move)}},e.prototype.handleDown=function(t){if(!t.defaultPrevented){for(var n in this.dropInitial(),eo){var r=t.target;if(this.$el.contains(r)&&(null==r?void 0:r.classList.contains(n))){document.body.style.cursor=eo[n].cursor,e.isTouchEvent(t)?this.setInitials(t.touches[0],r):(t.preventDefault&&t.preventDefault(),this.setInitials(t,r)),this.resizeState=eo[n].bit;var i=Wi.start;this.emitEvent(i);break}}this.bindMove()}},e.prototype.handleUp=function(e){if(e.preventDefault(),0!==this.resizeState){this.resizeState=0,document.body.style.cursor="";var t=Wi.end;this.emitEvent(t)}this.dropInitial(),this.unbindMove()},e.prototype.setInitials=function(e,t){var n=e.clientX,r=e.clientY,i=getComputedStyle(this.$el);if(this.$el.classList.add("active"),this.activeResizer=t,4&this.disableCalcMap){this.mouseX=n,this.width=this.$el.clientWidth,this.parent.width=this.$el.parentElement.clientWidth;var o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight);this.minW=Math.max(o,this.initialProps.minWidth||0),this.initialProps.maxWidth&&(this.maxW=Math.max(this.width,this.initialProps.maxWidth))}if(8&this.disableCalcMap){this.mouseY=r,this.height=this.$el.clientHeight,this.parent.height=this.$el.parentElement.clientHeight;var a=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom);this.minH=Math.max(a,this.initialProps.minHeight||0),this.initialProps.maxHeight&&(this.maxH=Math.max(this.height,this.initialProps.maxHeight))}},e.prototype.dropInitial=function(){this.changeX=this.changeY=this.minW=this.minH,this.width=this.height=0,this.activeResizer&&this.activeResizer.removeAttribute("style"),this.$el.classList.remove("active"),this.activeResizer=null},e.prototype.bindMove=function(){document.documentElement.addEventListener("mouseup",this.mouseUpFunc,!0),document.documentElement.addEventListener("touchend",this.mouseUpFunc,!0),document.documentElement.addEventListener("mousemove",this.mouseMoveFunc,!0),document.documentElement.addEventListener("touchmove",this.mouseMoveFunc,!0),document.documentElement.addEventListener("mouseleave",this.mouseUpFunc)},e.prototype.unbindMove=function(){document.documentElement.removeEventListener("mouseup",this.mouseUpFunc,!0),document.documentElement.removeEventListener("touchend",this.mouseUpFunc,!0),document.documentElement.removeEventListener("mousemove",this.mouseMoveFunc,!0),document.documentElement.removeEventListener("touchmove",this.mouseMoveFunc,!0),document.documentElement.removeEventListener("mouseleave",this.mouseUpFunc)},e}(),no=function(e,t){var n=[],r=e.canResize&&new to(e,(function(t){t.eventName===Wi.end&&e.onResize&&e.onResize(t)}))||null;if(e.canResize){if(e.active)for(var o in e.active)n.push((0,i.h)("div",{onClick:function(e){return e.preventDefault()},onDblClick:function(t){t.preventDefault(),e.onDoubleClick&&e.onDoubleClick()},onMouseDown:function(e){return null==r?void 0:r.handleDown(e)},onTouchStart:function(e){return null==r?void 0:r.handleDown(e)},class:"resizable resizable-"+e.active[o]}))}else if(e.active)for(var o in e.active)n.push((0,i.h)("div",{onClick:function(e){return e.preventDefault()},onDblClick:function(t){t.preventDefault(),e.onDoubleClick&&e.onDoubleClick()},class:"no-resize resizable resizable-"+e.active[o]}));return(0,i.h)("div",Object.assign({},e,{ref:function(e){return null==r?void 0:r.set(e)}}),t,n)},ro=function(e,t){var n=e.data,r=e.props,o=(null==n?void 0:n.name)||"",a=r;if((null==n?void 0:n.columnTemplate)&&(o=n.columnTemplate(i.h,n)),null==n?void 0:n.columnProperties){var s=n.columnProperties(n);s&&"object"==typeof s&&(a=Ti.doMerge(r,s))}return(0,i.h)(no,Object.assign({},a),(0,i.h)("div",{class:"header-content"},o),t)},io=function(e){var t,n,r,a,s,l,c,u,h=((t={}).rgHeaderCell=!0,t.sortable=!!(null===(r=e.data)||void 0===r?void 0:r.sortable),t);(null===(a=e.data)||void 0===a?void 0:a.order)&&(h[e.data.order]=!0);var d=((n={})[Ir]=e.column.itemIndex,n.canResize=e.canResize,n.minWidth=(null===(s=e.data)||void 0===s?void 0:s.minSize)||30,n.maxWidth=null===(l=e.data)||void 0===l?void 0:l.maxSize,n.active=["r"],n.class=h,n.style={width:e.column.size+"px",transform:"translateX("+e.column.start+"px)"},n.onResize=e.onResize,n.onDoubleClick=function(t){e.onDoubleClick({column:e.data,index:e.column.itemIndex,originalEvent:t})},n.onClick=function(t){!t.defaultPrevented&&e.onClick&&e.onClick({column:e.data,index:e.column.itemIndex,originalEvent:t})},n);return e.range&&e.column.itemIndex>=e.range.x&&e.column.itemIndex<=e.range.x1&&"object"==typeof d.class&&(d.class[Nr]=!0),(0,i.h)(ro,{data:e.data,props:d},(null===(c=e.data)||void 0===c?void 0:c.order)?(0,i.h)(Qi,{column:e.data}):"",e.canFilter&&!1!==(null===(u=e.data)||void 0===u?void 0:u.filter)?(0,i.h)(o.a,{column:e.data}):"")},oo=function(e){var t,n={canResize:e.canResize,minWidth:30*e.group.ids.length,maxWidth:0,active:["r"],class:(t={},t.rgHeaderCell=!0,t),style:{transform:"translateX("+e.start+"px)",width:e.end-e.start+"px"},onResize:e.onResize};return(0,i.h)(ro,{data:e.group,props:n})},ao=function(e){for(var t=e.depth,n=e.groups,r=e.visibleProps,o=e.dimensionCol,a=e.canResize,s=e.onResize,l=[],c=0;c<t;c++){if(n[c])for(var u=function(e){var t=cn(e.ids,(function(e){return"number"==typeof r[e]}));if(t>-1){var n=r[e.ids[t]]-t,c=n+e.ids.length-1,u=Un(o,n).start,h=Un(o,c).end;l.push((0,i.h)(oo,{start:u,end:h,group:e,canResize:a,onResize:function(e){return s(e.changedX,n,c)}}))}},h=0,d=n[c];h<d.length;h++)u(d[h]);l.push((0,i.h)("div",{class:"header-rgRow group"}))}return l},so=function(){function e(e){(0,i.r)(this,e),this.initialHeaderClick=(0,i.c)(this,"initialHeaderClick",7),this.headerresize=(0,i.c)(this,"headerresize",7),this.headerdblClick=(0,i.c)(this,"headerdblClick",7),this.parent="",this.groupingDepth=0}return e.prototype.onResize=function(e,t){var n,r=e.width;this.headerresize.emit(((n={})[t]=r||0,n))},e.prototype.onResizeGroup=function(e,t,n){for(var r={},i=Ji(this.viewportCol.get("items"),"itemIndex"),o=e/(n-t+1),a=t;a<=n;a++){var s=i[a];s&&(r[a]=s.size+o)}this.headerresize.emit(r)},e.prototype.render=function(){for(var e,t=this,n=this.viewportCol.get("items"),r=null===(e=this.selectionStore)||void 0===e?void 0:e.get("range"),o=[],a={},s=function(e){var n=l.colData[e.itemIndex];o.push((0,i.h)(io,{range:r,column:e,data:n,canFilter:!!l.columnFilter,canResize:l.canResize,onResize:function(n){return t.onResize(n,e.itemIndex)},onDoubleClick:function(e){return t.headerdblClick.emit(e)},onClick:function(e){return t.initialHeaderClick.emit(e)}})),a[null==n?void 0:n.prop]=e.itemIndex},l=this,c=0,u=n;c<u.length;c++)s(u[c]);return[(0,i.h)("div",{class:"group-rgRow"},(0,i.h)(ao,{canResize:this.canResize,visibleProps:a,groups:this.groups,dimensionCol:this.dimensionCol.state,depth:this.groupingDepth,onResize:function(e,n,r){return t.onResizeGroup(e,n,r)}})),(0,i.h)("div",{class:"header-rgRow actual-rgRow"},o)]},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),e}();so.style="@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"\"}revogr-header .rgHeaderCell i.desc:after{content:\"\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";var lo,co=function(){return w.Date.now()},uo=Math.max,ho=Math.min,fo=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function p(e){return c=e,s=setTimeout(m,t),u?f(e):a}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=o}function m(){var e=co();if(g(e))return v(e);s=setTimeout(m,function(e){var n=t-(e-l);return h?ho(n,o-(e-c)):n}(e))}function v(e){return s=void 0,d&&r?f(e):(r=i=void 0,a)}function y(){var e=co(),n=g(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return p(l);if(h)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=on(t)||0,te(n)&&(u=!!n.leading,o=(h="maxWait"in n)?uo(on(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:v(co())},y},po=function(){function e(e){this.config=e,this.currentCell=null,this.previousRow=null}return e.prototype.endOrder=function(e,t){if(null!==this.currentCell){var n=this.getCell(e,t);n.y!==this.currentCell.y&&(n.y<0?n.y=0:n.y<this.currentCell.y&&n.y++,this.config.positionChanged(this.currentCell.y,n.y)),this.clear()}},e.prototype.startOrder=function(e,t){return this.currentCell=this.getCell(e,t),this.currentCell},e.prototype.move=function(e,t){var n=this.getRow(e,t);return this.previousRow===n.itemIndex||n.itemIndex<-1?null:(this.previousRow=n.itemIndex,n)},e.prototype.clear=function(){this.currentCell=null,this.previousRow=null},e.prototype.getRow=function(e,t){var n=t.el,r=t.rows,i=n.getBoundingClientRect().top,o=jn(r,e-i);return{itemIndex:o.itemIndex,start:o.start+i,end:o.end+i}},e.prototype.getCell=function(e,t){var n=e.x,r=e.y,i=t.el,o=t.rows,a=t.cols,s=i.getBoundingClientRect(),l=s.top,c=n-s.left,u=jn(o,r-l);return{x:jn(a,c).itemIndex,y:u.itemIndex}},e}(),go=function(){function e(e){var t=this;(0,i.r)(this,e),this.internalRowDragStart=(0,i.c)(this,"internalRowDragStart",7),this.internalRowDragEnd=(0,i.c)(this,"internalRowDragEnd",7),this.internalRowDrag=(0,i.c)(this,"internalRowDrag",7),this.internalRowMouseMove=(0,i.c)(this,"internalRowMouseMove",7),this.initialRowDropped=(0,i.c)(this,"initialRowDropped",7),this.rowMoveFunc=fo((function(e){var n=t.rowOrderService.move(e,t.getData());null!==n&&t.internalRowDrag.emit(n)}),5)}return e.prototype.onMouseOut=function(){this.clearOrder()},e.prototype.onMouseUp=function(e){this.endOrder(e)},e.prototype.dragStart=function(e){return s(this,void 0,void 0,(function(){var t,n,r,i=this;return l(this,(function(o){return e.preventDefault(),this.moveFunc&&this.clearOrder(),t=this.getData(),n=this.rowOrderService.startOrder(e,t),r=this.rowOrderService.getRow(e.y,t),this.internalRowDragStart.emit({cell:n,text:"Draggable item",pos:r,event:e}).defaultPrevented||(this.moveFunc=function(e){return i.move(e)},document.addEventListener("mousemove",this.moveFunc)),[2]}))}))},e.prototype.endOrder=function(e){return s(this,void 0,void 0,(function(){return l(this,(function(t){return this.rowOrderService.endOrder(e,this.getData()),this.clearOrder(),[2]}))}))},e.prototype.clearOrder=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){return this.rowOrderService.clear(),document.removeEventListener("mousemove",this.moveFunc),this.moveFunc=null,this.internalRowDragEnd.emit(),[2]}))}))},e.prototype.move=function(e){var t=e.x,n=e.y;this.internalRowMouseMove.emit({x:t,y:n}),this.rowMoveFunc(n)},e.prototype.connectedCallback=function(){var e=this;this.rowOrderService=new po({positionChanged:function(t,n){return e.onPositionChanged(t,n)}})},e.prototype.onPositionChanged=function(e,t){if(!this.initialRowDropped.emit({from:e,to:t}).defaultPrevented){var n=c([],this.dataStore.get("items")),r=n.splice(e,1);n.splice.apply(n,c([t,0],r)),An(this.dataStore,n)}},e.prototype.getData=function(){return{el:this.parent,rows:this.dimensionRow.state,cols:this.dimensionCol.state}},e}(),mo=function(){function e(e,t){this.store=e,this.config=t,this.store=e}return Object.defineProperty(e.prototype,"edited",{get:function(){return this.store.get("edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return this.store.get("focus")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ranged",{get:function(){return this.store.get("range")},enumerable:!1,configurable:!0}),e.prototype.changeRange=function(e){return this.config.changeRange(e)},e.prototype.focus=function(e,t){if(void 0===t&&(t=!1),!e)return!1;var n=e;if(t){var r=this.store.get("focus");if(r)return this.config.changeRange(ci(r,n))}return this.config.focus(e,n)},e}(),vo=function(){function e(e){this.sv=e,this.ctrlDown=!1}return e.prototype.keyDown=function(e,t){return s(this,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return this.sv.selectionStoreService.focused?(zi(e.keyCode,navigator.platform)&&(this.ctrlDown=!0),ki.TAB===e.code?(this.keyChangeSelection(e,t),[2]):this.sv.selectionStoreService.edited?(e.code===ki.ESCAPE&&this.sv.doEdit(void 0,!0),[2]):function(e){return ki.BACKSPACE===e||ki.DELETE===e}(e.code)?(this.sv.clearCell(),[2]):Fi(e.code)?(this.sv.doEdit(),[2]):this.isCopy(e)?[2]:this.isPaste(e)?(this.sv.internalPaste(),[2]):function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}(e.keyCode)?(this.sv.doEdit(e.key),[2]):[4,this.keyChangeSelection(e,t)]):[2];case 1:return n.sent(),[2]}}))}))},e.prototype.keyChangeSelection=function(e,t){return s(this,void 0,void 0,(function(){var n,r,i;return l(this,(function(o){switch(o.label){case 0:return(n=this.changeDirectionKey(e,t))?[4,Bn()]:[2,!1];case 1:return o.sent(),r=this.sv.selectionStore.get("range"),i=this.sv.selectionStore.get("focus"),[2,this.keyPositionChange(n.changes,this.sv.getData(),r,i,n.isMulti)]}}))}))},e.prototype.keyPositionChange=function(e,t,n,r,i){if(void 0===i&&(i=!1),!n||!r)return!1;var o=function(e,t,n,r){void 0===r&&(r=!1);var i=function(i){var o={x:e.x,y:e.y},a=r?{x:e.x1,y:e.y1}:o;return(a[i]>t[i]?a:o)[i]+=n[i],{start:o,end:a}};return n.x?i("x"):n.y?i("y"):null}(n,r,e,i);if(!o)return!1;if(i){if(Vi(o.end,t)||function(e){var t=e.x,n=e.y;return t<0||n<0}(o.start))return!1;var a=ci(o.start,o.end);return this.sv.selectionStoreService.changeRange(a)}return this.sv.selectionStoreService.focus(o.start)},e.prototype.keyUp=function(e){zi(e.keyCode,navigator.platform)&&(this.ctrlDown=!1)},e.prototype.isCopy=function(e){return this.ctrlDown&&e.code==ki.C},e.prototype.isPaste=function(e){return this.ctrlDown&&e.code==ki.V},e.prototype.changeDirectionKey=function(e,t){var n=t&&e.shiftKey;switch(e.code){case ki.TAB:case ki.ARROW_UP:case ki.ARROW_DOWN:case ki.ARROW_LEFT:case ki.ARROW_RIGHT:e.preventDefault()}switch(e.code){case ki.ARROW_UP:return{changes:{y:-1},isMulti:n};case ki.ARROW_DOWN:return{changes:{y:1},isMulti:n};case ki.ARROW_LEFT:return{changes:{x:-1},isMulti:n};case ki.TAB:case ki.ARROW_RIGHT:return{changes:{x:1},isMulti:n}}},e}(),yo=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mn(e,t,n)?(t=0,n=r):(t=null==t?0:sn(t),n=void 0===n?r:sn(n)),function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,t,n)):[]};!function(e){e.selection="Selection",e.autoFill="AutoFill"}(lo||(lo={}));var bo=function(){function e(e){this.sv=e,this.autoFillType=null,this.autoFillInitial=null,this.autoFillStart=null,this.autoFillLast=null}return e.prototype.renderAutofill=function(e,t){var n,r=this;return n=qi(e||Object.assign(Object.assign({},t),{x1:t.x,y1:t.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state),(0,i.h)("div",{class:"autofill-handle",style:{left:n.right+"px",top:n.bottom+"px"},onMouseDown:function(e){return r.selectionStart(e,r.sv.getData(),lo.autoFill)}})},Object.defineProperty(e.prototype,"isAutoFill",{get:function(){return!!this.autoFillType},enumerable:!1,configurable:!0}),e.prototype.selectionMouseMove=function(e){var t=this;this.onMouseMoveAutofill||(this.onMouseMoveAutofill=fo((function(e,n){return t.doAutofillMouseMove(e,n)}),5)),this.isAutoFill&&this.onMouseMoveAutofill(e,this.sv.getData())},e.prototype.getFocus=function(){var e=this.sv.selectionStoreService.focused,t=this.sv.selectionStoreService.ranged;return t&&(e={x:t.x,y:t.y}),e||t?e:null},e.prototype.doAutofillMouseMove=function(e,t){var n=this,r=e.x,i=e.y;if(this.autoFillInitial){var o,a=Ui({x:r,y:i},t);this.autoFillLast&&(o=function(e,t){for(var n,r=0,i=["x","y"];r<i.length;r++){var o=i[r];if(e[o]!==t[o])return(n={})[o]=1,n}return null}(this.autoFillStart,this.autoFillLast)),this.autoFillLast&&o||(o=function(e,t){for(var n={},r=0,i=["x","y"];r<i.length;r++){var o=i[r];n[o]=Math.abs(e[o]-t[o])}return n.x>n.y?{x:1}:n.y>n.x?{y:1}:null}(this.autoFillStart,a),this.autoFillLast||(this.autoFillLast=this.autoFillStart)),o&&(Xt(o,(function(e,t){var r;e&&(a=Object.assign(Object.assign({},n.autoFillLast),((r={})[t]=a[t],r)))})),Vi(a,t)||(this.autoFillLast=a,this.sv.setTempRange({area:ci(this.autoFillInitial,this.autoFillLast),type:this.autoFillType})))}},e.prototype.selectionStart=function(e,t,n){void 0===n&&(n=lo.selection);var r=e.target.getBoundingClientRect(),i=r.top,o=r.left;this.autoFillInitial=this.getFocus(),this.autoFillType=n,this.autoFillStart=Ui({x:o,y:i},t),e.preventDefault()},e.prototype.clearAutoFillSelection=function(){this.autoFillInitial&&(this.autoFillInitial=this.getFocus(),this.autoFillType===lo.autoFill?this.applyRangeWithData(this.autoFillInitial,this.autoFillLast):this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)),this.autoFillType=null,this.autoFillInitial=null,this.autoFillLast=null,this.autoFillStart=null},e.prototype.onRangeApply=function(e,t){var n={};for(var r in e)n[r]=xn(this.sv.dataStore,parseInt(r,10));this.sv.internalRangeDataApply({data:e,models:n,type:this.sv.dataStore.get("type")}).defaultPrevented||this.sv.columnService.applyRangeData(e),this.sv.setRange(t)},e.prototype.applyRangeWithData=function(e,t){if(e&&t){var n=this.sv.selectionStoreService.ranged,r=ci(e,t),i=c([],this.sv.columnService.columns),o={type:this.sv.dataStore.get("type"),newData:{},newRange:r,oldRange:n,newProps:yo(i,r.x,r.x1+1).map((function(e){return e.prop})),oldProps:yo(i,n.x,n.x1+1).map((function(e){return e.prop}))};o.newData=this.sv.columnService.getRangeData(o),this.sv.internalSelectionChanged(o).defaultPrevented?this.sv.setTempRange(null):this.onRangeApply(o.newData,r)}},e.prototype.applyRangeOnly=function(e,t){if(e&&t){var n=ci(e,t);this.sv.setRange(n)}},e}(),_o=function(){function e(e){this.sv=e}return e.prototype.onCopy=function(e){if(this.sv.internalCopy().defaultPrevented)return!1;var t,n=this.sv.selectionStoreService.focused,r=this.sv.selectionStoreService.ranged;if(r||(r=ci(n,n)),r){var i=c([],this.sv.columnService.columns),o=yo(i,r.x,r.x1+1).map((function(e){return e.prop}));t=this.sv.columnService.copyRangeArray(r,o,this.sv.dataStore)}return this.clipboard.doCopy(e,t),!0},e.prototype.renderClipboard=function(){var e=this;return(0,i.h)("revogr-clipboard",{onCopyRegion:function(t){return e.onCopy(t.detail)},ref:function(t){return e.clipboard=t},onPasteRegion:function(t){return e.onPaste(t.detail)}})},e.prototype.onPaste=function(e){var t=this.sv.selectionStoreService.focused,n=null!==this.sv.selectionStoreService.edited;if(t&&!n){var r=this.sv.columnService.getTransformedDataToApply(t,e),i=r.changed,o=r.range;this.sv.onRangeApply(i,o)}},e}(),xo=function(){function e(e){(0,i.r)(this,e),this.internalCopy=(0,i.c)(this,"internalCopy",7),this.internalPaste=(0,i.c)(this,"internalPaste",7),this.internalCellEdit=(0,i.c)(this,"internalCellEdit",7),this.internalFocusCell=(0,i.c)(this,"internalFocusCell",7),this.setEdit=(0,i.c)(this,"setEdit",3),this.setRange=(0,i.c)(this,"setRange",7),this.setTempRange=(0,i.c)(this,"setTempRange",7),this.focusCell=(0,i.c)(this,"focusCell",3),this.internalSelectionChanged=(0,i.c)(this,"internalSelectionChanged",7),this.internalRangeDataApply=(0,i.c)(this,"internalRangeDataApply",7),this.keyboardService=null,this.autoFillService=null,this.clipboardService=null}return e.prototype.onMouseMove=function(e){this.selectionStoreService.focused&&this.autoFillService.selectionMouseMove(e)},e.prototype.onMouseOut=function(){this.autoFillService.clearAutoFillSelection()},e.prototype.onMouseUp=function(){this.autoFillService.clearAutoFillSelection()},e.prototype.onCellDrag=function(e){var t;null===(t=this.orderEditor)||void 0===t||t.dragStart(e.detail)},e.prototype.onKeyUp=function(e){var t;null===(t=this.keyboardService)||void 0===t||t.keyUp(e)},e.prototype.onKeyDown=function(e){var t;e.defaultPrevented||null===(t=this.keyboardService)||void 0===t||t.keyDown(e,this.range)},e.prototype.selectionServiceSet=function(e){var t=this;this.selectionStoreService=new mo(e,{changeRange:function(e){var n;return!(null===(n=t.setRange.emit(e))||void 0===n?void 0:n.defaultPrevented)},focus:function(e,n){var r,i={focus:e,end:n};return!t.internalFocusCell.emit(t.columnService.getSaveData(e.y,e.x)).defaultPrevented&&!(null===(r=t.focusCell.emit(i))||void 0===r?void 0:r.defaultPrevented)}}),this.keyboardService=new vo({selectionStoreService:this.selectionStoreService,selectionStore:e,doEdit:function(e,n){return t.doEdit(e,n)},clearCell:function(){return t.clearCell()},getData:function(){return t.getData()},internalPaste:function(){return t.internalPaste.emit()}}),this.createAutoFillService(),this.createClipboardService()},e.prototype.createAutoFillService=function(){var e=this;this.autoFillService=new bo({selectionStoreService:this.selectionStoreService,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,setTempRange:function(t){return e.setTempRange.emit(t)},internalSelectionChanged:function(t){return e.internalSelectionChanged.emit(t)},internalRangeDataApply:function(t){return e.internalRangeDataApply.emit(t)},setRange:function(t){return e.setRange.emit(t)},getData:function(){return e.getData()}})},e.prototype.columnServiceSet=function(){var e;null===(e=this.columnService)||void 0===e||e.destroy(),this.columnService=new Ti(this.dataStore,this.colData),this.createAutoFillService(),this.createClipboardService()},e.prototype.createClipboardService=function(){var e=this;this.clipboardService=new _o({selectionStoreService:this.selectionStoreService,columnService:this.columnService,dataStore:this.dataStore,onRangeApply:function(t,n){return e.autoFillService.onRangeApply(t,n)},internalCopy:function(){return e.internalCopy.emit()}})},e.prototype.connectedCallback=function(){this.columnServiceSet(),this.selectionServiceSet(this.selectionStore)},e.prototype.disconnectedCallback=function(){var e;null===(e=this.columnService)||void 0===e||e.destroy()},e.prototype.renderRange=function(e){var t=Hi(e,this.dimensionRow.state,this.dimensionCol.state);return[(0,i.h)("div",{class:"selection-border-range",style:t})]},e.prototype.renderEditCell=function(){var e=this,t=this.selectionStore.get("edit");if(!this.readonly&&t){var n=t.val||this.columnService.getCellData(t.y,t.x),r=Object.assign(Object.assign({},t),this.columnService.getSaveData(t.y,t.x,n)),o=Hi(Object.assign(Object.assign({},t),{x1:t.x,y1:t.y}),this.dimensionRow.state,this.dimensionCol.state);return(0,i.h)("revogr-edit",{onCellEdit:function(t){return e.onCellEdit(t.detail)},onCloseEdit:function(t){return e.closeEdit(t)},editCell:r,column:this.columnService.columns[t.x],editor:this.columnService.getCellEditor(t.y,t.x,this.editors),style:o})}},e.prototype.render=function(){var e=this,t=this.selectionStoreService.ranged,n=this.selectionStoreService.focused,r=[];(t||n)&&this.useClipboard&&r.push(this.clipboardService.renderClipboard()),t&&r.push.apply(r,this.renderRange(t));var o=this.renderEditCell();return o&&r.push(o),n&&!this.readonly&&!o&&this.range&&r.push(this.autoFillService.renderAutofill(t,n)),this.canDrag&&r.push((0,i.h)("revogr-order-editor",{ref:function(t){return e.orderEditor=t},dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,onInternalRowDragStart:function(t){return e.onRowDragStart(t)}})),(0,i.h)(i.H,{onDblClick:function(){return e.doEdit()},onMouseDown:function(t){return e.onElementMouseDown(t)}},r,(0,i.h)("slot",{name:"data"}))},e.prototype.onElementMouseDown=function(e){if(!function(e){return!!(null==e?void 0:e.closest("."+zr))}(e.target)){var t=this.getData();if(!e.defaultPrevented){var n=Ui({x:e.x,y:e.y},t);this.selectionStoreService.focus(n,this.range&&e.shiftKey),this.range&&this.autoFillService.selectionStart(e,t)}}},e.prototype.doEdit=function(e,t){var n;if(void 0===e&&(e=""),void 0===t&&(t=!1),this.canEdit()){var r=this.selectionStore.get("focus"),i=this.columnService.getSaveData(r.y,r.x);null===(n=this.setEdit)||void 0===n||n.emit(Object.assign(Object.assign({},i),{isCancel:t,val:e}))}},e.prototype.closeEdit=function(e){this.doEdit(void 0,!0),(null==e?void 0:e.detail)&&this.focusNext()},e.prototype.focusNext=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this.keyboardService.keyChangeSelection(new KeyboardEvent("keydown",{code:ki.ARROW_DOWN}),this.range)];case 1:return e.sent()||this.closeEdit(),[2]}}))}))},e.prototype.clearCell=function(){if(this.selectionStoreService.ranged&&!function(e){return e.x===e.x1&&e.y===e.y1}(this.selectionStoreService.ranged)){var e=this.columnService.getRangeStaticData(this.selectionStoreService.ranged,"");this.autoFillService.onRangeApply(e,this.selectionStoreService.ranged)}else if(this.canEdit()){var t=this.selectionStoreService.focused;this.onCellEdit({rgRow:t.y,rgCol:t.x,val:""},!0)}},e.prototype.onCellEdit=function(e,t){void 0===t&&(t=!1);var n=this.columnService.getSaveData(e.rgRow,e.rgCol,e.val);this.internalCellEdit.emit(n),t||e.preventFocus||this.focusNext()},e.prototype.onRowDragStart=function(e){var t=e.detail;t.text=this.columnService.getCellData(t.cell.y,t.cell.x)},e.prototype.canEdit=function(){var e;if(this.readonly)return!1;var t=this.selectionStoreService.focused;return t&&!(null===(e=this.columnService)||void 0===e?void 0:e.isReadOnly(t.y,t.x))},e.prototype.getData=function(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell}},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}},enumerable:!1,configurable:!0}),e}();xo.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:10px;height:10px;background:#0d63e8;margin-left:-9px;margin-top:-9px;border:1px solid white;box-sizing:border-box;z-index:10;cursor:crosshair}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9}revogr-overlay-selection .selection-border-range{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection revogr-edit{z-index:10}";var wo=function(e){return function(t,n){var r=n.rowIndex;return e+r}},Ao=function(){function e(e){(0,i.r)(this,e),this.scrollViewport=(0,i.c)(this,"scrollViewport",3),this.elementToScroll=(0,i.c)(this,"elementToScroll",3)}return e.prototype.render=function(){for(var e,t,n=this,r=[],o=new Jn,a=1,s=0,l=this.dataPorts;s<l.length;s++){var c=l[s],u=c.dataStore.get("items").length,h=new bn(c.type);h.updateData(c.dataStore.get("source"));var d=new bn("colPinStart"),f=Object.assign({cellTemplate:wo(a)},this.rowHeaderColumn);d.updateData([f]);var p=Object.assign(Object.assign({},c),{dataStore:h.store,colData:d.store,viewportCol:o.store,readonly:!0,range:!1});r.push((0,i.h)("revogr-data",Object.assign({},p))),a+=u}var g=(null===(t=this.rowHeaderColumn)||void 0===t?void 0:t.size)||10*(a.toString().length+1);o.setViewport({realCount:1,virtualSize:0,items:[{size:g,start:0,end:g,itemIndex:0}]});var m=this.uiid+"-rowHeaders",v=((e={})[Rr]=m,e.contentHeight=this.height,e.contentWidth=0,e.style={minWidth:g+"px"},e.ref=function(e){return n.elementToScroll.emit(e)},e.onScrollViewport=function(e){return n.scrollViewport.emit(e.detail)},e),y=Object.assign(Object.assign({},this.headerProp),{colData:"object"==typeof this.rowHeaderColumn?[this.rowHeaderColumn]:[],viewportCol:o.store,canResize:!1,parent:m,slot:"header"});return(0,i.h)(i.H,{class:"rowHeaders",key:"rowHeaders"},(0,i.h)("revogr-viewport-scroll",Object.assign({},v),(0,i.h)("revogr-header",Object.assign({},y)),r))},e}(),ko={contentSize:0,clientSize:0,virtualSize:0,maxSize:0},To=function(){function e(e){this.cfg=e,this.preventArtificialScroll={rgRow:null,rgCol:null},this.previousScroll={rgRow:0,rgCol:0},this.params={rgRow:Object.assign({},ko),rgCol:Object.assign({},ko)}}return e.getVirtualContentSize=function(e,t,n){return void 0===n&&(n=0),e+(n?t-n:0)},e.prototype.setParams=function(t,n){var r=e.getVirtualContentSize(t.contentSize,t.clientSize,t.virtualSize);this.params[n]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})},e.prototype.setScroll=function(e){var t=this;this.cancelScroll(e.dimension),this.preventArtificialScroll[e.dimension]=window.requestAnimationFrame((function(){var n=t.getParams(e.dimension);e.coordinate=Math.ceil(e.coordinate),t.previousScroll[e.dimension]=t.wrapCoordinate(e.coordinate,n),t.preventArtificialScroll[e.dimension]=null,t.cfg.afterScroll(Object.assign(Object.assign({},e),{coordinate:n.virtualSize?t.convert(e.coordinate,n,!1):e.coordinate}))}))},e.prototype.scroll=function(e,t,n,r){if(void 0===n&&(n=!1),this.cancelScroll(t),n||this.previousScroll[t]!==e){var i=this.getParams(t);this.cfg.beforeScroll({dimension:t,coordinate:i.virtualSize?this.convert(e,i):e,delta:r})}else this.previousScroll[t]=0},e.prototype.getParams=function(e){return this.params[e]},e.prototype.wrapCoordinate=function(e,t){return e<0?0:e>t.maxSize?t.maxSize:e},e.prototype.cancelScroll=function(e){return"number"==typeof this.preventArtificialScroll[e]&&(window.cancelAnimationFrame(this.preventArtificialScroll[e]),this.preventArtificialScroll[e]=null,!0)},e.prototype.convert=function(e,t,n){void 0===n&&(n=!0);var r=t.clientSize,i=[0,t.virtualContentSize-r],o=[0,t.contentSize-t.virtualSize];return n?Fn(e,i,o):Fn(e,o,i)},e}(),So=function(){function e(e){(0,i.r)(this,e),this.scrollVirtual=(0,i.c)(this,"scrollVirtual",7),this.scrollSize=0,this.isAutoHide=!1,this.autoHideTimeout=0,this.dimension="rgRow"}return e.prototype.setScroll=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){return this.dimension!==e.dimension||null===(t=this.scrollService)||void 0===t||t.setScroll(e),[2]}))}))},e.prototype.changeScroll=function(e){return s(this,void 0,void 0,(function(){return l(this,(function(t){if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.element.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.element.scrollTop+e.delta}this.setScroll(e)}return[2,e]}))}))},Object.defineProperty(e.prototype,"size",{get:function(){return"rgRow"===this.dimension?this.element.clientHeight:this.element.clientWidth},set:function(e){"rgRow"!==this.dimension?this.element.style.minHeight=e+"px":this.element.style.minWidth=e+"px"},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){var e=this;this.scrollService=new To({beforeScroll:function(t){return e.scrollVirtual.emit(t)},afterScroll:function(t){var n="rgRow"===t.dimension?"scrollTop":"scrollLeft";e.element[n]=t.coordinate}})},e.prototype.disconnectedCallback=function(){clearTimeout(this.autoHideTimeout)},e.prototype.componentWillLoad=function(){this.scrollSize=zn(document),this.isAutoHide=!this.scrollSize},e.prototype.componentDidRender=function(){var e="rgRow"===this.dimension?"scrollHeight":"scrollWidth";this.element[e]>this.size?this.size=this.scrollSize:this.size=0,this.scrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:this.size,virtualSize:this.viewportStore.get("virtualSize")},this.dimension)},e.prototype.onScroll=function(e){var t,n="scrollLeft";"rgRow"===this.dimension&&(n="scrollTop"),this.isAutoHide&&(this.size=20,this.autoHideTimeout=this.autoHide(this.autoHideTimeout));var r=e.target;null===(t=this.scrollService)||void 0===t||t.scroll(r[n]||0,this.dimension)},e.prototype.autoHide=function(e){var t=this;return clearTimeout(e),setTimeout((function(){t.size=0}),6e3)},e.prototype.render=function(){var e,t=this,n="rgRow"===this.dimension?"height":"width";return(0,i.h)(i.H,Object.assign({},{"auto-hide":this.isAutoHide},{onScroll:function(e){return t.onScroll(e)}}),(0,i.h)("div",{style:(e={},e[n]=this.extContentSize(this.viewportStore.get("virtualSize"),this.dimensionStore.get("realSize"))+"px",e)}))},e.prototype.extContentSize=function(e,t){return To.getVirtualContentSize(t,this.size,e)},Object.defineProperty(e.prototype,"element",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),e}();So.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-scroll-virtual[auto-hide]{position:absolute;z-index:100}revogr-scroll-virtual[auto-hide].vertical{right:0;top:0}revogr-scroll-virtual[auto-hide].vertical:hover{min-width:20px}revogr-scroll-virtual[auto-hide].horizontal{bottom:0;left:0}revogr-scroll-virtual[auto-hide].horizontal:hover{min-height:20px}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}";var Eo=function(){function e(e){var t=this;(0,i.r)(this,e),this.onChange=vi.throttle((function(e){return t.doChange(e)}),300)}return e.prototype.doChange=function(e){null==e||e.scrollIntoView({block:"nearest",inline:"nearest"})},e.prototype.componentDidRender=function(){this.el&&this.onChange(this.el)},e.prototype.render=function(){var e,t=this,n=this.selectionStore.get("tempRange"),r=this.selectionStore.get("tempRangeType");if(n){var o="bottom",a="right",s=this.getRange();if(s){n.y<s.y&&(o="top"),n.x<s.x&&(a="left");var l=a+" "+o,c=Hi(n,this.dimensionRow.state,this.dimensionCol.state);return(0,i.h)(i.H,{class:(e={},e["temp-bg-range"]=!0,e[r||""]=!0,e),style:c},(0,i.h)("div",{class:l,ref:function(e){return t.el=e}}))}}},e.prototype.getRange=function(){var e=this.selectionStore.get("range");if(e)return e;var t=this.selectionStore.get("focus");return t?Object.assign(Object.assign({},t),{x1:t.x,y1:t.y}):null},e}();Eo.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}.temp-bg-range{display:block;position:absolute;pointer-events:none;z-index:9;border:1px solid #ff5e00;box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}";function Co(){return s(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return"ResizeObserver"in window?[3,2]:[4,new Promise((e=>{e(n(56387))}))];case 1:e=t.sent(),window.ResizeObserver=e.ResizeObserver,t.label=2;case 2:return[2]}}))}))}var Mo=function(){function e(e,t){var n=this;this.events=t,this.resizeObserver=null,this.resize=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return te(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),fo(e,t,{leading:r,maxWait:t,trailing:i})}((function(e,t){var r;return null===(r=n.events)||void 0===r?void 0:r.resize(e,t)}),10),this.init(e)}return e.prototype.init=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return[4,Co()];case 1:return n.sent(),this.resizeObserver=new ResizeObserver(this.resize),null===(t=this.resizeObserver)||void 0===t||t.observe(e),[2]}}))}))},e.prototype.destroy=function(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=null},e}(),Oo=function(){function e(e){(0,i.r)(this,e),this.scrollViewport=(0,i.c)(this,"scrollViewport",3),this.resizeViewport=(0,i.c)(this,"resizeViewport",7),this.scrollchange=(0,i.c)(this,"scrollchange",7),this.scrollThrottling=30,this.contentWidth=0,this.contentHeight=0,this.oldValY=this.contentHeight,this.oldValX=this.contentWidth,this.mouseWheelScroll={rgCol:0,rgRow:0}}return e.prototype.setScroll=function(e){return s(this,void 0,void 0,(function(){var t;return l(this,(function(n){return this.latestScrollUpdate(e.dimension),null===(t=this.scrollService)||void 0===t||t.setScroll(e),[2]}))}))},e.prototype.changeScroll=function(e){return s(this,void 0,void 0,(function(){return l(this,(function(t){if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.verticalScroll.scrollTop+e.delta}this.setScroll(e)}return[2,e]}))}))},e.prototype.connectedCallback=function(){var e=this;"ontouchstart"in document.documentElement?this.scrollThrottling=0:(this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY"),this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX")),this.scrollService=new To({beforeScroll:function(t){return e.scrollViewport.emit(t)},afterScroll:function(t){switch(t.dimension){case"rgCol":e.horizontalScroll.scrollLeft=t.coordinate;break;case"rgRow":e.verticalScroll.scrollTop=t.coordinate}}})},e.prototype.componentDidLoad=function(){var e=this;this.horisontalResize=new Mo(this.horizontalScroll,{resize:function(t){var n,r,i=(null===(n=t[0])||void 0===n?void 0:n.contentRect.height)||0;i&&(i-=e.header.clientHeight+e.footer.clientHeight);var o={rgRow:{size:i,contentSize:e.contentHeight,scroll:e.verticalScroll.scrollTop},rgCol:{size:(null===(r=t[0])||void 0===r?void 0:r.contentRect.width)||0,contentSize:e.contentWidth,scroll:e.horizontalScroll.scrollLeft}};Xt(o,(function(t,n){var r;e.resizeViewport.emit({dimension:n,size:t.size}),null===(r=e.scrollService)||void 0===r||r.scroll(t.scroll,n,!0),e.setScrollVisibility(n,t.size,t.contentSize)}))}})},e.prototype.setScrollVisibility=function(e,t,n){var r,i,o=t<n;switch(e){case"rgCol":r=this.horizontalScroll,i=this.horizontalMouseWheel;break;case"rgRow":r=this.verticalScroll,i=this.verticalMouseWheel}o?(r.classList.add("scroll-"+e),r.addEventListener("mousewheel",i)):(r.classList.remove("scroll-"+e),r.removeEventListener("mousewheel",i)),this.scrollchange.emit({type:e,hasScroll:o})},e.prototype.disconnectedCallback=function(){this.verticalScroll.removeEventListener("mousewheel",this.verticalMouseWheel),this.horizontalScroll.removeEventListener("mousewheel",this.horizontalMouseWheel),this.horisontalResize.destroy()},e.prototype.componentDidRender=function(){return s(this,void 0,void 0,(function(){return l(this,(function(e){return this.contentHeight<this.oldValY&&this.verticalScroll&&(this.verticalScroll.scrollTop+=this.contentHeight-this.oldValY),this.oldValY=this.contentHeight,this.contentWidth<this.oldValX&&(this.horizontalScroll.scrollLeft+=this.contentWidth-this.oldValX),this.oldValX=this.contentWidth,this.scrollService.setParams({contentSize:this.contentHeight,clientSize:this.verticalScroll.clientHeight,virtualSize:0},"rgRow"),this.scrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol"),this.setScrollVisibility("rgRow",this.verticalScroll.clientHeight,this.contentHeight),this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth),[2]}))}))},e.prototype.render=function(){var e=this;return(0,i.h)(i.H,{onScroll:function(t){return e.onScroll("rgCol",t)}},(0,i.h)("div",{class:"inner-content-table",style:{width:this.contentWidth+"px"}},(0,i.h)("div",{class:"header-wrapper",ref:function(t){return e.header=t}},(0,i.h)("slot",{name:fi})),(0,i.h)("div",{class:"vertical-inner",ref:function(t){return e.verticalScroll=t},onScroll:function(t){return e.onScroll("rgRow",t)}},(0,i.h)("div",{class:"content-wrapper",style:{height:this.contentHeight+"px"}},(0,i.h)("slot",{name:gi}))),(0,i.h)("div",{class:"footer-wrapper",ref:function(t){return e.footer=t}},(0,i.h)("slot",{name:pi}))))},e.prototype.onScroll=function(e,t){var n,r=t.target,i=0;switch(e){case"rgCol":i=null==r?void 0:r.scrollLeft;break;case"rgRow":i=null==r?void 0:r.scrollTop}(new Date).getTime()-this.mouseWheelScroll[e]>this.scrollThrottling&&(null===(n=this.scrollService)||void 0===n||n.scroll(i,e))},e.prototype.latestScrollUpdate=function(e){this.mouseWheelScroll[e]=(new Date).getTime()},e.prototype.onVerticalMouseWheel=function(e,t,n){var r;n.preventDefault();var i=this.verticalScroll.scrollTop+n[t];null===(r=this.scrollService)||void 0===r||r.scroll(i,e,void 0,n[t]),this.latestScrollUpdate(e)},e.prototype.onHorizontalMouseWheel=function(e,t,n){var r;n.preventDefault();var i=this.horizontalScroll.scrollLeft+n[t];null===(r=this.scrollService)||void 0===r||r.scroll(i,e,void 0,n[t]),this.latestScrollUpdate(e)},Object.defineProperty(e.prototype,"horizontalScroll",{get:function(){return(0,i.e)(this)},enumerable:!1,configurable:!0}),e}();Oo.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}"},50629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{revogr_clipboard:()=>i});var r=n(14633),i=function(){function e(e){(0,r.r)(this,e),this.copyRegion=(0,r.c)(this,"copyRegion",3),this.pasteRegion=(0,r.c)(this,"pasteRegion",3)}return e.prototype.onPaste=function(e){var t=this.getData(e),n=t.types.indexOf("text/html")>-1,r=n?t.getData("text/html"):t.getData("text"),i=n?this.htmlParse(r):this.textParse(r);this.pasteRegion.emit(i),e.preventDefault()},e.prototype.copyStarted=function(e){this.copyRegion.emit(this.getData(e)),e.preventDefault()},e.prototype.doCopy=function(e,t){return function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}(this,(function(n){return e.setData("text/plain",t?this.parserCopy(t):""),[2]}))}))},e.prototype.parserCopy=function(e){return e.map((function(e){return e.join("\t")})).join("\n")},e.prototype.textParse=function(e){var t=[],n=e.split(/\r\n|\n|\r/);for(var r in n)t.push(n[r].split("\t"));return t},e.prototype.htmlParse=function(e){for(var t=[],n=document.createRange().createContextualFragment(e).querySelector("table"),r=0,i=Array.from(n.rows);r<i.length;r++){var o=i[r];t.push(Array.from(o.cells).map((function(e){return e.innerText})))}return t},e.prototype.getData=function(e){var t;return e.clipboardData||(null===(t=window)||void 0===t?void 0:t.clipboardData)},e}()},31952:(e,t,n)=>{"use strict";n.r(t),n.d(t,{revogr_filter_panel:()=>c});var r=n(14633),i=n(51476),o=function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},s=function(e,t){var n,i;return(0,r.h)("button",Object.assign({},e,{class:Object.assign(Object.assign({},"object"==typeof e.class?e.class:e.class?(n={},n[e.class]=!0,n):""),(i={},i["revo-button"]=!0,i))}),t)};Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var l="none",c=function(){function e(e){(0,r.r)(this,e),this.filterChange=(0,r.c)(this,"filterChange",7),this.filterTypes={},this.filterNames={},this.filterEntities={}}return e.prototype.onMouseDown=function(e){if(this.changes&&!e.defaultPrevented){var t=e.target;this.isOutside(t)&&!(0,i.i)(t)&&(this.changes=void 0)}},e.prototype.show=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return this.changes=e,this.changes&&(this.changes.type=this.changes.type||l),[2]}))}))},e.prototype.getChanges=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,this.changes]}))}))},e.prototype.renderConditions=function(e){var t=this,n=[];for(var i in this.filterTypes)n.push((0,r.h)("option",{value:l},this.filterNames.none)),n.push.apply(n,this.filterTypes[i].map((function(n){return(0,r.h)("option",{value:n,selected:e===n},t.filterNames[n])}))),n.push((0,r.h)("option",{disabled:!0}));return n},e.prototype.renderExtra=function(e,t){var n=this;return this.extraElement=void 0,"input"===e?(0,r.h)("input",{type:"text",value:t,onInput:function(e){return n.onInput(e)},onKeyDown:function(e){return n.onKeyDown(e)},ref:function(e){return n.extraElement=e}}):""},e.prototype.render=function(){var e=this;if(!this.changes||!this.changes)return(0,r.h)(r.H,{style:{display:"none"}});var t={display:"block",left:this.changes.x+"px",top:this.changes.y+"px"};return(0,r.h)(r.H,{style:t},(0,r.h)("label",null,"Filter by condition"),(0,r.h)("select",{class:"select-css",onChange:function(t){return e.onFilterChange(t)}},this.renderConditions(this.changes.type)),(0,r.h)("div",null,this.renderExtra(this.filterEntities[this.changes.type].extra,this.changes.value)),(0,r.h)(s,{class:{green:!0},onClick:function(){return e.onSave()}},"Save"),(0,r.h)(s,{class:{light:!0},onClick:function(){return e.onCancel()}},"Cancel"))},e.prototype.onFilterChange=function(e){if(!this.changes)throw new Error("Changes required per edit");var t=e.target.value;this.changes=Object.assign(Object.assign({},this.changes),{type:t})},e.prototype.onInput=function(e){this.changes.value=e.target.value,e.preventDefault()},e.prototype.onKeyDown=function(e){"enter"===e.key.toLowerCase()&&this.onSave(),e.stopPropagation()},e.prototype.onCancel=function(){this.changes=void 0},e.prototype.onSave=function(){var e,t;if(!this.changes)throw new Error("Changes required per edit");this.filterChange.emit({prop:this.changes.prop,type:this.changes.type,value:null===(t=null===(e=this.extraElement)||void 0===e?void 0:e.value)||void 0===t?void 0:t.trim()}),this.changes=void 0},e.prototype.isOutside=function(e){return!e.classList.contains('[uuid="'+this.uuid+'"]')&&!(null==e?void 0:e.closest('[uuid="'+this.uuid+'"]'))},e}();c.style=".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='path_to_url xmlns:xlink='path_to_url d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:150px;text-align:left}revogr-filter-panel label{color:gray;font-size:13px;font-weight:600;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box}revogr-filter-panel button{margin-top:10px;margin-right:5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:#c5c5c5}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}"},34109:(e,t,n)=>{!function(e){"use strict";!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),n(55),n(62),n(68),n(70),n(71),n(72),n(73),n(75),n(76),n(78),n(87),n(88),n(89),n(98),n(99),n(101),n(102),n(103),n(105),n(106),n(107),n(108),n(110),n(111),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(127),n(130),n(131),n(133),n(135),n(136),n(137),n(138),n(139),n(141),n(143),n(146),n(148),n(150),n(151),n(153),n(154),n(155),n(156),n(157),n(159),n(160),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(172),n(173),n(183),n(184),n(185),n(189),n(191),n(192),n(193),n(194),n(195),n(196),n(198),n(201),n(202),n(203),n(204),n(208),n(209),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(221),n(222),n(223),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(240),n(241),n(243),n(248),e.exports=n(246)},function(e,t,n){var r=n(2),i=n(6),o=n(45),a=n(14),s=n(46),l=n(39),c=n(47),u=n(48),h=n(52),d=n(49),f=n(53),p=d("isConcatSpreadable"),g=f>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=h("concat"),v=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!g||!m},{concat:function(e){var t,n,r,i,o,a=s(this),h=u(a,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(v(o=-1===t?a:arguments[t])){if(d+(i=l(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,d++)n in o&&c(h,d,o[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(h,d++,o)}return h.length=d,h}})},function(e,t,n){var r=n(3),i=n(4).f,o=n(18),a=n(21),s=n(22),l=n(32),c=n(44);e.exports=function(e,t){var n,u,h,d,f,p=e.target,g=e.global,m=e.stat;if(n=g?r:m?r[p]||s(p,{}):(r[p]||{}).prototype)for(u in t){if(d=t[u],h=e.noTargetGet?(f=i(n,u))&&f.value:n[u],!c(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(n,u,d,e)}}},function(e,t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},function(e,t,n){var r=n(5),i=n(7),o=n(8),a=n(9),s=n(13),l=n(15),c=n(16),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){var r=n(6);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(10),i=n(12);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(6),i=n(11),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(14);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(5),i=n(6),o=n(17);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(3),i=n(14),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(5),i=n(19),o=n(8);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),i=n(16),o=n(20),a=n(13),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(14);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(3),i=n(18),o=n(15),a=n(22),s=n(23),l=n(25),c=l.get,u=l.enforce,h=String(String).split("String");(e.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),u(n).source=h.join("string"==typeof t?t:"")),e!==r?(l?!d&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(e,t,n){var r=n(3),i=n(18);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(24),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(3),i=n(22),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r,i,o,a=n(26),s=n(3),l=n(14),c=n(18),u=n(15),h=n(27),d=n(31),f=s.WeakMap;if(a){var p=new f,g=p.get,m=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return g.call(p,e)||{}},o=function(e){return m.call(p,e)}}else{var y=h("state");d[y]=!0,r=function(e,t){return c(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},o=function(e){return u(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(3),i=n(23),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){var r=n(28),i=n(30),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){var r=n(29),i=n(24);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:" 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(15),i=n(33),o=n(4),a=n(19);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,c=0;c<n.length;c++){var u=n[c];r(e,u)||s(e,u,l(t,u))}}},function(e,t,n){var r=n(34),i=n(36),o=n(43),a=n(20);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(35),i=n(3),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(3);e.exports=r},function(e,t,n){var r=n(37),i=n(42).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(15),i=n(9),o=n(38).indexOf,a=n(31);e.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},function(e,t,n){var r=n(9),i=n(39),o=n(41),a=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(40),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(40),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(6),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(11);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(12);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(13),i=n(19),o=n(8);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(14),i=n(45),o=n(49)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(3),i=n(28),o=n(15),a=n(30),s=n(50),l=n(51),c=i("wks"),u=r.Symbol,h=l?u:u&&u.withoutSetter||a;e.exports=function(e){return o(c,e)||(s&&o(u,e)?c[e]=u[e]:c[e]=h("Symbol."+e)),c[e]}},function(e,t,n){var r=n(6);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(50);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(6),i=n(49),o=n(53),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r,i,o=n(3),a=n(54),s=o.process,l=s&&s.versions,c=l&&l.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(34);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(2),i=n(56),o=n(57);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){var r=n(46),i=n(41),o=n(39),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),l=i(e,s),c=i(t,s),u=arguments.length>2?arguments[2]:void 0,h=a((void 0===u?s:i(u,s))-c,s-l),d=1;for(c<l&&l<c+h&&(d=-1,c+=h-1,l+=h-1);h-- >0;)c in n?n[l]=n[c]:delete n[l],l+=d,c+=d;return n}},function(e,t,n){var r=n(49),i=n(58),o=n(19),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r,i=n(20),o=n(59),a=n(42),s=n(31),l=n(61),c=n(17),u=n(27)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[u]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(5),i=n(19),o=n(20),a=n(60);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(37),i=n(42);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(34);e.exports=r("document","documentElement")},function(e,t,n){var r=n(2),i=n(63).every,o=n(66),a=n(67),s=o("every"),l=a("every");r({target:"Array",proto:!0,forced:!s||!l},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(64),i=n(10),o=n(46),a=n(39),s=n(48),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,h=6==e,d=5==e||h;return function(f,p,g,m){for(var v,y,b=o(f),_=i(b),x=r(p,g,3),w=a(_.length),A=0,k=m||s,T=t?k(f,w):n?k(f,0):void 0;w>A;A++)if((d||A in _)&&(y=x(v=_[A],A,b),e))if(t)T[A]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return A;case 2:l.call(T,v)}else if(u)return!1;return h?-1:c||u?u:T}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,n){var r=n(65);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(6);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(5),i=n(6),o=n(15),a=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,u=o(t,0)?t[0]:l,h=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(c&&!r)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,u,h)}))}},function(e,t,n){var r=n(2),i=n(69),o=n(57);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){var r=n(46),i=n(41),o=n(39);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:i(l,n);c>s;)t[s++]=e;return t}},function(e,t,n){var r=n(2),i=n(63).filter,o=n(52),a=n(67),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2),i=n(63).find,o=n(57),a=n(67),s=!0,l=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){var r=n(2),i=n(63).findIndex,o=n(57),a=n(67),s=!0,l=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){var r=n(2),i=n(74),o=n(46),a=n(39),s=n(40),l=n(48);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=l(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){var r=n(45),i=n(39),o=n(64),a=function(e,t,n,s,l,c,u,h){for(var d,f=l,p=0,g=!!u&&o(u,h,3);p<s;){if(p in n){if(d=g?g(n[p],p,t):n[p],c>0&&r(d))f=a(e,t,d,i(d.length),f,c-1)-1;else{if(f>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[f]=d}f++}p++}return f};e.exports=a},function(e,t,n){var r=n(2),i=n(74),o=n(46),a=n(39),s=n(65),l=n(48);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=l(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(2),i=n(77);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){var r=n(63).forEach,i=n(66),o=n(67),a=i("forEach"),s=o("forEach");e.exports=a&&s?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(2),i=n(79);r({target:"Array",stat:!0,forced:!n(86)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){var r=n(64),i=n(46),o=n(80),a=n(81),s=n(39),l=n(47),c=n(83);e.exports=function(e){var t,n,u,h,d,f,p=i(e),g="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,y=void 0!==v,b=c(p),_=0;if(y&&(v=r(v,m>2?arguments[2]:void 0,2)),null==b||g==Array&&a(b))for(n=new g(t=s(p.length));t>_;_++)f=y?v(p[_],_):p[_],l(n,_,f);else for(d=(h=b.call(p)).next,n=new g;!(u=d.call(h)).done;_++)f=y?o(h,v,[u.value,_],!0):u.value,l(n,_,f);return n.length=_,n}},function(e,t,n){var r=n(20);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(49),i=n(82),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(84),i=n(82),o=n(49)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(85),i=n(11),o=n(49)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r={};r[n(49)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(49)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(2),i=n(38).includes,o=n(57);r({target:"Array",proto:!0,forced:!n(67)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){var r=n(2),i=n(38).indexOf,o=n(66),a=n(67),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),u=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!c||!u},{indexOf:function(e){return l?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(9),i=n(57),o=n(82),a=n(25),s=n(90),l=a.set,c=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(2),i=n(91),o=n(93),a=n(96),s=n(95),l=n(18),c=n(21),u=n(49),h=n(29),d=n(82),f=n(92),p=f.IteratorPrototype,g=f.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v=function(){return this};e.exports=function(e,t,n,u,f,y,b){i(n,t,u);var _,x,w,A=function(e){if(e===f&&C)return C;if(!g&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",T=!1,S=e.prototype,E=S[m]||S["@@iterator"]||f&&S[f],C=!g&&E||A(f),M="Array"==t&&S.entries||E;if(M&&(_=o(M.call(new e)),p!==Object.prototype&&_.next&&(h||o(_)===p||(a?a(_,p):"function"!=typeof _[m]&&l(_,m,v)),s(_,k,!0,!0),h&&(d[k]=v))),"values"==f&&E&&"values"!==E.name&&(T=!0,C=function(){return E.call(this)}),h&&!b||S[m]===C||l(S,m,C),d[t]=C,f)if(x={values:A("values"),keys:y?C:A("keys"),entries:A("entries")},b)for(w in x)(g||T||!(w in S))&&c(S,w,x[w]);else r({target:t,proto:!0,forced:g||T},x);return x}},function(e,t,n){var r=n(92).IteratorPrototype,i=n(58),o=n(8),a=n(95),s=n(82),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=l,e}},function(e,t,n){var r,i,o,a=n(93),s=n(18),l=n(15),c=n(49),u=n(29),h=c("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):d=!0),null==r&&(r={}),u||l(r,h)||s(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var r=n(15),i=n(46),o=n(27),a=n(94),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){var r=n(6);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(19).f,i=n(15),o=n(49)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(20),i=n(97);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(14);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){var r=n(2),i=n(10),o=n(9),a=n(66),s=[].join,l=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:l||!c},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(2),i=n(100);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){var r=n(9),i=n(40),o=n(39),a=n(66),s=n(67),l=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),d=s("indexOf",{ACCESSORS:!0,1:0}),f=u||!h||!d;e.exports=f?function(e){if(u)return c.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=l(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:c},function(e,t,n){var r=n(2),i=n(63).map,o=n(52),a=n(67),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2),i=n(6),o=n(47);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){var r=n(2),i=n(104).left,o=n(66),a=n(67),s=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(65),i=n(46),o=n(10),a=n(39),s=function(e){return function(t,n,s,l){r(n);var c=i(t),u=o(c),h=a(c.length),d=e?h-1:0,f=e?-1:1;if(s<2)for(;;){if(d in u){l=u[d],d+=f;break}if(d+=f,e?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:h>d;d+=f)d in u&&(l=n(l,u[d],d,c));return l}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){var r=n(2),i=n(104).right,o=n(66),a=n(67),s=o("reduceRight"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2),i=n(14),o=n(45),a=n(41),s=n(39),l=n(9),c=n(47),u=n(49),h=n(52),d=n(67),f=h("slice"),p=d("slice",{ACCESSORS:!0,0:0,1:2}),g=u("species"),m=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!f||!p},{slice:function(e,t){var n,r,u,h=l(this),d=s(h.length),f=a(e,d),p=a(void 0===t?d:t,d);if(o(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[g])&&(n=void 0):n=void 0,n===Array||void 0===n))return m.call(h,f,p);for(r=new(void 0===n?Array:n)(v(p-f,0)),u=0;f<p;f++,u++)f in h&&c(r,u,h[f]);return r.length=u,r}})},function(e,t,n){var r=n(2),i=n(63).some,o=n(66),a=n(67),s=o("some"),l=a("some");r({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(109)("Array")},function(e,t,n){var r=n(34),i=n(19),o=n(49),a=n(5),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(2),i=n(41),o=n(40),a=n(39),s=n(46),l=n(48),c=n(47),u=n(52),h=n(67),d=u("splice"),f=h("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,g=Math.min;r({target:"Array",proto:!0,forced:!d||!f},{splice:function(e,t){var n,r,u,h,d,f,m=s(this),v=a(m.length),y=i(e,v),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=v-y):(n=b-2,r=g(p(o(t),0),v-y)),v+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(m,r),h=0;h<r;h++)(d=y+h)in m&&c(u,h,m[d]);if(u.length=r,n<r){for(h=y;h<v-r;h++)f=h+n,(d=h+r)in m?m[f]=m[d]:delete m[f];for(h=v;h>v-r+n;h--)delete m[h-1]}else if(n>r)for(h=v-r;h>y;h--)f=h+n-1,(d=h+r-1)in m?m[f]=m[d]:delete m[f];for(h=0;h<n;h++)m[h+y]=arguments[h+2];return m.length=v-r+n,u}})},function(e,t,n){n(57)("flat")},function(e,t,n){n(57)("flatMap")},function(e,t,n){var r=n(14),i=n(19),o=n(93),a=n(49)("hasInstance"),s=Function.prototype;a in s||i.f(s,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(5),i=n(19).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){n(2)({global:!0},{globalThis:n(3)})},function(e,t,n){var r=n(2),i=n(34),o=n(6),a=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/,u=function(e,t,n){var r=n.charAt(t-1),i=n.charAt(t+1);return l.test(e)&&!c.test(i)||c.test(e)&&!l.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},h=o((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:h},{stringify:function(e,t,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,u):r}})},function(e,t,n){var r=n(3);n(95)(r.JSON,"JSON",!0)},function(e,t,n){var r=n(119),i=n(125);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,n){var r=n(2),i=n(3),o=n(44),a=n(21),s=n(120),l=n(122),c=n(123),u=n(14),h=n(6),d=n(86),f=n(95),p=n(124);e.exports=function(e,t,n){var g=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),v=g?"set":"add",y=i[e],b=y&&y.prototype,_=y,x={},w=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof y||!(m||b.forEach&&!h((function(){(new y).entries().next()})))))_=n.getConstructor(t,e,g,v),s.REQUIRED=!0;else if(o(e,!0)){var A=new _,k=A[v](m?{}:-0,1)!=A,T=h((function(){A.has(1)})),S=d((function(e){new y(e)})),E=!m&&h((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));S||((_=t((function(t,n){c(t,_,e);var r=p(new y,t,_);return null!=n&&l(n,r[v],r,g),r}))).prototype=b,b.constructor=_),(T||E)&&(w("delete"),w("has"),g&&w("get")),(E||k)&&w(v),m&&b.clear&&delete b.clear}return x[e]=_,r({global:!0,forced:_!=y},x),f(_,e),m||n.setStrong(_,e,g),_}},function(e,t,n){var r=n(31),i=n(14),o=n(15),a=n(19).f,s=n(30),l=n(121),c=s("meta"),u=0,h=Object.isExtensible||function(){return!0},d=function(e){a(e,c,{value:{objectID:"O"+ ++u,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,c)){if(!h(e))return"F";if(!t)return"E";d(e)}return e[c].objectID},getWeakData:function(e,t){if(!o(e,c)){if(!h(e))return!0;if(!t)return!1;d(e)}return e[c].weakData},onFreeze:function(e){return l&&f.REQUIRED&&h(e)&&!o(e,c)&&d(e),e}};r[c]=!0},function(e,t,n){var r=n(6);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(20),i=n(81),o=n(39),a=n(64),s=n(83),l=n(80),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,h){var d,f,p,g,m,v,y,b=a(t,n,u?2:1);if(h)d=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(p=0,g=o(e.length);g>p;p++)if((m=u?b(r(y=e[p])[0],y[1]):b(e[p]))&&m instanceof c)return m;return new c(!1)}d=f.call(e)}for(v=d.next;!(y=v.call(d)).done;)if("object"==typeof(m=l(d,b,y.value,u))&&m&&m instanceof c)return m;return new c(!1)}).stop=function(e){return new c(!0,e)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(14),i=n(96);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){var r=n(19).f,i=n(58),o=n(126),a=n(64),s=n(123),l=n(122),c=n(90),u=n(109),h=n(5),d=n(120).fastKey,f=n(25),p=f.set,g=f.getterFor;e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,r){s(e,u,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=r&&l(r,e[c],e,n)})),f=g(t),m=function(e,t,n){var r,i,o=f(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=d(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),h?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=f(e),i=d(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(u.prototype,{clear:function(){for(var e=f(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,h?e.size=0:this.size=0},delete:function(e){var t=f(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),h?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=f(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(u.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),h&&r(u.prototype,"size",{get:function(){return f(this).size}}),u},setStrong:function(e,t,n){var r=t+" Iterator",i=g(t),o=g(r);c(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},function(e,t,n){var r=n(21);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){var r=n(5),i=n(3),o=n(44),a=n(21),s=n(15),l=n(11),c=n(124),u=n(13),h=n(6),d=n(58),f=n(36).f,p=n(4).f,g=n(19).f,m=n(128).trim,v=i.Number,y=v.prototype,b="Number"==l(d(y)),_=function(e){var t,n,r,i,o,a,s,l,c=u(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=m(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;s<a;s++)if((l=o.charCodeAt(s))<48||l>i)return NaN;return parseInt(o,r)}return+c};if(o("Number",!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var x,w=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof w&&(b?h((function(){y.valueOf.call(n)})):"Number"!=l(n))?c(new v(_(t)),n,w):_(t)},A=r?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;A.length>k;k++)s(v,x=A[k])&&!s(w,x)&&g(w,x,p(v,x));w.prototype=y,y.constructor=w,a(i,"Number",w)}},function(e,t,n){var r=n(12),i="["+n(129)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){n(2)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){n(2)({target:"Number",stat:!0},{isFinite:n(132)})},function(e,t,n){var r=n(3).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},function(e,t,n){n(2)({target:"Number",stat:!0},{isInteger:n(134)})},function(e,t,n){var r=n(14),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){n(2)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),i=n(134),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){n(2)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){n(2)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),i=n(140);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},function(e,t,n){var r=n(3),i=n(128).trim,o=n(129),a=r.parseFloat,s=1/a(o+"-0")!=-1/0;e.exports=s?function(e){var t=i(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){var r=n(2),i=n(142);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},function(e,t,n){var r=n(3),i=n(128).trim,o=n(129),a=r.parseInt,s=/^[+-]?0[Xx]/,l=8!==a(o+"08")||22!==a(o+"0x16");e.exports=l?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){var r=n(2),i=n(40),o=n(144),a=n(145),s=n(6),l=1..toFixed,c=Math.floor,u=function(e,t,n){return 0===t?n:t%2==1?u(e,t-1,n*e):u(e*e,t/2,n)};r({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}))},{toFixed:function(e){var t,n,r,s,l=o(this),h=i(e),d=[0,0,0,0,0,0],f="",p="0",g=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*d[n],d[n]=r%1e7,r=c(r/1e7)},m=function(e){for(var t=6,n=0;--t>=0;)n+=d[t],d[t]=c(n/e),n=n%e*1e7},v=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==d[e]){var n=String(d[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(h<0||h>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(f="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*u(2,69,1))-69)<0?l*u(2,-t,1):l/u(2,t,1),n*=4503599627370496,(t=52-t)>0){for(g(0,n),r=h;r>=7;)g(1e7,0),r-=7;for(g(u(10,r,1),0),r=t-1;r>=23;)m(1<<23),r-=23;m(1<<r),g(1,1),m(2),p=v()}else g(0,n),g(1<<-t,0),p=v()+a.call("0",h);return h>0?f+((s=p.length)<=h?"0."+a.call("0",h-s)+p:p.slice(0,s-h)+"."+p.slice(s-h)):f+p}})},function(e,t,n){var r=n(11);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){var r=n(40),i=n(12);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(2),i=n(147);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(5),i=n(6),o=n(60),a=n(43),s=n(7),l=n(46),c=n(10),u=Object.assign,h=Object.defineProperty;e.exports=!u||i((function(){if(r&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=o(u({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,u=1,h=a.f,d=s.f;i>u;)for(var f,p=c(arguments[u++]),g=h?o(p).concat(h(p)):o(p),m=g.length,v=0;m>v;)f=g[v++],r&&!d.call(p,f)||(n[f]=p[f]);return n}:u},function(e,t,n){var r=n(2),i=n(5),o=n(149),a=n(46),s=n(65),l=n(19);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){l.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(29),i=n(3),o=n(6);e.exports=r||!o((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}))},function(e,t,n){var r=n(2),i=n(5),o=n(149),a=n(46),s=n(65),l=n(19);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){l.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(2),i=n(152).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(5),i=n(60),o=n(9),a=n(7).f,s=function(e){return function(t){for(var n,s=o(t),l=i(s),c=l.length,u=0,h=[];c>u;)n=l[u++],r&&!a.call(s,n)||h.push(e?[n,s[n]]:s[n]);return h}};e.exports={entries:s(!0),values:s(!1)}},function(e,t,n){var r=n(2),i=n(121),o=n(6),a=n(14),s=n(120).onFreeze,l=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){l(1)})),sham:!i},{freeze:function(e){return l&&a(e)?l(s(e)):e}})},function(e,t,n){var r=n(2),i=n(122),o=n(47);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(2),i=n(6),o=n(9),a=n(4).f,s=n(5),l=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(2),i=n(5),o=n(33),a=n(9),s=n(4),l=n(47);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,c=o(r),u={},h=0;c.length>h;)void 0!==(n=i(r,t=c[h++]))&&l(u,t,n);return u}})},function(e,t,n){var r=n(2),i=n(6),o=n(158).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(9),i=n(36).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){var r=n(2),i=n(6),o=n(46),a=n(93),s=n(94);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(2)({target:"Object",stat:!0},{is:n(161)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var r=n(2),i=n(6),o=n(14),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(2),i=n(6),o=n(14),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(2),i=n(6),o=n(14),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(2),i=n(46),o=n(60);r({target:"Object",stat:!0,forced:n(6)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){var r=n(2),i=n(5),o=n(149),a=n(46),s=n(13),l=n(93),c=n(4).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=c(n,r))return t.get}while(n=l(n))}})},function(e,t,n){var r=n(2),i=n(5),o=n(149),a=n(46),s=n(13),l=n(93),c=n(4).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=c(n,r))return t.set}while(n=l(n))}})},function(e,t,n){var r=n(2),i=n(14),o=n(120).onFreeze,a=n(121),s=n(6),l=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){l(1)})),sham:!a},{preventExtensions:function(e){return l&&i(e)?l(o(e)):e}})},function(e,t,n){var r=n(2),i=n(14),o=n(120).onFreeze,a=n(121),s=n(6),l=Object.seal;r({target:"Object",stat:!0,forced:s((function(){l(1)})),sham:!a},{seal:function(e){return l&&i(e)?l(o(e)):e}})},function(e,t,n){var r=n(85),i=n(21),o=n(171);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){var r=n(85),i=n(84);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,n){var r=n(2),i=n(152).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){var r,i,o,a,s=n(2),l=n(29),c=n(3),u=n(34),h=n(174),d=n(21),f=n(126),p=n(95),g=n(109),m=n(14),v=n(65),y=n(123),b=n(11),_=n(23),x=n(122),w=n(86),A=n(175),k=n(176).set,T=n(178),S=n(179),E=n(181),C=n(180),M=n(182),O=n(25),L=n(44),D=n(49),I=n(53),R=D("species"),P="Promise",N=O.get,z=O.set,F=O.getterFor(P),B=h,j=c.TypeError,U=c.document,V=c.process,q=u("fetch"),H=C.f,$=H,W="process"==b(V),G=!!(U&&U.createEvent&&c.dispatchEvent),Y=L(P,(function(){if(_(B)===String(B)){if(66===I)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!B.prototype.finally)return!0;if(I>=51&&/native code/.test(B))return!1;var e=B.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[R]=t,!(e.then((function(){}))instanceof t)})),X=Y||!w((function(e){B.all(e).catch((function(){}))})),Z=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},K=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;T((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,l,c,u=r[a++],h=o?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{h?(o||(2===t.rejection&&te(e,t),t.rejection=1),!0===h?s=i:(p&&p.enter(),s=h(i),p&&(p.exit(),c=!0)),s===u.promise?f(j("Promise-chain cycle")):(l=Z(s))?l.call(s,d,f):d(s)):f(i)}catch(e){p&&!c&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Q(e,t)}))}},J=function(e,t,n){var r,i;G?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},(i=c["on"+e])?i(r):"unhandledrejection"===e&&E("Unhandled promise rejection",n)},Q=function(e,t){k.call(c,(function(){var n,r=t.value;if(ee(t)&&(n=M((function(){W?V.emit("unhandledRejection",r,e):J("unhandledrejection",e,r)})),t.rejection=W||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){k.call(c,(function(){W?V.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},ne=function(e,t,n,r){return function(i){e(t,n,i,r)}},re=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,K(e,t,!0))},ie=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw j("Promise can't be resolved itself");var i=Z(n);i?T((function(){var r={done:!1};try{i.call(n,ne(ie,e,r,t),ne(re,e,r,t))}catch(n){re(e,r,n,t)}})):(t.value=n,t.state=1,K(e,t,!1))}catch(n){re(e,{done:!1},n,t)}}};Y&&(B=function(e){y(this,B,P),v(e),r.call(this);var t=N(this);try{e(ne(ie,this,t),ne(re,this,t))}catch(e){re(this,t,e)}},(r=function(e){z(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(B.prototype,{then:function(e,t){var n=F(this),r=H(A(this,B));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&K(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=N(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(re,e,t)},C.f=H=function(e){return e===B||e===o?new i(e):$(e)},l||"function"!=typeof h||(a=h.prototype.then,d(h.prototype,"then",(function(e,t){var n=this;return new B((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof q&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return S(B,q.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:B}),p(B,P,!1,!0),g(P),o=u(P),s({target:P,stat:!0,forced:Y},{reject:function(e){var t=H(this);return t.reject.call(void 0,e),t.promise}}),s({target:P,stat:!0,forced:l||Y},{resolve:function(e){return S(l&&this===o?B:this,e)}}),s({target:P,stat:!0,forced:X},{all:function(e){var t=this,n=H(t),r=n.resolve,i=n.reject,o=M((function(){var n=v(t.resolve),o=[],a=0,s=1;x(e,(function(e){var l=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[l]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=H(t),r=n.reject,i=M((function(){var i=v(t.resolve);x(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r=n(3);e.exports=r.Promise},function(e,t,n){var r=n(20),i=n(65),o=n(49)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a=n(3),s=n(6),l=n(11),c=n(64),u=n(61),h=n(17),d=n(177),f=a.location,p=a.setImmediate,g=a.clearImmediate,m=a.process,v=a.MessageChannel,y=a.Dispatch,b=0,_={},x=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},w=function(e){return function(){x(e)}},A=function(e){x(e.data)},k=function(e){a.postMessage(e+"",f.protocol+"//"+f.host)};p&&g||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},g=function(e){delete _[e]},"process"==l(m)?r=function(e){m.nextTick(w(e))}:y&&y.now?r=function(e){y.now(w(e))}:v&&!d?(o=(i=new v).port2,i.port1.onmessage=A,r=c(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(k)||"file:"===f.protocol?r="onreadystatechange"in h("script")?function(e){u.appendChild(h("script")).onreadystatechange=function(){u.removeChild(this),x(e)}}:function(e){setTimeout(w(e),0)}:(r=k,a.addEventListener("message",A,!1))),e.exports={set:p,clear:g}},function(e,t,n){var r=n(54);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r,i,o,a,s,l,c,u,h=n(3),d=n(4).f,f=n(11),p=n(176).set,g=n(177),m=h.MutationObserver||h.WebKitMutationObserver,v=h.process,y=h.Promise,b="process"==f(v),_=d(h,"queueMicrotask"),x=_&&_.value;x||(r=function(){var e,t;for(b&&(e=v.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){v.nextTick(r)}:m&&!g?(s=!0,l=document.createTextNode(""),new m(r).observe(l,{characterData:!0}),a=function(){l.data=s=!s}):y&&y.resolve?(c=y.resolve(void 0),u=c.then,a=function(){u.call(c,r)}):a=function(){p.call(h,r)}),e.exports=x||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(20),i=n(14),o=n(180);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(65),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(3);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){var r=n(2),i=n(65),o=n(180),a=n(182),s=n(122);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,l=n.reject,c=a((function(){var n=i(t.resolve),o=[],a=0,l=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),l++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--l||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--l||r(o))}))})),--l||r(o)}));return c.error&&l(c.value),n.promise}})},function(e,t,n){var r=n(2),i=n(29),o=n(174),a=n(6),s=n(34),l=n(175),c=n(179),u=n(21);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,s("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||u(o.prototype,"finally",s("Promise").prototype.finally)},function(e,t,n){var r=n(5),i=n(3),o=n(44),a=n(124),s=n(19).f,l=n(36).f,c=n(186),u=n(187),h=n(188),d=n(21),f=n(6),p=n(25).set,g=n(109),m=n(49)("match"),v=i.RegExp,y=v.prototype,b=/a/g,_=/a/g,x=new v(b)!==b,w=h.UNSUPPORTED_Y;if(r&&o("RegExp",!x||w||f((function(){return _[m]=!1,v(b)!=b||v(_)==_||"/a/i"!=v(b,"i")})))){for(var A=function(e,t){var n,r=this instanceof A,i=c(e),o=void 0===t;if(!r&&i&&e.constructor===A&&o)return e;x?i&&!o&&(e=e.source):e instanceof A&&(o&&(t=u.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=a(x?new v(e,t):v(e,t),r?this:y,A);return w&&n&&p(s,{sticky:n}),s},k=function(e){e in A||s(A,e,{configurable:!0,get:function(){return v[e]},set:function(t){v[e]=t}})},T=l(v),S=0;T.length>S;)k(T[S++]);y.constructor=A,A.prototype=y,d(i,"RegExp",A)}g("RegExp")},function(e,t,n){var r=n(14),i=n(11),o=n(49)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(20);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(6);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r=n(2),i=n(190);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){var r,i,o=n(187),a=n(188),s=RegExp.prototype.exec,l=String.prototype.replace,c=s,u=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(u||d||h)&&(c=function(e){var t,n,r,i,a=this,c=h&&a.sticky,f=o.call(a),p=a.source,g=0,m=e;return c&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),m=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(p="(?: "+p+")",m=" "+m,g++),n=new RegExp("^(?:"+p+")",f)),d&&(n=new RegExp("^"+p+"$(?!\\s)",f)),u&&(t=a.lastIndex),r=s.call(c?n:a,m),c?r?(r.input=r.input.slice(g),r[0]=r[0].slice(g),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:u&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),d&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},function(e,t,n){var r=n(5),i=n(19),o=n(187),a=n(188).UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&i.f(RegExp.prototype,"flags",{configurable:!0,get:o})},function(e,t,n){var r=n(5),i=n(188).UNSUPPORTED_Y,o=n(19).f,a=n(25).get,s=RegExp.prototype;r&&i&&o(RegExp.prototype,"sticky",{configurable:!0,get:function(){if(this!==s){if(this instanceof RegExp)return!!a(this).sticky;throw TypeError("Incompatible receiver, RegExp required")}}})},function(e,t,n){n(189);var r,i,o=n(2),a=n(14),s=(r=!1,(i=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&r),l=/./.test;o({target:"RegExp",proto:!0,forced:!s},{test:function(e){if("function"!=typeof this.exec)return l.call(this,e);var t=this.exec(e);if(null!==t&&!a(t))throw new Error("RegExp exec method returned something other than an Object or null");return!!t}})},function(e,t,n){var r=n(21),i=n(20),o=n(6),a=n(187),s=RegExp.prototype,l=s.toString,c=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),u="toString"!=l.name;(c||u)&&r(RegExp.prototype,"toString",(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){var r=n(119),i=n(125);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,n){var r=n(2),i=n(197).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){var r=n(40),i=n(12),o=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){var r,i=n(2),o=n(4).f,a=n(39),s=n(199),l=n(12),c=n(200),u=n(29),h="".endsWith,d=Math.min,f=c("endsWith");i({target:"String",proto:!0,forced:!(!u&&!f&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||f)},{endsWith:function(e){var t=String(l(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:d(a(n),r),o=String(e);return h?h.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,n){var r=n(186);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(49)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){var r=n(2),i=n(41),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),i=n(199),o=n(12);r({target:"String",proto:!0,forced:!n(200)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(197).charAt,i=n(25),o=n(90),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(205),i=n(20),o=n(39),a=n(12),s=n(206),l=n(207);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),c=String(this);if(!a.global)return l(a,c);var u=a.unicode;a.lastIndex=0;for(var h,d=[],f=0;null!==(h=l(a,c));){var p=String(h[0]);d[f]=p,""===p&&(a.lastIndex=s(c,o(a.lastIndex),u)),f++}return 0===f?null:d}]}))},function(e,t,n){n(189);var r=n(21),i=n(6),o=n(49),a=n(190),s=n(18),l=o("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),u="$0"==="a".replace(/./,"$0"),h=o("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),f=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,h){var p=o(e),g=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),m=g&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!g||!m||"replace"===e&&(!c||!u||d)||"split"===e&&!f){var v=/./[p],y=n(p,""[e],(function(e,t,n,r,i){return t.exec===a?g&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],_=y[1];r(String.prototype,e,b),r(RegExp.prototype,p,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}h&&s(RegExp.prototype[p],"sham",!0)}},function(e,t,n){var r=n(197).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(11),i=n(190);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(2),i=n(91),o=n(12),a=n(39),s=n(65),l=n(20),c=n(11),u=n(186),h=n(187),d=n(18),f=n(6),p=n(49),g=n(175),m=n(206),v=n(25),y=n(29),b=p("matchAll"),_=v.set,x=v.getterFor("RegExp String Iterator"),w=RegExp.prototype,A=w.exec,k="".matchAll,T=!!k&&!f((function(){"a".matchAll(/./)})),S=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=x(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return A.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),E=function(e){var t,n,r,i,o,s,c=l(this),u=String(e);return t=g(c,RegExp),void 0===(n=c.flags)&&c instanceof RegExp&&!("flags"in w)&&(n=h.call(c)),r=void 0===n?"":String(n),i=new t(t===RegExp?c.source:c,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(c.lastIndex),new S(i,u,o,s)};r({target:"String",proto:!0,forced:T},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(u(e)&&!~String(o("flags"in w?e.flags:h.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(T)return k.apply(i,arguments);if(void 0===(n=e[b])&&y&&"RegExp"==c(e)&&(n=E),null!=n)return s(n).call(e,i)}else if(T)return k.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),y?E.call(r,t):r[b](t)}}),y||b in w||d(w,b,E)},function(e,t,n){var r=n(2),i=n(210).end;r({target:"String",proto:!0,forced:n(211)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(39),i=n(145),o=n(12),a=Math.ceil,s=function(e){return function(t,n,s){var l,c,u=String(o(t)),h=u.length,d=void 0===s?" ":String(s),f=r(n);return f<=h||""==d?u:(l=f-h,(c=i.call(d,a(l/d.length))).length>l&&(c=c.slice(0,l)),e?u+c:c+u)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){var r=n(54);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){var r=n(2),i=n(210).start;r({target:"String",proto:!0,forced:n(211)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2),i=n(9),o=n(39);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(2)({target:"String",proto:!0},{repeat:n(145)})},function(e,t,n){var r=n(205),i=n(20),o=n(46),a=n(39),s=n(40),l=n(12),c=n(206),u=n(207),h=Math.max,d=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var m=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=m?"$":"$0";return[function(n,r){var i=l(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!m&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var l=i(e),f=String(this),p="function"==typeof r;p||(r=String(r));var g=l.global;if(g){var _=l.unicode;l.lastIndex=0}for(var x=[];;){var w=u(l,f);if(null===w)break;if(x.push(w),!g)break;""===String(w[0])&&(l.lastIndex=c(f,a(l.lastIndex),_))}for(var A,k="",T=0,S=0;S<x.length;S++){w=x[S];for(var E=String(w[0]),C=h(d(s(w.index),f.length),0),M=[],O=1;O<w.length;O++)M.push(void 0===(A=w[O])?A:String(A));var L=w.groups;if(p){var D=[E].concat(M,C,f);void 0!==L&&D.push(L);var I=String(r.apply(void 0,D))}else I=b(E,f,C,M,L,r);C>=T&&(k+=f.slice(T,C)+I,T=C+E.length)}return k+f.slice(T)}];function b(e,n,r,i,a,s){var l=r+e.length,c=i.length,u=g;return void 0!==a&&(a=o(a),u=p),t.call(s,u,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>c){var h=f(u/10);return 0===h?t:h<=c?void 0===i[h-1]?o.charAt(1):i[h-1]+o.charAt(1):t}s=i[u-1]}return void 0===s?"":s}))}}))},function(e,t,n){var r=n(205),i=n(20),o=n(12),a=n(161),s=n(207);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),l=String(this),c=o.lastIndex;a(c,0)||(o.lastIndex=0);var u=s(o,l);return a(o.lastIndex,c)||(o.lastIndex=c),null===u?-1:u.index}]}))},function(e,t,n){var r=n(205),i=n(186),o=n(20),a=n(12),s=n(175),l=n(206),c=n(39),u=n(207),h=n(190),d=n(6),f=[].push,p=Math.min,g=!d((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,l,c,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,g=new RegExp(e.source,d+"g");(s=h.call(g,r))&&!((l=g.lastIndex)>p&&(u.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&f.apply(u,s.slice(1)),c=s[0].length,p=l,u.length>=o));)g.lastIndex===s.index&&g.lastIndex++;return p===r.length?!c&&g.test("")||u.push(""):u.push(r.slice(p)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var h=o(e),d=String(this),f=s(h,RegExp),m=h.unicode,v=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(g?"y":"g"),y=new f(g?h:"^(?:"+h.source+")",v),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===d.length)return null===u(y,d)?[d]:[];for(var _=0,x=0,w=[];x<d.length;){y.lastIndex=g?x:0;var A,k=u(y,g?d:d.slice(x));if(null===k||(A=p(c(y.lastIndex+(g?0:x)),d.length))===_)x=l(d,x,m);else{if(w.push(d.slice(_,x)),w.length===b)return w;for(var T=1;T<=k.length-1;T++)if(w.push(k[T]),w.length===b)return w;x=_=A}}return w.push(d.slice(_)),w}]}),!g)},function(e,t,n){var r,i=n(2),o=n(4).f,a=n(39),s=n(199),l=n(12),c=n(200),u=n(29),h="".startsWith,d=Math.min,f=c("startsWith");i({target:"String",proto:!0,forced:!(!u&&!f&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||f)},{startsWith:function(e){var t=String(l(this));s(e);var n=a(d(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return h?h.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){var r=n(2),i=n(128).trim;r({target:"String",proto:!0,forced:n(220)("trim")},{trim:function(){return i(this)}})},function(e,t,n){var r=n(6),i=n(129);e.exports=function(e){return r((function(){return!!i[e]()||""!=""[e]()||i[e].name!==e}))}},function(e,t,n){var r=n(2),i=n(128).end,o=n(220)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){var r=n(2),i=n(128).start,o=n(220)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){var r=n(12),i=/"/g;e.exports=function(e,t,n,o){var a=String(r(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+a+"</"+t+">"}},function(e,t,n){var r=n(6);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){var r=n(2),i=n(224);r({target:"String",proto:!0,forced:n(225)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){var r,i=n(3),o=n(126),a=n(120),s=n(119),l=n(239),c=n(14),u=n(25).enforce,h=n(26),d=!i.ActiveXObject&&"ActiveXObject"in i,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",p,l);if(h&&d){r=l.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,_=m.set;o(m,{delete:function(e){if(c(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(c(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(c(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!f(e)){var n=u(this);n.frozen||(n.frozen=new r),y.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){var r=n(126),i=n(120).getWeakData,o=n(20),a=n(14),s=n(123),l=n(122),c=n(63),u=n(15),h=n(25),d=h.set,f=h.getterFor,p=c.find,g=c.findIndex,m=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,c){var h=e((function(e,r){s(e,h,t),d(e,{type:t,id:m++,frozen:void 0}),null!=r&&l(r,e[c],e,n)})),p=f(t),g=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?v(r).set(t,n):a[r.id]=n,e};return r(h.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?v(t).delete(e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?v(t).has(e):n&&u(n,t.id)}}),r(h.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},function(e,t,n){n(119)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(239))},function(e,t,n){var r=n(3),i=n(242),o=n(77),a=n(18);for(var s in i){var l=r[s],c=l&&l.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){n(203);var r,i=n(2),o=n(5),a=n(244),s=n(3),l=n(59),c=n(21),u=n(123),h=n(15),d=n(147),f=n(79),p=n(197).codeAt,g=n(245),m=n(95),v=n(246),y=n(25),b=s.URL,_=v.URLSearchParams,x=v.getState,w=y.set,A=y.getterFor("URL"),k=Math.floor,T=Math.pow,S=/[A-Za-z]/,E=/[\d+-.A-Za-z]/,C=/\d/,M=/^(0x|0X)/,O=/^[0-7]+$/,L=/^\d+$/,D=/^[\dA-Fa-f]+$/,I=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,R=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,P=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,N=/[\u0009\u000A\u000D]/g,z=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=B(t.slice(1,-1))))return"Invalid host";e.host=n}else if(G(e)){if(t=g(t),I.test(t))return"Invalid host";if(null===(n=F(t)))return"Invalid host";e.host=n}else{if(R.test(t))return"Invalid host";for(n="",r=f(t),i=0;i<r.length;i++)n+=$(r[i],U);e.host=n}},F=function(e){var t,n,r,i,o,a,s,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=l[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=M.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?L:8==o?O:D).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=T(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*T(256,3-r);return s},B=function(e){var t,n,r,i,o,a,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return e.charAt(h)};if(":"==d()){if(":"!=e.charAt(1))return;h+=2,u=++c}for(;d();){if(8==c)return;if(":"!=d()){for(t=n=0;n<4&&D.test(d());)t=16*t+parseInt(d(),16),h++,n++;if("."==d()){if(0==n)return;if(h-=n,c>6)return;for(r=0;d();){if(i=null,r>0){if(!("."==d()&&r<4))return;h++}if(!C.test(d()))return;for(;C.test(d());){if(o=parseInt(d(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[c]=256*l[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==d()){if(h++,!d())return}else if(d())return;l[c++]=t}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(a=c-u,c=7;0!=c&&a>0;)s=l[c],l[c--]=l[u+a-1],l[u+--a]=s;else if(8!=c)return;return l},j=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},U={},V=d({},U,{" ":1,'"':1,"<":1,">":1,"`":1}),q=d({},V,{"#":1,"?":1,"{":1,"}":1}),H=d({},q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(e,t){var n=p(e,0);return n>32&&n<127&&!h(t,e)?e:encodeURIComponent(e)},W={ftp:21,file:null,http:80,https:443,ws:80,wss:443},G=function(e){return h(W,e.scheme)},Y=function(e){return""!=e.username||""!=e.password},X=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var n;return 2==e.length&&S.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},K=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},J=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Z(t[0],!0)||t.pop()},Q=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ie={},oe={},ae={},se={},le={},ce={},ue={},he={},de={},fe={},pe={},ge={},me={},ve={},ye={},be={},_e={},xe=function(e,t,n,i){var o,a,s,l,c,u=n||ee,d=0,p="",g=!1,m=!1,v=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(P,"")),t=t.replace(N,""),o=f(t);d<=o.length;){switch(a=o[d],u){case ee:if(!a||!S.test(a)){if(n)return"Invalid scheme";u=ne;continue}p+=a.toLowerCase(),u=te;break;case te:if(a&&(E.test(a)||"+"==a||"-"==a||"."==a))p+=a.toLowerCase();else{if(":"!=a){if(n)return"Invalid scheme";p="",u=ne,d=0;continue}if(n&&(G(e)!=h(W,p)||"file"==p&&(Y(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,n)return void(G(e)&&W[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?u=fe:G(e)&&i&&i.scheme==e.scheme?u=re:G(e)?u=se:"/"==o[d+1]?(u=ie,d++):(e.cannotBeABaseURL=!0,e.path.push(""),u=ye)}break;case ne:if(!i||i.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,u=_e;break}u="file"==i.scheme?fe:oe;continue;case re:if("/"!=a||"/"!=o[d+1]){u=oe;continue}u=le,d++;break;case ie:if("/"==a){u=ce;break}u=ve;continue;case oe:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&G(e))u=ae;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",u=be;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),u=ve;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=_e}break;case ae:if(!G(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,u=ve;continue}u=ce}else u=le;break;case se:if(u=le,"/"!=a||"/"!=p.charAt(d+1))continue;d++;break;case le:if("/"!=a&&"\\"!=a){u=ce;continue}break;case ce:if("@"==a){g&&(p="%40"+p),g=!0,s=f(p);for(var y=0;y<s.length;y++){var b=s[y];if(":"!=b||v){var _=$(b,H);v?e.password+=_:e.username+=_}else v=!0}p=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&G(e)){if(g&&""==p)return"Invalid authority";d-=f(p).length+1,p="",u=ue}else p+=a;break;case ue:case he:if(n&&"file"==e.scheme){u=ge;continue}if(":"!=a||m){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&G(e)){if(G(e)&&""==p)return"Invalid host";if(n&&""==p&&(Y(e)||null!==e.port))return;if(l=z(e,p))return l;if(p="",u=me,n)return;continue}"["==a?m=!0:"]"==a&&(m=!1),p+=a}else{if(""==p)return"Invalid host";if(l=z(e,p))return l;if(p="",u=de,n==he)return}break;case de:if(!C.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&G(e)||n){if(""!=p){var x=parseInt(p,10);if(x>65535)return"Invalid port";e.port=G(e)&&x===W[e.scheme]?null:x,p=""}if(n)return;u=me;continue}return"Invalid port"}p+=a;break;case fe:if(e.scheme="file","/"==a||"\\"==a)u=pe;else{if(!i||"file"!=i.scheme){u=ve;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",u=be;else{if("#"!=a){K(o.slice(d).join(""))||(e.host=i.host,e.path=i.path.slice(),J(e)),u=ve;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=_e}}break;case pe:if("/"==a||"\\"==a){u=ge;break}i&&"file"==i.scheme&&!K(o.slice(d).join(""))&&(Z(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),u=ve;continue;case ge:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Z(p))u=ve;else if(""==p){if(e.host="",n)return;u=me}else{if(l=z(e,p))return l;if("localhost"==e.host&&(e.host=""),n)return;p="",u=me}continue}p+=a;break;case me:if(G(e)){if(u=ve,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(u=ve,"/"!=a))continue}else e.fragment="",u=_e;else e.query="",u=be;break;case ve:if(a==r||"/"==a||"\\"==a&&G(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=p).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(J(e),"/"==a||"\\"==a&&G(e)||e.path.push("")):Q(p)?"/"==a||"\\"==a&&G(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",u=be):"#"==a&&(e.fragment="",u=_e)}else p+=$(a,q);break;case ye:"?"==a?(e.query="",u=be):"#"==a?(e.fragment="",u=_e):a!=r&&(e.path[0]+=$(a,U));break;case be:n||"#"!=a?a!=r&&("'"==a&&G(e)?e.query+="%27":e.query+="#"==a?"%23":$(a,U)):(e.fragment="",u=_e);break;case _e:a!=r&&(e.fragment+=$(a,V))}d++}},we=function(e){var t,n,r=u(this,we,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=w(r,{type:"URL"});if(void 0!==i)if(i instanceof we)t=A(i);else if(n=xe(t={},String(i)))throw TypeError(n);if(n=xe(s,a,null,t))throw TypeError(n);var l=s.searchParams=new _,c=x(l);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(l)||null},o||(r.href=ke.call(r),r.origin=Te.call(r),r.protocol=Se.call(r),r.username=Ee.call(r),r.password=Ce.call(r),r.host=Me.call(r),r.hostname=Oe.call(r),r.port=Le.call(r),r.pathname=De.call(r),r.search=Ie.call(r),r.searchParams=Re.call(r),r.hash=Pe.call(r))},Ae=we.prototype,ke=function(){var e=A(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",Y(e)&&(c+=n+(r?":"+r:"")+"@"),c+=j(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},Te=function(){var e=A(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&G(e)?t+"://"+j(e.host)+(null!==n?":"+n:""):"null"},Se=function(){return A(this).scheme+":"},Ee=function(){return A(this).username},Ce=function(){return A(this).password},Me=function(){var e=A(this),t=e.host,n=e.port;return null===t?"":null===n?j(t):j(t)+":"+n},Oe=function(){var e=A(this).host;return null===e?"":j(e)},Le=function(){var e=A(this).port;return null===e?"":String(e)},De=function(){var e=A(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ie=function(){var e=A(this).query;return e?"?"+e:""},Re=function(){return A(this).searchParams},Pe=function(){var e=A(this).fragment;return e?"#"+e:""},Ne=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&l(Ae,{href:Ne(ke,(function(e){var t=A(this),n=String(e),r=xe(t,n);if(r)throw TypeError(r);x(t.searchParams).updateSearchParams(t.query)})),origin:Ne(Te),protocol:Ne(Se,(function(e){var t=A(this);xe(t,String(e)+":",ee)})),username:Ne(Ee,(function(e){var t=A(this),n=f(String(e));if(!X(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=$(n[r],H)}})),password:Ne(Ce,(function(e){var t=A(this),n=f(String(e));if(!X(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=$(n[r],H)}})),host:Ne(Me,(function(e){var t=A(this);t.cannotBeABaseURL||xe(t,String(e),ue)})),hostname:Ne(Oe,(function(e){var t=A(this);t.cannotBeABaseURL||xe(t,String(e),he)})),port:Ne(Le,(function(e){var t=A(this);X(t)||(""==(e=String(e))?t.port=null:xe(t,e,de))})),pathname:Ne(De,(function(e){var t=A(this);t.cannotBeABaseURL||(t.path=[],xe(t,e+"",me))})),search:Ne(Ie,(function(e){var t=A(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",xe(t,e,be)),x(t.searchParams).updateSearchParams(t.query)})),searchParams:Ne(Re),hash:Ne(Pe,(function(e){var t=A(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",xe(t,e,_e)):t.fragment=null}))}),c(Ae,"toJSON",(function(){return ke.call(this)}),{enumerable:!0}),c(Ae,"toString",(function(){return ke.call(this)}),{enumerable:!0}),b){var ze=b.createObjectURL,Fe=b.revokeObjectURL;ze&&c(we,"createObjectURL",(function(e){return ze.apply(b,arguments)})),Fe&&c(we,"revokeObjectURL",(function(e){return Fe.apply(b,arguments)}))}m(we,"URL"),i({global:!0,forced:!a,sham:!o},{URL:we})},function(e,t,n){var r=n(6),i=n(49),o=n(29),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","path_to_url"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"path_to_url"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("path_to_url").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://").host||"#%D0%B1"!==new URL("path_to_url#").hash||"a1c3"!==n||"x"!==new URL("path_to_url",void 0).host}))},function(e,t,n){var r=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",a=Math.floor,s=String.fromCharCode,l=function(e){return e+22+75*(e<26)},c=function(e,t,n){var r=0;for(e=n?a(e/700):e>>1,e+=a(e/t);e>455;r+=36)e=a(e/35);return a(r+36*e/(e+38))},u=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,u=128,h=0,d=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(s(n));var f=r.length,p=f;for(f&&r.push("-");p<i;){var g=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=u&&n<g&&(g=n);var m=p+1;if(g-u>a((2147483647-h)/m))throw RangeError(o);for(h+=(g-u)*m,u=g,t=0;t<e.length;t++){if((n=e[t])<u&&++h>2147483647)throw RangeError(o);if(n==u){for(var v=h,y=36;;y+=36){var b=y<=d?1:y>=d+26?26:y-d;if(v<b)break;var _=v-b,x=36-b;r.push(s(l(b+_%x))),v=a(_/x)}r.push(s(l(v))),d=c(h,m,p==f),h=0,++p}}++h,++u}return r.join("")};e.exports=function(e){var t,n,o=[],a=e.toLowerCase().replace(i,".").split(".");for(t=0;t<a.length;t++)n=a[t],o.push(r.test(n)?"xn--"+u(n):n);return o.join(".")}},function(e,t,n){n(89);var r=n(2),i=n(34),o=n(244),a=n(21),s=n(126),l=n(95),c=n(91),u=n(25),h=n(123),d=n(15),f=n(64),p=n(84),g=n(20),m=n(14),v=n(58),y=n(8),b=n(247),_=n(83),x=n(49),w=i("fetch"),A=i("Headers"),k=x("iterator"),T=u.set,S=u.getterFor("URLSearchParams"),E=u.getterFor("URLSearchParamsIterator"),C=/\+/g,M=Array(4),O=function(e){return M[e-1]||(M[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},D=function(e){var t=e.replace(C," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(O(n--),L);return t}},I=/[!'()~]|%20/g,R={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},P=function(e){return R[e]},N=function(e){return encodeURIComponent(e).replace(I,P)},z=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:D(r.shift()),value:D(r.join("="))}))},F=function(e){this.entries.length=0,z(this.entries,e)},B=function(e,t){if(e<t)throw TypeError("Not enough arguments")},j=c((function(e,t){T(this,{type:"URLSearchParamsIterator",iterator:b(S(e).entries),kind:t})}),"Iterator",(function(){var e=E(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),U=function(){h(this,U,"URLSearchParams");var e,t,n,r,i,o,a,s,l,c=arguments.length>0?arguments[0]:void 0,u=this,f=[];if(T(u,{type:"URLSearchParams",entries:f,updateURL:function(){},updateSearchParams:F}),void 0!==c)if(m(c))if("function"==typeof(e=_(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(o=(i=b(g(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");f.push({key:a.value+"",value:s.value+""})}else for(l in c)d(c,l)&&f.push({key:l,value:c[l]+""});else z(f,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},V=U.prototype;s(V,{append:function(e,t){B(arguments.length,2);var n=S(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=S(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){B(arguments.length,1);for(var t=S(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){B(arguments.length,1);for(var t=S(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){B(arguments.length,1);for(var t=S(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){B(arguments.length,1);for(var n,r=S(this),i=r.entries,o=!1,a=e+"",s=t+"",l=0;l<i.length;l++)(n=i[l]).key===a&&(o?i.splice(l--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=S(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=S(this).entries,r=f(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new j(this,"keys")},values:function(){return new j(this,"values")},entries:function(){return new j(this,"entries")}},{enumerable:!0}),a(V,k,V.entries),a(V,"toString",(function(){for(var e,t=S(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(N(e.key)+"="+N(e.value));return n.join("&")}),{enumerable:!0}),l(U,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:U}),o||"function"!=typeof w||"function"!=typeof A||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(m(t=arguments[1])&&(n=t.body,"URLSearchParams"===p(n)&&((r=t.headers?new A(t.headers):new A).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=v(t,{body:y(0,String(n)),headers:y(0,r)}))),i.push(t)),w.apply(this,i)}}),e.exports={URLSearchParams:U,getState:S}},function(e,t,n){var r=n(20),i=n(83);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},function(e,t,n){n(2)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})}])}(),function(e){"use strict";var t="URLSearchParams"in self,n="Symbol"in self&&"iterator"in Symbol,r="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in self,o="ArrayBuffer"in self;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var n;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&r&&(n=e)&&DataView.prototype.isPrototypeOf(n)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=f(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=l(e),t=c(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},h.prototype.delete=function(e){delete this.map[l(e)]},h.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},h.prototype.set=function(e,t){this.map[l(e)]=c(t)},h.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var n,r,i=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),v.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},m.call(y.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];_.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},e.DOMException=self.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(t,n){return new Promise((function(i,o){var a=new y(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new _(r,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&r&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}w.polyfill=!0,self.fetch||(self.fetch=w,self.Headers=h,self.Request=y,self.Response=_),e.Headers=h,e.Request=y,e.Response=_,e.fetch=w}({})},89118:()=>{var e,t,n,r,i;(function(){"use strict";var e=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function t(t){var n=e.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!n&&t}function n(e){var t=e.isConnected;if(void 0!==t)return t;for(;e&&!(e.__CE_isImportDocument||e instanceof Document);)e=e.parentNode||(window.ShadowRoot&&e instanceof ShadowRoot?e.host:void 0);return!(!e||!(e.__CE_isImportDocument||e instanceof Document))}function r(e,t){for(;t&&t!==e&&!t.nextSibling;)t=t.parentNode;return t&&t!==e?t.nextSibling:null}function i(e,t,n){n=void 0===n?new Set:n;for(var o=e;o;){if(o.nodeType===Node.ELEMENT_NODE){var a=o;t(a);var s=a.localName;if("link"===s&&"import"===a.getAttribute("rel")){if((o=a.import)instanceof Node&&!n.has(o))for(n.add(o),o=o.firstChild;o;o=o.nextSibling)i(o,t,n);o=r(e,a);continue}if("template"===s){o=r(e,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)i(a,t,n)}o=o.firstChild?o.firstChild:r(e,o)}}function o(e,t,n){e[t]=n}function a(){this.a=new Map,this.g=new Map,this.c=[],this.f=[],this.b=!1}function s(e,t){e.b&&i(t,(function(t){return l(e,t)}))}function l(e,t){if(e.b&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.c.length;n++)e.c[n](t);for(n=0;n<e.f.length;n++)e.f[n](t)}}function c(e,t){var n=[];for(i(t,(function(e){return n.push(e)})),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state?e.connectedCallback(r):d(e,r)}}function u(e,t){var n=[];for(i(t,(function(e){return n.push(e)})),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state&&e.disconnectedCallback(r)}}function h(e,t,n){var r=(n=void 0===n?{}:n).u||new Set,o=n.i||function(t){return d(e,t)},a=[];if(i(t,(function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var n=t.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:t.addEventListener("load",(function(){var n=t.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set(r);i.delete(n),h(e,n,{u:i,i:o})}}))}else a.push(t)}),r),e.b)for(t=0;t<a.length;t++)l(e,a[t]);for(t=0;t<a.length;t++)o(a[t])}function d(e,t){if(void 0===t.__CE_state){var r=t.ownerDocument;if((r.defaultView||r.__CE_isImportDocument&&r.__CE_hasRegistry)&&(r=e.a.get(t.localName))){r.constructionStack.push(t);var i=r.constructorFunction;try{try{if(new i!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{r.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=r,r.attributeChangedCallback)for(r=r.observedAttributes,i=0;i<r.length;i++){var o=r[i],a=t.getAttribute(o);null!==a&&e.attributeChangedCallback(t,o,null,a,null)}n(t)&&e.connectedCallback(t)}}}function f(e){var t=document;this.c=e,this.a=t,this.b=void 0,h(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function p(e){e.b&&e.b.disconnect()}function g(){var e=this;this.b=this.a=void 0,this.c=new Promise((function(t){e.b=t,e.a&&t(e.a)}))}function m(e){if(e.a)throw Error("Already resolved.");e.a=void 0,e.b&&e.b(void 0)}function v(e){this.c=!1,this.a=e,this.j=new Map,this.f=function(e){return e()},this.b=!1,this.g=[],this.o=new f(e)}a.prototype.connectedCallback=function(e){var t=e.__CE_definition;t.connectedCallback&&t.connectedCallback.call(e)},a.prototype.disconnectedCallback=function(e){var t=e.__CE_definition;t.disconnectedCallback&&t.disconnectedCallback.call(e)},a.prototype.attributeChangedCallback=function(e,t,n,r,i){var o=e.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(t)&&o.attributeChangedCallback.call(e,t,n,r,i)},f.prototype.f=function(e){var t=this.a.readyState;for("interactive"!==t&&"complete"!==t||p(this),t=0;t<e.length;t++)for(var n=e[t].addedNodes,r=0;r<n.length;r++)h(this.c,n[r])},v.prototype.l=function(e,n){var r=this;if(!(n instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!t(e))throw new SyntaxError("The element name '"+e+"' is not valid.");if(this.a.a.get(e))throw Error("A custom element with name '"+e+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var i=function(e){var t=o[e];if(void 0!==t&&!(t instanceof Function))throw Error("The '"+e+"' callback must be a function.");return t},o=n.prototype;if(!(o instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var a=i("connectedCallback"),s=i("disconnectedCallback"),l=i("adoptedCallback"),c=i("attributeChangedCallback"),u=n.observedAttributes||[]}catch(e){return}finally{this.c=!1}n={localName:e,constructorFunction:n,connectedCallback:a,disconnectedCallback:s,adoptedCallback:l,attributeChangedCallback:c,observedAttributes:u,constructionStack:[]},function(e,t,n){e.a.set(t,n),e.g.set(n.constructorFunction,n)}(this.a,e,n),this.g.push(n),this.b||(this.b=!0,this.f((function(){return function(e){if(!1!==e.b){e.b=!1;for(var t=e.g,n=[],r=new Map,i=0;i<t.length;i++)r.set(t[i].localName,[]);for(h(e.a,document,{i:function(t){if(void 0===t.__CE_state){var i=t.localName,o=r.get(i);o?o.push(t):e.a.a.get(i)&&n.push(t)}}}),i=0;i<n.length;i++)d(e.a,n[i]);for(;0<t.length;){var o=t.shift();i=o.localName,o=r.get(o.localName);for(var a=0;a<o.length;a++)d(e.a,o[a]);(i=e.j.get(i))&&m(i)}}}(r)})))},v.prototype.i=function(e){h(this.a,e)},v.prototype.get=function(e){if(e=this.a.a.get(e))return e.constructorFunction},v.prototype.m=function(e){if(!t(e))return Promise.reject(new SyntaxError("'"+e+"' is not a valid custom element name."));var n=this.j.get(e);return n||(n=new g,this.j.set(e,n),this.a.a.get(e)&&!this.g.some((function(t){return t.localName===e}))&&m(n)),n.c},v.prototype.s=function(e){p(this.o);var t=this.f;this.f=function(n){return e((function(){return t(n)}))}},window.CustomElementRegistry=v,v.prototype.define=v.prototype.l,v.prototype.upgrade=v.prototype.i,v.prototype.get=v.prototype.get,v.prototype.whenDefined=v.prototype.m,v.prototype.polyfillWrapFlushCallback=v.prototype.s;var y=window.Document.prototype.createElement,b=window.Document.prototype.createElementNS,_=window.Document.prototype.importNode,x=window.Document.prototype.prepend,w=window.Document.prototype.append,A=window.DocumentFragment.prototype.prepend,k=window.DocumentFragment.prototype.append,T=window.Node.prototype.cloneNode,S=window.Node.prototype.appendChild,E=window.Node.prototype.insertBefore,C=window.Node.prototype.removeChild,M=window.Node.prototype.replaceChild,O=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),L=window.Element.prototype.attachShadow,D=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),I=window.Element.prototype.getAttribute,R=window.Element.prototype.setAttribute,P=window.Element.prototype.removeAttribute,N=window.Element.prototype.getAttributeNS,z=window.Element.prototype.setAttributeNS,F=window.Element.prototype.removeAttributeNS,B=window.Element.prototype.insertAdjacentElement,j=window.Element.prototype.insertAdjacentHTML,U=window.Element.prototype.prepend,V=window.Element.prototype.append,q=window.Element.prototype.before,H=window.Element.prototype.after,$=window.Element.prototype.replaceWith,W=window.Element.prototype.remove,G=window.HTMLElement,Y=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),X=window.HTMLElement.prototype.insertAdjacentElement,Z=window.HTMLElement.prototype.insertAdjacentHTML,K=new function(){};function J(e,t,r){function i(t){return function(r){for(var i=[],o=0;o<arguments.length;++o)i[o]=arguments[o];o=[];for(var a=[],s=0;s<i.length;s++){var l=i[s];if(l instanceof Element&&n(l)&&a.push(l),l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)o.push(l);else o.push(l)}for(t.apply(this,i),i=0;i<a.length;i++)u(e,a[i]);if(n(this))for(i=0;i<o.length;i++)(a=o[i])instanceof Element&&c(e,a)}}void 0!==r.h&&(t.prepend=i(r.h)),void 0!==r.append&&(t.append=i(r.append))}var Q,ee=window.customElements;if(!ee||ee.forcePolyfill||"function"!=typeof ee.define||"function"!=typeof ee.get){var te=new a;Q=te,window.HTMLElement=function(){function e(){var e=this.constructor,t=Q.g.get(e);if(!t)throw Error("The custom element being constructed was not registered with `customElements`.");var n=t.constructionStack;if(0===n.length)return n=y.call(document,t.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=t,l(Q,n),n;var r=n[t=n.length-1];if(r===K)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[t]=K,Object.setPrototypeOf(r,e.prototype),l(Q,r),r}return e.prototype=G.prototype,Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}(),function(){var e=te;o(Document.prototype,"createElement",(function(t){if(this.__CE_hasRegistry){var n=e.a.get(t);if(n)return new n.constructorFunction}return t=y.call(this,t),l(e,t),t})),o(Document.prototype,"importNode",(function(t,n){return t=_.call(this,t,!!n),this.__CE_hasRegistry?h(e,t):s(e,t),t})),o(Document.prototype,"createElementNS",(function(t,n){if(this.__CE_hasRegistry&&(null===t||"path_to_url"===t)){var r=e.a.get(n);if(r)return new r.constructorFunction}return t=b.call(this,t,n),l(e,t),t})),J(e,Document.prototype,{h:x,append:w})}(),J(te,DocumentFragment.prototype,{h:A,append:k}),function(){function e(e,r){Object.defineProperty(e,"textContent",{enumerable:r.enumerable,configurable:!0,get:r.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)r.set.call(this,e);else{var i=void 0;if(this.firstChild){var o=this.childNodes,a=o.length;if(0<a&&n(this)){i=Array(a);for(var s=0;s<a;s++)i[s]=o[s]}}if(r.set.call(this,e),i)for(e=0;e<i.length;e++)u(t,i[e])}}})}var t=te;o(Node.prototype,"insertBefore",(function(e,r){if(e instanceof DocumentFragment){var i=Array.prototype.slice.apply(e.childNodes);if(e=E.call(this,e,r),n(this))for(r=0;r<i.length;r++)c(t,i[r]);return e}return i=n(e),r=E.call(this,e,r),i&&u(t,e),n(this)&&c(t,e),r})),o(Node.prototype,"appendChild",(function(e){if(e instanceof DocumentFragment){var r=Array.prototype.slice.apply(e.childNodes);if(e=S.call(this,e),n(this))for(var i=0;i<r.length;i++)c(t,r[i]);return e}return r=n(e),i=S.call(this,e),r&&u(t,e),n(this)&&c(t,e),i})),o(Node.prototype,"cloneNode",(function(e){return e=T.call(this,!!e),this.ownerDocument.__CE_hasRegistry?h(t,e):s(t,e),e})),o(Node.prototype,"removeChild",(function(e){var r=n(e),i=C.call(this,e);return r&&u(t,e),i})),o(Node.prototype,"replaceChild",(function(e,r){if(e instanceof DocumentFragment){var i=Array.prototype.slice.apply(e.childNodes);if(e=M.call(this,e,r),n(this))for(u(t,r),r=0;r<i.length;r++)c(t,i[r]);return e}i=n(e);var o=M.call(this,e,r),a=n(this);return a&&u(t,r),i&&u(t,e),a&&c(t,e),o})),O&&O.get?e(Node.prototype,O):function(e,t){e.b=!0,e.c.push(t)}(t,(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var e=[],t=0;t<this.childNodes.length;t++){var n=this.childNodes[t];n.nodeType!==Node.COMMENT_NODE&&e.push(n.textContent)}return e.join("")},set:function(e){for(;this.firstChild;)C.call(this,this.firstChild);null!=e&&""!==e&&S.call(this,document.createTextNode(e))}})}))}(),function(){function e(e,t){Object.defineProperty(e,"innerHTML",{enumerable:t.enumerable,configurable:!0,get:t.get,set:function(e){var r=this,o=void 0;if(n(this)&&(o=[],i(this,(function(e){e!==r&&o.push(e)}))),t.set.call(this,e),o)for(var l=0;l<o.length;l++){var c=o[l];1===c.__CE_state&&a.disconnectedCallback(c)}return this.ownerDocument.__CE_hasRegistry?h(a,this):s(a,this),e}})}function t(e,t){o(e,"insertAdjacentElement",(function(e,r){var i=n(r);return e=t.call(this,e,r),i&&u(a,r),n(e)&&c(a,r),e}))}function r(e,t){function n(e,t){for(var n=[];e!==t;e=e.nextSibling)n.push(e);for(t=0;t<n.length;t++)h(a,n[t])}o(e,"insertAdjacentHTML",(function(e,r){if("beforebegin"===(e=e.toLowerCase())){var i=this.previousSibling;t.call(this,e,r),n(i||this.parentNode.firstChild,this)}else if("afterbegin"===e)i=this.firstChild,t.call(this,e,r),n(this.firstChild,i);else if("beforeend"===e)i=this.lastChild,t.call(this,e,r),n(i||this.firstChild,null);else{if("afterend"!==e)throw new SyntaxError("The value provided ("+String(e)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");i=this.nextSibling,t.call(this,e,r),n(this.nextSibling,i)}}))}var a=te;L&&o(Element.prototype,"attachShadow",(function(e){e=L.call(this,e);var t=a;if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.c.length;n++)t.c[n](e)}return this.__CE_shadowRoot=e})),D&&D.get?e(Element.prototype,D):Y&&Y.get?e(HTMLElement.prototype,Y):function(e,t){e.b=!0,e.f.push(t)}(a,(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return T.call(this,!0).innerHTML},set:function(e){var t="template"===this.localName,n=t?this.content:this,r=b.call(document,this.namespaceURI,this.localName);for(r.innerHTML=e;0<n.childNodes.length;)C.call(n,n.childNodes[0]);for(e=t?r.content:r;0<e.childNodes.length;)S.call(n,e.childNodes[0])}})})),o(Element.prototype,"setAttribute",(function(e,t){if(1!==this.__CE_state)return R.call(this,e,t);var n=I.call(this,e);R.call(this,e,t),t=I.call(this,e),a.attributeChangedCallback(this,e,n,t,null)})),o(Element.prototype,"setAttributeNS",(function(e,t,n){if(1!==this.__CE_state)return z.call(this,e,t,n);var r=N.call(this,e,t);z.call(this,e,t,n),n=N.call(this,e,t),a.attributeChangedCallback(this,t,r,n,e)})),o(Element.prototype,"removeAttribute",(function(e){if(1!==this.__CE_state)return P.call(this,e);var t=I.call(this,e);P.call(this,e),null!==t&&a.attributeChangedCallback(this,e,t,null,null)})),o(Element.prototype,"removeAttributeNS",(function(e,t){if(1!==this.__CE_state)return F.call(this,e,t);var n=N.call(this,e,t);F.call(this,e,t);var r=N.call(this,e,t);n!==r&&a.attributeChangedCallback(this,t,n,r,e)})),X?t(HTMLElement.prototype,X):B?t(Element.prototype,B):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),Z?r(HTMLElement.prototype,Z):j?r(Element.prototype,j):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),J(a,Element.prototype,{h:U,append:V}),function(e){function t(t){return function(r){for(var i=[],o=0;o<arguments.length;++o)i[o]=arguments[o];o=[];for(var a=[],s=0;s<i.length;s++){var l=i[s];if(l instanceof Element&&n(l)&&a.push(l),l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)o.push(l);else o.push(l)}for(t.apply(this,i),i=0;i<a.length;i++)u(e,a[i]);if(n(this))for(i=0;i<o.length;i++)(a=o[i])instanceof Element&&c(e,a)}}var r=Element.prototype;void 0!==q&&(r.before=t(q)),void 0!==q&&(r.after=t(H)),void 0!==$&&o(r,"replaceWith",(function(t){for(var r=[],i=0;i<arguments.length;++i)r[i]=arguments[i];i=[];for(var o=[],a=0;a<r.length;a++){var s=r[a];if(s instanceof Element&&n(s)&&o.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)i.push(s);else i.push(s)}for(a=n(this),$.apply(this,r),r=0;r<o.length;r++)u(e,o[r]);if(a)for(u(e,this),r=0;r<i.length;r++)(o=i[r])instanceof Element&&c(e,o)})),void 0!==W&&o(r,"remove",(function(){var t=n(this);W.call(this),t&&u(e,this)}))}(a)}(),document.__CE_hasRegistry=!0;var ne=new v(te);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:ne})}}).call(self),"string"!=typeof document.baseURI&&Object.defineProperty(Document.prototype,"baseURI",{enumerable:!0,configurable:!0,get:function(){var e=document.querySelector("base");return e&&e.href?e.href:document.URL}}),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n=Event.prototype,r=document,i=window,n.composedPath||(n.composedPath=function(){if(this.path)return this.path;var e=this.target;for(this.path=[];null!==e.parentNode;)this.path.push(e),e=e.parentNode;return this.path.push(r,i),this.path}),"function"!=typeof(e=window.Element.prototype).matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){e=(this.document||this.ownerDocument).querySelectorAll(e);for(var t=0;e[t]&&e[t]!==this;)++t;return!!e[t]}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null}),function(e){function t(e){return(e=n(e))&&11===e.nodeType?t(e.host):e}function n(e){return e&&e.parentNode?n(e.parentNode):e}"function"!=typeof e.getRootNode&&(e.getRootNode=function(e){return e&&e.composed?t(this):n(this)})}(Element.prototype),function(e){"isConnected"in e||Object.defineProperty(e,"isConnected",{configurable:!0,enumerable:!0,get:function(){var e=this.getRootNode({composed:!0});return e&&9===e.nodeType}})}(Element.prototype),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})),"classList"in(t=Element.prototype)||Object.defineProperty(t,"classList",{get:function(){var e=this,t=(e.getAttribute("class")||"").replace(/^\s+|\s$/g,"").split(/\s+/g);function n(){t.length>0?e.setAttribute("class",t.join(" ")):e.removeAttribute("class")}return""===t[0]&&t.splice(0,1),t.toggle=function(e,r){void 0!==r?r?t.add(e):t.remove(e):-1!==t.indexOf(e)?t.splice(t.indexOf(e),1):t.push(e),n()},t.add=function(){for(var e=[].slice.call(arguments),r=0,i=e.length;r<i;r++)-1===t.indexOf(e[r])&&t.push(e[r]);n()},t.remove=function(){for(var e=[].slice.call(arguments),r=0,i=e.length;r<i;r++)-1!==t.indexOf(e[r])&&t.splice(t.indexOf(e[r]),1);n()},t.item=function(e){return t[e]},t.contains=function(e){return-1!==t.indexOf(e)},t.replace=function(e,r){-1!==t.indexOf(e)&&t.splice(t.indexOf(e),1,r),n()},t.value=e.getAttribute("class")||"",t}}),function(e){try{document.body.classList.add()}catch(r){var t=e.add,n=e.remove;e.add=function(){for(var e=0;e<arguments.length;e++)t.call(this,arguments[e])},e.remove=function(){for(var e=0;e<arguments.length;e++)n.call(this,arguments[e])}}}(DOMTokenList.prototype)},47218:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});var r=n(14633),i=function(e,t){return"undefined"==typeof window?Promise.resolve():(r.C&&r.C.supports&&r.C.supports("color","var(--c)")?(0,r.a)():new Promise((e=>{e(n(59889))})).then((function(){return(r.p.$cssShim$=r.w.__cssshim)?r.p.$cssShim$.i():0}))).then((function(){return(0,r.b)([["revogr-clipboard",[[0,"revogr-clipboard",{doCopy:[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]]],["revogr-filter-panel",[[0,"revogr-filter-panel",{uuid:[1537],filterTypes:[16],filterNames:[16],filterEntities:[16],changes:[32],show:[64],getChanges:[64]},[[5,"mousedown","onMouseDown"]]]]],["revo-grid_11",[[0,"revo-grid",{rowHeaders:[4,"row-headers"],frameSize:[2,"frame-size"],rowSize:[2,"row-size"],colSize:[2,"col-size"],range:[4],readonly:[4],resize:[4],canFocus:[4,"can-focus"],useClipboard:[4,"use-clipboard"],columns:[16],source:[16],pinnedTopSource:[16],pinnedBottomSource:[16],rowDefinitions:[16],editors:[16],plugins:[16],columnTypes:[16],theme:[1537],rowClass:[513,"row-class"],autoSizeColumn:[4,"auto-size-column"],filter:[4],trimmedRows:[16],exporting:[4],grouping:[16],stretch:[8],extraElements:[32],refresh:[64],scrollToRow:[64],scrollToColumnIndex:[64],scrollToColumnProp:[64],updateColumns:[64],addTrimmed:[64],scrollToCoordinate:[64],setCellEdit:[64],registerVNode:[64],getSource:[64],getVisibleSource:[64],getSourceStore:[64],getColumnStore:[64],updateColumnSorting:[64],clearSorting:[64],getColumns:[64],clearFocus:[64],getPlugins:[64],getFocused:[64]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]],[0,"revogr-row-headers",{height:[2],dataPorts:[16],headerProp:[16],uiid:[1],resize:[4],rowHeaderColumn:[16]}],[4,"revogr-overlay-selection",{readonly:[4],range:[4],canDrag:[4,"can-drag"],useClipboard:[4,"use-clipboard"],selectionStore:[16],dimensionRow:[16],dimensionCol:[16],dataStore:[16],colData:[16],lastCell:[16],editors:[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]],[0,"revogr-focus",{selectionStore:[16],dimensionRow:[16],dimensionCol:[16]}],[0,"revogr-scroll-virtual",{dimension:[1],viewportStore:[16],dimensionStore:[16],setScroll:[64],changeScroll:[64]}],[0,"revogr-temp-range",{selectionStore:[16],dimensionRow:[16],dimensionCol:[16]}],[0,"revogr-data",{readonly:[4],range:[4],canDrag:[4,"can-drag"],rowClass:[1,"row-class"],rowSelectionStore:[16],viewportRow:[16],viewportCol:[16],dimensionRow:[16],colData:[16],dataStore:[16]}],[0,"revogr-edit",{editCell:[16],column:[16],editor:[16]}],[0,"revogr-header",{viewportCol:[16],dimensionCol:[16],selectionStore:[16],parent:[1],groups:[16],groupingDepth:[2,"grouping-depth"],canResize:[4,"can-resize"],colData:[16],columnFilter:[4,"column-filter"]}],[0,"revogr-order-editor",{parent:[16],dimensionRow:[16],dimensionCol:[16],dataStore:[16],dragStart:[64],endOrder:[64],clearOrder:[64]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]],[4,"revogr-viewport-scroll",{contentWidth:[2,"content-width"],contentHeight:[2,"content-height"],setScroll:[64],changeScroll:[64]}]]]],t)}))};!function(){if("undefined"!=typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}()},64615:function(e,t,n){"use strict";var r,i;e=n.nmd(e),r=function(){var r=function(e,t,n,i){if(t=t||[],"function"!=typeof importScripts&&r.webworker){var o=r.lastid++;return r.buffer[o]=n,void r.webworker.postMessage({id:o,sql:e,params:t})}return 0===arguments.length?new z.Select({columns:[new z.Column({columnid:"*"})],from:[new z.ParamValue({param:0})]}):1===arguments.length&&e.constructor===Array?r.promise(e):("function"==typeof t&&(i=n,n=t,t=[]),"object"!=typeof t&&(t=[t]),"string"==typeof e&&"#"===e[0]&&"object"==typeof document?e=document.querySelector(e).textContent:"object"==typeof e&&e instanceof HTMLElement?e=e.textContent:"function"==typeof e&&(e=e.toString(),e=(/\/\*([\S\s]+)\*\//m.exec(e)||["","Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function."])[1]),r.exec(e,t,n,i))};function o(){return null}r.version="1.7.3-develop-0be167bcundefined",r.debug=void 0;var a=function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[2,13],n=[1,104],i=[1,102],o=[1,103],a=[1,6],s=[1,42],l=[1,79],c=[1,76],u=[1,94],h=[1,93],d=[1,69],f=[1,101],p=[1,85],m=[1,64],v=[1,71],y=[1,84],b=[1,66],_=[1,70],x=[1,68],w=[1,61],A=[1,74],k=[1,62],T=[1,67],S=[1,83],E=[1,77],C=[1,86],M=[1,87],O=[1,81],L=[1,82],D=[1,80],I=[1,88],R=[1,89],P=[1,90],N=[1,91],z=[1,92],F=[1,98],B=[1,65],j=[1,78],U=[1,72],V=[1,96],q=[1,97],H=[1,63],$=[1,73],W=[1,108],G=[1,107],Y=[10,308,604,765],X=[10,308,312,604,765],Z=[1,115],K=[1,116],J=[1,117],Q=[1,118],ee=[1,119],te=[130,355,412],ne=[1,127],re=[1,126],ie=[1,134],oe=[1,164],ae=[1,175],se=[1,178],le=[1,173],ce=[1,181],ue=[1,185],he=[1,160],de=[1,182],fe=[1,169],pe=[1,171],ge=[1,174],me=[1,183],ve=[1,199],ye=[1,200],be=[1,166],_e=[1,193],xe=[1,188],we=[1,189],Ae=[1,194],ke=[1,195],Te=[1,196],Se=[1,197],Ee=[1,198],Ce=[1,201],Me=[1,202],Oe=[1,176],Le=[1,177],De=[1,179],Ie=[1,180],Re=[1,186],Pe=[1,192],Ne=[1,184],ze=[1,187],Fe=[1,172],Be=[1,170],je=[1,191],Ue=[1,203],Ve=[2,4,5],qe=[2,474],He=[1,206],$e=[1,211],We=[1,220],Ge=[1,216],Ye=[10,72,78,93,98,118,128,162,168,169,183,198,232,249,251,308,312,604,765],Xe=[2,4,5,10,72,76,77,78,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,183,185,187,198,244,245,284,285,286,287,288,289,290,308,312,422,426,604,765],Ze=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Ke=[1,249],Je=[1,256],Qe=[1,265],et=[1,270],tt=[1,269],nt=[2,4,5,10,72,77,78,93,98,107,118,128,131,132,137,143,145,149,152,154,156,162,168,169,179,180,181,183,198,232,244,245,249,251,269,270,274,275,277,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,300,301,304,305,308,312,314,319,422,426,604,765],rt=[2,162],it=[1,281],ot=[10,74,78,308,312,507,604,765],at=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,193,198,206,208,222,223,224,225,226,227,228,229,230,231,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,304,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,346,358,370,371,372,375,376,388,391,398,402,403,404,405,406,407,408,410,411,419,420,422,426,428,435,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,516,517,518,519,604,765],st=[2,4,5,10,53,72,89,124,146,156,189,270,271,292,308,337,340,341,398,402,403,406,408,410,411,419,420,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,519,604,765],lt=[1,562],ct=[1,564],ut=[2,506],ht=[1,569],dt=[1,580],ft=[1,583],pt=[1,584],gt=[10,78,89,132,137,146,189,298,308,312,472,604,765],mt=[10,74,308,312,604,765],vt=[2,570],yt=[1,602],bt=[2,4,5,156],_t=[1,640],xt=[1,612],wt=[1,646],At=[1,647],kt=[1,620],Tt=[1,631],St=[1,618],Et=[1,626],Ct=[1,619],Mt=[1,627],Ot=[1,629],Lt=[1,621],Dt=[1,622],It=[1,641],Rt=[1,638],Pt=[1,639],Nt=[1,615],zt=[1,617],Ft=[1,609],Bt=[1,610],jt=[1,611],Ut=[1,613],Vt=[1,614],qt=[1,616],Ht=[1,623],$t=[1,624],Wt=[1,628],Gt=[1,630],Yt=[1,632],Xt=[1,633],Zt=[1,634],Kt=[1,635],Jt=[1,636],Qt=[1,642],en=[1,643],tn=[1,644],nn=[1,645],rn=[2,290],on=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,231,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],an=[2,362],sn=[1,668],ln=[1,678],cn=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,231,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],un=[1,694],hn=[1,703],dn=[1,702],fn=[2,4,5,10,72,74,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],pn=[10,72,74,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],gn=[2,202],mn=[1,725],vn=[10,72,78,93,98,118,128,162,168,169,183,232,249,251,308,312,604,765],yn=[2,163],bn=[1,728],_n=[2,4,5,112],xn=[1,741],wn=[1,760],An=[1,740],kn=[1,739],Tn=[1,734],Sn=[1,735],En=[1,737],Cn=[1,738],Mn=[1,742],On=[1,743],Ln=[1,744],Dn=[1,745],In=[1,746],Rn=[1,747],Pn=[1,748],Nn=[1,749],zn=[1,750],Fn=[1,751],Bn=[1,752],jn=[1,753],Un=[1,754],Vn=[1,755],qn=[1,756],Hn=[1,757],$n=[1,759],Wn=[1,761],Gn=[1,762],Yn=[1,763],Xn=[1,764],Zn=[1,765],Kn=[1,766],Jn=[1,767],Qn=[1,770],er=[1,771],tr=[1,772],nr=[1,773],rr=[1,774],ir=[1,775],or=[1,776],ar=[1,777],sr=[1,778],lr=[1,779],cr=[1,780],ur=[1,781],hr=[74,89,189],dr=[10,74,78,154,187,230,299,308,312,345,358,370,371,375,376,604,765],fr=[1,798],pr=[10,74,78,302,308,312,604,765],gr=[1,799],mr=[1,805],vr=[1,806],yr=[1,810],br=[10,74,78,308,312,604,765],_r=[2,4,5,77,131,132,137,143,145,149,152,154,156,179,180,181,244,245,269,270,274,275,277,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,300,301,304,305,314,319,422,426],xr=[10,72,78,93,98,107,118,128,162,168,169,183,198,232,249,251,308,312,604,765],wr=[2,4,5,10,72,77,78,93,98,107,118,128,131,132,137,143,145,149,152,154,156,162,164,168,169,179,180,181,183,185,187,195,198,232,244,245,249,251,269,270,274,275,277,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,300,301,304,305,308,312,314,319,422,426,604,765],Ar=[2,4,5,132,298],kr=[1,844],Tr=[10,74,76,78,308,312,604,765],Sr=[2,741],Er=[10,74,76,78,132,139,141,145,152,308,312,422,426,604,765],Cr=[2,1164],Mr=[10,74,76,78,139,141,145,152,308,312,422,426,604,765],Or=[10,74,76,78,139,141,145,308,312,422,426,604,765],Lr=[10,74,78,139,141,308,312,604,765],Dr=[10,78,89,132,146,189,298,308,312,472,604,765],Ir=[337,340,341],Rr=[2,767],Pr=[1,869],Nr=[1,870],zr=[1,871],Fr=[1,872],Br=[1,881],jr=[1,880],Ur=[164,166,336],Vr=[2,447],qr=[1,936],Hr=[2,4,5,77,131,156,292,293,294,295],$r=[1,951],Wr=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,124,128,129,130,131,132,134,135,137,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,316,317,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Gr=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Yr=[2,378],Xr=[1,958],Zr=[308,310,312],Kr=[74,302],Jr=[74,302,428],Qr=[1,965],ei=[2,4,5,10,53,72,74,76,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],ti=[74,428],ni=[1,978],ri=[1,977],ii=[1,984],oi=[10,72,78,93,98,118,128,162,168,169,232,249,251,308,312,604,765],ai=[1,1010],si=[10,72,78,308,312,604,765],li=[1,1016],ci=[1,1017],ui=[1,1018],hi=[2,4,5,10,72,74,76,77,78,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,198,244,245,284,285,286,287,288,289,290,308,312,422,426,604,765],di=[1,1068],fi=[1,1067],pi=[1,1081],gi=[1,1080],mi=[1,1088],vi=[10,72,74,78,93,98,107,118,128,162,168,169,183,198,232,249,251,308,312,604,765],yi=[1,1119],bi=[10,78,89,146,189,308,312,472,604,765],_i=[1,1139],xi=[1,1138],wi=[1,1137],Ai=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],ki=[1,1153],Ti=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,316,317,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Si=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,317,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Ei=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,124,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,316,317,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Ci=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,124,128,129,130,131,132,134,135,137,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,316,317,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Mi=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,316,322,323,324,325,326,327,328,332,333,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Oi=[2,409],Li=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,107,118,122,128,129,130,131,132,134,135,137,143,145,146,148,149,150,152,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,316,332,333,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Di=[2,288],Ii=[2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],Ri=[10,78,308,312,604,765],Pi=[1,1189],Ni=[10,77,78,143,145,152,181,304,308,312,422,426,604,765],zi=[10,74,78,308,310,312,466,604,765],Fi=[1,1200],Bi=[10,72,78,118,128,162,168,169,232,249,251,308,312,604,765],ji=[10,72,74,78,93,98,118,128,162,168,169,183,198,232,249,251,308,312,604,765],Ui=[2,4,5,72,76,77,78,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,185,187,244,245,284,285,286,287,288,289,290,422,426],Vi=[2,4,5,72,74,76,77,78,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,185,187,244,245,284,285,286,287,288,289,290,422,426],qi=[2,1088],Hi=[2,4,5,72,74,76,77,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,185,187,244,245,284,285,286,287,288,289,290,422,426],$i=[1,1252],Wi=[10,74,78,128,308,310,312,466,604,765],Gi=[115,116,124],Yi=[2,587],Xi=[1,1280],Zi=[76,139],Ki=[2,727],Ji=[1,1297],Qi=[1,1298],eo=[2,4,5,10,53,72,76,89,124,146,156,189,230,270,271,292,308,312,337,340,341,398,402,403,406,408,410,411,419,420,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,519,604,765],to=[2,333],no=[1,1322],ro=[1,1336],io=[1,1338],oo=[2,490],ao=[74,78],so=[10,308,310,312,466,604,765],lo=[10,72,78,118,162,168,169,232,249,251,308,312,604,765],co=[1,1354],uo=[1,1358],ho=[1,1359],fo=[1,1361],po=[1,1362],go=[1,1363],mo=[1,1364],vo=[1,1365],yo=[1,1366],bo=[1,1367],_o=[1,1368],xo=[10,72,74,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,232,249,251,308,312,604,765],wo=[1,1393],Ao=[10,72,78,118,162,168,169,249,251,308,312,604,765],ko=[10,72,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,232,249,251,308,312,604,765],To=[1,1490],So=[1,1492],Eo=[2,4,5,77,143,145,152,156,181,292,293,294,295,304,422,426],Co=[1,1506],Mo=[10,72,74,78,162,168,169,249,251,308,312,604,765],Oo=[1,1524],Lo=[1,1526],Do=[1,1527],Io=[1,1523],Ro=[1,1522],Po=[1,1521],No=[1,1528],zo=[1,1518],Fo=[1,1519],Bo=[1,1520],jo=[1,1545],Uo=[2,4,5,10,53,72,89,124,146,156,189,270,271,292,308,312,337,340,341,398,402,403,406,408,410,411,419,420,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,519,604,765],Vo=[1,1556],qo=[1,1564],Ho=[1,1563],$o=[10,72,78,162,168,169,249,251,308,312,604,765],Wo=[10,72,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],Go=[2,4,5,10,72,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],Yo=[1,1623],Xo=[1,1625],Zo=[1,1622],Ko=[1,1624],Jo=[187,193,370,371,372,375],Qo=[2,518],ea=[1,1630],ta=[1,1649],na=[10,72,78,162,168,169,308,312,604,765],ra=[1,1659],ia=[1,1660],oa=[1,1661],aa=[1,1682],sa=[4,10,247,308,312,345,358,604,765],la=[1,1730],ca=[10,72,74,78,118,162,168,169,239,249,251,308,312,604,765],ua=[2,4,5,77],ha=[1,1824],da=[1,1836],fa=[1,1855],pa=[10,72,78,162,168,169,308,312,417,604,765],ga=[10,74,78,230,308,312,604,765],ma=(e={trace:function(){},yy:{},symbols_:{error:2,Literal:3,LITERAL:4,BRALITERAL:5,NonReserved:6,LiteralWithSpaces:7,main:8,Statements:9,EOF:10,Statements_group0:11,AStatement:12,ExplainStatement:13,EXPLAIN:14,QUERY:15,PLAN:16,Statement:17,AlterTable:18,AttachDatabase:19,Call:20,CreateDatabase:21,CreateIndex:22,CreateGraph:23,CreateTable:24,CreateView:25,CreateEdge:26,CreateVertex:27,Declare:28,Delete:29,DetachDatabase:30,DropDatabase:31,DropIndex:32,DropTable:33,DropView:34,If:35,Insert:36,Merge:37,Reindex:38,RenameTable:39,Select:40,ShowCreateTable:41,ShowColumns:42,ShowDatabases:43,ShowIndex:44,ShowTables:45,TruncateTable:46,WithSelect:47,CreateTrigger:48,DropTrigger:49,BeginTransaction:50,CommitTransaction:51,RollbackTransaction:52,EndTransaction:53,UseDatabase:54,Update:55,JavaScript:56,Source:57,Assert:58,While:59,Continue:60,Break:61,BeginEnd:62,Print:63,Require:64,SetVariable:65,ExpressionStatement:66,AddRule:67,Query:68,Echo:69,CreateFunction:70,CreateAggregate:71,WITH:72,WithTablesList:73,COMMA:74,WithTable:75,AS:76,LPAR:77,RPAR:78,SelectClause:79,Select_option0:80,IntoClause:81,FromClause:82,Select_option1:83,WhereClause:84,GroupClause:85,OrderClause:86,LimitClause:87,UnionClause:88,SEARCH:89,Select_repetition0:90,Select_option2:91,PivotClause:92,PIVOT:93,Expression:94,FOR:95,PivotClause_option0:96,PivotClause_option1:97,UNPIVOT:98,IN:99,ColumnsList:100,PivotClause_option2:101,PivotClause2:102,AsList:103,AsLiteral:104,AsPart:105,RemoveClause:106,REMOVE:107,RemoveClause_option0:108,RemoveColumnsList:109,RemoveColumn:110,Column:111,LIKE:112,StringValue:113,ArrowDot:114,ARROW:115,DOT:116,SearchSelector:117,ORDER:118,BY:119,OrderExpressionsList:120,SearchSelector_option0:121,DOTDOT:122,CARET:123,EQ:124,SearchSelector_repetition_plus0:125,SearchSelector_repetition_plus1:126,SearchSelector_option1:127,WHERE:128,OF:129,CLASS:130,NUMBER:131,STRING:132,SLASH:133,VERTEX:134,EDGE:135,EXCLAMATION:136,SHARP:137,MODULO:138,GT:139,LT:140,GTGT:141,LTLT:142,DOLLAR:143,Json:144,AT:145,SET:146,SetColumnsList:147,TO:148,VALUE:149,ROW:150,ExprList:151,COLON:152,PlusStar:153,NOT:154,SearchSelector_repetition2:155,IF:156,SearchSelector_repetition3:157,Aggregator:158,SearchSelector_repetition4:159,SearchSelector_group0:160,SearchSelector_repetition5:161,UNION:162,SearchSelectorList:163,ALL:164,SearchSelector_repetition6:165,ANY:166,SearchSelector_repetition7:167,INTERSECT:168,EXCEPT:169,AND:170,OR:171,PATH:172,RETURN:173,ResultColumns:174,REPEAT:175,SearchSelector_repetition8:176,SearchSelectorList_repetition0:177,SearchSelectorList_repetition1:178,PLUS:179,STAR:180,QUESTION:181,SearchFrom:182,FROM:183,SelectModifier:184,DISTINCT:185,TopClause:186,UNIQUE:187,SelectClause_option0:188,SELECT:189,COLUMN:190,MATRIX:191,TEXTSTRING:192,INDEX:193,RECORDSET:194,TOP:195,NumValue:196,TopClause_option0:197,INTO:198,Table:199,FuncValue:200,ParamValue:201,VarValue:202,FromTablesList:203,JoinTablesList:204,ApplyClause:205,CROSS:206,APPLY:207,OUTER:208,FromTable:209,FromTable_option0:210,FromTable_option1:211,INDEXED:212,INSERTED:213,FromString:214,JoinTable:215,JoinMode:216,JoinTableAs:217,OnClause:218,JoinTableAs_option0:219,JoinTableAs_option1:220,JoinModeMode:221,NATURAL:222,JOIN:223,INNER:224,LEFT:225,RIGHT:226,FULL:227,SEMI:228,ANTI:229,ON:230,USING:231,GROUP:232,GroupExpressionsList:233,HavingClause:234,GroupExpression:235,GROUPING:236,ROLLUP:237,CUBE:238,HAVING:239,CORRESPONDING:240,OrderExpression:241,NullsOrder:242,NULLS:243,FIRST:244,LAST:245,DIRECTION:246,COLLATE:247,NOCASE:248,LIMIT:249,OffsetClause:250,OFFSET:251,LimitClause_option0:252,FETCH:253,LimitClause_option1:254,LimitClause_option2:255,LimitClause_option3:256,ResultColumn:257,Star:258,AggrValue:259,Op:260,LogicValue:261,NullValue:262,ExistsValue:263,CaseValue:264,CastClause:265,ArrayValue:266,NewClause:267,Expression_group0:268,CURRENT_TIMESTAMP:269,JAVASCRIPT:270,CREATE:271,FUNCTION:272,AGGREGATE:273,NEW:274,CAST:275,ColumnType:276,CONVERT:277,PrimitiveValue:278,OverClause:279,OVER:280,OverPartitionClause:281,OverOrderByClause:282,PARTITION:283,SUM:284,COUNT:285,MIN:286,MAX:287,AVG:288,AGGR:289,ARRAY:290,FuncValue_option0:291,REPLACE:292,DATEADD:293,DATEDIFF:294,INTERVAL:295,TRUE:296,FALSE:297,NSTRING:298,NULL:299,EXISTS:300,ARRAYLBRA:301,RBRA:302,ParamValue_group0:303,BRAQUESTION:304,CASE:305,WhensList:306,ElseClause:307,END:308,When:309,WHEN:310,THEN:311,ELSE:312,REGEXP:313,TILDA:314,GLOB:315,ESCAPE:316,NOT_LIKE:317,BARBAR:318,MINUS:319,AMPERSAND:320,BAR:321,GE:322,LE:323,EQEQ:324,EQEQEQ:325,NE:326,NEEQEQ:327,NEEQEQEQ:328,CondOp:329,AllSome:330,ColFunc:331,BETWEEN:332,NOT_BETWEEN:333,IS:334,DOUBLECOLON:335,SOME:336,UPDATE:337,SetColumn:338,SetColumn_group0:339,DELETE:340,INSERT:341,Into:342,Values:343,ValuesListsList:344,DEFAULT:345,VALUES:346,ValuesList:347,Value:348,DateValue:349,TemporaryClause:350,TableClass:351,IfNotExists:352,CreateTableDefClause:353,CreateTableOptionsClause:354,TABLE:355,CreateTableOptions:356,CreateTableOption:357,IDENTITY:358,TEMP:359,ColumnDefsList:360,ConstraintsList:361,Constraint:362,ConstraintName:363,PrimaryKey:364,ForeignKey:365,UniqueKey:366,IndexKey:367,Check:368,CONSTRAINT:369,CHECK:370,PRIMARY:371,KEY:372,PrimaryKey_option0:373,ColsList:374,FOREIGN:375,REFERENCES:376,ForeignKey_option0:377,OnForeignKeyClause:378,ParColsList:379,OnDeleteClause:380,OnUpdateClause:381,NO:382,ACTION:383,UniqueKey_option0:384,UniqueKey_option1:385,ColumnDef:386,ColumnConstraintsClause:387,ColumnConstraints:388,SingularColumnType:389,NumberMax:390,ENUM:391,MAXNUM:392,ColumnConstraintsList:393,ColumnConstraint:394,ParLiteral:395,ColumnConstraint_option0:396,ColumnConstraint_option1:397,DROP:398,DropTable_group0:399,IfExists:400,TablesList:401,ALTER:402,RENAME:403,ADD:404,MODIFY:405,ATTACH:406,DATABASE:407,DETACH:408,AsClause:409,USE:410,SHOW:411,VIEW:412,CreateView_option0:413,CreateView_option1:414,SubqueryRestriction:415,READ:416,ONLY:417,OPTION:418,SOURCE:419,ASSERT:420,JsonObject:421,ATLBRA:422,JsonArray:423,JsonValue:424,JsonPrimitiveValue:425,LCUR:426,JsonPropertiesList:427,RCUR:428,JsonElementsList:429,JsonProperty:430,OnOff:431,SetPropsList:432,AtDollar:433,SetProp:434,OFF:435,COMMIT:436,TRANSACTION:437,ROLLBACK:438,BEGIN:439,ElseStatement:440,WHILE:441,CONTINUE:442,BREAK:443,PRINT:444,REQUIRE:445,StringValuesList:446,PluginsList:447,Plugin:448,ECHO:449,DECLARE:450,DeclaresList:451,DeclareItem:452,TRUNCATE:453,MERGE:454,MergeInto:455,MergeUsing:456,MergeOn:457,MergeMatchedList:458,OutputClause:459,MergeMatched:460,MergeNotMatched:461,MATCHED:462,MergeMatchedAction:463,MergeNotMatchedAction:464,TARGET:465,OUTPUT:466,CreateVertex_option0:467,CreateVertex_option1:468,CreateVertex_option2:469,CreateVertexSet:470,SharpValue:471,CONTENT:472,CreateEdge_option0:473,GRAPH:474,GraphList:475,GraphVertexEdge:476,GraphElement:477,GraphVertexEdge_option0:478,GraphVertexEdge_option1:479,GraphElementVar:480,GraphVertexEdge_option2:481,GraphVertexEdge_option3:482,GraphVertexEdge_option4:483,GraphVar:484,GraphAsClause:485,GraphAtClause:486,GraphElement2:487,GraphElement2_option0:488,GraphElement2_option1:489,GraphElement2_option2:490,GraphElement2_option3:491,GraphElement_option0:492,GraphElement_option1:493,GraphElement_option2:494,SharpLiteral:495,GraphElement_option3:496,GraphElement_option4:497,GraphElement_option5:498,ColonLiteral:499,DeleteVertex:500,DeleteVertex_option0:501,DeleteEdge:502,DeleteEdge_option0:503,DeleteEdge_option1:504,DeleteEdge_option2:505,Term:506,COLONDASH:507,TermsList:508,QUESTIONDASH:509,CALL:510,TRIGGER:511,BeforeAfter:512,InsertDeleteUpdate:513,CreateTrigger_option0:514,CreateTrigger_option1:515,BEFORE:516,AFTER:517,INSTEAD:518,REINDEX:519,A:520,ABSENT:521,ABSOLUTE:522,ACCORDING:523,ADA:524,ADMIN:525,ALWAYS:526,ASC:527,ASSERTION:528,ASSIGNMENT:529,ATTRIBUTE:530,ATTRIBUTES:531,BASE64:532,BERNOULLI:533,BLOCKED:534,BOM:535,BREADTH:536,C:537,CASCADE:538,CATALOG:539,CATALOG_NAME:540,CHAIN:541,CHARACTERISTICS:542,CHARACTERS:543,CHARACTER_SET_CATALOG:544,CHARACTER_SET_NAME:545,CHARACTER_SET_SCHEMA:546,CLASS_ORIGIN:547,COBOL:548,COLLATION:549,COLLATION_CATALOG:550,COLLATION_NAME:551,COLLATION_SCHEMA:552,COLUMNS:553,COLUMN_NAME:554,COMMAND_FUNCTION:555,COMMAND_FUNCTION_CODE:556,COMMITTED:557,CONDITION_NUMBER:558,CONNECTION:559,CONNECTION_NAME:560,CONSTRAINTS:561,CONSTRAINT_CATALOG:562,CONSTRAINT_NAME:563,CONSTRAINT_SCHEMA:564,CONSTRUCTOR:565,CONTROL:566,CURSOR_NAME:567,DATA:568,DATETIME_INTERVAL_CODE:569,DATETIME_INTERVAL_PRECISION:570,DB:571,DEFAULTS:572,DEFERRABLE:573,DEFERRED:574,DEFINED:575,DEFINER:576,DEGREE:577,DEPTH:578,DERIVED:579,DESC:580,DESCRIPTOR:581,DIAGNOSTICS:582,DISPATCH:583,DOCUMENT:584,DOMAIN:585,DYNAMIC_FUNCTION:586,DYNAMIC_FUNCTION_CODE:587,EMPTY:588,ENCODING:589,ENFORCED:590,EXCLUDE:591,EXCLUDING:592,EXPRESSION:593,FILE:594,FINAL:595,FLAG:596,FOLLOWING:597,FORTRAN:598,FOUND:599,FS:600,G:601,GENERAL:602,GENERATED:603,GO:604,GOTO:605,GRANTED:606,HEX:607,HIERARCHY:608,ID:609,IGNORE:610,IMMEDIATE:611,IMMEDIATELY:612,IMPLEMENTATION:613,INCLUDING:614,INCREMENT:615,INDENT:616,INITIALLY:617,INPUT:618,INSTANCE:619,INSTANTIABLE:620,INTEGRITY:621,INVOKER:622,ISOLATION:623,K:624,KEY_MEMBER:625,KEY_TYPE:626,LENGTH:627,LEVEL:628,LIBRARY:629,LINK:630,LOCATION:631,LOCATOR:632,M:633,MAP:634,MAPPING:635,MAXVALUE:636,MESSAGE_LENGTH:637,MESSAGE_OCTET_LENGTH:638,MESSAGE_TEXT:639,MINVALUE:640,MORE:641,MUMPS:642,NAME:643,NAMES:644,NAMESPACE:645,NESTING:646,NEXT:647,NFC:648,NFD:649,NFKC:650,NFKD:651,NIL:652,NORMALIZED:653,NULLABLE:654,OBJECT:655,OCTETS:656,OPTIONS:657,ORDERING:658,ORDINALITY:659,OTHERS:660,OVERRIDING:661,P:662,PAD:663,PARAMETER_MODE:664,PARAMETER_NAME:665,PARAMETER_ORDINAL_POSITION:666,PARAMETER_SPECIFIC_CATALOG:667,PARAMETER_SPECIFIC_NAME:668,PARAMETER_SPECIFIC_SCHEMA:669,PARTIAL:670,PASCAL:671,PASSING:672,PASSTHROUGH:673,PERMISSION:674,PLACING:675,PLI:676,PRECEDING:677,PRESERVE:678,PRIOR:679,PRIVILEGES:680,PUBLIC:681,RECOVERY:682,RELATIVE:683,REPEATABLE:684,REQUIRING:685,RESPECT:686,RESTART:687,RESTORE:688,RESTRICT:689,RETURNED_CARDINALITY:690,RETURNED_LENGTH:691,RETURNED_OCTET_LENGTH:692,RETURNED_SQLSTATE:693,RETURNING:694,ROLE:695,ROUTINE:696,ROUTINE_CATALOG:697,ROUTINE_NAME:698,ROUTINE_SCHEMA:699,ROW_COUNT:700,SCALE:701,SCHEMA:702,SCHEMA_NAME:703,SCOPE_CATALOG:704,SCOPE_NAME:705,SCOPE_SCHEMA:706,SECTION:707,SECURITY:708,SELECTIVE:709,SELF:710,SEQUENCE:711,SERIALIZABLE:712,SERVER:713,SERVER_NAME:714,SESSION:715,SETS:716,SIMPLE:717,SIZE:718,SPACE:719,SPECIFIC_NAME:720,STANDALONE:721,STATE:722,STATEMENT:723,STRIP:724,STRUCTURE:725,STYLE:726,SUBCLASS_ORIGIN:727,T:728,TABLE_NAME:729,TEMPORARY:730,TIES:731,TOKEN:732,TOP_LEVEL_COUNT:733,TRANSACTIONS_COMMITTED:734,TRANSACTIONS_ROLLED_BACK:735,TRANSACTION_ACTIVE:736,TRANSFORM:737,TRANSFORMS:738,TRIGGER_CATALOG:739,TRIGGER_NAME:740,TRIGGER_SCHEMA:741,TYPE:742,UNBOUNDED:743,UNCOMMITTED:744,UNDER:745,UNLINK:746,UNNAMED:747,UNTYPED:748,URI:749,USAGE:750,USER_DEFINED_TYPE_CATALOG:751,USER_DEFINED_TYPE_CODE:752,USER_DEFINED_TYPE_NAME:753,USER_DEFINED_TYPE_SCHEMA:754,VALID:755,VERSION:756,WHITESPACE:757,WORK:758,WRAPPER:759,WRITE:760,XMLDECLARATION:761,XMLSCHEMA:762,YES:763,ZONE:764,SEMICOLON:765,PERCENT:766,ROWS:767,FuncValue_option0_group0:768,$accept:0,$end:1},terminals_:{2:"error",4:"LITERAL",5:"BRALITERAL",10:"EOF",14:"EXPLAIN",15:"QUERY",16:"PLAN",53:"EndTransaction",72:"WITH",74:"COMMA",76:"AS",77:"LPAR",78:"RPAR",89:"SEARCH",93:"PIVOT",95:"FOR",98:"UNPIVOT",99:"IN",107:"REMOVE",112:"LIKE",115:"ARROW",116:"DOT",118:"ORDER",119:"BY",122:"DOTDOT",123:"CARET",124:"EQ",128:"WHERE",129:"OF",130:"CLASS",131:"NUMBER",132:"STRING",133:"SLASH",134:"VERTEX",135:"EDGE",136:"EXCLAMATION",137:"SHARP",138:"MODULO",139:"GT",140:"LT",141:"GTGT",142:"LTLT",143:"DOLLAR",145:"AT",146:"SET",148:"TO",149:"VALUE",150:"ROW",152:"COLON",154:"NOT",156:"IF",162:"UNION",164:"ALL",166:"ANY",168:"INTERSECT",169:"EXCEPT",170:"AND",171:"OR",172:"PATH",173:"RETURN",175:"REPEAT",179:"PLUS",180:"STAR",181:"QUESTION",183:"FROM",185:"DISTINCT",187:"UNIQUE",189:"SELECT",190:"COLUMN",191:"MATRIX",192:"TEXTSTRING",193:"INDEX",194:"RECORDSET",195:"TOP",198:"INTO",206:"CROSS",207:"APPLY",208:"OUTER",212:"INDEXED",213:"INSERTED",222:"NATURAL",223:"JOIN",224:"INNER",225:"LEFT",226:"RIGHT",227:"FULL",228:"SEMI",229:"ANTI",230:"ON",231:"USING",232:"GROUP",236:"GROUPING",237:"ROLLUP",238:"CUBE",239:"HAVING",240:"CORRESPONDING",243:"NULLS",244:"FIRST",245:"LAST",246:"DIRECTION",247:"COLLATE",248:"NOCASE",249:"LIMIT",251:"OFFSET",253:"FETCH",269:"CURRENT_TIMESTAMP",270:"JAVASCRIPT",271:"CREATE",272:"FUNCTION",273:"AGGREGATE",274:"NEW",275:"CAST",277:"CONVERT",280:"OVER",283:"PARTITION",284:"SUM",285:"COUNT",286:"MIN",287:"MAX",288:"AVG",289:"AGGR",290:"ARRAY",292:"REPLACE",293:"DATEADD",294:"DATEDIFF",295:"INTERVAL",296:"TRUE",297:"FALSE",298:"NSTRING",299:"NULL",300:"EXISTS",301:"ARRAYLBRA",302:"RBRA",304:"BRAQUESTION",305:"CASE",308:"END",310:"WHEN",311:"THEN",312:"ELSE",313:"REGEXP",314:"TILDA",315:"GLOB",316:"ESCAPE",317:"NOT_LIKE",318:"BARBAR",319:"MINUS",320:"AMPERSAND",321:"BAR",322:"GE",323:"LE",324:"EQEQ",325:"EQEQEQ",326:"NE",327:"NEEQEQ",328:"NEEQEQEQ",332:"BETWEEN",333:"NOT_BETWEEN",334:"IS",335:"DOUBLECOLON",336:"SOME",337:"UPDATE",340:"DELETE",341:"INSERT",345:"DEFAULT",346:"VALUES",349:"DateValue",355:"TABLE",358:"IDENTITY",359:"TEMP",369:"CONSTRAINT",370:"CHECK",371:"PRIMARY",372:"KEY",375:"FOREIGN",376:"REFERENCES",382:"NO",383:"ACTION",388:"ColumnConstraints",391:"ENUM",392:"MAXNUM",398:"DROP",402:"ALTER",403:"RENAME",404:"ADD",405:"MODIFY",406:"ATTACH",407:"DATABASE",408:"DETACH",410:"USE",411:"SHOW",412:"VIEW",416:"READ",417:"ONLY",418:"OPTION",419:"SOURCE",420:"ASSERT",422:"ATLBRA",426:"LCUR",428:"RCUR",435:"OFF",436:"COMMIT",437:"TRANSACTION",438:"ROLLBACK",439:"BEGIN",441:"WHILE",442:"CONTINUE",443:"BREAK",444:"PRINT",445:"REQUIRE",449:"ECHO",450:"DECLARE",453:"TRUNCATE",454:"MERGE",462:"MATCHED",465:"TARGET",466:"OUTPUT",472:"CONTENT",474:"GRAPH",507:"COLONDASH",509:"QUESTIONDASH",510:"CALL",511:"TRIGGER",516:"BEFORE",517:"AFTER",518:"INSTEAD",519:"REINDEX",520:"A",521:"ABSENT",522:"ABSOLUTE",523:"ACCORDING",524:"ADA",525:"ADMIN",526:"ALWAYS",527:"ASC",528:"ASSERTION",529:"ASSIGNMENT",530:"ATTRIBUTE",531:"ATTRIBUTES",532:"BASE64",533:"BERNOULLI",534:"BLOCKED",535:"BOM",536:"BREADTH",537:"C",538:"CASCADE",539:"CATALOG",540:"CATALOG_NAME",541:"CHAIN",542:"CHARACTERISTICS",543:"CHARACTERS",544:"CHARACTER_SET_CATALOG",545:"CHARACTER_SET_NAME",546:"CHARACTER_SET_SCHEMA",547:"CLASS_ORIGIN",548:"COBOL",549:"COLLATION",550:"COLLATION_CATALOG",551:"COLLATION_NAME",552:"COLLATION_SCHEMA",553:"COLUMNS",554:"COLUMN_NAME",555:"COMMAND_FUNCTION",556:"COMMAND_FUNCTION_CODE",557:"COMMITTED",558:"CONDITION_NUMBER",559:"CONNECTION",560:"CONNECTION_NAME",561:"CONSTRAINTS",562:"CONSTRAINT_CATALOG",563:"CONSTRAINT_NAME",564:"CONSTRAINT_SCHEMA",565:"CONSTRUCTOR",566:"CONTROL",567:"CURSOR_NAME",568:"DATA",569:"DATETIME_INTERVAL_CODE",570:"DATETIME_INTERVAL_PRECISION",571:"DB",572:"DEFAULTS",573:"DEFERRABLE",574:"DEFERRED",575:"DEFINED",576:"DEFINER",577:"DEGREE",578:"DEPTH",579:"DERIVED",580:"DESC",581:"DESCRIPTOR",582:"DIAGNOSTICS",583:"DISPATCH",584:"DOCUMENT",585:"DOMAIN",586:"DYNAMIC_FUNCTION",587:"DYNAMIC_FUNCTION_CODE",588:"EMPTY",589:"ENCODING",590:"ENFORCED",591:"EXCLUDE",592:"EXCLUDING",593:"EXPRESSION",594:"FILE",595:"FINAL",596:"FLAG",597:"FOLLOWING",598:"FORTRAN",599:"FOUND",600:"FS",601:"G",602:"GENERAL",603:"GENERATED",604:"GO",605:"GOTO",606:"GRANTED",607:"HEX",608:"HIERARCHY",609:"ID",610:"IGNORE",611:"IMMEDIATE",612:"IMMEDIATELY",613:"IMPLEMENTATION",614:"INCLUDING",615:"INCREMENT",616:"INDENT",617:"INITIALLY",618:"INPUT",619:"INSTANCE",620:"INSTANTIABLE",621:"INTEGRITY",622:"INVOKER",623:"ISOLATION",624:"K",625:"KEY_MEMBER",626:"KEY_TYPE",627:"LENGTH",628:"LEVEL",629:"LIBRARY",630:"LINK",631:"LOCATION",632:"LOCATOR",633:"M",634:"MAP",635:"MAPPING",636:"MAXVALUE",637:"MESSAGE_LENGTH",638:"MESSAGE_OCTET_LENGTH",639:"MESSAGE_TEXT",640:"MINVALUE",641:"MORE",642:"MUMPS",643:"NAME",644:"NAMES",645:"NAMESPACE",646:"NESTING",647:"NEXT",648:"NFC",649:"NFD",650:"NFKC",651:"NFKD",652:"NIL",653:"NORMALIZED",654:"NULLABLE",655:"OBJECT",656:"OCTETS",657:"OPTIONS",658:"ORDERING",659:"ORDINALITY",660:"OTHERS",661:"OVERRIDING",662:"P",663:"PAD",664:"PARAMETER_MODE",665:"PARAMETER_NAME",666:"PARAMETER_ORDINAL_POSITION",667:"PARAMETER_SPECIFIC_CATALOG",668:"PARAMETER_SPECIFIC_NAME",669:"PARAMETER_SPECIFIC_SCHEMA",670:"PARTIAL",671:"PASCAL",672:"PASSING",673:"PASSTHROUGH",674:"PERMISSION",675:"PLACING",676:"PLI",677:"PRECEDING",678:"PRESERVE",679:"PRIOR",680:"PRIVILEGES",681:"PUBLIC",682:"RECOVERY",683:"RELATIVE",684:"REPEATABLE",685:"REQUIRING",686:"RESPECT",687:"RESTART",688:"RESTORE",689:"RESTRICT",690:"RETURNED_CARDINALITY",691:"RETURNED_LENGTH",692:"RETURNED_OCTET_LENGTH",693:"RETURNED_SQLSTATE",694:"RETURNING",695:"ROLE",696:"ROUTINE",697:"ROUTINE_CATALOG",698:"ROUTINE_NAME",699:"ROUTINE_SCHEMA",700:"ROW_COUNT",701:"SCALE",702:"SCHEMA",703:"SCHEMA_NAME",704:"SCOPE_CATALOG",705:"SCOPE_NAME",706:"SCOPE_SCHEMA",707:"SECTION",708:"SECURITY",709:"SELECTIVE",710:"SELF",711:"SEQUENCE",712:"SERIALIZABLE",713:"SERVER",714:"SERVER_NAME",715:"SESSION",716:"SETS",717:"SIMPLE",718:"SIZE",719:"SPACE",720:"SPECIFIC_NAME",721:"STANDALONE",722:"STATE",723:"STATEMENT",724:"STRIP",725:"STRUCTURE",726:"STYLE",727:"SUBCLASS_ORIGIN",728:"T",729:"TABLE_NAME",730:"TEMPORARY",731:"TIES",732:"TOKEN",733:"TOP_LEVEL_COUNT",734:"TRANSACTIONS_COMMITTED",735:"TRANSACTIONS_ROLLED_BACK",736:"TRANSACTION_ACTIVE",737:"TRANSFORM",738:"TRANSFORMS",739:"TRIGGER_CATALOG",740:"TRIGGER_NAME",741:"TRIGGER_SCHEMA",742:"TYPE",743:"UNBOUNDED",744:"UNCOMMITTED",745:"UNDER",746:"UNLINK",747:"UNNAMED",748:"UNTYPED",749:"URI",750:"USAGE",751:"USER_DEFINED_TYPE_CATALOG",752:"USER_DEFINED_TYPE_CODE",753:"USER_DEFINED_TYPE_NAME",754:"USER_DEFINED_TYPE_SCHEMA",755:"VALID",756:"VERSION",757:"WHITESPACE",758:"WORK",759:"WRAPPER",760:"WRITE",761:"XMLDECLARATION",762:"XMLSCHEMA",763:"YES",764:"ZONE",765:"SEMICOLON",766:"PERCENT",767:"ROWS"},productions_:[0,[3,1],[3,1],[3,2],[7,1],[7,2],[8,2],[9,3],[9,1],[9,1],[13,2],[13,4],[12,1],[17,0],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[47,3],[73,3],[73,1],[75,5],[40,10],[40,4],[92,8],[92,11],[102,4],[104,2],[104,1],[103,3],[103,1],[105,1],[105,3],[106,3],[109,3],[109,1],[110,1],[110,2],[114,1],[114,1],[117,1],[117,5],[117,5],[117,1],[117,2],[117,1],[117,2],[117,2],[117,3],[117,4],[117,4],[117,4],[117,4],[117,4],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,2],[117,2],[117,2],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,2],[117,3],[117,4],[117,3],[117,1],[117,4],[117,2],[117,2],[117,4],[117,4],[117,4],[117,4],[117,4],[117,5],[117,4],[117,4],[117,4],[117,4],[117,4],[117,4],[117,4],[117,4],[117,6],[163,3],[163,1],[153,1],[153,1],[153,1],[182,2],[79,4],[79,4],[79,4],[79,3],[184,1],[184,2],[184,2],[184,2],[184,2],[184,2],[184,2],[184,2],[186,3],[186,4],[186,0],[81,0],[81,2],[81,2],[81,2],[81,2],[81,2],[82,2],[82,3],[82,5],[82,0],[205,6],[205,7],[205,6],[205,7],[203,1],[203,3],[209,4],[209,5],[209,3],[209,3],[209,2],[209,3],[209,1],[209,3],[209,2],[209,3],[209,1],[209,1],[209,2],[209,3],[209,1],[209,1],[209,2],[209,3],[209,1],[209,2],[209,3],[214,1],[199,3],[199,1],[204,2],[204,2],[204,1],[204,1],[215,3],[217,1],[217,2],[217,3],[217,3],[217,2],[217,3],[217,4],[217,5],[217,1],[217,2],[217,3],[217,1],[217,2],[217,3],[216,1],[216,2],[221,1],[221,2],[221,2],[221,3],[221,2],[221,3],[221,2],[221,3],[221,2],[221,2],[221,2],[218,2],[218,2],[218,0],[84,0],[84,2],[85,0],[85,4],[233,1],[233,3],[235,5],[235,4],[235,4],[235,1],[234,0],[234,2],[88,0],[88,2],[88,3],[88,2],[88,2],[88,3],[88,4],[88,3],[88,3],[86,0],[86,3],[120,1],[120,3],[242,2],[242,2],[241,1],[241,2],[241,3],[241,3],[241,4],[87,0],[87,3],[87,8],[250,0],[250,2],[174,3],[174,1],[257,3],[257,2],[257,3],[257,2],[257,3],[257,2],[257,1],[258,5],[258,3],[258,1],[111,5],[111,3],[111,3],[111,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,3],[94,3],[94,3],[94,1],[94,1],[56,1],[70,5],[71,5],[267,2],[267,2],[265,6],[265,8],[265,6],[265,8],[278,1],[278,1],[278,1],[278,1],[278,1],[278,1],[278,1],[259,5],[259,6],[259,6],[279,0],[279,4],[279,4],[279,5],[281,3],[282,3],[158,1],[158,1],[158,1],[158,1],[158,1],[158,1],[158,1],[158,1],[158,1],[200,5],[200,3],[200,4],[200,4],[200,8],[200,8],[200,8],[200,8],[200,3],[151,1],[151,3],[196,1],[261,1],[261,1],[113,1],[113,1],[262,1],[202,2],[263,4],[266,3],[201,2],[201,2],[201,1],[201,1],[264,5],[264,4],[306,2],[306,1],[309,4],[307,2],[307,0],[260,3],[260,3],[260,3],[260,3],[260,5],[260,3],[260,5],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,5],[260,3],[260,3],[260,3],[260,5],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,3],[260,6],[260,6],[260,3],[260,3],[260,2],[260,2],[260,2],[260,2],[260,2],[260,3],[260,5],[260,6],[260,5],[260,6],[260,4],[260,5],[260,3],[260,4],[260,3],[260,4],[260,3],[260,3],[260,3],[260,3],[260,3],[331,1],[331,1],[331,4],[329,1],[329,1],[329,1],[329,1],[329,1],[329,1],[330,1],[330,1],[330,1],[55,6],[55,4],[147,1],[147,3],[338,3],[338,4],[29,5],[29,3],[36,5],[36,4],[36,7],[36,6],[36,5],[36,4],[36,5],[36,8],[36,7],[36,4],[36,6],[36,7],[343,1],[343,1],[342,0],[342,1],[344,3],[344,1],[344,1],[344,5],[344,3],[344,3],[347,1],[347,3],[348,1],[348,1],[348,1],[348,1],[348,1],[348,1],[100,1],[100,3],[24,9],[24,5],[351,1],[351,1],[354,0],[354,1],[356,2],[356,1],[357,1],[357,3],[357,3],[357,3],[350,0],[350,1],[352,0],[352,3],[353,3],[353,1],[353,2],[361,1],[361,3],[362,2],[362,2],[362,2],[362,2],[362,2],[363,0],[363,2],[368,4],[364,6],[365,9],[379,3],[378,0],[378,2],[380,4],[381,4],[366,6],[367,5],[367,5],[374,1],[374,1],[374,3],[374,3],[360,1],[360,3],[386,3],[386,2],[386,1],[389,6],[389,4],[389,1],[389,4],[276,2],[276,1],[390,1],[390,1],[387,0],[387,1],[393,2],[393,1],[395,3],[394,2],[394,5],[394,3],[394,6],[394,1],[394,2],[394,4],[394,2],[394,1],[394,2],[394,1],[394,1],[394,3],[394,5],[33,4],[401,3],[401,1],[400,0],[400,2],[18,6],[18,6],[18,6],[18,8],[18,6],[39,5],[19,4],[19,7],[19,6],[19,9],[30,3],[21,4],[21,6],[21,9],[21,6],[409,0],[409,2],[54,3],[54,2],[31,4],[31,5],[31,5],[22,8],[22,9],[32,3],[43,2],[43,4],[43,3],[43,5],[45,2],[45,4],[45,4],[45,6],[42,4],[42,6],[44,4],[44,6],[41,4],[41,6],[25,11],[25,8],[415,3],[415,3],[415,5],[34,4],[66,2],[57,2],[58,2],[58,2],[58,4],[144,4],[144,2],[144,2],[144,2],[144,2],[144,1],[144,2],[144,2],[424,1],[424,1],[425,1],[425,1],[425,1],[425,1],[425,1],[425,1],[425,1],[425,3],[421,3],[421,4],[421,2],[423,2],[423,3],[423,1],[427,3],[427,1],[430,3],[430,3],[430,3],[429,3],[429,1],[65,4],[65,3],[65,4],[65,5],[65,5],[65,6],[433,1],[433,1],[432,3],[432,2],[434,1],[434,1],[434,3],[431,1],[431,1],[51,2],[52,2],[50,2],[35,4],[35,3],[440,2],[59,3],[60,1],[61,1],[62,3],[63,2],[63,2],[64,2],[64,2],[448,1],[448,1],[69,2],[446,3],[446,1],[447,3],[447,1],[28,2],[451,1],[451,3],[452,3],[452,4],[452,5],[452,6],[46,3],[37,6],[455,1],[455,2],[456,2],[457,2],[458,2],[458,2],[458,1],[458,1],[460,4],[460,6],[463,1],[463,3],[461,5],[461,7],[461,7],[461,9],[461,7],[461,9],[464,3],[464,6],[464,3],[464,6],[459,0],[459,2],[459,5],[459,4],[459,7],[27,6],[471,2],[470,0],[470,2],[470,2],[470,1],[26,8],[23,3],[23,4],[475,3],[475,1],[476,3],[476,7],[476,6],[476,3],[476,4],[480,1],[480,1],[484,2],[485,3],[486,2],[487,4],[477,4],[477,3],[477,2],[477,1],[499,2],[495,2],[495,2],[500,4],[502,6],[67,3],[67,2],[508,3],[508,1],[506,1],[506,4],[68,2],[20,2],[48,9],[48,8],[48,9],[512,0],[512,1],[512,1],[512,1],[512,2],[513,1],[513,1],[513,1],[49,3],[38,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[11,1],[11,1],[80,0],[80,1],[83,0],[83,1],[90,0],[90,2],[91,0],[91,1],[96,0],[96,1],[97,0],[97,1],[101,0],[101,1],[108,0],[108,1],[121,0],[121,1],[125,1],[125,2],[126,1],[126,2],[127,0],[127,1],[155,0],[155,2],[157,0],[157,2],[159,0],[159,2],[160,1],[160,1],[161,0],[161,2],[165,0],[165,2],[167,0],[167,2],[176,0],[176,2],[177,0],[177,2],[178,0],[178,2],[188,0],[188,1],[197,0],[197,1],[210,0],[210,1],[211,0],[211,1],[219,0],[219,1],[220,0],[220,1],[252,0],[252,1],[254,0],[254,1],[255,0],[255,1],[256,0],[256,1],[268,1],[268,1],[768,1],[768,1],[291,0],[291,1],[303,1],[303,1],[339,1],[339,1],[373,0],[373,1],[377,0],[377,1],[384,0],[384,1],[385,0],[385,1],[396,0],[396,1],[397,0],[397,1],[399,1],[399,1],[413,0],[413,1],[414,0],[414,1],[467,0],[467,1],[468,0],[468,1],[469,0],[469,1],[473,0],[473,1],[478,0],[478,1],[479,0],[479,1],[481,0],[481,1],[482,0],[482,1],[483,0],[483,1],[488,0],[488,1],[489,0],[489,1],[490,0],[490,1],[491,0],[491,1],[492,0],[492,1],[493,0],[493,1],[494,0],[494,1],[496,0],[496,1],[497,0],[497,1],[498,0],[498,1],[501,0],[501,2],[503,0],[503,2],[504,0],[504,2],[505,0],[505,2],[514,0],[514,1],[515,0],[515,1]],performAction:function(e,t,n,i,o,a,s){var l=a.length-1;switch(o){case 1:r.options.casesensitive?this.$=a[l]:this.$=a[l].toLowerCase();break;case 2:this.$=g(a[l].substr(1,a[l].length-2));break;case 3:this.$=a[l].toLowerCase();break;case 4:case 77:case 78:case 86:case 147:case 185:case 247:case 283:case 291:case 292:case 293:case 294:case 295:case 296:case 297:case 298:case 299:case 300:case 301:case 302:case 303:case 304:case 307:case 308:case 323:case 324:case 325:case 326:case 327:case 328:case 377:case 443:case 444:case 445:case 446:case 447:case 448:case 519:case 545:case 549:case 551:case 626:case 627:case 628:case 629:case 630:case 631:case 635:case 637:case 638:case 647:case 663:case 664:case 726:case 741:case 742:case 744:case 745:case 751:case 752:case 312:case 440:case 441:case 673:this.$=a[l];break;case 5:this.$=a[l]?a[l-1]+" "+a[l]:a[l-1];break;case 6:return new i.Statements({statements:a[l-1]});case 7:this.$=a[l-2],a[l]&&a[l-2].push(a[l]);break;case 8:case 9:case 70:case 80:case 85:case 143:case 177:case 205:case 206:case 242:case 261:case 276:case 357:case 375:case 454:case 477:case 478:case 482:case 490:case 531:case 532:case 569:case 652:case 662:case 686:case 688:case 690:case 704:case 705:case 735:case 759:case 511:case 535:case 1064:case 1066:this.$=[a[l]];break;case 10:case 11:this.$=a[l],a[l].explain=!0;break;case 12:this.$=a[l],i.exists&&(this.$.exists=i.exists),delete i.exists,i.queries&&(this.$.queries=i.queries),delete i.queries;break;case 13:case 162:case 172:case 237:case 238:case 240:case 248:case 250:case 259:case 270:case 273:case 378:case 494:case 504:case 506:case 518:case 524:case 525:case 570:case 163:case 333:case 526:case 527:case 727:case 548:case 587:this.$=void 0;break;case 68:this.$=new i.WithSelect({withs:a[l-1],select:a[l]});break;case 69:case 568:case 275:case 512:case 536:case 651:case 661:case 685:case 687:case 691:case 358:a[l-2].push(a[l]),this.$=a[l-2];break;case 71:this.$={name:a[l-4],select:a[l-1]};break;case 72:i.extend(this.$,a[l-9]),i.extend(this.$,a[l-8]),i.extend(this.$,a[l-7]),i.extend(this.$,a[l-6]),i.extend(this.$,a[l-5]),i.extend(this.$,a[l-4]),i.extend(this.$,a[l-3]),i.extend(this.$,a[l-2]),i.extend(this.$,a[l-1]),i.extend(this.$,a[l]),this.$=a[l-9];break;case 73:this.$=new i.Search({selectors:a[l-2],from:a[l]}),i.extend(this.$,a[l-1]);break;case 74:this.$={pivot:{expr:a[l-5],columnid:a[l-3],inlist:a[l-2],as:a[l]}};break;case 75:this.$={unpivot:{tocolumnid:a[l-8],forcolumnid:a[l-6],inlist:a[l-3],as:a[l]}};break;case 76:case 523:case 552:case 588:case 622:case 639:case 640:case 643:case 665:case 442:this.$=a[l-1];break;case 79:case 84:case 734:case 758:case 142:this.$=a[l-2],this.$.push(a[l]);break;case 81:this.$={expr:a[l]};break;case 82:this.$={expr:a[l-2],as:a[l]};break;case 83:this.$={removecolumns:a[l]};break;case 87:this.$={like:a[l]};break;case 90:case 104:this.$={srchid:"PROP",args:[a[l]]};break;case 91:this.$={srchid:"ORDERBY",args:a[l-1]};break;case 92:var c=(c=a[l-1])||"ASC";this.$={srchid:"ORDERBY",args:[{expression:new i.Column({columnid:"_"}),direction:c}]};break;case 93:this.$={srchid:"PARENT"};break;case 94:this.$={srchid:"APROP",args:[a[l]]};break;case 95:this.$={selid:"ROOT"};break;case 96:this.$={srchid:"EQ",args:[a[l]]};break;case 97:this.$={srchid:"LIKE",args:[a[l]]};break;case 98:case 99:this.$={selid:"WITH",args:a[l-1]};break;case 100:this.$={srchid:a[l-3].toUpperCase(),args:a[l-1]};break;case 101:this.$={srchid:"WHERE",args:[a[l-1]]};break;case 102:this.$={selid:"OF",args:[a[l-1]]};break;case 103:this.$={srchid:"CLASS",args:[a[l-1]]};break;case 105:this.$={srchid:"NAME",args:[a[l].substr(1,a[l].length-2)]};break;case 106:this.$={srchid:"CHILD"};break;case 107:this.$={srchid:"VERTEX"};break;case 108:this.$={srchid:"EDGE"};break;case 109:this.$={srchid:"REF"};break;case 110:this.$={srchid:"SHARP",args:[a[l]]};break;case 111:this.$={srchid:"ATTR",args:void 0===a[l]?void 0:[a[l]]};break;case 112:this.$={srchid:"ATTR"};break;case 113:this.$={srchid:"OUT"};break;case 114:this.$={srchid:"IN"};break;case 115:this.$={srchid:"OUTOUT"};break;case 116:this.$={srchid:"ININ"};break;case 117:this.$={srchid:"CONTENT"};break;case 118:this.$={srchid:"EX",args:[new i.Json({value:a[l]})]};break;case 119:this.$={srchid:"AT",args:[a[l]]};break;case 120:this.$={srchid:"AS",args:[a[l]]};break;case 121:this.$={srchid:"SET",args:a[l-1]};break;case 122:this.$={selid:"TO",args:[a[l]]};break;case 123:this.$={srchid:"VALUE"};break;case 124:this.$={srchid:"ROW",args:a[l-1]};break;case 125:this.$={srchid:"CLASS",args:[a[l]]};break;case 126:this.$={selid:a[l],args:[a[l-1]]};break;case 127:this.$={selid:"NOT",args:a[l-1]};break;case 128:this.$={selid:"IF",args:a[l-1]};break;case 129:this.$={selid:a[l-3],args:a[l-1]};break;case 130:this.$={selid:"DISTINCT",args:a[l-1]};break;case 131:this.$={selid:"UNION",args:a[l-1]};break;case 132:this.$={selid:"UNIONALL",args:a[l-1]};break;case 133:this.$={selid:"ALL",args:[a[l-1]]};break;case 134:this.$={selid:"ANY",args:[a[l-1]]};break;case 135:this.$={selid:"INTERSECT",args:a[l-1]};break;case 136:this.$={selid:"EXCEPT",args:a[l-1]};break;case 137:this.$={selid:"AND",args:a[l-1]};break;case 138:this.$={selid:"OR",args:a[l-1]};break;case 139:this.$={selid:"PATH",args:[a[l-1]]};break;case 140:this.$={srchid:"RETURN",args:a[l-1]};break;case 141:this.$={selid:"REPEAT",sels:a[l-3],args:a[l-1]};break;case 144:this.$="PLUS";break;case 145:this.$="STAR";break;case 146:this.$="QUESTION";break;case 148:case 149:this.$=new i.Select({columns:a[l],distinct:!0}),i.extend(this.$,a[l-3]),i.extend(this.$,a[l-1]);break;case 150:this.$=new i.Select({columns:a[l],all:!0}),i.extend(this.$,a[l-3]),i.extend(this.$,a[l-1]);break;case 151:a[l]?(this.$=new i.Select({columns:a[l]}),i.extend(this.$,a[l-2]),i.extend(this.$,a[l-1])):this.$=new i.Select({columns:[new i.Column({columnid:"_"})],modifier:"COLUMN"});break;case 152:"SELECT"==a[l]?this.$=void 0:this.$={modifier:a[l]};break;case 153:this.$={modifier:"VALUE"};break;case 154:this.$={modifier:"ROW"};break;case 155:this.$={modifier:"COLUMN"};break;case 156:this.$={modifier:"MATRIX"};break;case 157:this.$={modifier:"TEXTSTRING"};break;case 158:this.$={modifier:"INDEX"};break;case 159:this.$={modifier:"RECORDSET"};break;case 160:this.$={top:a[l-1],percent:void 0!==a[l]||void 0};break;case 161:this.$={top:a[l-1]};break;case 164:case 165:case 166:case 167:case 698:case 699:this.$={into:a[l]};break;case 168:var u=(d=(d=a[l]).substr(1,d.length-2)).substr(-3).toUpperCase(),h=d.substr(-4).toUpperCase();"#"==d[0]?this.$={into:new i.FuncValue({funcid:"HTML",args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]})}:"XLS"==u||"CSV"==u||"TAB"==u?this.$={into:new i.FuncValue({funcid:u,args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]})}:"XLSX"!=h&&"JSON"!=h||(this.$={into:new i.FuncValue({funcid:h,args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]})});break;case 169:this.$={from:a[l]};break;case 170:this.$={from:a[l-1],joins:a[l]};break;case 171:this.$={from:a[l-2],joins:a[l-1]};break;case 173:this.$=new i.Apply({select:a[l-2],applymode:"CROSS",as:a[l]});break;case 174:this.$=new i.Apply({select:a[l-3],applymode:"CROSS",as:a[l]});break;case 175:this.$=new i.Apply({select:a[l-2],applymode:"OUTER",as:a[l]});break;case 176:this.$=new i.Apply({select:a[l-3],applymode:"OUTER",as:a[l]});break;case 178:case 243:case 455:case 533:case 534:case 262:case 480:case 481:case 483:case 491:this.$=a[l-2],a[l-2].push(a[l]);break;case 179:this.$=a[l-2],this.$.as=a[l];break;case 180:this.$=a[l-3],this.$.as=a[l];break;case 181:this.$=a[l-1],this.$.as="default";break;case 182:this.$=new i.Json({value:a[l-2]}),a[l-2].as=a[l];break;case 183:case 187:case 191:case 195:case 198:this.$=a[l-1],a[l-1].as=a[l];break;case 184:case 188:case 192:case 196:case 199:this.$=a[l-2],a[l-2].as=a[l];break;case 186:case 641:case 644:this.$=a[l-2];break;case 189:case 190:case 194:case 197:this.$=a[l],a[l].as="default";break;case 193:this.$={inserted:!0};break;case 200:var d;if(u=(d=(d=a[l]).substr(1,d.length-2)).substr(-3).toUpperCase(),h=d.substr(-4).toUpperCase(),"#"==d[0])f=new i.FuncValue({funcid:"HTML",args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]});else if("XLS"==u||"CSV"==u||"TAB"==u)f=new i.FuncValue({funcid:u,args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]});else{if("XLSX"!=h&&"JSON"!=h)throw new Error("Unknown string in FROM clause");f=new i.FuncValue({funcid:h,args:[new i.StringValue({value:d}),new i.Json({value:{headers:!0}})]})}this.$=f;break;case 201:"INFORMATION_SCHEMA"==a[l-2]?this.$=new i.FuncValue({funcid:a[l-2],args:[new i.StringValue({value:a[l]})]}):this.$=new i.Table({databaseid:a[l-2],tableid:a[l]});break;case 202:this.$=new i.Table({tableid:a[l]});break;case 203:case 204:this.$=a[l-1],a[l-1].push(a[l]);break;case 207:this.$=new i.Join(a[l-2]),i.extend(this.$,a[l-1]),i.extend(this.$,a[l]);break;case 208:this.$={table:a[l]};break;case 209:this.$={table:a[l-1],as:a[l]};break;case 210:this.$={table:a[l-2],as:a[l]};break;case 211:this.$={json:new i.Json({value:a[l-2],as:a[l]})};break;case 212:this.$={param:a[l-1],as:a[l]};break;case 213:this.$={param:a[l-2],as:a[l]};break;case 214:this.$={select:a[l-2],as:a[l]};break;case 215:this.$={select:a[l-3],as:a[l]};break;case 216:this.$={func:a[l],as:"default"};break;case 217:this.$={func:a[l-1],as:a[l]};break;case 218:this.$={func:a[l-2],as:a[l]};break;case 219:this.$={variable:a[l],as:"default"};break;case 220:this.$={variable:a[l-1],as:a[l]};break;case 221:this.$={variable:a[l-2],as:a[l]};break;case 222:this.$={joinmode:a[l]};break;case 223:this.$={joinmode:a[l-1],natural:!0};break;case 224:case 225:this.$="INNER";break;case 226:case 227:this.$="LEFT";break;case 228:case 229:this.$="RIGHT";break;case 230:case 231:this.$="OUTER";break;case 232:this.$="SEMI";break;case 233:this.$="ANTI";break;case 234:this.$="CROSS";break;case 235:case 701:this.$={on:a[l]};break;case 236:case 700:this.$={using:a[l]};break;case 239:this.$={where:new i.Expression({expression:a[l]})};break;case 241:this.$={group:a[l-1]},i.extend(this.$,a[l]);break;case 244:this.$=new i.GroupExpression({type:"GROUPING SETS",group:a[l-1]});break;case 245:this.$=new i.GroupExpression({type:"ROLLUP",group:a[l-1]});break;case 246:this.$=new i.GroupExpression({type:"CUBE",group:a[l-1]});break;case 249:this.$={having:a[l]};break;case 251:this.$={union:a[l]};break;case 252:this.$={unionall:a[l]};break;case 253:this.$={except:a[l]};break;case 254:this.$={intersect:a[l]};break;case 255:this.$={union:a[l],corresponding:!0};break;case 256:this.$={unionall:a[l],corresponding:!0};break;case 257:this.$={except:a[l],corresponding:!0};break;case 258:this.$={intersect:a[l],corresponding:!0};break;case 260:case 338:this.$={order:a[l]};break;case 263:this.$={nullsOrder:"FIRST"};break;case 264:this.$={nullsOrder:"LAST"};break;case 265:this.$=new i.Expression({expression:a[l],direction:"ASC"});break;case 266:this.$=new i.Expression({expression:a[l-1],direction:a[l].toUpperCase()});break;case 267:this.$=new i.Expression({expression:a[l-2],direction:a[l-1].toUpperCase()}),i.extend(this.$,a[l]);break;case 268:this.$=new i.Expression({expression:a[l-2],direction:"ASC",nocase:!0});break;case 269:this.$=new i.Expression({expression:a[l-3],direction:a[l].toUpperCase(),nocase:!0});break;case 271:this.$={limit:a[l-1]},i.extend(this.$,a[l]);break;case 272:this.$={limit:a[l-2],offset:a[l-6]};break;case 274:this.$={offset:a[l]};break;case 277:case 279:case 281:a[l-2].as=a[l],this.$=a[l-2];break;case 278:case 280:case 282:a[l-1].as=a[l],this.$=a[l-1];break;case 284:this.$=new i.Column({columid:a[l],tableid:a[l-2],databaseid:a[l-4]});break;case 285:case 288:case 289:this.$=new i.Column({columnid:a[l],tableid:a[l-2]});break;case 286:case 290:this.$=new i.Column({columnid:a[l]});break;case 287:this.$=new i.Column({columnid:a[l],tableid:a[l-2],databaseid:a[l-4]});break;case 305:this.$=new i.DomainValueValue;break;case 306:this.$=new i.Json({value:a[l]});break;case 309:case 310:case 311:i.queries||(i.queries=[]),i.queries.push(a[l-1]),a[l-1].queriesidx=i.queries.length,this.$=a[l-1];break;case 313:case 329:this.$=new i.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 314:this.$=new i.JavaScript({value:a[l].substr(2,a[l].length-4)});break;case 315:this.$=new i.JavaScript({value:'alasql.fn["'+a[l-2]+'"] = '+a[l].substr(2,a[l].length-4)});break;case 316:this.$=new i.JavaScript({value:'alasql.aggr["'+a[l-2]+'"] = '+a[l].substr(2,a[l].length-4)});break;case 317:this.$=new i.FuncValue({funcid:a[l],newid:!0});break;case 318:this.$=a[l],i.extend(this.$,{newid:!0});break;case 319:this.$=new i.Convert({expression:a[l-3]}),i.extend(this.$,a[l-1]);break;case 320:this.$=new i.Convert({expression:a[l-5],style:a[l-1]}),i.extend(this.$,a[l-3]);break;case 321:this.$=new i.Convert({expression:a[l-1]}),i.extend(this.$,a[l-3]);break;case 322:this.$=new i.Convert({expression:a[l-3],style:a[l-1]}),i.extend(this.$,a[l-5]);break;case 330:1<a[l-2].length&&("MAX"==a[l-4].toUpperCase()||"MIN"==a[l-4].toUpperCase())?this.$=new i.FuncValue({funcid:a[l-4],args:a[l-2]}):this.$=new i.AggrValue({aggregatorid:a[l-4].toUpperCase(),expression:a[l-2].pop(),over:a[l]});break;case 331:this.$=new i.AggrValue({aggregatorid:a[l-5].toUpperCase(),expression:a[l-2],distinct:!0,over:a[l]});break;case 332:this.$=new i.AggrValue({aggregatorid:a[l-5].toUpperCase(),expression:a[l-2],over:a[l]});break;case 334:case 335:this.$=new i.Over,i.extend(this.$,a[l-1]);break;case 336:this.$=new i.Over,i.extend(this.$,a[l-2]),i.extend(this.$,a[l-1]);break;case 337:this.$={partition:a[l]};break;case 339:this.$="SUM";break;case 340:this.$="COUNT";break;case 341:this.$="MIN";break;case 342:case 547:this.$="MAX";break;case 343:this.$="AVG";break;case 344:this.$="FIRST";break;case 345:this.$="LAST";break;case 346:this.$="AGGR";break;case 347:this.$="ARRAY";break;case 348:var f=a[l-4],p=a[l-1];1<p.length&&("MIN"==f.toUpperCase()||"MAX"==f.toUpperCase())||!r.aggr[a[l-4]]?this.$=new i.FuncValue({funcid:f,args:p}):this.$=new i.AggrValue({aggregatorid:"REDUCE",funcid:f,expression:p.pop(),distinct:"DISTINCT"==a[l-2]});break;case 349:this.$=new i.FuncValue({funcid:a[l-2]});break;case 350:this.$=new i.FuncValue({funcid:"IIF",args:a[l-1]});break;case 351:this.$=new i.FuncValue({funcid:"REPLACE",args:a[l-1]});break;case 352:this.$=new i.FuncValue({funcid:"DATEADD",args:[new i.StringValue({value:a[l-5]}),a[l-3],a[l-1]]});break;case 353:this.$=new i.FuncValue({funcid:"DATEADD",args:[a[l-5],a[l-3],a[l-1]]});break;case 354:this.$=new i.FuncValue({funcid:"DATEDIFF",args:[new i.StringValue({value:a[l-5]}),a[l-3],a[l-1]]});break;case 355:this.$=new i.FuncValue({funcid:"DATEDIFF",args:[a[l-5],a[l-3],a[l-1]]});break;case 356:this.$=new i.FuncValue({funcid:"INTERVAL",args:[a[l-1],new i.StringValue({value:a[l].toLowerCase()})]});break;case 359:this.$=new i.NumValue({value:+a[l]});break;case 360:this.$=new i.LogicValue({value:!0});break;case 361:this.$=new i.LogicValue({value:!1});break;case 362:this.$=new i.StringValue({value:a[l].substr(1,a[l].length-2).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 363:this.$=new i.StringValue({value:a[l].substr(2,a[l].length-3).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 364:this.$=new i.NullValue({value:void 0});break;case 365:this.$=new i.VarValue({variable:a[l]});break;case 366:i.exists||(i.exists=[]),this.$=new i.ExistsValue({value:a[l-1],existsidx:i.exists.length}),i.exists.push(a[l-1]);break;case 367:this.$=new i.ArrayValue({value:a[l-1]});break;case 368:case 369:this.$=new i.ParamValue({param:a[l]});break;case 370:void 0===i.question&&(i.question=0),this.$=new i.ParamValue({param:i.question++});break;case 371:void 0===i.question&&(i.question=0),this.$=new i.ParamValue({param:i.question++,array:!0});break;case 372:this.$=new i.CaseValue({expression:a[l-3],whens:a[l-2],elses:a[l-1]});break;case 373:this.$=new i.CaseValue({whens:a[l-2],elses:a[l-1]});break;case 374:case 702:case 703:this.$=a[l-1],this.$.push(a[l]);break;case 376:this.$={when:a[l-2],then:a[l]};break;case 379:case 380:this.$=new i.Op({left:a[l-2],op:"REGEXP",right:a[l]});break;case 381:this.$=new i.Op({left:a[l-2],op:"GLOB",right:a[l]});break;case 382:this.$=new i.Op({left:a[l-2],op:"LIKE",right:a[l]});break;case 383:this.$=new i.Op({left:a[l-4],op:"LIKE",right:a[l-2],escape:a[l]});break;case 384:this.$=new i.Op({left:a[l-2],op:"NOT LIKE",right:a[l]});break;case 385:this.$=new i.Op({left:a[l-4],op:"NOT LIKE",right:a[l-2],escape:a[l]});break;case 386:this.$=new i.Op({left:a[l-2],op:"||",right:a[l]});break;case 387:this.$=new i.Op({left:a[l-2],op:"+",right:a[l]});break;case 388:this.$=new i.Op({left:a[l-2],op:"-",right:a[l]});break;case 389:this.$=new i.Op({left:a[l-2],op:"*",right:a[l]});break;case 390:this.$=new i.Op({left:a[l-2],op:"/",right:a[l]});break;case 391:this.$=new i.Op({left:a[l-2],op:"%",right:a[l]});break;case 392:this.$=new i.Op({left:a[l-2],op:"^",right:a[l]});break;case 393:this.$=new i.Op({left:a[l-2],op:">>",right:a[l]});break;case 394:this.$=new i.Op({left:a[l-2],op:"<<",right:a[l]});break;case 395:this.$=new i.Op({left:a[l-2],op:"&",right:a[l]});break;case 396:this.$=new i.Op({left:a[l-2],op:"|",right:a[l]});break;case 397:case 398:case 400:this.$=new i.Op({left:a[l-2],op:"->",right:a[l]});break;case 399:this.$=new i.Op({left:a[l-4],op:"->",right:a[l-1]});break;case 401:case 402:case 404:this.$=new i.Op({left:a[l-2],op:"!",right:a[l]});break;case 403:this.$=new i.Op({left:a[l-4],op:"!",right:a[l-1]});break;case 405:this.$=new i.Op({left:a[l-2],op:">",right:a[l]});break;case 406:this.$=new i.Op({left:a[l-2],op:">=",right:a[l]});break;case 407:this.$=new i.Op({left:a[l-2],op:"<",right:a[l]});break;case 408:this.$=new i.Op({left:a[l-2],op:"<=",right:a[l]});break;case 409:this.$=new i.Op({left:a[l-2],op:"=",right:a[l]});break;case 410:this.$=new i.Op({left:a[l-2],op:"==",right:a[l]});break;case 411:this.$=new i.Op({left:a[l-2],op:"===",right:a[l]});break;case 412:this.$=new i.Op({left:a[l-2],op:"!=",right:a[l]});break;case 413:this.$=new i.Op({left:a[l-2],op:"!==",right:a[l]});break;case 414:this.$=new i.Op({left:a[l-2],op:"!===",right:a[l]});break;case 415:i.queries||(i.queries=[]),this.$=new i.Op({left:a[l-5],op:a[l-4],allsome:a[l-3],right:a[l-1],queriesidx:i.queries.length}),i.queries.push(a[l-1]);break;case 416:this.$=new i.Op({left:a[l-5],op:a[l-4],allsome:a[l-3],right:a[l-1]});break;case 417:"BETWEEN1"==a[l-2].op?"AND"==a[l-2].left.op?this.$=new i.Op({left:a[l-2].left.left,op:"AND",right:new i.Op({left:a[l-2].left.right,op:"BETWEEN",right1:a[l-2].right,right2:a[l]})}):this.$=new i.Op({left:a[l-2].left,op:"BETWEEN",right1:a[l-2].right,right2:a[l]}):"NOT BETWEEN1"==a[l-2].op?"AND"==a[l-2].left.op?this.$=new i.Op({left:a[l-2].left.left,op:"AND",right:new i.Op({left:a[l-2].left.right,op:"NOT BETWEEN",right1:a[l-2].right,right2:a[l]})}):this.$=new i.Op({left:a[l-2].left,op:"NOT BETWEEN",right1:a[l-2].right,right2:a[l]}):this.$=new i.Op({left:a[l-2],op:"AND",right:a[l]});break;case 418:this.$=new i.Op({left:a[l-2],op:"OR",right:a[l]});break;case 419:this.$=new i.UniOp({op:"NOT",right:a[l]});break;case 420:this.$=new i.UniOp({op:"-",right:a[l]});break;case 421:this.$=new i.UniOp({op:"+",right:a[l]});break;case 422:this.$=new i.UniOp({op:"~",right:a[l]});break;case 423:this.$=new i.UniOp({op:"#",right:a[l]});break;case 424:this.$=new i.UniOp({right:a[l-1]});break;case 425:i.queries||(i.queries=[]),this.$=new i.Op({left:a[l-4],op:"IN",right:a[l-1],queriesidx:i.queries.length}),i.queries.push(a[l-1]);break;case 426:i.queries||(i.queries=[]),this.$=new i.Op({left:a[l-5],op:"NOT IN",right:a[l-1],queriesidx:i.queries.length}),i.queries.push(a[l-1]);break;case 427:this.$=new i.Op({left:a[l-4],op:"IN",right:a[l-1]});break;case 428:this.$=new i.Op({left:a[l-5],op:"NOT IN",right:a[l-1]});break;case 429:this.$=new i.Op({left:a[l-3],op:"IN",right:[]});break;case 430:this.$=new i.Op({left:a[l-4],op:"NOT IN",right:[]});break;case 431:case 433:this.$=new i.Op({left:a[l-2],op:"IN",right:a[l]});break;case 432:case 434:this.$=new i.Op({left:a[l-3],op:"NOT IN",right:a[l]});break;case 435:this.$=new i.Op({left:a[l-2],op:"BETWEEN1",right:a[l]});break;case 436:this.$=new i.Op({left:a[l-2],op:"NOT BETWEEN1",right:a[l]});break;case 437:this.$=new i.Op({op:"IS",left:a[l-2],right:a[l]});break;case 438:this.$=new i.Op({op:"IS",left:a[l-2],right:new i.UniOp({op:"NOT",right:new i.NullValue({value:void 0})})});break;case 439:this.$=new i.Convert({expression:a[l-2]}),i.extend(this.$,a[l]);break;case 449:this.$="ALL";break;case 450:this.$="SOME";break;case 451:this.$="ANY";break;case 452:this.$=new i.Update({table:a[l-4],columns:a[l-2],where:a[l]});break;case 453:this.$=new i.Update({table:a[l-2],columns:a[l]});break;case 456:this.$=new i.SetColumn({column:a[l-2],expression:a[l]});break;case 457:this.$=new i.SetColumn({variable:a[l-2],expression:a[l],method:a[l-3]});break;case 458:this.$=new i.Delete({table:a[l-2],where:a[l]});break;case 459:this.$=new i.Delete({table:a[l]});break;case 460:this.$=new i.Insert({into:a[l-2],values:a[l]});break;case 461:this.$=new i.Insert({into:a[l-1],values:a[l]});break;case 462:case 464:this.$=new i.Insert({into:a[l-2],values:a[l],orreplace:!0});break;case 463:case 465:this.$=new i.Insert({into:a[l-1],values:a[l],orreplace:!0});break;case 466:this.$=new i.Insert({into:a[l-2],default:!0});break;case 467:this.$=new i.Insert({into:a[l-5],columns:a[l-3],values:a[l]});break;case 468:this.$=new i.Insert({into:a[l-4],columns:a[l-2],values:a[l]});break;case 469:this.$=new i.Insert({into:a[l-1],select:a[l]});break;case 470:this.$=new i.Insert({into:a[l-1],select:a[l],orreplace:!0});break;case 471:this.$=new i.Insert({into:a[l-4],columns:a[l-2],select:a[l]});break;case 476:this.$=[a[l-1]];break;case 479:this.$=a[l-4],a[l-4].push(a[l-1]);break;case 492:this.$=new i.CreateTable({table:a[l-4]}),i.extend(this.$,a[l-7]),i.extend(this.$,a[l-6]),i.extend(this.$,a[l-5]),i.extend(this.$,a[l-2]),i.extend(this.$,a[l]);break;case 493:this.$=new i.CreateTable({table:a[l]}),i.extend(this.$,a[l-3]),i.extend(this.$,a[l-2]),i.extend(this.$,a[l-1]);break;case 495:this.$={class:!0};break;case 505:this.$={temporary:!0};break;case 507:this.$={ifnotexists:!0};break;case 508:this.$={columns:a[l-2],constraints:a[l]};break;case 509:this.$={columns:a[l]};break;case 510:this.$={as:a[l]};break;case 513:case 514:case 515:case 516:case 517:a[l].constraintid=a[l-1],this.$=a[l];break;case 520:this.$={type:"CHECK",expression:a[l-1]};break;case 521:this.$={type:"PRIMARY KEY",columns:a[l-1],clustered:(a[l-3]+"").toUpperCase()};break;case 522:this.$={type:"FOREIGN KEY",columns:a[l-5],fktable:a[l-2],fkcolumns:a[l-1]};break;case 528:this.$={type:"UNIQUE",columns:a[l-1],clustered:(a[l-3]+"").toUpperCase()};break;case 537:this.$=new i.ColumnDef({columnid:a[l-2]}),i.extend(this.$,a[l-1]),i.extend(this.$,a[l]);break;case 538:this.$=new i.ColumnDef({columnid:a[l-1]}),i.extend(this.$,a[l]);break;case 539:this.$=new i.ColumnDef({columnid:a[l],dbtypeid:""});break;case 540:this.$={dbtypeid:a[l-5],dbsize:a[l-3],dbprecision:+a[l-1]};break;case 541:this.$={dbtypeid:a[l-3],dbsize:a[l-1]};break;case 542:this.$={dbtypeid:a[l]};break;case 543:this.$={dbtypeid:"ENUM",enumvalues:a[l-1]};break;case 544:this.$=a[l-1],a[l-1].dbtypeid+="["+a[l]+"]";break;case 546:case 753:this.$=+a[l];break;case 550:i.extend(a[l-1],a[l]),this.$=a[l-1];break;case 553:this.$={primarykey:!0};break;case 554:case 555:this.$={foreignkey:{table:a[l-1],columnid:a[l]}};break;case 556:this.$={identity:{value:a[l-3],step:a[l-1]}};break;case 557:this.$={identity:{value:1,step:1}};break;case 558:case 560:this.$={default:a[l]};break;case 559:this.$={default:a[l-1]};break;case 561:this.$={null:!0};break;case 562:this.$={notnull:!0};break;case 563:this.$={check:a[l]};break;case 564:this.$={unique:!0};break;case 565:this.$={onupdate:a[l]};break;case 566:this.$={onupdate:a[l-1]};break;case 567:this.$=new i.DropTable({tables:a[l],type:a[l-2]}),i.extend(this.$,a[l-1]);break;case 571:this.$={ifexists:!0};break;case 572:this.$=new i.AlterTable({table:a[l-3],renameto:a[l]});break;case 573:this.$=new i.AlterTable({table:a[l-3],addcolumn:a[l]});break;case 574:this.$=new i.AlterTable({table:a[l-3],modifycolumn:a[l]});break;case 575:this.$=new i.AlterTable({table:a[l-5],renamecolumn:a[l-2],to:a[l]});break;case 576:this.$=new i.AlterTable({table:a[l-3],dropcolumn:a[l]});break;case 577:this.$=new i.AlterTable({table:a[l-2],renameto:a[l]});break;case 578:this.$=new i.AttachDatabase({databaseid:a[l],engineid:a[l-2].toUpperCase()});break;case 579:this.$=new i.AttachDatabase({databaseid:a[l-3],engineid:a[l-5].toUpperCase(),args:a[l-1]});break;case 580:this.$=new i.AttachDatabase({databaseid:a[l-2],engineid:a[l-4].toUpperCase(),as:a[l]});break;case 581:this.$=new i.AttachDatabase({databaseid:a[l-5],engineid:a[l-7].toUpperCase(),as:a[l],args:a[l-3]});break;case 582:this.$=new i.DetachDatabase({databaseid:a[l]});break;case 583:this.$=new i.CreateDatabase({databaseid:a[l]}),i.extend(this.$,a[l]);break;case 584:this.$=new i.CreateDatabase({engineid:a[l-4].toUpperCase(),databaseid:a[l-1],as:a[l]}),i.extend(this.$,a[l-2]);break;case 585:this.$=new i.CreateDatabase({engineid:a[l-7].toUpperCase(),databaseid:a[l-4],args:a[l-2],as:a[l]}),i.extend(this.$,a[l-5]);break;case 586:this.$=new i.CreateDatabase({engineid:a[l-4].toUpperCase(),as:a[l],args:[a[l-1]]}),i.extend(this.$,a[l-2]);break;case 589:case 590:this.$=new i.UseDatabase({databaseid:a[l]});break;case 591:this.$=new i.DropDatabase({databaseid:a[l]}),i.extend(this.$,a[l-1]);break;case 592:case 593:this.$=new i.DropDatabase({databaseid:a[l],engineid:a[l-3].toUpperCase()}),i.extend(this.$,a[l-1]);break;case 594:this.$=new i.CreateIndex({indexid:a[l-5],table:a[l-3],columns:a[l-1]});break;case 595:this.$=new i.CreateIndex({indexid:a[l-5],table:a[l-3],columns:a[l-1],unique:!0});break;case 596:this.$=new i.DropIndex({indexid:a[l]});break;case 597:this.$=new i.ShowDatabases;break;case 598:this.$=new i.ShowDatabases({like:a[l]});break;case 599:this.$=new i.ShowDatabases({engineid:a[l-1].toUpperCase()});break;case 600:this.$=new i.ShowDatabases({engineid:a[l-3].toUpperCase(),like:a[l]});break;case 601:this.$=new i.ShowTables;break;case 602:this.$=new i.ShowTables({like:a[l]});break;case 603:this.$=new i.ShowTables({databaseid:a[l]});break;case 604:this.$=new i.ShowTables({like:a[l],databaseid:a[l-2]});break;case 605:this.$=new i.ShowColumns({table:a[l]});break;case 606:this.$=new i.ShowColumns({table:a[l-2],databaseid:a[l]});break;case 607:this.$=new i.ShowIndex({table:a[l]});break;case 608:this.$=new i.ShowIndex({table:a[l-2],databaseid:a[l]});break;case 609:this.$=new i.ShowCreateTable({table:a[l]});break;case 610:this.$=new i.ShowCreateTable({table:a[l-2],databaseid:a[l]});break;case 611:this.$=new i.CreateTable({table:a[l-6],view:!0,select:a[l-1],viewcolumns:a[l-4]}),i.extend(this.$,a[l-9]),i.extend(this.$,a[l-7]);break;case 612:this.$=new i.CreateTable({table:a[l-3],view:!0,select:a[l-1]}),i.extend(this.$,a[l-6]),i.extend(this.$,a[l-4]);break;case 616:this.$=new i.DropTable({tables:a[l],view:!0}),i.extend(this.$,a[l-1]);break;case 617:case 763:this.$=new i.ExpressionStatement({expression:a[l]});break;case 618:this.$=new i.Source({url:a[l].value});break;case 619:this.$=new i.Assert({value:a[l]});break;case 620:this.$=new i.Assert({value:a[l].value});break;case 621:this.$=new i.Assert({value:a[l],message:a[l-2]});break;case 623:case 634:case 636:this.$=a[l].value;break;case 624:case 632:this.$=+a[l].value;break;case 625:this.$=!!a[l].value;break;case 633:this.$=""+a[l].value;break;case 642:this.$={};break;case 645:case 1050:case 1070:case 1072:case 1074:case 1078:case 1080:case 1082:case 1084:case 1086:case 1088:this.$=[];break;case 646:i.extend(a[l-2],a[l]),this.$=a[l-2];break;case 648:this.$={},this.$[a[l-2].substr(1,a[l-2].length-2)]=a[l];break;case 649:case 650:this.$={},this.$[a[l-2]]=a[l];break;case 653:this.$=new i.SetVariable({variable:a[l-2].toLowerCase(),value:a[l]});break;case 654:this.$=new i.SetVariable({variable:a[l-1].toLowerCase(),value:a[l]});break;case 655:this.$=new i.SetVariable({variable:a[l-2],expression:a[l]});break;case 656:this.$=new i.SetVariable({variable:a[l-3],props:a[l-2],expression:a[l]});break;case 657:this.$=new i.SetVariable({variable:a[l-2],expression:a[l],method:a[l-3]});break;case 658:this.$=new i.SetVariable({variable:a[l-3],props:a[l-2],expression:a[l],method:a[l-4]});break;case 659:this.$="@";break;case 660:this.$="$";break;case 666:this.$=!0;break;case 667:this.$=!1;break;case 668:this.$=new i.CommitTransaction;break;case 669:this.$=new i.RollbackTransaction;break;case 670:this.$=new i.BeginTransaction;break;case 671:this.$=new i.If({expression:a[l-2],thenstat:a[l-1],elsestat:a[l]}),a[l-1].exists&&(this.$.exists=a[l-1].exists),a[l-1].queries&&(this.$.queries=a[l-1].queries);break;case 672:this.$=new i.If({expression:a[l-1],thenstat:a[l]}),a[l].exists&&(this.$.exists=a[l].exists),a[l].queries&&(this.$.queries=a[l].queries);break;case 674:this.$=new i.While({expression:a[l-1],loopstat:a[l]}),a[l].exists&&(this.$.exists=a[l].exists),a[l].queries&&(this.$.queries=a[l].queries);break;case 675:this.$=new i.Continue;break;case 676:this.$=new i.Break;break;case 677:this.$=new i.BeginEnd({statements:a[l-1]});break;case 678:this.$=new i.Print({exprs:a[l]});break;case 679:this.$=new i.Print({select:a[l]});break;case 680:this.$=new i.Require({paths:a[l]});break;case 681:this.$=new i.Require({plugins:a[l]});break;case 682:case 683:this.$=a[l].toUpperCase();break;case 684:this.$=new i.Echo({expr:a[l]});break;case 689:this.$=new i.Declare({declares:a[l]});break;case 692:this.$={variable:a[l-1]},i.extend(this.$,a[l]);break;case 693:this.$={variable:a[l-2]},i.extend(this.$,a[l]);break;case 694:this.$={variable:a[l-3],expression:a[l]},i.extend(this.$,a[l-2]);break;case 695:this.$={variable:a[l-4],expression:a[l]},i.extend(this.$,a[l-2]);break;case 696:this.$=new i.TruncateTable({table:a[l]});break;case 697:this.$=new i.Merge,i.extend(this.$,a[l-4]),i.extend(this.$,a[l-3]),i.extend(this.$,a[l-2]),i.extend(this.$,{matches:a[l-1]}),i.extend(this.$,a[l]);break;case 706:this.$={matched:!0,action:a[l]};break;case 707:this.$={matched:!0,expr:a[l-2],action:a[l]};break;case 708:this.$={delete:!0};break;case 709:this.$={update:a[l]};break;case 710:case 711:this.$={matched:!1,bytarget:!0,action:a[l]};break;case 712:case 713:this.$={matched:!1,bytarget:!0,expr:a[l-2],action:a[l]};break;case 714:this.$={matched:!1,bysource:!0,action:a[l]};break;case 715:this.$={matched:!1,bysource:!0,expr:a[l-2],action:a[l]};break;case 716:this.$={insert:!0,values:a[l]};break;case 717:this.$={insert:!0,values:a[l],columns:a[l-3]};break;case 718:this.$={insert:!0,defaultvalues:!0};break;case 719:this.$={insert:!0,defaultvalues:!0,columns:a[l-3]};break;case 721:this.$={output:{columns:a[l]}};break;case 722:this.$={output:{columns:a[l-3],intovar:a[l],method:a[l-1]}};break;case 723:this.$={output:{columns:a[l-2],intotable:a[l]}};break;case 724:this.$={output:{columns:a[l-5],intotable:a[l-3],intocolumns:a[l-1]}};break;case 725:this.$=new i.CreateVertex({class:a[l-3],sharp:a[l-2],name:a[l-1]}),i.extend(this.$,a[l]);break;case 728:this.$={sets:a[l]};break;case 729:this.$={content:a[l]};break;case 730:this.$={select:a[l]};break;case 731:this.$=new i.CreateEdge({from:a[l-3],to:a[l-1],name:a[l-5]}),i.extend(this.$,a[l]);break;case 732:this.$=new i.CreateGraph({graph:a[l]});break;case 733:this.$=new i.CreateGraph({from:a[l]});break;case 736:this.$=a[l-2],a[l-1]&&(this.$.json=new i.Json({value:a[l-1]})),a[l]&&(this.$.as=a[l]);break;case 737:this.$={source:a[l-6],target:a[l]},a[l-3]&&(this.$.json=new i.Json({value:a[l-3]})),a[l-2]&&(this.$.as=a[l-2]),i.extend(this.$,a[l-4]);break;case 738:this.$={source:a[l-5],target:a[l]},a[l-2]&&(this.$.json=new i.Json({value:a[l-3]})),a[l-1]&&(this.$.as=a[l-2]);break;case 739:this.$={source:a[l-2],target:a[l]};break;case 743:this.$={vars:a[l],method:a[l-1]};break;case 746:case 747:p=a[l-1],this.$={prop:a[l-3],sharp:a[l-2],name:void 0===p?void 0:p.substr(1,p.length-2),class:a[l]};break;case 748:var m=a[l-1];this.$={sharp:a[l-2],name:void 0===m?void 0:m.substr(1,m.length-2),class:a[l]};break;case 749:m=a[l-1],this.$={name:void 0===m?void 0:m.substr(1,m.length-2),class:a[l]};break;case 750:this.$={class:a[l]};break;case 756:this.$=new i.AddRule({left:a[l-2],right:a[l]});break;case 757:this.$=new i.AddRule({right:a[l]});break;case 760:this.$=new i.Term({termid:a[l]});break;case 761:this.$=new i.Term({termid:a[l-3],args:a[l-1]});break;case 764:this.$=new i.CreateTrigger({trigger:a[l-6],when:a[l-5],action:a[l-4],table:a[l-2],statement:a[l]}),a[l].exists&&(this.$.exists=a[l].exists),a[l].queries&&(this.$.queries=a[l].queries);break;case 765:this.$=new i.CreateTrigger({trigger:a[l-5],when:a[l-4],action:a[l-3],table:a[l-1],funcid:a[l]});break;case 766:this.$=new i.CreateTrigger({trigger:a[l-6],when:a[l-4],action:a[l-3],table:a[l-5],statement:a[l]}),a[l].exists&&(this.$.exists=a[l].exists),a[l].queries&&(this.$.queries=a[l].queries);break;case 767:case 768:case 770:this.$="AFTER";break;case 769:this.$="BEFORE";break;case 771:this.$="INSTEADOF";break;case 772:this.$="INSERT";break;case 773:this.$="DELETE";break;case 774:this.$="UPDATE";break;case 775:this.$=new i.DropTrigger({trigger:a[l]});break;case 776:this.$=new i.Reindex({indexid:a[l]});break;case 1051:case 1065:case 1067:case 1071:case 1073:case 1075:case 1079:case 1081:case 1083:case 1085:case 1087:case 1089:a[l-1].push(a[l])}},table:[e([10,604,765],t,{8:1,9:2,12:3,13:4,17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,2:n,4:i,5:o,14:a,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),{1:[3]},{10:[1,105],11:106,604:W,765:G},e(Y,[2,8]),e(Y,[2,9]),e(X,[2,12]),e(Y,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:109,2:n,4:i,5:o,15:[1,110],53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(X,[2,14]),e(X,[2,15]),e(X,[2,16]),e(X,[2,17]),e(X,[2,18]),e(X,[2,19]),e(X,[2,20]),e(X,[2,21]),e(X,[2,22]),e(X,[2,23]),e(X,[2,24]),e(X,[2,25]),e(X,[2,26]),e(X,[2,27]),e(X,[2,28]),e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(X,[2,35]),e(X,[2,36]),e(X,[2,37]),e(X,[2,38]),e(X,[2,39]),e(X,[2,40]),e(X,[2,41]),e(X,[2,42]),e(X,[2,43]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),e(X,[2,57]),e(X,[2,58]),e(X,[2,59]),e(X,[2,60]),e(X,[2,61]),e(X,[2,62]),e(X,[2,63]),e(X,[2,64]),e(X,[2,65]),e(X,[2,66]),e(X,[2,67]),{355:[1,111]},{2:n,3:112,4:i,5:o},{2:n,3:114,4:i,5:o,156:Z,200:113,292:K,293:J,294:Q,295:ee},e(te,[2,504],{3:121,350:125,2:n,4:i,5:o,134:ne,135:re,187:[1,123],193:[1,122],272:[1,129],273:[1,130],359:[1,131],407:[1,120],474:[1,124],511:[1,128]}),{145:ie,451:132,452:133},{183:[1,135]},{407:[1,136]},{2:n,3:138,4:i,5:o,130:[1,144],193:[1,139],355:[1,143],399:140,407:[1,137],412:[1,141],511:[1,142]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:145,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ve,qe,{342:204,171:[1,205],198:He}),e(Ve,qe,{342:207,198:He}),{2:n,3:219,4:i,5:o,77:$e,132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,198:[1,210],199:213,200:215,201:214,202:217,209:209,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue,455:208},{2:n,3:221,4:i,5:o},{355:[1,222]},e(Ye,[2,1046],{80:223,106:224,107:[1,225]}),e(Xe,[2,1050],{90:226}),{2:n,3:230,4:i,5:o,190:[1,228],193:[1,231],271:[1,227],355:[1,232],407:[1,229]},{355:[1,233]},{2:n,3:236,4:i,5:o,73:234,75:235},e([308,604,765],t,{12:3,13:4,17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,9:238,2:n,4:i,5:o,14:a,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,437:[1,237],438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),{437:[1,239]},{437:[1,240]},{2:n,3:242,4:i,5:o,407:[1,241]},{2:n,3:244,4:i,5:o,199:243},e(Ze,[2,314]),{113:245,132:se,298:De},{2:n,3:114,4:i,5:o,113:251,131:ae,132:[1,248],143:ce,144:246,145:Ke,152:de,156:Z,181:me,196:250,200:255,201:254,261:252,262:253,269:Je,278:247,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:257,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(X,[2,675]),e(X,[2,676]),{2:n,3:168,4:i,5:o,40:259,56:165,77:oe,79:75,89:c,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:258,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,184:99,189:f,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:266,4:i,5:o,113:263,132:se,298:De,446:261,447:262,448:264,449:Qe},{2:n,3:267,4:i,5:o,143:et,145:tt,433:268},{2:n,3:168,4:i,5:o,56:165,77:oe,94:271,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{507:[1,272]},{2:n,3:100,4:i,5:o,506:274,508:273},{2:n,3:114,4:i,5:o,156:Z,200:275,292:K,293:J,294:Q,295:ee},{2:n,3:168,4:i,5:o,56:165,77:oe,94:276,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(nt,rt,{186:280,164:[1,279],185:[1,277],187:[1,278],195:it}),e(ot,[2,760],{77:[1,282]}),e([2,4,5,10,72,77,78,93,98,107,118,128,131,132,137,143,145,152,154,156,162,164,168,169,179,180,181,183,185,187,195,198,232,244,245,249,251,269,270,274,275,277,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,300,301,304,305,308,312,314,319,422,426,604,765],[2,152],{149:[1,283],150:[1,284],190:[1,285],191:[1,286],192:[1,287],193:[1,288],194:[1,289]}),e(at,[2,1]),e(at,[2,2]),{6:290,131:[1,439],172:[1,462],243:[1,438],244:[1,373],245:[1,407],249:[1,411],372:[1,404],383:[1,295],404:[1,297],412:[1,549],416:[1,471],418:[1,443],419:[1,509],435:[1,442],437:[1,525],442:[1,342],462:[1,418],466:[1,448],472:[1,341],516:[1,307],517:[1,299],518:[1,399],520:[1,291],521:[1,292],522:[1,293],523:[1,294],524:[1,296],525:[1,298],526:[1,300],527:[1,301],528:[1,302],529:[1,303],530:[1,304],531:[1,305],532:[1,306],533:[1,308],534:[1,309],535:[1,310],536:[1,311],537:[1,312],538:[1,313],539:[1,314],540:[1,315],541:[1,316],542:[1,317],543:[1,318],544:[1,319],545:[1,320],546:[1,321],547:[1,322],548:[1,323],549:[1,324],550:[1,325],551:[1,326],552:[1,327],553:[1,328],554:[1,329],555:[1,330],556:[1,331],557:[1,332],558:[1,333],559:[1,334],560:[1,335],561:[1,336],562:[1,337],563:[1,338],564:[1,339],565:[1,340],566:[1,343],567:[1,344],568:[1,345],569:[1,346],570:[1,347],571:[1,348],572:[1,349],573:[1,350],574:[1,351],575:[1,352],576:[1,353],577:[1,354],578:[1,355],579:[1,356],580:[1,357],581:[1,358],582:[1,359],583:[1,360],584:[1,361],585:[1,362],586:[1,363],587:[1,364],588:[1,365],589:[1,366],590:[1,367],591:[1,368],592:[1,369],593:[1,370],594:[1,371],595:[1,372],596:[1,374],597:[1,375],598:[1,376],599:[1,377],600:[1,378],601:[1,379],602:[1,380],603:[1,381],604:[1,382],605:[1,383],606:[1,384],607:[1,385],608:[1,386],609:[1,387],610:[1,388],611:[1,389],612:[1,390],613:[1,391],614:[1,392],615:[1,393],616:[1,394],617:[1,395],618:[1,396],619:[1,397],620:[1,398],621:[1,400],622:[1,401],623:[1,402],624:[1,403],625:[1,405],626:[1,406],627:[1,408],628:[1,409],629:[1,410],630:[1,412],631:[1,413],632:[1,414],633:[1,415],634:[1,416],635:[1,417],636:[1,419],637:[1,420],638:[1,421],639:[1,422],640:[1,423],641:[1,424],642:[1,425],643:[1,426],644:[1,427],645:[1,428],646:[1,429],647:[1,430],648:[1,431],649:[1,432],650:[1,433],651:[1,434],652:[1,435],653:[1,436],654:[1,437],655:[1,440],656:[1,441],657:[1,444],658:[1,445],659:[1,446],660:[1,447],661:[1,449],662:[1,450],663:[1,451],664:[1,452],665:[1,453],666:[1,454],667:[1,455],668:[1,456],669:[1,457],670:[1,458],671:[1,459],672:[1,460],673:[1,461],674:[1,463],675:[1,464],676:[1,465],677:[1,466],678:[1,467],679:[1,468],680:[1,469],681:[1,470],682:[1,472],683:[1,473],684:[1,474],685:[1,475],686:[1,476],687:[1,477],688:[1,478],689:[1,479],690:[1,480],691:[1,481],692:[1,482],693:[1,483],694:[1,484],695:[1,485],696:[1,486],697:[1,487],698:[1,488],699:[1,489],700:[1,490],701:[1,491],702:[1,492],703:[1,493],704:[1,494],705:[1,495],706:[1,496],707:[1,497],708:[1,498],709:[1,499],710:[1,500],711:[1,501],712:[1,502],713:[1,503],714:[1,504],715:[1,505],716:[1,506],717:[1,507],718:[1,508],719:[1,510],720:[1,511],721:[1,512],722:[1,513],723:[1,514],724:[1,515],725:[1,516],726:[1,517],727:[1,518],728:[1,519],729:[1,520],730:[1,521],731:[1,522],732:[1,523],733:[1,524],734:[1,526],735:[1,527],736:[1,528],737:[1,529],738:[1,530],739:[1,531],740:[1,532],741:[1,533],742:[1,534],743:[1,535],744:[1,536],745:[1,537],746:[1,538],747:[1,539],748:[1,540],749:[1,541],750:[1,542],751:[1,543],752:[1,544],753:[1,545],754:[1,546],755:[1,547],756:[1,548],757:[1,550],758:[1,551],759:[1,552],760:[1,553],761:[1,554],762:[1,555],763:[1,556],764:[1,557]},{1:[2,6]},e(Y,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:558,2:n,4:i,5:o,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(st,[2,1044]),e(st,[2,1045]),e(Y,[2,10]),{16:[1,559]},{2:n,3:244,4:i,5:o,199:560},{407:[1,561]},e(X,[2,763]),{77:lt},{77:[1,563]},{77:ct},{77:[1,565]},{77:[1,566]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:567,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ve,ut,{352:568,156:ht}),{407:[1,570]},{2:n,3:571,4:i,5:o},{193:[1,572]},{2:n,3:578,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,183:[1,574],433:585,475:573,476:575,477:576,480:577,484:582,495:579,499:581},{130:[1,589],351:586,355:[1,588],412:[1,587]},{113:591,132:se,183:[2,1144],298:De,473:590},e(gt,[2,1138],{467:592,3:593,2:n,4:i,5:o}),{2:n,3:594,4:i,5:o},{4:[1,595]},{4:[1,596]},e(te,[2,505]),e(X,[2,689],{74:[1,597]}),e(mt,[2,690]),{2:n,3:598,4:i,5:o},{2:n,3:244,4:i,5:o,199:599},{2:n,3:600,4:i,5:o},e(Ve,vt,{400:601,156:yt}),{407:[1,603]},{2:n,3:604,4:i,5:o},e(Ve,vt,{400:605,156:yt}),e(Ve,vt,{400:606,156:yt}),{2:n,3:607,4:i,5:o},e(bt,[2,1132]),e(bt,[2,1133]),e(X,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:608,114:625,329:637,2:n,4:i,5:o,53:s,72:l,89:c,99:_t,112:xt,115:wt,116:At,123:kt,124:Tt,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,146:h,154:It,156:d,170:Rt,171:Pt,179:Nt,180:zt,189:f,270:p,271:m,292:v,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(Ze,[2,291]),e(Ze,[2,292]),e(Ze,[2,293]),e(Ze,[2,294]),e(Ze,[2,295]),e(Ze,[2,296]),e(Ze,[2,297]),e(Ze,[2,298]),e(Ze,[2,299]),e(Ze,[2,300]),e(Ze,[2,301]),e(Ze,[2,302]),e(Ze,[2,303]),e(Ze,[2,304]),e(Ze,[2,305]),e(Ze,[2,306]),e(Ze,[2,307]),e(Ze,[2,308]),{2:n,3:168,4:i,5:o,26:654,27:653,36:649,40:648,56:165,77:oe,79:75,89:c,94:651,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,184:99,189:f,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,268:650,269:be,270:p,271:[1,655],274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:[1,652],293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,341:_,421:190,422:je,426:Ue},e(Ze,[2,312]),e(Ze,[2,313]),{77:[1,656]},e([2,4,5,10,53,72,74,76,78,89,93,95,98,99,107,112,115,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],rn,{77:lt,116:[1,657]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:658,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:659,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:660,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:661,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,286]),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,231,232,239,244,245,246,247,249,251,253,269,270,271,274,275,277,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,300,301,302,304,305,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,417,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765,766,767],[2,359]),e(on,[2,360]),e(on,[2,361]),e(on,an),e(on,[2,363]),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,364]),{2:n,3:664,4:i,5:o,131:[1,665],303:663},{2:n,3:666,4:i,5:o},e(on,[2,370]),e(on,[2,371]),{2:n,3:667,4:i,5:o,77:sn,113:669,131:ae,132:se,143:ce,152:de,181:me,196:670,201:672,261:671,296:Oe,297:Le,298:De,304:Ne,421:673,426:Ue},{77:[1,674]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:675,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,306:676,309:677,310:ln,314:Fe,319:Be,421:190,422:je,426:Ue},{77:[1,679]},{77:[1,680]},e(cn,[2,627]),{2:n,3:695,4:i,5:o,77:un,111:690,113:688,131:ae,132:se,143:ce,144:685,145:Ke,152:de,156:Z,181:me,196:687,200:693,201:692,261:689,262:691,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,302:[1,683],304:Ne,421:190,422:je,423:681,424:684,425:686,426:Ue,429:682},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:696,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:697,4:i,5:o,156:Z,200:698,292:K,293:J,294:Q,295:ee},{77:[2,339]},{77:[2,340]},{77:[2,341]},{77:[2,342]},{77:[2,343]},{77:[2,344]},{77:[2,345]},{77:[2,346]},{77:[2,347]},{2:n,3:704,4:i,5:o,131:hn,132:dn,427:699,428:[1,700],430:701},{2:n,3:244,4:i,5:o,199:705},{292:[1,706]},e(Ve,[2,475]),{2:n,3:244,4:i,5:o,199:707},{231:[1,709],456:708},{231:[2,698]},{2:n,3:219,4:i,5:o,77:$e,132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,199:213,200:215,201:214,202:217,209:710,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},{40:711,79:75,89:c,184:99,189:f},e(fn,[2,1094],{210:712,76:[1,713]}),e(pn,[2,185],{3:714,2:n,4:i,5:o,76:[1,715],154:[1,716]}),e(pn,[2,189],{3:717,2:n,4:i,5:o,76:[1,718]}),e(pn,[2,190],{3:719,2:n,4:i,5:o,76:[1,720]}),e(pn,[2,193]),e(pn,[2,194],{3:721,2:n,4:i,5:o,76:[1,722]}),e(pn,[2,197],{3:723,2:n,4:i,5:o,76:[1,724]}),e([2,4,5,10,72,74,76,78,93,98,118,128,154,162,168,169,183,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],gn,{77:lt,116:mn}),e([2,4,5,10,72,74,76,78,93,98,118,128,162,168,169,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,308,312,604,765],[2,200]),e(X,[2,776]),{2:n,3:244,4:i,5:o,199:726},e(vn,yn,{81:727,198:bn}),e(Ye,[2,1047]),e(_n,[2,1060],{108:729,190:[1,730]}),e([10,78,183,308,312,604,765],yn,{421:190,81:731,117:732,3:733,114:736,144:758,158:768,160:769,2:n,4:i,5:o,72:xn,76:wn,77:An,112:kn,115:wt,116:At,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,198:bn,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,422:je,426:Ue}),{355:[1,782]},{183:[1,783]},e(X,[2,597],{112:[1,784]}),{407:[1,785]},{183:[1,786]},e(X,[2,601],{112:[1,787],183:[1,788]}),{2:n,3:244,4:i,5:o,199:789},{40:790,74:[1,791],79:75,89:c,184:99,189:f},e(hr,[2,70]),{76:[1,792]},e(X,[2,670]),{11:106,308:[1,793],604:W,765:G},e(X,[2,668]),e(X,[2,669]),{2:n,3:794,4:i,5:o},e(X,[2,590]),{146:[1,795]},e([2,4,5,10,53,72,74,76,77,78,89,95,124,128,143,145,146,148,149,152,154,156,181,183,187,189,230,270,271,292,299,304,308,312,337,340,341,345,346,358,370,371,375,376,398,402,403,404,405,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,516,517,518,519,604,765],gn,{116:mn}),e(X,[2,618]),e(X,[2,619]),e(X,[2,620]),e(X,an,{74:[1,796]}),{77:sn,113:669,131:ae,132:se,143:ce,152:de,181:me,196:670,201:672,261:671,296:Oe,297:Le,298:De,304:Ne,421:673,426:Ue},e(dr,[2,323]),e(dr,[2,324]),e(dr,[2,325]),e(dr,[2,326]),e(dr,[2,327]),e(dr,[2,328]),e(dr,[2,329]),e(X,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,114:625,329:637,12:797,2:n,4:i,5:o,53:s,72:l,89:c,99:_t,112:xt,115:wt,116:At,123:kt,124:Tt,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,146:h,154:It,156:d,170:Rt,171:Pt,179:Nt,180:zt,189:f,270:p,271:m,292:v,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(X,[2,678],{74:fr}),e(X,[2,679]),e(pr,[2,357],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(X,[2,680],{74:[1,800]}),e(X,[2,681],{74:[1,801]}),e(mt,[2,686]),e(mt,[2,688]),e(mt,[2,682]),e(mt,[2,683]),{114:807,115:wt,116:At,124:[1,802],230:mr,431:803,432:804,435:vr},{2:n,3:808,4:i,5:o},e(Ve,[2,659]),e(Ve,[2,660]),e(X,[2,617],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:100,4:i,5:o,506:274,508:809},e(X,[2,757],{74:yr}),e(br,[2,759]),e(X,[2,762]),e(X,[2,684],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(_r,rt,{186:811,195:it}),e(_r,rt,{186:812,195:it}),e(_r,rt,{186:813,195:it}),e(xr,[2,1090],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,188:814,174:815,257:816,94:817,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),{77:[1,819],131:ae,196:818},{2:n,3:100,4:i,5:o,506:274,508:820},e(wr,[2,153]),e(wr,[2,154]),e(wr,[2,155]),e(wr,[2,156]),e(wr,[2,157]),e(wr,[2,158]),e(wr,[2,159]),e(at,[2,3]),e(at,[2,777]),e(at,[2,778]),e(at,[2,779]),e(at,[2,780]),e(at,[2,781]),e(at,[2,782]),e(at,[2,783]),e(at,[2,784]),e(at,[2,785]),e(at,[2,786]),e(at,[2,787]),e(at,[2,788]),e(at,[2,789]),e(at,[2,790]),e(at,[2,791]),e(at,[2,792]),e(at,[2,793]),e(at,[2,794]),e(at,[2,795]),e(at,[2,796]),e(at,[2,797]),e(at,[2,798]),e(at,[2,799]),e(at,[2,800]),e(at,[2,801]),e(at,[2,802]),e(at,[2,803]),e(at,[2,804]),e(at,[2,805]),e(at,[2,806]),e(at,[2,807]),e(at,[2,808]),e(at,[2,809]),e(at,[2,810]),e(at,[2,811]),e(at,[2,812]),e(at,[2,813]),e(at,[2,814]),e(at,[2,815]),e(at,[2,816]),e(at,[2,817]),e(at,[2,818]),e(at,[2,819]),e(at,[2,820]),e(at,[2,821]),e(at,[2,822]),e(at,[2,823]),e(at,[2,824]),e(at,[2,825]),e(at,[2,826]),e(at,[2,827]),e(at,[2,828]),e(at,[2,829]),e(at,[2,830]),e(at,[2,831]),e(at,[2,832]),e(at,[2,833]),e(at,[2,834]),e(at,[2,835]),e(at,[2,836]),e(at,[2,837]),e(at,[2,838]),e(at,[2,839]),e(at,[2,840]),e(at,[2,841]),e(at,[2,842]),e(at,[2,843]),e(at,[2,844]),e(at,[2,845]),e(at,[2,846]),e(at,[2,847]),e(at,[2,848]),e(at,[2,849]),e(at,[2,850]),e(at,[2,851]),e(at,[2,852]),e(at,[2,853]),e(at,[2,854]),e(at,[2,855]),e(at,[2,856]),e(at,[2,857]),e(at,[2,858]),e(at,[2,859]),e(at,[2,860]),e(at,[2,861]),e(at,[2,862]),e(at,[2,863]),e(at,[2,864]),e(at,[2,865]),e(at,[2,866]),e(at,[2,867]),e(at,[2,868]),e(at,[2,869]),e(at,[2,870]),e(at,[2,871]),e(at,[2,872]),e(at,[2,873]),e(at,[2,874]),e(at,[2,875]),e(at,[2,876]),e(at,[2,877]),e(at,[2,878]),e(at,[2,879]),e(at,[2,880]),e(at,[2,881]),e(at,[2,882]),e(at,[2,883]),e(at,[2,884]),e(at,[2,885]),e(at,[2,886]),e(at,[2,887]),e(at,[2,888]),e(at,[2,889]),e(at,[2,890]),e(at,[2,891]),e(at,[2,892]),e(at,[2,893]),e(at,[2,894]),e(at,[2,895]),e(at,[2,896]),e(at,[2,897]),e(at,[2,898]),e(at,[2,899]),e(at,[2,900]),e(at,[2,901]),e(at,[2,902]),e(at,[2,903]),e(at,[2,904]),e(at,[2,905]),e(at,[2,906]),e(at,[2,907]),e(at,[2,908]),e(at,[2,909]),e(at,[2,910]),e(at,[2,911]),e(at,[2,912]),e(at,[2,913]),e(at,[2,914]),e(at,[2,915]),e(at,[2,916]),e(at,[2,917]),e(at,[2,918]),e(at,[2,919]),e(at,[2,920]),e(at,[2,921]),e(at,[2,922]),e(at,[2,923]),e(at,[2,924]),e(at,[2,925]),e(at,[2,926]),e(at,[2,927]),e(at,[2,928]),e(at,[2,929]),e(at,[2,930]),e(at,[2,931]),e(at,[2,932]),e(at,[2,933]),e(at,[2,934]),e(at,[2,935]),e(at,[2,936]),e(at,[2,937]),e(at,[2,938]),e(at,[2,939]),e(at,[2,940]),e(at,[2,941]),e(at,[2,942]),e(at,[2,943]),e(at,[2,944]),e(at,[2,945]),e(at,[2,946]),e(at,[2,947]),e(at,[2,948]),e(at,[2,949]),e(at,[2,950]),e(at,[2,951]),e(at,[2,952]),e(at,[2,953]),e(at,[2,954]),e(at,[2,955]),e(at,[2,956]),e(at,[2,957]),e(at,[2,958]),e(at,[2,959]),e(at,[2,960]),e(at,[2,961]),e(at,[2,962]),e(at,[2,963]),e(at,[2,964]),e(at,[2,965]),e(at,[2,966]),e(at,[2,967]),e(at,[2,968]),e(at,[2,969]),e(at,[2,970]),e(at,[2,971]),e(at,[2,972]),e(at,[2,973]),e(at,[2,974]),e(at,[2,975]),e(at,[2,976]),e(at,[2,977]),e(at,[2,978]),e(at,[2,979]),e(at,[2,980]),e(at,[2,981]),e(at,[2,982]),e(at,[2,983]),e(at,[2,984]),e(at,[2,985]),e(at,[2,986]),e(at,[2,987]),e(at,[2,988]),e(at,[2,989]),e(at,[2,990]),e(at,[2,991]),e(at,[2,992]),e(at,[2,993]),e(at,[2,994]),e(at,[2,995]),e(at,[2,996]),e(at,[2,997]),e(at,[2,998]),e(at,[2,999]),e(at,[2,1e3]),e(at,[2,1001]),e(at,[2,1002]),e(at,[2,1003]),e(at,[2,1004]),e(at,[2,1005]),e(at,[2,1006]),e(at,[2,1007]),e(at,[2,1008]),e(at,[2,1009]),e(at,[2,1010]),e(at,[2,1011]),e(at,[2,1012]),e(at,[2,1013]),e(at,[2,1014]),e(at,[2,1015]),e(at,[2,1016]),e(at,[2,1017]),e(at,[2,1018]),e(at,[2,1019]),e(at,[2,1020]),e(at,[2,1021]),e(at,[2,1022]),e(at,[2,1023]),e(at,[2,1024]),e(at,[2,1025]),e(at,[2,1026]),e(at,[2,1027]),e(at,[2,1028]),e(at,[2,1029]),e(at,[2,1030]),e(at,[2,1031]),e(at,[2,1032]),e(at,[2,1033]),e(at,[2,1034]),e(at,[2,1035]),e(at,[2,1036]),e(at,[2,1037]),e(at,[2,1038]),e(at,[2,1039]),e(at,[2,1040]),e(at,[2,1041]),e(at,[2,1042]),e(at,[2,1043]),e(Y,[2,7]),e(Y,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:821,2:n,4:i,5:o,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),{398:[1,825],403:[1,822],404:[1,823],405:[1,824]},{2:n,3:826,4:i,5:o},e(_r,[2,1114],{291:827,768:829,78:[1,828],164:[1,831],185:[1,830]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:832,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:833,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:834,4:i,5:o,132:[1,835]},{2:n,3:836,4:i,5:o,132:[1,837]},{2:n,3:838,4:i,5:o,99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:839,4:i,5:o},{154:[1,840]},e(Ar,ut,{352:841,156:ht}),{230:[1,842]},{2:n,3:843,4:i,5:o},e(X,[2,732],{74:kr}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:845,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(br,[2,735]),e(Tr,[2,1146],{421:190,478:846,144:847,139:Sr,141:Sr,145:Ke,422:je,426:Ue}),{139:[1,848],141:[1,849]},e(Er,Cr,{492:851,495:852,77:[1,850],137:ft}),e(Mr,[2,1170],{496:853,132:[1,854]}),e(Or,[2,1174],{498:855,499:856,152:pt}),e(Or,[2,750]),e(Lr,[2,742]),{2:n,3:857,4:i,5:o,131:[1,858]},{2:n,3:859,4:i,5:o},{2:n,3:860,4:i,5:o},e(Ve,ut,{352:861,156:ht}),e(Ve,ut,{352:862,156:ht}),e(bt,[2,494]),e(bt,[2,495]),{183:[1,863]},{183:[2,1145]},e(Dr,[2,1140],{468:864,471:865,137:[1,866]}),e(gt,[2,1139]),e(Ir,Rr,{512:867,95:Pr,230:[1,868],516:Nr,517:zr,518:Fr}),{76:[1,873]},{76:[1,874]},{145:ie,452:875},{4:Br,7:879,76:[1,877],276:876,389:878,391:jr},e(X,[2,459],{128:[1,882]}),e(X,[2,582]),{2:n,3:883,4:i,5:o},{300:[1,884]},e(Ar,vt,{400:885,156:yt}),e(X,[2,596]),{2:n,3:244,4:i,5:o,199:887,401:886},{2:n,3:244,4:i,5:o,199:887,401:888},e(X,[2,775]),e(Y,[2,672],{440:889,312:[1,890]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:891,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:892,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:893,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:894,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:895,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:896,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:897,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:898,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:899,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:900,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:901,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:902,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:903,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:904,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:905,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:906,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:907,4:i,5:o,77:[1,909],131:ae,156:Z,196:908,200:910,292:K,293:J,294:Q,295:ee},{2:n,3:911,4:i,5:o,77:[1,913],131:ae,156:Z,196:912,200:914,292:K,293:J,294:Q,295:ee},e(Ur,[2,443],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:915,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),e(Ur,[2,444],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:916,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),e(Ur,[2,445],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:917,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),e(Ur,[2,446],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:918,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),e(Ur,Vr,{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:919,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:920,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:921,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ur,[2,448],{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:922,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:923,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:924,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{164:[1,926],166:[1,928],330:925,336:[1,927]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:929,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:930,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:695,4:i,5:o,77:[1,931],111:934,145:qr,156:Z,200:935,202:933,292:K,293:J,294:Q,295:ee,331:932},{99:[1,937],299:[1,938]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:939,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:940,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:941,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{4:Br,7:879,276:942,389:878,391:jr},e(Hr,[2,88]),e(Hr,[2,89]),{78:[1,943]},{78:[1,944]},{78:[1,945]},{78:[1,946],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(Ve,qe,{342:207,77:ct,198:He}),{78:[2,1110]},{78:[2,1111]},{134:ne,135:re},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:947,152:de,154:fe,156:Z,158:167,164:[1,949],179:pe,180:ge,181:me,185:[1,948],196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:950,4:i,5:o,149:$r,180:[1,952]},e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,118,122,128,129,130,131,132,134,135,137,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,316,332,333,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,419],{114:625,329:637,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,334:tn}),e(Wr,[2,420],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,180:zt,314:Bt,318:Vt}),e(Wr,[2,421],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,180:zt,314:Bt,318:Vt}),e(Gr,[2,422],{114:625,329:637,318:Vt}),e(Gr,[2,423],{114:625,329:637,318:Vt}),e(on,[2,368]),e(on,[2,1116]),e(on,[2,1117]),e(on,[2,369]),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,231,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,365]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:953,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(cn,[2,623]),e(cn,[2,624]),e(cn,[2,625]),e(cn,[2,626]),e(cn,[2,628]),{40:954,79:75,89:c,184:99,189:f},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,306:955,309:677,310:ln,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{307:956,308:Yr,309:957,310:ln,312:Xr},e(Zr,[2,375]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:959,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:960,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{4:Br,7:879,276:961,389:878,391:jr},e(cn,[2,629]),{74:[1,963],302:[1,962]},e(cn,[2,645]),e(Kr,[2,652]),e(Jr,[2,630]),e(Jr,[2,631]),e(Jr,[2,632]),e(Jr,[2,633]),e(Jr,[2,634]),e(Jr,[2,635]),e(Jr,[2,636]),e(Jr,[2,637]),e(Jr,[2,638]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:964,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e([2,4,5,10,53,72,74,76,78,89,93,95,98,99,107,112,115,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,428,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],rn,{77:lt,116:Qr}),{74:fr,302:[1,966]},e(ei,[2,317],{77:lt}),e(Ze,[2,318]),{74:[1,968],428:[1,967]},e(cn,[2,642]),e(ti,[2,647]),{152:[1,969]},{152:[1,970]},{152:[1,971]},{40:976,77:[1,975],79:75,89:c,143:ce,144:979,145:Ke,149:ni,152:de,181:me,184:99,189:f,201:980,304:Ne,343:972,344:973,345:[1,974],346:ri,421:190,422:je,426:Ue},e(Ve,qe,{342:981,198:He}),{77:ii,143:ce,144:979,145:Ke,149:ni,152:de,181:me,201:980,304:Ne,343:982,344:983,346:ri,421:190,422:je,426:Ue},{230:[1,986],457:985},{2:n,3:219,4:i,5:o,77:$e,132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,199:213,200:215,201:214,202:217,209:987,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},{231:[2,699]},{78:[1,988]},e(pn,[2,1096],{211:989,3:990,2:n,4:i,5:o}),e(fn,[2,1095]),e(pn,[2,183]),{2:n,3:991,4:i,5:o},{212:[1,992]},e(pn,[2,187]),{2:n,3:993,4:i,5:o},e(pn,[2,191]),{2:n,3:994,4:i,5:o},e(pn,[2,195]),{2:n,3:995,4:i,5:o},e(pn,[2,198]),{2:n,3:996,4:i,5:o},{2:n,3:997,4:i,5:o},{148:[1,998]},e(oi,[2,172],{82:999,183:[1,1e3]}),{2:n,3:219,4:i,5:o,132:[1,1005],143:ce,145:[1,1006],152:de,156:Z,181:me,199:1001,200:1002,201:1003,202:1004,292:K,293:J,294:Q,295:ee,304:Ne},{2:n,3:1011,4:i,5:o,109:1007,110:1008,111:1009,112:ai},e(_n,[2,1061]),e(si,[2,1052],{91:1012,182:1013,183:[1,1014]}),e(Xe,[2,1051],{153:1015,179:li,180:ci,181:ui}),e([2,4,5,10,72,74,76,78,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,198,244,245,284,285,286,287,288,289,290,308,312,422,426,604,765],[2,90],{77:[1,1019]}),{119:[1,1020]},e(hi,[2,93]),{2:n,3:1021,4:i,5:o},e(hi,[2,95]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1022,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1023,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,112:kn,114:736,115:wt,116:At,117:1025,118:Tn,122:Sn,123:En,124:Cn,125:1024,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{77:[1,1026]},{77:[1,1027]},{77:[1,1028]},{77:[1,1029]},e(hi,[2,104]),e(hi,[2,105]),e(hi,[2,106]),e(hi,[2,107]),e(hi,[2,108]),e(hi,[2,109]),{2:n,3:1030,4:i,5:o},{2:n,3:1031,4:i,5:o,133:[1,1032]},e(hi,[2,113]),e(hi,[2,114]),e(hi,[2,115]),e(hi,[2,116]),e(hi,[2,117]),e(hi,[2,118]),{2:n,3:1033,4:i,5:o,77:sn,113:669,131:ae,132:se,143:ce,152:de,181:me,196:670,201:672,261:671,296:Oe,297:Le,298:De,304:Ne,421:673,426:Ue},{145:[1,1034]},{77:[1,1035]},{145:[1,1036]},e(hi,[2,123]),{77:[1,1037]},{2:n,3:1038,4:i,5:o},{77:[1,1039]},{77:[1,1040]},{77:[1,1041]},{77:[1,1042]},{77:[1,1043],164:[1,1044]},{77:[1,1045]},{77:[1,1046]},{77:[1,1047]},{77:[1,1048]},{77:[1,1049]},{77:[1,1050]},{77:[1,1051]},{77:[1,1052]},{77:[1,1053]},{77:[2,1076]},{77:[2,1077]},{2:n,3:244,4:i,5:o,199:1054},{2:n,3:244,4:i,5:o,199:1055},{113:1056,132:se,298:De},e(X,[2,599],{112:[1,1057]}),{2:n,3:244,4:i,5:o,199:1058},{113:1059,132:se,298:De},{2:n,3:1060,4:i,5:o},e(X,[2,696]),e(X,[2,68]),{2:n,3:236,4:i,5:o,75:1061},{77:[1,1062]},e(X,[2,677]),e(X,[2,589]),{2:n,3:1011,4:i,5:o,111:1065,143:di,145:fi,147:1063,338:1064,339:1066},{144:1069,145:Ke,421:190,422:je,426:Ue},e(X,[2,674]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1070,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ur,Vr,{259:146,200:147,260:148,111:149,258:150,196:151,261:152,113:153,262:154,201:155,202:156,263:157,264:158,265:159,144:161,266:162,267:163,56:165,158:167,3:168,421:190,94:1071,2:n,4:i,5:o,77:oe,131:ae,132:se,137:le,143:ce,145:ue,149:he,152:de,154:fe,156:Z,179:pe,180:ge,181:me,244:ve,245:ye,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,422:je,426:Ue}),{113:1072,132:se,298:De},{2:n,3:266,4:i,5:o,448:1073,449:Qe},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1075,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,230:mr,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue,431:1074,435:vr},e(X,[2,654]),{114:1077,115:wt,116:At,124:[1,1076]},e(X,[2,666]),e(X,[2,667]),{2:n,3:1079,4:i,5:o,77:pi,131:gi,434:1078},{114:807,115:wt,116:At,124:[1,1082],432:1083},e(X,[2,756],{74:yr}),{2:n,3:100,4:i,5:o,506:1084},{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,174:1085,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:816,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,174:1086,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:816,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,174:1087,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:816,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(xr,[2,151]),e(xr,[2,1091],{74:mi}),e(vi,[2,276]),e(vi,[2,283],{114:625,329:637,3:1090,113:1092,2:n,4:i,5:o,76:[1,1089],99:_t,112:xt,115:wt,116:At,123:kt,124:gr,131:[1,1091],132:se,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,298:De,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(nt,[2,1092],{197:1093,766:[1,1094]}),{131:ae,196:1095},{74:yr,78:[1,1096]},e(Y,[2,11]),{148:[1,1097],190:[1,1098]},{190:[1,1099]},{190:[1,1100]},{190:[1,1101]},e(X,[2,578],{76:[1,1103],77:[1,1102]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1104,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(on,[2,349]),e(_r,[2,1115]),e(_r,[2,1112]),e(_r,[2,1113]),{74:fr,78:[1,1105]},{74:fr,78:[1,1106]},{74:[1,1107]},{74:[1,1108]},{74:[1,1109]},{74:[1,1110]},e(on,[2,356]),e(X,[2,583]),{300:[1,1111]},{2:n,3:1112,4:i,5:o,113:1113,132:se,298:De},{2:n,3:244,4:i,5:o,199:1114},{230:[1,1115]},{2:n,3:578,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,433:585,476:1116,477:576,480:577,484:582,495:579,499:581},e(X,[2,733],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(br,[2,1148],{479:1117,485:1118,76:yi}),e(Tr,[2,1147]),{2:n,3:1122,4:i,5:o,132:dt,137:ft,144:1121,145:Ke,152:pt,421:190,422:je,426:Ue,477:1120,495:579,499:581},{2:n,3:1122,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,433:585,477:1124,480:1123,484:582,495:579,499:581},{2:n,3:578,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,433:585,475:1125,476:575,477:576,480:577,484:582,495:579,499:581},e(Mr,[2,1166],{493:1126,132:[1,1127]}),e(Er,[2,1165]),e(Or,[2,1172],{497:1128,499:1129,152:pt}),e(Mr,[2,1171]),e(Or,[2,749]),e(Or,[2,1175]),e(Er,[2,752]),e(Er,[2,753]),e(Or,[2,751]),e(Lr,[2,743]),{2:n,3:244,4:i,5:o,199:1130},{2:n,3:244,4:i,5:o,199:1131},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1132,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(bi,[2,1142],{469:1133,113:1134,132:se,298:De}),e(Dr,[2,1141]),{2:n,3:1135,4:i,5:o},{337:_i,340:xi,341:wi,513:1136},{2:n,3:244,4:i,5:o,199:1140},e(Ir,[2,768]),e(Ir,[2,769]),e(Ir,[2,770]),{129:[1,1141]},{270:[1,1142]},{270:[1,1143]},e(mt,[2,691]),e(mt,[2,692],{124:[1,1144]}),{4:Br,7:879,276:1145,389:878,391:jr},e([2,4,10,53,72,74,76,77,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,545],{5:[1,1146]}),e([2,5,10,53,72,74,76,78,89,93,95,98,99,107,112,115,116,118,122,123,124,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,230,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,299,302,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,345,358,370,371,375,376,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,542],{4:[1,1148],77:[1,1147]}),{77:[1,1149]},e(Ai,[2,4]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1150,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(X,[2,591]),e(Ar,[2,571]),{2:n,3:1151,4:i,5:o,113:1152,132:se,298:De},e(X,[2,567],{74:ki}),e(mt,[2,569]),e(X,[2,616],{74:ki}),e(X,[2,671]),e(X,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:1154,2:n,4:i,5:o,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(Ti,[2,379],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,318:Vt,319:qt,320:Ht,321:$t}),e(Gr,[2,380],{114:625,329:637,318:Vt}),e(Ti,[2,381],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,318:Vt,319:qt,320:Ht,321:$t}),e(Si,[2,382],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,316:[1,1155],318:Vt,319:qt,320:Ht,321:$t}),e(Si,[2,384],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,316:[1,1156],318:Vt,319:qt,320:Ht,321:$t}),e(Ze,[2,386],{114:625,329:637}),e(Wr,[2,387],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,180:zt,314:Bt,318:Vt}),e(Wr,[2,388],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,180:zt,314:Bt,318:Vt}),e(Ei,[2,389],{114:625,329:637,115:wt,116:At,123:kt,136:Et,314:Bt,318:Vt}),e(Ei,[2,390],{114:625,329:637,115:wt,116:At,123:kt,136:Et,314:Bt,318:Vt}),e(Ei,[2,391],{114:625,329:637,115:wt,116:At,123:kt,136:Et,314:Bt,318:Vt}),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,112,118,122,123,124,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,179,180,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,313,315,316,317,319,320,321,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,392],{114:625,329:637,115:wt,116:At,136:Et,314:Bt,318:Vt}),e(Ci,[2,393],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,179:Nt,180:zt,314:Bt,318:Vt,319:qt}),e(Ci,[2,394],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,179:Nt,180:zt,314:Bt,318:Vt,319:qt}),e(Ci,[2,395],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,179:Nt,180:zt,314:Bt,318:Vt,319:qt}),e(Ci,[2,396],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,179:Nt,180:zt,314:Bt,318:Vt,319:qt}),e(ei,[2,397],{77:lt}),e(Ze,[2,398]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1157,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,400]),e(ei,[2,401],{77:lt}),e(Ze,[2,402]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1158,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,404]),e(Mi,[2,405],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,406],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,407],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,408],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e([2,4,5,10,53,72,89,99,124,139,140,146,154,156,170,171,189,270,271,292,308,312,322,323,324,325,326,327,328,332,333,335,337,340,341,398,402,403,406,408,410,411,419,420,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,519,604,765],Oi,{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,410],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,411],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,412],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,413],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(Mi,[2,414],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),{77:[1,1159]},{77:[2,449]},{77:[2,450]},{77:[2,451]},e(Li,[2,417],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,334:tn}),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,107,118,122,128,129,130,131,132,134,135,137,143,145,146,148,149,150,152,156,162,164,166,168,169,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,316,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,418],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn}),{2:n,3:168,4:i,5:o,40:1160,56:165,77:oe,78:[1,1162],79:75,89:c,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1161,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,184:99,189:f,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,431]),e(Ze,[2,433]),e(Ze,[2,440]),e(Ze,[2,441]),{2:n,3:667,4:i,5:o,77:[1,1163]},{2:n,3:695,4:i,5:o,77:[1,1164],111:934,145:qr,156:Z,200:935,202:1166,292:K,293:J,294:Q,295:ee,331:1165},e(Ze,[2,438]),e(Li,[2,435],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,334:tn}),e(Li,[2,436],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,334:tn}),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,99,107,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,189,198,206,208,222,223,224,225,226,227,228,229,232,239,244,245,246,247,249,251,270,271,284,285,286,287,288,289,290,292,298,302,308,310,311,312,316,322,323,324,325,326,327,328,332,333,334,335,337,340,341,398,402,403,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,466,472,507,509,510,519,604,765],[2,437],{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t}),e(Ze,[2,439]),e(Ze,[2,309]),e(Ze,[2,310]),e(Ze,[2,311]),e(Ze,[2,424]),{74:fr,78:[1,1167]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1168,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1169,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,Di),e(Ii,[2,289]),e(Ze,[2,285]),{78:[1,1171],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1172]},{307:1173,308:Yr,309:957,310:ln,312:Xr},{308:[1,1174]},e(Zr,[2,374]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1175,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,311:[1,1176],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{76:[1,1177],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{74:[1,1178]},e(cn,[2,643]),{2:n,3:695,4:i,5:o,77:un,111:690,113:688,131:ae,132:se,143:ce,144:685,145:Ke,152:de,156:Z,181:me,196:687,200:693,201:692,261:689,262:691,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,302:[1,1179],304:Ne,421:190,422:je,424:1180,425:686,426:Ue},{78:[1,1181],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:1182,4:i,5:o,149:$r},e(Ze,[2,367]),e(cn,[2,640]),{2:n,3:704,4:i,5:o,131:hn,132:dn,428:[1,1183],430:1184},{2:n,3:695,4:i,5:o,77:un,111:690,113:688,131:ae,132:se,143:ce,144:685,145:Ke,152:de,156:Z,181:me,196:687,200:693,201:692,261:689,262:691,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne,421:190,422:je,424:1185,425:686,426:Ue},{2:n,3:695,4:i,5:o,77:un,111:690,113:688,131:ae,132:se,143:ce,144:685,145:Ke,152:de,156:Z,181:me,196:687,200:693,201:692,261:689,262:691,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne,421:190,422:je,424:1186,425:686,426:Ue},{2:n,3:695,4:i,5:o,77:un,111:690,113:688,131:ae,132:se,143:ce,144:685,145:Ke,152:de,156:Z,181:me,196:687,200:693,201:692,261:689,262:691,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne,421:190,422:je,424:1187,425:686,426:Ue},{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1188,421:190,422:je,426:Ue},e(Ri,[2,461],{74:Pi}),{149:ni,343:1190,346:ri},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1194,100:1191,111:1193,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,347:1192,421:190,422:je,426:Ue},e(Ri,[2,469]),e(Ni,[2,472]),e(Ni,[2,473]),e(zi,[2,477]),e(zi,[2,478]),{2:n,3:244,4:i,5:o,199:1195},{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1196,421:190,422:je,426:Ue},e(Ri,[2,465],{74:Pi}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1194,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,347:1192,421:190,422:je,426:Ue},{310:Fi,458:1197,460:1198,461:1199},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1201,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{230:[2,700]},e(pn,[2,181],{3:1202,2:n,4:i,5:o,76:[1,1203]}),e(pn,[2,182]),e(pn,[2,1097]),e(pn,[2,184]),e(pn,[2,186]),e(pn,[2,188]),e(pn,[2,192]),e(pn,[2,196]),e(pn,[2,199]),e([2,4,5,10,53,72,74,76,77,78,89,93,95,98,118,124,128,143,145,146,148,149,152,154,156,162,168,169,181,183,187,189,206,208,222,223,224,225,226,227,228,229,230,231,232,249,251,270,271,292,299,304,308,312,337,340,341,345,346,358,370,371,375,376,398,402,403,404,405,406,408,410,411,419,420,422,426,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,516,517,518,519,604,765],[2,201]),{2:n,3:1204,4:i,5:o},e(Bi,[2,1048],{83:1205,92:1206,93:[1,1207],98:[1,1208]}),{2:n,3:219,4:i,5:o,77:[1,1210],132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,199:213,200:215,201:214,202:217,203:1209,209:1211,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},e(vn,[2,164]),e(vn,[2,165]),e(vn,[2,166]),e(vn,[2,167]),e(vn,[2,168]),{2:n,3:667,4:i,5:o},e(Ye,[2,83],{74:[1,1212]}),e(ji,[2,85]),e(ji,[2,86]),{113:1213,132:se,298:De},e([10,72,74,78,93,98,118,124,128,162,168,169,183,198,206,208,222,223,224,225,226,227,228,229,232,249,251,308,312,604,765],rn,{116:Qr}),e(si,[2,73]),e(si,[2,1053]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1214,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(hi,[2,126]),e(hi,[2,144]),e(hi,[2,145]),e(hi,[2,146]),{2:n,3:168,4:i,5:o,56:165,77:oe,78:[2,1068],94:260,111:149,113:153,127:1215,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1216,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{77:[1,1217]},e(hi,[2,94]),e([2,4,5,10,72,74,76,77,78,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,198,244,245,284,285,286,287,288,289,290,308,312,422,426,604,765],[2,96],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e([2,4,5,10,72,74,76,77,78,112,118,122,124,128,129,130,131,132,134,135,137,139,140,143,145,146,148,149,150,152,154,156,162,164,166,168,169,170,171,172,173,175,181,183,185,187,198,244,245,284,285,286,287,288,289,290,308,312,422,426,604,765],[2,97],{114:625,329:637,99:_t,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1218],112:kn,114:736,115:wt,116:At,117:1219,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},e(Ui,[2,1064],{153:1015,179:li,180:ci,181:ui}),{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,112:kn,114:736,115:wt,116:At,117:1221,118:Tn,122:Sn,123:En,124:Cn,126:1220,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1222,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1223,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1224,4:i,5:o},e(hi,[2,110]),e(hi,[2,111]),e(hi,[2,112]),e(hi,[2,119]),{2:n,3:1225,4:i,5:o},{2:n,3:1011,4:i,5:o,111:1065,143:di,145:fi,147:1226,338:1064,339:1066},{2:n,3:1227,4:i,5:o},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1228,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(hi,[2,125]),e(Ui,[2,1070],{155:1229}),e(Ui,[2,1072],{157:1230}),e(Ui,[2,1074],{159:1231}),e(Ui,[2,1078],{161:1232}),e(Vi,qi,{163:1233,178:1234}),{77:[1,1235]},e(Ui,[2,1080],{165:1236}),e(Ui,[2,1082],{167:1237}),e(Vi,qi,{178:1234,163:1238}),e(Vi,qi,{178:1234,163:1239}),e(Vi,qi,{178:1234,163:1240}),e(Vi,qi,{178:1234,163:1241}),{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,112:kn,114:736,115:wt,116:At,117:1242,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,174:1243,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:816,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Hi,[2,1084],{176:1244}),e(X,[2,609],{183:[1,1245]}),e(X,[2,605],{183:[1,1246]}),e(X,[2,598]),{113:1247,132:se,298:De},e(X,[2,607],{183:[1,1248]}),e(X,[2,602]),e(X,[2,603],{112:[1,1249]}),e(hr,[2,69]),{40:1250,79:75,89:c,184:99,189:f},e(X,[2,453],{74:$i,128:[1,1251]}),e(Wi,[2,454]),{124:[1,1253]},{2:n,3:1254,4:i,5:o},e(Ve,[2,1118]),e(Ve,[2,1119]),e(X,[2,621]),e(pr,[2,358],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(Mi,Oi,{114:625,329:637,112:xt,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,334:tn}),e(mt,[2,685]),e(mt,[2,687]),e(X,[2,653]),e(X,[2,655],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1255,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1079,4:i,5:o,77:pi,131:gi,434:1256},e(Gi,[2,662]),e(Gi,[2,663]),e(Gi,[2,664]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1257,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1258,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{114:1077,115:wt,116:At,124:[1,1259]},e(br,[2,758]),e(xr,[2,148],{74:mi}),e(xr,[2,149],{74:mi}),e(xr,[2,150],{74:mi}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:1260,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1261,4:i,5:o,113:1263,131:[1,1262],132:se,298:De},e(vi,[2,278]),e(vi,[2,280]),e(vi,[2,282]),e(nt,[2,160]),e(nt,[2,1093]),{78:[1,1264]},e(ot,[2,761]),{2:n,3:1265,4:i,5:o},{2:n,3:1266,4:i,5:o},{2:n,3:1268,4:i,5:o,386:1267},{2:n,3:1268,4:i,5:o,386:1269},{2:n,3:1270,4:i,5:o},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1271,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1272,4:i,5:o},{74:fr,78:[1,1273]},e(on,[2,350]),e(on,[2,351]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1274,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1275,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1276,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1277,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ar,[2,507]),e(X,Yi,{409:1278,76:Xi,77:[1,1279]}),e(X,Yi,{409:1281,76:Xi}),{77:[1,1282]},{2:n,3:244,4:i,5:o,199:1283},e(br,[2,734]),e(br,[2,736]),e(br,[2,1149]),{143:et,145:tt,433:1284},e(Zi,[2,1150],{421:190,481:1285,144:1286,145:Ke,422:je,426:Ue}),{76:yi,139:[2,1154],483:1287,485:1288},e([10,74,76,78,132,139,145,152,308,312,422,426,604,765],Cr,{492:851,495:852,137:ft}),e(br,[2,739]),e(br,Sr),{74:kr,78:[1,1289]},e(Or,[2,1168],{494:1290,499:1291,152:pt}),e(Mr,[2,1167]),e(Or,[2,748]),e(Or,[2,1173]),e(X,[2,493],{77:[1,1292]}),{76:[1,1294],77:[1,1293]},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,148:[1,1295],154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(Ri,Ki,{79:75,184:99,470:1296,40:1299,89:c,146:Ji,189:f,472:Qi}),e(bi,[2,1143]),e(Dr,[2,726]),{230:[1,1300]},e(eo,[2,772]),e(eo,[2,773]),e(eo,[2,774]),e(Ir,Rr,{512:1301,95:Pr,516:Nr,517:zr,518:Fr}),e(Ir,[2,771]),e(X,[2,315]),e(X,[2,316]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1302,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(mt,[2,693],{124:[1,1303]}),e(Ai,[2,544]),{131:[1,1305],390:1304,392:[1,1306]},e(Ai,[2,5]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1194,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,347:1307,421:190,422:je,426:Ue},e(X,[2,458],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(X,[2,592]),e(X,[2,593]),{2:n,3:244,4:i,5:o,199:1308},e(X,[2,673]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1309,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1310,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{78:[1,1311],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1312],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:168,4:i,5:o,40:1313,56:165,77:oe,79:75,89:c,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1314,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,184:99,189:f,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{78:[1,1315]},{74:fr,78:[1,1316]},e(Ze,[2,429]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1317,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,40:1318,56:165,77:oe,78:[1,1320],79:75,89:c,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1319,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,184:99,189:f,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,432]),e(Ze,[2,434]),e(Ze,to,{279:1321,280:no}),{78:[1,1323],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1324],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:1325,4:i,5:o,180:[1,1326]},e(cn,[2,622]),e(Ze,[2,366]),{308:[1,1327]},e(Ze,[2,373]),{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,308:[2,377],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1328,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{4:Br,7:879,276:1329,389:878,391:jr},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1330,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(cn,[2,644]),e(Kr,[2,651]),e(Jr,[2,639]),e(Ii,Di),e(cn,[2,641]),e(ti,[2,646]),e(ti,[2,648]),e(ti,[2,649]),e(ti,[2,650]),e(Ri,[2,460],{74:Pi}),{77:[1,1332],143:ce,144:1333,145:Ke,152:de,181:me,201:1334,304:Ne,421:190,422:je,426:Ue},e(Ri,[2,466]),{74:ro,78:[1,1335]},{74:io,78:[1,1337]},e([74,78,99,112,115,116,123,124,133,136,138,139,140,141,142,154,170,171,179,180,313,314,315,317,318,319,320,321,322,323,324,325,326,327,328,332,333,334,335],oo),e(ao,[2,482],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{40:1341,77:ii,79:75,89:c,143:ce,144:979,145:Ke,149:ni,152:de,181:me,184:99,189:f,201:980,304:Ne,343:1339,344:1340,346:ri,421:190,422:je,426:Ue},e(Ri,[2,464],{74:Pi}),e(X,[2,720],{459:1342,460:1343,461:1344,310:Fi,466:[1,1345]}),e(so,[2,704]),e(so,[2,705]),{154:[1,1347],462:[1,1346]},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,310:[2,701],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(pn,[2,179]),{2:n,3:1348,4:i,5:o},e(X,[2,577]),e(lo,[2,238],{84:1349,128:[1,1350]}),e(Bi,[2,1049]),{77:[1,1351]},{77:[1,1352]},e(oi,[2,169],{204:1353,215:1355,205:1356,216:1357,221:1360,74:co,206:uo,208:ho,222:fo,223:po,224:go,225:mo,226:vo,227:yo,228:bo,229:_o}),{2:n,3:219,4:i,5:o,40:711,77:$e,79:75,89:c,132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,184:99,189:f,199:213,200:215,201:214,202:217,203:1369,209:1211,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},e(xo,[2,177]),{2:n,3:1011,4:i,5:o,110:1370,111:1009,112:ai},e(ji,[2,87]),e(si,[2,147],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{78:[1,1371]},{74:fr,78:[2,1069]},{2:n,3:168,4:i,5:o,56:165,77:oe,78:[2,1062],94:1376,111:149,113:153,120:1372,121:1373,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1374,244:ve,245:ye,246:[1,1375],258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(hi,[2,98]),e(Ui,[2,1065],{153:1015,179:li,180:ci,181:ui}),{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1377],112:kn,114:736,115:wt,116:At,117:1378,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},e(Ui,[2,1066],{153:1015,179:li,180:ci,181:ui}),{78:[1,1379],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1380],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1381]},e(hi,[2,120]),{74:$i,78:[1,1382]},e(hi,[2,122]),{74:fr,78:[1,1383]},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1384],112:kn,114:736,115:wt,116:At,117:1385,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1386],112:kn,114:736,115:wt,116:At,117:1387,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1388],112:kn,114:736,115:wt,116:At,117:1389,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1390],112:kn,114:736,115:wt,116:At,117:1391,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{74:wo,78:[1,1392]},e(ao,[2,143],{421:190,3:733,114:736,144:758,158:768,160:769,117:1394,2:n,4:i,5:o,72:xn,76:wn,77:An,112:kn,115:wt,116:At,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,422:je,426:Ue}),e(Vi,qi,{178:1234,163:1395}),{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1396],112:kn,114:736,115:wt,116:At,117:1397,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:733,4:i,5:o,72:xn,76:wn,77:An,78:[1,1398],112:kn,114:736,115:wt,116:At,117:1399,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{74:wo,78:[1,1400]},{74:wo,78:[1,1401]},{74:wo,78:[1,1402]},{74:wo,78:[1,1403]},{78:[1,1404],153:1015,179:li,180:ci,181:ui},{74:mi,78:[1,1405]},{2:n,3:733,4:i,5:o,72:xn,74:[1,1406],76:wn,77:An,112:kn,114:736,115:wt,116:At,117:1407,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,144:758,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,158:768,160:769,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,421:190,422:je,426:Ue},{2:n,3:1408,4:i,5:o},{2:n,3:1409,4:i,5:o},e(X,[2,600]),{2:n,3:1410,4:i,5:o},{113:1411,132:se,298:De},{78:[1,1412]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1413,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1011,4:i,5:o,111:1065,143:di,145:fi,338:1414,339:1066},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1415,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{124:[1,1416]},e(X,[2,656],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(Gi,[2,661]),{78:[1,1417],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(X,[2,657],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1418,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(vi,[2,275]),e(vi,[2,277]),e(vi,[2,279]),e(vi,[2,281]),e(nt,[2,161]),e(X,[2,572]),{148:[1,1419]},e(X,[2,573]),e(br,[2,539],{389:878,7:879,276:1420,4:Br,388:[1,1421],391:jr}),e(X,[2,574]),e(X,[2,576]),{74:fr,78:[1,1422]},e(X,[2,580]),e(on,[2,348]),{74:[1,1423],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{74:[1,1424],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{74:[1,1425],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{74:[1,1426],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(X,[2,584]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1427,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1428,4:i,5:o},e(X,[2,586]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1376,111:149,113:153,120:1429,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1374,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{77:[1,1430]},{2:n,3:1431,4:i,5:o},{76:yi,139:[2,1152],482:1432,485:1433},e(Zi,[2,1151]),{139:[1,1434]},{139:[2,1155]},e(br,[2,740]),e(Or,[2,747]),e(Or,[2,1169]),{2:n,3:1268,4:i,5:o,76:[1,1437],353:1435,360:1436,386:1438},{2:n,3:1011,4:i,5:o,100:1439,111:1440},{40:1441,79:75,89:c,184:99,189:f},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1442,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ri,[2,725]),{2:n,3:1011,4:i,5:o,111:1065,143:di,145:fi,147:1443,338:1064,339:1066},{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1444,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ri,[2,730]),{2:n,3:244,4:i,5:o,199:1445},{337:_i,340:xi,341:wi,513:1446},e(mt,[2,694],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1447,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{74:[1,1448],78:[1,1449]},e(ao,[2,546]),e(ao,[2,547]),{74:io,78:[1,1450]},e(mt,[2,568]),e(Ti,[2,383],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,318:Vt,319:qt,320:Ht,321:$t}),e(Ti,[2,385],{114:625,329:637,115:wt,116:At,123:kt,133:St,136:Et,138:Ct,141:Lt,142:Dt,179:Nt,180:zt,314:Bt,318:Vt,319:qt,320:Ht,321:$t}),e(Ze,[2,399]),e(Ze,[2,403]),{78:[1,1451]},{74:fr,78:[1,1452]},e(Ze,[2,425]),e(Ze,[2,427]),{78:[1,1453],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1454]},{74:fr,78:[1,1455]},e(Ze,[2,430]),e(Ze,[2,330]),{77:[1,1456]},e(Ze,to,{279:1457,280:no}),e(Ze,to,{279:1458,280:no}),e(Ii,[2,287]),e(Ze,[2,284]),e(Ze,[2,372]),e(Zr,[2,376],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{74:[1,1460],78:[1,1459]},{74:[1,1462],78:[1,1461],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{2:n,3:1325,4:i,5:o},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1194,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,347:1463,421:190,422:je,426:Ue},e(zi,[2,480]),e(zi,[2,481]),{40:1466,77:ii,79:75,89:c,143:ce,144:979,145:Ke,149:ni,152:de,181:me,184:99,189:f,201:980,304:Ne,343:1464,344:1465,346:ri,421:190,422:je,426:Ue},{2:n,3:1011,4:i,5:o,111:1467},e(zi,[2,476]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1468,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1469,421:190,422:je,426:Ue},e(Ri,[2,463],{74:Pi}),e(Ri,[2,470]),e(X,[2,697]),e(so,[2,702]),e(so,[2,703]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:817,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,174:1470,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,257:816,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{170:[1,1472],311:[1,1471]},{462:[1,1473]},e(pn,[2,180]),e(Ao,[2,240],{85:1474,232:[1,1475]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1476,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1477,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1478,4:i,5:o},e(oi,[2,170],{216:1357,221:1360,215:1479,205:1480,206:uo,208:ho,222:fo,223:po,224:go,225:mo,226:vo,227:yo,228:bo,229:_o}),{2:n,3:219,4:i,5:o,77:$e,132:We,143:ce,144:212,145:ue,152:de,156:Z,181:me,199:213,200:215,201:214,202:217,209:1481,213:Ge,214:218,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},e(ko,[2,205]),e(ko,[2,206]),{2:n,3:219,4:i,5:o,77:[1,1486],143:ce,144:1484,145:ue,152:de,156:Z,181:me,199:1483,200:1487,201:1485,202:1488,217:1482,292:K,293:J,294:Q,295:ee,304:Ne,421:190,422:je,426:Ue},{207:[1,1489],223:To},{207:[1,1491],223:So},e(Eo,[2,222]),{206:[1,1495],208:[1,1494],221:1493,223:po,224:go,225:mo,226:vo,227:yo,228:bo,229:_o},e(Eo,[2,224]),{223:[1,1496]},{208:[1,1498],223:[1,1497]},{208:[1,1500],223:[1,1499]},{208:[1,1501]},{223:[1,1502]},{223:[1,1503]},{74:co,204:1504,205:1356,206:uo,208:ho,215:1355,216:1357,221:1360,222:fo,223:po,224:go,225:mo,226:vo,227:yo,228:bo,229:_o},e(ji,[2,84]),e(hi,[2,100]),{74:Co,78:[1,1505]},{78:[1,1507]},e(Mo,[2,261]),{78:[2,1063]},e(Mo,[2,265],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,246:[1,1508],247:[1,1509],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(hi,[2,99]),e(Ui,[2,1067],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,101]),e(hi,[2,102]),e(hi,[2,103]),e(hi,[2,121]),e(hi,[2,124]),e(hi,[2,127]),e(Ui,[2,1071],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,128]),e(Ui,[2,1073],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,129]),e(Ui,[2,1075],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,130]),e(Ui,[2,1079],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,131]),e(Vi,[2,1086],{177:1510}),e(Vi,[2,1089],{153:1015,179:li,180:ci,181:ui}),{74:wo,78:[1,1511]},e(hi,[2,133]),e(Ui,[2,1081],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,134]),e(Ui,[2,1083],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,135]),e(hi,[2,136]),e(hi,[2,137]),e(hi,[2,138]),e(hi,[2,139]),e(hi,[2,140]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:260,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,151:1512,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Hi,[2,1085],{153:1015,179:li,180:ci,181:ui}),e(X,[2,610]),e(X,[2,606]),e(X,[2,608]),e(X,[2,604]),e(hr,[2,71]),e(X,[2,452],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(Wi,[2,455]),e(Wi,[2,456],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1513,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Gi,[2,665]),e(X,[2,658],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:1514,4:i,5:o},e(br,[2,548],{387:1515,393:1516,394:1517,368:1525,154:Oo,187:Lo,230:Do,299:Io,345:Ro,358:Po,370:No,371:zo,375:Fo,376:Bo}),e(br,[2,538]),e(X,[2,579],{76:[1,1529]}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1530,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1531,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1532,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1533,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{74:fr,78:[1,1534]},e(X,[2,588]),{74:Co,78:[1,1535]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1376,111:149,113:153,120:1536,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1374,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e([10,74,78,139,308,312,604,765],[2,744]),{139:[1,1537]},{139:[2,1153]},{2:n,3:1122,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,433:585,477:1124,480:1538,484:582,495:579,499:581},{78:[1,1539]},{74:[1,1540],78:[2,509]},{40:1541,79:75,89:c,184:99,189:f},e(ao,[2,535]),{74:ro,78:[1,1542]},e(xo,oo),e(X,[2,1136],{414:1543,415:1544,72:jo}),e(Ri,Ki,{79:75,184:99,114:625,329:637,40:1299,470:1546,89:c,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,146:Ji,154:It,170:Rt,171:Pt,179:Nt,180:zt,189:f,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn,472:Qi}),e(Ri,[2,728],{74:$i}),e(Ri,[2,729],{74:fr}),e([10,53,72,89,124,146,156,189,270,271,292,308,312,337,340,341,398,402,403,406,408,410,411,419,420,436,438,439,441,442,443,444,445,449,450,453,454,507,509,510,519,604,765],[2,1184],{514:1547,3:1548,2:n,4:i,5:o,76:[1,1549]}),e(Uo,[2,1186],{515:1550,76:[1,1551]}),e(mt,[2,695],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{131:[1,1552]},e(Ai,[2,541]),e(Ai,[2,543]),e(Ze,[2,415]),e(Ze,[2,416]),e(Ze,[2,442]),e(Ze,[2,426]),e(Ze,[2,428]),{118:Vo,281:1553,282:1554,283:[1,1555]},e(Ze,[2,331]),e(Ze,[2,332]),e(Ze,[2,319]),{131:[1,1557]},e(Ze,[2,321]),{131:[1,1558]},{74:io,78:[1,1559]},{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1560,421:190,422:je,426:Ue},e(Ri,[2,468],{74:Pi}),e(Ri,[2,471]),e(xo,[2,491]),e(ao,[2,483],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(Ri,[2,462],{74:Pi}),e(X,[2,721],{74:mi,198:[1,1561]}),{337:qo,340:Ho,463:1562},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1565,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{119:[1,1567],170:[1,1568],311:[1,1566]},e($o,[2,259],{86:1569,118:[1,1570]}),{119:[1,1571]},e(lo,[2,239],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{95:[1,1572],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{95:[1,1573]},e(ko,[2,203]),e(ko,[2,204]),e(xo,[2,178]),e(ko,[2,237],{218:1574,230:[1,1575],231:[1,1576]}),e(Wo,[2,208],{3:1577,2:n,4:i,5:o,76:[1,1578]}),e(Go,[2,1098],{219:1579,76:[1,1580]}),{2:n,3:1581,4:i,5:o,76:[1,1582]},{40:1583,79:75,89:c,184:99,189:f},e(Wo,[2,216],{3:1584,2:n,4:i,5:o,76:[1,1585]}),e(Wo,[2,219],{3:1586,2:n,4:i,5:o,76:[1,1587]}),{77:[1,1588]},e(Eo,[2,234]),{77:[1,1589]},e(Eo,[2,230]),e(Eo,[2,223]),{223:So},{223:To},e(Eo,[2,225]),e(Eo,[2,226]),{223:[1,1590]},e(Eo,[2,228]),{223:[1,1591]},{223:[1,1592]},e(Eo,[2,232]),e(Eo,[2,233]),{78:[1,1593],205:1480,206:uo,208:ho,215:1479,216:1357,221:1360,222:fo,223:po,224:go,225:mo,226:vo,227:yo,228:bo,229:_o},e(hi,[2,91]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1376,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1594,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(hi,[2,92]),e(Mo,[2,266],{242:1595,243:[1,1596]}),{248:[1,1597]},e(ao,[2,142],{421:190,3:733,114:736,144:758,158:768,160:769,117:1598,2:n,4:i,5:o,72:xn,76:wn,77:An,112:kn,115:wt,116:At,118:Tn,122:Sn,123:En,124:Cn,128:Mn,129:On,130:Ln,131:Dn,132:In,133:Rn,134:Pn,135:Nn,136:zn,137:Fn,138:Bn,139:jn,140:Un,141:Vn,142:qn,143:Hn,145:$n,146:Wn,148:Gn,149:Yn,150:Xn,152:Zn,154:Kn,156:Jn,162:Qn,164:er,166:tr,168:nr,169:rr,170:ir,171:or,172:ar,173:sr,175:lr,185:cr,187:ur,244:ve,245:ye,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,422:je,426:Ue}),e(hi,[2,132]),{74:fr,78:[1,1599]},e(Wi,[2,457],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(X,[2,575]),e(br,[2,537]),e(br,[2,549],{368:1525,394:1600,154:Oo,187:Lo,230:Do,299:Io,345:Ro,358:Po,370:No,371:zo,375:Fo,376:Bo}),e(dr,[2,551]),{372:[1,1601]},{372:[1,1602]},{2:n,3:244,4:i,5:o,199:1603},e(dr,[2,557],{77:[1,1604]}),{2:n,3:114,4:i,5:o,77:[1,1606],113:251,131:ae,132:se,143:ce,152:de,156:Z,181:me,196:250,200:1607,201:254,261:252,262:253,269:Je,278:1605,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne},e(dr,[2,561]),{299:[1,1608]},e(dr,[2,563]),e(dr,[2,564]),{337:[1,1609]},{77:[1,1610]},{2:n,3:1611,4:i,5:o},{78:[1,1612],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1613],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1614],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{78:[1,1615],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(X,Yi,{409:1616,76:Xi}),e(X,[2,594]),{74:Co,78:[1,1617]},{2:n,3:1122,4:i,5:o,132:dt,137:ft,143:et,145:tt,152:pt,433:585,477:1124,480:1618,484:582,495:579,499:581},e(br,[2,738]),e(X,[2,496],{354:1619,356:1620,357:1621,4:Yo,247:Xo,345:Zo,358:Ko}),e(Jo,Qo,{3:1268,361:1626,386:1627,362:1628,363:1629,2:n,4:i,5:o,369:ea}),{78:[2,510]},{76:[1,1631]},e(X,[2,612]),e(X,[2,1137]),{370:[1,1633],416:[1,1632]},e(Ri,[2,731]),e(X,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:1634,2:n,4:i,5:o,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(X,[2,765]),e(Uo,[2,1185]),e(X,t,{17:5,18:7,19:8,20:9,21:10,22:11,23:12,24:13,25:14,26:15,27:16,28:17,29:18,30:19,31:20,32:21,33:22,34:23,35:24,36:25,37:26,38:27,39:28,40:29,41:30,42:31,43:32,44:33,45:34,46:35,47:36,48:37,49:38,50:39,51:40,52:41,54:43,55:44,56:45,57:46,58:47,59:48,60:49,61:50,62:51,63:52,64:53,65:54,66:55,67:56,68:57,69:58,70:59,71:60,79:75,506:95,184:99,3:100,12:1635,2:n,4:i,5:o,53:s,72:l,89:c,124:u,146:h,156:d,189:f,270:p,271:m,292:v,337:y,340:b,341:_,398:x,402:w,403:A,406:k,408:T,410:S,411:E,419:C,420:M,436:O,438:L,439:D,441:I,442:R,443:P,444:N,445:z,449:F,450:B,453:j,454:U,507:V,509:q,510:H,519:$}),e(Uo,[2,1187]),{78:[1,1636]},{78:[1,1637],118:Vo,282:1638},{78:[1,1639]},{119:[1,1640]},{119:[1,1641]},{78:[1,1642]},{78:[1,1643]},e(zi,[2,479]),e(Ri,[2,467],{74:Pi}),{2:n,3:244,4:i,5:o,143:et,145:tt,199:1645,433:1644},e(so,[2,706]),e(so,[2,708]),{146:[1,1646]},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,311:[1,1647],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},{341:ta,464:1648},{419:[1,1651],465:[1,1650]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1652,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(na,[2,270],{87:1653,249:[1,1654],251:[1,1655]}),{119:[1,1656]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,233:1657,235:1658,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1663,4:i,5:o},{2:n,3:1664,4:i,5:o},e(ko,[2,207]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1665,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1011,4:i,5:o,100:1666,111:1440},e(Wo,[2,209]),{2:n,3:1667,4:i,5:o},e(Wo,[2,1100],{220:1668,3:1669,2:n,4:i,5:o}),e(Go,[2,1099]),e(Wo,[2,212]),{2:n,3:1670,4:i,5:o},{78:[1,1671]},e(Wo,[2,217]),{2:n,3:1672,4:i,5:o},e(Wo,[2,220]),{2:n,3:1673,4:i,5:o},{40:1674,79:75,89:c,184:99,189:f},{40:1675,79:75,89:c,184:99,189:f},e(Eo,[2,227]),e(Eo,[2,229]),e(Eo,[2,231]),e(oi,[2,171]),e(Mo,[2,262]),e(Mo,[2,267]),{244:[1,1676],245:[1,1677]},e(Mo,[2,268],{246:[1,1678]}),e(Vi,[2,1087],{153:1015,179:li,180:ci,181:ui}),e(hi,[2,141]),e(dr,[2,550]),e(dr,[2,553]),{376:[1,1679]},e(dr,[2,1130],{397:1680,395:1681,77:aa}),{131:ae,196:1683},e(dr,[2,558]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1684,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(dr,[2,560]),e(dr,[2,562]),{2:n,3:114,4:i,5:o,77:[1,1686],113:251,131:ae,132:se,143:ce,152:de,156:Z,181:me,196:250,200:255,201:254,261:252,262:253,269:Je,278:1685,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,304:Ne},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1687,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(X,[2,581]),e(on,[2,352]),e(on,[2,353]),e(on,[2,354]),e(on,[2,355]),e(X,[2,585]),e(X,[2,595]),e(br,[2,737]),e(X,[2,492]),e(X,[2,497],{357:1688,4:Yo,247:Xo,345:Zo,358:Ko}),e(sa,[2,499]),e(sa,[2,500]),{124:[1,1689]},{124:[1,1690]},{124:[1,1691]},{74:[1,1692],78:[2,508]},e(ao,[2,536]),e(ao,[2,511]),{187:[1,1700],193:[1,1701],364:1693,365:1694,366:1695,367:1696,368:1697,370:No,371:[1,1698],372:[1,1702],375:[1,1699]},{2:n,3:1703,4:i,5:o},{40:1704,79:75,89:c,184:99,189:f},{417:[1,1705]},{418:[1,1706]},e(X,[2,764]),e(X,[2,766]),e(Ai,[2,540]),e(Ze,[2,334]),{78:[1,1707]},e(Ze,[2,335]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,233:1708,235:1658,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1376,111:149,113:153,120:1709,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1374,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ze,[2,320]),e(Ze,[2,322]),{2:n,3:1710,4:i,5:o},e(X,[2,723],{77:[1,1711]}),{2:n,3:1011,4:i,5:o,111:1065,143:di,145:fi,147:1712,338:1064,339:1066},{337:qo,340:Ho,463:1713},e(so,[2,710]),{77:[1,1715],345:[1,1716],346:[1,1714]},{170:[1,1718],311:[1,1717]},{170:[1,1720],311:[1,1719]},{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,311:[1,1721],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(si,[2,250],{88:1722,162:[1,1723],168:[1,1725],169:[1,1724]}),{131:ae,196:1726},{131:ae,196:1727},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1376,111:149,113:153,120:1728,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,241:1374,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},e(Ao,[2,248],{234:1729,74:la,239:[1,1731]}),e(ca,[2,242]),{146:[1,1732]},{77:[1,1733]},{77:[1,1734]},e(ca,[2,247],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{78:[2,1054],96:1735,99:[1,1737],102:1736},{99:[1,1738]},e(ko,[2,235],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),e(ko,[2,236],{74:ro}),e(Wo,[2,210]),e(Wo,[2,211]),e(Wo,[2,1101]),e(Wo,[2,213]),{2:n,3:1739,4:i,5:o,76:[1,1740]},e(Wo,[2,218]),e(Wo,[2,221]),{78:[1,1741]},{78:[1,1742]},e(Mo,[2,263]),e(Mo,[2,264]),e(Mo,[2,269]),{2:n,3:244,4:i,5:o,199:1743},e(dr,[2,555]),e(dr,[2,1131]),{2:n,3:1744,4:i,5:o},{74:[1,1745]},{78:[1,1746],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(dr,[2,565]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1747,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{78:[1,1748],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(sa,[2,498]),{2:n,3:1749,4:i,5:o},{131:ae,196:1750},{2:n,3:1751,4:i,5:o},e(Jo,Qo,{363:1629,362:1752,369:ea}),e(br,[2,513]),e(br,[2,514]),e(br,[2,515]),e(br,[2,516]),e(br,[2,517]),{372:[1,1753]},{372:[1,1754]},e(ua,[2,1124],{384:1755,372:[1,1756]}),{2:n,3:1757,4:i,5:o},{2:n,3:1758,4:i,5:o},e(Jo,[2,519]),e(X,[2,1134],{413:1759,415:1760,72:jo}),e(X,[2,613]),e(X,[2,614],{369:[1,1761]}),e(Ze,[2,336]),e([78,118],[2,337],{74:la}),{74:Co,78:[2,338]},e(X,[2,722]),{2:n,3:1011,4:i,5:o,100:1762,111:1440},e(so,[2,709],{74:$i}),e(so,[2,707]),{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1763,421:190,422:je,426:Ue},{2:n,3:1011,4:i,5:o,100:1764,111:1440},{346:[1,1765]},{341:ta,464:1766},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1767,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{341:ta,464:1768},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1769,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{341:ta,464:1770},e(si,[2,72]),{40:1771,79:75,89:c,164:[1,1772],184:99,189:f,240:[1,1773]},{40:1774,79:75,89:c,184:99,189:f,240:[1,1775]},{40:1776,79:75,89:c,184:99,189:f,240:[1,1777]},e(na,[2,273],{250:1778,251:[1,1779]}),{252:1780,253:[2,1102],767:[1,1781]},e($o,[2,260],{74:Co}),e(Ao,[2,241]),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,235:1782,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1783,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{77:[1,1784]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,233:1785,235:1658,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,233:1786,235:1658,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{78:[1,1787]},{78:[2,1055]},{77:[1,1788]},{77:[1,1789]},e(Wo,[2,214]),{2:n,3:1790,4:i,5:o},{2:n,3:1791,4:i,5:o,76:[1,1792]},{2:n,3:1793,4:i,5:o,76:[1,1794]},e(dr,[2,1128],{396:1795,395:1796,77:aa}),{78:[1,1797]},{131:ae,196:1798},e(dr,[2,559]),{78:[1,1799],99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(dr,[2,520]),e(sa,[2,501]),e(sa,[2,502]),e(sa,[2,503]),e(ao,[2,512]),{2:n,3:1801,4:i,5:o,77:[2,1120],373:1800},{77:[1,1802]},{2:n,3:1804,4:i,5:o,77:[2,1126],385:1803},e(ua,[2,1125]),{77:[1,1805]},{77:[1,1806]},e(X,[2,611]),e(X,[2,1135]),e(Jo,Qo,{363:1629,362:1807,369:ea}),{74:ro,78:[1,1808]},e(so,[2,716],{74:Pi}),{74:ro,78:[1,1809]},e(so,[2,718]),e(so,[2,711]),{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,311:[1,1810],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(so,[2,714]),{99:_t,112:xt,114:625,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,311:[1,1811],313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,329:637,332:Qt,333:en,334:tn,335:nn},e(so,[2,712]),e(si,[2,251]),{40:1812,79:75,89:c,184:99,189:f,240:[1,1813]},{40:1814,79:75,89:c,184:99,189:f},e(si,[2,253]),{40:1815,79:75,89:c,184:99,189:f},e(si,[2,254]),{40:1816,79:75,89:c,184:99,189:f},e(na,[2,271]),{131:ae,196:1817},{253:[1,1818]},{253:[2,1103]},e(ca,[2,243]),e(Ao,[2,249],{114:625,329:637,99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1662,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,233:1819,235:1658,236:ra,237:ia,238:oa,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{74:la,78:[1,1820]},{74:la,78:[1,1821]},e(Bi,[2,1056],{97:1822,104:1823,3:1825,2:n,4:i,5:o,76:ha}),{2:n,3:168,4:i,5:o,56:165,77:oe,94:1828,103:1826,105:1827,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1011,4:i,5:o,100:1829,111:1440},e(Wo,[2,215]),e(ko,[2,173]),{2:n,3:1830,4:i,5:o},e(ko,[2,175]),{2:n,3:1831,4:i,5:o},e(dr,[2,554]),e(dr,[2,1129]),e(dr,[2,552]),{78:[1,1832]},e(dr,[2,566]),{77:[1,1833]},{77:[2,1121]},{2:n,3:1835,4:i,5:o,132:da,374:1834},{77:[1,1837]},{77:[2,1127]},{2:n,3:1011,4:i,5:o,100:1838,111:1440},{2:n,3:1011,4:i,5:o,100:1839,111:1440},e(X,[2,615]),e(X,[2,724]),{345:[1,1841],346:[1,1840]},{341:ta,464:1842},{337:qo,340:Ho,463:1843},e(si,[2,252]),{40:1844,79:75,89:c,184:99,189:f},e(si,[2,255]),e(si,[2,257]),e(si,[2,258]),e(na,[2,274]),{131:[2,1104],254:1845,647:[1,1846]},{74:la,78:[1,1847]},e(ca,[2,245]),e(ca,[2,246]),e(Bi,[2,74]),e(Bi,[2,1057]),{2:n,3:1848,4:i,5:o},e(Bi,[2,78]),{74:[1,1850],78:[1,1849]},e(ao,[2,80]),e(ao,[2,81],{114:625,329:637,76:[1,1851],99:_t,112:xt,115:wt,116:At,123:kt,124:gr,133:St,136:Et,138:Ct,139:Mt,140:Ot,141:Lt,142:Dt,154:It,170:Rt,171:Pt,179:Nt,180:zt,313:Ft,314:Bt,315:jt,317:Ut,318:Vt,319:qt,320:Ht,321:$t,322:Wt,323:Gt,324:Yt,325:Xt,326:Zt,327:Kt,328:Jt,332:Qt,333:en,334:tn,335:nn}),{74:ro,78:[1,1852]},e(ko,[2,174]),e(ko,[2,176]),e(dr,[2,556]),{2:n,3:1835,4:i,5:o,132:da,374:1853},{74:fa,78:[1,1854]},e(ao,[2,531]),e(ao,[2,532]),{2:n,3:1011,4:i,5:o,100:1856,111:1440},{74:ro,78:[1,1857]},{74:ro,78:[1,1858]},{77:ii,143:ce,144:979,145:Ke,152:de,181:me,201:980,304:Ne,344:1859,421:190,422:je,426:Ue},{346:[1,1860]},e(so,[2,713]),e(so,[2,715]),e(si,[2,256]),{131:ae,196:1861},{131:[2,1105]},e(ca,[2,244]),e(Bi,[2,77]),{78:[2,76]},{2:n,3:168,4:i,5:o,56:165,77:oe,94:1828,105:1862,111:149,113:153,131:ae,132:se,137:le,143:ce,144:161,145:ue,149:he,152:de,154:fe,156:Z,158:167,179:pe,180:ge,181:me,196:151,200:147,201:155,202:156,244:ve,245:ye,258:150,259:146,260:148,261:152,262:154,263:157,264:158,265:159,266:162,267:163,269:be,270:p,274:_e,275:xe,277:we,284:Ae,285:ke,286:Te,287:Se,288:Ee,289:Ce,290:Me,292:K,293:J,294:Q,295:ee,296:Oe,297:Le,298:De,299:Ie,300:Re,301:Pe,304:Ne,305:ze,314:Fe,319:Be,421:190,422:je,426:Ue},{2:n,3:1863,4:i,5:o},{78:[1,1864]},{74:fa,78:[1,1865]},{376:[1,1866]},{2:n,3:1867,4:i,5:o,132:[1,1868]},{74:ro,78:[1,1869]},e(br,[2,529]),e(br,[2,530]),e(so,[2,717],{74:Pi}),e(so,[2,719]),e(pa,[2,1106],{255:1870,767:[1,1871]}),e(ao,[2,79]),e(ao,[2,82]),e(Bi,[2,1058],{3:1825,101:1872,104:1873,2:n,4:i,5:o,76:ha}),e(br,[2,521]),{2:n,3:244,4:i,5:o,199:1874},e(ao,[2,533]),e(ao,[2,534]),e(br,[2,528]),e(na,[2,1108],{256:1875,417:[1,1876]}),e(pa,[2,1107]),e(Bi,[2,75]),e(Bi,[2,1059]),e(ga,[2,1122],{377:1877,379:1878,77:[1,1879]}),e(na,[2,272]),e(na,[2,1109]),e(br,[2,524],{378:1880,380:1881,230:[1,1882]}),e(ga,[2,1123]),{2:n,3:1835,4:i,5:o,132:da,374:1883},e(br,[2,522]),{230:[1,1885],381:1884},{340:[1,1886]},{74:fa,78:[1,1887]},e(br,[2,525]),{337:[1,1888]},{382:[1,1889]},e(ga,[2,523]),{382:[1,1890]},{383:[1,1891]},{383:[1,1892]},{230:[2,526]},e(br,[2,527])],defaultActions:{105:[2,6],194:[2,339],195:[2,340],196:[2,341],197:[2,342],198:[2,343],199:[2,344],200:[2,345],201:[2,346],202:[2,347],209:[2,698],591:[2,1145],653:[2,1110],654:[2,1111],710:[2,699],780:[2,1076],781:[2,1077],926:[2,449],927:[2,450],928:[2,451],987:[2,700],1288:[2,1155],1375:[2,1063],1433:[2,1153],1541:[2,510],1736:[2,1055],1781:[2,1103],1801:[2,1121],1804:[2,1127],1846:[2,1105],1849:[2,76],1891:[2,526]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t,n=this,r=[0],i=[null],o=[],a=this.table,s="",l=0,c=0,u=0,h=o.slice.call(arguments,1),d=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);d.setInput(e,f.yy),f.yy.lexer=d,f.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;o.push(p);var g=d.options&&d.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,v,y,b,_,x,w,A,k,T=function(){var e=d.lex()||1;return"number"!=typeof e&&n.symbols_[e]||e},S={};;){if(y=r[r.length-1],void 0===(b=this.defaultActions[y]||(null==m&&(m=T()),a[y]&&a[y][m]))||!b.length||!b[0]){var E,C="",M=function(e){for(var t=r.length-1,n=0;;){if(2..toString()in a[e])return n;if(0===e||t<2)return!1;e=r[t-=2],++n}};if(u)1!==v&&(E=M(y));else{for(x in E=M(y),A=[],a[y])this.terminals_[x]&&2<x&&A.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:p,expected:A,recoverable:!1!==E})}if(3==u){if(1===m||1===v)throw new Error(C||"Parsing halted while starting to recover from another error.");c=d.yyleng,s=d.yytext,l=d.yylineno,p=d.yylloc,m=T()}if(!1===E)throw new Error(C||"Parsing halted. No suitable error recovery rule available.");k=E,r.length=r.length-2*k,i.length=i.length-k,o.length=o.length-k,v=2==m?null:m,m=2,y=r[r.length-1],b=a[y]&&a[y][2],u=3}if(b[0]instanceof Array&&1<b.length)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(d.yytext),o.push(d.yylloc),r.push(b[1]),m=null,v?(m=v,v=null):(c=d.yyleng,s=d.yytext,l=d.yylineno,p=d.yylloc,0<u&&u--);break;case 2:if(w=this.productions_[b[1]][1],S.$=i[i.length-w],S._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(S._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(_=this.performAction.apply(S,[s,c,l,f.yy,b[1],i,o].concat(h))))return _;w&&(r=r.slice(0,-1*w*2),i=i.slice(0,-1*w),o=o.slice(0,-1*w)),r.push(this.productions_[b[1]][0]),i.push(S.$),o.push(S._$),w=a[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}},["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPTION","OPTIONS","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"]);function va(){this.yy={}}return e.parseError=function(e,t){if(!(t.expected&&-1<t.expected.indexOf("'LITERAL'")&&/[a-zA-Z_][a-zA-Z_0-9]*/.test(t.token)&&-1<ma.indexOf(t.token)))throw new SyntaxError(e)},br={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);return 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),e=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t)return t;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length))if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(!this._backtrack)return!1;t=!1}else if(!this.options.flex)break;return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},topState:function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,r){switch(n){case 0:return 270;case 1:return 304;case 2:return 422;case 3:return 301;case 4:case 5:return 5;case 6:case 7:return 298;case 8:case 9:return 132;case 10:return;case 11:break;case 12:return 318;case 13:case 245:return 321;case 14:return t.yytext="VALUE",89;case 15:return t.yytext="VALUE",189;case 16:return t.yytext="ROW",189;case 17:return t.yytext="COLUMN",189;case 18:return t.yytext="MATRIX",189;case 19:return t.yytext="INDEX",189;case 20:return t.yytext="RECORDSET",189;case 21:return t.yytext="TEXT",189;case 22:return t.yytext="SELECT",189;case 23:return 522;case 24:return 383;case 25:return 404;case 26:return 517;case 27:return 289;case 28:case 29:return 273;case 30:return 164;case 31:return 402;case 32:return 170;case 33:return 229;case 34:return 166;case 35:return 207;case 36:return 290;case 37:return 76;case 38:return 420;case 39:case 84:return 246;case 40:return 406;case 41:case 114:return 358;case 42:return 288;case 43:return 516;case 44:return 439;case 45:return 332;case 46:return 443;case 47:return 333;case 48:case 51:case 53:case 55:return 317;case 49:return 119;case 50:case 52:case 54:case 131:return 112;case 56:case 95:case 96:return 510;case 57:return 305;case 58:return 275;case 59:return 370;case 60:return 130;case 61:return"CLOSE";case 62:return 247;case 63:case 64:return 190;case 65:return 436;case 66:return 369;case 67:return 472;case 68:return 442;case 69:return 277;case 70:return 240;case 71:return 285;case 72:return 271;case 73:return 206;case 74:return 238;case 75:return 269;case 76:return"CURSOR";case 77:case 189:return 407;case 78:return 293;case 79:return 294;case 80:return 450;case 81:return 345;case 82:return 340;case 83:return"DELETED";case 85:return 408;case 86:return 185;case 87:return 398;case 88:return 449;case 89:return 135;case 90:return 308;case 91:return 391;case 92:return 312;case 93:return 316;case 94:case 139:return 169;case 97:return 300;case 98:return 14;case 99:return 297;case 100:return 253;case 101:return 244;case 102:return 95;case 103:return 375;case 104:return 183;case 105:return 227;case 106:return 272;case 107:return 315;case 108:return 604;case 109:return 474;case 110:return 232;case 111:return 236;case 112:return 239;case 113:return 156;case 115:return 334;case 116:return 99;case 117:return 193;case 118:return 212;case 119:return 224;case 120:return 518;case 121:return 341;case 122:return 213;case 123:return 168;case 124:return 295;case 125:return 198;case 126:return 223;case 127:return 372;case 128:return 245;case 129:return"LET";case 130:return 225;case 132:return 249;case 133:return 462;case 134:return 191;case 135:return 287;case 136:return 392;case 137:return 286;case 138:return 454;case 140:return 405;case 141:return 222;case 142:return 647;case 143:return 274;case 144:return 248;case 145:return 382;case 146:return 154;case 147:return 299;case 148:return 243;case 149:return 435;case 150:return 230;case 151:return 417;case 152:return 129;case 153:return 251;case 154:return"OPEN";case 155:return 418;case 156:return 171;case 157:return 118;case 158:return 208;case 159:return 280;case 160:return 172;case 161:return 283;case 162:return 766;case 163:return 93;case 164:return 16;case 165:return 371;case 166:return 444;case 167:return 679;case 168:return 15;case 169:return 416;case 170:return 194;case 171:return"REDUCE";case 172:return 376;case 173:return 313;case 174:return 519;case 175:return 683;case 176:return 107;case 177:return 403;case 178:return 175;case 179:return 292;case 180:return 445;case 181:return 688;case 182:case 183:return 173;case 184:return 226;case 185:return 438;case 186:return 237;case 187:return 150;case 188:return 767;case 190:return 89;case 191:return 228;case 192:case 193:return 146;case 194:return 411;case 195:return 336;case 196:return 419;case 197:return"STRATEGY";case 198:return"STORE";case 199:return 284;case 200:case 201:return 355;case 202:return 465;case 203:case 204:return 359;case 205:return 192;case 206:return 311;case 207:return"TIMEOUT";case 208:return 148;case 209:return 195;case 210:case 211:case 229:return 437;case 212:return 511;case 213:return 296;case 214:return 453;case 215:return 162;case 216:return 187;case 217:return 98;case 218:return 337;case 219:return 410;case 220:return 231;case 221:return 149;case 222:return 346;case 223:return 134;case 224:return 412;case 225:return 310;case 226:return 128;case 227:return 441;case 228:return 72;case 230:case 231:return 131;case 232:return 115;case 233:return 137;case 234:return 179;case 235:return 319;case 236:return 180;case 237:return 133;case 238:return 138;case 239:return 328;case 240:return 325;case 241:return 327;case 242:return 324;case 243:return 322;case 244:return 320;case 246:return 142;case 247:return 141;case 248:return 139;case 249:return 323;case 250:case 253:return 326;case 251:return 140;case 252:return 124;case 254:return 77;case 255:return 78;case 256:return 145;case 257:return 426;case 258:return 428;case 259:return 302;case 260:return 507;case 261:return 509;case 262:return 122;case 263:return 116;case 264:return 74;case 265:return 335;case 266:return 152;case 267:return 765;case 268:return 143;case 269:return 181;case 270:return 136;case 271:return 123;case 272:return 314;case 273:return 4;case 274:return 10;case 275:return"INVALID"}},rules:[/^(?:``([^\`])+``)/i,/^(?:\[\?\])/i,/^(?:@\[)/i,/^(?:ARRAY\[)/i,/^(?:\[([^\]'])*?\])/i,/^(?:`([^\`'])*?`)/i,/^(?:N(['](\\.|[^']|\\')*?['])+)/i,/^(?:X(['](\\.|[^']|\\')*?['])+)/i,/^(?:(['](\\.|[^']|\\')*?['])+)/i,/^(?:(["](\\.|[^"]|\\")*?["])+)/i,/^(?:--(.*?)($|\r\n|\r|\n))/i,/^(?:\s+)/i,/^(?:\|\|)/i,/^(?:\|)/i,/^(?:VALUE\s+OF\s+SEARCH\b)/i,/^(?:VALUE\s+OF\s+SELECT\b)/i,/^(?:ROW\s+OF\s+SELECT\b)/i,/^(?:COLUMN\s+OF\s+SELECT\b)/i,/^(?:MATRIX\s+OF\s+SELECT\b)/i,/^(?:INDEX\s+OF\s+SELECT\b)/i,/^(?:RECORDSET\s+OF\s+SELECT\b)/i,/^(?:TEXT\s+OF\s+SELECT\b)/i,/^(?:SELECT\b)/i,/^(?:ABSOLUTE\b)/i,/^(?:ACTION\b)/i,/^(?:ADD\b)/i,/^(?:AFTER\b)/i,/^(?:AGGR\b)/i,/^(?:AGGREGATE\b)/i,/^(?:AGGREGATOR\b)/i,/^(?:ALL\b)/i,/^(?:ALTER\b)/i,/^(?:AND\b)/i,/^(?:ANTI\b)/i,/^(?:ANY\b)/i,/^(?:APPLY\b)/i,/^(?:ARRAY\b)/i,/^(?:AS\b)/i,/^(?:ASSERT\b)/i,/^(?:ASC\b)/i,/^(?:ATTACH\b)/i,/^(?:AUTO(_)?INCREMENT\b)/i,/^(?:AVG\b)/i,/^(?:BEFORE\b)/i,/^(?:BEGIN\b)/i,/^(?:BETWEEN\b)/i,/^(?:BREAK\b)/i,/^(?:NOT\s+BETWEEN\b)/i,/^(?:NOT\s+LIKE\b)/i,/^(?:BY\b)/i,/^(?:~~\*)/i,/^(?:!~~\*)/i,/^(?:~~)/i,/^(?:!~~)/i,/^(?:ILIKE\b)/i,/^(?:NOT\s+ILIKE\b)/i,/^(?:CALL\b)/i,/^(?:CASE\b)/i,/^(?:CAST\b)/i,/^(?:CHECK\b)/i,/^(?:CLASS\b)/i,/^(?:CLOSE\b)/i,/^(?:COLLATE\b)/i,/^(?:COLUMN\b)/i,/^(?:COLUMNS\b)/i,/^(?:COMMIT\b)/i,/^(?:CONSTRAINT\b)/i,/^(?:CONTENT\b)/i,/^(?:CONTINUE\b)/i,/^(?:CONVERT\b)/i,/^(?:CORRESPONDING\b)/i,/^(?:COUNT\b)/i,/^(?:CREATE\b)/i,/^(?:CROSS\b)/i,/^(?:CUBE\b)/i,/^(?:CURRENT_TIMESTAMP\b)/i,/^(?:CURSOR\b)/i,/^(?:DATABASE(S)?)/i,/^(?:DATEADD\b)/i,/^(?:DATEDIFF\b)/i,/^(?:DECLARE\b)/i,/^(?:DEFAULT\b)/i,/^(?:DELETE\b)/i,/^(?:DELETED\b)/i,/^(?:DESC\b)/i,/^(?:DETACH\b)/i,/^(?:DISTINCT\b)/i,/^(?:DROP\b)/i,/^(?:ECHO\b)/i,/^(?:EDGE\b)/i,/^(?:END\b)/i,/^(?:ENUM\b)/i,/^(?:ELSE\b)/i,/^(?:ESCAPE\b)/i,/^(?:EXCEPT\b)/i,/^(?:EXEC\b)/i,/^(?:EXECUTE\b)/i,/^(?:EXISTS\b)/i,/^(?:EXPLAIN\b)/i,/^(?:FALSE\b)/i,/^(?:FETCH\b)/i,/^(?:FIRST\b)/i,/^(?:FOR\b)/i,/^(?:FOREIGN\b)/i,/^(?:FROM\b)/i,/^(?:FULL\b)/i,/^(?:FUNCTION\b)/i,/^(?:GLOB\b)/i,/^(?:GO\b)/i,/^(?:GRAPH\b)/i,/^(?:GROUP\b)/i,/^(?:GROUPING\b)/i,/^(?:HAVING\b)/i,/^(?:IF\b)/i,/^(?:IDENTITY\b)/i,/^(?:IS\b)/i,/^(?:IN\b)/i,/^(?:INDEX\b)/i,/^(?:INDEXED\b)/i,/^(?:INNER\b)/i,/^(?:INSTEAD\b)/i,/^(?:INSERT\b)/i,/^(?:INSERTED\b)/i,/^(?:INTERSECT\b)/i,/^(?:INTERVAL\b)/i,/^(?:INTO\b)/i,/^(?:JOIN\b)/i,/^(?:KEY\b)/i,/^(?:LAST\b)/i,/^(?:LET\b)/i,/^(?:LEFT\b)/i,/^(?:LIKE\b)/i,/^(?:LIMIT\b)/i,/^(?:MATCHED\b)/i,/^(?:MATRIX\b)/i,/^(?:MAX(\s+)?(?=\())/i,/^(?:MAX(\s+)?(?=(,|\))))/i,/^(?:MIN(\s+)?(?=\())/i,/^(?:MERGE\b)/i,/^(?:MINUS\b)/i,/^(?:MODIFY\b)/i,/^(?:NATURAL\b)/i,/^(?:NEXT\b)/i,/^(?:NEW\b)/i,/^(?:NOCASE\b)/i,/^(?:NO\b)/i,/^(?:NOT\b)/i,/^(?:NULL\b)/i,/^(?:NULLS\b)/i,/^(?:OFF\b)/i,/^(?:ON\b)/i,/^(?:ONLY\b)/i,/^(?:OF\b)/i,/^(?:OFFSET\b)/i,/^(?:OPEN\b)/i,/^(?:OPTION\b)/i,/^(?:OR\b)/i,/^(?:ORDER\b)/i,/^(?:OUTER\b)/i,/^(?:OVER\b)/i,/^(?:PATH\b)/i,/^(?:PARTITION\b)/i,/^(?:PERCENT\b)/i,/^(?:PIVOT\b)/i,/^(?:PLAN\b)/i,/^(?:PRIMARY\b)/i,/^(?:PRINT\b)/i,/^(?:PRIOR\b)/i,/^(?:QUERY\b)/i,/^(?:READ\b)/i,/^(?:RECORDSET\b)/i,/^(?:REDUCE\b)/i,/^(?:REFERENCES\b)/i,/^(?:REGEXP\b)/i,/^(?:REINDEX\b)/i,/^(?:RELATIVE\b)/i,/^(?:REMOVE\b)/i,/^(?:RENAME\b)/i,/^(?:REPEAT\b)/i,/^(?:REPLACE\b)/i,/^(?:REQUIRE\b)/i,/^(?:RESTORE\b)/i,/^(?:RETURN\b)/i,/^(?:RETURNS\b)/i,/^(?:RIGHT\b)/i,/^(?:ROLLBACK\b)/i,/^(?:ROLLUP\b)/i,/^(?:ROW\b)/i,/^(?:ROWS\b)/i,/^(?:SCHEMA(S)?)/i,/^(?:SEARCH\b)/i,/^(?:SEMI\b)/i,/^(?:SET\b)/i,/^(?:SETS\b)/i,/^(?:SHOW\b)/i,/^(?:SOME\b)/i,/^(?:SOURCE\b)/i,/^(?:STRATEGY\b)/i,/^(?:STORE\b)/i,/^(?:SUM\b)/i,/^(?:TABLE\b)/i,/^(?:TABLES\b)/i,/^(?:TARGET\b)/i,/^(?:TEMP\b)/i,/^(?:TEMPORARY\b)/i,/^(?:TEXTSTRING\b)/i,/^(?:THEN\b)/i,/^(?:TIMEOUT\b)/i,/^(?:TO\b)/i,/^(?:TOP\b)/i,/^(?:TRAN\b)/i,/^(?:TRANSACTION\b)/i,/^(?:TRIGGER\b)/i,/^(?:TRUE\b)/i,/^(?:TRUNCATE\b)/i,/^(?:UNION\b)/i,/^(?:UNIQUE\b)/i,/^(?:UNPIVOT\b)/i,/^(?:UPDATE\b)/i,/^(?:USE\b)/i,/^(?:USING\b)/i,/^(?:VALUE\b)/i,/^(?:VALUES\b)/i,/^(?:VERTEX\b)/i,/^(?:VIEW\b)/i,/^(?:WHEN\b)/i,/^(?:WHERE\b)/i,/^(?:WHILE\b)/i,/^(?:WITH\b)/i,/^(?:WORK\b)/i,/^(?:(\d*[.])?\d+[eE]\d+)/i,/^(?:(\d*[.])?\d+)/i,/^(?:->)/i,/^(?:#)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:!===)/i,/^(?:===)/i,/^(?:!==)/i,/^(?:==)/i,/^(?:>=)/i,/^(?:&)/i,/^(?:\|)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:@)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:\])/i,/^(?::-)/i,/^(?:\?-)/i,/^(?:\.\.)/i,/^(?:\.)/i,/^(?:,)/i,/^(?:::)/i,/^(?::)/i,/^(?:;)/i,/^(?:\$)/i,/^(?:\?)/i,/^(?:!)/i,/^(?:\^)/i,/^(?:~)/i,/^(?:[0-9]*[a-zA-Z_]+[a-zA-Z_0-9]*)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275],inclusive:!0}}},e.lexer=br,new((va.prototype=e).Parser=va)}();void 0!==o&&void 0!==t&&(t.parser=a,t.Parser=a.Parser,t.parse=function(){return a.parse.apply(a,arguments)},t.main=function(e){return e[1]||(console.log("Usage: "+e[0]+" FILE"),process.exit(1)),e=null.readFileSync(null.normalize(e[1]),"utf8"),t.parser.parse(e)},o.main===e&&t.main(process.argv.slice(1))),r.prettyflag=!1,r.pretty=function(e,t){var n=r.prettyflag;return r.prettyflag=!t,e=r.parse(e).toString(),r.prettyflag=n,e};var s=r.utils={};function l(e){return"(y="+e+",y===y?y:undefined)"}function c(e,t){return"(y="+e+',typeof y=="undefined"?undefined:'+t+")"}function u(){return!0}function h(){}function d(e){return e[0]===String.fromCharCode(65279)?e.substr(1):e}var f=s.escapeq=function(e){return(""+e).replace(/["'\\\n\r\u2028\u2029]/g,(function(e){switch(e){case'"':case"'":case"\\":return"\\"+e;case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}}))},p=s.undoubleq=function(e){return e.replace(/(\')/g,"''")},g=s.doubleq=function(e){return e.replace(/(\'\')/g,"\\'")};s.doubleqq=function(e){return e.replace(/\'/g,"'")},s.global="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:Function("return this")(),s.isNativeFunction=function(e){return"function"==typeof e&&!!~e.toString().indexOf("[native code]")},s.isWebWorker=function(){try{var e=s.global.importScripts;return s.isNativeFunction(e)}catch(e){return!1}}(),s.isNode=function(){try{return s.isNativeFunction(s.global.process.reallyExit)}catch(e){return!1}}(),s.isBrowser=function(){try{return s.isNativeFunction(s.global.location.reload)}catch(e){return!1}}(),s.isBrowserify=s.isBrowser&&"undefined"!=typeof process&&process.browser,s.isRequireJS=s.isBrowser&&"function"==typeof o.specified,s.isMeteor="undefined"!=typeof Meteor&&Meteor.release,s.isMeteorClient=s.isMeteorClient=s.isMeteor&&Meteor.isClient,s.isMeteorServer=s.isMeteor&&Meteor.isServer,s.isCordova="object"==typeof cordova,s.isReactNative=!1,s.hasIndexedDB=!!s.global.indexedDB,s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)};var m=s.loadFile=function(e,t,n,r){var i,o;s.isNode||s.isMeteorServer||(s.isCordova?s.global.requestFileSystem(LocalFileSystem.PERSISTENT,0,(function(t){t.root.getFile(e,{create:!1},(function(e){e.file((function(e){var t=new FileReader;t.onloadend=function(e){n(d(this.result))},t.readAsText(e)}))}))})):"string"==typeof e?"#"===e.substr(0,1)&&"undefined"!=typeof document?(o=document.querySelector(e).textContent,n(o)):((i=new XMLHttpRequest).onreadystatechange=function(){if(4===i.readyState)if(200===i.status)n&&n(d(i.responseText));else if(r)return r(i)},i.open("GET",e,t),i.responseType="text",i.send()):e instanceof Event&&(o=e.target.files,t=new FileReader,o[0].name,t.onload=function(e){e=e.target.result,n(d(e))},t.readAsText(o[0])))};function v(){var e=navigator.userAgent.toLowerCase();return-1!==e.indexOf("msie")&&parseInt(e.split("msie")[1])}s.loadBinaryFile=function(e,t,n,r){var i,o;s.isNode||s.isMeteorServer||("string"==typeof e?((i=new XMLHttpRequest).open("GET",e,t),i.responseType="arraybuffer",i.onload=function(){for(var e=new Uint8Array(i.response),t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);n(t.join(""))},i.send()):e instanceof Event?(o=e.target.files,t=new FileReader,o[0].name,t.onload=function(e){e=e.target.result,n(e)},t.readAsArrayBuffer(o[0])):e instanceof Blob&&n(e))},s.removeFile=function(e,t){if(!s.isNode)throw new Error("You can remove files only in Node.js and Apache Cordova")},s.deleteFile=function(e,t){},s.autoExtFilename=function(e,t,n){return n=n||{},"string"!=typeof e||e.match(/^[A-z]+:\/\/|\n|\..{2,4}$/)||0===n.autoExt||!1===n.autoExt?e:e+"."+t},s.fileExists=function(e,t){if(!s.isNode)throw new Error("You can use exists() only in Node.js or Apach Cordova")},s.saveFile=function(e,t,n,i){var o,a,l=1;return void 0===e?(l=t,n&&(l=n(l))):s.isNode||(9===v()?(o=(o=(o=t.replace(/\r\n/g,"&#A;&#D;")).replace(/\n/g,"&#D;")).replace(/\t/g,"&#9;"),(a=s.global.open("about:blank","_blank")).document.write(o),a.document.close(),a.document.execCommand("SaveAs",!1,e),a.close()):(a={disableAutoBom:!1},r.utils.extend(a,i),t=new Blob([t],{type:"text/plain;charset=utf-8"}),le(t,e,a.disableAutoBom),n&&(l=n(l)))),l};var y=s.hash=function(e){for(var t=2166136261,n=e.length;n;)t^=e.charCodeAt(--n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t},b=s.arrayUnion=function(e,t){var n=t.slice(0);return e.forEach((function(e){n.indexOf(e)<0&&n.push(e)})),n},_=s.arrayDiff=function(e,t){return e.filter((function(e){return t.indexOf(e)<0}))},x=s.arrayIntersect=function(e,t){var n=[];return e.forEach((function(e){var r=!1;t.forEach((function(t){r=r||e===t})),r&&n.push(e)})),n},w=s.arrayUnionDeep=function(e,t){var n=t.slice(0);return e.forEach((function(e){var t=!1;n.forEach((function(n){t=t||S(e,n)})),t||n.push(e)})),n},A=s.arrayExceptDeep=function(e,t){var n=[];return e.forEach((function(e){var r=!1;t.forEach((function(t){r=r||S(e,t)})),r||n.push(e)})),n},k=s.arrayIntersectDeep=function(e,t){var n=[];return e.forEach((function(e){var r=!1;t.forEach((function(t){r=r||S(e,t,!0)})),r&&n.push(e)})),n},T=s.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t);if(t instanceof String)return t.toString();if(t instanceof Number)return+t;var n,r=t.constructor();for(n in t)t.hasOwnProperty(n)&&(r[n]=e(t[n]));return r},S=s.deepEqual=function(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!S(e[n],t[n]))return!1;return!0},E=s.distinctArray=function(e){for(var t={},n=0,r=e.length;n<r;n++){var i="object"==typeof e[n]?Object.keys(e[n]).sort().map((function(t){return t+"`"+e[n][t]})).join("`"):e[n];t[i]=e[n]}var o,a=[];for(o in t)a.push(t[o]);return a},C=s.extend=function(e,t){for(var n in e=e||{},t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},M=s.flatArray=function(e){if(!e||0===e.length)return[];if("object"==typeof e&&e instanceof r.Recordset)return e.data.map((function(t){return t[e.columns[0].columnid]}));var t=Object.keys(e[0])[0];return void 0===t?[]:e.map((function(e){return e[t]}))};function O(){var e=r.private.externalXlsxLib;if(e)return e;if(null===(e=s.isNode||s.isBrowserify||s.isMeteorServer?e:s.global.XLSX||null))throw new Error("Please include the xlsx.js library");return e}s.arrayOfArrays=function(e){return e.map((function(e){var t,n=[];for(t in e)n.push(e[t]);return n}))},Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),s.xlsnc=function(e){var t=String.fromCharCode(65+e%26);return 26<=e&&(e=(e/26|0)-1,t=String.fromCharCode(65+e%26)+t,26<e&&(e=(e/26|0)-1,t=String.fromCharCode(65+e%26)+t)),t},s.xlscn=function(e){var t=e.charCodeAt(0)-65;return 1<e.length&&(t=26*(t+1)+e.charCodeAt(1)-65,2<e.length&&(t=26*(t+1)+e.charCodeAt(2)-65)),t},s.domEmptyChildren=function(e){for(var t=e.childNodes.length;t--;)e.removeChild(e.lastChild)},s.like=function(e,t,n){n=n||"";for(var r=0,i="^";r<e.length;){var o=e[r],a="";r<e.length-1&&(a=e[r+1]),o===n?(i+="\\"+a,r++):"["===o&&"^"===a?(i+="[^",r++):"["===o||"]"===o?i+=o:"%"===o?i+=".*":"_"===o?i+=".":-1<"/.*+?|(){}".indexOf(o)?i+="\\"+o:i+=o,r++}return i+="$",-1<(""+(t||"")).toUpperCase().search(RegExp(i.toUpperCase()))},s.glob=function(e,t){for(var n=0,r="^";n<t.length;){var i=t[n],o="";n<t.length-1&&(o=t[n+1]),"["===i&&"^"===o?(r+="[^",n++):"["===i||"]"===i?r+=i:"*"===i?r+=".*":"?"===i?r+=".":-1<"/.*+?|(){}".indexOf(i)?r+="\\"+i:r+=i,n++}return r+="$",-1<(""+(e||"")).toUpperCase().search(RegExp(r.toUpperCase()))},s.findAlaSQLPath=function(){if(s.isWebWorker)return"";if(s.isMeteorClient)return"/packages/dist/";if(s.isMeteorServer)return"assets/packages/dist/";if(s.isNode)return"";if(s.isBrowser)for(var e=document.getElementsByTagName("script"),t=0;t<e.length;t++){if("alasql-worker.js"===e[t].src.substr(-16).toLowerCase())return e[t].src.substr(0,e[t].src.length-16);if("alasql-worker.min.js"===e[t].src.substr(-20).toLowerCase())return e[t].src.substr(0,e[t].src.length-20);if("alasql.js"===e[t].src.substr(-9).toLowerCase())return e[t].src.substr(0,e[t].src.length-9);if("alasql.min.js"===e[t].src.substr(-13).toLowerCase())return e[t].src.substr(0,e[t].src.length-13)}return""};var L=JSON.stringify;function D(e,t,n,i){return new s.global.Promise((function(o,a){r(e,t,(function(e,t){t?a(t):(n&&i&&!1!==r.options.progress&&r.options.progress(n,i),o(e))}))}))}r.path=r.utils.findAlaSQLPath(),r.utils.uncomment=function(e){for(var t,n=!1,r=!1,i=!1,o=0,a=(e=("__"+e+"__").split("")).length;o<a;o++){var s="\\"!==e[o-1]||"\\"===e[o-2];n?e[o]===t&&s&&(n=!1):r?"*"===e[o]&&"/"===e[o+1]?(e[o]=e[o+1]="",r=!1,o++):e[o]="":i?("\n"!==e[o+1]&&"\r"!==e[o+1]||(i=!1),e[o]=""):'"'===e[o]||"'"===e[o]?(n=!0,t=e[o]):"["===e[o]&&"@"!==e[o-1]?(n=!0,t="]"):"/"===e[o]&&"*"===e[o+1]&&(r=!(e[o]=""))}return e.join("").slice(2,-2)},r.parser=a,r.parser.parseError=function(e,t){throw new Error("Have you used a reserved keyword without `escaping` it?\n"+e)},r.parse=function(e){return a.parse(r.utils.uncomment(e))},r.engines={},r.databases={},r.databasenum=0,r.options={},r.options.errorlog=!1,r.options.valueof=!1,r.options.dropifnotexists=!1,r.options.datetimeformat="sql",r.options.casesensitive=!0,r.options.logtarget="output",r.options.logprompt=!0,r.options.progress=!1,r.options.modifier=void 0,r.options.columnlookup=10,r.options.autovertex=!0,r.options.usedbo=!0,r.options.autocommit=!0,r.options.cache=!0,r.options.tsql=!0,r.options.mysql=!0,r.options.postgres=!0,r.options.oracle=!0,r.options.sqlite=!0,r.options.orientdb=!0,r.options.nocount=!1,r.options.nan=!1,r.options.joinstar="overwrite",r.vars={},r.declares={},r.prompthistory=[],r.plugins={},r.from={},r.into={},r.fn={},r.aggr={},r.busy=0,r.MAXSQLCACHESIZE=1e4,r.DEFAULTDATABASEID="alasql",r.lastid=0,r.buffer={},r.private={externalXlsxLib:null},r.setXLSX=function(e){r.private.externalXlsxLib=e},r.use=function(e){if(e=e||r.DEFAULTDATABASEID,r.useid!==e){if(void 0===r.databases[e])throw Error("Database does not exist: "+e);r.useid=e,e=r.databases[r.useid],r.tables=e.tables,e.resetSqlCache(),r.options.usedbo&&(r.databases.dbo=e)}},r.autoval=function(e,t,n,i){if(!(i=i?r.databases[i]:r.databases[r.useid]).tables[e])throw new Error("Tablename not found: "+e);if(!i.tables[e].identities[t])throw new Error("Colname not found: "+t);return n?i.tables[e].identities[t].value||null:i.tables[e].identities[t].value-i.tables[e].identities[t].step||null},r.exec=function(e,t,n,i){if("function"==typeof t&&(i=n,n=t,t={}),delete r.error,t=t||{},!r.options.errorlog)return r.dexec(r.useid,e,t,n,i);try{return r.dexec(r.useid,e,t,n,i)}catch(e){r.error=e,n&&n(null,r.error)}},r.dexec=function(e,t,n,i,o){var a=r.databases[e];if(r.options.cache){var s=y(t);if((l=a.sqlCache[s])&&a.dbversion===l.dbversion)return l(n,i)}var l,c=r.parse(t);if(c.statements)return 0===c.statements.length?0:1===c.statements.length?c.statements[0].compile?(l=c.statements[0].compile(e,n))?(l.sql=t,l.dbversion=a.dbversion,r.options.cache&&(a.sqlCacheSize>r.MAXSQLCACHESIZE&&a.resetSqlCache(),a.sqlCacheSize++,a.sqlCache[s]=l),r.res=l(n,i,o)):void 0:(r.precompile(c.statements[0],r.useid,n),r.res=c.statements[0].execute(e,n,i,o)):i?void r.adrun(e,c,n,i,o):r.drun(e,c,n,i,o)},r.drun=function(e,t,n,i,o){var a=r.useid;a!==e&&r.use(e);for(var s,l=[],c=0,u=t.statements.length;c<u;c++)t.statements[c]&&(t.statements[c].compile?(s=t.statements[c].compile(r.useid),l.push(r.res=s(n,null,o))):(r.precompile(t.statements[c],r.useid,n),l.push(r.res=t.statements[c].execute(r.useid,n))));return a!==e&&r.use(a),i&&i(l),r.res=l},r.adrun=function(e,t,n,i,o){var a=0,s=t.statements.length;!1!==r.options.progress&&r.options.progress(s,a++);var l=r.useid;l!==e&&r.use(e);var c=[];!function u(h){void 0!==h&&c.push(h),(h=t.statements.shift())?(h.compile?h.compile(r.useid)(n,u,o):(r.precompile(t.statements[0],r.useid,n),h.execute(r.useid,n,u)),!1!==r.options.progress&&r.options.progress(s,a++)):(l!==e&&r.use(l),i(c))}()},r.compile=function(e,t){if(t=t||r.useid,1!==(e=r.parse(e)).statements.length)throw new Error("Cannot compile, because number of statements in SQL is not equal to 1");var n=e.statements[0].compile(t);return n.promise=function(e){return new Promise((function(t,r){n(e,(function(e,n){n?r(n):t(e)}))}))},n},s.global.Promise||s.isNode||function(){function r(e){return"function"==typeof e}function o(){return function(){setTimeout(a,1)}}function a(){for(var e=0;e<C;e+=2)(0,I[e])(I[e+1]),I[e]=void 0,I[e+1]=void 0;C=0}function s(){}function l(e){try{return e.then}catch(e){return U.error=e,U}}function c(e,t,n){var i,o;t.constructor===e.constructor&&n===P&&constructor.resolve===N?(i=e,(o=t)._state===B?d(i,o._result):o._state===j?f(i,o._result):p(o,void 0,(function(e){u(i,e)}),(function(e){f(i,e)}))):n===U?f(e,U.error):void 0!==n&&r(n)?function(e,t,n){M((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,(t!==n?u:d)(e,n))}),(function(t){r||(r=!0,f(e,t))}),e._label);!r&&i&&(r=!0,f(e,i))}),e)}(e,t,n):d(e,t)}function u(e,t){var n;e===t?f(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(n=t)||"object"==typeof n&&null!==n?c(e,t,l(t)):d(e,t)}function h(e){e._onerror&&e._onerror(e._result),g(e)}function d(e,t){e._state===F&&(e._result=t,e._state=B,0!==e._subscribers.length&&M(g,e))}function f(e,t){e._state===F&&(e._state=j,e._result=t,M(h,e))}function p(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+B]=n,i[o+j]=r,0===o&&e._state&&M(g,e)}function g(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?v(n,r,i,o):i(o);e._subscribers.length=0}}function m(){this.error=null}function v(e,t,n,i){var o,a,s,l,c=r(n);if(c){if((o=function(e,t){try{return e(t)}catch(e){return V.error=e,V}}(n,i))===V?(l=!0,a=o.error,o=null):s=!0,t===o)return f(t,new TypeError("A promises callback cannot return that same promise.")),0}else o=i,s=!0;t._state!==F||(c&&s?u(t,o):l?f(t,a):e===B?d(t,o):e===j&&f(t,o))}function y(e){e[z]=q++,e._state=void 0,e._result=void 0,e._subscribers=[]}function b(e){this[z]=q++,this._result=this._state=void 0,this._subscribers=[],s!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof b?function(e,t){try{t((function(t){u(e,t)}),(function(t){f(e,t)}))}catch(t){f(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function _(e,t){this._instanceConstructor=e,this.promise=new e(s),this.promise[z]||y(this.promise),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?d(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&d(this.promise,this._result))):f(this.promise,new Error("Array Methods must be provided an Array"))}var x,w,A,k,T,S,E=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},C=0,M=function(e,t){I[C]=e,I[C+1]=t,2===(C+=2)&&(w?w(a):R())},O=(D=(H="undefined"!=typeof window?window:void 0)||{}).MutationObserver||D.WebKitMutationObserver,L="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),D="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,I=new Array(1e3),R=L?function(){process.nextTick(a)}:O?(k=0,T=new O(a),S=document.createTextNode(""),T.observe(S,{characterData:!0}),function(){S.data=k=++k%2}):D?((A=new MessageChannel).port1.onmessage=a,function(){A.port2.postMessage(0)}):(void 0===H?function(){try{return x=null.runOnLoop||null.runOnContext,function(){x(a)}}catch(e){return o()}}:o)(),P=function(e,t){var n=this,r=new this.constructor(s);void 0===r[z]&&y(r);var i,o=n._state;return o?(i=arguments[o-1],M((function(){v(o,r,i,n._result)}))):p(n,r,e,t),r},N=function(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(s);return u(t,e),t},z=Math.random().toString(36).substring(16),F=void 0,B=1,j=2,U=new m,V=new m,q=0,H=(D=function(e){var t=this;return new t(E(e)?function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}:function(e,t){t(new TypeError("You must pass an array to race."))})},function(e){var t=new this(s);return f(t,e),t}),$=b;b.all=function(e){return new W(this,e).promise},b.race=D,b.resolve=N,b.reject=H,b._setScheduler=function(e){w=e},b._setAsap=function(e){M=e},b._asap=M,b.prototype={constructor:b,then:P,catch:function(e){return this.then(null,e)}};var W=_;_.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===F&&n<e;n++)this._eachEntry(t[n],n)},_.prototype._eachEntry=function(e,t){var n,r,i=this._instanceConstructor,o=i.resolve;o===N?(n=l(e))===P&&e._state!==F?this._settledAt(e._state,t,e._result):"function"!=typeof n?(this._remaining--,this._result[t]=e):i===$?(c(r=new i(s),e,n),this._willSettleAt(r,t)):this._willSettleAt(new i((function(t){t(e)})),t):this._willSettleAt(o(e),t)},_.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===F&&(this._remaining--,e===j?f(r,n):this._result[t]=n),0===this._remaining&&d(r,this._result)},_.prototype._willSettleAt=function(e,t){var n=this;p(e,void 0,(function(e){n._settledAt(B,t,e)}),(function(e){n._settledAt(j,t,e)}))},H=function(){var e;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;t&&"[object Promise]"===Object.prototype.toString.call(t.resolve())&&!t.cast||(e.Promise=$)};var G={Promise:$,polyfill:H};void 0!==(i=function(){return G}.call(t,n,t,e))&&(e.exports=i),H()}.call(this),r.promise=function(e,t){if("undefined"==typeof Promise)throw new Error("Please include a Promise/A+ library");if("string"==typeof e)return D(e,t);if(!s.isArray(e)||e.length<1||void 0!==t)throw new Error("Error in .promise parameters");return function(e){if(!(e.length<1)){for(var t,n,r=[],i=0;i<e.length;i++){if("string"==typeof(n=e[i])&&(n=[n]),!s.isArray(n)||n.length<1||2<n.length)throw new Error("Error in .promise parameter");t=n[0],n=n[1]||void 0,r.push(D(t,n,i,e.length))}return s.global.Promise.all(r)}}(e)};var I=r.Database=function(e){var t=this;if(t===r)if(e){if(t=r.databases[e],!(r.databases[e]=t))throw new Error('Database "'+e+'" not found')}else t=r.databases.alasql,r.options.tsql&&(r.databases.tempdb=r.databases.alasql);return e=e||"db"+r.databasenum++,t.databaseid=e,(r.databases[e]=t).dbversion=0,t.tables={},t.views={},t.triggers={},t.indices={},t.objects={},t.counter=0,t.resetSqlCache(),t};I.prototype.resetSqlCache=function(){this.sqlCache={},this.sqlCacheSize=0},I.prototype.exec=function(e,t,n){return r.dexec(this.databaseid,e,t,n)},I.prototype.autoval=function(e,t,n){return r.autoval(e,t,n,this.databaseid)},I.prototype.transaction=function(e){return e(new r.Transaction(this.databaseid))};var R=r.Transaction=function(e){return this.transactionid=Date.now(),this.databaseid=e,this.commited=!1,this.dbversion=r.databases[e].dbversion,this.bank=JSON.stringify(r.databases[e]),this};R.prototype.commit=function(){this.commited=!0,r.databases[this.databaseid].dbversion=Date.now(),delete this.bank},R.prototype.rollback=function(){if(this.commited)throw new Error("Transaction already commited");r.databases[this.databaseid]=JSON.parse(this.bank),delete this.bank},R.prototype.exec=function(e,t,n){return r.dexec(this.databaseid,e,t,n)},R.prototype.executeSQL=R.prototype.exec;var P=r.Table=function(e){this.data=[],this.columns=[],this.xcolumns={},this.inddefs={},this.indices={},this.uniqs={},this.uniqdefs={},this.identities={},this.checks=[],this.checkfns=[],this.beforeinsert={},this.afterinsert={},this.insteadofinsert={},this.beforedelete={},this.afterdelete={},this.insteadofdelete={},this.beforeupdate={},this.afterupdate={},this.insteadofupdate={},C(this,e)};P.prototype.indexColumns=function(){var e=this;e.xcolumns={},e.columns.forEach((function(t){e.xcolumns[t.columnid]=t}))},r.View=function(e){this.columns=[],this.xcolumns={},this.query=[],C(this,e)};var N=r.Query=function(e){this.alasql=r,this.columns=[],this.xcolumns={},this.selectGroup=[],this.groupColumns={},C(this,e)},z=(r.Recordset=function(e){C(this,e)},a.yy=r.yy={});z.extend=C,z.casesensitive=r.options.casesensitive;var F=z.Base=function(e){return z.extend(this,e)};function B(e,t,n){var i,o,a,s,l={},c=T(this.selectors);return void 0!==c&&0<c.length&&(c&&c[0]&&"PROP"===c[0].srchid&&c[0].args&&c[0].args[0]&&("XML"===c[0].args[0].toUpperCase()?(l.mode="XML",c.shift()):"HTML"===c[0].args[0].toUpperCase()?(l.mode="HTML",c.shift()):"JSON"===c[0].args[0].toUpperCase()&&(l.mode="JSON",c.shift())),0<c.length&&"VALUE"===c[0].srchid&&(l.value=!0,c.shift())),this.from instanceof z.Column?(o=this.from.databaseid||e,i=r.databases[o].tables[this.from.columnid].data):this.from instanceof z.FuncValue&&r.from[this.from.funcid.toUpperCase()]?(o=this.from.args.map((function(e){return e=e.toJS(),new Function("params,alasql","var y;return "+e).bind(this)(t,r)})),i=r.from[this.from.funcid.toUpperCase()].apply(this,o)):void 0===this.from?i=r.databases[e].objects:(e=new Function("params,alasql","var y;return "+this.from.toJS()),i=e(t,r),"object"==typeof Mongo&&"object"!=typeof Mongo.Collection&&i instanceof Mongo.Collection&&(i=i.find().fetch())),c=void 0!==c&&0<c.length?function e(n,o,a){var s=n[o];if(s.selid){if("PATH"===s.selid){for(var c=[{node:a,stack:[]}],u={},h=r.databases[r.useid].objects;0<c.length;){var d=c.shift(),f=d.node,p=d.stack;if(0<(O=e(s.args,0,f)).length){if(o+1+1>n.length)return p;var g=[];return p&&0<p.length&&p.forEach((function(t){g=g.concat(e(n,o+1,t))})),g}void 0===u[f.$id]&&(u[f.$id]=!0,f.$out&&0<f.$out.length&&f.$out.forEach((function(e){var t=h[e];(e=p.concat(t)).push(h[t.$out[0]]),c.push({node:h[t.$out[0]],stack:e})})))}return[]}if("NOT"===s.selid)return 0<(v=e(s.args,0,a)).length?[]:o+1+1>n.length?[a]:e(n,o+1,a);if("DISTINCT"===s.selid){if(0===(v=void 0===s.args||0===s.args.length?E(a):e(s.args,0,a)).length)return[];var m=E(v);return o+1+1>n.length?m:e(n,o+1,m)}if("AND"===s.selid)return m=!0,s.args.forEach((function(t){m=m&&0<e(t,0,a).length})),m?o+1+1>n.length?[a]:e(n,o+1,a):[];if("OR"===s.selid)return m=!1,s.args.forEach((function(t){m=m||0<e(t,0,a).length})),m?o+1+1>n.length?[a]:e(n,o+1,a):[];if("ALL"===s.selid)return 0===(v=e(s.args[0],0,a)).length?[]:o+1+1>n.length?v:e(n,o+1,v);if("ANY"===s.selid)return 0===(v=e(s.args[0],0,a)).length?[]:o+1+1>n.length?[v[0]]:e(n,o+1,[v[0]]);if("UNIONALL"===s.selid){var v=[];return s.args.forEach((function(t){v=v.concat(e(t,0,a))})),0===v.length?[]:o+1+1>n.length?v:e(n,o+1,v)}if("UNION"===s.selid)return v=[],s.args.forEach((function(t){v=v.concat(e(t,0,a))})),0===(v=E(v)).length?[]:o+1+1>n.length?v:e(n,o+1,v);if("IF"===s.selid)return 0===(v=e(s.args,0,a)).length?[]:o+1+1>n.length?[a]:e(n,o+1,a);if("REPEAT"===s.selid){var y,b=s.args[0].value,_=s.args[1]?s.args[1].value:b;s.args[2]&&(y=s.args[2].variable);var x=[];if(0===b&&(x=o+1+1>n.length?[a]:(y&&(r.vars[y]=0),x.concat(e(n,o+1,a)))),0<_)for(var w=[{value:a,lvl:1}],A=0;0<w.length;){var k;if(v=w[0],w.shift(),v.lvl<=_&&(y&&(r.vars[y]=v.lvl),(k=e(s.sels,0,v.value)).forEach((function(e){w.push({value:e,lvl:v.lvl+1})})),v.lvl>=b&&(o+1+1>n.length?x=x.concat(k):k.forEach((function(t){x=x.concat(e(n,o+1,t))})))),1e5<++A)throw new Error("Security brake. Number of iterations = "+A)}return x}if("OF"===s.selid){if(o+1+1>n.length)return[a];var T=[];return Object.keys(a).forEach((function(t){r.vars[s.args[0].variable]=t,T=T.concat(e(n,o+1,a[t]))})),T}if("TO"===s.selid){var S=r.vars[s.args[0]],C=[];return(C=void 0!==S?S.slice(0):[]).push(a),o+1+1>n.length?[a]:(r.vars[s.args[0]]=C,T=e(n,o+1,a),r.vars[s.args[0]]=S,T)}if("ARRAY"===s.selid)return 0<(v=e(s.args,0,a)).length?(M=v,o+1+1>n.length?[M]:e(n,o+1,M)):[];if("SUM"===s.selid){if(!(0<(v=e(s.args,0,a)).length))return[];var M=v.reduce((function(e,t){return e+t}),0);return o+1+1>n.length?[M]:e(n,o+1,M)}if("AVG"===s.selid)return 0<(v=e(s.args,0,a)).length?(M=v.reduce((function(e,t){return e+t}),0)/v.length,o+1+1>n.length?[M]:e(n,o+1,M)):[];if("COUNT"===s.selid)return 0<(v=e(s.args,0,a)).length?(M=v.length,o+1+1>n.length?[M]:e(n,o+1,M)):[];if("FIRST"===s.selid)return 0<(v=e(s.args,0,a)).length?(M=v[0],o+1+1>n.length?[M]:e(n,o+1,M)):[];if("LAST"===s.selid)return 0<(v=e(s.args,0,a)).length?(M=v[v.length-1],o+1+1>n.length?[M]:e(n,o+1,M)):[];if("MIN"===s.selid)return 0===(v=e(s.args,0,a)).length?[]:(M=v.reduce((function(e,t){return Math.min(e,t)}),1/0),o+1+1>n.length?[M]:e(n,o+1,M));if("MAX"===s.selid)return 0===(v=e(s.args,0,a)).length?[]:(M=v.reduce((function(e,t){return Math.max(e,t)}),-1/0),o+1+1>n.length?[M]:e(n,o+1,M));if("PLUS"===s.selid){for(x=[],w=e(s.args,0,a).slice(),o+1+1>n.length?x=x.concat(w):w.forEach((function(t){x=x.concat(e(n,o+1,t))})),A=0;0<w.length;)if(v=w.shift(),v=e(s.args,0,v),w=w.concat(v),o+1+1>n.length?x=x.concat(v):v.forEach((function(t){t=e(n,o+1,t),x=x.concat(t)})),1e5<++A)throw new Error("Security brake. Number of iterations = "+A);return x}if("STAR"===s.selid){for(x=[],x=e(n,o+1,a),w=e(s.args,0,a).slice(),o+1+1>n.length?x=x.concat(w):w.forEach((function(t){x=x.concat(e(n,o+1,t))})),A=0;0<w.length;)if(v=w[0],w.shift(),v=e(s.args,0,v),w=w.concat(v),o+1+1<=n.length&&v.forEach((function(t){x=x.concat(e(n,o+1,t))})),1e5<++A)throw new Error("Loop brake. Number of iterations = "+A);return x}if("QUESTION"===s.selid)return x=(x=[]).concat(e(n,o+1,a)),v=e(s.args,0,a),o+1+1<=n.length&&v.forEach((function(t){x=x.concat(e(n,o+1,t))})),x;if("WITH"!==s.selid){if("ROOT"===s.selid)return o+1+1>n.length?[a]:e(n,o+1,i);throw new Error("Wrong selector "+s.selid)}if(0===(v=e(s.args,0,a)).length)return[];var O={status:1,values:v}}else{if(!s.srchid)throw new Error("Selector not found");O=r.srch[s.srchid.toUpperCase()](a,s.args,l,t)}if(m=[],1===(O=void 0===O?{status:1,values:[a]}:O).status){var L=O.values;if(o+1+1>n.length)m=L;else for(A=0;A<O.values.length;A++)m=m.concat(e(n,o+1,L[A]))}return m}(c,0,i):i,this.into?(void 0!==this.into.args[0]&&(a=new Function("params,alasql","var y;return "+this.into.args[0].toJS())(t,r)),void 0!==this.into.args[1]&&(s=new Function("params,alasql","var y;return "+this.into.args[1].toJS())(t,r)),c=r.into[this.into.funcid.toUpperCase()](a,s,c,[],n)):(l.value&&0<c.length&&(c=c[0]),n&&(c=n(c))),c}function j(e,t,n){var r;if(0<=t?((r=n.sources[t]).data=e,"function"==typeof r.data&&(r.getfn=r.data,r.dontcache=r.getfn.dontcache,"OUTER"!=r.joinmode&&"RIGHT"!=r.joinmode&&"ANTI"!=r.joinmode||(r.dontcache=!1),r.data={})):n.queriesdata[-t-1]=M(e),n.sourceslen--,!(0<n.sourceslen))return U(n)}function U(e){var t,n,i,o,a=e.scope;if(V(e),e.data=[],e.xgroups={},e.groups=[],function e(t,n,i){if(i>=t.sources.length)t.wherefn(n,t.params,r)&&(t.groupfn?t.groupfn(n,t.params,r):t.data.push(t.selectfn(n,t.params,r)));else if(t.sources[i].applyselect)(o=t.sources[i]).applyselect(t.params,(function(r){if(0<r.length)for(var a=0;a<r.length;a++)n[o.alias]=r[a],e(t,n,i+1);else"OUTER"==o.applymode&&(n[o.alias]={},e(t,n,i+1))}),n);else{var o=t.sources[i],a=t.sources[i+1],s=o.alias||o.tableid,l=!1,c=o.data,u=!1;o.getfn&&(!o.getfn||o.dontcache)||"RIGHT"==o.joinmode||"OUTER"==o.joinmode||"ANTI"==o.joinmode||"ix"!=o.optimization||(c=o.ix[o.onleftfn(n,t.params,r)]||[],u=!0);var h=0;if(void 0===c)throw new Error("Data source number "+i+" in undefined");for(var d=c.length;(v=c[h])||!u&&o.getfn&&(v=o.getfn(h))||h<d;){u||!o.getfn||o.dontcache||(c[h]=v),n[s]=v;var f,p,g=!o.onleftfn;g||(f=o.onleftfn(n,t.params,r),p=o.onrightfn(n,t.params,r),(f instanceof String||f instanceof Number)&&(f=f.valueOf()),(p instanceof String||p instanceof Number)&&(p=f.valueOf()),g=f==p),g&&o.onmiddlefn(n,t.params,r)&&("SEMI"!=o.joinmode&&"ANTI"!=o.joinmode&&e(t,n,i+1),"LEFT"!=o.joinmode&&"INNER"!=o.joinmode&&(v._rightjoin=!0),l=!0),h++}if("LEFT"!=o.joinmode&&"OUTER"!=o.joinmode&&"SEMI"!=o.joinmode||l||(n[s]={},e(t,n,i+1)),0==i)for(var m=i+1;m<t.sources.length;m++){if("OUTER"==a.joinmode||"RIGHT"==a.joinmode||"ANTI"==a.joinmode){n[o.alias]={};for(var v,y=0,b=a.data.length;(v=a.data[y])||a.getfn&&(v=a.getfn(y))||y<b;)a.getfn&&!a.dontcache&&(a.data[y]=v),v._rightjoin?delete v._rightjoin:(n[a.alias]=v,e(t,n,m+1)),y++}o=t.sources[m],a=t.sources[m+1]}n[s]=void 0}}(e,a,0),e.groupfn){e.data=[],0===e.groups.length&&0===e.allgroups.length&&(u={},0<e.selectGroup.length&&e.selectGroup.forEach((function(e){"COUNT"==e.aggregatorid||"SUM"==e.aggregatorid?u[e.nick]=0:u[e.nick]=void 0})),e.groups=[u]),0<e.aggrKeys.length&&(t="",e.aggrKeys.forEach((function(e){t+="g['"+e.nick+"']=alasql.aggr['"+e.funcid+"'](undefined,g['"+e.nick+"'],3);"})),n=new Function("g,params,alasql","var y;"+t));for(var s=0,l=e.groups.length;s<l;s++){var c,u=e.groups[s];n&&n(u,e.params,r),e.havingfn&&!e.havingfn(u,e.params,r)||(c=e.selectgfn(u,e.params,r),e.data.push(c))}}if(function(e){if(e.distinct){for(var t,n={},r=Object.keys(e.data[0]||[]),i=0,o=e.data.length;i<o;i++){var a=r.map((function(t){return e.data[i][t]})).join("`");n[a]=e.data[i]}for(t in e.data=[],n)e.data.push(n[t])}}(e),e.unionallfn){if(e.corresponding)e.unionallfn.query.modifier||(e.unionallfn.query.modifier=void 0),p=e.unionallfn(e.params);else for(e.unionallfn.query.modifier||(e.unionallfn.query.modifier="RECORDSET"),p=[],l=(g=e.unionallfn(e.params)).data.length,s=0;s<l;s++){for(var h={},d=Math.min(e.columns.length,g.columns.length)-1;0<=d;d--)h[e.columns[d].columnid]=g.data[s][g.columns[d].columnid];p.push(h)}e.data=e.data.concat(p)}else if(e.unionfn){if(e.corresponding)e.unionfn.query.modifier||(e.unionfn.query.modifier="ARRAY"),p=e.unionfn(e.params);else for(e.unionfn.query.modifier||(e.unionfn.query.modifier="RECORDSET"),p=[],l=(g=e.unionfn(e.params)).data.length,s=0;s<l;s++){h={};var f=Math.min(e.columns.length,g.columns.length);for(d=0;d<f;d++)h[e.columns[d].columnid]=g.data[s][g.columns[d].columnid];p.push(h)}e.data=w(e.data,p)}else if(e.exceptfn){if(e.corresponding){e.exceptfn.query.modifier||(e.exceptfn.query.modifier="ARRAY");var p=e.exceptfn(e.params)}else{var g;for(e.exceptfn.query.modifier||(e.exceptfn.query.modifier="RECORDSET"),p=[],s=0,l=(g=e.exceptfn(e.params)).data.length;s<l;s++){for(h={},d=Math.min(e.columns.length,g.columns.length)-1;0<=d;d--)h[e.columns[d].columnid]=g.data[s][g.columns[d].columnid];p.push(h)}}e.data=A(e.data,p)}else if(e.intersectfn){if(e.corresponding)e.intersectfn.query.modifier||(e.intersectfn.query.modifier=void 0),p=e.intersectfn(e.params);else for(e.intersectfn.query.modifier||(e.intersectfn.query.modifier="RECORDSET"),p=[],l=(g=e.intersectfn(e.params)).data.length,s=0;s<l;s++){for(h={},f=Math.min(e.columns.length,g.columns.length),d=0;d<f;d++)h[e.columns[d].columnid]=g.data[s][g.columns[d].columnid];p.push(h)}e.data=k(e.data,p)}if(e.orderfn&&(e.explain&&(o=Date.now()),e.data=e.data.sort(e.orderfn),e.explain&&e.explaination.push({explid:e.explid++,description:"QUERY BY",ms:Date.now()-o})),(i=e).limit&&(a=0,i.offset&&(a=(a=0|i.offset||0)<0?0:a),o=i.percent?(i.data.length*i.limit/100|0)+a:(0|i.limit)+a,i.data=i.data.slice(a,o)),"undefined"!=typeof angular&&e.removeKeys.push("$$hashKey"),0<e.removeKeys.length){var m=e.removeKeys;if(0<(f=m.length))for(l=e.data.length,s=0;s<l;s++)for(d=0;d<f;d++)delete e.data[s][m[d]];0<e.columns.length&&(e.columns=e.columns.filter((function(e){var t=!1;return m.forEach((function(n){e.columnid==n&&(t=!0)})),!t})))}if(void 0!==e.removeLikeKeys&&0<e.removeLikeKeys.length){var v=e.removeLikeKeys;for(s=0,l=e.data.length;s<l;s++)for(var y in h=e.data[s])for(d=0;d<e.removeLikeKeys.length;d++)r.utils.like(e.removeLikeKeys[d],y)&&delete h[y];0<e.columns.length&&(e.columns=e.columns.filter((function(e){var t=!1;return v.forEach((function(n){r.utils.like(n,e.columnid)&&(t=!0)})),!t})))}if(e.pivotfn&&e.pivotfn(),e.unpivotfn&&e.unpivotfn(),e.intoallfn){var b=e.intoallfn(e.columns,e.cb,e.params,e.alasql);return b}if(e.intofn){for(l=e.data.length,s=0;s<l;s++)e.intofn(e.data[s],s,e.params,e.alasql);return e.cb&&e.cb(e.data.length,e.A,e.B),e.data.length}return b=e.data,e.cb?e.cb(e.data,e.A,e.B):b}F.prototype.toString=function(){},F.prototype.toType=function(){},F.prototype.toJS=function(){},F.prototype.compile=h,F.prototype.exec=function(){},F.prototype.compile=h,F.prototype.exec=function(){},z.Statements=function(e){return z.extend(this,e)},z.Statements.prototype.toString=function(){return this.statements.map((function(e){return e.toString()})).join("; ")},z.Statements.prototype.compile=function(e){var t=this.statements.map((function(t){return t.compile(e)}));return 1===t.length?t[0]:function(e,n){var r=t.map((function(t){return t(e)}));return n&&n(r),r}},z.Search=function(e){return z.extend(this,e)},z.Search.prototype.toString=function(){var e="SEARCH ";return this.selectors&&(e+=this.selectors.toString()),this.from&&(e+="FROM "+this.from.toString()),e},z.Search.prototype.toJS=function(e){return"this.queriesfn["+L(this.queriesidx-1)+"](this.params,null,"+L(e)+")"},z.Search.prototype.compile=function(e){var t=e,n=this,r=function(e,i){var o;return B.bind(n)(t,e,(function(e){o=q(r.query,e),i&&(o=i(o))})),o};return r.query={},r},r.srch={},r.srch.PROP=function(e,t,n){if("XML"!==n.mode)return"object"!=typeof e||null===e||"object"!=typeof t||void 0===e[t[0]]?{status:-1,values:[]}:{status:1,values:[e[t[0]]]};var r=[];return e.children.forEach((function(e){e.name.toUpperCase()===t[0].toUpperCase()&&r.push(e)})),0<r.length?{status:1,values:r}:{status:-1,values:[]}},r.srch.APROP=function(e,t){return"object"!=typeof e||null===e||"object"!=typeof t||void 0===e[t[0]]?{status:1,values:[void 0]}:{status:1,values:[e[t[0]]]}},r.srch.EQ=function(e,t,n,i){return t=t[0].toJS("x",""),e===new Function("x,alasql,params","return "+t)(e,r,i)?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.LIKE=function(e,t,n,i){return t=t[0].toJS("x",""),t=new Function("x,alasql,params","return "+t),e.toUpperCase().match(new RegExp("^"+t(e,r,i).toUpperCase().replace(/%/g,".*").replace(/\?|_/g,".")+"$"),"g")?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.ATTR=function(e,t,n){if("XML"===n.mode)return void 0===t?{status:1,values:[e.attributes]}:"object"==typeof e&&"object"==typeof e.attributes&&void 0!==e.attributes[t[0]]?{status:1,values:[e.attributes[t[0]]]}:{status:-1,values:[]};throw new Error("ATTR is not using in usual mode")},r.srch.CONTENT=function(e,t,n){if("XML"===n.mode)return{status:1,values:[e.content]};throw new Error("ATTR is not using in usual mode")},r.srch.SHARP=function(e,t){return t=r.databases[r.useid].objects[t[0]],void 0!==e&&e===t?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.PARENT=function(){return console.error("PARENT not implemented",arguments),{status:-1,values:[]}},r.srch.CHILD=function(e,t,n){return"object"==typeof e?Array.isArray(e)?{status:1,values:e}:"XML"===n.mode?{status:1,values:Object.keys(e.children).map((function(t){return e.children[t]}))}:{status:1,values:Object.keys(e).map((function(t){return e[t]}))}:{status:1,values:[]}},r.srch.KEYS=function(e){return"object"==typeof e&&null!==e?{status:1,values:Object.keys(e)}:{status:1,values:[]}},r.srch.WHERE=function(e,t,n,i){return t=t[0].toJS("x",""),new Function("x,alasql,params","return "+t)(e,r,i)?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.NAME=function(e,t){return e.name===t[0]?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.CLASS=function(e,t){return e.$class==t?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.VERTEX=function(e){return"VERTEX"===e.$node?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.INSTANCEOF=function(e,t){return e instanceof r.fn[t[0]]?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.EDGE=function(e){return"EDGE"===e.$node?{status:1,values:[e]}:{status:-1,values:[]}},r.srch.EX=function(e,t,n,i){return t=t[0].toJS("x",""),{status:1,values:[new Function("x,alasql,params","return "+t)(e,r,i)]}},r.srch.RETURN=function(e,t,n,i){var o={};return t&&0<t.length&&t.forEach((function(t){var n=t.toJS("x","");n=new Function("x,alasql,params","return "+n),void 0===t.as&&(t.as=t.toString()),o[t.as]=n(e,r,i)})),{status:1,values:[o]}},r.srch.REF=function(e){return{status:1,values:[r.databases[r.useid].objects[e]]}},r.srch.OUT=function(e){return e.$out&&0<e.$out.length?{status:1,values:e.$out.map((function(e){return r.databases[r.useid].objects[e]}))}:{status:-1,values:[]}},r.srch.OUTOUT=function(e){if(e.$out&&0<e.$out.length){var t=[];return e.$out.forEach((function(e){(e=r.databases[r.useid].objects[e])&&e.$out&&0<e.$out.length&&e.$out.forEach((function(e){t=t.concat(r.databases[r.useid].objects[e])}))})),{status:1,values:t}}return{status:-1,values:[]}},r.srch.IN=function(e){return e.$in&&0<e.$in.length?{status:1,values:e.$in.map((function(e){return r.databases[r.useid].objects[e]}))}:{status:-1,values:[]}},r.srch.ININ=function(e){if(e.$in&&0<e.$in.length){var t=[];return e.$in.forEach((function(e){(e=r.databases[r.useid].objects[e])&&e.$in&&0<e.$in.length&&e.$in.forEach((function(e){t=t.concat(r.databases[r.useid].objects[e])}))})),{status:1,values:t}}return{status:-1,values:[]}},r.srch.AS=function(e,t){return{status:1,values:[r.vars[t[0]]=e]}},r.srch.AT=function(e,t){return{status:1,values:[r.vars[t[0]]]}},r.srch.CLONEDEEP=function(e){return{status:1,values:[T(e)]}},r.srch.SET=function(e,t,n,i){return t=t.map((function(e){return"@"===e.method?"alasql.vars["+L(e.variable)+"]="+e.expression.toJS("x",""):"$"===e.method?"params["+L(e.variable)+"]="+e.expression.toJS("x",""):"x["+L(e.column.columnid)+"]="+e.expression.toJS("x","")})).join(";"),new Function("x,params,alasql",t)(e,i,r),{status:1,values:[e]}},r.srch.ROW=function(e,t,n,i){var o="var y;return [";return o+=t.map((function(e){return e.toJS("x","")})).join(","),o+="]",{status:1,values:[new Function("x,params,alasql",o)(e,i,r)]}},r.srch.D3=function(e){return"VERTEX"!==e.$node&&"EDGE"===e.$node&&(e.source=e.$in[0],e.target=e.$out[0]),{status:1,values:[e]}},r.srch.ORDERBY=function(e,t){return{status:1,values:e.sort(function(e){if(e){if(e&&1===e.length&&e[0].expression&&"function"==typeof e[0].expression){var t=e[0].expression;return function(e,n){return e=t(e),(n=t(n))<e?1:e===n?0:-1}}var n="",i="";return e.forEach((function(e){var t,o="";e.expression instanceof z.NumValue&&(e.expression=self.columns[e.expression.value-1]),e.expression instanceof z.Column?(t=e.expression.columnid,r.options.valueof&&(o=".valueOf()"),e.nocase&&(o+=".toUpperCase()"),"_"===t?(n+="if(a"+o+("ASC"===e.direction?">":"<")+"b"+o+")return 1;",n+="if(a"+o+"==b"+o+"){"):(n+="if((a["+L(t)+"]||'')"+o+("ASC"===e.direction?">":"<")+"(b["+L(t)+"]||'')"+o+")return 1;",n+="if((a["+L(t)+"]||'')"+o+"==(b["+L(t)+"]||'')"+o+"){")):(o=".valueOf()",e.nocase&&(o+=".toUpperCase()"),n+="if(("+e.toJS("a","")+"||'')"+o+("ASC"===e.direction?">(":"<(")+e.toJS("b","")+"||'')"+o+")return 1;",n+="if(("+e.toJS("a","")+"||'')"+o+"==("+e.toJS("b","")+"||'')"+o+"){"),i+="}"})),n+="return 0;",n+=i+"return -1",new Function("a,b",n)}}(t))}};var V=function(e){for(var t=0,n=e.sources.length;t<n;t++){var i,o=e.sources[t];if(delete o.ix,0<t&&"ix"==o.optimization&&o.onleftfn&&o.onrightfn){if(o.databaseid&&r.databases[o.databaseid].tables[o.tableid]&&(r.databases[o.databaseid].tables[o.tableid].indices||(e.database.tables[o.tableid].indices={}),i=r.databases[o.databaseid].tables[o.tableid].indices[y(o.onrightfns+"`"+o.srcwherefns)],!r.databases[o.databaseid].tables[o.tableid].dirty&&i&&(o.ix=i)),!o.ix){o.ix={};for(var a,s,l={},c=0,u=o.data.length;(a=o.data[c])||o.getfn&&(a=o.getfn(c))||c<u;)o.getfn&&!o.dontcache&&(o.data[c]=a),l[o.alias||o.tableid]=a,o.srcwherefn(l,e.params,r)&&(s=o.onrightfn(l,e.params,r),(o.ix[s]||(o.ix[s]=[])).push(a)),c++;o.databaseid&&r.databases[o.databaseid].tables[o.tableid]&&(r.databases[o.databaseid].tables[o.tableid].indices[y(o.onrightfns+"`"+o.srcwherefns)]=o.ix)}}else if(o.wxleftfn){if(r.databases[o.databaseid].engineid||(i=r.databases[o.databaseid].tables[o.tableid].indices[y(o.wxleftfns+"`")]),!r.databases[o.databaseid].tables[o.tableid].dirty&&i)o.ix=i,o.data=o.ix[o.wxrightfn(null,e.params,r)];else{for(o.ix={},l={},c=0,u=o.data.length;(a=o.data[c])||o.getfn&&(a=o.getfn(c))||c<u;)o.getfn&&!o.dontcache&&(o.data[c]=a),l[o.alias||o.tableid]=o.data[c],s=o.wxleftfn(l,e.params,r),(o.ix[s]||(o.ix[s]=[])).push(o.data[c]),c++;r.databases[o.databaseid].engineid||(r.databases[o.databaseid].tables[o.tableid].indices[y(o.wxleftfns+"`")]=o.ix)}o.srcwherefns&&(o.data?(l={},o.data=o.data.filter((function(t){return l[o.alias]=t,o.srcwherefn(l,e.params,r)}))):o.data=[])}else if(o.srcwherefns&&!o.dontcache)if(o.data){l={},o.data=o.data.filter((function(t){return l[o.alias]=t,o.srcwherefn(l,e.params,r)})),l={},c=0,u=o.data.length;for(var h=[];(a=o.data[c])||o.getfn&&(a=o.getfn(c))||c<u;)o.getfn&&!o.dontcache&&(o.data[c]=a),l[o.alias]=a,o.srcwherefn(l,e.params,r)&&h.push(a),c++;o.data=h}else o.data=[];o.databaseid&&r.databases[o.databaseid].tables[o.tableid]}};function q(e,t){if(void 0===t||"number"==typeof t||"string"==typeof t||"boolean"==typeof t)return t;var n=e.modifier||r.options.modifier,i=e.columns;if(void 0===i||0==i.length)if(0<t.length){for(var o={},a=Math.min(t.length,r.options.columnlookup||10)-1;0<=a;a--)for(var s in t[a])o[s]=!0;i=Object.keys(o).map((function(e){return{columnid:e}}))}else i=[];if("VALUE"===n)t=0<t.length?(s=i&&0<i.length?i[0].columnid:Object.keys(t[0])[0],t[0][s]):void 0;else if("ROW"===n)if(0<t.length){var l=[];for(s in t[0])l.push(t[0][s]);t=l}else t=void 0;else if("COLUMN"===n){var c=[];if(0<t.length){s=i&&0<i.length?i[0].columnid:Object.keys(t[0])[0],a=0;for(var u=t.length;a<u;a++)c.push(t[a][s])}t=c}else if("MATRIX"===n){for(c=[],a=0;a<t.length;a++){l=[];for(var h=t[a],d=0;d<i.length;d++)l.push(h[i[d].columnid]);c.push(l)}t=c}else if("INDEX"===n){c={};var f=i&&0<i.length?(s=i[0].columnid,i[1].columnid):(s=(e=Object.keys(t[0]))[0],e[1]);for(a=0,u=t.length;a<u;a++)c[t[a][s]]=t[a][f];t=c}else if("RECORDSET"===n)t=new r.Recordset({columns:i,data:t});else if("TEXTSTRING"===n){for(s=i&&0<i.length?i[0].columnid:Object.keys(t[0])[0],a=0,u=t.length;a<u;a++)t[a]=t[a][s];t=t.join("\n")}return t}function H(e,t,n){var i="",o=[],a={};return t.forEach((function(t){var s;e.ixsources={},e.sources.forEach((function(t){e.ixsources[t.alias]=t})),e.ixsources[t]&&(s=e.ixsources[t].columns),n&&"json"==r.options.joinstar&&(i+="r['"+t+"']={};"),s&&0<s.length?s.forEach((function(s){var l,c;n&&"underscore"==r.options.joinstar?o.push("'"+t+"_"+s.columnid+"':p['"+t+"']['"+s.columnid+"']"):n&&"json"==r.options.joinstar?i+="r['"+t+"']['"+s.columnid+"']=p['"+t+"']['"+s.columnid+"'];":(l="p['"+t+"']['"+s.columnid+"']",a[s.columnid]?(c=l+" !== undefined ? "+l+" : "+a[s.columnid].value,o[a[s.columnid].id]=a[s.columnid].key+c,a[s.columnid].value=c):(c="'"+s.columnid+"':",o.push(c+l),a[s.columnid]={id:o.length-1,value:l,key:c})),e.selectColumns[f(s.columnid)]=!0,s={columnid:s.columnid,dbtypeid:s.dbtypeid,dbsize:s.dbsize,dbprecision:s.dbprecision,dbenum:s.dbenum},e.columns.push(s),e.xcolumns[s.columnid]=s})):(i+='var w=p["'+t+'"];for(var k in w){r[k]=w[k]};',e.dirtyColumns=!0)})),{s:o.join(","),sp:i}}z.Select=function(e){return z.extend(this,e)},z.Select.prototype.toString=function(){var e="";return this.explain&&(e+="EXPLAIN "),e+="SELECT ",this.modifier&&(e+=this.modifier+" "),this.distinct&&(e+="DISTINCT "),this.top&&(e+="TOP "+this.top.value+" ",this.percent&&(e+="PERCENT ")),e+=this.columns.map((function(e){var t=e.toString();return void 0!==e.as&&(t+=" AS "+e.as),t})).join(", "),this.from&&(e+=" FROM "+this.from.map((function(e){var t=e.toString();return e.as&&(t+=" AS "+e.as),t})).join(",")),this.joins&&(e+=this.joins.map((function(e){var t=" ";if(e.joinmode&&(t+=e.joinmode+" "),e.table)t+="JOIN "+e.table.toString();else if(e.select)t+="JOIN ("+e.select.toString()+")";else{if(!(e instanceof r.yy.Apply))throw new Error("Wrong type in JOIN mode");t+=e.toString()}return e.as&&(t+=" AS "+e.as),e.using&&(t+=" USING "+e.using.toString()),e.on&&(t+=" ON "+e.on.toString()),t})).join("")),this.where&&(e+=" WHERE "+this.where.toString()),this.group&&0<this.group.length&&(e+=" GROUP BY "+this.group.map((function(e){return e.toString()})).join(", ")),this.having&&(e+=" HAVING "+this.having.toString()),this.order&&0<this.order.length&&(e+=" ORDER BY "+this.order.map((function(e){return e.toString()})).join(", ")),this.limit&&(e+=" LIMIT "+this.limit.value),this.offset&&(e+=" OFFSET "+this.offset.value),this.union&&(e+=" UNION "+(this.corresponding?"CORRESPONDING ":"")+this.union.toString()),this.unionall&&(e+=" UNION ALL "+(this.corresponding?"CORRESPONDING ":"")+this.unionall.toString()),this.except&&(e+=" EXCEPT "+(this.corresponding?"CORRESPONDING ":"")+this.except.toString()),this.intersect&&(e+=" INTERSECT "+(this.corresponding?"CORRESPONDING ":"")+this.intersect.toString()),e},z.Select.prototype.toJS=function(e){return"alasql.utils.flatArray(this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+e+"))[0]"},z.Select.prototype.compile=function(e,t){var n=r.databases[e],i=new N;i.removeKeys=[],i.aggrKeys=[],i.explain=this.explain,i.explaination=[],i.explid=1,i.modifier=this.modifier,i.database=n,this.compileWhereExists(i),this.compileQueries(i),i.defcols=this.compileDefCols(i,e),i.fromfn=this.compileFrom(i),this.joins&&this.compileJoins(i),i.rownums=[],this.compileSelectGroup0(i),this.group||0<i.selectGroup.length?i.selectgfns=this.compileSelectGroup1(i):i.selectfns=this.compileSelect1(i,t),this.compileRemoveColumns(i),this.where&&this.compileWhereJoins(i),i.wherefn=this.compileWhere(i),(this.group||0<i.selectGroup.length)&&(i.groupfn=this.compileGroup(i)),this.having&&(i.havingfn=this.compileHaving(i)),this.order&&(i.orderfn=this.compileOrder(i,t)),this.group||0<i.selectGroup.length?i.selectgfn=this.compileSelectGroup2(i):i.selectfn=this.compileSelect2(i,t),i.distinct=this.distinct,this.pivot&&(i.pivotfn=this.compilePivot(i)),this.unpivot&&(i.pivotfn=this.compileUnpivot(i)),this.top?i.limit=this.top.value:this.limit&&(i.limit=this.limit.value,this.offset&&(i.offset=this.offset.value)),i.percent=this.percent,i.corresponding=this.corresponding,this.union?(i.unionfn=this.union.compile(e),this.union.order?i.orderfn=this.union.compileOrder(i,t):i.orderfn=null):this.unionall?(i.unionallfn=this.unionall.compile(e),this.unionall.order?i.orderfn=this.unionall.compileOrder(i,t):i.orderfn=null):this.except?(i.exceptfn=this.except.compile(e),this.except.order?i.orderfn=this.except.compileOrder(i,t):i.orderfn=null):this.intersect&&(i.intersectfn=this.intersect.compile(e),this.intersect.order?i.intersectfn=this.intersect.compileOrder(i,t):i.orderfn=null),this.into&&(this.into instanceof z.Table?r.options.autocommit&&r.databases[this.into.databaseid||e].engineid?i.intoallfns='return alasql.engines["'+r.databases[this.into.databaseid||e].engineid+'"].intoTable("'+(this.into.databaseid||e)+'","'+this.into.tableid+'",this.data, columns, cb);':i.intofns="alasql.databases['"+(this.into.databaseid||e)+"'].tables['"+this.into.tableid+"'].data.push(r);":this.into instanceof z.VarValue?i.intoallfns='alasql.vars["'+this.into.variable+'"]=this.data;res=this.data.length;if(cb)res=cb(res);return res;':this.into instanceof z.FuncValue?(o="return alasql.into["+JSON.stringify(this.into.funcid.toUpperCase())+"](",this.into.args&&0<this.into.args.length?(o+=this.into.args[0].toJS()+",",1<this.into.args.length?o+=this.into.args[1].toJS()+",":o+="undefined,"):o+="undefined, undefined,",i.intoallfns=o+"this.data,columns,cb)"):this.into instanceof z.ParamValue&&(i.intofns="params['"+this.into.param+"'].push(r)"),i.intofns?i.intofn=new Function("r,i,params,alasql","var y;"+i.intofns):i.intoallfns&&(i.intoallfn=new Function("columns,cb,params,alasql","var y;"+i.intoallfns)));var o=function(e,t,n){return i.params=e,function(e,t,n,i,o){e.sources.length,e.sourceslen=e.sources.length;var a,s=e.sourceslen;return(e.query=e).A=void 0,e.B=void 0,e.cb=n,e.oldscope=t,e.queriesfn&&(e.sourceslen+=e.queriesfn.length,s+=e.queriesfn.length,e.queriesdata=[],e.queriesfn.forEach((function(t,n){t.query.params=e.params,j([],-n-1,e)}))),t=t?T(t):{},e.scope=t,e.sources.forEach((function(t,n){t.query=e,void 0!==(n=t.datafn(e,e.params,j,n,r))&&((e.intofn||e.intoallfn)&&Array.isArray(n)&&(n=n.length),a=n),t.queriesdata=e.queriesdata})),a=0==e.sources.length||0===s?U(e):a}(i,n,(function(e,n){if(n)return t(n,null);if(0<i.rownums.length)for(var r=0,o=e.length;r<o;r++)for(var a=0,s=i.rownums.length;a<s;a++)e[r][i.rownums[a]]=r+1;return n=q(i,e),t&&t(n),n}))};return o.query=i,o},z.Select.prototype.execute=function(e,t,n){return this.compile(e)(t,n)},z.ExistsValue=function(e){return z.extend(this,e)},z.ExistsValue.prototype.toString=function(){return"EXISTS("+this.value.toString()+")"},z.ExistsValue.prototype.toType=function(){return"boolean"},z.ExistsValue.prototype.toJS=function(e,t,n){return"this.existsfn["+this.existsidx+"](params,null,"+e+").data.length"},z.Select.prototype.compileWhereExists=function(e){this.exists&&(e.existsfn=this.exists.map((function(t){return(t=t.compile(e.database.databaseid)).query.modifier="RECORDSET",t})))},z.Select.prototype.compileQueries=function(e){this.queries&&(e.queriesfn=this.queries.map((function(t){return(t=t.compile(e.database.databaseid)).query.modifier="RECORDSET",t})))},r.precompile=function(e,t,n){e&&(e.params=n,e.queries&&(e.queriesfn=e.queries.map((function(n){return(n=n.compile(t||e.database.databaseid)).query.modifier="RECORDSET",n}))),e.exists&&(e.existsfn=e.exists.map((function(n){return(n=n.compile(t||e.database.databaseid)).query.modifier="RECORDSET",n}))))},z.Select.prototype.compileFrom=function(e){e.sources=[],e.aliases={},this.from&&(this.from.forEach((function(t){var n="",i=t.as||t.tableid;if(t instanceof z.Table)e.aliases[i]={tableid:t.tableid,databaseid:t.databaseid||e.database.databaseid,type:"table"};else if(t instanceof z.Select)e.aliases[i]={type:"subquery"};else if(t instanceof z.Search)e.aliases[i]={type:"subsearch"};else if(t instanceof z.ParamValue)e.aliases[i]={type:"paramvalue"};else if(t instanceof z.FuncValue)e.aliases[i]={type:"funcvalue"};else if(t instanceof z.VarValue)e.aliases[i]={type:"varvalue"};else if(t instanceof z.FromData)e.aliases[i]={type:"fromdata"};else if(t instanceof z.Json)e.aliases[i]={type:"json"};else{if(!t.inserted)throw new Error("Wrong table at FROM");e.aliases[i]={type:"inserted"}}var o={alias:i,databaseid:t.databaseid||e.database.databaseid,tableid:t.tableid,joinmode:"INNER",onmiddlefn:u,srcwherefns:"",srcwherefn:u};if(t instanceof z.Table)o.columns=r.databases[o.databaseid].tables[o.tableid].columns,r.options.autocommit&&r.databases[o.databaseid].engineid&&!r.databases[o.databaseid].tables[o.tableid].view?o.datafn=function(e,t,n,r,i){return i.engines[i.databases[o.databaseid].engineid].fromTable(o.databaseid,o.tableid,n,r,e)}:r.databases[o.databaseid].tables[o.tableid].view?o.datafn=function(e,t,n,r,i){return t=i.databases[o.databaseid].tables[o.tableid].select(t),n?n(t,r,e):t}:o.datafn=function(e,t,n,r,i){return i=i.databases[o.databaseid].tables[o.tableid].data,n?n(i,r,e):i};else if(t instanceof z.Select)o.subquery=t.compile(e.database.databaseid),void 0===o.subquery.query.modifier&&(o.subquery.query.modifier="RECORDSET"),o.columns=o.subquery.query.columns,o.datafn=function(e,t,n,r,i){var a;return o.subquery(e.params,(function(t){return a=t.data,a=n?n(a,r,e):a})),a};else if(t instanceof z.Search)o.subsearch=t,o.columns=[],o.datafn=function(e,t,n,r,i){var a;return o.subsearch.execute(e.database.databaseid,e.params,(function(t){return a=t,a=n?n(a,r,e):a})),a};else if(t instanceof z.ParamValue)n="var res = alasql.prepareFromData(params['"+t.param+"']",t.array&&(n+=",true"),n+=");if(cb)res=cb(res,idx,query);return res",o.datafn=new Function("query,params,cb,idx,alasql",n);else if(t.inserted)n="var res = alasql.prepareFromData(alasql.inserted",t.array&&(n+=",true"),n+=");if(cb)res=cb(res,idx,query);return res",o.datafn=new Function("query,params,cb,idx,alasql",n);else if(t instanceof z.Json)n="var res = alasql.prepareFromData("+t.toJS(),t.array&&(n+=",true"),n+=");if(cb)res=cb(res,idx,query);return res",o.datafn=new Function("query,params,cb,idx,alasql",n);else if(t instanceof z.VarValue)n="var res = alasql.prepareFromData(alasql.vars['"+t.variable+"']",t.array&&(n+=",true"),n+=");if(cb)res=cb(res,idx,query);return res",o.datafn=new Function("query,params,cb,idx,alasql",n);else if(t instanceof z.FuncValue)n="var res=alasql.from["+JSON.stringify(t.funcid.toUpperCase())+"](",t.args&&0<t.args.length?(t.args[0]?n+=t.args[0].toJS("query.oldscope")+",":n+="null,",t.args[1]?n+=t.args[1].toJS("query.oldscope")+",":n+="null,"):n+="null,null,",n+="cb,idx,query",n+=");/*if(cb)res=cb(res,idx,query);*/return res",o.datafn=new Function("query, params, cb, idx, alasql",n);else{if(!(t instanceof z.FromData))throw new Error("Wrong table at FROM");o.datafn=function(e,n,r,i,o){var a=t.data;return r?r(a,i,e):a}}e.sources.push(o)})),e.defaultTableid=e.sources[0].alias)},r.prepareFromData=function(e,t){var n,r,i=e;if("string"==typeof e){if(i=e.split(/\r?\n/),t)for(n=0,r=i.length;n<r;n++)i[n]=[i[n]]}else if(t)for(i=[],n=0,r=e.length;n<r;n++)i.push([e[n]]);else if("object"==typeof e&&!Array.isArray(e))if("undefined"!=typeof Mongo&&void 0!==Mongo.Collection&&e instanceof Mongo.Collection)i=e.find().fetch();else for(var o in i=[],e)e.hasOwnProperty(o)&&i.push([o,e[o]]);return i},z.Select.prototype.compileJoins=function(e){this.joins.forEach((function(t){var n,i,o;if("CROSS"===t.joinmode){if(t.using||t.on)throw new Error("CROSS JOIN cannot have USING or ON clauses");t.joinmode="INNER"}if(t instanceof z.Apply)return(i={alias:t.as,applymode:t.applymode,onmiddlefn:u,srcwherefns:"",srcwherefn:u,columns:[]}).applyselect=t.select.compile(e.database.databaseid),i.columns=i.applyselect.query.columns,i.datafn=function(e,t,n,r,i){var o;return n?n(o,r,e):o},void e.sources.push(i);if(t.table){if(n=t.table,i={alias:t.as||n.tableid,databaseid:n.databaseid||e.database.databaseid,tableid:n.tableid,joinmode:t.joinmode,onmiddlefn:u,srcwherefns:"",srcwherefn:u,columns:[]},!r.databases[i.databaseid].tables[i.tableid])throw new Error("Table '"+i.tableid+"' is not exists in database '"+i.databaseid+"'");i.columns=r.databases[i.databaseid].tables[i.tableid].columns,r.options.autocommit&&r.databases[i.databaseid].engineid?i.datafn=function(e,t,n,r,o){return o.engines[o.databases[i.databaseid].engineid].fromTable(i.databaseid,i.tableid,n,r,e)}:r.databases[i.databaseid].tables[i.tableid].view?i.datafn=function(e,t,n,r,o){return t=o.databases[i.databaseid].tables[i.tableid].select(t),n?n(t,r,e):t}:i.datafn=function(e,t,n,r,o){return o=o.databases[i.databaseid].tables[i.tableid].data,n?n(o,r,e):o},e.aliases[i.alias]={tableid:n.tableid,databaseid:n.databaseid||e.database.databaseid}}else t.select?(n=t.select,(i={alias:t.as,joinmode:t.joinmode,onmiddlefn:u,srcwherefns:"",srcwherefn:u,columns:[]}).subquery=n.compile(e.database.databaseid),void 0===i.subquery.query.modifier&&(i.subquery.query.modifier="RECORDSET"),i.columns=i.subquery.query.columns,i.datafn=function(e,t,n,r,o){return i.subquery(e.params,null,n,r).data},e.aliases[i.alias]={type:"subquery"}):t.param?(i={alias:t.as,joinmode:t.joinmode,onmiddlefn:u,srcwherefns:"",srcwherefn:u},o="var res=alasql.prepareFromData(params['"+t.param.param+"']",t.array&&(o+=",true"),o+=");if(cb)res=cb(res, idx, query);return res",i.datafn=new Function("query,params,cb,idx, alasql",o),e.aliases[i.alias]={type:"paramvalue"}):t.variable?(i={alias:t.as,joinmode:t.joinmode,onmiddlefn:u,srcwherefns:"",srcwherefn:u},o="var res=alasql.prepareFromData(alasql.vars['"+t.variable+"']",t.array&&(o+=",true"),o+=");if(cb)res=cb(res, idx, query);return res",i.datafn=new Function("query,params,cb,idx, alasql",o),e.aliases[i.alias]={type:"varvalue"}):t.func&&(i={alias:t.as,joinmode:t.joinmode,onmiddlefn:u,srcwherefns:"",srcwherefn:u},s="var res=alasql.from["+JSON.stringify(t.func.funcid.toUpperCase())+"](",(a=t.func.args)&&0<a.length?(a[0]?s+=a[0].toJS("query.oldscope")+",":s+="null,",a[1]?s+=a[1].toJS("query.oldscope")+",":s+="null,"):s+="null,null,",s+="cb,idx,query",s+=");/*if(cb)res=cb(res,idx,query);*/return res",i.datafn=new Function("query, params, cb, idx, alasql",s),e.aliases[i.alias]={type:"funcvalue"});var a,s,l=i.alias;if(t.natural){if(t.using||t.on)throw new Error("NATURAL JOIN cannot have USING or ON clauses");if(0<e.sources.length){var c=e.sources[e.sources.length-1],h=r.databases[c.databaseid].tables[c.tableid],d=r.databases[i.databaseid].tables[i.tableid];if(!h||!d)throw new Error("In this version of Alasql NATURAL JOIN works for tables with predefined columns only");var f=h.columns.map((function(e){return e.columnid})),p=d.columns.map((function(e){return e.columnid}));t.using=x(f,p).map((function(e){return{columnid:e}}))}}t.using?(c=e.sources[e.sources.length-1],i.onleftfns=t.using.map((function(e){return"p['"+(c.alias||c.tableid)+"']['"+e.columnid+"']"})).join('+"`"+'),i.onleftfn=new Function("p,params,alasql","var y;return "+i.onleftfns),i.onrightfns=t.using.map((function(e){return"p['"+(i.alias||i.tableid)+"']['"+e.columnid+"']"})).join('+"`"+'),i.onrightfn=new Function("p,params,alasql","var y;return "+i.onrightfns),i.optimization="ix"):t.on&&(t.on instanceof z.Op&&"="===t.on.op&&!t.on.allsome?(h=s=a="",d=!(i.optimization="ix"),f=t.on.left.toJS("p",e.defaultTableid,e.defcols),p=t.on.right.toJS("p",e.defaultTableid,e.defcols),-1<f.indexOf("p['"+l+"']")&&!(-1<p.indexOf("p['"+l+"']"))?(f.match(/p\['.*?'\]/g)||[]).every((function(e){return e==="p['"+l+"']"}))?s=f:d=!0:!(-1<f.indexOf("p['"+l+"']"))&&-1<p.indexOf("p['"+l+"']")&&(p.match(/p\['.*?'\]/g)||[]).every((function(e){return e==="p['"+l+"']"}))?a=f:d=!0,-1<p.indexOf("p['"+l+"']")&&!(-1<f.indexOf("p['"+l+"']"))?(p.match(/p\['.*?'\]/g)||[]).every((function(e){return e==="p['"+l+"']"}))?s=p:d=!0:!(-1<p.indexOf("p['"+l+"']"))&&-1<f.indexOf("p['"+l+"']")&&(f.match(/p\['.*?'\]/g)||[]).every((function(e){return e==="p['"+l+"']"}))?a=p:d=!0,d&&(a=s="",h=t.on.toJS("p",e.defaultTableid,e.defcols),i.optimization="no"),i.onleftfns=a,i.onrightfns=s,i.onmiddlefns=h||"true",i.onleftfn=new Function("p,params,alasql","var y;return "+i.onleftfns),i.onrightfn=new Function("p,params,alasql","var y;return "+i.onrightfns),i.onmiddlefn=new Function("p,params,alasql","var y;return "+i.onmiddlefns)):(i.optimization="no",i.onmiddlefns=t.on.toJS("p",e.defaultTableid,e.defcols),i.onmiddlefn=new Function("p,params,alasql","var y;return "+t.on.toJS("p",e.defaultTableid,e.defcols)))),e.sources.push(i)}))},z.Select.prototype.compileWhere=function(e){if(this.where){if("function"==typeof this.where)return this.where;var t=this.where.toJS("p",e.defaultTableid,e.defcols);return e.wherefns=t,new Function("p,params,alasql","var y;return "+t)}return function(){return!0}},z.Select.prototype.compileWhereJoins=function(e){},z.Select.prototype.compileGroup=function(e){var t;t=0<e.sources.length?e.sources[0].alias:"";var n=e.defcols,r=[[]];this.group&&(r=X(this.group,e));var i=[];r.forEach((function(e){i=b(i,e)})),e.allgroups=i,e.ingroup=[];var o="";return r.forEach((function(r){o+="var g=this.xgroups[";var a=r.map((function(t){var n=t.split("\t")[0];return t=t.split("\t")[1],""===n?"1":(e.ingroup.push(n),t)}));0===a.length&&(a=["''"]),o+=a.join('+"`"+'),o+="];if(!g) {this.groups.push((g=this.xgroups[",o+=a.join('+"`"+'),o+="] = {",o+=r.map((function(e){var t=e.split("\t")[0];return e=e.split("\t")[1],""===t?"":"'"+t+"':"+e+","})).join(""),r=_(i,r),o+=r.map((function(e){return"'"+e.split("\t")[0]+"':null,"})).join("");var s="";r="",void 0!==e.groupStar&&(r+="for(var f in p['"+e.groupStar+"']) {g[f]=p['"+e.groupStar+"'][f];};"),o+=e.selectGroup.map((function(r){var i=r.expression.toJS("p",t,n),o=r.nick;return r instanceof z.AggrValue?(r.distinct&&(s+=",g['$$_VALUES_"+o+"']={},g['$$_VALUES_"+o+"']["+i+"]=true"),"SUM"===r.aggregatorid?"'"+o+"':("+i+")||0,":"MIN"===r.aggregatorid||"MAX"===r.aggregatorid||"FIRST"===r.aggregatorid||"LAST"===r.aggregatorid?"'"+o+"':"+i+",":"ARRAY"===r.aggregatorid?"'"+o+"':["+i+"],":"COUNT"===r.aggregatorid?"*"===r.expression.columnid?"'"+o+"':1,":"'"+o+"':(typeof "+i+' == "undefined" || '+i+" === null) ? 0 : 1,":"AVG"===r.aggregatorid?(e.removeKeys.push("_SUM_"+o),e.removeKeys.push("_COUNT_"+o),"'"+o+"':"+i+",'_SUM_"+o+"':("+i+")||0,'_COUNT_"+o+"':(typeof "+i+' == "undefined" || '+i+" === null) ? 0 : 1,"):"AGGR"===r.aggregatorid?(s+=",g['"+o+"']="+r.expression.toJS("g",-1),""):"REDUCE"===r.aggregatorid?(e.aggrKeys.push(r),"'"+o+"':alasql.aggr['"+r.funcid+"']("+i+",undefined,1),"):""):""})).join(""),o+="}"+s+",g));"+r+"} else {",o+=e.selectGroup.map((function(e){var r=e.nick,i=e.expression.toJS("p",t,n);if(e instanceof z.AggrValue){var o="",a="";return e.distinct&&(o="if(typeof "+i+'!="undefined" && (!g[\'$$_VALUES_'+r+"']["+i+"])) \t\t\t\t \t\t {",a="g['$$_VALUES_"+r+"']["+i+"]=true;}"),"SUM"===e.aggregatorid?o+"g['"+r+"']+=("+i+"||0);"+a:"COUNT"===e.aggregatorid?"*"===e.expression.columnid?o+"g['"+r+"']++;"+a:o+"if(typeof "+i+'!="undefined" && '+i+" !== null) g['"+r+"']++;"+a:"ARRAY"===e.aggregatorid?o+"g['"+r+"'].push("+i+");"+a:"MIN"===e.aggregatorid?o+"if ((y="+i+") < g['"+r+"']) g['"+r+"'] = y;"+a:"MAX"===e.aggregatorid?o+"if ((y="+i+") > g['"+r+"']) g['"+r+"'] = y;"+a:"FIRST"===e.aggregatorid?"":"LAST"===e.aggregatorid?o+"g['"+r+"']="+i+";"+a:"AVG"===e.aggregatorid?o+"g['_SUM_"+r+"']+=(y="+i+")||0;g['_COUNT_"+r+"']+=(typeof y == \"undefined\" || y === null) ? 0 : 1;g['"+r+"']=g['_SUM_"+r+"']/g['_COUNT_"+r+"'];"+a:"AGGR"===e.aggregatorid?o+"g['"+r+"']="+e.expression.toJS("g",-1)+";"+a:"REDUCE"===e.aggregatorid?o+"g['"+r+"']=alasql.aggr."+e.funcid+"("+i+",g['"+r+"'],2);"+a:""}return""})).join(""),o+="}"})),new Function("p,params,alasql","var y;"+o)},z.Select.prototype.compileSelect1=function(e,t){var n=this;e.columns=[],e.xcolumns={},e.selectColumns={},e.dirtyColumns=!1;var i="",o=[];return this.columns.forEach((function(a){if(a instanceof z.Column)if("*"===a.columnid)a.func?i+="r=params['"+a.param+"'](p['"+e.sources[0].alias+"'],p,params,alasql);":(a.tableid?(u=H(e,[a.tableid],!1)).s&&(o=o.concat(u.s)):(u=H(e,Object.keys(e.aliases),!0)).s&&(o=o.concat(u.s)),i+=u.sp);else{var s=a.tableid,c=a.databaseid||e.sources[0].databaseid||e.database.databaseid;if(s=(s=s||e.defcols[a.columnid])||e.defaultTableid,"_"!==a.columnid?t&&1<t.length&&Array.isArray(t[0])&&1<=t[0].length&&t[0][0].hasOwnProperty("sheetid")?i='var r={};var w=p["'+s+'"];var cols=['+n.columns.map((function(e){return"'"+e.columnid+"'"})).join(",")+"];var colas=["+n.columns.map((function(e){return"'"+(e.as||e.columnid)+"'"})).join(",")+"];for (var i=0;i<Object.keys(p['"+s+"']).length;i++) for(var k=0;k<cols.length;k++){if (!r.hasOwnProperty(i)) r[i]={}; r[i][colas[k]]=w[i][cols[k]];}":o.push("'"+f(a.as||a.columnid)+"':p['"+s+"']['"+a.columnid+"']"):o.push("'"+f(a.as||a.columnid)+"':p['"+s+"']"),e.selectColumns[f(a.as||a.columnid)]=!0,e.aliases[s]&&"table"===e.aliases[s].type){if(!r.databases[c].tables[e.aliases[s].tableid])throw new Error("Table '"+s+"' does not exist in database");var u=r.databases[c].tables[e.aliases[s].tableid].columns;if((s=r.databases[c].tables[e.aliases[s].tableid].xcolumns)&&0<u.length){if(void 0===(h=s[a.columnid]))throw new Error("Column does not exist: "+a.columnid);var h={columnid:a.as||a.columnid,dbtypeid:h.dbtypeid,dbsize:h.dbsize,dbpecision:h.dbprecision,dbenum:h.dbenum};e.columns.push(h),e.xcolumns[h.columnid]=h}else h={columnid:a.as||a.columnid},e.columns.push(h),e.xcolumns[h.columnid]=h,e.dirtyColumns=!0}else h={columnid:a.as||a.columnid},e.columns.push(h),e.xcolumns[h.columnid]=h}else a instanceof z.AggrValue?(n.group||(n.group=[""]),a.as||(a.as=f(a.toString())),"SUM"===a.aggregatorid||"MAX"===a.aggregatorid||"MIN"===a.aggregatorid||"FIRST"===a.aggregatorid||"LAST"===a.aggregatorid||"AVG"===a.aggregatorid||"ARRAY"===a.aggregatorid||"REDUCE"===a.aggregatorid?o.push("'"+f(a.as)+"':"+l(a.expression.toJS("p",e.defaultTableid,e.defcols))):"COUNT"===a.aggregatorid&&o.push("'"+f(a.as)+"':1")):(o.push("'"+f(a.as||a.columnid||a.toString())+"':"+l(a.toJS("p",e.defaultTableid,e.defcols))),e.selectColumns[f(a.as||a.columnid||a.toString())]=!0),h={columnid:a.as||a.columnid||a.toString()},e.columns.push(h),e.xcolumns[h.columnid]=h})),"var r={"+o.join(",")+"};"+i},z.Select.prototype.compileSelect2=function(e,t){var n=e.selectfns;return this.orderColumns&&0<this.orderColumns.length&&this.orderColumns.forEach((function(r,i){i="$$$"+i,r instanceof z.Column&&e.xcolumns[r.columnid]?n+="r['"+i+"']=r['"+r.columnid+"'];":r instanceof z.ParamValue&&e.xcolumns[t[r.param]]?n+="r['"+i+"']=r['"+t[r.param]+"'];":n+="r['"+i+"']="+r.toJS("p",e.defaultTableid,e.defcols)+";",e.removeKeys.push(i)})),new Function("p,params,alasql","var y;"+n+"return r")},z.Select.prototype.compileSelectGroup0=function(e){var t=this;t.columns.forEach((function(n,r){if(n instanceof z.Column&&"*"===n.columnid)e.groupStar=n.tableid||"default";else{for(var i,o=n instanceof z.Column?f(n.columnid):f(n.toString(!0)),a=0;a<r;a++)if(o===t.columns[a].nick){o=t.columns[a].nick+":"+r;break}n.nick=o,!t.group||-1<(i=t.group.findIndex((function(e){return e.columnid===n.columnid&&e.tableid===n.tableid})))&&(t.group[i].nick=o),!n.funcid||"ROWNUM"!==n.funcid.toUpperCase()&&"ROW_NUMBER"!==n.funcid.toUpperCase()||e.rownums.push(n.as)}})),this.columns.forEach((function(t){t.findAggregator&&t.findAggregator(e)})),this.having&&this.having.findAggregator&&this.having.findAggregator(e)},z.Select.prototype.compileSelectGroup1=function(e){var t="var r = {};";return this.columns.forEach((function(n){if(n instanceof z.Column&&"*"===n.columnid)return t+="for(var k in g) {r[k]=g[k]};","";var r=n.as;void 0===r&&(r=n instanceof z.Column?f(n.columnid):n.nick),e.groupColumns[r]=n.nick,t+="r['"+r+"']=",t+=l(n.toJS("g",""))+";";for(var i=0;i<e.removeKeys.length;i++)if(e.removeKeys[i]===r){e.removeKeys.splice(i,1);break}})),t},z.Select.prototype.compileSelectGroup2=function(e){var t=e.selectgfns;return this.columns.forEach((function(n){-1<e.ingroup.indexOf(n.nick)&&(t+="r['"+(n.as||n.nick)+"']=g['"+n.nick+"'];")})),this.orderColumns&&0<this.orderColumns.length&&this.orderColumns.forEach((function(n,r){r="$$$"+r,n instanceof z.Column&&e.groupColumns[n.columnid]?t+="r['"+r+"']=r['"+n.columnid+"'];":t+="r['"+r+"']="+n.toJS("g","")+";",e.removeKeys.push(r)})),new Function("g,params,alasql","var y;"+t+"return r")},z.Select.prototype.compileRemoveColumns=function(e){void 0!==this.removecolumns&&(e.removeKeys=e.removeKeys.concat(this.removecolumns.filter((function(e){return void 0===e.like})).map((function(e){return e.columnid}))),e.removeLikeKeys=this.removecolumns.filter((function(e){return void 0!==e.like})).map((function(e){return e.like.value})))},z.Select.prototype.compileHaving=function(e){if(this.having){var t=this.having.toJS("g",-1);return e.havingfns=t,new Function("g,params,alasql","var y;return "+t)}return function(){return!0}},z.Select.prototype.compileOrder=function(e,t){var n=this;if(n.orderColumns=[],this.order){if(this.order&&1==this.order.length&&this.order[0].expression&&"function"==typeof this.order[0].expression){var i=this.order[0].expression,o="FIRST"==this.order[0].nullsOrder?-1:"LAST"==this.order[0].nullsOrder?1:0;return function(e,t){if(e=i(e),t=i(t),o){if(null==e)return null==t?0:o;if(null==t)return-o}return t<e?1:e==t?0:-1}}var a="",s="";return this.order.forEach((function(i,o){u=i.expression instanceof z.NumValue?n.columns[i.expression.value-1]:i.expression,n.orderColumns.push(u);var l,c,u="$$$"+o;o="",i.expression instanceof z.Column&&(l=i.expression.columnid,e.xcolumns[l]?"DATE"!=(c=e.xcolumns[l].dbtypeid)&&"DATETIME"!=c&&"DATETIME2"!=c||(o=".valueOf()"):r.options.valueof&&(o=".valueOf()")),i.expression instanceof z.ParamValue&&(l=t[i.expression.param],e.xcolumns[l]?"DATE"!=(c=e.xcolumns[l].dbtypeid)&&"DATETIME"!=c&&"DATETIME2"!=c||(o=".valueOf()"):r.options.valueof&&(o=".valueOf()")),i.nocase&&(o+=".toUpperCase()"),i.nullsOrder&&("FIRST"==i.nullsOrder?a+="if((a['"+u+"'] != null) && (b['"+u+"'] == null)) return 1;":"LAST"==i.nullsOrder&&(a+="if((a['"+u+"'] == null) && (b['"+u+"'] != null)) return 1;"),a+="if((a['"+u+"'] == null) == (b['"+u+"'] == null)) {",s+="}"),a+="if((a['"+u+"']||'')"+o+("ASC"==i.direction?">":"<")+"(b['"+u+"']||'')"+o+")return 1;",a+="if((a['"+u+"']||'')"+o+"==(b['"+u+"']||'')"+o+"){",s+="}"})),a+="return 0;",a+=s+"return -1",e.orderfns=a,new Function("a,b","var y;"+a)}},z.Select.prototype.compilePivot=function(e){var t,n=this,i=n.pivot.columnid,o=n.pivot.expr.aggregatorid,a=n.pivot.inlist;if(null==(t=(n.pivot.expr.expression.hasOwnProperty("columnid")?n.pivot.expr:n.pivot.expr.expression).expression.columnid))throw"columnid not found";return a=a&&a.map((function(e){return e.expr.columnid})),function(){var e=this,n=e.columns.filter((function(e){return e.columnid!=i&&e.columnid!=t})).map((function(e){return e.columnid})),s=[],l={},c={},u={},h=[];if(e.data.forEach((function(e){if(!a||-1<a.indexOf(e[i])){var d=n.map((function(t){return e[t]})).join("`"),f=c[d];if(f||(f={},c[d]=f,h.push(f),n.forEach((function(t){f[t]=e[t]}))),u[d]||(u[d]={}),u[d][e[i]]?u[d][e[i]]++:u[d][e[i]]=1,l[e[i]]||(l[e[i]]=!0,s.push(e[i])),"SUM"==o||"AVG"==o)void 0===f[e[i]]&&(f[e[i]]=0),f[e[i]]+=+e[t];else if("COUNT"==o)void 0===f[e[i]]&&(f[e[i]]=0),f[e[i]]++;else if("MIN"==o)void 0===f[e[i]]&&(f[e[i]]=e[t]),e[t]<f[e[i]]&&(f[e[i]]=e[t]);else if("MAX"==o)void 0===f[e[i]]&&(f[e[i]]=e[t]),e[t]>f[e[i]]&&(f[e[i]]=e[t]);else if("FIRST"==o)void 0===f[e[i]]&&(f[e[i]]=e[t]);else if("LAST"==o)f[e[i]]=e[t];else{if(!r.aggr[o])throw new Error("Wrong aggregator in PIVOT clause");r.aggr[o](f[e[i]],e[t])}}})),"AVG"==o)for(var d in c){var f,p=c[d];for(f in p)-1==n.indexOf(f)&&f!=t&&(p[f]=p[f]/u[d][f])}e.data=h,a&&(s=a);var g=e.columns.filter((function(e){return e.columnid==t}))[0];e.columns=e.columns.filter((function(e){return!(e.columnid==i||e.columnid==t)})),s.forEach((function(t){var n=T(g);n.columnid=t,e.columns.push(n)}))}},z.Select.prototype.compileUnpivot=function(e){var t=this.unpivot.tocolumnid,n=this.unpivot.forcolumnid,r=this.unpivot.inlist.map((function(e){return e.columnid}));return function(){var i=[],o=e.columns.map((function(e){return e.columnid})).filter((function(e){return-1==r.indexOf(e)&&e!=n&&e!=t}));e.data.forEach((function(e){r.forEach((function(r){var a={};o.forEach((function(t){a[t]=e[t]})),a[n]=r,a[t]=e[r],i.push(a)}))})),e.data=i}};var $=function(e,t){for(var n=[],r=0,i=e.length,o=0;o<i+1;o++){for(var a,s=[],l=0;l<i;l++)a=e[l]instanceof z.Column?(e[l].nick=f(e[l].columnid),t.groupColumns[f(e[l].columnid)]=e[l].nick,e[l].nick+"\t"+e[l].toJS("p",t.sources[0].alias,t.defcols)):(t.groupColumns[f(e[l].toString())]=f(e[l].toString()),f(e[l].toString())+"\t"+e[l].toJS("p",t.sources[0].alias,t.defcols)),r&1<<l&&s.push(a);n.push(s),r=1+(r<<1)}return n},W=function(e,t){for(var n=[],r=e.length,i=1<<r,o=0;o<i;o++){for(var a=[],s=0;s<r;s++)o&1<<s&&(a=a.concat(X(e[s],t)));n.push(a)}return n},G=function(e,t){return e.reduce((function(e,n){return e.concat(X(n,t))}),[])},Y=function(e,t){for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)n.push(e[r].concat(t[i]));return n};function X(e,t){if(Array.isArray(e)){for(var n=[[]],r=0;r<e.length;r++)if(e[r]instanceof z.Column)e[r].nick=e[r].nick?f(e[r].nick):f(e[r].columnid),t.groupColumns[e[r].nick]=e[r].nick,n=n.map((function(n){return n.concat(e[r].nick+"\t"+e[r].toJS("p",t.sources[0].alias,t.defcols))}));else if(e[r]instanceof z.FuncValue)t.groupColumns[f(e[r].toString())]=f(e[r].toString()),n=n.map((function(n){return n.concat(f(e[r].toString())+"\t"+e[r].toJS("p",t.sources[0].alias,t.defcols))}));else if(e[r]instanceof z.GroupExpression)if("ROLLUP"==e[r].type)n=Y(n,$(e[r].group,t));else if("CUBE"==e[r].type)n=Y(n,W(e[r].group,t));else{if("GROUPING SETS"!=e[r].type)throw new Error("Unknown grouping function");n=Y(n,G(e[r].group,t))}else n=""===e[r]?[["1\t1"]]:n.map((function(n){return t.groupColumns[f(e[r].toString())]=f(e[r].toString()),n.concat(f(e[r].toString())+"\t"+e[r].toJS("p",t.sources[0].alias,t.defcols))}));return n}return e instanceof z.FuncValue?(t.groupColumns[f(e.toString())]=f(e.toString()),[e.toString()+"\t"+e.toJS("p",t.sources[0].alias,t.defcols)]):e instanceof z.Column?(e.nick=f(e.columnid),t.groupColumns[e.nick]=e.nick,[e.nick+"\t"+e.toJS("p",t.sources[0].alias,t.defcols)]):(t.groupColumns[f(e.toString())]=f(e.toString()),[f(e.toString())+"\t"+e.toJS("p",t.sources[0].alias,t.defcols)])}z.Select.prototype.compileDefCols=function(e,t){var n={".":{}};return this.from&&this.from.forEach((function(e){if(n["."][e.as||e.tableid]=!0,e instanceof z.Table){var i=e.as||e.tableid,o=r.databases[e.databaseid||t].tables[e.tableid];if(void 0===o)throw new Error("Table does not exist: "+e.tableid);o.columns&&o.columns.forEach((function(e){n[e.columnid]?n[e.columnid]="-":n[e.columnid]=i}))}else if(!(e instanceof z.Select||e instanceof z.Search||e instanceof z.ParamValue||e instanceof z.VarValue||e instanceof z.FuncValue||e instanceof z.FromData||e instanceof z.Json||e.inserted))throw new Error("Unknown type of FROM clause")})),this.joins&&this.joins.forEach((function(e){if(n["."][e.as||e.table.tableid]=!0,e.table){var i=e.table.tableid;e.as&&(i=e.as),i=e.as||e.table.tableid;var o=r.databases[e.table.databaseid||t].tables[e.table.tableid];o.columns&&o.columns.forEach((function(e){n[e.columnid]?n[e.columnid]="-":n[e.columnid]=i}))}else if(!e.select&&!e.param&&!e.func)throw new Error("Unknown type of FROM clause")})),n},z.Union=function(e){return z.extend(this,e)},z.Union.prototype.toString=function(){return"UNION"},z.Union.prototype.compile=function(e){return null},z.Apply=function(e){return z.extend(this,e)},z.Apply.prototype.toString=function(){var e=this.applymode+" APPLY ("+this.select.toString()+")";return this.as&&(e+=" AS "+this.as),e},z.Over=function(e){return z.extend(this,e)},z.Over.prototype.toString=function(){var e="OVER (";return this.partition&&(e+="PARTITION BY "+this.partition.toString(),this.order&&(e+=" ")),this.order&&(e+="ORDER BY "+this.order.toString()),e+")"},z.ExpressionStatement=function(e){return z.extend(this,e)},z.ExpressionStatement.prototype.toString=function(){return this.expression.toString()},z.ExpressionStatement.prototype.execute=function(e,t,n){if(this.expression)return r.precompile(this,e,t),t=new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this)(t,r),n?n(t):t},z.Expression=function(e){return z.extend(this,e)},z.Expression.prototype.toString=function(e){return e=this.expression.toString(e),this.order&&(e+=" "+this.order.toString()),this.nocase&&(e+=" COLLATE NOCASE"),this.direction&&(e+=" "+this.direction),e},z.Expression.prototype.findAggregator=function(e){this.expression.findAggregator&&this.expression.findAggregator(e)},z.Expression.prototype.toJS=function(e,t,n){return this.expression.reduced?"true":this.expression.toJS(e,t,n)},z.Expression.prototype.compile=function(e,t,n){return!!this.reduced||new Function("p","var y;return "+this.toJS(e,t,n))},z.JavaScript=function(e){return z.extend(this,e)},z.JavaScript.prototype.toString=function(){return"``"+this.value+"``"},z.JavaScript.prototype.toJS=function(){return"("+this.value+")"},z.JavaScript.prototype.execute=function(e,t,n){return new Function("params,alasql,p",this.value)(t,r),n?n(1):1},z.Literal=function(e){return z.extend(this,e)},z.Literal.prototype.toString=function(e){var t=this.value;return this.value1&&(t=this.value1+"."+t),this.alias&&!e&&(t+=" AS "+this.alias),t},z.Join=function(e){return z.extend(this,e)},z.Join.prototype.toString=function(){var e=" ";return this.joinmode&&(e+=this.joinmode+" "),e+"JOIN "+this.table.toString()},z.Table=function(e){return z.extend(this,e)},z.Table.prototype.toString=function(){var e=this.tableid;return this.databaseid?this.databaseid+"."+e:e},z.View=function(e){return z.extend(this,e)},z.View.prototype.toString=function(){var e=this.viewid;return this.databaseid?this.databaseid+"."+e:e},z.Op=function(e){return z.extend(this,e)},z.Op.prototype.toString=function(){if("IN"===this.op||"NOT IN"===this.op)return this.left.toString()+" "+this.op+" ("+this.right.toString()+")";if(this.allsome)return this.left.toString()+" "+this.op+" "+this.allsome+" ("+this.right.toString()+")";if("->"!==this.op&&"!"!==this.op)return"BETWEEN"!==this.op&&"NOT BETWEEN"!==this.op?this.left.toString()+" "+this.op+" "+(this.allsome?this.allsome+" ":"")+this.right.toString():this.left.toString()+" "+this.op+" "+this.right1.toString()+" AND "+this.right2.toString();var e=this.left.toString()+this.op;return"string"!=typeof this.right&&"number"!=typeof this.right&&(e+="("),e+=this.right.toString(),"string"!=typeof this.right&&"number"!=typeof this.right&&(e+=")"),e},z.Op.prototype.findAggregator=function(e){this.left&&this.left.findAggregator&&this.left.findAggregator(e),this.right&&this.right.findAggregator&&!this.allsome&&this.right.findAggregator(e)},z.Op.prototype.toType=function(e){if(-1<["-","*","/","%","^"].indexOf(this.op))return"number";if(-1<["||"].indexOf(this.op))return"string";if("+"===this.op){if("string"===this.left.toType(e)||"string"===this.right.toType(e))return"string";if("number"===this.left.toType(e)||"number"===this.right.toType(e))return"number"}return-1<["AND","OR","NOT","=","==","===","!=","!==","!===",">",">=","<","<=","IN","NOT IN","LIKE","NOT LIKE","REGEXP","GLOB"].indexOf(this.op)||"BETWEEN"===this.op||"NOT BETWEEN"===this.op||"IS NULL"===this.op||"IS NOT NULL"===this.op||this.allsome?"boolean":this.op?"unknown":this.left.toType()},z.Op.prototype.toJS=function(e,t,n){function r(r){return r.toJS&&(r=r.toJS(e,t,n)),"y["+(a.push(r)-1)+"]"}var i,o,a=[],s=this.op,l=this,c=function(){return r(l.left)},u=function(){return r(l.right)};if("="===this.op?s="===":"<>"===this.op?s="!=":"OR"===this.op&&(s="||"),"->"===this.op&&(i="("+c()+"||{})",o="string"==typeof this.right?i+'["'+this.right+'"]':"number"==typeof this.right?i+"["+this.right+"]":this.right instanceof z.FuncValue?(o=[],this.right.args&&0!==this.right.args.length&&(o=this.right.args.map(r)),i+"["+JSON.stringify(this.right.funcid)+"]("+o.join(",")+")"):i+"["+u()+"]"),"!"===this.op&&"string"==typeof this.right&&(o="alasql.databases[alasql.useid].objects["+c()+']["'+this.right+'"]'),"IS"===this.op&&(o="(("+c()+"==null) === ("+u()+"==null))"),"=="===this.op&&(o="alasql.utils.deepEqual("+c()+","+u()+")"),"==="!==this.op&&"!==="!==this.op||(o="("+("!==="===this.op?"!":"")+"(("+c()+").valueOf()===("+u()+").valueOf()))"),"!=="===this.op&&(o="(!alasql.utils.deepEqual("+c()+","+u()+"))"),"||"===this.op&&(o="(''+("+c()+"||'')+("+u()+'||""))'),"LIKE"!==this.op&&"NOT LIKE"!==this.op||(o="("+("NOT LIKE"===this.op?"!":"")+"alasql.utils.like("+u()+","+c(),this.escape&&(o+=","+r(this.escape)),o+="))"),"REGEXP"===this.op&&(o="alasql.stdfn.REGEXP_LIKE("+c()+","+u()+")"),"GLOB"===this.op&&(o="alasql.utils.glob("+c()+","+u()+")"),"BETWEEN"!==this.op&&"NOT BETWEEN"!==this.op||(i=c(),o="("+("NOT BETWEEN"===this.op?"!":"")+"(("+r(this.right1)+"<="+i+") && ("+i+"<="+r(this.right2)+")))"),"IN"===this.op&&(this.right instanceof z.Select?(o="(",o+="alasql.utils.flatArray(this.queriesfn["+this.queriesidx+"](params,null,"+e+"))",o+=".indexOf(",o+=c()+")>-1)"):o=Array.isArray(this.right)?"(["+this.right.map(r).join(",")+"].indexOf("+c()+")>-1)":"("+u()+".indexOf("+c()+")>-1)"),"NOT IN"===this.op&&(this.right instanceof z.Select?(o="(",o+="alasql.utils.flatArray(this.queriesfn["+this.queriesidx+"](params,null,p))",o+=".indexOf(",o+=c()+")<0)"):Array.isArray(this.right)?(o="(["+this.right.map(r).join(",")+"].indexOf(",o+=c()+")<0)"):(o="("+u()+".indexOf(",o+=c()+")==-1)")),"ALL"===this.allsome)if(this.right instanceof z.Select)o="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",o+=".every(function(b){return (",o+=c()+")"+s+"b})";else{if(!Array.isArray(this.right))throw new Error("NOT IN operator without SELECT");o=""+(1==this.right.length?r(this.right[0]):"["+this.right.map(r).join(",")+"]"),o+=".every(function(b){return (",o+=c()+")"+s+"b})"}if("SOME"===this.allsome||"ANY"===this.allsome)if(this.right instanceof z.Select)o="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",o+=".some(function(b){return (",o+=c()+")"+s+"b})";else{if(!Array.isArray(this.right))throw new Error("SOME/ANY operator without SELECT");o=""+(1==this.right.length?r(this.right[0]):"["+this.right.map(r).join(",")+"]"),o+=".some(function(b){return (",o+=c()+")"+s+"b})"}if("AND"===this.op){if(this.left.reduced){if(this.right.reduced)return"true";o=u()}else this.right.reduced&&(o=c());s="&&"}return c=o||"("+c()+s+u()+")",u="y=[("+a.join("), (")+")]","&&"===s||"||"===s||"IS"===s||"IS NULL"===s||"IS NOT NULL"===s?"("+u+", "+c+")":"("+u+", y.some(function(e){return e == null}) ? void 0 : "+c+")"},z.VarValue=function(e){return z.extend(this,e)},z.VarValue.prototype.toString=function(){return"@"+this.variable},z.VarValue.prototype.toType=function(){return"unknown"},z.VarValue.prototype.toJS=function(){return"alasql.vars['"+this.variable+"']"},z.NumValue=function(e){return z.extend(this,e)},z.NumValue.prototype.toString=function(){return this.value.toString()},z.NumValue.prototype.toType=function(){return"number"},z.NumValue.prototype.toJS=function(){return""+this.value},z.StringValue=function(e){return z.extend(this,e)},z.StringValue.prototype.toString=function(){return"'"+this.value.toString()+"'"},z.StringValue.prototype.toType=function(){return"string"},z.StringValue.prototype.toJS=function(){return"'"+f(this.value)+"'"},z.DomainValueValue=function(e){return z.extend(this,e)},z.DomainValueValue.prototype.toString=function(){return"VALUE"},z.DomainValueValue.prototype.toType=function(){return"object"},z.DomainValueValue.prototype.toJS=function(e,t,n){return e},z.ArrayValue=function(e){return z.extend(this,e)},z.ArrayValue.prototype.toString=function(){return"ARRAY[]"},z.ArrayValue.prototype.toType=function(){return"object"},z.ArrayValue.prototype.toJS=function(e,t,n){return"[("+this.value.map((function(r){return r.toJS(e,t,n)})).join("), (")+")]"},z.LogicValue=function(e){return z.extend(this,e)},z.LogicValue.prototype.toString=function(){return this.value?"TRUE":"FALSE"},z.LogicValue.prototype.toType=function(){return"boolean"},z.LogicValue.prototype.toJS=function(){return this.value?"true":"false"},z.NullValue=function(e){return z.extend(this,e)},z.NullValue.prototype.toString=function(){return"NULL"},z.NullValue.prototype.toJS=function(){return"undefined"},z.ParamValue=function(e){return z.extend(this,e)},z.ParamValue.prototype.toString=function(){return"$"+this.param},z.ParamValue.prototype.toJS=function(){return"string"==typeof this.param?"params['"+this.param+"']":"params["+this.param+"]"},z.UniOp=function(e){return z.extend(this,e)},z.UniOp.prototype.toString=function(){var e=void 0;return"~"===this.op&&(e=this.op+this.right.toString()),"-"===this.op&&(e=this.op+this.right.toString()),"+"===this.op&&(e=this.op+this.right.toString()),"#"===this.op&&(e=this.op+this.right.toString()),"NOT"===this.op&&(e=this.op+"("+this.right.toString()+")"),(e=null===this.op?"("+this.right.toString()+")":e)||"("+this.right.toString()+")"},z.UniOp.prototype.findAggregator=function(e){this.right.findAggregator&&this.right.findAggregator(e)},z.UniOp.prototype.toType=function(){return"-"===this.op||"+"===this.op?"number":"NOT"===this.op?"boolean":void 0},z.UniOp.prototype.toJS=function(e,t,n){return"~"===this.op?"(~("+this.right.toJS(e,t,n)+"))":"-"===this.op?"(-("+this.right.toJS(e,t,n)+"))":"+"===this.op?"("+this.right.toJS(e,t,n)+")":"NOT"===this.op?"!("+this.right.toJS(e,t,n)+")":"#"===this.op?this.right instanceof z.Column?"(alasql.databases[alasql.useid].objects['"+this.right.columnid+"'])":"(alasql.databases[alasql.useid].objects["+this.right.toJS(e,t,n)+"])":null==this.op?"("+this.right.toJS(e,t,n)+")":void 0},z.Column=function(e){return z.extend(this,e)},z.Column.prototype.toString=function(e){var t=this.columnid==+this.columnid?"["+this.columnid+"]":this.columnid;return this.tableid&&(t=+this.columnid===this.columnid?this.tableid+t:this.tableid+"."+t,this.databaseid&&(t=this.databaseid+"."+t)),this.alias&&!e&&(t+=" AS "+this.alias),t},z.Column.prototype.toJS=function(e,t,n){var r="";if(this.tableid||""!==t||n)if("g"===e)r="g['"+this.nick+"']";else if(this.tableid)r="_"!==this.columnid?e+"['"+this.tableid+"']['"+this.columnid+"']":"g"===e?"g['_']":e+"['"+this.tableid+"']";else if(n){if("-"===(n=n[this.columnid]))throw new Error('Cannot resolve column "'+this.columnid+'" because it exists in two source tables');r=n?"_"!==this.columnid?e+"['"+n+"']['"+this.columnid+"']":e+"['"+n+"']":"_"!==this.columnid?e+"['"+(this.tableid||t)+"']['"+this.columnid+"']":e+"['"+(this.tableid||t)+"']"}else r=-1===t?e+"['"+this.columnid+"']":"_"!==this.columnid?e+"['"+(this.tableid||t)+"']['"+this.columnid+"']":e+"['"+(this.tableid||t)+"']";else r="_"!==this.columnid?e+"['"+this.columnid+"']":"g"===e?"g['_']":e;return r},z.AggrValue=function(e){return z.extend(this,e)},z.AggrValue.prototype.toString=function(e){var t="";return"REDUCE"===this.aggregatorid?t+=this.funcid.replace(Z,"")+"(":t+=this.aggregatorid+"(",this.distinct&&(t+="DISTINCT "),this.expression&&(t+=this.expression.toString()),t+=")",this.over&&(t+=" "+this.over.toString()),this.alias&&!e&&(t+=" AS "+this.alias),t},z.AggrValue.prototype.findAggregator=function(e){var t=f(this.toString())+":"+e.selectGroup.length;if(!(n=!1)){if(!this.nick){this.nick=t;for(var n=!1,r=0;r<e.removeKeys.length;r++)if(e.removeKeys[r]===t){n=!0;break}n||e.removeKeys.push(t)}e.selectGroup.push(this)}},z.AggrValue.prototype.toType=function(){return-1<["SUM","COUNT","AVG","MIN","MAX","AGGR","VAR","STDDEV"].indexOf(this.aggregatorid)?"number":-1<["ARRAY"].indexOf(this.aggregatorid)?"array":-1<["FIRST","LAST"].indexOf(this.aggregatorid)?this.expression.toType():void 0},z.AggrValue.prototype.toJS=function(){var e=this.nick;return"g['"+(e=void 0===e?this.toString():e)+"']"},z.OrderExpression=function(e){return z.extend(this,e)},z.OrderExpression.prototype.toString=z.Expression.prototype.toString,z.GroupExpression=function(e){return z.extend(this,e)},z.GroupExpression.prototype.toString=function(){return this.type+"("+this.group.toString()+")"},z.FromData=function(e){return z.extend(this,e)},z.FromData.prototype.toString=function(){return this.data?"DATA("+(1e16*Math.random()|0)+")":"?"},z.FromData.prototype.toJS=function(){},z.Select.prototype.exec=function(e,t){this.preparams&&(e=this.preparams.concat(e));var n=r.useid,i=r.databases[n],o=this.toString(),a=y(o);if(n=this.compile(n))return n.sql=o,n.dbversion=i.dbversion,i.sqlCacheSize>r.MAXSQLCACHESIZE&&i.resetSqlCache(),i.sqlCacheSize++,i.sqlCache[a]=n,r.res=n(e,t)},z.Select.prototype.Select=function(){var e=this,t=[];if(1<arguments.length)t=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");t=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return e.columns=[],t.forEach((function(t){var n;"string"==typeof t?e.columns.push(new z.Column({columnid:t})):"function"==typeof t&&(n=0,e.preparams?n=e.preparams.length:e.preparams=[],e.preparams.push(t),e.columns.push(new z.Column({columnid:"*",func:t,param:n})))})),e},z.Select.prototype.From=function(e){var t=this;if(t.from||(t.from=[]),Array.isArray(e)){var n=0;t.preparams?n=t.preparams.length:t.preparams=[],t.preparams.push(e),t.from.push(new z.ParamValue({param:n}))}else{if("string"!=typeof e)throw new Error("Unknown arguments in From() function");t.from.push(new z.Table({tableid:e}))}return t},z.Select.prototype.OrderBy=function(){var e=this,t=[];if(e.order=[],0==arguments.length)t=["_"];else if(1<arguments.length)t=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");t=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return 0<t.length&&t.forEach((function(t){var n=new z.Column({columnid:t});"function"==typeof t&&(n=t),e.order.push(new z.OrderExpression({expression:n,direction:"ASC"}))})),e},z.Select.prototype.Top=function(e){return this.top=new z.NumValue({value:e}),this},z.Select.prototype.GroupBy=function(){var e=this,t=[];if(1<arguments.length)t=Array.prototype.slice.call(arguments);else{if(1!=arguments.length)throw new Error("Wrong number of arguments of Select() function");t=Array.isArray(arguments[0])?arguments[0]:[arguments[0]]}return e.group=[],t.forEach((function(t){t=new z.Column({columnid:t}),e.group.push(t)})),e},z.Select.prototype.Where=function(e){return"function"==typeof e&&(this.where=e),this},z.FuncValue=function(e){return z.extend(this,e)};var Z=/[^0-9A-Z_$]+/i;z.FuncValue.prototype.toString=function(e){var t="";return r.fn[this.funcid]||r.aggr[this.funcid]?t+=this.funcid:(r.stdlib[this.funcid.toUpperCase()]||r.stdfn[this.funcid.toUpperCase()])&&(t+=this.funcid.toUpperCase().replace(Z,"")),"CURRENT_TIMESTAMP"!==this.funcid&&(t+="(",this.args&&0<this.args.length&&(t+=this.args.map((function(e){return e.toString()})).join(",")),t+=")"),this.as&&!e&&(t+=" AS "+this.as.toString()),t},z.FuncValue.prototype.execute=function(e,t,n){return r.precompile(this,e,t),new Function("params,alasql","var y;return "+this.toJS("","",null))(t,r),n?n(1):1},z.FuncValue.prototype.findAggregator=function(e){this.args&&0<this.args.length&&this.args.forEach((function(t){t.findAggregator&&t.findAggregator(e)}))},z.FuncValue.prototype.toJS=function(e,t,n){var i="",o=this.funcid;return!r.fn[o]&&r.stdlib[o.toUpperCase()]?this.args&&0<this.args.length?i+=r.stdlib[o.toUpperCase()].apply(this,this.args.map((function(n){return n.toJS(e,t)}))):i+=r.stdlib[o.toUpperCase()]():(!r.fn[o]&&r.stdfn[o.toUpperCase()]?(this.newid&&(i+="new "),i+="alasql.stdfn["+JSON.stringify(this.funcid.toUpperCase())+"](",this.args&&0<this.args.length&&(i+=this.args.map((function(r){return r.toJS(e,t,n)})).join(","))):(this.newid&&(i+="new "),i+="alasql.fn["+JSON.stringify(this.funcid)+"](",this.args&&0<this.args.length&&(i+=this.args.map((function(r){return r.toJS(e,t,n)})).join(","))),i+=")"),i},R=r.stdlib={},F=r.stdfn={},R.ABS=function(e){return"Math.abs("+e+")"},R.CLONEDEEP=function(e){return"alasql.utils.cloneDeep("+e+")"},F.CONCAT=function(){return Array.prototype.slice.call(arguments).join("")},R.EXP=function(e){return"Math.pow(Math.E,"+e+")"},R.IIF=function(e,t,n){if(3==arguments.length)return"(("+e+")?("+t+"):("+n+"))";throw new Error("Number of arguments of IFF is not equals to 3")},R.IFNULL=function(e,t){return"("+e+"||"+t+")"},R.INSTR=function(e,t){return"(("+e+").indexOf("+t+")+1)"},R.LEN=R.LENGTH=function(e){return c(e,"y.length")},R.LOWER=R.LCASE=function(e){return c(e,"String(y).toLowerCase()")},R.LTRIM=function(e){return c(e,'y.replace(/^[ ]+/,"")')},R.RTRIM=function(e){return c(e,'y.replace(/[ ]+$/,"")')},R.MAX=R.GREATEST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a > b ? a : b; })"},R.MIN=R.LEAST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a < b ? a : b; })"},R.SUBSTRING=R.SUBSTR=R.MID=function(e,t,n){return 2==arguments.length?c(e,"y.substr("+t+"-1)"):3==arguments.length?c(e,"y.substr("+t+"-1,"+n+")"):void 0},F.REGEXP_LIKE=function(e,t,n){return-1<(e||"").search(RegExp(t,n))},R.ISNULL=R.NULLIF=function(e,t){return"("+e+"=="+t+"?undefined:"+e+")"},R.POWER=function(e,t){return"Math.pow("+e+","+t+")"},R.RANDOM=function(e){return 0==arguments.length?"Math.random()":"(Math.random()*("+e+")|0)"},R.ROUND=function(e,t){return 2==arguments.length?"Math.round(("+e+")*Math.pow(10,("+t+")))/Math.pow(10,("+t+"))":"Math.round("+e+")"},R.CEIL=R.CEILING=function(e){return"Math.ceil("+e+")"},R.FLOOR=function(e){return"Math.floor("+e+")"},R.ROWNUM=function(){return"1"},R.ROW_NUMBER=function(){return"1"},R.SQRT=function(e){return"Math.sqrt("+e+")"},R.TRIM=function(e){return c(e,"y.trim()")},R.UPPER=R.UCASE=function(e){return c(e,"String(y).toUpperCase()")},F.CONCAT_WS=function(){var e=Array.prototype.slice.call(arguments);return e.slice(1,e.length).join(e[0])},r.aggr.GROUP_CONCAT=function(e,t,n){return 1===n?""+e:2===n?t+=","+e:t},r.aggr.MEDIAN=function(e,t,n){return 2===n?(null!==e&&t.push(e),t):1===n?null===e?[]:[e]:t.length?(n=t.sort((function(e,t){return e===t?0:t<e?1:-1})),e=(n.length+1)/2,Number.isInteger(e)?n[e-1]:"number"==typeof(t=n[Math.floor(e-1)])||t instanceof Number?(t+n[Math.ceil(e-1)])/2:t):t},r.aggr.QUART=function(e,t,n,r){return 2===n?(null!==e&&t.push(e),t):1===n?null===e?[]:[e]:t.length?(r=r||1,t=t.sort((function(e,t){return e===t?0:t<e?1:-1})),r=r*(t.length+1)/4,Number.isInteger(r)?t[r-1]:t[Math.floor(r)]):t},r.aggr.QUART2=function(e,t,n){return r.aggr.QUART(e,t,n,2)},r.aggr.QUART3=function(e,t,n){return r.aggr.QUART(e,t,n,3)},r.aggr.VAR=function(e,t,n){if(1===n)return null===e?{arr:[],sum:0}:{arr:[e],sum:e};if(2===n)return null===e||(t.arr.push(e),t.sum+=e),t;for(var r=t.arr.length,i=t.sum/r,o=0,a=0;a<r;a++)o+=(t.arr[a]-i)*(t.arr[a]-i);return o/(r-1)},r.aggr.STDEV=function(e,t,n){return 1===n||2===n?r.aggr.VAR(e,t,n):Math.sqrt(r.aggr.VAR(e,t,n))},r.aggr.VARP=function(e,t,n){if(1==n)return{arr:[e],sum:e};if(2==n)return t.arr.push(e),t.sum+=e,t;for(var r=t.arr.length,i=t.sum/r,o=0,a=0;a<r;a++)o+=(t.arr[a]-i)*(t.arr[a]-i);return o/r},r.aggr.STD=r.aggr.STDDEV=r.aggr.STDEVP=function(e,t,n){return 1==n||2==n?r.aggr.VARP(e,t,n):Math.sqrt(r.aggr.VARP(e,t,n))},r._aggrOriginal=r.aggr,r.aggr={},Object.keys(r._aggrOriginal).forEach((function(e){r.aggr[e]=function(t,n,i){if(3!==i||void 0!==n)return r._aggrOriginal[e].apply(null,arguments)}})),F.REPLACE=function(e,t,n){return(e||"").split(t).join(n)};for(var K=[],J=0;J<256;J++)K[J]=(J<16?"0":"")+J.toString(16);F.NEWID=F.UUID=F.GEN_RANDOM_UUID=function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return K[255&e]+K[e>>8&255]+K[e>>16&255]+K[e>>24&255]+"-"+K[255&t]+K[t>>8&255]+"-"+K[t>>16&15|64]+K[t>>24&255]+"-"+K[63&n|128]+K[n>>8&255]+"-"+K[n>>16&255]+K[n>>24&255]+K[255&r]+K[r>>8&255]+K[r>>16&255]+K[r>>24&255]},z.CaseValue=function(e){return z.extend(this,e)},z.CaseValue.prototype.toString=function(){var e="CASE ";return this.expression&&(e+=this.expression.toString()),this.whens&&(e+=this.whens.map((function(e){return" WHEN "+e.when.toString()+" THEN "+e.then.toString()})).join()),e+" END"},z.CaseValue.prototype.findAggregator=function(e){this.expression&&this.expression.findAggregator&&this.expression.findAggregator(e),this.whens&&0<this.whens.length&&this.whens.forEach((function(t){t.when.findAggregator&&t.when.findAggregator(e),t.then.findAggregator&&t.then.findAggregator(e)})),this.elses&&this.elses.findAggregator&&this.elses.findAggregator(e)},z.CaseValue.prototype.toJS=function(e,t,n){var r="((function("+e+",params,alasql){var y,r;";return this.expression?(r+="v="+this.expression.toJS(e,t,n)+";",r+=(this.whens||[]).map((function(r){return" if(v=="+r.when.toJS(e,t,n)+") {r="+r.then.toJS(e,t,n)+"}"})).join(" else ")):r+=(this.whens||[]).map((function(r){return" if("+r.when.toJS(e,t,n)+") {r="+r.then.toJS(e,t,n)+"}"})).join(" else "),this.elses&&(r+=" else {r="+this.elses.toJS(e,t,n)+"}"),r+";return r;}).bind(this))("+e+",params,alasql)"},z.Json=function(e){return z.extend(this,e)},z.Json.prototype.toString=function(){var e="";return(e+=Q(this.value))+""};var Q=r.utils.JSONtoString=function(e){var t="";if("string"==typeof e)t='"'+e+'"';else if("number"==typeof e)t=e;else if("boolean"==typeof e)t=e;else{if("object"!=typeof e)throw new Error("2Can not show JSON object "+JSON.stringify(e));if(Array.isArray(e))t+="["+e.map((function(e){return Q(e)})).join(",")+"]";else if(!e.toJS||e instanceof z.Json){t="{";var n,r=[];for(n in e){var i="";if("string"==typeof n)i+='"'+n+'"';else if("number"==typeof n)i+=n;else{if("boolean"!=typeof n)throw new Error("THis is not ES6... no expressions on left side yet");i+=n}i+=":"+Q(e[n]),r.push(i)}t+=r.join(",")+"}"}else{if(!e.toString)throw new Error("1Can not show JSON object "+JSON.stringify(e));t=e.toString()}}return t};function ee(e,t,n,r){var i="";if("string"==typeof e)i='"'+e+'"';else if("number"==typeof e)i="("+e+")";else if("boolean"==typeof e)i=e;else{if("object"!=typeof e)throw new Error("2Can not parse JSON object "+JSON.stringify(e));if(Array.isArray(e))i+="["+e.map((function(e){return ee(e,t,n,r)})).join(",")+"]";else if(!e.toJS||e instanceof z.Json){i="{";var o,a=[];for(o in e){var s="";if("string"==typeof o)s+='"'+o+'"';else if("number"==typeof o)s+=o;else{if("boolean"!=typeof o)throw new Error("THis is not ES6... no expressions on left side yet");s+=o}s+=":"+ee(e[o],t,n,r),a.push(s)}i+=a.join(",")+"}"}else{if(!e.toJS)throw new Error("1Can not parse JSON object "+JSON.stringify(e));i=e.toJS(t,n,r)}}return i}z.Json.prototype.toJS=function(e,t,n){return ee(this.value,e,t,n)},z.Convert=function(e){return z.extend(this,e)},z.Convert.prototype.toString=function(){var e="CONVERT(";return e+=this.dbtypeid,void 0!==this.dbsize&&(e+="("+this.dbsize,this.dbprecision&&(e+=","+this.dbprecision),e+=")"),e+=","+this.expression.toString(),this.style&&(e+=","+this.style),e+")"},z.Convert.prototype.toJS=function(e,t,n){return"alasql.stdfn.CONVERT("+this.expression.toJS(e,t,n)+',{dbtypeid:"'+this.dbtypeid+'",dbsize:'+this.dbsize+",dbprecision:"+this.dbprecision+",style:"+this.style+"})"},r.stdfn.CONVERT=function(e,t){var n=e;if(t.style){var r=/\d{8}/.test(n)?new Date(+n.substr(0,4),+n.substr(4,2)-1,+n.substr(6,2)):new Date(n);switch(t.style){case 1:n=("0"+(r.getMonth()+1)).substr(-2)+"/"+("0"+r.getDate()).substr(-2)+"/"+("0"+r.getYear()).substr(-2);break;case 2:n=("0"+r.getYear()).substr(-2)+"."+("0"+(r.getMonth()+1)).substr(-2)+"."+("0"+r.getDate()).substr(-2);break;case 3:n=("0"+r.getDate()).substr(-2)+"/"+("0"+(r.getMonth()+1)).substr(-2)+"/"+("0"+r.getYear()).substr(-2);break;case 4:n=("0"+r.getDate()).substr(-2)+"."+("0"+(r.getMonth()+1)).substr(-2)+"."+("0"+r.getYear()).substr(-2);break;case 5:n=("0"+r.getDate()).substr(-2)+"-"+("0"+(r.getMonth()+1)).substr(-2)+"-"+("0"+r.getYear()).substr(-2);break;case 6:n=("0"+r.getDate()).substr(-2)+" "+r.toString().substr(4,3).toLowerCase()+" "+("0"+r.getYear()).substr(-2);break;case 7:n=r.toString().substr(4,3)+" "+("0"+r.getDate()).substr(-2)+","+("0"+r.getYear()).substr(-2);break;case 8:case 108:n=("0"+r.getHours()).substr(-2)+":"+("0"+r.getMinutes()).substr(-2)+":"+("0"+r.getSeconds()).substr(-2);break;case 10:n=("0"+(r.getMonth()+1)).substr(-2)+"-"+("0"+r.getDate()).substr(-2)+"-"+("0"+r.getYear()).substr(-2);break;case 11:n=("0"+r.getYear()).substr(-2)+"/"+("0"+(r.getMonth()+1)).substr(-2)+"/"+("0"+r.getDate()).substr(-2);break;case 12:n=("0"+r.getYear()).substr(-2)+("0"+(r.getMonth()+1)).substr(-2)+("0"+r.getDate()).substr(-2);break;case 101:n=("0"+(r.getMonth()+1)).substr(-2)+"/"+("0"+r.getDate()).substr(-2)+"/"+r.getFullYear();break;case 102:n=r.getFullYear()+"."+("0"+(r.getMonth()+1)).substr(-2)+"."+("0"+r.getDate()).substr(-2);break;case 103:n=("0"+r.getDate()).substr(-2)+"/"+("0"+(r.getMonth()+1)).substr(-2)+"/"+r.getFullYear();break;case 104:n=("0"+r.getDate()).substr(-2)+"."+("0"+(r.getMonth()+1)).substr(-2)+"."+r.getFullYear();break;case 105:n=("0"+r.getDate()).substr(-2)+"-"+("0"+(r.getMonth()+1)).substr(-2)+"-"+r.getFullYear();break;case 106:n=("0"+r.getDate()).substr(-2)+" "+r.toString().substr(4,3).toLowerCase()+" "+r.getFullYear();break;case 107:n=r.toString().substr(4,3)+" "+("0"+r.getDate()).substr(-2)+","+r.getFullYear();break;case 110:n=("0"+(r.getMonth()+1)).substr(-2)+"-"+("0"+r.getDate()).substr(-2)+"-"+r.getFullYear();break;case 111:n=r.getFullYear()+"/"+("0"+(r.getMonth()+1)).substr(-2)+"/"+("0"+r.getDate()).substr(-2);break;case 112:n=r.getFullYear()+("0"+(r.getMonth()+1)).substr(-2)+("0"+r.getDate()).substr(-2);break;default:throw new Error("The CONVERT style "+t.style+" is not realized yet.")}}if(e=t.dbtypeid.toUpperCase(),"Date"==t.dbtypeid)return new Date(n);if("DATE"==e)return(i=new Date(n)).getFullYear()+"."+("0"+(i.getMonth()+1)).substr(-2)+"."+("0"+i.getDate()).substr(-2);if("DATETIME"==e||"DATETIME2"==e){var i,o=(i=new Date(n)).getFullYear()+"."+("0"+(i.getMonth()+1)).substr(-2)+"."+("0"+i.getDate()).substr(-2);return(o+=" "+("0"+i.getHours()).substr(-2)+":"+("0"+i.getMinutes()).substr(-2)+":"+("0"+i.getSeconds()).substr(-2))+"."+("00"+i.getMilliseconds()).substr(-3)}if(-1<["MONEY"].indexOf(e))return(0|(a=+n))+100*a%100/100;if(-1<["BOOLEAN"].indexOf(e))return!!n;if(-1<["INT","INTEGER","SMALLINT","BIGINT","SERIAL","SMALLSERIAL","BIGSERIAL"].indexOf(t.dbtypeid.toUpperCase()))return 0|n;if(-1<["STRING","VARCHAR","NVARCHAR","CHARACTER VARIABLE"].indexOf(t.dbtypeid.toUpperCase()))return t.dbsize?(""+n).substr(0,t.dbsize):""+n;if(-1<["CHAR","CHARACTER","NCHAR"].indexOf(e))return(n+new Array(t.dbsize+1).join(" ")).substr(0,t.dbsize);if(-1<["NUMBER","FLOAT","DECIMAL","NUMERIC"].indexOf(e)){var a=+n;return a=void 0!==t.dbsize?parseFloat(a.toPrecision(t.dbsize)):a,void 0!==t.dbprecision?parseFloat(a.toFixed(t.dbprecision)):a}if(-1<["JSON"].indexOf(e)){if("object"==typeof n)return n;try{return JSON.parse(n)}catch(e){throw new Error("Cannot convert string to JSON")}}return n},z.ColumnDef=function(e){return z.extend(this,e)},z.ColumnDef.prototype.toString=function(){var e=this.columnid;return this.dbtypeid&&(e+=" "+this.dbtypeid),this.dbsize&&(e+="("+this.dbsize,this.dbprecision&&(e+=","+this.dbprecision),e+=")"),this.primarykey&&(e+=" PRIMARY KEY"),this.notnull&&(e+=" NOT NULL"),e},z.CreateTable=function(e){return z.extend(this,e)},z.CreateTable.prototype.toString=function(){var e="CREATE";return this.temporary&&(e+=" TEMPORARY"),this.view?e+=" VIEW":e+=" "+(this.class?"CLASS":"TABLE"),this.ifnotexists&&(e+=" IF NOT EXISTS"),e+=" "+this.table.toString(),this.viewcolumns&&(e+="("+this.viewcolumns.map((function(e){return e.toString()})).join(",")+")"),this.as?e+=" AS "+this.as:e+=" ("+this.columns.map((function(e){return e.toString()})).join(",")+")",this.view&&this.select&&(e+=" AS "+this.select.toString()),e},z.CreateTable.prototype.execute=function(e,t,n){var i=r.databases[this.table.databaseid||e],o=this.table.tableid;if(!o)throw new Error("Table name is not defined");var a=this.columns,s=this.constraints||[];if(this.ifnotexists&&i.tables[o])return n?n(0):0;if(i.tables[o])throw new Error("Can not create table '"+o+"', because it already exists in the database '"+i.databaseid+"'");var l=i.tables[o]=new r.Table;this.class&&(l.isclass=!0);var c,u,h=[],d=[];return a&&a.forEach((function(t){var n,i=t.dbtypeid;if(r.fn[i]||(i=i.toUpperCase()),-1<["SERIAL","SMALLSERIAL","BIGSERIAL"].indexOf(i)&&(t.identity={value:1,step:1}),i={columnid:t.columnid,dbtypeid:i,dbsize:t.dbsize,dbprecision:t.dbprecision,notnull:t.notnull,identity:t.identity},t.identity&&(l.identities[t.columnid]={value:+t.identity.value,step:+t.identity.step}),t.check&&l.checks.push({id:t.check.constrantid,fn:new Function("r","var y;return "+t.check.expression.toJS("r",""))}),t.default&&h.push("'"+t.columnid+"':"+t.default.toJS("r","")),t.primarykey&&((n=l.pk={}).columns=[t.columnid],n.onrightfns="r['"+t.columnid+"']",n.onrightfn=new Function("r","var y;return "+n.onrightfns),n.hh=y(n.onrightfns),l.uniqs[n.hh]={}),t.unique&&(n={},l.uk=l.uk||[],l.uk.push(n),n.columns=[t.columnid],n.onrightfns="r['"+t.columnid+"']",n.onrightfn=new Function("r","var y;return "+n.onrightfns),n.hh=y(n.onrightfns),l.uniqs[n.hh]={}),t.foreignkey){var o=t.foreignkey.table,a=r.databases[o.databaseid||e].tables[o.tableid];if(void 0===o.columnid){if(!(a.pk.columns&&0<a.pk.columns.length))throw new Error("FOREIGN KEY allowed only to tables with PRIMARY KEYs");o.columnid=a.pk.columns[0]}l.checks.push({fn:function(e){var n={};if(void 0===e[t.columnid])return!0;if(n[o.columnid]=e[t.columnid],n=a.pk.onrightfn(n),!a.uniqs[a.pk.hh][n])throw new Error("Foreign key violation");return!0}})}t.onupdate&&d.push("r['"+t.columnid+"']="+t.onupdate.toJS("r","")),l.columns.push(i),l.xcolumns[i.columnid]=i})),l.defaultfns=h.join(","),l.onupdatefns=d.join(";"),s.forEach((function(t){var n;if("PRIMARY KEY"===t.type){if(l.pk)throw new Error("Primary key already exists");var i=l.pk={};i.columns=t.columns,i.onrightfns=i.columns.map((function(e){return"r['"+e+"']"})).join("+'`'+"),i.onrightfn=new Function("r","var y;return "+i.onrightfns),i.hh=y(i.onrightfns),l.uniqs[i.hh]={}}else if("CHECK"===t.type)n=new Function("r","var y;return "+t.expression.toJS("r",""));else if("UNIQUE"===t.type){var o={};l.uk=l.uk||[],l.uk.push(o),o.columns=t.columns,o.onrightfns=o.columns.map((function(e){return"r['"+e+"']"})).join("+'`'+"),o.onrightfn=new Function("r","var y;return "+o.onrightfns),o.hh=y(o.onrightfns),l.uniqs[o.hh]={}}else if("FOREIGN KEY"===t.type){var a=t.fktable;if(t.fkcolumns&&0<t.fkcolumns.length&&(a.fkcolumns=t.fkcolumns),o=r.databases[a.databaseid||e].tables[a.tableid],void 0===a.fkcolumns&&(a.fkcolumns=o.pk.columns),a.columns=t.columns,a.fkcolumns.length>a.columns.length)throw new Error("Invalid foreign key on table "+l.tableid);n=function(t){var n={};if(a.fkcolumns.forEach((function(e,r){null!=t[a.columns[r]]&&(n[e]=t[a.columns[r]])})),0===Object.keys(n).length)return!0;if(Object.keys(n).length!==a.columns.length)throw new Error("Invalid foreign key on table "+l.tableid);var i=r.databases[a.databaseid||e].tables[a.tableid],o=i.pk.onrightfn(n);if(!i.uniqs[i.pk.hh][o])throw new Error("Foreign key violation");return!0}}n&&l.checks.push({fn:n,id:t.constraintid,fk:"FOREIGN KEY"===t.type})})),this.view&&this.viewcolumns&&(c=this).viewcolumns.forEach((function(e,t){c.select.columns[t].as=e.columnid})),this.view&&this.select&&(l.view=!0,l.select=this.select.compile(this.table.databaseid||e)),i.engineid?r.engines[i.engineid].createTable(this.table.databaseid||e,o,this.ifnotexists,n):(l.insert=function(n,i){var o=r.inserted;r.inserted=[n];var a=this,s=!1,l=!1;for(g in a.beforeinsert)(c=a.beforeinsert[g])&&(c.funcid?!1===r.fn[c.funcid](n)&&(l=l||!0):c.statement&&!1===c.statement.execute(e)&&(l=l||!0));if(!l){var c,u=!1;for(g in a.insteadofinsert)u=!0,(c=a.insteadofinsert[g])&&(c.funcid?r.fn[c.funcid](n):c.statement&&c.statement.execute(e));if(!u){for(var h in a.identities){var d=a.identities[h];n[h]=d.value}if(a.checks&&0<a.checks.length&&a.checks.forEach((function(e){if(!e.fn(n))throw new Error("Violation of CHECK constraint "+(e.id||""))})),a.columns.forEach((function(e){if(e.notnull&&void 0===n[e.columnid])throw new Error("Wrong NULL value in NOT NULL column "+e.columnid)})),a.pk){var f,p=(f=a.pk).onrightfn(n);if(void 0!==a.uniqs[f.hh][p]){if(!i)throw new Error("Cannot insert record, because it already exists in primary key index");s=a.uniqs[f.hh][p]}}if(a.uk&&a.uk.length&&a.uk.forEach((function(e){var t=e.onrightfn(n);if(void 0!==a.uniqs[e.hh][t]){if(!i)throw new Error("Cannot insert record, because it already exists in unique index");s=a.uniqs[e.hh][t]}})),s)a.update((function(e){for(var t in n)e[t]=n[t]}),a.data.indexOf(s),t);else{for(var h in a.data.push(n),a.identities)(d=a.identities[h]).value+=d.step;a.pk&&(p=(f=a.pk).onrightfn(n),a.uniqs[f.hh][p]=n),a.uk&&a.uk.length&&a.uk.forEach((function(e){var t=e.onrightfn(n);a.uniqs[e.hh][t]=n}))}for(var g in a.afterinsert)(c=a.afterinsert[g])&&(c.funcid?r.fn[c.funcid](n):c.statement&&c.statement.execute(e));r.inserted=o}}},l.delete=function(t){var n=this,i=n.data[t],o=!1;for(a in n.beforedelete)(l=n.beforedelete[a])&&(l.funcid?!1===r.fn[l.funcid](i)&&(o=o||!0):l.statement&&!1===l.statement.execute(e)&&(o=o||!0));if(o)return!1;var a,s=!1;for(a in n.insteadofdelete){var l;s=!0,(l=n.insteadofdelete[a])&&(l.funcid?r.fn[l.funcid](i):l.statement&&l.statement.execute(e))}if(!s){if(this.pk){var c=this.pk;if(t=c.onrightfn(i),void 0===this.uniqs[c.hh][t])throw new Error("Something wrong with primary key index on table");this.uniqs[c.hh][t]=void 0}n.uk&&n.uk.length&&n.uk.forEach((function(e){var t=e.onrightfn(i);if(void 0===n.uniqs[e.hh][t])throw new Error("Something wrong with unique index on table");n.uniqs[e.hh][t]=void 0}))}},l.deleteall=function(){this.data.length=0,this.pk&&(this.uniqs[this.pk.hh]={}),l.uk&&l.uk.length&&l.uk.forEach((function(e){l.uniqs[e.hh]={}}))},l.update=function(t,n,i){var o,a=T(this.data[n]);if(this.pk&&((o=this.pk).pkaddr=o.onrightfn(a,i),void 0===this.uniqs[o.hh][o.pkaddr]))throw new Error("Something wrong with index on table");l.uk&&l.uk.length&&l.uk.forEach((function(e){if(e.ukaddr=e.onrightfn(a),void 0===l.uniqs[e.hh][e.ukaddr])throw new Error("Something wrong with unique index on table")})),t(a,i,r);var s=!1;for(h in l.beforeupdate)(u=l.beforeupdate[h])&&(u.funcid?!1===r.fn[u.funcid](this.data[n],a)&&(s=s||!0):u.statement&&!1===u.statement.execute(e)&&(s=s||!0));if(s)return!1;var c=!1;for(h in l.insteadofupdate){var u;c=!0,(u=l.insteadofupdate[h])&&(u.funcid?r.fn[u.funcid](this.data[n],a):u.statement&&u.statement.execute(e))}if(!c){if(l.checks&&0<l.checks.length&&l.checks.forEach((function(e){if(!e.fn(a))throw new Error("Violation of CHECK constraint "+(e.id||""))})),l.columns.forEach((function(e){if(e.notnull&&void 0===a[e.columnid])throw new Error("Wrong NULL value in NOT NULL column "+e.columnid)})),this.pk&&(o.newpkaddr=o.onrightfn(a),void 0!==this.uniqs[o.hh][o.newpkaddr]&&o.newpkaddr!==o.pkaddr))throw new Error("Record already exists");for(var h in l.uk&&l.uk.length&&l.uk.forEach((function(e){if(e.newukaddr=e.onrightfn(a),void 0!==l.uniqs[e.hh][e.newukaddr]&&e.newukaddr!==e.ukaddr)throw new Error("Record already exists")})),this.pk&&(this.uniqs[o.hh][o.pkaddr]=void 0,this.uniqs[o.hh][o.newpkaddr]=a),l.uk&&l.uk.length&&l.uk.forEach((function(e){l.uniqs[e.hh][e.ukaddr]=void 0,l.uniqs[e.hh][e.newukaddr]=a})),this.data[n]=a,l.afterupdate)(u=l.afterupdate[h])&&(u.funcid?r.fn[u.funcid](this.data[n],a):u.statement&&u.statement.execute(e))}},r.options.nocount||(u=1),u=n?n(u):u)},r.fn.Date=Object,r.fn.Date=Date,r.fn.Number=Number,r.fn.String=String,r.fn.Boolean=Boolean,F.EXTEND=r.utils.extend,F.CHAR=String.fromCharCode.bind(String),F.ASCII=function(e){return e.charCodeAt(0)},F.COALESCE=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e]&&("number"!=typeof arguments[e]||!isNaN(arguments[e])))return arguments[e]},F.USER=function(){return"alasql"},F.OBJECT_ID=function(e){return!!r.tables[e]},F.DATE=function(e){return/\d{8}/.test(e)?new Date(+e.substr(0,4),+e.substr(4,2)-1,+e.substr(6,2)):new Date(e)},F.NOW=function(){var e=new Date,t=e.getFullYear()+"."+("0"+(e.getMonth()+1)).substr(-2)+"."+("0"+e.getDate()).substr(-2);return(t+=" "+("0"+e.getHours()).substr(-2)+":"+("0"+e.getMinutes()).substr(-2)+":"+("0"+e.getSeconds()).substr(-2))+"."+("00"+e.getMilliseconds()).substr(-3)},F.GETDATE=F.NOW,F.CURRENT_TIMESTAMP=F.NOW,F.SECOND=function(e){return(e=new Date(e)).getSeconds()},F.MINUTE=function(e){return(e=new Date(e)).getMinutes()},F.HOUR=function(e){return(e=new Date(e)).getHours()},F.DAYOFWEEK=F.WEEKDAY=function(e){return(e=new Date(e)).getDay()},F.DAY=F.DAYOFMONTH=function(e){return(e=new Date(e)).getDate()},F.MONTH=function(e){return(e=new Date(e)).getMonth()+1},F.YEAR=function(e){return(e=new Date(e)).getFullYear()};var te={year:31536e6,quarter:7884e6,month:2592e6,week:6048e5,day:864e5,dayofyear:864e5,weekday:864e5,hour:36e5,minute:6e4,second:1e3,millisecond:1,microsecond:.001};function ne(e){var t="";if(void 0===e)t+="undefined";else if(Array.isArray(e)){t+="<style>",t+="table {border:1px black solid; border-collapse: collapse; border-spacing: 0px;}",t+="td,th {border:1px black solid; padding-left:5px; padding-right:5px}",t+="th {background-color: #EEE}",t+="</style>",t+="<table>";var n,r=[];for(n in e[0])r.push(n);t+="<tr><th>#",r.forEach((function(e){t+="<th>"+e}));for(var i=0,o=e.length;i<o;i++)t+="<tr><th>"+(i+1),r.forEach((function(n){t+="<td> ",e[i][n]==+e[i][n]?(t+='<div style="text-align:right">',void 0===e[i][n]?t+="NULL":t+=e[i][n],t+="</div>"):void 0===e[i][n]?t+="NULL":"string"==typeof e[i][n]?t+=e[i][n]:t+=Q(e[i][n])}));t+="</table>"}else t+="<p>"+Q(e)+"</p>";return t}function re(e,t,n){var r;n<=0||(r=(t-e.scrollTop)/n*10,setTimeout((function(){e.scrollTop!==t&&(e.scrollTop=e.scrollTop+r,re(e,t,n-10))}),10))}function ie(e,t,n,i,o,a){var s={};function l(e){return e&&!1===r.options.casesensitive?e.toLowerCase():e}n=n||{},r.utils.extend(s,n),void 0===s.headers&&(s.headers=!0),t=r.utils.autoExtFilename(t,"xls",n),r.utils.loadBinaryFile(t,!!i,(function(t){var n;n=t instanceof ArrayBuffer?(h=function(e){for(var t="",n=0,r=10240;n<e.byteLength/r;++n)t+=String.fromCharCode.apply(null,new Uint8Array(e.slice(n*r,n*r+r)));return t+String.fromCharCode.apply(null,new Uint8Array(e.slice(n*r)))}(t),e.read(btoa(h),{type:"base64"})):e.read(t,{type:"binary"});var c=void 0===s.sheetid?n.SheetNames[0]:"number"==typeof s.sheetid?n.SheetNames[s.sheetid]:s.sheetid,u=[];if(void 0===s.range?f=n.Sheets[c]["!ref"]:(f=s.range,n.Sheets[c][f]&&(f=n.Sheets[c][f])),f){for(var h=f.split(":"),d=(t=h[0].match(/[A-Z]+/)[0],+h[0].match(/[0-9]+/)[0]),f=h[1].match(/[A-Z]+/)[0],p=+h[1].match(/[0-9]+/)[0],g={},m=r.utils.xlscn(t),v=r.utils.xlscn(f),y=m;y<=v;y++){var b=r.utils.xlsnc(y);s.headers?n.Sheets[c][b+""+d]?g[b]=l(n.Sheets[c][b+""+d].v):g[b]=l(b):g[b]=b}s.headers&&d++;for(var _=d;_<=p;_++){var x={};for(y=m;y<=v;y++)b=r.utils.xlsnc(y),n.Sheets[c][b+""+_]&&(x[g[b]]=n.Sheets[c][b+""+_].v);u.push(x)}}else u.push([]);0<u.length&&u[u.length-1]&&0==Object.keys(u[u.length-1]).length&&u.pop(),i&&(u=i(u,o,a))}),(function(e){throw e}))}r.stdfn.DATEDIFF=function(e,t,n){return(new Date(n).getTime()-new Date(t).getTime())/te[e.toLowerCase()]},r.stdfn.DATEADD=function(e,t,n){return e=new Date(n).getTime()+t*te[e.toLowerCase()],new Date(e)},r.stdfn.INTERVAL=function(e,t){return e*te[t.toLowerCase()]},r.stdfn.DATE_ADD=r.stdfn.ADDDATE=function(e,t){return t=new Date(e).getTime()+t,new Date(t)},r.stdfn.DATE_SUB=r.stdfn.SUBDATE=function(e,t){return t=new Date(e).getTime()-t,new Date(t)},z.DropTable=function(e){return z.extend(this,e)},z.DropTable.prototype.toString=function(){var e="DROP ";return this.view?e+="VIEW":e+="TABLE",this.ifexists&&(e+=" IF EXISTS"),e+" "+this.tables.toString()},z.DropTable.prototype.execute=function(e,t,n){var i=this.ifexists,o=0,a=0,s=this.tables.length;return this.tables.forEach((function(t){var l=r.databases[t.databaseid||e],c=t.tableid;if(!i||i&&l.tables[c]){if(l.tables[c])l.engineid?r.engines[l.engineid].dropTable(t.databaseid||e,c,i,(function(e){delete l.tables[c],o+=e,++a==s&&n&&n(o)})):(delete l.tables[c],o++,++a==s&&n&&n(o));else if(!r.options.dropifnotexists)throw new Error("Can not drop table '"+t.tableid+"', because it does not exist in the database.")}else++a==s&&n&&n(o)})),o},z.TruncateTable=function(e){return z.extend(this,e)},z.TruncateTable.prototype.toString=function(){return"TRUNCATE TABLE "+this.table.toString()},z.TruncateTable.prototype.execute=function(e,t,n){var i=r.databases[this.table.databaseid||e],o=this.table.tableid;if(i.engineid)return r.engines[i.engineid].truncateTable(this.table.databaseid||e,o,this.ifexists,n);if(!i.tables[o])throw new Error("Cannot truncate table becaues it does not exist");return i.tables[o].data=[],n?n(0):0},z.CreateVertex=function(e){return z.extend(this,e)},z.CreateVertex.prototype.toString=function(){var e="CREATE VERTEX ";return this.class&&(e+=this.class+" "),this.sharp&&(e+="#"+this.sharp+" "),this.sets?e+=this.sets.toString():this.content?e+=this.content.toString():this.select&&(e+=this.select.toString()),e},z.CreateVertex.prototype.toJS=function(e){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+e+")"},z.CreateVertex.prototype.compile=function(e){var t,n,i,o=e,a=this.sharp;return void 0!==this.name&&(n="x.name="+this.name.toJS(),t=new Function("x",n)),this.sets&&0<this.sets.length&&(n=this.sets.map((function(e){return"x['"+e.column.columnid+"']="+e.expression.toJS("x","")})).join(";"),i=new Function("x,params,alasql",n)),function(e,n){var s=r.databases[o],l={$id:l=void 0!==a?a:s.counter++,$node:"VERTEX"};return s=s.objects[l.$id]=l,t&&t(l),i&&i(l,e,r),n?n(s):s}},z.CreateEdge=function(e){return z.extend(this,e)},z.CreateEdge.prototype.toString=function(){var e="CREATE EDGE ";return this.class&&(e+=this.class+" "),e},z.CreateEdge.prototype.toJS=function(e){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+e+")"},z.CreateEdge.prototype.compile=function(e){var t,n,i,o=e,a=new Function("params,alasql","var y;return "+this.from.toJS()),s=new Function("params,alasql","var y;return "+this.to.toJS());return void 0!==this.name&&(n="x.name="+this.name.toJS(),t=new Function("x",n)),this.sets&&0<this.sets.length&&(n=this.sets.map((function(e){return"x['"+e.column.columnid+"']="+e.expression.toJS("x","")})).join(";"),i=new Function("x,params,alasql","var y;"+n)),function(e,n){var l,c=r.databases[o],u={$id:c.counter++,$node:"EDGE"},h=a(e,r),d=s(e,r);return u.$in=[h.$id],u.$out=[d.$id],void 0===h.$out&&(h.$out=[]),h.$out.push(u.$id),d.$in,d.$in.push(u.$id),l=c.objects[u.$id]=u,t&&t(u),i&&i(u,e,r),n?n(l):l}},z.CreateGraph=function(e){return z.extend(this,e)},z.CreateGraph.prototype.toString=function(){var e="CREATE GRAPH ";return this.class&&(e+=this.class+" "),e},z.CreateGraph.prototype.execute=function(e,t,n){var i=[];return this.from&&r.from[this.from.funcid]&&(this.graph=r.from[this.from.funcid.toUpperCase()]),this.graph.forEach((function(n){if(n.source){var s={};void 0!==n.as&&(r.vars[n.as]=s),void 0!==n.prop&&(s.name=n.prop),void 0!==n.sharp&&(s.$id=n.sharp),void 0!==n.name&&(s.name=n.name),void 0!==n.class&&(s.$class=n.class);var l,c,u,h,d=r.databases[e];if(void 0===s.$id&&(s.$id=d.counter++),s.$node="EDGE",void 0!==n.json&&C(s,new Function("params,alasql","var y;return "+n.json.toJS())(t,r)),n.source.vars?l="object"==typeof(h=r.vars[n.source.vars])?h:d.objects[h]:(void 0===(c=n.source.sharp)&&(c=n.source.prop),void 0!==(l=r.databases[e].objects[c])||!r.options.autovertex||void 0===n.source.prop&&void 0===n.source.name||void 0===(l=o(n.source.prop||n.source.name))&&(l=a(n.source))),n.source.vars?u="object"==typeof(h=r.vars[n.target.vars])?h:d.objects[h]:(void 0===(h=n.target.sharp)&&(h=n.target.prop),void 0!==(u=r.databases[e].objects[h])||!r.options.autovertex||void 0===n.target.prop&&void 0===n.target.name||void 0===(u=o(n.target.prop||n.target.name))&&(u=a(n.target))),s.$in=[l.$id],s.$out=[u.$id],void 0===l.$out&&(l.$out=[]),l.$out.push(s.$id),void 0===u.$in&&(u.$in=[]),u.$in.push(s.$id),void 0!==(d.objects[s.$id]=s).$class){if(void 0===r.databases[e].tables[s.$class])throw new Error("No such class. Pleace use CREATE CLASS");r.databases[e].tables[s.$class].data.push(s)}i.push(s.$id)}else a(n)})),i=n?n(i):i;function o(e){var t,n=r.databases[r.useid].objects;for(t in n)if(n[t].name===e)return n[t]}function a(n){var o={};void 0!==n.as&&(r.vars[n.as]=o),void 0!==n.prop&&(o.$id=n.prop,o.name=n.prop),void 0!==n.sharp&&(o.$id=n.sharp),void 0!==n.name&&(o.name=n.name),void 0!==n.class&&(o.$class=n.class);var a=r.databases[e];if(void 0===o.$id&&(o.$id=a.counter++),o.$node="VERTEX",void 0!==n.json&&C(o,new Function("params,alasql","var y;return "+n.json.toJS())(t,r)),void 0!==(a.objects[o.$id]=o).$class){if(void 0===r.databases[e].tables[o.$class])throw new Error("No such class. Pleace use CREATE CLASS");r.databases[e].tables[o.$class].data.push(o)}return i.push(o.$id),o}},z.CreateGraph.prototype.compile1=function(e){var t,n,i,o=e,a=new Function("params,alasql","var y;return "+this.from.toJS()),s=new Function("params,alasql","var y;return "+this.to.toJS());return void 0!==this.name&&(n="x.name="+this.name.toJS(),t=new Function("x",n)),this.sets&&0<this.sets.length&&(n=this.sets.map((function(e){return"x['"+e.column.columnid+"']="+e.expression.toJS("x","")})).join(";"),i=new Function("x,params,alasql","var y;"+n)),function(e,n){var l,c=r.databases[o],u={$id:c.counter++,$node:"EDGE"},h=a(e,r),d=s(e,r);return u.$in=[h.$id],u.$out=[d.$id],void 0===h.$out&&(h.$out=[]),h.$out.push(u.$id),void 0===d.$in&&(d.$in=[]),d.$in.push(u.$id),l=c.objects[u.$id]=u,t&&t(u),i&&i(u,e,r),n?n(l):l}},z.AlterTable=function(e){return z.extend(this,e)},z.AlterTable.prototype.toString=function(){var e="ALTER TABLE "+this.table.toString();return this.renameto&&(e+=" RENAME TO "+this.renameto),e},z.AlterTable.prototype.execute=function(e,t,n){var i=r.databases[e];if(i.dbversion=Date.now(),this.renameto){var o=this.table.tableid,a=this.renameto;if(i.tables[a])throw new Error("Can not rename a table '"+o+"' to '"+a+"', because the table with this name already exists");if(a===o)throw new Error("Can not rename a table '"+o+"' to itself");return i.tables[a]=i.tables[o],delete i.tables[o],1,n&&n(1),1}if(this.addcolumn){(i=r.databases[this.table.databaseid||e]).dbversion++;var s=this.table.tableid,l=i.tables[s],c=this.addcolumn.columnid;if(l.xcolumns[c])throw new Error('Cannot add column "'+c+'", because it already exists in the table "'+s+'"');var u={columnid:c,dbtypeid:this.addcolumn.dbtypeid,dbsize:this.dbsize,dbprecision:this.dbprecision,dbenum:this.dbenum,defaultfns:null};l.columns.push(u),l.xcolumns[c]=u;for(var h=0,d=l.data.length;h<d;h++)l.data[h][c]=void 0;return n?n(1):1}if(this.modifycolumn){if((i=r.databases[this.table.databaseid||e]).dbversion++,s=this.table.tableid,l=i.tables[s],c=this.modifycolumn.columnid,!l.xcolumns[c])throw new Error('Cannot modify column "'+c+'", because it was not found in the table "'+s+'"');return(u=l.xcolumns[c]).dbtypeid=this.dbtypeid,u.dbsize=this.dbsize,u.dbprecision=this.dbprecision,u.dbenum=this.dbenum,n?n(1):1}if(this.renamecolumn){(i=r.databases[this.table.databaseid||e]).dbversion++,s=this.table.tableid,l=i.tables[s],c=this.renamecolumn;var f=this.to;if(!l.xcolumns[c])throw new Error('Column "'+c+'" is not found in the table "'+s+'"');if(l.xcolumns[f])throw new Error('Column "'+f+'" already exists in the table "'+s+'"');if(c==f)return n?n(0):0;for(var p=0;p<l.columns.length;p++)l.columns[p].columnid==c&&(l.columns[p].columnid=f);for(l.xcolumns[f]=l.xcolumns[c],delete l.xcolumns[c],h=0,d=l.data.length;h<d;h++)l.data[h][f]=l.data[h][c],delete l.data[h][c];return l.data.length}if(this.dropcolumn){(i=r.databases[this.table.databaseid||e]).dbversion++,s=this.table.tableid,l=i.tables[s],c=this.dropcolumn;var g=!1;for(p=0;p<l.columns.length;p++)if(l.columns[p].columnid==c){g=!0,l.columns.splice(p,1);break}if(!g)throw new Error('Cannot drop column "'+c+'", because it was not found in the table "'+s+'"');for(delete l.xcolumns[c],h=0,d=l.data.length;h<d;h++)delete l.data[h][c];return n?n(l.data.length):l.data.length}throw Error("Unknown ALTER TABLE method")},z.CreateIndex=function(e){return z.extend(this,e)},z.CreateIndex.prototype.toString=function(){var e="CREATE";return this.unique&&(e+=" UNIQUE"),(e+=" INDEX "+this.indexid+" ON "+this.table.toString())+"("+this.columns.toString()+")"},z.CreateIndex.prototype.execute=function(e,t,n){var i=r.databases[e],o=this.table.tableid,a=i.tables[o];e=this.indexid,i.indices[e]=o;var s=this.columns.map((function(e){return e.expression.toJS("r","")})).join("+'`'+"),l=new Function("r,params,alasql","return "+s);if(this.unique){a.uniqdefs[e]={rightfns:s};var c=a.uniqs[e]={};if(0<a.data.length)for(var u=0,h=a.data.length;u<h;u++)c[f=s(a.data[u])]||(c[f]={num:0}),c[f].num++}else{var d=y(s);a.inddefs[e]={rightfns:s,hh:d},a.indices[d]={};var f,p=a.indices[d]={};if(0<a.data.length)for(u=0,h=a.data.length;u<h;u++)p[f=l(a.data[u],t,r)]||(p[f]=[]),p[f].push(a.data[u])}return d=1,n?n(d):d},z.Reindex=function(e){return z.extend(this,e)},z.Reindex.prototype.toString=function(){return"REINDEX "+this.indexid},z.Reindex.prototype.execute=function(e,t,n){var i=r.databases[e];return e=this.indexid,e=i.indices[e],i.tables[e].indexColumns(),e=1,n?n(e):e},z.DropIndex=function(e){return z.extend(this,e)},z.DropIndex.prototype.toString=function(){return"DROP INDEX"+this.indexid},z.DropIndex.prototype.compile=function(e){return this.indexid,function(){return 1}},z.WithSelect=function(e){return z.extend(this,e)},z.WithSelect.prototype.toString=function(){var e="WITH ";return(e+=this.withs.map((function(e){return e.name+" AS ("+e.select.toString()+")"})).join(",")+" ")+this.select.toString()},z.WithSelect.prototype.execute=function(e,t,n){var i=this,o=[];return i.withs.forEach((function(n){o.push(r.databases[e].tables[n.name]),(r.databases[e].tables[n.name]=new P({tableid:n.name})).data=n.select.execute(e,t)})),this.select.execute(e,t,(function(t){return i.withs.forEach((function(t,n){o[n]?r.databases[e].tables[t.name]=o[n]:delete r.databases[e].tables[t.name]})),n?n(t):t}))},z.If=function(e){return z.extend(this,e)},z.If.prototype.toString=function(){var e="IF ";return e+=this.expression.toString(),e+=" "+this.thenstat.toString(),this.elsestat&&(e+=" ELSE "+this.thenstat.toString()),e},z.If.prototype.execute=function(e,t,n){var i;return new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this)(t,r)?i=this.thenstat.execute(e,t,n):this.elsestat?i=this.elsestat.execute(e,t,n):n&&(i=n(i)),i},z.While=function(e){return z.extend(this,e)},z.While.prototype.toString=function(){var e="WHILE ";return(e+=this.expression.toString())+" "+this.loopstat.toString()},z.While.prototype.execute=function(e,t,n){var i=this,o=[],a=new Function("params,alasql,p","var y;return "+this.expression.toJS());if(n){var s=!1,l=function(c){s?o.push(c):s=!0,setTimeout((function(){a(t,r)?i.loopstat.execute(e,t,l):o=n(o)}),0)};l()}else for(;a(t,r);){var c=i.loopstat.execute(e,t);o.push(c)}return o},z.Break=function(e){return z.extend(this,e)},z.Break.prototype.toString=function(){return"BREAK"},z.Break.prototype.execute=function(e,t,n,r){return n?n(1):1},z.Continue=function(e){return z.extend(this,e)},z.Continue.prototype.toString=function(){return"CONTINUE"},z.Continue.prototype.execute=function(e,t,n,r){return n?n(1):1},z.BeginEnd=function(e){return z.extend(this,e)},z.BeginEnd.prototype.toString=function(){return"BEGIN "+this.statements.toString()+" END"},z.BeginEnd.prototype.execute=function(e,t,n,r){var i=this,o=[],a=0;return function r(){i.statements[a].execute(e,t,(function(e){return o.push(e),++a<i.statements.length?r():void(n&&(o=n(o)))}))}(),o},z.Insert=function(e){return z.extend(this,e)},z.Insert.prototype.toString=function(){var e="INSERT ";return this.orreplace&&(e+="OR REPLACE "),this.replaceonly&&(e="REPLACE "),e+="INTO "+this.into.toString(),this.columns&&(e+="("+this.columns.toString()+")"),this.values&&(e+=" VALUES "+this.values.map((function(e){return"("+e.toString()+")"})).join(",")),this.select&&(e+=" "+this.select.toString()),e},z.Insert.prototype.toJS=function(e,t,n){return"this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+e+")"},z.Insert.prototype.compile=function(e){var t=this;e=t.into.databaseid||e;var n=r.databases[e],i=t.into.tableid,o=n.tables[i];if(!o)throw"Table '"+i+"' could not be found";var a,s="",l="",c=(s="db.tables['"+i+"'].dirty=true;","var a,aa=[],x;");if(this.values){this.exists&&(this.existsfn=this.exists.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),this.queries&&(this.queriesfn=this.queries.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),t.values.forEach((function(a){var c=[];t.columns?t.columns.forEach((function(e,t){var n="'"+e.columnid+"':";o.xcolumns&&o.xcolumns[e.columnid]?0<=["INT","FLOAT","NUMBER","MONEY"].indexOf(o.xcolumns[e.columnid].dbtypeid)?n+="(x="+a[t].toJS()+",x==undefined?undefined:+x)":r.fn[o.xcolumns[e.columnid].dbtypeid]?(n+="(new "+o.xcolumns[e.columnid].dbtypeid+"(",n+=a[t].toJS(),n+="))"):n+=a[t].toJS():n+=a[t].toJS(),c.push(n)})):Array.isArray(a)&&o.columns&&0<o.columns.length?o.columns.forEach((function(e,t){var n="'"+e.columnid+"':";0<=["INT","FLOAT","NUMBER","MONEY"].indexOf(e.dbtypeid)?n+="+"+a[t].toJS():r.fn[e.dbtypeid]?(n+="(new "+e.dbtypeid+"(",n+=a[t].toJS(),n+="))"):n+=a[t].toJS(),c.push(n)})):l=ee(a),n.tables[i].defaultfns&&c.unshift(n.tables[i].defaultfns),s+=l?"a="+l+";":"a={"+c.join(",")+"};",n.tables[i].isclass&&(s+="var db=alasql.databases['"+e+"'];",s+='a.$class="'+i+'";',s+="a.$id=db.counter++;",s+="db.objects[a.$id]=a;"),n.tables[i].insert?(s+="var db=alasql.databases['"+e+"'];",s+="db.tables['"+i+"'].insert(a,"+(t.orreplace?"true":"false")+");"):s+="aa.push(a);"})),a=c+s,n.tables[i].insert||(s+="alasql.databases['"+e+"'].tables['"+i+"'].data=alasql.databases['"+e+"'].tables['"+i+"'].data.concat(aa);"),n.tables[i].insert&&n.tables[i].isclass?s+="return a.$id;":s+="return "+t.values.length;var u=new Function("db, params, alasql","var y;"+c+s).bind(this)}else if(this.select){this.select.modifier="RECORDSET";var h=this.select.compile(e);if(n.engineid&&r.engines[n.engineid].intoTable)return function(e,t){return e=h(e),r.engines[n.engineid].intoTable(n.databaseid,i,e.data,null,t)};var d="return alasql.utils.extend(r,{"+o.defaultfns+"})",f=new Function("r,db,params,alasql",d);u=function(e,n,r){var o=h(n).data;if(e.tables[i].insert)for(var a=0,s=o.length;a<s;a++){var l=T(o[a]);f(l,e,n,r),e.tables[i].insert(l,t.orreplace)}else e.tables[i].data=e.tables[i].data.concat(o);return r.options.nocount?void 0:o.length}}else{if(!this.default)throw new Error("Wrong INSERT parameters");d="db.tables['"+i+"'].data.push({"+o.defaultfns+"});return 1;",u=new Function("db,params,alasql",d)}return n.engineid&&r.engines[n.engineid].intoTable&&r.options.autocommit?function(e,t){return e=new Function("db,params","var y;"+a+"return aa;")(n,e),r.engines[n.engineid].intoTable(n.databaseid,i,e,null,t)}:function(t,n){var o=r.databases[e];return r.options.autocommit&&o.engineid&&r.engines[o.engineid].loadTableData(e,i),t=u(o,t,r),r.options.autocommit&&o.engineid&&r.engines[o.engineid].saveTableData(e,i),r.options.nocount&&(t=void 0),n&&n(t),t}},z.Insert.prototype.execute=function(e,t,n){return this.compile(e)(t,n)},z.CreateTrigger=function(e){return z.extend(this,e)},z.CreateTrigger.prototype.toString=function(){var e="CREATE TRIGGER "+this.trigger+" ";return this.when&&(e+=this.when+" "),e+=this.action+" ON ",this.table.databaseid&&(e+=this.table.databaseid+"."),(e+=this.table.tableid+" ")+this.statement.toString()},z.CreateTrigger.prototype.execute=function(e,t,n){var i=this.trigger;e=this.table.databaseid||e;var o=r.databases[e],a=this.table.tableid;return e={action:this.action,when:this.when,statement:this.statement,funcid:this.funcid,tableid:this.table.tableid},"INSERT"==(o.triggers[i]=e).action&&"BEFORE"==e.when?o.tables[a].beforeinsert[i]=e:"INSERT"==e.action&&"AFTER"==e.when?o.tables[a].afterinsert[i]=e:"INSERT"==e.action&&"INSTEADOF"==e.when?o.tables[a].insteadofinsert[i]=e:"DELETE"==e.action&&"BEFORE"==e.when?o.tables[a].beforedelete[i]=e:"DELETE"==e.action&&"AFTER"==e.when?o.tables[a].afterdelete[i]=e:"DELETE"==e.action&&"INSTEADOF"==e.when?o.tables[a].insteadofdelete[i]=e:"UPDATE"==e.action&&"BEFORE"==e.when?o.tables[a].beforeupdate[i]=e:"UPDATE"==e.action&&"AFTER"==e.when?o.tables[a].afterupdate[i]=e:"UPDATE"==e.action&&"INSTEADOF"==e.when&&(o.tables[a].insteadofupdate[i]=e),n?n(1):1},z.DropTrigger=function(e){return z.extend(this,e)},z.DropTrigger.prototype.toString=function(){return"DROP TRIGGER "+this.trigger},z.DropTrigger.prototype.execute=function(e,t,n){var i=r.databases[e],o=this.trigger;if(!i.triggers[o])throw new Error("Trigger not found");if(!(e=i.triggers[o].tableid))throw new Error("Trigger Table not found");return 1,delete i.tables[e].beforeinsert[o],delete i.tables[e].afterinsert[o],delete i.tables[e].insteadofinsert[o],delete i.tables[e].beforedelete[o],delete i.tables[e].afterdelete[o],delete i.tables[e].insteadofdelete[o],delete i.tables[e].beforeupdate[o],delete i.tables[e].afterupdate[o],delete i.tables[e].insteadofupdate[o],delete i.triggers[o],n?n(1):1},z.Delete=function(e){return z.extend(this,e)},z.Delete.prototype.toString=function(){var e="DELETE FROM "+this.table.toString();return this.where&&(e+=" WHERE "+this.where.toString()),e},z.Delete.prototype.compile=function(e){e=this.table.databaseid||e;var t,n=this.table.tableid,i=r.databases[e];return this.where?(this.exists&&(this.existsfn=this.exists.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),this.queries&&(this.queriesfn=this.queries.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),t=new Function("r,params,alasql","var y;return ("+this.where.toJS("r","")+")").bind(this),function(o,a){if(i.engineid&&r.engines[i.engineid].deleteFromTable)return r.engines[i.engineid].deleteFromTable(e,n,t,o,a);r.options.autocommit&&i.engineid&&("LOCALSTORAGE"==i.engineid||"FILESTORAGE"==i.engineid)&&r.engines[i.engineid].loadTableData(e,n);for(var s,l=i.tables[n],c=l.data.length,u=[],h=0,d=l.data.length;h<d;h++)t(l.data[h],o,r)?l.delete&&l.delete(h,o,r):u.push(l.data[h]);for(s in l.data=u,l.afterdelete){var f=l.afterdelete[s];f&&(f.funcid?r.fn[f.funcid]():f.statement&&f.statement.execute(e))}return c-=l.data.length,r.options.autocommit&&i.engineid&&("LOCALSTORAGE"==i.engineid||"FILESTORAGE"==i.engineid)&&r.engines[i.engineid].saveTableData(e,n),a&&a(c),c}):function(t,o){r.options.autocommit&&i.engineid&&r.engines[i.engineid].loadTableData(e,n),i.tables[n].dirty=!0;var a,s=i.tables[n].data.length;for(a in i.tables[n].data.length=0,i.tables[n].uniqs)i.tables[n].uniqs[a]={};for(a in i.tables[n].indices)i.tables[n].indices[a]={};return r.options.autocommit&&i.engineid&&r.engines[i.engineid].saveTableData(e,n),o&&o(s),s}},z.Delete.prototype.execute=function(e,t,n){return this.compile(e)(t,n)},z.Update=function(e){return z.extend(this,e)},z.Update.prototype.toString=function(){var e="UPDATE "+this.table.toString();return this.columns&&(e+=" SET "+this.columns.toString()),this.where&&(e+=" WHERE "+this.where.toString()),e},z.SetColumn=function(e){return z.extend(this,e)},z.SetColumn.prototype.toString=function(){return this.column.toString()+"="+this.expression.toString()},z.Update.prototype.compile=function(e){e=this.table.databaseid||e;var t,n=this.table.tableid;this.where&&(this.exists&&(this.existsfn=this.exists.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),this.queries&&(this.queriesfn=this.queries.map((function(t){return(t=t.compile(e)).query.modifier="RECORDSET",t}))),t=new Function("r,params,alasql","var y;return "+this.where.toJS("r","")).bind(this));var i=r.databases[e].tables[n].onupdatefns||"";i+=";",this.columns.forEach((function(e){i+="r['"+e.column.columnid+"']="+e.expression.toJS("r","")+";"}));var o=new Function("r,params,alasql","var y;"+i);return function(i,a){var s=r.databases[e];if(s.engineid&&r.engines[s.engineid].updateTable)return r.engines[s.engineid].updateTable(e,n,o,t,i,a);r.options.autocommit&&s.engineid&&r.engines[s.engineid].loadTableData(e,n);var l=s.tables[n];if(!l)throw new Error("Table '"+n+"' not exists");for(var c=0,u=0,h=l.data.length;u<h;u++)t&&!t(l.data[u],i,r)||(l.update?l.update(o,u,i):o(l.data[u],i,r),c++);return r.options.autocommit&&s.engineid&&r.engines[s.engineid].saveTableData(e,n),a&&a(c),c}},z.Update.prototype.execute=function(e,t,n){return this.compile(e)(t,n)},z.Merge=function(e){return z.extend(this,e)},z.Merge.prototype.toString=function(){var e="MERGE ";return e+=this.into.tableid+" ",this.into.as&&(e+="AS "+this.into.as+" "),e+="USING "+this.using.tableid+" ",this.using.as&&(e+="AS "+this.using.as+" "),e+="ON "+this.on.toString()+" ",this.matches.forEach((function(t){e+="WHEN ",t.matched||(e+="NOT "),e+="MATCHED ",t.bytarget&&(e+="BY TARGET "),t.bysource&&(e+="BY SOURCE "),t.expr&&(e+="AND "+t.expr.toString()+" "),e+="THEN ",t.action.delete&&(e+="DELETE "),t.action.insert&&(e+="INSERT ",t.action.columns&&(e+="("+t.action.columns.toString()+") "),t.action.values&&(e+="VALUES ("+t.action.values.toString()+") "),t.action.defaultvalues&&(e+="DEFAULT VALUES ")),t.action.update&&(e+="UPDATE ",e+=t.action.update.map((function(e){return e.toString()})).join(",")+" ")})),e},z.Merge.prototype.execute=function(e,t,n){return n?n(1):1},z.CreateDatabase=function(e){return z.extend(this,e)},z.CreateDatabase.prototype.toString=function(){var e="CREATE";return this.engineid&&(e+=" "+this.engineid),e+=" DATABASE",this.ifnotexists&&(e+=" IF NOT EXISTS"),e+=" "+this.databaseid,this.args&&0<this.args.length&&(e+="("+this.args.map((function(e){return e.toString()})).join(", ")+")"),this.as&&(e+=" AS "+this.as),e},z.CreateDatabase.prototype.execute=function(e,t,n){if(this.args&&0<this.args.length&&this.args.map((function(e){return new Function("params,alasql","var y;return "+e.toJS())(t,r)})),this.engineid)return r.engines[this.engineid].createDatabase(this.databaseid,this.args,this.ifnotexists,this.as,n);var i=this.databaseid;if(r.databases[i])throw new Error("Database '"+i+"' already exists");new r.Database(i);return n?n(1):1},z.AttachDatabase=function(e){return z.extend(this,e)},z.AttachDatabase.prototype.toString=function(e){var t="ATTACH";return this.engineid&&(t+=" "+this.engineid),t+=" DATABASE "+this.databaseid,e&&(t+="(",0<e.length&&(t+=e.map((function(e){return e.toString()})).join(", ")),t+=")"),this.as&&(t+=" AS "+this.as),t},z.AttachDatabase.prototype.execute=function(e,t,n){if(!r.engines[this.engineid])throw new Error('Engine "'+this.engineid+'" is not defined.');return r.engines[this.engineid].attachDatabase(this.databaseid,this.as,this.args,t,n)},z.DetachDatabase=function(e){return z.extend(this,e)},z.DetachDatabase.prototype.toString=function(){return"DETACH DATABASE "+this.databaseid},z.DetachDatabase.prototype.execute=function(e,t,n){if(!r.databases[this.databaseid].engineid)throw new Error('Cannot detach database "'+this.engineid+'", because it was not attached.');var i=this.databaseid;if(i===r.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(r.databases[i]){var o=r.databases[i].engineid&&"FILESTORAGE"==r.databases[i].engineid,a=r.databases[i].filename||"";delete r.databases[i],o&&(r.databases[i]={},r.databases[i].isDetached=!0,r.databases[i].filename=a),i===r.useid&&r.use(),a=1}else{if(!this.ifexists)throw new Error("Database '"+i+"' does not exist");a=0}return n&&n(a),a},z.UseDatabase=function(e){return z.extend(this,e)},z.UseDatabase.prototype.toString=function(){return"USE DATABASE "+this.databaseid},z.UseDatabase.prototype.execute=function(e,t,n){var i=this.databaseid;if(!r.databases[i])throw new Error("Database '"+i+"' does not exist");return r.use(i),n&&n(1),1},z.DropDatabase=function(e){return z.extend(this,e)},z.DropDatabase.prototype.toString=function(){var e="DROP";return this.ifexists&&(e+=" IF EXISTS"),e+" DATABASE "+this.databaseid},z.DropDatabase.prototype.execute=function(e,t,n){if(this.engineid)return r.engines[this.engineid].dropDatabase(this.databaseid,this.ifexists,n);var i,o=this.databaseid;if(o===r.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(r.databases[o]){if(r.databases[o].engineid)throw new Error("Cannot drop database '"+o+"', because it is attached. Detach it.");delete r.databases[o],o===r.useid&&r.use(),i=1}else{if(!this.ifexists)throw new Error("Database '"+o+"' does not exist");i=0}return n&&n(i),i},z.Declare=function(e){return z.extend(this,e)},z.Declare.prototype.toString=function(){return this.declares&&0<this.declares.length?this.declares.map((function(e){var t="";return t+="@"+e.variable+" ",t+=e.dbtypeid,this.dbsize&&(t+="("+this.dbsize,this.dbprecision&&(t+=","+this.dbprecision),t+=")"),e.expression&&(t+=" = "+e.expression.toString()),t})).join(","):"DECLARE "},z.Declare.prototype.execute=function(e,t,n){return this.declares&&0<this.declares.length&&this.declares.map((function(e){var n=e.dbtypeid;r.fn[n]||(n=n.toUpperCase()),r.declares[e.variable]={dbtypeid:n,dbsize:e.dbsize,dbprecision:e.dbprecision},e.expression&&(r.vars[e.variable]=new Function("params,alasql","return "+e.expression.toJS("({})","",null))(t,r),r.declares[e.variable]&&(r.vars[e.variable]=r.stdfn.CONVERT(r.vars[e.variable],r.declares[e.variable])))})),n?n(1):1},z.ShowDatabases=function(e){return z.extend(this,e)},z.ShowDatabases.prototype.toString=function(){var e="SHOW DATABASES";return this.like&&(e+="LIKE "+this.like.toString()),e},z.ShowDatabases.prototype.execute=function(e,t,n){if(this.engineid)return r.engines[this.engineid].showDatabases(this.like,n);var i,o=this,a=[];for(i in r.databases)a.push({databaseid:i});return o.like&&a&&0<a.length&&(a=a.filter((function(e){return r.utils.like(o.like.value,e.databaseid)}))),n&&n(a),a},z.ShowTables=function(e){return z.extend(this,e)},z.ShowTables.prototype.toString=function(){var e="SHOW TABLES";return this.databaseid&&(e+=" FROM "+this.databaseid),this.like&&(e+=" LIKE "+this.like.toString()),e},z.ShowTables.prototype.execute=function(e,t,n){e=r.databases[this.databaseid||e];var i,o=this,a=[];for(i in e.tables)a.push({tableid:i});return o.like&&a&&0<a.length&&(a=a.filter((function(e){return r.utils.like(o.like.value,e.tableid)}))),n&&n(a),a},z.ShowColumns=function(e){return z.extend(this,e)},z.ShowColumns.prototype.toString=function(){var e="SHOW COLUMNS";return this.table.tableid&&(e+=" FROM "+this.table.tableid),this.databaseid&&(e+=" FROM "+this.databaseid),e},z.ShowColumns.prototype.execute=function(e,t,n){return(e=r.databases[this.databaseid||e].tables[this.table.tableid])&&e.columns?(e=e.columns.map((function(e){return{columnid:e.columnid,dbtypeid:e.dbtypeid,dbsize:e.dbsize}})),n&&n(e),e):(n&&n([]),[])},z.ShowIndex=function(e){return z.extend(this,e)},z.ShowIndex.prototype.toString=function(){var e="SHOW INDEX";return this.table.tableid&&(e+=" FROM "+this.table.tableid),this.databaseid&&(e+=" FROM "+this.databaseid),e},z.ShowIndex.prototype.execute=function(e,t,n){var i=r.databases[this.databaseid||e].tables[this.table.tableid],o=[];if(i&&i.indices)for(var a in i.indices)o.push({hh:a,len:Object.keys(i.indices[a]).length});return n&&n(o),o},z.ShowCreateTable=function(e){return z.extend(this,e)},z.ShowCreateTable.prototype.toString=function(){var e="SHOW CREATE TABLE "+this.table.tableid;return this.databaseid&&(e+=" FROM "+this.databaseid),e},z.ShowCreateTable.prototype.execute=function(e){var t=r.databases[this.databaseid||e].tables[this.table.tableid];if(t){e="CREATE TABLE "+this.table.tableid+" (";var n=[];return t.columns&&(t.columns.forEach((function(e){var t=e.columnid+" "+e.dbtypeid;e.dbsize&&(t+="("+e.dbsize+")"),e.primarykey&&(t+=" PRIMARY KEY"),n.push(t)})),e+=n.join(", ")),e+")"}throw new Error('There is no such table "'+this.table.tableid+'"')},z.SetVariable=function(e){return z.extend(this,e)},z.SetVariable.prototype.toString=function(){var e="SET ";return void 0!==this.value&&(e+=this.variable.toUpperCase()+" "+(this.value?"ON":"OFF")),this.expression&&(e+=this.method+this.variable+" = "+this.expression.toString()),e},z.SetVariable.prototype.execute=function(e,t,n){var i;void 0!==this.value?("ON"==(i=this.value)?i=!0:"OFF"==i&&(i=!1),r.options[this.variable]=i):this.expression&&(this.exists&&(this.existsfn=this.exists.map((function(t){return(t=t.compile(e)).query&&!t.query.modifier&&(t.query.modifier="RECORDSET"),t}))),this.queries&&(this.queriesfn=this.queries.map((function(t){return(t=t.compile(e)).query&&!t.query.modifier&&(t.query.modifier="RECORDSET"),t}))),o=new Function("params,alasql","return "+this.expression.toJS("({})","",null)).bind(this)(t,r),r.declares[this.variable]&&(o=r.stdfn.CONVERT(o,r.declares[this.variable])),this.props&&0<this.props.length?(i="@"==this.method?"alasql.vars['"+this.variable+"']":"params['"+this.variable+"']",i+=this.props.map((function(e){return"string"==typeof e?"['"+e+"']":"number"==typeof e?"["+e+"]":"["+e.toJS()+"]"})).join(),new Function("value,params,alasql","var y;"+i+"=value")(o,t,r)):"@"==this.method?r.vars[this.variable]=o:t[this.variable]=o);var o=1;return n?n(o):o},r.test=function(e,t,n){if(0!==arguments.length){var i=Date.now();if(1===arguments.length)return n(),void r.con.log(Date.now()-i);2===arguments.length&&(n=t,t=1);for(var o=0;o<t;o++)n();r.con.results[e]=Date.now()-i}else r.log(r.con.results)},r.log=function(e,t){var n,i=r.useid,o=r.options.logtarget;if(s.isNode&&(o="console"),n="string"==typeof e?r(e,t):e,"console"===o||s.isNode)"string"==typeof e&&r.options.logprompt&&console.log(i+">",e),Array.isArray(n)&&console.table?console.table(n):console.log(Q(n));else{o="output"===o?document.getElementsByTagName("output")[0]:"string"==typeof o?document.getElementById(o):o;var a="";if("string"==typeof e&&r.options.logprompt&&(a+="<pre><code>"+r.pretty(e)+"</code></pre>"),Array.isArray(n))if(0===n.length)a+="<p>[ ]</p>";else if("object"!=typeof n[0]||Array.isArray(n[0]))for(var l=0,c=n.length;l<c;l++)a+="<p>"+ne(n[l])+"</p>";else a+=ne(n);else a+=ne(n);o.innerHTML+=a}},r.clear=function(){var e=r.options.logtarget;s.isNode||s.isMeteorServer?console.clear&&console.clear():("output"===e?document.getElementsByTagName("output")[0]:"string"==typeof e?document.getElementById(e):e).innerHTML=""},r.write=function(e){var t=r.options.logtarget;s.isNode||s.isMeteorServer?console.log&&console.log(e):("output"===t?document.getElementsByTagName("output")[0]:"string"==typeof t?document.getElementById(t):t).innerHTML+=e},r.prompt=function(e,t,n){if(s.isNode)throw new Error("The prompt not realized for Node.js");var i=0;if("string"==typeof e&&(e=document.getElementById(e)),(t="string"==typeof t?document.getElementById(t):t).textContent=r.useid,n){r.prompthistory.push(n),i=r.prompthistory.length;try{var o=Date.now();r.log(n),r.write('<p style="color:blue">'+(Date.now()-o)+" ms</p>")}catch(o){r.write("<p>"+r.useid+"&gt;&nbsp;<b>"+n+"</b></p>"),r.write('<p style="color:red">'+o+"<p>")}}var a=e.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;re(document.getElementsByTagName("body")[0],a,500),e.onkeydown=function(n){if(13===n.which){var o=e.value,a=r.useid;e.value="",r.prompthistory.push(o),i=r.prompthistory.length;try{var s=Date.now();r.log(o),r.write('<p style="color:blue">'+(Date.now()-s)+" ms</p>")}catch(n){r.write("<p>"+a+"&gt;&nbsp;"+r.pretty(o,!1)+"</p>"),r.write('<p style="color:red">'+n+"<p>")}e.focus(),t.textContent=r.useid,a=e.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop,re(document.getElementsByTagName("body")[0],a,500)}else 38===n.which?(--i<0&&(i=0),r.prompthistory[i]&&(e.value=r.prompthistory[i],n.preventDefault())):40===n.which&&(++i>=r.prompthistory.length?(i=r.prompthistory.length,e.value=""):r.prompthistory[i]&&(e.value=r.prompthistory[i],n.preventDefault()))}},z.BeginTransaction=function(e){return z.extend(this,e)},z.BeginTransaction.prototype.toString=function(){return"BEGIN TRANSACTION"},z.BeginTransaction.prototype.execute=function(e,t,n){return r.databases[e].engineid?r.engines[r.databases[r.useid].engineid].begin(e,n):(n&&n(1),1)},z.CommitTransaction=function(e){return z.extend(this,e)},z.CommitTransaction.prototype.toString=function(){return"COMMIT TRANSACTION"},z.CommitTransaction.prototype.execute=function(e,t,n){return r.databases[e].engineid?r.engines[r.databases[r.useid].engineid].commit(e,n):(n&&n(1),1)},z.RollbackTransaction=function(e){return z.extend(this,e)},z.RollbackTransaction.prototype.toString=function(){return"ROLLBACK TRANSACTION"},z.RollbackTransaction.prototype.execute=function(e,t,n){return r.databases[e].engineid?r.engines[r.databases[e].engineid].rollback(e,n):(n&&n(1),1)},r.options.tsql&&(r.stdfn.OBJECT_ID=function(e,t){t=(t=void 0===t?"T":t).toUpperCase(),e=e.split(".");var n=r.useid,i=e[0];2==e.length&&(n=e[0],i=e[1]);var o,a=r.databases[n].tables;for(o in n=r.databases[n].databaseid,a)if(o==i)return a[o].view&&"V"==t||!a[o].view&&"T"==t?n+"."+o:void 0}),r.options.mysql,(r.options.mysql||r.options.sqlite)&&(r.from.INFORMATION_SCHEMA=function(e,t,n,i,o){if("VIEWS"!=e&&"TABLES"!=e)throw new Error("Unknown INFORMATION_SCHEMA table");var a,s=[];for(a in r.databases){var l,c=r.databases[a].tables;for(l in c)(c[l].view&&"VIEWS"==e||!c[l].view&&"TABLES"==e)&&s.push({TABLE_CATALOG:a,TABLE_NAME:l})}return n?n(s,i,o):s}),r.options.postgres,r.options.oracle,r.options.sqlite,r.into.SQL=function(e,t,n,i,o){"object"==typeof e&&(t=e,e=void 0);var a={};if(r.utils.extend(a,t),void 0===a.tableid)throw new Error("Table for INSERT TO is not defined.");var s="";0===i.length&&"object"==typeof n[0]&&(i=Object.keys(n[0]).map((function(e){return{columnid:e}})));for(var l=0,c=n.length;l<c;l++)s+="INSERT INTO "+t.tableid+"(",s+=i.map((function(e){return e.columnid})).join(","),s+=") VALUES (",s+=i.map((function(e){var t=n[l][e.columnid];return e.typeid?"STRING"!==e.typeid&&"VARCHAR"!==e.typeid&&"NVARCHAR"!==e.typeid&&"CHAR"!==e.typeid&&"NCHAR"!==e.typeid||(t="'"+p(t)+"'"):"string"==typeof t&&(t="'"+p(t)+"'"),t})),s+=");\n";return e=r.utils.autoExtFilename(e,"sql",t),e=r.utils.saveFile(e,s),o?o(e):e},r.into.HTML=function(e,t,n,r,i){return i?i(1):1},r.into.JSON=function(e,t,n,i,o){var a;return"object"==typeof e&&(t=e,e=void 0),n=JSON.stringify(n),e=r.utils.autoExtFilename(e,"json",t),a=r.utils.saveFile(e,n),o?o(a):a},r.into.TXT=function(e,t,n,i,o){0===i.length&&0<n.length&&(i=Object.keys(n[0]).map((function(e){return{columnid:e}}))),"object"==typeof e&&(t=e,e=void 0);var a,s=n.length,l="";return 0<n.length&&(a=i[0].columnid,l+=n.map((function(e){return e[a]})).join("\n")),e=r.utils.autoExtFilename(e,"txt",t),s=r.utils.saveFile(e,l),o?o(s):s},r.into.TAB=r.into.TSV=function(e,t,n,i,o){var a={};return r.utils.extend(a,t),a.separator="\t",e=r.utils.autoExtFilename(e,"tab",t),a.autoExt=!1,r.into.CSV(e,a,n,i,o)},r.into.CSV=function(e,t,n,i,o){0===i.length&&0<n.length&&(i=Object.keys(n[0]).map((function(e){return{columnid:e}}))),"object"==typeof e&&(t=e,e=void 0);var a={headers:!0,separator:";",quote:'"',utf8Bom:!0};t&&!t.headers&&void 0!==t.headers&&(a.utf8Bom=!1),r.utils.extend(a,t);var s=n.length,l=a.utf8Bom?"\ufeff":"";return a.headers&&(l+=a.quote+i.map((function(e){return e.columnid.trim()})).join(a.quote+a.separator+a.quote)+a.quote+"\r\n"),n.forEach((function(e){l+=i.map((function(t){return t=e[t.columnid],+(t=""!==a.quote?(t+"").replace(new RegExp("\\"+a.quote,"g"),a.quote+a.quote):t)!=t?a.quote+t+a.quote:t})).join(a.separator)+"\r\n"})),e=r.utils.autoExtFilename(e,"csv",t),s=r.utils.saveFile(e,l,null,{disableAutoBom:!0}),o?o(s):s},r.into.XLS=function(e,t,n,i,o){"object"==typeof e&&(t=e,e=void 0);var a={};t&&t.sheets&&(a=t.sheets);var s={headers:!0};return void 0!==a.Sheet1?s=a[0]:void 0!==t&&(s=t),void 0===s.sheetid&&(s.sheetid="Sheet1"),a=function(){var e,r='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" \t\txmlns="path_to_url"><head> \t\t<meta charset="utf-8" /> \t\t\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets> ';return r+=" <x:ExcelWorksheet><x:Name>"+s.sheetid+"</x:Name><x:WorksheetOptions><x:DisplayGridlines/> </x:WorksheetOptions> \t\t</x:ExcelWorksheet>",r+="</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head>",r+="<body",void 0!==s.style&&(r+=' style="',"function"==typeof s.style?r+=s.style(s):r+=s.style,r+='"'),r+=">",r+="<table>",void 0!==s.caption&&(e=s.caption,r+="<caption",void 0!==(e="string"==typeof e?{title:e}:e).style&&(r+=' style="',"function"==typeof e.style?r+=e.style(s,e):r+=e.style,r+='" '),r+=">",r+=e.title,r+="</caption>"),void 0!==s.columns?i=s.columns:0==i.length&&0<n.length&&"object"==typeof n[0]&&(i=Array.isArray(n[0])?n[0].map((function(e,t){return{columnid:t}})):Object.keys(n[0]).map((function(e){return{columnid:e}}))),i.forEach((function(e,t){void 0!==s.column&&C(e,s.column),void 0===e.width&&(s.column&&"undefined"!=s.column.width?e.width=s.column.width:e.width="120px"),"number"==typeof e.width&&(e.width=e.width+"px"),void 0===e.columnid&&(e.columnid=t),void 0===e.title&&(e.title=""+e.columnid.trim()),s.headers&&Array.isArray(s.headers)&&(e.title=s.headers[t])})),r+="<colgroups>",i.forEach((function(e){r+='<col style="width: '+e.width+'"></col>'})),r+="</colgroups>",s.headers&&(r+="<thead>",r+="<tr>",i.forEach((function(e,t){r+="<th ",void 0!==e.style&&(r+=' style="',"function"==typeof e.style?r+=e.style(s,e,t):r+=e.style,r+='" '),r+=">",void 0!==e.title&&("function"==typeof e.title?r+=e.title(s,e,t):r+=e.title),r+="</th>"})),r+="</tr>",r+="</thead>"),r+="<tbody>",n&&0<n.length&&n.forEach((function(e,n){var o;n>s.limit||(r+="<tr",C(o={},s.row),s.rows&&s.rows[n]&&C(o,s.rows[n]),void 0!==o&&void 0!==o.style&&(r+=' style="',"function"==typeof o.style?r+=o.style(s,e,n):r+=o.style,r+='" '),r+=">",i.forEach((function(i,a){var l={};C(l,s.cell),C(l,o.cell),void 0!==s.column&&C(l,s.column.cell),C(l,i.cell),s.cells&&s.cells[n]&&s.cells[n][a]&&C(l,s.cells[n][a]);var c=e[i.columnid];"function"==typeof l.value&&(c=l.value(c,s,e,i,l,n,a));var u=l.typeid;void 0===(u="function"==typeof u?u(c,s,e,i,l,n,a):u)&&("number"==typeof c?u="number":"string"==typeof c?u="string":"boolean"==typeof c?u="boolean":"object"==typeof c&&c instanceof Date&&(u="date"));var h="";if("money"==u?h='mso-number-format:"\\#\\,\\#\\#0\\\\ __\\.";white-space:normal;':"number"==u?h=" ":"date"==u?h='mso-number-format:"Short Date";':t.types&&t.types[u]&&t.types[u].typestyle&&(h=t.types[u].typestyle),r+="<td style='"+(h=h||'mso-number-format:"\\@";')+"' ",void 0!==l.style&&(r+=' style="',"function"==typeof l.style?r+=l.style(c,s,e,i,n,a):r+=l.style,r+='" '),r+=">",l=l.format,void 0===c)r+="";else if(void 0!==l)if("function"==typeof l)r+=l(c);else{if("string"!=typeof l)throw new Error("Unknown format type. Should be function or string");r+=c}else r+="number"==u||"date"==u?c.toString():"money"==u?(+c).toFixed(2):c;r+="</td>"})),r+="</tr>")})),r+="</tbody>",r+="</table>",r+="</body>",r+="</html>"}(),e=r.utils.autoExtFilename(e,"xls",t),a=r.utils.saveFile(e,a),o?o(a):a},r.into.XLSXML=function(e,t,n,i,o){t=t||{},"object"==typeof e&&(t=e,e=void 0);var a,s={},l=t&&t.sheets?(s=t.sheets,a=n,i):(s.Sheet1=t,a=[n],[i]);return e=r.utils.autoExtFilename(e,"xls",t),e=r.utils.saveFile(e,function(){var e="",n=" </Styles>",r={},i=62;function o(t){var n,o="";for(n in t){for(var a in o+="<"+n,t[n])o+=" ","x:"==a.substr(0,2)?o+=a:o+="ss:",o+=a+'="'+t[n][a]+'"';o+="/>"}var s=y(o);return r[s]||(r[s]={styleid:i},e+='<Style ss:ID="s'+i+'">',e+=o,e+="</Style>",i++),"s"+r[s].styleid}var c,u=0;for(c in s){var h=s[c],d=void 0!==h.dataidx?h.dataidx:u++,f=function(e){try{return Object.values(e)}catch(t){return Object.keys(e).map((function(t){return e[t]}))}}(a[d]),p=void 0;void 0!==h.columns?p=h.columns:(void 0===(p=l[d])||0==p.length&&0<f.length)&&"object"==typeof f[0]&&(p=Array.isArray(f[0])?f[0].map((function(e,t){return{columnid:t}})):Object.keys(f[0]).map((function(e){return{columnid:e}}))),p.forEach((function(e,t){void 0!==h.column&&C(e,h.column),void 0===e.width&&(h.column&&void 0!==h.column.width?e.width=h.column.width:e.width=120),"number"==typeof e.width&&(e.width=e.width),void 0===e.columnid&&(e.columnid=t),void 0===e.title&&(e.title=""+e.columnid.trim()),h.headers&&Array.isArray(h.headers)&&(e.title=h.headers[t])})),n+='<Worksheet ss:Name="'+c+'"> \t \t\t\t<Table ss:ExpandedColumnCount="'+p.length+'" ss:ExpandedRowCount="'+((h.headers?1:0)+Math.min(f.length,h.limit||f.length))+'" x:FullColumns="1" \t \t\t\tx:FullRows="1" ss:DefaultColumnWidth="65" ss:DefaultRowHeight="15">',p.forEach((function(e,t){n+='<Column ss:Index="'+(t+1)+'" ss:AutoFitWidth="0" ss:Width="'+e.width+'"/>'})),h.headers&&(n+='<Row ss:AutoFitHeight="0">',p.forEach((function(e,t){var r;n+="<Cell ",void 0!==e.style&&(r={},"function"==typeof e.style?C(r,e.style(h,e,t)):C(r,e.style),n+='ss:StyleID="'+o(r)+'"'),n+='><Data ss:Type="String">',void 0!==e.title&&("function"==typeof e.title?n+=e.title(h,e,t):n+=e.title),n+="</Data></Cell>"})),n+="</Row>"),f&&0<f.length&&f.forEach((function(e,r){var i,a;r>h.limit||(C(i={},h.row),h.rows&&h.rows[r]&&C(i,h.rows[r]),n+="<Row ",void 0!==i&&(a={},void 0!==i.style&&("function"==typeof i.style?C(a,i.style(h,e,r)):C(a,i.style),n+='ss:StyleID="'+o(a)+'"')),n+=">",p.forEach((function(a,s){var l={};C(l,h.cell),C(l,i.cell),void 0!==h.column&&C(l,h.column.cell),C(l,a.cell),h.cells&&h.cells[r]&&h.cells[r][s]&&C(l,h.cells[r][s]);var c=e[a.columnid];"function"==typeof l.value&&(c=l.value(c,h,e,a,l,r,s));var u=l.typeid;void 0===(u="function"==typeof u?u(c,h,e,a,l,r,s):u)&&("number"==typeof c?u="number":"string"==typeof c?u="string":"boolean"==typeof c?u="boolean":"object"==typeof c&&c instanceof Date&&(u="date"));var d="String";"number"==u?d="Number":"date"==u&&(d="Date");var f="";if("money"==u?f='mso-number-format:"\\#\\,\\#\\#0\\\\ __\\.";white-space:normal;':"number"==u?f=" ":"date"==u?f='mso-number-format:"Short Date";':t.types&&t.types[u]&&t.types[u].typestyle&&(f=t.types[u].typestyle),f=f||'mso-number-format:"\\@";',n+="<Cell ",f={},void 0!==l.style&&("function"==typeof l.style?C(f,l.style(c,h,e,a,r,s)):C(f,l.style),n+='ss:StyleID="'+o(f)+'"'),n+=">",n+='<Data ss:Type="'+d+'">',l=l.format,void 0===c)n+="";else if(void 0!==l)if("function"==typeof l)n+=l(c);else{if("string"!=typeof l)throw new Error("Unknown format type. Should be function or string");n+=c}else n+="number"==u||"date"==u?c.toString():"money"==u?(+c).toFixed(2):c;n+="</Data></Cell>"})),n+="</Row>")})),n+="</Table></Worksheet>"}return'<?xml version="1.0"?> \t\t<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" \t\t xmlns:o="urn:schemas-microsoft-com:office:office" \t\t xmlns:x="urn:schemas-microsoft-com:office:excel" \t\t xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" \t\t xmlns:html="path_to_url"> \t\t <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> \t\t </DocumentProperties> \t\t <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> \t\t <AllowPNG/> \t\t </OfficeDocumentSettings> \t\t <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> \t\t <ActiveSheet>0</ActiveSheet> \t\t </ExcelWorkbook> \t\t <Styles> \t\t <Style ss:ID="Default" ss:Name="Normal"> \t\t <Alignment ss:Vertical="Bottom"/> \t\t <Borders/> \t\t <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="12" ss:Color="#000000"/> \t\t <Interior/> \t\t <NumberFormat/> \t\t <Protection/> \t\t </Style>'+e+(n+="</Workbook>")}()),o?o(e):e},r.into.XLSX=function(e,t,n,i,o){var a=1;t=t||{},S(i,[{columnid:"_"}])&&(n=n.map((function(e){return e._})),i=void 0),e=r.utils.autoExtFilename(e,"xlsx",t);var l=O();"object"==typeof e&&(t=e,e=void 0);var c={SheetNames:[],Sheets:{}};return t.sourcefilename?r.utils.loadBinaryFile(t.sourcefilename,!!o,(function(e){c=l.read(e,{type:"binary"}),u()})):u(),a=o?o(a):a;function u(){"object"==typeof t&&Array.isArray(t)?n&&0<n.length&&n.forEach((function(e,n){h(t[n],e,void 0,n+1)})):h(t,n,i,1),function(){if(void 0===e)a=c;else if(t=O(),s.isNode||s.isMeteorServer)t.writeFile(c,e);else{var t=t.write(c,{bookType:"xlsx",bookSST:!1,type:"binary"});if(9==v())throw new Error("Cannot save XLSX files in IE9. Please use XLS() export function");le(new Blob([function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}(t)],{type:"application/octet-stream"}),e)}}()}function h(e,t,n,i){i={sheetid:"Sheet "+i,headers:!0},r.utils.extend(i,e);var o=Object.keys(t).length;(!n||0==n.length)&&0<o&&(n=Object.keys(t[0]).map((function(e){return{columnid:e}})));var a={};-1<c.SheetNames.indexOf(i.sheetid)||(c.SheetNames.push(i.sheetid),c.Sheets[i.sheetid]={}),a=c.Sheets[i.sheetid],e="A1",i.range&&(e=i.range);var s=r.utils.xlscn(e.match(/[A-Z]+/)[0]);e=+e.match(/[0-9]+/)[0]-1,u=c.Sheets[i.sheetid]["!ref"]?(u=c.Sheets[i.sheetid]["!ref"],l=r.utils.xlscn(u.match(/[A-Z]+/)[0]),+u.match(/[0-9]+/)[0]-1):l=1;var l=Math.max(s+n.length,l),u=Math.max(e+o+2,u),h=1+e;c.Sheets[i.sheetid]["!ref"]="A1:"+r.utils.xlsnc(l)+u,i.headers&&(n.forEach((function(e,t){a[r.utils.xlsnc(s+t)+""+h]={v:e.columnid.trim()}})),h++);for(var d=0;d<o;d++)n.forEach((function(e,n){var i={v:t[d][e.columnid]};"number"==typeof t[d][e.columnid]?i.t="n":"string"==typeof t[d][e.columnid]?i.t="s":"boolean"==typeof t[d][e.columnid]?i.t="b":"object"==typeof t[d][e.columnid]&&t[d][e.columnid]instanceof Date&&(i.t="d"),a[r.utils.xlsnc(s+n)+""+h]=i})),h++}},r.from.METEOR=function(e,t,n,r,i){return t=e.find(t).fetch(),n?n(t,r,i):t},r.from.TABLETOP=function(e,t,n,i,o){var a=[];return e={headers:!0,simpleSheet:!0,key:e},r.utils.extend(e,t),e.callback=function(e){a=e,n&&(a=n(a,i,o))},Tabletop.init(e),null},r.from.HTML=function(e,t,n,i,o){var a={};if(r.utils.extend(a,t),!(e=document.querySelector(e))&&"TABLE"!==e.tagName)throw new Error("Selected HTML element is not a TABLE");var s=[];if((l=a.headers)&&!Array.isArray(l))for(var l=[],c=e.querySelector("thead tr").children,u=0;u<c.length;u++)c.item(u).style&&"none"===c.item(u).style.display&&a.skipdisplaynone?l.push(void 0):l.push(c.item(u).textContent);for(var h=e.querySelectorAll("tbody tr"),d=0;d<h.length;d++){var f=h.item(d).children,p={};for(u=0;u<f.length;u++)f.item(u).style&&"none"===f.item(u).style.display&&a.skipdisplaynone||(l?p[l[u]]=f.item(u).textContent:p[u]=f.item(u).textContent);s.push(p)}return n?n(s,i,o):s},r.from.RANGE=function(e,t,n,r,i){for(var o=[],a=e;a<=t;a++)o.push(a);return n?n(o,r,i):o},r.from.FILE=function(e,t,n,i,o){if("string"==typeof e)a=e;else{if(!(e instanceof Event))throw new Error("Wrong usage of FILE() function");a=e.target.files[0].name}var a=(a=a.split("."))[a.length-1].toUpperCase();if(r.from[a])return r.from[a](e,t,n,i,o);throw new Error("Cannot recognize file type for loading")},r.from.JSON=function(e,t,n,i,o){var a;return e=r.utils.autoExtFilename(e,"json",t),r.utils.loadFile(e,!!n,(function(e){a=JSON.parse(e),n&&(a=n(a,i,o))})),a},r.from.TXT=function(e,t,n,i,o){var a;return e=r.utils.autoExtFilename(e,"txt",t),r.utils.loadFile(e,!!n,(function(e){""===(a=e.split(/\r?\n/))[a.length-1]&&a.pop();for(var t=0,r=a.length;t<r;t++)a[t]==+a[t]&&(a[t]=+a[t]),a[t]=[a[t]];n&&(a=n(a,i,o))})),a},r.from.TAB=r.from.TSV=function(e,t,n,i,o){return(t=t||{}).separator="\t",e=r.utils.autoExtFilename(e,"tab",t),t.autoext=!1,r.from.CSV(e,t,n,i,o)},r.from.CSV=function(e,t,n,i,o){e=""+e;var a,s={separator:",",quote:'"',headers:!0};r.utils.extend(s,t);var l=[];function c(e){var t,r,c,u=s.separator.charCodeAt(0),h=s.quote.charCodeAt(0),d={},f={},p=[],g=e.length,m=0,v=0;function y(){if(g<=m)return f;if(r)return r=!1,d;var t=m;if(e.charCodeAt(t)===h){for(var n=t;n++<g;)if(e.charCodeAt(n)===h){if(e.charCodeAt(n+1)!==h)break;++n}return m=n+2,13===(i=e.charCodeAt(n+1))?(r=!0,10===e.charCodeAt(n+2)&&++m):10===i&&(r=!0),e.substring(t+1,n).replace(/""/g,'"')}for(;m<g;){var i,o=1;if(10===(i=e.charCodeAt(m++)))r=!0;else if(13===i)r=!0,10===e.charCodeAt(m)&&(++m,++o);else if(i!==u)continue;return e.substring(t,m-o)}return e.substring(t)}for(;(t=y())!==f;){for(var b,_=[];t!==d&&t!==f;)_.push(t.trim()),t=y();s.headers?(0===v?"boolean"==typeof s.headers?l=_:Array.isArray(s.headers)&&(l=s.headers,b={},l.forEach((function(e,t){b[e]=_[t],void 0!==b[e]&&0!==b[e].length&&b[e].trim()==+b[e]&&(b[e]=+b[e])})),p.push(b)):(b={},l.forEach((function(e,t){b[e]=_[t],void 0!==b[e]&&0!==b[e].length&&b[e].trim()==+b[e]&&(b[e]=+b[e])})),p.push(b)),v++):p.push(_)}a=p,s.headers&&o&&o.sources&&o.sources[i]&&(c=o.sources[i].columns=[],l.forEach((function(e){c.push({columnid:e})}))),n&&(a=n(a,i,o))}return new RegExp("\n").test(e)?c(e):(e=r.utils.autoExtFilename(e,"csv",t),r.utils.loadFile(e,!!n,c,o.cb)),a},r.from.XLS=function(e,t,n,i,o){return t=t||{},e=r.utils.autoExtFilename(e,"xls",t),t.autoExt=!1,ie(O(),e,t,n,i,o)},r.from.XLSX=function(e,t,n,i,o){return t=t||{},e=r.utils.autoExtFilename(e,"xlsx",t),t.autoExt=!1,ie(O(),e,t,n,i,o)},r.from.ODS=function(e,t,n,i,o){return t=t||{},e=r.utils.autoExtFilename(e,"ods",t),t.autoExt=!1,ie(O(),e,t,n,i,o)},r.from.XML=function(e,t,n,i,o){var a;return r.utils.loadFile(e,!!n,(function(e){function t(){var e=r(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(e)return{name:e[1],value:e[2].replace(/^['"]|['"]$/g,"")}}function r(e){if(e=c.match(e))return c=c.slice(e[0].length),e}function s(){return 0==c.length}function l(e){return 0==c.indexOf(e)}var c;c=(c=(c=e).trim()).replace(/<!--[\s\S]*?-->/g,""),function(){if(r(/^<\?xml\s*/)){for(var e={attributes:{}};!s()&&!l("?>");){var n=t();if(!n)return e;e.attributes[n.name]=n.value}r(/\?>\s*/)}}(),a=function e(){var n=r(/^<([\w-:.]+)\s*/);if(n){for(var i,o={name:n[1],attributes:{},children:[]};!(s()||l(">")||l("?>")||l("/>"));){var a=t();if(!a)return o;o.attributes[a.name]=a.value}if(r(/^\s*\/>\s*/))return o;for(r(/\??>\s*/),o.content=function(){var e=r(/^([^<]*)/);return e?e[1]:""}();i=e();)o.children.push(i);return r(/^<\/[\w-:.]+>\s*/),o}}(),n&&(a=n(a,i,o))})),a},r.from.GEXF=function(e,t,n,i,o){var a;return r("SEARCH FROM XML("+e+")",[],(function(e){a=e,n&&(a=n(a))})),a},z.Print=function(e){return z.extend(this,e)},z.Print.prototype.toString=function(){var e="PRINT";return this.statement&&(e+=" "+this.statement.toString()),e},z.Print.prototype.execute=function(e,t,n){var i,o=this;return r.precompile(this,e,t),this.exprs&&0<this.exprs.length?(i=this.exprs.map((function(e){return e=new Function("params,alasql,p","var y;return "+e.toJS("({})","",null)).bind(o)(t,r),Q(e)})),console.log.apply(console,i)):this.select?(e=this.select.execute(e,t),console.log(Q(e))):console.log(),n?n(1):1},z.Source=function(e){return z.extend(this,e)},z.Source.prototype.toString=function(){var e="SOURCE";return this.url&&(e+=" '"+this.url+" '"),e},z.Source.prototype.execute=function(e,t,n){var i;return m(this.url,!!n,(function(e){return i=r(e),i=n?n(i):i}),(function(e){throw e})),i},z.Require=function(e){return z.extend(this,e)},z.Require.prototype.toString=function(){var e="REQUIRE";return this.paths&&0<this.paths.length&&(e+=this.paths.map((function(e){return e.toString()})).join(",")),this.plugins&&0<this.plugins.length&&(e+=this.plugins.map((function(e){return e.toUpperCase()})).join(",")),e},z.Require.prototype.execute=function(e,t,n){var i=this,o=0,a="";return this.paths&&0<this.paths.length?this.paths.forEach((function(e){m(e.value,!!n,(function(e){a+=e,++o<i.paths.length||(new Function("params,alasql",a)(t,r),n&&(o=n(o)))}))})):this.plugins&&0<this.plugins.length?this.plugins.forEach((function(e){r.plugins[e]||m(r.path+"/alasql-"+e.toLowerCase()+".js",!!n,(function(s){a+=s,++o<i.plugins.length||(new Function("params,alasql",a)(t,r),r.plugins[e]=!0,n&&(o=n(o)))}))})):n&&(o=n(o)),o},z.Assert=function(e){return z.extend(this,e)},z.Source.prototype.toString=function(){var e="ASSERT";return this.value&&(e+=" "+JSON.stringify(this.value)),e},z.Assert.prototype.execute=function(e){if(!S(r.res,this.value))throw new Error((this.message||"Assert wrong")+": "+JSON.stringify(r.res)+" == "+JSON.stringify(this.value));return 1},(F=r.engines.WEBSQL=function(){}).createDatabase=function(e,t,n,i){var o=openDatabase(e,t[0],t[1],t[2]);if(this.dbid&&((t=r.createDatabase(this.dbid)).engineid="WEBSQL",t.wdbid=e,t.wdb=t),!o)throw new Error('Cannot create WebSQL database "'+this.dbid+'"');return i&&i(1),1},F.dropDatabase=function(e){throw new Error("This is impossible to drop WebSQL database.")},F.attachDatabase=function(e,t,n,i,o){if(r.databases[t])throw new Error('Unable to attach database as "'+t+'" because it already exists');return r.openDatabase(e,n[0],n[1],n[2]),1};var oe=r.engines.INDEXEDDB=function(){};s.hasIndexedDB&&("function"==typeof s.global.indexedDB.webkitGetDatabaseNames?oe.getDatabaseNames=s.global.indexedDB.webkitGetDatabaseNames.bind(s.global.indexedDB):(oe.getDatabaseNames=function(){var e={},t={contains:function(e){return!0},notsupported:!0};return setTimeout((function(){var n={target:{result:t}};e.onsuccess(n)}),0),e},oe.getDatabaseNamesNotSupported=!0)),oe.showDatabases=function(e,t){oe.getDatabaseNames().onsuccess=function(n){var r=n.target.result;if(oe.getDatabaseNamesNotSupported)throw new Error("SHOW DATABASE is not supported in this browser");var i,o=[];e&&(i=new RegExp(e.value.replace(/\%/g,".*"),"g"));for(var a=0;a<r.length;a++)e&&!r[a].match(i)||o.push({databaseid:r[a]});t(o)}},oe.createDatabase=function(e,t,n,r,i){var o=s.global.indexedDB;n?o.open(e,1).onsuccess=function(e){e.target.result.close(),i&&i(1)}:((o=o.open(e,1)).onupgradeneeded=function(e){e.target.transaction.abort()},o.onsuccess=function(t){if(!n)throw new Error('IndexedDB: Cannot create new database "'+e+'" because it already exists');i&&i(0)})},oe.createDatabase=function(e,t,n,r,i){var o,a,l,c=s.global.indexedDB;oe.getDatabaseNamesNotSupported?n?(o=!0,(a=c.open(e)).onupgradeneeded=function(e){o=!1},a.onsuccess=function(e){e.target.result.close(),o?i&&i(0):i&&i(1)}):((l=c.open(e)).onupgradeneeded=function(e){e.target.transaction.abort()},l.onabort=function(e){i&&i(1)},l.onsuccess=function(t){throw t.target.result.close(),new Error('IndexedDB: Cannot create new database "'+e+'" because it already exists')}):(l=oe.getDatabaseNames()).onsuccess=function(t){if(t.target.result.contains(e)){if(n)return void(i&&i(0));throw new Error('IndexedDB: Cannot create new database "'+e+'" because it already exists')}c.open(e,1).onsuccess=function(e){e.target.result.close(),i&&i(1)}}},oe.dropDatabase=function(e,t,n){var r=s.global.indexedDB;oe.getDatabaseNames().onsuccess=function(i){if(!i.target.result.contains(e)){if(t)return void(n&&n(0));throw new Error('IndexedDB: Cannot drop new database "'+e+'" because it does not exist')}r.deleteDatabase(e).onsuccess=function(e){n&&n(1)}}},oe.attachDatabase=function(e,t,n,i,o){if(!s.hasIndexedDB)throw new Error("The current browser does not support IndexedDB");var a=s.global.indexedDB;oe.getDatabaseNames().onsuccess=function(n){if(!n.target.result.contains(e))throw new Error('IndexedDB: Cannot attach database "'+e+'" because it does not exist');a.open(e).onsuccess=function(n){var i=n.target.result,a=new r.Database(t||e);a.engineid="INDEXEDDB",a.ixdbid=e,a.tables=[];for(var s=i.objectStoreNames,l=0;l<s.length;l++)a.tables[s[l]]={};n.target.result.close(),o&&o(1)}}},oe.createTable=function(e,t,n,i){var o=s.global.indexedDB,a=r.databases[e].ixdbid;oe.getDatabaseNames().onsuccess=function(n){if(!n.target.result.contains(a))throw new Error('IndexedDB: Cannot create table in database "'+a+'" because it does not exist');(n=o.open(a)).onversionchange=function(e){e.target.result.close()},n.onsuccess=function(n){var r=n.target.result.version;n.target.result.close(),(r=o.open(a,r+1)).onupgradeneeded=function(e){e.target.result.createObjectStore(t,{autoIncrement:!0})},r.onsuccess=function(e){e.target.result.close(),i&&i(1)},r.onerror=function(e){throw e},r.onblocked=function(n){throw new Error('Cannot create table "'+t+'" because database "'+e+'" is blocked')}}}},oe.dropTable=function(e,t,n,i){var o=s.global.indexedDB,a=r.databases[e].ixdbid;oe.getDatabaseNames().onsuccess=function(s){if(!s.target.result.contains(a))throw new Error('IndexedDB: Cannot drop table in database "'+a+'" because it does not exist');(s=o.open(a)).onversionchange=function(e){e.target.result.close()},s.onsuccess=function(s){var l=s.target.result.version;s.target.result.close(),(l=o.open(a,l+1)).onupgradeneeded=function(i){if((i=i.target.result).objectStoreNames.contains(t))i.deleteObjectStore(t),delete r.databases[e].tables[t];else if(!n)throw new Error('IndexedDB: Cannot drop table "'+t+'" because it does not exist')},l.onsuccess=function(e){e.target.result.close(),i&&i(1)},l.onerror=function(e){throw e},l.onblocked=function(n){throw new Error('Cannot drop table "'+t+'" because database "'+e+'" is blocked')}}}},oe.intoTable=function(e,t,n,i,o){var a=s.global.indexedDB;e=r.databases[e].ixdbid,a.open(e).onsuccess=function(e){for(var r=e.target.result,i=(e=r.transaction([t],"readwrite")).objectStore(t),a=0,s=n.length;a<s;a++)i.add(n[a]);e.oncomplete=function(){r.close(),o&&o(s)}}},oe.fromTable=function(e,t,n,i,o){var a=s.global.indexedDB;e=r.databases[e].ixdbid,a.open(e).onsuccess=function(e){var r=[],a=e.target.result;(e=a.transaction([t]).objectStore(t).openCursor()).onblocked=function(e){},e.onerror=function(e){},e.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):(a.close(),n&&n(r,i,o))}}},oe.deleteFromTable=function(e,t,n,i,o){var a=s.global.indexedDB;e=r.databases[e].ixdbid,a.open(e).onsuccess=function(e){var r=e.target.result,a=(e=r.transaction([t],"readwrite").objectStore(t).openCursor(),0);e.onblocked=function(e){},e.onerror=function(e){},e.onsuccess=function(e){(e=e.target.result)?(n&&!n(e.value,i)||(e.delete(),a++),e.continue()):(r.close(),o&&o(a))}}},oe.updateTable=function(e,t,n,i,o,a){var l=s.global.indexedDB;e=r.databases[e].ixdbid,l.open(e).onsuccess=function(e){var r=e.target.result,s=(e=r.transaction([t],"readwrite").objectStore(t).openCursor(),0);e.onblocked=function(e){},e.onerror=function(e){},e.onsuccess=function(e){var t=e.target.result;t?(i&&!i(t.value,o)||(e=t.value,n(e,o),t.update(e),s++),t.continue()):(r.close(),a&&a(s))}}};var ae=r.engines.LOCALSTORAGE=function(){};ae.get=function(e){var t,n=localStorage.getItem(e);if(void 0!==n){try{t=JSON.parse(n)}catch(e){throw new Error("Cannot parse JSON object from localStorage"+n)}return t}},ae.set=function(e,t){void 0===t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))},ae.storeTable=function(e,t){var n=r.databases[e],i=n.tables[t];(e={}).columns=i.columns,e.data=i.data,e.identities=i.identities,ae.set(n.lsdbid+"."+t,e)},ae.restoreTable=function(e,t){e=r.databases[e];var n,i=ae.get(e.lsdbid+"."+t),o=new r.Table;for(n in i)o[n]=i[n];return(e.tables[t]=o).indexColumns(),o},ae.removeTable=function(e,t){e=r.databases[e],localStorage.removeItem(e.lsdbid+"."+t)},ae.createDatabase=function(e,t,n,r,i){var o=1,a=ae.get("alasql");if(n&&a&&a.databases&&a.databases[e])o=0;else{if((a=a||{databases:{}}).databases&&a.databases[e])throw new Error('localStorage: Cannot create new database "'+e+'" because it already exists');a.databases[e]=!0,ae.set("alasql",a),ae.set(e,{databaseid:e,tables:{}})}return i?i(o):o},ae.dropDatabase=function(e,t,n){var r,i=1,o=ae.get("alasql");if(t&&o&&o.databases&&!o.databases[e])i=0;else{if(!o){if(t)return n?n(0):0;throw new Error("There is no any AlaSQL databases in localStorage")}if(o.databases&&!o.databases[e])throw new Error('localStorage: Cannot drop database "'+e+'" because there is no such database');for(r in delete o.databases[e],ae.set("alasql",o),ae.get(e).tables)localStorage.removeItem(e+"."+r);localStorage.removeItem(e)}return n?n(i):i},ae.attachDatabase=function(e,t,n,i,o){if(r.databases[t])throw new Error('Unable to attach database as "'+t+'" because it already exists');t=t||e;var a=new r.Database(t);if(a.engineid="LOCALSTORAGE",a.lsdbid=e,a.tables=ae.get(e).tables,!r.options.autocommit&&a.tables)for(var s in a.tables)ae.restoreTable(t,s);return o?o(1):1},ae.showDatabases=function(e,t){var n,r=[],i=ae.get("alasql");if(e&&(n=new RegExp(e.value.replace(/%/g,".*"),"g")),i&&i.databases){for(var o in i.databases)r.push({databaseid:o});e&&r&&0<r.length&&(r=r.filter((function(e){return e.databaseid.match(n)})))}return t?t(r):r},ae.createTable=function(e,t,n,i){var o=r.databases[e].lsdbid;if(ae.get(o+"."+t)&&!n)throw new Error('Table "'+t+'" alsready exists in localStorage database "'+o+'"');return n=ae.get(o),r.databases[e].tables[t],n.tables[t]=!0,ae.set(o,n),ae.storeTable(e,t),i?i(1):1},ae.truncateTable=function(e,t,n,i){var o=r.databases[e].lsdbid;if(o=r.options.autocommit?ae.get(o):r.databases[e],!n&&!o.tables[t])throw new Error('Cannot truncate table "'+t+'" in localStorage, because it does not exist');return ae.restoreTable(e,t).data=[],ae.storeTable(e,t),i?i(1):1},ae.dropTable=function(e,t,n,i){var o=r.databases[e].lsdbid,a=r.options.autocommit?ae.get(o):r.databases[e];if(!n&&!a.tables[t])throw new Error('Cannot drop table "'+t+'" in localStorage, because it does not exist');return delete a.tables[t],ae.set(o,a),ae.removeTable(e,t),i?i(1):1},ae.fromTable=function(e,t,n,i,o){return r.databases[e].lsdbid,t=ae.restoreTable(e,t).data,n?n(t,i,o):t},ae.intoTable=function(e,t,n,i,o){r.databases[e].lsdbid;var a,s=n.length,l=ae.restoreTable(e,t);for(a in l.identities){var c,u=l.identities[a];for(c in n)n[c][a]=u.value,u.value+=u.step}return l.data||(l.data=[]),l.data=l.data.concat(n),ae.storeTable(e,t),o?o(s):s},ae.loadTableData=function(e,t){r.databases[e],r.databases[e].lsdbid,ae.restoreTable(e,t)},ae.saveTableData=function(e,t){var n=r.databases[e];e=r.databases[e].lsdbid,ae.storeTable(e,t),n.tables[t].data=void 0},ae.commit=function(e,t){var n=r.databases[e],i=r.databases[e].lsdbid,o={databaseid:i,tables:{}};if(n.tables)for(var a in n.tables)o.tables[a]=!0,ae.storeTable(e,a);return ae.set(i,o),t?t(1):1},ae.begin=ae.commit,ae.rollback=function(e,t){},(F=r.engines.SQLITE=function(){}).createDatabase=function(e,t,n,r,i){throw new Error("Connot create SQLITE database in memory. Attach it.")},F.dropDatabase=function(e){throw new Error("This is impossible to drop SQLite database. Detach it.")},F.attachDatabase=function(e,t,n,i,o){var a;if(r.databases[t])throw new Error('Unable to attach database as "'+t+'" because it already exists');if(n[0]&&n[0]instanceof z.StringValue||n[0]instanceof z.ParamValue)return n[0]instanceof z.StringValue?a=n[0].value:n[0]instanceof z.ParamValue&&(a=i[n[0].param]),r.utils.loadBinaryFile(a,!0,(function(n){var i=new r.Database(t||e);i.engineid="SQLITE",i.sqldbid=e,n=i.sqldb=new SQL.Database(n),i.tables=[],n.exec("SELECT * FROM sqlite_master WHERE type='table'")[0].values.forEach((function(e){i.tables[e[1]]={};var t=i.tables[e[1]].columns=[];(e=r.parse(e[4]).statements[0].columns)&&0<e.length&&e.forEach((function(e){t.push(e)}))})),o(1)}),(function(e){throw new Error('Cannot open SQLite database file "'+n[0].value+'"')})),1;throw new Error("Cannot attach SQLite database without a file")},F.fromTable=function(e,t,n,i,o){t=r.databases[e].sqldb.exec("SELECT * FROM "+t);var a=o.sources[i].columns=[];0<t[0].columns.length&&t[0].columns.forEach((function(e){a.push({columnid:e})}));var s=[];0<t[0].values.length&&t[0].values.forEach((function(e){var t={};a.forEach((function(n,r){t[n.columnid]=e[r]})),s.push(t)})),n&&n(s,i,o)},F.intoTable=function(e,t,n,i,o){for(var a=r.databases[e].sqldb,s=0,l=n.length;s<l;s++){var c="INSERT INTO "+t+" (",u=n[s],h=Object.keys(u);c+=h.join(","),c+=") VALUES (",c+=h.map((function(e){return"string"==typeof(e=u[e])?"'"+e+"'":e})).join(","),c+=")",a.exec(c)}return e=l,o&&o(e),e};var se=r.engines.FILESTORAGE=r.engines.FILE=function(){};if(se.createDatabase=function(e,t,n,i,o){var a=1,s=t[0].value;return r.utils.fileExists(s,(function(e){if(e){if(n)return a=0,a=o?o(a):a;throw new Error("Cannot create new database file, because it already exists")}r.utils.saveFile(s,JSON.stringify({tables:{}}),(function(e){o&&(a=o(a))}))})),a},se.dropDatabase=function(e,t,n){var i,o="";return"object"==typeof e&&e.value?o=e.value:(o=(r.databases[e]||{}).filename||"",delete r.databases[e]),r.utils.fileExists(o,(function(e){if(e)i=1,r.utils.deleteFile(o,(function(){i=1,n&&(i=n(i))}));else{if(!t)throw new Error("Cannot drop database file, because it does not exist");i=0,n&&(i=n(i))}})),i},se.attachDatabase=function(e,t,n,i,o){var a=1;if(r.databases[t])throw new Error('Unable to attach database as "'+t+'" because it already exists');var s=new r.Database(t||e);return s.engineid="FILESTORAGE",s.filename=n[0].value,m(s.filename,!!o,(function(e){try{s.data=JSON.parse(e)}catch(e){throw new Error("Data in FileStorage database are corrupted")}if(s.tables=s.data.tables,!r.options.autocommit&&s.tables)for(var t in s.tables)s.tables[t].data=s.data[t];o&&(a=o(a))})),a},se.createTable=function(e,t,n,i){var o=r.databases[e];if(o.data[t]&&!n)throw new Error('Table "'+t+'" alsready exists in the database "'+fsdbid+'"');return n=r.databases[e].tables[t],o.data.tables[t]={columns:n.columns},o.data[t]=[],se.updateFile(e),i&&i(1),1},se.updateFile=function(e){var t=r.databases[e];t.issaving?t.postsave=!0:(t.issaving=!0,t.postsave=!1,r.utils.saveFile(t.filename,JSON.stringify(t.data),(function(){t.issaving=!1,t.postsave&&setTimeout((function(){se.updateFile(e)}),50)})))},se.dropTable=function(e,t,n,i){var o=r.databases[e];if(!n&&!o.tables[t])throw new Error('Cannot drop table "'+t+'" in fileStorage, because it does not exist');return delete o.tables[t],delete o.data.tables[t],delete o.data[t],se.updateFile(e),i&&i(1),1},se.fromTable=function(e,t,n,i,o){return t=r.databases[e].data[t],n?n(t,i,o):t},se.intoTable=function(e,t,n,i,o){var a=r.databases[e],s=n.length,l=(l=a.data[t])||[];return a.data[t]=l.concat(n),se.updateFile(e),o&&o(s),s},se.loadTableData=function(e,t){(e=r.databases[e]).tables[t].data=e.data[t]},se.saveTableData=function(e,t){var n=r.databases[e];n.data[t]=n.tables[t].data,n.tables[t].data=null,se.updateFile(e)},se.commit=function(e,t){var n=r.databases[e];if(n.tables)for(var i in n.tables)n.data.tables[i]={columns:n.tables[i].columns},n.data[i]=n.tables[i].data;return se.updateFile(e),t?t(1):1},se.begin=se.commit,se.rollback=function(e,t){var n=1,i=r.databases[e];i.dbversion++,function o(){setTimeout((function(){return i.issaving?o():void r.loadFile(i.filename,!!t,(function(o){for(var a in i.data=o,i.tables={},i.data.tables){var s=new r.Table({columns:i.data.tables[a].columns});C(s,i.data.tables[a]),i.tables[a]=s,r.options.autocommit||(i.tables[a].data=i.data[a]),i.tables[a].indexColumns()}delete r.databases[e],r.databases[e]=new r.Database(e),C(r.databases[e],i),r.databases[e].engineid="FILESTORAGE",r.databases[e].filename=i.filename,t&&(n=t(n))}))}),100)}()},s.isBrowser&&!s.isWebWorker){if(!(r=r||!1))throw new Error("alasql was not found");r.worker=function(){throw new Error("Can find webworker in this enviroment")},"undefined"!=typeof Worker&&(r.worker=function(e,t,n){if(void 0===(e=!0===e?void 0:e))for(var i=document.getElementsByTagName("script"),o=0;o<i.length;o++){if("alasql-worker.js"===i[o].src.substr(-16).toLowerCase()){e=i[o].src.substr(0,i[o].src.length-16)+"alasql.js";break}if("alasql-worker.min.js"===i[o].src.substr(-20).toLowerCase()){e=i[o].src.substr(0,i[o].src.length-20)+"alasql.min.js";break}if("alasql.js"===i[o].src.substr(-9).toLowerCase()){e=i[o].src;break}if("alasql.min.js"===i[o].src.substr(-13).toLowerCase()){e=i[o].src.substr(0,i[o].src.length-13)+"alasql.min.js";break}}if(void 0===e)throw new Error("Path to alasql.js is not specified");var a;!1!==e?(a="importScripts('",a+=e,a+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}",a=new Blob([a],{type:"text/plain"}),r.webworker=new Worker(URL.createObjectURL(a)),r.webworker.onmessage=function(e){var t=e.data.id;r.buffer[t](e.data.data),delete r.buffer[t]},r.webworker.onerror=function(e){throw e},1<arguments.length&&(t="REQUIRE "+t.map((function(e){return'"'+e+'"'})).join(","),r(t,[],n))):!1===e&&delete r.webworker});var le=le||function(e){if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("path_to_url","a"),i="download"in r,o=/constructor/i.test(e.HTMLElement)||e.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){setTimeout((function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},l=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},c=function(t,c,u){function h(){!function(t,n,r){for(var i=(n=[].concat(n)).length;i--;){var o=t["on"+n[i]];if("function"==typeof o)try{o.call(t,r||t)}catch(t){!function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)}(t)}}}(f,"writestart progress write writeend".split(" "))}u||(t=l(t));var d,f=this,p="application/octet-stream"===t.type;if(f.readyState=f.INIT,i)return d=n().createObjectURL(t),void setTimeout((function(){var e,t;r.href=d,r.download=c,e=r,t=new MouseEvent("click"),e.dispatchEvent(t),h(),s(d),f.readyState=f.DONE}));!function(){if((a||p&&o)&&e.FileReader){var r=new FileReader;return r.onloadend=function(){var t=a?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,f.readyState=f.DONE,h()},r.readAsDataURL(t),f.readyState=f.INIT}d=d||n().createObjectURL(t),!p&&e.open(d,"_blank")||(e.location.href=d),f.readyState=f.DONE,h(),s(d)}()};return t=c.prototype,"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=l(e)),navigator.msSaveOrOpenBlob(e,t)}:(t.abort=function(){},t.readyState=t.INIT=0,t.WRITING=1,t.DONE=2,t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null,function(e,t,n){return new c(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);e.exports?e.exports.saveAs=le:null!==n.amdD&&null!==n.amdO&&void 0!==(i=function(){return le}.call(t,n,t,e))&&(e.exports=i),(s.isCordova||s.isMeteorServer||s.isNode)&&console.warn("It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead."),r.utils.saveAs=le}return new I("alasql"),r.use("alasql"),r},void 0===(i=r.apply(t,[]))||(e.exports=i)},66423:(e,t)=>{"use strict";t.L=class{constructor(e){this.tasks=[],this.count=e}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let e=this.tasks.shift();if(void 0===e)throw"Unexpected undefined value in tasks list";e()}}acquire(){return new Promise(((e,t)=>{this.tasks.push((()=>{var t=!1;e((()=>{t||(t=!0,this.count++,this.sched())}))})),process&&process.nextTick?process.nextTick(this.sched.bind(this)):setImmediate(this.sched.bind(this))}))}use(e){return this.acquire().then((t=>e().then((e=>(t(),e))).catch((e=>{throw t(),e}))))}}},42471:(e,t,n)=>{e.exports=n(75671)},82312:(e,t,n)=>{"use strict";var r=n(78126),i=n(40195),o=n(30411),a=n(82358),s=n(35633),l=n(61351),c=n(68517),u=n(89238);e.exports=function(e){return new Promise((function(t,n){var h=e.data,d=e.headers,f=e.responseType;r.isFormData(h)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(g+":"+m)}var v=s(e.baseURL,e.url);function y(){if(p){var r="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,o={data:f&&"text"!==f&&"json"!==f?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};i(t,n,o),p=null}}if(p.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(n(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var b=(e.withCredentials||c(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),f&&"json"!==f&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),h||(h=null),p.send(h)}))}},75671:(e,t,n)=>{"use strict";var r=n(78126),i=n(15475),o=n(82550),a=n(27854);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(77592));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(3814),l.CancelToken=n(53298),l.isCancel=n(7391),l.all=function(e){return Promise.all(e)},l.spread=n(44209),l.isAxiosError=n(37076),e.exports=l,e.exports.default=l},3814:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},53298:(e,t,n)=>{"use strict";var r=n(3814);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},7391:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},82550:(e,t,n)=>{"use strict";var r=n(78126),i=n(82358),o=n(26758),a=n(22793),s=n(27854),l=n(44081),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[a,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var h=e;n.length;){var d=n.shift(),f=n.shift();try{h=d(h)}catch(e){f(e);break}}try{i=a(h)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},26758:(e,t,n)=>{"use strict";var r=n(78126);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},35633:(e,t,n)=>{"use strict";var r=n(57648),i=n(82376);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},89238:(e,t,n)=>{"use strict";var r=n(56856);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},22793:(e,t,n)=>{"use strict";var r=n(78126),i=n(97424),o=n(7391),a=n(77592);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},56856:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},27854:(e,t,n)=>{"use strict";var r=n(78126);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(a).concat(s),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(h,c),n}},40195:(e,t,n)=>{"use strict";var r=n(89238);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},97424:(e,t,n)=>{"use strict";var r=n(78126),i=n(77592);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},77592:(e,t,n)=>{"use strict";var r=n(78126),i=n(28842),o=n(56856),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(82312)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c},15475:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},82358:(e,t,n)=>{"use strict";var r=n(78126);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},82376:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},30411:(e,t,n)=>{"use strict";var r=n(78126);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},57648:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},37076:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},68517:(e,t,n)=>{"use strict";var r=n(78126);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},28842:(e,t,n)=>{"use strict";var r=n(78126);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},61351:(e,t,n)=>{"use strict";var r=n(78126),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},44209:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},44081:(e,t,n)=>{"use strict";var r=n(88593),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&s(t);function a(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(a(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},78126:(e,t,n)=>{"use strict";var r=n(15475),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:l,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},588:e=>{"use strict";e.exports=function(e){if(e)throw e}},92226:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=l(e),a=o[0],s=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,l=r-i;s<l;s+=a)o.push(c(e,s,s+a>l?l:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},89977:(e,t,n)=>{"use strict";const r=n(92226),i=n(72177),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|g(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return u(e),s(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(i)return r?-1:W(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===l)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;r<l;r++)if(c(e,o+r)!==c(t,r)){n=!1;break}if(n)return o}return-1}function _(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Z(r))return a;e[n+a]=r}return a}function x(e,t,n,r){return Y(W(t,e.length-n),e,n,r)}function w(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return Y(G(t),e,n,r)}function k(e,t,n,r){return Y(function(e,t){let n,r,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=E));return n}(r)}t.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},l.allocUnsafe=function(e){return h(e)},l.allocUnsafeSlow=function(e){return h(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(X(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){o=c[e],a=u[e];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function M(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=K[e[r]];return i}function L(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){V(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function P(e,t,n,r,i){V(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return t=+t,n>>>=0,o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=J((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=J((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=J((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=l.isBuffer(e)?e:l.from(e,r),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};const B={};function j(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,o)}function q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function W(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},99694:e=>{"use strict";e.exports=function(e,t){var n,r=String(e),i=0;if("string"!=typeof t)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)i++,n=r.indexOf(t,n+t.length);return i}},86210:e=>{var t;window,t=function(){return function(){var e={282:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearChoices=t.activateChoices=t.filterChoices=t.addChoice=void 0;var r=n(883);t.addChoice=function(e){var t=e.value,n=e.label,i=e.id,o=e.groupId,a=e.disabled,s=e.elementId,l=e.customProperties,c=e.placeholder,u=e.keyCode;return{type:r.ACTION_TYPES.ADD_CHOICE,value:t,label:n,id:i,groupId:o,disabled:a,elementId:s,customProperties:l,placeholder:c,keyCode:u}},t.filterChoices=function(e){return{type:r.ACTION_TYPES.FILTER_CHOICES,results:e}},t.activateChoices=function(e){return void 0===e&&(e=!0),{type:r.ACTION_TYPES.ACTIVATE_CHOICES,active:e}},t.clearChoices=function(){return{type:r.ACTION_TYPES.CLEAR_CHOICES}}},783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGroup=void 0;var r=n(883);t.addGroup=function(e){var t=e.value,n=e.id,i=e.active,o=e.disabled;return{type:r.ACTION_TYPES.ADD_GROUP,value:t,id:n,active:i,disabled:o}}},464:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.highlightItem=t.removeItem=t.addItem=void 0;var r=n(883);t.addItem=function(e){var t=e.value,n=e.label,i=e.id,o=e.choiceId,a=e.groupId,s=e.customProperties,l=e.placeholder,c=e.keyCode;return{type:r.ACTION_TYPES.ADD_ITEM,value:t,label:n,id:i,choiceId:o,groupId:a,customProperties:s,placeholder:l,keyCode:c}},t.removeItem=function(e,t){return{type:r.ACTION_TYPES.REMOVE_ITEM,id:e,choiceId:t}},t.highlightItem=function(e,t){return{type:r.ACTION_TYPES.HIGHLIGHT_ITEM,id:e,highlighted:t}}},137:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setIsLoading=t.resetTo=t.clearAll=void 0;var r=n(883);t.clearAll=function(){return{type:r.ACTION_TYPES.CLEAR_ALL}},t.resetTo=function(e){return{type:r.ACTION_TYPES.RESET_TO,state:e}},t.setIsLoading=function(e){return{type:r.ACTION_TYPES.SET_IS_LOADING,isLoading:e}}},373:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(996)),a=i(n(70)),s=n(282),l=n(783),c=n(464),u=n(137),h=n(520),d=n(883),f=n(789),p=n(799),g=n(655),m=i(n(744)),v=i(n(686)),y="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,b={},_=function(){function e(t,n){var i=this;void 0===t&&(t="[data-choice]"),void 0===n&&(n={}),this.config=o.default.all([f.DEFAULT_CONFIG,e.defaults.options,n],{arrayMerge:function(e,t){return r([],t,!0)}});var a=(0,p.diff)(this.config,f.DEFAULT_CONFIG);a.length&&console.warn("Unknown config option(s) passed",a.join(", "));var s="string"==typeof t?document.querySelector(t):t;if(!(s instanceof HTMLInputElement||s instanceof HTMLSelectElement))throw TypeError("Expected one of the following types text|select-one|select-multiple");if(this._isTextElement=s.type===d.TEXT_TYPE,this._isSelectOneElement=s.type===d.SELECT_ONE_TYPE,this._isSelectMultipleElement=s.type===d.SELECT_MULTIPLE_TYPE,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,["auto","always"].includes("".concat(this.config.renderSelectedChoices))||(this.config.renderSelectedChoices="auto"),n.addItemFilter&&"function"!=typeof n.addItemFilter){var l=n.addItemFilter instanceof RegExp?n.addItemFilter:new RegExp(n.addItemFilter);this.config.addItemFilter=l.test.bind(l)}if(this._isTextElement?this.passedElement=new h.WrappedInput({element:s,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new h.WrappedSelect({element:s,classNames:this.config.classNames,template:function(e){return i._templates.option(e)}}),this.initialised=!1,this._store=new m.default,this._initialState=g.defaultState,this._currentState=g.defaultState,this._prevState=g.defaultState,this._currentValue="",this._canSearch=!!this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=(0,p.generateId)(this.passedElement.element,"choices-"),this._direction=this.passedElement.dir,!this._direction){var c=window.getComputedStyle(this.passedElement.element).direction;c!==window.getComputedStyle(document.documentElement).direction&&(this._direction=c)}if(this._idNames={itemChoice:"item-choice"},this._isSelectElement&&(this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options),this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&this._isTextElement){var u=this.passedElement.value.split(this.config.delimiter);this._presetItems=this._presetItems.concat(u)}if(this.passedElement.options&&this.passedElement.options.forEach((function(e){i._presetChoices.push({value:e.value,label:e.innerHTML,selected:!!e.selected,disabled:e.disabled||e.parentNode.disabled,placeholder:""===e.value||e.hasAttribute("placeholder"),customProperties:e.dataset["custom-properties"]})})),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onSelectKey=this._onSelectKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive)return this.config.silent||console.warn("Trying to initialise Choices on element already initialised",{element:t}),void(this.initialised=!0);this.init()}return Object.defineProperty(e,"defaults",{get:function(){return Object.preventExtensions({get options(){return b},get templates(){return v.default}})},enumerable:!1,configurable:!0}),e.prototype.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._store.subscribe(this._render),this._render(),this._addEventListeners(),(!this.config.addItems||this.passedElement.element.hasAttribute("disabled"))&&this.disable(),this.initialised=!0;var e=this.config.callbackOnInit;e&&"function"==typeof e&&e.call(this)}},e.prototype.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this.clearStore(),this._isSelectElement&&(this.passedElement.options=this._presetOptions),this._templates=v.default,this.initialised=!1)},e.prototype.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},e.prototype.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},e.prototype.highlightItem=function(e,t){if(void 0===t&&(t=!0),!e||!e.id)return this;var n=e.id,r=e.groupId,i=void 0===r?-1:r,o=e.value,a=void 0===o?"":o,s=e.label,l=void 0===s?"":s,u=i>=0?this._store.getGroupById(i):null;return this._store.dispatch((0,c.highlightItem)(n,!0)),t&&this.passedElement.triggerEvent(d.EVENTS.highlightItem,{id:n,value:a,label:l,groupValue:u&&u.value?u.value:null}),this},e.prototype.unhighlightItem=function(e){if(!e||!e.id)return this;var t=e.id,n=e.groupId,r=void 0===n?-1:n,i=e.value,o=void 0===i?"":i,a=e.label,s=void 0===a?"":a,l=r>=0?this._store.getGroupById(r):null;return this._store.dispatch((0,c.highlightItem)(t,!1)),this.passedElement.triggerEvent(d.EVENTS.highlightItem,{id:t,value:o,label:s,groupValue:l&&l.value?l.value:null}),this},e.prototype.highlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.highlightItem(t)})),this},e.prototype.unhighlightAll=function(){var e=this;return this._store.items.forEach((function(t){return e.unhighlightItem(t)})),this},e.prototype.removeActiveItemsByValue=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.value===e})).forEach((function(e){return t._removeItem(e)})),this},e.prototype.removeActiveItems=function(e){var t=this;return this._store.activeItems.filter((function(t){return t.id!==e})).forEach((function(e){return t._removeItem(e)})),this},e.prototype.removeHighlightedItems=function(e){var t=this;return void 0===e&&(e=!1),this._store.highlightedActiveItems.forEach((function(n){t._removeItem(n),e&&t._triggerChange(n.value)})),this},e.prototype.showDropdown=function(e){var t=this;return this.dropdown.isActive||requestAnimationFrame((function(){t.dropdown.show(),t.containerOuter.open(t.dropdown.distanceFromTopWindow),!e&&t._canSearch&&t.input.focus(),t.passedElement.triggerEvent(d.EVENTS.showDropdown,{})})),this},e.prototype.hideDropdown=function(e){var t=this;return this.dropdown.isActive?(requestAnimationFrame((function(){t.dropdown.hide(),t.containerOuter.close(),!e&&t._canSearch&&(t.input.removeActiveDescendant(),t.input.blur()),t.passedElement.triggerEvent(d.EVENTS.hideDropdown,{})})),this):this},e.prototype.getValue=function(e){void 0===e&&(e=!1);var t=this._store.activeItems.reduce((function(t,n){var r=e?n.value:n;return t.push(r),t}),[]);return this._isSelectOneElement?t[0]:t},e.prototype.setValue=function(e){var t=this;return this.initialised?(e.forEach((function(e){return t._setChoiceOrItem(e)})),this):this},e.prototype.setChoiceByValue=function(e){var t=this;return!this.initialised||this._isTextElement||(Array.isArray(e)?e:[e]).forEach((function(e){return t._findAndSelectChoiceByValue(e)})),this},e.prototype.setChoices=function(e,t,n,r){var i=this;if(void 0===e&&(e=[]),void 0===t&&(t="value"),void 0===n&&(n="label"),void 0===r&&(r=!1),!this.initialised)throw new ReferenceError("setChoices was called on a non-initialized instance of Choices");if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if("string"!=typeof t||!t)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if(r&&this.clearChoices(),"function"==typeof e){var o=e(this);if("function"==typeof Promise&&o instanceof Promise)return new Promise((function(e){return requestAnimationFrame(e)})).then((function(){return i._handleLoadingState(!0)})).then((function(){return o})).then((function(e){return i.setChoices(e,t,n,r)})).catch((function(e){i.config.silent||console.error(e)})).then((function(){return i._handleLoadingState(!1)})).then((function(){return i}));if(!Array.isArray(o))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof o));return this.setChoices(o,t,n,!1)}if(!Array.isArray(e))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._startLoading(),e.forEach((function(e){if(e.choices)i._addGroup({id:e.id?parseInt("".concat(e.id),10):null,group:e,valueKey:t,labelKey:n});else{var r=e;i._addChoice({value:r[t],label:r[n],isSelected:!!r.selected,isDisabled:!!r.disabled,placeholder:!!r.placeholder,customProperties:r.customProperties})}})),this._stopLoading(),this},e.prototype.clearChoices=function(){return this._store.dispatch((0,s.clearChoices)()),this},e.prototype.clearStore=function(){return this._store.dispatch((0,u.clearAll)()),this},e.prototype.clearInput=function(){var e=!this._isSelectOneElement;return this.input.clear(e),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch((0,s.activateChoices)(!0))),this},e.prototype._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var e=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,t=this._isSelectElement,n=this._currentState.items!==this._prevState.items;e&&(t&&this._renderChoices(),n&&this._renderItems(),this._prevState=this._currentState)}},e.prototype._renderChoices=function(){var e=this,t=this._store,n=t.activeGroups,r=t.activeChoices,i=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&requestAnimationFrame((function(){return e.choiceList.scrollToTop()})),n.length>=1&&!this._isSearching){var o=r.filter((function(e){return!0===e.placeholder&&-1===e.groupId}));o.length>=1&&(i=this._createChoicesFragment(o,i)),i=this._createGroupsFragment(n,r,i)}else r.length>=1&&(i=this._createChoicesFragment(r,i));if(i.childNodes&&i.childNodes.length>0){var a=this._store.activeItems,s=this._canAddItem(a,this.input.value);if(s.response)this.choiceList.append(i),this._highlightChoice();else{var l=this._getTemplate("notice",s.notice);this.choiceList.append(l)}}else{var c=void 0;l=void 0,this._isSearching?(l="function"==typeof this.config.noResultsText?this.config.noResultsText():this.config.noResultsText,c=this._getTemplate("notice",l,"no-results")):(l="function"==typeof this.config.noChoicesText?this.config.noChoicesText():this.config.noChoicesText,c=this._getTemplate("notice",l,"no-choices")),this.choiceList.append(c)}},e.prototype._renderItems=function(){var e=this._store.activeItems||[];this.itemList.clear();var t=this._createItemsFragment(e);t.childNodes&&this.itemList.append(t)},e.prototype._createGroupsFragment=function(e,t,n){var r=this;return void 0===n&&(n=document.createDocumentFragment()),this.config.shouldSort&&e.sort(this.config.sorter),e.forEach((function(e){var i=function(e){return t.filter((function(t){return r._isSelectOneElement?t.groupId===e.id:t.groupId===e.id&&("always"===r.config.renderSelectedChoices||!t.selected)}))}(e);if(i.length>=1){var o=r._getTemplate("choiceGroup",e);n.appendChild(o),r._createChoicesFragment(i,n,!0)}})),n},e.prototype._createChoicesFragment=function(e,t,n){var i=this;void 0===t&&(t=document.createDocumentFragment()),void 0===n&&(n=!1);var o=this.config,a=o.renderSelectedChoices,s=o.searchResultLimit,l=o.renderChoiceLimit,c=this._isSearching?p.sortByScore:this.config.sorter,u=function(e){if("auto"!==a||i._isSelectOneElement||!e.selected){var n=i._getTemplate("choice",e,i.config.itemSelectText);t.appendChild(n)}},h=e;"auto"!==a||this._isSelectOneElement||(h=e.filter((function(e){return!e.selected})));var d=h.reduce((function(e,t){return t.placeholder?e.placeholderChoices.push(t):e.normalChoices.push(t),e}),{placeholderChoices:[],normalChoices:[]}),f=d.placeholderChoices,g=d.normalChoices;(this.config.shouldSort||this._isSearching)&&g.sort(c);var m=h.length,v=this._isSelectOneElement?r(r([],f,!0),g,!0):g;this._isSearching?m=s:l&&l>0&&!n&&(m=l);for(var y=0;y<m;y+=1)v[y]&&u(v[y]);return t},e.prototype._createItemsFragment=function(e,t){var n=this;void 0===t&&(t=document.createDocumentFragment());var r=this.config,i=r.shouldSortItems,o=r.sorter,a=r.removeItemButton;return i&&!this._isSelectOneElement&&e.sort(o),this._isTextElement?this.passedElement.value=e.map((function(e){return e.value})).join(this.config.delimiter):this.passedElement.options=e,e.forEach((function(e){var r=n._getTemplate("item",e,a);t.appendChild(r)})),t},e.prototype._triggerChange=function(e){null!=e&&this.passedElement.triggerEvent(d.EVENTS.change,{value:e})},e.prototype._selectPlaceholderChoice=function(e){this._addItem({value:e.value,label:e.label,choiceId:e.id,groupId:e.groupId,placeholder:e.placeholder}),this._triggerChange(e.value)},e.prototype._handleButtonAction=function(e,t){if(e&&t&&this.config.removeItems&&this.config.removeItemButton){var n=t.parentNode&&t.parentNode.dataset.id,r=n&&e.find((function(e){return e.id===parseInt(n,10)}));r&&(this._removeItem(r),this._triggerChange(r.value),this._isSelectOneElement&&this._store.placeholderChoice&&this._selectPlaceholderChoice(this._store.placeholderChoice))}},e.prototype._handleItemAction=function(e,t,n){var r=this;if(void 0===n&&(n=!1),e&&t&&this.config.removeItems&&!this._isSelectOneElement){var i=t.dataset.id;e.forEach((function(e){e.id!==parseInt("".concat(i),10)||e.highlighted?!n&&e.highlighted&&r.unhighlightItem(e):r.highlightItem(e)})),this.input.focus()}},e.prototype._handleChoiceAction=function(e,t){if(e&&t){var n=t.dataset.id,r=n&&this._store.getChoiceById(n);if(r){var i=e[0]&&e[0].keyCode?e[0].keyCode:void 0,o=this.dropdown.isActive;r.keyCode=i,this.passedElement.triggerEvent(d.EVENTS.choice,{choice:r}),r.selected||r.disabled||this._canAddItem(e,r.value).response&&(this._addItem({value:r.value,label:r.label,choiceId:r.id,groupId:r.groupId,customProperties:r.customProperties,placeholder:r.placeholder,keyCode:r.keyCode}),this._triggerChange(r.value)),this.clearInput(),o&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},e.prototype._handleBackspace=function(e){if(this.config.removeItems&&e){var t=e[e.length-1],n=e.some((function(e){return e.highlighted}));this.config.editItems&&!n&&t?(this.input.value=t.value,this.input.setWidth(),this._removeItem(t),this._triggerChange(t.value)):(n||this.highlightItem(t,!1),this.removeHighlightedItems(!0))}},e.prototype._startLoading=function(){this._store.dispatch((0,u.setIsLoading)(!0))},e.prototype._stopLoading=function(){this._store.dispatch((0,u.setIsLoading)(!1))},e.prototype._handleLoadingState=function(e){void 0===e&&(e=!0);var t=this.itemList.getChild(".".concat(this.config.classNames.placeholder));e?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?t?t.innerHTML=this.config.loadingText:(t=this._getTemplate("placeholder",this.config.loadingText))&&this.itemList.append(t):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?t&&(t.innerHTML=this._placeholderValue||""):this.input.placeholder=this._placeholderValue||"")},e.prototype._handleSearch=function(e){if(e&&this.input.isFocussed){var t=this._store.choices,n=this.config,r=n.searchFloor,i=n.searchChoices,o=t.some((function(e){return!e.active}));if(e&&e.length>=r){var a=i?this._searchChoices(e):0;this.passedElement.triggerEvent(d.EVENTS.search,{value:e,resultCount:a})}else o&&(this._isSearching=!1,this._store.dispatch((0,s.activateChoices)(!0)))}},e.prototype._canAddItem=function(e,t){var n=!0,r="function"==typeof this.config.addItemText?this.config.addItemText(t):this.config.addItemText;if(!this._isSelectOneElement){var i=(0,p.existsInArray)(e,t);this.config.maxItemCount>0&&this.config.maxItemCount<=e.length&&(n=!1,r="function"==typeof this.config.maxItemText?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&i&&n&&(n=!1,r="function"==typeof this.config.uniqueItemText?this.config.uniqueItemText(t):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&n&&"function"==typeof this.config.addItemFilter&&!this.config.addItemFilter(t)&&(n=!1,r="function"==typeof this.config.customAddItemText?this.config.customAddItemText(t):this.config.customAddItemText)}return{response:n,notice:r}},e.prototype._searchChoices=function(e){var t="string"==typeof e?e.trim():e,n="string"==typeof this._currentValue?this._currentValue.trim():this._currentValue;if(t.length<1&&t==="".concat(n," "))return 0;var i=this._store.searchableChoices,o=t,l=r([],this.config.searchFields,!0),c=Object.assign(this.config.fuseOptions,{keys:l,includeMatches:!0}),u=new a.default(i,c).search(o);return this._currentValue=t,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch((0,s.filterChoices)(u)),u.length},e.prototype._addEventListeners=function(){var e=document.documentElement;e.addEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.addEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("click",this._onClick,{passive:!0}),e.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener("focus",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener("blur",this._onBlur,{passive:!0})),this.input.element.addEventListener("keyup",this._onKeyUp,{passive:!0}),this.input.element.addEventListener("focus",this._onFocus,{passive:!0}),this.input.element.addEventListener("blur",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener("reset",this._onFormReset,{passive:!0}),this.input.addEventListeners()},e.prototype._removeEventListeners=function(){var e=document.documentElement;e.removeEventListener("touchend",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener("keydown",this._onKeyDown,!0),this.containerOuter.element.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("click",this._onClick),e.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener("focus",this._onFocus),this.containerOuter.element.removeEventListener("blur",this._onBlur)),this.input.element.removeEventListener("keyup",this._onKeyUp),this.input.element.removeEventListener("focus",this._onFocus),this.input.element.removeEventListener("blur",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener("reset",this._onFormReset),this.input.removeEventListeners()},e.prototype._onKeyDown=function(e){var t=e.keyCode,n=this._store.activeItems,r=this.input.isFocussed,i=this.dropdown.isActive,o=this.itemList.hasChildren(),a=String.fromCharCode(t),s=/[a-zA-Z0-9-_ ]/.test(a),l=d.KEY_CODES.BACK_KEY,c=d.KEY_CODES.DELETE_KEY,u=d.KEY_CODES.ENTER_KEY,h=d.KEY_CODES.A_KEY,f=d.KEY_CODES.ESC_KEY,p=d.KEY_CODES.UP_KEY,g=d.KEY_CODES.DOWN_KEY,m=d.KEY_CODES.PAGE_UP_KEY,v=d.KEY_CODES.PAGE_DOWN_KEY;switch(this._isTextElement||i||!s||(this.showDropdown(),this.input.isFocussed||(this.input.value+=a.toLowerCase())),t){case h:return this._onSelectKey(e,o);case u:return this._onEnterKey(e,n,i);case f:return this._onEscapeKey(i);case p:case m:case g:case v:return this._onDirectionKey(e,i);case c:case l:return this._onDeleteKey(e,n,r)}},e.prototype._onKeyUp=function(e){var t=e.target,n=e.keyCode,r=this.input.value,i=this._store.activeItems,o=this._canAddItem(i,r),a=d.KEY_CODES.BACK_KEY,l=d.KEY_CODES.DELETE_KEY;if(this._isTextElement)if(o.notice&&r){var c=this._getTemplate("notice",o.notice);this.dropdown.element.innerHTML=c.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0);else{var u=(n===a||n===l)&&t&&!t.value,h=!this._isTextElement&&this._isSearching,f=this._canSearch&&o.response;u&&h?(this._isSearching=!1,this._store.dispatch((0,s.activateChoices)(!0))):f&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},e.prototype._onSelectKey=function(e,t){var n=e.ctrlKey,r=e.metaKey;(n||r)&&t&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},e.prototype._onEnterKey=function(e,t,n){var r=e.target,i=d.KEY_CODES.ENTER_KEY,o=r&&r.hasAttribute("data-button");if(this._isTextElement&&r&&r.value){var a=this.input.value;this._canAddItem(t,a).response&&(this.hideDropdown(!0),this._addItem({value:a}),this._triggerChange(a),this.clearInput())}if(o&&(this._handleButtonAction(t,r),e.preventDefault()),n){var s=this.dropdown.getChild(".".concat(this.config.classNames.highlightedState));s&&(t[0]&&(t[0].keyCode=i),this._handleChoiceAction(t,s)),e.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),e.preventDefault())},e.prototype._onEscapeKey=function(e){e&&(this.hideDropdown(!0),this.containerOuter.focus())},e.prototype._onDirectionKey=function(e,t){var n=e.keyCode,r=e.metaKey,i=d.KEY_CODES.DOWN_KEY,o=d.KEY_CODES.PAGE_UP_KEY,a=d.KEY_CODES.PAGE_DOWN_KEY;if(t||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var s=n===i||n===a?1:-1,l="[data-choice-selectable]",c=void 0;if(r||n===a||n===o)c=s>0?this.dropdown.element.querySelector("".concat(l,":last-of-type")):this.dropdown.element.querySelector(l);else{var u=this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState));c=u?(0,p.getAdjacentEl)(u,l,s):this.dropdown.element.querySelector(l)}c&&((0,p.isScrolledIntoView)(c,this.choiceList.element,s)||this.choiceList.scrollToChildElement(c,s),this._highlightChoice(c)),e.preventDefault()}},e.prototype._onDeleteKey=function(e,t,n){var r=e.target;this._isSelectOneElement||r.value||!n||(this._handleBackspace(t),e.preventDefault())},e.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},e.prototype._onTouchEnd=function(e){var t=(e||e.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(t)&&((t===this.containerOuter.element||t===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),e.stopPropagation()),this._wasTap=!0},e.prototype._onMouseDown=function(e){var t=e.target;if(t instanceof HTMLElement){if(y&&this.choiceList.element.contains(t)){var n=this.choiceList.element.firstElementChild,r="ltr"===this._direction?e.offsetX>=n.offsetWidth:e.offsetX<n.offsetLeft;this._isScrollingOnIe=r}if(t!==this.input.element){var i=t.closest("[data-button],[data-item],[data-choice]");if(i instanceof HTMLElement){var o=e.shiftKey,a=this._store.activeItems,s=i.dataset;"button"in s?this._handleButtonAction(a,i):"item"in s?this._handleItemAction(a,i,o):"choice"in s&&this._handleChoiceAction(a,i)}e.preventDefault()}}},e.prototype._onMouseOver=function(e){var t=e.target;t instanceof HTMLElement&&"choice"in t.dataset&&this._highlightChoice(t)},e.prototype._onClick=function(e){var t=e.target;this.containerOuter.element.contains(t)?this.dropdown.isActive||this.containerOuter.isDisabled?this._isSelectOneElement&&t!==this.input.element&&!this.dropdown.element.contains(t)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):(this._store.highlightedActiveItems.length>0&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0))},e.prototype._onFocus=function(e){var t,n=this,r=e.target;r&&this.containerOuter.element.contains(r)&&((t={})[d.TEXT_TYPE]=function(){r===n.input.element&&n.containerOuter.addFocusState()},t[d.SELECT_ONE_TYPE]=function(){n.containerOuter.addFocusState(),r===n.input.element&&n.showDropdown(!0)},t[d.SELECT_MULTIPLE_TYPE]=function(){r===n.input.element&&(n.showDropdown(!0),n.containerOuter.addFocusState())},t)[this.passedElement.element.type]()},e.prototype._onBlur=function(e){var t,n=this,r=e.target;if(r&&this.containerOuter.element.contains(r)&&!this._isScrollingOnIe){var i=this._store.activeItems.some((function(e){return e.highlighted}));((t={})[d.TEXT_TYPE]=function(){r===n.input.element&&(n.containerOuter.removeFocusState(),i&&n.unhighlightAll(),n.hideDropdown(!0))},t[d.SELECT_ONE_TYPE]=function(){n.containerOuter.removeFocusState(),(r===n.input.element||r===n.containerOuter.element&&!n._canSearch)&&n.hideDropdown(!0)},t[d.SELECT_MULTIPLE_TYPE]=function(){r===n.input.element&&(n.containerOuter.removeFocusState(),n.hideDropdown(!0),i&&n.unhighlightAll())},t)[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},e.prototype._onFormReset=function(){this._store.dispatch((0,u.resetTo)(this._initialState))},e.prototype._highlightChoice=function(e){var t=this;void 0===e&&(e=null);var n=Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]"));if(n.length){var r=e;Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState))).forEach((function(e){e.classList.remove(t.config.classNames.highlightedState),e.setAttribute("aria-selected","false")})),r?this._highlightPosition=n.indexOf(r):(r=n.length>this._highlightPosition?n[this._highlightPosition]:n[n.length-1])||(r=n[0]),r.classList.add(this.config.classNames.highlightedState),r.setAttribute("aria-selected","true"),this.passedElement.triggerEvent(d.EVENTS.highlightChoice,{el:r}),this.dropdown.isActive&&(this.input.setActiveDescendant(r.id),this.containerOuter.setActiveDescendant(r.id))}},e.prototype._addItem=function(e){var t=e.value,n=e.label,r=void 0===n?null:n,i=e.choiceId,o=void 0===i?-1:i,a=e.groupId,s=void 0===a?-1:a,l=e.customProperties,u=void 0===l?{}:l,h=e.placeholder,f=void 0!==h&&h,p=e.keyCode,g=void 0===p?-1:p,m="string"==typeof t?t.trim():t,v=this._store.items,y=r||m,b=o||-1,_=s>=0?this._store.getGroupById(s):null,x=v?v.length+1:1;this.config.prependValue&&(m=this.config.prependValue+m.toString()),this.config.appendValue&&(m+=this.config.appendValue.toString()),this._store.dispatch((0,c.addItem)({value:m,label:y,id:x,choiceId:b,groupId:s,customProperties:u,placeholder:f,keyCode:g})),this._isSelectOneElement&&this.removeActiveItems(x),this.passedElement.triggerEvent(d.EVENTS.addItem,{id:x,value:m,label:y,customProperties:u,groupValue:_&&_.value?_.value:null,keyCode:g})},e.prototype._removeItem=function(e){var t=e.id,n=e.value,r=e.label,i=e.customProperties,o=e.choiceId,a=e.groupId,s=a&&a>=0?this._store.getGroupById(a):null;t&&o&&(this._store.dispatch((0,c.removeItem)(t,o)),this.passedElement.triggerEvent(d.EVENTS.removeItem,{id:t,value:n,label:r,customProperties:i,groupValue:s&&s.value?s.value:null}))},e.prototype._addChoice=function(e){var t=e.value,n=e.label,r=void 0===n?null:n,i=e.isSelected,o=void 0!==i&&i,a=e.isDisabled,l=void 0!==a&&a,c=e.groupId,u=void 0===c?-1:c,h=e.customProperties,d=void 0===h?{}:h,f=e.placeholder,p=void 0!==f&&f,g=e.keyCode,m=void 0===g?-1:g;if(null!=t){var v=this._store.choices,y=r||t,b=v?v.length+1:1,_="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(b);this._store.dispatch((0,s.addChoice)({id:b,groupId:u,elementId:_,value:t,label:y,disabled:l,customProperties:d,placeholder:p,keyCode:m})),o&&this._addItem({value:t,label:y,choiceId:b,customProperties:d,placeholder:p,keyCode:m})}},e.prototype._addGroup=function(e){var t=this,n=e.group,r=e.id,i=e.valueKey,o=void 0===i?"value":i,a=e.labelKey,s=void 0===a?"label":a,c=(0,p.isType)("Object",n)?n.choices:Array.from(n.getElementsByTagName("OPTION")),u=r||Math.floor((new Date).valueOf()*Math.random()),h=!!n.disabled&&n.disabled;c?(this._store.dispatch((0,l.addGroup)({value:n.label,id:u,active:!0,disabled:h})),c.forEach((function(e){var n=e.disabled||e.parentNode&&e.parentNode.disabled;t._addChoice({value:e[o],label:(0,p.isType)("Object",e)?e[s]:e.innerHTML,isSelected:e.selected,isDisabled:n,groupId:u,customProperties:e.customProperties,placeholder:e.placeholder})}))):this._store.dispatch((0,l.addGroup)({value:n.label,id:n.id,active:!1,disabled:n.disabled}))},e.prototype._getTemplate=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.config.classNames;return(t=this._templates[e]).call.apply(t,r([this,o],n,!1))},e.prototype._createTemplates=function(){var e=this.config.callbackOnCreateTemplates,t={};e&&"function"==typeof e&&(t=e.call(this,p.strToEl)),this._templates=(0,o.default)(v.default,t)},e.prototype._createElements=function(){this.containerOuter=new h.Container({element:this._getTemplate("containerOuter",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new h.Container({element:this._getTemplate("containerInner"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new h.Input({element:this._getTemplate("input",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new h.List({element:this._getTemplate("choiceList",this._isSelectOneElement)}),this.itemList=new h.List({element:this._getTemplate("itemList",this._isSelectOneElement)}),this.dropdown=new h.Dropdown({element:this._getTemplate("dropdown"),classNames:this.config.classNames,type:this.passedElement.element.type})},e.prototype._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||"":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this._isTextElement&&this._addPredefinedItems(this._presetItems)},e.prototype._addPredefinedGroups=function(e){var t=this,n=this.passedElement.placeholderOption;n&&n.parentNode&&"SELECT"===n.parentNode.tagName&&this._addChoice({value:n.value,label:n.innerHTML,isSelected:n.selected,isDisabled:n.disabled,placeholder:!0}),e.forEach((function(e){return t._addGroup({group:e,id:e.id||null})}))},e.prototype._addPredefinedChoices=function(e){var t=this;this.config.shouldSort&&e.sort(this.config.sorter);var n=e.some((function(e){return e.selected})),r=e.findIndex((function(e){return void 0===e.disabled||!e.disabled}));e.forEach((function(e,i){var o=e.value,a=void 0===o?"":o,s=e.label,l=e.customProperties,c=e.placeholder;if(t._isSelectElement)if(e.choices)t._addGroup({group:e,id:e.id||null});else{var u=!(!t._isSelectOneElement||n||i!==r)||e.selected,h=e.disabled;t._addChoice({value:a,label:s,isSelected:!!u,isDisabled:!!h,placeholder:!!c,customProperties:l})}else t._addChoice({value:a,label:s,isSelected:!!e.selected,isDisabled:!!e.disabled,placeholder:!!e.placeholder,customProperties:l})}))},e.prototype._addPredefinedItems=function(e){var t=this;e.forEach((function(e){"object"==typeof e&&e.value&&t._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}),"string"==typeof e&&t._addItem({value:e})}))},e.prototype._setChoiceOrItem=function(e){var t=this;({object:function(){e.value&&(t._isTextElement?t._addItem({value:e.value,label:e.label,choiceId:e.id,customProperties:e.customProperties,placeholder:e.placeholder}):t._addChoice({value:e.value,label:e.label,isSelected:!0,isDisabled:!1,customProperties:e.customProperties,placeholder:e.placeholder}))},string:function(){t._isTextElement?t._addItem({value:e}):t._addChoice({value:e,label:e,isSelected:!0,isDisabled:!1})}})[(0,p.getType)(e).toLowerCase()]()},e.prototype._findAndSelectChoiceByValue=function(e){var t=this,n=this._store.choices.find((function(n){return t.config.valueComparer(n.value,e)}));n&&!n.selected&&this._addItem({value:n.value,label:n.label,choiceId:n.id,groupId:n.groupId,customProperties:n.customProperties,placeholder:n.placeholder,keyCode:n.keyCode})},e.prototype._generatePlaceholderValue=function(){if(this._isSelectElement&&this.passedElement.placeholderOption){var e=this.passedElement.placeholderOption;return e?e.text:null}var t=this.config,n=t.placeholder,r=t.placeholderValue,i=this.passedElement.element.dataset;if(n){if(r)return r;if(i.placeholder)return i.placeholder}return null},e}();t.default=_},613:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(799),i=n(883),o=function(){function e(e){var t=e.element,n=e.type,r=e.classNames,i=e.position;this.element=t,this.classNames=r,this.type=n,this.position=i,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return e.prototype.addEventListeners=function(){this.element.addEventListener("focus",this._onFocus),this.element.addEventListener("blur",this._onBlur)},e.prototype.removeEventListeners=function(){this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.shouldFlip=function(e){if("number"!=typeof e)return!1;var t=!1;return"auto"===this.position?t=!window.matchMedia("(min-height: ".concat(e+1,"px)")).matches:"top"===this.position&&(t=!0),t},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype.open=function(e){this.element.classList.add(this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(e)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},e.prototype.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},e.prototype.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},e.prototype.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===i.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},e.prototype.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===i.SELECT_ONE_TYPE&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},e.prototype.wrap=function(e){(0,r.wrap)(e,this.element)},e.prototype.unwrap=function(e){this.element.parentNode&&(this.element.parentNode.insertBefore(e,this.element),this.element.parentNode.removeChild(this.element))},e.prototype.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},e.prototype.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=o},217:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){var t=e.element,n=e.type,r=e.classNames;this.element=t,this.classNames=r,this.type=n,this.isActive=!1}return Object.defineProperty(e.prototype,"distanceFromTopWindow",{get:function(){return this.element.getBoundingClientRect().bottom},enumerable:!1,configurable:!0}),e.prototype.getChild=function(e){return this.element.querySelector(e)},e.prototype.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},e.prototype.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},e}();t.default=n},520:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedSelect=t.WrappedInput=t.List=t.Input=t.Container=t.Dropdown=void 0;var i=r(n(217));t.Dropdown=i.default;var o=r(n(613));t.Container=o.default;var a=r(n(11));t.Input=a.default;var s=r(n(624));t.List=s.default;var l=r(n(541));t.WrappedInput=l.default;var c=r(n(982));t.WrappedSelect=c.default},11:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(799),i=n(883),o=function(){function e(e){var t=e.element,n=e.type,r=e.classNames,i=e.preventPaste;this.element=t,this.type=n,this.classNames=r,this.preventPaste=i,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=t.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(e.prototype,"placeholder",{set:function(e){this.element.placeholder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return(0,r.sanitise)(this.element.value)},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.addEventListeners=function(){this.element.addEventListener("paste",this._onPaste),this.element.addEventListener("input",this._onInput,{passive:!0}),this.element.addEventListener("focus",this._onFocus,{passive:!0}),this.element.addEventListener("blur",this._onBlur,{passive:!0})},e.prototype.removeEventListeners=function(){this.element.removeEventListener("input",this._onInput),this.element.removeEventListener("paste",this._onPaste),this.element.removeEventListener("focus",this._onFocus),this.element.removeEventListener("blur",this._onBlur)},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},e.prototype.focus=function(){this.isFocussed||this.element.focus()},e.prototype.blur=function(){this.isFocussed&&this.element.blur()},e.prototype.clear=function(e){return void 0===e&&(e=!0),this.element.value&&(this.element.value=""),e&&this.setWidth(),this},e.prototype.setWidth=function(){var e=this.element,t=e.style,n=e.value,r=e.placeholder;t.minWidth="".concat(r.length+1,"ch"),t.width="".concat(n.length+1,"ch")},e.prototype.setActiveDescendant=function(e){this.element.setAttribute("aria-activedescendant",e)},e.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},e.prototype._onInput=function(){this.type!==i.SELECT_ONE_TYPE&&this.setWidth()},e.prototype._onPaste=function(e){this.preventPaste&&e.preventDefault()},e.prototype._onFocus=function(){this.isFocussed=!0},e.prototype._onBlur=function(){this.isFocussed=!1},e}();t.default=o},624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(883),i=function(){function e(e){var t=e.element;this.element=t,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return e.prototype.clear=function(){this.element.innerHTML=""},e.prototype.append=function(e){this.element.appendChild(e)},e.prototype.getChild=function(e){return this.element.querySelector(e)},e.prototype.hasChildren=function(){return this.element.hasChildNodes()},e.prototype.scrollToTop=function(){this.element.scrollTop=0},e.prototype.scrollToChildElement=function(e,t){var n=this;if(e){var r=this.element.offsetHeight,i=this.element.scrollTop+r,o=e.offsetHeight,a=e.offsetTop+o,s=t>0?this.element.scrollTop+a-i:e.offsetTop;requestAnimationFrame((function(){n._animateScroll(s,t)}))}},e.prototype._scrollDown=function(e,t,n){var r=(n-e)/t,i=r>1?r:1;this.element.scrollTop=e+i},e.prototype._scrollUp=function(e,t,n){var r=(e-n)/t,i=r>1?r:1;this.element.scrollTop=e-i},e.prototype._animateScroll=function(e,t){var n=this,i=r.SCROLLING_SPEED,o=this.element.scrollTop,a=!1;t>0?(this._scrollDown(o,i,e),o<e&&(a=!0)):(this._scrollUp(o,i,e),o>e&&(a=!0)),a&&requestAnimationFrame((function(){n._animateScroll(e,t)}))},e}();t.default=i},730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(799),i=function(){function e(e){var t=e.element,n=e.classNames;if(this.element=t,this.classNames=n,!(t instanceof HTMLInputElement||t instanceof HTMLSelectElement))throw new TypeError("Invalid element passed");this.isDisabled=!1}return Object.defineProperty(e.prototype,"isActive",{get:function(){return"active"===this.element.dataset.choice},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.value=e},enumerable:!1,configurable:!0}),e.prototype.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var e=this.element.getAttribute("style");e&&this.element.setAttribute("data-choice-orig-style",e),this.element.setAttribute("data-choice","active")},e.prototype.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute("tabindex");var e=this.element.getAttribute("data-choice-orig-style");e?(this.element.removeAttribute("data-choice-orig-style"),this.element.setAttribute("style",e)):this.element.removeAttribute("style"),this.element.removeAttribute("data-choice"),this.element.value=this.element.value},e.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},e.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0},e.prototype.triggerEvent=function(e,t){(0,r.dispatchEvent)(this.element,e,t)},e}();t.default=i},541:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=t.element,r=t.classNames,i=t.delimiter,o=e.call(this,{element:n,classNames:r})||this;return o.delimiter=i,o}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(e){this.element.setAttribute("value",e),this.element.value=e},enumerable:!1,configurable:!0}),t}(o(n(730)).default);t.default=a},982:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=t.element,r=t.classNames,i=t.template,o=e.call(this,{element:n,classNames:r})||this;return o.template=i,o}return i(t,e),Object.defineProperty(t.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optionGroups",{get:function(){return Array.from(this.element.getElementsByTagName("OPTGROUP"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return Array.from(this.element.options)},set:function(e){var t=this,n=document.createDocumentFragment();e.forEach((function(e){return r=e,i=t.template(r),void n.appendChild(i);var r,i})),this.appendDocFragment(n)},enumerable:!1,configurable:!0}),t.prototype.appendDocFragment=function(e){this.element.innerHTML="",this.element.appendChild(e)},t}(o(n(730)).default);t.default=a},883:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCROLLING_SPEED=t.SELECT_MULTIPLE_TYPE=t.SELECT_ONE_TYPE=t.TEXT_TYPE=t.KEY_CODES=t.ACTION_TYPES=t.EVENTS=void 0,t.EVENTS={showDropdown:"showDropdown",hideDropdown:"hideDropdown",change:"change",choice:"choice",search:"search",addItem:"addItem",removeItem:"removeItem",highlightItem:"highlightItem",highlightChoice:"highlightChoice",unhighlightItem:"unhighlightItem"},t.ACTION_TYPES={ADD_CHOICE:"ADD_CHOICE",FILTER_CHOICES:"FILTER_CHOICES",ACTIVATE_CHOICES:"ACTIVATE_CHOICES",CLEAR_CHOICES:"CLEAR_CHOICES",ADD_GROUP:"ADD_GROUP",ADD_ITEM:"ADD_ITEM",REMOVE_ITEM:"REMOVE_ITEM",HIGHLIGHT_ITEM:"HIGHLIGHT_ITEM",CLEAR_ALL:"CLEAR_ALL",RESET_TO:"RESET_TO",SET_IS_LOADING:"SET_IS_LOADING"},t.KEY_CODES={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},t.TEXT_TYPE="text",t.SELECT_ONE_TYPE="select-one",t.SELECT_MULTIPLE_TYPE="select-multiple",t.SCROLLING_SPEED=4},789:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIG=t.DEFAULT_CLASSNAMES=void 0;var r=n(799);t.DEFAULT_CLASSNAMES={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"},t.DEFAULT_CONFIG={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:r.sortByAlpha,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(e){return'Press Enter to add <b>"'.concat((0,r.sanitise)(e),'"</b>')},maxItemText:function(e){return"Only ".concat(e," values can be added")},valueComparer:function(e,t){return e===t},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:t.DEFAULT_CLASSNAMES}},799:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.diff=t.cloneObject=t.existsInArray=t.dispatchEvent=t.sortByScore=t.sortByAlpha=t.strToEl=t.sanitise=t.isScrolledIntoView=t.getAdjacentEl=t.wrap=t.isType=t.getType=t.generateId=t.generateChars=t.getRandomNumber=void 0,t.getRandomNumber=function(e,t){return Math.floor(Math.random()*(t-e)+e)},t.generateChars=function(e){return Array.from({length:e},(function(){return(0,t.getRandomNumber)(0,36).toString(36)})).join("")},t.generateId=function(e,n){var r=e.id||e.name&&"".concat(e.name,"-").concat((0,t.generateChars)(2))||(0,t.generateChars)(4);return r=r.replace(/(:|\.|\[|\]|,)/g,""),"".concat(n,"-").concat(r)},t.getType=function(e){return Object.prototype.toString.call(e).slice(8,-1)},t.isType=function(e,n){return null!=n&&(0,t.getType)(n)===e},t.wrap=function(e,t){return void 0===t&&(t=document.createElement("div")),e.parentNode&&(e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t)),t.appendChild(e)},t.getAdjacentEl=function(e,t,n){void 0===n&&(n=1);for(var r="".concat(n>0?"next":"previous","ElementSibling"),i=e[r];i;){if(i.matches(t))return i;i=i[r]}return i},t.isScrolledIntoView=function(e,t,n){return void 0===n&&(n=1),!!e&&(n>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop)},t.sanitise=function(e){return"string"!=typeof e?e:e.replace(/&/g,"&amp;").replace(/>/g,"&rt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},t.strToEl=(n=document.createElement("div"),function(e){var t=e.trim();n.innerHTML=t;for(var r=n.children[0];n.firstChild;)n.removeChild(n.firstChild);return r}),t.sortByAlpha=function(e,t){var n=e.value,r=e.label,i=void 0===r?n:r,o=t.value,a=t.label,s=void 0===a?o:a;return i.localeCompare(s,[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},t.sortByScore=function(e,t){var n=e.score,r=void 0===n?0:n,i=t.score;return r-(void 0===i?0:i)},t.dispatchEvent=function(e,t,n){void 0===n&&(n=null);var r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0});return e.dispatchEvent(r)},t.existsInArray=function(e,t,n){return void 0===n&&(n="value"),e.some((function(e){return"string"==typeof t?e[n]===t.trim():e[n]===t}))},t.cloneObject=function(e){return JSON.parse(JSON.stringify(e))},t.diff=function(e,t){var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.filter((function(e){return r.indexOf(e)<0}))}},273:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,r){switch(void 0===e&&(e=t.defaultState),void 0===r&&(r={}),r.type){case"ADD_CHOICE":var i=r,o={id:i.id,elementId:i.elementId,groupId:i.groupId,value:i.value,label:i.label||i.value,disabled:i.disabled||!1,selected:!1,active:!0,score:9999,customProperties:i.customProperties,placeholder:i.placeholder||!1};return n(n([],e,!0),[o],!1);case"ADD_ITEM":var a=r;return a.choiceId>-1?e.map((function(e){var t=e;return t.id===parseInt("".concat(a.choiceId),10)&&(t.selected=!0),t})):e;case"REMOVE_ITEM":var s=r;return s.choiceId&&s.choiceId>-1?e.map((function(e){var t=e;return t.id===parseInt("".concat(s.choiceId),10)&&(t.selected=!1),t})):e;case"FILTER_CHOICES":var l=r;return e.map((function(e){var t=e;return t.active=l.results.some((function(e){var n=e.item,r=e.score;return n.id===t.id&&(t.score=r,!0)})),t}));case"ACTIVATE_CHOICES":var c=r;return e.map((function(e){var t=e;return t.active=c.active,t}));case"CLEAR_CHOICES":return t.defaultState;default:return e}}},871:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,r){switch(void 0===e&&(e=t.defaultState),void 0===r&&(r={}),r.type){case"ADD_GROUP":var i=r;return n(n([],e,!0),[{id:i.id,value:i.value,active:i.active,disabled:i.disabled}],!1);case"CLEAR_CHOICES":return[];default:return e}}},655:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0;var i=n(857),o=r(n(52)),a=r(n(871)),s=r(n(273)),l=r(n(502)),c=n(799);t.defaultState={groups:[],items:[],choices:[],loading:!1};var u=(0,i.combineReducers)({items:o.default,groups:a.default,choices:s.default,loading:l.default});t.default=function(e,n){var r=e;if("CLEAR_ALL"===n.type)r=t.defaultState;else if("RESET_TO"===n.type)return(0,c.cloneObject)(n.state);return u(r,n)}},52:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=[],t.default=function(e,r){switch(void 0===e&&(e=t.defaultState),void 0===r&&(r={}),r.type){case"ADD_ITEM":var i=r;return n(n([],e,!0),[{id:i.id,choiceId:i.choiceId,groupId:i.groupId,value:i.value,label:i.label,active:!0,highlighted:!1,customProperties:i.customProperties,placeholder:i.placeholder||!1,keyCode:null}],!1).map((function(e){var t=e;return t.highlighted=!1,t}));case"REMOVE_ITEM":return e.map((function(e){var t=e;return t.id===r.id&&(t.active=!1),t}));case"HIGHLIGHT_ITEM":var o=r;return e.map((function(e){var t=e;return t.id===o.id&&(t.highlighted=o.highlighted),t}));default:return e}}},502:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultState=void 0,t.defaultState=!1,t.default=function(e,n){return void 0===e&&(e=t.defaultState),void 0===n&&(n={}),"SET_IS_LOADING"===n.type?n.isLoading:e}},744:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(857),a=i(n(655)),s=function(){function e(){this._store=(0,o.createStore)(a.default,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}return e.prototype.subscribe=function(e){this._store.subscribe(e)},e.prototype.dispatch=function(e){this._store.dispatch(e)},Object.defineProperty(e.prototype,"state",{get:function(){return this._store.getState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.state.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeItems",{get:function(){return this.items.filter((function(e){return!0===e.active}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"highlightedActiveItems",{get:function(){return this.items.filter((function(e){return e.active&&e.highlighted}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"choices",{get:function(){return this.state.choices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeChoices",{get:function(){return this.choices.filter((function(e){return!0===e.active}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectableChoices",{get:function(){return this.choices.filter((function(e){return!0!==e.disabled}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"searchableChoices",{get:function(){return this.selectableChoices.filter((function(e){return!0!==e.placeholder}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholderChoice",{get:function(){return r([],this.choices,!0).reverse().find((function(e){return!0===e.placeholder}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groups",{get:function(){return this.state.groups},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeGroups",{get:function(){var e=this.groups,t=this.choices;return e.filter((function(e){var n=!0===e.active&&!1===e.disabled,r=t.some((function(e){return!0===e.active&&!1===e.disabled}));return n&&r}),[])},enumerable:!1,configurable:!0}),e.prototype.isLoading=function(){return this.state.loading},e.prototype.getChoiceById=function(e){return this.activeChoices.find((function(t){return t.id===parseInt(e,10)}))},e.prototype.getGroupById=function(e){return this.groups.find((function(t){return t.id===e}))},e}();t.default=s},686:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={containerOuter:function(e,t,n,r,i,o){var a=e.containerOuter,s=Object.assign(document.createElement("div"),{className:a});return s.dataset.type=o,t&&(s.dir=t),r&&(s.tabIndex=0),n&&(s.setAttribute("role",i?"combobox":"listbox"),i&&s.setAttribute("aria-autocomplete","list")),s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-expanded","false"),s},containerInner:function(e){var t=e.containerInner;return Object.assign(document.createElement("div"),{className:t})},itemList:function(e,t){var n=e.list,r=e.listSingle,i=e.listItems;return Object.assign(document.createElement("div"),{className:"".concat(n," ").concat(t?r:i)})},placeholder:function(e,t){var n=e.placeholder;return Object.assign(document.createElement("div"),{className:n,innerHTML:t})},item:function(e,t,n){var r=e.item,i=e.button,o=e.highlightedState,a=e.itemSelectable,s=e.placeholder,l=t.id,c=t.value,u=t.label,h=t.customProperties,d=t.active,f=t.disabled,p=t.highlighted,g=t.placeholder,m=Object.assign(document.createElement("div"),{className:r,innerHTML:u});if(Object.assign(m.dataset,{item:"",id:l,value:c,customProperties:h}),d&&m.setAttribute("aria-selected","true"),f&&m.setAttribute("aria-disabled","true"),g&&m.classList.add(s),m.classList.add(p?o:a),n){f&&m.classList.remove(a),m.dataset.deletable="";var v="Remove item",y=Object.assign(document.createElement("button"),{type:"button",className:i,innerHTML:v});y.setAttribute("aria-label","".concat(v,": '").concat(c,"'")),y.dataset.button="",m.appendChild(y)}return m},choiceList:function(e,t){var n=e.list,r=Object.assign(document.createElement("div"),{className:n});return t||r.setAttribute("aria-multiselectable","true"),r.setAttribute("role","listbox"),r},choiceGroup:function(e,t){var n=e.group,r=e.groupHeading,i=e.itemDisabled,o=t.id,a=t.value,s=t.disabled,l=Object.assign(document.createElement("div"),{className:"".concat(n," ").concat(s?i:"")});return l.setAttribute("role","group"),Object.assign(l.dataset,{group:"",id:o,value:a}),s&&l.setAttribute("aria-disabled","true"),l.appendChild(Object.assign(document.createElement("div"),{className:r,innerHTML:a})),l},choice:function(e,t,n){var r=e.item,i=e.itemChoice,o=e.itemSelectable,a=e.selectedState,s=e.itemDisabled,l=e.placeholder,c=t.id,u=t.value,h=t.label,d=t.groupId,f=t.elementId,p=t.disabled,g=t.selected,m=t.placeholder,v=Object.assign(document.createElement("div"),{id:f,innerHTML:h,className:"".concat(r," ").concat(i)});return g&&v.classList.add(a),m&&v.classList.add(l),v.setAttribute("role",d&&d>0?"treeitem":"option"),Object.assign(v.dataset,{choice:"",id:c,value:u,selectText:n}),p?(v.classList.add(s),v.dataset.choiceDisabled="",v.setAttribute("aria-disabled","true")):(v.classList.add(o),v.dataset.choiceSelectable=""),v},input:function(e,t){var n=e.input,r=e.inputCloned,i=Object.assign(document.createElement("input"),{type:"text",className:"".concat(n," ").concat(r),autocomplete:"off",autocapitalize:"off",spellcheck:!1});return i.setAttribute("role","textbox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-label",t),i},dropdown:function(e){var t=e.list,n=e.listDropdown,r=document.createElement("div");return r.classList.add(t,n),r.setAttribute("aria-expanded","false"),r},notice:function(e,t,n){var r=e.item,i=e.itemChoice,o=e.noResults,a=e.noChoices;void 0===n&&(n="");var s=[r,i];return"no-choices"===n?s.push(a):"no-results"===n&&s.push(o),Object.assign(document.createElement("div"),{innerHTML:t,className:s.join(" ")})},option:function(e){var t=e.label,n=e.value,r=e.customProperties,i=e.active,o=e.disabled,a=new Option(t,n,!1,i);return r&&(a.dataset.customProperties="".concat(r)),a.disabled=!!o,a}};t.default=n},996:function(e){"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=r;var c=Array.isArray(n);return c===Array.isArray(e)?c?l.arrayMerge(e,n,l):function(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=r(e[t],n)})),o(t).forEach((function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))})),i}(e,n,l):r(n,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return s(e,n,t)}),{})};var l=s;e.exports=l},70:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(2),a=n(8),s=n(0),l=function(){function e(t,n){var r=n.location,i=void 0===r?0:r,o=n.distance,s=void 0===o?100:o,l=n.threshold,c=void 0===l?.6:l,u=n.maxPatternLength,h=void 0===u?32:u,d=n.caseSensitive,f=void 0!==d&&d,p=n.tokenSeparator,g=void 0===p?/ +/g:p,m=n.findAllMatches,v=void 0!==m&&m,y=n.minMatchCharLength,b=void 0===y?1:y,_=n.id,x=void 0===_?null:_,w=n.keys,A=void 0===w?[]:w,k=n.shouldSort,T=void 0===k||k,S=n.getFn,E=void 0===S?a:S,C=n.sortFn,M=void 0===C?function(e,t){return e.score-t.score}:C,O=n.tokenize,L=void 0!==O&&O,D=n.matchAllTokens,I=void 0!==D&&D,R=n.includeMatches,P=void 0!==R&&R,N=n.includeScore,z=void 0!==N&&N,F=n.verbose,B=void 0!==F&&F;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:i,distance:s,threshold:c,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:g,findAllMatches:v,minMatchCharLength:b,id:x,keys:A,includeMatches:P,includeScore:z,shouldSort:T,getFn:E,sortFn:M,verbose:B,tokenize:L,matchAllTokens:I},this.setCollection(t)}var t,n;return t=e,(n=[{key:"setCollection",value:function(e){return this.list=e,e}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\nSearch pattern: "'.concat(e,'"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,i=n.fullSearcher,o=this._search(r,i),a=o.weights,s=o.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&"number"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:"_prepareSearchers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,i=n.length;r<i;r+=1)t.push(new o(n[r],this.options));return{tokenSearchers:t,fullSearcher:new o(e,this.options)}}},{key:"_search",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},i=[];if("string"==typeof n[0]){for(var o=0,a=n.length;o<a;o+=1)this._analyze({key:"",value:n[o],record:o,index:o},{resultMap:r,results:i,tokenSearchers:e,fullSearcher:t});return{weights:null,results:i}}for(var s={},l=0,c=n.length;l<c;l+=1)for(var u=n[l],h=0,d=this.options.keys.length;h<d;h+=1){var f=this.options.keys[h];if("string"!=typeof f){if(s[f.name]={weight:1-f.weight||1},f.weight<=0||f.weight>1)throw new Error("Key weight has to be > 0 and <= 1");f=f.name}else s[f]={weight:1};this._analyze({key:f,value:this.options.getFn(u,f),record:u,index:l},{resultMap:r,results:i,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:i}}},{key:"_analyze",value:function(e,t){var n=e.key,r=e.arrayIndex,i=void 0===r?-1:r,o=e.value,a=e.record,l=e.index,c=t.tokenSearchers,u=void 0===c?[]:c,h=t.fullSearcher,d=void 0===h?[]:h,f=t.resultMap,p=void 0===f?{}:f,g=t.results,m=void 0===g?[]:g;if(null!=o){var v=!1,y=-1,b=0;if("string"==typeof o){this._log("\nKey: ".concat(""===n?"-":n));var _=d.search(o);if(this._log('Full text: "'.concat(o,'", score: ').concat(_.score)),this.options.tokenize){for(var x=o.split(this.options.tokenSeparator),w=[],A=0;A<u.length;A+=1){var k=u[A];this._log('\nPattern: "'.concat(k.pattern,'"'));for(var T=!1,S=0;S<x.length;S+=1){var E=x[S],C=k.search(E),M={};C.isMatch?(M[E]=C.score,v=!0,T=!0,w.push(C.score)):(M[E]=1,this.options.matchAllTokens||w.push(1)),this._log('Token: "'.concat(E,'", score: ').concat(M[E]))}T&&(b+=1)}y=w[0];for(var O=w.length,L=1;L<O;L+=1)y+=w[L];y/=O,this._log("Token score average:",y)}var D=_.score;y>-1&&(D=(D+y)/2),this._log("Score average:",D);var I=!this.options.tokenize||!this.options.matchAllTokens||b>=u.length;if(this._log("\nCheck Matches: ".concat(I)),(v||_.isMatch)&&I){var R=p[l];R?R.output.push({key:n,arrayIndex:i,value:o,score:D,matchedIndices:_.matchedIndices}):(p[l]={item:a,output:[{key:n,arrayIndex:i,value:o,score:D,matchedIndices:_.matchedIndices}]},m.push(p[l]))}}else if(s(o))for(var P=0,N=o.length;P<N;P+=1)this._analyze({key:n,arrayIndex:P,value:o[P],record:a,index:l},{resultMap:p,results:m,tokenSearchers:u,fullSearcher:d})}}},{key:"_computeScore",value:function(e,t){this._log("\n\nComputing score:\n");for(var n=0,r=t.length;n<r;n+=1){for(var i=t[n].output,o=i.length,a=1,s=1,l=0;l<o;l+=1){var c=e?e[i[l].key].weight:1,u=(1===c?i[l].score:i[l].score||.001)*c;1!==c?s=Math.min(s,u):(i[l].nScore=u,a*=u)}t[n].score=1===s?a:s,this._log(t[n])}}},{key:"_sort",value:function(e){this._log("\n\nSorting...."),e.sort(this.options.sortFn)}},{key:"_format",value:function(e){var t=[];if(this.options.verbose){var n=[];this._log("\n\nOutput:\n\n",JSON.stringify(e,(function(e,t){if("object"===r(t)&&null!==t){if(-1!==n.indexOf(t))return;n.push(t)}return t}))),n=null}var i=[];this.options.includeMatches&&i.push((function(e,t){var n=e.output;t.matches=[];for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(0!==o.matchedIndices.length){var a={indices:o.matchedIndices,value:o.value};o.key&&(a.key=o.key),o.hasOwnProperty("arrayIndex")&&o.arrayIndex>-1&&(a.arrayIndex=o.arrayIndex),t.matches.push(a)}}})),this.options.includeScore&&i.push((function(e,t){t.score=e.score}));for(var o=0,a=e.length;o<a;o+=1){var s=e[o];if(this.options.id&&(s.item=this.options.getFn(s.item,this.options.id)[0]),i.length){for(var l={item:s.item},c=0,u=i.length;c<u;c+=1)i[c](s,l);t.push(l)}else t.push(s.item)}return t}},{key:"_log",value:function(){var e;this.options.verbose&&(e=console).log.apply(e,arguments)}}])&&i(t.prototype,n),e}();e.exports=l},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(3),o=n(4),a=n(7),s=function(){function e(t,n){var r=n.location,i=void 0===r?0:r,o=n.distance,s=void 0===o?100:o,l=n.threshold,c=void 0===l?.6:l,u=n.maxPatternLength,h=void 0===u?32:u,d=n.isCaseSensitive,f=void 0!==d&&d,p=n.tokenSeparator,g=void 0===p?/ +/g:p,m=n.findAllMatches,v=void 0!==m&&m,y=n.minMatchCharLength,b=void 0===y?1:y;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options={location:i,distance:s,threshold:c,maxPatternLength:h,isCaseSensitive:f,tokenSeparator:g,findAllMatches:v,minMatchCharLength:b},this.pattern=this.options.isCaseSensitive?t:t.toLowerCase(),this.pattern.length<=h&&(this.patternAlphabet=a(this.pattern))}var t,n;return t=e,(n=[{key:"search",value:function(e){if(this.options.isCaseSensitive||(e=e.toLowerCase()),this.pattern===e)return{isMatch:!0,score:0,matchedIndices:[[0,e.length-1]]};var t=this.options,n=t.maxPatternLength,r=t.tokenSeparator;if(this.pattern.length>n)return i(e,this.pattern,r);var a=this.options,s=a.location,l=a.distance,c=a.threshold,u=a.findAllMatches,h=a.minMatchCharLength;return o(e,this.pattern,this.patternAlphabet,{location:s,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:h})}}])&&r(t.prototype,n),e}();e.exports=s},function(e,t){var n=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,i=new RegExp(t.replace(n,"\\$&").replace(r,"|")),o=e.match(i),a=!!o,s=[];if(a)for(var l=0,c=o.length;l<c;l+=1){var u=o[l];s.push([e.indexOf(u),u.length-1])}return{score:a?.5:1,isMatch:a,matchedIndices:s}}},function(e,t,n){var r=n(5),i=n(6);e.exports=function(e,t,n,o){for(var a=o.location,s=void 0===a?0:a,l=o.distance,c=void 0===l?100:l,u=o.threshold,h=void 0===u?.6:u,d=o.findAllMatches,f=void 0!==d&&d,p=o.minMatchCharLength,g=void 0===p?1:p,m=s,v=e.length,y=h,b=e.indexOf(t,m),_=t.length,x=[],w=0;w<v;w+=1)x[w]=0;if(-1!==b){var A=r(t,{errors:0,currentLocation:b,expectedLocation:m,distance:c});if(y=Math.min(A,y),-1!==(b=e.lastIndexOf(t,m+_))){var k=r(t,{errors:0,currentLocation:b,expectedLocation:m,distance:c});y=Math.min(k,y)}}b=-1;for(var T=[],S=1,E=_+v,C=1<<(_<=31?_-1:30),M=0;M<_;M+=1){for(var O=0,L=E;O<L;)r(t,{errors:M,currentLocation:m+L,expectedLocation:m,distance:c})<=y?O=L:E=L,L=Math.floor((E-O)/2+O);E=L;var D=Math.max(1,m-L+1),I=f?v:Math.min(m+L,v)+_,R=Array(I+2);R[I+1]=(1<<M)-1;for(var P=I;P>=D;P-=1){var N=P-1,z=n[e.charAt(N)];if(z&&(x[N]=1),R[P]=(R[P+1]<<1|1)&z,0!==M&&(R[P]|=(T[P+1]|T[P])<<1|1|T[P+1]),R[P]&C&&(S=r(t,{errors:M,currentLocation:N,expectedLocation:m,distance:c}))<=y){if(y=S,(b=N)<=m)break;D=Math.max(1,2*m-b)}}if(r(t,{errors:M+1,currentLocation:m,expectedLocation:m,distance:c})>y)break;T=R}return{isMatch:b>=0,score:0===S?.001:S,matchedIndices:i(x,g)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,s=void 0===a?0:a,l=t.distance,c=void 0===l?100:l,u=r/e.length,h=Math.abs(s-o);return c?u+h/c:h?1:u}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,i=-1,o=0,a=e.length;o<a;o+=1){var s=e[o];s&&-1===r?r=o:s||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var i=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;return t}},function(e,t,n){var r=n(0);e.exports=function(e,t){return function e(t,n,i){if(n){var o=n.indexOf("."),a=n,s=null;-1!==o&&(a=n.slice(0,o),s=n.slice(o+1));var l=t[a];if(null!=l)if(s||"string"!=typeof l&&"number"!=typeof l)if(r(l))for(var c=0,u=l.length;c<u;c+=1)e(l[c],s,i);else s&&e(l,s,i);else i.push(l.toString())}else i.push(t);return i}(e,t,[])}}])},857:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit path_to_url"+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(t),n.d(t,{__DO_NOT_USE__ActionTypes:function(){return c},applyMiddleware:function(){return m},bindActionCreators:function(){return p},combineReducers:function(){return d},compose:function(){return g},createStore:function(){return h}});var s="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function h(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(h)(e,t)}if("function"!=typeof e)throw new Error(a(2));var i=e,o=t,l=[],d=l,f=!1;function p(){d===l&&(d=l.slice())}function g(){if(f)throw new Error(a(3));return o}function m(e){if("function"!=typeof e)throw new Error(a(4));if(f)throw new Error(a(5));var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error(a(6));t=!1,p();var n=d.indexOf(e);d.splice(n,1),l=null}}}function v(e){if(!u(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(f)throw new Error(a(9));try{f=!0,o=i(o,e)}finally{f=!1}for(var t=l=d,n=0;n<t.length;n++)(0,t[n])();return e}function y(e){if("function"!=typeof e)throw new Error(a(10));i=e,v({type:c.REPLACE})}function b(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(g())}return n(),{unsubscribe:t(n)}}})[s]=function(){return this},e}return v({type:c.INIT}),(r={dispatch:v,subscribe:m,getState:g,replaceReducer:y})[s]=b,r}function d(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var o,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:c.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},l=0;l<s.length;l++){var c=s[l],u=n[c],h=e[c],d=u(h,t);if(void 0===d)throw t&&t.type,new Error(a(14));i[c]=d,r=r||d!==h}return(r=r||s.length!==Object.keys(e).length)?i:e}}function f(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"==typeof e)return f(e,t);if("object"!=typeof e||null===e)throw new Error(a(16));var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=f(i,t))}return n}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(a(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},s=t.map((function(e){return e(i)}));return r=g.apply(void 0,s)(n.dispatch),o(o({},n),{},{dispatch:r})}}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(373);return r.default}()},e.exports=t()},34701:function(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return x}});var r=n(279),i=n.n(r),o=n(370),a=n.n(o),s=n(817),l=n.n(s);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=l()(e);return c("cut"),t};function h(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";if("string"==typeof e){var r=h(e);t.container.appendChild(r),n=l()(r),c("copy"),r.remove()}else n=l()(e),c("copy");return n};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function v(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,r,i,o,s=(i=l,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(o){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return v(this,e)});function l(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(n=s.call(this)).resolveOptions(t),n.listenClick(e),n}return t=l,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,i=e.target,o=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i){if(!i||"object"!==f(i)||1!==i.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return o?d(o,{container:r}):i?"cut"===n?u(i):d(i,{container:r}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?"success":"error",{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return b("action",e)}},{key:"defaultTarget",value:function(e){var t=b("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return b("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&g(t.prototype,n),r&&g(t,r),l}(i()),x=_},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function i(e,t,n,r,i){var a=o.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}function o(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}e.exports=function(e,t,n,r,o){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,n,r,o)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),i=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return i(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},44394:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){r=function(){}}function i(o,s,l,c,u){"object"==typeof s&&(l=s.depth,c=s.prototype,u=s.includeNonEnumerable,s=s.circular);var h=[],d=[],f="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function o(l,p){if(null===l)return null;if(0===p)return l;var g,m;if("object"!=typeof l)return l;if(e(l,t))g=new t;else if(e(l,n))g=new n;else if(e(l,r))g=new r((function(e,t){l.then((function(t){e(o(t,p-1))}),(function(e){t(o(e,p-1))}))}));else if(i.__isArray(l))g=[];else if(i.__isRegExp(l))g=new RegExp(l.source,a(l)),l.lastIndex&&(g.lastIndex=l.lastIndex);else if(i.__isDate(l))g=new Date(l.getTime());else{if(f&&Buffer.isBuffer(l))return g=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(g),g;e(l,Error)?g=Object.create(l):void 0===c?(m=Object.getPrototypeOf(l),g=Object.create(m)):(g=Object.create(c),m=c)}if(s){var v=h.indexOf(l);if(-1!=v)return d[v];h.push(l),d.push(g)}for(var y in e(l,t)&&l.forEach((function(e,t){var n=o(t,p-1),r=o(e,p-1);g.set(n,r)})),e(l,n)&&l.forEach((function(e){var t=o(e,p-1);g.add(t)})),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,y)),b&&null==b.set||(g[y]=o(l[y],p-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(l);for(y=0;y<_.length;y++){var x=_[y];(!(A=Object.getOwnPropertyDescriptor(l,x))||A.enumerable||u)&&(g[x]=o(l[x],p-1),A.enumerable||Object.defineProperty(g,x,{enumerable:!1}))}}if(u){var w=Object.getOwnPropertyNames(l);for(y=0;y<w.length;y++){var A,k=w[y];(A=Object.getOwnPropertyDescriptor(l,k))&&A.enumerable||(g[k]=o(l[k],p-1),Object.defineProperty(g,k,{enumerable:!1}))}}return g}(o,l)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();e.exports&&(e.exports=t)},79125:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.d(t,{Z:()=>i})},30339:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),v=g||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),_=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,l=!0);var w=y&&(c||h&&(null==x||x<12.11)),A=n||a&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,S=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return E(e).appendChild(t)}function M(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function O(e,t,n,r){var i=M(e,t,n,r);return i.setAttribute("role","presentation"),i}function L(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function I(e,t){var n=e.className;k(t).test(n)||(e.className+=(n?" ":"")+t)}function R(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!k(n[r]).test(t)&&(t+=" "+n[r]);return t}T=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var P=function(e){e.select()};function N(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function F(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function j(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}B.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},B.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},q={origin:"*mouse"},H={origin:"+move"};function $(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var W=[""];function G(e){for(;W.length<=e;)W.push(Y(W)+" ");return W[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Z(){}function K(e,t){var n;return Object.create?n=Object.create(e):(Z.prototype=e,n=new Z),t&&z(t,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function oe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u=a.length,h=[],d=0;d<u;++d)h.push((l=a.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,your_sha256_hashLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%your_sha256_hashLLLLLN".charAt(l):1424<=l&&l<=1524?"R":1536<=l&&l<=1785?"nnnnnnNNr%%r,your_sha256_hashmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%your_sha256_hashyour_sha256_hashmmmrr1111111111".charAt(l-1536):1774<=l&&l<=2220?"r":8192<=l&&l<=8203?"w":8204==l?"b":"L");for(var f=0,p=c;f<u;++f){var g=h[f];"m"==g?h[f]=p:p=g}for(var m=0,v=c;m<u;++m){var y=h[m];"1"==y&&"r"==v?h[m]="n":n.test(y)&&(v=y,"r"==y&&(h[m]="R"))}for(var b=1,_=h[0];b<u-1;++b){var x=h[b];"+"==x&&"1"==_&&"1"==h[b+1]?h[b]="1":","!=x||_!=h[b+1]||"1"!=_&&"n"!=_||(h[b]=_),_=x}for(var w=0;w<u;++w){var A=h[w];if(","==A)h[w]="N";else if("%"==A){var k=void 0;for(k=w+1;k<u&&"%"==h[k];++k);for(var T=w&&"!"==h[w-1]||k<u&&"1"==h[k]?"1":"N",S=w;S<k;++S)h[S]=T;w=k-1}}for(var E=0,C=c;E<u;++E){var M=h[E];"L"==C&&"1"==M?h[E]="L":n.test(M)&&(C=M)}for(var O=0;O<u;++O)if(t.test(h[O])){var L=void 0;for(L=O+1;L<u&&t.test(h[L]);++L);for(var D="L"==(O?h[O-1]:c),I=D==("L"==(L<u?h[L]:c))?D?"L":"R":c,R=O;R<L;++R)h[R]=I;O=L-1}for(var P,N=[],z=0;z<u;)if(r.test(h[z])){var F=z;for(++z;z<u&&r.test(h[z]);++z);N.push(new o(0,F,z))}else{var B=z,j=N.length,U="rtl"==s?1:0;for(++z;z<u&&"L"!=h[z];++z);for(var V=B;V<z;)if(i.test(h[V])){B<V&&(N.splice(j,0,new o(1,B,V)),j+=U);var q=V;for(++V;V<z&&i.test(h[V]);++V);N.splice(j,0,new o(2,q,V)),j+=U,B=V}else++V;B<z&&N.splice(j,0,new o(1,B,z))}return"ltr"==s&&(1==N[0].level&&(P=a.match(/^\s+/))&&(N[0].from=P[0].length,N.unshift(new o(0,0,P[0].length))),1==Y(N).level&&(P=a.match(/\s+$/))&&(Y(N).to-=P[0].length,N.push(new o(0,u-P[0].length,u)))),"rtl"==s?N.reverse():N}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],he=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function de(e,t){return e._handlers&&e._handlers[t]||ue}function fe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=j(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ge(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),xe(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==j(n,t[r])&&n.push(t[r])}function ve(e,t){return de(e,t).length>0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){be(e),_e(e)}function Ae(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Se,Ee=function(){if(a&&s<9)return!1;var e=M("div");return"draggable"in e||"dragDrop"in e}();function Ce(e){if(null==Te){var t=M("span","");C(e,M("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Te?M("span",""):M("span","",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Me(e){if(null!=Se)return Se;var t=C(e,document.createTextNode("AA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return E(e),!(!n||n.left==n.right)&&(Se=r.right-n.right<3)}var Oe,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},De=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Oe=M("div"))||(Oe.setAttribute("oncopy","return;"),"function"==typeof Oe.oncopy),Re=null;var Pe={},Ne={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pe[e]=t}function Fe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[e.name];"string"==typeof t&&(t={name:t}),(e=K(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=Pe[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(je.hasOwnProperty(t.name)){var i=je[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var je={};function Ue(e,t){z(t,je.hasOwnProperty(e)?je[e]:je[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function He(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function We(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ge(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Ye(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Xe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ze(e){if(null==e.parent)return null;for(var t=e.parent,n=j(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Ke(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function Je(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,We(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,We(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}$e.prototype.eol=function(){return this.pos>=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},$e.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},$e.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},$e.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},$e.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],o={};_t(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,_t(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function dt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ft(e,Ze(t)),i=t.text.length>e.options.maxHighlightLength&&Ve(e.doc.mode,r.state),o=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=We(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&We(r,o-1).stateAfter,s=a?ut.fromSaved(r,a,o):new ut(r,He(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pt(e,t,n,r){var i=e.doc.mode,o=new $e(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&gt(i,n.state);!o.eol();)mt(i,o,n.state),o.start=o.pos}function gt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=qe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function mt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=qe(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Ve(e.mode,t.state),n,t.lookAhead):new ut(e,Ve(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=We(a,(t=st(a,t)).line),c=ft(e,t.line,n),u=new $e(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=mt(s,u,c.state),r&&o.push(new vt(u,i,Ve(a.mode,c.state)));return r?o:new vt(u,i,c.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function _t(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,h=new $e(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&bt(gt(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,a&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(mt(n,h,r.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<h.start;)i(c=Math.min(h.start,c+5e3),u);u=l}h.start=h.pos}for(;c<h.pos;){var p=Math.min(h.pos,c+5e3);i(p,u),c=p}}var xt=!1,wt=!1;function At(e,t,n){this.marker=e,this.from=t,this.to=n}function kt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Tt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function St(e,t){if(t.full)return null;var n=Je(e,t.from.line)&&We(e,t.from.line).markedSpans,r=Je(e,t.to.line)&&We(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new At(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new At(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(s)for(var h=0;h<s.length;++h){var d=s[h];if(null==d.to){var f=kt(l,d.marker);f?c&&(d.to=null==f.to?null:f.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var g=l[p];null!=g.to&&(g.to+=u),null==g.from?kt(s,g.marker)||(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=Et(s)),l&&l!=s&&(l=Et(l));var m=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new At(s[b].marker,null,null));for(var _=0;_<y;++_)m.push(v);m.push(l)}return m}function Et(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ct(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Mt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ot(e){return e.inclusiveLeft?-1:0}function Lt(e){return e.inclusiveRight?1:0}function Dt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=tt(r.from,i.from)||Ot(e)-Ot(t);return o?-o:tt(r.to,i.to)||Lt(e)-Lt(t)||t.id-e.id}function It(e,t){var n,r=wt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Dt(n,i.marker)<0)&&(n=i.marker);return n}function Rt(e){return It(e,!0)}function Pt(e){return It(e,!1)}function Nt(e,t){var n,r=wt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Dt(n,o.marker)<0)&&(n=o.marker)}return n}function zt(e,t,n,r,i){var o=We(e,t),a=wt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||Ot(l.marker)-Ot(i),h=tt(c.to,r)||Lt(l.marker)-Lt(i);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=We(e,t),r=Ft(n);return n==r?t:Ze(r)}function jt(e,t){if(t>e.lastLine())return t;var n,r=We(e,t);if(!Ut(e,r))return t;for(;n=Pt(r);)r=n.find(1,!0).line;return Ze(r)+1}function Ut(e,t){var n=wt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Vt(e,t,r))return!0}}function Vt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Vt(e,r.line,kt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Vt(e,t,i))return!0}function qt(e){for(var t=0,n=(e=Ft(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function Ht(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Rt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Pt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function $t(e){var t=e.display,n=e.doc;t.maxLine=We(n,n.first),t.maxLineLength=Ht(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Ht(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Wt=function(e,t,n){this.text=e,Mt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Ct(e)}Wt.prototype.lineNo=function(){return Ze(this)},ye(Wt);var Yt={},Xt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Xt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Kt(e,t){var n=O("span",null,null,l?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Qt,Me(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,dt(e,o,t!=e.display.externalMeasured&&Ze(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=R(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=R(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ce(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function Jt(e){var t=M("span","","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=""),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,h=e.cm.state.specialChars,d=!1;if(h.test(t)){c=document.createDocumentFragment();for(var f=0;;){h.lastIndex=f;var p=h.exec(t),g=p?p.index-f:t.length-f;if(g){var m=document.createTextNode(u.slice(f,f+g));a&&s<9?c.appendChild(M("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;f+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(M("span",G(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(M("span","\r"==p[0]?"":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(M("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||o||l){var _=n||"";r&&(_+=r),i&&(_+=i);var x=M("span",[c],_,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function en(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var h=void 0,d=0;d<t.length&&!((h=t[d]).to>c&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,h,d,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,_=0;_<r.length;++_){var x=r[_],w=x.marker;if("bookmark"==w.type&&x.from==p&&w.widgetNode)y.push(w);else if(x.from<=p&&(null==x.to||x.to>p||w.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==p&&(u+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var A in w.attributes)(d||(d={}))[A]=w.attributes[A];w.collapsed&&(!h||Dt(h.marker,w)<0)&&(h=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(c+=" "+b[k]);if(!h||h.from==p)for(var T=0;T<y.length;++T)tn(t,0,y[T]);if(h&&(h.from||0)==p){if(tn(t,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=f)break;for(var S=Math.min(f,v);;){if(m){var E=p+m.length;if(!h){var C=E>S?m.slice(0,S-p):m;t.addToken(t,C,a?a+l:l,u,p+C.length==v?c:"",s,d)}if(E>=S){m=m.slice(S-p),p=S;break}p=E,u=""}m=i.slice(o,o=n[g++]),a=Zt(n[g++],t.cm.options)}}else for(var M=1;M<n.length;M+=2)t.addToken(t,i.slice(o,o=n[M]),Zt(n[M+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Pt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ze(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ut(e,t)}function on(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new rn(e.doc,We(e.doc,o),o);r=o+a.size,i.push(a)}return i}var an=null;var sn=null;function ln(e,t){var n=de(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fn(e,t):"gutter"==o?gn(e,t,n,r):"class"==o?pn(e,t):"widget"==o&&mn(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=M("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Kt(e,t)}function fn(e,t){var n=t.text.className,r=dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(M("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?hn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function gn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=hn(t);t.gutterBackground=M("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=hn(t),s=t.gutter=M("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(M("div",Qe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(M("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function mn(e,t,n){t.alignable&&(t.alignable=null);for(var r=k("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);yn(e,t,n)}function vn(e,t,n,r){var i=dn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),gn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,i){if(t.widgets)for(var o=hn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=M("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),_n(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ln(l,"redraw")}}function _n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function xn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!L(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),C(t.display.measure,M("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function wn(e,t){for(var n=Ae(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function An(e){return e.lineSpace.offsetTop}function kn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Tn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=C(e.measure,M("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Sn(e){return 50-e.display.nativeBarWidth}function En(e){return e.display.scroller.clientWidth-Sn(e)-e.display.barWidth}function Cn(e){return e.display.scroller.clientHeight-Sn(e)-e.display.barHeight}function Mn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Ze(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function On(e,t,n,r){return In(e,Dn(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Dn(e,t){var n=Ze(t),r=Ln(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,or(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ze(t=Ft(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Kt(e,r);return r.text=i.pre,C(e.display.lineMeasure,i.pre),r}(e,t));var i=Mn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function In(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&En(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Nn(t.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&re(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():zn(T(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,h="right"}a&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Re)return Re;var t=C(e,M("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Re=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Pn}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var _=b?y[b-1]:0,x=y[b],w={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:_,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=g,w.rbottom=m),w}(e,t,n,r)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Rn,Pn={left:0,right:0,top:0,bottom:0};function Nn(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function zn(e,t){var n=Pn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Bn(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fn(e.display.view[t])}function jn(e){Bn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Un(){return u&&m?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Vn(){return u&&m?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qn(e){var t=Ft(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=xn(t[r]));return n}function Hn(e,t,n,r,i){if(!i){var o=qn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=qt(t);if("local"==r?a+=An(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Vn());var l=s.left+("window"==r?0:Un());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function $n(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Un(),i-=Vn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Wn(e,t,n,r,i){return r||(r=We(e.doc,t.line)),Hn(e,r,On(e,r,t.ch,i),n)}function Gn(e,t,n,r,i,o){function a(t,a){var s=In(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Hn(e,r,s,n)}r=r||We(e.doc,t.line),i||(i=Dn(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=ae,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Yn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=We(e.doc,t.line),i=qt(r)+An(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Xn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Zn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Xn(r.first,0,null,-1,-1);var i=Ke(r,n),o=r.first+r.size-1;if(i>o)return Xn(r.first+r.size-1,We(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=We(r,i);;){var s=er(e,a,i,t,n),l=Nt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=We(r,i=c.line)}}function Kn(e,t,n,r){r-=qn(t);var i=t.text.length,o=oe((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return In(e,n,t).top>r}),o,i)}}function Jn(e,t,n,r){return n||(n=Dn(e,t)),Kn(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=qt(t);var o=Dn(e,t),a=qn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,g=null,m=oe((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),s,l),v=!1;if(g){var y=r-g.left<g.right-r,b=y==c;m=p+(b?0:1),f=b?"after":"before",d=y?g.left:g.right}else{c||m!=l&&m!=s||m++,f=0==m?"after":m==t.text.length?"before":In(e,o,m-(c?1:0)).bottom+a<=i==c?"after":"before";var _=Gn(e,et(n,m,f),"line",t,o);d=_.left,v=i<_.top?-1:i>=_.bottom?1:0}return Xn(n,m=ie(t.text,m,1),f,v,r-d)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Qn(Gn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Gn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(e,t,n,r,i,o,a){var s=Kn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d<i.length;d++){var f=i[d];if(!(f.from>=c||f.to<=l)){var p=In(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=p<o?o-p+1e9:p-o;(!u||h>g)&&(u=f,h=g)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rn){Rn=M("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(M("br"));Rn.appendChild(document.createTextNode("x"))}C(e.measure,Rn);var n=Rn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),E(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=M("span","xxxxxxxxxx"),n=M("pre",[t],"CodeMirror-line-like");C(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Xe(e,t)}))}function cr(e,t,n,r){var i=e.display;if(!n&&"true"==Ae(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Zn(e,o,a);if(r&&c.xRel>0&&(l=We(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((o-Tn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function hr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)wt&&Bt(e.doc,t)<i.viewTo&&fr(e);else if(n<=i.viewFrom)wt&&jt(e.doc,n+r)>i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function dr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[ur(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==j(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=ur(e,t),a=e.display.view;if(!wt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function gr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function mr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&yr(e,u,i)}else(c||e.options.showCursorWhenSelecting)&&yr(e,l.head,i);c||_r(e,l,o)}}return r}function yr(e,t,n){var r=Gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(M("div","","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Wn(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(M("div","","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function _r(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Tn(e.display),s=a.left,l=Math.max(r.sizerWidth,En(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(M("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,a,h=We(i,t),d=h.text.length;function f(n,r){return Wn(e,et(t,n),"div",h,r)}function p(t,n,r){var i=Jn(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=ce(h,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?d:r,(function(e,t,i,h){var m="ltr"==i,v=f(e,m?"left":"right"),y=f(t-1,m?"right":"left"),b=null==n&&0==e,_=null==r&&t==d,x=0==h,w=!g||h==g.length-1;if(y.top-v.top<=3){var A=(c?_:b)&&w,k=(c?b:_)&&x?s:(m?v:y).left,T=A?l:(m?y:v).right;u(k,v.top,T-k,v.bottom)}else{var S,E,C,M;m?(S=c&&b&&x?s:v.left,E=c?l:p(e,i,"before"),C=c?s:p(t,i,"after"),M=c&&_&&w?l:y.right):(S=c?p(e,i,"before"):s,E=!c&&b&&x?l:v.right,C=!c&&_&&w?s:y.left,M=c?p(t,i,"after"):l),u(S,v.top,E-S,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(C,y.top,M-C,y.bottom)}(!o||br(v,o)<0)&&(o=v),br(y,o)<0&&(o=y),(!a||br(v,a)<0)&&(a=v),br(y,a)<0&&(a=y)})),{start:o,end:a}}var d=t.from(),f=t.to();if(d.line==f.line)h(d.line,d.ch,f.ch);else{var p=We(i,d.line),g=We(i,f.line),m=Ft(p)==Ft(g),v=h(d.line,d.ch,m?p.text.length+1:null).end,y=h(f.line,m?0:null,f.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function xr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Tr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||kr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Tr(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function Tr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,h=void 0,d=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var f=c.node.offsetTop+c.node.offsetHeight;h=f-n,n=f}else{var p=c.node.getBoundingClientRect();h=p.bottom-p.top,!u&&c.text.firstChild&&(d=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=c.line.height-h;if((g>.005||g<-.005)&&(i<r&&(o-=g),Xe(c.line,h),Er(c.line),c.rest))for(var m=0;m<c.rest.length;m++)Er(c.rest[m]);if(d>e.display.sizerWidth){var v=Math.ceil(d/ir(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Er(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Cr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-An(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Ke(t,r),a=Ke(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Ke(t,qt(We(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Ke(t,qt(We(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Mr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Cn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+kn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=En(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+h-(p?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Or(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Dr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Rr(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Rr(e,t,n,r){var i=Mr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Dr(e,i.scrollLeft,i.scrollTop)}function Pr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Nr(e,t,!0),n&&li(e),ri(e,100))}function Nr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function zr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=M("div",[M("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=M("div",[M("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var jr=function(){};function Ur(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),Vr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}jr.prototype.update=function(){return{bottom:0,right:0}},jr.prototype.setScrollLeft=function(){},jr.prototype.setScrollTop=function(){},jr.prototype.clear=function(){};var qr={native:Br,null:jr};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?zr(e,t):Pr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var $r=0;function Wr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++$r,markArrays:null},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{an=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Yr(t[n]);for(var r=0;r<t.length;r++)Xr(t[r]);for(var i=0;i<t.length;i++)Zr(t[i]);for(var o=0;o<t.length;o++)Kr(t[o]);for(var a=0;a<t.length;a++)Jr(t[a])}(e)}))}function Yr(e){var t=e.cm,n=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sn(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&$t(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Zr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-En(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&zr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&xr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&wr(e.cm)}function Jr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Nr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&zr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ge(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=M("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-An(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=Gn(e,t),l=n&&n!=t?Gn(e,n):s,c=Mr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(Pr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(zr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||pe(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&pe(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();Wr(e);try{return t()}finally{Gr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Wr(e);try{return t.apply(e,arguments)}finally{Gr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Wr(this);try{return e.apply(this,arguments)}finally{Gr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Wr(t);try{return e.apply(this,arguments)}finally{Gr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,N(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Ve(t.mode,r.state):null,l=ht(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&d<a.length;++d)h=a[d]!=o.styles[d];h&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&pt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Qr(e,(function(){for(var t=0;t<i.length;t++)dr(e,i[t],"text")}))}}var oi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Cr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=En(e),this.force=n,this.dims=or(e),this.events=[]};function ai(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return fr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==gr(e))return!1;di(e)&&(fr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),wt&&(o=Bt(e.doc,o),a=jt(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n})(e,o,a),n.viewOffset=qt(We(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=gr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=D();if(!t||!L(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&L(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h<c.length;h++){var d=c[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var f=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(j(d.changes,"gutter")>-1&&(f=!1),un(e,d,u,n)),f&&(E(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=d.node.nextSibling}else{var p=vn(e,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=En(e))r&&(t.visible=Cr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-Cn(e),n.top)}),t.visible=Cr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;Sr(e);var i=Fr(e);mr(e),Ur(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new oi(e,t);if(ai(e,n)){Sr(e),si(e,n);var r=Fr(e);mr(e),Ur(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ln(e,"gutterChanged",e)}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function di(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(M("div",[M("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(e.display),!0}return!1}function fi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;E(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(M("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ci(e)}function gi(e){pi(e.display),hr(e),hi(e)}function mi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=M("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=M("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=O("div",null,"CodeMirror-code"),o.selectionDiv=M("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=M("div",null,"CodeMirror-cursors"),o.measure=M("div",null,"CodeMirror-measure"),o.lineMeasure=M("div",null,"CodeMirror-measure"),o.lineSpace=O("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=O("div",[o.lineSpace],"CodeMirror-lines");o.mover=M("div",[c],null,"position: relative"),o.sizer=M("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=M("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=M("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=M("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=M("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=fi(i.gutters,i.lineNumbers),pi(o),r.init(o)}oi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var vi=0,yi=null;function bi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function _i(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function xi(e,t){var r=bi(t),i=r.x,o=r.y,a=yi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,c=s.scroller,u=c.scrollWidth>c.clientWidth,d=c.scrollHeight>c.clientHeight;if(i&&u||o&&d){if(o&&y&&l)e:for(var f=t.target,p=s.view;f!=c;f=f.parentNode)for(var g=0;g<p.length;g++)if(p[g].node==f){e.display.currentWheelTarget=f;break e}if(i&&!n&&!h&&null!=a)return o&&d&&Pr(e,Math.max(0,c.scrollTop+o*a)),zr(e,Math.max(0,c.scrollLeft+i*a)),(!o||o&&d)&&be(t),void(s.wheelStartX=null);if(o&&null!=a){var m=o*a,v=e.doc.scrollTop,b=v+s.wrapper.clientHeight;m<0?v=Math.max(0,v+m-50):b=Math.min(e.doc.height,b+m+50),li(e,{top:v,bottom:b})}vi<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(yi=(yi*vi+n)/(vi+1),++vi)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?yi=-.53:n?yi=15:u?yi=-.7:d&&(yi=-1/3);var wi=function(e,t){this.ranges=e,this.primIndex=t};wi.prototype.primary=function(){return this.ranges[this.primIndex]},wi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},wi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ai(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new wi(e,this.primIndex)},wi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},wi.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Ai=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=j(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=tt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ai(h?u:c,h?c:u))}}return new wi(t,n)}function Ti(e,t){return new wi([new Ai(e,t||e)],0)}function Si(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ei(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Si(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Si(t).ch-t.to.ch),et(n,r)}function Ci(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Ai(Ei(i.anchor,t),Ei(i.head,t)))}return ki(e.cm,n,e.sel.primIndex)}function Mi(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Oi(e){e.doc.mode=Be(e.options,e.doc.modeOption),Li(e)}function Li(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&hr(e)}function Di(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ii(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){(function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ct(e),Mt(e,n);var i=r?r(e):1;i!=e.height&&Xe(e,i)})(e,n,i,r),ln(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new Wt(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=We(e,s.line),h=We(e,l.line),d=Y(c),f=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Di(e,t)){var g=a(0,c.length-1);o(h,h.text,f),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),f);else{var m=a(1,c.length-1);m.push(new Wt(d+u.text.slice(l.ch),f,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+h.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(h,d+h.text.slice(l.ch),f);var v=a(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Ri(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Pi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Oi(e),Ni(e),e.options.direction=t.direction,e.options.lineWrapping||$t(e),e.options.mode=t.modeOption,hr(e)}function Ni(e){("rtl"==e.doc.direction?I:S)(e.display.lineDiv,"CodeMirror-rtl")}function zi(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Fi(e,t){var n={from:rt(t.from),to:Si(t),text:Ge(e,t.from,t.to)};return qi(e,n,t.from.line,t.to.line+1),Ri(e,(function(e){return qi(e,n,t.from.line,t.to.line+1)}),!0),n}function Bi(e){for(;e.length&&Y(e).ranges;)e.pop()}function ji(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Si(t):o.changes.push(Fi(e,t));else{var l=Y(i.done);for(l&&l.ranges||Vi(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Vi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Hi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function $i(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Hi(n[i]));return r}(e,t),r=St(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function Wi(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?wi.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&j(t,Number(u[1]))>-1&&(Y(s)[h]=c[h],delete c[h])}}}return r}function Gi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ai(i,t)}return new Ai(n||t,t)}function Yi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new wi([Gi(e.sel.primary(),t,n,i)],0),r)}function Xi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Gi(e.sel.ranges[o],t[o],null,i);Qi(e,ki(e.cm,r,e.sel.primIndex),n)}function Zi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Qi(e,ki(e.cm,i,e.sel.primIndex),r)}function Ki(e,t,n,r){Qi(e,Ti(t,n),r)}function Ji(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=t,eo(e,t,n)):Qi(e,t,n)}function Qi(e,t,n){eo(e,t,n),Ui(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function eo(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ai(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ki(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,ro(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Lr(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),ln(e,"cursorActivity",e))}function no(e){to(e,ro(e,e.sel,null,!1))}function ro(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=oo(e,a.anchor,s&&s.anchor,n,r),c=oo(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ai(l,c))}return i?ki(e.cm,i,t.primIndex):t}function io(e,t,n,r,i){var o=We(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=ao(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return io(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ao(e,f,r,f.line==t.line?o:null)),f?io(e,f,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1;return io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0)||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||We(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function so(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),V)}function lo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function co(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,co)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=lo(e,t,!0))){var r=xt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=j(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)uo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else uo(e,t)}}function uo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ci(e,t);ji(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,St(e,t));var r=[];Ri(e,(function(e,n){n||-1!=j(r,e.history)||(yo(e.history,t),r.push(e.history)),po(e,t,null,St(e,t))}))}}function ho(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(Vi(i,l),n&&!i.equals(e.sel))return void Qi(e,i,{clearRedo:!1});a=i}var u=[];Vi(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var h=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,h&&!lo(e,r,!1))return s.length=0,{};u.push(Fi(e,r));var o=n?Ci(e,r):Y(s);po(e,r,o,$i(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Si(r)});var a=[];Ri(e,(function(e,t){t||-1!=j(a,e.history)||(yo(e.history,r),a.push(e.history)),po(e,r,null,$i(e,r))}))},f=i.changes.length-1;f>=0;--f){var p=d(f);if(p)return p.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new wi(X(e.sel.ranges,(function(e){return new Ai(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(e.cm,r,"gutter")}}function po(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,po)(e,t,n,r);if(t.to.line<e.first)fo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);fo(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,We(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Ci(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Ze(Ft(We(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&me(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Ht(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=We(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ri(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?hr(e):o.line!=a.line||1!=t.text.length||Di(e.doc,t)?hr(e,o.line,a.line+1,c):dr(e,o.line,"text");var u=ve(e,"changes"),h=ve(e,"change");if(h||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&ln(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Ii(e,t,r),eo(e,n,V),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function go(e,t,n,r,i){var o;r||(r=n),tt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),co(e,{from:n,to:r,text:t,origin:i})}function mo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)mo(o.ranges[s].anchor,t,n,r),mo(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function yo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;vo(e.done,n,r,i),vo(e.undone,n,r,i)}function bo(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=We(e,at(e,t)):i=Ze(t),null==i?null:(r(o,i)&&e.cm&&dr(e.cm,i,n),o)}function _o(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function xo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Ai.prototype.from=function(){return ot(this.anchor,this.head)},Ai.prototype.to=function(){return it(this.anchor,this.head)},Ai.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},_o.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Gt(i),ln(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},xo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof _o))){var s=[];this.collapse(s),this.children=[new _o(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new _o(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new xo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=j(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new xo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var wo=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function Ao(e,t,n){qt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Or(e,n)}wo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ze(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=xn(this);Xe(n,Math.max(0,n.height-o)),e&&(Qr(e,(function(){Ao(e,n,-o),dr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},wo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=xn(this)-t;i&&(Ut(this.doc,r)||Xe(r,r.height+i),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,Ao(n,r,i),ln(n,"lineWidgetChanged",n,e,Ze(r))})))},ye(wo);var ko=0,To=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ko};function So(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=z(r)).shared=!1;var o=[So(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Ri(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(So(e,st(e,t),st(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Y(o)})),new Eo(o,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,So)(e,t,n,r,i);var o=new To(e,i),a=tt(t,n);if(r&&z(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(zt(e,t.line,t,n,o)||t.line!=n.line&&zt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt=!0}o.addToHistory&&ji(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&Ft(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Xe(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new At(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Xe(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}To.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Wr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=kt(a.markedSpans,this);e&&!this.collapsed?dr(e,Ze(a),"text"):e&&(null!=s.to&&(i=Ze(a)),null!=s.from&&(r=Ze(a))),a.markedSpans=Tt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ut(this.doc,a)&&e&&Xe(a,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ft(this.lines[l]),u=Ht(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Gr(e),this.parent&&this.parent.clear()}},To.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=kt(o.markedSpans,this);if(null!=a.from&&(n=et(t?o:Ze(o),a.from),-1==e))return n;if(null!=a.to&&(r=et(t?o:Ze(o),a.to),1==e))return r}return n&&{from:n,to:r}},To.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var i=t.line,o=Ze(t.line),a=Ln(r,o);if(a&&(Fn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ut(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=xn(n)-s;l&&Xe(i,i.height+l)}ln(r,"markerChanged",r,e)}))},To.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=j(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},To.prototype.detachLine=function(e){if(this.lines.splice(j(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(To);var Eo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Co(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Mo(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ri(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==j(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Eo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Eo.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Eo);var Oo=0,Lo=function(e,t,n,r,i){if(!(this instanceof Lo))return new Lo(e,t,n,r,i);null==n&&(n=0),xo.call(this,[new _o([new Wt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=et(n,0);this.sel=Ti(o),this.history=new zi(null),this.id=++Oo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ii(this,{from:o,to:o,text:e}),Qi(this,Ti(o),V)};Lo.prototype=K(xo.prototype,{constructor:Lo,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ye(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;co(this,{from:t,to:et(n,We(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Dr(this.cm,0,0),Qi(this,Ti(t),V)})),replaceRange:function(e,t,n,r){go(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=Ge(this,st(this,e),st(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Je(this,e))return We(this,e)},getLineNumber:function(e){return Ze(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=We(this,e)),Ft(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Ki(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Ki(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Yi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){Xi(this,lt(this,e),t)})),extendSelectionsBy:ni((function(e,t){Xi(this,lt(this,X(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Ai(st(this,e[i].anchor),st(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Qi(this,ki(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ai(st(this,e),st(this,t||e))),Qi(this,ki(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ge(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ge(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Mi(s.from,i,o),c=Mi(Si(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],h=tt(u.head,u.anchor)<0;r[a]=new Ai(h?c:l,h?l:c)}else r[a]=new Ai(l,l)}return new wi(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)co(this,r[l]);s?Ji(this,s):this.cm&&Lr(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new zi(this.history),Ri(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Wi(this.history.done),undone:Wi(this.history.undone)}},setHistory:function(e){var t=this.history=new zi(this.history);t.done=Wi(e.done.slice(0),null,!0),t.undone=Wi(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return bo(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Je(this,e))return null;if(t=e,!(e=We(this,e)))return null}else if(null==(t=Ze(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(k(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(k(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new wo(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),bo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ut(e,t)){var r=qt(t)<e.scrollTop;Xe(t,t.height+xn(i)),r&&Or(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&ln(o,"lineWidgetAdded",o,i,"number"==typeof t?t:Ze(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return So(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return So(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=We(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Lo(Ye(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Lo(Ye(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(tt(o,a)){var s=So(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Co(this)),r},unlinkDoc:function(e){if(e instanceof Ea&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Mo(Co(this));break}if(e.history==this.history){var n=[e.id];Ri(e,(function(e){return n.push(e.id)}),!0),e.history=new zi(null),e.history.done=Wi(this.history.done,n),e.history.undone=Wi(this.history.undone,n)}},iterLinkedDocs:function(e){Ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qr(t=this.cm,(function(){Ni(t),hr(t)})))}))}),Lo.prototype.eachLine=Lo.prototype.iter;var Do=0;function Io(e){var t=this;if(Ro(t),!ge(t,e)&&!wn(t.display,e)){be(e),a&&(Do=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};co(t.doc,e),Ji(t.doc,Ti(st(t.doc,n),st(t.doc,Si(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==j(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),eo(t.doc,Ti(n,n)),d)for(var f=0;f<d.length;++f)go(t.doc,"",d[f].anchor,d[f].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ro(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var No=!1;function zo(){var e;No||(he(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Po(Fo)}),100))})),he(window,"blur",(function(){return Po(Tr)})),No=!0)}function Fo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},jo=0;jo<10;jo++)Bo[jo+48]=Bo[jo+96]=String(jo);for(var Uo=65;Uo<=90;Uo++)Bo[Uo]=String.fromCharCode(Uo);for(var Vo=1;Vo<=12;Vo++)Bo[Vo+111]=Bo[Vo+63235]="F"+Vo;var qo={};function Ho(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function $o(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=X(n.split(" "),Ho),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Wo(e,t,n,r){var i=(t=Zo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Wo(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Wo(e,t.fallthrough[o],n,r);if(a)return a}}}function Go(e){var t="string"==typeof e?e:Bo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Yo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Xo(e,t){if(h&&34==e.keyCode&&e.char)return!1;var n=Bo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Yo(n,e,t))}function Zo(e){return"string"==typeof e?qo[e]:e}function Ko(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&tt(o.from,Y(r).to)<=0;){var a=r.pop();if(tt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)go(e.doc,"",r[t].from,r[t].to,"+delete");Lr(e)}))}function Jo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qo(e,t,n){var r=Jo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Dn(t,n);a=i<0?n.text.length-1:0;var u=In(t,c,a).top;a=oe((function(e){return In(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}qo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qo.default=y?qo.macDefault:qo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Ko(e,(function(t){if(t.empty()){var n=We(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ko(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Ko(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ko(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ko(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=We(e.doc,t),r=function(e){for(var t;t=Pt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ze(r)),ea(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),H)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),H)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ra(e,t.head):r}),H)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=F(e.getLine(o.line),o.ch,r);t.push(G(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=We(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=We(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ai(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Lr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var n=We(e.doc,t),r=Ft(n);return r!=n&&(t=Ze(r)),ea(!0,e,r,t,1)}function ra(e,t){var n=na(e,t.line),r=We(e.doc,n.line),i=ce(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return et(n.line,a?0:o,n.sticky)}return n}function ia(e,t,n){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var oa=new B;function aa(e,t,n,r){var i=e.state.keySeq;if(i){if(Go(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:oa.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,i+" "+t,n,r))return!0}return sa(e,t,n,r)}function sa(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Wo(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Wo(t,e.options.extraKeys,n,e)||Wo(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ln(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(be(n),xr(e)),!!i}function la(e,t){var n=Xo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+n,t,(function(t){return ia(e,t,!0)}))||aa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):aa(e,n,t,(function(t){return ia(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=D(),ge(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=la(t,e);h&&(ca=i?r:null,i||88!=r||Ie||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n))}I(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n)}(t)}}function ha(e){16==e.keyCode&&(this.doc.sel.shift=!1),ge(this,e)}function da(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||wn(t.display,e)||ge(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(h&&n==ca)return ca=null,void be(e);if(!h||e.which&&!(e.which<10)||!la(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return aa(e,"'"+n+"'",t,(function(t){return ia(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var fa,pa,ga=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ma(e){var t=this,n=t.display;if(!(ge(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,wn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ba(t,e)){var r=cr(t,e),i=ke(e),o=r?function(e,t){var n=+new Date;return pa&&pa.compare(n,e,t)?(fa=pa=null,"triple"):fa&&fa.compare(n,e,t)?(pa=new ga(n,e,t),fa=null,"double"):(fa=new ga(n,e,t),pa=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),aa(e,Yo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=U}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){a?setTimeout(N(wr,e),0):e.curOp.focus=D();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Ee&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ar(e)),fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),o||(be(t),r.addNew||Yi(e.doc,n,null,null,r.extend),l&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){a&&Ar(e);var i=e.display,o=e.doc;be(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new Ai(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Ai(n,n)),n=cr(e,t,!0,!0),l=-1;else{var h=va(e,n,r.unit);s=r.extend?Gi(s,h.anchor,h.head,r.extend):h}r.addNew?-1==l?(l=u.length,Qi(o,ki(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Qi(o,ki(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Zi(o,l,s,q):(l=0,Qi(o,new wi([s],0),q),c=o.sel);var d=n;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=F(We(o,n.line).text,n.ch,a),h=F(We(o,t.line).text,t.ch,a),f=Math.min(u,h),p=Math.max(u,h),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=We(o,g).text,y=$(v,f,a);f==p?i.push(new Ai(et(g,y),et(g,y))):v.length>y&&i.push(new Ai(et(g,y),et(g,$(v,p,a))))}i.length||i.push(new Ai(n,n)),Qi(o,ki(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=s,x=va(e,t,r.unit),w=_.anchor;tt(x.anchor,w)>0?(b=x.head,w=ot(_.from(),x.anchor)):(b=x.anchor,w=it(_.to(),x.head));var A=c.ranges.slice(0);A[l]=function(e,t){var n=t.anchor,r=t.head,i=We(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?t:new Ai(new et(n.line,p,g),r)}(e,new Ai(st(o,w),b)),Qi(o,ki(e,A,l),q)}}var p=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,a=cr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=tt(a,d)){e.curOp.focus=D(),f(a);var s=Cr(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(ei(e,(function(){g==n&&m(t)})),150)}else{var l=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;l&&setTimeout(ei(e,(function(){g==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",y),fe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=ei(e,(function(e){0!==e.buttons&&ke(e)?m(e):v(e)})),b=ei(e,v);e.state.selectingText=b,he(i.wrapper.ownerDocument,"mousemove",y),he(i.wrapper.ownerDocument,"mouseup",b)}(e,r,t,o)}(t,r,o,e):Ae(e)==n.scroller&&be(e):2==i?(r&&Yi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(A?t.display.input.onContextMenu(e):Ar(t)))}}function va(e,t,n){if("char"==n)return new Ai(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ai(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ai(r.from,r.to)}function ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return xe(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return pe(e,n,e,Ke(e.doc,o),e.display.gutterSpecs[l].className,t),xe(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function _a(e,t){wn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||A||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jn(e)}ga.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var wa={toString:function(){return"CodeMirror.Init"}},Aa={},ka={};function Ta(e,t,n){if(!t!=!(n&&n!=wa)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),$t(e)),lr(e),hr(e),jn(e),setTimeout((function(){return Ur(e)}),100)}function Ea(e,t){var n=this;if(!(this instanceof Ea))return new Ea(e,t);this.options=t=t?z(t):{},z(Aa,t,!1);var r=t.value;"string"==typeof r?r=new Lo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ea.inputStyles[t.inputStyle](this),o=this.display=new mi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,ma)),he(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!ge(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!wn(e.display,t)){be(t);var r=e.findWordAt(n);Yi(e.doc,r.anchor,r.head)}}})):function(t){return ge(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return _a(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_a(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!ge(e,i)&&!o(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!wn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new Ai(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new Ai(et(a.line,0),st(e.doc,et(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Pr(e,t.scroller.scrollTop),zr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return xi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ge(e,t)||we(t)},over:function(t){ge(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=M("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,r)}}(e,t),we(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Do<100))we(t);else if(!ge(e,t)&&!wn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=M("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Io),leave:function(t){ge(e,t)||Ro(e)}};var c=t.input.getField();he(c,"keyup",(function(t){return ha.call(e,t)})),he(c,"keydown",ei(e,ua)),he(c,"keypress",ei(e,da)),he(c,"focus",(function(t){return kr(e,t)})),he(c,"blur",(function(t){return Tr(e,t)}))}(this),zo(),Wr(this),this.curOp.forceUpdate=!0,Pi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):Tr(this),ka)ka.hasOwnProperty(c)&&ka[c](this,t[c],wa);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ca.length;++u)Ca[u](this);Gr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ea.defaults=Aa,Ea.optionHandlers=ka;var Ca=[];function Ma(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=ft(e,t).state:n="prev");var a=e.options.tabSize,s=We(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?F(We(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,h+="\t";if(d<c&&(h+=G(c-d)),h!=u)return go(o,h,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<u.length){var m=et(t,u.length);Zi(o,p,new Ai(m,m));break}}}Ea.defineInitHook=function(e){return Ca.push(e)};var Oa=null;function La(e){Oa=e}function Da(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=Le(t),c=null;if(s&&r.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){c=[];for(var u=0;u<Oa.text.length;u++)c.push(o.splitLines(Oa.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(l,(function(e){return[e]})));for(var h=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var f=r.ranges[d],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?g=et(g.line,Math.min(We(o,g.line).text.length,g.ch+Y(l).length)):s&&Oa&&Oa.lineWise&&Oa.text.join("\n")==l.join("\n")&&(p=g=et(p.line,0)));var m={from:p,to:g,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,m),ln(e,"inputRead",e,m)}t&&!s&&Ra(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Da(t,n,0,null,"paste")})),!0}function Ra(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Ma(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(We(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ma(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function Pa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:et(i,0),head:et(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Na(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function za(){var e=M("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=M("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Na(e),t}function Fa(e,t,n,r,i){var o=t,a=n,s=We(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(o){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var h=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(h?2:1))),-n)}}else a=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Qo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Qo(t,n,r);var s,l=function(e,n){return Jo(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||Dn(e,t),Jn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var h=1==a.level==r<0,d=l(n,h?1:-1);if(null!=d&&(h?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},g=p(o+r,r,u);if(g)return g;var m=r>0?u.end:l(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=p(r>0?0:i.length-1,r,c(m)))?null:g}(e.cm,s,t,n):Qo(s,t,n);if(null==a){if(o||((c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=We(e,c)))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",g=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var m=oo(e,t,o,a,!0);return nt(o,m)&&(m.hitSide=!0),m}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Zn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var n=Ln(e,t.line);if(!n||n.hidden)return null;var r=We(e.doc,t.line),i=Mn(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Nn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Ha(o,t,n)}}function Ha(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!L(r,t))return Va(et(Ze(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return Va(et(Ze(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=Ze(i<0?e.line:e.rest[i]),h=o[a]+r;return(r<0||s!=t)&&(h=o[a+(r?1:0)]),et(u,h)}}}var h=u(a,s,n);if(h)return Va(h,i);for(var d=s.nextSibling,f=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(h=u(d,d.firstChild,0))return Va(et(h.line,h.ch-f),i);f+=d.textContent.length}for(var p=s.previousSibling,g=n;p;p=p.previousSibling){if(h=u(p,p.firstChild,-1))return Va(et(h.line,h.ch+g),i);g+=p.textContent.length}}ja.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!ge(r,e)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Pa(r);La({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,V),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Oa.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=za(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Oa.text.join("\n");var c=D();P(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Na(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),he(i,"paste",(function(e){!o(e)||ge(r,e)||Ia(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),he(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),he(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),he(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),he(i,"touchstart",(function(){return n.forceCompositionEnd()})),he(i,"input",(function(){t.composing||t.readFromDOMSoon()})),he(i,"copy",a),he(i,"cut",a)},ja.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ja.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=D()==this.div,e},ja.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ja.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ja.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=qa(t,e.anchorNode,e.anchorOffset),s=qa(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=tt(ot(a,s),i)||0!=tt(it(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Ua(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Ua(t,o);if(!u){var h=l[l.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=T(c.node,c.offset,u.offset,u.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},ja.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},ja.prototype.showMultipleSelections=function(e){C(this.cm.display.cursorDiv,e.cursors),C(this.cm.display.selectionDiv,e.selection)},ja.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ja.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return L(this.div,t)},ja.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&D()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ja.prototype.blur=function(){this.div.blur()},ja.prototype.getField=function(){return this.div},ja.prototype.supportsTouch=function(){return!0},ja.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Qr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},ja.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ja.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=qa(t,e.anchorNode,e.anchorOffset),r=qa(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){Qi(t.doc,Ti(n,r),V),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},ja.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=et(a.line-1,We(r.doc,a.line-1).length)),s.ch==We(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ur(r,a.line))?(t=Ze(i.view[0].line),n=i.view[0].node):(t=Ze(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Ze(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(m=+d,function(e){return e.id==m}));return void(f.length&&(o=f[0].find(0))&&u(Ge(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var g=0;g<t.childNodes.length;g++)h(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var m}for(;h(t),t!=n;)t=t.nextSibling,l=!1;return o}(r,n,c,t,l)),d=Ge(r.doc,et(t,0),et(l,We(r.doc,l).text.length));h.length>1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,g=h[0],m=d[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Y(h),b=Y(d),_=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));p<_&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==d.length&&t==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var x=et(t,f),w=et(l,d.length?Y(d).length-p:0);return h.length>1||h[0]||tt(x,w)?(go(r.doc,h,x,w,"+input"),!0):void 0},ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},ja.prototype.reset=function(){this.forceCompositionEnd()},ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(e.cm)}))},ja.prototype.setUneditable=function(e){e.contentEditable="false"},ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Da)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ja.prototype.onContextMenu=function(){},ja.prototype.resetPosition=function(){},ja.prototype.needsContentAttribute=!0;var $a=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};$a.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ge(r,e)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Pa(r);La({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){ge(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!wn(e,t)&&!ge(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){wn(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$a.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},$a.prototype.showSelection=function(e){var t=this.cm.display;C(t.cursorDiv,e.cursors),C(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$a.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},$a.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||De(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Qr(t,(function(){Da(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Qi)(n.doc,Ti(o),V);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),A){we(e);var g=function(){fe(window,"mouseup",g),setTimeout(v,20)};he(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=wa&&i(e,t,n)}:i)}e.defineOption=n,e.Init=wa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Oi(e)}),!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Li(e),jn(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)go(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=wa&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){xa(e),gi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Zo(t),i=n!=wa&&Zo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),gi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),gi(e)}),!0),n("firstLineNumber",1,gi,!0),n("lineNumberFormatter",(function(e){return e}),gi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Tr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ta),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Li,!0),n("addModeClass",!1,Li,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Li,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ea),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Zo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");(function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)})(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,hr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void hr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Je(this.doc,e)&&Ma(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ma(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Ma(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Zi(this.doc,r,new Ai(o,c[r].to()),V)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,We(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==j(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ft(this,(e=at(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Gn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Wn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Zn(this,(e=$n(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=$n(this,{top:e,left:0},t||"page").top,Ke(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=We(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-qt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=Gn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Mr(o,a)).scrollTop&&Pr(o,s.scrollTop),null!=s.scrollLeft&&zr(o,s.scrollLeft))},triggerOnKeyDown:ti(ua),triggerOnKeyPress:ti(da),triggerOnKeyUp:ha,triggerOnMouseDown:ti(ma),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ra(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a<t&&!(o=Fa(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Fa(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),H)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ko(this,(function(n){var i=Fa(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=Gn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ba(this,l,i,n)).hitSide)break}return a},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Gn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ba(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Or(n,Wn(n,l,"div").top-s.top),l}),H),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=We(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=ee(o,i)?function(e){return ee(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Ai(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Dr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sn(this)-this.display.barHeight,width:e.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:Cn(this),clientWidth:En(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Ir(e),e.curOp.scrollToPos=t}(this,e):Rr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Bn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return Wr(this)},endOperation:function(){return Gr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;hr(this),this.curOp.forceUpdate=!0,jn(this),Dr(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,e),jn(this),this.display.input.reset(),Dr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ea);var Wa="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Lo.prototype)Lo.prototype.hasOwnProperty(Ga)&&j(Wa,Ga)<0&&(Ea.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lo.prototype[Ga]));return ye(Lo),Ea.inputStyles={textarea:$a,contenteditable:ja},Ea.defineMode=function(e){Ea.defaults.mode||"null"==e||(Ea.defaults.mode=e),ze.apply(this,arguments)},Ea.defineMIME=function(e,t){Ne[e]=t},Ea.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(e,t){Ea.prototype[e]=t},Ea.defineDocExtension=function(e,t){Lo.prototype[e]=t},Ea.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=D();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ea((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=_i,e.Doc=Lo,e.splitLines=Le,e.countColumn=F,e.findColumn=$,e.isWordChar=Q,e.Pass=U,e.signal=pe,e.Line=Wt,e.changeEnd=Si,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=Pe,e.mimeModes=Ne,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=je,e.extendMode=Ue,e.copyState=Ve,e.startState=He,e.innerMode=qe,e.commands=ta,e.keyMap=qo,e.keyName=Xo,e.isModifierKey=Go,e.lookupKey=Wo,e.normalizeKeyMap=$o,e.StringStream=$e,e.SharedTextMarker=Eo,e.TextMarker=To,e.LineWidget=wo,e.e_preventDefault=be,e.e_stopPropagation=_e,e.e_stop=we,e.addClass=I,e.contains=L,e.rmClass=S,e.keyNames=Bo}(Ea),Ea.version="5.65.1",Ea}()},31462:(e,t,n)=>{!function(e){"use strict";function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function n(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,n){var r=n.client||{},s=n.atoms||{false:!0,true:!0,null:!0},l=n.builtin||o(a),c=n.keywords||o(i),u=n.operatorChars||/^[*+\-%<>!=&|~^\/]/,h=n.support||{},d=n.hooks||{},f=n.dateSQL||{date:!0,time:!0,timestamp:!0},p=!1!==n.backslashStringEscapes,g=n.brackets||/^[\{}\(\)\[\]]/,m=n.punctuation||/^[;.,:]/;function v(e,t){var n=e.next();if(d[n]){var i=d[n](e,t);if(!1!==i)return i}if(h.hexNumber&&("0"==n&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(h.binaryNumber&&(("b"==n||"B"==n)&&e.match(/^'[01]+'/)||"0"==n&&e.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),h.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==n&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==n||'"'==n&&h.doubleQuote)return t.tokenize=y(n),t.tokenize(e,t);if((h.nCharCast&&("n"==n||"N"==n)||h.charsetCast&&"_"==n&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(h.escapeConstant&&("e"==n||"E"==n)&&("'"==e.peek()||'"'==e.peek()&&h.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=y(e.next(),!0))(e,t)},"keyword";if(h.commentSlashSlash&&"/"==n&&e.eat("/"))return e.skipToEnd(),"comment";if(h.commentHash&&"#"==n||"-"==n&&e.eat("-")&&(!h.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==n&&e.eat("*"))return t.tokenize=b(1),t.tokenize(e,t);if("."!=n){if(u.test(n))return e.eatWhile(u),"operator";if(g.test(n))return"bracket";if(m.test(n))return e.eatWhile(m),"punctuation";if("{"==n&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var o=e.current().toLowerCase();return f.hasOwnProperty(o)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":s.hasOwnProperty(o)?"atom":l.hasOwnProperty(o)?"type":c.hasOwnProperty(o)?"keyword":r.hasOwnProperty(o)?"builtin":null}return h.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:h.ODBCdotTable&&e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,t){return function(n,r){for(var i,o=!1;null!=(i=n.next());){if(i==e&&!o){r.tokenize=v;break}o=(p||t)&&!o&&"\\"==i}return"string"}}function b(e){return function(t,n){var r=t.match(/^.*?(\/\*|\*\/)/);return r?"/*"==r[1]?n.tokenize=b(e+1):n.tokenize=e>1?b(e-1):v:t.skipToEnd(),"comment"}}function _(e,t,n){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:n}}return{startState:function(){return{tokenize:v,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==v&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==n)return n;t.context&&null==t.context.align&&(t.context.align=!0);var r=e.current();return"("==r?_(e,t,")"):"["==r?_(e,t,"]"):t.context&&t.context.type==r&&function(e){e.indent=e.context.indent,e.context=e.context.prev}(t),n},indent:function(n,r){var i=n.context;if(!i)return e.Pass;var o=r.charAt(0)==i.type;return i.align?i.col+(o?0:1):i.indent+(o?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:h.commentSlashSlash?"//":h.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var i="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function o(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var a="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";e.defineMIME("text/x-sql",{name:"sql",keywords:o(i+"begin"),builtin:o(a),atoms:o("false true null unknown"),dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:o("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:o(i+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":n}}),e.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(i+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":n,"`":t,"\\":r}}),e.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(i+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":n,":":n,"?":n,$:n,'"':function(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(i+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:o("source"),keywords:o("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:o("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:o("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:o("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:o("source"),keywords:o("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:o("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("time"),support:o("decimallessFloat zerolessFloat binaryNumber hexNumber")})}(n(30339))},24718:(e,t,n)=>{var r=n(40118);e.exports=r},20521:(e,t,n)=>{var r=n(10658);e.exports=r},19266:(e,t,n)=>{var r=n(66630);e.exports=r},76411:(e,t,n)=>{n(78913),n(45085);var r=n(38254);e.exports=r("Array","flatMap")},46965:(e,t,n)=>{n(94672);var r=n(35099);e.exports=r.Object.entries},91717:(e,t,n)=>{n(9735);var r=n(35099);e.exports=r.Object.values},8773:(e,t,n)=>{var r=n(24718);e.exports=r},67686:(e,t,n)=>{var r=n(20521);e.exports=r},67772:(e,t,n)=>{var r=n(19266);e.exports=r},36581:(e,t,n)=>{var r=n(40660),i=n(83157),o=n(26726),a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not a function")}},7867:(e,t,n)=>{var r=n(90510),i=n(44214),o=n(77788),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1064:(e,t,n)=>{var r=n(40660),i=n(37729),o=r.String,a=r.TypeError;e.exports=function(e){if(i(e))return e;throw a(o(e)+" is not an object")}},94476:(e,t,n)=>{var r=n(67280),i=n(85957),o=n(15605),a=function(e){return function(t,n,a){var s,l=r(t),c=o(l),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},86915:(e,t,n)=>{var r=n(40660),i=n(49738),o=n(34144),a=n(37729),s=n(90510)("species"),l=r.Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,(o(t)&&(t===l||i(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?l:t}},52572:(e,t,n)=>{var r=n(86915);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},64537:(e,t,n)=>{var r=n(49822),i=r({}.toString),o=r("".slice);e.exports=function(e){return o(i(e),8,-1)}},51547:(e,t,n)=>{var r=n(40660),i=n(76270),o=n(83157),a=n(64537),s=n(90510)("toStringTag"),l=r.Object,c="Arguments"==a(function(){return arguments}());e.exports=i?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),s))?n:c?a(t):"Object"==(r=a(t))&&o(t.callee)?"Arguments":r}},68107:(e,t,n)=>{var r=n(26897),i=n(81900),o=n(79926),a=n(77788);e.exports=function(e,t,n){for(var s=i(t),l=a.f,c=o.f,u=0;u<s.length;u++){var h=s[u];r(e,h)||n&&r(n,h)||l(e,h,c(t,h))}}},71095:(e,t,n)=>{var r=n(46841),i=n(77788),o=n(38050);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},38050:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},46841:(e,t,n)=>{var r=n(76119);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},97137:(e,t,n)=>{var r=n(40660),i=n(37729),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},707:(e,t,n)=>{var r=n(66183);e.exports=r("navigator","userAgent")||""},31888:(e,t,n)=>{var r,i,o=n(40660),a=n(707),s=o.process,l=o.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},38254:(e,t,n)=>{var r=n(40660),i=n(49822);e.exports=function(e,t){return i(r[e].prototype[t])}},71852:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},43305:(e,t,n)=>{var r=n(40660),i=n(79926).f,o=n(71095),a=n(41541),s=n(69297),l=n(68107),c=n(32322);e.exports=function(e,t){var n,u,h,d,f,p=e.target,g=e.global,m=e.stat;if(n=g?r:m?r[p]||s(p,{}):(r[p]||{}).prototype)for(u in t){if(d=t[u],h=e.noTargetGet?(f=i(n,u))&&f.value:n[u],!c(g?u:p+(m?".":"#")+u,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(e.sham||h&&h.sham)&&o(d,"sham",!0),a(n,u,d,e)}}},76119:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},6680:(e,t,n)=>{"use strict";var r=n(40660),i=n(49738),o=n(15605),a=n(49777),s=r.TypeError,l=function(e,t,n,r,c,u,h,d){for(var f,p,g=c,m=0,v=!!h&&a(h,d);m<r;){if(m in n){if(f=v?v(n[m],m,t):n[m],u>0&&i(f))p=o(f),g=l(e,t,f,p,g,u-1)-1;else{if(g>=9007199254740991)throw s("Exceed the acceptable array length");e[g]=f}g++}m++}return g};e.exports=l},49777:(e,t,n)=>{var r=n(49822),i=n(36581),o=n(40323),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},40323:(e,t,n)=>{var r=n(76119);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},75287:(e,t,n)=>{var r=n(40323),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},99386:(e,t,n)=>{var r=n(46841),i=n(26897),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),l=s&&"something"===function(){}.name,c=s&&(!r||r&&a(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:c}},49822:(e,t,n)=>{var r=n(40323),i=Function.prototype,o=i.bind,a=i.call,s=r&&o.bind(a,a);e.exports=r?function(e){return e&&s(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},66183:(e,t,n)=>{var r=n(40660),i=n(83157),o=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},66143:(e,t,n)=>{var r=n(36581);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},40660:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},26897:(e,t,n)=>{var r=n(49822),i=n(84812),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(i(e),t)}},83078:e=>{e.exports={}},57126:(e,t,n)=>{var r=n(66183);e.exports=r("document","documentElement")},99771:(e,t,n)=>{var r=n(46841),i=n(76119),o=n(97137);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},33:(e,t,n)=>{var r=n(40660),i=n(49822),o=n(76119),a=n(64537),s=r.Object,l=i("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?l(e,""):s(e)}:s},89462:(e,t,n)=>{var r=n(49822),i=n(83157),o=n(64947),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(e){return a(e)}),e.exports=o.inspectSource},31058:(e,t,n)=>{var r,i,o,a=n(49926),s=n(40660),l=n(49822),c=n(37729),u=n(71095),h=n(26897),d=n(64947),f=n(85893),p=n(83078),g="Object already initialized",m=s.TypeError,v=s.WeakMap;if(a||d.state){var y=d.state||(d.state=new v),b=l(y.get),_=l(y.has),x=l(y.set);r=function(e,t){if(_(y,e))throw new m(g);return t.facade=e,x(y,e,t),t},i=function(e){return b(y,e)||{}},o=function(e){return _(y,e)}}else{var w=f("state");p[w]=!0,r=function(e,t){if(h(e,w))throw new m(g);return t.facade=e,u(e,w,t),t},i=function(e){return h(e,w)?e[w]:{}},o=function(e){return h(e,w)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw m("Incompatible receiver, "+e+" required");return n}}}},49738:(e,t,n)=>{var r=n(64537);e.exports=Array.isArray||function(e){return"Array"==r(e)}},83157:e=>{e.exports=function(e){return"function"==typeof e}},34144:(e,t,n)=>{var r=n(49822),i=n(76119),o=n(83157),a=n(51547),s=n(66183),l=n(89462),c=function(){},u=[],h=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.exec(c),g=function(e){if(!o(e))return!1;try{return h(c,u,e),!0}catch(e){return!1}},m=function(e){if(!o(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!f(d,l(e))}catch(e){return!0}};m.sham=!0,e.exports=!h||i((function(){var e;return g(g.call)||!g(Object)||!g((function(){e=!0}))||e}))?m:g},32322:(e,t,n)=>{var r=n(76119),i=n(83157),o=/#|\.prototype\./,a=function(e,t){var n=l[s(e)];return n==u||n!=c&&(i(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},37729:(e,t,n)=>{var r=n(83157);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},52147:e=>{e.exports=!1},77195:(e,t,n)=>{var r=n(40660),i=n(66183),o=n(83157),a=n(62839),s=n(98712),l=r.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&a(t.prototype,l(e))}},15605:(e,t,n)=>{var r=n(11247);e.exports=function(e){return r(e.length)}},1078:(e,t,n)=>{var r=n(31888),i=n(76119);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},49926:(e,t,n)=>{var r=n(40660),i=n(83157),o=n(89462),a=r.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},44214:(e,t,n)=>{var r,i=n(1064),o=n(49510),a=n(71852),s=n(83078),l=n(57126),c=n(97137),u=n(85893)("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;p="undefined"!=typeof document?document.domain&&r?f(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):f(r);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=i(e),n=new h,h.prototype=null,n[u]=e):n=p(),void 0===t?n:o.f(n,t)}},49510:(e,t,n)=>{var r=n(46841),i=n(70637),o=n(77788),a=n(1064),s=n(67280),l=n(6122);t.f=r&&!i?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),i=l(t),c=i.length,u=0;c>u;)o.f(e,n=i[u++],r[n]);return e}},77788:(e,t,n)=>{var r=n(40660),i=n(46841),o=n(99771),a=n(70637),s=n(1064),l=n(16114),c=r.TypeError,u=Object.defineProperty,h=Object.getOwnPropertyDescriptor;t.f=i?a?function(e,t,n){if(s(e),t=l(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=h(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=l(t),s(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},79926:(e,t,n)=>{var r=n(46841),i=n(75287),o=n(96215),a=n(38050),s=n(67280),l=n(16114),c=n(26897),u=n(99771),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=s(e),t=l(t),u)try{return h(e,t)}catch(e){}if(c(e,t))return a(!i(o.f,e,t),e[t])}},12416:(e,t,n)=>{var r=n(25592),i=n(71852).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},69887:(e,t)=>{t.f=Object.getOwnPropertySymbols},62839:(e,t,n)=>{var r=n(49822);e.exports=r({}.isPrototypeOf)},25592:(e,t,n)=>{var r=n(49822),i=n(26897),o=n(67280),a=n(94476).indexOf,s=n(83078),l=r([].push);e.exports=function(e,t){var n,r=o(e),c=0,u=[];for(n in r)!i(s,n)&&i(r,n)&&l(u,n);for(;t.length>c;)i(r,n=t[c++])&&(~a(u,n)||l(u,n));return u}},6122:(e,t,n)=>{var r=n(25592),i=n(71852);e.exports=Object.keys||function(e){return r(e,i)}},96215:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},47281:(e,t,n)=>{var r=n(46841),i=n(49822),o=n(6122),a=n(67280),s=i(n(96215).f),l=i([].push),c=function(e){return function(t){for(var n,i=a(t),c=o(i),u=c.length,h=0,d=[];u>h;)n=c[h++],r&&!s(i,n)||l(d,e?[n,i[n]]:i[n]);return d}};e.exports={entries:c(!0),values:c(!1)}},63640:(e,t,n)=>{var r=n(40660),i=n(75287),o=n(83157),a=n(37729),s=r.TypeError;e.exports=function(e,t){var n,r;if("string"===t&&o(n=e.toString)&&!a(r=i(n,e)))return r;if(o(n=e.valueOf)&&!a(r=i(n,e)))return r;if("string"!==t&&o(n=e.toString)&&!a(r=i(n,e)))return r;throw s("Can't convert object to primitive value")}},81900:(e,t,n)=>{var r=n(66183),i=n(49822),o=n(12416),a=n(69887),s=n(1064),l=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(s(e)),n=a.f;return n?l(t,n(e)):t}},35099:(e,t,n)=>{var r=n(40660);e.exports=r},41541:(e,t,n)=>{var r=n(40660),i=n(83157),o=n(26897),a=n(71095),s=n(69297),l=n(89462),c=n(31058),u=n(99386).CONFIGURABLE,h=c.get,d=c.enforce,f=String(String).split("String");(e.exports=function(e,t,n,l){var c,h=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,g=!!l&&!!l.noTargetGet,m=l&&void 0!==l.name?l.name:t;i(n)&&("Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||u&&n.name!==m)&&a(n,"name",m),(c=d(n)).source||(c.source=f.join("string"==typeof m?m:""))),e!==r?(h?!g&&e[t]&&(p=!0):delete e[t],p?e[t]=n:a(e,t,n)):p?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return i(this)&&h(this).source||l(this)}))},78401:(e,t,n)=>{var r=n(40660).TypeError;e.exports=function(e){if(null==e)throw r("Can't call method on "+e);return e}},69297:(e,t,n)=>{var r=n(40660),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},85893:(e,t,n)=>{var r=n(16810),i=n(86959),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},64947:(e,t,n)=>{var r=n(40660),i=n(69297),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},16810:(e,t,n)=>{var r=n(52147),i=n(64947);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.0",mode:r?"pure":"global",copyright:" 2014-2022 Denis Pushkarev (zloirock.ru)",license:"path_to_url",source:"path_to_url"})},85957:(e,t,n)=>{var r=n(82599),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},67280:(e,t,n)=>{var r=n(33),i=n(78401);e.exports=function(e){return r(i(e))}},82599:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){var r=+e;return r!=r||0===r?0:(r>0?n:t)(r)}},11247:(e,t,n)=>{var r=n(82599),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},84812:(e,t,n)=>{var r=n(40660),i=n(78401),o=r.Object;e.exports=function(e){return o(i(e))}},89301:(e,t,n)=>{var r=n(40660),i=n(75287),o=n(37729),a=n(77195),s=n(66143),l=n(63640),c=n(90510),u=r.TypeError,h=c("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,r=s(e,h);if(r){if(void 0===t&&(t="default"),n=i(r,e,t),!o(n)||a(n))return n;throw u("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},16114:(e,t,n)=>{var r=n(89301),i=n(77195);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},76270:(e,t,n)=>{var r={};r[n(90510)("toStringTag")]="z",e.exports="[object z]"===String(r)},26726:(e,t,n)=>{var r=n(40660).String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},86959:(e,t,n)=>{var r=n(49822),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},98712:(e,t,n)=>{var r=n(1078);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},70637:(e,t,n)=>{var r=n(46841),i=n(76119);e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},90510:(e,t,n)=>{var r=n(40660),i=n(16810),o=n(26897),a=n(86959),s=n(1078),l=n(98712),c=i("wks"),u=r.Symbol,h=u&&u.for,d=l?u:u&&u.withoutSetter||a;e.exports=function(e){if(!o(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&o(u,e)?c[e]=u[e]:c[e]=l&&h?h(t):d(t)}return c[e]}},78913:(e,t,n)=>{"use strict";var r=n(43305),i=n(6680),o=n(36581),a=n(84812),s=n(15605),l=n(52572);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),r=s(n);return o(e),(t=l(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},45085:(e,t,n)=>{n(7867)("flatMap")},94672:(e,t,n)=>{var r=n(43305),i=n(47281).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},9735:(e,t,n)=>{var r=n(43305),i=n(47281).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},40118:(e,t,n)=>{var r=n(76411);e.exports=r},10658:(e,t,n)=>{var r=n(46965);e.exports=r},66630:(e,t,n)=>{var r=n(91717);e.exports=r},3573:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(91247)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},91247:(e,t,n)=>{var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var l=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;l++;var i=t.formatters[r];if("function"==typeof i){var o=a[l];n=i.call(e,o),a.splice(l,1),l--}return n})),t.formatArgs.call(e,a);var c=n.log||t.log||console.log.bind(console);c.apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(34411),t.names=[],t.skips=[],t.formatters={}},86149:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){return function e(t,n,r){var i,o,a=window,s="application/octet-stream",l=r||s,c=t,u=!n&&!r&&c,h=document.createElement("a"),d=function(e){return String(e)},f=a.Blob||a.MozBlob||a.WebKitBlob||d,p=n||"download";if(f=f.call?f.bind(a):Blob,"true"===String(this)&&(l=(c=[c,l])[0],c=c[1]),u&&u.length<2048&&(p=u.split("/").pop().split("?")[0],h.href=u,-1!==h.href.indexOf(u))){var g=new XMLHttpRequest;return g.open("GET",u,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,p,s)},setTimeout((function(){g.send()}),0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&f!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(c),p):_(c);l=(c=b(c)).type||s}else if(/([\x80-\xff])/.test(c)){for(var m=0,v=new Uint8Array(c.length),y=v.length;m<y;++m)v[m]=c.charCodeAt(m);c=new f([v],{type:l})}function b(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),i=r.length,o=0,a=new Uint8Array(i);o<i;++o)a[o]=r.charCodeAt(o);return new f([a],{type:n})}function _(e,t){if("download"in h)return h.href=e,h.setAttribute("download",p),h.className="download-js-link",h.innerHTML="downloading...",h.style.display="none",document.body.appendChild(h),setTimeout((function(){h.click(),document.body.removeChild(h),!0===t&&setTimeout((function(){a.URL.revokeObjectURL(h.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),n.src=e,setTimeout((function(){document.body.removeChild(n)}),333)}if(i=c instanceof f?c:new f([c],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(i,p);if(a.URL)_(a.URL.createObjectURL(i),!0);else{if("string"==typeof i||i.constructor===d)try{return _("data:"+l+";base64,"+a.btoa(i))}catch(e){return _("data:"+l+","+encodeURIComponent(i))}(o=new FileReader).onload=function(e){_(this.result)},o.readAsDataURL(i)}return!0}})?n.apply(t,[]):n)||(e.exports=r)},59952:e=>{"use strict";e.exports=function(e,t,n){var r,i=e instanceof Error?e:new Error(e);if("object"==typeof t?n=t:null!=t&&(i.code=t),n)for(r in n)i[r]=n[r];return i}},4889:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,a,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=p(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},21722:(e,t,n)=>{var r;!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},24674:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,h=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof h&&(p=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=l(h,n),h!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(h,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(h,{name:n,newValue:i}));return h}},43239:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},33751:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},o={key:r,value:e[r]};return n(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,a;if(Array.isArray(t)){for(a="[",n=0;n<t.length;n++)n&&(a+=","),a+=e(t[n])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,l=Object.keys(t).sort(i&&i(t));for(a="",n=0;n<l.length;n++){var c=l[n],u=e(t[c]);u&&(a&&(a+=","),a+=JSON.stringify(c)+":"+u)}return o.splice(s,1),"{"+a+"}"}}(e)}},58636:(e,t,n)=>{const r=n(3573)("FastMutex"),i=()=>Math.random()+"",o=(e,t)=>{const n=(new Date).getTime();t.acquireEnd=n,t.acquireDuration=t.acquireEnd-t.acquireStart,t.lockStart=n,e(t)};e.exports=class{constructor({clientId:e=i(),xPrefix:t="_MUTEX_LOCK_X_",yPrefix:n="_MUTEX_LOCK_Y_",timeout:r=5e3,localStorage:o}={}){this.clientId=e,this.xPrefix=t,this.yPrefix=n,this.timeout=r,this.localStorage=o||window.localStorage,this.resetStats()}lock(e){r('Attempting to acquire Lock on "%s" using FastMutex instance "%s"',e,this.clientId);const t=this.xPrefix+e,n=this.yPrefix+e;return this.resetStats(),this.lockStats.acquireStart||(this.lockStats.acquireStart=(new Date).getTime()),new Promise(((i,a)=>{const s=e=>{if((new Date).getTime()-this.lockStats.acquireStart>=this.timeout)return r('Lock on "%s" could not be acquired within %sms by FastMutex client "%s"',e,this.timeout,this.clientId),a(new Error(`Lock could not be acquired within ${this.timeout}ms`));this.setItem(t,this.clientId);let l=this.getItem(n);if(l)return r("Lock exists on Y (%s), restarting...",l),this.lockStats.restartCount++,void setTimeout((()=>s(e)));this.setItem(n,this.clientId);let c=this.getItem(t);if(c!==this.clientId)return this.lockStats.contentionCount++,r('Lock contention detected. X="%s"',c),void setTimeout((()=>{l=this.getItem(n),l===this.clientId?(r('FastMutex client "%s" won the lock contention on "%s"',this.clientId,e),o(i,this.lockStats)):(this.lockStats.restartCount++,this.lockStats.locksLost++,r('FastMutex client "%s" lost the lock contention on "%s" to another process (%s). Restarting...',this.clientId,e,l),setTimeout((()=>s(e))))}),50);r('FastMutex client "%s" acquired a lock on "%s" with no contention',this.clientId,e),o(i,this.lockStats)};s(e)}))}release(e){r('FastMutex client "%s" is releasing lock on "%s"',this.clientId,e);const t=this.yPrefix+e;return new Promise((e=>{this.localStorage.removeItem(t),this.lockStats.lockEnd=(new Date).getTime(),this.lockStats.lockDuration=this.lockStats.lockEnd-this.lockStats.lockStart,e(this.lockStats),this.resetStats()}))}setItem(e,t){return this.localStorage.setItem(e,JSON.stringify({expiresAt:(new Date).getTime()+this.timeout,value:t}))}getItem(e){const t=this.localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return(new Date).getTime()-n.expiresAt>=this.timeout?(r('FastMutex client "%s" removed an expired record on "%s"',this.clientId,e),this.localStorage.removeItem(e),null):JSON.parse(t).value}resetStats(){this.lockStats={restartCount:0,locksLost:0,contentionCount:0,acquireDuration:0,acquireStart:null}}}},79836:(e,t,n)=>{"use strict";var r=n(91349),i=o(Error);function o(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=i,i.eval=o(EvalError),i.range=o(RangeError),i.reference=o(ReferenceError),i.syntax=o(SyntaxError),i.type=o(TypeError),i.uri=o(URIError),i.create=o},63259:function(e,t,n){var r;void 0===(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,n,a){var s=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?t(e,n,a):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var s="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}.apply(t,[]))||(e.exports=r)},51919:()=>{"use strict";"function"!=typeof Object.assign&&(Object.assign=function(e,...t){if(!e)throw TypeError("Cannot convert undefined or null to object");for(const n of t)n&&Object.keys(n).forEach((t=>e[t]=n[t]));return e})},91349:e=>{!function(){var t;function n(e){for(var t,n,r,i,o=1,a=[].slice.call(arguments),s=0,l=e.length,c="",u=!1,h=!1,d=function(){return a[o++]},f=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<l;++s)if(t=e[s],u)switch(u=!1,"."==t?(h=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(h=!0,t=e[s+=2]):h=!0,i=f(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":r=String(parseFloat(d()).toFixed(i||6)),c+=h?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},7057:(e,t,n)=>{var r;!function(i,o,a,s){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),h=Math.round,d=Math.abs,f=Date.now;function p(e,t,n){return setTimeout(x(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(m(e,n[t],n),!0)}function m(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function v(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==s&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var y=v((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===s)&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),b=v((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function _(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&l(r,n)}function x(e,t){return function(){return e.apply(t,arguments)}}function w(e,t){return"function"==typeof e?e.apply(t&&t[0]||s,t):e}function A(e,t){return e===s?t:e}function k(e,t,n){m(C(t),(function(t){e.addEventListener(t,n,!1)}))}function T(e,t,n){m(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function S(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function E(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function M(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function O(e){return Array.prototype.slice.call(e,0)}function L(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];M(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function D(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o<c.length;){if((r=(n=c[o])?n+i:t)in e)return r;o++}return s}var I=1;function R(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||i}var P="ontouchstart"in i,N=D(i,"PointerEvent")!==s,z=P&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",B="mouse",j=["x","y"],U=["clientX","clientY"];function V(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){w(e.options.enable,[e])&&n.handler(t)},this.init()}function q(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&t&&r-i==0,a=12&t&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=H(t)),i>1&&!n.firstMultiple?n.firstMultiple=H(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,l=a?a.center:o.center,c=t.center=$(r);t.timeStamp=f(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=X(l,c),t.distance=Y(l,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=G(t.deltaX,t.deltaY);var u,h,p=W(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=d(p.x)>d(p.y)?p.x:p.y,t.scale=a?(u=a.pointers,Y((h=r)[0],h[1],U)/Y(u[0],u[1],U)):1,t.rotation=a?function(e,t){return X(t[1],t[0],U)+X(e[1],e[0],U)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(l>25||a.velocity===s)){var c=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,h=W(l,c,u);r=h.x,i=h.y,n=d(h.x)>d(h.y)?h.x:h.y,o=G(c,u),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var g=e.element;S(t.srcEvent.target,g)&&(g=t.srcEvent.target),t.target=g}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:h(e.pointers[n].clientX),clientY:h(e.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:t,center:$(t),deltaX:e.deltaX,deltaY:e.deltaY}}function $(e){var t=e.length;if(1===t)return{x:h(e[0].clientX),y:h(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:h(n/t),y:h(r/t)}}function W(e,t,n){return{x:t/e||0,y:n/e||0}}function G(e,t){return e===t?1:d(e)>=d(t)?e<0?2:4:t<0?8:16}function Y(e,t,n){n||(n=j);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function X(e,t,n){n||(n=j);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(R(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4},K="mousedown",J="mousemove mouseup";function Q(){this.evEl=K,this.evWin=J,this.pressed=!1,V.apply(this,arguments)}_(Q,V,{handler:function(e){var t=Z[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:B,srcEvent:e}))}});var ee={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},te={2:F,3:"pen",4:B,5:"kinect"},ne="pointerdown",re="pointermove pointerup pointercancel";function ie(){this.evEl=ne,this.evWin=re,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(ne="MSPointerDown",re="MSPointerMove MSPointerUp MSPointerCancel"),_(ie,V,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=ee[r],o=te[e.pointerType]||e.pointerType,a=o==F,s=M(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var oe={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ae="touchstart",se="touchstart touchmove touchend touchcancel";function le(){this.evTarget=ae,this.evWin=se,this.started=!1,V.apply(this,arguments)}function ce(e,t){var n=O(e.touches),r=O(e.changedTouches);return 12&t&&(n=L(n.concat(r),"identifier",!0)),[n,r]}_(le,V,{handler:function(e){var t=oe[e.type];if(1===t&&(this.started=!0),this.started){var n=ce.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:e})}}});var ue={touchstart:1,touchmove:2,touchend:4,touchcancel:8},he="touchstart touchmove touchend touchcancel";function de(){this.evTarget=he,this.targetIds={},V.apply(this,arguments)}function fe(e,t){var n=O(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=O(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return S(e.target,l)})),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[L(o.concat(s),"identifier",!0),s]:void 0}function pe(){V.apply(this,arguments);var e=x(this.handler,this);this.touch=new de(this.manager,e),this.mouse=new Q(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ge(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function ve(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}_(de,V,{handler:function(e){var t=ue[e.type],n=fe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:e})}}),_(pe,V,{handler:function(e,t,n){var r=n.pointerType==F,i=n.pointerType==B;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ge.call(this,t,n);else if(i&&ve.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ye=D(u.style,"touchAction"),be=ye!==s,_e="compute",xe="auto",we="manipulation",Ae="none",ke="pan-x",Te="pan-y",Se=function(){if(!be)return!1;var e={},t=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||i.CSS.supports("touch-action",n)})),e}();function Ee(e,t){this.manager=e,this.set(t)}Ee.prototype={set:function(e){e==_e&&(e=this.compute()),be&&this.manager.element.style&&Se[e]&&(this.manager.element.style[ye]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return m(this.manager.recognizers,(function(t){w(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(E(e,Ae))return Ae;var t=E(e,ke),n=E(e,Te);return t&&n?Ae:t||n?t?ke:Te:E(e,we)?we:xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=E(r,Ae)&&!Se.none,o=E(r,Te)&&!Se["pan-y"],a=E(r,ke)&&!Se["pan-x"];if(i){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}if(!a||!o)return i||o&&6&n||a&&24&n?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Ce=32;function Me(e){this.options=l({},this.defaults,e||{}),this.id=I++,this.manager=null,this.options.enable=A(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Oe(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Le(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function De(e,t){var n=t.manager;return n?n.get(e):e}function Ie(){Me.apply(this,arguments)}function Re(){Ie.apply(this,arguments),this.pX=null,this.pY=null}function Pe(){Ie.apply(this,arguments)}function Ne(){Me.apply(this,arguments),this._timer=null,this._input=null}function ze(){Ie.apply(this,arguments)}function Fe(){Ie.apply(this,arguments)}function Be(){Me.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function je(e,t){return(t=t||{}).recognizers=A(t.recognizers,je.defaults.preset),new Ue(e,t)}function Ue(e,t){this.options=l({},je.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(N?ie:z?de:P?pe:Q))(this,q),this.touchAction=new Ee(this,this.options.touchAction),Ve(this,!0),m(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Ve(e,t){var n,r=e.element;r.style&&(m(e.options.cssProps,(function(i,o){n=D(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Me.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(g(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=De(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return g(e,"dropRecognizeWith",this)||(e=De(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(g(e,"requireFailure",this))return this;var t=this.requireFail;return-1===M(t,e=De(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(g(e,"dropRequireFailure",this))return this;e=De(e,this);var t=M(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Oe(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Oe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ce},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!w(this.options.enable,[this,t]))return this.reset(),void(this.state=Ce);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},_(Ie,Me,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:Ce}}),_(Re,Ie,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(Te),24&e&&t.push(ke),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Ie.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Le(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),_(Pe,Ie,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ae]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),_(Ne,Me,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Ce},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),_(ze,Ie,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ae]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),_(Fe,Ie,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Le(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),_(Be,Me,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[we]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0==this.count%t.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Ce},failTimeout:function(){return this._timer=p((function(){this.state=Ce}),this.options.interval,this),Ce},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),je.VERSION="2.0.7",je.defaults={domEvents:!1,touchAction:_e,enable:!0,inputTarget:null,inputClass:null,preset:[[ze,{enable:!1}],[Pe,{enable:!1},["rotate"]],[Fe,{direction:6}],[Re,{direction:6},["swipe"]],[Be],[Be,{event:"doubletap",taps:2},["tap"]],[Ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ue.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Me)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(g(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(g(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=M(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==s&&t!==s){var n=this.handlers;return m(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==s){var n=this.handlers;return m(C(e),(function(e){t?n[e]&&n[e].splice(M(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&Ve(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(je,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ce,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Ue,Input:V,TouchAction:Ee,TouchInput:de,MouseInput:Q,PointerEventInput:ie,TouchMouseInput:pe,SingleTouchInput:le,Recognizer:Me,AttrRecognizer:Ie,Tap:Be,Pan:Re,Swipe:Fe,Pinch:Pe,Rotate:ze,Press:Ne,on:k,off:T,each:m,merge:b,extend:y,assign:l,inherit:_,bindFn:x,prefixed:D}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=je,(r=function(){return je}.call(t,n,t,e))===s||(e.exports=r)}(window,document)},77175:function(e,t,n){var r;e=n.nmd(e),function(i){var o=(e&&e.exports,"object"==typeof n.g&&n.g);o.global!==o&&o.window;var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,l=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,u={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","":"DownBreve","":"tdot","":"DotDot","\t":"Tab","\n":"NewLine","":"puncsp","":"MediumSpace","":"thinsp","":"hairsp","":"emsp13","":"ensp","":"emsp14","":"emsp","":"numsp","":"nbsp","":"ThickSpace","":"oline",_:"lowbar","":"dash","":"ndash","":"mdash","":"horbar",",":"comma",";":"semi","":"bsemi",":":"colon","":"Colone","!":"excl","":"iexcl","?":"quest","":"iquest",".":"period","":"nldr","":"mldr","":"middot","'":"apos","":"lsquo","":"rsquo","":"sbquo","":"lsaquo","":"rsaquo",'"':"quot","":"ldquo","":"rdquo","":"bdquo","":"laquo","":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","":"lceil","":"rceil","":"lfloor","":"rfloor","":"lopar","":"ropar","":"lbrke","":"rbrke","":"lbrkslu","":"rbrksld","":"lbrksld","":"rbrkslu","":"langd","":"rangd","":"lparlt","":"rpargt","":"gtlPar","":"ltrPar","":"lobrk","":"robrk","":"lang","":"rang","":"Lang","":"Rang","":"loang","":"roang","":"lbbrk","":"rbbrk","":"Vert","":"sect","":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","":"permil","":"pertenk","":"dagger","":"Dagger","":"bull","":"hybull","":"prime","":"Prime","":"tprime","":"qprime","":"bprime","":"caret","`":"grave","":"acute","":"tilde","^":"Hat","":"macr","":"breve","":"dot","":"die","":"ring","":"dblac","":"cedil","":"ogon",:"circ",:"caron","":"deg","":"copy","":"reg","":"copysr",:"wp","":"rx","":"mho","":"iiota","":"larr","":"nlarr","":"rarr","":"nrarr","":"uarr","":"darr","":"harr","":"nharr","":"varr","":"nwarr","":"nearr","":"searr","":"swarr","":"rarrw","":"nrarrw","":"Larr","":"Uarr","":"Rarr","":"Darr","":"larrtl","":"rarrtl","":"mapstoleft","":"mapstoup","":"map","":"mapstodown","":"larrhk","":"rarrhk","":"larrlp","":"rarrlp","":"harrw","":"lsh","":"rsh","":"ldsh","":"rdsh","":"crarr","":"cularr","":"curarr","":"olarr","":"orarr","":"lharu","":"lhard","":"uharr","":"uharl","":"rharu","":"rhard","":"dharr","":"dharl","":"rlarr","":"udarr","":"lrarr","":"llarr","":"uuarr","":"rrarr","":"ddarr","":"lrhar","":"rlhar","":"lArr","":"nlArr","":"uArr","":"rArr","":"nrArr","":"dArr","":"iff","":"nhArr","":"vArr","":"nwArr","":"neArr","":"seArr","":"swArr","":"lAarr","":"rAarr","":"zigrarr","":"larrb","":"rarrb","":"duarr","":"loarr","":"roarr","":"hoarr","":"forall","":"comp","":"part","":"npart","":"exist","":"nexist","":"empty","":"Del","":"in","":"notin","":"ni","":"notni","":"bepsi","":"prod","":"coprod","":"sum","+":"plus","":"pm","":"div","":"times","<":"lt","":"nlt","<":"nvlt","=":"equals","":"ne","=":"bne","":"Equal",">":"gt","":"ngt",">":"nvgt","":"not","|":"vert","":"brvbar","":"minus","":"mp","":"plusdo","":"frasl","":"setmn","":"lowast","":"compfn","":"Sqrt","":"prop","":"infin","":"angrt","":"ang","":"nang","":"angmsd","":"angsph","":"mid","":"nmid","":"par","":"npar","":"and","":"or","":"cap","":"caps","":"cup","":"cups","":"int","":"Int","":"tint","":"qint","":"oint","":"Conint","":"Cconint","":"cwint","":"cwconint","":"awconint","":"there4","":"becaus","":"ratio","":"Colon","":"minusd","":"mDDot","":"homtht","":"sim","":"nsim","":"nvsim","":"bsim","":"race","":"ac","":"acE","":"acd","":"wr","":"esim","":"nesim","":"sime","":"nsime","":"cong","":"ncong","":"simne","":"ap","":"nap","":"ape","":"apid","":"napid","":"bcong","":"CupCap","":"NotCupCap","":"nvap","":"bump","":"nbump","":"bumpe","":"nbumpe","":"doteq","":"nedot","":"eDot","":"efDot","":"erDot","":"colone","":"ecolon","":"ecir","":"cire","":"wedgeq","":"veeeq","":"trie","":"equest","":"equiv","":"nequiv","":"bnequiv","":"le","":"nle","":"nvle","":"ge","":"nge","":"nvge","":"lE","":"nlE","":"gE","":"ngE","":"lvnE","":"lnE","":"gnE","":"gvnE","":"ll","":"nLtv","":"nLt","":"gg","":"nGtv","":"nGt","":"twixt","":"lsim","":"nlsim","":"gsim","":"ngsim","":"lg","":"ntlg","":"gl","":"ntgl","":"pr","":"npr","":"sc","":"nsc","":"prcue","":"nprcue","":"sccue","":"nsccue","":"prsim","":"scsim","":"NotSucceedsTilde","":"sub","":"nsub","":"vnsub","":"sup","":"nsup","":"vnsup","":"sube","":"nsube","":"supe","":"nsupe","":"vsubne","":"subne","":"vsupne","":"supne","":"cupdot","":"uplus","":"sqsub","":"NotSquareSubset","":"sqsup","":"NotSquareSuperset","":"sqsube","":"nsqsube","":"sqsupe","":"nsqsupe","":"sqcap","":"sqcaps","":"sqcup","":"sqcups","":"oplus","":"ominus","":"otimes","":"osol","":"odot","":"ocir","":"oast","":"odash","":"plusb","":"minusb","":"timesb","":"sdotb","":"vdash","":"nvdash","":"dashv","":"top","":"bot","":"models","":"vDash","":"nvDash","":"Vdash","":"nVdash","":"Vvdash","":"VDash","":"nVDash","":"prurel","":"vltri","":"nltri","":"vrtri","":"nrtri","":"ltrie","":"nltrie","":"nvltrie","":"rtrie","":"nrtrie","":"nvrtrie","":"origof","":"imof","":"mumap","":"hercon","":"intcal","":"veebar","":"barvee","":"angrtvb","":"lrtri","":"Wedge","":"Vee","":"xcap","":"xcup","":"diam","":"sdot","":"Star","":"divonx","":"bowtie","":"ltimes","":"rtimes","":"lthree","":"rthree","":"bsime","":"cuvee","":"cuwed","":"Sub","":"Sup","":"Cap","":"Cup","":"fork","":"epar","":"ltdot","":"gtdot","":"Ll","":"nLl","":"Gg","":"nGg","":"lesg","":"leg","":"gel","":"gesl","":"cuepr","":"cuesc","":"lnsim","":"gnsim","":"prnsim","":"scnsim","":"vellip","":"ctdot","":"utdot","":"dtdot","":"disin","":"isinsv","":"isins","":"isindot","":"notindot","":"notinvc","":"notinvb","":"isinE","":"notinE","":"nisd","":"xnis","":"nis","":"notnivc","":"notnivb","":"barwed","":"Barwed","":"drcrop","":"dlcrop","":"urcrop","":"ulcrop","":"bnot","":"profline","":"profsurf","":"telrec","":"target","":"ulcorn","":"urcorn","":"dlcorn","":"drcorn","":"frown","":"smile","":"cylcty","":"profalar","":"topbot","":"ovbar","":"solbar","":"angzarr","":"lmoust","":"rmoust","":"tbrk","":"bbrk","":"bbrktbrk","":"OverParenthesis","":"UnderParenthesis","":"OverBrace","":"UnderBrace","":"trpezium","":"elinters","":"blank","":"boxh","":"boxv","":"boxdr","":"boxdl","":"boxur","":"boxul","":"boxvr","":"boxvl","":"boxhd","":"boxhu","":"boxvh","":"boxH","":"boxV","":"boxdR","":"boxDr","":"boxDR","":"boxdL","":"boxDl","":"boxDL","":"boxuR","":"boxUr","":"boxUR","":"boxuL","":"boxUl","":"boxUL","":"boxvR","":"boxVr","":"boxVR","":"boxvL","":"boxVl","":"boxVL","":"boxHd","":"boxhD","":"boxHD","":"boxHu","":"boxhU","":"boxHU","":"boxvH","":"boxVh","":"boxVH","":"uhblk","":"lhblk","":"block","":"blk14","":"blk12","":"blk34","":"squ","":"squf","":"EmptyVerySmallSquare","":"rect","":"marker","":"fltns","":"xutri","":"utrif","":"utri","":"rtrif","":"rtri","":"xdtri","":"dtrif","":"dtri","":"ltrif","":"ltri","":"loz","":"cir","":"tridot","":"xcirc","":"ultri","":"urtri","":"lltri","":"EmptySmallSquare","":"FilledSmallSquare","":"starf","":"star","":"phone","":"female","":"male","":"spades","":"clubs","":"hearts","":"diams","":"sung","":"check","":"cross","":"malt","":"sext","":"VerticalSeparator","":"bsolhsub","":"suphsol","":"xlarr","":"xrarr","":"xharr","":"xlArr","":"xrArr","":"xhArr","":"xmap","":"dzigrarr","":"nvlArr","":"nvrArr","":"nvHarr","":"Map","":"lbarr","":"rbarr","":"lBarr","":"rBarr","":"RBarr","":"DDotrahd","":"UpArrowBar","":"DownArrowBar","":"Rarrtl","":"latail","":"ratail","":"lAtail","":"rAtail","":"larrfs","":"rarrfs","":"larrbfs","":"rarrbfs","":"nwarhk","":"nearhk","":"searhk","":"swarhk","":"nwnear","":"toea","":"tosa","":"swnwar","":"rarrc","":"nrarrc","":"cudarrr","":"ldca","":"rdca","":"cudarrl","":"larrpl","":"curarrm","":"cularrp","":"rarrpl","":"harrcir","":"Uarrocir","":"lurdshar","":"ldrushar","":"LeftRightVector","":"RightUpDownVector","":"DownLeftRightVector","":"LeftUpDownVector","":"LeftVectorBar","":"RightVectorBar","":"RightUpVectorBar","":"RightDownVectorBar","":"DownLeftVectorBar","":"DownRightVectorBar","":"LeftUpVectorBar","":"LeftDownVectorBar","":"LeftTeeVector","":"RightTeeVector","":"RightUpTeeVector","":"RightDownTeeVector","":"DownLeftTeeVector","":"DownRightTeeVector","":"LeftUpTeeVector","":"LeftDownTeeVector","":"lHar","":"uHar","":"rHar","":"dHar","":"luruhar","":"ldrdhar","":"ruluhar","":"rdldhar","":"lharul","":"llhard","":"rharul","":"lrhard","":"udhar","":"duhar","":"RoundImplies","":"erarr","":"simrarr","":"larrsim","":"rarrsim","":"rarrap","":"ltlarr","":"gtrarr","":"subrarr","":"suplarr","":"lfisht","":"rfisht","":"ufisht","":"dfisht","":"vzigzag","":"vangrt","":"angrtvbd","":"ange","":"range","":"dwangle","":"uwangle","":"angmsdaa","":"angmsdab","":"angmsdac","":"angmsdad","":"angmsdae","":"angmsdaf","":"angmsdag","":"angmsdah","":"bemptyv","":"demptyv","":"cemptyv","":"raemptyv","":"laemptyv","":"ohbar","":"omid","":"opar","":"operp","":"olcross","":"odsold","":"olcir","":"ofcir","":"olt","":"ogt","":"cirscir","":"cirE","":"solb","":"bsolb","":"boxbox","":"trisb","":"rtriltri","":"LeftTriangleBar","":"NotLeftTriangleBar","":"RightTriangleBar","":"NotRightTriangleBar","":"iinfin","":"infintie","":"nvinfin","":"eparsl","":"smeparsl","":"eqvparsl","":"lozf","":"RuleDelayed","":"dsol","":"xodot","":"xoplus","":"xotime","":"xuplus","":"xsqcup","":"fpartint","":"cirfnint","":"awint","":"rppolint","":"scpolint","":"npolint","":"pointint","":"quatint","":"intlarhk","":"pluscir","":"plusacir","":"simplus","":"plusdu","":"plussim","":"plustwo","":"mcomma","":"minusdu","":"loplus","":"roplus","":"Cross","":"timesd","":"timesbar","":"smashp","":"lotimes","":"rotimes","":"otimesas","":"Otimes","":"odiv","":"triplus","":"triminus","":"tritime","":"iprod","":"amalg","":"capdot","":"ncup","":"ncap","":"capand","":"cupor","":"cupcap","":"capcup","":"cupbrcap","":"capbrcup","":"cupcup","":"capcap","":"ccups","":"ccaps","":"ccupssm","":"And","":"Or","":"andand","":"oror","":"orslope","":"andslope","":"andv","":"orv","":"andd","":"ord","":"wedbar","":"sdote","":"simdot","":"congdot","":"ncongdot","":"easter","":"apacir","":"apE","":"napE","":"eplus","":"pluse","":"Esim","":"eDDot","":"equivDD","":"ltcir","":"gtcir","":"ltquest","":"gtquest","":"les","":"nles","":"ges","":"nges","":"lesdot","":"gesdot","":"lesdoto","":"gesdoto","":"lesdotor","":"gesdotol","":"lap","":"gap","":"lne","":"gne","":"lnap","":"gnap","":"lEg","":"gEl","":"lsime","":"gsime","":"lsimg","":"gsiml","":"lgE","":"glE","":"lesges","":"gesles","":"els","":"egs","":"elsdot","":"egsdot","":"el","":"eg","":"siml","":"simg","":"simlE","":"simgE","":"LessLess","":"NotNestedLessLess","":"GreaterGreater","":"NotNestedGreaterGreater","":"glj","":"gla","":"ltcc","":"gtcc","":"lescc","":"gescc","":"smt","":"lat","":"smte","":"smtes","":"late","":"lates","":"bumpE","":"pre","":"npre","":"sce","":"nsce","":"prE","":"scE","":"prnE","":"scnE","":"prap","":"scap","":"prnap","":"scnap","":"Pr","":"Sc","":"subdot","":"supdot","":"subplus","":"supplus","":"submult","":"supmult","":"subedot","":"supedot","":"subE","":"nsubE","":"supE","":"nsupE","":"subsim","":"supsim","":"vsubnE","":"subnE","":"vsupnE","":"supnE","":"csub","":"csup","":"csube","":"csupe","":"subsup","":"supsub","":"subsub","":"supsup","":"suphsub","":"supdsub","":"forkv","":"topfork","":"mlcp","":"Dashv","":"Vdashl","":"Barv","":"vBar","":"vBarv","":"Vbar","":"Not","":"bNot","":"rnmid","":"cirmid","":"midcir","":"topcir","":"nhpar","":"parsim","":"parsl","":"nparsl","":"flat","":"natur","":"sharp","":"curren","":"cent",$:"dollar","":"pound","":"yen","":"euro","":"sup1","":"half","":"frac13","":"frac14","":"frac15","":"frac16","":"frac18","":"sup2","":"frac23","":"frac25","":"sup3","":"frac34","":"frac35","":"frac38","":"frac45","":"frac56","":"frac58","":"frac78",:"ascr",:"aopf",:"afr",:"Aopf",:"Afr",:"Ascr",:"ordf",:"aacute",:"Aacute",:"agrave",:"Agrave",:"abreve",:"Abreve",:"acirc",:"Acirc",:"aring",:"angst",:"auml",:"Auml",:"atilde",:"Atilde",:"aogon",:"Aogon",:"amacr",:"Amacr",:"aelig",:"AElig",:"bscr",:"bopf",:"bfr",:"Bopf",:"Bscr",:"Bfr",:"cfr",:"cscr",:"copf",:"Cfr",:"Cscr",:"Copf",:"cacute",:"Cacute",:"ccirc",:"Ccirc",:"ccaron",:"Ccaron",:"cdot",:"Cdot",:"ccedil",:"Ccedil","":"incare",:"dfr",:"dd",:"dopf",:"dscr",:"Dscr",:"Dfr",:"DD",:"Dopf",:"dcaron",:"Dcaron",:"dstrok",:"Dstrok",:"eth",:"ETH",:"ee",:"escr",:"efr",:"eopf",:"Escr",:"Efr",:"Eopf",:"eacute",:"Eacute",:"egrave",:"Egrave",:"ecirc",:"Ecirc",:"ecaron",:"Ecaron",:"euml",:"Euml",:"edot",:"Edot",:"eogon",:"Eogon",:"emacr",:"Emacr",:"ffr",:"fopf",:"fscr",:"Ffr",:"Fopf",:"Fscr",:"fflig",:"ffilig",:"ffllig",:"filig",fj:"fjlig",:"fllig",:"fnof",:"gscr",:"gopf",:"gfr",:"Gscr",:"Gopf",:"Gfr",:"gacute",:"gbreve",:"Gbreve",:"gcirc",:"Gcirc",:"gdot",:"Gdot",:"Gcedil",:"hfr",:"planckh",:"hscr",:"hopf",:"Hscr",:"Hfr",:"Hopf",:"hcirc",:"Hcirc",:"hbar",:"hstrok",:"Hstrok",:"iopf",:"ifr",:"iscr",:"ii",:"Iopf",:"Iscr",:"Im",:"iacute",:"Iacute",:"igrave",:"Igrave",:"icirc",:"Icirc",:"iuml",:"Iuml",:"itilde",:"Itilde",:"Idot",:"iogon",:"Iogon",:"imacr",:"Imacr",:"ijlig",:"IJlig",:"imath",:"jscr",:"jopf",:"jfr",:"Jscr",:"Jfr",:"Jopf",:"jcirc",:"Jcirc",:"jmath",:"kopf",:"kscr",:"kfr",:"Kscr",:"Kopf",:"Kfr",:"kcedil",:"Kcedil",:"lfr",:"lscr",:"ell",:"lopf",:"Lscr",:"Lfr",:"Lopf",:"lacute",:"Lacute",:"lcaron",:"Lcaron",:"lcedil",:"Lcedil",:"lstrok",:"Lstrok",:"lmidot",:"Lmidot",:"mfr",:"mopf",:"mscr",:"Mfr",:"Mopf",:"Mscr",:"nfr",:"nopf",:"nscr",:"Nopf",:"Nscr",:"Nfr",:"nacute",:"Nacute",:"ncaron",:"Ncaron",:"ntilde",:"Ntilde",:"ncedil",:"Ncedil","":"numero",:"eng",:"ENG",:"oopf",:"ofr",:"oscr",:"Oscr",:"Ofr",:"Oopf",:"ordm",:"oacute",:"Oacute",:"ograve",:"Ograve",:"ocirc",:"Ocirc",:"ouml",:"Ouml",:"odblac",:"Odblac",:"otilde",:"Otilde",:"oslash",:"Oslash",:"omacr",:"Omacr",:"oelig",:"OElig",:"pfr",:"pscr",:"popf",:"Popf",:"Pfr",:"Pscr",:"qopf",:"qfr",:"qscr",:"Qscr",:"Qfr",:"Qopf",:"kgreen",:"rfr",:"ropf",:"rscr",:"Rscr",:"Re",:"Ropf",:"racute",:"Racute",:"rcaron",:"Rcaron",:"rcedil",:"Rcedil",:"sopf",:"sscr",:"sfr",:"Sopf",:"Sfr",:"Sscr","":"oS",:"sacute",:"Sacute",:"scirc",:"Scirc",:"scaron",:"Scaron",:"scedil",:"Scedil",:"szlig",:"tfr",:"tscr",:"topf",:"Tscr",:"Tfr",:"Topf",:"tcaron",:"Tcaron",:"tcedil",:"Tcedil","":"trade",:"tstrok",:"Tstrok",:"uscr",:"uopf",:"ufr",:"Uopf",:"Ufr",:"Uscr",:"uacute",:"Uacute",:"ugrave",:"Ugrave",:"ubreve",:"Ubreve",:"ucirc",:"Ucirc",:"uring",:"Uring",:"uuml",:"Uuml",:"udblac",:"Udblac",:"utilde",:"Utilde",:"uogon",:"Uogon",:"umacr",:"Umacr",:"vfr",:"vopf",:"vscr",:"Vfr",:"Vopf",:"Vscr",:"wopf",:"wscr",:"wfr",:"Wscr",:"Wopf",:"Wfr",:"wcirc",:"Wcirc",:"xfr",:"xscr",:"xopf",:"Xopf",:"Xfr",:"Xscr",:"yfr",:"yscr",:"yopf",:"Yscr",:"Yfr",:"Yopf",:"yacute",:"Yacute",:"ycirc",:"Ycirc",:"yuml",:"Yuml",:"zscr",:"zfr",:"zopf",:"Zfr",:"Zopf",:"Zscr",:"zacute",:"Zacute",:"zcaron",:"Zcaron",:"zdot",:"Zdot",:"imped",:"thorn",:"THORN",:"napos",:"alpha",:"Alpha",:"beta",:"Beta",:"gamma",:"Gamma",:"delta",:"Delta",:"epsi",:"epsiv",:"Epsilon",:"gammad",:"Gammad",:"zeta",:"Zeta",:"eta",:"Eta",:"theta",:"thetav",:"Theta",:"iota",:"Iota",:"kappa",:"kappav",:"Kappa",:"lambda",:"Lambda",:"mu",:"micro",:"Mu",:"nu",:"Nu",:"xi",:"Xi",:"omicron",:"Omicron",:"pi",:"piv",:"Pi",:"rho",:"rhov",:"Rho",:"sigma",:"Sigma",:"sigmaf",:"tau",:"Tau",:"upsi",:"Upsilon",:"Upsi",:"phi",:"phiv",:"Phi",:"chi",:"Chi",:"psi",:"Psi",:"omega",:"ohm",:"acy",:"Acy",:"bcy",:"Bcy",:"vcy",:"Vcy",:"gcy",:"Gcy",:"gjcy",:"GJcy",:"dcy",:"Dcy",:"djcy",:"DJcy",:"iecy",:"IEcy",:"iocy",:"IOcy",:"jukcy",:"Jukcy",:"zhcy",:"ZHcy",:"zcy",:"Zcy",:"dscy",:"DScy",:"icy",:"Icy",:"iukcy",:"Iukcy",:"yicy",:"YIcy",:"jcy",:"Jcy",:"jsercy",:"Jsercy",:"kcy",:"Kcy",:"kjcy",:"KJcy",:"lcy",:"Lcy",:"ljcy",:"LJcy",:"mcy",:"Mcy",:"ncy",:"Ncy",:"njcy",:"NJcy",:"ocy",:"Ocy",:"pcy",:"Pcy",:"rcy",:"Rcy",:"scy",:"Scy",:"tcy",:"Tcy",:"tshcy",:"TSHcy",:"ucy",:"Ucy",:"ubrcy",:"Ubrcy",:"fcy",:"Fcy",:"khcy",:"KHcy",:"tscy",:"TScy",:"chcy",:"CHcy",:"dzcy",:"DZcy",:"shcy",:"SHcy",:"shchcy",:"SHCHcy",:"hardcy",:"HARDcy",:"ycy",:"Ycy",:"softcy",:"SOFTcy",:"ecy",:"Ecy",:"yucy",:"YUcy",:"yacy",:"YAcy",:"aleph",:"beth",:"gimel",:"daleth"},h=/["&'<>`]/g,d={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,p=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,m={aacute:"",Aacute:"",abreve:"",Abreve:"",ac:"",acd:"",acE:"",acirc:"",Acirc:"",acute:"",acy:"",Acy:"",aelig:"",AElig:"",af:"",afr:"",Afr:"",agrave:"",Agrave:"",alefsym:"",aleph:"",alpha:"",Alpha:"",amacr:"",Amacr:"",amalg:"",amp:"&",AMP:"&",and:"",And:"",andand:"",andd:"",andslope:"",andv:"",ang:"",ange:"",angle:"",angmsd:"",angmsdaa:"",angmsdab:"",angmsdac:"",angmsdad:"",angmsdae:"",angmsdaf:"",angmsdag:"",angmsdah:"",angrt:"",angrtvb:"",angrtvbd:"",angsph:"",angst:"",angzarr:"",aogon:"",Aogon:"",aopf:"",Aopf:"",ap:"",apacir:"",ape:"",apE:"",apid:"",apos:"'",ApplyFunction:"",approx:"",approxeq:"",aring:"",Aring:"",ascr:"",Ascr:"",Assign:"",ast:"*",asymp:"",asympeq:"",atilde:"",Atilde:"",auml:"",Auml:"",awconint:"",awint:"",backcong:"",backepsilon:"",backprime:"",backsim:"",backsimeq:"",Backslash:"",Barv:"",barvee:"",barwed:"",Barwed:"",barwedge:"",bbrk:"",bbrktbrk:"",bcong:"",bcy:"",Bcy:"",bdquo:"",becaus:"",because:"",Because:"",bemptyv:"",bepsi:"",bernou:"",Bernoullis:"",beta:"",Beta:"",beth:"",between:"",bfr:"",Bfr:"",bigcap:"",bigcirc:"",bigcup:"",bigodot:"",bigoplus:"",bigotimes:"",bigsqcup:"",bigstar:"",bigtriangledown:"",bigtriangleup:"",biguplus:"",bigvee:"",bigwedge:"",bkarow:"",blacklozenge:"",blacksquare:"",blacktriangle:"",blacktriangledown:"",blacktriangleleft:"",blacktriangleright:"",blank:"",blk12:"",blk14:"",blk34:"",block:"",bne:"=",bnequiv:"",bnot:"",bNot:"",bopf:"",Bopf:"",bot:"",bottom:"",bowtie:"",boxbox:"",boxdl:"",boxdL:"",boxDl:"",boxDL:"",boxdr:"",boxdR:"",boxDr:"",boxDR:"",boxh:"",boxH:"",boxhd:"",boxhD:"",boxHd:"",boxHD:"",boxhu:"",boxhU:"",boxHu:"",boxHU:"",boxminus:"",boxplus:"",boxtimes:"",boxul:"",boxuL:"",boxUl:"",boxUL:"",boxur:"",boxuR:"",boxUr:"",boxUR:"",boxv:"",boxV:"",boxvh:"",boxvH:"",boxVh:"",boxVH:"",boxvl:"",boxvL:"",boxVl:"",boxVL:"",boxvr:"",boxvR:"",boxVr:"",boxVR:"",bprime:"",breve:"",Breve:"",brvbar:"",bscr:"",Bscr:"",bsemi:"",bsim:"",bsime:"",bsol:"\\",bsolb:"",bsolhsub:"",bull:"",bullet:"",bump:"",bumpe:"",bumpE:"",bumpeq:"",Bumpeq:"",cacute:"",Cacute:"",cap:"",Cap:"",capand:"",capbrcup:"",capcap:"",capcup:"",capdot:"",CapitalDifferentialD:"",caps:"",caret:"",caron:"",Cayleys:"",ccaps:"",ccaron:"",Ccaron:"",ccedil:"",Ccedil:"",ccirc:"",Ccirc:"",Cconint:"",ccups:"",ccupssm:"",cdot:"",Cdot:"",cedil:"",Cedilla:"",cemptyv:"",cent:"",centerdot:"",CenterDot:"",cfr:"",Cfr:"",chcy:"",CHcy:"",check:"",checkmark:"",chi:"",Chi:"",cir:"",circ:"",circeq:"",circlearrowleft:"",circlearrowright:"",circledast:"",circledcirc:"",circleddash:"",CircleDot:"",circledR:"",circledS:"",CircleMinus:"",CirclePlus:"",CircleTimes:"",cire:"",cirE:"",cirfnint:"",cirmid:"",cirscir:"",ClockwiseContourIntegral:"",CloseCurlyDoubleQuote:"",CloseCurlyQuote:"",clubs:"",clubsuit:"",colon:":",Colon:"",colone:"",Colone:"",coloneq:"",comma:",",commat:"@",comp:"",compfn:"",complement:"",complexes:"",cong:"",congdot:"",Congruent:"",conint:"",Conint:"",ContourIntegral:"",copf:"",Copf:"",coprod:"",Coproduct:"",copy:"",COPY:"",copysr:"",CounterClockwiseContourIntegral:"",crarr:"",cross:"",Cross:"",cscr:"",Cscr:"",csub:"",csube:"",csup:"",csupe:"",ctdot:"",cudarrl:"",cudarrr:"",cuepr:"",cuesc:"",cularr:"",cularrp:"",cup:"",Cup:"",cupbrcap:"",cupcap:"",CupCap:"",cupcup:"",cupdot:"",cupor:"",cups:"",curarr:"",curarrm:"",curlyeqprec:"",curlyeqsucc:"",curlyvee:"",curlywedge:"",curren:"",curvearrowleft:"",curvearrowright:"",cuvee:"",cuwed:"",cwconint:"",cwint:"",cylcty:"",dagger:"",Dagger:"",daleth:"",darr:"",dArr:"",Darr:"",dash:"",dashv:"",Dashv:"",dbkarow:"",dblac:"",dcaron:"",Dcaron:"",dcy:"",Dcy:"",dd:"",DD:"",ddagger:"",ddarr:"",DDotrahd:"",ddotseq:"",deg:"",Del:"",delta:"",Delta:"",demptyv:"",dfisht:"",dfr:"",Dfr:"",dHar:"",dharl:"",dharr:"",DiacriticalAcute:"",DiacriticalDot:"",DiacriticalDoubleAcute:"",DiacriticalGrave:"`",DiacriticalTilde:"",diam:"",diamond:"",Diamond:"",diamondsuit:"",diams:"",die:"",DifferentialD:"",digamma:"",disin:"",div:"",divide:"",divideontimes:"",divonx:"",djcy:"",DJcy:"",dlcorn:"",dlcrop:"",dollar:"$",dopf:"",Dopf:"",dot:"",Dot:"",DotDot:"",doteq:"",doteqdot:"",DotEqual:"",dotminus:"",dotplus:"",dotsquare:"",doublebarwedge:"",DoubleContourIntegral:"",DoubleDot:"",DoubleDownArrow:"",DoubleLeftArrow:"",DoubleLeftRightArrow:"",DoubleLeftTee:"",DoubleLongLeftArrow:"",DoubleLongLeftRightArrow:"",DoubleLongRightArrow:"",DoubleRightArrow:"",DoubleRightTee:"",DoubleUpArrow:"",DoubleUpDownArrow:"",DoubleVerticalBar:"",downarrow:"",Downarrow:"",DownArrow:"",DownArrowBar:"",DownArrowUpArrow:"",DownBreve:"",downdownarrows:"",downharpoonleft:"",downharpoonright:"",DownLeftRightVector:"",DownLeftTeeVector:"",DownLeftVector:"",DownLeftVectorBar:"",DownRightTeeVector:"",DownRightVector:"",DownRightVectorBar:"",DownTee:"",DownTeeArrow:"",drbkarow:"",drcorn:"",drcrop:"",dscr:"",Dscr:"",dscy:"",DScy:"",dsol:"",dstrok:"",Dstrok:"",dtdot:"",dtri:"",dtrif:"",duarr:"",duhar:"",dwangle:"",dzcy:"",DZcy:"",dzigrarr:"",eacute:"",Eacute:"",easter:"",ecaron:"",Ecaron:"",ecir:"",ecirc:"",Ecirc:"",ecolon:"",ecy:"",Ecy:"",eDDot:"",edot:"",eDot:"",Edot:"",ee:"",efDot:"",efr:"",Efr:"",eg:"",egrave:"",Egrave:"",egs:"",egsdot:"",el:"",Element:"",elinters:"",ell:"",els:"",elsdot:"",emacr:"",Emacr:"",empty:"",emptyset:"",EmptySmallSquare:"",emptyv:"",EmptyVerySmallSquare:"",emsp:"",emsp13:"",emsp14:"",eng:"",ENG:"",ensp:"",eogon:"",Eogon:"",eopf:"",Eopf:"",epar:"",eparsl:"",eplus:"",epsi:"",epsilon:"",Epsilon:"",epsiv:"",eqcirc:"",eqcolon:"",eqsim:"",eqslantgtr:"",eqslantless:"",Equal:"",equals:"=",EqualTilde:"",equest:"",Equilibrium:"",equiv:"",equivDD:"",eqvparsl:"",erarr:"",erDot:"",escr:"",Escr:"",esdot:"",esim:"",Esim:"",eta:"",Eta:"",eth:"",ETH:"",euml:"",Euml:"",euro:"",excl:"!",exist:"",Exists:"",expectation:"",exponentiale:"",ExponentialE:"",fallingdotseq:"",fcy:"",Fcy:"",female:"",ffilig:"",fflig:"",ffllig:"",ffr:"",Ffr:"",filig:"",FilledSmallSquare:"",FilledVerySmallSquare:"",fjlig:"fj",flat:"",fllig:"",fltns:"",fnof:"",fopf:"",Fopf:"",forall:"",ForAll:"",fork:"",forkv:"",Fouriertrf:"",fpartint:"",frac12:"",frac13:"",frac14:"",frac15:"",frac16:"",frac18:"",frac23:"",frac25:"",frac34:"",frac35:"",frac38:"",frac45:"",frac56:"",frac58:"",frac78:"",frasl:"",frown:"",fscr:"",Fscr:"",gacute:"",gamma:"",Gamma:"",gammad:"",Gammad:"",gap:"",gbreve:"",Gbreve:"",Gcedil:"",gcirc:"",Gcirc:"",gcy:"",Gcy:"",gdot:"",Gdot:"",ge:"",gE:"",gel:"",gEl:"",geq:"",geqq:"",geqslant:"",ges:"",gescc:"",gesdot:"",gesdoto:"",gesdotol:"",gesl:"",gesles:"",gfr:"",Gfr:"",gg:"",Gg:"",ggg:"",gimel:"",gjcy:"",GJcy:"",gl:"",gla:"",glE:"",glj:"",gnap:"",gnapprox:"",gne:"",gnE:"",gneq:"",gneqq:"",gnsim:"",gopf:"",Gopf:"",grave:"`",GreaterEqual:"",GreaterEqualLess:"",GreaterFullEqual:"",GreaterGreater:"",GreaterLess:"",GreaterSlantEqual:"",GreaterTilde:"",gscr:"",Gscr:"",gsim:"",gsime:"",gsiml:"",gt:">",Gt:"",GT:">",gtcc:"",gtcir:"",gtdot:"",gtlPar:"",gtquest:"",gtrapprox:"",gtrarr:"",gtrdot:"",gtreqless:"",gtreqqless:"",gtrless:"",gtrsim:"",gvertneqq:"",gvnE:"",Hacek:"",hairsp:"",half:"",hamilt:"",hardcy:"",HARDcy:"",harr:"",hArr:"",harrcir:"",harrw:"",Hat:"^",hbar:"",hcirc:"",Hcirc:"",hearts:"",heartsuit:"",hellip:"",hercon:"",hfr:"",Hfr:"",HilbertSpace:"",hksearow:"",hkswarow:"",hoarr:"",homtht:"",hookleftarrow:"",hookrightarrow:"",hopf:"",Hopf:"",horbar:"",HorizontalLine:"",hscr:"",Hscr:"",hslash:"",hstrok:"",Hstrok:"",HumpDownHump:"",HumpEqual:"",hybull:"",hyphen:"",iacute:"",Iacute:"",ic:"",icirc:"",Icirc:"",icy:"",Icy:"",Idot:"",iecy:"",IEcy:"",iexcl:"",iff:"",ifr:"",Ifr:"",igrave:"",Igrave:"",ii:"",iiiint:"",iiint:"",iinfin:"",iiota:"",ijlig:"",IJlig:"",Im:"",imacr:"",Imacr:"",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"",imof:"",imped:"",Implies:"",in:"",incare:"",infin:"",infintie:"",inodot:"",int:"",Int:"",intcal:"",integers:"",Integral:"",intercal:"",Intersection:"",intlarhk:"",intprod:"",InvisibleComma:"",InvisibleTimes:"",iocy:"",IOcy:"",iogon:"",Iogon:"",iopf:"",Iopf:"",iota:"",Iota:"",iprod:"",iquest:"",iscr:"",Iscr:"",isin:"",isindot:"",isinE:"",isins:"",isinsv:"",isinv:"",it:"",itilde:"",Itilde:"",iukcy:"",Iukcy:"",iuml:"",Iuml:"",jcirc:"",Jcirc:"",jcy:"",Jcy:"",jfr:"",Jfr:"",jmath:"",jopf:"",Jopf:"",jscr:"",Jscr:"",jsercy:"",Jsercy:"",jukcy:"",Jukcy:"",kappa:"",Kappa:"",kappav:"",kcedil:"",Kcedil:"",kcy:"",Kcy:"",kfr:"",Kfr:"",kgreen:"",khcy:"",KHcy:"",kjcy:"",KJcy:"",kopf:"",Kopf:"",kscr:"",Kscr:"",lAarr:"",lacute:"",Lacute:"",laemptyv:"",lagran:"",lambda:"",Lambda:"",lang:"",Lang:"",langd:"",langle:"",lap:"",Laplacetrf:"",laquo:"",larr:"",lArr:"",Larr:"",larrb:"",larrbfs:"",larrfs:"",larrhk:"",larrlp:"",larrpl:"",larrsim:"",larrtl:"",lat:"",latail:"",lAtail:"",late:"",lates:"",lbarr:"",lBarr:"",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"",lbrksld:"",lbrkslu:"",lcaron:"",Lcaron:"",lcedil:"",Lcedil:"",lceil:"",lcub:"{",lcy:"",Lcy:"",ldca:"",ldquo:"",ldquor:"",ldrdhar:"",ldrushar:"",ldsh:"",le:"",lE:"",LeftAngleBracket:"",leftarrow:"",Leftarrow:"",LeftArrow:"",LeftArrowBar:"",LeftArrowRightArrow:"",leftarrowtail:"",LeftCeiling:"",LeftDoubleBracket:"",LeftDownTeeVector:"",LeftDownVector:"",LeftDownVectorBar:"",LeftFloor:"",leftharpoondown:"",leftharpoonup:"",leftleftarrows:"",leftrightarrow:"",Leftrightarrow:"",LeftRightArrow:"",leftrightarrows:"",leftrightharpoons:"",leftrightsquigarrow:"",LeftRightVector:"",LeftTee:"",LeftTeeArrow:"",LeftTeeVector:"",leftthreetimes:"",LeftTriangle:"",LeftTriangleBar:"",LeftTriangleEqual:"",LeftUpDownVector:"",LeftUpTeeVector:"",LeftUpVector:"",LeftUpVectorBar:"",LeftVector:"",LeftVectorBar:"",leg:"",lEg:"",leq:"",leqq:"",leqslant:"",les:"",lescc:"",lesdot:"",lesdoto:"",lesdotor:"",lesg:"",lesges:"",lessapprox:"",lessdot:"",lesseqgtr:"",lesseqqgtr:"",LessEqualGreater:"",LessFullEqual:"",LessGreater:"",lessgtr:"",LessLess:"",lesssim:"",LessSlantEqual:"",LessTilde:"",lfisht:"",lfloor:"",lfr:"",Lfr:"",lg:"",lgE:"",lHar:"",lhard:"",lharu:"",lharul:"",lhblk:"",ljcy:"",LJcy:"",ll:"",Ll:"",llarr:"",llcorner:"",Lleftarrow:"",llhard:"",lltri:"",lmidot:"",Lmidot:"",lmoust:"",lmoustache:"",lnap:"",lnapprox:"",lne:"",lnE:"",lneq:"",lneqq:"",lnsim:"",loang:"",loarr:"",lobrk:"",longleftarrow:"",Longleftarrow:"",LongLeftArrow:"",longleftrightarrow:"",Longleftrightarrow:"",LongLeftRightArrow:"",longmapsto:"",longrightarrow:"",Longrightarrow:"",LongRightArrow:"",looparrowleft:"",looparrowright:"",lopar:"",lopf:"",Lopf:"",loplus:"",lotimes:"",lowast:"",lowbar:"_",LowerLeftArrow:"",LowerRightArrow:"",loz:"",lozenge:"",lozf:"",lpar:"(",lparlt:"",lrarr:"",lrcorner:"",lrhar:"",lrhard:"",lrm:"",lrtri:"",lsaquo:"",lscr:"",Lscr:"",lsh:"",Lsh:"",lsim:"",lsime:"",lsimg:"",lsqb:"[",lsquo:"",lsquor:"",lstrok:"",Lstrok:"",lt:"<",Lt:"",LT:"<",ltcc:"",ltcir:"",ltdot:"",lthree:"",ltimes:"",ltlarr:"",ltquest:"",ltri:"",ltrie:"",ltrif:"",ltrPar:"",lurdshar:"",luruhar:"",lvertneqq:"",lvnE:"",macr:"",male:"",malt:"",maltese:"",map:"",Map:"",mapsto:"",mapstodown:"",mapstoleft:"",mapstoup:"",marker:"",mcomma:"",mcy:"",Mcy:"",mdash:"",mDDot:"",measuredangle:"",MediumSpace:"",Mellintrf:"",mfr:"",Mfr:"",mho:"",micro:"",mid:"",midast:"*",midcir:"",middot:"",minus:"",minusb:"",minusd:"",minusdu:"",MinusPlus:"",mlcp:"",mldr:"",mnplus:"",models:"",mopf:"",Mopf:"",mp:"",mscr:"",Mscr:"",mstpos:"",mu:"",Mu:"",multimap:"",mumap:"",nabla:"",nacute:"",Nacute:"",nang:"",nap:"",napE:"",napid:"",napos:"",napprox:"",natur:"",natural:"",naturals:"",nbsp:"",nbump:"",nbumpe:"",ncap:"",ncaron:"",Ncaron:"",ncedil:"",Ncedil:"",ncong:"",ncongdot:"",ncup:"",ncy:"",Ncy:"",ndash:"",ne:"",nearhk:"",nearr:"",neArr:"",nearrow:"",nedot:"",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"",nesear:"",nesim:"",NestedGreaterGreater:"",NestedLessLess:"",NewLine:"\n",nexist:"",nexists:"",nfr:"",Nfr:"",nge:"",ngE:"",ngeq:"",ngeqq:"",ngeqslant:"",nges:"",nGg:"",ngsim:"",ngt:"",nGt:"",ngtr:"",nGtv:"",nharr:"",nhArr:"",nhpar:"",ni:"",nis:"",nisd:"",niv:"",njcy:"",NJcy:"",nlarr:"",nlArr:"",nldr:"",nle:"",nlE:"",nleftarrow:"",nLeftarrow:"",nleftrightarrow:"",nLeftrightarrow:"",nleq:"",nleqq:"",nleqslant:"",nles:"",nless:"",nLl:"",nlsim:"",nlt:"",nLt:"",nltri:"",nltrie:"",nLtv:"",nmid:"",NoBreak:"",NonBreakingSpace:"",nopf:"",Nopf:"",not:"",Not:"",NotCongruent:"",NotCupCap:"",NotDoubleVerticalBar:"",NotElement:"",NotEqual:"",NotEqualTilde:"",NotExists:"",NotGreater:"",NotGreaterEqual:"",NotGreaterFullEqual:"",NotGreaterGreater:"",NotGreaterLess:"",NotGreaterSlantEqual:"",NotGreaterTilde:"",NotHumpDownHump:"",NotHumpEqual:"",notin:"",notindot:"",notinE:"",notinva:"",notinvb:"",notinvc:"",NotLeftTriangle:"",NotLeftTriangleBar:"",NotLeftTriangleEqual:"",NotLess:"",NotLessEqual:"",NotLessGreater:"",NotLessLess:"",NotLessSlantEqual:"",NotLessTilde:"",NotNestedGreaterGreater:"",NotNestedLessLess:"",notni:"",notniva:"",notnivb:"",notnivc:"",NotPrecedes:"",NotPrecedesEqual:"",NotPrecedesSlantEqual:"",NotReverseElement:"",NotRightTriangle:"",NotRightTriangleBar:"",NotRightTriangleEqual:"",NotSquareSubset:"",NotSquareSubsetEqual:"",NotSquareSuperset:"",NotSquareSupersetEqual:"",NotSubset:"",NotSubsetEqual:"",NotSucceeds:"",NotSucceedsEqual:"",NotSucceedsSlantEqual:"",NotSucceedsTilde:"",NotSuperset:"",NotSupersetEqual:"",NotTilde:"",NotTildeEqual:"",NotTildeFullEqual:"",NotTildeTilde:"",NotVerticalBar:"",npar:"",nparallel:"",nparsl:"",npart:"",npolint:"",npr:"",nprcue:"",npre:"",nprec:"",npreceq:"",nrarr:"",nrArr:"",nrarrc:"",nrarrw:"",nrightarrow:"",nRightarrow:"",nrtri:"",nrtrie:"",nsc:"",nsccue:"",nsce:"",nscr:"",Nscr:"",nshortmid:"",nshortparallel:"",nsim:"",nsime:"",nsimeq:"",nsmid:"",nspar:"",nsqsube:"",nsqsupe:"",nsub:"",nsube:"",nsubE:"",nsubset:"",nsubseteq:"",nsubseteqq:"",nsucc:"",nsucceq:"",nsup:"",nsupe:"",nsupE:"",nsupset:"",nsupseteq:"",nsupseteqq:"",ntgl:"",ntilde:"",Ntilde:"",ntlg:"",ntriangleleft:"",ntrianglelefteq:"",ntriangleright:"",ntrianglerighteq:"",nu:"",Nu:"",num:"#",numero:"",numsp:"",nvap:"",nvdash:"",nvDash:"",nVdash:"",nVDash:"",nvge:"",nvgt:">",nvHarr:"",nvinfin:"",nvlArr:"",nvle:"",nvlt:"<",nvltrie:"",nvrArr:"",nvrtrie:"",nvsim:"",nwarhk:"",nwarr:"",nwArr:"",nwarrow:"",nwnear:"",oacute:"",Oacute:"",oast:"",ocir:"",ocirc:"",Ocirc:"",ocy:"",Ocy:"",odash:"",odblac:"",Odblac:"",odiv:"",odot:"",odsold:"",oelig:"",OElig:"",ofcir:"",ofr:"",Ofr:"",ogon:"",ograve:"",Ograve:"",ogt:"",ohbar:"",ohm:"",oint:"",olarr:"",olcir:"",olcross:"",oline:"",olt:"",omacr:"",Omacr:"",omega:"",Omega:"",omicron:"",Omicron:"",omid:"",ominus:"",oopf:"",Oopf:"",opar:"",OpenCurlyDoubleQuote:"",OpenCurlyQuote:"",operp:"",oplus:"",or:"",Or:"",orarr:"",ord:"",order:"",orderof:"",ordf:"",ordm:"",origof:"",oror:"",orslope:"",orv:"",oS:"",oscr:"",Oscr:"",oslash:"",Oslash:"",osol:"",otilde:"",Otilde:"",otimes:"",Otimes:"",otimesas:"",ouml:"",Ouml:"",ovbar:"",OverBar:"",OverBrace:"",OverBracket:"",OverParenthesis:"",par:"",para:"",parallel:"",parsim:"",parsl:"",part:"",PartialD:"",pcy:"",Pcy:"",percnt:"%",period:".",permil:"",perp:"",pertenk:"",pfr:"",Pfr:"",phi:"",Phi:"",phiv:"",phmmat:"",phone:"",pi:"",Pi:"",pitchfork:"",piv:"",planck:"",planckh:"",plankv:"",plus:"+",plusacir:"",plusb:"",pluscir:"",plusdo:"",plusdu:"",pluse:"",PlusMinus:"",plusmn:"",plussim:"",plustwo:"",pm:"",Poincareplane:"",pointint:"",popf:"",Popf:"",pound:"",pr:"",Pr:"",prap:"",prcue:"",pre:"",prE:"",prec:"",precapprox:"",preccurlyeq:"",Precedes:"",PrecedesEqual:"",PrecedesSlantEqual:"",PrecedesTilde:"",preceq:"",precnapprox:"",precneqq:"",precnsim:"",precsim:"",prime:"",Prime:"",primes:"",prnap:"",prnE:"",prnsim:"",prod:"",Product:"",profalar:"",profline:"",profsurf:"",prop:"",Proportion:"",Proportional:"",propto:"",prsim:"",prurel:"",pscr:"",Pscr:"",psi:"",Psi:"",puncsp:"",qfr:"",Qfr:"",qint:"",qopf:"",Qopf:"",qprime:"",qscr:"",Qscr:"",quaternions:"",quatint:"",quest:"?",questeq:"",quot:'"',QUOT:'"',rAarr:"",race:"",racute:"",Racute:"",radic:"",raemptyv:"",rang:"",Rang:"",rangd:"",range:"",rangle:"",raquo:"",rarr:"",rArr:"",Rarr:"",rarrap:"",rarrb:"",rarrbfs:"",rarrc:"",rarrfs:"",rarrhk:"",rarrlp:"",rarrpl:"",rarrsim:"",rarrtl:"",Rarrtl:"",rarrw:"",ratail:"",rAtail:"",ratio:"",rationals:"",rbarr:"",rBarr:"",RBarr:"",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"",rbrksld:"",rbrkslu:"",rcaron:"",Rcaron:"",rcedil:"",Rcedil:"",rceil:"",rcub:"}",rcy:"",Rcy:"",rdca:"",rdldhar:"",rdquo:"",rdquor:"",rdsh:"",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"",reg:"",REG:"",ReverseElement:"",ReverseEquilibrium:"",ReverseUpEquilibrium:"",rfisht:"",rfloor:"",rfr:"",Rfr:"",rHar:"",rhard:"",rharu:"",rharul:"",rho:"",Rho:"",rhov:"",RightAngleBracket:"",rightarrow:"",Rightarrow:"",RightArrow:"",RightArrowBar:"",RightArrowLeftArrow:"",rightarrowtail:"",RightCeiling:"",RightDoubleBracket:"",RightDownTeeVector:"",RightDownVector:"",RightDownVectorBar:"",RightFloor:"",rightharpoondown:"",rightharpoonup:"",rightleftarrows:"",rightleftharpoons:"",rightrightarrows:"",rightsquigarrow:"",RightTee:"",RightTeeArrow:"",RightTeeVector:"",rightthreetimes:"",RightTriangle:"",RightTriangleBar:"",RightTriangleEqual:"",RightUpDownVector:"",RightUpTeeVector:"",RightUpVector:"",RightUpVectorBar:"",RightVector:"",RightVectorBar:"",ring:"",risingdotseq:"",rlarr:"",rlhar:"",rlm:"",rmoust:"",rmoustache:"",rnmid:"",roang:"",roarr:"",robrk:"",ropar:"",ropf:"",Ropf:"",roplus:"",rotimes:"",RoundImplies:"",rpar:")",rpargt:"",rppolint:"",rrarr:"",Rrightarrow:"",rsaquo:"",rscr:"",Rscr:"",rsh:"",Rsh:"",rsqb:"]",rsquo:"",rsquor:"",rthree:"",rtimes:"",rtri:"",rtrie:"",rtrif:"",rtriltri:"",RuleDelayed:"",ruluhar:"",rx:"",sacute:"",Sacute:"",sbquo:"",sc:"",Sc:"",scap:"",scaron:"",Scaron:"",sccue:"",sce:"",scE:"",scedil:"",Scedil:"",scirc:"",Scirc:"",scnap:"",scnE:"",scnsim:"",scpolint:"",scsim:"",scy:"",Scy:"",sdot:"",sdotb:"",sdote:"",searhk:"",searr:"",seArr:"",searrow:"",sect:"",semi:";",seswar:"",setminus:"",setmn:"",sext:"",sfr:"",Sfr:"",sfrown:"",sharp:"",shchcy:"",SHCHcy:"",shcy:"",SHcy:"",ShortDownArrow:"",ShortLeftArrow:"",shortmid:"",shortparallel:"",ShortRightArrow:"",ShortUpArrow:"",shy:"",sigma:"",Sigma:"",sigmaf:"",sigmav:"",sim:"",simdot:"",sime:"",simeq:"",simg:"",simgE:"",siml:"",simlE:"",simne:"",simplus:"",simrarr:"",slarr:"",SmallCircle:"",smallsetminus:"",smashp:"",smeparsl:"",smid:"",smile:"",smt:"",smte:"",smtes:"",softcy:"",SOFTcy:"",sol:"/",solb:"",solbar:"",sopf:"",Sopf:"",spades:"",spadesuit:"",spar:"",sqcap:"",sqcaps:"",sqcup:"",sqcups:"",Sqrt:"",sqsub:"",sqsube:"",sqsubset:"",sqsubseteq:"",sqsup:"",sqsupe:"",sqsupset:"",sqsupseteq:"",squ:"",square:"",Square:"",SquareIntersection:"",SquareSubset:"",SquareSubsetEqual:"",SquareSuperset:"",SquareSupersetEqual:"",SquareUnion:"",squarf:"",squf:"",srarr:"",sscr:"",Sscr:"",ssetmn:"",ssmile:"",sstarf:"",star:"",Star:"",starf:"",straightepsilon:"",straightphi:"",strns:"",sub:"",Sub:"",subdot:"",sube:"",subE:"",subedot:"",submult:"",subne:"",subnE:"",subplus:"",subrarr:"",subset:"",Subset:"",subseteq:"",subseteqq:"",SubsetEqual:"",subsetneq:"",subsetneqq:"",subsim:"",subsub:"",subsup:"",succ:"",succapprox:"",succcurlyeq:"",Succeeds:"",SucceedsEqual:"",SucceedsSlantEqual:"",SucceedsTilde:"",succeq:"",succnapprox:"",succneqq:"",succnsim:"",succsim:"",SuchThat:"",sum:"",Sum:"",sung:"",sup:"",Sup:"",sup1:"",sup2:"",sup3:"",supdot:"",supdsub:"",supe:"",supE:"",supedot:"",Superset:"",SupersetEqual:"",suphsol:"",suphsub:"",suplarr:"",supmult:"",supne:"",supnE:"",supplus:"",supset:"",Supset:"",supseteq:"",supseteqq:"",supsetneq:"",supsetneqq:"",supsim:"",supsub:"",supsup:"",swarhk:"",swarr:"",swArr:"",swarrow:"",swnwar:"",szlig:"",Tab:"\t",target:"",tau:"",Tau:"",tbrk:"",tcaron:"",Tcaron:"",tcedil:"",Tcedil:"",tcy:"",Tcy:"",tdot:"",telrec:"",tfr:"",Tfr:"",there4:"",therefore:"",Therefore:"",theta:"",Theta:"",thetasym:"",thetav:"",thickapprox:"",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"",thksim:"",thorn:"",THORN:"",tilde:"",Tilde:"",TildeEqual:"",TildeFullEqual:"",TildeTilde:"",times:"",timesb:"",timesbar:"",timesd:"",tint:"",toea:"",top:"",topbot:"",topcir:"",topf:"",Topf:"",topfork:"",tosa:"",tprime:"",trade:"",TRADE:"",triangle:"",triangledown:"",triangleleft:"",trianglelefteq:"",triangleq:"",triangleright:"",trianglerighteq:"",tridot:"",trie:"",triminus:"",TripleDot:"",triplus:"",trisb:"",tritime:"",trpezium:"",tscr:"",Tscr:"",tscy:"",TScy:"",tshcy:"",TSHcy:"",tstrok:"",Tstrok:"",twixt:"",twoheadleftarrow:"",twoheadrightarrow:"",uacute:"",Uacute:"",uarr:"",uArr:"",Uarr:"",Uarrocir:"",ubrcy:"",Ubrcy:"",ubreve:"",Ubreve:"",ucirc:"",Ucirc:"",ucy:"",Ucy:"",udarr:"",udblac:"",Udblac:"",udhar:"",ufisht:"",ufr:"",Ufr:"",ugrave:"",Ugrave:"",uHar:"",uharl:"",uharr:"",uhblk:"",ulcorn:"",ulcorner:"",ulcrop:"",ultri:"",umacr:"",Umacr:"",uml:"",UnderBar:"_",UnderBrace:"",UnderBracket:"",UnderParenthesis:"",Union:"",UnionPlus:"",uogon:"",Uogon:"",uopf:"",Uopf:"",uparrow:"",Uparrow:"",UpArrow:"",UpArrowBar:"",UpArrowDownArrow:"",updownarrow:"",Updownarrow:"",UpDownArrow:"",UpEquilibrium:"",upharpoonleft:"",upharpoonright:"",uplus:"",UpperLeftArrow:"",UpperRightArrow:"",upsi:"",Upsi:"",upsih:"",upsilon:"",Upsilon:"",UpTee:"",UpTeeArrow:"",upuparrows:"",urcorn:"",urcorner:"",urcrop:"",uring:"",Uring:"",urtri:"",uscr:"",Uscr:"",utdot:"",utilde:"",Utilde:"",utri:"",utrif:"",uuarr:"",uuml:"",Uuml:"",uwangle:"",vangrt:"",varepsilon:"",varkappa:"",varnothing:"",varphi:"",varpi:"",varpropto:"",varr:"",vArr:"",varrho:"",varsigma:"",varsubsetneq:"",varsubsetneqq:"",varsupsetneq:"",varsupsetneqq:"",vartheta:"",vartriangleleft:"",vartriangleright:"",vBar:"",Vbar:"",vBarv:"",vcy:"",Vcy:"",vdash:"",vDash:"",Vdash:"",VDash:"",Vdashl:"",vee:"",Vee:"",veebar:"",veeeq:"",vellip:"",verbar:"|",Verbar:"",vert:"|",Vert:"",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"",VerticalTilde:"",VeryThinSpace:"",vfr:"",Vfr:"",vltri:"",vnsub:"",vnsup:"",vopf:"",Vopf:"",vprop:"",vrtri:"",vscr:"",Vscr:"",vsubne:"",vsubnE:"",vsupne:"",vsupnE:"",Vvdash:"",vzigzag:"",wcirc:"",Wcirc:"",wedbar:"",wedge:"",Wedge:"",wedgeq:"",weierp:"",wfr:"",Wfr:"",wopf:"",Wopf:"",wp:"",wr:"",wreath:"",wscr:"",Wscr:"",xcap:"",xcirc:"",xcup:"",xdtri:"",xfr:"",Xfr:"",xharr:"",xhArr:"",xi:"",Xi:"",xlarr:"",xlArr:"",xmap:"",xnis:"",xodot:"",xopf:"",Xopf:"",xoplus:"",xotime:"",xrarr:"",xrArr:"",xscr:"",Xscr:"",xsqcup:"",xuplus:"",xutri:"",xvee:"",xwedge:"",yacute:"",Yacute:"",yacy:"",YAcy:"",ycirc:"",Ycirc:"",ycy:"",Ycy:"",yen:"",yfr:"",Yfr:"",yicy:"",YIcy:"",yopf:"",Yopf:"",yscr:"",Yscr:"",yucy:"",YUcy:"",yuml:"",Yuml:"",zacute:"",Zacute:"",zcaron:"",Zcaron:"",zcy:"",Zcy:"",zdot:"",Zdot:"",zeetrf:"",ZeroWidthSpace:"",zeta:"",Zeta:"",zfr:"",Zfr:"",zhcy:"",ZHcy:"",zigrarr:"",zopf:"",Zopf:"",zscr:"",Zscr:"",zwj:"",zwnj:""},v={aacute:"",Aacute:"",acirc:"",Acirc:"",acute:"",aelig:"",AElig:"",agrave:"",Agrave:"",amp:"&",AMP:"&",aring:"",Aring:"",atilde:"",Atilde:"",auml:"",Auml:"",brvbar:"",ccedil:"",Ccedil:"",cedil:"",cent:"",copy:"",COPY:"",curren:"",deg:"",divide:"",eacute:"",Eacute:"",ecirc:"",Ecirc:"",egrave:"",Egrave:"",eth:"",ETH:"",euml:"",Euml:"",frac12:"",frac14:"",frac34:"",gt:">",GT:">",iacute:"",Iacute:"",icirc:"",Icirc:"",iexcl:"",igrave:"",Igrave:"",iquest:"",iuml:"",Iuml:"",laquo:"",lt:"<",LT:"<",macr:"",micro:"",middot:"",nbsp:"",not:"",ntilde:"",Ntilde:"",oacute:"",Oacute:"",ocirc:"",Ocirc:"",ograve:"",Ograve:"",ordf:"",ordm:"",oslash:"",Oslash:"",otilde:"",Otilde:"",ouml:"",Ouml:"",para:"",plusmn:"",pound:"",quot:'"',QUOT:'"',raquo:"",reg:"",REG:"",sect:"",shy:"",sup1:"",sup2:"",sup3:"",szlig:"",thorn:"",THORN:"",times:"",uacute:"",Uacute:"",ucirc:"",Ucirc:"",ugrave:"",Ugrave:"",uml:"",uuml:"",Uuml:"",yacute:"",Yacute:"",yen:"",yuml:""},y={0:"",128:"",130:"",131:"",132:"",133:"",134:"",135:"",136:"",137:"",138:"",139:"",140:"",142:"",145:"",146:"",147:"",148:"",149:"",150:"",151:"",152:"",153:"",154:"",155:"",156:"",158:"",159:""},b=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],_=String.fromCharCode,x={}.hasOwnProperty,w=function(e,t){return x.call(e,t)},A=function(e,t){if(!e)return t;var n,r={};for(n in t)r[n]=w(e,n)?e[n]:t[n];return r},k=function(e,t){var n="";return e>=55296&&e<=57343||e>1114111?(t&&E("character reference outside the permissible Unicode range"),""):w(y,e)?(t&&E("disallowed character reference"),y[e]):(t&&function(e,t){for(var n=-1,r=e.length;++n<r;)if(e[n]==t)return!0;return!1}(b,e)&&E("disallowed character reference"),e>65535&&(n+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=_(e))},T=function(e){return"&#x"+e.toString(16).toUpperCase()+";"},S=function(e){return"&#"+e+";"},E=function(e){throw Error("Parse error: "+e)},C=function(e,t){(t=A(t,C.options)).strict&&p.test(e)&&E("forbidden code point");var n=t.encodeEverything,r=t.useNamedReferences,i=t.allowUnsafeSymbols,o=t.decimal?S:T,d=function(e){return o(e.charCodeAt(0))};return n?(e=e.replace(s,(function(e){return r&&w(u,e)?"&"+u[e]+";":d(e)})),r&&(e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),r&&(e=e.replace(c,(function(e){return"&"+u[e]+";"})))):r?(i||(e=e.replace(h,(function(e){return"&"+u[e]+";"}))),e=(e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;")).replace(c,(function(e){return"&"+u[e]+";"}))):i||(e=e.replace(h,d)),e.replace(a,(function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return o(1024*(t-55296)+n-56320+65536)})).replace(l,d)};C.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var M=function(e,t){var n=(t=A(t,M.options)).strict;return n&&f.test(e)&&E("malformed character reference"),e.replace(g,(function(e,r,i,o,a,s,l,c,u){var h,d,f,p,g,y;return r?m[g=r]:i?(g=i,(y=o)&&t.isAttributeValue?(n&&"="==y&&E("`&` did not start a character reference"),e):(n&&E("named character reference was not terminated by a semicolon"),v[g]+(y||""))):a?(f=a,d=s,n&&!d&&E("character reference was not terminated by a semicolon"),h=parseInt(f,10),k(h,n)):l?(p=l,d=c,n&&!d&&E("character reference was not terminated by a semicolon"),h=parseInt(p,16),k(h,n)):(n&&E("named character reference was not terminated by a semicolon"),e)}))};M.options={isAttributeValue:!1,strict:!1};var O={version:"1.2.0",encode:C,decode:M,escape:function(e){return e.replace(h,(function(e){return d[e]}))},unescape:M};void 0===(r=function(){return O}.call(t,n,t,e))||(e.exports=r)}()},72177:(e,t)=>{t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g}},12920:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},14760:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},91634:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,u=o.indexOf,h={},d=h.toString,f=h.hasOwnProperty,p=f.toString,g=p.call(Object),m={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[d.call(e)]||"object":typeof e}var A="3.6.0",k=function(e,t){return new k.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:A,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(c&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(A+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e)||(t=a(e))&&("function"!=typeof(n=f.call(t,"constructor")&&t.constructor)||p.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(T(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?k.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(T(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=o[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){h["[object "+t+"]"]=t.toLowerCase()}));var S=function(e){var t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_="sizzle"+1*new Date,x=e.document,w=0,A=0,k=le(),T=le(),S=le(),E=le(),C=function(e,t){return e===t&&(h=!0),0},M={}.hasOwnProperty,O=[],L=O.pop,D=O.push,I=O.push,R=O.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",z="[\\x20\\t\\r\\n\\f]",F="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+F+")(?:"+z+"*([*^$|!~]?=)"+z+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+z+"*\\]",j=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",U=new RegExp(z+"+","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),H=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),$=new RegExp(z+"|>"),W=new RegExp(j),G=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},ae=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{I.apply(O=R.call(x.childNodes),x.childNodes),O[x.childNodes.length].nodeType}catch(e){I={apply:O.length?function(e,t){D.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,c,u,h,p,v,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&(d(t),t=t||f,g)){if(11!==x&&(h=Q.exec(e)))if(o=h[1]){if(9===x){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(h[2])return I.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return I.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!E[e+" "]&&(!m||!m.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===x&&($.test(e)||H.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ie):t.setAttribute("id",u=_)),s=(p=a(e)).length;s--;)p[s]=(u?"#"+u:":scope")+" "+be(p[s]);v=p.join(",")}try{return I.apply(r,y.querySelectorAll(v)),r}catch(t){E(e,!0)}finally{u===_&&t.removeAttribute("id")}}}return l(e.replace(V,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[_]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},d=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:x;return a!=f&&9===a.nodeType&&a.documentElement?(p=(f=a).documentElement,g=!o(f),x!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ue((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(f.getElementsByClassName),n.getById=ue((function(e){return p.appendChild(e).id=_,!f.getElementsByName||!f.getElementsByName(_).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=J.test(f.querySelectorAll))&&(ue((function(e){var t;p.appendChild(e).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+N+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",j)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=J.test(p.compareDocumentPosition),b=t||J.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return h=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==x&&b(x,e)?-1:t==f||t.ownerDocument==x&&b(x,t)?1:u?P(u,e)-P(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?de(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&g&&!E[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){E(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&d(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&M.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(h=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(C),h){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return u=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},r=se.selectors={cacheLength:50,createPseudo:ce,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+z+"|$)"))&&k(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,h,d,f,p,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(b=(f=(c=(u=(h=(d=m)[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===w&&c[1])&&c[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){u[e]=[w,f,b];break}}else if(y&&(b=f=(c=(u=(h=(d=t)[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===w&&c[1]),!1===b)for(;(d=++f&&d&&d[g]||(b=f=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((u=(h=d[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]=[w,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],r=s(e.replace(V,"$1"));return r[_]?ce((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return se(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ce((function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:me((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:me((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function _e(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=A++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var c,u,h,d=[w,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(u=(h=t[_]||(t[_]={}))[t.uniqueID]||(h[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=u[o])&&c[0]===w&&c[1]===s)return d[2]=c[2];if(u[o]=d,d[2]=e(t,n,l))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function we(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function Ae(e,t,n,r,i,o){return r&&!r[_]&&(r=Ae(r)),i&&!i[_]&&(i=Ae(i,o)),ce((function(o,a,s,l){var c,u,h,d=[],f=[],p=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:we(g,d,e,s,l),v=n?i||(o?e:p||r)?[]:a:m;if(n&&n(m,v,s,l),r)for(c=we(v,f),r(c,[],s,l),u=c.length;u--;)(h=c[u])&&(v[f[u]]=!(m[f[u]]=h));if(o){if(i||e){if(i){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(m[u]=h);i(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=i?P(o,h):d[u])>-1&&(o[c]=!(a[c]=h))}}else v=we(v===a?v.splice(p,v.length):v),i?i(null,a,v,l):I.apply(a,v)}))}function ke(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,u=_e((function(e){return e===t}),s,!0),h=_e((function(e){return P(t,e)>-1}),s,!0),d=[function(e,n,r){var i=!a&&(r||n!==c)||((t=n).nodeType?u(e,n,r):h(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])d=[_e(xe(d),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[_]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return Ae(l>1&&xe(d),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(V,"$1"),n,l<i&&ke(e.slice(l,i)),i<o&&ke(e=e.slice(i)),i<o&&be(e))}d.push(n)}return xe(d)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,l,c,u=T[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=r.preFilter;s;){for(a in n&&!(i=q.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=H.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(V," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):T(e,l).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=S[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=ke(t[n]))[_]?i.push(s):o.push(s);s=S(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,l,u){var h,p,m,v=0,y="0",b=o&&[],_=[],x=c,A=o||i&&r.find.TAG("*",u),k=w+=null==x?1:Math.random()||.1,T=A.length;for(u&&(c=a==f||a||u);y!==T&&null!=(h=A[y]);y++){if(i&&h){for(p=0,a||h.ownerDocument==f||(d(h),s=!g);m=e[p++];)if(m(h,a||f,s)){l.push(h);break}u&&(w=k)}n&&((h=!m&&h)&&v--,o&&b.push(h))}if(v+=y,n&&y!==v){for(p=0;m=t[p++];)m(b,_,a,s);if(o){if(v>0)for(;y--;)b[y]||_[y]||(_[y]=L.call(l));_=we(_)}I.apply(l,_),u&&!o&&_.length>0&&v+t.length>1&&se.uniqueSort(l)}return u&&(w=k,c=x),b};return n?ce(o):o}(o,i)),s.selector=e}return s},l=se.select=function(e,t,n,i){var o,l,c,u,h,d="function"==typeof e&&e,f=!i&&a(e=d.selector||e);if(n=n||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=Y.needsContext.test(e)?0:l.length;o--&&(c=l[o],!r.relative[u=c.type]);)if((h=r.find[u])&&(i=h(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&be(l)))return I.apply(n,i),n;break}}return(d||s(e,f))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(C).join("")===_,n.detectDuplicates=!!h,d(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||he(N,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);k.find=S,k.expr=S.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=S.uniqueSort,k.text=S.getText,k.isXMLDoc=S.isXML,k.contains=S.contains,k.escapeSelector=S.escape;var E=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},M=k.expr.match.needsContext;function O(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return v(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return u.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return r>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&M.test(e)?k(e):e||[],!1).length}});var I,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||I,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),L.test(r[1])&&k.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,I=k(b);var P=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function z(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!M.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(k(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return z(e,"nextSibling")},prev:function(e){return z(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(O(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=k.filter(r,i)),this.length>1&&(N[e]||k.uniqueSort(i),P.test(e)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function B(e){return e}function j(e){throw e}function U(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(F)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){k.each(n,(function(n,r){v(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==w(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;(n=k.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,l=arguments,c=function(){var r,c;if(!(e<o)){if((r=n.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,v(c)?i?c.call(r,a(o,t,B,i),a(o,t,j,i)):(o++,c.call(r,a(o,t,B,i),a(o,t,j,i),a(o,t,B,t.notifyWith))):(n!==B&&(s=void 0,l=[r]),(i||t.resolveWith)(s,l))}},u=i?c:function(){try{c()}catch(r){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(r,u.stackTrace),e+1>=o&&(n!==j&&(s=void 0,l=[r]),t.rejectWith(s,l))}};e?u():(k.Deferred.getStackHook&&(u.stackTrace=k.Deferred.getStackHook()),r.setTimeout(u))}}return k.Deferred((function(r){t[0][3].add(a(0,r,v(i)?i:B,r.notifyWith)),t[1][3].add(a(0,r,v(e)?e:B)),t[2][3].add(a(0,r,v(n)?n:j))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},o={};return k.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=k.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(U(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)U(i[n],a(n),o.reject);return o.promise()}});var V=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&V.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){r.setTimeout((function(){throw e}))};var q=k.Deferred();function H(){b.removeEventListener("DOMContentLoaded",H),r.removeEventListener("load",H),k.ready()}k.fn.ready=function(e){return q.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||q.resolveWith(b,[k]))}}),k.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(k.ready):(b.addEventListener("DOMContentLoaded",H),r.addEventListener("load",H));var $=function(e,t,n,r,i,o,a){var s=0,l=e.length,c=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(k(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):l?t(e[0],n):o},W=/^-ms-/,G=/-([a-z])/g;function Y(e,t){return t.toUpperCase()}function X(e){return e.replace(W,"ms-").replace(G,Y)}var Z=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=k.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Z(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var J=new K,Q=new K,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return Q.hasData(e)||J.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Q.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=X(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Q.set(this,e)})):$(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Q.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){Q.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Q.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){k.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:k.Callbacks("once memory").add((function(){J.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return k.contains(e.ownerDocument,e)},le={composed:!0};ae.getRootNode&&(se=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ce=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===k.css(e,"display")};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},l=s(),c=n&&n[3]||(k.cssNumber[t]?"":"px"),u=e.nodeType&&(k.cssNumber[t]||"px"!==c&&+l)&&ie.exec(k.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;a--;)k.style(e,t,u+c),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),u/=o;u*=2,k.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=i)),i}var he={};function de(e){var t,n=e.ownerDocument,r=e.nodeName,i=he[r];return i||(t=n.body.appendChild(n.createElement(r)),i=k.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),he[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ce(r)&&(i[o]=de(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ce(this)?k(this).show():k(this).hide()}))}});var pe=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,me=/^$|^module$|\/(?:java|ecma)script/i;!function(){var e=b.createDocumentFragment().appendChild(b.createElement("div")),t=b.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),m.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML="<option></option>",m.option=!!e.lastChild}();var ve={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ye(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&O(e,t)?k.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}ve.tbody=ve.tfoot=ve.colgroup=ve.caption=ve.thead,ve.th=ve.td,m.option||(ve.optgroup=ve.option=[1,"<select multiple='multiple'>","</select>"]);var _e=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,l,c,u,h=t.createDocumentFragment(),d=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===w(o))k.merge(d,o.nodeType?[o]:o);else if(_e.test(o)){for(a=a||h.appendChild(t.createElement("div")),s=(ge.exec(o)||["",""])[1].toLowerCase(),l=ve[s]||ve._default,a.innerHTML=l[1]+k.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;k.merge(d,a.childNodes),(a=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",f=0;o=d[f++];)if(r&&k.inArray(o,r)>-1)i&&i.push(o);else if(c=se(o),a=ye(h.appendChild(o),"script"),c&&be(a),n)for(u=0;o=a[u++];)me.test(o.type||"")&&n.push(o);return h}var we=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function ke(){return!1}function Te(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,i=function(e){return k().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,r,n)}))}function Ee(e,t,n){n?(J.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=J.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),J.set(this,t,o),r=n(this,t),this[t](),o!==(i=J.get(this,t))||r?J.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(J.set(this,t,{value:k.event.trigger(k.extend(o[0],k.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&k.event.add(e,t,Ae)}k.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,c,u,h,d,f,p,g,m=J.get(e);if(Z(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ae,i),n.guid||(n.guid=k.guid++),(l=m.events)||(l=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(F)||[""]).length;c--;)f=g=(s=we.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f&&(h=k.event.special[f]||{},f=(i?h.delegateType:h.bindType)||f,h=k.event.special[f]||{},u=k.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:p.join(".")},o),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(f,a)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),k.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,c,u,h,d,f,p,g,m=J.hasData(e)&&J.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(F)||[""]).length;c--;)if(f=g=(s=we.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),f){for(h=k.event.special[f]||{},d=l[f=(r?h.delegateType:h.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)u=d[o],!i&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));a&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||k.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)k.event.remove(e,f+t[c],n,r,!0);k.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=k.event.fix(e),c=(J.get(this,"events")||Object.create(null))[l.type]||[],u=k.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(a=k.event.handlers.call(this,l,c),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?k(i,this).index(c)>-1:k.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&O(t,"input")&&Ee(t,"click",Ae),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&O(t,"input")&&Ee(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&O(t,"input")&&J.get(t,"click")||O(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ae:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ae,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ae,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ae,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){k.event.special[e]={setup:function(){return Ee(this,e,Te),!1},trigger:function(){return Ee(this,e),!0},_default:function(){return!0},delegateType:t}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||k.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each((function(){k.event.remove(this,e,n,t)}))}});var Ce=/<script|<style|<link/i,Me=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return O(e,"table")&&O(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(J.hasData(e)&&(s=J.get(e).events))for(i in J.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)k.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=k.extend({},o),Q.set(t,a))}}function Pe(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ne(e,t,n,r){t=l(t);var i,o,a,s,c,u,h=0,d=e.length,f=d-1,p=t[0],g=v(p);if(g||d>1&&"string"==typeof p&&!m.checkClone&&Me.test(p))return e.each((function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),Ne(o,t,n,r)}));if(d&&(o=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=k.map(ye(i,"script"),De)).length;h<d;h++)c=i,h!==f&&(c=k.clone(c,!0,!0),s&&k.merge(a,ye(c,"script"))),n.call(e[h],c,h);if(s)for(u=a[a.length-1].ownerDocument,k.map(a,Ie),h=0;h<s;h++)c=a[h],me.test(c.type||"")&&!J.access(c,"globalEval")&&k.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&!c.noModule&&k._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):x(c.textContent.replace(Oe,""),c,u))}return e}function ze(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ye(r)),r.parentNode&&(n&&se(r)&&be(ye(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=se(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Pe(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Re(o[r],a[r]);else Re(e,s);return(a=ye(s,"script")).length>0&&be(a,!l&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(Z(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),k.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return $(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ne(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return Ne(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ne(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ne(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return $(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ce.test(e)&&!ve[(ge.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ne(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(ye(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,r=[],i=k(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(i[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var Fe=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Be=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},je=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ue=new RegExp(oe.join("|"),"i");function Ve(e,t,n){var r,i,o,a,s=e.style;return(n=n||Be(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=k.style(e,t)),!m.pixelBoxStyles()&&Fe.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(c).appendChild(u);var e=r.getComputedStyle(u);n="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",a=36===t(e.right),i=36===t(e.width),u.style.position="absolute",o=12===t(u.offsetWidth/3),ae.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,l,c=b.createElement("div"),u=b.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),s}}))}();var He=["Webkit","Moz","ms"],$e=b.createElement("div").style,We={};function Ge(e){return k.cssProps[e]||We[e]||(e in $e?e:We[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=He.length;n--;)if((e=He[n]+t)in $e)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=k.css(e,n+oe[a],!0,i)),r?("content"===n&&(l-=k.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(l-=k.css(e,"border"+oe[a]+"Width",!0,i))):(l+=k.css(e,"padding"+oe[a],!0,i),"padding"!==n?l+=k.css(e,"border"+oe[a]+"Width",!0,i):s+=k.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function et(e,t,n){var r=Be(e),i=(!m.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=Ve(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&O(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ve(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),l=Xe.test(t),c=e.style;if(l||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ve(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):je(e,Ze,(function(){return et(e,t,r)}))},set:function(e,n,r){var i,o=Be(e),a=!m.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===k.css(e,"boxSizing",!1,o),l=r?Qe(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Qe(e,t,"border",!1,o)-.5)),l&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Je(0,n,l)}}})),k.cssHooks.marginLeft=qe(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ve(e,"marginLeft"))||e.getBoundingClientRect().left-je(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=Je)})),k.fn.extend({css:function(e,t){return $(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Be(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=tt.prototype.init,k.fx.step={};var nt,rt,it,ot,at=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function lt(){rt&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(lt):r.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return r.setTimeout((function(){nt=void 0})),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ht(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(e,t,n){var r,i,o=0,a=dt.prefilters.length,s=k.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=nt||ct(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(e,[c,r,n]),r<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||ct(),duration:n.duration,tweens:[],createTween:function(t,n){var r=k.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(u,c.opts.specialEasing);o<a;o++)if(r=dt.prefilters[o].call(c,e,u,c.opts))return v(r.stop)&&(k._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return k.map(u,ht,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),k.fx.timer(k.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}k.Animation=k.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(F);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,c,u,h="width"in t||"height"in t,d=this,f={},p=e.style,g=e.nodeType&&ce(e),m=J.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always((function(){d.always((function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],at.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}f[r]=m&&m[r]||k.style(e,r)}if((l=!k.isEmptyObject(t))||!k.isEmptyObject(f))for(r in h&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=J.get(e,"display")),"none"===(u=k.css(e,"display"))&&(c?u=c:(fe([e],!0),c=e.style.display||c,u=k.css(e,"display"),fe([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===k.css(e,"float")&&(l||(d.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=J.access(e,"fxshow",{display:c}),o&&(m.hidden=!g),g&&fe([e],!0),d.done((function(){for(r in g||fe([e]),J.remove(e,"fxshow"),f)k.style(e,r,f[r])}))),l=ht(g?m[r]:0,r,d),r in m||(m[r]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=k.isEmptyObject(e),o=k.speed(t,n,r),a=function(){var t=dt(this,k.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=k.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&st.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=k.timers,a=r?r.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}})),k.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),nt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){rt||(rt=!0,lt())},k.fx.stop=function(){rt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},it=b.createElement("input"),ot=b.createElement("select").appendChild(b.createElement("option")),it.type="checkbox",m.checkOn=""!==it.value,m.optSelected=ot.selected,(it=b.createElement("input")).value="t",it.type="radio",m.radioValue="t"===it.value;var ft,pt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return $(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&O(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=pt[t]||k.find.attr;pt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=pt[a],pt[a]=i,i=null!=n(e,t,r)?a:null,pt[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function vt(e){return(e.match(F)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}k.fn.extend({prop:function(e,t){return $(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each((function(t){k(this).addClass(e.call(this,t,yt(this)))}));if((t=bt(e)).length)for(;n=this[l++];)if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each((function(t){k(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[l++];)if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,yt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=k(this),a=bt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(_t,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:vt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!O(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=k.inArray(k.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),m.focusin="onfocusin"in r;var xt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,i){var o,a,s,l,c,u,h,d,p=[n||b],g=f.call(e,"type")?e.type:e,m=f.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!xt.test(g+k.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[k.expando]?e:new k.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),h=k.event.special[g]||{},i||!h.trigger||!1!==h.trigger.apply(n,t))){if(!i&&!h.noBubble&&!y(n)){for(l=h.delegateType||g,xt.test(l+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||b)&&p.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)d=a,e.type=o>1?l:h.bindType||g,(u=(J.get(a,"events")||Object.create(null))[e.type]&&J.get(a,"handle"))&&u.apply(a,t),(u=c&&a[c])&&u.apply&&Z(a)&&(e.result=u.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),t)||!Z(n)||c&&v(n[g])&&!y(n)&&((s=n[c])&&(n[c]=null),k.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,wt),n[g](),e.isPropagationStopped()&&d.removeEventListener(g,wt),k.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}}));var At=r.location,kt={guid:Date.now()},Tt=/\?/;k.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||k.error("Invalid XML: "+(n?k.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var St=/\[\]$/,Et=/\r?\n/g,Ct=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))k.each(t,(function(t,i){n||St.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==w(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)Ot(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Mt.test(this.nodeName)&&!Ct.test(e)&&(this.checked||!pe.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var Lt=/%20/g,Dt=/#.*$/,It=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Nt=/^\/\//,zt={},Ft={},Bt="*/".concat("*"),jt=b.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Vt(e,t,n,r){var i={},o=e===Ft;function a(s){var l;return i[s]=!0,k.each(e[s]||[],(function(e,s){var c=s(t,n,r);return"string"!=typeof c||o||i[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function qt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}jt.href=At.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,k.ajaxSettings),t):qt(k.ajaxSettings,e)},ajaxPrefilter:Ut(zt),ajaxTransport:Ut(Ft),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,l,c,u,h,d,f=k.ajaxSetup({},t),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?k(p):k.event,m=k.Deferred(),v=k.Callbacks("once memory"),y=f.statusCode||{},_={},x={},w="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Rt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)A.always(e[A.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return n&&n.abort(t),T(0,t),this}};if(m.promise(A),f.url=((e||f.url||At.href)+"").replace(Nt,At.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(F)||[""],null==f.crossDomain){l=b.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=k.param(f.data,f.traditional)),Vt(zt,f,t,A),c)return A;for(h in(u=k.event&&f.global)&&0==k.active++&&k.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pt.test(f.type),i=f.url.replace(Dt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Lt,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Tt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(It,"$1"),d=(Tt.test(i)?"&":"?")+"_="+kt.guid+++d),f.url=i+d),f.ifModified&&(k.lastModified[i]&&A.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&A.setRequestHeader("If-None-Match",k.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&A.setRequestHeader("Content-Type",f.contentType),A.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Bt+"; q=0.01":""):f.accepts["*"]),f.headers)A.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(p,A,f)||c))return A.abort();if(w="abort",v.add(f.complete),A.done(f.success),A.fail(f.error),n=Vt(Ft,f,t,A)){if(A.readyState=1,u&&g.trigger("ajaxSend",[A,f]),c)return A;f.async&&f.timeout>0&&(s=r.setTimeout((function(){A.abort("timeout")}),f.timeout));try{c=!1,n.send(_,T)}catch(e){if(c)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,a,l){var h,d,b,_,x,w=t;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=l||"",A.readyState=e>0?4:0,h=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,A,a)),!h&&k.inArray("script",f.dataTypes)>-1&&k.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),_=function(e,t,n,r){var i,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,_,A,h),h?(f.ifModified&&((x=A.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=x),(x=A.getResponseHeader("etag"))&&(k.etag[i]=x)),204===e||"HEAD"===f.type?w="nocontent":304===e?w="notmodified":(w=_.state,d=_.data,h=!(b=_.error))):(b=w,!e&&w||(w="error",e<0&&(e=0))),A.status=e,A.statusText=(t||w)+"",h?m.resolveWith(p,[d,w,A]):m.rejectWith(p,[A,w,b]),A.statusCode(y),y=void 0,u&&g.trigger(h?"ajaxSuccess":"ajaxError",[A,f,h?d:b]),v.fireWith(p,[A,w]),u&&(g.trigger("ajaxComplete",[A,f]),--k.active||k.event.trigger("ajaxStop")))}return A},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},$t=k.ajaxSettings.xhr();m.cors=!!$t&&"withCredentials"in $t,m.ajax=$t=!!$t,k.ajaxTransport((function(e){var t,n;if(m.cors||$t&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ht[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Wt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+i):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||k.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?k(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(i)),a&&v(o)&&o(a[0]),a=o=void 0})),"script"})),m.createHTMLDocument=((Wt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Wt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=L.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,c=k.css(e,"position"),u=k(e),h={};"static"===c&&(e.style.position="relative"),s=u.offset(),o=k.css(e,"top"),l=k.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(a=(r=u.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),v(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+i),"using"in t?t.using.call(e,h):u.css(h)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ae}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(r){return $(this,(function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=qe(m.pixelPosition,(function(e,n){if(n)return n=Ve(e,t),Fe.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){k.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return $(this,(function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?k.css(t,n,s):k.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=s.call(arguments,2),i=function(){return e.apply(t||this,r.concat(s.call(arguments)))},i.guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=O,k.isFunction=v,k.isWindow=y,k.camelCase=X,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},void 0===(n=function(){return k}.apply(t,[]))||(e.exports=n);var Zt=r.jQuery,Kt=r.$;return k.noConflict=function(e){return r.$===k&&(r.$=Kt),e&&r.jQuery===k&&(r.jQuery=Zt),k},void 0===i&&(r.jQuery=r.$=k),k}))},98036:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Xr}});var n=function e(t,n){this.position=void 0;var r,i="KaTeX parse error: "+t,o=n&&n.loc;if(o&&o.start<=o.end){var a=o.lexer.input;r=o.start;var s=o.end;r===a.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=a.slice(r,s).replace(/[^]/g,"$&");i+=(r>15?""+a.slice(r-15,r):a.slice(0,r))+l+(s+15<a.length?a.slice(s,s+15)+"":a.slice(s))}var c=new Error(i);return c.name="ParseError",c.__proto__=e.prototype,c.position=r,c};n.prototype.__proto__=Error.prototype;var r=n,i=/([A-Z])/g,o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},a=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l=function(e,t){return-1!==e.indexOf(t)},c=function(e,t){return void 0===e?t:e},u=function(e){return String(e).replace(a,(function(e){return o[e]}))},h=function(e){return e.replace(i,"-$1").toLowerCase()},d=s,f=function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},p=function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return null!=t?t[1]:"_relative"},g=function(){function e(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},this.displayMode=c(e.displayMode,!1),this.output=c(e.output,"htmlAndMathml"),this.leqno=c(e.leqno,!1),this.fleqn=c(e.fleqn,!1),this.throwOnError=c(e.throwOnError,!0),this.errorColor=c(e.errorColor,"#cc0000"),this.macros=e.macros||{},this.minRuleThickness=Math.max(0,c(e.minRuleThickness,0)),this.colorIsTextColor=c(e.colorIsTextColor,!1),this.strict=c(e.strict,"warn"),this.trust=c(e.trust,!1),this.maxSize=Math.max(0,c(e.maxSize,1/0)),this.maxExpand=Math.max(0,c(e.maxExpand,1e3)),this.globalGroup=c(e.globalGroup,!1)}var t=e.prototype;return t.reportNonstrict=function(e,t,n){var i=this.strict;if("function"==typeof i&&(i=i(e,t,n)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new r("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r||!0!==r&&"error"!==r&&("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=p(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),m=function(){function e(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}var t=e.prototype;return t.sup=function(){return v[y[this.id]]},t.sub=function(){return v[b[this.id]]},t.fracNum=function(){return v[_[this.id]]},t.fracDen=function(){return v[x[this.id]]},t.cramp=function(){return v[w[this.id]]},t.text=function(){return v[A[this.id]]},t.isTight=function(){return this.size>=2},e}(),v=[new m(0,0,!1),new m(1,0,!0),new m(2,1,!1),new m(3,1,!0),new m(4,2,!1),new m(5,2,!0),new m(6,3,!1),new m(7,3,!0)],y=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],_=[2,3,4,5,6,7,6,7],x=[3,3,5,5,7,7,7,7],w=[1,1,3,3,5,5,7,7],A=[0,1,2,3,2,3,2,3],k={DISPLAY:v[0],TEXT:v[2],SCRIPT:v[4],SCRIPTSCRIPT:v[6]},T=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],S=[];function E(e){for(var t=0;t<S.length;t+=2)if(e>=S[t]&&e<=S[t+1])return!0;return!1}T.forEach((function(e){return e.blocks.forEach((function(e){return S.push.apply(S,e)}))}));var C={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},M=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),O={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},L={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},D={:"A",:"D",:"o",:"a",:"d",:"o",:"A",:"B",:"B",:"F",:"A",:"E",:"K",:"3",:"N",:"N",:"K",:"N",:"M",:"H",:"O",:"N",:"P",:"C",:"T",:"y",:"O",:"X",:"U",:"h",:"W",:"W",:"B",:"X",:"B",:"3",:"X",:"R",:"a",:"b",:"a",:"r",:"y",:"e",:"m",:"e",:"n",:"n",:"n",:"n",:"m",:"n",:"o",:"n",:"p",:"c",:"o",:"y",:"b",:"x",:"n",:"n",:"w",:"w",:"a",:"m",:"a",:"e",:"m",:"r"};function I(e,t,n){if(!O[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=O[t][r];if(!i&&e[0]in D&&(r=D[e[0]].charCodeAt(0),i=O[t][r]),i||"text"!==n||E(r)&&(i=O[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var R={},P=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],N=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],z=function(e,t){return t.size<2?e:P[e-1][t.size-1]},F=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=N[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new e(n)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:z(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:N[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var n=z(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!R[t=e>=5?0:e>=3?1:2]){var n=R[t]={cssEmPerMu:L.quad[t]/18};for(var r in L)L.hasOwnProperty(r)&&(n[r]=L[r][t])}return R[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();F.BASESIZE=6;var B=F,j={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},U={ex:!0,em:!0,mu:!0},V=function(e){return"string"!=typeof e&&(e=e.unit),e in j||e in U||"ex"===e},q=function(e,t){var n;if(e.unit in j)n=j[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var i;if(i=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new r("Invalid unit: '"+e.unit+"'");n=i.fontMetrics().quad}i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},H=function(e){return+e.toFixed(4)+"em"},$=function(e){return e.filter((function(e){return e})).join(" ")},W=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},G=function(e){var t=document.createElement(e);for(var n in t.className=$(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},Y=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+u($(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=h(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+u(n)+'"'),this.attributes)this.attributes.hasOwnProperty(i)&&(t+=" "+i+'="'+u(this.attributes[i])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+"</"+e+">"},X=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,W.call(this,e,n,r),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return G.call(this,"span")},t.toMarkup=function(){return Y.call(this,"span")},e}(),Z=function(){function e(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,W.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return G.call(this,"a")},t.toMarkup=function(){return Y.call(this,"a")},e}(),K=function(){function e(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=h(n)+":"+this.style[n]+";");return t&&(e+=' style="'+u(t)+'"'),e+"'/>"},e}(),J={:"",:"",:"",:""},Q=function(){function e(e,t,n,r,i,o,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=o||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<T.length;t++)for(var n=T[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[]/.test(this.text)&&(this.text=J[this.text])}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=H(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=$(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=u($(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=h(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+u(n)+'"');var i=u(this.text);return e?(t+=">",t+=i,t+="</span>"):i},e}(),ee=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("path_to_url","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e='<svg xmlns="path_to_url"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+"</svg>"},e}(),te=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("path_to_url","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",C[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+C[this.pathName]+"'/>"},e}(),ne=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("path_to_url","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+"/>"},e}();function re(e){if(e instanceof Q)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ie={bin:1,close:1,inner:1,open:1,punct:1,rel:1},oe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ae={math:{},text:{}},se=ae;function le(e,t,n,r,i,o){ae[e][i]={font:t,group:n,replace:r},o&&r&&(ae[e][r]=ae[e][i])}var ce="math",ue="text",he="main",de="ams",fe="accent-token",pe="bin",ge="close",me="inner",ve="mathord",ye="op-token",be="open",_e="punct",xe="rel",we="spacing",Ae="textord";le(ce,he,xe,"","\\equiv",!0),le(ce,he,xe,"","\\prec",!0),le(ce,he,xe,"","\\succ",!0),le(ce,he,xe,"","\\sim",!0),le(ce,he,xe,"","\\perp"),le(ce,he,xe,"","\\preceq",!0),le(ce,he,xe,"","\\succeq",!0),le(ce,he,xe,"","\\simeq",!0),le(ce,he,xe,"","\\mid",!0),le(ce,he,xe,"","\\ll",!0),le(ce,he,xe,"","\\gg",!0),le(ce,he,xe,"","\\asymp",!0),le(ce,he,xe,"","\\parallel"),le(ce,he,xe,"","\\bowtie",!0),le(ce,he,xe,"","\\smile",!0),le(ce,he,xe,"","\\sqsubseteq",!0),le(ce,he,xe,"","\\sqsupseteq",!0),le(ce,he,xe,"","\\doteq",!0),le(ce,he,xe,"","\\frown",!0),le(ce,he,xe,"","\\ni",!0),le(ce,he,xe,"","\\propto",!0),le(ce,he,xe,"","\\vdash",!0),le(ce,he,xe,"","\\dashv",!0),le(ce,he,xe,"","\\owns"),le(ce,he,_e,".","\\ldotp"),le(ce,he,_e,"","\\cdotp"),le(ce,he,Ae,"#","\\#"),le(ue,he,Ae,"#","\\#"),le(ce,he,Ae,"&","\\&"),le(ue,he,Ae,"&","\\&"),le(ce,he,Ae,"","\\aleph",!0),le(ce,he,Ae,"","\\forall",!0),le(ce,he,Ae,"","\\hbar",!0),le(ce,he,Ae,"","\\exists",!0),le(ce,he,Ae,"","\\nabla",!0),le(ce,he,Ae,"","\\flat",!0),le(ce,he,Ae,"","\\ell",!0),le(ce,he,Ae,"","\\natural",!0),le(ce,he,Ae,"","\\clubsuit",!0),le(ce,he,Ae,"","\\wp",!0),le(ce,he,Ae,"","\\sharp",!0),le(ce,he,Ae,"","\\diamondsuit",!0),le(ce,he,Ae,"","\\Re",!0),le(ce,he,Ae,"","\\heartsuit",!0),le(ce,he,Ae,"","\\Im",!0),le(ce,he,Ae,"","\\spadesuit",!0),le(ce,he,Ae,"","\\S",!0),le(ue,he,Ae,"","\\S"),le(ce,he,Ae,"","\\P",!0),le(ue,he,Ae,"","\\P"),le(ce,he,Ae,"","\\dag"),le(ue,he,Ae,"","\\dag"),le(ue,he,Ae,"","\\textdagger"),le(ce,he,Ae,"","\\ddag"),le(ue,he,Ae,"","\\ddag"),le(ue,he,Ae,"","\\textdaggerdbl"),le(ce,he,ge,"","\\rmoustache",!0),le(ce,he,be,"","\\lmoustache",!0),le(ce,he,ge,"","\\rgroup",!0),le(ce,he,be,"","\\lgroup",!0),le(ce,he,pe,"","\\mp",!0),le(ce,he,pe,"","\\ominus",!0),le(ce,he,pe,"","\\uplus",!0),le(ce,he,pe,"","\\sqcap",!0),le(ce,he,pe,"","\\ast"),le(ce,he,pe,"","\\sqcup",!0),le(ce,he,pe,"","\\bigcirc",!0),le(ce,he,pe,"","\\bullet"),le(ce,he,pe,"","\\ddagger"),le(ce,he,pe,"","\\wr",!0),le(ce,he,pe,"","\\amalg"),le(ce,he,pe,"&","\\And"),le(ce,he,xe,"","\\longleftarrow",!0),le(ce,he,xe,"","\\Leftarrow",!0),le(ce,he,xe,"","\\Longleftarrow",!0),le(ce,he,xe,"","\\longrightarrow",!0),le(ce,he,xe,"","\\Rightarrow",!0),le(ce,he,xe,"","\\Longrightarrow",!0),le(ce,he,xe,"","\\leftrightarrow",!0),le(ce,he,xe,"","\\longleftrightarrow",!0),le(ce,he,xe,"","\\Leftrightarrow",!0),le(ce,he,xe,"","\\Longleftrightarrow",!0),le(ce,he,xe,"","\\mapsto",!0),le(ce,he,xe,"","\\longmapsto",!0),le(ce,he,xe,"","\\nearrow",!0),le(ce,he,xe,"","\\hookleftarrow",!0),le(ce,he,xe,"","\\hookrightarrow",!0),le(ce,he,xe,"","\\searrow",!0),le(ce,he,xe,"","\\leftharpoonup",!0),le(ce,he,xe,"","\\rightharpoonup",!0),le(ce,he,xe,"","\\swarrow",!0),le(ce,he,xe,"","\\leftharpoondown",!0),le(ce,he,xe,"","\\rightharpoondown",!0),le(ce,he,xe,"","\\nwarrow",!0),le(ce,he,xe,"","\\rightleftharpoons",!0),le(ce,de,xe,"","\\nless",!0),le(ce,de,xe,"","\\@nleqslant"),le(ce,de,xe,"","\\@nleqq"),le(ce,de,xe,"","\\lneq",!0),le(ce,de,xe,"","\\lneqq",!0),le(ce,de,xe,"","\\@lvertneqq"),le(ce,de,xe,"","\\lnsim",!0),le(ce,de,xe,"","\\lnapprox",!0),le(ce,de,xe,"","\\nprec",!0),le(ce,de,xe,"","\\npreceq",!0),le(ce,de,xe,"","\\precnsim",!0),le(ce,de,xe,"","\\precnapprox",!0),le(ce,de,xe,"","\\nsim",!0),le(ce,de,xe,"","\\@nshortmid"),le(ce,de,xe,"","\\nmid",!0),le(ce,de,xe,"","\\nvdash",!0),le(ce,de,xe,"","\\nvDash",!0),le(ce,de,xe,"","\\ntriangleleft"),le(ce,de,xe,"","\\ntrianglelefteq",!0),le(ce,de,xe,"","\\subsetneq",!0),le(ce,de,xe,"","\\@varsubsetneq"),le(ce,de,xe,"","\\subsetneqq",!0),le(ce,de,xe,"","\\@varsubsetneqq"),le(ce,de,xe,"","\\ngtr",!0),le(ce,de,xe,"","\\@ngeqslant"),le(ce,de,xe,"","\\@ngeqq"),le(ce,de,xe,"","\\gneq",!0),le(ce,de,xe,"","\\gneqq",!0),le(ce,de,xe,"","\\@gvertneqq"),le(ce,de,xe,"","\\gnsim",!0),le(ce,de,xe,"","\\gnapprox",!0),le(ce,de,xe,"","\\nsucc",!0),le(ce,de,xe,"","\\nsucceq",!0),le(ce,de,xe,"","\\succnsim",!0),le(ce,de,xe,"","\\succnapprox",!0),le(ce,de,xe,"","\\ncong",!0),le(ce,de,xe,"","\\@nshortparallel"),le(ce,de,xe,"","\\nparallel",!0),le(ce,de,xe,"","\\nVDash",!0),le(ce,de,xe,"","\\ntriangleright"),le(ce,de,xe,"","\\ntrianglerighteq",!0),le(ce,de,xe,"","\\@nsupseteqq"),le(ce,de,xe,"","\\supsetneq",!0),le(ce,de,xe,"","\\@varsupsetneq"),le(ce,de,xe,"","\\supsetneqq",!0),le(ce,de,xe,"","\\@varsupsetneqq"),le(ce,de,xe,"","\\nVdash",!0),le(ce,de,xe,"","\\precneqq",!0),le(ce,de,xe,"","\\succneqq",!0),le(ce,de,xe,"","\\@nsubseteqq"),le(ce,de,pe,"","\\unlhd"),le(ce,de,pe,"","\\unrhd"),le(ce,de,xe,"","\\nleftarrow",!0),le(ce,de,xe,"","\\nrightarrow",!0),le(ce,de,xe,"","\\nLeftarrow",!0),le(ce,de,xe,"","\\nRightarrow",!0),le(ce,de,xe,"","\\nleftrightarrow",!0),le(ce,de,xe,"","\\nLeftrightarrow",!0),le(ce,de,xe,"","\\vartriangle"),le(ce,de,Ae,"","\\hslash"),le(ce,de,Ae,"","\\triangledown"),le(ce,de,Ae,"","\\lozenge"),le(ce,de,Ae,"","\\circledS"),le(ce,de,Ae,"","\\circledR"),le(ue,de,Ae,"","\\circledR"),le(ce,de,Ae,"","\\measuredangle",!0),le(ce,de,Ae,"","\\nexists"),le(ce,de,Ae,"","\\mho"),le(ce,de,Ae,"","\\Finv",!0),le(ce,de,Ae,"","\\Game",!0),le(ce,de,Ae,"","\\backprime"),le(ce,de,Ae,"","\\blacktriangle"),le(ce,de,Ae,"","\\blacktriangledown"),le(ce,de,Ae,"","\\blacksquare"),le(ce,de,Ae,"","\\blacklozenge"),le(ce,de,Ae,"","\\bigstar"),le(ce,de,Ae,"","\\sphericalangle",!0),le(ce,de,Ae,"","\\complement",!0),le(ce,de,Ae,"","\\eth",!0),le(ue,he,Ae,"",""),le(ce,de,Ae,"","\\diagup"),le(ce,de,Ae,"","\\diagdown"),le(ce,de,Ae,"","\\square"),le(ce,de,Ae,"","\\Box"),le(ce,de,Ae,"","\\Diamond"),le(ce,de,Ae,"","\\yen",!0),le(ue,de,Ae,"","\\yen",!0),le(ce,de,Ae,"","\\checkmark",!0),le(ue,de,Ae,"","\\checkmark"),le(ce,de,Ae,"","\\beth",!0),le(ce,de,Ae,"","\\daleth",!0),le(ce,de,Ae,"","\\gimel",!0),le(ce,de,Ae,"","\\digamma",!0),le(ce,de,Ae,"","\\varkappa"),le(ce,de,be,"","\\@ulcorner",!0),le(ce,de,ge,"","\\@urcorner",!0),le(ce,de,be,"","\\@llcorner",!0),le(ce,de,ge,"","\\@lrcorner",!0),le(ce,de,xe,"","\\leqq",!0),le(ce,de,xe,"","\\leqslant",!0),le(ce,de,xe,"","\\eqslantless",!0),le(ce,de,xe,"","\\lesssim",!0),le(ce,de,xe,"","\\lessapprox",!0),le(ce,de,xe,"","\\approxeq",!0),le(ce,de,pe,"","\\lessdot"),le(ce,de,xe,"","\\lll",!0),le(ce,de,xe,"","\\lessgtr",!0),le(ce,de,xe,"","\\lesseqgtr",!0),le(ce,de,xe,"","\\lesseqqgtr",!0),le(ce,de,xe,"","\\doteqdot"),le(ce,de,xe,"","\\risingdotseq",!0),le(ce,de,xe,"","\\fallingdotseq",!0),le(ce,de,xe,"","\\backsim",!0),le(ce,de,xe,"","\\backsimeq",!0),le(ce,de,xe,"","\\subseteqq",!0),le(ce,de,xe,"","\\Subset",!0),le(ce,de,xe,"","\\sqsubset",!0),le(ce,de,xe,"","\\preccurlyeq",!0),le(ce,de,xe,"","\\curlyeqprec",!0),le(ce,de,xe,"","\\precsim",!0),le(ce,de,xe,"","\\precapprox",!0),le(ce,de,xe,"","\\vartriangleleft"),le(ce,de,xe,"","\\trianglelefteq"),le(ce,de,xe,"","\\vDash",!0),le(ce,de,xe,"","\\Vvdash",!0),le(ce,de,xe,"","\\smallsmile"),le(ce,de,xe,"","\\smallfrown"),le(ce,de,xe,"","\\bumpeq",!0),le(ce,de,xe,"","\\Bumpeq",!0),le(ce,de,xe,"","\\geqq",!0),le(ce,de,xe,"","\\geqslant",!0),le(ce,de,xe,"","\\eqslantgtr",!0),le(ce,de,xe,"","\\gtrsim",!0),le(ce,de,xe,"","\\gtrapprox",!0),le(ce,de,pe,"","\\gtrdot"),le(ce,de,xe,"","\\ggg",!0),le(ce,de,xe,"","\\gtrless",!0),le(ce,de,xe,"","\\gtreqless",!0),le(ce,de,xe,"","\\gtreqqless",!0),le(ce,de,xe,"","\\eqcirc",!0),le(ce,de,xe,"","\\circeq",!0),le(ce,de,xe,"","\\triangleq",!0),le(ce,de,xe,"","\\thicksim"),le(ce,de,xe,"","\\thickapprox"),le(ce,de,xe,"","\\supseteqq",!0),le(ce,de,xe,"","\\Supset",!0),le(ce,de,xe,"","\\sqsupset",!0),le(ce,de,xe,"","\\succcurlyeq",!0),le(ce,de,xe,"","\\curlyeqsucc",!0),le(ce,de,xe,"","\\succsim",!0),le(ce,de,xe,"","\\succapprox",!0),le(ce,de,xe,"","\\vartriangleright"),le(ce,de,xe,"","\\trianglerighteq"),le(ce,de,xe,"","\\Vdash",!0),le(ce,de,xe,"","\\shortmid"),le(ce,de,xe,"","\\shortparallel"),le(ce,de,xe,"","\\between",!0),le(ce,de,xe,"","\\pitchfork",!0),le(ce,de,xe,"","\\varpropto"),le(ce,de,xe,"","\\blacktriangleleft"),le(ce,de,xe,"","\\therefore",!0),le(ce,de,xe,"","\\backepsilon"),le(ce,de,xe,"","\\blacktriangleright"),le(ce,de,xe,"","\\because",!0),le(ce,de,xe,"","\\llless"),le(ce,de,xe,"","\\gggtr"),le(ce,de,pe,"","\\lhd"),le(ce,de,pe,"","\\rhd"),le(ce,de,xe,"","\\eqsim",!0),le(ce,he,xe,"","\\Join"),le(ce,de,xe,"","\\Doteq",!0),le(ce,de,pe,"","\\dotplus",!0),le(ce,de,pe,"","\\smallsetminus"),le(ce,de,pe,"","\\Cap",!0),le(ce,de,pe,"","\\Cup",!0),le(ce,de,pe,"","\\doublebarwedge",!0),le(ce,de,pe,"","\\boxminus",!0),le(ce,de,pe,"","\\boxplus",!0),le(ce,de,pe,"","\\divideontimes",!0),le(ce,de,pe,"","\\ltimes",!0),le(ce,de,pe,"","\\rtimes",!0),le(ce,de,pe,"","\\leftthreetimes",!0),le(ce,de,pe,"","\\rightthreetimes",!0),le(ce,de,pe,"","\\curlywedge",!0),le(ce,de,pe,"","\\curlyvee",!0),le(ce,de,pe,"","\\circleddash",!0),le(ce,de,pe,"","\\circledast",!0),le(ce,de,pe,"","\\centerdot"),le(ce,de,pe,"","\\intercal",!0),le(ce,de,pe,"","\\doublecap"),le(ce,de,pe,"","\\doublecup"),le(ce,de,pe,"","\\boxtimes",!0),le(ce,de,xe,"","\\dashrightarrow",!0),le(ce,de,xe,"","\\dashleftarrow",!0),le(ce,de,xe,"","\\leftleftarrows",!0),le(ce,de,xe,"","\\leftrightarrows",!0),le(ce,de,xe,"","\\Lleftarrow",!0),le(ce,de,xe,"","\\twoheadleftarrow",!0),le(ce,de,xe,"","\\leftarrowtail",!0),le(ce,de,xe,"","\\looparrowleft",!0),le(ce,de,xe,"","\\leftrightharpoons",!0),le(ce,de,xe,"","\\curvearrowleft",!0),le(ce,de,xe,"","\\circlearrowleft",!0),le(ce,de,xe,"","\\Lsh",!0),le(ce,de,xe,"","\\upuparrows",!0),le(ce,de,xe,"","\\upharpoonleft",!0),le(ce,de,xe,"","\\downharpoonleft",!0),le(ce,he,xe,"","\\origof",!0),le(ce,he,xe,"","\\imageof",!0),le(ce,de,xe,"","\\multimap",!0),le(ce,de,xe,"","\\leftrightsquigarrow",!0),le(ce,de,xe,"","\\rightrightarrows",!0),le(ce,de,xe,"","\\rightleftarrows",!0),le(ce,de,xe,"","\\twoheadrightarrow",!0),le(ce,de,xe,"","\\rightarrowtail",!0),le(ce,de,xe,"","\\looparrowright",!0),le(ce,de,xe,"","\\curvearrowright",!0),le(ce,de,xe,"","\\circlearrowright",!0),le(ce,de,xe,"","\\Rsh",!0),le(ce,de,xe,"","\\downdownarrows",!0),le(ce,de,xe,"","\\upharpoonright",!0),le(ce,de,xe,"","\\downharpoonright",!0),le(ce,de,xe,"","\\rightsquigarrow",!0),le(ce,de,xe,"","\\leadsto"),le(ce,de,xe,"","\\Rrightarrow",!0),le(ce,de,xe,"","\\restriction"),le(ce,he,Ae,"","`"),le(ce,he,Ae,"$","\\$"),le(ue,he,Ae,"$","\\$"),le(ue,he,Ae,"$","\\textdollar"),le(ce,he,Ae,"%","\\%"),le(ue,he,Ae,"%","\\%"),le(ce,he,Ae,"_","\\_"),le(ue,he,Ae,"_","\\_"),le(ue,he,Ae,"_","\\textunderscore"),le(ce,he,Ae,"","\\angle",!0),le(ce,he,Ae,"","\\infty",!0),le(ce,he,Ae,"","\\prime"),le(ce,he,Ae,"","\\triangle"),le(ce,he,Ae,"","\\Gamma",!0),le(ce,he,Ae,"","\\Delta",!0),le(ce,he,Ae,"","\\Theta",!0),le(ce,he,Ae,"","\\Lambda",!0),le(ce,he,Ae,"","\\Xi",!0),le(ce,he,Ae,"","\\Pi",!0),le(ce,he,Ae,"","\\Sigma",!0),le(ce,he,Ae,"","\\Upsilon",!0),le(ce,he,Ae,"","\\Phi",!0),le(ce,he,Ae,"","\\Psi",!0),le(ce,he,Ae,"","\\Omega",!0),le(ce,he,Ae,"A",""),le(ce,he,Ae,"B",""),le(ce,he,Ae,"E",""),le(ce,he,Ae,"Z",""),le(ce,he,Ae,"H",""),le(ce,he,Ae,"I",""),le(ce,he,Ae,"K",""),le(ce,he,Ae,"M",""),le(ce,he,Ae,"N",""),le(ce,he,Ae,"O",""),le(ce,he,Ae,"P",""),le(ce,he,Ae,"T",""),le(ce,he,Ae,"X",""),le(ce,he,Ae,"","\\neg",!0),le(ce,he,Ae,"","\\lnot"),le(ce,he,Ae,"","\\top"),le(ce,he,Ae,"","\\bot"),le(ce,he,Ae,"","\\emptyset"),le(ce,de,Ae,"","\\varnothing"),le(ce,he,ve,"","\\alpha",!0),le(ce,he,ve,"","\\beta",!0),le(ce,he,ve,"","\\gamma",!0),le(ce,he,ve,"","\\delta",!0),le(ce,he,ve,"","\\epsilon",!0),le(ce,he,ve,"","\\zeta",!0),le(ce,he,ve,"","\\eta",!0),le(ce,he,ve,"","\\theta",!0),le(ce,he,ve,"","\\iota",!0),le(ce,he,ve,"","\\kappa",!0),le(ce,he,ve,"","\\lambda",!0),le(ce,he,ve,"","\\mu",!0),le(ce,he,ve,"","\\nu",!0),le(ce,he,ve,"","\\xi",!0),le(ce,he,ve,"","\\omicron",!0),le(ce,he,ve,"","\\pi",!0),le(ce,he,ve,"","\\rho",!0),le(ce,he,ve,"","\\sigma",!0),le(ce,he,ve,"","\\tau",!0),le(ce,he,ve,"","\\upsilon",!0),le(ce,he,ve,"","\\phi",!0),le(ce,he,ve,"","\\chi",!0),le(ce,he,ve,"","\\psi",!0),le(ce,he,ve,"","\\omega",!0),le(ce,he,ve,"","\\varepsilon",!0),le(ce,he,ve,"","\\vartheta",!0),le(ce,he,ve,"","\\varpi",!0),le(ce,he,ve,"","\\varrho",!0),le(ce,he,ve,"","\\varsigma",!0),le(ce,he,ve,"","\\varphi",!0),le(ce,he,pe,"","*",!0),le(ce,he,pe,"+","+"),le(ce,he,pe,"","-",!0),le(ce,he,pe,"","\\cdot",!0),le(ce,he,pe,"","\\circ"),le(ce,he,pe,"","\\div",!0),le(ce,he,pe,"","\\pm",!0),le(ce,he,pe,"","\\times",!0),le(ce,he,pe,"","\\cap",!0),le(ce,he,pe,"","\\cup",!0),le(ce,he,pe,"","\\setminus"),le(ce,he,pe,"","\\land"),le(ce,he,pe,"","\\lor"),le(ce,he,pe,"","\\wedge",!0),le(ce,he,pe,"","\\vee",!0),le(ce,he,Ae,"","\\surd"),le(ce,he,be,"","\\langle",!0),le(ce,he,be,"","\\lvert"),le(ce,he,be,"","\\lVert"),le(ce,he,ge,"?","?"),le(ce,he,ge,"!","!"),le(ce,he,ge,"","\\rangle",!0),le(ce,he,ge,"","\\rvert"),le(ce,he,ge,"","\\rVert"),le(ce,he,xe,"=","="),le(ce,he,xe,":",":"),le(ce,he,xe,"","\\approx",!0),le(ce,he,xe,"","\\cong",!0),le(ce,he,xe,"","\\ge"),le(ce,he,xe,"","\\geq",!0),le(ce,he,xe,"","\\gets"),le(ce,he,xe,">","\\gt",!0),le(ce,he,xe,"","\\in",!0),le(ce,he,xe,"","\\@not"),le(ce,he,xe,"","\\subset",!0),le(ce,he,xe,"","\\supset",!0),le(ce,he,xe,"","\\subseteq",!0),le(ce,he,xe,"","\\supseteq",!0),le(ce,de,xe,"","\\nsubseteq",!0),le(ce,de,xe,"","\\nsupseteq",!0),le(ce,he,xe,"","\\models"),le(ce,he,xe,"","\\leftarrow",!0),le(ce,he,xe,"","\\le"),le(ce,he,xe,"","\\leq",!0),le(ce,he,xe,"<","\\lt",!0),le(ce,he,xe,"","\\rightarrow",!0),le(ce,he,xe,"","\\to"),le(ce,de,xe,"","\\ngeq",!0),le(ce,de,xe,"","\\nleq",!0),le(ce,he,we,"","\\ "),le(ce,he,we,"","\\space"),le(ce,he,we,"","\\nobreakspace"),le(ue,he,we,"","\\ "),le(ue,he,we,""," "),le(ue,he,we,"","\\space"),le(ue,he,we,"","\\nobreakspace"),le(ce,he,we,null,"\\nobreak"),le(ce,he,we,null,"\\allowbreak"),le(ce,he,_e,",",","),le(ce,he,_e,";",";"),le(ce,de,pe,"","\\barwedge",!0),le(ce,de,pe,"","\\veebar",!0),le(ce,he,pe,"","\\odot",!0),le(ce,he,pe,"","\\oplus",!0),le(ce,he,pe,"","\\otimes",!0),le(ce,he,Ae,"","\\partial",!0),le(ce,he,pe,"","\\oslash",!0),le(ce,de,pe,"","\\circledcirc",!0),le(ce,de,pe,"","\\boxdot",!0),le(ce,he,pe,"","\\bigtriangleup"),le(ce,he,pe,"","\\bigtriangledown"),le(ce,he,pe,"","\\dagger"),le(ce,he,pe,"","\\diamond"),le(ce,he,pe,"","\\star"),le(ce,he,pe,"","\\triangleleft"),le(ce,he,pe,"","\\triangleright"),le(ce,he,be,"{","\\{"),le(ue,he,Ae,"{","\\{"),le(ue,he,Ae,"{","\\textbraceleft"),le(ce,he,ge,"}","\\}"),le(ue,he,Ae,"}","\\}"),le(ue,he,Ae,"}","\\textbraceright"),le(ce,he,be,"{","\\lbrace"),le(ce,he,ge,"}","\\rbrace"),le(ce,he,be,"[","\\lbrack",!0),le(ue,he,Ae,"[","\\lbrack",!0),le(ce,he,ge,"]","\\rbrack",!0),le(ue,he,Ae,"]","\\rbrack",!0),le(ce,he,be,"(","\\lparen",!0),le(ce,he,ge,")","\\rparen",!0),le(ue,he,Ae,"<","\\textless",!0),le(ue,he,Ae,">","\\textgreater",!0),le(ce,he,be,"","\\lfloor",!0),le(ce,he,ge,"","\\rfloor",!0),le(ce,he,be,"","\\lceil",!0),le(ce,he,ge,"","\\rceil",!0),le(ce,he,Ae,"\\","\\backslash"),le(ce,he,Ae,"","|"),le(ce,he,Ae,"","\\vert"),le(ue,he,Ae,"|","\\textbar",!0),le(ce,he,Ae,"","\\|"),le(ce,he,Ae,"","\\Vert"),le(ue,he,Ae,"","\\textbardbl"),le(ue,he,Ae,"~","\\textasciitilde"),le(ue,he,Ae,"\\","\\textbackslash"),le(ue,he,Ae,"^","\\textasciicircum"),le(ce,he,xe,"","\\uparrow",!0),le(ce,he,xe,"","\\Uparrow",!0),le(ce,he,xe,"","\\downarrow",!0),le(ce,he,xe,"","\\Downarrow",!0),le(ce,he,xe,"","\\updownarrow",!0),le(ce,he,xe,"","\\Updownarrow",!0),le(ce,he,ye,"","\\coprod"),le(ce,he,ye,"","\\bigvee"),le(ce,he,ye,"","\\bigwedge"),le(ce,he,ye,"","\\biguplus"),le(ce,he,ye,"","\\bigcap"),le(ce,he,ye,"","\\bigcup"),le(ce,he,ye,"","\\int"),le(ce,he,ye,"","\\intop"),le(ce,he,ye,"","\\iint"),le(ce,he,ye,"","\\iiint"),le(ce,he,ye,"","\\prod"),le(ce,he,ye,"","\\sum"),le(ce,he,ye,"","\\bigotimes"),le(ce,he,ye,"","\\bigoplus"),le(ce,he,ye,"","\\bigodot"),le(ce,he,ye,"","\\oint"),le(ce,he,ye,"","\\oiint"),le(ce,he,ye,"","\\oiiint"),le(ce,he,ye,"","\\bigsqcup"),le(ce,he,ye,"","\\smallint"),le(ue,he,me,"","\\textellipsis"),le(ce,he,me,"","\\mathellipsis"),le(ue,he,me,"","\\ldots",!0),le(ce,he,me,"","\\ldots",!0),le(ce,he,me,"","\\@cdots",!0),le(ce,he,me,"","\\ddots",!0),le(ce,he,Ae,"","\\varvdots"),le(ce,he,fe,"","\\acute"),le(ce,he,fe,"","\\grave"),le(ce,he,fe,"","\\ddot"),le(ce,he,fe,"~","\\tilde"),le(ce,he,fe,"","\\bar"),le(ce,he,fe,"","\\breve"),le(ce,he,fe,"","\\check"),le(ce,he,fe,"^","\\hat"),le(ce,he,fe,"","\\vec"),le(ce,he,fe,"","\\dot"),le(ce,he,fe,"","\\mathring"),le(ce,he,ve,"","\\@imath"),le(ce,he,ve,"","\\@jmath"),le(ce,he,Ae,"",""),le(ce,he,Ae,"",""),le(ue,he,Ae,"","\\i",!0),le(ue,he,Ae,"","\\j",!0),le(ue,he,Ae,"","\\ss",!0),le(ue,he,Ae,"","\\ae",!0),le(ue,he,Ae,"","\\oe",!0),le(ue,he,Ae,"","\\o",!0),le(ue,he,Ae,"","\\AE",!0),le(ue,he,Ae,"","\\OE",!0),le(ue,he,Ae,"","\\O",!0),le(ue,he,fe,"","\\'"),le(ue,he,fe,"","\\`"),le(ue,he,fe,"","\\^"),le(ue,he,fe,"","\\~"),le(ue,he,fe,"","\\="),le(ue,he,fe,"","\\u"),le(ue,he,fe,"","\\."),le(ue,he,fe,"","\\c"),le(ue,he,fe,"","\\r"),le(ue,he,fe,"","\\v"),le(ue,he,fe,"",'\\"'),le(ue,he,fe,"","\\H"),le(ue,he,fe,"","\\textcircled");var ke={"--":!0,"---":!0,"``":!0,"''":!0};le(ue,he,Ae,"","--",!0),le(ue,he,Ae,"","\\textendash"),le(ue,he,Ae,"","---",!0),le(ue,he,Ae,"","\\textemdash"),le(ue,he,Ae,"","`",!0),le(ue,he,Ae,"","\\textquoteleft"),le(ue,he,Ae,"","'",!0),le(ue,he,Ae,"","\\textquoteright"),le(ue,he,Ae,"","``",!0),le(ue,he,Ae,"","\\textquotedblleft"),le(ue,he,Ae,"","''",!0),le(ue,he,Ae,"","\\textquotedblright"),le(ce,he,Ae,"","\\degree",!0),le(ue,he,Ae,"","\\degree"),le(ue,he,Ae,"","\\textdegree",!0),le(ce,he,Ae,"","\\pounds"),le(ce,he,Ae,"","\\mathsterling",!0),le(ue,he,Ae,"","\\pounds"),le(ue,he,Ae,"","\\textsterling",!0),le(ce,de,Ae,"","\\maltese"),le(ue,de,Ae,"","\\maltese");for(var Te='0123456789/@."',Se=0;Se<Te.length;Se++){var Ee=Te.charAt(Se);le(ce,he,Ae,Ee,Ee)}for(var Ce='0123456789!@*()-=+";:?/.,',Me=0;Me<Ce.length;Me++){var Oe=Ce.charAt(Me);le(ue,he,Ae,Oe,Oe)}for(var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",De=0;De<Le.length;De++){var Ie=Le.charAt(De);le(ce,he,ve,Ie,Ie),le(ue,he,Ae,Ie,Ie)}le(ce,de,Ae,"C",""),le(ue,de,Ae,"C",""),le(ce,de,Ae,"H",""),le(ue,de,Ae,"H",""),le(ce,de,Ae,"N",""),le(ue,de,Ae,"N",""),le(ce,de,Ae,"P",""),le(ue,de,Ae,"P",""),le(ce,de,Ae,"Q",""),le(ue,de,Ae,"Q",""),le(ce,de,Ae,"R",""),le(ue,de,Ae,"R",""),le(ce,de,Ae,"Z",""),le(ue,de,Ae,"Z",""),le(ce,he,ve,"h",""),le(ue,he,ve,"h","");for(var Re="",Pe=0;Pe<Le.length;Pe++){var Ne=Le.charAt(Pe);le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56320+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56372+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56424+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56580+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56736+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56788+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56840+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56944+Pe)),le(ue,he,Ae,Ne,Re),Pe<26&&(le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56632+Pe)),le(ue,he,Ae,Ne,Re),le(ce,he,ve,Ne,Re=String.fromCharCode(55349,56476+Pe)),le(ue,he,Ae,Ne,Re))}le(ce,he,ve,"k",Re=String.fromCharCode(55349,56668)),le(ue,he,Ae,"k",Re);for(var ze=0;ze<10;ze++){var Fe=ze.toString();le(ce,he,ve,Fe,Re=String.fromCharCode(55349,57294+ze)),le(ue,he,Ae,Fe,Re),le(ce,he,ve,Fe,Re=String.fromCharCode(55349,57314+ze)),le(ue,he,Ae,Fe,Re),le(ce,he,ve,Fe,Re=String.fromCharCode(55349,57324+ze)),le(ue,he,Ae,Fe,Re),le(ce,he,ve,Fe,Re=String.fromCharCode(55349,57334+ze)),le(ue,he,Ae,Fe,Re)}for(var Be="",je=0;je<Be.length;je++){var Ue=Be.charAt(je);le(ce,he,ve,Ue,Ue),le(ue,he,Ae,Ue,Ue)}var Ve=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],qe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],He=function(e,t,n){return se[n][e]&&se[n][e].replace&&(e=se[n][e].replace),{value:e,metrics:I(e,t,n)}},$e=function(e,t,n,r,i){var o,a=He(e,t,n),s=a.metrics;if(e=a.value,s){var l=s.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),o=new Q(e,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new Q(e,0,0,0,0,0,i);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},We=function(e,t){if($(e.classes)!==$(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},Ge=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var o=e.children[i];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ye=function(e,t,n,r){var i=new X(e,t,n,r);return Ge(i),i},Xe=function(e,t,n,r){return new X(e,t,n,r)},Ze=function(e){var t=new M(e);return Ge(t),t},Ke=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Je={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Qe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},et={fontMap:Je,makeSymbol:$e,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&He(e,"Main-Bold",t).metrics?$e(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===se[t][e].font?$e(e,"Main-Regular",t,n,r):$e(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ye,makeSvgSpan:Xe,makeLineSpan:function(e,t,n){var r=Ye([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=H(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new Z(e,t,n,r);return Ge(i),i},makeFragment:Ze,wrapFragment:function(e,t){return e instanceof M?Ye([],[e],t):e},makeVList:function(e,t){for(var n=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,o=1;o<t.length;o++){var a=-t[o].shift-i-t[o].elem.depth,s=a-(t[o-1].elem.height+t[o-1].elem.depth);i+=a,n.push({type:"kern",size:s}),n.push(t[o])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,u=0;u<e.children.length;u++){var h=e.children[u];c-="kern"===h.type?h.size:h.elem.height+h.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var d=e.children[0];if("elem"!==d.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-d.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-d.elem.depth}}return{children:e.children,depth:l}}(e),r=n.children,i=n.depth,o=0,a=0;a<r.length;a++){var s=r[a];if("elem"===s.type){var l=s.elem;o=Math.max(o,l.maxFontSize,l.height)}}o+=2;var c=Ye(["pstrut"],[]);c.style.height=H(o);for(var u=[],h=i,d=i,f=i,p=0;p<r.length;p++){var g=r[p];if("kern"===g.type)f+=g.size;else{var m=g.elem,v=g.wrapperClasses||[],y=g.wrapperStyle||{},b=Ye(v,[c,m],void 0,y);b.style.top=H(-o-f-m.depth),g.marginLeft&&(b.style.marginLeft=g.marginLeft),g.marginRight&&(b.style.marginRight=g.marginRight),u.push(b),f+=m.height+m.depth}h=Math.min(h,f),d=Math.max(d,f)}var _,x=Ye(["vlist"],u);if(x.style.height=H(d),h<0){var w=Ye([],[]),A=Ye(["vlist"],[w]);A.style.height=H(-h);var k=Ye(["vlist-s"],[new Q("")]);_=[Ye(["vlist-r"],[x,k]),Ye(["vlist-r"],[A])]}else _=[Ye(["vlist-r"],[x])];var T=Ye(["vlist-t"],_);return 2===_.length&&T.classes.push("vlist-t2"),T.height=d,T.depth=-h,T},makeOrd:function(e,t,n){var i=e.mode,o=e.text,a=["mord"],s="math"===i||"text"===i&&t.font,l=s?t.font:t.fontFamily;if(55349===o.charCodeAt(0)){var c=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,i="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[Ve[o][2],Ve[o][i]]}if(120782<=n&&n<=120831){var a=Math.floor((n-120782)/10);return[qe[a][2],qe[a][i]]}if(120485===n||120486===n)return[Ve[0][2],Ve[0][i]];if(120486<n&&n<120782)return["",""];throw new r("Unsupported character: "+e)}(o,i),u=c[0],h=c[1];return $e(o,u,i,t,a.concat(h))}if(l){var d,f;if("boldsymbol"===l){var p=function(e,t,n,r,i){return"textord"!==i&&He(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,i,0,0,n);d=p.fontName,f=[p.fontClass]}else s?(d=Je[l].fontName,f=[l]):(d=Ke(l,t.fontWeight,t.fontShape),f=[l,t.fontWeight,t.fontShape]);if(He(o,d,i).metrics)return $e(o,d,i,t,a.concat(f));if(ke.hasOwnProperty(o)&&"Typewriter"===d.substr(0,10)){for(var g=[],m=0;m<o.length;m++)g.push($e(o[m],d,i,t,a.concat(f)));return Ze(g)}}if("mathord"===n)return $e(o,"Math-Italic",i,t,a.concat(["mathnormal"]));if("textord"===n){var v=se[i][o]&&se[i][o].font;if("ams"===v){var y=Ke("amsrm",t.fontWeight,t.fontShape);return $e(o,y,i,t,a.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==v&&v){var b=Ke(v,t.fontWeight,t.fontShape);return $e(o,b,i,t,a.concat(b,t.fontWeight,t.fontShape))}var _=Ke("textrm",t.fontWeight,t.fontShape);return $e(o,_,i,t,a.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:function(e,t){var n=Ye(["mspace"],[],t),r=q(e,t);return n.style.marginRight=H(r),n},staticSvg:function(e,t){var n=Qe[e],r=n[0],i=n[1],o=n[2],a=new te(r),s=new ee([a],{width:H(i),height:H(o),style:"width:"+H(i),viewBox:"0 0 "+1e3*i+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=Xe(["overlay"],[s],t);return l.height=o,l.style.height=H(o),l.style.width=H(i),l},svgData:Qe,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Q&&r instanceof Q&&We(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},tt={number:3,unit:"mu"},nt={number:4,unit:"mu"},rt={number:5,unit:"mu"},it={mord:{mop:tt,mbin:nt,mrel:rt,minner:tt},mop:{mord:tt,mop:tt,mrel:rt,minner:tt},mbin:{mord:nt,mop:nt,mopen:nt,minner:nt},mrel:{mord:rt,mop:rt,mopen:rt,minner:rt},mopen:{},mclose:{mop:tt,mbin:nt,mrel:rt,minner:tt},mpunct:{mord:tt,mop:tt,mrel:rt,mopen:tt,mclose:tt,mpunct:tt,minner:tt},minner:{mord:tt,mop:tt,mbin:nt,mrel:rt,mopen:tt,mpunct:tt,minner:tt}},ot={mord:{mop:tt},mop:{mord:tt,mop:tt},mbin:{},mrel:{},mopen:{},mclose:{mop:tt},mpunct:{},minner:{mop:tt}},at={},st={},lt={};function ct(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,o=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)at[n[l]]=s;t&&(o&&(st[t]=o),a&&(lt[t]=a))}function ut(e){ct({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var ht=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},dt=function(e){return"ordgroup"===e.type?e.body:[e]},ft=et.makeSpan,pt=["leftmost","mbin","mopen","mrel","mop","mpunct"],gt=["rightmost","mrel","mclose","mpunct"],mt={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT},vt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},yt=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var i=[],o=0;o<e.length;o++){var a=kt(e[o],t);if(a instanceof M){var s=a.children;i.push.apply(i,s)}else i.push(a)}if(et.tryCombineChars(i),!n)return i;var c=t;if(1===e.length){var u=e[0];"sizing"===u.type?c=t.havingSize(u.size):"styling"===u.type&&(c=t.havingStyle(mt[u.style]))}var h=ft([r[0]||"leftmost"],[],t),d=ft([r[1]||"rightmost"],[],t),f="root"===n;return bt(i,(function(e,t){var n=t.classes[0],r=e.classes[0];"mbin"===n&&l(gt,r)?t.classes[0]="mord":"mbin"===r&&l(pt,n)&&(e.classes[0]="mord")}),{node:h},d,f),bt(i,(function(e,t){var n=wt(t),r=wt(e),i=n&&r?e.hasClass("mtight")?ot[n][r]:it[n][r]:null;if(i)return et.makeGlue(i,c)}),{node:h},d,f),i},bt=function e(t,n,r,i,o){i&&t.push(i);for(var a=0;a<t.length;a++){var s=t[a],l=_t(s);if(l)e(l.children,n,r,null,o);else{var c=!s.hasClass("mspace");if(c){var u=n(s,r.node);u&&(r.insertAfter?r.insertAfter(u):(t.unshift(u),a++))}c?r.node=s:o&&s.hasClass("newline")&&(r.node=ft(["leftmost"])),r.insertAfter=function(e){return function(n){t.splice(e+1,0,n),a++}}(a)}}i&&t.pop()},_t=function(e){return e instanceof M||e instanceof Z||e instanceof X&&e.hasClass("enclosing")?e:null},xt=function e(t,n){var r=_t(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},wt=function(e,t){return e?(t&&(e=xt(e,t)),vt[e.classes[0]]||null):null},At=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return ft(t.concat(n))},kt=function(e,t,n){if(!e)return ft();if(st[e.type]){var i=st[e.type](e,t);if(n&&t.size!==n.size){i=ft(t.sizingClasses(n),[i],t);var o=t.sizeMultiplier/n.sizeMultiplier;i.height*=o,i.depth*=o}return i}throw new r("Got group of unknown type: '"+e.type+"'")};function Tt(e,t){var n=ft(["base"],e,t),r=ft(["strut"]);return r.style.height=H(n.height+n.depth),n.depth&&(r.style.verticalAlign=H(-n.depth)),n.children.unshift(r),n}function St(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=yt(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var o,a=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(a.push(Tt(s,t)),s=[])}else i[l].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(Tt(s,t)),s=[]),a.push(i[l]));s.length>0&&a.push(Tt(s,t)),n?((o=Tt(yt(n,t,!0))).classes=["tag"],a.push(o)):r&&a.push(r);var u=ft(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),o){var h=o.children[0];h.style.height=H(u.height+u.depth),u.depth&&(h.style.verticalAlign=H(-u.depth))}return u}function Et(e){return new M(e)}var Ct=function(){function e(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("path_to_url",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=$(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=u(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+u($(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+"</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),Mt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return u(this.toText())},t.toText=function(){return this.text},e}(),Ot={MathNode:Ct,TextNode:Mt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"":e>=.1666&&e<=.1667?"":e>=.2222&&e<=.2223?"":e>=.2777&&e<=.2778?"":e>=-.05556&&e<=-.05555?"":e>=-.1667&&e<=-.1666?"":e>=-.2223&&e<=-.2222?"":e>=-.2778&&e<=-.2777?"":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("path_to_url","mspace");return e.setAttribute("width",H(this.width)),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+H(this.width)+'"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Et},Lt=function(e,t,n){return!se[t][e]||!se[t][e].replace||55349===e.charCodeAt(0)||ke.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.substr(4,2)||n.font&&"tt"===n.font.substr(4,2))||(e=se[t][e].replace),new Ot.TextNode(e)},Dt=function(e){return 1===e.length?e[0]:new Ot.MathNode("mrow",e)},It=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return l(["\\imath","\\jmath"],i)?null:(se[r][i]&&se[r][i].replace&&(i=se[r][i].replace),I(i,et.fontMap[n].fontName,r)?et.fontMap[n].variant:null)},Rt=function(e,t,n){if(1===e.length){var r=Nt(e[0],t);return n&&r instanceof Ct&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,o=[],a=0;a<e.length;a++){var s=Nt(e[a],t);if(s instanceof Ct&&i instanceof Ct){if("mtext"===s.type&&"mtext"===i.type&&s.getAttribute("mathvariant")===i.getAttribute("mathvariant")){var l;(l=i.children).push.apply(l,s.children);continue}if("mn"===s.type&&"mn"===i.type){var c;(c=i.children).push.apply(c,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===i.type){var u=s.children[0];if(u instanceof Mt&&"."===u.text){var h;(h=i.children).push.apply(h,s.children);continue}}else if("mi"===i.type&&1===i.children.length){var d=i.children[0];if(d instanceof Mt&&""===d.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var f=s.children[0];f instanceof Mt&&f.text.length>0&&(f.text=f.text.slice(0,1)+""+f.text.slice(1),o.pop())}}}o.push(s),i=s}return o},Pt=function(e,t,n){return Dt(Rt(e,t,n))},Nt=function(e,t){if(!e)return new Ot.MathNode("mrow");if(lt[e.type])return lt[e.type](e,t);throw new r("Got group of unknown type: '"+e.type+"'")};function zt(e,t,n,r,i){var o,a=Rt(e,n);o=1===a.length&&a[0]instanceof Ct&&l(["mrow","mtable"],a[0].type)?a[0]:new Ot.MathNode("mrow",a);var s=new Ot.MathNode("annotation",[new Ot.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var c=new Ot.MathNode("semantics",[o,s]),u=new Ot.MathNode("math",[c]);return u.setAttribute("xmlns","path_to_url"),r&&u.setAttribute("display","block"),et.makeSpan([i?"katex":"katex-mathml"],[u])}var Ft=function(e){return new B({style:e.displayMode?k.DISPLAY:k.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Bt=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=et.makeSpan(n,[e])}return e},jt={widehat:"^",widecheck:"",widetilde:"~",utilde:"~",overleftarrow:"",underleftarrow:"",xleftarrow:"",overrightarrow:"",underrightarrow:"",xrightarrow:"",underbrace:"",overbrace:"",overgroup:"",undergroup:"",overleftrightarrow:"",underleftrightarrow:"",xleftrightarrow:"",Overrightarrow:"",xRightarrow:"",overleftharpoon:"",xleftharpoonup:"",overrightharpoon:"",xrightharpoonup:"",xLeftarrow:"",xLeftrightarrow:"",xhookleftarrow:"",xhookrightarrow:"",xmapsto:"",xrightharpoondown:"",xleftharpoondown:"",xrightleftharpoons:"",xleftrightharpoons:"",xtwoheadleftarrow:"",xtwoheadrightarrow:"",xlongequal:"=",xtofrom:"",xrightleftarrows:"",xrightequilibrium:"",xleftequilibrium:"","\\cdrightarrow":"","\\cdleftarrow":"","\\cdlongequal":"="},Ut={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Vt=function(e){var t=new Ot.MathNode("mo",[new Ot.TextNode(jt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},qt=function(e,t){var n=function(){var n=4e5,r=e.label.substr(1);if(l(["widehat","widecheck","widetilde","utilde"],r)){var i,o,a,s="ordgroup"===(p=e.base).type?p.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,a=.42,o=r+"4"):(i=312,n=2340,a=.34,o="tilde4");else{var c=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][c],i=[0,239,300,360,420][c],a=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],i=[0,260,286,306,312][c],a=[0,.26,.286,.3,.306,.34][c],o="tilde"+c)}var u=new te(o),h=new ee([u],{width:"100%",height:H(a),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:et.makeSvgSpan([],[h],t),minWidth:0,height:a}}var d,f,p,g=[],m=Ut[r],v=m[0],y=m[1],b=m[2],_=b/1e3,x=v.length;if(1===x)d=["hide-tail"],f=[m[3]];else if(2===x)d=["halfarrow-left","halfarrow-right"],f=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");d=["brace-left","brace-center","brace-right"],f=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<x;w++){var A=new te(v[w]),k=new ee([A],{width:"400em",height:H(_),viewBox:"0 0 "+n+" "+b,preserveAspectRatio:f[w]+" slice"}),T=et.makeSvgSpan([d[w]],[k],t);if(1===x)return{span:T,minWidth:y,height:_};T.style.height=H(_),g.push(T)}return{span:et.makeSpan(["stretchy"],g,t),minWidth:y,height:_}}(),r=n.span,i=n.minWidth,o=n.height;return r.height=o,r.style.height=H(o),i>0&&(r.style.minWidth=H(i)),r};function Ht(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function $t(e){var t=Wt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Wt(e){return e&&("atom"===e.type||oe.hasOwnProperty(e.type))?e:null}var Gt=function(e,t){var n,r,i;e&&"supsub"===e.type?(n=(r=Ht(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof X)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(kt(e,t)),e.base=r):n=(r=Ht(e,"accent")).base;var o=kt(n,t.havingCrampedStyle()),a=0;if(r.isShifty&&f(n)){var s=d(n);a=re(kt(s,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,u=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)l=qt(r,t),l=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+H(2*a)+")",marginLeft:H(2*a)}:void 0}]},t);else{var h,p;"\\vec"===r.label?(h=et.staticSvg("vec",t),p=et.svgData.vec[1]):((h=re(h=et.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,p=h.width,c&&(u+=h.depth)),l=et.makeSpan(["accent-body"],[h]);var g="\\textcircled"===r.label;g&&(l.classes.push("accent-full"),u=o.height);var m=a;g||(m-=p/2),l.style.left=H(m),"\\textcircled"===r.label&&(l.style.top=".2em"),l=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:l}]},t)}var v=et.makeSpan(["mord","accent"],[l],t);return i?(i.children[0]=v,i.height=Math.max(v.height,i.height),i.classes[0]="mord",i):v},Yt=function(e,t){var n=e.isStretchy?Vt(e.label):new Ot.MathNode("mo",[Lt(e.label,e.mode)]),r=new Ot.MathNode("mover",[Nt(e.base,t),n]);return r.setAttribute("accent","true"),r},Xt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ct({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var n=ht(t[0]),r=!Xt.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Gt,mathmlBuilder:Yt}),ct({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Gt,mathmlBuilder:Yt}),ct({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:function(e,t){var n=kt(e.base,t),r=qt(e,t),i="\\utilde"===e.label?.12:0,o=et.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return et.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:function(e,t){var n=Vt(e.label),r=new Ot.MathNode("munder",[Nt(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Zt=function(e){var t=new Ot.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ct({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,i=e.funcName;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder:function(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),o=et.wrapFragment(kt(e.body,i,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(a+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=et.wrapFragment(kt(e.below,i,t),t)).classes.push(a+"-arrow-pad"));var s,l=qt(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=o.depth),n){var h=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;s=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:h}]},t)}else s=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:l,shift:c}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),et.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var n,r=Vt(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=Zt(Nt(e.body,t));if(e.below){var o=Zt(Nt(e.below,t));n=new Ot.MathNode("munderover",[r,o,i])}else n=new Ot.MathNode("mover",[r,i])}else if(e.below){var a=Zt(Nt(e.below,t));n=new Ot.MathNode("munder",[r,a])}else n=Zt(),n=new Ot.MathNode("mover",[r,n]);return n}});var Kt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Jt=function(e){return"textord"===e.type&&"@"===e.text};function Qt(e,t,n){var r=Kt[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ct({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder:function(e,t){var n=t.havingStyle(t.style.sup()),r=et.wrapFragment(kt(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=H(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mrow",[Nt(e.label,t)]);return(n=new Ot.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Ot.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),ct({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var n=et.wrapFragment(kt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:function(e,t){return new Ot.MathNode("mrow",[Nt(e.fragment,t)])}}),ct({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var n=e.parser,i=Ht(t[0],"ordgroup").body,o="",a=0;a<i.length;a++)o+=Ht(i[a],"textord").text;var s,l=parseInt(o);if(isNaN(l))throw new r("\\@char has non-numeric argument "+o);if(l<0||l>=1114111)throw new r("\\@char with invalid code point "+o);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:n.mode,text:s}}});var en=function(e,t){var n=yt(e.body,t.withColor(e.color),!1);return et.makeFragment(n)},tn=function(e,t){var n=Rt(e.body,t.withColor(e.color)),r=new Ot.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};ct({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var n=e.parser,r=Ht(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:dt(i)}},htmlBuilder:en,mathmlBuilder:tn}),ct({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var n=e.parser,r=e.breakOnTokenText,i=Ht(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:o}},htmlBuilder:en,mathmlBuilder:tn}),ct({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,n){var r=e.parser,i=n[0],o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:i&&Ht(i,"size").value}},htmlBuilder:function(e,t){var n=et.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=H(q(e.size,t)))),n},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",H(q(e.size,t)))),n}});var nn={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rn=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new r("Expected a control sequence",e);return t},on=function(e,t,n,r){var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};ct({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var i=t.fetch();if(nn[i.text])return"\\global"!==n&&"\\\\globallong"!==n||(i.text=nn[i.text]),Ht(t.parseFunction(),"internal");throw new r("Invalid token after macro prefix",i)}}),ct({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,i=t.gullet.popToken(),o=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new r("Expected a control sequence",i);for(var a,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(i=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),l[s].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new r('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new r('Argument number "'+i.text+'" out of order');s++,l.push([])}else{if("EOF"===i.text)throw new r("Expected a macro definition");l[s].push(i.text)}var c=t.gullet.consumeArg().tokens;return a&&c.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(c=t.gullet.expandTokens(c)).reverse(),t.gullet.macros.set(o,{tokens:c,numArgs:s,delimiters:l},n===nn[n]),{type:"internal",mode:t.mode}}}),ct({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,r=rn(t.gullet.popToken());t.gullet.consumeSpaces();var i=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return on(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),ct({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,n=e.funcName,r=rn(t.gullet.popToken()),i=t.gullet.popToken(),o=t.gullet.popToken();return on(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var an=function(e,t,n){var r=I(se.math[e]&&se.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},sn=function(e,t,n,r){var i=n.havingBaseStyle(t),o=et.makeSpan(r.concat(i.sizingClasses(n)),[e],n),a=i.sizeMultiplier/n.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},ln=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=H(i),e.height-=i,e.depth+=i},cn=function(e,t,n,r,i,o){var a=function(e,t,n,r){return et.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,i,r),s=sn(et.makeSpan(["delimsizing","size"+t],[a],r),k.TEXT,r,o);return n&&ln(s,r,k.TEXT),s},un=function(e,t,n){return{type:"elem",elem:et.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[et.makeSpan([],[et.makeSymbol(e,t,n)])])}},hn=function(e,t,n){var r=O["Size4-Regular"][e.charCodeAt(0)]?O["Size4-Regular"][e.charCodeAt(0)][4]:O["Size1-Regular"][e.charCodeAt(0)][4],i=new te("inner",function(e,t){switch(e){case"":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new ee([i],{width:H(r),height:H(t),style:"width:"+H(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=et.makeSvgSpan([],[o],n);return a.height=t,a.style.height=H(t),a.style.width=H(r),{type:"elem",elem:a}},dn={type:"kern",size:-.008},fn=["|","\\lvert","\\rvert","\\vert"],pn=["\\|","\\lVert","\\rVert","\\Vert"],gn=function(e,t,n,r,i,o){var a,s,c,u;a=c=u=e,s=null;var h="Size1-Regular";"\\uparrow"===e?c=u="":"\\Uparrow"===e?c=u="":"\\downarrow"===e?a=c="":"\\Downarrow"===e?a=c="":"\\updownarrow"===e?(a="\\uparrow",c="",u="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",c="",u="\\Downarrow"):l(fn,e)?c="":l(pn,e)?c="":"["===e||"\\lbrack"===e?(a="",c="",u="",h="Size4-Regular"):"]"===e||"\\rbrack"===e?(a="",c="",u="",h="Size4-Regular"):"\\lfloor"===e||""===e?(c=a="",u="",h="Size4-Regular"):"\\lceil"===e||""===e?(a="",c=u="",h="Size4-Regular"):"\\rfloor"===e||""===e?(c=a="",u="",h="Size4-Regular"):"\\rceil"===e||""===e?(a="",c=u="",h="Size4-Regular"):"("===e||"\\lparen"===e?(a="",c="",u="",h="Size4-Regular"):")"===e||"\\rparen"===e?(a="",c="",u="",h="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(a="",s="",u="",c="",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="",s="",u="",c="",h="Size4-Regular"):"\\lgroup"===e||""===e?(a="",u="",c="",h="Size4-Regular"):"\\rgroup"===e||""===e?(a="",u="",c="",h="Size4-Regular"):"\\lmoustache"===e||""===e?(a="",u="",c="",h="Size4-Regular"):"\\rmoustache"!==e&&""!==e||(a="",u="",c="",h="Size4-Regular");var d=an(a,h,i),f=d.height+d.depth,p=an(c,h,i),g=p.height+p.depth,m=an(u,h,i),v=m.height+m.depth,y=0,b=1;if(null!==s){var _=an(s,h,i);y=_.height+_.depth,b=2}var x=f+v+y,w=x+Math.max(0,Math.ceil((t-x)/(b*g)))*b*g,A=r.fontMetrics().axisHeight;n&&(A*=r.sizeMultiplier);var T=w/2-A,S=[];if(S.push(un(u,h,i)),S.push(dn),null===s){var E=w-f-v+.016;S.push(hn(c,E,r))}else{var C=(w-f-v-y)/2+.016;S.push(hn(c,C,r)),S.push(dn),S.push(un(s,h,i)),S.push(dn),S.push(hn(c,C,r))}S.push(dn),S.push(un(a,h,i));var M=r.havingBaseStyle(k.TEXT),O=et.makeVList({positionType:"bottom",positionData:T,children:S},M);return sn(et.makeSpan(["delimsizing","mult"],[O],M),k.TEXT,r,o)},mn=.08,vn=function(e,t,n,r,i){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z"}(t);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z"}(t);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+80)+"H400000"+(40+e)+"\nH742v"+(n-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}(t,0,n)}return r}(e,r,n),a=new te(e,o),s=new ee([a],{width:"400em",height:H(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return et.makeSvgSpan(["hide-tail"],[s],i)},yn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","","","\\lceil","\\rceil","","","\\surd"],bn=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","","","\\lmoustache","\\rmoustache","",""],_n=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],xn=[0,1.2,1.8,2.4,3],wn=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],An=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"stack"}],kn=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Tn=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sn=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length&&"stack"!==n[i].type;i++){var o=an(e,Tn(n[i]),"math"),a=o.height+o.depth;if("small"===n[i].type&&(a*=r.havingBaseStyle(n[i].style).sizeMultiplier),a>t)return n[i]}return n[n.length-1]},En=function(e,t,n,r,i,o){var a;"<"===e||"\\lt"===e||""===e?e="\\langle":">"!==e&&"\\gt"!==e&&""!==e||(e="\\rangle"),a=l(_n,e)?wn:l(yn,e)?kn:An;var s=Sn(e,t,a,r);return"small"===s.type?function(e,t,n,r,i,o){var a=et.makeSymbol(e,"Main-Regular",i,r),s=sn(a,t,r,o);return n&&ln(s,r,t),s}(e,s.style,n,r,i,o):"large"===s.type?cn(e,s.size,n,r,i,o):gn(e,t,n,r,i,o)},Cn={sqrtImage:function(e,t){var n,r,i=t.havingBaseSizing(),o=Sn("\\surd",e*i.sizeMultiplier,kn,i),a=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===o.type?(e<1?a=1:e<1.4&&(a=.7),c=(1+s)/a,(n=vn("sqrtMain",l=(1+s+mn)/a,u=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/a):"large"===o.type?(u=1080*xn[o.size],c=(xn[o.size]+s)/a,l=(xn[o.size]+s+mn)/a,(n=vn("sqrtSize"+o.size,l,u,s,t)).style.minWidth="1.02em",r=1/a):(l=e+s+mn,c=e+s,u=Math.floor(1e3*e+s)+80,(n=vn("sqrtTall",l,u,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=H(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*a}},sizedDelim:function(e,t,n,i,o){if("<"===e||"\\lt"===e||""===e?e="\\langle":">"!==e&&"\\gt"!==e&&""!==e||(e="\\rangle"),l(yn,e)||l(_n,e))return cn(e,t,!1,n,i,o);if(l(bn,e))return gn(e,xn[t],!1,n,i,o);throw new r("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:xn,customSizedDelim:En,leftRightDelim:function(e,t,n,r,i,o){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,n+a),c=Math.max(l/500*901,2*l-s);return En(e,c,!0,r,i,o)}},Mn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},On=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","","","\\lceil","\\rceil","","","<",">","\\langle","","\\rangle","","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","","","\\lmoustache","\\rmoustache","","","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ln(e,t){var n=Wt(e);if(n&&l(On,n.text))return n;throw new r(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Dn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ct({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var n=Ln(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Mn[e.funcName].size,mclass:Mn[e.funcName].mclass,delim:n.text}},htmlBuilder:function(e,t){return"."===e.delim?et.makeSpan([e.mclass]):Cn.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Lt(e.delim,e.mode));var n=new Ot.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=H(Cn.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),ct({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new r("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ln(t[0],e).text,color:n}}}),ct({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=Ln(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Ht(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:function(e,t){Dn(e);for(var n,r,i=yt(e.body,t,!0,["mopen","mclose"]),o=0,a=0,s=!1,l=0;l<i.length;l++)i[l].isMiddle?s=!0:(o=Math.max(i[l].height,o),a=Math.max(i[l].depth,a));if(o*=t.sizeMultiplier,a*=t.sizeMultiplier,n="."===e.left?At(t,["mopen"]):Cn.leftRightDelim(e.left,o,a,t,e.mode,["mopen"]),i.unshift(n),s)for(var c=1;c<i.length;c++){var u=i[c].isMiddle;u&&(i[c]=Cn.leftRightDelim(u.delim,o,a,u.options,e.mode,[]))}if("."===e.right)r=At(t,["mclose"]);else{var h=e.rightColor?t.withColor(e.rightColor):t;r=Cn.leftRightDelim(e.right,o,a,h,e.mode,["mclose"])}return i.push(r),et.makeSpan(["minner"],i,t)},mathmlBuilder:function(e,t){Dn(e);var n=Rt(e.body,t);if("."!==e.left){var r=new Ot.MathNode("mo",[Lt(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new Ot.MathNode("mo",[Lt(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return Dt(n)}}),ct({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=Ln(t[0],e);if(!e.parser.leftrightDepth)throw new r("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:function(e,t){var n;if("."===e.delim)n=At(t,[]);else{n=Cn.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:function(e,t){var n="\\vert"===e.delim||"|"===e.delim?Lt("|","text"):Lt(e.delim,e.mode),r=new Ot.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var In=function(e,t){var n,r,i,o=et.wrapFragment(kt(e.body,t),t),a=e.label.substr(1),s=t.sizeMultiplier,l=0,c=f(e.body);if("sout"===a)(n=et.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===a){var u=q({number:.6,unit:"pt"},t),h=q({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var d=o.height+o.depth+u+h;o.style.paddingLeft=H(d/2+u);var p=Math.floor(1e3*d*s),g="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new ee([new te("phase",g)],{width:"400em",height:H(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=et.makeSvgSpan(["hide-tail"],[m],t)).style.height=H(d),l=o.depth+u+h}else{/cancel/.test(a)?c||o.classes.push("cancel-pad"):"angl"===a?o.classes.push("anglpad"):o.classes.push("boxpad");var v=0,y=0,b=0;/box/.test(a)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=v=t.fontMetrics().fboxsep+("colorbox"===a?0:b)):"angl"===a?(v=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),y=Math.max(0,.25-o.depth)):y=v=c?.2:0,n=function(e,t,n,r,i){var o,a=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=et.makeSpan(["stretchy",t],[],i),"fbox"===t){var s=i.color&&i.getColor();s&&(o.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ee(l,{width:"100%",height:H(a)});o=et.makeSvgSpan([],[c],i)}return o.height=a,o.style.height=H(a),o}(o,a,v,y,t),/fbox|boxed|fcolorbox/.test(a)?(n.style.borderStyle="solid",n.style.borderWidth=H(b)):"angl"===a&&.049!==b&&(n.style.borderTopWidth=H(b),n.style.borderRightWidth=H(b)),l=o.depth+y,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)i=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:o,shift:0}]},t);else{var _=/cancel|phase/.test(a)?["svg-align"]:[];i=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:_}]},t)}return/cancel/.test(a)&&(i.height=o.height,i.depth=o.depth),/cancel/.test(a)&&!c?et.makeSpan(["mord","cancel-lap"],[i],t):et.makeSpan(["mord"],[i],t)},Rn=function(e,t){var n=0,r=new Ot.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Nt(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ct({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,o=Ht(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,body:a}},htmlBuilder:In,mathmlBuilder:Rn}),ct({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,o=Ht(t[0],"color-token").color,a=Ht(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:o,body:s}},htmlBuilder:In,mathmlBuilder:Rn}),ct({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ct({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:In,mathmlBuilder:Rn}),ct({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Pn={};function Nn(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,o=e.htmlBuilder,a=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)Pn[n[l]]=s;o&&(st[t]=o),a&&(lt[t]=a)}function zn(e){var t=[];e.consumeSpaces();for(var n=e.fetch().text;"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var Fn=function(e){if(!e.parser.settings.displayMode)throw new r("{"+e.envName+"} can be used only in display mode.")};function Bn(e,t,n){var i=t.hskipBeforeAndAfter,o=t.addJot,a=t.cols,s=t.arraystretch,l=t.colSeparationType,c=t.addEqnNum,u=t.singleRow,h=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)s=1;else if(!(s=parseFloat(p))||s<0)throw new r("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var g=[],m=[g],v=[],y=[];for(y.push(zn(e));;){var b=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),b={type:"ordgroup",mode:e.mode,body:b},n&&(b={type:"styling",mode:e.mode,style:n,body:[b]}),g.push(b);var _=e.fetch().text;if("&"===_){if(d&&g.length===d){if(u||l)throw new r("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===_){1===g.length&&"styling"===b.type&&0===b.body[0].body.length&&(m.length>1||!h)&&m.pop(),y.length<m.length+1&&y.push([]);break}if("\\\\"!==_)throw new r("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var x=void 0;" "!==e.gullet.future().text&&(x=e.parseSizeGroup(!0)),v.push(x?x.value:null),y.push(zn(e)),g=[],m.push(g)}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:m,cols:a,rowGaps:v,hskipBeforeAndAfter:i,hLinesBeforeRow:y,colSeparationType:l,addEqnNum:c,leqno:f}}function jn(e){return"d"===e.substr(0,1)?"display":"text"}var Un=function(e,t){var n,i,o=e.body.length,a=e.hLinesBeforeRow,s=0,l=new Array(o),u=[],h=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(f=t.havingStyle(k.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var p="CD"===e.colSeparationType?q({number:3,unit:"ex"},t):12*d,g=3*d,m=e.arraystretch*p,v=.7*m,y=.3*m,b=0;function _(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),u.push({pos:b,isDashed:e[t]})}for(_(a[0]),n=0;n<e.body.length;++n){var x=e.body[n],w=v,A=y;s<x.length&&(s=x.length);var T=new Array(x.length);for(i=0;i<x.length;++i){var S=kt(x[i],t);A<S.depth&&(A=S.depth),w<S.height&&(w=S.height),T[i]=S}var E=e.rowGaps[n],C=0;E&&(C=q(E,t))>0&&(A<(C+=y)&&(A=C),C=0),e.addJot&&(A+=g),T.height=w,T.depth=A,b+=w,T.pos=b,b+=A+C,l[n]=T,_(a[n+1])}var M,O,L=b/2+t.fontMetrics().axisHeight,D=e.cols||[],I=[],R=[];if(e.addEqnNum)for(n=0;n<o;++n){var P=l[n],N=P.pos-L,z=et.makeSpan(["eqn-num"],[],t);z.depth=P.depth,z.height=P.height,R.push({type:"elem",elem:z,shift:N})}for(i=0,O=0;i<s||O<D.length;++i,++O){for(var F=D[O]||{},B=!0;"separator"===F.type;){if(B||((M=et.makeSpan(["arraycolsep"],[])).style.width=H(t.fontMetrics().doubleRuleSep),I.push(M)),"|"!==F.separator&&":"!==F.separator)throw new r("Invalid separator type: "+F.separator);var j="|"===F.separator?"solid":"dashed",U=et.makeSpan(["vertical-separator"],[],t);U.style.height=H(b),U.style.borderRightWidth=H(h),U.style.borderRightStyle=j,U.style.margin="0 "+H(-h/2);var V=b-L;V&&(U.style.verticalAlign=H(-V)),I.push(U),F=D[++O]||{},B=!1}if(!(i>=s)){var $=void 0;(i>0||e.hskipBeforeAndAfter)&&0!==($=c(F.pregap,f))&&((M=et.makeSpan(["arraycolsep"],[])).style.width=H($),I.push(M));var W=[];for(n=0;n<o;++n){var G=l[n],Y=G[i];if(Y){var X=G.pos-L;Y.depth=G.depth,Y.height=G.height,W.push({type:"elem",elem:Y,shift:X})}}W=et.makeVList({positionType:"individualShift",children:W},t),W=et.makeSpan(["col-align-"+(F.align||"c")],[W]),I.push(W),(i<s-1||e.hskipBeforeAndAfter)&&0!==($=c(F.postgap,f))&&((M=et.makeSpan(["arraycolsep"],[])).style.width=H($),I.push(M))}}if(l=et.makeSpan(["mtable"],I),u.length>0){for(var Z=et.makeLineSpan("hline",t,h),K=et.makeLineSpan("hdashline",t,h),J=[{type:"elem",elem:l,shift:0}];u.length>0;){var Q=u.pop(),ee=Q.pos-L;Q.isDashed?J.push({type:"elem",elem:K,shift:ee}):J.push({type:"elem",elem:Z,shift:ee})}l=et.makeVList({positionType:"individualShift",children:J},t)}if(e.addEqnNum){var te=et.makeVList({positionType:"individualShift",children:R},t);return te=et.makeSpan(["tag"],[te],t),et.makeFragment([l,te])}return et.makeSpan(["mord"],[l],t)},Vn={c:"center ",l:"left ",r:"right "},qn=function(e,t){for(var n=[],r=new Ot.MathNode("mtd",[],["mtr-glue"]),i=new Ot.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var a=e.body[o],s=[],l=0;l<a.length;l++)s.push(new Ot.MathNode("mtd",[Nt(a[l],t)]));e.addEqnNum&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Ot.MathNode("mtr",s))}var c=new Ot.MathNode("mtable",n),u=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",H(u));var h="",d="";if(e.cols&&e.cols.length>0){var f=e.cols,p="",g=!1,m=0,v=f.length;"separator"===f[0].type&&(h+="top ",m=1),"separator"===f[f.length-1].type&&(h+="bottom ",v-=1);for(var y=m;y<v;y++)"align"===f[y].type?(d+=Vn[f[y].align],g&&(p+="none "),g=!0):"separator"===f[y].type&&g&&(p+="|"===f[y].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",d.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],_="",x=1;x<b.length;x++)_+=x%2?"0em ":"1em ";c.setAttribute("columnspacing",_.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var w="",A=e.hLinesBeforeRow;h+=A[0].length>0?"left ":"",h+=A[A.length-1].length>0?"right ":"";for(var k=1;k<A.length-1;k++)w+=0===A[k].length?"none ":A[k][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==h&&(c=new Ot.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Ot.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Hn=function(e,t){-1===e.envName.indexOf("ed")&&Fn(e);var n,i=[],o=e.envName.indexOf("at")>-1?"alignat":"align",a=Bn(e.parser,{cols:i,addJot:!0,addEqnNum:"align"===e.envName||"alignat"===e.envName,emptySingleRow:!0,colSeparationType:o,maxNumCols:"split"===e.envName?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u<t[0].body.length;u++)c+=Ht(t[0].body[u],"textord").text;n=Number(c),s=2*n}var h=!s;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var i=Ht(e[t],"styling");Ht(i.body[0],"ordgroup").body.unshift(l)}if(h)s<e.length&&(s=e.length);else{var o=e.length/2;if(n<o)throw new r("Too many math in a row: expected "+n+", but got "+o,e[0])}}));for(var d=0;d<s;++d){var f="r",p=0;d%2==1?f="l":d>0&&h&&(p=1),i[d]={type:"align",align:f,pregap:p,postgap:0}}return a.colSeparationType=h?"align":"alignat",a};Nn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var n=(Wt(t[0])?[t[0]]:Ht(t[0],"ordgroup").body).map((function(e){var t=$t(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new r("Unknown column alignment: "+t,e)})),i={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Bn(e.parser,i,jn(e.envName))},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new r("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),i.cols=[{type:"align",align:n}]}}var a=Bn(e.parser,i,jn(e.envName)),s=Math.max.apply(Math,[0].concat(a.body.map((function(e){return e.length}))));return a.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Bn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var n=(Wt(t[0])?[t[0]]:Ht(t[0],"ordgroup").body).map((function(e){var t=$t(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new r("Unknown column alignment: "+t,e)}));if(n.length>1)throw new r("{subarray} can contain only one column");var i={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((i=Bn(e.parser,i,"script")).body.length>0&&i.body[0].length>1)throw new r("{subarray} can contain only one column");return i},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Bn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},jn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Hn,htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l(["gather","gather*"],e.envName)&&Fn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",addEqnNum:"gather"===e.envName,emptySingleRow:!0,leqno:e.parser.settings.leqno};return Bn(e.parser,t,"display")},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Hn,htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Fn(e);var t={addEqnNum:"equation"===e.envName,emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Bn(e.parser,t,"display")},htmlBuilder:Un,mathmlBuilder:qn}),Nn({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Fn(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new r("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var i,o,a=[],s=[a],l=0;l<t.length;l++){for(var c=t[l],u={type:"styling",body:[],mode:"math",style:"display"},h=0;h<c.length;h++)if(Jt(c[h])){a.push(u);var d=$t(c[h+=1]).text,f=new Array(2);if(f[0]={type:"ordgroup",mode:"math",body:[]},f[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new r('Expected one of "<>AV=|." after @',c[h]);for(var p=0;p<2;p++){for(var g=!0,m=h+1;m<c.length;m++){if(o=d,("mathord"===(i=c[m]).type||"atom"===i.type)&&i.text===o){g=!1,h=m;break}if(Jt(c[m]))throw new r("Missing a "+d+" character to complete a CD arrow.",c[m]);f[p].body.push(c[m])}if(g)throw new r("Missing a "+d+" character to complete a CD arrow.",c[h])}}var v={type:"styling",body:[Qt(d,f,e)],mode:"math",style:"display"};a.push(v),u={type:"styling",body:[],mode:"math",style:"display"}}else u.body.push(c[h]);l%2==0?a.push(u):a.shift(),a=[],s.push(a)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)},htmlBuilder:Un,mathmlBuilder:qn}),ct({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new r(e.funcName+" valid only within array environment")}});var $n=Pn;ct({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var n=e.parser,i=e.funcName,o=t[0];if("ordgroup"!==o.type)throw new r("Invalid environment name",o);for(var a="",s=0;s<o.body.length;++s)a+=Ht(o.body[s],"textord").text;if("\\begin"===i){if(!$n.hasOwnProperty(a))throw new r("No such environment: "+a,o);var l=$n[a],c=n.parseArguments("\\begin{"+a+"}",l),u=c.args,h=c.optArgs,d={mode:n.mode,envName:a,parser:n},f=l.handler(d,u,h);n.expect("\\end",!1);var p=n.nextToken,g=Ht(n.parseFunction(),"environment");if(g.name!==a)throw new r("Mismatch: \\begin{"+a+"} matched by \\end{"+g.name+"}",p);return f}return{type:"environment",mode:n.mode,name:a,nameGroup:o}}});var Wn=et.makeSpan;function Gn(e,t){var n=yt(e.body,t,!0);return Wn([e.mclass],n,t)}function Yn(e,t){var n,r=Rt(e.body,t);return"minner"===e.mclass?Ot.newDocumentFragment(r):("mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Ot.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Ot.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"!==e.mclass&&"mclose"!==e.mclass||(n.attributes.lspace="0em",n.attributes.rspace="0em")),n)}ct({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.substr(5),body:dt(i),isCharacterBox:f(i)}},htmlBuilder:Gn,mathmlBuilder:Yn});var Xn=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ct({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Xn(t[0]),body:dt(t[1]),isCharacterBox:f(t[1])}}}),ct({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var n,r=e.parser,i=e.funcName,o=t[1],a=t[0];n="\\stackrel"!==i?Xn(o):"mrel";var s={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:dt(o)},l={type:"supsub",mode:a.mode,base:s,sup:"\\underset"===i?null:a,sub:"\\underset"===i?a:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:f(l)}},htmlBuilder:Gn,mathmlBuilder:Yn});var Zn=function(e,t){var n=e.font,r=t.withFont(n);return kt(e.body,r)},Kn=function(e,t){var n=e.font,r=t.withFont(n);return Nt(e.body,r)},Jn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ct({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=ht(t[0]),o=r;return o in Jn&&(o=Jn[o]),{type:"font",mode:n.mode,font:o.slice(1),body:i}},htmlBuilder:Zn,mathmlBuilder:Kn}),ct({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0],i=f(r);return{type:"mclass",mode:n.mode,mclass:Xn(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),ct({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=e.breakOnTokenText,o=n.mode,a=n.parseExpression(!0,i);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:Zn,mathmlBuilder:Kn});var Qn=function(e,t){var n=t;return"display"===e?n=n.id>=k.SCRIPT.id?n.text():k.DISPLAY:"text"===e&&n.size===k.DISPLAY.size?n=k.TEXT:"script"===e?n=k.SCRIPT:"scriptscript"===e&&(n=k.SCRIPTSCRIPT),n},er=function(e,t){var n,r=Qn(e.size,t.style),i=r.fracNum(),o=r.fracDen();n=t.havingStyle(i);var a=kt(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<s?s:a.height,a.depth=a.depth<l?l:a.depth}n=t.havingStyle(o);var c,u,h,d,f,p,g,m,v,y,b=kt(e.denom,n,t);if(e.hasBarLine?(e.barSize?(u=q(e.barSize,t),c=et.makeLineSpan("frac-line",t,u)):c=et.makeLineSpan("frac-line",t),u=c.height,h=c.height):(c=null,u=0,h=t.fontMetrics().defaultRuleThickness),r.size===k.DISPLAY.size||"display"===e.size?(d=t.fontMetrics().num1,f=u>0?3*h:7*h,p=t.fontMetrics().denom1):(u>0?(d=t.fontMetrics().num2,f=h):(d=t.fontMetrics().num3,f=3*h),p=t.fontMetrics().denom2),c){var _=t.fontMetrics().axisHeight;d-a.depth-(_+.5*u)<f&&(d+=f-(d-a.depth-(_+.5*u))),_-.5*u-(b.height-p)<f&&(p+=f-(_-.5*u-(b.height-p))),g=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:c,shift:-(_-.5*u)},{type:"elem",elem:a,shift:-d}]},t)}else{var x=d-a.depth-(b.height-p);x<f&&(d+=.5*(f-x),p+=.5*(f-x)),g=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:p},{type:"elem",elem:a,shift:-d}]},t)}return n=t.havingStyle(r),g.height*=n.sizeMultiplier/t.sizeMultiplier,g.depth*=n.sizeMultiplier/t.sizeMultiplier,m=r.size===k.DISPLAY.size?t.fontMetrics().delim1:r.size===k.SCRIPTSCRIPT.size?t.havingStyle(k.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?At(t,["mopen"]):Cn.customSizedDelim(e.leftDelim,m,!0,t.havingStyle(r),e.mode,["mopen"]),y=e.continued?et.makeSpan([]):null==e.rightDelim?At(t,["mclose"]):Cn.customSizedDelim(e.rightDelim,m,!0,t.havingStyle(r),e.mode,["mclose"]),et.makeSpan(["mord"].concat(n.sizingClasses(t)),[v,et.makeSpan(["mfrac"],[g]),y],t)},tr=function(e,t){var n=new Ot.MathNode("mfrac",[Nt(e.numer,t),Nt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=q(e.barSize,t);n.setAttribute("linethickness",H(r))}}else n.setAttribute("linethickness","0px");var i=Qn(e.size,t.style);if(i.size!==t.style.size){n=new Ot.MathNode("mstyle",[n]);var o=i.size===k.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var s=new Ot.MathNode("mo",[new Ot.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}if(a.push(n),null!=e.rightDelim){var l=new Ot.MathNode("mo",[new Ot.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return Dt(a)}return n};ct({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:function(e,t){var n,r=e.parser,i=e.funcName,o=t[0],a=t[1],s=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,s="(",l=")";break;case"\\\\bracefrac":n=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:a,hasBarLine:n,leftDelim:s,rightDelim:l,size:c,barSize:null}},htmlBuilder:er,mathmlBuilder:tr}),ct({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),i=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:r,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ct({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,n=e.parser,r=e.funcName,i=e.token;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var nr=["display","text","script","scriptscript"],rr=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ct({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var n,r=e.parser,i=t[4],o=t[5],a=ht(t[0]),s="atom"===a.type&&"open"===a.family?rr(a.text):null,l=ht(t[1]),c="atom"===l.type&&"close"===l.family?rr(l.text):null,u=Ht(t[2],"size"),h=null;n=!!u.isBlank||(h=u.value).number>0;var d="auto",f=t[3];if("ordgroup"===f.type){if(f.body.length>0){var p=Ht(f.body[0],"textord");d=nr[Number(p.text)]}}else f=Ht(f,"textord"),d=nr[Number(f.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:n,barSize:h,leftDelim:s,rightDelim:c,size:d}},htmlBuilder:er,mathmlBuilder:tr}),ct({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var n=e.parser,r=(e.funcName,e.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ht(t[0],"size").value,token:r}}}),ct({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ht(t[1],"infix").size),o=t[2],a=i.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:er,mathmlBuilder:tr});var ir=function(e,t){var n,r,i=t.style;"supsub"===e.type?(n=e.sup?kt(e.sup,t.havingStyle(i.sup()),t):kt(e.sub,t.havingStyle(i.sub()),t),r=Ht(e.base,"horizBrace")):r=Ht(e,"horizBrace");var o,a=kt(r.base,t.havingBaseStyle(k.DISPLAY)),s=qt(r,t);if(r.isOver?(o=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=et.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=et.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):et.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return et.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)};ct({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:ir,mathmlBuilder:function(e,t){var n=Vt(e.label);return new Ot.MathNode(e.isOver?"mover":"munder",[Nt(e.base,t),n])}}),ct({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[1],i=Ht(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:dt(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var n=yt(e.body,t,!1);return et.makeAnchor(e.href,[],n,t)},mathmlBuilder:function(e,t){var n=Pt(e.body,t);return n instanceof Ct||(n=new Ct("mrow",[n])),n.setAttribute("href",e.href),n}}),ct({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ht(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],o=0;o<r.length;o++){var a=r[o];"~"===a&&(a="\\textasciitilde"),i.push({type:"textord",mode:"text",text:a})}var s={type:"text",mode:n.mode,font:"\\texttt",body:i};return{type:"href",mode:n.mode,href:r,body:dt(s)}}}),ct({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler:function(e,t){return{type:"hbox",mode:e.parser.mode,body:dt(t[0])}},htmlBuilder:function(e,t){var n=yt(e.body,t,!1);return et.makeFragment(n)},mathmlBuilder:function(e,t){return new Ot.MathNode("mrow",Rt(e.body,t))}}),ct({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var n,i=e.parser,o=e.funcName,a=(e.token,Ht(t[0],"raw").string),s=t[1];i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=a,n={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,n={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,n={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var c=a.split(","),u=0;u<c.length;u++){var h=c[u].split("=");if(2!==h.length)throw new r("Error parsing key-value for \\htmlData");l["data-"+h[0].trim()]=h[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return i.settings.isTrusted(n)?{type:"html",mode:i.mode,attributes:l,body:dt(s)}:i.formatUnsupportedCmd(o)},htmlBuilder:function(e,t){var n=yt(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push.apply(r,e.attributes.class.trim().split(/\s+/));var i=et.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&i.setAttribute(o,e.attributes[o]);return i},mathmlBuilder:function(e,t){return Pt(e.body,t)}}),ct({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:dt(t[0]),mathml:dt(t[1])}},htmlBuilder:function(e,t){var n=yt(e.html,t,!1);return et.makeFragment(n)},mathmlBuilder:function(e,t){return Pt(e.mathml,t)}});var or=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new r("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!V(n))throw new r("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ct({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,n){var i=e.parser,o={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(n[0])for(var c=Ht(n[0],"raw").string.split(","),u=0;u<c.length;u++){var h=c[u].split("=");if(2===h.length){var d=h[1].trim();switch(h[0].trim()){case"alt":l=d;break;case"width":o=or(d);break;case"height":a=or(d);break;case"totalheight":s=or(d);break;default:throw new r("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=Ht(t[0],"url").url;return""===l&&(l=(l=(l=f).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:i.mode,alt:l,width:o,height:a,totalheight:s,src:f}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var n=q(e.height,t),r=0;e.totalheight.number>0&&(r=q(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=q(e.width,t));var o={height:H(n+r)};i>0&&(o.width=H(i)),r>0&&(o.verticalAlign=H(-r));var a=new K(e.src,e.alt,o);return a.height=n,a.depth=r,a},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=q(e.height,t),i=0;if(e.totalheight.number>0&&(i=q(e.totalheight,t)-r,n.setAttribute("valign",H(-i))),n.setAttribute("height",H(r+i)),e.width.number>0){var o=q(e.width,t);n.setAttribute("width",H(o))}return n.setAttribute("src",e.src),n}}),ct({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=Ht(t[0],"size");if(n.settings.strict){var o="m"===r[1],a="mu"===i.value.unit;o?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:function(e,t){return et.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var n=q(e.dimension,t);return new Ot.SpaceNode(n)}}),ct({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:function(e,t){var n;"clap"===e.alignment?(n=et.makeSpan([],[kt(e.body,t)]),n=et.makeSpan(["inner"],[n],t)):n=et.makeSpan(["inner"],[kt(e.body,t)]);var r=et.makeSpan(["fix"],[]),i=et.makeSpan([e.alignment],[n,r],t),o=et.makeSpan(["strut"]);return o.style.height=H(i.height+i.depth),i.depth&&(o.style.verticalAlign=H(-i.depth)),i.children.unshift(o),i=et.makeSpan(["thinbox"],[i],t),et.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mpadded",[Nt(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),ct({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",a=r.parseExpression(!1,o);return r.expect(o),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}}),ct({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new r("Mismatched "+e.funcName)}});var ar=function(e,t){switch(t.style.size){case k.DISPLAY.size:return e.display;case k.TEXT.size:return e.text;case k.SCRIPT.size:return e.script;case k.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ct({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:dt(t[0]),text:dt(t[1]),script:dt(t[2]),scriptscript:dt(t[3])}},htmlBuilder:function(e,t){var n=ar(e,t),r=yt(n,t,!1);return et.makeFragment(r)},mathmlBuilder:function(e,t){var n=ar(e,t);return Pt(n,t)}});var sr=function(e,t,n,r,i,o,a){e=et.makeSpan([],[e]);var s,l,c,u=n&&f(n);if(t){var h=kt(t,r.havingStyle(i.sup()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(n){var d=kt(n,r.havingStyle(i.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+a;c=et.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:H(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:H(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var g=e.height-a;c=et.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:H(-o)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var m=e.depth+a;c=et.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:H(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var v=[c];if(s&&0!==o&&!u){var y=et.makeSpan(["mspace"],[],r);y.style.marginRight=H(o),v.unshift(y)}return et.makeSpan(["mop","op-limits"],v,r)},lr=["\\smallint"],cr=function(e,t){var n,r,i,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=Ht(e.base,"op"),o=!0):i=Ht(e,"op");var a,s=t.style,c=!1;if(s.size===k.DISPLAY.size&&i.symbol&&!l(lr,i.name)&&(c=!0),i.symbol){var u=c?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(h=i.name.substr(1),i.name="oiint"===h?"\\iint":"\\iiint"),a=et.makeSymbol(i.name,u,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),h.length>0){var d=a.italic,f=et.staticSvg(h+"Size"+(c?"2":"1"),t);a=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:f,shift:c?.08:0}]},t),i.name="\\"+h,a.classes.unshift("mop"),a.italic=d}}else if(i.body){var p=yt(i.body,t,!0);1===p.length&&p[0]instanceof Q?(a=p[0]).classes[0]="mop":a=et.makeSpan(["mop"],p,t)}else{for(var g=[],m=1;m<i.name.length;m++)g.push(et.mathsym(i.name[m],i.mode,t));a=et.makeSpan(["mop"],g,t)}var v=0,y=0;return(a instanceof Q||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(v=(a.height-a.depth)/2-t.fontMetrics().axisHeight,y=a.italic),o?sr(a,n,r,t,s,y,v):(v&&(a.style.position="relative",a.style.top=H(v)),a)},ur=function(e,t){var n;if(e.symbol)n=new Ct("mo",[Lt(e.name,e.mode)]),l(lr,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ct("mo",Rt(e.body,t));else{n=new Ct("mi",[new Mt(e.name.slice(1))]);var r=new Ct("mo",[Lt("","text")]);n=e.parentIsSupSub?new Ct("mrow",[n,r]):Et([n,r])}return n},hr={"":"\\prod","":"\\coprod","":"\\sum","":"\\bigwedge","":"\\bigvee","":"\\bigcap","":"\\bigcup","":"\\bigodot","":"\\bigoplus","":"\\bigotimes","":"\\biguplus","":"\\bigsqcup"};ct({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","","","","","","","","","","","",""],props:{numArgs:0},handler:function(e,t){var n=e.parser,r=e.funcName;return 1===r.length&&(r=hr[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:cr,mathmlBuilder:ur}),ct({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:dt(r)}},htmlBuilder:cr,mathmlBuilder:ur});var dr={"":"\\int","":"\\iint","":"\\iiint","":"\\oint","":"\\oiint","":"\\oiiint"};ct({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:cr,mathmlBuilder:ur}),ct({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:cr,mathmlBuilder:ur}),ct({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","","","","","",""],props:{numArgs:0},handler:function(e){var t=e.parser,n=e.funcName;return 1===n.length&&(n=dr[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:cr,mathmlBuilder:ur});var fr={};function pr(e,t){fr[e]=t}var gr=function(e,t){var n,r,i,o,a=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=Ht(e.base,"operatorname"),a=!0):i=Ht(e,"operatorname"),i.body.length>0){for(var s=i.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=yt(s,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof Q&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=et.makeSpan(["mop"],l,t)}else o=et.makeSpan(["mop"],[],t);return a?sr(o,n,r,t,t.style,0,0):o};function mr(e,t,n){for(var r=yt(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var a=r[o].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[a+1]==="reset-size"+t.size&&(r[o].classes[a+1]="reset-size"+n.size),r[o].height*=i,r[o].depth*=i}return et.makeFragment(r)}ct({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"operatorname",mode:n.mode,body:dt(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:gr,mathmlBuilder:function(e,t){for(var n=Rt(e.body,t.withFont("mathrm")),r=!0,i=0;i<n.length;i++){var o=n[i];if(o instanceof Ot.SpaceNode);else if(o instanceof Ot.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=o.children[0];1===o.children.length&&a instanceof Ot.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var s=n.map((function(e){return e.toText()})).join("");n=[new Ot.TextNode(s)]}var l=new Ot.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new Ot.MathNode("mo",[Lt("","text")]);return e.parentIsSupSub?new Ot.MathNode("mrow",[l,c]):Ot.newDocumentFragment([l,c])}}),pr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ut({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?et.makeFragment(yt(e.body,t,!1)):et.makeSpan(["mord"],yt(e.body,t,!0),t)},mathmlBuilder:function(e,t){return Pt(e.body,t,!0)}}),ct({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=kt(e.body,t.havingCrampedStyle()),r=et.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,o=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return et.makeSpan(["mord","overline"],[o],t)},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mo",[new Ot.TextNode("")]);n.setAttribute("stretchy","true");var r=new Ot.MathNode("mover",[Nt(e.body,t),n]);return r.setAttribute("accent","true"),r}}),ct({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"phantom",mode:n.mode,body:dt(r)}},htmlBuilder:function(e,t){var n=yt(e.body,t.withPhantom(),!1);return et.makeFragment(n)},mathmlBuilder:function(e,t){var n=Rt(e.body,t);return new Ot.MathNode("mphantom",n)}}),ct({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=et.makeSpan([],[kt(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),et.makeSpan(["mord"],[n],t)},mathmlBuilder:function(e,t){var n=Rt(dt(e.body),t),r=new Ot.MathNode("mphantom",n),i=new Ot.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),ct({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:function(e,t){var n=et.makeSpan(["inner"],[kt(e.body,t.withPhantom())]),r=et.makeSpan(["fix"],[]);return et.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:function(e,t){var n=Rt(dt(e.body),t),r=new Ot.MathNode("mphantom",n),i=new Ot.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),ct({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=Ht(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder:function(e,t){var n=kt(e.body,t),r=q(e.dy,t);return et.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mpadded",[Nt(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),ct({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,n){var r=e.parser,i=n[0],o=Ht(t[0],"size"),a=Ht(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&Ht(i,"size").value,width:o.value,height:a.value}},htmlBuilder:function(e,t){var n=et.makeSpan(["mord","rule"],[],t),r=q(e.width,t),i=q(e.height,t),o=e.shift?q(e.shift,t):0;return n.style.borderRightWidth=H(r),n.style.borderTopWidth=H(i),n.style.bottom=H(o),n.width=r,n.height=i+o,n.depth=-o,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder:function(e,t){var n=q(e.width,t),r=q(e.height,t),i=e.shift?q(e.shift,t):0,o=t.color&&t.getColor()||"black",a=new Ot.MathNode("mspace");a.setAttribute("mathbackground",o),a.setAttribute("width",H(n)),a.setAttribute("height",H(r));var s=new Ot.MathNode("mpadded",[a]);return i>=0?s.setAttribute("height",H(i)):(s.setAttribute("height",H(i)),s.setAttribute("depth",H(-i))),s.setAttribute("voffset",H(i)),s}});var vr=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ct({type:"sizing",names:vr,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,o=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:vr.indexOf(r)+1,body:o}},htmlBuilder:function(e,t){var n=t.havingSize(e.size);return mr(e.body,n,t)},mathmlBuilder:function(e,t){var n=t.havingSize(e.size),r=Rt(e.body,n),i=new Ot.MathNode("mstyle",r);return i.setAttribute("mathsize",H(n.sizeMultiplier)),i}}),ct({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,n){var r=e.parser,i=!1,o=!1,a=n[0]&&Ht(n[0],"ordgroup");if(a)for(var s="",l=0;l<a.body.length;++l)if("t"===(s=a.body[l].text))i=!0;else{if("b"!==s){i=!1,o=!1;break}o=!0}else i=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:i,smashDepth:o}},htmlBuilder:function(e,t){var n=et.makeSpan([],[kt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var i=0;i<n.children.length;i++)n.children[i].depth=0;var o=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return et.makeSpan(["mord"],[o],t)},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mpadded",[Nt(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),ct({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,i=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:i}},htmlBuilder:function(e,t){var n=kt(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=et.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<k.TEXT.id&&(i=t.fontMetrics().xHeight);var o=r+i/4,a=n.height+n.depth+o+r,s=Cn.sqrtImage(a,t),l=s.span,c=s.ruleWidth,u=s.advanceWidth,h=l.height-c;h>n.height+n.depth+o&&(o=(o+h-n.height-n.depth)/2);var d=l.height-n.height-o-c;n.style.paddingLeft=H(u);var f=et.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+d)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var p=t.havingStyle(k.SCRIPTSCRIPT),g=kt(e.index,p,t),m=.6*(f.height-f.depth),v=et.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:g}]},t),y=et.makeSpan(["root"],[v]);return et.makeSpan(["mord","sqrt"],[y,f],t)}return et.makeSpan(["mord","sqrt"],[f],t)},mathmlBuilder:function(e,t){var n=e.body,r=e.index;return r?new Ot.MathNode("mroot",[Nt(n,t),Nt(r,t)]):new Ot.MathNode("msqrt",[Nt(n,t)])}});var yr={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT};ct({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,o=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:o}},htmlBuilder:function(e,t){var n=yr[e.style],r=t.havingStyle(n).withFont("");return mr(e.body,r,t)},mathmlBuilder:function(e,t){var n=yr[e.style],r=t.havingStyle(n),i=Rt(e.body,r),o=new Ot.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});ut({type:"supsub",htmlBuilder:function(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===k.DISPLAY.size||n.alwaysHandleSupSub)?cr:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===k.DISPLAY.size||n.limits)?gr:null:"accent"===n.type?f(n.base)?Gt:null:"horizBrace"===n.type&&!e.sub===n.isOver?ir:null:null}(e,t);if(n)return n(e,t);var r,i,o,a=e.base,s=e.sup,l=e.sub,c=kt(a,t),u=t.fontMetrics(),h=0,d=0,p=a&&f(a);if(s){var g=t.havingStyle(t.style.sup());r=kt(s,g,t),p||(h=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());i=kt(l,m,t),p||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}o=t.style===k.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var v,y=t.sizeMultiplier,b=H(.5/u.ptPerEm/y),_=null;if(i){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Q||x)&&(_=H(-c.italic))}if(r&&i){h=Math.max(h,o,r.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var w=4*u.defaultRuleThickness;if(h-r.depth-(i.height-d)<w){d=w-(h-r.depth)+i.height;var A=.8*u.xHeight-(h-r.depth);A>0&&(h+=A,d-=A)}v=et.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d,marginRight:b,marginLeft:_},{type:"elem",elem:r,shift:-h,marginRight:b}]},t)}else if(i){d=Math.max(d,u.sub1,i.height-.8*u.xHeight),v=et.makeVList({positionType:"shift",positionData:d,children:[{type:"elem",elem:i,marginLeft:_,marginRight:b}]},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,o,r.depth+.25*u.xHeight),v=et.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:b}]},t)}var T=wt(c,"right")||"mord";return et.makeSpan([T],[c,et.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,o=[Nt(e.base,t)];if(e.sub&&o.push(Nt(e.sub,t)),e.sup&&o.push(Nt(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;i=a&&"op"===a.type&&a.limits&&t.style===k.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===k.DISPLAY||a.limits)?"munderover":"msubsup"}else{var s=e.base;i=s&&"op"===s.type&&s.limits&&(t.style===k.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===k.DISPLAY)?"munder":"msub"}else{var l=e.base;i=l&&"op"===l.type&&l.limits&&(t.style===k.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===k.DISPLAY)?"mover":"msup"}return new Ot.MathNode(i,o)}}),ut({type:"atom",htmlBuilder:function(e,t){return et.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mo",[Lt(e.text,e.mode)]);if("bin"===e.family){var r=It(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var br={mi:"italic",mn:"normal",mtext:"normal"};ut({type:"mathord",htmlBuilder:function(e,t){return et.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mi",[Lt(e.text,e.mode,t)]),r=It(e,t)||"italic";return r!==br[n.type]&&n.setAttribute("mathvariant",r),n}}),ut({type:"textord",htmlBuilder:function(e,t){return et.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var n,r=Lt(e.text,e.mode,t),i=It(e,t)||"normal";return n="text"===e.mode?new Ot.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Ot.MathNode("mn",[r]):"\\prime"===e.text?new Ot.MathNode("mo",[r]):new Ot.MathNode("mi",[r]),i!==br[n.type]&&n.setAttribute("mathvariant",i),n}});var _r={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},xr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ut({type:"spacing",htmlBuilder:function(e,t){if(xr.hasOwnProperty(e.text)){var n=xr[e.text].className||"";if("text"===e.mode){var i=et.makeOrd(e,t,"textord");return i.classes.push(n),i}return et.makeSpan(["mspace",n],[et.mathsym(e.text,e.mode,t)],t)}if(_r.hasOwnProperty(e.text))return et.makeSpan(["mspace",_r[e.text]],[],t);throw new r('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!xr.hasOwnProperty(e.text)){if(_r.hasOwnProperty(e.text))return new Ot.MathNode("mspace");throw new r('Unknown type of space "'+e.text+'"')}return new Ot.MathNode("mtext",[new Ot.TextNode("")])}});var wr=function(){var e=new Ot.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ut({type:"tag",mathmlBuilder:function(e,t){var n=new Ot.MathNode("mtable",[new Ot.MathNode("mtr",[wr(),new Ot.MathNode("mtd",[Pt(e.body,t)]),wr(),new Ot.MathNode("mtd",[Pt(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Ar={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},kr={"\\textbf":"textbf","\\textmd":"textmd"},Tr={"\\textit":"textit","\\textup":"textup"},Sr=function(e,t){var n=e.font;return n?Ar[n]?t.withTextFontFamily(Ar[n]):kr[n]?t.withTextFontWeight(kr[n]):t.withTextFontShape(Tr[n]):t};ct({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"text",mode:n.mode,body:dt(i),font:r}},htmlBuilder:function(e,t){var n=Sr(e,t),r=yt(e.body,n,!0);return et.makeSpan(["mord","text"],r,n)},mathmlBuilder:function(e,t){var n=Sr(e,t);return Pt(e.body,n)}}),ct({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=kt(e.body,t),r=et.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,o=et.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return et.makeSpan(["mord","underline"],[o],t)},mathmlBuilder:function(e,t){var n=new Ot.MathNode("mo",[new Ot.TextNode("")]);n.setAttribute("stretchy","true");var r=new Ot.MathNode("munder",[Nt(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),ct({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=kt(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return et.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:function(e,t){return new Ot.MathNode("mpadded",[Nt(e.body,t)],["vcenter"])}}),ct({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,n){throw new r("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var n=Er(e),r=[],i=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var a=n[o];"~"===a&&(a="\\textasciitilde"),r.push(et.makeSymbol(a,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return et.makeSpan(["mord","text"].concat(i.sizingClasses(t)),et.tryCombineChars(r),i)},mathmlBuilder:function(e,t){var n=new Ot.TextNode(Er(e)),r=new Ot.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Er=function(e){return e.body.replace(/ /g,e.star?"":"")},Cr=at,Mr=function(){function e(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}return e.range=function(t,n){return n?t&&t.loc&&n.loc&&t.loc.lexer===n.loc.lexer?new e(t.loc.lexer,t.loc.start,n.loc.end):null:t&&t.loc},e}(),Or=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,n){return new e(n,Mr.range(this,t))},e}(),Lr=new RegExp("[-]+$"),Dr=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]---][-]*|[\ud800-\udbff][\udc00-\udfff][-]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Or("EOF",new Mr(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new r("Unexpected character: '"+e[t]+"'",new Or(e[t],new Mr(this,t,t+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[i]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Or(i,new Mr(this,t,this.tokenRegex.lastIndex))},e}(),Ir=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new r("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(void 0===e[t]?delete this.current[t]:this.current[t]=e[t])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}this.current[e]=t},e}(),Rr=fr;pr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),pr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),pr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),pr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),pr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),pr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),pr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Pr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};pr("\\char",(function(e){var t,n=e.popToken(),i="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new r("\\char` missing argument");i=n.text.charCodeAt(0)}else t=10;if(t){if(null==(i=Pr[n.text])||i>=t)throw new r("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=Pr[e.future().text])&&o<t;)i*=t,i+=o,e.popToken()}return"\\@char{"+i+"}"}));var Nr=function(e,t,n){var i=e.consumeArg().tokens;if(1!==i.length)throw new r("\\newcommand's first argument must be a macro name");var o=i[0].text,a=e.isDefined(o);if(a&&!t)throw new r("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!a&&!n)throw new r("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var s=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new r("Invalid number of arguments: "+l);s=parseInt(l),i=e.consumeArg().tokens}return e.macros.set(o,{tokens:i,numArgs:s}),""};pr("\\newcommand",(function(e){return Nr(e,!1,!0)})),pr("\\renewcommand",(function(e){return Nr(e,!0,!1)})),pr("\\providecommand",(function(e){return Nr(e,!0,!0)})),pr("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),pr("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),pr("\\show",(function(e){var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Cr[n],se.math[n],se.text[n]),""})),pr("\\bgroup","{"),pr("\\egroup","}"),pr("~","\\nobreakspace"),pr("\\lq","`"),pr("\\rq","'"),pr("\\aa","\\r a"),pr("\\AA","\\r A"),pr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`}"),pr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),pr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`}"),pr("","\\mathscr{B}"),pr("","\\mathscr{E}"),pr("","\\mathscr{F}"),pr("","\\mathscr{H}"),pr("","\\mathscr{I}"),pr("","\\mathscr{L}"),pr("","\\mathscr{M}"),pr("","\\mathscr{R}"),pr("","\\mathfrak{C}"),pr("","\\mathfrak{H}"),pr("","\\mathfrak{Z}"),pr("\\Bbbk","\\Bbb{k}"),pr("","\\cdotp"),pr("\\llap","\\mathllap{\\textrm{#1}}"),pr("\\rlap","\\mathrlap{\\textrm{#1}}"),pr("\\clap","\\mathclap{\\textrm{#1}}"),pr("\\mathstrut","\\vphantom{(}"),pr("\\underbar","\\underline{\\text{#1}}"),pr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),pr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`}}"),pr("\\ne","\\neq"),pr("","\\neq"),pr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`}}"),pr("","\\notin"),pr("","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`}}"),pr("","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`}}"),pr("","\\perp"),pr("","\\mathclose{!\\mkern-0.8mu!}"),pr("","\\notni"),pr("","\\ulcorner"),pr("","\\urcorner"),pr("","\\llcorner"),pr("","\\lrcorner"),pr("","\\copyright"),pr("","\\textregistered"),pr("","\\textregistered"),pr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),pr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),pr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),pr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),pr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),pr("","\\vdots"),pr("\\varGamma","\\mathit{\\Gamma}"),pr("\\varDelta","\\mathit{\\Delta}"),pr("\\varTheta","\\mathit{\\Theta}"),pr("\\varLambda","\\mathit{\\Lambda}"),pr("\\varXi","\\mathit{\\Xi}"),pr("\\varPi","\\mathit{\\Pi}"),pr("\\varSigma","\\mathit{\\Sigma}"),pr("\\varUpsilon","\\mathit{\\Upsilon}"),pr("\\varPhi","\\mathit{\\Phi}"),pr("\\varPsi","\\mathit{\\Psi}"),pr("\\varOmega","\\mathit{\\Omega}"),pr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),pr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),pr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),pr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),pr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),pr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var zr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};pr("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in zr?t=zr[n]:("\\not"===n.substr(0,4)||n in se.math&&l(["bin","rel"],se.math[n].group))&&(t="\\dotsb"),t}));var Fr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};pr("\\dotso",(function(e){return e.future().text in Fr?"\\ldots\\,":"\\ldots"})),pr("\\dotsc",(function(e){var t=e.future().text;return t in Fr&&","!==t?"\\ldots\\,":"\\ldots"})),pr("\\cdots",(function(e){return e.future().text in Fr?"\\@cdots\\,":"\\@cdots"})),pr("\\dotsb","\\cdots"),pr("\\dotsm","\\cdots"),pr("\\dotsi","\\!\\cdots"),pr("\\dotsx","\\ldots\\,"),pr("\\DOTSI","\\relax"),pr("\\DOTSB","\\relax"),pr("\\DOTSX","\\relax"),pr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),pr("\\,","\\tmspace+{3mu}{.1667em}"),pr("\\thinspace","\\,"),pr("\\>","\\mskip{4mu}"),pr("\\:","\\tmspace+{4mu}{.2222em}"),pr("\\medspace","\\:"),pr("\\;","\\tmspace+{5mu}{.2777em}"),pr("\\thickspace","\\;"),pr("\\!","\\tmspace-{3mu}{.1667em}"),pr("\\negthinspace","\\!"),pr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),pr("\\negthickspace","\\tmspace-{5mu}{.277em}"),pr("\\enspace","\\kern.5em "),pr("\\enskip","\\hskip.5em\\relax"),pr("\\quad","\\hskip1em\\relax"),pr("\\qquad","\\hskip2em\\relax"),pr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),pr("\\tag@paren","\\tag@literal{({#1})}"),pr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new r("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),pr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),pr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),pr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),pr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),pr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),pr("\\newline","\\\\\\relax"),pr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Br=H(O["Main-Regular"]["T".charCodeAt(0)][1]-.7*O["Main-Regular"]["A".charCodeAt(0)][1]);pr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Br+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),pr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Br+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),pr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),pr("\\@hspace","\\hskip #1\\relax"),pr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),pr("\\ordinarycolon",":"),pr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),pr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),pr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),pr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),pr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),pr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),pr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),pr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),pr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),pr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),pr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),pr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),pr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),pr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),pr("","\\dblcolon"),pr("","\\eqcolon"),pr("","\\coloneqq"),pr("","\\eqqcolon"),pr("","\\Coloneqq"),pr("\\ratio","\\vcentcolon"),pr("\\coloncolon","\\dblcolon"),pr("\\colonequals","\\coloneqq"),pr("\\coloncolonequals","\\Coloneqq"),pr("\\equalscolon","\\eqqcolon"),pr("\\equalscoloncolon","\\Eqqcolon"),pr("\\colonminus","\\coloneq"),pr("\\coloncolonminus","\\Coloneq"),pr("\\minuscolon","\\eqcolon"),pr("\\minuscoloncolon","\\Eqcolon"),pr("\\coloncolonapprox","\\Colonapprox"),pr("\\coloncolonsim","\\Colonsim"),pr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`}}"),pr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),pr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),pr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),pr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),pr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),pr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),pr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),pr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),pr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{}"),pr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{}"),pr("\\ngeqq","\\html@mathml{\\@ngeqq}{}"),pr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{}"),pr("\\nleqq","\\html@mathml{\\@nleqq}{}"),pr("\\nleqslant","\\html@mathml{\\@nleqslant}{}"),pr("\\nshortmid","\\html@mathml{\\@nshortmid}{}"),pr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{}"),pr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{}"),pr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{}"),pr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{}"),pr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{}"),pr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{}"),pr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{}"),pr("\\imath","\\html@mathml{\\@imath}{}"),pr("\\jmath","\\html@mathml{\\@jmath}{}"),pr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`}}"),pr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`}}"),pr("","\\llbracket"),pr("","\\rrbracket"),pr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`}}"),pr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`}}"),pr("","\\lBrace"),pr("","\\rBrace"),pr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`}}"),pr("","\\minuso"),pr("\\darr","\\downarrow"),pr("\\dArr","\\Downarrow"),pr("\\Darr","\\Downarrow"),pr("\\lang","\\langle"),pr("\\rang","\\rangle"),pr("\\uarr","\\uparrow"),pr("\\uArr","\\Uparrow"),pr("\\Uarr","\\Uparrow"),pr("\\N","\\mathbb{N}"),pr("\\R","\\mathbb{R}"),pr("\\Z","\\mathbb{Z}"),pr("\\alef","\\aleph"),pr("\\alefsym","\\aleph"),pr("\\Alpha","\\mathrm{A}"),pr("\\Beta","\\mathrm{B}"),pr("\\bull","\\bullet"),pr("\\Chi","\\mathrm{X}"),pr("\\clubs","\\clubsuit"),pr("\\cnums","\\mathbb{C}"),pr("\\Complex","\\mathbb{C}"),pr("\\Dagger","\\ddagger"),pr("\\diamonds","\\diamondsuit"),pr("\\empty","\\emptyset"),pr("\\Epsilon","\\mathrm{E}"),pr("\\Eta","\\mathrm{H}"),pr("\\exist","\\exists"),pr("\\harr","\\leftrightarrow"),pr("\\hArr","\\Leftrightarrow"),pr("\\Harr","\\Leftrightarrow"),pr("\\hearts","\\heartsuit"),pr("\\image","\\Im"),pr("\\infin","\\infty"),pr("\\Iota","\\mathrm{I}"),pr("\\isin","\\in"),pr("\\Kappa","\\mathrm{K}"),pr("\\larr","\\leftarrow"),pr("\\lArr","\\Leftarrow"),pr("\\Larr","\\Leftarrow"),pr("\\lrarr","\\leftrightarrow"),pr("\\lrArr","\\Leftrightarrow"),pr("\\Lrarr","\\Leftrightarrow"),pr("\\Mu","\\mathrm{M}"),pr("\\natnums","\\mathbb{N}"),pr("\\Nu","\\mathrm{N}"),pr("\\Omicron","\\mathrm{O}"),pr("\\plusmn","\\pm"),pr("\\rarr","\\rightarrow"),pr("\\rArr","\\Rightarrow"),pr("\\Rarr","\\Rightarrow"),pr("\\real","\\Re"),pr("\\reals","\\mathbb{R}"),pr("\\Reals","\\mathbb{R}"),pr("\\Rho","\\mathrm{P}"),pr("\\sdot","\\cdot"),pr("\\sect","\\S"),pr("\\spades","\\spadesuit"),pr("\\sub","\\subset"),pr("\\sube","\\subseteq"),pr("\\supe","\\supseteq"),pr("\\Tau","\\mathrm{T}"),pr("\\thetasym","\\vartheta"),pr("\\weierp","\\wp"),pr("\\Zeta","\\mathrm{Z}"),pr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),pr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),pr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),pr("\\bra","\\mathinner{\\langle{#1}|}"),pr("\\ket","\\mathinner{|{#1}\\rangle}"),pr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),pr("\\Bra","\\left\\langle#1\\right|"),pr("\\Ket","\\left|#1\\right\\rangle"),pr("\\angln","{\\angl n}"),pr("\\blue","\\textcolor{##6495ed}{#1}"),pr("\\orange","\\textcolor{##ffa500}{#1}"),pr("\\pink","\\textcolor{##ff00af}{#1}"),pr("\\red","\\textcolor{##df0030}{#1}"),pr("\\green","\\textcolor{##28ae7b}{#1}"),pr("\\gray","\\textcolor{gray}{#1}"),pr("\\purple","\\textcolor{##9d38bd}{#1}"),pr("\\blueA","\\textcolor{##ccfaff}{#1}"),pr("\\blueB","\\textcolor{##80f6ff}{#1}"),pr("\\blueC","\\textcolor{##63d9ea}{#1}"),pr("\\blueD","\\textcolor{##11accd}{#1}"),pr("\\blueE","\\textcolor{##0c7f99}{#1}"),pr("\\tealA","\\textcolor{##94fff5}{#1}"),pr("\\tealB","\\textcolor{##26edd5}{#1}"),pr("\\tealC","\\textcolor{##01d1c1}{#1}"),pr("\\tealD","\\textcolor{##01a995}{#1}"),pr("\\tealE","\\textcolor{##208170}{#1}"),pr("\\greenA","\\textcolor{##b6ffb0}{#1}"),pr("\\greenB","\\textcolor{##8af281}{#1}"),pr("\\greenC","\\textcolor{##74cf70}{#1}"),pr("\\greenD","\\textcolor{##1fab54}{#1}"),pr("\\greenE","\\textcolor{##0d923f}{#1}"),pr("\\goldA","\\textcolor{##ffd0a9}{#1}"),pr("\\goldB","\\textcolor{##ffbb71}{#1}"),pr("\\goldC","\\textcolor{##ff9c39}{#1}"),pr("\\goldD","\\textcolor{##e07d10}{#1}"),pr("\\goldE","\\textcolor{##a75a05}{#1}"),pr("\\redA","\\textcolor{##fca9a9}{#1}"),pr("\\redB","\\textcolor{##ff8482}{#1}"),pr("\\redC","\\textcolor{##f9685d}{#1}"),pr("\\redD","\\textcolor{##e84d39}{#1}"),pr("\\redE","\\textcolor{##bc2612}{#1}"),pr("\\maroonA","\\textcolor{##ffbde0}{#1}"),pr("\\maroonB","\\textcolor{##ff92c6}{#1}"),pr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),pr("\\maroonD","\\textcolor{##ca337c}{#1}"),pr("\\maroonE","\\textcolor{##9e034e}{#1}"),pr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),pr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),pr("\\purpleC","\\textcolor{##aa87ff}{#1}"),pr("\\purpleD","\\textcolor{##7854ab}{#1}"),pr("\\purpleE","\\textcolor{##543b78}{#1}"),pr("\\mintA","\\textcolor{##f5f9e8}{#1}"),pr("\\mintB","\\textcolor{##edf2df}{#1}"),pr("\\mintC","\\textcolor{##e0e5cc}{#1}"),pr("\\grayA","\\textcolor{##f6f7f7}{#1}"),pr("\\grayB","\\textcolor{##f0f1f2}{#1}"),pr("\\grayC","\\textcolor{##e3e5e6}{#1}"),pr("\\grayD","\\textcolor{##d6d8da}{#1}"),pr("\\grayE","\\textcolor{##babec2}{#1}"),pr("\\grayF","\\textcolor{##888d93}{#1}"),pr("\\grayG","\\textcolor{##626569}{#1}"),pr("\\grayH","\\textcolor{##3b3e40}{#1}"),pr("\\grayI","\\textcolor{##21242c}{#1}"),pr("\\kaBlue","\\textcolor{##314453}{#1}"),pr("\\kaGreen","\\textcolor{##71B307}{#1}");var jr={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ur=function(){function e(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ir(Rr,t.macros),this.mode=n,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Dr(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var i=this.consumeArg(["]"]);r=i.tokens,n=i.end}else{var o=this.consumeArg();r=o.tokens,t=o.start,n=o.end}return this.pushToken(new Or("EOF",n.loc)),this.pushTokens(r),t.range(n,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var i,o=this.future(),a=0,s=0;do{if(i=this.popToken(),t.push(i),"{"===i.text)++a;else if("}"===i.text){if(-1==--a)throw new r("Extra }",i)}else if("EOF"===i.text)throw new r("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",i);if(e&&n)if((0===a||1===a&&"{"===e[s])&&i.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:i}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new r("The length of delimiters doesn't match the number of args!");for(var n=t[0],i=0;i<n.length;i++){var o=this.popToken();if(n[i]!==o.text)throw new r("Use of the macro doesn't match its definition",o)}}for(var a=[],s=0;s<e;s++)a.push(this.consumeArg(t&&t[s+1]).tokens);return a},t.expandOnce=function(e){var t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new r("Undefined control sequence: "+n);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new r("Too many expansions: infinite loop or need to increase maxExpand setting");var o=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var l=o[s];if("#"===l.text){if(0===s)throw new r("Incomplete placeholder at end of macro body",l);if("#"===(l=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new r("Not a valid argument number",l);var c;(c=o).splice.apply(c,[s,2].concat(a[+l.text-1]))}}}return this.pushTokens(o),o},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Or){if("\\relax"!==e.text&&!e.treatAsRelax)return this.stack.pop();this.stack.pop()}}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Or(e)]):void 0},t.expandTokens=function(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof Or&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var i=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(i+1));)++i;for(var a=new Dr(r,this.settings),s=[],l=a.lex();"EOF"!==l.text;)s.push(l),l=a.lex();return s.reverse(),{tokens:s,numArgs:i}}return r},t.isDefined=function(e){return this.macros.has(e)||Cr.hasOwnProperty(e)||se.math.hasOwnProperty(e)||se.text.hasOwnProperty(e)||jr.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Cr.hasOwnProperty(e)&&!Cr[e].primitive},e}(),Vr={"":{text:"\\'",math:"\\acute"},"":{text:"\\`",math:"\\grave"},"":{text:'\\"',math:"\\ddot"},"":{text:"\\~",math:"\\tilde"},"":{text:"\\=",math:"\\bar"},"":{text:"\\u",math:"\\breve"},"":{text:"\\v",math:"\\check"},"":{text:"\\^",math:"\\hat"},"":{text:"\\.",math:"\\dot"},"":{text:"\\r",math:"\\mathring"},"":{text:"\\H"},"":{text:"\\c"}},qr={:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"a",:"b",:"c",:"c",:"c",:"c",:"c",:"c",:"d",:"d",:"d",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"e",:"f",:"g",:"g",:"g",:"g",:"g",:"g",:"g",:"h",:"h",:"h",:"h",:"h",:"i",:"i",:"i",:"i",:"i",:"i",:"i",:"i",:"i",:"j",:"j",:"k",:"k",:"k",:"l",:"l",:"l",:"m",:"m",:"n",:"n",:"n",:"n",:"n",:"n",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"o",:"p",:"p",:"r",:"r",:"r",:"r",:"s",:"s",:"s",:"s",:"s",:"s",:"s",:"t",:"t",:"t",:"t",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"u",:"v",:"w",:"w",:"w",:"w",:"w",:"w",:"x",:"x",:"y",:"y",:"y",:"y",:"y",:"y",:"y",:"y",:"z",:"z",:"z",:"z",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"A",:"B",:"C",:"C",:"C",:"C",:"C",:"C",:"D",:"D",:"D",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"E",:"F",:"G",:"G",:"G",:"G",:"G",:"G",:"G",:"H",:"H",:"H",:"H",:"H",:"I",:"I",:"I",:"I",:"I",:"I",:"I",:"I",:"I",:"I",:"J",:"K",:"K",:"K",:"L",:"L",:"L",:"M",:"M",:"N",:"N",:"N",:"N",:"N",:"N",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"O",:"P",:"P",:"R",:"R",:"R",:"R",:"S",:"S",:"S",:"S",:"S",:"S",:"S",:"T",:"T",:"T",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"U",:"V",:"W",:"W",:"W",:"W",:"W",:"X",:"X",:"Y",:"Y",:"Y",:"Y",:"Y",:"Y",:"Y",:"Z",:"Z",:"Z",:"Z",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:"",:""},Hr=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ur(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new r("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.parseExpression=function(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==e.endOfExpression.indexOf(i.text))break;if(n&&i.text===n)break;if(t&&Cr[i.text]&&Cr[i.text].infix)break;var o=this.parseAtom(n);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},t.handleInfixNodes=function(e){for(var t,n=-1,i=0;i<e.length;i++)if("infix"===e[i].type){if(-1!==n)throw new r("only one infix operator per group",e[i].token);n=i,t=e[i].replaceWith}if(-1!==n&&t){var o,a,s=e.slice(0,n),l=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},a=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],a],[]):this.callFunction(t,[o,a],[])]}return e},t.handleSupSubscript=function(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var i=this.parseGroup(e);if(!i)throw new r("Expected group after '"+n+"'",t);return i},t.formatUnsupportedCmd=function(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}},t.parseAtom=function(e){var t,n,i=this.parseGroup("atom",e);if("text"===this.mode)return i;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(i&&"op"===i.type){var a="\\limits"===o.text;i.limits=a,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new r("Limit controls must follow a math operator",o);i.alwaysHandleSupSub&&(i.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new r("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(n)throw new r("Double subscript",o);n=this.handleSupSubscript("subscript")}else{if("'"!==o.text)break;if(t)throw new r("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},l=[s];for(this.consume();"'"===this.fetch().text;)l.push(s),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}}return t||n?{type:"supsub",mode:this.mode,base:i,sup:t,sub:n}:i},t.parseFunction=function(e,t){var n=this.fetch(),i=n.text,o=Cr[i];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new r("Got function '"+i+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!o.allowedInText)throw new r("Can't use function '"+i+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new r("Can't use function '"+i+"' in math mode",n);var a=this.parseArguments(i,o),s=a.args,l=a.optArgs;return this.callFunction(i,s,l,n,e)},t.callFunction=function(e,t,n,i,o){var a={funcName:e,parser:this,token:i,breakOnTokenText:o},s=Cr[e];if(s&&s.handler)return s.handler(a,t,n);throw new r("No function handler for "+e)},t.parseArguments=function(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var i=[],o=[],a=0;a<n;a++){var s=t.argTypes&&t.argTypes[a],l=a<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===a&&null==o[0])&&(s="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)o.push(c);else{if(null==c)throw new r("Null argument, please report this as a bug");i.push(c)}}return{args:i,optArgs:o}},t.parseGroupOfType=function(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var i=this.parseArgumentGroup(n,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",n);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(n)throw new r("A primitive argument cannot be optional");var a=this.parseGroup(e);if(null==a)throw new r("Expected group as "+e,this.fetch());return a;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new r("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,i="";"EOF"!==(r=this.fetch()).text;)i+=r.text,this.consume();return this.consume(),n.text=i,n},t.parseRegexGroup=function(e,t){for(var n,i=this.fetch(),o=i,a="";"EOF"!==(n=this.fetch()).text&&e.test(a+n.text);)a+=(o=n).text,this.consume();if(""===a)throw new r("Invalid "+t+": '"+i.text+"'",i);return i.range(o,a)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new r("Invalid color: '"+t.text+"'",t);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}},t.parseSizeGroup=function(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!i)throw new r("Invalid size: '"+t.text+"'",t);var o={number:+(i[1]+i[2]),unit:i[3]};if(!V(o))throw new r("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}},t.parseUrlGroup=function(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}},t.parseArgumentGroup=function(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),o},t.parseGroup=function(e,t){var n,i=this.fetch(),o=i.text;if("{"===o||"\\begingroup"===o){this.consume();var a="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,a),l=this.fetch();this.expect(a),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Mr.range(i,l),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!jr.hasOwnProperty(o)){if(this.settings.throwOnError)throw new r("Undefined control sequence: "+o,i);n=this.formatUnsupportedCmd(o),this.consume()}return n},t.formLigatures=function(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],i=r.text;"-"===i&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:Mr.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Mr.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[n+1].text!==i||(e.splice(n,2,{type:"textord",mode:"text",loc:Mr.range(r,e[n+1]),text:i+i}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),i="*"===n.charAt(0);if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new r("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}qr.hasOwnProperty(t[0])&&!se[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=qr[t[0]]+t.substr(1));var o,a=Lr.exec(t);if(a&&("i"===(t=t.substring(0,a.index))?t="":"j"===t&&(t="")),se[this.mode][t]){this.settings.strict&&"math"===this.mode&&Be.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=se[this.mode][t].group,c=Mr.range(e);if(ie.hasOwnProperty(l)){var u=l;s={type:"atom",mode:this.mode,family:u,loc:c,text:t}}else s={type:l,mode:this.mode,loc:c,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(E(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Mr.range(e),text:t}}if(this.consume(),a)for(var h=0;h<a[0].length;h++){var d=a[0][h];if(!Vr[d])throw new r("Unknown accent ' "+d+"'",e);var f=Vr[d][this.mode]||Vr[d].text;if(!f)throw new r("Accent "+d+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:Mr.range(e),label:f,isStretchy:!1,isShifty:!0,base:o}}return o},e}();Hr.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var $r=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Hr(e,t);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new r("\\tag works only in display equations");n.gullet.feed("\\df@tag"),i=[{type:"tag",mode:"text",body:i,tag:n.parse()}]}return i},Wr=function(e,t,n){t.textContent="";var r=Yr(e,n).toNode();t.appendChild(r)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Wr=function(){throw new r("KaTeX doesn't work in quirks mode.")});var Gr=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;var i=et.makeSpan(["katex-error"],[new Q(t)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},Yr=function(e,t){var n=new g(t);try{return function(e,t,n){var r,i=Ft(n);if("mathml"===n.output)return zt(e,t,i,n.displayMode,!0);if("html"===n.output){var o=St(e,i);r=et.makeSpan(["katex"],[o])}else{var a=zt(e,t,i,n.displayMode,!1),s=St(e,i);r=et.makeSpan(["katex"],[a,s])}return Bt(r,n)}($r(e,n),e,n)}catch(t){return Gr(t,e,n)}},Xr={version:"0.13.24",render:Wr,renderToString:function(e,t){return Yr(e,t).toMarkup()},ParseError:r,__parse:function(e,t){var n=new g(t);return $r(e,n)},__renderToDomTree:Yr,__renderToHTMLTree:function(e,t){var n=new g(t);try{return function(e,t,n){var r=St(e,Ft(n)),i=et.makeSpan(["katex"],[r]);return Bt(i,n)}($r(e,n),0,n)}catch(t){return Gr(t,e,n)}},__setFontMetrics:function(e,t){O[e]=t},__defineSymbol:le,__defineMacro:pr,__domTree:{Span:X,Anchor:Z,SymbolNode:Q,SvgNode:ee,PathNode:te,LineNode:ne}};return t.default}()},e.exports=t()},87576:(e,t,n)=>{"use strict";var r=n(87730),i=n(79836);t.highlight=a,t.highlightAuto=function(e,t){var n,s,l,c,u=t||{},h=u.subset||r.listLanguages(),d=u.prefix,f=h.length,p=-1;if(null==d&&(d=o),"string"!=typeof e)throw i("Expected `string` for value, got `%s`",e);for(s={relevance:0,language:null,value:[]},n={relevance:0,language:null,value:[]};++p<f;)c=h[p],r.getLanguage(c)&&((l=a(c,e,t)).language=c,l.relevance>s.relevance&&(s=l),l.relevance>n.relevance&&(s=n,n=l));return s.language&&(n.secondBest=s),n},t.registerLanguage=function(e,t){r.registerLanguage(e,t)},t.listLanguages=function(){return r.listLanguages()},t.registerAlias=function(e,t){var n,i=e;for(n in t&&((i={})[e]=t),i)r.registerAliases(i[n],{languageName:n})},s.prototype.addText=function(e){var t,n,r=this.stack;""!==e&&((n=(t=r[r.length-1]).children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e}))},s.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},s.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,o=t?{type:"element",tagName:"span",properties:{className:[t]},children:i}:i;r.children=r.children.concat(o)},s.prototype.openNode=function(e){var t=this.stack,n={type:"element",tagName:"span",properties:{className:[this.options.classPrefix+e]},children:[]};t[t.length-1].children.push(n),t.push(n)},s.prototype.closeNode=function(){this.stack.pop()},s.prototype.closeAllNodes=l,s.prototype.finalize=l,s.prototype.toHTML=function(){return""};var o="hljs-";function a(e,t,n){var a,l=r.configure({}),c=(n||{}).prefix;if("string"!=typeof e)throw i("Expected `string` for name, got `%s`",e);if(!r.getLanguage(e))throw i("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw i("Expected `string` for value, got `%s`",t);if(null==c&&(c=o),r.configure({__emitter:s,classPrefix:c}),a=r.highlight(t,{language:e,ignoreIllegals:!0}),r.configure(l||{}),a.errorRaised)throw a.errorRaised;return{relevance:a.relevance,language:a.language,value:a.emitter.rootNode.children}}function s(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function l(){}},87730:e=>{function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];"object"!=typeof r||Object.isFrozen(r)||t(r)})),e}var n=t,r=t;n.default=r;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const s=e=>!!e.kind;class l{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!s(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{c._collapse(e)})))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function h(e){return e?"string"==typeof e?e:e.source:null}const d=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,f="[a-zA-Z]\\w*",p="[a-zA-Z_]\\w*",g="\\b\\d+(\\.\\d+)?",m="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",v="\\b(0b[01]+)",y={begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[y]},_={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[y]},x={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},w=function(e,t,n={}){const r=a({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(x),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},A=w("//","$"),k=w("/\\*","\\*/"),T=w("#","$"),S={className:"number",begin:g,relevance:0},E={className:"number",begin:m,relevance:0},C={className:"number",begin:v,relevance:0},M={className:"number",begin:g+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},O={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[y,{begin:/\[/,end:/\]/,relevance:0,contains:[y]}]}]},L={className:"title",begin:f,relevance:0},D={className:"title",begin:p,relevance:0};var I=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:f,UNDERSCORE_IDENT_RE:p,NUMBER_RE:g,C_NUMBER_RE:m,BINARY_NUMBER_RE:v,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>h(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:y,APOS_STRING_MODE:b,QUOTE_STRING_MODE:_,PHRASAL_WORDS_MODE:x,COMMENT:w,C_LINE_COMMENT_MODE:A,C_BLOCK_COMMENT_MODE:k,HASH_COMMENT_MODE:T,NUMBER_MODE:S,C_NUMBER_MODE:E,BINARY_NUMBER_MODE:C,CSS_NUMBER_MODE:M,REGEXP_MODE:O,TITLE_MODE:L,UNDERSCORE_TITLE_MODE:D,METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function R(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function P(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=R,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function N(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>h(e))).join("|")+")"}(...e.illegal))}function z(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,t){void 0===e.relevance&&(e.relevance=1)}const B=["of","and","for","in","not","or","if","then","parent","list","value"];function j(e,t,n="keyword"){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,j(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){return t?Number(t):function(e){return B.includes(e.toLowerCase())}(e)?0:1}function V(e,{plugins:t}){function n(t,n){return new RegExp(h(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=h(e),i="";for(;r.length>0;){const e=d.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),function t(r,o){const s=r;if(r.isCompiled)return s;[z].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[P,N,F].forEach((e=>e(r,o))),r.isCompiled=!0;let l=null;if("object"==typeof r.keywords&&(l=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=j(r.keywords,e.case_insensitive)),r.lexemes&&l)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l=l||r.lexemes||/\w+/,s.keywordPatternRe=n(l,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=n(r.end)),s.terminatorEnd=h(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return a(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:q(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,s)})),r.starts&&t(r.starts,o),s.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function q(e){return!!e&&(e.endsWithParent||q(e.starts))}function H(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,o(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const $={"after:highlightElement":({el:e,result:t,text:n})=>{const r=G(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const a=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){i+="<"+W(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+o(e.value)+'"'})).join("")+">"}function c(e){i+="</"+W(e)+">"}function u(e){("start"===e.event?l:c)(e.node)}for(;e.length||t.length;){let t=s();if(i+=o(n.substring(r,t[0].offset)),r=t[0].offset,t===e){a.reverse().forEach(c);do{u(t.splice(0,1)[0]),t=s()}while(t===e&&t.length&&t[0].offset===r);a.reverse().forEach(l)}else"start"===t[0].event?a.push(t[0].node):a.pop(),u(t.splice(0,1)[0])}return i+o(n.substr(r))}(r,G(i),n)}};function W(e){return e.nodeName.toLowerCase()}function G(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),W(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const Y={},X=e=>{console.error(e)},Z=(e,...t)=>{console.log(`WARN: ${e}`,...t)},K=(e,t)=>{Y[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Y[`${e}/${t}`]=!0)},J=o,Q=a,ee=Symbol("nomatch");var te=function(e){const t=Object.create(null),r=Object.create(null),o=[];let a=!0;const s=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let h={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function d(e){return h.noHighlightRe.test(e)}function f(e,t,n,r){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language,r=void 0):(K("10.7.0","highlight(lang, code, ...args) has been deprecated."),K("10.7.0","Please use highlight(code, options) instead.\npath_to_url"),o=e,i=t);const a={code:i,language:o};S("before:highlight",a);const s=a.result?a.result:p(a.language,a.code,n,r);return s.code=a.code,S("after:highlight",s),s}function p(e,n,r,s){function c(e,t){const n=_.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function u(){null!=k.subLanguage?function(){if(""===E)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void S.addText(E);e=p(k.subLanguage,E,!0,T[k.subLanguage]),T[k.subLanguage]=e.top}else e=g(E,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(C+=e.relevance),S.addSublanguage(e.emitter,e.language)}():function(){if(!k.keywords)return void S.addText(E);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(E),n="";for(;t;){n+=E.substring(e,t.index);const r=c(k,t);if(r){const[e,i]=r;if(S.addText(n),n="",C+=i,e.startsWith("_"))n+=t[0];else{const n=_.classNameAliases[e]||e;S.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(E)}n+=E.substr(e),S.addText(n)}(),E=""}function d(e){return e.className&&S.openNode(_.classNameAliases[e.className]||e.className),k=Object.create(e,{parent:{value:k}}),k}function f(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return f(e.parent,t,n)}function m(e){return 0===k.matcher.regexIndex?(E+=e[0],1):(L=!0,0)}function v(e){const t=e[0],r=n.substr(e.index),i=f(k,e,r);if(!i)return ee;const o=k;o.skip?E+=t:(o.returnEnd||o.excludeEnd||(E+=t),u(),o.excludeEnd&&(E=t));do{k.className&&S.closeNode(),k.skip||k.subLanguage||(C+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),d(i.starts)),o.returnEnd?0:t.length}let y={};function b(t,o){const s=o&&o[0];if(E+=t,null==s)return u(),0;if("begin"===y.type&&"end"===o.type&&y.index===o.index&&""===s){if(E+=n.slice(o.index,o.index+1),!a){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new i(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(e,r),r.isMatchIgnored))return m(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?E+=t:(n.excludeBegin&&(E+=t),u(),n.returnBegin||n.excludeBegin||(E=t)),d(n),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(k.className||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=v(o);if(e!==ee)return e}if("illegal"===o.type&&""===s)return 1;if(O>1e5&&O>3*o.index)throw new Error("potential infinite loop, way more iterations than matches");return E+=s,s.length}const _=A(e);if(!_)throw X(l.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=V(_,{plugins:o});let w="",k=s||x;const T={},S=new h.__emitter(h);!function(){const e=[];for(let t=k;t!==_;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>S.openNode(e)))}();let E="",C=0,M=0,O=0,L=!1;try{for(k.matcher.considerAll();;){O++,L?L=!1:k.matcher.considerAll(),k.matcher.lastIndex=M;const e=k.matcher.exec(n);if(!e)break;const t=b(n.substring(M,e.index),e);M=e.index+t}return b(n.substr(M)),S.closeAllNodes(),S.finalize(),w=S.toHTML(),{relevance:Math.floor(C),value:w,language:e,illegal:!1,emitter:S,top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(M-100,M+100),mode:t.mode},sofar:w,relevance:0,value:J(n),emitter:S};if(a)return{illegal:!1,relevance:0,value:J(n),emitter:S,language:e,top:k,errorRaised:t};throw t}}function g(e,n){n=n||h.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new h.__emitter(h),value:J(e),illegal:!1,top:c};return t.emitter.addText(e),t}(e),i=n.filter(A).filter(T).map((t=>p(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(A(e.language).supersetOf===t.language)return 1;if(A(t.language).supersetOf===e.language)return-1}return 0})),[a,s]=o,l=a;return l.second_best=s,l}const m={"before:highlightElement":({el:e})=>{h.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{h.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},v=/^(<[^>]+>|\t)+/gm,y={"after:highlightElement":({result:e})=>{h.tabReplace&&(e.value=e.value.replace(v,(e=>e.replace(/\t/g,h.tabReplace))))}};function b(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=h.languageDetectRe.exec(t);if(n){const t=A(n[1]);return t||(Z(l.replace("{}",n[1])),Z("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||A(e)))}(e);if(d(n))return;S("before:highlightElement",{el:e,language:n}),t=e;const i=t.textContent,o=n?f(i,{language:n,ignoreIllegals:!0}):g(i);S("after:highlightElement",{el:e,result:o,text:i}),e.innerHTML=o.value,function(e,t,n){const i=t?r[t]:n;e.classList.add("hljs"),i&&e.classList.add(i)}(e,n,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const _=()=>{_.called||(_.called=!0,K("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(b))};let x=!1;function w(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(b):x=!0}function A(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function k(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function T(e){const t=A(e);return t&&!t.disableAutodetect}function S(e,t){const n=e;o.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){x&&w()}),!1),Object.assign(e,{highlight:f,highlightAuto:g,highlightAll:w,fixMarkup:function(e){return K("10.2.0","fixMarkup will be removed entirely in v11.0"),K("10.2.0","Please see path_to_url"),t=e,h.tabReplace||h.useBR?t.replace(s,(e=>"\n"===e?h.useBR?"<br>":e:h.tabReplace?e.replace(/\t/g,h.tabReplace):e)):t;var t},highlightElement:b,highlightBlock:function(e){return K("10.7.0","highlightBlock will be removed entirely in v12.0"),K("10.7.0","Please use highlightElement now."),b(e)},configure:function(e){e.useBR&&(K("10.3.0","'useBR' will be removed entirely in v11.0"),K("10.3.0","Please see path_to_url")),h=Q(h,e)},initHighlighting:_,initHighlightingOnLoad:function(){K("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),x=!0},registerLanguage:function(n,r){let i=null;try{i=r(e)}catch(e){if(X("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw e;X(e),i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&k(i.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:A,registerAliases:k,requireLanguage:function(e){K("10.4.0","requireLanguage will be removed entirely in v11."),K("10.4.0","Please see path_to_url");const t=A(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:T,inherit:Q,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),o.push(e)},vuePlugin:H(e).VuePlugin}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="10.7.3";for(const e in I)"object"==typeof I[e]&&n(I[e]);return Object.assign(e,I),e.addPlugin(m),e.addPlugin($),e.addPlugin(y),e}({});e.exports=te},53802:(e,t,n)=>{"use strict";var r=n(92873);e.exports=function(e,t){for(var n,u,h,d,f,p,g,m,v,y,b,_,x=t||{},w=!1!==x.padding,A=!1!==x.delimiterStart,k=!1!==x.delimiterEnd,T=(x.align||[]).concat(),S=!1!==x.alignDelimiters,E=[],C=x.stringLength||l,M=-1,O=e.length,L=[],D=[],I=[],R=[],P=[],N=0;++M<O;){for(u=-1,I=[],R=[],(h=(n=e[M]).length)>N&&(N=h);++u<h;)p=null==(_=n[u])?"":String(_),!0===S&&(f=C(p),R[u]=f,(void 0===(d=P[u])||f>d)&&(P[u]=f)),I.push(p);L[M]=I,D[M]=R}if(u=-1,h=N,"object"==typeof T&&"length"in T)for(;++u<h;)E[u]=c(T[u]);else for(b=c(T);++u<h;)E[u]=b;for(u=-1,h=N,I=[],R=[];++u<h;)v="",y="",108===(b=E[u])?v=a:b===s?y=a:99===b&&(v=a,y=a),f=S?Math.max(1,P[u]-v.length-y.length):1,p=v+r("-",f)+y,!0===S&&((f=v.length+f+y.length)>P[u]&&(P[u]=f),R[u]=f),I[u]=p;for(L.splice(1,0,I),D.splice(1,0,R),M=-1,O=L.length,g=[];++M<O;){for(I=L[M],R=D[M],u=-1,h=N,m=[];++u<h;)p=I[u]||"",v="",y="",!0===S&&(f=P[u]-(R[u]||0),(b=E[u])===s?v=r(o,f):99===b?f%2==0?y=v=r(o,f/2):(v=r(o,f/2+.5),y=r(o,f/2-.5)):y=r(o,f)),!0===A&&0===u&&m.push("|"),!0!==w||!1===S&&""===p||!0!==A&&0===u||m.push(o),!0===S&&m.push(v),m.push(p),!0===S&&m.push(y),!0===w&&m.push(o),!0!==k&&u===h-1||m.push("|");m=m.join(""),!1===k&&(m=m.replace(i,"")),g.push(m)}return g.join("\n")};var i=/ +$/,o=" ",a=":",s=114;function l(e){return e.length}function c(e){var t="string"==typeof e?e.charCodeAt(0):0;return 76===t||108===t?108:82===t||t===s?s:67===t||99===t?99:0}},89085:(e,t,n)=>{var r=n(34543);e.exports=function(){return function(e){return r(e,"list",(function(e,t){var n,r,i=0;for(n=0,r=t.length;n<r;n++)"list"===t[n].type&&(i+=1);for(n=0,r=e.children.length;n<r;n++){var o=e.children[n];o.index=n,o.ordered=e.ordered}e.depth=i})),e}}},76702:(e,t,n)=>{"use strict";e.exports=function(e,t,n,r){var i,o;return"string"==typeof t||t&&"function"==typeof t.exec?o=[[t,n]]:(o=t,r=n),s(e,i=r||{},function e(t){var n=t[0];return function(r,o){var l,c,u,h,d=n[0],f=n[1],p=[],g=0,m=o.children.indexOf(r);for(d.lastIndex=0,c=d.exec(r.value);c&&(l=c.index,!1!==(h=f.apply(null,[].concat(c,{index:c.index,input:c.input})))&&(g!==l&&p.push({type:"text",value:r.value.slice(g,l)}),"string"==typeof h&&h.length>0&&(h={type:"text",value:h}),h&&(p=[].concat(p,h)),g=l+c[0].length),d.global);)c=d.exec(r.value);if(void 0===l?(p=[r],m--):(g<r.value.length&&p.push({type:"text",value:r.value.slice(g)}),p.unshift(m,1),a.apply(o.children,p)),t.length>1)for(u=e(t.slice(1)),l=-1;++l<p.length;)"text"===(r=p[l]).type?u(r,o):s(r,i,u);return m+p.length+1}}(function(e){var t,n,r=[];if("object"!=typeof e)throw new Error("Expected array or object as schema");if("length"in e)for(n=-1;++n<e.length;)r.push([l(e[n][0]),c(e[n][1])]);else for(t in e)r.push([l(t),c(e[t])]);return r}(o))),e};var r=n(38265),i=n(10603),o=n(99839),a=[].splice;function s(e,t,n){var o=i(t.ignore||[]);return r(e,"text",(function(e,t){for(var r,i,a=-1;++a<t.length;){if(r=t[a],o(r,i?i.children.indexOf(r):void 0,i))return;i=r}return n(e,i)})),[]}function l(e){return"string"==typeof e?new RegExp(o(e),"g"):e}function c(e){return"function"==typeof e?e:function(){return e}}},99839:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},23069:e=>{e.exports=function(e){return e}},38265:(e,t,n)=>{"use strict";e.exports=s;var r=n(10603),i=n(23069),o="skip",a=!1;function s(e,t,n,s){var l,c;"function"==typeof t&&"function"!=typeof n&&(s=n,n=t,t=null),c=r(t),l=s?-1:1,function e(r,u,h){var d,f="object"==typeof r&&null!==r?r:{};return"string"==typeof f.type&&(d="string"==typeof f.tagName?f.tagName:"string"==typeof f.name?f.name:void 0,p.displayName="node ("+i(f.type+(d?"<"+d+">":""))+")"),p;function p(){var i,d,f=h.concat(r),p=[];if((!t||c(r,u,h[h.length-1]||null))&&(p=function(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[true,e]:[e]}(n(r,h)),p[0]===a))return p;if(r.children&&p[0]!==o)for(d=(s?r.children.length:-1)+l;d>-1&&d<r.children.length;){if((i=e(r.children[d],d,f)())[0]===a)return i;d="number"==typeof i[1]?i[1]:d+l}return p}}(e,null,[])()}s.CONTINUE=!0,s.SKIP=o,s.EXIT=a},63171:(e,t,n)=>{"use strict";e.exports=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){var t=e||{},n=function(e,t){for(var n=-1;++n<t.length;)f(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:m(O),autolinkProtocol:w,autolinkEmail:w,atxHeading:m(E),blockQuote:m((function(){return{type:"blockquote",children:[]}})),characterEscape:w,characterReference:w,codeFenced:m(S),codeFencedFenceInfo:v,codeFencedFenceMeta:v,codeIndented:m(S,v),codeText:m((function(){return{type:"inlineCode",value:""}}),v),codeTextData:w,data:w,codeFlowValue:w,definition:m((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:v,definitionLabelString:v,definitionTitleString:v,emphasis:m((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:m(C),hardBreakTrailing:m(C),htmlFlow:m(M,v),htmlFlowData:w,htmlText:m(M,v),htmlTextData:w,image:m((function(){return{type:"image",title:null,url:"",alt:null}})),label:v,link:m(O),listItem:m((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){p("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),u("expectingFirstListItemValue"))},listOrdered:m(L,(function(){u("expectingFirstListItemValue",!0)})),listUnordered:m(L),paragraph:m((function(){return{type:"paragraph",children:[]}})),reference:function(){u("referenceType","collapsed")},referenceString:v,resourceDestinationString:v,resourceTitleString:v,setextHeading:m(E),strong:m((function(){return{type:"strong",children:[]}})),thematicBreak:m((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:b(),atxHeadingSequence:function(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)},autolink:b(),autolinkEmail:function(e){A.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){A.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:b(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:T,characterReferenceMarkerNumeric:T,characterReferenceValue:function(e){var t,n,r=this.sliceSerialize(e),i=p("characterReferenceType");i?(t=s(r,"characterReferenceMarkerNumeric"===i?10:16),u("characterReferenceType")):t=h(r),(n=this.stack.pop()).value+=t,n.position.end=g(e.end)},codeFenced:b((function(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u("flowCodeInside")})),codeFencedFence:function(){p("flowCodeInside")||(this.buffer(),u("flowCodeInside",!0))},codeFencedFenceInfo:function(){var e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){var e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:A,codeIndented:b((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),codeText:b((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:A,data:A,definition:b(),definitionDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=a(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:b(),hardBreakEscape:b(k),hardBreakTrailing:b(k),htmlFlow:b((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:A,htmlText:b((function(){var e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:A,image:b((function(){var e=this.stack[this.stack.length-1];p("inReference")?(e.type+="Reference",e.referenceType=p("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),u("referenceType")})),label:function(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,u("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t},labelText:function(e){this.stack[this.stack.length-2].identifier=a(this.sliceSerialize(e)).toLowerCase()},lineEnding:function(e){var t=this.stack[this.stack.length-1];if(p("atHardBreak"))return t.children[t.children.length-1].position.end=g(e.end),void u("atHardBreak");!p("setextHeadingSlurpLineEnding")&&n.canContainEols.indexOf(t.type)>-1&&(w.call(this,e),A.call(this,e))},link:b((function(){var e=this.stack[this.stack.length-1];p("inReference")?(e.type+="Reference",e.referenceType=p("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),u("referenceType")})),listItem:b(),listOrdered:b(),listUnordered:b(),paragraph:b(),referenceString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=a(this.sliceSerialize(e)).toLowerCase(),u("referenceType","full")},resourceDestinationString:function(){var e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){var e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){u("inReference")},setextHeading:b((function(){u("setextHeadingSlurpLineEnding")})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){u("setextHeadingSlurpLineEnding",!0)},strong:b(),thematicBreak:b()}},t.mdastExtensions||[]),l={};return function(e){for(var t,r={type:"root",children:[]},a=[],s=[],l=-1,h={stack:[r],tokenStack:a,config:n,enter:y,exit:_,buffer:v,resume:x,setData:u,getData:p};++l<e.length;)"listOrdered"!==e[l][1].type&&"listUnordered"!==e[l][1].type||("enter"===e[l][0]?s.push(l):l=c(e,s.pop(l),l));for(l=-1;++l<e.length;)t=n[e[l][0]],o.call(t,e[l][1].type)&&t[e[l][1].type].call(i({sliceSerialize:e[l][2].sliceSerialize},h),e[l][1]);if(a.length)throw new Error("Cannot close document, a token (`"+a[a.length-1].type+"`, "+d({start:a[a.length-1].start,end:a[a.length-1].end})+") is still open");for(r.position={start:g(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:g(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<n.transforms.length;)r=n.transforms[l](r)||r;return r};function c(e,t,n){for(var r,i,o,a,s,l,c,u=t-1,h=-1,d=!1;++u<=n;)if("listUnordered"===(s=e[u])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?h++:h--,c=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(!r||c||h||l||(l=u),c=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(c=void 0),!h&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===h&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(i=u,o=void 0;i--;)if("lineEnding"===(a=e[i])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;o&&(e[o][1].type="lineEndingBlank",d=!0),a[1].type="lineEnding",o=i}else if("linePrefix"!==a[1].type&&"blockQuotePrefix"!==a[1].type&&"blockQuotePrefixWhitespace"!==a[1].type&&"blockQuoteMarker"!==a[1].type&&"listItemIndent"!==a[1].type)break;l&&(!o||l<o)&&(r._spread=!0),r.end=g(o?e[o][1].start:s[1].end),e.splice(o||u,0,["exit",r,s[2]]),u++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:g(s[1].start)},e.splice(u,0,["enter",r,s[2]]),u++,n++,l=void 0,c=!0)}return e[t][1]._spread=d,n}function u(e,t){l[e]=t}function p(e){return l[e]}function g(e){return{line:e.line,column:e.column,offset:e.offset}}function m(e,t){return function(n){y.call(this,e(n),n),t&&t.call(this,n)}}function v(){this.stack.push({type:"fragment",children:[]})}function y(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:g(t.start)},e}function b(e){return function(t){e&&e.call(this,t),_.call(this,t)}}function _(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): its not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+d({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+d({start:n.start,end:n.end})+") is open");return t.position.end=g(e.end),t}function x(){return r(this.stack.pop())}function w(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:g(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function A(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=g(e.end)}function k(){u("atHardBreak",!0)}function T(e){u("characterReferenceType",e.type)}function S(){return{type:"code",lang:null,meta:null,value:""}}function E(){return{type:"heading",depth:void 0,children:[]}}function C(){return{type:"break"}}function M(){return{type:"html",value:""}}function O(){return{type:"link",title:null,url:"",children:[]}}function L(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(u(l(n).document().write(c()(e,t,!0))))};var r=n(84036),i=n(7050),o=n(67657),a=n(10425),s=n(56129),l=n(14498),c=n(16142),u=n(33220),h=n(93417),d=n(69565);function f(e,t){var n,r;for(n in t)r=o.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}},42101:(e,t,n)=>{"use strict";e.exports=n(63171)},24982:(e,t,n)=>{var r=n(99694),i=n(76702),o=n(86026),a=n(56437);function s(e){this.config.enter.autolinkProtocol.call(this,e)}function l(e,t,n,i,o){var a,s,l="";return!!u(o)&&(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!!function(e){var t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n)&&!!(a=function(e){var t,n,i,o=/[!"&'),.:;<>?\]}]+$/.exec(e);if(o)for(e=e.slice(0,o.index),t=(o=o[0]).indexOf(")"),n=r(e,"("),i=r(e,")");-1!==t&&n>i;)e+=o.slice(0,t+1),t=(o=o.slice(t+1)).indexOf(")"),i++;return[e,o]}(n+i))[0]&&(s={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]},a[1]&&(s=[s,{type:"text",value:a[1]}]),s))}function c(e,t,n,r){return!(!u(r,!0)||/[_-]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function u(e,t){var n=e.input.charCodeAt(e.index-1);return(n!=n||a(n)||o(n))&&(!t||47!==n)}t.transforms=[function(e){i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/i,l],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/,c]],{ignore:["link","linkReference"]})}],t.enter={literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:s,literalAutolinkHttp:s,literalAutolinkWww:s},t.exit={literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},31563:(e,t)=>{var n="phrasing",r=["autolink","link","image","label"];t.unsafe=[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:n,notInConstruct:r},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:n,notInConstruct:r},{character:":",before:"[ps]",after:"\\/",inConstruct:n,notInConstruct:r}]},23767:(e,t)=>{t.canContainEols=["delete"],t.enter={strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},t.exit={strikethrough:function(e){this.exit(e)}}},86582:(e,t,n)=>{var r=n(52956);function i(e,t,n){var i=n.enter("emphasis"),o=r(e,n,{before:"~",after:"~"});return i(),"~~"+o+"~~"}t.unsafe=[{character:"~",inConstruct:"phrasing"}],t.handlers={delete:i},i.peek=function(){return"~"}},995:(e,t)=>{function n(e){this.exit(e)}function r(e){this.enter({type:"tableCell",children:[]},e)}function i(e,t){return"|"===t?t:e}t.enter={table:function(e){this.enter({type:"table",align:e._align,children:[]},e),this.setData("inTable",!0)},tableData:r,tableHeader:r,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},t.exit={codeText:function(e){var t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,i)),this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:n,tableHeader:n,tableRow:n}},99426:(e,t,n)=>{var r=n(52956),i=n(32582),o=n(53802);e.exports=function(e){var t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,n){return u(function(e,t){for(var n=e.children,r=-1,i=n.length,o=[],a=t.enter("table");++r<i;)o[r]=h(n[r],t);return a(),o}(e,n),e.align)},tableRow:function(e,t,n){var r=u([h(e,n)]);return r.slice(0,r.indexOf("\n"))},tableCell:c,inlineCode:function(e,t,n){var r=i(e,t,n);return-1!==n.stack.indexOf("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r}}};function c(e,t,n){var i=n.enter("tableCell"),o=r(e,n,{before:l,after:l});return i(),o}function u(e,t){return o(e,{align:t,alignDelimiters:a,padding:n,stringLength:s})}function h(e,t){for(var n=e.children,r=-1,i=n.length,o=[],a=t.enter("tableRow");++r<i;)o[r]=c(n[r],0,t);return a(),o}}},47729:(e,t)=>{function n(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}t.exit={taskListCheckValueChecked:n,taskListCheckValueUnchecked:n,paragraph:function(e){var t,n=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],i=n.children,o=r.children[0],a=-1;if(n&&"listItem"===n.type&&"boolean"==typeof n.checked&&o&&"text"===o.type){for(;++a<i.length;)if("paragraph"===i[a].type){t=i[a];break}t===r&&(o.value=o.value.slice(1),0===o.value.length?r.children.shift():(o.position.start.column++,o.position.start.offset++,r.position.start=Object.assign({},o.position.start)))}this.exit(e)}}},60096:(e,t,n)=>{var r=n(27599);t.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}],t.handlers={listItem:function(e,t,n){var i=r(e,t,n),o=e.children[0];return"boolean"==typeof e.checked&&o&&"paragraph"===o.type&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "}))),i}}},19997:(e,t,n)=>{var r=n(24982),i=n(23767),o=n(995),a=n(47729),s={}.hasOwnProperty;function l(e,t){var n,r,i;for(n in t)r=s.call(e,n)?e[n]:e[n]={},i=t[n],"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,i):Object.assign(r,i)}e.exports=function(e){for(var t={transforms:[],canContainEols:[]},n=e.length,r=-1;++r<n;)l(t,e[r]);return t}([r,i,o,a])},43303:(e,t,n)=>{var r=n(31563),i=n(86582),o=n(99426),a=n(60096),s=n(44873);e.exports=function(e){var t=s({handlers:{},join:[],unsafe:[],options:{}},{extensions:[r,i,o(e),a]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}},44873:e=>{e.exports=function e(t,n){var r,i=-1;if(n.extensions)for(;++i<n.extensions.length;)e(t,n.extensions[i]);for(r in n)"extensions"===r||("unsafe"===r||"join"===r?t[r]=t[r].concat(n[r]||[]):"handlers"===r?t[r]=Object.assign(t[r],n[r]||{}):t.options[r]=n[r]);return t}},32582:(e,t,n)=>{e.exports=i,i.peek=function(){return"`"};var r=n(72629);function i(e,t,n){for(var i,o,a,s,l=e.value||"",c="`",u=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(l);)c+="`";for(/[^ \r\n]/.test(l)&&(/[ \r\n`]/.test(l.charAt(0))||/[ \r\n`]/.test(l.charAt(l.length-1)))&&(l=" "+l+" ");++u<n.unsafe.length;)if((i=n.unsafe[u]).atBreak)for(o=r(i);a=o.exec(l);)s=a.index,10===l.charCodeAt(s)&&13===l.charCodeAt(s-1)&&s--,l=l.slice(0,s)+" "+l.slice(a.index+1);return c+l+c}},27599:(e,t,n)=>{e.exports=function(e,t,n){var l,c,u,h=i(n),d=o(n);return t&&t.ordered&&(h=(t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+"."),l=h.length+1,("tab"===d||"mixed"===d&&(t&&t.spread||e.spread))&&(l=4*Math.ceil(l/4)),u=n.enter("listItem"),c=s(a(e,n),(function(e,t,n){return t?(n?"":r(" ",l))+e:(n?h:h+r(" ",l-h.length))+e})),u(),c};var r=n(92873),i=n(37050),o=n(72946),a=n(81969),s=n(1534)},37050:e=>{e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},72946:e=>{e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},81969:(e,t,n)=>{e.exports=function(e,t){for(var n,i=e.children||[],o=[],a=-1;++a<i.length;)n=i[a],o.push(t.handle(n,e,t,{before:"\n",after:"\n"})),a+1<i.length&&o.push(s(n,i[a+1]));return o.join("");function s(n,i){for(var o,a=-1;++a<t.join.length&&!0!==(o=t.join[a](n,i,e,t))&&1!==o;){if("number"==typeof o)return r("\n",1+Number(o));if(!1===o)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}};var r=n(92873)},52956:e=>{e.exports=function(e,t,n){for(var r,i,o,a=e.children||[],s=[],l=-1,c=n.before;++l<a.length;)o=a[l],l+1<a.length?((i=t.handle.handlers[a[l+1].type])&&i.peek&&(i=i.peek),r=i?i(a[l+1],e,t,{before:"",after:""}).charAt(0):""):r=n.after,s.length>0&&("\r"===c||"\n"===c)&&"html"===o.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),c=" "),s.push(t.handle(o,e,t,{before:c,after:r})),c=s[s.length-1].slice(-1);return s.join("")}},1534:e=>{e.exports=function(e,n){for(var r,i=[],o=0,a=0;r=t.exec(e);)s(e.slice(o,r.index)),i.push(r[0]),o=r.index+r[0].length,a++;return s(e.slice(o)),i.join("");function s(e){i.push(n(e,a,!e))}};var t=/\r?\n|\r/g},72629:e=>{e.exports=function(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}},84036:e=>{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&n(e.children)||"length"in e&&n(e))||""}function n(e){for(var n=[],r=-1;++r<e.length;)n[r]=t(e[r]);return n.join("")}e.exports=t},31521:(e,t,n)=>{e.exports=n(72135)},72135:(e,t,n)=>{var r=n(7075),i=n(71014),o=n(52228),a=n(84783),s=n(86026),l=n(56437),c={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 87===t||t-32==87?(e.consume(t),i):n(t)}function i(t){return 87===t||t-32==87?(e.consume(t),o):n(t)}function o(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||a(e)?n(e):t(e)}},partial:!0},u={tokenize:function(e,t,n){var r,i;return a;function a(t){return 38===t?e.check(f,u,c)(t):46===t||95===t?e.check(d,u,c)(t):o(t)||l(t)||45!==t&&s(t)?u(t):(e.consume(t),a)}function c(t){return 46===t?(i=r,r=void 0,e.consume(t),a):(95===t&&(r=!0),e.consume(t),a)}function u(e){return i||r?n(e):t(e)}},partial:!0},h={tokenize:function(e,t){var n=0;return r;function r(a){return 38===a?e.check(f,t,i)(a):(40===a&&n++,41===a?e.check(d,o,i)(a):_(a)?t(a):b(a)?e.check(d,t,i)(a):(e.consume(a),r))}function i(t){return e.consume(t),r}function o(e){return--n<0?t(e):i(e)}},partial:!0},d={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(i){return b(i)?(e.consume(i),r):_(i)?t(i):n(i)}},partial:!0},f={tokenize:function(e,t,n){return function(t){return e.consume(t),i};function i(t){return r(t)?(e.consume(t),i):59===t?(e.consume(t),o):n(t)}function o(e){return _(e)?t(e):n(e)}},partial:!0},p={tokenize:function(e,t,n){var r=this;return function(t){return 87!==t&&t-32!=87||!w(r.previous)||T(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(c,e.attempt(u,e.attempt(h,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:w},g={tokenize:function(e,t,n){var r=this;return function(t){return 72!==t&&t-32!=72||!A(r.previous)||T(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i)};function i(t){return 84===t||t-32==84?(e.consume(t),a):n(t)}function a(t){return 84===t||t-32==84?(e.consume(t),c):n(t)}function c(t){return 80===t||t-32==80?(e.consume(t),d):n(t)}function d(t){return 83===t||t-32==83?(e.consume(t),f):f(t)}function f(t){return 58===t?(e.consume(t),p):n(t)}function p(t){return 47===t?(e.consume(t),g):n(t)}function g(t){return 47===t?(e.consume(t),m):n(t)}function m(t){return o(t)||l(t)||s(t)?n(t):e.attempt(u,e.attempt(h,v),n)(t)}function v(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:A},m={tokenize:function(e,t,n){var r,o=this;return function(t){return x(t)&&k(o.previous)&&!T(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):n(t)};function a(t){return x(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(d,h,l)(t):45===t||95===t?e.check(d,n,c)(t):i(t)?(e.consume(t),s):h(t)}function l(t){return e.consume(t),r=!0,s}function c(t){return e.consume(t),u}function u(t){return 46===t?e.check(d,n,l)(t):s(t)}function h(i){return r?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:k},v={};t.text=v;for(var y=48;y<123;)v[y]=m,58==++y?y=65:91===y&&(y=97);function b(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function _(e){return null===e||e<0||32===e||60===e}function x(e){return 43===e||45===e||46===e||95===e||i(e)}function w(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}function A(e){return null===e||!r(e)}function k(e){return 47!==e&&A(e)}function T(e){for(var t=e.length;t--;)if(("labelLink"===e[t][1].type||"labelImage"===e[t][1].type)&&!e[t][1]._balanced)return!0}v[43]=m,v[45]=m,v[46]=m,v[95]=m,v[72]=[m,g],v[104]=[m,g],v[87]=[m,p],v[119]=[m,p]},91888:(e,t,n)=>{e.exports=function(e){var t=(e||{}).singleTilde,n={tokenize:function(e,n,i){var o=this.previous,a=this.events,s=0;return function(t){return 126!==t||126===o&&"characterEscape"!==a[a.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),l(t))};function l(a){var c,u,h=r(o);return 126===a?s>1?i(a):(e.consume(a),s++,l):s<2&&!t?i(a):(c=e.exit("strikethroughSequenceTemporary"),u=r(a),c._open=!u||2===u&&h,c._close=!h||2===h&&u,n(a))}},resolveAll:function(e,t){for(var n,r,s,l,c=-1;++c<e.length;)if("enter"===e[c][0]&&"strikethroughSequenceTemporary"===e[c][1].type&&e[c][1]._close)for(s=c;s--;)if("exit"===e[s][0]&&"strikethroughSequenceTemporary"===e[s][1].type&&e[s][1]._open&&e[c][1].end.offset-e[c][1].start.offset==e[s][1].end.offset-e[s][1].start.offset){e[c][1].type="strikethroughSequence",e[s][1].type="strikethroughSequence",n={type:"strikethrough",start:a(e[s][1].start),end:a(e[c][1].end)},r={type:"strikethroughText",start:a(e[s][1].end),end:a(e[c][1].start)},l=[["enter",n,t],["enter",e[s][1],t],["exit",e[s][1],t],["enter",r,t]],i(l,l.length,0,o(t.parser.constructs.insideSpan.null,e.slice(s+1,c),t)),i(l,l.length,0,[["exit",r,t],["enter",e[c][1],t],["exit",e[c][1],t],["exit",n,t]]),i(e,s-1,c-s+3,l),c=s+l.length-2;break}return function(e){for(var t=-1,n=e.length;++t<n;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}(e)}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:n}}};var r=n(58499),i=n(22211),o=n(64464),a=n(34831)},88699:(e,t,n)=>{e.exports=n(96844)},96844:(e,t,n)=>{t.flow={null:{tokenize:function(e,t,n){var a,s,l=[],c=0;return function(t){return null===t||-5===t||-4===t||-3===t?n(t):(e.enter("table")._align=l,e.enter("tableHead"),e.enter("tableRow"),124===t?u(t):(c++,e.enter("temporaryTableCellContent"),f(t)))};function u(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,h}function h(t){return null===t||-5===t||-4===t||-3===t?function(t){return null===t?n(t):(e.exit("tableRow"),e.exit("tableHead"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.check(i,n,r(e,g,"linePrefix",4)))}(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),d):(a&&(a=void 0,c++),124===t?u(t):(e.enter("temporaryTableCellContent"),f(t)))}function d(t){return-2===t||-1===t||32===t?(e.consume(t),d):(e.exit("whitespace"),h(t))}function f(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),h(t)):(e.consume(t),92===t?p:f)}function p(t){return 92===t||124===t?(e.consume(t),f):f(t)}function g(t){return null===t||t<0||32===t?n(t):(e.enter("tableDelimiterRow"),m(t))}function m(t){return null===t||-5===t||-4===t||-3===t?x(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,l.push(null),y):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l.push("left"),b):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):n(t)}function v(t){return-2===t||-1===t||32===t?(e.consume(t),v):(e.exit("whitespace"),m(t))}function y(t){return 45===t?(e.consume(t),y):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),l[l.length-1]="left"===l[l.length-1]?"center":"right",_):m(t))}function b(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),s=!0,y):n(t)}function _(t){return null===t||-5===t||-4===t||-3===t?x(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),v):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),m):n(t)}function x(t){return e.exit("tableDelimiterRow"),s&&c===l.length?null===t?w(t):e.check(o,w,A)(t):n(t)}function w(n){return e.exit("table"),t(n)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r(e,k,"linePrefix",4)}function k(t){return e.enter("tableBody"),T(t)}function T(t){return e.enter("tableRow"),124===t?S(t):(e.enter("temporaryTableCellContent"),M(t))}function S(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||-5===t||-4===t||-3===t?function(t){return e.exit("tableRow"),null===t?L(t):e.check(o,L,D)(t)}(t):-2===t||-1===t||32===t?(e.enter("whitespace"),e.consume(t),C):124===t?S(t):(e.enter("temporaryTableCellContent"),M(t))}function C(t){return-2===t||-1===t||32===t?(e.consume(t),C):(e.exit("whitespace"),E(t))}function M(t){return null===t||t<0||32===t||124===t?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?O:M)}function O(t){return 92===t||124===t?(e.consume(t),M):M(t)}function L(t){return e.exit("tableBody"),w(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r(e,T,"linePrefix",4)}},resolve:function(e,t){for(var n,r,i,o,a,s,l,c,u,h,d=e.length,f=-1;++f<d;)n=e[f][1],o&&("temporaryTableCellContent"===n.type&&(c=c||f,u=f),"tableCellDivider"!==n.type&&"tableRow"!==n.type||!u||(l={type:"chunkText",start:(s={type:"tableContent",start:e[c][1].start,end:e[u][1].end}).start,end:s.end,contentType:"text"},e.splice(c,u-c+1,["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]),f-=u-c-3,d=e.length,c=void 0,u=void 0)),"exit"===e[f][0]&&h&&h+1<f&&("tableCellDivider"===n.type||"tableRow"===n.type&&(h+3<f||"whitespace"!==e[h][1].type))&&(a={type:i?"tableDelimiter":r?"tableHeader":"tableData",start:e[h][1].start,end:e[f][1].end},e.splice(f+("tableCellDivider"===n.type?1:0),0,["exit",a,t]),e.splice(h,0,["enter",a,t]),f+=2,d=e.length,h=f+1),"tableRow"===n.type&&(o="enter"===e[f][0])&&(h=f+1),"tableDelimiterRow"===n.type&&(i="enter"===e[f][0])&&(h=f+1),"tableHead"===n.type&&(r="enter"===e[f][0]);return e},interruptible:!0}};var r=n(57301),i={tokenize:function(e,t,n){return function(t){return 45!==t?n(t):(e.enter("setextUnderline"),r(t))};function r(t){return 45===t?(e.consume(t),r):i(t)}function i(r){return-2===r||-1===r||32===r?(e.consume(r),i):null===r||-5===r||-4===r||-3===r?t(r):n(r)}},partial:!0},o={tokenize:function(e,t,n){var r=0;return function(t){return e.enter("check"),e.consume(t),i};function i(o){return-1===o||32===o?(e.consume(o),4==++r?t:i):null===o||o<0?t(o):n(o)}},partial:!0}},50437:(e,t,n)=>{e.exports=n(9052)},9052:(e,t,n)=>{var r=n(67920),i=n(57301),o=n(53355),a={tokenize:function(e,t,n){var r=this;return function(t){return 91===t&&null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return-2===t||32===t?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(r){return 93===r?(e.enter("taskListCheckMarker"),e.consume(r),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:s},t,n)):n(r)}}};function s(e,t,n){var a=this;return i(e,(function(e){return o(a.events,"whitespace")&&null!==e&&!r(e)?t(e):n(e)}),"whitespace")}t.text={91:a}},83773:(e,t,n)=>{e.exports=n(31073)},31073:(e,t,n)=>{var r=n(97783),i=n(31521),o=n(91888),a=n(88699),s=n(50437);e.exports=function(e){return r([i,o(e),a,s])}},7075:(e,t,n)=>{"use strict";var r=n(76769)(/[A-Za-z]/);e.exports=r},71014:(e,t,n)=>{"use strict";var r=n(76769)(/[\dA-Za-z]/);e.exports=r},74793:(e,t,n)=>{"use strict";var r=n(76769)(/[#-'*+\--9=?A-Z^-~]/);e.exports=r},52228:e=>{"use strict";e.exports=function(e){return e<32||127===e}},63347:(e,t,n)=>{"use strict";var r=n(76769)(/\d/);e.exports=r},32807:(e,t,n)=>{"use strict";var r=n(76769)(/[\dA-Fa-f]/);e.exports=r},8827:(e,t,n)=>{"use strict";var r=n(76769)(/[!-/:-@[-`{-~]/);e.exports=r},67920:e=>{"use strict";e.exports=function(e){return e<0||32===e}},84783:e=>{"use strict";e.exports=function(e){return e<-2}},53288:e=>{"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},86026:(e,t,n)=>{"use strict";var r=n(50189),i=n(76769)(r);e.exports=i},56437:(e,t,n)=>{"use strict";var r=n(76769)(/\s/);e.exports=r},7050:e=>{"use strict";var t=Object.assign;e.exports=t},21947:e=>{"use strict";var t=String.fromCharCode;e.exports=t},67657:e=>{"use strict";var t={}.hasOwnProperty;e.exports=t},95791:e=>{"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},37845:e=>{"use strict";e.exports=["pre","script","style","textarea"]},66609:e=>{"use strict";var t=[].splice;e.exports=t},50189:e=>{"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},85225:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82318),i=n(61229),o=n(60135),a=n(69881),s=n(22161),l=n(10901),c=n(78395),u=n(67938),h=n(88274),d=n(88236),f=n(89255),p=n(26058),g=n(60792),m=n(5262),v=n(76703),y=n(64221),b=n(18747),_=n(46361),x=n(74900),w=n(30302),A=n(89985),k={42:x,43:x,45:x,48:x,49:x,50:x,51:x,52:x,53:x,54:x,55:x,56:x,57:x,62:a},T={91:d},S={"-2":u,"-1":u,32:u},E={35:p,42:A,45:[w,A],60:g,61:w,95:A,96:c,126:c},C={38:l,92:s},M={"-5":_,"-4":_,"-3":_,33:y,38:l,42:i,60:[o,m],91:b,92:[f,s],93:v,95:i,96:h},O={null:[i,r.resolver]};t.contentInitial=T,t.disable={null:[]},t.document=k,t.flow=E,t.flowInitial=S,t.insideSpan=O,t.string=C,t.text=M},78700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84783),i=n(57301);t.tokenize=function(e){var t,n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,n,"linePrefix");e.consume(t)}),(function(t){return e.enter("paragraph"),o(t)}));return n;function o(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,a(n)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):r(t)?(e.consume(t),e.exit("chunkText"),o):(e.consume(t),a)}}},51187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84783),i=n(57301),o=n(47792),a={tokenize:function(e,t,n){return i(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},s={tokenize:function(e,t,n){return i(e,e.lazy(this.parser.constructs.flow,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=function(e){var t,n,i,l=this,c=[],u=0,h={tokenize:function(e,r){var i=0;return t={},u;function u(r){return i<c.length?(l.containerState=c[i][1],e.attempt(c[i][0].continuation,h,d)(r)):n.currentConstruct&&n.currentConstruct.concrete?(t.flowContinue=!0,g(r)):(l.interrupt=n.currentConstruct&&n.currentConstruct.interruptible,l.containerState={},e.attempt(a,p,g)(r))}function h(e){return i++,l.containerState._closeFlow?p(e):u(e)}function d(t){return n.currentConstruct&&n.currentConstruct.lazy?(l.containerState={},e.attempt(a,p,e.attempt(s,p,e.check(o,p,f)))(t)):p(t)}function f(e){return i=c.length,t.lazy=!0,t.flowContinue=!0,g(e)}function p(e){return t.flowEnd=!0,g(e)}function g(e){return t.continued=i,l.interrupt=l.containerState=void 0,r(e)}},partial:!0};return d;function d(t){return u<c.length?(l.containerState=c[u][1],e.attempt(c[u][0].continuation,f,p)(t)):p(t)}function f(e){return u++,d(e)}function p(r){return t&&t.flowContinue?m(r):(l.interrupt=n&&n.currentConstruct&&n.currentConstruct.interruptible,l.containerState={},e.attempt(a,g,m)(r))}function g(e){return c.push([l.currentConstruct,l.containerState]),l.containerState=void 0,p(e)}function m(t){return null===t?(_(0,!0),void e.consume(t)):(n=n||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),v(t))}function v(t){return null===t?(b(e.exit("chunkFlow")),m(t)):r(t)?(e.consume(t),b(e.exit("chunkFlow")),e.check(h,y)):(e.consume(t),v)}function y(e){return _(t.continued,t&&t.flowEnd),u=0,d(e)}function b(e){i&&(i.next=e),i=e,n.lazy=t&&t.lazy,n.defineSkip(e.start),n.write(l.sliceStream(e))}function _(t,r){var o=c.length;for(n&&r&&(n.write([null]),i=n=void 0);o-- >t;)l.containerState=c[o][1],c[o][0].exit.call(l,e);c.length=t}}},13752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95983),i=n(57301),o=n(47792);t.tokenize=function(e){var t=this,n=e.attempt(o,(function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)}),e.attempt(this.parser.constructs.flowInitial,a,i(e,e.attempt(this.parser.constructs.flow,a,e.attempt(r,a)),"linePrefix")));return n;function a(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},82318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7050),i=n(34831),o=l("text"),a=l("string"),s={resolveAll:c()};function l(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){var t=r[e],i=-1;if(null===e)return!0;if(t)for(;++i<t.length;)if(!t[i].previous||t[i].previous.call(n,n.previous))return!0}},resolveAll:c("text"===e?u:void 0)}}function c(e){return function(t,n){for(var r,i=-1;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function u(e,t){for(var n,o,a,s,l,c,u,h,d=-1;++d<=e.length;)if((d===e.length||"lineEnding"===e[d][1].type)&&"data"===e[d-1][1].type){for(o=e[d-1][1],s=(n=t.sliceStream(o)).length,l=-1,c=0,u=void 0;s--;)if("string"==typeof(a=n[s])){for(l=a.length;32===a.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===a)u=!0,c++;else if(-1!==a){s++;break}c&&(h={type:d===e.length||u||c<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-c,offset:o.end.offset-c,_index:o.start._index+s,_bufferIndex:s?l:o.start._bufferIndex+l},end:i(o.end)},o.end=i(h.start),o.start.offset===o.end.offset?r(o,h):(e.splice(d,0,["enter",h,t],["exit",h,t]),d+=2)),d++}return e}t.resolver=s,t.string=a,t.text=o},14498:(e,t,n)=>{"use strict";var r=n(78700),i=n(51187),o=n(13752),a=n(82318),s=n(97783),l=n(77897),c=n(57560),u=n(85225);e.exports=function(e){var t={defined:[],constructs:s([u].concat(c((e||{}).extensions))),content:n(r),document:n(i),flow:n(o),string:n(a.string),text:n(a.text)};return t;function n(e){return function(n){return l(t,e,n)}}}},33220:(e,t,n)=>{"use strict";var r=n(30227);e.exports=function(e){for(;!r(e););return e}},16142:e=>{"use strict";var t=/[\0\t\n\r]/g;e.exports=function(){var e,n=!0,r=1,i="";return function(o,a,s){var l,c,u,h,d,f=[];for(o=i+o.toString(a),u=0,i="",n&&(65279===o.charCodeAt(0)&&u++,n=void 0);u<o.length;){if(t.lastIndex=u,h=(l=t.exec(o))?l.index:o.length,d=o.charCodeAt(h),!l){i=o.slice(u);break}if(10===d&&u===h&&e)f.push(-3),e=void 0;else if(e&&(f.push(-5),e=void 0),u<h&&(f.push(o.slice(u,h)),r+=h-u),0===d)f.push(65533),r++;else if(9===d)for(c=4*Math.ceil(r/4),f.push(-2);r++<c;)f.push(-1);else 10===d?(f.push(-4),r=1):(e=!0,r=1);u=h+1}return s&&(e&&f.push(-5),i&&f.push(i),f.push(null)),f}}},61229:(e,t,n)=>{"use strict";var r=n(7046),i=n(22211),o=n(58499),a=n(53545),s=n(64464),l=n(34831),c={name:"attention",tokenize:function(e,t){var n,r=o(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(a){var s,l,c,u;return a===n?(e.consume(a),i):(s=e.exit("attentionSequence"),c=!(l=o(a))||2===l&&r,u=!r||2===r&&l,s._open=42===n?c:c&&(r||!u),s._close=42===n?u:u&&(l||!c),t(a))}},resolveAll:function(e,t){for(var n,o,c,u,h,d,f,p,g=-1;++g<e.length;)if("enter"===e[g][0]&&"attentionSequence"===e[g][1].type&&e[g][1]._close)for(n=g;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[g][1]).charCodeAt(0)){if((e[n][1]._close||e[g][1]._open)&&(e[g][1].end.offset-e[g][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[g][1].end.offset-e[g][1].start.offset)%3))continue;u={type:(d=e[n][1].end.offset-e[n][1].start.offset>1&&e[g][1].end.offset-e[g][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:a(l(e[n][1].end),-d),end:l(e[n][1].end)},h={type:d>1?"strongSequence":"emphasisSequence",start:l(e[g][1].start),end:a(l(e[g][1].start),d)},c={type:d>1?"strongText":"emphasisText",start:l(e[n][1].end),end:l(e[g][1].start)},o={type:d>1?"strong":"emphasis",start:l(u.start),end:l(h.end)},e[n][1].end=l(u.start),e[g][1].start=l(h.end),f=[],e[n][1].end.offset-e[n][1].start.offset&&(f=r(f,[["enter",e[n][1],t],["exit",e[n][1],t]])),f=r(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",c,t]]),f=r(f,s(t.parser.constructs.insideSpan.null,e.slice(n+1,g),t)),f=r(f,[["exit",c,t],["enter",h,t],["exit",h,t],["exit",o,t]]),e[g][1].end.offset-e[g][1].start.offset?(p=2,f=r(f,[["enter",e[g][1],t],["exit",e[g][1],t]])):p=0,i(e,n-1,g-n+3,f),g=n+f.length-p-2;break}for(g=-1;++g<e.length;)"attentionSequence"===e[g][1].type&&(e[g][1].type="data");return e}};e.exports=c},60135:(e,t,n)=>{"use strict";var r=n(7075),i=n(71014),o=n(74793),a=n(52228),s={name:"autolink",tokenize:function(e,t,n){var s=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return r(t)?(e.consume(t),c):o(t)?d(t):n(t)}function c(e){return 43===e||45===e||46===e||i(e)?u(e):d(e)}function u(t){return 58===t?(e.consume(t),h):(43===t||45===t||46===t||i(t))&&s++<32?(e.consume(t),u):d(t)}function h(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||a(t)?n(t):(e.consume(t),h)}function d(t){return 64===t?(e.consume(t),s=0,f):o(t)?(e.consume(t),d):n(t)}function f(e){return i(e)?p(e):n(e)}function p(t){return 46===t?(e.consume(t),s=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):g(t)}function g(t){return(45===t||i(t))&&s++<63?(e.consume(t),45===t?g:p):n(t)}function m(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}};e.exports=s},69881:(e,t,n)=>{"use strict";var r=n(53288),i=n(57301),o={name:"blockQuote",tokenize:function(e,t,n){var i=this;return function(t){return 62===t?(i.containerState.open||(e.enter("blockQuote",{_container:!0}),i.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o):n(t)};function o(n){return r(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return i(e,e.attempt(o,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=o},22161:(e,t,n)=>{"use strict";var r=n(8827),i={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return r(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}};e.exports=i},10901:(e,t,n)=>{"use strict";var r=n(93417),i=n(71014),o=n(63347),a=n(32807);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(r),c={name:"characterReference",tokenize:function(e,t,n){var r,s,c=this,u=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),h};function h(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),r=31,s=i,f(t))}function d(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,s=a,f):(e.enter("characterReferenceValue"),r=7,s=o,f(t))}function f(o){var a;return 59===o&&u?(a=e.exit("characterReferenceValue"),s!==i||l.default(c.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)):s(o)&&u++<r?(e.consume(o),f):n(o)}}};e.exports=c},78395:(e,t,n)=>{"use strict";var r=n(84783),i=n(67920),o=n(53355),a=n(57301),s={name:"codeFenced",tokenize:function(e,t,n){var s,l=this,c={tokenize:function(e,t,n){var i=0;return a(e,(function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)}),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function o(t){return t===s?(e.consume(t),i++,o):i<h?n(t):(e.exit("codeFencedFenceSequence"),a(e,l,"whitespace")(t))}function l(i){return null===i||r(i)?(e.exit("codeFencedFence"),t(i)):n(i)}},partial:!0},u=o(this.events,"linePrefix"),h=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s=t,d(t)};function d(t){return t===s?(e.consume(t),h++,d):(e.exit("codeFencedFenceSequence"),h<3?n(t):a(e,f,"whitespace")(t))}function f(t){return null===t||r(t)?v(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||i(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),a(e,g,"whitespace")(t)):96===t&&t===s?n(t):(e.consume(t),p)}function g(t){return null===t||r(t)?v(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||r(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),v(t)):96===t&&t===s?n(t):(e.consume(t),m)}function v(n){return e.exit("codeFencedFence"),l.interrupt?t(n):y(n)}function y(t){return null===t?_(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(c,_,u?a(e,y,"linePrefix",u+1):y)):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||r(t)?(e.exit("codeFlowValue"),y(t)):(e.consume(t),b)}function _(n){return e.exit("codeFenced"),t(n)}},concrete:!0};e.exports=s},67938:(e,t,n)=>{"use strict";var r=n(84783),i=n(22211),o=n(53355),a=n(57301),s={name:"codeIndented",tokenize:function(e,t,n){return e.attempt(l,i,n);function i(n){return null===n?t(n):r(n)?e.attempt(l,i,t)(n):(e.enter("codeFlowValue"),o(n))}function o(t){return null===t||r(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),o)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return i(e,0,0,[["enter",n,t]]),i(e,e.length,0,[["exit",n,t]]),e}},l={tokenize:function(e,t,n){var i=this;return a(e,(function s(l){return r(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a(e,s,"linePrefix",5)):o(i.events,"linePrefix")<4?n(l):t(l)}),"linePrefix",5)},partial:!0};e.exports=s},88274:(e,t,n)=>{"use strict";var r=n(84783),i={name:"codeText",tokenize:function(e,t,n){var i,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),a++,s):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):96===t?(o=e.enter("codeTextSequence"),i=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||r(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),i++,u):i===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[i][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};e.exports=i},95983:(e,t,n)=>{"use strict";var r=n(84783),i=n(53355),o=n(30227),a=n(57301),s={tokenize:function(e,t){var n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?o(t):r(t)?e.check(l,a,o)(t):(e.consume(t),i)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n=n.next=e.enter("chunkContent",{contentType:"content",previous:n}),i}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0},l={tokenize:function(e,t,n){var o=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,s,"linePrefix")};function s(a){return null===a||r(a)?n(a):o.parser.constructs.disable.null.indexOf("codeIndented")>-1||i(o.events,"linePrefix")<4?e.interrupt(o.parser.constructs.flow,n,t)(a):t(a)}},partial:!0};e.exports=s},88236:(e,t,n)=>{"use strict";var r=n(84783),i=n(67920),o=n(10425),a=n(74680),s=n(84995),l=n(57301),c=n(16769),u=n(25759),h={name:"definition",tokenize:function(e,t,n){var i,u=this;return function(t){return e.enter("definition"),s.call(u,e,h,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function h(t){return i=o(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),c(e,a(e,e.attempt(d,l(e,f,"whitespace"),l(e,f,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function f(o){return null===o||r(o)?(e.exit("definition"),u.parser.defined.indexOf(i)<0&&u.parser.defined.push(i),t(o)):n(o)}}},d={tokenize:function(e,t,n){return function(t){return i(t)?c(e,o)(t):n(t)};function o(t){return 34===t||39===t||40===t?u(e,l(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function a(e){return null===e||r(e)?t(e):n(e)}},partial:!0};e.exports=h},74680:(e,t,n)=>{"use strict";var r=n(52228),i=n(67920),o=n(84783);e.exports=function(e,t,n,a,s,l,c,u,h){var d=h||1/0,f=0;return function(t){return 60===t?(e.enter(a),e.enter(s),e.enter(l),e.consume(t),e.exit(l),p):r(t)||41===t?n(t):(e.enter(a),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(t))};function p(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(n))}function g(t){return 62===t?(e.exit("chunkString"),e.exit(u),p(t)):null===t||60===t||o(t)?n(t):(e.consume(t),92===t?m:g)}function m(t){return 60===t||62===t||92===t?(e.consume(t),g):g(t)}function v(o){return 40===o?++f>d?n(o):(e.consume(o),v):41===o?f--?(e.consume(o),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):null===o||i(o)?f?n(o):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):r(o)?n(o):(e.consume(o),92===o?y:v)}function y(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}}},84995:(e,t,n)=>{"use strict";var r=n(84783),i=n(53288);e.exports=function(e,t,n,o,a,s){var l,c=this,u=0;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),e.enter(s),h};function h(i){return null===i||91===i||93===i&&!l||94===i&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?n(i):93===i?(e.exit(s),e.enter(a),e.consume(i),e.exit(a),e.exit(o),t):r(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(i))}function d(t){return null===t||91===t||93===t||r(t)||u++>999?(e.exit("chunkString"),h(t)):(e.consume(t),l=l||!i(t),92===t?f:d)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,d):d(t)}}},57301:(e,t,n)=>{"use strict";var r=n(53288);e.exports=function(e,t,n,i){var o=i?i-1:1/0,a=0;return function(i){return r(i)?(e.enter(n),s(i)):t(i)};function s(i){return r(i)&&a++<o?(e.consume(i),s):(e.exit(n),t(i))}}},25759:(e,t,n)=>{"use strict";var r=n(84783),i=n(57301);e.exports=function(e,t,n,o,a,s){var l;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,c};function c(n){return n===l?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?n(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return t===l||null===t||r(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?d:h)}function d(t){return t===l||92===t?(e.consume(t),h):h(t)}}},16769:(e,t,n)=>{"use strict";var r=n(84783),i=n(53288),o=n(57301);e.exports=function(e,t){var n;return function a(s){return r(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):i(s)?o(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}},89255:(e,t,n)=>{"use strict";var r=n(84783),i={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),i};function i(i){return r(i)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(i)):n(i)}}};e.exports=i},26058:(e,t,n)=>{"use strict";var r=n(84783),i=n(67920),o=n(53288),a=n(22211),s=n(57301),l={name:"headingAtx",tokenize:function(e,t,n){var a=this,l=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(r){return 35===r&&l++<6?(e.consume(r),c):null===r||i(r)?(e.exit("atxHeadingSequence"),a.interrupt?t(r):u(r)):n(r)}function u(n){return 35===n?(e.enter("atxHeadingSequence"),h(n)):null===n||r(n)?(e.exit("atxHeading"),t(n)):o(n)?s(e,u,"whitespace")(n):(e.enter("atxHeadingText"),d(n))}function h(t){return 35===t?(e.consume(t),h):(e.exit("atxHeadingSequence"),u(t))}function d(t){return null===t||35===t||i(t)?(e.exit("atxHeadingText"),u(t)):(e.consume(t),d)}},resolve:function(e,t){var n,r,i=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},a(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}};e.exports=l},60792:(e,t,n)=>{"use strict";var r=n(7075),i=n(71014),o=n(84783),a=n(67920),s=n(53288),l=n(21947),c=n(95791),u=n(37845),h=n(47792),d={name:"htmlFlow",tokenize:function(e,t,n){var h,d,p,g,m,v=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),y};function y(i){return 33===i?(e.consume(i),b):47===i?(e.consume(i),w):63===i?(e.consume(i),h=3,v.interrupt?t:V):r(i)?(e.consume(i),p=l(i),d=!0,A):n(i)}function b(i){return 45===i?(e.consume(i),h=2,_):91===i?(e.consume(i),h=5,p="CDATA[",g=0,x):r(i)?(e.consume(i),h=4,v.interrupt?t:V):n(i)}function _(r){return 45===r?(e.consume(r),v.interrupt?t:V):n(r)}function x(r){return r===p.charCodeAt(g++)?(e.consume(r),g===p.length?v.interrupt?t:P:x):n(r)}function w(t){return r(t)?(e.consume(t),p=l(t),A):n(t)}function A(r){return null===r||47===r||62===r||a(r)?47!==r&&d&&u.indexOf(p.toLowerCase())>-1?(h=1,v.interrupt?t(r):P(r)):c.indexOf(p.toLowerCase())>-1?(h=6,47===r?(e.consume(r),k):v.interrupt?t(r):P(r)):(h=7,v.interrupt?n(r):d?S(r):T(r)):45===r||i(r)?(e.consume(r),p+=l(r),A):n(r)}function k(r){return 62===r?(e.consume(r),v.interrupt?t:P):n(r)}function T(t){return s(t)?(e.consume(t),T):I(t)}function S(t){return 47===t?(e.consume(t),I):58===t||95===t||r(t)?(e.consume(t),E):s(t)?(e.consume(t),S):I(t)}function E(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),E):C(t)}function C(t){return 61===t?(e.consume(t),M):s(t)?(e.consume(t),C):S(t)}function M(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),m=t,O):s(t)?(e.consume(t),M):(m=void 0,L(t))}function O(t){return t===m?(e.consume(t),D):null===t||o(t)?n(t):(e.consume(t),O)}function L(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||a(t)?C(t):(e.consume(t),L)}function D(e){return 47===e||62===e||s(e)?S(e):n(e)}function I(t){return 62===t?(e.consume(t),R):n(t)}function R(t){return s(t)?(e.consume(t),R):null===t||o(t)?P(t):n(t)}function P(t){return 45===t&&2===h?(e.consume(t),F):60===t&&1===h?(e.consume(t),B):62===t&&4===h?(e.consume(t),q):63===t&&3===h?(e.consume(t),V):93===t&&5===h?(e.consume(t),U):!o(t)||6!==h&&7!==h?null===t||o(t)?N(t):(e.consume(t),P):e.check(f,q,N)(t)}function N(t){return e.exit("htmlFlowData"),z(t)}function z(t){return null===t?H(t):o(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),z):(e.enter("htmlFlowData"),P(t))}function F(t){return 45===t?(e.consume(t),V):P(t)}function B(t){return 47===t?(e.consume(t),p="",j):P(t)}function j(t){return 62===t&&u.indexOf(p.toLowerCase())>-1?(e.consume(t),q):r(t)&&p.length<8?(e.consume(t),p+=l(t),j):P(t)}function U(t){return 93===t?(e.consume(t),V):P(t)}function V(t){return 62===t?(e.consume(t),q):P(t)}function q(t){return null===t||o(t)?(e.exit("htmlFlowData"),H(t)):(e.consume(t),q)}function H(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){for(var t=e.length;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},f={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(h,t,n)}},partial:!0};e.exports=d},5262:(e,t,n)=>{"use strict";var r=n(7075),i=n(71014),o=n(84783),a=n(67920),s=n(53288),l=n(57301),c={name:"htmlText",tokenize:function(e,t,n){var c,u,h,d,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),p};function p(t){return 33===t?(e.consume(t),g):47===t?(e.consume(t),C):63===t?(e.consume(t),S):r(t)?(e.consume(t),L):n(t)}function g(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),u="CDATA[",h=0,x):r(t)?(e.consume(t),T):n(t)}function m(t){return 45===t?(e.consume(t),v):n(t)}function v(t){return null===t||62===t?n(t):45===t?(e.consume(t),y):b(t)}function y(e){return null===e||62===e?n(e):b(e)}function b(t){return null===t?n(t):45===t?(e.consume(t),_):o(t)?(d=b,B(t)):(e.consume(t),b)}function _(t){return 45===t?(e.consume(t),U):b(t)}function x(t){return t===u.charCodeAt(h++)?(e.consume(t),h===u.length?w:x):n(t)}function w(t){return null===t?n(t):93===t?(e.consume(t),A):o(t)?(d=w,B(t)):(e.consume(t),w)}function A(t){return 93===t?(e.consume(t),k):w(t)}function k(t){return 62===t?U(t):93===t?(e.consume(t),k):w(t)}function T(t){return null===t||62===t?U(t):o(t)?(d=T,B(t)):(e.consume(t),T)}function S(t){return null===t?n(t):63===t?(e.consume(t),E):o(t)?(d=S,B(t)):(e.consume(t),S)}function E(e){return 62===e?U(e):S(e)}function C(t){return r(t)?(e.consume(t),M):n(t)}function M(t){return 45===t||i(t)?(e.consume(t),M):O(t)}function O(t){return o(t)?(d=O,B(t)):s(t)?(e.consume(t),O):U(t)}function L(t){return 45===t||i(t)?(e.consume(t),L):47===t||62===t||a(t)?D(t):n(t)}function D(t){return 47===t?(e.consume(t),U):58===t||95===t||r(t)?(e.consume(t),I):o(t)?(d=D,B(t)):s(t)?(e.consume(t),D):U(t)}function I(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),I):R(t)}function R(t){return 61===t?(e.consume(t),P):o(t)?(d=R,B(t)):s(t)?(e.consume(t),R):D(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,N):o(t)?(d=P,B(t)):s(t)?(e.consume(t),P):(e.consume(t),c=void 0,F)}function N(t){return t===c?(e.consume(t),z):null===t?n(t):o(t)?(d=N,B(t)):(e.consume(t),N)}function z(e){return 62===e||47===e||a(e)?D(e):n(e)}function F(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||a(t)?D(t):(e.consume(t),F)}function B(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l(e,j,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function j(t){return e.enter("htmlTextData"),d(t)}function U(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}};e.exports=c},76703:(e,t,n)=>{"use strict";var r=n(67920),i=n(7046),o=n(22211),a=n(10425),s=n(64464),l=n(34831),c=n(74680),u=n(84995),h=n(25759),d=n(16769),f={name:"labelEnd",tokenize:function(e,t,n){for(var r,i,o=this,s=o.events.length;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){r=o.events[s][1];break}return function(t){return r?r._inactive?c(t):(i=o.parser.defined.indexOf(a(o.sliceSerialize({start:r.end,end:o.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(p,t,i?t:c)(n):91===n?e.attempt(g,t,i?e.attempt(m,t,c):c)(n):i?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){for(var n,r,a,c,u,h,d,f=e.length,p=0;f--;)if(c=e[f][1],u){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(h){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(u=f,"labelLink"!==c.type)){p=2;break}}else"labelEnd"===c.type&&(h=f);return n={type:"labelLink"===e[u][1].type?"link":"image",start:l(e[u][1].start),end:l(e[e.length-1][1].end)},r={type:"label",start:l(e[u][1].start),end:l(e[h][1].end)},a={type:"labelText",start:l(e[u+p+2][1].end),end:l(e[h-2][1].start)},d=i(d=[["enter",n,t],["enter",r,t]],e.slice(u+1,u+p+3)),d=i(d,[["enter",a,t]]),d=i(d,s(t.parser.constructs.insideSpan.null,e.slice(u+p+4,h-3),t)),d=i(d,[["exit",a,t],e[h-2],e[h-1],["exit",r,t]]),d=i(d,e.slice(h+1)),d=i(d,[["exit",n,t]]),o(e,u,e.length,d),e},resolveAll:function(e){for(var t,n=-1;++n<e.length;)(t=e[n][1])._used||"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},p={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),d(e,i)};function i(t){return 41===t?s(t):c(e,o,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function o(t){return r(t)?d(e,a)(t):s(t)}function a(t){return 34===t||39===t||40===t?h(e,d(e,s),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},g={tokenize:function(e,t,n){var r=this;return function(t){return u.call(r,e,i,n,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.indexOf(a(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},m={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};e.exports=f},64221:(e,t,n)=>{"use strict";var r={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(76703).resolveAll};e.exports=r},18747:(e,t,n)=>{"use strict";var r={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(76703).resolveAll};e.exports=r},46361:(e,t,n)=>{"use strict";var r=n(57301),i={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r(e,t,"linePrefix")}}};e.exports=i},74900:(e,t,n)=>{"use strict";var r=n(63347),i=n(53288),o=n(53355),a=n(82884),s=n(57301),l=n(47792),c=n(89985),u={name:"list",tokenize:function(e,t,n){var s=this,u=o(s.events,"linePrefix"),d=0;return function(t){var i=s.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!s.containerState.marker||t===s.containerState.marker:r(t)){if(s.containerState.type||(s.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,n,p)(t):p(t);if(!s.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return n(t)};function f(t){return r(t)&&++d<10?(e.consume(t),f):(!s.interrupt||d<2)&&(s.containerState.marker?t===s.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),p(t)):n(t)}function p(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||t,e.check(l,s.interrupt?n:g,e.attempt(h,v,m))}function g(e){return s.containerState.initialBlankLine=!0,u++,v(e)}function m(t){return i(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),v):n(t)}function v(n){return s.containerState.size=u+a(s.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(l,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,s(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!i(n)?(r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,e.attempt(d,t,o)(n))}));function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,s(e,e.attempt(u,t,n),"linePrefix",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},h={tokenize:function(e,t,n){var r=this;return s(e,(function(e){return i(e)||!o(r.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},d={tokenize:function(e,t,n){var r=this;return s(e,(function(e){return o(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};e.exports=u},47792:(e,t,n)=>{"use strict";var r=n(84783),i=n(57301),o={tokenize:function(e,t,n){return i(e,(function(e){return null===e||r(e)?t(e):n(e)}),"linePrefix")},partial:!0};e.exports=o},30302:(e,t,n)=>{"use strict";var r=n(84783),i=n(34831),o=n(57301),a={name:"setextUnderline",tokenize:function(e,t,n){for(var i,a,s=this,l=s.events.length;l--;)if("lineEnding"!==s.events[l][1].type&&"linePrefix"!==s.events[l][1].type&&"content"!==s.events[l][1].type){a="paragraph"===s.events[l][1].type;break}return function(t){return s.lazy||!s.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,c(t))};function c(t){return t===i?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),o(e,u,"lineSuffix")(t))}function u(i){return null===i||r(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}},resolveTo:function(e,t){for(var n,r,o,a,s=e.length;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(r=s)}else"content"===e[s][1].type&&e.splice(s,1),o||"definition"!==e[s][1].type||(o=s);return a={type:"setextHeading",start:i(e[r][1].start),end:i(e[e.length-1][1].end)},e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=i(e[o][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}};e.exports=a},89985:(e,t,n)=>{"use strict";var r=n(84783),i=n(53288),o=n(57301),a={name:"thematicBreak",tokenize:function(e,t,n){var a,s=0;return function(t){return e.enter("thematicBreak"),a=t,l(t)};function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):i(u)?o(e,l,"whitespace")(u):s<3||null!==u&&!r(u)?n(u):(e.exit("thematicBreak"),t(u))}function c(t){return t===a?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),l(t))}}};e.exports=a},7046:(e,t,n)=>{"use strict";var r=n(22211);e.exports=function(e,t){return e.length?(r(e,e.length,0,t),e):t}},22211:(e,t,n)=>{"use strict";var r=n(66609);e.exports=function(e,t,n,i){var o,a=e.length,s=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,i.length<1e4)(o=Array.from(i)).unshift(t,n),r.apply(e,o);else for(n&&r.apply(e,[t,n]);s<i.length;)(o=i.slice(s,s+1e4)).unshift(t,0),r.apply(e,o),s+=1e4,t+=1e4}},58499:(e,t,n)=>{"use strict";var r=n(67920),i=n(86026),o=n(56437);e.exports=function(e){return null===e||r(e)||o(e)?1:i(e)?2:void 0}},97783:(e,t,n)=>{"use strict";var r=n(67657),i=n(22211),o=n(57560);function a(e,t){var n,i,a,l;for(n in t)for(l in i=r.call(e,n)?e[n]:e[n]={},a=t[n])i[l]=s(o(a[l]),r.call(i,l)?i[l]:[])}function s(e,t){for(var n=-1,r=[];++n<e.length;)("after"===e[n].add?t:r).push(e[n]);return i(t,0,0,r),t}e.exports=function(e){for(var t={},n=-1;++n<e.length;)a(t,e[n]);return t}},77897:(e,t,n)=>{"use strict";var r=n(7050),i=n(84783),o=n(7046),a=n(22211),s=n(57560),l=n(64464),c=n(22503),u=n(34831),h=n(82783);e.exports=function(e,t,n){var d=n?u(n):{line:1,column:1,offset:0},f={},p=[],g=[],m=[],v={consume:function(e){i(e)?(d.line++,d.column=1,d.offset+=-3===e?2:1,S()):-1!==e&&(d.column++,d.offset++),d._bufferIndex<0?d._index++:(d._bufferIndex++,d._bufferIndex===g[d._index].length&&(d._bufferIndex=-1,d._index++)),y.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=x(),y.events.push(["enter",n,y]),m.push(n),n},exit:function(e){var t=m.pop();return t.end=x(),y.events.push(["exit",t,y]),t},attempt:k((function(e,t){T(e,t.from)})),check:k(A),interrupt:k(A,{interrupt:!0}),lazy:k(A,{lazy:!0})},y={previous:null,events:[],parser:e,sliceStream:_,sliceSerialize:function(e){return c(_(e))},now:x,defineSkip:function(e){f[e.line]=e.column,S()},write:function(e){return g=o(g,e),function(){for(var e,t;d._index<g.length;)if("string"==typeof(t=g[d._index]))for(e=d._index,d._bufferIndex<0&&(d._bufferIndex=0);d._index===e&&d._bufferIndex<t.length;)w(t.charCodeAt(d._bufferIndex));else w(t)}(),null!==g[g.length-1]?[]:(T(t,0),y.events=l(p,y.events,y),y.events)}},b=t.tokenize.call(y,v);return t.resolveAll&&p.push(t),d._index=0,d._bufferIndex=-1,y;function _(e){return h(g,e)}function x(){return u(d)}function w(e){b=b(e)}function A(e,t){t.restore()}function k(e,t){return function(n,i,o){var a,l,c,u;return n.tokenize||"length"in n?h(s(n)):function(e){return e in n||null in n?h(n.null?s(n[e]).concat(s(n.null)):n[e])(e):o(e)};function h(e){return a=e,f(e[l=0])}function f(e){return function(n){var i,o,a,s,l;return i=x(),o=y.previous,a=y.currentConstruct,s=y.events.length,l=Array.from(m),u={restore:function(){d=i,y.previous=o,y.currentConstruct=a,y.events.length=s,m=l,S()},from:s},c=e,e.partial||(y.currentConstruct=e),e.name&&y.parser.constructs.disable.null.indexOf(e.name)>-1?g():e.tokenize.call(t?r({},y,t):y,v,p,g)(n)}}function p(t){return e(c,u),i}function g(e){return u.restore(),++l<a.length?f(a[l]):o}}}function T(e,t){e.resolveAll&&p.indexOf(e)<0&&p.push(e),e.resolve&&a(y.events,t,y.events.length-t,e.resolve(y.events.slice(t),y)),e.resolveTo&&(y.events=e.resolveTo(y.events,y))}function S(){d.line in f&&d.column<2&&(d.column=f[d.line],d.offset+=f[d.line]-1)}}},57560:e=>{"use strict";e.exports=function(e){return null==e?[]:"length"in e?e:[e]}},53545:e=>{"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},10425:e=>{"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},53355:(e,t,n)=>{"use strict";var r=n(82884);e.exports=function(e,t){var n=e[e.length-1];return n&&n[1].type===t?r(n[2].sliceStream(n[1])):0}},76769:(e,t,n)=>{"use strict";var r=n(21947);e.exports=function(e){return function(t){return e.test(r(t))}}},64464:e=>{"use strict";e.exports=function(e,t,n){for(var r,i=[],o=-1;++o<e.length;)(r=e[o].resolveAll)&&i.indexOf(r)<0&&(t=r(t,n),i.push(r));return t}},56129:(e,t,n)=>{"use strict";var r=n(21947);e.exports=function(e,t){var n=parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"":r(n)}},22503:(e,t,n)=>{"use strict";var r=n(21947);e.exports=function(e){for(var t,n,i,o=-1,a=[];++o<e.length;){if("string"==typeof(t=e[o]))n=t;else if(-5===t)n="\r";else if(-4===t)n="\n";else if(-3===t)n="\r\n";else if(-2===t)n="\t";else if(-1===t){if(i)continue;n=" "}else n=r(t);i=-2===t,a.push(n)}return a.join("")}},34831:(e,t,n)=>{"use strict";var r=n(7050);e.exports=function(e){return r({},e)}},82884:e=>{"use strict";e.exports=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n}},82783:e=>{"use strict";e.exports=function(e,t){var n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;return r===o?n=[e[r].slice(i,a)]:(n=e.slice(r,o),i>-1&&(n[0]=n[0].slice(i)),a>0&&n.push(e[o].slice(0,a))),n}},30227:(e,t,n)=>{"use strict";var r=n(7050),i=n(22211),o=n(34831);function a(e,t){for(var n,r,o,a,s,l,c=e[t][1],u=e[t][2],h=t-1,d=[],f=c._tokenizer||u.parser[c.contentType](c.start),p=f.events,g=[],m={};c;){for(;e[++h][1]!==c;);d.push(h),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),r&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(n),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),r=c,c=c.next}for(c=r,o=p.length;o--;)"enter"===p[o][0]?a=!0:a&&p[o][1].type===p[o-1][1].type&&p[o][1].start.line!==p[o][1].end.line&&(v(p.slice(o+1,s)),c._tokenizer=c.next=void 0,c=c.previous,s=o+1);for(f.events=c._tokenizer=c.next=void 0,v(p.slice(0,s)),o=-1,l=0;++o<g.length;)m[l+g[o][0]]=l+g[o][1],l+=g[o][1]-g[o][0]-1;return m;function v(t){var n=d.pop();g.unshift([n,n+t.length-1]),i(e,n,2,t)}}e.exports=function(e){for(var t,n,s,l,c,u,h,d={},f=-1;++f<e.length;){for(;f in d;)f=d[f];if(t=e[f],f&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[f-1][1].type&&((s=0)<(u=t[1]._tokenizer.events).length&&"lineEndingBlank"===u[s][1].type&&(s+=2),s<u.length&&"content"===u[s][1].type))for(;++s<u.length&&"content"!==u[s][1].type;)"chunkText"===u[s][1].type&&(u[s][1].isInFirstContentOfListItem=!0,s++);if("enter"===t[0])t[1].contentType&&(r(d,a(e,f)),f=d[f],h=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(s=f,n=void 0;s--&&("lineEnding"===(l=e[s])[1].type||"lineEndingBlank"===l[1].type);)"enter"===l[0]&&(n&&(e[n][1].type="lineEndingBlank"),l[1].type="lineEnding",n=s);n&&(t[1].end=o(e[n][1].start),(c=e.slice(n,f)).unshift(t),i(e,n,f-n+1,c))}}return!h}},5144:(e,t,n)=>{"use strict";n.d(t,{yX:()=>Z,zt:()=>K,Pi:()=>Y});var r=n(82445),i=n(20362);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.rV)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var o=n(37935);function a(){var e=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}((0,i.useState)(0),2)[1];return(0,i.useCallback)((function(){e((function(e){return e+1}))}),[])}var s=function(e){return"function"==typeof Symbol?Symbol.for(e):"__$mobx-react "+e+"__"}("observerBatching");function l(e){return(0,r.Gf)(e)}var c,u=new Set;function h(){void 0===c&&(c=setTimeout(d,1e4))}function d(){c=void 0;var e=Date.now();u.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,u.delete(t))})),u.size>0&&h()}var f=!1,p=[],g={};function m(e){return"observer"+e}function v(e,t,n){void 0===t&&(t="observed"),void 0===n&&(n=g);var o,s,c=(s=(n.useForceUpdate||a)(),function(){f?p.push(s):s()}),d=i.useRef(null);if(!d.current){var v=new r.le(m(t),(function(){y.mounted?c():(v.dispose(),d.current=null)})),y=function(e){return{cleanAt:Date.now()+1e4,reaction:e}}(v);d.current=y,o=d,u.add(o),h()}var b=d.current.reaction;return i.useDebugValue(b,l),i.useEffect((function(){var e;return e=d,u.delete(e),d.current?d.current.mounted=!0:(d.current={reaction:new r.le(m(t),(function(){c()})),cleanAt:1/0},c()),function(){d.current.reaction.dispose(),d.current=null}}),[]),function(t){f=!0,p=[];try{var n=function(){var t,n;if(b.track((function(){try{t=e()}catch(e){n=e}})),n)throw n;return t}();f=!1;var r=p.length>0?p:void 0;return i.useLayoutEffect((function(){r&&r.forEach((function(e){return e()}))}),[r]),n}finally{f=!1}}()}var y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},y.apply(this,arguments)};var b,_={$$typeof:!0,render:!0,compare:!0,type:!0};function x(e){var t=e.children,n=e.render,r=t||n;return"function"!=typeof r?null:v(r)}function w(e,t,n,r,i){var o="children"===t?"render":"children",a="function"==typeof e[t],s="function"==typeof e[o];return a&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):a||s?null:new Error("Invalid prop `"+i+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}x.propTypes={children:w,render:w},x.displayName="Observer",(b=o.unstable_batchedUpdates)||(b=function(e){e()}),(0,r.jQ)({reactionScheduler:b}),("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{})[s]=!0;var A=0,k={};function T(e){return k[e]||(k[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+A+")";return A++,t}(e)),k[e]}function S(e,t){if(E(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.hasOwnProperty.call(t,n[i])||!E(e[n[i]],t[n[i]]))return!1;return!0}function E(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function C(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var M=T("patchMixins"),O=T("patchedDefinition");function L(e,t){for(var n=this,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.locks++;try{var a;return null!=e&&(a=e.apply(this,i)),a}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(n,i)}))}}function D(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];L.call.apply(L,[this,e,t].concat(r))}}function I(e,t,n){var r=function(e,t){var n=e[M]=e[M]||{},r=n[t]=n[t]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i[O]){var o=e[t],a=R(e,t,i?i.enumerable:void 0,r,o);Object.defineProperty(e,t,a)}}function R(e,t,n,r,i){var o,a=D(i,r);return(o={})[O]=!0,o.get=function(){return a},o.set=function(i){if(this===e)a=D(i,r);else{var o=R(this,t,n,r,i);Object.defineProperty(this,t,o)}},o.configurable=!0,o.enumerable=n,o}var P=r.so||"$mobx",N=T("isMobXReactObserver"),z=T("isUnmounted"),F=T("skipRender"),B=T("isForcingUpdate");function j(e){var t=e.prototype;if(e[N]){var n=U(t);console.warn("The provided component class ("+n+") \n has already been declared as an observer component.")}else e[N]=!0;if(t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==i.PureComponent)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==q)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=q;H(t,"props"),H(t,"state");var r=t.render;return t.render=function(){return V.call(this,r)},I(t,"componentWillUnmount",(function(){var e;if(null===(e=this.render[P])||void 0===e||e.dispose(),this[z]=!0,!this.render[P]){var t=U(this);console.warn("The reactive render of an observer class component ("+t+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),e}function U(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function V(e){var t=this;C(this,F,!1),C(this,B,!1);var n=U(this),o=e.bind(this),a=!1,s=new r.le(n+".render()",(function(){if(!a&&(a=!0,!0!==t[z])){var e=!0;try{C(t,B,!0),t[F]||i.Component.prototype.forceUpdate.call(t),e=!1}finally{C(t,B,!1),e&&s.dispose()}}}));function l(){a=!1;var e=void 0,t=void 0;if(s.track((function(){try{t=(0,r.$$)(!1,o)}catch(t){e=t}})),e)throw e;return t}return s.reactComponent=this,l[P]=s,this.render=l,l.call(this)}function q(e,t){return this.state!==t||!S(this.props,e)}function H(e,t){var n=T("reactProp_"+t+"_valueHolder"),i=T("reactProp_"+t+"_atomHolder");function o(){return this[i]||C(this,i,(0,r.cp)("reactive "+t)),this[i]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r.wM&&r.mJ&&(e=(0,r.wM)(!0)),o.call(this).reportObserved(),r.wM&&r.mJ&&(0,r.mJ)(e),this[n]},set:function(e){this[B]||S(this[n],e)?C(this,n,e):(C(this,n,e),C(this,F,!0),o.call(this).reportChanged(),C(this,F,!1))}})}var $="function"==typeof Symbol&&Symbol.for,W=$?Symbol.for("react.forward_ref"):"function"==typeof i.forwardRef&&(0,i.forwardRef)((function(e){return null})).$$typeof,G=$?Symbol.for("react.memo"):"function"==typeof i.memo&&(0,i.memo)((function(e){return null})).$$typeof;function Y(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),G&&e.$$typeof===G)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(W&&e.$$typeof===W){var t=e.render;if("function"!=typeof t)throw new Error("render property of ForwardRef was not a function");return(0,i.forwardRef)((function(){var e=arguments;return(0,i.createElement)(x,null,(function(){return t.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(i.Component,e)?j(e):(n=e,l=y({forwardRef:!1},r),c=n.displayName||n.name,(u=function(e,t){return v((function(){return n(e,t)}),c)}).displayName=c,o=l.forwardRef?(0,i.memo)((0,i.forwardRef)(u)):(0,i.memo)(u),a=n,s=o,Object.keys(a).forEach((function(e){_[e]||Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(a,e))})),o.displayName=c,o);var n,r,o,a,s,l,c,u}function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}var Z=i.createContext({});function K(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children"]),r=i.useContext(Z),o=i.useRef(X({},r,n)).current;return i.createElement(Z.Provider,{value:o},t)}if(K.displayName="MobXProvider",!i.Component)throw new Error("mobx-react requires React to be available");if(!r.LO)throw new Error("mobx-react requires mobx to be available")},82445:(e,t,n)=>{"use strict";n.d(t,{so:()=>b,le:()=>Be,$$:()=>ye,mJ:()=>he,wM:()=>ue,Fl:()=>ee,jQ:()=>et,cp:()=>w,Gf:()=>it,Ei:()=>Et,LJ:()=>Lt,Pb:()=>Ut,LO:()=>Y,rV:()=>$e,rg:()=>se});var r=[];Object.freeze(r);var i={};function o(){return++Oe.mobxGuid}function a(e){throw s(!1,e),"X"}function s(e,t){if(!e)throw new Error("[mobx] "+(t||"An invariant failed, however the error is obfuscated because this is a production build."))}function l(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}Object.freeze(i);var c=function(){};function u(e){return null!==e&&"object"==typeof e}function h(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function d(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function f(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return u(e)&&!0===e[n]}}function p(e){return e instanceof Map}function g(e){return e instanceof Set}function m(e){return e&&e.toString?e.toString():new String(e).toString()}function v(e){return null===e?null:"object"==typeof e?""+e:e}var y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,b=Symbol("mobx administration"),_=function(){function e(e){void 0===e&&(e="Atom@"+o()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Z.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(e){return e()}))},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(e){return e()}))},e.prototype.reportObserved=function(){return Ne(this)},e.prototype.reportChanged=function(){Re(),function(e){e.lowestObserverState!==Z.STALE&&(e.lowestObserverState=Z.STALE,e.observers.forEach((function(t){t.dependenciesState===Z.UP_TO_DATE&&(t.isTracing!==K.NONE&&ze(t,e),t.onBecomeStale()),t.dependenciesState=Z.STALE})))}(this),Pe()},e.prototype.toString=function(){return this.name},e}(),x=f("Atom",_);function w(e,t,n){void 0===t&&(t=c),void 0===n&&(n=c);var r=new _(e);return t!==c&&Qe("onBecomeObserved",r,t,undefined),n!==c&&Je(r,n),r}var A={identity:function(e,t){return e===t},structural:function(e,t){return $t(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return $t(e,t,1)}},k=function(e,t){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},k(e,t)},T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)};function S(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function E(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(E(arguments[t]));return e}var M=Symbol("mobx did run lazy initializers"),O=Symbol("mobx pending decorators"),L={},D={};function I(e,t){var n=t?L:D;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return R(this),this[e]},set:function(t){R(this),this[e]=t}})}function R(e){var t,n;if(!0!==e[M]){var r=e[O];if(r){d(e,M,!0);var i=C(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var o=S(i),a=o.next();!a.done;a=o.next()){var s=r[a.value];s.propertyCreator(e,s.prop,s.descriptor,s.decoratorTarget,s.decoratorArguments)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}}}function P(e,t){return function(){var n,i=function(r,i,o,a){if(!0===a)return t(r,i,o,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,O)){var s=r[O];d(r,O,T({},s))}return r[O][i]={prop:i,propertyCreator:t,descriptor:o,decoratorTarget:r,decoratorArguments:n},I(i,e)};return N(arguments)?(n=r,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function N(e){return(2===e.length||3===e.length)&&("string"==typeof e[1]||"symbol"==typeof e[1])||4===e.length&&!0===e[3]}function z(e,t,n){return st(e)?e:Array.isArray(e)?Y.array(e,{name:n}):h(e)?Y.object(e,void 0,{name:n}):p(e)?Y.map(e,{name:n}):g(e)?Y.set(e,{name:n}):e}function F(e){return e}function B(e){s(e);var t=P(!0,(function(t,n,r,i,o){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Nt(t).addObservableProp(n,a,e)})),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var j={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function U(e){return null==e?j:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(j);var V=B(z),q=B((function(e,t,n){return null==e||Ut(e)||Et(e)||Lt(e)||Rt(e)?e:Array.isArray(e)?Y.array(e,{name:n,deep:!1}):h(e)?Y.object(e,void 0,{name:n,deep:!1}):p(e)?Y.map(e,{name:n,deep:!1}):g(e)?Y.set(e,{name:n,deep:!1}):a(!1)})),H=B(F),$=B((function(e,t,n){return $t(e,t)?t:e}));function W(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?F:z}var G={box:function(e,t){arguments.length>2&&X("box");var n=U(t);return new xe(e,W(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&X("array");var n=U(t);return wt(e,W(n),n.name)},map:function(e,t){arguments.length>2&&X("map");var n=U(t);return new Ot(e,W(n),n.name)},set:function(e,t){arguments.length>2&&X("set");var n=U(t);return new It(e,W(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&X("object");var r=U(n);if(!1===r.proxy)return tt({},e,t,r);var i=nt(r),o=tt({},void 0,void 0,r),a=pt(o);return rt(a,e,t,i),a},ref:H,shallow:q,deep:V,struct:$},Y=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return V.apply(null,arguments);if(st(e))return e;var r=h(e)?Y.object(e,t,n):Array.isArray(e)?Y.array(e,t):p(e)?Y.map(e,t):g(e)?Y.set(e,t):e;if(r!==e)return r;a(!1)};function X(e){a("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(G).forEach((function(e){return Y[e]=G[e]}));var Z,K,J=P(!1,(function(e,t,n,r,i){var o=n.get,a=n.set,s=i[0]||{};Nt(e).addComputedProp(e,t,T({get:o,set:a,context:e},s))})),Q=J({equals:A.structural}),ee=function(e,t,n){if("string"==typeof t)return J.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return J.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new we(r)};ee.struct=Q,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Z||(Z={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(K||(K={}));var te=function(e){this.cause=e};function ne(e){return e instanceof te}function re(e){switch(e.dependenciesState){case Z.UP_TO_DATE:return!1;case Z.NOT_TRACKING:case Z.STALE:return!0;case Z.POSSIBLY_STALE:for(var t=ue(!0),n=le(),r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(Ae(a)){if(Oe.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return ce(n),he(t),!0}if(e.dependenciesState===Z.STALE)return ce(n),he(t),!0}}return de(e),ce(n),he(t),!1}}function ie(e){var t=e.observers.size>0;Oe.computationDepth>0&&t&&a(!1),Oe.allowStateChanges||!t&&"strict"!==Oe.enforceActions||a(!1)}function oe(e,t,n){var r=ue(!0);de(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Oe.runId;var i,o=Oe.trackingDerivation;if(Oe.trackingDerivation=e,!0===Oe.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new te(e)}return Oe.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Z.UP_TO_DATE,i=0,o=e.unboundDepsCount,a=0;a<o;a++)0===(s=n[a]).diffValue&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState);for(n.length=i,e.newObserving=null,o=t.length;o--;)0===(s=t[o]).diffValue&&De(s,e),s.diffValue=0;for(;i--;){var s;1===(s=n[i]).diffValue&&(s.diffValue=0,Le(s,e))}r!==Z.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),he(r),i}function ae(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)De(t[n],e);e.dependenciesState=Z.NOT_TRACKING}function se(e){var t=le();try{return e()}finally{ce(t)}}function le(){var e=Oe.trackingDerivation;return Oe.trackingDerivation=null,e}function ce(e){Oe.trackingDerivation=e}function ue(e){var t=Oe.allowStateReads;return Oe.allowStateReads=e,t}function he(e){Oe.allowStateReads=e}function de(e){if(e.dependenciesState!==Z.UP_TO_DATE){e.dependenciesState=Z.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Z.UP_TO_DATE}}var fe=0,pe=1,ge=Object.getOwnPropertyDescriptor((function(){}),"name");function me(e,t,n){var r=function(){return ve(0,t,n||this,arguments)};return r.isMobxAction=!0,r}function ve(e,t,n,r){var i=function(e,t,n){var r=le();Re();var i={prevDerivation:r,prevAllowStateChanges:be(!0),prevAllowStateReads:ue(!0),notifySpy:!1,startTime:0,actionId:pe++,parentActionId:fe};return fe=i.actionId,i}();try{return t.apply(n,r)}catch(e){throw i.error=e,e}finally{!function(e){fe!==e.actionId&&a("invalid action stack. did you forget to finish an action?"),fe=e.parentActionId,void 0!==e.error&&(Oe.suppressReactionErrors=!0),_e(e.prevAllowStateChanges),he(e.prevAllowStateReads),Pe(),ce(e.prevDerivation),e.notifySpy,Oe.suppressReactionErrors=!1}(i)}}function ye(e,t){var n,r=be(e);try{n=t()}finally{_e(r)}return n}function be(e){var t=Oe.allowStateChanges;return Oe.allowStateChanges=e,t}function _e(e){Oe.allowStateChanges=e}ge&&ge.configurable;var xe=function(e){function t(t,n,r,i,a){void 0===r&&(r="ObservableValue@"+o()),void 0===i&&(i=!0),void 0===a&&(a=A.default);var s=e.call(this,r)||this;return s.enhancer=n,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=n(t,void 0,r),s}return function(e,t){function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value,(e=this.prepareNewValue(e))!==Oe.UNCHANGED&&this.setNewValue(e)},t.prototype.prepareNewValue=function(e){if(ie(this),gt(this)){var t=vt(this,{object:this,type:"update",newValue:e});if(!t)return Oe.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Oe.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),yt(this)&&_t(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return mt(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),bt(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return v(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(_),we=(f("ObservableValue",xe),function(){function e(e){this.dependenciesState=Z.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Z.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+o(),this.value=new te(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=K.NONE,s(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+o(),e.set&&(this.setter=me(this.name,e.set)),this.equals=e.equals||(e.compareStructural||e.struct?A.structural:A.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){e.lowestObserverState===Z.UP_TO_DATE&&(e.lowestObserverState=Z.POSSIBLY_STALE,e.observers.forEach((function(t){t.dependenciesState===Z.UP_TO_DATE&&(t.dependenciesState=Z.POSSIBLY_STALE,t.isTracing!==K.NONE&&ze(t,e),t.onBecomeStale())})))}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(e){return e()}))},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(e){return e()}))},e.prototype.get=function(){this.isComputing&&a("Cycle detected in computation "+this.name+": "+this.derivation),0!==Oe.inBatch||0!==this.observers.size||this.keepAlive?(Ne(this),re(this)&&this.trackAndCompute()&&function(e){e.lowestObserverState!==Z.STALE&&(e.lowestObserverState=Z.STALE,e.observers.forEach((function(t){t.dependenciesState===Z.POSSIBLY_STALE?t.dependenciesState=Z.STALE:t.dependenciesState===Z.UP_TO_DATE&&(e.lowestObserverState=Z.UP_TO_DATE)})))}(this)):re(this)&&(this.warnAboutUntrackedRead(),Re(),this.value=this.computeValue(!1),Pe());var e=this.value;if(ne(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ne(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){s(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else s(!1,!1)},e.prototype.trackAndCompute=function(){var e=this.value,t=this.dependenciesState===Z.NOT_TRACKING,n=this.computeValue(!0),r=t||ne(e)||ne(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Oe.computationDepth++,e)t=oe(this,this.derivation,this.scope);else if(!0===Oe.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new te(e)}return Oe.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(ae(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,a=void 0;return function(e,t){void 0===t&&(t=i);var n,r=t&&t.name||e.name||"Autorun@"+o();if(t.scheduler||t.delay){var a=function(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ke}(t),s=!1;n=new Be(r,(function(){s||(s=!0,a((function(){s=!1,n.isDisposed||n.track(l)})))}),t.onError,t.requiresObservable)}else n=new Be(r,(function(){this.track(l)}),t.onError,t.requiresObservable);function l(){e(n)}return n.schedule(),n.getDisposer()}((function(){var i=n.get();if(!r||t){var o=le();e({type:"update",object:n,newValue:i,oldValue:a}),ce(o)}r=!1,a=i}))},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return v(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}()),Ae=f("ComputedValue",we),ke=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Te={};function Se(){return"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:Te}var Ee,Ce=!0,Me=!1,Oe=((Ee=Se()).__mobxInstanceCount>0&&!Ee.__mobxGlobals&&(Ce=!1),Ee.__mobxGlobals&&Ee.__mobxGlobals.version!==(new ke).version&&(Ce=!1),Ce?Ee.__mobxGlobals?(Ee.__mobxInstanceCount+=1,Ee.__mobxGlobals.UNCHANGED||(Ee.__mobxGlobals.UNCHANGED={}),Ee.__mobxGlobals):(Ee.__mobxInstanceCount=1,Ee.__mobxGlobals=new ke):(setTimeout((function(){Me||a("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new ke));function Le(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function De(e,t){e.observers.delete(t),0===e.observers.size&&Ie(e)}function Ie(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Oe.pendingUnobservations.push(e))}function Re(){Oe.inBatch++}function Pe(){if(0==--Oe.inBatch){Ue();for(var e=Oe.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof we&&n.suspend())}Oe.pendingUnobservations=[]}}function Ne(e){var t=Oe.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&Oe.inBatch>0&&Ie(e),!1)}function ze(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===K.BREAK){var n=[];Fe(it(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof we?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function Fe(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return Fe(e,t,n+1)})))}var Be=function(){function e(e,t,n,r){void 0===e&&(e="Reaction@"+o()),void 0===r&&(r=!1),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=Z.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+o(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=K.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Oe.pendingReactions.push(this),Ue())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Re(),this._isScheduled=!1,re(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(e){this.reportExceptionInDerivation(e)}}Pe()}},e.prototype.track=function(e){if(!this.isDisposed){Re(),this._isRunning=!0;var t=oe(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ae(this),ne(t)&&this.reportExceptionInDerivation(t.cause),Pe()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Oe.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Oe.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Oe.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Re(),ae(this),Pe()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[b]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=ct(e);if(!r)return a(!1);r.isTracing===K.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?K.BREAK:K.LOG}(this,e)},e}(),je=function(e){return e()};function Ue(){Oe.inBatch>0||Oe.isRunningReactions||je(Ve)}function Ve(){Oe.isRunningReactions=!0;for(var e=Oe.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Oe.isRunningReactions=!1}var qe=f("Reaction",Be);function He(e){var t=je;je=function(n){return e((function(){return t(n)}))}}function $e(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function We(){a(!1)}function Ge(e){return function(t,n,r){if(r){if(r.value)return{value:me(0,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return me(0,i.call(this))}}}return Ye(e).apply(this,arguments)}}function Ye(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){d(this,n,Xe(e,t))}})}}var Xe=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?me(e.name,e):2===arguments.length&&"function"==typeof t?me(0,t):1===arguments.length&&"string"==typeof e?Ge(e):!0!==r?Ge(t).apply(null,arguments):void d(e,t,me(e.name,n.value,this))};function Ze(e,t,n){d(e,t,me(0,n.bind(e)))}Xe.bound=function(e,t,n,r){return!0===r?(Ze(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ze(this,t,n.value||n.initializer.call(this)),this[t]},set:We}:{enumerable:!1,configurable:!0,set:function(e){Ze(this,t,e)},get:function(){}}};var Ke=function(e){return e()};function Je(e,t,n){return Qe("onBecomeUnobserved",e,t,n)}function Qe(e,t,n,r){var i="function"==typeof r?Vt(t,n):Vt(t),o="function"==typeof r?r:n,s=e+"Listeners";return i[s]?i[s].add(o):i[s]=new Set([o]),"function"!=typeof i[e]?a(!1):function(){var e=i[s];e&&(e.delete(o),0===e.size&&delete i[s])}}function et(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,i=e.disableErrorBoundaries,o=e.reactionScheduler,s=e.reactionRequiresObservable,l=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((Oe.pendingReactions.length||Oe.inBatch||Oe.isRunningReactions)&&a("isolateGlobalState should be called before MobX is running any reactions"),Me=!0,Ce&&(0==--Se().__mobxInstanceCount&&(Se().__mobxGlobals=void 0),Oe=new ke)),void 0!==t){var c=void 0;switch(t){case!0:case"observed":c=!0;break;case!1:case"never":c=!1;break;case"strict":case"always":c="strict";break;default:a("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Oe.enforceActions=c,Oe.allowStateChanges=!0!==c&&"strict"!==c}void 0!==n&&(Oe.computedRequiresReaction=!!n),void 0!==s&&(Oe.reactionRequiresObservable=!!s),void 0!==l&&(Oe.observableRequiresReaction=!!l,Oe.allowStateReads=!Oe.observableRequiresReaction),void 0!==r&&(Oe.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Oe.disableErrorBoundaries=!!i),o&&He(o)}function tt(e,t,n,r){var i=nt(r=U(r));return R(e),Nt(e,r.name,i.enhancer),t&&rt(e,t,n,i),e}function nt(e){return e.defaultDecorator||(!1===e.deep?H:V)}function rt(e,t,n,r){var i,o;Re();try{var a=y(t);try{for(var s=S(a),l=s.next();!l.done;l=s.next()){var c=l.value,u=Object.getOwnPropertyDescriptor(t,c),h=(n&&c in n?n[c]:u.get?J:r)(e,c,u,!0);h&&Object.defineProperty(e,c,h)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}finally{Pe()}}function it(e,t){return ot(Vt(e,t))}function ot(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n).map(ot)),r}function at(e,t){return null!=e&&(void 0!==t?!!Ut(e)&&e[b].values.has(t):Ut(e)||!!e[b]||x(e)||qe(e)||Ae(e))}function st(e){return 1!==arguments.length&&a(!1),at(e)}function lt(e,t,n){if(2!==arguments.length||Rt(e))if(Ut(e)){var r=e[b],i=r.values.get(t);i?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Lt(e))e.set(t,n);else if(Rt(e))e.add(t);else{if(!Et(e))return a(!1);"number"!=typeof t&&(t=parseInt(t,10)),s(t>=0,"Not a valid index: '"+t+"'"),Re(),t>=e.length&&(e.length=t+1),e[t]=n,Pe()}else{Re();var o=t;try{for(var l in o)lt(e,l,o[l])}finally{Pe()}}}function ct(e){switch(e.length){case 0:return Oe.trackingDerivation;case 1:return Vt(e[0]);case 2:return Vt(e[0],e[1])}}function ut(e,t){void 0===t&&(t=void 0),Re();try{return e.apply(t)}finally{Pe()}}function ht(e){return e[b]}function dt(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}Object.create(Error.prototype);var ft={has:function(e,t){if(t===b||"constructor"===t||t===M)return!0;var n=ht(e);return dt(t)?n.has(t):t in e},get:function(e,t){if(t===b||"constructor"===t||t===M)return e[t];var n=ht(e),r=n.values.get(t);if(r instanceof _){var i=r.get();return void 0===i&&n.has(t),i}return dt(t)&&n.has(t),e[t]},set:function(e,t,n){return!!dt(t)&&(lt(e,t,n),!0)},deleteProperty:function(e,t){return!!dt(t)&&(ht(e).remove(t),!0)},ownKeys:function(e){return ht(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return a("Dynamic observable objects cannot be frozen"),!1}};function pt(e){var t=new Proxy(e,ft);return e[b].proxy=t,t}function gt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function mt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),l((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function vt(e,t){var n=le();try{for(var r=C(e.interceptors||[]),i=0,o=r.length;i<o&&(s(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{ce(n)}}function yt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function bt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),l((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function _t(e,t){var n=le(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);ce(n)}}var xt={get:function(e,t){return t===b?e[b]:"length"===t?e[b].getArrayLength():"number"==typeof t?kt.get.call(e,t):"string"!=typeof t||isNaN(t)?kt.hasOwnProperty(t)?kt[t]:e[t]:kt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[b].setArrayLength(n),"number"==typeof t&&kt.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:kt.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return a("Observable arrays cannot be frozen"),!1}};function wt(e,t,n,r){void 0===n&&(n="ObservableArray@"+o()),void 0===r&&(r=!1);var i,a,s,l=new At(n,t,r);i=l.values,a=b,s=l,Object.defineProperty(i,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var c=new Proxy(l.values,xt);if(l.proxy=c,e&&e.length){var u=be(!0);l.spliceWithArray(0,0,e),_e(u)}return c}var At=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+o()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return mt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),bt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var i=this;ie(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=r),gt(this)){var a=vt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!a)return r;t=a.removedCount,n=a.added}n=0===n.length?n:n.map((function(e){return i.enhancer(e,void 0)}));var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,C([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,i=yt(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&_t(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=yt(this),o=i||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),i&&_t(this,o)},e}(),kt={intercept:function(e){return this[b].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[b].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[b];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[b];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[b].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[b];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[b].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[b];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[b],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[b];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var n=this[b],r=n.values;if(e<r.length){ie(n.atom);var i=r[e];if(gt(n)){var o=vt(n,{type:"update",object:n.proxy,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(e){"function"==typeof Array.prototype[e]&&(kt[e]=function(){var t=this[b];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(e){"function"==typeof Array.prototype[e]&&(kt[e]=function(t,n){var r=this,i=this[b];return i.atom.reportObserved(),i.dehanceValues(i.values)[e]((function(e,i){return t.call(n,e,i,r)}),n)})})),["reduce","reduceRight"].forEach((function(e){kt[e]=function(){var t=this,n=this[b];n.atom.reportObserved();var r=arguments[0];return arguments[0]=function(e,i,o){return i=n.dehanceValue(i),r(e,i,o,t)},n.values[e].apply(n.values,arguments)}}));var Tt,St=f("ObservableArrayAdministration",At);function Et(e){return u(e)&&St(e[b])}var Ct,Mt={},Ot=function(){function e(e,t,n){if(void 0===t&&(t=z),void 0===n&&(n="ObservableMap@"+o()),this.enhancer=t,this.name=n,this[Tt]=Mt,this._keysAtom=w(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!Oe.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new xe(this._has(e),F,this.name+"."+m(e)+"?",!1);this._hasMap.set(e,r),Je(r,(function(){return t._hasMap.delete(e)}))}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(gt(this)){var r=vt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(ie(this._keysAtom),gt(this)&&!(r=vt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=yt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return ut((function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)})),n&&_t(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Oe.UNCHANGED){var r=yt(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;n.setNewValue(t),r&&_t(this,i)}},e.prototype._addValue=function(e,t){var n=this;ie(this._keysAtom),ut((function(){var r=new xe(t,n.enhancer,n.name+"."+m(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()}));var r=yt(this);r&&_t(this,r?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=this.keys();return Xt({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},e.prototype.entries=function(){var e=this,t=this.keys();return Xt({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},e.prototype[(Tt=b,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,r;try{for(var i=S(this),o=i.next();!o.done;o=i.next()){var a=E(o.value,2),s=a[0],l=a[1];e.call(t,l,s,this)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Lt(e)&&(e=e.toJS()),ut((function(){var n=be(!0);try{h(e)?function(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach((function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)})),Array.from(t)}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=E(e,2),r=n[0],i=n[1];return t.set(r,i)})):p(e)?(e.constructor!==Map&&a("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&a("Cannot initialize map from "+e)}finally{_e(n)}})),this},e.prototype.clear=function(){var e=this;ut((function(){se((function(){var t,n;try{for(var r=S(e.keys()),i=r.next();!i.done;i=r.next()){var o=i.value;e.delete(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}))}))},e.prototype.replace=function(e){var t=this;return ut((function(){var n,r,i,o,s=function(e){if(p(e)||Lt(e))return e;if(Array.isArray(e))return new Map(e);if(h(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return a("Cannot convert to map from '"+e+"'")}(e),l=new Map,c=!1;try{for(var u=S(t._data.keys()),d=u.next();!d.done;d=u.next()){var f=d.value;if(!s.has(f))if(t.delete(f))c=!0;else{var g=t._data.get(f);l.set(f,g)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}try{for(var m=S(s.entries()),v=m.next();!v.done;v=m.next()){var y=E(v.value,2),b=(f=y[0],g=y[1],t._data.has(f));if(t.set(f,g),t._data.has(f)){var _=t._data.get(f);l.set(f,_),b||(c=!0)}}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}if(!c)if(t._data.size!==l.size)t._keysAtom.reportChanged();else for(var x=t._data.keys(),w=l.keys(),A=x.next(),k=w.next();!A.done;){if(A.value!==k.value){t._keysAtom.reportChanged();break}A=x.next(),k=w.next()}t._data=l})),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var r=S(this),i=r.next();!i.done;i=r.next()){var o=E(i.value,2),a=o[0],s=o[1];n["symbol"==typeof a?a:m(a)]=s}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map((function(t){return m(t)+": "+e.get(t)})).join(", ")+" }]"},e.prototype.observe=function(e,t){return bt(this,e)},e.prototype.intercept=function(e){return mt(this,e)},e}(),Lt=f("ObservableMap",Ot),Dt={},It=function(){function e(e,t,n){if(void 0===t&&(t=z),void 0===n&&(n="ObservableSet@"+o()),this.name=n,this[Ct]=Dt,this._data=new Set,this._atom=w(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;ut((function(){se((function(){var t,n;try{for(var r=S(e._data.values()),i=r.next();!i.done;i=r.next()){var o=i.value;e.delete(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}))}))},e.prototype.forEach=function(e,t){var n,r;try{for(var i=S(this),o=i.next();!o.done;o=i.next()){var a=o.value;e.call(t,a,a,this)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if(ie(this._atom),gt(this)&&!(r=vt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){ut((function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()}));var n=yt(this),r=n?{type:"add",object:this,newValue:e}:null;n&&_t(this,r)}return this},e.prototype.delete=function(e){var t=this;if(gt(this)&&!(r=vt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=yt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return ut((function(){t._atom.reportChanged(),t._data.delete(e)})),n&&_t(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Xt({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return Xt({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Rt(e)&&(e=e.toJS()),ut((function(){var n=be(!0);try{Array.isArray(e)||g(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&a("Cannot initialize set from "+e)}finally{_e(n)}})),this},e.prototype.observe=function(e,t){return bt(this,e)},e.prototype.intercept=function(e){return mt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Ct=b,Symbol.iterator)]=function(){return this.values()},e}(),Rt=f("ObservableSet",It),Pt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof we)r.set(t);else{if(gt(this)){if(!(o=vt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Oe.UNCHANGED){var i=yt(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;r.setNewValue(t),i&&_t(this,o)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new xe(r,F,this.name+"."+m(e)+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(gt(this)){var i=vt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new xe(t,n,this.name+"."+m(e),!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return zt[e]||(zt[e]={configurable:!0,enumerable:!0,get:function(){return this[b].read(e)},set:function(t){this[b].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r,i,o,a=this.target;n.name=n.name||this.name+"."+m(t),this.values.set(t,new we(n)),(e===a||(r=e,i=t,!(o=Object.getOwnPropertyDescriptor(r,i))||!1!==o.configurable&&!1!==o.writable))&&Object.defineProperty(e,t,function(e){return Ft[e]||(Ft[e]={configurable:Oe.computedConfigurable,enumerable:!1,get:function(){return Bt(this).read(e)},set:function(t){Bt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(gt(this)&&!(a=vt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Re();var n=yt(this),r=this.values.get(e),i=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:i,name:e}:null;n&&_t(this,a)}finally{Pe()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return bt(this,e)},e.prototype.intercept=function(e){return mt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=yt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&_t(this,r),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var r=S(this.values),i=r.next();!i.done;i=r.next()){var o=E(i.value,2),a=o[0];o[1]instanceof xe&&n.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}();function Nt(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=z),Object.prototype.hasOwnProperty.call(e,b))return e[b];h(e)||(t=(e.constructor.name||"ObservableObject")+"@"+o()),t||(t="ObservableObject@"+o());var r=new Pt(e,new Map,m(t),n);return d(e,b,r),r}var zt=Object.create(null),Ft=Object.create(null);function Bt(e){return e[b]||(R(e),e[b])}var jt=f("ObservableObjectAdministration",Pt);function Ut(e){return!!u(e)&&(R(e),jt(e[b]))}function Vt(e,t){if("object"==typeof e&&null!==e){if(Et(e))return void 0!==t&&a(!1),e[b].atom;if(Rt(e))return e[b];if(Lt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||a(!1),r)}var r;if(R(e),t&&!e[b]&&e[t],Ut(e))return t?((r=e[b].values.get(t))||a(!1),r):a(!1);if(x(e)||Ae(e)||qe(e))return e}else if("function"==typeof e&&qe(e[b]))return e[b];return a(!1)}function qt(e,t){return e||a("Expecting some object"),void 0!==t?qt(Vt(e,t)):x(e)||Ae(e)||qe(e)||Lt(e)||Rt(e)?e:(R(e),e[b]?e[b]:void a(!1))}var Ht=Object.prototype.toString;function $t(e,t,n){return void 0===n&&(n=-1),Wt(e,t,n)}function Wt(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var a=Ht.call(e);if(a!==Ht.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Gt(e),t=Gt(t);var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,c=t.constructor;if(l!==c&&!("function"==typeof l&&l instanceof l&&"function"==typeof c&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var u=(r=r||[]).length;u--;)if(r[u]===e)return i[u]===t;if(r.push(e),i.push(t),s){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Wt(e[u],t[u],n-1,r,i))return!1}else{var h=Object.keys(e),d=void 0;if(u=h.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!Yt(t,d=h[u])||!Wt(e[d],t[d],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function Gt(e){return Et(e)?e.slice():p(e)||Lt(e)||g(e)||Rt(e)?Array.from(e.entries()):e}function Yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xt(e){return e[Symbol.iterator]=Zt,e}function Zt(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:$e,extras:{getDebugName:function(e,t){return(void 0!==t?Vt(e,t):Ut(e)||Lt(e)||Rt(e)?qt(e):Vt(e)).name}},$mobx:b})},34411:e=>{var t=1e3,n=60*t,r=60*n,i=24*r;function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,a){a=a||{};var s,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===l&&!1===isNaN(e))return a.long?o(s=e,i,"day")||o(s,r,"hour")||o(s,n,"minute")||o(s,t,"second")||s+" ms":function(e){return e>=i?Math.round(e/i)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},32873:(e,t)=>{var n,r;void 0===(r="function"==typeof(n=function(){"use strict";var e="14.7.0";function t(e){e.parentElement.removeChild(e)}function n(e){return null!=e}function r(e){e.preventDefault()}function i(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function o(e,t,n){n>0&&(c(e,t),setTimeout((function(){u(e,t)}),n))}function a(e){return Math.max(Math.min(e,100),0)}function s(e){return Array.isArray(e)?e:[e]}function l(e){var t=(e=String(e)).split(".");return t.length>1?t[1].length:0}function c(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function u(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function h(e){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(e.compatMode||"");return{x:t?window.pageXOffset:n?e.documentElement.scrollLeft:e.body.scrollLeft,y:t?window.pageYOffset:n?e.documentElement.scrollTop:e.body.scrollTop}}function d(e,t){return 100/(t-e)}function f(e,t,n){return 100*t/(e[n+1]-e[n])}function p(e,t){for(var n=1;e>=t[n];)n+=1;return n}function g(e,t,n){if(n>=e.slice(-1)[0])return 100;var r=p(n,e),i=e[r-1],o=e[r],a=t[r-1],s=t[r];return a+function(e,t){return f(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}([i,o],n)/d(a,s)}function m(e,t,n,r){if(100===r)return r;var i=p(r,e),o=e[i-1],a=e[i];return n?r-o>(a-o)/2?a:o:t[i-1]?e[i-1]+function(e,t){return Math.round(e/t)*t}(r-e[i-1],t[i-1]):r}function v(e,t,n){var r;if("number"==typeof t&&(t=[t]),!Array.isArray(t))throw new Error("noUiSlider (14.7.0): 'range' contains invalid value.");if(!i(r="min"===e?0:"max"===e?100:parseFloat(e))||!i(t[0]))throw new Error("noUiSlider (14.7.0): 'range' value isn't numeric.");n.xPct.push(r),n.xVal.push(t[0]),r?n.xSteps.push(!isNaN(t[1])&&t[1]):isNaN(t[1])||(n.xSteps[0]=t[1]),n.xHighestCompleteStep.push(0)}function y(e,t,n){if(t)if(n.xVal[e]!==n.xVal[e+1]){n.xSteps[e]=f([n.xVal[e],n.xVal[e+1]],t,0)/d(n.xPct[e],n.xPct[e+1]);var r=(n.xVal[e+1]-n.xVal[e])/n.xNumSteps[e],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[e]+n.xNumSteps[e]*i;n.xHighestCompleteStep[e]=o}else n.xSteps[e]=n.xHighestCompleteStep[e]=n.xVal[e]}function b(e,t,n){var r;this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=t;var i=[];for(r in e)e.hasOwnProperty(r)&&i.push([e[r],r]);for(i.length&&"object"==typeof i[0][0]?i.sort((function(e,t){return e[0][0]-t[0][0]})):i.sort((function(e,t){return e[0]-t[0]})),r=0;r<i.length;r++)v(i[r][1],i[r][0],this);for(this.xNumSteps=this.xSteps.slice(0),r=0;r<this.xNumSteps.length;r++)y(r,this.xNumSteps[r],this)}b.prototype.getDistance=function(e){var t,n=[];for(t=0;t<this.xNumSteps.length-1;t++){var r=this.xNumSteps[t];if(r&&e/r%1!=0)throw new Error("noUiSlider (14.7.0): 'limit', 'margin' and 'padding' of "+this.xPct[t]+"% range must be divisible by step.");n[t]=f(this.xVal,e,t)}return n},b.prototype.getAbsoluteDistance=function(e,t,n){var r,i=0;if(e<this.xPct[this.xPct.length-1])for(;e>this.xPct[i+1];)i++;else e===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);n||e!==this.xPct[i+1]||i++;var o=1,a=t[i],s=0,l=0,c=0,u=0;for(r=n?(e-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):(this.xPct[i+1]-e)/(this.xPct[i+1]-this.xPct[i]);a>0;)s=this.xPct[i+1+u]-this.xPct[i+u],t[i+u]*o+100-100*r>100?(l=s*r,o=(a-100*r)/t[i+u],r=1):(l=t[i+u]*s/100*o,o=0),n?(c-=l,this.xPct.length+u>=1&&u--):(c+=l,this.xPct.length-u>=1&&u++),a=t[i+u]*o;return e+c},b.prototype.toStepping=function(e){return g(this.xVal,this.xPct,e)},b.prototype.fromStepping=function(e){return function(e,t,n){if(n>=100)return e.slice(-1)[0];var r=p(n,t),i=e[r-1],o=e[r],a=t[r-1];return function(e,t){return t*(e[1]-e[0])/100+e[0]}([i,o],(n-a)*d(a,t[r]))}(this.xVal,this.xPct,e)},b.prototype.getStep=function(e){return m(this.xPct,this.xSteps,this.snap,e)},b.prototype.getDefaultStep=function(e,t,n){var r=p(e,this.xPct);return(100===e||t&&e===this.xPct[r-1])&&(r=Math.max(r-1,1)),(this.xVal[r]-this.xVal[r-1])/n},b.prototype.getNearbySteps=function(e){var t=p(e,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},b.prototype.countStepDecimals=function(){var e=this.xNumSteps.map(l);return Math.max.apply(null,e)},b.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var _={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number},x={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},w=".__tooltips",A=".__aria";function k(e){if(function(e){return"object"==typeof e&&"function"==typeof e.to&&"function"==typeof e.from}(e))return!0;throw new Error("noUiSlider (14.7.0): 'format' requires 'to' and 'from' methods.")}function T(e,t){if(!i(t))throw new Error("noUiSlider (14.7.0): 'step' is not numeric.");e.singleStep=t}function S(e,t){if(!i(t))throw new Error("noUiSlider (14.7.0): 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function E(e,t){if(!i(t))throw new Error("noUiSlider (14.7.0): 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function C(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider (14.7.0): 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider (14.7.0): Missing 'min' or 'max' in 'range'.");if(t.min===t.max)throw new Error("noUiSlider (14.7.0): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new b(t,e.snap,e.singleStep)}function M(e,t){if(t=s(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider (14.7.0): 'start' option is incorrect.");e.handles=t.length,e.start=t}function O(e,t){if(e.snap=t,"boolean"!=typeof t)throw new Error("noUiSlider (14.7.0): 'snap' option must be a boolean.")}function L(e,t){if(e.animate=t,"boolean"!=typeof t)throw new Error("noUiSlider (14.7.0): 'animate' option must be a boolean.")}function D(e,t){if(e.animationDuration=t,"number"!=typeof t)throw new Error("noUiSlider (14.7.0): 'animationDuration' option must be a number.")}function I(e,t){var n,r=[!1];if("lower"===t?t=[!0,!1]:"upper"===t&&(t=[!1,!0]),!0===t||!1===t){for(n=1;n<e.handles;n++)r.push(t);r.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider (14.7.0): 'connect' option doesn't match handle count.");r=t}e.connect=r}function R(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider (14.7.0): 'orientation' option is invalid.")}}function P(e,t){if(!i(t))throw new Error("noUiSlider (14.7.0): 'margin' option must be numeric.");0!==t&&(e.margin=e.spectrum.getDistance(t))}function N(e,t){if(!i(t))throw new Error("noUiSlider (14.7.0): 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider (14.7.0): 'limit' option is only supported on linear sliders with 2 or more handles.")}function z(e,t){var n;if(!i(t)&&!Array.isArray(t))throw new Error("noUiSlider (14.7.0): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&2!==t.length&&!i(t[0])&&!i(t[1]))throw new Error("noUiSlider (14.7.0): 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==t){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],n=0;n<e.spectrum.xNumSteps.length-1;n++)if(e.padding[0][n]<0||e.padding[1][n]<0)throw new Error("noUiSlider (14.7.0): 'padding' option must be a positive number(s).");var r=t[0]+t[1],o=e.spectrum.xVal[0];if(r/(e.spectrum.xVal[e.spectrum.xVal.length-1]-o)>1)throw new Error("noUiSlider (14.7.0): 'padding' option must not exceed 100% of the range.")}}function F(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider (14.7.0): 'direction' option was not recognized.")}}function B(e,t){if("string"!=typeof t)throw new Error("noUiSlider (14.7.0): 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,i=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,s=t.indexOf("unconstrained")>=0;if(i){if(2!==e.handles)throw new Error("noUiSlider (14.7.0): 'fixed' behaviour must be used with 2 handles");P(e,e.start[1]-e.start[0])}if(s&&(e.margin||e.limit))throw new Error("noUiSlider (14.7.0): 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:n||o,drag:r,fixed:i,snap:o,hover:a,unconstrained:s}}function j(e,t){if(!1!==t)if(!0===t){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(!0)}else{if(e.tooltips=s(t),e.tooltips.length!==e.handles)throw new Error("noUiSlider (14.7.0): must pass a formatter for all handles.");e.tooltips.forEach((function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider (14.7.0): 'tooltips' must be passed a formatter or 'false'.")}))}}function U(e,t){e.ariaFormat=t,k(t)}function V(e,t){e.format=t,k(t)}function q(e,t){if(e.keyboardSupport=t,"boolean"!=typeof t)throw new Error("noUiSlider (14.7.0): 'keyboardSupport' option must be a boolean.")}function H(e,t){e.documentElement=t}function $(e,t){if("string"!=typeof t&&!1!==t)throw new Error("noUiSlider (14.7.0): 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function W(e,t){if("object"!=typeof t)throw new Error("noUiSlider (14.7.0): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var n in e.cssClasses={},t)t.hasOwnProperty(n)&&(e.cssClasses[n]=e.cssPrefix+t[n]);else e.cssClasses=t}function G(e){var t={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:_,format:_},r={step:{r:!1,t:T},keyboardPageMultiplier:{r:!1,t:S},keyboardDefaultStep:{r:!1,t:E},start:{r:!0,t:M},connect:{r:!0,t:I},direction:{r:!0,t:F},snap:{r:!1,t:O},animate:{r:!1,t:L},animationDuration:{r:!1,t:D},range:{r:!0,t:C},orientation:{r:!1,t:R},margin:{r:!1,t:P},limit:{r:!1,t:N},padding:{r:!1,t:z},behaviour:{r:!0,t:B},ariaFormat:{r:!1,t:U},format:{r:!1,t:V},tooltips:{r:!1,t:j},keyboardSupport:{r:!0,t:q},documentElement:{r:!1,t:H},cssPrefix:{r:!0,t:$},cssClasses:{r:!0,t:W}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:x,keyboardPageMultiplier:5,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(r).forEach((function(o){if(!n(e[o])&&void 0===i[o]){if(r[o].r)throw new Error("noUiSlider (14.7.0): '"+o+"' is required.");return!0}r[o].t(t,n(e[o])?e[o]:i[o])})),t.pips=e.pips;var o=document.createElement("div"),a=void 0!==o.style.msTransform,s=void 0!==o.style.transform;t.transformRule=s?"transform":a?"msTransform":"webkitTransform";return t.style=[["left","top"],["right","bottom"]][t.dir][t.ort],t}function Y(e,i,l){var d,f,p,g,m,v,y,b,_=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},x=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}(),k=e,T=i.spectrum,S=[],E=[],C=[],M=0,O={},L=e.ownerDocument,D=i.documentElement||L.documentElement,I=L.body,R="rtl"===L.dir||1===i.ort?0:100;function P(e,t){var n=L.createElement("div");return t&&c(n,t),e.appendChild(n),n}function N(e,t){var n=P(e,i.cssClasses.origin),r=P(n,i.cssClasses.handle);return P(r,i.cssClasses.touchArea),r.setAttribute("data-handle",t),i.keyboardSupport&&(r.setAttribute("tabindex","0"),r.addEventListener("keydown",(function(e){return function(e,t){if(B()||j(t))return!1;var n=["Left","Right"],r=["Down","Up"],o=["PageDown","PageUp"],a=["Home","End"];i.dir&&!i.ort?n.reverse():i.ort&&!i.dir&&(r.reverse(),o.reverse());var s,l=e.key.replace("Arrow",""),c=l===o[0],u=l===o[1],h=l===r[0]||l===n[0]||c,d=l===r[1]||l===n[1]||u,f=l===a[0],p=l===a[1];if(!(h||d||f||p))return!0;if(e.preventDefault(),d||h){var g=i.keyboardPageMultiplier,m=h?0:1,v=ge(t)[m];if(null===v)return!1;!1===v&&(v=T.getDefaultStep(E[t],h,i.keyboardDefaultStep)),(u||c)&&(v*=g),v=Math.max(v,1e-7),v*=h?-1:1,s=S[t]+v}else s=p?i.spectrum.xVal[i.spectrum.xVal.length-1]:i.spectrum.xVal[0];return ue(t,T.toStepping(s),!0,!0),ie("slide",t),ie("update",t),ie("change",t),ie("set",t),!1}(e,t)}))),r.setAttribute("role","slider"),r.setAttribute("aria-orientation",i.ort?"vertical":"horizontal"),0===t?c(r,i.cssClasses.handleLower):t===i.handles-1&&c(r,i.cssClasses.handleUpper),n}function z(e,t){return!!t&&P(e,i.cssClasses.connect)}function F(e,t){return!!i.tooltips[t]&&P(e.firstChild,i.cssClasses.tooltip)}function B(){return k.hasAttribute("disabled")}function j(e){return f[e].hasAttribute("disabled")}function U(){m&&(re("update"+w),m.forEach((function(e){e&&t(e)})),m=null)}function V(){U(),m=f.map(F),ne("update"+w,(function(e,t,n){if(m[t]){var r=e[t];!0!==i.tooltips[t]&&(r=i.tooltips[t].to(n[t])),m[t].innerHTML=r}}))}function q(e,t,n){var r=L.createElement("div"),o=[];o[0]=i.cssClasses.valueNormal,o[1]=i.cssClasses.valueLarge,o[2]=i.cssClasses.valueSub;var a=[];a[0]=i.cssClasses.markerNormal,a[1]=i.cssClasses.markerLarge,a[2]=i.cssClasses.markerSub;var s=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],l=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];function u(e,t){var n=t===i.cssClasses.value,r=n?o:a;return t+" "+(n?s:l)[i.ort]+" "+r[e]}return c(r,i.cssClasses.pips),c(r,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(e).forEach((function(o){!function(e,o,a){if(-1!==(a=t?t(o,a):a)){var s=P(r,!1);s.className=u(a,i.cssClasses.marker),s.style[i.style]=e+"%",a>0&&((s=P(r,!1)).className=u(a,i.cssClasses.value),s.setAttribute("data-value",o),s.style[i.style]=e+"%",s.innerHTML=n.to(o))}}(o,e[o][0],e[o][1])})),r}function H(){g&&(t(g),g=null)}function $(e){H();var t=e.mode,n=e.density||1,r=e.filter||!1,i=function(e,t,n){var r,i={},o=T.xVal[0],a=T.xVal[T.xVal.length-1],s=!1,l=!1,c=0;return(r=n.slice().sort((function(e,t){return e-t})),n=r.filter((function(e){return!this[e]&&(this[e]=!0)}),{}))[0]!==o&&(n.unshift(o),s=!0),n[n.length-1]!==a&&(n.push(a),l=!0),n.forEach((function(r,o){var a,u,h,d,f,p,g,m,v,y,b=r,_=n[o+1],x="steps"===t;if(x&&(a=T.xNumSteps[o]),a||(a=_-b),!1!==b)for(void 0===_&&(_=b),a=Math.max(a,1e-7),u=b;u<=_;u=(u+a).toFixed(7)/1){for(m=(f=(d=T.toStepping(u))-c)/e,y=f/(v=Math.round(m)),h=1;h<=v;h+=1)i[(p=c+h*y).toFixed(5)]=[T.fromStepping(p),0];g=n.indexOf(u)>-1?1:x?2:0,!o&&s&&u!==_&&(g=0),u===_&&l||(i[d.toFixed(5)]=[u,g]),c=d}})),i}(n,t,function(e,t,n){if("range"===e||"steps"===e)return T.xVal;if("count"===e){if(t<2)throw new Error("noUiSlider (14.7.0): 'values' (>= 2) required for mode 'count'.");var r=t-1,i=100/r;for(t=[];r--;)t[r]=r*i;t.push(100),e="positions"}return"positions"===e?t.map((function(e){return T.fromStepping(n?T.getStep(e):e)})):"values"===e?n?t.map((function(e){return T.fromStepping(T.getStep(T.toStepping(e)))})):t:void 0}(t,e.values||!1,e.stepped||!1)),o=e.format||{to:Math.round};return g=k.appendChild(q(i,r,o))}function W(){var e=d.getBoundingClientRect(),t="offset"+["Width","Height"][i.ort];return 0===i.ort?e.width||d[t]:e.height||d[t]}function Y(e,t,n,r){var o=function(o){return!!(o=function(e,t,n){var r,i,o=0===e.type.indexOf("touch"),a=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer");if(0===e.type.indexOf("MSPointer")&&(s=!0),"mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(o){var l=function(e){return e.target===n||n.contains(e.target)||e.target.shadowRoot&&e.target.shadowRoot.contains(n)};if("touchstart"===e.type){var c=Array.prototype.filter.call(e.touches,l);if(c.length>1)return!1;r=c[0].pageX,i=c[0].pageY}else{var u=Array.prototype.find.call(e.changedTouches,l);if(!u)return!1;r=u.pageX,i=u.pageY}}return t=t||h(L),(a||s)&&(r=e.clientX+t.x,i=e.clientY+t.y),e.pageOffset=t,e.points=[r,i],e.cursor=a||s,e}(o,r.pageOffset,r.target||t))&&!(B()&&!r.doNotReject)&&(a=k,s=i.cssClasses.tap,!((a.classList?a.classList.contains(s):new RegExp("\\b"+s+"\\b").test(a.className))&&!r.doNotReject))&&!(e===_.start&&void 0!==o.buttons&&o.buttons>1)&&(!r.hover||!o.buttons)&&(x||o.preventDefault(),o.calcPoint=o.points[i.ort],void n(o,r));var a,s},a=[];return e.split(" ").forEach((function(e){t.addEventListener(e,o,!!x&&{passive:!0}),a.push([e,o])})),a}function X(e){var t,n,r,o,s,l,c=100*(e-(t=d,n=i.ort,r=t.getBoundingClientRect(),o=t.ownerDocument,s=o.documentElement,l=h(o),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(l.x=0),n?r.top+l.y-s.clientTop:r.left+l.x-s.clientLeft))/W();return c=a(c),i.dir?100-c:c}function Z(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&J(e,t)}function K(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return J(e,t);var n=(i.dir?-1:1)*(e.calcPoint-t.startCalcPoint);se(n>0,100*n/t.baseSize,t.locations,t.handleNumbers)}function J(e,t){t.handle&&(u(t.handle,i.cssClasses.active),M-=1),t.listeners.forEach((function(e){D.removeEventListener(e[0],e[1])})),0===M&&(u(k,i.cssClasses.drag),ce(),e.cursor&&(I.style.cursor="",I.removeEventListener("selectstart",r))),t.handleNumbers.forEach((function(e){ie("change",e),ie("set",e),ie("end",e)}))}function Q(e,t){if(t.handleNumbers.some(j))return!1;var n;1===t.handleNumbers.length&&(n=f[t.handleNumbers[0]].children[0],M+=1,c(n,i.cssClasses.active)),e.stopPropagation();var o=[],a=Y(_.move,D,K,{target:e.target,handle:n,listeners:o,startCalcPoint:e.calcPoint,baseSize:W(),pageOffset:e.pageOffset,handleNumbers:t.handleNumbers,buttonsProperty:e.buttons,locations:E.slice()}),s=Y(_.end,D,J,{target:e.target,handle:n,listeners:o,doNotReject:!0,handleNumbers:t.handleNumbers}),l=Y("mouseout",D,Z,{target:e.target,handle:n,listeners:o,doNotReject:!0,handleNumbers:t.handleNumbers});o.push.apply(o,a.concat(s,l)),e.cursor&&(I.style.cursor=getComputedStyle(e.target).cursor,f.length>1&&c(k,i.cssClasses.drag),I.addEventListener("selectstart",r,!1)),t.handleNumbers.forEach((function(e){ie("start",e)}))}function ee(e){e.stopPropagation();var t=X(e.calcPoint),n=function(e){var t=100,n=!1;return f.forEach((function(r,i){if(!j(i)){var o=E[i],a=Math.abs(o-e);(a<t||a<=t&&e>o||100===a&&100===t)&&(n=i,t=a)}})),n}(t);if(!1===n)return!1;i.events.snap||o(k,i.cssClasses.tap,i.animationDuration),ue(n,t,!0,!0),ce(),ie("slide",n,!0),ie("update",n,!0),ie("change",n,!0),ie("set",n,!0),i.events.snap&&Q(e,{handleNumbers:[n]})}function te(e){var t=X(e.calcPoint),n=T.getStep(t),r=T.fromStepping(n);Object.keys(O).forEach((function(e){"hover"===e.split(".")[0]&&O[e].forEach((function(e){e.call(v,r)}))}))}function ne(e,t){O[e]=O[e]||[],O[e].push(t),"update"===e.split(".")[0]&&f.forEach((function(e,t){ie("update",t)}))}function re(e){var t=e&&e.split(".")[0],n=t?e.substring(t.length):e;Object.keys(O).forEach((function(e){var r=e.split(".")[0],i=e.substring(r.length);t&&t!==r||n&&n!==i||function(e){return e===A||e===w}(i)&&n!==i||delete O[e]}))}function ie(e,t,n){Object.keys(O).forEach((function(r){var o=r.split(".")[0];e===o&&O[r].forEach((function(e){e.call(v,S.map(i.format.to),t,S.slice(),n||!1,E.slice(),v)}))}))}function oe(e,t,n,r,o,s){var l;return f.length>1&&!i.events.unconstrained&&(r&&t>0&&(l=T.getAbsoluteDistance(e[t-1],i.margin,0),n=Math.max(n,l)),o&&t<f.length-1&&(l=T.getAbsoluteDistance(e[t+1],i.margin,1),n=Math.min(n,l))),f.length>1&&i.limit&&(r&&t>0&&(l=T.getAbsoluteDistance(e[t-1],i.limit,0),n=Math.min(n,l)),o&&t<f.length-1&&(l=T.getAbsoluteDistance(e[t+1],i.limit,1),n=Math.max(n,l))),i.padding&&(0===t&&(l=T.getAbsoluteDistance(0,i.padding[0],0),n=Math.max(n,l)),t===f.length-1&&(l=T.getAbsoluteDistance(100,i.padding[1],1),n=Math.min(n,l))),!((n=a(n=T.getStep(n)))===e[t]&&!s)&&n}function ae(e,t){var n=i.ort;return(n?t:e)+", "+(n?e:t)}function se(e,t,n,r){var i=n.slice(),o=[!e,e],a=[e,!e];r=r.slice(),e&&r.reverse(),r.length>1?r.forEach((function(e,n){var r=oe(i,e,i[e]+t,o[n],a[n],!1);!1===r?t=0:(t=r-i[e],i[e]=r)})):o=a=[!0];var s=!1;r.forEach((function(e,r){s=ue(e,n[e]+t,o[r],a[r])||s})),s&&r.forEach((function(e){ie("update",e),ie("slide",e)}))}function le(e,t){return i.dir?100-e-t:e}function ce(){C.forEach((function(e){var t=E[e]>50?-1:1,n=3+(f.length+t*e);f[e].style.zIndex=n}))}function ue(e,t,n,r,o){return o||(t=oe(E,e,t,n,r,!1)),!1!==t&&(function(e,t){E[e]=t,S[e]=T.fromStepping(t);var n="translate("+ae(10*(le(t,0)-R)+"%","0")+")";f[e].style[i.transformRule]=n,he(e),he(e+1)}(e,t),!0)}function he(e){if(p[e]){var t=0,n=100;0!==e&&(t=E[e-1]),e!==p.length-1&&(n=E[e]);var r=n-t,o="translate("+ae(le(t,r)+"%","0")+")",a="scale("+ae(r/100,"1")+")";p[e].style[i.transformRule]=o+" "+a}}function de(e,t){return null===e||!1===e||void 0===e?E[t]:("number"==typeof e&&(e=String(e)),e=i.format.from(e),!1===(e=T.toStepping(e))||isNaN(e)?E[t]:e)}function fe(e,t,n){var r=s(e),a=void 0===E[0];t=void 0===t||!!t,i.animate&&!a&&o(k,i.cssClasses.tap,i.animationDuration),C.forEach((function(e){ue(e,de(r[e],e),!0,!1,n)}));for(var l=1===C.length?0:1;l<C.length;++l)C.forEach((function(e){ue(e,E[e],!0,!0,n)}));ce(),C.forEach((function(e){ie("update",e),null!==r[e]&&t&&ie("set",e)}))}function pe(){var e=S.map(i.format.to);return 1===e.length?e[0]:e}function ge(e){var t=E[e],n=T.getNearbySteps(t),r=S[e],o=n.thisStep.step,a=null;if(i.snap)return[r-n.stepBefore.startValue||null,n.stepAfter.startValue-r||null];!1!==o&&r+o>n.stepAfter.startValue&&(o=n.stepAfter.startValue-r),a=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?o=null:0===t&&(a=null);var s=T.countStepDecimals();return null!==o&&!1!==o&&(o=Number(o.toFixed(s))),null!==a&&!1!==a&&(a=Number(a.toFixed(s))),[a,o]}return c(b=k,i.cssClasses.target),0===i.dir?c(b,i.cssClasses.ltr):c(b,i.cssClasses.rtl),0===i.ort?c(b,i.cssClasses.horizontal):c(b,i.cssClasses.vertical),c(b,"rtl"===getComputedStyle(b).direction?i.cssClasses.textDirectionRtl:i.cssClasses.textDirectionLtr),d=P(b,i.cssClasses.base),function(e,t){var n=P(t,i.cssClasses.connects);f=[],(p=[]).push(z(n,e[0]));for(var r=0;r<i.handles;r++)f.push(N(t,r)),C[r]=r,p.push(z(n,e[r+1]))}(i.connect,d),(y=i.events).fixed||f.forEach((function(e,t){Y(_.start,e.children[0],Q,{handleNumbers:[t]})})),y.tap&&Y(_.start,d,ee,{}),y.hover&&Y(_.move,d,te,{hover:!0}),y.drag&&p.forEach((function(e,t){if(!1!==e&&0!==t&&t!==p.length-1){var n=f[t-1],r=f[t],o=[e];c(e,i.cssClasses.draggable),y.fixed&&(o.push(n.children[0]),o.push(r.children[0])),o.forEach((function(e){Y(_.start,e,Q,{handles:[n,r],handleNumbers:[t-1,t]})}))}})),fe(i.start),i.pips&&$(i.pips),i.tooltips&&V(),re("update"+A),ne("update"+A,(function(e,t,n,r,o){C.forEach((function(e){var t=f[e],r=oe(E,e,0,!0,!0,!0),a=oe(E,e,100,!0,!0,!0),s=o[e],l=i.ariaFormat.to(n[e]);r=T.fromStepping(r).toFixed(1),a=T.fromStepping(a).toFixed(1),s=T.fromStepping(s).toFixed(1),t.children[0].setAttribute("aria-valuemin",r),t.children[0].setAttribute("aria-valuemax",a),t.children[0].setAttribute("aria-valuenow",s),t.children[0].setAttribute("aria-valuetext",l)}))})),v={destroy:function(){for(var e in re(A),re(w),i.cssClasses)i.cssClasses.hasOwnProperty(e)&&u(k,i.cssClasses[e]);for(;k.firstChild;)k.removeChild(k.firstChild);delete k.noUiSlider},steps:function(){return C.map(ge)},on:ne,off:re,get:pe,set:fe,setHandle:function(e,t,n,r){if(!((e=Number(e))>=0&&e<C.length))throw new Error("noUiSlider (14.7.0): invalid handle number, got: "+e);ue(e,de(t,e),!0,!0,r),ie("update",e),n&&ie("set",e)},reset:function(e){fe(i.start,e)},__moveHandles:function(e,t,n){se(e,t,E,n)},options:l,updateOptions:function(e,t){var r=pe(),o=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];o.forEach((function(t){void 0!==e[t]&&(l[t]=e[t])}));var a=G(l);o.forEach((function(t){void 0!==e[t]&&(i[t]=a[t])})),T=a.spectrum,i.margin=a.margin,i.limit=a.limit,i.padding=a.padding,i.pips?$(i.pips):H(),i.tooltips?V():U(),E=[],fe(n(e.start)?e.start:r,t)},target:k,removePips:H,removeTooltips:U,getTooltips:function(){return m},getOrigins:function(){return f},pips:$}}return{__spectrum:b,version:e,cssClasses:x,create:function(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider (14.7.0): create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider (14.7.0): Slider was already initialized.");var n=Y(e,G(t),t);return e.noUiSlider=n,n}}})?n.apply(t,[]):n)||(e.exports=r)},42363:function(e,t,n){var r,i;r=function(){var e,t,n,r,i,o={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function c(e,t){this._input=e,this._value=t}return(e=function(n){var r,i,a,s;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in o)if((s="function"==typeof o[i].regexps.unformat?o[i].regexps.unformat():o[i].regexps.unformat)&&n.match(s)){a=o[i].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new c(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof c},e._=t={numberToFormat:function(t,n,r){var i,o,s,l,c,u,h,d,f=a[e.options.currentLocale],p=!1,g=!1,m="",v=1e12,y=1e9,b=1e6,_="",x=!1;if(t=t||0,o=Math.abs(t),e._.includes(n,"(")?(p=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(c=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(m=" "),n=n.replace(new RegExp(m+"a[kmbt]?"),""),o>=v&&!i||"t"===i?(m+=f.abbreviations.trillion,t/=v):o<v&&o>=y&&!i||"b"===i?(m+=f.abbreviations.billion,t/=y):o<y&&o>=b&&!i||"m"===i?(m+=f.abbreviations.million,t/=b):(o<b&&o>=1e3&&!i||"k"===i)&&(m+=f.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(g=!0,n=n.replace("[.]",".")),s=t.toString().split(".")[0],l=n.split(".")[1],u=n.indexOf(","),d=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),_=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):_=e._.toFixed(t,l.length,r),s=_.split(".")[0],_=e._.includes(_,".")?f.delimiters.decimal+_.split(".")[1]:"",g&&0===Number(_.slice(1))&&(_="")):s=e._.toFixed(t,0,r),m&&!i&&Number(s)>=1e3&&m!==f.abbreviations.trillion)switch(s=String(Number(s)/1e3),m){case f.abbreviations.thousand:m=f.abbreviations.million;break;case f.abbreviations.million:m=f.abbreviations.billion;break;case f.abbreviations.billion:m=f.abbreviations.trillion}if(e._.includes(s,"-")&&(s=s.slice(1),x=!0),s.length<d)for(var w=d-s.length;w>0;w--)s="0"+s;return u>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f.delimiters.thousands)),0===n.indexOf(".")&&(s=""),h=s+_+(m||""),p?h=(p&&x?"(":"")+h+(p&&x?")":""):c>=0?h=0===c?(x?"-":"+")+h:h+(x?"-":"+"):x&&(h="-"+h),h},stringToNumber:function(e){var t,n,r,i=a[l.currentLocale],o=e,s={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==i.delimiters.decimal&&(e=e.replace(/\./g,"").replace(i.delimiters.decimal,".")),s)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[t]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),o.match(r)){n*=Math.pow(10,s[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o<i&&!(o in r);)o++;if(o>=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;o<i;o++)o in r&&(n=t(n,r[o],o,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce((function(e,n){var r=t.multiplier(n);return e>r?e:r}),1)},toFixed:function(e,t,n,r){var i,o,a,s,l=e.toString().split("."),c=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,c),t):c,a=Math.pow(10,i),s=(n(e+"e+"+i)/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}},e.options=l,e.formats=o,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in s)l[e]=s[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,o,a,s,l,c,u;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{c=e.localeData(n)}catch(t){c=e.localeData(e.locale())}return o=c.currency.symbol,s=c.abbreviations,r=c.delimiters.decimal,i="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,!(null!==(u=t.match(/^[^\d]+/))&&(t=t.substr(1),u[0]!==o)||null!==(u=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),u[0]!==s.thousand&&u[0]!==s.million&&u[0]!==s.billion&&u[0]!==s.trillion)||(l=new RegExp(i+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=c.prototype={clone:function(){return e(this)},format:function(t,n){var r,i,a,s=this._value,c=t||l.defaultFormat;if(n=n||Math.round,0===s&&null!==l.zeroFormat)i=l.zeroFormat;else if(null===s&&null!==l.nullFormat)i=l.nullFormat;else{for(r in o)if(c.match(o[r].regexps.format)){a=o[r].format;break}i=(a=a||e._.numberToFormat)(s,c,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],(function(e,t,r,i){return e+Math.round(n*t)}),0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],(function(e,t,r,i){return e-Math.round(n*t)}),Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],(function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)*Math.round(n*o)/Math.round(o*o)}),1),this},divide:function(e){return this._value=t.reduce([this._value,e],(function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)/Math.round(n*o)})),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,o=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(e){return n.suffixes.indexOf(e)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(t,i,o){var a,s,l,c=e._.includes(i,"ib")?r:n,u=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=c.suffixes.length;a++)if(s=Math.pow(c.base,a),l=Math.pow(c.base,a+1),null===t||0===t||t>=s&&t<l){u+=c.suffixes[a],s>0&&(t/=s);break}return e._.numberToFormat(t,i,o)+u},unformat:function(t){var i,o,a=e._.stringToNumber(t);if(a){for(i=n.suffixes.length-1;i>=0;i--){if(e._.includes(t,n.suffixes[i])){o=Math.pow(n.base,i);break}if(e._.includes(t,r.suffixes[i])){o=Math.pow(r.base,i);break}}a*=o||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,o,a=e.locales[e.options.currentLocale],s={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(s.before=s.before.replace(/[\-\(]/,""),s.after=s.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(s.before,"-")&&!e._.includes(s.before,"(")&&(s.before="-"+s.before),o=0;o<s.before.length;o++)switch(s.before[o]){case"$":i=e._.insert(i,a.currency.symbol,o);break;case" ":i=e._.insert(i," ",o+a.currency.symbol.length-1)}for(o=s.after.length-1;o>=0;o--)switch(s.after[o]){case"$":i=o===s.after.length-1?i+a.currency.symbol:e._.insert(i,a.currency.symbol,-(s.after.length-(1+o)));break;case" ":i=o===s.after.length-1?i+" ":e._.insert(i," ",-(s.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],(function(t,n,r,i){var o=e._.correctionFactor(t,n);return t*o*(n*o)/(o*o)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],o=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(t),e._.numberToFormat(t,n,r)+o}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,o=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),o=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e},void 0===(i=r.call(t,n,t,e))||(e.exports=i)},23764:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,l=i(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var h=0;h<s.length;h++)r.call(a,s[h])&&(l[s[h]]=a[s[h]])}}return l}},31859:e=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var l=n[a]={exports:{}};t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(r,i,o,a,s,l,c,u,h){"use strict";var d=e("crypto");function f(e,t){return function(e,t){var n;if(void 0===(n="passthrough"!==t.algorithm?d.createHash(t.algorithm):new b).write&&(n.write=n.update,n.end=n.update),y(t,n).dispatch(e),n.update||n.end(""),n.digest)return n.digest("buffer"===t.encoding?void 0:t.encoding);var r=n.read();return"buffer"!==t.encoding?r.toString(t.encoding):r}(e,t=m(e,t))}(n=t.exports=f).sha1=function(e){return f(e)},n.keys=function(e){return f(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return f(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return f(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var p=d.getHashes?d.getHashes().slice():["sha1","md5"];p.push("passthrough");var g=["buffer","hex","binary","base64"];function m(e,t){t=t||{};var n={};if(n.algorithm=t.algorithm||"sha1",n.encoding=t.encoding||"hex",n.excludeValues=!!t.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===t.ignoreUnknown,n.respectType=!1!==t.respectType,n.respectFunctionNames=!1!==t.respectFunctionNames,n.respectFunctionProperties=!1!==t.respectFunctionProperties,n.unorderedArrays=!0===t.unorderedArrays,n.unorderedSets=!1!==t.unorderedSets,n.unorderedObjects=!1!==t.unorderedObjects,n.replacer=t.replacer||void 0,n.excludeKeys=t.excludeKeys||void 0,void 0===e)throw new Error("Object argument required.");for(var r=0;r<p.length;++r)p[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=p[r]);if(-1===p.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+p.join(", "));if(-1===g.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+g.join(", "));return n}function v(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function y(e,t,n){function r(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return n=n||[],{dispatch:function(t){return e.replacer&&(t=e.replacer(t)),this["_"+(null===t?"null":typeof t)](t)},_object:function(t){var i,a=Object.prototype.toString.call(t),s=/\[object (.*)\]/i.exec(a);if(s=(s=s?s[1]:"unknown:["+a+"]").toLowerCase(),0<=(i=n.indexOf(t)))return this.dispatch("[CIRCULAR:"+i+"]");if(n.push(t),void 0!==o&&o.isBuffer&&o.isBuffer(t))return r("buffer:"),r(t);if("object"===s||"function"===s||"asyncfunction"===s){var l=Object.keys(t);e.unorderedObjects&&(l=l.sort()),!1===e.respectType||v(t)||l.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(l=l.filter((function(t){return!e.excludeKeys(t)}))),r("object:"+l.length+":");var c=this;return l.forEach((function(n){c.dispatch(n),r(":"),e.excludeValues||c.dispatch(t[n]),r(",")}))}if(!this["_"+s]){if(e.ignoreUnknown)return r("["+s+"]");throw new Error('Unknown object type "'+s+'"')}this["_"+s](t)},_array:function(t,i){i=void 0!==i?i:!1!==e.unorderedArrays;var o=this;if(r("array:"+t.length+":"),!i||t.length<=1)return t.forEach((function(e){return o.dispatch(e)}));var a=[],s=t.map((function(t){var r=new b,i=n.slice();return y(e,r,i).dispatch(t),a=a.concat(i.slice(n.length)),r.read().toString()}));return n=n.concat(a),s.sort(),this._array(s,!1)},_date:function(e){return r("date:"+e.toJSON())},_symbol:function(e){return r("symbol:"+e.toString())},_error:function(e){return r("error:"+e.toString())},_boolean:function(e){return r("bool:"+e.toString())},_string:function(e){r("string:"+e.length+":"),r(e.toString())},_function:function(t){r("fn:"),v(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r("number:"+e.toString())},_xml:function(e){return r("xml:"+e.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(e){return r("regex:"+e.toString())},_uint8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return r("url:"+e.toString())},_map:function(t){r("map:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_set:function(t){r("set:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_file:function(e){return r("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see path_to_url "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_bigint:function(e){return r("bigint:"+e.toString())},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function b(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}n.writeToStream=function(e,t,n){return void 0===n&&(n=t,t={}),y(t=m(e,t),n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_7eac155c.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,n){(function(e,t,r,i,o,a,s,l,c){!function(e){"use strict";var t="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),i="0".charCodeAt(0),o="a".charCodeAt(0),a="A".charCodeAt(0),s="-".charCodeAt(0),l="_".charCodeAt(0);function c(e){var t=e.charCodeAt(0);return t===n||t===s?62:t===r||t===l?63:t<i?-1:t<i+10?t-i+26+26:t<a+26?t-a:t<o+26?t-o+26:void 0}e.toByteArray=function(e){var n,r;if(0<e.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.length,o="="===e.charAt(i-2)?2:"="===e.charAt(i-1)?1:0,a=new t(3*e.length/4-o),s=0<o?e.length-4:e.length,l=0;function u(e){a[l++]=e}for(n=0;n<s;n+=4,0)u((16711680&(r=c(e.charAt(n))<<18|c(e.charAt(n+1))<<12|c(e.charAt(n+2))<<6|c(e.charAt(n+3))))>>16),u((65280&r)>>8),u(255&r);return 2==o?u(255&(r=c(e.charAt(n))<<2|c(e.charAt(n+1))>>4)):1==o&&(u((r=c(e.charAt(n))<<10|c(e.charAt(n+1))<<4|c(e.charAt(n+2))>>2)>>8&255),u(255&r)),a},e.fromByteArray=function(e){var t,n,r,i,o=e.length%3,a="";function s(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-o;t<r;t+=3)a+=s((i=n=(e[t]<<16)+(e[t+1]<<8)+e[t+2])>>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(o){case 1:a+=s((n=e[e.length-1])>>2),a+=s(n<<4&63),a+="==";break;case 2:a+=s((n=(e[e.length-2]<<8)+e[e.length-1])>>10),a+=s(n>>4&63),a+=s(n<<2&63),a+="="}return a}}(void 0===n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,n){(function(t,r,i,o,a,s,l,c,u){var h=e("base64-js"),d=e("ieee754");function i(e,t,n){if(!(this instanceof i))return new i(e,t,n);var r,o,a,s,l,c=typeof e;if("base64"===t&&"string"==c)for(e=(r=e).trim?r.trim():r.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==c)o=E(e);else if("string"==c)o=i.byteLength(e,t);else{if("object"!=c)throw new Error("First argument needs to be a number, array or string.");o=E(e.length)}if(i._useTypedArrays?a=i._augment(new Uint8Array(o)):((a=this).length=o,a._isBuffer=!0),i._useTypedArrays&&"number"==typeof e.byteLength)a._set(e);else if(C(l=e)||i.isBuffer(l)||l&&"object"==typeof l&&"number"==typeof l.length)for(s=0;s<o;s++)i.isBuffer(e)?a[s]=e.readUInt8(s):a[s]=e[s];else if("string"==c)a.write(e,0,t);else if("number"==c&&!i._useTypedArrays&&!n)for(s=0;s<o;s++)a[s]=0;return a}function f(e,t,n,r){r||(z("boolean"==typeof n,"missing or invalid endian"),z(null!=t,"missing offset"),z(t+1<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return n?(i=e[t],t+1<o&&(i|=e[t+1]<<8)):(i=e[t]<<8,t+1<o&&(i|=e[t+1])),i}function p(e,t,n,r){r||(z("boolean"==typeof n,"missing or invalid endian"),z(null!=t,"missing offset"),z(t+3<e.length,"Trying to read beyond buffer length"));var i,o=e.length;if(!(o<=t))return n?(t+2<o&&(i=e[t+2]<<16),t+1<o&&(i|=e[t+1]<<8),i|=e[t],t+3<o&&(i+=e[t+3]<<24>>>0)):(t+1<o&&(i=e[t+1]<<16),t+2<o&&(i|=e[t+2]<<8),t+3<o&&(i|=e[t+3]),i+=e[t]<<24>>>0),i}function g(e,t,n,r){if(r||(z("boolean"==typeof n,"missing or invalid endian"),z(null!=t,"missing offset"),z(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=f(e,t,n,!0);return 32768&i?-1*(65535-i+1):i}}function m(e,t,n,r){if(r||(z("boolean"==typeof n,"missing or invalid endian"),z(null!=t,"missing offset"),z(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t)){var i=p(e,t,n,!0);return 2147483648&i?-1*(4294967295-i+1):i}}function v(e,t,n,r){return r||(z("boolean"==typeof n,"missing or invalid endian"),z(t+3<e.length,"Trying to read beyond buffer length")),d.read(e,t,n,23,4)}function y(e,t,n,r){return r||(z("boolean"==typeof n,"missing or invalid endian"),z(t+7<e.length,"Trying to read beyond buffer length")),d.read(e,t,n,52,8)}function b(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+1<e.length,"trying to write beyond buffer length"),R(t,65535));var o=e.length;if(!(o<=n))for(var a=0,s=Math.min(o-n,2);a<s;a++)e[n+a]=(t&255<<8*(r?a:1-a))>>>8*(r?a:1-a)}function _(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+3<e.length,"trying to write beyond buffer length"),R(t,4294967295));var o=e.length;if(!(o<=n))for(var a=0,s=Math.min(o-n,4);a<s;a++)e[n+a]=t>>>8*(r?a:3-a)&255}function x(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+1<e.length,"Trying to write beyond buffer length"),P(t,32767,-32768)),e.length<=n||b(e,0<=t?t:65535+t+1,n,r,i)}function w(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+3<e.length,"Trying to write beyond buffer length"),P(t,2147483647,-2147483648)),e.length<=n||_(e,0<=t?t:4294967295+t+1,n,r,i)}function A(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+3<e.length,"Trying to write beyond buffer length"),N(t,34028234663852886e22,-34028234663852886e22)),e.length<=n||d.write(e,t,n,r,23,4)}function k(e,t,n,r,i){i||(z(null!=t,"missing value"),z("boolean"==typeof r,"missing or invalid endian"),z(null!=n,"missing offset"),z(n+7<e.length,"Trying to write beyond buffer length"),N(t,17976931348623157e292,-17976931348623157e292)),e.length<=n||d.write(e,t,n,r,52,8)}n.Buffer=i,n.SlowBuffer=i,n.INSPECT_MAX_BYTES=50,i.poolSize=8192,i._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=O(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=L(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},i.concat=function(e,t){if(z(C(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new i(0);if(1===e.length)return e[0];if("number"!=typeof t)for(o=t=0;o<e.length;o++)t+=e[o].length;for(var n=new i(t),r=0,o=0;o<e.length;o++){var a=e[o];a.copy(n,r),r+=a.length}return n},i.prototype.write=function(e,t,n,r){var o;isFinite(t)?isFinite(n)||(r=n,n=void 0):(o=r,r=t,t=n,n=o),t=Number(t)||0;var a,s,l,c,u,h,d,f=this.length-t;switch((!n||f<(n=Number(n)))&&(n=f),r=String(r||"utf8").toLowerCase()){case"hex":a=function(e,t,n,r){n=Number(n)||0;var o=e.length-n;(!r||o<(r=Number(r)))&&(r=o);var a=t.length;z(a%2==0,"Invalid hex string"),a/2<r&&(r=a/2);for(var s=0;s<r;s++){var l=parseInt(t.substr(2*s,2),16);z(!isNaN(l),"Invalid hex string"),e[n+s]=l}return i._charsWritten=2*s,s}(this,e,t,n);break;case"utf8":case"utf-8":this,u=e,h=t,d=n,a=i._charsWritten=D(O(u),this,h,d);break;case"ascii":case"binary":a=function(e,t,n,r){return i._charsWritten=D(function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}(this,e,t,n);break;case"base64":this,s=e,l=t,c=n,a=i._charsWritten=D(L(s),this,l,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":a=function(e,t,n,r){return i._charsWritten=D(function(e){for(var t,n,r,i=[],o=0;o<e.length;o++)n=(t=e.charCodeAt(o))>>8,r=t%256,i.push(r),i.push(n);return i}(t),e,n,r)}(this,e,t,n);break;default:throw new Error("Unknown encoding")}return a},i.prototype.toString=function(e,t,n){var r,i,o,a,s=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):n=s.length)===t)return"";switch(e){case"hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",o=t;o<n;o++)i+=M(e[o]);return i}(s,t,n);break;case"utf8":case"utf-8":r=function(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;o<n;o++)e[o]<=127?(r+=I(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+I(i)}(s,t,n);break;case"ascii":case"binary":r=function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;i++)r+=String.fromCharCode(e[i]);return r}(s,t,n);break;case"base64":i=s,a=n,r=0===(o=t)&&a===i.length?h.fromByteArray(i):h.fromByteArray(i.slice(o,a));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=function(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}(s,t,n);break;default:throw new Error("Unknown encoding")}return r},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},i.prototype.copy=function(e,t,n,r){if(n=n||0,r||0===r||(r=this.length),t=t||0,r!==n&&0!==e.length&&0!==this.length){z(n<=r,"sourceEnd < sourceStart"),z(0<=t&&t<e.length,"targetStart out of bounds"),z(0<=n&&n<this.length,"sourceStart out of bounds"),z(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;if(o<100||!i._useTypedArrays)for(var a=0;a<o;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+o),t)}},i.prototype.slice=function(e,t){var n=this.length;if(e=S(e,n,0),t=S(t,n,n),i._useTypedArrays)return i._augment(this.subarray(e,t));for(var r=t-e,o=new i(r,void 0,!0),a=0;a<r;a++)o[a]=this[a+e];return o},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.readUInt8=function(e,t){if(t||(z(null!=e,"missing offset"),z(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},i.prototype.readUInt16LE=function(e,t){return f(this,e,!0,t)},i.prototype.readUInt16BE=function(e,t){return f(this,e,!1,t)},i.prototype.readUInt32LE=function(e,t){return p(this,e,!0,t)},i.prototype.readUInt32BE=function(e,t){return p(this,e,!1,t)},i.prototype.readInt8=function(e,t){if(t||(z(null!=e,"missing offset"),z(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){return g(this,e,!0,t)},i.prototype.readInt16BE=function(e,t){return g(this,e,!1,t)},i.prototype.readInt32LE=function(e,t){return m(this,e,!0,t)},i.prototype.readInt32BE=function(e,t){return m(this,e,!1,t)},i.prototype.readFloatLE=function(e,t){return v(this,e,!0,t)},i.prototype.readFloatBE=function(e,t){return v(this,e,!1,t)},i.prototype.readDoubleLE=function(e,t){return y(this,e,!0,t)},i.prototype.readDoubleBE=function(e,t){return y(this,e,!1,t)},i.prototype.writeUInt8=function(e,t,n){n||(z(null!=e,"missing value"),z(null!=t,"missing offset"),z(t<this.length,"trying to write beyond buffer length"),R(e,255)),t>=this.length||(this[t]=e)},i.prototype.writeUInt16LE=function(e,t,n){b(this,e,t,!0,n)},i.prototype.writeUInt16BE=function(e,t,n){b(this,e,t,!1,n)},i.prototype.writeUInt32LE=function(e,t,n){_(this,e,t,!0,n)},i.prototype.writeUInt32BE=function(e,t,n){_(this,e,t,!1,n)},i.prototype.writeInt8=function(e,t,n){n||(z(null!=e,"missing value"),z(null!=t,"missing offset"),z(t<this.length,"Trying to write beyond buffer length"),P(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},i.prototype.writeInt16LE=function(e,t,n){x(this,e,t,!0,n)},i.prototype.writeInt16BE=function(e,t,n){x(this,e,t,!1,n)},i.prototype.writeInt32LE=function(e,t,n){w(this,e,t,!0,n)},i.prototype.writeInt32BE=function(e,t,n){w(this,e,t,!1,n)},i.prototype.writeFloatLE=function(e,t,n){A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){k(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){k(this,e,t,!1,n)},i.prototype.fill=function(e,t,n){if(e=e||0,t=t||0,n=n||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),z("number"==typeof e&&!isNaN(e),"value is not a number"),z(t<=n,"end < start"),n!==t&&0!==this.length){z(0<=t&&t<this.length,"start out of bounds"),z(0<=n&&n<=this.length,"end out of bounds");for(var r=t;r<n;r++)this[r]=e}},i.prototype.inspect=function(){for(var e=[],t=this.length,r=0;r<t;r++)if(e[r]=M(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]="...";break}return"<Buffer "+e.join(" ")+">"},i.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(i._useTypedArrays)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t<n;t+=1)e[t]=this[t];return e.buffer};var T=i.prototype;function S(e,t,n){return"number"!=typeof e?n:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function E(e){return(e=~~Math.ceil(+e))<0?0:e}function C(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function O(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(e.charCodeAt(n));else{var i=n;55296<=r&&r<=57343&&n++;for(var o=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%"),a=0;a<o.length;a++)t.push(parseInt(o[a],16))}}return t}function L(e){return h.toByteArray(e)}function D(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function I(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function R(e,t){z("number"==typeof e,"cannot write a non-number as a number"),z(0<=e,"specified a negative value for writing an unsigned value"),z(e<=t,"value is larger than maximum value for type"),z(Math.floor(e)===e,"value has a fractional component")}function P(e,t,n){z("number"==typeof e,"cannot write a non-number as a number"),z(e<=t,"value larger than maximum allowed value"),z(n<=e,"value smaller than minimum allowed value"),z(Math.floor(e)===e,"value has a fractional component")}function N(e,t,n){z("number"==typeof e,"cannot write a non-number as a number"),z(e<=t,"value larger than maximum allowed value"),z(n<=e,"value smaller than minimum allowed value")}function z(e,t){if(!e)throw new Error(t||"Failed assertion")}i._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=T.get,e.set=T.set,e.write=T.write,e.toString=T.toString,e.toLocaleString=T.toString,e.toJSON=T.toJSON,e.copy=T.copy,e.slice=T.slice,e.readUInt8=T.readUInt8,e.readUInt16LE=T.readUInt16LE,e.readUInt16BE=T.readUInt16BE,e.readUInt32LE=T.readUInt32LE,e.readUInt32BE=T.readUInt32BE,e.readInt8=T.readInt8,e.readInt16LE=T.readInt16LE,e.readInt16BE=T.readInt16BE,e.readInt32LE=T.readInt32LE,e.readInt32BE=T.readInt32BE,e.readFloatLE=T.readFloatLE,e.readFloatBE=T.readFloatBE,e.readDoubleLE=T.readDoubleLE,e.readDoubleBE=T.readDoubleBE,e.writeUInt8=T.writeUInt8,e.writeUInt16LE=T.writeUInt16LE,e.writeUInt16BE=T.writeUInt16BE,e.writeUInt32LE=T.writeUInt32LE,e.writeUInt32BE=T.writeUInt32BE,e.writeInt8=T.writeInt8,e.writeInt16LE=T.writeInt16LE,e.writeInt16BE=T.writeInt16BE,e.writeInt32LE=T.writeInt32LE,e.writeInt32BE=T.writeInt32BE,e.writeFloatLE=T.writeFloatLE,e.writeFloatBE=T.writeFloatBE,e.writeDoubleLE=T.writeDoubleLE,e.writeDoubleBE=T.writeDoubleBE,e.fill=T.fill,e.inspect=T.inspect,e.toArrayBuffer=T.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(e,t,n){(function(n,r,i,o,a,s,l,c,u){i=e("buffer").Buffer;var h=new i(4);h.fill(0),t.exports={hash:function(e,t,n,r){return i.isBuffer(e)||(e=new i(e)),function(e,t,n){for(var r=new i(t),o=n?r.writeInt32BE:r.writeInt32LE,a=0;a<e.length;a++)o.call(r,e[a],4*a,!0);return r}(t(function(e,t){var n;e.length%4!=0&&(n=e.length+(4-e.length%4),e=i.concat([e,h],n));for(var r=[],o=t?e.readInt32BE:e.readInt32LE,a=0;a<e.length;a+=4)r.push(o.call(e,a));return r}(e,r),8*e.length),n,r)}}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],5:[function(e,t,n){(function(t,r,i,o,a,s,l,c,u){i=e("buffer").Buffer;var h=e("./sha"),d=e("./sha256"),f=e("./rng"),p={sha1:h,sha256:d,md5:e("./md5")},g=64,m=new i(g);function v(e,t){var n=p[e=e||"sha1"],r=[];return n||y("algorithm:",e,"is not yet supported"),{update:function(e){return i.isBuffer(e)||(e=new i(e)),r.push(e),e.length,this},digest:function(e){var o=i.concat(r),a=t?function(e,t,n){i.isBuffer(t)||(t=new i(t)),i.isBuffer(n)||(n=new i(n)),t.length>g?t=e(t):t.length<g&&(t=i.concat([t,m],g));for(var r=new i(g),o=new i(g),a=0;a<g;a++)r[a]=54^t[a],o[a]=92^t[a];var s=e(i.concat([r,n]));return e(i.concat([o,s]))}(n,t,o):n(o);return r=null,e?a.toString(e):a}}}function y(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","path_to_url"].join("\n"))}m.fill(0),n.createHash=function(e){return v(e)},n.createHmac=v,n.randomBytes=function(e,t){if(!t||!t.call)return new i(f(e));try{t.call(this,void 0,new i(f(e)))}catch(e){t(e)}},function(e,t){for(var n in e)t(e[n])}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],(function(e){n[e]=function(){y("sorry,",e,"is not implemented yet")}}))}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:10}],6:[function(e,t,n){(function(n,r,i,o,a,s,l,c,u){var h=e("./helpers");function d(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,l=r,c=i,u=o;n=p(n,r,i,o,e[a+0],7,-680876936),o=p(o,n,r,i,e[a+1],12,-389564586),i=p(i,o,n,r,e[a+2],17,606105819),r=p(r,i,o,n,e[a+3],22,-1044525330),n=p(n,r,i,o,e[a+4],7,-176418897),o=p(o,n,r,i,e[a+5],12,1200080426),i=p(i,o,n,r,e[a+6],17,-1473231341),r=p(r,i,o,n,e[a+7],22,-45705983),n=p(n,r,i,o,e[a+8],7,1770035416),o=p(o,n,r,i,e[a+9],12,-1958414417),i=p(i,o,n,r,e[a+10],17,-42063),r=p(r,i,o,n,e[a+11],22,-1990404162),n=p(n,r,i,o,e[a+12],7,1804603682),o=p(o,n,r,i,e[a+13],12,-40341101),i=p(i,o,n,r,e[a+14],17,-1502002290),n=g(n,r=p(r,i,o,n,e[a+15],22,1236535329),i,o,e[a+1],5,-165796510),o=g(o,n,r,i,e[a+6],9,-1069501632),i=g(i,o,n,r,e[a+11],14,643717713),r=g(r,i,o,n,e[a+0],20,-373897302),n=g(n,r,i,o,e[a+5],5,-701558691),o=g(o,n,r,i,e[a+10],9,38016083),i=g(i,o,n,r,e[a+15],14,-660478335),r=g(r,i,o,n,e[a+4],20,-405537848),n=g(n,r,i,o,e[a+9],5,568446438),o=g(o,n,r,i,e[a+14],9,-1019803690),i=g(i,o,n,r,e[a+3],14,-187363961),r=g(r,i,o,n,e[a+8],20,1163531501),n=g(n,r,i,o,e[a+13],5,-1444681467),o=g(o,n,r,i,e[a+2],9,-51403784),i=g(i,o,n,r,e[a+7],14,1735328473),n=m(n,r=g(r,i,o,n,e[a+12],20,-1926607734),i,o,e[a+5],4,-378558),o=m(o,n,r,i,e[a+8],11,-2022574463),i=m(i,o,n,r,e[a+11],16,1839030562),r=m(r,i,o,n,e[a+14],23,-35309556),n=m(n,r,i,o,e[a+1],4,-1530992060),o=m(o,n,r,i,e[a+4],11,1272893353),i=m(i,o,n,r,e[a+7],16,-155497632),r=m(r,i,o,n,e[a+10],23,-1094730640),n=m(n,r,i,o,e[a+13],4,681279174),o=m(o,n,r,i,e[a+0],11,-358537222),i=m(i,o,n,r,e[a+3],16,-722521979),r=m(r,i,o,n,e[a+6],23,76029189),n=m(n,r,i,o,e[a+9],4,-640364487),o=m(o,n,r,i,e[a+12],11,-421815835),i=m(i,o,n,r,e[a+15],16,530742520),n=v(n,r=m(r,i,o,n,e[a+2],23,-995338651),i,o,e[a+0],6,-198630844),o=v(o,n,r,i,e[a+7],10,1126891415),i=v(i,o,n,r,e[a+14],15,-1416354905),r=v(r,i,o,n,e[a+5],21,-57434055),n=v(n,r,i,o,e[a+12],6,1700485571),o=v(o,n,r,i,e[a+3],10,-1894986606),i=v(i,o,n,r,e[a+10],15,-1051523),r=v(r,i,o,n,e[a+1],21,-2054922799),n=v(n,r,i,o,e[a+8],6,1873313359),o=v(o,n,r,i,e[a+15],10,-30611744),i=v(i,o,n,r,e[a+6],15,-1560198380),r=v(r,i,o,n,e[a+13],21,1309151649),n=v(n,r,i,o,e[a+4],6,-145523070),o=v(o,n,r,i,e[a+11],10,-1120210379),i=v(i,o,n,r,e[a+2],15,718787259),r=v(r,i,o,n,e[a+9],21,-343485551),n=y(n,s),r=y(r,l),i=y(i,c),o=y(o,u)}return Array(n,r,i,o)}function f(e,t,n,r,i,o){return y((a=y(y(t,e),y(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function p(e,t,n,r,i,o,a){return f(t&n|~t&r,e,t,i,o,a)}function g(e,t,n,r,i,o,a){return f(t&r|n&~r,e,t,i,o,a)}function m(e,t,n,r,i,o,a){return f(t^n^r,e,t,i,o,a)}function v(e,t,n,r,i,o,a){return f(n^(t|~r),e,t,i,o,a)}function y(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return h.hash(e,d,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,n){(function(e,n,r,i,o,a,s,l,c){var u;u=function(e){for(var t,n=new Array(e),r=0;r<e;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n},t.exports=u}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,n){(function(n,r,i,o,a,s,l,c,u){var h=e("./helpers");function d(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r,i,o,a,s=Array(80),l=1732584193,c=-271733879,u=-1732584194,h=271733878,d=-1009589776,g=0;g<e.length;g+=16){for(var m=l,v=c,y=u,b=h,_=d,x=0;x<80;x++){s[x]=x<16?e[g+x]:p(s[x-3]^s[x-8]^s[x-14]^s[x-16],1);var w=f(f(p(l,5),(i=c,o=u,a=h,(r=x)<20?i&o|~i&a:!(r<40)&&r<60?i&o|i&a|o&a:i^o^a)),f(f(d,s[x]),(n=x)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514));d=h,h=u,u=p(c,30),c=l,l=w}l=f(l,m),c=f(c,v),u=f(u,y),h=f(h,b),d=f(d,_)}return Array(l,c,u,h,d)}function f(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function p(e,t){return e<<t|e>>>32-t}t.exports=function(e){return h.hash(e,d,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,n){(function(n,r,i,o,a,s,l,c,u){function h(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function d(e,t){return e>>>t|e<<32-t}function f(e,t){var n,r,i,o,a,s,l,c,u,f,p=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),g=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),m=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var v,y,b,_,x,w,A,k,T=0;T<e.length;T+=16){n=g[0],r=g[1],i=g[2],o=g[3],a=g[4],s=g[5],l=g[6],c=g[7];for(var S=0;S<64;S++)m[S]=S<16?e[S+T]:h(h(h(d(k=m[S-2],17)^d(k,19)^k>>>10,m[S-7]),d(A=m[S-15],7)^d(A,18)^A>>>3),m[S-16]),u=h(h(h(h(c,d(w=a,6)^d(w,11)^d(w,25)),(x=a)&s^~x&l),p[S]),m[S]),f=h(d(_=n,2)^d(_,13)^d(_,22),(v=n)&(y=r)^v&(b=i)^y&b),c=l,l=s,s=a,a=h(o,u),o=i,i=r,r=n,n=h(u,f);g[0]=h(n,g[0]),g[1]=h(r,g[1]),g[2]=h(i,g[2]),g[3]=h(o,g[3]),g[4]=h(a,g[4]),g[5]=h(s,g[5]),g[6]=h(l,g[6]),g[7]=h(c,g[7])}return g}var p=e("./helpers");t.exports=function(e){return p.hash(e,f,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],10:[function(e,t,n){(function(e,n,r,i,o,a,s,l,c){function u(){}(e=t.exports={}).nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",(function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<n.length&&n.shift()())}),!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=u,e.addListener=u,e.once=u,e.off=u,e.removeListener=u,e.removeAllListeners=u,e.emit=u,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,n){(function(e,t,r,i,o,a,s,l,c){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;0<u;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;0<u;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(t+=1<=a+h?d/l:d*Math.pow(2,1-h))*l&&(a++,l/=2),u<=a+h?(s=0,a=u):1<=a+h?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));8<=i;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;0<c;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)},93417:e=>{"use strict";var t;e.exports=function(e){var n,r="&"+e+";";return(t=t||document.createElement("i")).innerHTML=r,(59!==(n=t.textContent).charCodeAt(n.length-1)||"semi"===e)&&(n!==r&&n)}},55716:(e,t,n)=>{e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("../src/lib"),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(a,i[o])}},{"../src/lib":503}],2:[function(e,t,n){"use strict";t.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":1114}],3:[function(e,t,n){"use strict";t.exports=e("../src/traces/bar")},{"../src/traces/bar":656}],4:[function(e,t,n){"use strict";t.exports=e("../src/traces/barpolar")},{"../src/traces/barpolar":669}],5:[function(e,t,n){"use strict";t.exports=e("../src/traces/box")},{"../src/traces/box":679}],6:[function(e,t,n){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":364}],7:[function(e,t,n){"use strict";t.exports=e("../src/traces/candlestick")},{"../src/traces/candlestick":688}],8:[function(e,t,n){"use strict";t.exports=e("../src/traces/carpet")},{"../src/traces/carpet":707}],9:[function(e,t,n){"use strict";t.exports=e("../src/traces/choropleth")},{"../src/traces/choropleth":721}],10:[function(e,t,n){"use strict";t.exports=e("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":728}],11:[function(e,t,n){"use strict";t.exports=e("../src/traces/cone")},{"../src/traces/cone":734}],12:[function(e,t,n){"use strict";t.exports=e("../src/traces/contour")},{"../src/traces/contour":749}],13:[function(e,t,n){"use strict";t.exports=e("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":760}],14:[function(e,t,n){"use strict";t.exports=e("../src/core")},{"../src/core":481}],15:[function(e,t,n){"use strict";t.exports=e("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":768}],16:[function(e,t,n){"use strict";t.exports=e("../src/transforms/filter")},{"../src/transforms/filter":1115}],17:[function(e,t,n){"use strict";t.exports=e("../src/traces/funnel")},{"../src/traces/funnel":778}],18:[function(e,t,n){"use strict";t.exports=e("../src/traces/funnelarea")},{"../src/traces/funnelarea":787}],19:[function(e,t,n){"use strict";t.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":1116}],20:[function(e,t,n){"use strict";t.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":800}],21:[function(e,t,n){"use strict";t.exports=e("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":811}],22:[function(e,t,n){"use strict";t.exports=e("../src/traces/histogram")},{"../src/traces/histogram":823}],23:[function(e,t,n){"use strict";t.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":829}],24:[function(e,t,n){"use strict";t.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":833}],25:[function(e,t,n){"use strict";t.exports=e("../src/traces/icicle")},{"../src/traces/icicle":839}],26:[function(e,t,n){"use strict";t.exports=e("../src/traces/image")},{"../src/traces/image":852}],27:[function(e,t,n){"use strict";var r=e("./core");r.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./funnel"),e("./waterfall"),e("./image"),e("./pie"),e("./sunburst"),e("./treemap"),e("./icicle"),e("./funnelarea"),e("./scatter3d"),e("./surface"),e("./isosurface"),e("./volume"),e("./mesh3d"),e("./cone"),e("./streamtube"),e("./scattergeo"),e("./choropleth"),e("./scattergl"),e("./splom"),e("./pointcloud"),e("./heatmapgl"),e("./parcoords"),e("./parcats"),e("./scattermapbox"),e("./choroplethmapbox"),e("./densitymapbox"),e("./sankey"),e("./indicator"),e("./table"),e("./carpet"),e("./scattercarpet"),e("./contourcarpet"),e("./ohlc"),e("./candlestick"),e("./scatterpolar"),e("./scatterpolargl"),e("./barpolar"),e("./scattersmith"),e("./aggregate"),e("./filter"),e("./groupby"),e("./sort"),e("./calendars")]),t.exports=r},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./icicle":25,"./image":26,"./indicator":28,"./isosurface":29,"./mesh3d":30,"./ohlc":31,"./parcats":32,"./parcoords":33,"./pie":34,"./pointcloud":35,"./sankey":36,"./scatter3d":37,"./scattercarpet":38,"./scattergeo":39,"./scattergl":40,"./scattermapbox":41,"./scatterpolar":42,"./scatterpolargl":43,"./scattersmith":44,"./scatterternary":45,"./sort":46,"./splom":47,"./streamtube":48,"./sunburst":49,"./surface":50,"./table":51,"./treemap":52,"./violin":53,"./volume":54,"./waterfall":55}],28:[function(e,t,n){"use strict";t.exports=e("../src/traces/indicator")},{"../src/traces/indicator":860}],29:[function(e,t,n){"use strict";t.exports=e("../src/traces/isosurface")},{"../src/traces/isosurface":866}],30:[function(e,t,n){"use strict";t.exports=e("../src/traces/mesh3d")},{"../src/traces/mesh3d":871}],31:[function(e,t,n){"use strict";t.exports=e("../src/traces/ohlc")},{"../src/traces/ohlc":876}],32:[function(e,t,n){"use strict";t.exports=e("../src/traces/parcats")},{"../src/traces/parcats":885}],33:[function(e,t,n){"use strict";t.exports=e("../src/traces/parcoords")},{"../src/traces/parcoords":895}],34:[function(e,t,n){"use strict";t.exports=e("../src/traces/pie")},{"../src/traces/pie":906}],35:[function(e,t,n){"use strict";t.exports=e("../src/traces/pointcloud")},{"../src/traces/pointcloud":915}],36:[function(e,t,n){"use strict";t.exports=e("../src/traces/sankey")},{"../src/traces/sankey":921}],37:[function(e,t,n){"use strict";t.exports=e("../src/traces/scatter3d")},{"../src/traces/scatter3d":959}],38:[function(e,t,n){"use strict";t.exports=e("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":966}],39:[function(e,t,n){"use strict";t.exports=e("../src/traces/scattergeo")},{"../src/traces/scattergeo":974}],40:[function(e,t,n){"use strict";t.exports=e("../src/traces/scattergl")},{"../src/traces/scattergl":987}],41:[function(e,t,n){"use strict";t.exports=e("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":997}],42:[function(e,t,n){"use strict";t.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1005}],43:[function(e,t,n){"use strict";t.exports=e("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1012}],44:[function(e,t,n){"use strict";t.exports=e("../src/traces/scattersmith")},{"../src/traces/scattersmith":1019}],45:[function(e,t,n){"use strict";t.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":1027}],46:[function(e,t,n){"use strict";t.exports=e("../src/transforms/sort")},{"../src/transforms/sort":1118}],47:[function(e,t,n){"use strict";t.exports=e("../src/traces/splom")},{"../src/traces/splom":1036}],48:[function(e,t,n){"use strict";t.exports=e("../src/traces/streamtube")},{"../src/traces/streamtube":1044}],49:[function(e,t,n){"use strict";t.exports=e("../src/traces/sunburst")},{"../src/traces/sunburst":1052}],50:[function(e,t,n){"use strict";t.exports=e("../src/traces/surface")},{"../src/traces/surface":1061}],51:[function(e,t,n){"use strict";t.exports=e("../src/traces/table")},{"../src/traces/table":1069}],52:[function(e,t,n){"use strict";t.exports=e("../src/traces/treemap")},{"../src/traces/treemap":1080}],53:[function(e,t,n){"use strict";t.exports=e("../src/traces/violin")},{"../src/traces/violin":1093}],54:[function(e,t,n){"use strict";t.exports=e("../src/traces/volume")},{"../src/traces/volume":1101}],55:[function(e,t,n){"use strict";t.exports=e("../src/traces/waterfall")},{"../src/traces/waterfall":1109}],56:[function(e,t,n){var r,i;r=this,i=function(e,t,n,r,i){"use strict";function o(e){return e.target.depth}function a(e,t){return e.sourceLinks.length?e.depth:t-1}function s(e){return function(){return e}}i=i&&i.hasOwnProperty("default")?i.default:i;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c(e,t){return h(e.source,t.source)||e.index-t.index}function u(e,t){return h(e.target,t.target)||e.index-t.index}function h(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function d(e){return e.value}function f(e){return(e.y0+e.y1)/2}function p(e){return f(e.source)}function g(e){return f(e.target)}function m(e){return e.index}function v(e){return e.nodes}function y(e){return e.links}function b(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function _(e,t){return t(e)}var x=25,w=10;function A(e,t,n){var r=0;if(null===n){for(var o=[],a=0;a<e.links.length;a++){var s=e.links[a],l=s.source.index,c=s.target.index;o[l]||(o[l]=[]),o[c]||(o[c]=[]),-1===o[l].indexOf(c)&&o[l].push(c)}var u=i(o);u.sort((function(e,t){return e.length-t.length}));var h={};for(a=0;a<u.length;a++){var d=u[a].slice(-2);h[d[0]]||(h[d[0]]={}),h[d[0]][d[1]]=!0}e.links.forEach((function(e){var t=e.target.index,n=e.source.index;t===n||h[n]&&h[n][t]?(e.circular=!0,e.circularLinkID=r,r+=1):e.circular=!1}))}else e.links.forEach((function(e){e.source[n]<e.target[n]?e.circular=!1:(e.circular=!0,e.circularLinkID=r,r+=1)}))}function k(e,t){var n=0,r=0;e.links.forEach((function(i){i.circular&&(i.source.circularLinkType||i.target.circularLinkType?i.circularLinkType=i.source.circularLinkType?i.source.circularLinkType:i.target.circularLinkType:i.circularLinkType=n<r?"top":"bottom","top"==i.circularLinkType?n+=1:r+=1,e.nodes.forEach((function(e){_(e,t)!=_(i.source,t)&&_(e,t)!=_(i.target,t)||(e.circularLinkType=i.circularLinkType)})))})),e.links.forEach((function(e){e.circular&&(e.source.circularLinkType==e.target.circularLinkType&&(e.circularLinkType=e.source.circularLinkType),$(e,t)&&(e.circularLinkType=e.source.circularLinkType))}))}function T(e){var t=Math.abs(e.y1-e.y0),n=Math.abs(e.target.x0-e.source.x1);return Math.atan(n/t)}function S(e,t){var n=0;e.sourceLinks.forEach((function(e){n=e.circular&&!$(e,t)?n+1:n}));var r=0;return e.targetLinks.forEach((function(e){r=e.circular&&!$(e,t)?r+1:r})),n+r}function E(e){var t=e.source.sourceLinks,n=0;t.forEach((function(e){n=e.circular?n+1:n}));var r=e.target.targetLinks,i=0;return r.forEach((function(e){i=e.circular?i+1:i})),!(n>1||i>1)}function C(e,t,n){return e.sort(O),e.forEach((function(r,i){var o,a,s=0;if($(r,n)&&E(r))r.circularPathData.verticalBuffer=s+r.width/2;else{for(var l=0;l<i;l++)if(o=e[i],a=e[l],!(o.source.column<a.target.column||o.target.column>a.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=c>s?c:s}r.circularPathData.verticalBuffer=s+r.width/2}})),e}function M(e,n,i,o){var a=t.min(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),C(e.links.filter((function(e){return"top"==e.circularLinkType})),n,o),C(e.links.filter((function(e){return"bottom"==e.circularLinkType})),n,o),e.links.forEach((function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+w,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,$(t,o)&&E(t))t.circularPathData.leftSmallArcRadius=w+t.width/2,t.circularPathData.leftLargeArcRadius=w+t.width/2,t.circularPathData.rightSmallArcRadius=w+t.width/2,t.circularPathData.rightLargeArcRadius=w+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s=t.source.column,l=t.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==t.circularLinkType?c.sort(D):c.sort(L);var u=0;c.forEach((function(e,r){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=w+t.width/2+u,t.circularPathData.leftLargeArcRadius=w+t.width/2+r*n+u),u+=e.width})),s=t.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==t.circularLinkType?c.sort(R):c.sort(I),u=0,c.forEach((function(e,r){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=w+t.width/2+u,t.circularPathData.rightLargeArcRadius=w+t.width/2+r*n+u),u+=e.width})),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(i,t.source.y1,t.target.y1)+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=a-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}if(t.circular)t.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(t);else{var h=r.linkHorizontal().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));t.path=h(t)}}))}function O(e,t){return P(e)==P(t)?"bottom"==e.circularLinkType?D(e,t):L(e,t):P(t)-P(e)}function L(e,t){return e.y0-t.y0}function D(e,t){return t.y0-e.y0}function I(e,t){return e.y1-t.y1}function R(e,t){return t.y1-e.y1}function P(e){return e.target.column-e.source.column}function N(e){return e.target.x0-e.source.x1}function z(e,t){var n=T(e),r=N(t)/Math.tan(n);return"up"==H(e)?e.y1+r:e.y1-r}function F(e,t){var n=T(e),r=N(t)/Math.tan(n);return"up"==H(e)?e.y1-r:e.y1+r}function B(e,t,n,r){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var o=i.source.column+1,a=i.target.column-1,s=1,l=a-o+1;for(s=1;o<=a;o++,s++)e.nodes.forEach((function(a){if(a.column==o){var c,u=s/(l+1),h=Math.pow(1-u,3),d=3*u*Math.pow(1-u,2),f=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),g=h*i.y0+d*i.y0+f*i.y1+p*i.y1,m=g-i.width/2,v=g+i.width/2;m>a.y0&&m<a.y1?(c=a.y1-m+10,c="bottom"==a.circularLinkType?c:-c,a=j(a,c,t,n),e.nodes.forEach((function(e){var i,o;_(e,r)!=_(a,r)&&e.column==a.column&&(o=e,(i=a).y0>o.y0&&i.y0<o.y1||i.y1>o.y0&&i.y1<o.y1||i.y0<o.y0&&i.y1>o.y1)&&j(e,c,t,n)}))):(v>a.y0&&v<a.y1||m<a.y0&&v>a.y1)&&(c=v-a.y0+10,a=j(a,c,t,n),e.nodes.forEach((function(e){_(e,r)!=_(a,r)&&e.column==a.column&&e.y0<a.y1&&e.y1>a.y1&&j(e,c,t,n)})))}}))}}))}function j(e,t,n,r){return e.y0+t>=n&&e.y1+t<=r&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function U(e,t,n,r){e.nodes.forEach((function(i){r&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var o=e.links.filter((function(e){return _(e.source,n)==_(i,n)})),a=o.length;a>1&&o.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!q(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var n=F(t,e);return e.y1-n}if(t.target.column>e.target.column)return F(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;o.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),o.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var n=t+1,r=0;n<a;n++)r+=o[n].width;e.y0=i.y1-r-e.width/2}}))}))}function V(e,t,n){e.nodes.forEach((function(t){var r=e.links.filter((function(e){return _(e.target,n)==_(t,n)})),i=r.length;i>1&&r.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!q(e,t))return e.y0-t.y0;if(t.source.column<e.source.column){var n=z(t,e);return e.y0-n}if(e.source.column<t.source.column)return z(e,t)-t.y0}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.source.column===t.source.column?e.source.y1-t.source.y1:e.source.column-t.source.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.source.column===t.source.column?e.source.y1-t.source.y1:t.source.column-e.source.column:"top"==e.circularLinkType?-1:1:void 0}));var o=t.y0;r.forEach((function(e){e.y1=o+e.width/2,o+=e.width})),r.forEach((function(e,n){if("bottom"==e.circularLinkType){for(var o=n+1,a=0;o<i;o++)a+=r[o].width;e.y1=t.y1-a-e.width/2}}))}))}function q(e,t){return H(e)==H(t)}function H(e){return e.y0-e.y1>0?"up":"down"}function $(e,t){return _(e.source,t)==_(e.target,t)}function W(e,n,r){var i=e.nodes,o=e.links,a=!1,s=!1;if(o.forEach((function(e){"top"==e.circularLinkType?a=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==a||0==s){var l=t.min(i,(function(e){return e.y0})),c=(r-n)/(t.max(i,(function(e){return e.y1}))-l);i.forEach((function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t})),o.forEach((function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c}))}}e.sankeyCircular=function(){var e,r,i=0,o=0,_=1,T=1,E=24,C=m,O=a,L=v,D=y,I=32,R=2,P=null;function N(){var e={nodes:L.apply(null,arguments),links:D.apply(null,arguments)};z(e),A(e,0,P),F(e),j(e),k(e,C),q(e,I,C),H(e);for(var t=4,n=0;n<t;n++)U(e,T,C),V(e,0,C),B(e,o,T,C),U(e,T,C),V(e,0,C);return W(e,o,T),M(e,R,T,C),e}function z(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=n.map(e.nodes,C);return e.links.forEach((function(e,n){e.index=n;var r=e.source,i=e.target;"object"!==(void 0===r?"undefined":l(r))&&(r=e.source=b(t,r)),"object"!==(void 0===i?"undefined":l(i))&&(i=e.target=b(t,i)),r.sourceLinks.push(e),i.targetLinks.push(e)})),e}function F(e){e.nodes.forEach((function(e){e.partOfCycle=!1,e.value=Math.max(t.sum(e.sourceLinks,d),t.sum(e.targetLinks,d)),e.sourceLinks.forEach((function(t){t.circular&&(e.partOfCycle=!0,e.circularLinkType=t.circularLinkType)})),e.targetLinks.forEach((function(t){t.circular&&(e.partOfCycle=!0,e.circularLinkType=t.circularLinkType)}))}))}function j(e){var t,n,r;for(t=e.nodes,n=[],r=0;t.length;++r,t=n,n=[])t.forEach((function(e){e.depth=r,e.sourceLinks.forEach((function(e){n.indexOf(e.target)<0&&!e.circular&&n.push(e.target)}))}));for(t=e.nodes,n=[],r=0;t.length;++r,t=n,n=[])t.forEach((function(e){e.height=r,e.targetLinks.forEach((function(e){n.indexOf(e.source)<0&&!e.circular&&n.push(e.source)}))}));e.nodes.forEach((function(e){e.column=Math.floor(O.call(null,e,r))}))}function q(a,s,l){var c=n.nest().key((function(e){return e.column})).sortKeys(t.ascending).entries(a.nodes).map((function(e){return e.values}));(function(n){if(r){var s=1/0;c.forEach((function(e){var t=T*r/(e.length+1);s=t<s?t:s})),e=s}var l=t.min(c,(function(n){return(T-o-(n.length-1)*e)/t.sum(n,d)}));l*=.3,a.links.forEach((function(e){e.width=e.value*l}));var u=function(e){var n=0,r=0,i=0,o=0,a=t.max(e.nodes,(function(e){return e.column}));return e.links.forEach((function(e){e.circular&&("top"==e.circularLinkType?n+=e.width:r+=e.width,0==e.target.column&&(o+=e.width),e.source.column==a&&(i+=e.width))})),{top:n=n>0?n+x+w:n,bottom:r=r>0?r+x+w:r,left:o=o>0?o+x+w:o,right:i=i>0?i+x+w:i}}(a),h=function(e,n){var r=t.max(e.nodes,(function(e){return e.column})),a=_-i,s=T-o,l=a/(a+n.right+n.left),c=s/(s+n.top+n.bottom);return i=i*l+n.left,_=0==n.right?_:_*l,o=o*c+n.top,T*=c,e.nodes.forEach((function(e){e.x0=i+e.column*((_-i-E)/r),e.x1=e.x0+E})),c}(a,u);l*=h,a.links.forEach((function(e){e.width=e.value*l})),c.forEach((function(e){var t=e.length;e.forEach((function(e,r){e.depth==c.length-1&&1==t||0==e.depth&&1==t?(e.y0=T/2-e.value*l,e.y1=e.y0+e.value*l):e.partOfCycle?0==S(e,n)?(e.y0=T/2+r,e.y1=e.y0+e.value*l):"top"==e.circularLinkType?(e.y0=o+r,e.y1=e.y0+e.value*l):(e.y0=T-e.value*l-r,e.y1=e.y0+e.value*l):0==u.top||0==u.bottom?(e.y0=(T-o)/t*r,e.y1=e.y0+e.value*l):(e.y0=(T-o)/2-t/2+r,e.y1=e.y0+e.value*l)}))}))})(l),y();for(var u=1,m=s;m>0;--m)v(u*=.99,l),y();function v(e,n){var r=c.length;c.forEach((function(i){var o=i.length,a=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&S(i,n)>0);else if(0==a&&1==o)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else if(a==r-1&&1==o)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else{var l=t.mean(i.sourceLinks,g),c=t.mean(i.targetLinks,p),u=((l&&c?(l+c)/2:l||c)-f(i))*e;i.y0+=u,i.y1+=u}}))}))}function y(){c.forEach((function(t){var n,r,i,a=o,s=t.length;for(t.sort(h),i=0;i<s;++i)(r=a-(n=t[i]).y0)>0&&(n.y0+=r,n.y1+=r),a=n.y1+e;if((r=a-e-T)>0)for(a=n.y0-=r,n.y1-=r,i=s-2;i>=0;--i)(r=(n=t[i]).y1+e-a)>0&&(n.y0-=r,n.y1-=r),a=n.y0}))}}function H(e){e.nodes.forEach((function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)})),e.nodes.forEach((function(e){var t=e.y0,n=t,r=e.y1,i=r;e.sourceLinks.forEach((function(e){e.circular?(e.y0=r-e.width/2,r-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=n+e.width/2,n+=e.width)}))}))}return N.nodeId=function(e){return arguments.length?(C="function"==typeof e?e:s(e),N):C},N.nodeAlign=function(e){return arguments.length?(O="function"==typeof e?e:s(e),N):O},N.nodeWidth=function(e){return arguments.length?(E=+e,N):E},N.nodePadding=function(t){return arguments.length?(e=+t,N):e},N.nodes=function(e){return arguments.length?(L="function"==typeof e?e:s(e),N):L},N.links=function(e){return arguments.length?(D="function"==typeof e?e:s(e),N):D},N.size=function(e){return arguments.length?(i=o=0,_=+e[0],T=+e[1],N):[_-i,T-o]},N.extent=function(e){return arguments.length?(i=+e[0][0],_=+e[1][0],o=+e[0][1],T=+e[1][1],N):[[i,o],[_,T]]},N.iterations=function(e){return arguments.length?(I=+e,N):I},N.circularLinkGap=function(e){return arguments.length?(R=+e,N):R},N.nodePaddingRatio=function(e){return arguments.length?(r=+e,N):r},N.sortNodes=function(e){return arguments.length?(P=e,N):P},N.update=function(e){return k(e,C),H(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y1<T?"top":"bottom",e.source.circularLinkType=e.circularLinkType,e.target.circularLinkType=e.circularLinkType)})),U(e,T,C,!1),V(e,0,C),M(e,R,T,C),e},N},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,o)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-array"),e("d3-collection"),e("d3-shape"),e("elementary-circuits-directed-graph")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,null)},{"d3-array":107,"d3-collection":108,"d3-shape":119,"elementary-circuits-directed-graph":130}],57:[function(e,t,n){var r,i;r=this,i=function(e,t,n,r){"use strict";function i(e){return e.target.depth}function o(e,t){return e.sourceLinks.length?e.depth:t-1}function a(e){return function(){return e}}function s(e,t){return c(e.source,t.source)||e.index-t.index}function l(e,t){return c(e.target,t.target)||e.index-t.index}function c(e,t){return e.y0-t.y0}function u(e){return e.value}function h(e){return(e.y0+e.y1)/2}function d(e){return h(e.source)*e.value}function f(e){return h(e.target)*e.value}function p(e){return e.index}function g(e){return e.nodes}function m(e){return e.links}function v(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function y(e){return[e.source.x1,e.y0]}function b(e){return[e.target.x0,e.y1]}e.sankey=function(){var e=0,r=0,i=1,y=1,b=24,_=8,x=p,w=o,A=g,k=m,T=32;function S(){var e={nodes:A.apply(null,arguments),links:k.apply(null,arguments)};return E(e),C(e),M(e),O(e),L(e),e}function E(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=n.map(e.nodes,x);e.links.forEach((function(e,n){e.index=n;var r=e.source,i=e.target;"object"!=typeof r&&(r=e.source=v(t,r)),"object"!=typeof i&&(i=e.target=v(t,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}))}function C(e){e.nodes.forEach((function(e){e.value=Math.max(t.sum(e.sourceLinks,u),t.sum(e.targetLinks,u))}))}function M(t){var n,r,o;for(n=t.nodes,r=[],o=0;n.length;++o,n=r,r=[])n.forEach((function(e){e.depth=o,e.sourceLinks.forEach((function(e){r.indexOf(e.target)<0&&r.push(e.target)}))}));for(n=t.nodes,r=[],o=0;n.length;++o,n=r,r=[])n.forEach((function(e){e.height=o,e.targetLinks.forEach((function(e){r.indexOf(e.source)<0&&r.push(e.source)}))}));var a=(i-e-b)/(o-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(o-1,Math.floor(w.call(null,t,o))))*a)+b}))}function O(e){var i=n.nest().key((function(e){return e.x0})).sortKeys(t.ascending).entries(e.nodes).map((function(e){return e.values}));(function(){var n=t.max(i,(function(e){return e.length})),o=.6666666666666666*(y-r)/(n-1);_>o&&(_=o);var a=t.min(i,(function(e){return(y-r-(e.length-1)*_)/t.sum(e,u)}));i.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*a}))})),e.links.forEach((function(e){e.width=e.value*a}))})(),p();for(var o=1,a=T;a>0;--a)l(o*=.99),p(),s(o),p();function s(e){i.forEach((function(n){n.forEach((function(n){if(n.targetLinks.length){var r=(t.sum(n.targetLinks,d)/t.sum(n.targetLinks,u)-h(n))*e;n.y0+=r,n.y1+=r}}))}))}function l(e){i.slice().reverse().forEach((function(n){n.forEach((function(n){if(n.sourceLinks.length){var r=(t.sum(n.sourceLinks,f)/t.sum(n.sourceLinks,u)-h(n))*e;n.y0+=r,n.y1+=r}}))}))}function p(){i.forEach((function(e){var t,n,i,o=r,a=e.length;for(e.sort(c),i=0;i<a;++i)(n=o-(t=e[i]).y0)>0&&(t.y0+=n,t.y1+=n),o=t.y1+_;if((n=o-_-y)>0)for(o=t.y0-=n,t.y1-=n,i=a-2;i>=0;--i)(n=(t=e[i]).y1+_-o)>0&&(t.y0-=n,t.y1-=n),o=t.y0}))}}function L(e){e.nodes.forEach((function(e){e.sourceLinks.sort(l),e.targetLinks.sort(s)})),e.nodes.forEach((function(e){var t=e.y0,n=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=n+e.width/2,n+=e.width}))}))}return S.update=function(e){return L(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:a(e),S):x},S.nodeAlign=function(e){return arguments.length?(w="function"==typeof e?e:a(e),S):w},S.nodeWidth=function(e){return arguments.length?(b=+e,S):b},S.nodePadding=function(e){return arguments.length?(_=+e,S):_},S.nodes=function(e){return arguments.length?(A="function"==typeof e?e:a(e),S):A},S.links=function(e){return arguments.length?(k="function"==typeof e?e:a(e),S):k},S.size=function(t){return arguments.length?(e=r=0,i=+t[0],y=+t[1],S):[i-e,y-r]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],r=+t[0][1],y=+t[1][1],S):[[e,r],[i,y]]},S.iterations=function(e){return arguments.length?(T=+e,S):T},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=o,e.sankeyLinkHorizontal=function(){return r.linkHorizontal().source(y).target(b)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-array"),e("d3-collection"),e("d3-shape")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3)},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(e,t,n){(function(){var e={version:"3.8.0"},n=[].slice,r=function(e){return n.call(e)},i=self.document;function o(e){return e&&(e.ownerDocument||e.document||e).documentElement}function a(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(e){r=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,n){c.call(this,e,t,n+"")},u.setProperty=function(e,t,n){h.call(this,e,t+"",n)}}function d(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function f(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function g(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}e.ascending=d,e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},e.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},e.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},e.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},e.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)p(n=+e[o])&&(r+=n);else for(;++o<i;)p(n=+t.call(e,e[o],o))&&(r+=n);return r},e.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)p(n=f(e[o]))?r+=n:--a;else for(;++o<i;)p(n=f(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},e.median=function(t,n){var r,i=[],o=t.length,a=-1;if(1===arguments.length)for(;++a<o;)p(r=f(t[a]))&&i.push(r);else for(;++a<o;)p(r=f(n.call(t,t[a],a)))&&i.push(r);if(i.length)return e.quantile(i.sort(d),.5)},e.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)p(n=f(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++l)));else for(;++s<i;)p(n=f(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++l)));if(l>1)return a/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var m=g(d);function v(e){return e.length}e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(e){return g(1===e.length?function(t,n){return d(e(t),n)}:e)},e.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},e.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},e.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},e.transpose=function(t){if(!(o=t.length))return[];for(var n=-1,r=e.min(t,v),i=new Array(r);++n<r;)for(var o,a=-1,s=i[n]=new Array(o);++a<o;)s[a]=t[a][n];return i},e.zip=function(){return e.transpose(arguments)},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t},e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},e.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var y=Math.abs;function b(e){for(var t=1;e*t%1;)t*=10;return t}function _(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function x(){this._=Object.create(null)}e.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=b(y(n)),a=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},e.map=function(e,t){var n=new x;if(e instanceof x)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};function w(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function A(e){return"\0"===(e+="")[0]?e.slice(1):e}function k(e){return w(e)in this._}function T(e){return(e=w(e))in this._&&delete this._[e]}function S(){var e=[];for(var t in this._)e.push(A(t));return e}function E(){var e=0;for(var t in this._)++e;return e}function C(){for(var e in this._)return!1;return!0}function M(){this._=Object.create(null)}function O(e){return e}function L(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function D(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=I.length;n<r;++n){var i=I[n]+t;if(i in e)return i}}_(x,{has:k,get:function(e){return this._[w(e)]},set:function(e,t){return this._[w(e)]=t},remove:T,keys:S,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:A(t),value:this._[t]});return e},size:E,empty:C,forEach:function(e){for(var t in this._)e.call(this,A(t),this._[t])}}),e.nest=function(){var t,n,r={},i=[],o=[];function a(e,o,s){if(s>=i.length)return n?n.call(r,o):t?o.sort(t):o;for(var l,c,u,h,d=-1,f=o.length,p=i[s++],g=new x;++d<f;)(h=g.get(l=p(c=o[d])))?h.push(c):g.set(l,[c]);return e?(c=e(),u=function(t,n){c.set(t,a(e,n,s))}):(c={},u=function(t,n){c[t]=a(e,n,s)}),g.forEach(u),c}function s(e,t){if(t>=i.length)return e;var n=[],r=o[t++];return e.forEach((function(e,r){n.push({key:e,values:s(r,t)})})),r?n.sort((function(e,t){return r(e.key,t.key)})):n}return r.map=function(e,t){return a(t,e,0)},r.entries=function(t){return s(a(e.map,t,0),0)},r.key=function(e){return i.push(e),r},r.sortKeys=function(e){return o[i.length-1]=e,r},r.sortValues=function(e){return t=e,r},r.rollup=function(e){return n=e,r},r},e.set=function(e){var t=new M;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},_(M,{has:k,add:function(e){return this._[w(e+="")]=!0,e},remove:T,values:S,size:E,empty:C,forEach:function(e){for(var t in this._)e.call(this,A(t))}}),e.behavior={},e.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=L(e,t,t[n]);return e};var I=["webkit","ms","moz","Moz","o","O"];function R(){}function P(){}function N(e){var t=[],n=new x;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function z(){e.event.preventDefault()}function F(){for(var t,n=e.event;t=n.sourceEvent;)n=t;return n}function B(t){for(var n=new P,r=0,i=arguments.length;++r<i;)n[arguments[r]]=N(n);return n.of=function(r,i){return function(o){try{var a=o.sourceEvent=e.event;o.target=t,e.event=o,n[o.type].apply(r,i)}finally{e.event=a}}},n}e.dispatch=function(){for(var e=new P,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=N(e);return e},P.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function V(e){return U(e,W),e}var q=function(e,t){return t.querySelector(e)},H=function(e,t){return t.querySelectorAll(e)},$=function(e,t){var n=e.matches||e[D(e,"matchesSelector")];return $=function(e,t){return n.call(e,t)},$(e,t)};"function"==typeof Sizzle&&(q=function(e,t){return Sizzle(e,t)[0]||null},H=Sizzle,$=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var W=e.selection.prototype=[];function G(e){return"function"==typeof e?e:function(){return q(e,this)}}function Y(e){return"function"==typeof e?e:function(){return H(e,this)}}W.select=function(e){var t,n,r,i,o=[];e=G(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(n=e.call(i,i.__data__,l,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return V(o)},W.selectAll=function(e){var t,n,i=[];e=Y(e);for(var o=-1,a=this.length;++o<a;)for(var s=this[o],l=-1,c=s.length;++l<c;)(n=s[l])&&(i.push(t=r(e.call(n,n.__data__,l,o))),t.parentNode=n);return V(i)};var X="path_to_url",Z={svg:"path_to_url",xhtml:X,xlink:"path_to_url",xml:"path_to_url",xmlns:"path_to_url"};function K(t,n){return t=e.ns.qualify(t),null==n?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof n?t.local?function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}:function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}:t.local?function(){this.setAttributeNS(t.space,t.local,n)}:function(){this.setAttribute(t,n)}}function J(e){return e.trim().replace(/\s+/g," ")}function Q(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function ee(e){return(e+"").trim().split(/^|\s+/)}function te(e,t){var n=(e=ee(e).map(ne)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function ne(e){var t=Q(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",J(i+" "+e))):n.setAttribute("class",J(i.replace(t," ")))}}function re(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function ie(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function oe(t){return"function"==typeof t?t:(t=e.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===X&&e.documentElement.namespaceURI===X?e.createElement(t):e.createElementNS(n,t)}}function ae(){var e=this.parentNode;e&&e.removeChild(this)}function se(e){return{__data__:e}}function le(e){return function(){return $(this,e)}}function ce(e){return arguments.length||(e=d),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function ue(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function he(e){return U(e,de),e}e.ns={prefix:Z,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Z.hasOwnProperty(n)?{space:Z[n],local:e}:e}},W.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=e.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(K(n,t[n]));return this}return this.each(K(t,n))},W.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=ee(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!Q(e[i]).test(t))return!1;return!0}for(t in e)this.each(te(t,e[t]));return this}return this.each(te(e,t))},W.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(re(n,e[n],t));return this}if(r<2){var i=this.node();return a(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(re(e,t,n))},W.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ie(t,e[t]));return this}return this.each(ie(e,t))},W.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},W.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},W.append=function(e){return e=oe(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},W.insert=function(e,t){return e=oe(e),t=G(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},W.remove=function(){return this.each(ae)},W.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function a(e,n){var r,i,o,a=e.length,u=n.length,h=Math.min(a,u),d=new Array(u),f=new Array(u),p=new Array(a);if(t){var g,m=new x,v=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(m.has(g=t.call(i,i.__data__,r))?p[r]=i:m.set(g,i),v[r]=g);for(r=-1;++r<u;)(i=m.get(g=t.call(n,o=n[r],r)))?!0!==i&&(d[r]=i,i.__data__=o):f[r]=se(o),m.set(g,!0);for(r=-1;++r<a;)r in v&&!0!==m.get(v[r])&&(p[r]=e[r])}else{for(r=-1;++r<h;)i=e[r],o=n[r],i?(i.__data__=o,d[r]=i):f[r]=se(o);for(;r<u;++r)f[r]=se(n[r]);for(;r<a;++r)p[r]=e[r]}f.update=d,f.parentNode=d.parentNode=p.parentNode=e.parentNode,s.push(f),l.push(d),c.push(p)}var s=he([]),l=V([]),c=V([]);if("function"==typeof e)for(;++i<o;)a(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],e);return l.enter=function(){return s},l.exit=function(){return c},l},W.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},W.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=le(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return V(i)},W.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},W.sort=function(e){e=ce.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},W.each=function(e){return ue(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},W.call=function(e){var t=r(arguments);return e.apply(t[0]=this,t),this},W.empty=function(){return!this.node()},W.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},W.size=function(){var e=0;return ue(this,(function(){++e})),e};var de=[];function fe(e){var t,n;return function(r,i,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<l;);return a}}function pe(t,n,i){var o="__on"+t,a=t.indexOf("."),s=me;a>0&&(t=t.slice(0,a));var l=ge.get(t);function c(){var e=this[o];e&&(this.removeEventListener(t,e,e.$),delete this[o])}return l&&(t=l,s=ve),a?n?function(){var e=s(n,r(arguments));c.call(this),this.addEventListener(t,this[o]=e,e.$=i),e._=n}:c:n?R:function(){var n,r=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var i in this)if(n=i.match(r)){var o=this[i];this.removeEventListener(n[1],o,o.$),delete this[i]}}}e.selection.enter=he,e.selection.enter.prototype=de,de.append=W.append,de.empty=W.empty,de.node=W.node,de.call=W.call,de.size=W.size,de.select=function(e){for(var t,n,r,i,o,a=[],s=-1,l=this.length;++s<l;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(o=i[c])?(t.push(r[c]=n=e.call(i.parentNode,o.__data__,c,s)),n.__data__=o.__data__):t.push(null)}return V(a)},de.insert=function(e,t){return arguments.length<2&&(t=fe(this)),W.insert.call(this,e,t)},e.select=function(e){var t;return"string"==typeof e?(t=[q(e,i)]).parentNode=i.documentElement:(t=[e]).parentNode=o(e),V([t])},e.selectAll=function(e){var t;return"string"==typeof e?(t=r(H(e,i))).parentNode=i.documentElement:(t=r(e)).parentNode=null,V([t])},W.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(pe(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(pe(e,t,n))};var ge=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});function me(t,n){return function(r){var i=e.event;e.event=r,n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function ve(e,t){var n=me(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}i&&ge.forEach((function(e){"on"+e in i&&ge.remove(e)}));var ye,be=0;function _e(t){var n=".dragsuppress-"+ ++be,r="click"+n,i=e.select(a(t)).on("touchmove"+n,z).on("dragstart"+n,z).on("selectstart"+n,z);if(null==ye&&(ye=!("onselectstart"in t)&&D(t.style,"userSelect")),ye){var s=o(t).style,l=s[ye];s[ye]="none"}return function(e){if(i.on(n,null),ye&&(s[ye]=l),e){var t=function(){i.on(r,null)};i.on(r,(function(){z(),t()}),!0),setTimeout(t,0)}}}e.mouse=function(e){return we(e,F())};var xe=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function we(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(xe<0){var o=a(t);if(o.scrollX||o.scrollY){var s=(r=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();xe=!(s.f||s.e),r.remove()}}return xe?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var l=t.getBoundingClientRect();return[n.clientX-l.left-t.clientLeft,n.clientY-l.top-t.clientTop]}function Ae(){return e.event.changedTouches[0].identifier}e.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=F().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return we(e,r)},e.behavior.drag=function(){var t=B(o,"drag","dragstart","dragend"),n=null,r=s(R,e.mouse,a,"mousemove","mouseup"),i=s(Ae,e.touch,O,"touchmove","touchend");function o(){this.on("mousedown.drag",r).on("touchstart.drag",i)}function s(r,i,o,a,s){return function(){var l,c=this,u=e.event.target.correspondingElement||e.event.target,h=c.parentNode,d=t.of(c,arguments),f=0,p=r(),g=".drag"+(null==p?"":"-"+p),m=e.select(o(u)).on(a+g,b).on(s+g,_),v=_e(u),y=i(h,p);function b(){var e,t,n=i(h,p);n&&(e=n[0]-y[0],t=n[1]-y[1],f|=e|t,y=n,d({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:e,dy:t}))}function _(){i(h,p)&&(m.on(a+g,null).on(s+g,null),v(f),d({type:"dragend"}))}l=n?[(l=n.apply(c,arguments)).x-y[0],l.y-y[1]]:[0,0],d({type:"dragstart"})}}return o.origin=function(e){return arguments.length?(n=e,o):n},e.rebind(o,t,"on")},e.touches=function(e,t){return arguments.length<2&&(t=F().touches),t?r(t).map((function(t){var n=we(e,t);return n.identifier=t.identifier,n})):[]};var ke=1e-6,Te=Math.PI,Se=2*Te,Ee=Se-ke,Ce=Te/2,Me=Te/180,Oe=180/Te;function Le(e){return e>1?Ce:e<-1?-Ce:Math.asin(e)}function De(e){return((e=Math.exp(e))+1/e)/2}var Ie=Math.SQRT2;e.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],c=t[2],u=s-i,h=l-o,d=u*u+h*h;if(d<1e-12)r=Math.log(c/a)/Ie,n=function(e){return[i+e*u,o+e*h,a*Math.exp(Ie*e*r)]};else{var f=Math.sqrt(d),p=(c*c-a*a+4*d)/(2*a*2*f),g=(c*c-a*a-4*d)/(2*c*2*f),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-m)/Ie,n=function(e){var t,n=e*r,s=De(m),l=a/(2*f)*(s*(t=Ie*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[i+l*u,o+l*h,a*s/De(Ie*n+m)]}}return n.duration=1e3*r,n},e.behavior.zoom=function(){var t,n,r,o,s,l,c,u,h,d={x:0,y:0,k:1},f=[960,500],p=Ne,g=250,m=0,v="mousedown.zoom",y="mousemove.zoom",b="mouseup.zoom",_="touchstart.zoom",x=B(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,L).on(Pe+".zoom",I).on("dblclick.zoom",R).on(_,D)}function A(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function k(e){d.k=Math.max(p[0],Math.min(p[1],e))}function T(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function S(t,r,i,o){t.__chart__={x:d.x,y:d.y,k:d.k},k(Math.pow(2,o)),T(n=r,i),t=e.select(t),g>0&&(t=t.transition().duration(g)),t.call(w.event)}function E(){c&&c.domain(l.range().map((function(e){return(e-d.x)/d.k})).map(l.invert)),h&&h.domain(u.range().map((function(e){return(e-d.y)/d.k})).map(u.invert))}function C(e){m++||e({type:"zoomstart"})}function M(e){E(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function O(e){--m||(e({type:"zoomend"}),n=null)}function L(){var t=this,n=x.of(t,arguments),r=0,i=e.select(a(t)).on(y,l).on(b,c),o=A(e.mouse(t)),s=_e(t);function l(){r=1,T(e.mouse(t),o),M(n)}function c(){i.on(y,null).on(b,null),s(r),O(n)}Yi.call(t),C(n)}function D(){var t,n=this,r=x.of(n,arguments),i={},o=0,a=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+a,c="touchend"+a,u=[],h=e.select(n),f=_e(n);function p(){var r=e.touches(n);return t=d.k,r.forEach((function(e){e.identifier in i&&(i[e.identifier]=A(e))})),r}function g(){var t=e.event.target;e.select(t).on(l,m).on(c,y),u.push(t);for(var r=e.event.changedTouches,a=0,h=r.length;a<h;++a)i[r[a].identifier]=null;var f=p(),g=Date.now();if(1===f.length){if(g-s<500){var v=f[0];S(n,v,i[v.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),z()}s=g}else if(f.length>1){v=f[0];var b=f[1],_=v[0]-b[0],x=v[1]-b[1];o=_*_+x*x}}function m(){var a,l,c,u,h=e.touches(n);Yi.call(n);for(var d=0,f=h.length;d<f;++d,u=null)if(c=h[d],u=i[c.identifier]){if(l)break;a=c,l=u}if(u){var p=(p=c[0]-a[0])*p+(p=c[1]-a[1])*p,g=o&&Math.sqrt(p/o);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],k(g*t)}s=null,T(a,l),M(r)}function y(){if(e.event.touches.length){for(var t=e.event.changedTouches,n=0,o=t.length;n<o;++n)delete i[t[n].identifier];for(var s in i)return void p()}e.selectAll(u).on(a,null),h.on(v,L).on(_,D),f(),O(r)}g(),C(r),h.on(v,null).on(_,g)}function I(){var i=x.of(this,arguments);o?clearTimeout(o):(Yi.call(this),t=A(n=r||e.mouse(this)),C(i)),o=setTimeout((function(){o=null,O(i)}),50),z(),k(Math.pow(2,.002*Re())*d.k),T(n,t),M(i)}function R(){var t=e.mouse(this),n=Math.log(d.k)/Math.LN2;S(this,t,A(t),e.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}return Pe||(Pe="onwheel"in i?(Re=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in i?(Re=function(){return e.event.wheelDelta},"mousewheel"):(Re=function(){return-e.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each((function(){var t=x.of(this,arguments),r=d;Ki?e.select(this).transition().each("start.zoom",(function(){d=this.__chart__||{x:0,y:0,k:1},C(t)})).tween("zoom:zoom",(function(){var i=f[0],o=f[1],a=n?n[0]:i/2,s=n?n[1]:o/2,l=e.interpolateZoom([(a-d.x)/d.k,(s-d.y)/d.k,i/d.k],[(a-r.x)/r.k,(s-r.y)/r.k,i/r.k]);return function(e){var n=l(e),r=i/n[2];this.__chart__=d={x:a-n[0]*r,y:s-n[1]*r,k:r},M(t)}})).each("interrupt.zoom",(function(){O(t)})).each("end.zoom",(function(){O(t)})):(this.__chart__=d,C(t),M(t),O(t))}))},w.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},E(),w):[d.x,d.y]},w.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},k(+e),E(),w):d.k},w.scaleExtent=function(e){return arguments.length?(p=null==e?Ne:[+e[0],+e[1]],w):p},w.center=function(e){return arguments.length?(r=e&&[+e[0],+e[1]],w):r},w.size=function(e){return arguments.length?(f=e&&[+e[0],+e[1]],w):f},w.duration=function(e){return arguments.length?(g=+e,w):g},w.x=function(e){return arguments.length?(c=e,l=e.copy(),d={x:0,y:0,k:1},w):c},w.y=function(e){return arguments.length?(h=e,u=e.copy(),d={x:0,y:0,k:1},w):h},e.rebind(w,x,"on")};var Re,Pe,Ne=[0,1/0];function ze(){}function Fe(e,t,n){return this instanceof Fe?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof Fe?new Fe(e.h,e.s,e.l):ot(""+e,at,Fe):new Fe(e,t,n)}e.color=ze,ze.prototype.toString=function(){return this.rgb()+""},e.hsl=Fe;var Be=Fe.prototype=new ze;function je(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new et(o(e+120),o(e),o(e-120))}function Ue(t,n,r){return this instanceof Ue?(this.h=+t,this.c=+n,void(this.l=+r)):arguments.length<2?t instanceof Ue?new Ue(t.h,t.c,t.l):Ze(t instanceof He?t.l:(t=st((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ue(t,n,r)}Be.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,this.l/e)},Be.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,e*this.l)},Be.rgb=function(){return je(this.h,this.s,this.l)},e.hcl=Ue;var Ve=Ue.prototype=new ze;function qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new He(n,Math.cos(e*=Me)*t,Math.sin(e)*t)}function He(e,t,n){return this instanceof He?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof He?new He(e.l,e.a,e.b):e instanceof Ue?qe(e.h,e.c,e.l):st((e=et(e)).r,e.g,e.b):new He(e,t,n)}Ve.brighter=function(e){return new Ue(this.h,this.c,Math.min(100,this.l+$e*(arguments.length?e:1)))},Ve.darker=function(e){return new Ue(this.h,this.c,Math.max(0,this.l-$e*(arguments.length?e:1)))},Ve.rgb=function(){return qe(this.h,this.c,this.l).rgb()},e.lab=He;var $e=18,We=.95047,Ge=1.08883,Ye=He.prototype=new ze;function Xe(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new et(Qe(3.2404542*(i=Ke(i)*We)-1.5371385*(r=1*Ke(r))-.4985314*(o=Ke(o)*Ge)),Qe(-.969266*i+1.8760108*r+.041556*o),Qe(.0556434*i-.2040259*r+1.0572252*o))}function Ze(e,t,n){return e>0?new Ue(Math.atan2(n,t)*Oe,Math.sqrt(t*t+n*n),e):new Ue(NaN,NaN,e)}function Ke(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Je(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Qe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function et(e,t,n){return this instanceof et?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof et?new et(e.r,e.g,e.b):ot(""+e,et,je):new et(e,t,n)}function tt(e){return new et(e>>16,e>>8&255,255&e)}function nt(e){return tt(e)+""}Ye.brighter=function(e){return new He(Math.min(100,this.l+$e*(arguments.length?e:1)),this.a,this.b)},Ye.darker=function(e){return new He(Math.max(0,this.l-$e*(arguments.length?e:1)),this.a,this.b)},Ye.rgb=function(){return Xe(this.l,this.a,this.b)},e.rgb=et;var rt=et.prototype=new ze;function it(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ot(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(ct(i[0]),ct(i[1]),ct(i[2]))}return(o=ut.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function at(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Fe(r,i,l)}function st(e,t,n){var r=Je((.4124564*(e=lt(e))+.3575761*(t=lt(t))+.1804375*(n=lt(n)))/We),i=Je((.2126729*e+.7151522*t+.072175*n)/1);return He(116*i-16,500*(r-i),200*(i-Je((.0193339*e+.119192*t+.9503041*n)/Ge)))}function lt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ct(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}rt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new et(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new et(i,i,i)},rt.darker=function(e){return new et((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},rt.hsl=function(){return at(this.r,this.g,this.b)},rt.toString=function(){return"#"+it(this.r)+it(this.g)+it(this.b)};var ut=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function ht(e){return"function"==typeof e?e:function(){return e}}function dt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),ft(t,n,e,r)}}function ft(t,n,i,o){var a={},s=e.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,u=null;function h(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=i.call(a,c)}catch(e){return void s.error.call(a,e)}s.load.call(a,e)}else s.error.call(a,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var n=e.event;e.event=t;try{s.progress.call(a,c)}finally{e.event=n}},a.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",a)},a.mimeType=function(e){return arguments.length?(n=null==e?null:e+"",a):n},a.responseType=function(e){return arguments.length?(u=e,a):u},a.response=function(e){return i=e,a},["get","post"].forEach((function(e){a[e]=function(){return a.send.apply(a,[e].concat(r(arguments)))}})),a.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),c.open(e,t,!0),null==n||"accept"in l||(l.accept=n+",*/*"),c.setRequestHeader)for(var o in l)c.setRequestHeader(o,l[o]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=u&&(c.responseType=u),null!=i&&a.on("error",i).on("load",(function(e){i(null,e)})),s.beforesend.call(a,c),c.send(null==r?null:r),a},a.abort=function(){return c.abort(),a},e.rebind(a,s,"on"),null==o?a:a.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(o))}ut.forEach((function(e,t){ut.set(e,tt(t))})),e.functor=ht,e.xhr=dt(O),e.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=ft(e,t,null==n?o:a(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:a(e)):n},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=function(t){for(var n={},r=e.length,i=0;i<r;++i)n[e[i]]=t[i];return n};n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},a={},s=[],l=e.length,c=0,u=0;function h(){if(c>=l)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(s=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===s&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<l;){var s,u=1;if(10===(s=e.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===e.charCodeAt(c)&&(++c,++u);else if(s!==r)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(n=h())!==a;){for(var d=[];n!==o&&n!==a;)d.push(n),n=h();t&&null==(d=t(d,u++))||s.push(d)}return s},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new M,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(l).join(e)].concat(t.map((function(t){return r.map((function(e){return l(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(s).join("\n")},i},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("\t","text/tab-separated-values");var pt,gt,mt,vt,yt=this[D(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function bt(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i={c:e,t:n+t,n:null};return gt?gt.n=i:pt=i,gt=i,mt||(vt=clearTimeout(vt),mt=1,yt(_t)),i}function _t(){var e=xt(),t=wt()-e;t>24?(isFinite(t)&&(clearTimeout(vt),vt=setTimeout(_t,t)),mt=0):(mt=1,yt(_t))}function xt(){for(var e=Date.now(),t=pt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function wt(){for(var e,t=pt,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:pt=t.n;return gt=e,n}function At(e){return e[0]}function kt(e){return e[1]}function Tt(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&(o=e[n[r-2]],a=e[n[r-1]],s=e[i],(a[0]-o[0])*(s[1]-o[1])-(a[1]-o[1])*(s[0]-o[0])<=0);)--r;n[r++]=i}var o,a,s;return n.slice(0,r)}function St(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){bt.apply(this,arguments)},e.timer.flush=function(){xt(),wt()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=At,n=kt;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=ht(t),o=ht(n),a=e.length,s=[],l=[];for(r=0;r<a;r++)s.push([+i.call(this,e[r],r),+o.call(this,e[r],r),r]);for(s.sort(St),r=0;r<a;r++)l.push([s[r][0],-s[r][1]]);var c=Tt(s),u=Tt(l),h=u[0]===c[0],d=u[u.length-1]===c[c.length-1],f=[];for(r=c.length-1;r>=0;--r)f.push(e[s[c[r]][2]]);for(r=+h;r<u.length-d;++r)f.push(e[s[u[r]][2]]);return f}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},e.geom.polygon=function(e){return U(e,Et),e};var Et=e.geom.polygon.prototype=[];function Ct(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Mt(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],c=n[1],u=t[1]-l,h=r[1]-c,d=(s*(l-c)-h*(i-o))/(h*a-s*u);return[i+d*a,l+d*u]}function Ot(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}Et.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},Et.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},Et.clip=function(e){for(var t,n,r,i,o,a,s=Ot(e),l=-1,c=this.length-Ot(this),u=this[c-1];++l<c;){for(t=e.slice(),e.length=0,i=this[l],o=t[(r=t.length-s)-1],n=-1;++n<r;)Ct(a=t[n],u,i)?(Ct(o,u,i)||e.push(Mt(o,a,u,i)),e.push(a)):Ct(o,u,i)&&e.push(Mt(o,a,u,i)),o=a;s&&e.push(e[0]),u=i}return e};var Lt,Dt,It,Rt,Pt,Nt=[],zt=[];function Ft(){nn(this),this.edge=this.site=this.circle=null}function Bt(e){var t=Nt.pop()||new Ft;return t.site=e,t}function jt(e){Xt(e),It.remove(e),Nt.push(e),nn(e)}function Ut(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];jt(e);for(var l=o;l.circle&&y(n-l.circle.x)<ke&&y(r-l.circle.cy)<ke;)o=l.P,s.unshift(l),jt(l),l=o;s.unshift(l),Xt(l);for(var c=a;c.circle&&y(n-c.circle.x)<ke&&y(r-c.circle.cy)<ke;)a=c.N,s.push(c),jt(c),c=a;s.push(c),Xt(c);var u,h=s.length;for(u=1;u<h;++u)c=s[u],l=s[u-1],Qt(c.edge,l.site,c.site,i);l=s[0],(c=s[h-1]).edge=Jt(l.site,c.site,null,i),Yt(l),Yt(c)}function Vt(e){for(var t,n,r,i,o=e.x,a=e.y,s=It._;s;)if((r=qt(s,a)-o)>ke)s=s.L;else{if(!((i=o-Ht(s,a))>ke)){r>-ke?(t=s.P,n=s):i>-ke?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Bt(e);if(It.insert(t,l),t||n){if(t===n)return Xt(t),n=Bt(t.site),It.insert(l,n),l.edge=n.edge=Jt(t.site,l.site),Yt(t),void Yt(n);if(n){Xt(t),Xt(n);var c=t.site,u=c.x,h=c.y,d=e.x-u,f=e.y-h,p=n.site,g=p.x-u,m=p.y-h,v=2*(d*m-f*g),y=d*d+f*f,b=g*g+m*m,_={x:(m*y-f*b)/v+u,y:(d*b-g*y)/v+h};Qt(n.edge,c,p,_),l.edge=Jt(c,e,null,_),n.edge=Jt(e,p,null,_),Yt(t),Yt(n)}else l.edge=Jt(t.site,l.site)}}function qt(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site).x,l=n.y,c=l-t;if(!c)return s;var u=s-r,h=1/o-1/c,d=u/c;return h?(-d+Math.sqrt(d*d-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+r:(r+s)/2}function Ht(e,t){var n=e.N;if(n)return qt(n,t);var r=e.site;return r.y===t?r.x:1/0}function $t(e){this.site=e,this.edges=[]}function Wt(e,t){return t.angle-e.angle}function Gt(){nn(this),this.x=this.y=this.arc=this.site=this.cy=null}function Yt(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,l=r.x-a,c=r.y-s,u=o.x-a,h=2*(l*(m=o.y-s)-c*u);if(!(h>=-1e-12)){var d=l*l+c*c,f=u*u+m*m,p=(m*d-c*f)/h,g=(l*f-u*d)/h,m=g+s,v=zt.pop()||new Gt;v.arc=e,v.site=i,v.x=p+a,v.y=m+Math.sqrt(p*p+g*g),v.cy=m,e.circle=v;for(var y=null,b=Pt._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}Pt.insert(y,v),y||(Rt=v)}}}}function Xt(e){var t=e.circle;t&&(t.P||(Rt=t.N),Pt.remove(t),zt.push(t),nn(t),e.circle=null)}function Zt(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,d=u.x,f=u.y,p=h.x,g=h.y,m=(d+p)/2,v=(f+g)/2;if(g===f){if(m<a||m>=s)return;if(d>p){if(o){if(o.y>=c)return}else o={x:m,y:l};n={x:m,y:c}}else{if(o){if(o.y<l)return}else o={x:m,y:c};n={x:m,y:l}}}else if(i=v-(r=(d-p)/(g-f))*m,r<-1||r>1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(o){if(o.y<l)return}else o={x:(c-i)/r,y:c};n={x:(l-i)/r,y:l}}else if(f<g){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return e.a=o,e.b=n,!0}function Kt(e,t){this.l=e,this.r=t,this.a=this.b=null}function Jt(e,t,n,r){var i=new Kt(e,t);return Lt.push(i),n&&Qt(i,e,t,n),r&&Qt(i,t,e,r),Dt[e.i].edges.push(new en(i,e,t)),Dt[t.i].edges.push(new en(i,t,e)),i}function Qt(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function en(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function tn(){this._=null}function nn(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function rn(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function on(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function an(e){for(;e.L;)e=e.L;return e}function sn(e,t){var n,r,i,o=e.sort(ln).pop();for(Lt=[],Dt=new Array(e.length),It=new tn,Pt=new tn;;)if(i=Rt,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(Dt[o.i]=new $t(o),Vt(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Ut(i.arc)}t&&(function(e){for(var t,n=Lt,r=function(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,c=a.y,u=0,h=1,d=s.x-l,f=s.y-c;if(o=e-l,d||!(o>0)){if(o/=d,d<0){if(o<u)return;o<h&&(h=o)}else if(d>0){if(o>h)return;o>u&&(u=o)}if(o=n-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>u&&(u=o)}else if(d>0){if(o<u)return;o<h&&(h=o)}if(o=t-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<h&&(h=o)}else if(f>0){if(o>h)return;o>u&&(u=o)}if(o=r-c,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<h&&(h=o)}return u>0&&(i.a={x:l+u*d,y:c+u*f}),h<1&&(i.b={x:l+h*d,y:c+h*f}),i}}}}}}(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!Zt(t=n[i],e)||!r(t)||y(t.a.x-t.b.x)<ke&&y(t.a.y-t.b.y)<ke)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,a,s,l,c,u,h=e[0][0],d=e[1][0],f=e[0][1],p=e[1][1],g=Dt,m=g.length;m--;)if((o=g[m])&&o.prepare())for(l=(s=o.edges).length,a=0;a<l;)r=(u=s[a].end()).x,i=u.y,t=(c=s[++a%l].start()).x,n=c.y,(y(r-t)>ke||y(i-n)>ke)&&(s.splice(a,0,new en((v=o.site,b=u,_=y(r-h)<ke&&p-i>ke?{x:h,y:y(t-h)<ke?n:p}:y(i-p)<ke&&d-r>ke?{x:y(n-p)<ke?t:d,y:p}:y(r-d)<ke&&i-f>ke?{x:d,y:y(t-d)<ke?n:f}:y(i-f)<ke&&r-h>ke?{x:y(n-f)<ke?t:h,y:f}:null,x=void 0,(x=new Kt(v,null)).a=b,x.b=_,Lt.push(x),x),o.site,null)),++l);var v,b,_,x}(t));var a={cells:Dt,edges:Lt};return It=Pt=Lt=Dt=null,a}function ln(e,t){return t.y-e.y||t.x-e.x}$t.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(Wt),t.length},en.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tn.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=an(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(rn(this,n),n=(e=n).U),n.C=!1,r.C=!0,on(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(on(this,n),n=(e=n).U),n.C=!1,r.C=!0,rn(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?an(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,rn(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,on(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,rn(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,on(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,rn(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,on(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=At,n=kt,r=t,i=n,o=cn;if(e)return a(e);function a(e){var t=new Array(e.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return sn(s(e),o).cells.forEach((function(o,s){var l=o.edges,c=o.site;(t[s]=l.length?l.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=n&&c.x<=i&&c.y>=r&&c.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/ke)*ke,y:Math.round(i(e,t)/ke)*ke,i:t}}))}return a.links=function(e){return sn(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return sn(s(e)).cells.forEach((function(n,r){for(var i,o=n.site,a=n.edges.sort(Wt),s=-1,l=a.length,c=a[l-1].edge,u=c.l===o?c.r:c.l;++s<l;)i=u,u=(c=a[s].edge).l===o?c.r:c.l,r<i.i&&r<u.i&&(d=i,f=u,((h=o).x-f.x)*(d.y-h.y)-(h.x-d.x)*(f.y-h.y)<0)&&t.push([e[r],e[i.i],e[u.i]]);var h,d,f})),t},a.x=function(e){return arguments.length?(r=ht(t=e),a):t},a.y=function(e){return arguments.length?(i=ht(n=e),a):n},a.clipExtent=function(e){return arguments.length?(o=null==e?cn:e,a):o===cn?null:o},a.size=function(e){return arguments.length?a.clipExtent(e&&[[0,0],e]):o===cn?null:o&&o[1]},a};var cn=[[-1e6,-1e6],[1e6,1e6]];function un(e){return e.x}function hn(e){return e.y}function dn(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),l=t.nodes;l[0]&&dn(e,l[0],n,r,a,s),l[1]&&dn(e,l[1],a,r,i,s),l[2]&&dn(e,l[2],n,s,a,o),l[3]&&dn(e,l[3],a,s,i,o)}}function fn(e,t,n,r,i,o,a){var s,l=1/0;return function e(c,u,h,d,f){if(!(u>o||h>a||d<r||f<i)){if(p=c.point){var p,g=t-c.x,m=n-c.y,v=g*g+m*m;if(v<l){var y=Math.sqrt(l=v);r=t-y,i=n-y,o=t+y,a=n+y,s=p}}for(var b=c.nodes,_=.5*(u+d),x=.5*(h+f),w=(n>=x)<<1|t>=_,A=w+4;w<A;++w)if(c=b[3&w])switch(3&w){case 0:e(c,u,h,_,x);break;case 1:e(c,_,h,d,x);break;case 2:e(c,u,x,_,f);break;case 3:e(c,_,x,d,f)}}}(e,r,i,o,a),s}function pn(t,n){t=e.rgb(t),n=e.rgb(n);var r=t.r,i=t.g,o=t.b,a=n.r-r,s=n.g-i,l=n.b-o;return function(e){return"#"+it(Math.round(r+a*e))+it(Math.round(i+s*e))+it(Math.round(o+l*e))}}function gn(e,t){var n,r={},i={};for(n in e)n in t?r[n]=_n(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function mn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vn(e,t){var n,r,i,o=yn.lastIndex=bn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=yn.exec(e))&&(r=bn.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:mn(n,r)})),o=bn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}e.geom.delaunay=function(t){return e.geom.voronoi().triangles(t)},e.geom.quadtree=function(e,t,n,r,i){var o,a=At,s=kt;if(o=arguments.length)return a=un,s=hn,3===o&&(i=n,r=t,n=t=0),l(e);function l(e){var l,c,u,h,d,f,p,g,m,v=ht(a),b=ht(s);if(null!=t)f=t,p=n,g=r,m=i;else if(g=m=-(f=p=1/0),c=[],u=[],d=e.length,o)for(h=0;h<d;++h)(l=e[h]).x<f&&(f=l.x),l.y<p&&(p=l.y),l.x>g&&(g=l.x),l.y>m&&(m=l.y),c.push(l.x),u.push(l.y);else for(h=0;h<d;++h){var _=+v(l=e[h],h),x=+b(l,h);_<f&&(f=_),x<p&&(p=x),_>g&&(g=_),x>m&&(m=x),c.push(_),u.push(x)}var w=g-f,A=m-p;function k(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(y(l-n)+y(c-r)<.01)T(e,t,n,r,i,o,a,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,l,c,i,o,a,s),T(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else T(e,t,n,r,i,o,a,s)}function T(e,t,n,r,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),u=n>=l,h=r>=c,d=h<<1|u;e.leaf=!1,u?i=l:a=l,h?o=c:s=c,k(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,o,a,s)}w>A?m=p+w:g=f+A;var S={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){k(S,e,+v(e,++h),+b(e,h),f,p,g,m)},visit:function(e){dn(e,S,f,p,g,m)},find:function(e){return fn(S,e[0],e[1],f,p,g,m)}};if(h=-1,null==t){for(;++h<d;)k(S,e[h],c[h],u[h],f,p,g,m);--h}else e.forEach(S.add);return c=u=e=l=null,S}return l.x=function(e){return arguments.length?(a=e,l):a},l.y=function(e){return arguments.length?(s=e,l):s},l.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),l):null==t?null:[[t,n],[r,i]]},l.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),l):null==t?null:[r-t,i-n]},l},e.interpolateRgb=pn,e.interpolateObject=gn,e.interpolateNumber=mn,e.interpolateString=vn;var yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bn=new RegExp(yn.source,"g");function _n(t,n){for(var r,i=e.interpolators.length;--i>=0&&!(r=e.interpolators[i](t,n)););return r}function xn(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(_n(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}e.interpolate=_n,e.interpolators=[function(e,t){var n=typeof t;return("string"===n?ut.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?pn:vn:t instanceof ze?pn:Array.isArray(t)?xn:"object"===n&&isNaN(t)?gn:mn)(e,t)}],e.interpolateArray=xn;var wn=function(){return O},An=e.map({linear:wn,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return Cn},cubic:function(){return Mn},sin:function(){return Ln},exp:function(){return Dn},circle:function(){return In},elastic:function(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Se*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Se/t)}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},bounce:function(){return Rn}}),kn=e.map({in:O,out:Sn,"in-out":En,"out-in":function(e){return En(Sn(e))}});function Tn(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function Sn(e){return function(t){return 1-e(1-t)}}function En(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Cn(e){return e*e}function Mn(e){return e*e*e}function On(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Ln(e){return 1-Math.cos(e*Ce)}function Dn(e){return Math.pow(2,10*(e-1))}function In(e){return 1-Math.sqrt(1-e*e)}function Rn(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Pn(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Nn(e){var t,n,r,i=[e.a,e.b],o=[e.c,e.d],a=Fn(i),s=zn(i,o),l=Fn(((t=o)[0]+=(r=-s)*(n=i)[0],t[1]+=r*n[1],t))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,a*=-1,s*=-1),this.rotate=(a?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Oe,this.translate=[e.e,e.f],this.scale=[a,l],this.skew=l?Math.atan2(s,l)*Oe:0}function zn(e,t){return e[0]*t[0]+e[1]*t[1]}function Fn(e){var t=Math.sqrt(zn(e,e));return t&&(e[0]/=t,e[1]/=t),t}e.ease=function(e){var t=e.indexOf("-"),r=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return r=An.get(r)||wn,Tn((i=kn.get(i)||O)(r.apply(null,n.call(arguments,1))))},e.interpolateHcl=function(t,n){t=e.hcl(t),n=e.hcl(n);var r=t.h,i=t.c,o=t.l,a=n.h-r,s=n.c-i,l=n.l-o;return isNaN(s)&&(s=0,i=isNaN(i)?n.c:i),isNaN(a)?(a=0,r=isNaN(r)?n.h:r):a>180?a-=360:a<-180&&(a+=360),function(e){return qe(r+a*e,i+s*e,o+l*e)+""}},e.interpolateHsl=function(t,n){t=e.hsl(t),n=e.hsl(n);var r=t.h,i=t.s,o=t.l,a=n.h-r,s=n.s-i,l=n.l-o;return isNaN(s)&&(s=0,i=isNaN(i)?n.s:i),isNaN(a)?(a=0,r=isNaN(r)?n.h:r):a>180?a-=360:a<-180&&(a+=360),function(e){return je(r+a*e,i+s*e,o+l*e)+""}},e.interpolateLab=function(t,n){t=e.lab(t),n=e.lab(n);var r=t.l,i=t.a,o=t.b,a=n.l-r,s=n.a-i,l=n.b-o;return function(e){return Xe(r+a*e,i+s*e,o+l*e)+""}},e.interpolateRound=Pn,e.transform=function(t){var n=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){n.setAttribute("transform",e);var t=n.transform.baseVal.consolidate()}return new Nn(t?t.matrix:Bn)})(t)},Nn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Bn={a:1,b:0,c:0,d:1,e:0,f:0};function jn(e){return e.length?e.pop()+",":""}function Un(t,n){var r=[],i=[];return t=e.transform(t),n=e.transform(n),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:mn(e[0],t[0])},{i:i-2,x:mn(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(t.translate,n.translate,r,i),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(jn(n)+"rotate(",null,")")-2,x:mn(e,t)})):t&&n.push(jn(n)+"rotate("+t+")")}(t.rotate,n.rotate,r,i),function(e,t,n,r){e!==t?r.push({i:n.push(jn(n)+"skewX(",null,")")-2,x:mn(e,t)}):t&&n.push(jn(n)+"skewX("+t+")")}(t.skew,n.skew,r,i),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(jn(n)+"scale(",null,",",null,")");r.push({i:i-4,x:mn(e[0],t[0])},{i:i-2,x:mn(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(jn(n)+"scale("+t+")")}(t.scale,n.scale,r,i),t=n=null,function(e){for(var t,n=-1,o=i.length;++n<o;)r[(t=i[n]).i]=t.x(e);return r.join("")}}function Vn(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function qn(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Hn(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;for(var n=$n(e),r=$n(t),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function $n(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wn(e){e.fixed|=2}function Gn(e){e.fixed&=-7}function Yn(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Xn(e){e.fixed&=-5}function Zn(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)null!=(o=a[l])&&(Zn(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var c=t*n[e.point.index];e.charge+=e.pointCharge=c,r+=c*e.point.x,i+=c*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}e.interpolateTransform=Un,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Hn(e[n]));return t}},e.layout.chord=function(){var t,n,r,i,o,a,s,l={},c=0;function u(){var l,u,d,f,p,g={},m=[],v=e.range(i),y=[];for(t=[],n=[],l=0,f=-1;++f<i;){for(u=0,p=-1;++p<i;)u+=r[f][p];m.push(u),y.push(e.range(i)),l+=u}for(o&&v.sort((function(e,t){return o(m[e],m[t])})),a&&y.forEach((function(e,t){e.sort((function(e,n){return a(r[t][e],r[t][n])}))})),l=(Se-c*i)/l,u=0,f=-1;++f<i;){for(d=u,p=-1;++p<i;){var b=v[f],_=y[b][p],x=r[b][_],w=u,A=u+=x*l;g[b+"-"+_]={index:b,subindex:_,startAngle:w,endAngle:A,value:x}}n[b]={index:b,startAngle:d,endAngle:u,value:m[b]},u+=c}for(f=-1;++f<i;)for(p=f-1;++p<i;){var k=g[f+"-"+p],T=g[p+"-"+f];(k.value||T.value)&&t.push(k.value<T.value?{source:T,target:k}:{source:k,target:T})}s&&h()}function h(){t.sort((function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return l.matrix=function(e){return arguments.length?(i=(r=e)&&r.length,t=n=null,l):r},l.padding=function(e){return arguments.length?(c=e,t=n=null,l):c},l.sortGroups=function(e){return arguments.length?(o=e,t=n=null,l):o},l.sortSubgroups=function(e){return arguments.length?(a=e,t=null,l):a},l.sortChords=function(e){return arguments.length?(s=e,t&&h(),l):s},l.chords=function(){return t||u(),t},l.groups=function(){return n||u(),n},l},e.layout.force=function(){var t,n,r,i,o,a,s={},l=e.dispatch("start","tick","end"),c=[1,1],u=.9,h=Kn,d=Jn,f=-30,p=Qn,g=.1,m=.64,v=[],y=[];function b(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,l=o*o+a*a;if(s*s/m<l){if(l<p){var c=t.charge/l;e.px-=o*c,e.py-=a*c}return!0}t.point&&l&&l<p&&(c=t.pointCharge/l,e.px-=o*c,e.py-=a*c)}return!t.charge}}function _(t){t.px=e.event.x,t.py=e.event.y,s.resume()}return s.tick=function(){if((r*=.99)<.005)return t=null,l.end({type:"end",alpha:r=0}),!0;var n,s,h,d,p,m,_,x,w,A=v.length,k=y.length;for(s=0;s<k;++s)d=(h=y[s]).source,(m=(x=(p=h.target).x-d.x)*x+(w=p.y-d.y)*w)&&(x*=m=r*o[s]*((m=Math.sqrt(m))-i[s])/m,w*=m,p.x-=x*(_=d.weight+p.weight?d.weight/(d.weight+p.weight):.5),p.y-=w*_,d.x+=x*(_=1-_),d.y+=w*_);if((_=r*g)&&(x=c[0]/2,w=c[1]/2,s=-1,_))for(;++s<A;)(h=v[s]).x+=(x-h.x)*_,h.y+=(w-h.y)*_;if(f)for(Zn(n=e.geom.quadtree(v),r,a),s=-1;++s<A;)(h=v[s]).fixed||n.visit(b(h));for(s=-1;++s<A;)(h=v[s]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*u,h.y-=(h.py-(h.py=h.y))*u);l.tick({type:"tick",alpha:r})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(c=e,s):c},s.linkDistance=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.friction=function(e){return arguments.length?(u=+e,s):u},s.charge=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.chargeDistance=function(e){return arguments.length?(p=e*e,s):Math.sqrt(p)},s.gravity=function(e){return arguments.length?(g=+e,s):g},s.theta=function(e){return arguments.length?(m=e*e,s):Math.sqrt(m)},s.alpha=function(e){return arguments.length?(e=+e,r?e>0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=bt(s.tick)),s):r},s.start=function(){var e,t,n,r=v.length,l=y.length,u=c[0],p=c[1];for(e=0;e<r;++e)(n=v[e]).index=e,n.weight=0;for(e=0;e<l;++e)"number"==typeof(n=y[e]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<r;++e)n=v[e],isNaN(n.x)&&(n.x=g("x",u)),isNaN(n.y)&&(n.y=g("y",p)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(i=[],"function"==typeof h)for(e=0;e<l;++e)i[e]=+h.call(this,y[e],e);else for(e=0;e<l;++e)i[e]=h;if(o=[],"function"==typeof d)for(e=0;e<l;++e)o[e]=+d.call(this,y[e],e);else for(e=0;e<l;++e)o[e]=d;if(a=[],"function"==typeof f)for(e=0;e<r;++e)a[e]=+f.call(this,v[e],e);else for(e=0;e<r;++e)a[e]=f;function g(n,i){if(!t){for(t=new Array(r),c=0;c<r;++c)t[c]=[];for(c=0;c<l;++c){var o=y[c];t[o.source.index].push(o.target),t[o.target.index].push(o.source)}}for(var a,s=t[e],c=-1,u=s.length;++c<u;)if(!isNaN(a=s[c][n]))return a;return Math.random()*i}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(n||(n=e.behavior.drag().origin(O).on("dragstart.force",Wn).on("drag.force",_).on("dragend.force",Gn)),!arguments.length)return n;this.on("mouseover.force",Yn).on("mouseout.force",Xn).call(n)},e.rebind(s,l,"on")};var Kn=20,Jn=1,Qn=1/0;function er(t,n){return e.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=ar,t}function tr(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function nr(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function rr(e){return e.children}function ir(e){return e.value}function or(e,t){return t.value-e.value}function ar(t){return e.merge(t.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}e.layout.hierarchy=function(){var e=or,t=rr,n=ir;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(c=t.call(r,o,o.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;n&&(o.value=0),o.children=c}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return nr(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(tr(e,(function(e){e.children&&(e.value=0)})),nr(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},e.layout.partition=function(){var t=e.layout.hierarchy(),n=[1,1];function r(e,t,n,i){var o=e.children;if(e.x=t,e.y=e.depth*i,e.dx=n,e.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=e.value?n/e.value:0;++c<a;)r(s=o[c],t,l=s.value*n,i),t+=l}}function i(e){var t=e.children,n=0;if(t&&(r=t.length))for(var r,o=-1;++o<r;)n=Math.max(n,i(t[o]));return 1+n}function o(e,o){var a=t.call(this,e,o);return r(a[0],0,n[0],n[1]/i(a[0])),a}return o.size=function(e){return arguments.length?(n=e,o):n},er(o,t)},e.layout.pie=function(){var t=Number,n=sr,r=0,i=Se,o=0;function a(s){var l,c=s.length,u=s.map((function(e,n){return+t.call(a,e,n)})),h=+("function"==typeof r?r.apply(this,arguments):r),d=("function"==typeof i?i.apply(this,arguments):i)-h,f=Math.min(Math.abs(d)/c,+("function"==typeof o?o.apply(this,arguments):o)),p=f*(d<0?-1:1),g=e.sum(u),m=g?(d-c*p)/g:0,v=e.range(c),y=[];return null!=n&&v.sort(n===sr?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])}),v.forEach((function(e){y[e]={data:s[e],value:l=u[e],startAngle:h,endAngle:h+=l*m+p,padAngle:f}})),y}return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(e){return arguments.length?(n=e,a):n},a.startAngle=function(e){return arguments.length?(r=e,a):r},a.endAngle=function(e){return arguments.length?(i=e,a):i},a.padAngle=function(e){return arguments.length?(o=e,a):o},a};var sr={};function lr(e){return e.x}function cr(e){return e.y}function ur(e,t,n){e.y0=t,e.y=n}e.layout.stack=function(){var t=O,n=fr,r=pr,i=ur,o=lr,a=cr;function s(l,c){if(!(f=l.length))return l;var u=l.map((function(e,n){return t.call(s,e,n)})),h=u.map((function(e){return e.map((function(e,t){return[o.call(s,e,t),a.call(s,e,t)]}))})),d=n.call(s,h,c);u=e.permute(u,d),h=e.permute(h,d);var f,p,g,m,v=r.call(s,h,c),y=u[0].length;for(g=0;g<y;++g)for(i.call(s,u[0][g],m=v[g],h[0][g][1]),p=1;p<f;++p)i.call(s,u[p][g],m+=h[p-1][g][1],h[p][g][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(e){return arguments.length?(n="function"==typeof e?e:hr.get(e)||fr,s):n},s.offset=function(e){return arguments.length?(r="function"==typeof e?e:dr.get(e)||pr,s):r},s.x=function(e){return arguments.length?(o=e,s):o},s.y=function(e){return arguments.length?(a=e,s):a},s.out=function(e){return arguments.length?(i=e,s):i},s};var hr=e.map({"inside-out":function(t){var n,r,i=t.length,o=t.map(gr),a=t.map(mr),s=e.range(i).sort((function(e,t){return o[e]-o[t]})),l=0,c=0,u=[],h=[];for(n=0;n<i;++n)r=s[n],l<c?(l+=a[r],u.push(r)):(c+=a[r],h.push(r));return h.reverse().concat(u)},reverse:function(t){return e.range(t.length).reverse()},default:fr}),dr=e.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,r,i,o,a,s,l,c,u=e.length,h=e[0],d=h.length,f=[];for(f[0]=l=c=0,n=1;n<d;++n){for(t=0,i=0;t<u;++t)i+=e[t][n][1];for(t=0,o=0,s=h[n][0]-h[n-1][0];t<u;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}f[n]=l-=i?o/i*s:0,l<c&&(c=l)}for(n=0;n<d;++n)f[n]-=c;return f},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:pr});function fr(t){return e.range(t.length)}function pr(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function gr(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function mr(e){return e.reduce(vr,0)}function vr(e,t){return e+t[1]}function yr(e,t){return br(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function br(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function _r(t){return[e.min(t),e.max(t)]}function xr(e,t){return e.value-t.value}function wr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ar(e,t){e._pack_next=t,t._pack_prev=e}function kr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Tr(e){if((t=e.children)&&(l=t.length)){var t,n,r,i,o,a,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(t.forEach(Sr),(n=t[0]).x=-n.r,n.y=0,b(n),l>1&&((r=t[1]).x=r.r,r.y=0,b(r),l>2))for(Mr(n,r,i=t[2]),b(i),wr(n,i),n._pack_prev=i,wr(i,r),r=n._pack_next,o=3;o<l;o++){Mr(n,r,i=t[o]);var f=0,p=1,g=1;for(a=r._pack_next;a!==r;a=a._pack_next,p++)if(kr(a,i)){f=1;break}if(1==f)for(s=n._pack_prev;s!==a._pack_prev&&!kr(s,i);s=s._pack_prev,g++);f?(p<g||p==g&&r.r<n.r?Ar(n,r=a):Ar(n=s,r),o--):(wr(n,i),r=i,b(i))}var m=(c+u)/2,v=(h+d)/2,y=0;for(o=0;o<l;o++)(i=t[o]).x-=m,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));e.r=y,t.forEach(Er)}function b(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),h=Math.min(e.y-e.r,h),d=Math.max(e.y+e.r,d)}}function Sr(e){e._pack_next=e._pack_prev=e}function Er(e){delete e._pack_next,delete e._pack_prev}function Cr(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)Cr(i[o],t,n,r)}function Mr(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o,l=.5+((r*=r)-(a*=a))/(2*s),c=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+l*i+c*o,n.y=e.y+l*o-c*i}else n.x=e.x+r,n.y=e.y}function Or(e,t){return e.parent==t.parent?1:2}function Lr(e){var t=e.children;return t.length?t[0]:e.t}function Dr(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Ir(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Rr(e,t,n){return e.a.parent===t.parent?e.a:n}function Pr(e){var t=e.children;return t&&t.length?Pr(t[0]):e}function Nr(e){var t,n=e.children;return n&&(t=n.length)?Nr(n[t-1]):e}function zr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Fr(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Br(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function jr(e){return e.rangeExtent?e.rangeExtent():Br(e.range())}function Ur(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Vr(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function qr(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Hr}e.layout.histogram=function(){var t=!0,n=Number,r=_r,i=yr;function o(o,a){for(var s,l,c=[],u=o.map(n,this),h=r.call(this,u,a),d=i.call(this,h,u,a),f=(a=-1,u.length),p=d.length-1,g=t?1:1/f;++a<p;)(s=c[a]=[]).dx=d[a+1]-(s.x=d[a]),s.y=0;if(p>0)for(a=-1;++a<f;)(l=u[a])>=h[0]&&l<=h[1]&&((s=c[e.bisect(d,l,1,p)-1]).y+=g,s.push(o[a]));return c}return o.value=function(e){return arguments.length?(n=e,o):n},o.range=function(e){return arguments.length?(r=ht(e),o):r},o.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return br(t,e)}:ht(e),o):i},o.frequency=function(e){return arguments.length?(t=!!e,o):t},o},e.layout.pack=function(){var t,n=e.layout.hierarchy().sort(xr),r=0,i=[1,1];function o(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,nr(s,(function(e){e.r=+u(e.value)})),nr(s,Tr),r){var h=r*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;nr(s,(function(e){e.r+=h})),nr(s,Tr),nr(s,(function(e){e.r-=h}))}return Cr(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return o.size=function(e){return arguments.length?(i=e,o):i},o.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,o):t},o.padding=function(e){return arguments.length?(r=+e,o):r},er(o,n)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),n=Or,r=[1,1],i=null;function o(e,o){var c=t.call(this,e,o),u=c[0],h=function(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:t,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(u);if(nr(h,a),h.parent.m=-h.z,tr(h,s),i)tr(u,l);else{var d=u,f=u,p=u;tr(u,(function(e){e.x<d.x&&(d=e),e.x>f.x&&(f=e),e.depth>p.depth&&(p=e)}));var g=n(d,f)/2-d.x,m=r[0]/(f.x+n(f,d)/2+g),v=r[1]/(p.depth||1);tr(u,(function(e){e.x=(e.x+g)*m,e.y=e.depth*v}))}return c}function a(e){var t=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(t.length){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var o=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+n(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+n(e._,i._));e.parent.A=function(e,t,r){if(t){for(var i,o=e,a=e,s=t,l=o.parent.children[0],c=o.m,u=a.m,h=s.m,d=l.m;s=Dr(s),o=Lr(o),s&&o;)l=Lr(l),(a=Dr(a)).a=e,(i=s.z+h-o.z-c+n(s._,o._))>0&&(Ir(Rr(s,e,r),e,i),c+=i,u+=i),h+=s.m,c+=o.m,d+=l.m,u+=a.m;s&&!Dr(a)&&(a.t=s,a.m+=h-u),o&&!Lr(l)&&(l.t=o,l.m+=c-d,r=e)}return r}(e,i,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return o.separation=function(e){return arguments.length?(n=e,o):n},o.size=function(e){return arguments.length?(i=null==(r=e)?l:null,o):i?null:r},o.nodeSize=function(e){return arguments.length?(i=null==(r=e)?null:l,o):i?r:null},er(o,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),n=Or,r=[1,1],i=!1;function o(o,a){var s,l=t.call(this,o,a),c=l[0],u=0;nr(c,(function(t){var r=t.children;r&&r.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(r)):(t.x=s?u+=n(t,s):0,t.y=0,s=t)}));var h=Pr(c),d=Nr(c),f=h.x-n(h,d)/2,p=d.x+n(d,h)/2;return nr(c,i?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-f)/(p-f)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),l}return o.separation=function(e){return arguments.length?(n=e,o):n},o.size=function(e){return arguments.length?(i=null==(r=e),o):i?null:r},o.nodeSize=function(e){return arguments.length?(i=null!=(r=e),o):i?r:null},er(o,t)},e.layout.treemap=function(){var t,n=e.layout.hierarchy(),r=Math.round,i=[1,1],o=null,a=zr,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function h(e){var t=e.children;if(t&&t.length){var n,r,i,o=a(e),s=[],c=t.slice(),d=1/0,g="slice"===l?o.dx:"dice"===l?o.dy:"slice-dice"===l?1&e.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(u(c,o.dx*o.dy/e.value),s.area=0;(i=c.length)>0;)s.push(n=c[i-1]),s.area+=n.area,"squarify"!==l||(r=f(s,g))<=d?(c.pop(),d=r):(s.area-=s.pop().area,p(s,g,o,!1),g=Math.min(o.dx,o.dy),s.length=s.area=0,d=1/0);s.length&&(p(s,g,o,!0),s.length=s.area=0),t.forEach(h)}}function d(e){var t=e.children;if(t&&t.length){var n,r=a(e),i=t.slice(),o=[];for(u(i,r.dx*r.dy/e.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(p(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(d)}}function f(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*c/r,r/(t*o*c)):1/0}function p(e,t,n,i){var o,a=-1,s=e.length,l=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((i||u>n.dy)&&(u=n.dy);++a<s;)(o=e[a]).x=l,o.y=c,o.dy=u,l+=o.dx=Math.min(n.x+n.dx-l,u?r(o.area/u):0);o.z=!0,o.dx+=n.x+n.dx-l,n.y+=u,n.dy-=u}else{for((i||u>n.dx)&&(u=n.dx);++a<s;)(o=e[a]).x=l,o.y=c,o.dx=u,c+=o.dy=Math.min(n.y+n.dy-c,u?r(o.area/u):0);o.z=!1,o.dy+=n.y+n.dy-c,n.x+=u,n.dx-=u}}function g(e){var r=t||n(e),o=r[0];return o.x=o.y=0,o.value?(o.dx=i[0],o.dy=i[1]):o.dx=o.dy=0,t&&n.revalue(o),u([o],o.dx*o.dy/o.value),(t?d:h)(o),s&&(t=r),r}return g.size=function(e){return arguments.length?(i=e,g):i},g.padding=function(e){if(!arguments.length)return o;function t(t){var n=e.call(g,t,t.depth);return null==n?zr(t):Fr(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Fr(t,e)}var r;return a=null==(o=e)?zr:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,g},g.round=function(e){return arguments.length?(r=e?Math.round:Number,g):r!=Number},g.sticky=function(e){return arguments.length?(s=e,t=null,g):s},g.ratio=function(e){return arguments.length?(c=e,g):c},g.mode=function(e){return arguments.length?(l=e+"",g):l},er(g,n)},e.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=e.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},e.scale={};var Hr={floor:O,ceil:O};function $r(t,n,r,i){var o=[],a=[],s=0,l=Math.min(t.length,n.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++s<=l;)o.push(r(t[s-1],t[s])),a.push(i(n[s-1],n[s]));return function(n){var r=e.bisect(t,n,1,l)-1;return a[r](o[r](n))}}function Wr(e,t,n,r){var i,o;function a(){var a=Math.min(e.length,t.length)>2?$r:Ur,l=r?qn:Vn;return i=a(e,t,l,n),o=a(t,e,l,_n),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},s.range=function(e){return arguments.length?(t=e,a()):t},s.rangeRound=function(e){return s.range(e).interpolate(Pn)},s.clamp=function(e){return arguments.length?(r=e,a()):r},s.interpolate=function(e){return arguments.length?(n=e,a()):n},s.ticks=function(t){return Zr(e,t)},s.tickFormat=function(t,n){return d3_scale_linearTickFormat(e,t,n)},s.nice=function(t){return Yr(e,t),a()},s.copy=function(){return Wr(e,t,n,r)},a()}function Gr(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Yr(e,t){return Vr(e,qr(Xr(e,t)[2])),Vr(e,qr(Xr(e,t)[2])),e}function Xr(e,t){null==t&&(t=10);var n=Br(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Zr(t,n){return e.range.apply(e,Xr(t,n))}function Kr(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Vr(r.map(i),n?Math:Jr);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Br(r),a=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),h=t%1?2:t;if(isFinite(u-c)){if(n){for(;c<u;c++)for(var d=1;d<h;d++)a.push(o(c)*d);a.push(o(c))}else for(a.push(o(c));c++<u;)for(d=h-1;d>0;d--)a.push(o(c)*d);for(c=0;a[c]<s;c++);for(u=a.length;a[u-1]>l;u--);a=a.slice(c,u)}return a},a.copy=function(){return Kr(e.copy(),t,n,r)},Gr(a,e)}e.scale.linear=function(){return Wr([0,1],[0,1],_n,!1)},e.scale.log=function(){return Kr(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Jr={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Qr(e,t,n){var r=ei(t),i=ei(1/t);function o(t){return e(r(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),o):n},o.ticks=function(e){return Zr(n,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},o.nice=function(e){return o.domain(Yr(n,e))},o.exponent=function(a){return arguments.length?(r=ei(t=a),i=ei(1/t),e.domain(n.map(r)),o):t},o.copy=function(){return Qr(e.copy(),t,n)},Gr(o,e)}function ei(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ti(t,n){var r,i,o;function a(e){return i[((r.get(e)||("range"===n.t?r.set(e,t.push(e)):NaN))-1)%i.length]}function s(n,r){return e.range(t.length).map((function(e){return n+r*e}))}return a.domain=function(e){if(!arguments.length)return t;t=[],r=new x;for(var i,o=-1,s=e.length;++o<s;)r.has(i=e[o])||r.set(i,t.push(i));return a[n.t].apply(a,n.a)},a.range=function(e){return arguments.length?(i=e,o=0,n={t:"range",a:arguments},a):i},a.rangePoints=function(e,r){arguments.length<2&&(r=0);var l=e[0],c=e[1],u=t.length<2?(l=(l+c)/2,0):(c-l)/(t.length-1+r);return i=s(l+u*r/2,u),o=0,n={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(e,r){arguments.length<2&&(r=0);var l=e[0],c=e[1],u=t.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(t.length-1+r)|0;return i=s(l+Math.round(u*r/2+(c-l-(t.length-1+r)*u)/2),u),o=0,n={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(e,r,l){arguments.length<2&&(r=0),arguments.length<3&&(l=r);var c=e[1]<e[0],u=e[c-0],h=(e[1-c]-u)/(t.length-r+2*l);return i=s(u+h*l,h),c&&i.reverse(),o=h*(1-r),n={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(e,r,l){arguments.length<2&&(r=0),arguments.length<3&&(l=r);var c=e[1]<e[0],u=e[c-0],h=e[1-c],d=Math.floor((h-u)/(t.length-r+2*l));return i=s(u+Math.round((h-u-(t.length-r)*d)/2),d),c&&i.reverse(),o=Math.round(d*(1-r)),n={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return o},a.rangeExtent=function(){return Br(n.a[0])},a.copy=function(){return ti(t,n)},a.domain(t)}e.scale.pow=function(){return Qr(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ti([],{t:"range",a:[[]]})},e.scale.category10=function(){return e.scale.ordinal().range(ni)},e.scale.category20=function(){return e.scale.ordinal().range(ri)},e.scale.category20b=function(){return e.scale.ordinal().range(ii)},e.scale.category20c=function(){return e.scale.ordinal().range(oi)};var ni=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(nt),ri=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(nt),ii=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(nt),oi=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(nt);function ai(t,n){var r;function i(){var i=0,a=n.length;for(r=[];++i<a;)r[i-1]=e.quantile(t,i/a);return o}function o(t){if(!isNaN(t=+t))return n[e.bisect(r,t)]}return o.domain=function(e){return arguments.length?(t=e.map(f).filter(p).sort(d),i()):t},o.range=function(e){return arguments.length?(n=e,i()):n},o.quantiles=function(){return r},o.invertExtent=function(e){return(e=n.indexOf(e))<0?[NaN,NaN]:[e>0?r[e-1]:t[0],e<r.length?r[e]:t[t.length-1]]},o.copy=function(){return ai(t,n)},i()}function si(e,t,n){var r,i;function o(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function a(){return r=n.length/(t-e),i=n.length-1,o}return o.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],a()):[e,t]},o.range=function(e){return arguments.length?(n=e,a()):n},o.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/r+e,t+1/r]},o.copy=function(){return si(e,t,n)},a()}function li(t,n){function r(r){if(r<=r)return n[e.bisect(t,r)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(e){return arguments.length?(n=e,r):n},r.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},r.copy=function(){return li(t,n)},r}function ci(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Zr(e,t)},t.tickFormat=function(t,n){return d3_scale_linearTickFormat(e,t,n)},t.copy=function(){return ci(e)},t}function ui(){return 0}e.scale.quantile=function(){return ai([],[])},e.scale.quantize=function(){return si(0,1,[0,1])},e.scale.threshold=function(){return li([.5],[0,1])},e.scale.identity=function(){return ci([0,1])},e.svg={},e.svg.arc=function(){var e=di,t=fi,n=ui,r=hi,i=pi,o=gi,a=mi;function s(){var s=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=i.apply(this,arguments)-Ce,h=o.apply(this,arguments)-Ce,d=Math.abs(h-u),f=u>h?0:1;if(c<s&&(p=c,c=s,s=p),d>=Ee)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,g,m,v,y,b,_,x,w,A,k,T,S=0,E=0,C=[];if((v=(+a.apply(this,arguments)||0)/2)&&(m=r===hi?Math.sqrt(s*s+c*c):+r.apply(this,arguments),f||(E*=-1),c&&(E=Le(m/c*Math.sin(v))),s&&(S=Le(m/s*Math.sin(v)))),c){y=c*Math.cos(u+E),b=c*Math.sin(u+E),_=c*Math.cos(h-E),x=c*Math.sin(h-E);var M=Math.abs(h-u-2*E)<=Te?0:1;if(E&&vi(y,b,_,x)===f^M){var O=(u+h)/2;y=c*Math.cos(O),b=c*Math.sin(O),_=x=null}}else y=b=0;if(s){w=s*Math.cos(h-S),A=s*Math.sin(h-S),k=s*Math.cos(u+S),T=s*Math.sin(u+S);var L=Math.abs(u-h+2*S)<=Te?0:1;if(S&&vi(w,A,k,T)===1-f^L){var D=(u+h)/2;w=s*Math.cos(D),A=s*Math.sin(D),k=T=null}}else w=A=0;if(d>ke&&(p=Math.min(Math.abs(c-s)/2,+n.apply(this,arguments)))>.001){g=s<c^f?0:1;var I=p,R=p;if(d<Te){var P=null==k?[w,A]:null==_?[y,b]:Mt([y,b],[k,T],[_,x],[w,A]),N=y-P[0],z=b-P[1],F=_-P[0],B=x-P[1],j=1/Math.sin(Math.acos((N*F+z*B)/(Math.sqrt(N*N+z*z)*Math.sqrt(F*F+B*B)))/2),U=Math.sqrt(P[0]*P[0]+P[1]*P[1]);R=Math.min(p,(s-U)/(j-1)),I=Math.min(p,(c-U)/(j+1))}if(null!=_){var V=yi(null==k?[w,A]:[k,T],[y,b],c,I,f),q=yi([_,x],[w,A],c,I,f);p===I?C.push("M",V[0],"A",I,",",I," 0 0,",g," ",V[1],"A",c,",",c," 0 ",1-f^vi(V[1][0],V[1][1],q[1][0],q[1][1]),",",f," ",q[1],"A",I,",",I," 0 0,",g," ",q[0]):C.push("M",V[0],"A",I,",",I," 0 1,",g," ",q[0])}else C.push("M",y,",",b);if(null!=k){var H=yi([y,b],[k,T],s,-R,f),$=yi([w,A],null==_?[y,b]:[_,x],s,-R,f);p===R?C.push("L",$[0],"A",R,",",R," 0 0,",g," ",$[1],"A",s,",",s," 0 ",f^vi($[1][0],$[1][1],H[1][0],H[1][1]),",",1-f," ",H[1],"A",R,",",R," 0 0,",g," ",H[0]):C.push("L",$[0],"A",R,",",R," 0 0,",g," ",H[0])}else C.push("L",w,",",A)}else C.push("M",y,",",b),null!=_&&C.push("A",c,",",c," 0 ",M,",",f," ",_,",",x),C.push("L",w,",",A),null!=k&&C.push("A",s,",",s," 0 ",L,",",1-f," ",k,",",T);return C.push("Z"),C.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=ht(t),s):e},s.outerRadius=function(e){return arguments.length?(t=ht(e),s):t},s.cornerRadius=function(e){return arguments.length?(n=ht(e),s):n},s.padRadius=function(e){return arguments.length?(r=e==hi?hi:ht(e),s):r},s.startAngle=function(e){return arguments.length?(i=ht(e),s):i},s.endAngle=function(e){return arguments.length?(o=ht(e),s):o},s.padAngle=function(e){return arguments.length?(a=ht(e),s):a},s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ce;return[Math.cos(r)*n,Math.sin(r)*n]},s};var hi="auto";function di(e){return e.innerRadius}function fi(e){return e.outerRadius}function pi(e){return e.startAngle}function gi(e){return e.endAngle}function mi(e){return e&&e.padAngle}function vi(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function yi(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=e[0]+l,h=e[1]+c,d=t[0]+l,f=t[1]+c,p=(u+d)/2,g=(h+f)/2,m=d-u,v=f-h,y=m*m+v*v,b=n-r,_=u*f-d*h,x=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),w=(_*v-m*x)/y,A=(-_*m-v*x)/y,k=(_*v+m*x)/y,T=(-_*m+v*x)/y,S=w-p,E=A-g,C=k-p,M=T-g;return S*S+E*E>C*C+M*M&&(w=k,A=T),[[w-l,A-c],[w*n/b,A*n/b]]}function bi(){return!0}function _i(e){var t=At,n=kt,r=bi,i=wi,o=i.key,a=.7;function s(o){var s,l=[],c=[],u=-1,h=o.length,d=ht(t),f=ht(n);function p(){l.push("M",i(e(c),a))}for(;++u<h;)r.call(this,s=o[u],u)?c.push([+d.call(this,s,u),+f.call(this,s,u)]):c.length&&(p(),c=[]);return c.length&&p(),l.length?l.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(r=e,s):r},s.interpolate=function(e){return arguments.length?(o="function"==typeof e?i=e:(i=xi.get(e)||wi).key,s):o},s.tension=function(e){return arguments.length?(a=e,s):a},s}e.svg.line=function(){return _i(O)};var xi=e.map({linear:wi,"linear-closed":Ai,step:function(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")},"step-before":ki,"step-after":Ti,basis:Ci,"basis-open":function(e){if(e.length<4)return wi(e);for(var t,n=[],r=-1,i=e.length,o=[0],a=[0];++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);for(n.push(Mi(Di,o)+","+Mi(Di,a)),--r;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Ii(n,o,a);return n.join("")},"basis-closed":function(e){for(var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);for(t=[Mi(Di,a),",",Mi(Di,s)],--r;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Ii(t,a,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,c=-1;++c<=n;)i=c/n,(r=e[c])[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*l);return Ci(e)},cardinal:function(e,t){return e.length<3?wi(e):e[0]+Si(e,Ei(e,t))},"cardinal-open":function(e,t){return e.length<4?wi(e):e[1]+Si(e.slice(1,-1),Ei(e,t))},"cardinal-closed":function(e,t){return e.length<3?Ai(e):e[0]+Si((e.push(e[0]),e),Ei([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?wi(e):e[0]+Si(e,function(e){for(var t,n,r,i,o=[],a=function(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=Ri(i,o);++t<n;)r[t]=(a+(a=Ri(i=o,o=e[t+1])))/2;return r[t]=a,r}(e),s=-1,l=e.length-1;++s<l;)t=Ri(e[s],e[s+1]),y(t)<ke?a[s]=a[s+1]=0:(i=(n=a[s]/t)*n+(r=a[s+1]/t)*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function wi(e){return e.length>1?e.join("L"):e+"Z"}function Ai(e){return e.join("L")+"Z"}function ki(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function Ti(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function Si(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return wi(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;c<t.length;c++,l++)o=e[l],s=t[c],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var u=e[l];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+u[0]+","+u[1]}return r}function Ei(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function Ci(e){if(e.length<3)return wi(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],l=[i,",",o,"L",Mi(Di,a),",",Mi(Di,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Ii(l,a,s);return e.pop(),l.push("L",r),l.join("")}function Mi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}xi.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var Oi=[0,2/3,1/3,0],Li=[0,1/3,2/3,0],Di=[0,1/6,2/3,1/6];function Ii(e,t,n){e.push("C",Mi(Oi,t),",",Mi(Oi,n),",",Mi(Li,t),",",Mi(Li,n),",",Mi(Di,t),",",Mi(Di,n))}function Ri(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Pi(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-Ce,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Ni(e){var t=At,n=At,r=0,i=kt,o=bi,a=wi,s=a.key,l=a,c="L",u=.7;function h(s){var h,d,f,p=[],g=[],m=[],v=-1,y=s.length,b=ht(t),_=ht(r),x=t===n?function(){return d}:ht(n),w=r===i?function(){return f}:ht(i);function A(){p.push("M",a(e(m),u),c,l(e(g.reverse()),u),"Z")}for(;++v<y;)o.call(this,h=s[v],v)?(g.push([d=+b.call(this,h,v),f=+_.call(this,h,v)]),m.push([+x.call(this,h,v),+w.call(this,h,v)])):g.length&&(A(),g=[],m=[]);return g.length&&A(),p.length?p.join(""):null}return h.x=function(e){return arguments.length?(t=n=e,h):n},h.x0=function(e){return arguments.length?(t=e,h):t},h.x1=function(e){return arguments.length?(n=e,h):n},h.y=function(e){return arguments.length?(r=i=e,h):i},h.y0=function(e){return arguments.length?(r=e,h):r},h.y1=function(e){return arguments.length?(i=e,h):i},h.defined=function(e){return arguments.length?(o=e,h):o},h.interpolate=function(e){return arguments.length?(s="function"==typeof e?a=e:(a=xi.get(e)||wi).key,l=a.reverse||a,c=a.closed?"M":"L",h):s},h.tension=function(e){return arguments.length?(u=e,h):u},h}function zi(e){return e.source}function Fi(e){return e.target}function Bi(e){return e.radius}function ji(e){return[e.x,e.y]}function Ui(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ce;return[n*Math.cos(r),n*Math.sin(r)]}}function Vi(){return 64}function qi(){return"circle"}function Hi(e){var t=Math.sqrt(e/Te);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}e.svg.line.radial=function(){var e=_i(Pi);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},ki.reverse=Ti,Ti.reverse=ki,e.svg.area=function(){return Ni(O)},e.svg.area.radial=function(){var e=Ni(Pi);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},e.svg.chord=function(){var e=zi,t=Fi,n=Bi,r=pi,i=gi;function o(n,r){var i,o,c=a(this,e,n,r),u=a(this,t,n,r);return"M"+c.p0+s(c.r,c.p1,c.a1-c.a0)+(o=u,((i=c).a0==o.a0&&i.a1==o.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+"Z")}function a(e,t,o,a){var s=t.call(e,o,a),l=n.call(e,s,a),c=r.call(e,s,a)-Ce,u=i.call(e,s,a)-Ce;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Te)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return o.radius=function(e){return arguments.length?(n=ht(e),o):n},o.source=function(t){return arguments.length?(e=ht(t),o):e},o.target=function(e){return arguments.length?(t=ht(e),o):t},o.startAngle=function(e){return arguments.length?(r=ht(e),o):r},o.endAngle=function(e){return arguments.length?(i=ht(e),o):i},o},e.svg.diagonal=function(){var e=zi,t=Fi,n=ji;function r(r,i){var o=e.call(this,r,i),a=t.call(this,r,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=ht(t),r):e},r.target=function(e){return arguments.length?(t=ht(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=ji,r=t.projection;return t.projection=function(e){return arguments.length?r(Ui(n=e)):n},t},e.svg.symbol=function(){var e=qi,t=Vi;function n(n,r){return($i.get(e.call(this,n,r))||Hi)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=ht(t),n):e},n.size=function(e){return arguments.length?(t=ht(e),n):t},n};var $i=e.map({circle:Hi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Gi)),n=t*Gi;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Wi),n=t*Wi/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Wi),n=t*Wi/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});e.svg.symbolTypes=$i.keys();var Wi=Math.sqrt(3),Gi=Math.tan(30*Me);W.transition=function(e){for(var t,n,r=Ki||++eo,i=ro(e),o=[],a=Ji||{time:Date.now(),ease:On,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var c=this[s],u=-1,h=c.length;++u<h;)(n=c[u])&&io(n,u,i,r,a),t.push(n)}return Zi(o,i,r)},W.interrupt=function(e){return this.each(null==e?Yi:Xi(ro(e)))};var Yi=Xi(ro());function Xi(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Zi(e,t,n){return U(e,Qi),e.namespace=t,e.id=n,e}var Ki,Ji,Qi=[],eo=0;function to(e,t,n,r){var i=e.id,o=e.namespace;return ue(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function no(e){return null==e&&(e=""),function(){this.textContent=e}}function ro(e){return null==e?"__transition__":"__transition_"+e+"__"}function io(e,t,n,r,i){var o,a,s,l,c,u=e[n]||(e[n]={active:0,count:0}),h=u[r];function d(n){var i=u.active,d=u[i];for(var p in d&&(d.timer.c=null,d.timer.t=NaN,--u.count,delete u[i],d.event&&d.event.interrupt.call(e,e.__data__,d.index)),u)if(+p<r){var g=u[p];g.timer.c=null,g.timer.t=NaN,--u.count,delete u[p]}a.c=f,bt((function(){return a.c&&f(n||1)&&(a.c=null,a.t=NaN),1}),0,o),u.active=r,h.event&&h.event.start.call(e,e.__data__,t),c=[],h.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&c.push(r)})),l=h.ease,s=h.duration}function f(i){for(var o=i/s,a=l(o),d=c.length;d>0;)c[--d].call(e,a);if(o>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[r]:delete e[n],1}h||(o=i.time,a=bt((function(e){var t=h.delay;if(a.t=t+o,t<=e)return d(e-t);a.c=d}),0,o),h=u[r]={tween:new x,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}Qi.call=W.call,Qi.empty=W.empty,Qi.node=W.node,Qi.size=W.size,e.transition=function(t,n){return t&&t.transition?Ki?t.transition(n):t:e.selection().transition(t)},e.transition.prototype=Qi,Qi.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=G(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var c=this[s],u=-1,h=c.length;++u<h;)(r=c[u])&&(n=e.call(r,r.__data__,u,s))?("__data__"in r&&(n.__data__=r.__data__),io(n,u,o,i,r[o][i]),t.push(n)):t.push(null)}return Zi(a,o,i)},Qi.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,l=[];e=Y(e);for(var c=-1,u=this.length;++c<u;)for(var h=this[c],d=-1,f=h.length;++d<f;)if(r=h[d]){o=r[s][a],n=e.call(r,r.__data__,d,c),l.push(t=[]);for(var p=-1,g=n.length;++p<g;)(i=n[p])&&io(i,p,s,a,o),t.push(i)}return Zi(l,s,a)},Qi.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=le(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var a,s=0,l=(a=this[i]).length;s<l;s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return Zi(r,this.namespace,this.id)},Qi.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):ue(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},Qi.attr=function(t,n){if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r="transform"==t?Un:_n,i=e.ns.qualify(t);function o(){this.removeAttribute(i)}function a(){this.removeAttributeNS(i.space,i.local)}function s(e){return null==e?o:(e+="",function(){var t,n=this.getAttribute(i);return n!==e&&(t=r(n,e),function(e){this.setAttribute(i,t(e))})})}function l(e){return null==e?a:(e+="",function(){var t,n=this.getAttributeNS(i.space,i.local);return n!==e&&(t=r(n,e),function(e){this.setAttributeNS(i.space,i.local,t(e))})})}return to(this,"attr."+t,n,i.local?l:s)},Qi.attrTween=function(t,n){var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?function(e,t){var i=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}:function(e,t){var i=n.call(this,e,t,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}})},Qi.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function i(){this.style.removeProperty(e)}function o(t){return null==t?i:(t+="",function(){var r,i=a(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=_n(i,t),function(t){this.style.setProperty(e,r(t),n)})})}return to(this,"style."+e,t,o)},Qi.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,a(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Qi.text=function(e){return to(this,"text",e,no)},Qi.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Qi.ease=function(t){var n=this.id,r=this.namespace;return arguments.length<1?this.node()[r][n].ease:("function"!=typeof t&&(t=e.ease.apply(e,arguments)),ue(this,(function(e){e[r][n].ease=t})))},Qi.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:ue(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},Qi.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:ue(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},Qi.each=function(t,n){var r=this.id,i=this.namespace;if(arguments.length<2){var o=Ji,a=Ki;try{Ki=r,ue(this,(function(e,n,o){Ji=e[i][r],t.call(e,e.__data__,n,o)}))}finally{Ji=o,Ki=a}}else ue(this,(function(o){var a=o[i][r];(a.event||(a.event=e.dispatch("start","end","interrupt"))).on(t,n)}));return this},Qi.transition=function(){for(var e,t,n,r=this.id,i=++eo,o=this.namespace,a=[],s=0,l=this.length;s<l;s++){a.push(e=[]);for(var c,u=0,h=(c=this[s]).length;u<h;u++)(t=c[u])&&io(t,u,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return Zi(a,o,i)},e.svg.axis=function(){var t,n=e.scale.linear(),i=oo,o=6,a=6,s=3,l=[10],c=null;function u(r){r.each((function(){var r,u=e.select(this),h=this.__chart__||n,d=this.__chart__=n.copy(),f=null==c?d.ticks?d.ticks.apply(d,l):d.domain():c,p=null==t?d.tickFormat?d.tickFormat.apply(d,l):O:t,g=u.selectAll(".tick").data(f,d),m=g.enter().insert("g",".domain").attr("class","tick").style("opacity",ke),v=e.transition(g.exit()).style("opacity",ke).remove(),y=e.transition(g.order()).style("opacity",1),b=Math.max(o,0)+s,_=jr(d),x=u.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),e.transition(x));m.append("line"),m.append("text");var A,k,T,S,E=m.select("line"),C=y.select("line"),M=g.select("text").text(p),L=m.select("text"),D=y.select("text"),I="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(r=so,A="x",T="y",k="x2",S="y2",M.attr("dy",I<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+_[0]+","+I*a+"V0H"+_[1]+"V"+I*a)):(r=lo,A="y",T="x",k="y2",S="x2",M.attr("dy",".32em").style("text-anchor",I<0?"end":"start"),w.attr("d","M"+I*a+","+_[0]+"H0V"+_[1]+"H"+I*a)),E.attr(S,I*o),L.attr(T,I*b),C.attr(k,0).attr(S,I*o),D.attr(A,0).attr(T,I*b),d.rangeBand){var R=d,P=R.rangeBand()/2;h=d=function(e){return R(e)+P}}else h.rangeBand?h=d:v.call(r,d,h);m.call(r,h,d),y.call(r,d,d)}))}return u.scale=function(e){return arguments.length?(n=e,u):n},u.orient=function(e){return arguments.length?(i=e in ao?e+"":oo,u):i},u.ticks=function(){return arguments.length?(l=r(arguments),u):l},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(e){return arguments.length?(t=e,u):t},u.tickSize=function(e){var t=arguments.length;return t?(o=+e,a=+arguments[t-1],u):o},u.innerTickSize=function(e){return arguments.length?(o=+e,u):o},u.outerTickSize=function(e){return arguments.length?(a=+e,u):a},u.tickPadding=function(e){return arguments.length?(s=+e,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var oo="bottom",ao={top:1,right:1,bottom:1,left:1};function so(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function lo(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}e.svg.brush=function(){var t,n,r=B(d,"brushstart","brush","brushend"),i=null,o=null,s=[0,0],l=[0,0],c=!0,u=!0,h=uo[0];function d(t){t.each((function(){var t=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",m).on("touchstart.brush",m),n=t.selectAll(".background").data([0]);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var r=t.selectAll(".resize").data(h,O);r.exit().remove(),r.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return co[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),r.style("display",d.empty()?"none":null);var a,s=e.transition(t),l=e.transition(n);i&&(a=jr(i),l.attr("x",a[0]).attr("width",a[1]-a[0]),p(s)),o&&(a=jr(o),l.attr("y",a[0]).attr("height",a[1]-a[0]),g(s)),f(s)}))}function f(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+s[+/e$/.test(e)]+","+l[+/^s/.test(e)]+")"}))}function p(e){e.select(".extent").attr("x",s[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function g(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function m(){var h,m,v=this,y=e.select(e.event.target),b=r.of(v,arguments),_=e.select(v),x=y.datum(),w=!/^(n|s)$/.test(x)&&i,A=!/^(e|w)$/.test(x)&&o,k=y.classed("extent"),T=_e(v),S=e.mouse(v),E=e.select(a(v)).on("keydown.brush",O).on("keyup.brush",L);if(e.event.changedTouches?E.on("touchmove.brush",D).on("touchend.brush",R):E.on("mousemove.brush",D).on("mouseup.brush",R),_.interrupt().selectAll("*").interrupt(),k)S[0]=s[0]-S[0],S[1]=l[0]-S[1];else if(x){var C=+/w$/.test(x),M=+/^n/.test(x);m=[s[1-C]-S[0],l[1-M]-S[1]],S[0]=s[C],S[1]=l[M]}else e.event.altKey&&(h=S.slice());function O(){32==e.event.keyCode&&(k||(h=null,S[0]-=s[1],S[1]-=l[1],k=2),z())}function L(){32==e.event.keyCode&&2==k&&(S[0]+=s[1],S[1]+=l[1],k=0,z())}function D(){var t=e.mouse(v),n=!1;m&&(t[0]+=m[0],t[1]+=m[1]),k||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),S[0]=s[+(t[0]<h[0])],S[1]=l[+(t[1]<h[1])]):h=null),w&&I(t,i,0)&&(p(_),n=!0),A&&I(t,o,1)&&(g(_),n=!0),n&&(f(_),b({type:"brush",mode:k?"move":"resize"}))}function I(e,r,i){var o,a,d=jr(r),f=d[0],p=d[1],g=S[i],m=i?l:s,v=m[1]-m[0];if(k&&(f-=g,p-=v+g),o=(i?u:c)?Math.max(f,Math.min(p,e[i])):e[i],k?a=(o+=g)+v:(h&&(g=Math.max(f,Math.min(p,2*h[i]-o))),g<o?(a=o,o=g):a=g),m[0]!=o||m[1]!=a)return i?n=null:t=null,m[0]=o,m[1]=a,!0}function R(){D(),_.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),e.select("body").style("cursor",null),E.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),b({type:"brushend"})}_.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",y.style("cursor")),b({type:"brushstart"}),D()}return d.event=function(i){i.each((function(){var i=r.of(this,arguments),o={x:s,y:l,i:t,j:n},a=this.__chart__||o;this.__chart__=o,Ki?e.select(this).transition().each("start.brush",(function(){t=a.i,n=a.j,s=a.x,l=a.y,i({type:"brushstart"})})).tween("brush:brush",(function(){var e=xn(s,o.x),r=xn(l,o.y);return t=n=null,function(t){s=o.x=e(t),l=o.y=r(t),i({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=o.i,n=o.j,i({type:"brush",mode:"resize"}),i({type:"brushend"})})):(i({type:"brushstart"}),i({type:"brush",mode:"resize"}),i({type:"brushend"}))}))},d.x=function(e){return arguments.length?(h=uo[!(i=e)<<1|!o],d):i},d.y=function(e){return arguments.length?(h=uo[!i<<1|!(o=e)],d):o},d.clamp=function(e){return arguments.length?(i&&o?(c=!!e[0],u=!!e[1]):i?c=!!e:o&&(u=!!e),d):i&&o?[c,u]:i?c:o?u:null},d.extent=function(e){var r,a,c,u,h;return arguments.length?(i&&(r=e[0],a=e[1],o&&(r=r[0],a=a[0]),t=[r,a],i.invert&&(r=i(r),a=i(a)),a<r&&(h=r,r=a,a=h),r==s[0]&&a==s[1]||(s=[r,a])),o&&(c=e[0],u=e[1],i&&(c=c[1],u=u[1]),n=[c,u],o.invert&&(c=o(c),u=o(u)),u<c&&(h=c,c=u,u=h),c==l[0]&&u==l[1]||(l=[c,u])),d):(i&&(t?(r=t[0],a=t[1]):(r=s[0],a=s[1],i.invert&&(r=i.invert(r),a=i.invert(a)),a<r&&(h=r,r=a,a=h))),o&&(n?(c=n[0],u=n[1]):(c=l[0],u=l[1],o.invert&&(c=o.invert(c),u=o.invert(u)),u<c&&(h=c,c=u,u=h))),i&&o?[[r,c],[a,u]]:i?[r,a]:o&&[c,u])},d.clear=function(){return d.empty()||(s=[0,0],l=[0,0],t=n=null),d},d.empty=function(){return!!i&&s[0]==s[1]||!!o&&l[0]==l[1]},e.rebind(d,r,"on")};var co={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},uo=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function ho(e){return JSON.parse(e.responseText)}function fo(e){var t=i.createRange();return t.selectNode(i.body),t.createContextualFragment(e.responseText)}e.text=dt((function(e){return e.responseText})),e.json=function(e,t){return ft(e,"application/json",ho,t)},e.html=function(e,t){return ft(e,"text/html",fo,t)},e.xml=dt((function(e){return e.responseXML})),"object"==typeof t&&t.exports?t.exports=e:this.d3=e}).apply(self)},{}],59:[function(e,t,n){"use strict";t.exports=e("./quad")},{"./quad":60}],60:[function(e,t,n){"use strict";var r=e("binary-search-bounds"),i=e("clamp"),o=e("parse-rect"),a=e("array-bounds"),s=e("pick-by-alias"),l=e("defined"),c=e("flatten-vertex-data"),u=e("is-obj"),h=e("dtype"),d=e("math-log2");function f(e,t){for(var n=t[0],r=t[1],o=1/(t[2]-n),a=1/(t[3]-r),s=new Array(e.length),l=0,c=e.length/2;l<c;l++)s[2*l]=i((e[2*l]-n)*o,0,1),s[2*l+1]=i((e[2*l+1]-r)*a,0,1);return s}t.exports=function(e,t){t||(t={}),e=c(e,"float64"),t=s(t,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var n=l(t.maxDepth,255),i=l(t.bounds,a(e,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;var p,g=f(e,i),m=e.length>>>1;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?p=new(h(t.dtype))(m):t.dtype&&(p=t.dtype,Array.isArray(p)&&(p.length=m));for(var v=0;v<m;++v)p[v]=v;var y=[],b=[],_=[],x=[];!function e(t,r,i,o,a,s){if(!o.length)return null;var l=y[a]||(y[a]=[]),c=_[a]||(_[a]=[]),u=b[a]||(b[a]=[]),h=l.length;if(++a>n||s>1073741824){for(var d=0;d<o.length;d++)l.push(o[d]),c.push(s),u.push(null,null,null,null);return h}if(l.push(o[0]),c.push(s),o.length<=1)return u.push(null,null,null,null),h;for(var f=.5*i,p=t+f,m=r+f,v=[],x=[],w=[],A=[],k=1,T=o.length;k<T;k++){var S=o[k],E=g[2*S],C=g[2*S+1];E<p?C<m?v.push(S):x.push(S):C<m?w.push(S):A.push(S)}return s<<=2,u.push(e(t,r,f,v,a,s),e(t,m,f,x,a,s+1),e(p,r,f,w,a,s+2),e(p,m,f,A,a,s+3)),h}(0,0,1,p,0,1);for(var w=0,A=0;A<y.length;A++){var k=y[A];if(p.set)p.set(k,w);else for(var T=0,S=k.length;T<S;T++)p[T+w]=k[T];var E=w+y[A].length;x[A]=[w,E],w=E}return p.range=function(){for(var t,n=[],r=arguments.length;r--;)n[r]=arguments[r];if(u(n[n.length-1])){var a=n.pop();n.length||null==a.x&&null==a.l&&null==a.left||(n=[a],t={}),t=s(a,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else t={};n.length||(n=i);var c,h=o.apply(void 0,n),p=[Math.min(h.x,h.x+h.width),Math.min(h.y,h.y+h.height),Math.max(h.x,h.x+h.width),Math.max(h.y,h.y+h.height)],g=p[0],m=p[1],v=p[2],_=p[3],x=f([g,m,v,_],i),w=x[0],A=x[1],k=x[2],T=x[3],S=l(t.level,y.length);if(null!=t.d&&("number"==typeof t.d?c=[t.d,t.d]:t.d.length&&(c=t.d),S=Math.min(Math.max(Math.ceil(-d(Math.abs(c[0])/(i[2]-i[0]))),Math.ceil(-d(Math.abs(c[1])/(i[3]-i[1])))),S)),S=Math.min(S,y.length),t.lod)return C(w,A,k,T,S);var E=[];function M(t,n,r,i,o,a){if(null!==o&&null!==a&&!(w>t+r||A>n+r||k<t||T<n||i>=S||o===a)){var s=y[i];void 0===a&&(a=s.length);for(var l=o;l<a;l++){var c=s[l],u=e[2*c],h=e[2*c+1];u>=g&&u<=v&&h>=m&&h<=_&&E.push(c)}var d=b[i],f=d[4*o+0],p=d[4*o+1],x=d[4*o+2],C=d[4*o+3],L=O(d,o+1),D=.5*r,I=i+1;M(t,n,D,I,f,p||x||C||L),M(t,n+D,D,I,p,x||C||L),M(t+D,n,D,I,x,C||L),M(t+D,n+D,D,I,C,L)}}function O(e,t){for(var n=null,r=0;null===n;)if(n=e[4*t+r],++r>e.length)return null;return n}return M(0,0,1,0,0,1),E},p;function C(e,t,n,i,o){for(var a=[],s=0;s<o;s++){var l=_[s],c=x[s][0],u=M(e,t,s),h=M(n,i,s),d=r.ge(l,u),f=r.gt(l,h,d,l.length-1);a[s]=[d+c,f+c]}return a}function M(e,t,n){for(var r=1,i=.5,o=.5,a=.5,s=0;s<n;s++)r<<=2,r+=e<i?t<o?0:1:t<o?2:3,a*=.5,i+=e<i?-a:a,o+=t<o?-a:a;return r}}},{"array-bounds":71,"binary-search-bounds":80,clamp:86,defined:124,dtype:127,"flatten-vertex-data":191,"is-obj":235,"math-log2":240,"parse-rect":249,"pick-by-alias":253}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@turf/meta"),i=6378137;function o(e){var t=0;if(e&&e.length>0){t+=Math.abs(a(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(a(e[n]))}return t}function a(e){var t,n,r,o,a,l,c=0,u=e.length;if(u>2){for(l=0;l<u;l++)l===u-2?(r=u-2,o=u-1,a=0):l===u-1?(r=u-1,o=0,a=1):(r=l,o=l+1,a=l+2),t=e[r],n=e[o],c+=(s(e[a][0])-s(t[0]))*Math.sin(s(n[1]));c=c*i*i/2}return c}function s(e){return e*Math.PI/180}n.default=function(e){return r.geomReduce(e,(function(e,t){return e+function(e){var t,n=0;switch(e.type){case"Polygon":return o(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)n+=o(e.coordinates[t]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)}),0)}},{"@turf/meta":63}],62:[function(e,t,n){"use strict";function r(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function i(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function o(e,t,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:e},t,n)}function a(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:e},t,n)}function s(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function l(e,t,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:e},t,n)}function c(e,t,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:e},t,n)}function u(e,t,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:e},t,n)}function h(e,t){void 0===t&&(t="kilometers");var r=n.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}function d(e,t){void 0===t&&(t="kilometers");var r=n.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}function f(e){return e%(2*Math.PI)*180/Math.PI}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=6371008.8,n.factors={centimeters:100*n.earthRadius,centimetres:100*n.earthRadius,degrees:n.earthRadius/111325,feet:3.28084*n.earthRadius,inches:39.37*n.earthRadius,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:1e3*n.earthRadius,millimetres:1e3*n.earthRadius,nauticalmiles:n.earthRadius/1852,radians:1,yards:1.0936*n.earthRadius},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},n.feature=r,n.geometry=function(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return i(t).geometry;case"LineString":return a(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw new Error(e+" is invalid")}},n.point=i,n.points=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return i(e,t)})),n)},n.polygon=o,n.polygons=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return o(e,t)})),n)},n.lineString=a,n.lineStrings=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return a(e,t)})),n)},n.featureCollection=s,n.multiLineString=l,n.multiPoint=c,n.multiPolygon=u,n.geometryCollection=function(e,t,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:e},t,n)},n.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},n.radiansToLength=h,n.lengthToRadians=d,n.lengthToDegrees=function(e,t){return f(d(e,t))},n.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},n.radiansToDegrees=f,n.degreesToRadians=function(e){return e%360*Math.PI/180},n.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return h(d(e,t),n)},n.convertArea=function(e,t,r){if(void 0===t&&(t="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=n.areaFactors[t];if(!i)throw new Error("invalid original units");var o=n.areaFactors[r];if(!o)throw new Error("invalid final units");return e/i*o},n.isNumber=p,n.isObject=function(e){return!!e&&e.constructor===Object},n.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!p(e))throw new Error("bbox must only contain numbers")}))},n.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},{}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@turf/helpers");function i(e,t,n){if(null!==e)for(var r,o,a,s,l,c,u,h,d=0,f=0,p=e.type,g="FeatureCollection"===p,m="Feature"===p,v=g?e.features.length:1,y=0;y<v;y++){l=(h=!!(u=g?e.features[y].geometry:m?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var b=0;b<l;b++){var _=0,x=0;if(null!==(s=h?u.geometries[b]:u)){c=s.coordinates;var w=s.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(c,f,y,_,x))return!1;f++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===t(c[r],f,y,_,x))return!1;f++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-d;o++){if(!1===t(c[r][o],f,y,_,x))return!1;f++}"MultiLineString"===w&&_++,"Polygon"===w&&x++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(x=0,o=0;o<c[r].length;o++){for(a=0;a<c[r][o].length-d;a++){if(!1===t(c[r][o][a],f,y,_,x))return!1;f++}x++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function s(e,t){var n,r,i,o,a,s,l,c,u,h,d=0,f="FeatureCollection"===e.type,p="Feature"===e.type,g=f?e.features.length:1;for(n=0;n<g;n++){for(s=f?e.features[n].geometry:p?e.geometry:e,c=f?e.features[n].properties:p?e.properties:{},u=f?e.features[n].bbox:p?e.bbox:void 0,h=f?e.features[n].id:p?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,c,u,h))return!1;d++}}function l(e,t){s(e,(function(e,n,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(r.feature(e,i,{bbox:o,id:a}),n,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var c=0;c<e.coordinates.length;c++){var u={type:s,coordinates:e.coordinates[c]};if(!1===t(r.feature(u,i),n,c))return!1}}))}function c(e,t){l(e,(function(e,n,o){var a=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,c=0,u=0,h=0;return!1!==i(e,(function(i,s,d,f,p){if(void 0===l||n>c||f>u||p>h)return l=i,c=n,u=f,h=p,void(a=0);var g=r.lineString([l,i],e.properties);if(!1===t(g,n,o,p,a))return!1;a++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===t(r.lineString(a[s],e.properties),n,i,s))return!1}}}))}n.coordEach=i,n.coordReduce=function(e,t,n,r){var o=n;return i(e,(function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)}),r),o},n.propEach=o,n.propReduce=function(e,t,n){var r=n;return o(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},n.featureEach=a,n.featureReduce=function(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},n.coordAll=function(e){var t=[];return i(e,(function(e){t.push(e)})),t},n.geomEach=s,n.geomReduce=function(e,t,n){var r=n;return s(e,(function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)})),r},n.flattenEach=l,n.flattenReduce=function(e,t,n){var r=n;return l(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r},n.segmentEach=c,n.segmentReduce=function(e,t,n){var r=n,i=!1;return c(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r},n.lineEach=u,n.lineReduce=function(e,t,n){var r=n;return u(e,(function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)})),r},n.findSegment=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,o=t.multiFeatureIndex||0,a=t.geometryIndex||0,s=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=c.length+s-1),r.lineString([c[s],c[s+1]],l,t);case"Polygon":return a<0&&(a=c.length+a),s<0&&(s=c[a].length+s-1),r.lineString([c[a][s],c[a][s+1]],l,t);case"MultiLineString":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s-1),r.lineString([c[o][s],c[o][s+1]],l,t);case"MultiPolygon":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),s<0&&(s=c[o][a].length-s-1),r.lineString([c[o][a][s],c[o][a][s+1]],l,t)}throw new Error("geojson is invalid")},n.findPoint=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,o=t.multiFeatureIndex||0,a=t.geometryIndex||0,s=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":return r.point(c,l,t);case"MultiPoint":return o<0&&(o=c.length+o),r.point(c[o],l,t);case"LineString":return s<0&&(s=c.length+s),r.point(c[s],l,t);case"Polygon":return a<0&&(a=c.length+a),s<0&&(s=c[a].length+s),r.point(c[a][s],l,t);case"MultiLineString":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),r.point(c[o][s],l,t);case"MultiPolygon":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),s<0&&(s=c[o][a].length-s),r.point(c[o][a][s],l,t)}throw new Error("geojson is invalid")}},{"@turf/helpers":62}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@turf/meta");function i(e){var t=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}i.default=i,n.default=i},{"@turf/meta":66}],65:[function(e,t,n){arguments[4][62][0].apply(n,arguments)},{dup:62}],66:[function(e,t,n){arguments[4][63][0].apply(n,arguments)},{"@turf/helpers":65,dup:63}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@turf/meta"),i=e("@turf/helpers");n.default=function(e,t){void 0===t&&(t={});var n=0,o=0,a=0;return r.coordEach(e,(function(e){n+=e[0],o+=e[1],a++})),i.point([n/a,o/a],t.properties)}},{"@turf/helpers":68,"@turf/meta":69}],68:[function(e,t,n){"use strict";function r(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function i(e,t,n){return void 0===n&&(n={}),r({type:"Point",coordinates:e},t,n)}function o(e,t,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:e},t,n)}function a(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:e},t,n)}function s(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function l(e,t,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:e},t,n)}function c(e,t,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:e},t,n)}function u(e,t,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:e},t,n)}function h(e,t){void 0===t&&(t="kilometers");var r=n.factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}function d(e,t){void 0===t&&(t="kilometers");var r=n.factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}function f(e){return e%(2*Math.PI)*180/Math.PI}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)&&!/^\s*$/.test(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=6371008.8,n.factors={centimeters:100*n.earthRadius,centimetres:100*n.earthRadius,degrees:n.earthRadius/111325,feet:3.28084*n.earthRadius,inches:39.37*n.earthRadius,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:1e3*n.earthRadius,millimetres:1e3*n.earthRadius,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius/1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1/1.0936},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},n.feature=r,n.geometry=function(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return i(t).geometry;case"LineString":return a(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw new Error(e+" is invalid")}},n.point=i,n.points=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return i(e,t)})),n)},n.polygon=o,n.polygons=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return o(e,t)})),n)},n.lineString=a,n.lineStrings=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return a(e,t)})),n)},n.featureCollection=s,n.multiLineString=l,n.multiPoint=c,n.multiPolygon=u,n.geometryCollection=function(e,t,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:e},t,n)},n.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},n.radiansToLength=h,n.lengthToRadians=d,n.lengthToDegrees=function(e,t){return f(d(e,t))},n.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},n.radiansToDegrees=f,n.degreesToRadians=function(e){return e%360*Math.PI/180},n.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return h(d(e,t),n)},n.convertArea=function(e,t,r){if(void 0===t&&(t="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=n.areaFactors[t];if(!i)throw new Error("invalid original units");var o=n.areaFactors[r];if(!o)throw new Error("invalid final units");return e/i*o},n.isNumber=p,n.isObject=function(e){return!!e&&e.constructor===Object},n.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!p(e))throw new Error("bbox must only contain numbers")}))},n.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},n.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},n.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},n.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},n.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},n.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},n.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},n.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@turf/helpers");function i(e,t,n){if(null!==e)for(var r,o,a,s,l,c,u,h,d=0,f=0,p=e.type,g="FeatureCollection"===p,m="Feature"===p,v=g?e.features.length:1,y=0;y<v;y++){l=(h=!!(u=g?e.features[y].geometry:m?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var b=0;b<l;b++){var _=0,x=0;if(null!==(s=h?u.geometries[b]:u)){c=s.coordinates;var w=s.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(c,f,y,_,x))return!1;f++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===t(c[r],f,y,_,x))return!1;f++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-d;o++){if(!1===t(c[r][o],f,y,_,x))return!1;f++}"MultiLineString"===w&&_++,"Polygon"===w&&x++}"Polygon"===w&&_++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(x=0,o=0;o<c[r].length;o++){for(a=0;a<c[r][o].length-d;a++){if(!1===t(c[r][o][a],f,y,_,x))return!1;f++}x++}_++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function a(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function s(e,t){var n,r,i,o,a,s,l,c,u,h,d=0,f="FeatureCollection"===e.type,p="Feature"===e.type,g=f?e.features.length:1;for(n=0;n<g;n++){for(s=f?e.features[n].geometry:p?e.geometry:e,c=f?e.features[n].properties:p?e.properties:{},u=f?e.features[n].bbox:p?e.bbox:void 0,h=f?e.features[n].id:p?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,c,u,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,c,u,h))return!1;d++}}function l(e,t){s(e,(function(e,n,i,o,a){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(r.feature(e,i,{bbox:o,id:a}),n,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var c=0;c<e.coordinates.length;c++){var u={type:s,coordinates:e.coordinates[c]};if(!1===t(r.feature(u,i),n,c))return!1}}))}function c(e,t){l(e,(function(e,n,o){var a=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,c=0,u=0,h=0;return!1!==i(e,(function(i,s,d,f,p){if(void 0===l||n>c||f>u||p>h)return l=i,c=n,u=f,h=p,void(a=0);var g=r.lineString([l,i],e.properties);if(!1===t(g,n,o,p,a))return!1;a++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<a.length;s++)if(!1===t(r.lineString(a[s],e.properties),n,i,s))return!1}}}))}n.coordEach=i,n.coordReduce=function(e,t,n,r){var o=n;return i(e,(function(e,r,i,a,s){o=0===r&&void 0===n?e:t(o,e,r,i,a,s)}),r),o},n.propEach=o,n.propReduce=function(e,t,n){var r=n;return o(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},n.featureEach=a,n.featureReduce=function(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},n.coordAll=function(e){var t=[];return i(e,(function(e){t.push(e)})),t},n.geomEach=s,n.geomReduce=function(e,t,n){var r=n;return s(e,(function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)})),r},n.flattenEach=l,n.flattenReduce=function(e,t,n){var r=n;return l(e,(function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)})),r},n.segmentEach=c,n.segmentReduce=function(e,t,n){var r=n,i=!1;return c(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r},n.lineEach=u,n.lineReduce=function(e,t,n){var r=n;return u(e,(function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)})),r},n.findSegment=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,o=t.multiFeatureIndex||0,a=t.geometryIndex||0,s=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=c.length+s-1),r.lineString([c[s],c[s+1]],l,t);case"Polygon":return a<0&&(a=c.length+a),s<0&&(s=c[a].length+s-1),r.lineString([c[a][s],c[a][s+1]],l,t);case"MultiLineString":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s-1),r.lineString([c[o][s],c[o][s+1]],l,t);case"MultiPolygon":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),s<0&&(s=c[o][a].length-s-1),r.lineString([c[o][a][s],c[o][a][s+1]],l,t)}throw new Error("geojson is invalid")},n.findPoint=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,o=t.multiFeatureIndex||0,a=t.geometryIndex||0,s=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),l=l||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":l=l||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var c=n.coordinates;switch(n.type){case"Point":return r.point(c,l,t);case"MultiPoint":return o<0&&(o=c.length+o),r.point(c[o],l,t);case"LineString":return s<0&&(s=c.length+s),r.point(c[s],l,t);case"Polygon":return a<0&&(a=c.length+a),s<0&&(s=c[a].length+s),r.point(c[a][s],l,t);case"MultiLineString":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),r.point(c[o][s],l,t);case"MultiPolygon":return o<0&&(o=c.length+o),a<0&&(a=c[o].length+a),s<0&&(s=c[o][a].length-s),r.point(c[o][a][s],l,t)}throw new Error("geojson is invalid")}},{"@turf/helpers":68}],70:[function(e,t,n){t.exports=function(e){var t=0,n=0,r=0,i=0;return e.map((function(e){var o=(e=e.slice())[0],a=o.toUpperCase();if(o!=a)switch(e[0]=a,o){case"a":e[6]+=r,e[7]+=i;break;case"v":e[1]+=i;break;case"h":e[1]+=r;break;default:for(var s=1;s<e.length;)e[s++]+=r,e[s++]+=i}switch(a){case"Z":r=t,i=n;break;case"H":r=e[1];break;case"V":i=e[1];break;case"M":r=t=e[1],i=n=e[2];break;default:r=e[e.length-2],i=e[e.length-1]}return e}))}},{}],71:[function(e,t,n){"use strict";t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var n=Array(2*t),r=0;r<t;r++){for(var i=-1/0,o=1/0,a=r,s=e.length;a<s;a+=t)e[a]>i&&(i=e[a]),e[a]<o&&(o=e[a]);n[r]=o,n[t+r]=i}return n}},{}],72:[function(e,t,n){"use strict";t.exports=function(e,t,n){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,n);if("function"!=typeof t)throw new TypeError("predicate must be a function");var r=Object(e),i=r.length;if(0===i)return-1;for(var o=0;o<i;o++)if(t.call(n,r[o],o,r))return o;return-1}},{}],73:[function(e,t,n){"use strict";var r=e("array-bounds");t.exports=function(e,t,n){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==n&&(n=r(e,t));for(var i=0;i<t;i++){var o=n[t+i],a=n[i],s=i,l=e.length;if(o===1/0&&a===-1/0)for(s=i;s<l;s+=t)e[s]=e[s]===o?1:e[s]===a?0:.5;else if(o===1/0)for(s=i;s<l;s+=t)e[s]=e[s]===o?1:0;else if(a===-1/0)for(s=i;s<l;s+=t)e[s]=e[s]===a?0:1;else{var c=o-a;for(s=i;s<l;s+=t)isNaN(e[s])||(e[s]=0===c?.5:(e[s]-a)/c)}}return e}},{"array-bounds":71}],74:[function(e,t,n){t.exports=function(e,t){var n="number"==typeof e,r="number"==typeof t;n&&!r?(t=e,e=0):n||r||(e=0,t=0);var i=(t|=0)-(e|=0);if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),a=0,s=e;a<i;a++,s++)o[a]=s;return o}},{}],75:[function(e,t,r){(function(n){(function(){"use strict";var r=e("object-assign");function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function o(e){return n.Buffer&&"function"==typeof n.Buffer.isBuffer?n.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=e("util/"),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function h(e){return!o(e)&&"function"==typeof n.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var d=t.exports=y,f=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(a.isFunction(e)){if(c)return e.name;var t=e.toString().match(f);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(c||!a.isFunction(e))return a.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function v(e,t,n,r,i){throw new d.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function y(e,t){e||v(e,!0,t,"==",d.ok)}function b(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(h(e)&&h(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=_(e),o=_(t);if(i&&!o||!i&&o)return!1;if(i)return b(e=l.call(e),t=l.call(t),n);var s,c,u=A(e),h=A(t);if(u.length!==h.length)return!1;for(u.sort(),h.sort(),c=u.length-1;c>=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(!b(e[s=u[c]],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&x(i,n)||s)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!x(i,n)||!e&&i)throw i}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(d.AssertionError,Error),d.fail=v,d.ok=y,d.equal=function(e,t,n){e!=t&&v(e,t,n,"==",d.equal)},d.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",d.notEqual)},d.deepEqual=function(e,t,n){b(e,t,!1)||v(e,t,n,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,n){b(e,t,!0)||v(e,t,n,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,n){b(e,t,!1)&&v(e,t,n,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",d.strictEqual)},d.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",d.notStrictEqual)},d.throws=function(e,t,n){w(!0,e,t,n)},d.doesNotThrow=function(e,t,n){w(!1,e,t,n)},d.ifError=function(e){if(e)throw e},d.strict=r((function e(t,n){t||v(t,!0,n,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var A=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":247,"util/":78}],76:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],77:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],78:[function(e,t,r){(function(t,n){(function(){var i=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n<o;l=r[++n])g(l)||!_(l)?a+=" "+l:a+=" "+s(l);return a},r.deprecate=function(e,i){if(y(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var o,a={};function s(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,e,n.depth)}function l(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=u(e,i,n)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),w(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(A(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return h(t)}var c,_="",k=!1,T=["{","}"];return f(t)&&(k=!0,T=["[","]"]),A(t)&&(_=" [Function"+(t.name?": "+t.name:"")+"]"),b(t)&&(_=" "+RegExp.prototype.toString.call(t)),x(t)&&(_=" "+Date.prototype.toUTCString.call(t)),w(t)&&(_=" "+h(t)),0!==a.length||k&&0!=t.length?n<0?b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=k?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)C(t,String(a))?o.push(d(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))})),o}(e,t,n,s,a):a.map((function(r){return d(e,t,n,s,r,k)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,_,T)):T[0]+_+T[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),C(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function x(e){return _(e)&&"[object Date]"===k(e)}function w(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function A(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(y(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=f,r.isBoolean=p,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=v,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=y,r.isRegExp=b,r.isObject=_,r.isDate=x,r.isError=w,r.isFunction=A,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",E(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":77,_process:277,inherits:76}],79:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,l=n-i;s<l;s+=a)o.push(u(e,s,s+a>l?l:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);var s;return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],80:[function(e,t,n){"use strict";function r(e,t,n,r,i){for(var o=i+1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)>=0?(o=a,i=a-1):r=a+1}return o}function i(e,t,n,r,i){for(var o=i+1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)>0?(o=a,i=a-1):r=a+1}return o}function o(e,t,n,r,i){for(var o=r-1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)<0?(o=a,r=a+1):i=a-1}return o}function a(e,t,n,r,i){for(var o=r-1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)<=0?(o=a,r=a+1):i=a-1}return o}function s(e,t,n,r,i){for(;r<=i;){var o=r+i>>>1,a=e[o],s=void 0!==n?n(a,t):a-t;if(0===s)return o;s<=0?r=o+1:i=o-1}return-1}function l(e,t,n,r,i,o){return"function"==typeof n?o(e,t,n,void 0===r?0:0|r,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===n?0:0|n,void 0===r?e.length-1:0|r)}t.exports={ge:function(e,t,n,i,o){return l(e,t,n,i,o,r)},gt:function(e,t,n,r,o){return l(e,t,n,r,o,i)},lt:function(e,t,n,r,i){return l(e,t,n,r,i,o)},le:function(e,t,n,r,i){return l(e,t,n,r,i,a)},eq:function(e,t,n,r,i){return l(e,t,n,r,i,s)}}},{}],81:[function(e,t,n){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}n.INT_BITS=32,n.INT_MAX=2147483647,n.INT_MIN=-1<<31,n.sign=function(e){return(e>0)-(e<0)},n.abs=function(e){var t=e>>31;return(e^t)-t},n.min=function(e,t){return t^(e^t)&-(e<t)},n.max=function(e,t){return e^(e^t)&-(e<t)},n.isPow2=function(e){return!(e&e-1||!e)},n.log2=function(e){var t,n;return t=(e>65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},n.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},n.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},n.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},n.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<<i&255}}(i),n.reverse=function(e){return i[255&e]<<24|i[e>>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},n.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},n.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},n.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},n.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},n.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},{}],82:[function(e,t,n){"use strict";var r=e("clamp");t.exports=function(e,t){t||(t={});var n,a,s,l,c,u,h,d,f,p,g,m=null==t.cutoff?.25:t.cutoff,v=null==t.radius?8:t.radius,y=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");n=t.width,a=t.height,l=e,u=t.stride?t.stride:Math.floor(e.length/n/a)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=(d=e).getContext("2d"),n=d.width,a=d.height,l=(f=h.getImageData(0,0,n,a)).data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e,n=(d=e.canvas).width,a=d.height,l=(f=h.getImageData(0,0,n,a)).data,u=4):window.ImageData&&e instanceof window.ImageData&&(f=e,n=e.width,a=e.height,l=f.data,u=4);if(s=Math.max(n,a),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(n*a),p=0,g=c.length;p<g;p++)l[p]=c[p*u+y]/255;else if(1!==u)throw Error("Raw data can have only 1 value per pixel");var b=Array(n*a),_=Array(n*a),x=Array(s),w=Array(s),A=Array(s+1),k=Array(s);for(p=0,g=n*a;p<g;p++){var T=l[p];b[p]=1===T?0:0===T?i:Math.pow(Math.max(0,.5-T),2),_[p]=1===T?i:0===T?0:Math.pow(Math.max(0,T-.5),2)}o(b,n,a,x,w,k,A),o(_,n,a,x,w,k,A);var S=window.Float32Array?new Float32Array(n*a):new Array(n*a);for(p=0,g=n*a;p<g;p++)S[p]=r(1-((b[p]-_[p])/v+m),0,1);return S};var i=1e20;function o(e,t,n,r,i,o,s){for(var l=0;l<t;l++){for(var c=0;c<n;c++)r[c]=e[c*t+l];for(a(r,i,o,s,n),c=0;c<n;c++)e[c*t+l]=i[c]}for(c=0;c<n;c++){for(l=0;l<t;l++)r[l]=e[c*t+l];for(a(r,i,o,s,t),l=0;l<t;l++)e[c*t+l]=Math.sqrt(i[l])}}function a(e,t,n,r,o){n[0]=0,r[0]=-i,r[1]=+i;for(var a=1,s=0;a<o;a++){for(var l=(e[a]+a*a-(e[n[s]]+n[s]*n[s]))/(2*a-2*n[s]);l<=r[s];)s--,l=(e[a]+a*a-(e[n[s]]+n[s]*n[s]))/(2*a-2*n[s]);n[++s]=a,r[s]=l,r[s+1]=+i}for(a=0,s=0;a<o;a++){for(;r[s+1]<a;)s++;t[a]=(a-n[s])*(a-n[s])+e[n[s]]}}},{clamp:86}],83:[function(e,t,n){},{}],84:[function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,n,r){var i,o,a,s;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},{}],85:[function(e,t,n){(function(t){(function(){"use strict";var t=e("base64-js"),r=e("ieee754");n.Buffer=a,n.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n)).__proto__=a.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?o(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|h(e))}function u(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(i)return r?-1:N(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),j(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(j(s))return a;e[n+a]=s}return a}function y(e,t,n,r){return F(N(t,e.length-n),e,n,r)}function b(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return b(e,t,n,r)}function x(e,t,n,r){return F(z(t),e,n,r)}function w(e,t,n,r){return F(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}n.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(B(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){o=c[h],s=u[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function M(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function R(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=a.prototype,r},a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;o>=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,r),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var P=/[^+/0-9A-Za-z-_]/g;function N(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(e,t,n){t.exports=function(e,t,n){return t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e}},{}],87:[function(e,t,n){"use strict";var r=e("clamp");function i(e,t){null==t&&(t=!0);var n=e[0],i=e[1],o=e[2],a=e[3];return null==a&&(a=t?1:255),t&&(n*=255,i*=255,o*=255,a*=255),16777216*(n=255&r(n,0,255))+((i=255&r(i,0,255))<<16)+((o=255&r(o,0,255))<<8)+(255&r(a,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(e,t){var n=(e=+e)>>>24,r=(16711680&e)>>>16,i=(65280&e)>>>8,o=255&e;return!1===t?[n,r,i,o]:[n/255,r/255,i/255,o/255]}},{clamp:86}],88:[function(e,t,n){"use strict";t.exports={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]}},{}],89:[function(e,t,n){"use strict";var r=e("color-rgba"),i=e("clamp"),o=e("dtype");t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var n=new(o(t))(4),a="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||((e=r(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=null!=e[3]?e[3]:255,a&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(a?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=null!=e[3]?e[3]:1):(n[0]=i(Math.floor(255*e[0]),0,255),n[1]=i(Math.floor(255*e[1]),0,255),n[2]=i(Math.floor(255*e[2]),0,255),n[3]=null==e[3]?255:i(Math.floor(255*e[3]),0,255)),n)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(e,t,r){(function(n){(function(){"use strict";var r=e("color-name"),i=e("is-plain-obj"),o=e("defined");t.exports=function(e){var t,s,l=[],c=1;if("string"==typeof e)if(r[e])l=r[e].slice(),s="rgb";else if("transparent"===e)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var u=e.slice(1);c=1,(f=u.length)<=4?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===f&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===f&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var h=t[1],d="rgb"===h;s=u=h.replace(/a$/,"");var f="cmyk"===u?4:"gray"===u?1:3;l=t[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===f?parseFloat(e)/100:"rgb"===u?255*parseFloat(e)/100:parseFloat(e);if("h"===u[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==a[e])return a[e]}return parseFloat(e)})),h===u&&l.push(1),c=d||void 0===l[f]?1:l[f],l=l.slice(0,f)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(l=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),s=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(i(e)){var p=o(e.r,e.red,e.R,null);null!==p?(s="rgb",l=[p,o(e.g,e.green,e.G),o(e.b,e.blue,e.B)]):(s="hsl",l=[o(e.h,e.hue,e.H),o(e.s,e.saturation,e.S),o(e.l,e.lightness,e.L,e.b,e.brightness)]),c=o(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(c/=100)}else(Array.isArray(e)||n.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(l=[e[0],e[1],e[2]],s="rgb",c=4===e.length?e[3]:1);else s="rgb",l=[e>>>16,(65280&e)>>>8,255&e];return{space:s,values:l,alpha:c}};var a={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(e,t,n){"use strict";var r=e("color-parse"),i=e("color-space/hsl"),o=e("clamp");t.exports=function(e){var t,n=r(e);return n.space?((t=Array(3))[0]=o(n.values[0],0,255),t[1]=o(n.values[1],0,255),t[2]=o(n.values[2],0,255),"h"===n.space[0]&&(t=i.rgb(t)),t.push(o(n.alpha,0,1)),t):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(e,t,n){"use strict";var r=e("./rgb");t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0?r++:r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i}},r.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]}},{"./rgb":93}],93:[function(e,t,n){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(e,t,n){t.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|)o.?tom(e|)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],95:[function(e,t,n){t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(e,t,n){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(e,t,n){t.exports=["normal","italic","oblique"]},{}],98:[function(e,t,n){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(e,t,n){"use strict";t.exports={parse:e("./parse"),stringify:e("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(e,t,n){"use strict";var r=e("css-font-size-keywords");t.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==r.indexOf(e)}}},{"css-font-size-keywords":95}],101:[function(e,t,n){"use strict";var r=e("unquote"),i=e("css-global-keywords"),o=e("css-system-font-keywords"),a=e("css-font-weight-keywords"),s=e("css-font-style-keywords"),l=e("css-font-stretch-keywords"),c=e("string-split-by"),u=e("./lib/util").isSize;t.exports=d;var h=d.cache={};function d(e){if("string"!=typeof e)throw new Error("Font argument must be a string.");if(h[e])return h[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(e))return h[e]={system:e};for(var t,n={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},d=c(e,/\s+/);t=d.shift();){if(-1!==i.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){n[e]=t})),h[e]=n;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===a.indexOf(t)){if(u(t)){var p=c(t,"/");if(n.size=p[0],null!=p[1]?n.lineHeight=f(p[1]):"/"===d[0]&&(d.shift(),n.lineHeight=f(d.shift())),!d.length)throw new Error("Missing required font-family.");return n.family=c(d.join(" "),/\s*,\s*/).map(r),h[e]=n}throw new Error("Unknown or unsupported font token: "+t)}n.weight=t}else n.stretch=t;else n.variant=t;else n.style=t}throw new Error("Missing required font-size.")}function f(e){var t=parseFloat(e);return t.toString()===e?t:e}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"string-split-by":305,unquote:328}],102:[function(e,t,n){"use strict";var r=e("pick-by-alias"),i=e("./lib/util").isSize,o=g(e("css-global-keywords")),a=g(e("css-system-font-keywords")),s=g(e("css-font-weight-keywords")),l=g(e("css-font-style-keywords")),c=g(e("css-font-stretch-keywords")),u={normal:1,"small-caps":1},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},d="1rem",f="serif";function p(e,t){if(e&&!t[e]&&!o[e])throw Error("Unknown keyword `"+e+"`");return e}function g(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t}t.exports=function(e){if((e=r(e,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"})).system)return e.system&&p(e.system,a),e.system;if(p(e.style,l),p(e.variant,u),p(e.weight,s),p(e.stretch,c),null==e.size&&(e.size=d),"number"==typeof e.size&&(e.size+="px"),!i)throw Error("Bad size value `"+e.size+"`");e.family||(e.family=f),Array.isArray(e.family)&&(e.family.length||(e.family=[f]),e.family=e.family.map((function(e){return h[e]?e:'"'+e+'"'})).join(", "));var t=[];return t.push(e.style),e.variant!==e.style&&t.push(e.variant),e.weight!==e.variant&&e.weight!==e.style&&t.push(e.weight),e.stretch!==e.weight&&e.stretch!==e.variant&&e.stretch!==e.style&&t.push(e.stretch),t.push(e.size+(null==e.lineHeight||"normal"===e.lineHeight||e.lineHeight+""=="1"?"":"/"+e.lineHeight)),t.push(e.family),t.filter(Boolean).join(" ")}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"pick-by-alias":253}],103:[function(e,t,n){t.exports=["inherit","initial","unset"]},{}],104:[function(e,t,n){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]},{}],105:[function(e,t,n){"use strict";var r,i=e("type/value/is"),o=e("type/value/ensure"),a=e("type/plain-function/ensure"),s=e("es5-ext/object/copy"),l=e("es5-ext/object/normalize-options"),c=e("es5-ext/object/map"),u=Function.prototype.bind,h=Object.defineProperty,d=Object.prototype.hasOwnProperty;r=function(e,t,n){var r,i=o(t)&&a(t.value);return delete(r=s(t)).writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&d.call(this,e)?i:(t.value=u.call(i,n.resolveContext?n.resolveContext(this):this),h(this,e,t),this[e])},r},t.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&a(t.resolveContext),c(e,(function(e,n){return r(n,e,t)}))}},{"es5-ext/object/copy":147,"es5-ext/object/map":155,"es5-ext/object/normalize-options":156,"type/plain-function/ensure":321,"type/value/ensure":325,"type/value/is":326}],106:[function(e,t,n){"use strict";var r=e("type/value/is"),i=e("type/plain-function/is"),o=e("es5-ext/object/assign"),a=e("es5-ext/object/normalize-options"),s=e("es5-ext/string/#/contains"),l=t.exports=function(e,t){var n,i,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=s.call(e,"c"),i=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,i=!1),u={value:t,configurable:n,enumerable:i,writable:l},c?o(a(c),u):u};l.gs=function(e,t,n){var l,c,u,h;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(n)?i(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),h={get:t,set:n,configurable:l,enumerable:c},u?o(a(u),h):h}},{"es5-ext/object/assign":144,"es5-ext/object/normalize-options":156,"es5-ext/string/#/contains":163,"type/plain-function/is":322,"type/value/is":326}],107:[function(e,t,n){var r;r=function(e){"use strict";function t(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function n(e){return 1===e.length&&(n=e,e=function(e,r){return t(n(e),r)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}};var n}var r=n(t),i=r.right,o=r.left;function a(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var n,r,i=e.length,o=0,a=-1,l=0,c=0;if(null==t)for(;++a<i;)isNaN(n=s(e[a]))||(c+=(r=n-l)*(n-(l+=r/++o)));else for(;++a<i;)isNaN(n=s(t(e[a],a,e)))||(c+=(r=n-l)*(n-(l+=r/++o)));if(o>1)return c/(o-1)}function c(e,t){var n=l(e,t);return n?Math.sqrt(n):n}function u(e,t){var n,r,i,o=e.length,a=-1;if(null==t){for(;++a<o;)if(null!=(n=e[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=e[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=t(e[a],a,e))&&n>=n)for(r=i=n;++a<o;)null!=(n=t(e[a],a,e))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var h=Array.prototype,d=h.slice,f=h.map;function p(e){return function(){return e}}function g(e){return e}function m(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var v=Math.sqrt(50),y=Math.sqrt(10),b=Math.sqrt(2);function _(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=v?10:o>=y?5:o>=b?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=v?10:o>=y?5:o>=b?2:1)}function x(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=v?i*=10:o>=y?i*=5:o>=b&&(i*=2),t<e?-i:i}function w(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function A(e,t,n){if(null==n&&(n=s),r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function k(e,t){var n,r,i=e.length,o=-1;if(null==t){for(;++o<i;)if(null!=(n=e[o])&&n>=n)for(r=n;++o<i;)null!=(n=e[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=t(e[o],o,e))&&n>=n)for(r=n;++o<i;)null!=(n=t(e[o],o,e))&&r>n&&(r=n);return r}function T(e){if(!(i=e.length))return[];for(var t=-1,n=k(e,S),r=new Array(n);++t<n;)for(var i,o=-1,a=r[t]=new Array(i);++o<i;)a[o]=e[o][t];return r}function S(e){return e.length}e.bisect=i,e.bisectRight=i,e.bisectLeft=o,e.ascending=t,e.bisector=n,e.cross=function(e,t,n){var r,i,o,s,l=e.length,c=t.length,u=new Array(l*c);for(null==n&&(n=a),r=o=0;r<l;++r)for(s=e[r],i=0;i<c;++i,++o)u[o]=n(s,t[i]);return u},e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=g,t=u,n=w;function r(r){var o,a,s=r.length,l=new Array(s);for(o=0;o<s;++o)l[o]=e(r[o],o,r);var c=t(l),u=c[0],h=c[1],d=n(l,u,h);Array.isArray(d)||(d=x(u,h,d),d=m(Math.ceil(u/d)*d,h,d));for(var f=d.length;d[0]<=u;)d.shift(),--f;for(;d[f-1]>h;)d.pop(),--f;var p,g=new Array(f+1);for(o=0;o<=f;++o)(p=g[o]=[]).x0=o>0?d[o-1]:u,p.x1=o<f?d[o]:h;for(o=0;o<s;++o)u<=(a=l[o])&&a<=h&&g[i(d,a,0,f)].push(r[o]);return g}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:p(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:p([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:Array.isArray(e)?p(d.call(e)):p(e),r):n},r},e.thresholdFreedmanDiaconis=function(e,n,r){return e=f.call(e,s).sort(t),Math.ceil((r-n)/(2*(A(e,.75)-A(e,.25))*Math.pow(e.length,-1/3)))},e.thresholdScott=function(e,t,n){return Math.ceil((n-t)/(3.5*c(e)*Math.pow(e.length,-1/3)))},e.thresholdSturges=w,e.max=function(e,t){var n,r,i=e.length,o=-1;if(null==t){for(;++o<i;)if(null!=(n=e[o])&&n>=n)for(r=n;++o<i;)null!=(n=e[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=t(e[o],o,e))&&n>=n)for(r=n;++o<i;)null!=(n=t(e[o],o,e))&&n>r&&(r=n);return r},e.mean=function(e,t){var n,r=e.length,i=r,o=-1,a=0;if(null==t)for(;++o<r;)isNaN(n=s(e[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=s(t(e[o],o,e)))?--i:a+=n;if(i)return a/i},e.median=function(e,n){var r,i=e.length,o=-1,a=[];if(null==n)for(;++o<i;)isNaN(r=s(e[o]))||a.push(r);else for(;++o<i;)isNaN(r=s(n(e[o],o,e)))||a.push(r);return A(a.sort(t),.5)},e.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n},e.min=k,e.pairs=function(e,t){null==t&&(t=a);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o},e.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},e.quantile=A,e.range=m,e.scan=function(e,n){if(r=e.length){var r,i,o=0,a=0,s=e[a];for(null==n&&(n=t);++o<r;)(n(i=e[o],s)<0||0!==n(s,s))&&(s=i,a=o);return 0===n(s,s)?a:void 0}},e.shuffle=function(e,t,n){for(var r,i,o=(null==n?e.length:n)-(t=null==t?0:+t);o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},e.sum=function(e,t){var n,r=e.length,i=-1,o=0;if(null==t)for(;++i<r;)(n=+e[i])&&(o+=n);else for(;++i<r;)(n=+t(e[i],i,e))&&(o+=n);return o},e.ticks=function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=_(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o},e.tickIncrement=_,e.tickStep=x,e.transpose=T,e.variance=l,e.zip=function(){return T(arguments)},Object.defineProperty(e,"__esModule",{value:!0})},r("object"==typeof n&&void 0!==t?n:this.d3=this.d3||{})},{}],108:[function(e,t,n){var r;r=function(e){"use strict";var t="$";function n(){}function r(e,t){var r=new n;if(e instanceof n)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var i,o=-1,a=e.length;if(null==t)for(;++o<a;)r.set(o,e[o]);else for(;++o<a;)r.set(t(i=e[o],o,e),i)}else if(e)for(var s in e)r.set(s,e[s]);return r}function i(){return{}}function o(e,t,n){e[t]=n}function a(){return r()}function s(e,t,n){e.set(t,n)}function l(){}n.prototype=r.prototype={constructor:n,has:function(e){return t+e in this},get:function(e){return this[t+e]},set:function(e,n){return this[t+e]=n,this},remove:function(e){var n=t+e;return n in this&&delete this[n]},clear:function(){for(var e in this)e[0]===t&&delete this[e]},keys:function(){var e=[];for(var n in this)n[0]===t&&e.push(n.slice(1));return e},values:function(){var e=[];for(var n in this)n[0]===t&&e.push(this[n]);return e},entries:function(){var e=[];for(var n in this)n[0]===t&&e.push({key:n.slice(1),value:this[n]});return e},size:function(){var e=0;for(var n in this)n[0]===t&&++e;return e},empty:function(){for(var e in this)if(e[0]===t)return!1;return!0},each:function(e){for(var n in this)n[0]===t&&e(this[n],n.slice(1),this)}};var c=r.prototype;function u(e,t){var n=new l;if(e instanceof l)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}l.prototype=u.prototype={constructor:l,has:c.has,add:function(e){return this[t+(e+="")]=e,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each},e.nest=function(){var e,t,n,l=[],c=[];function u(n,i,o,a){if(i>=l.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var s,c,h,d=-1,f=n.length,p=l[i++],g=r(),m=o();++d<f;)(h=g.get(s=p(c=n[d])+""))?h.push(c):g.set(s,[c]);return g.each((function(e,t){a(m,t,u(e,i,o,a))})),m}function h(e,n){if(++n>l.length)return e;var r,i=c[n-1];return null!=t&&n>=l.length?r=e.entries():(r=[],e.each((function(e,t){r.push({key:t,values:h(e,n)})}))),null!=i?r.sort((function(e,t){return i(e.key,t.key)})):r}return n={object:function(e){return u(e,0,i,o)},map:function(e){return u(e,0,a,s)},entries:function(e){return h(u(e,0,a,s),0)},key:function(e){return l.push(e),n},sortKeys:function(e){return c[l.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}},e.set=u,e.map=r,e.keys=function(e){var t=[];for(var n in e)t.push(n);return t},e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},Object.defineProperty(e,"__esModule",{value:!0})},r("object"==typeof n&&void 0!==t?n:this.d3=this.d3||{})},{}],109:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function n(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function r(){}var i=.7,o=1/i,a="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),h=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),d=new RegExp("^rgba\\("+[a,a,a,s]+"\\)$"),f=new RegExp("^rgba\\("+[l,l,l,s]+"\\)$"),p=new RegExp("^hsl\\("+[s,l,l]+"\\)$"),g=new RegExp("^hsla\\("+[s,l,l,s]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function y(){return this.rgb().formatRgb()}function b(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=c.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_(t):3===n?new k(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?x(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?x(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=u.exec(e))?new k(t[1],t[2],t[3],1):(t=h.exec(e))?new k(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=d.exec(e))?x(t[1],t[2],t[3],t[4]):(t=f.exec(e))?x(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=p.exec(e))?C(t[1],t[2]/100,t[3]/100,1):(t=g.exec(e))?C(t[1],t[2]/100,t[3]/100,t[4]):m.hasOwnProperty(e)?_(m[e]):"transparent"===e?new k(NaN,NaN,NaN,0):null}function _(e){return new k(e>>16&255,e>>8&255,255&e,1)}function x(e,t,n,r){return r<=0&&(e=t=n=NaN),new k(e,t,n,r)}function w(e){return e instanceof r||(e=b(e)),e?new k((e=e.rgb()).r,e.g,e.b,e.opacity):new k}function A(e,t,n,r){return 1===arguments.length?w(e):new k(e,t,n,null==r?1:r)}function k(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function T(){return"#"+E(this.r)+E(this.g)+E(this.b)}function S(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function E(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function C(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new L(e,t,n,r)}function M(e){if(e instanceof L)return new L(e.h,e.s,e.l,e.opacity);if(e instanceof r||(e=b(e)),!e)return new L;if(e instanceof L)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,l=a-o,c=(a+o)/2;return l?(s=t===a?(n-i)/l+6*(n<i):n===a?(i-t)/l+2:(t-n)/l+4,l/=c<.5?a+o:2-a-o,s*=60):l=c>0&&c<1?0:s,new L(s,l,c,e.opacity)}function O(e,t,n,r){return 1===arguments.length?M(e):new L(e,t,n,null==r?1:r)}function L(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function D(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}t(r,b,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return M(this).formatHsl()},formatRgb:y,toString:y}),t(k,A,n(r,{brighter:function(e){return e=null==e?o:Math.pow(o,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:S,toString:S})),t(L,O,n(r,{brighter:function(e){return e=null==e?o:Math.pow(o,e),new L(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new L(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new k(D(e>=240?e-240:e+120,i,r),D(e,i,r),D(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var I=Math.PI/180,R=180/Math.PI,P=.96422,N=.82521,z=4/29,F=6/29,B=3*F*F;function j(e){if(e instanceof V)return new V(e.l,e.a,e.b,e.opacity);if(e instanceof X)return Z(e);e instanceof k||(e=w(e));var t,n,r=W(e.r),i=W(e.g),o=W(e.b),a=q((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=q((.4360747*r+.3850649*i+.1430804*o)/P),n=q((.0139322*r+.0971045*i+.7141733*o)/N)),new V(116*a-16,500*(t-a),200*(a-n),e.opacity)}function U(e,t,n,r){return 1===arguments.length?j(e):new V(e,t,n,null==r?1:r)}function V(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function q(e){return e>.008856451679035631?Math.pow(e,1/3):e/B+z}function H(e){return e>F?e*e*e:B*(e-z)}function $(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function W(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function G(e){if(e instanceof X)return new X(e.h,e.c,e.l,e.opacity);if(e instanceof V||(e=j(e)),0===e.a&&0===e.b)return new X(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*R;return new X(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Y(e,t,n,r){return 1===arguments.length?G(e):new X(e,t,n,null==r?1:r)}function X(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Z(e){if(isNaN(e.h))return new V(e.l,0,0,e.opacity);var t=e.h*I;return new V(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}t(V,U,n(r,{brighter:function(e){return new V(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new V(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new k($(3.1338561*(t=P*H(t))-1.6168667*(e=1*H(e))-.4906146*(n=N*H(n))),$(-.9787684*t+1.9161415*e+.033454*n),$(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),t(X,Y,n(r,{brighter:function(e){return new X(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new X(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Z(this).rgb()}}));var K=-.14861,J=1.78277,Q=-.29227,ee=-.90649,te=1.97294,ne=te*ee,re=te*J,ie=J*Q-ee*K;function oe(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);e instanceof k||(e=w(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(ie*r+ne*t-re*n)/(ie+ne-re),o=r-i,a=(te*(n-i)-Q*o)/ee,s=Math.sqrt(a*a+o*o)/(te*i*(1-i)),l=s?Math.atan2(a,o)*R-120:NaN;return new se(l<0?l+360:l,s,i,e.opacity)}function ae(e,t,n,r){return 1===arguments.length?oe(e):new se(e,t,n,null==r?1:r)}function se(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}t(se,ae,n(r,{brighter:function(e){return e=null==e?o:Math.pow(o,e),new se(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*I,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new k(255*(t+n*(K*r+J*i)),255*(t+n*(Q*r+ee*i)),255*(t+n*(te*r)),this.opacity)}})),e.color=b,e.cubehelix=ae,e.gray=function(e,t){return new V(e,0,0,null==t?1:t)},e.hcl=Y,e.hsl=O,e.lab=U,e.lch=function(e,t,n,r){return 1===arguments.length?G(e):new X(n,t,e,null==r?1:r)},e.rgb=A,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],110:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";var t={value:function(){}};function n(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new r(i)}function r(e){this._=e}function i(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function o(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function a(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=t,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=r&&e.push({name:n,value:r}),e}r.prototype=n.prototype={constructor:r,on:function(e,t){var n,r=this._,s=i(e+"",r),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l<c;)if(n=(e=s[l]).type)r[n]=a(r[n],e.name,t);else if(null==t)for(n in r)r[n]=a(r[n],e.name,null);return this}for(;++l<c;)if((n=(e=s[l]).type)&&(n=o(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new r(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},e.dispatch=n,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],111:[function(e,t,n){var r,i;r=this,i=function(e,t,n,r,i){"use strict";function o(e){return function(){return e}}function a(){return 1e-6*(Math.random()-.5)}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function h(e){return e.x}function d(e){return e.y}var f=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var n;function r(){var r,i,o=n.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=n[r]).x,s+=i.y;for(a=a/o-e,s=s/o-t,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=s}return null==e&&(e=0),null==t&&(t=0),r.initialize=function(e){n=e},r.x=function(t){return arguments.length?(e=+t,r):e},r.y=function(e){return arguments.length?(t=+e,r):t},r},e.forceCollide=function(e){var n,r,i=1,c=1;function u(){for(var e,o,u,d,f,p,g,m=n.length,v=0;v<c;++v)for(o=t.quadtree(n,s,l).visitAfter(h),e=0;e<m;++e)u=n[e],p=r[u.index],g=p*p,d=u.x+u.vx,f=u.y+u.vy,o.visit(y);function y(e,t,n,r,o){var s=e.data,l=e.r,c=p+l;if(!s)return t>d+c||r<d-c||n>f+c||o<f-c;if(s.index>u.index){var h=d-s.x-s.vx,m=f-s.y-s.vy,v=h*h+m*m;v<c*c&&(0===h&&(v+=(h=a())*h),0===m&&(v+=(m=a())*m),v=(c-(v=Math.sqrt(v)))/v*i,u.vx+=(h*=v)*(c=(l*=l)/(g+l)),u.vy+=(m*=v)*c,s.vx-=h*(c=1-c),s.vy-=m*c)}}}function h(e){if(e.data)return e.r=r[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function d(){if(n){var t,i,o=n.length;for(r=new Array(o),t=0;t<o;++t)i=n[t],r[i.index]=+e(i,t,n)}}return"function"!=typeof e&&(e=o(null==e?1:+e)),u.initialize=function(e){n=e,d()},u.iterations=function(e){return arguments.length?(c=+e,u):c},u.strength=function(e){return arguments.length?(i=+e,u):i},u.radius=function(t){return arguments.length?(e="function"==typeof t?t:o(+t),d(),u):e},u},e.forceLink=function(e){var t,r,i,s,l,h=c,d=function(e){return 1/Math.min(s[e.source.index],s[e.target.index])},f=o(30),p=1;function g(n){for(var i=0,o=e.length;i<p;++i)for(var s,c,u,h,d,f,g,m=0;m<o;++m)c=(s=e[m]).source,h=(u=s.target).x+u.vx-c.x-c.vx||a(),d=u.y+u.vy-c.y-c.vy||a(),h*=f=((f=Math.sqrt(h*h+d*d))-r[m])/f*n*t[m],d*=f,u.vx-=h*(g=l[m]),u.vy-=d*g,c.vx+=h*(g=1-g),c.vy+=d*g}function m(){if(i){var o,a,c=i.length,d=e.length,f=n.map(i,h);for(o=0,s=new Array(c);o<d;++o)(a=e[o]).index=o,"object"!=typeof a.source&&(a.source=u(f,a.source)),"object"!=typeof a.target&&(a.target=u(f,a.target)),s[a.source.index]=(s[a.source.index]||0)+1,s[a.target.index]=(s[a.target.index]||0)+1;for(o=0,l=new Array(d);o<d;++o)a=e[o],l[o]=s[a.source.index]/(s[a.source.index]+s[a.target.index]);t=new Array(d),v(),r=new Array(d),y()}}function v(){if(i)for(var n=0,r=e.length;n<r;++n)t[n]=+d(e[n],n,e)}function y(){if(i)for(var t=0,n=e.length;t<n;++t)r[t]=+f(e[t],t,e)}return null==e&&(e=[]),g.initialize=function(e){i=e,m()},g.links=function(t){return arguments.length?(e=t,m(),g):e},g.id=function(e){return arguments.length?(h=e,g):h},g.iterations=function(e){return arguments.length?(p=+e,g):p},g.strength=function(e){return arguments.length?(d="function"==typeof e?e:o(+e),v(),g):d},g.distance=function(e){return arguments.length?(f="function"==typeof e?e:o(+e),y(),g):f},g},e.forceManyBody=function(){var e,n,r,i,s=o(-30),l=1,c=1/0,u=.81;function f(i){var o,a=e.length,s=t.quadtree(e,h,d).visitAfter(g);for(r=i,o=0;o<a;++o)n=e[o],s.visit(m)}function p(){if(e){var t,n,r=e.length;for(i=new Array(r),t=0;t<r;++t)n=e[t],i[n.index]=+s(n,t,e)}}function g(e){var t,n,r,o,a,s=0,l=0;if(e.length){for(r=o=a=0;a<4;++a)(t=e[a])&&(n=Math.abs(t.value))&&(s+=t.value,l+=n,r+=n*t.x,o+=n*t.y);e.x=r/l,e.y=o/l}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=i[t.data.index]}while(t=t.next)}e.value=s}function m(e,t,o,s){if(!e.value)return!0;var h=e.x-n.x,d=e.y-n.y,f=s-t,p=h*h+d*d;if(f*f/u<p)return p<c&&(0===h&&(p+=(h=a())*h),0===d&&(p+=(d=a())*d),p<l&&(p=Math.sqrt(l*p)),n.vx+=h*e.value*r/p,n.vy+=d*e.value*r/p),!0;if(!(e.length||p>=c)){(e.data!==n||e.next)&&(0===h&&(p+=(h=a())*h),0===d&&(p+=(d=a())*d),p<l&&(p=Math.sqrt(l*p)));do{e.data!==n&&(f=i[e.data.index]*r/p,n.vx+=h*f,n.vy+=d*f)}while(e=e.next)}}return f.initialize=function(t){e=t,p()},f.strength=function(e){return arguments.length?(s="function"==typeof e?e:o(+e),p(),f):s},f.distanceMin=function(e){return arguments.length?(l=e*e,f):Math.sqrt(l)},f.distanceMax=function(e){return arguments.length?(c=e*e,f):Math.sqrt(c)},f.theta=function(e){return arguments.length?(u=e*e,f):Math.sqrt(u)},f},e.forceRadial=function(e,t,n){var r,i,a,s=o(.1);function l(e){for(var o=0,s=r.length;o<s;++o){var l=r[o],c=l.x-t||1e-6,u=l.y-n||1e-6,h=Math.sqrt(c*c+u*u),d=(a[o]-h)*i[o]*e/h;l.vx+=c*d,l.vy+=u*d}}function c(){if(r){var t,n=r.length;for(i=new Array(n),a=new Array(n),t=0;t<n;++t)a[t]=+e(r[t],t,r),i[t]=isNaN(a[t])?0:+s(r[t],t,r)}}return"function"!=typeof e&&(e=o(+e)),null==t&&(t=0),null==n&&(n=0),l.initialize=function(e){r=e,c()},l.strength=function(e){return arguments.length?(s="function"==typeof e?e:o(+e),c(),l):s},l.radius=function(t){return arguments.length?(e="function"==typeof t?t:o(+t),c(),l):e},l.x=function(e){return arguments.length?(t=+e,l):t},l.y=function(e){return arguments.length?(n=+e,l):n},l},e.forceSimulation=function(e){var t,o=1,a=.001,s=1-Math.pow(a,1/300),l=0,c=.6,u=n.map(),h=i.timer(p),d=r.dispatch("tick","end");function p(){g(),d.call("tick",t),o<a&&(h.stop(),d.call("end",t))}function g(n){var r,i,a=e.length;void 0===n&&(n=1);for(var h=0;h<n;++h)for(o+=(l-o)*s,u.each((function(e){e(o)})),r=0;r<a;++r)null==(i=e[r]).fx?i.x+=i.vx*=c:(i.x=i.fx,i.vx=0),null==i.fy?i.y+=i.vy*=c:(i.y=i.fy,i.vy=0);return t}function m(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=10*Math.sqrt(n),o=n*f;t.x=i*Math.cos(o),t.y=i*Math.sin(o)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function v(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),m(),t={tick:g,restart:function(){return h.restart(p),t},stop:function(){return h.stop(),t},nodes:function(n){return arguments.length?(e=n,m(),u.each(v),t):e},alpha:function(e){return arguments.length?(o=+e,t):o},alphaMin:function(e){return arguments.length?(a=+e,t):a},alphaDecay:function(e){return arguments.length?(s=+e,t):+s},alphaTarget:function(e){return arguments.length?(l=+e,t):l},velocityDecay:function(e){return arguments.length?(c=1-e,t):1-c},force:function(e,n){return arguments.length>1?(null==n?u.remove(e):u.set(e,v(n)),t):u.get(e)},find:function(t,n,r){var i,o,a,s,l,c=0,u=e.length;for(null==r?r=1/0:r*=r,c=0;c<u;++c)(a=(i=t-(s=e[c]).x)*i+(o=n-s.y)*o)<r&&(l=s,r=a);return l},on:function(e,n){return arguments.length>1?(d.on(e,n),t):d.on(e)}}},e.forceX=function(e){var t,n,r,i=o(.1);function a(e){for(var i,o=0,a=t.length;o<a;++o)(i=t[o]).vx+=(r[o]-i.x)*n[o]*e}function s(){if(t){var o,a=t.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!=typeof e&&(e=o(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(i="function"==typeof e?e:o(+e),s(),a):i},a.x=function(t){return arguments.length?(e="function"==typeof t?t:o(+t),s(),a):e},a},e.forceY=function(e){var t,n,r,i=o(.1);function a(e){for(var i,o=0,a=t.length;o<a;++o)(i=t[o]).vy+=(r[o]-i.y)*n[o]*e}function s(){if(t){var o,a=t.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!=typeof e&&(e=o(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(i="function"==typeof e?e:o(+e),s(),a):i},a.y=function(t){return arguments.length?(e="function"==typeof t?t:o(+t),s(),a):e},a},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-quadtree"),e("d3-collection"),e("d3-dispatch"),e("d3-timer")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3)},{"d3-collection":108,"d3-dispatch":110,"d3-quadtree":118,"d3-timer":123}],112:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function n(e){return(e=t(Math.abs(e)))?e[1]:NaN}var r,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new a({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]})}function a(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,n){var r=t(e,n);if(!r)return e+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}o.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,n){var i=t(e,n);if(!i)return e+"";var o=i[0],a=i[1],s=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+t(e,Math.max(0,n+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,h=Array.prototype.map,d=["y","z","a","f","p","n","","m","","k","M","G","T","P","E","Z","Y"];function f(e){var t,i,a=void 0===e.grouping||void 0===e.thousands?c:(t=h.call(e.grouping,Number),i=e.thousands+"",function(e,n){for(var r=e.length,o=[],a=0,s=t[0],l=0;r>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(r-=s,r+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(i)}),s=void 0===e.currency?"":e.currency[0]+"",u=void 0===e.currency?"":e.currency[1]+"",f=void 0===e.decimal?".":e.decimal+"",p=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),g=void 0===e.percent?"%":e.percent+"",m=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,n=e.align,i=e.sign,c=e.symbol,h=e.zero,y=e.width,b=e.comma,_=e.precision,x=e.trim,w=e.type;"n"===w?(b=!0,w="g"):l[w]||(void 0===_&&(_=12),x=!0,w="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var A="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===c?u:/[%p]/.test(w)?g:"",T=l[w],S=/[defgprs%]/.test(w);function E(e){var o,s,l,c=A,u=k;if("c"===w)u=T(e)+u,e="";else{var g=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:T(Math.abs(e),_),x&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==i&&(g=!1),c=(g?"("===i?i:m:"-"===i||"("===i?"":i)+c,u=("s"===w?d[8+r/3]:"")+u+(g&&"("===i?")":""),S)for(o=-1,s=e.length;++o<s;)if(48>(l=e.charCodeAt(o))||l>57){u=(46===l?f+e.slice(o+1):e.slice(o))+u,e=e.slice(0,o);break}}b&&!h&&(e=a(e,1/0));var E=c.length+e.length+u.length,C=E<y?new Array(y-E+1).join(t):"";switch(b&&h&&(e=a(C+e,C.length?y-u.length:1/0),C=""),n){case"<":e=c+e+u+C;break;case"=":e=c+C+e+u;break;case"^":e=C.slice(0,E=C.length>>1)+c+e+u+C.slice(E);break;default:e=C+c+e+u}return p(e)}return _=void 0===_?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),E.toString=function(){return e+""},E}return{format:y,formatPrefix:function(e,t){var r=y(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(n(t)/3))),a=Math.pow(10,-i),s=d[8+i/3];return function(e){return r(a*e)+s}}}}function p(t){return u=f(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=a,e.formatDefaultLocale=p,e.formatLocale=f,e.formatSpecifier=o,e.precisionFixed=function(e){return Math.max(0,-n(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(t)/3)))-n(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,n(t)-n(e))+1},Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r="undefined"!=typeof globalThis?globalThis:r||self).d3=r.d3||{})},{}],113:[function(e,t,n){var r,i;r=this,i=function(e,t,n){"use strict";var r=Math.abs,i=Math.atan,o=Math.atan2,a=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,d=Math.pow,f=Math.round,p=Math.sign||function(e){return e>0?1:e<0?-1:0},g=Math.sin,m=Math.tan,v=1e-6,y=1e-12,b=Math.PI,_=b/2,x=b/4,w=Math.SQRT1_2,A=O(2),k=O(b),T=2*b,S=180/b,E=b/180;function C(e){return e>1?_:e<-1?-_:Math.asin(e)}function M(e){return e>1?0:e<-1?b:Math.acos(e)}function O(e){return e>0?Math.sqrt(e):0}function L(e){return(s(e)-s(-e))/2}function D(e){return(s(e)+s(-e))/2}function I(e){var t=m(e/2),n=2*c(a(e/2))/(t*t);function i(e,t){var r=a(e),i=a(t),o=g(t),s=i*r,l=-((1-s?c((1+s)/2)/(1-s):-.5)+n/(1+s));return[l*i*g(e),l*o]}return i.invert=function(t,i){var s,l=O(t*t+i*i),u=-e/2,h=50;if(!l)return[0,0];do{var d=u/2,f=a(d),p=g(d),m=p/f,y=-c(r(f));u-=s=(2/m*y-n*m-l)/(-y/(p*p)+1-n/(2*f*f))*(f<0?.7:1)}while(r(s)>v&&--h>0);var b=g(u);return[o(t*b,l*a(u)),C(i*b/l)]},i}function R(e,t){var n=a(t),r=function(e){return e?e/Math.sin(e):1}(M(n*a(e/=2)));return[2*n*g(e)*r,g(t)*r]}function P(e){var t=g(e),n=a(e),i=e>=0?1:-1,s=m(i*e),l=(1+t-n)/2;function c(e,r){var c=a(r),u=a(e/=2);return[(1+c)*g(e),(i*r>-o(u,s)-.001?0:10*-i)+l+g(r)*n-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,d=50;do{var f=a(u),p=g(u),m=a(h),y=g(h),b=1+m,_=b*p-e,x=l+y*n-b*t*f-c,w=b*f/2,A=-p*y,k=t*b*p/2,T=n*m+t*f*y,S=A*k-T*w,E=(x*A-_*T)/S/2,C=(_*k-x*w)/S;r(C)>2&&(C/=2),u-=E,h-=C}while((r(E)>v||r(C)>v)&&--d>0);return i*h>-o(a(u),s)-.001?[2*u,h]:null},c}function N(e,t){var n=m(t/2),r=O(1-n*n),i=1+r*a(e/=2),o=g(e)*r/i,s=n/i,l=o*o,c=s*s;return[4/3*o*(3+l-3*c),4/3*s*(3+3*l-c)]}R.invert=function(e,t){if(!(e*e+4*t*t>b*b+v)){var n=e,i=t,o=25;do{var s,l=g(n),c=g(n/2),u=a(n/2),h=g(i),d=a(i),f=g(2*i),p=h*h,m=d*d,y=c*c,_=1-m*u*u,x=_?M(d*u)*O(s=1/_):s=0,w=2*x*d*c-e,A=x*h-t,k=s*(m*y+x*d*u*p),T=s*(.5*l*f-2*x*h*c),S=.25*s*(f*c-x*h*m*l),E=s*(p*u+x*y*d),C=T*S-E*k;if(!C)break;var L=(A*T-w*E)/C,D=(w*S-A*k)/C;n-=L,i-=D}while((r(L)>v||r(D)>v)&&--o>0);return[n,i]}},N.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&r(t)>1)return null;var n=1+e*e+t*t,i=O((n-O(n*n-4*t*t))/2),s=C(i)/3,l=i?function(e){return c(e+O(e*e-1))}(r(t/i))/3:function(e){return c(e+O(e*e+1))}(r(e))/3,u=a(s),h=D(l),d=h*h-u*u;return[2*p(e)*o(L(l)*u,.25-d),2*p(t)*o(h*g(s),.25+d)]};var z=O(8),F=c(1+A);function B(e,t){var n=r(t);return n<x?[e,c(m(x+t/2))]:[e*a(n)*(2*A-1/g(n)),p(t)*(2*A*(n-x)-c(m(n/2)))]}function j(e){var n=2*b/e;function s(e,i){var s=t.geoAzimuthalEquidistantRaw(e,i);if(r(e)>_){var l=o(s[1],s[0]),c=O(s[0]*s[0]+s[1]*s[1]),u=n*f((l-_)/n)+_,h=o(g(l-=u),2-a(l));l=u+C(b/c*g(h))-h,s[0]=c*a(l),s[1]=c*g(l)}return s}return s.invert=function(e,r){var s=O(e*e+r*r);if(s>_){var l=o(r,e),c=n*f((l-_)/n)+_,u=l>c?-1:1,h=s*a(c-l),d=1/m(u*M((h-b)/O(b*(b-2*h)+s*s)));l=c+2*i((d+u*O(d*d-3))/3),e=s*a(l),r=s*g(l)}return t.geoAzimuthalEquidistantRaw.invert(e,r)},s}function U(e,n){if(arguments.length<2&&(n=e),1===n)return t.geoAzimuthalEqualAreaRaw;if(n===1/0)return V;function r(r,i){var o=t.geoAzimuthalEqualAreaRaw(r/n,i);return o[0]*=e,o}return r.invert=function(r,i){var o=t.geoAzimuthalEqualAreaRaw.invert(r/e,i);return o[0]*=n,o},r}function V(e,t){return[e*a(t)/a(t/=2),2*g(t)]}function q(e,t,n){var i,o,a,s=100;n=void 0===n?0:+n,t=+t;do{(o=e(n))===(a=e(n+v))&&(a=o+v),n-=i=-1e-6*(o-t)/(o-a)}while(s-- >0&&r(i)>v);return s<0?NaN:n}function H(e,t,n){return void 0===t&&(t=40),void 0===n&&(n=y),function(i,o,a,s){var l,c,u;a=void 0===a?0:+a,s=void 0===s?0:+s;for(var h=0;h<t;h++){var d=e(a,s),f=d[0]-i,p=d[1]-o;if(r(f)<n&&r(p)<n)break;var g=f*f+p*p;if(g>l)a-=c/=2,s-=u/=2;else{l=g;var m=(a>0?-1:1)*n,v=(s>0?-1:1)*n,y=e(a+m,s),b=e(a,s+v),_=(y[0]-d[0])/m,x=(y[1]-d[1])/m,w=(b[0]-d[0])/v,A=(b[1]-d[1])/v,k=A*_-x*w,T=(r(k)<.5?.5:1)/k;if(a+=c=(p*w-f*A)*T,s+=u=(f*x-p*_)*T,r(c)<n&&r(u)<n)break}}return[a,s]}}function $(){var e=U(1.68,2);function t(t,n){if(t+n<-1.4){var r=(t-n+1.6)*(t+n+1.4)/8;t+=r,n-=.8*r*g(n+b/2)}var i=e(t,n),o=(1-a(t*n))/12;return i[1]<0&&(i[0]*=1+o),i[1]>0&&(i[1]*=1+o/1.5*i[0]*i[0]),i}return t.invert=H(t),t}function W(e,t){var n,i=e*g(t),o=30;do{t-=n=(t+g(t)-i)/(1+a(t))}while(r(n)>v&&--o>0);return t/2}function G(e,t,n){function r(r,i){return[e*r*a(i=W(n,i)),t*g(i)]}return r.invert=function(r,i){return i=C(i/t),[r/(e*a(i)),C((2*i+g(2*i))/n)]},r}B.invert=function(e,t){if((o=r(t))<F)return[e,2*i(s(t))-_];var n,o,l=x,u=25;do{var h=a(l/2),d=m(l/2);l-=n=(z*(l-x)-c(d)-o)/(z-h*h/(2*d))}while(r(n)>y&&--u>0);return[e/(a(l)*(z-1/g(l))),p(t)*l]},V.invert=function(e,t){var n=2*C(t/2);return[e*a(n/2)/a(n),n]};var Y=G(A/_,A,b);var X=2.00276,Z=1.11072;function K(e,t){var n=W(b,t);return[X*e/(1/a(t)+Z/a(n)),(t+A*g(n))/X]}function J(e){var n=0,r=t.geoProjectionMutator(e),i=r(n);return i.parallel=function(e){return arguments.length?r(n=e*E):n*S},i}function Q(e,t){return[e*a(t),t]}function ee(e){if(!e)return Q;var t=1/m(e);function n(n,r){var i=t+e-r,o=i?n*a(r)/i:i;return[i*g(o),t-i*a(o)]}return n.invert=function(n,r){var i=O(n*n+(r=t-r)*r),s=t+e-i;return[i/a(s)*o(n,r),s]},n}function te(e){function t(t,n){var r=_-n,i=r?t*e*g(r)/r:r;return[r*g(i)/e,_-r*a(i)]}return t.invert=function(t,n){var r=t*e,i=_-n,a=O(r*r+i*i),s=o(r,i);return[(a?a/g(a):1)*s/e,_-a]},t}K.invert=function(e,t){var n,i,o=X*t,s=t<0?-x:x,l=25;do{i=o-A*g(s),s-=n=(g(2*s)+2*s-b*g(i))/(2*a(2*s)+2+b*a(i)*A*a(s))}while(r(n)>v&&--l>0);return i=o-A*g(s),[e*(1/a(i)+Z/a(s))/X,i]},Q.invert=function(e,t){return[e/a(t),t]};var ne=G(1,4/b,b);function re(e,t,n,i,s,l){var c,u=a(l);if(r(e)>1||r(l)>1)c=M(n*s+t*i*u);else{var h=g(e/2),d=g(l/2);c=2*C(O(h*h+t*i*d*d))}return r(c)>v?[c,o(i*g(l),t*s-n*i*u)]:[0,0]}function ie(e,t,n){return M((e*e+t*t-n*n)/(2*e*t))}function oe(e){return e-2*b*l((e+b)/(2*b))}function ae(e,t,n){for(var r,i=[[e[0],e[1],g(e[1]),a(e[1])],[t[0],t[1],g(t[1]),a(t[1])],[n[0],n[1],g(n[1]),a(n[1])]],o=i[2],s=0;s<3;++s,o=r)r=i[s],o.v=re(r[1]-o[1],o[3],o[2],r[3],r[2],r[0]-o[0]),o.point=[0,0];var l=ie(i[0].v[0],i[2].v[0],i[1].v[0]),c=ie(i[0].v[0],i[1].v[0],i[2].v[0]),u=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var h=[i[2].point[0]=i[0].point[0]+i[2].v[0]*a(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(e,t){var n,r=g(t),o=a(t),s=new Array(3);for(n=0;n<3;++n){var l=i[n];if(s[n]=re(t-l[1],l[3],l[2],o,r,e-l[0]),!s[n][0])return l.point;s[n][1]=oe(s[n][1]-l.v[1])}var d=h.slice();for(n=0;n<3;++n){var f=2==n?0:n+1,p=ie(i[n].v[0],s[n][0],s[f][0]);s[n][1]<0&&(p=-p),n?1==n?(p=c-p,d[0]-=s[n][0]*a(p),d[1]-=s[n][0]*g(p)):(p=u-p,d[0]+=s[n][0]*a(p),d[1]+=s[n][0]*g(p)):(d[0]+=s[n][0]*a(p),d[1]-=s[n][0]*g(p))}return d[0]/=3,d[1]/=3,d}}function se(e){return e[0]*=E,e[1]*=E,e}function le(e,n,r){var i=t.geoCentroid({type:"MultiPoint",coordinates:[e,n,r]}),o=[-i[0],-i[1]],a=t.geoRotation(o),s=ae(se(a(e)),se(a(n)),se(a(r)));s.invert=H(s);var l=t.geoProjection(s).rotate(o),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(a(e)):a.invert(c())},l.clipAngle(90)}function ce(e,t){var n=O(1-g(t));return[2/k*e*n,k*(1-n)]}function ue(e){var t=m(e);function n(e,n){return[e,(e?e/g(e):1)*(g(n)*a(e)-t*a(n))]}return n.invert=t?function(e,n){e&&(n*=g(e)/e);var r=a(e);return[e,2*o(O(r*r+t*t-n*n)-r,t-n)]}:function(e,t){return[e,C(e?t*m(e)/e:t)]},n}ce.invert=function(e,t){var n=(n=t/k-1)*n;return[n>0?e*O(b/n)/2:0,C(1-n)]};var he=O(3);function de(e,t){return[he*e*(2*a(2*t/3)-1)/k,he*k*g(t/3)]}function fe(e){var t=a(e);function n(e,n){return[e*t,g(n)/t]}return n.invert=function(e,n){return[e/t,C(n*t)]},n}function pe(e){var t=a(e);function n(e,n){return[e*t,(1+t)*m(n/2)]}return n.invert=function(e,n){return[e/t,2*i(n/(1+t))]},n}function ge(e,t){var n=O(8/(3*b));return[n*e*(1-r(t)/b),n*t]}function me(e,t){var n=O(4-3*g(r(t)));return[2/O(6*b)*e*n,p(t)*O(2*b/3)*(2-n)]}function ve(e,t){var n=O(b*(4+b));return[2/n*e*(1+O(1-4*t*t/(b*b))),4/n*t]}function ye(e,t){var n=(2+_)*g(t);t/=2;for(var i=0,o=1/0;i<10&&r(o)>v;i++){var s=a(t);t-=o=(t+g(t)*(s+2)-n)/(2*s*(1+s))}return[2/O(b*(4+b))*e*(1+a(t)),2*O(b/(4+b))*g(t)]}function be(e,t){return[e*(1+a(t))/O(2+b),2*t/O(2+b)]}function _e(e,t){for(var n=(1+_)*g(t),i=0,o=1/0;i<10&&r(o)>v;i++)t-=o=(t+g(t)-n)/(1+a(t));return n=O(2+b),[e*(1+a(t))/n,2*t/n]}de.invert=function(e,t){var n=3*C(t/(he*k));return[k*e/(he*(2*a(2*n/3)-1)),n]},ge.invert=function(e,t){var n=O(8/(3*b)),i=t/n;return[e/(n*(1-r(i)/b)),i]},me.invert=function(e,t){var n=2-r(t)/O(2*b/3);return[e*O(6*b)/(2*n),p(t)*C((4-n*n)/3)]},ve.invert=function(e,t){var n=O(b*(4+b))/2;return[e*n/(1+O(1-t*t*(4+b)/(4*b))),t*n/2]},ye.invert=function(e,t){var n=t*O((4+b)/b)/2,r=C(n),i=a(r);return[e/(2/O(b*(4+b))*(1+i)),C((r+n*(i+2))/(2+_))]},be.invert=function(e,t){var n=O(2+b),r=t*n/2;return[n*e/(1+a(r)),r]},_e.invert=function(e,t){var n=1+_,r=O(n/2);return[2*e*r/(1+a(t*=r)),C((t+g(t))/n)]};var xe=3+2*A;function we(e,t){var n=g(e/=2),r=a(e),o=O(a(t)),s=a(t/=2),l=g(t)/(s+A*r*o),u=O(2/(1+l*l)),h=O((A*s+(r+n)*o)/(A*s+(r-n)*o));return[xe*(u*(h-1/h)-2*c(h)),xe*(u*l*(h+1/h)-2*i(l))]}we.invert=function(e,t){if(!(n=N.invert(e/1.2,1.065*t)))return null;var n,o=n[0],s=n[1],l=20;e/=xe,t/=xe;do{var d=o/2,f=s/2,p=g(d),m=a(d),y=g(f),b=a(f),x=a(s),k=O(x),T=y/(b+A*m*k),S=T*T,E=O(2/(1+S)),C=(A*b+(m+p)*k)/(A*b+(m-p)*k),M=O(C),L=M-1/M,D=M+1/M,I=E*L-2*c(M)-e,R=E*T*D-2*i(T)-t,P=y&&w*k*p*S/y,z=(A*m*b+k)/(2*(b+A*m*k)*(b+A*m*k)*k),F=-.5*T*E*E*E,B=F*P,j=F*z,U=(U=2*b+A*k*(m-p))*U*M,V=(A*m*b*k+x)/U,q=-A*p*y/(k*U),H=L*B-2*V/M+E*(V+V/C),$=L*j-2*q/M+E*(q+q/C),W=T*D*B-2*P/(1+S)+E*D*P+E*T*(V-V/C),G=T*D*j-2*z/(1+S)+E*D*z+E*T*(q-q/C),Y=$*W-G*H;if(!Y)break;var X=(R*$-I*G)/Y,Z=(I*W-R*H)/Y;o-=X,s=u(-_,h(_,s-Z))}while((r(X)>v||r(Z)>v)&&--l>0);return r(r(s)-_)<v?[0,s]:l&&[o,s]};var Ae=a(35*E);function ke(e,t){var n=m(t/2);return[e*Ae*O(1-n*n),(1+Ae)*n]}function Te(e,t){var n=t/2,r=a(n);return[2*e/k*a(t)*r*r,k*m(n)]}function Se(e){var t=1-e,n=i(b,0)[0]-i(-b,0)[0],r=O(2*(i(0,_)[1]-i(0,-_)[1])/n);function i(n,r){var i=a(r),o=g(r);return[i/(t+e*i)*n,t*r+e*o]}function o(e,t){var n=i(e,t);return[n[0]*r,n[1]/r]}function s(e){return o(0,e)[1]}return o.invert=function(n,i){var o=q(s,i);return[n/r*(e+t/a(o)),o]},o}function Ee(e){return[e[0]/2,C(m(e[1]/2*E))*S]}function Ce(e){return[2*e[0],2*i(g(e[1]*E))*S]}function Me(e,n){var i=2*b/n,s=e*e;function l(n,l){var c=t.geoAzimuthalEquidistantRaw(n,l),u=c[0],h=c[1],d=u*u+h*h;if(d>s){var p=O(d),m=o(h,u),y=i*f(m/i),x=m-y,w=e*a(x),A=(e*g(x)-x*g(w))/(_-w),k=Oe(x,A),T=(b-e)/Le(k,w,b);u=p;var S,E=50;do{u-=S=(e+Le(k,w,u)*T-p)/(k(u)*T)}while(r(S)>v&&--E>0);h=x*g(u),u<_&&(h-=A*(u-_));var C=g(y),M=a(y);c[0]=u*M-h*C,c[1]=u*C+h*M}return c}return l.invert=function(n,l){var c=n*n+l*l;if(c>s){var u=O(c),h=o(l,n),d=i*f(h/i),p=h-d;n=u*a(p),l=u*g(p);for(var m=n-_,v=g(n),x=l/v,w=n<_?1/0:0,A=10;;){var k=e*g(x),T=e*a(x),S=g(T),E=_-T,C=(k-x*S)/E,M=Oe(x,C);if(r(w)<y||!--A)break;x-=w=(x*v-C*m-l)/(v-2*m*(E*(T+x*k*a(T)-S)-k*(k-x*S))/(E*E))}n=(u=e+Le(M,T,n)*(b-e)/Le(M,T,b))*a(h=d+x),l=u*g(h)}return t.geoAzimuthalEquidistantRaw.invert(n,l)},l}function Oe(e,t){return function(n){var r=e*a(n);return n<_&&(r-=t),O(1+r*r)}}function Le(e,t,n){for(var r=(n-t)/50,i=e(t)+e(n),o=1,a=t;o<50;++o)i+=2*e(a+=r);return.5*i*r}function De(e,t,n,i,o,s,l,c){function u(r,u){if(!u)return[e*r/b,0];var h=u*u,d=e+h*(t+h*(n+h*i)),f=u*(o-1+h*(s-c+h*l)),p=(d*d+f*f)/(2*f),m=r*C(d/p)/b;return[p*g(m),u*(1+h*c)+p*(1-a(m))]}return arguments.length<8&&(c=0),u.invert=function(u,h){var d,f,p=b*u/e,m=h,y=50;do{var _=m*m,x=e+_*(t+_*(n+_*i)),w=m*(o-1+_*(s-c+_*l)),A=x*x+w*w,k=2*w,T=A/k,S=T*T,E=C(x/T)/b,M=p*E,L=x*x,D=(2*t+_*(4*n+6*_*i))*m,I=o+_*(3*s+5*_*l),R=(2*(x*D+w*(I-1))*k-A*(2*(I-1)))/(k*k),P=a(M),N=g(M),z=T*P,F=T*N,B=p/b*(1/O(1-L/S))*(D*T-x*R)/S,j=F-u,U=m*(1+_*c)+T-z-h,V=R*N+z*B,q=z*E,H=1+R-(R*P-F*B),$=F*E,W=V*$-H*q;if(!W)break;p-=d=(U*V-j*H)/W,m-=f=(j*$-U*q)/W}while((r(d)>v||r(f)>v)&&--y>0);return[p,m]},u}ke.invert=function(e,t){var n=t/(1+Ae);return[e&&e/(Ae*O(1-n*n)),2*i(n)]},Te.invert=function(e,t){var n=i(t/k),r=a(n),o=2*n;return[e*k/2/(a(o)*r*r),o]};var Ie=De(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Re=De(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var Pe=De(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Ne(e,t){var n=e*e,r=t*t;return[e*(1-.162388*r)*(.87-952426e-9*n*n),t*(1+r/12)]}Ne.invert=function(e,t){var n,i=e,o=t,a=50;do{var s=o*o;o-=n=(o*(1+s/12)-t)/(1+s/4)}while(r(n)>v&&--a>0);a=50,e/=1-.162388*s;do{var l=(l=i*i)*l;i-=n=(i*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(r(n)>v&&--a>0);return[i,o]};var ze=De(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Fe(e){var t=e(_,0)[0]-e(-_,0)[0];function n(n,r){var i=n>0?-.5:.5,o=e(n+i*b,r);return o[0]-=i*t,o}return e.invert&&(n.invert=function(n,r){var i=n>0?-.5:.5,o=e.invert(n+i*t,r),a=o[0]-i*b;return a<-b?a+=2*b:a>b&&(a-=2*b),o[0]=a,o}),n}function Be(e,t){var n=p(e),i=p(t),s=a(t),l=a(e)*s,c=g(e)*s,u=g(i*t);e=r(o(c,u)),t=C(l),r(e-_)>v&&(e%=_);var h=function(e,t){if(t===_)return[0,0];var n,i,o=g(t),s=o*o,l=s*s,c=1+l,u=1+3*l,h=1-l,d=C(1/O(c)),f=h+s*c*d,p=(1-o)/f,m=O(p),y=p*c,x=O(y),w=m*h;if(0===e)return[0,-(w+s*x)];var A,k=a(t),T=1/k,S=2*o*k,E=(-f*k-(-3*s+d*u)*S*(1-o))/(f*f),M=-T*S,L=-T*(s*c*E+p*u*S),D=-2*T*(h*(.5*E/m)-2*s*m*S),I=4*e/b;if(e>.222*b||t<b/4&&e>.175*b){if(n=(w+s*O(y*(1+l)-w*w))/(1+l),e>b/4)return[n,n];var R=n,P=.5*n;n=.5*(P+R),i=50;do{var N=n*(D+M*O(y-n*n))+L*C(n/x)-I;if(!N)break;N<0?P=n:R=n,n=.5*(P+R)}while(r(R-P)>v&&--i>0)}else{n=v,i=25;do{var z=n*n,F=O(y-z),B=D+M*F,j=n*B+L*C(n/x)-I;n-=A=F?j/(B+(L-M*z)/F):0}while(r(A)>v&&--i>0)}return[n,-w-s*O(y-n*n)]}(e>b/4?_-e:e,t);return e>b/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=n,h[1]*=-i,h}function je(e,t){var n,o,l,c,u,h;if(t<v)return[(c=g(e))-(n=t*(e-c*(o=a(e)))/4)*o,o+n*c,1-t*c*c/2,e-n];if(t>=.999999)return n=(1-t)/4,l=1/(o=D(e)),[(h=e,(c=((h=s(2*h))-1)/(h+1))+n*((u=o*L(e))-e)/(o*o)),l-n*c*l*(u-e),l+n*c*l*(u+e),2*i(s(e))-_+n*(u-e)/o];var d=[1,0,0,0,0,0,0,0,0],f=[O(t),0,0,0,0,0,0,0,0],p=0;for(o=O(1-t),u=1;r(f[p]/d[p])>v&&p<8;)n=d[p++],f[p]=(n-o)/2,d[p]=(n+o)/2,o=O(n*o),u*=2;l=u*d[p]*e;do{l=(C(c=f[p]*g(o=l)/d[p])+l)/2}while(--p);return[g(l),c=a(l),c/a(l-o),l]}function Ue(e,t){if(!t)return e;if(1===t)return c(m(e/2+x));for(var n=1,o=O(1-t),a=O(t),s=0;r(a)>v;s++){if(e%b){var l=i(o*m(e)/n);l<0&&(l+=b),e+=l+~~(e/b)*b}else e+=e;a=(n+o)/2,o=O(n*o),a=((n=a)-o)/2}return e/(d(2,s)*n)}function Ve(e,t){var n=(A-1)/(A+1),l=O(1-n*n),u=Ue(_,l*l),h=c(m(b/4+r(t)/2)),d=s(-1*h)/O(n),f=function(e,t){var n=e*e,r=t+1,i=1-n-t*t;return[.5*((e>=0?_:-_)-o(i,2*e)),-.25*c(i*i+4*n)+.5*c(r*r+n)]}(d*a(-1*e),d*g(-1*e)),v=function(e,t,n){var o=r(e),a=L(r(t));if(o){var s=1/g(o),l=1/(m(o)*m(o)),c=-(l+n*(a*a*s*s)-1+n),u=(-c+O(c*c-(n-1)*l*4))/2;return[Ue(i(1/O(u)),n)*p(e),Ue(i(O((u/l-1)/n)),1-n)*p(t)]}return[0,Ue(i(a),1-n)*p(t)]}(f[0],f[1],l*l);return[-v[1],(t>=0?1:-1)*(.5*u-v[0])]}function qe(e){var t=g(e),n=a(e),i=He(e);function s(e,o){var s=i(e,o);e=s[0],o=s[1];var l=g(o),c=a(o),u=a(e),h=M(t*l+n*c*u),d=g(h),f=r(d)>v?h/d:1;return[f*n*g(e),(r(e)>_?f:-f)*(t*c-n*l*u)]}return i.invert=He(-e),s.invert=function(e,n){var r=O(e*e+n*n),s=-g(r),l=a(r),c=r*l,u=-n*s,h=r*t,d=O(c*c+u*u-h*h),f=o(c*h+u*d,u*h-c*d),p=(r>_?-1:1)*o(e*s,r*a(f)*l+n*g(f)*s);return i.invert(p,f)},s}function He(e){var t=g(e),n=a(e);return function(e,r){var i=a(r),s=a(e)*i,l=g(e)*i,c=g(r);return[o(l,s*n-c*t),C(c*n+s*t)]}}Be.invert=function(e,t){r(e)>1&&(e=2*p(e)-e),r(t)>1&&(t=2*p(t)-t);var n=p(e),i=p(t),s=-n*e,l=-i*t,c=l/s<1,u=function(e,t){for(var n=0,i=1,o=.5,s=50;;){var l=o*o,c=O(o),u=C(1/O(1+l)),h=1-l+o*(1+l)*u,d=(1-c)/h,f=O(d),p=d*(1+l),g=f*(1-l),m=O(p-e*e),v=t+g+o*m;if(r(i-n)<y||0==--s||0===v)break;v>0?n=o:i=o,o=.5*(n+i)}if(!s)return null;var _=C(c),x=a(_),w=1/x,A=2*c*x,k=(-h*x-(-3*o+u*(1+3*l))*A*(1-c))/(h*h);return[b/4*(e*(-2*w*(.5*k/f*(1-l)-2*o*f*A)+-w*A*m)+-w*(o*(1+l)*k+d*(1+3*l)*A)*C(e/O(p))),_]}(c?l:s,c?s:l),h=u[0],d=u[1],f=a(d);return c&&(h=-_-h),[n*(o(g(h)*f,-g(d))+b),i*C(a(h)*f)]},Ve.invert=function(e,t){var n,r,a,l,u,h,d=(A-1)/(A+1),f=O(1-d*d),p=(n=.5*Ue(_,f*f)-t,r=-e,a=f*f,n?(l=je(n,a),r?(h=(u=je(r,1-a))[1]*u[1]+a*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/h,l[1]*l[2]*u[0]*u[1]/h],[l[1]*u[1]/h,-l[0]*l[2]*u[0]*u[2]/h],[l[2]*u[1]*u[2]/h,-a*l[0]*l[1]*u[0]/h]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=je(r,1-a))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),g=function(e,t){var n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}(p[0],p[1]);return[o(g[1],g[0])/-1,2*i(s(-.5*c(d*g[0]*g[0]+d*g[1]*g[1])))-_]};var $e=C(1-1/3)*S,We=fe(0);function Ge(e){var t=$e*E,n=ce(b,t)[0]-ce(-b,t)[0],i=We(0,t)[1],o=ce(0,t)[1],a=k-o,s=T/e,c=4/T,d=i+a*a*4/T;function f(f,p){var g,m=r(p);if(m>t){var v=h(e-1,u(0,l((f+b)/s)));(g=ce(f+=b*(e-1)/e-v*s,m))[0]=g[0]*T/n-T*(e-1)/(2*e)+v*T/e,g[1]=i+4*(g[1]-o)*a/T,p<0&&(g[1]=-g[1])}else g=We(f,p);return g[0]*=c,g[1]/=d,g}return f.invert=function(t,f){t/=c;var p=r(f*=d);if(p>i){var g=h(e-1,u(0,l((t+b)/s)));t=(t+b*(e-1)/e-g*s)*n/T;var m=ce.invert(t,.25*(p-i)*T/a+o);return m[0]-=b*(e-1)/e-g*s,f<0&&(m[1]=-m[1]),m}return We.invert(t,f)},f}function Ye(e,t){return[e,1&t?89.999999:$e]}function Xe(e,t){return[e,1&t?-89.999999:-$e]}function Ze(e){return[.999999*e[0],e[1]]}function Ke(e){var t,n=1+e,i=C(g(1/n)),s=2*O(b/(t=b+4*i*n)),l=.5*s*(n+O(e*(2+e))),c=e*e,u=n*n;function h(h,d){var f,p,m=1-g(d);if(m&&m<2){var v,x=_-d,w=25;do{var A=g(x),k=a(x),T=i+o(A,n-k),S=1+u-2*n*k;x-=v=(x-c*i-n*A+S*T-.5*m*t)/(2*n*A*T)}while(r(v)>y&&--w>0);f=s*O(S),p=h*T/b}else f=s*(e+m),p=h*i/b;return[f*g(p),l-f*a(p)]}return h.invert=function(e,r){var a=e*e+(r-=l)*r,h=(1+u-a/(s*s))/(2*n),d=M(h),f=g(d),p=i+o(f,n-h);return[C(e/O(a))*b/p,C(1-2*(d-c*i-n*f+(1+u-2*n*h)*p)/t)]},h}var Je=.7109889596207567,Qe=.0528035274542;function et(e,t){return t>-Je?((e=Y(e,t))[1]+=Qe,e):Q(e,t)}function tt(e,t){return r(t)>Je?((e=Y(e,t))[1]-=t>0?Qe:-Qe,e):Q(e,t)}function nt(e,t,n,r){var i=O(4*b/(2*n+(1+e-t/2)*g(2*n)+(e+t)/2*g(4*n)+t/2*g(6*n))),o=O(r*g(n)*O((1+e*a(2*n)+t*a(4*n))/(1+e+t))),s=n*c(1);function l(n){return O(1+e*a(2*n)+t*a(4*n))}function c(r){var i=r*n;return(2*i+(1+e-t/2)*g(2*i)+(e+t)/2*g(4*i)+t/2*g(6*i))/n}function u(e){return l(e)*g(e)}var h=function(e,t){var r=n*q(c,s*g(t)/n,t/b);isNaN(r)&&(r=n*p(t));var u=i*l(r);return[u*o*e/b*a(r),u/o*g(r)]};return h.invert=function(e,t){var r=q(u,t*o/i);return[e*b/(a(r)*i*o*l(r)),C(n*c(r/n)/s)]},0===n&&(i=O(r/b),(h=function(e,t){return[e*i,g(t)/i]}).invert=function(e,t){return[e/i,C(t*i)]}),h}function rt(e,t,n,r,i,o,a,s,l,c,u){if(u.nanEncountered)return NaN;var h,d,f,p,g,m,v,y,b,_;if(d=e(t+.25*(h=n-t)),f=e(n-.25*h),isNaN(d))u.nanEncountered=!0;else{if(!isNaN(f))return _=((m=(p=h*(r+4*d+i)/12)+(g=h*(i+4*f+o)/12))-a)/15,c>l?(u.maxDepthCount++,m+_):Math.abs(_)<s?m+_:(y=rt(e,t,v=t+.5*h,r,d,i,p,.5*s,l,c+1,u),isNaN(y)?(u.nanEncountered=!0,NaN):(b=rt(e,v,n,i,f,o,g,.5*s,l,c+1,u),isNaN(b)?(u.nanEncountered=!0,NaN):y+b));u.nanEncountered=!0}}function it(e,t,n,r,i){void 0===r&&(r=1e-8),void 0===i&&(i=20);var o=e(t),a=e(.5*(t+n)),s=e(n);return rt(e,t,n,o,a,s,(o+4*a+s)*(n-t)/6,r,i,1,{maxDepthCount:0,nanEncountered:!1})}function ot(e,t,n){function i(n){return e+(1-e)*d(1-d(n,t),1/t)}function o(e){return it(i,0,e,1e-4)}for(var a=1/o(1),s=1e3,l=(1+1e-8)*a,c=[],u=0;u<=s;u++)c.push(o(u/s)*l);function h(e){var t=0,n=s,r=500;do{c[r]>e?n=r:t=r,r=t+n>>1}while(r>t);var i=c[r+1]-c[r];return i&&(i=(e-c[r+1])/i),(r+1+i)/s}var f=2*h(1)/b*a/n,m=function(e,t){var n=h(r(g(t))),o=i(n)*e;return n/=f,[o,t>=0?n:-n]};return m.invert=function(e,t){var n;return r(t*=f)<1&&(n=p(t)*C(o(r(t))*a)),[e/i(r(t)),n]},m}function at(e,t){return r(e[0]-t[0])<v&&r(e[1]-t[1])<v}function st(e,t){for(var n,r,i,o=-1,a=e.length,s=e[0],l=[];++o<a;){r=((n=e[o])[0]-s[0])/t,i=(n[1]-s[1])/t;for(var c=0;c<t;++c)l.push([s[0]+c*r,s[1]+c*i]);s=n}return l.push(n),l}function lt(e){var t,r,i,o,a,s,l,c=[],u=e[0].length;for(l=0;l<u;++l)r=(t=e[0][l])[0][0],i=t[0][1],o=t[1][1],a=t[2][0],s=t[2][1],c.push(st([[r+v,i+v],[r+v,o-v],[a-v,o-v],[a-v,s+v]],30));for(l=e[1].length-1;l>=0;--l)r=(t=e[1][l])[0][0],i=t[0][1],o=t[1][1],a=t[2][0],s=t[2][1],c.push(st([[a-v,s-v],[a-v,o+v],[r+v,o+v],[r+v,i-v]],30));return{type:"Polygon",coordinates:[n.merge(c)]}}function ct(e,n,r){var i,o;function a(t,r){for(var i=r<0?-1:1,o=n[+(r<0)],a=0,s=o.length-1;a<s&&t>o[a][2][0];++a);var l=e(t-o[a][1][0],r);return l[0]+=e(o[a][1][0],i*r>i*o[a][0][1]?o[a][0][1]:r)[0],l}r?a.invert=r(a):e.invert&&(a.invert=function(t,r){for(var i=o[+(r<0)],s=n[+(r<0)],l=0,c=i.length;l<c;++l){var u=i[l];if(u[0][0]<=t&&t<u[1][0]&&u[0][1]<=r&&r<u[1][1]){var h=e.invert(t-e(s[l][1][0],0)[0],r);return h[0]+=s[l][1][0],at(a(h[0],h[1]),[t,r])?h:null}}});var s=t.geoProjection(a),l=s.stream;return s.stream=function(e){var n=s.rotate(),r=l(e),o=(s.rotate([0,0]),l(e));return s.rotate(n),r.sphere=function(){t.geoStream(i,o)},r},s.lobes=function(t){return arguments.length?(i=lt(t),n=t.map((function(e){return e.map((function(e){return[[e[0][0]*E,e[0][1]*E],[e[1][0]*E,e[1][1]*E],[e[2][0]*E,e[2][1]*E]]}))})),o=n.map((function(t){return t.map((function(t){var n,r=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],a=e(t[1][0],t[1][1])[1];return o>a&&(n=o,o=a,a=n),[[r,o],[i,a]]}))})),s):n.map((function(e){return e.map((function(e){return[[e[0][0]*S,e[0][1]*S],[e[1][0]*S,e[1][1]*S],[e[2][0]*S,e[2][1]*S]]}))}))},null!=n&&s.lobes(n),s}et.invert=function(e,t){return t>-Je?Y.invert(e,t-Qe):Q.invert(e,t)},tt.invert=function(e,t){return r(t)>Je?Y.invert(e,t+(t>0?Qe:-Qe)):Q.invert(e,t)};var ut=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ht=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var dt=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var pt=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var gt=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function mt(e,t){return[3/T*e*O(b*b/3-t*t),t]}function vt(e){function t(t,n){if(r(r(n)-_)<v)return[0,n<0?-2:2];var i=g(n),o=d((1+i)/(1-i),e/2),s=.5*(o+1/o)+a(t*=e);return[2*g(t)/s,(o-1/o)/s]}return t.invert=function(t,n){var i=r(n);if(r(i-2)<v)return t?null:[0,p(n)*_];if(i>2)return null;var a=(t/=2)*t,s=(n/=2)*n,l=2*n/(1+a+s);return l=d((1+l)/(1-l),1/e),[o(2*t,1-a-s)/e,C((l-1)/(l+1))]},t}mt.invert=function(e,t){return[T/3*e/O(b*b/3-t*t),t]};var yt=b/A;function bt(e,t){return[e*(1+O(a(t)))/2,t/(a(t/2)*a(e/6))]}function _t(e,t){var n=e*e,r=t*t;return[e*(.975534+r*(-.0143059*n-.119161+-.0547009*r)),t*(1.00384+n*(.0802894+-.02855*r+199025e-9*n)+r*(.0998909+-.0491032*r))]}function xt(e,t){return[g(e)/a(t),m(t)*a(e)]}function wt(e){var t=a(e),n=m(x+e/2);function i(i,o){var a=o-e,s=r(a)<v?i*t:r(s=x+o/2)<v||r(r(s)-_)<v?0:i*a/c(m(s)/n);return[s,a]}return i.invert=function(i,o){var a,s=o+e;return[r(o)<v?i/t:r(a=x+s/2)<v||r(r(a)-_)<v?0:i*c(m(a)/n)/o,s]},i}function At(e,t){return[e,1.25*c(m(x+.4*t))]}function kt(e){var t=e.length-1;function n(n,r){for(var i,o=a(r),s=2/(1+o*a(n)),l=s*o*g(n),c=s*g(r),u=t,h=e[u],d=h[0],f=h[1];--u>=0;)d=(h=e[u])[0]+l*(i=d)-c*f,f=h[1]+l*f+c*i;return[d=l*(i=d)-c*f,f=l*f+c*i]}return n.invert=function(n,s){var l=20,c=n,u=s;do{for(var h,d=t,f=e[d],p=f[0],m=f[1],v=0,y=0;--d>=0;)v=p+c*(h=v)-u*y,y=m+c*y+u*h,p=(f=e[d])[0]+c*(h=p)-u*m,m=f[1]+c*m+u*h;var b,_,x=(v=p+c*(h=v)-u*y)*v+(y=m+c*y+u*h)*y;c-=b=((p=c*(h=p)-u*m-n)*v+(m=c*m+u*h-s)*y)/x,u-=_=(m*v-p*y)/x}while(r(b)+r(_)>1e-12&&--l>0);if(l){var w=O(c*c+u*u),A=2*i(.5*w),k=g(A);return[o(c*k,w*a(A)),w?C(u*k/w):0]}},n}bt.invert=function(e,t){var n=r(e),i=r(t),o=v,s=_;i<yt?s*=i/yt:o+=6*M(yt/i);for(var l=0;l<25;l++){var c=g(s),u=O(a(s)),h=g(s/2),d=a(s/2),f=g(o/6),p=a(o/6),m=.5*o*(1+u)-n,y=s/(d*p)-i,b=u?-.25*o*c/u:0,x=.5*(1+u),w=(1+.5*s*h/d)/(d*p),A=s/d*(f/6)/(p*p),k=b*A-w*x,T=(m*A-y*x)/k,S=(y*b-m*w)/k;if(s-=T,o-=S,r(T)<v&&r(S)<v)break}return[e<0?-o:o,t<0?-s:s]},_t.invert=function(e,t){var n=p(e)*b,i=t/2,o=50;do{var a=n*n,s=i*i,l=n*i,c=n*(.975534+s*(-.0143059*a-.119161+-.0547009*s))-e,u=i*(1.00384+a*(.0802894+-.02855*s+199025e-9*a)+s*(.0998909+-.0491032*s))-t,h=.975534-s*(.119161+3*a*.0143059+.0547009*s),d=-l*(.238322+.2188036*s+.0286118*a),f=l*(.1605788+7961e-7*a+-.0571*s),g=1.00384+a*(.0802894+199025e-9*a)+s*(3*(.0998909-.02855*a)-.245516*s),m=d*f-g*h,y=(u*d-c*g)/m,_=(c*f-u*h)/m;n-=y,i-=_}while((r(y)>v||r(_)>v)&&--o>0);return o&&[n,i]},xt.invert=function(e,t){var n=e*e,r=t*t+1,i=n+r,o=e?w*O((i-O(i*i-4*n))/n):1/O(r);return[C(e*o),p(t)*M(o)]},At.invert=function(e,t){return[e,2.5*i(s(.8*t))-.625*b]};var Tt=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],St=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Et=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ct=[[.9245,0],[0,0],[.01943,0]],Mt=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Ot(e,n){var r=t.geoProjection(kt(e)).rotate(n).clipAngle(90),i=t.geoRotation(n),o=r.center;return delete r.rotate,r.center=function(e){return arguments.length?o(i(e)):i.invert(o())},r}var Lt=O(6),Dt=O(7);function It(e,t){var n=C(7*g(t)/(3*Lt));return[Lt*e*(2*a(2*n/3)-1)/Dt,9*g(n/3)/Dt]}function Rt(e,t){for(var n,i=(1+w)*g(t),o=t,s=0;s<25&&(o-=n=(g(o/2)+g(o)-i)/(.5*a(o/2)+a(o)),!(r(n)<v));s++);return[e*(1+2*a(o)/a(o/2))/(3*A),2*O(3)*g(o/2)/O(2+A)]}function Pt(e,t){for(var n,i=O(6/(4+b)),o=(1+b/4)*g(t),s=t/2,l=0;l<25&&(s-=n=(s/2+g(s)-o)/(.5+a(s)),!(r(n)<v));l++);return[i*(.5+a(s))*e/1.5,i*s]}function Nt(e,t){var n=t*t,r=n*n,i=n*r;return[e*(.84719-.13063*n+i*i*(.05494*n-.04515-.02326*r+.00331*i)),t*(1.01183+r*r*(.01926*n-.02625-.00396*r))]}function zt(e,t){return[e*(1+a(t))/2,2*(t-m(t/2))]}It.invert=function(e,t){var n=3*C(t*Dt/9);return[e*Dt/(Lt*(2*a(2*n/3)-1)),C(3*g(n)*Lt/7)]},Rt.invert=function(e,t){var n=t*O(2+A)/(2*O(3)),r=2*C(n);return[3*A*e/(1+2*a(r)/a(r/2)),C((n+g(r))/(1+w))]},Pt.invert=function(e,t){var n=O(6/(4+b)),i=t/n;return r(r(i)-_)<v&&(i=i<0?-_:_),[1.5*e/(n*(.5+a(i))),C((i/2+g(i))/(1+b/4))]},Nt.invert=function(e,t){var n,i,o,a,s=t,l=25;do{s-=n=(s*(1.01183+(o=(i=s*s)*i)*o*(.01926*i-.02625-.00396*o))-t)/(1.01183+o*o*(.21186*i-.23625+-.05148*o))}while(r(n)>y&&--l>0);return[e/(.84719-.13063*(i=s*s)+(a=i*(o=i*i))*a*(.05494*i-.04515-.02326*o+.00331*a)),s]},zt.invert=function(e,t){for(var n=t/2,i=0,o=1/0;i<10&&r(o)>v;++i){var s=a(t/2);t-=o=(t-m(t/2)-n)/(1-.5/(s*s))}return[2*e/(1+a(t)),t]};var Ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Bt(e,t){var n=g(t),i=a(t),o=p(e);if(0===e||r(t)===_)return[0,t];if(0===t)return[e,0];if(r(e)===_)return[e*i,_*n];var s=b/(2*e)-2*e/b,l=2*t/b,c=(1-l*l)/(n-l),u=s*s,h=c*c,d=1+u/h,f=1+h/u,m=(s*n/c-s/2)/d,v=(h*n/u+c/2)/f,y=v*v-(h*n*n/u+c*n-1)/f;return[_*(m+O(m*m+i*i/d)*o),_*(v+O(y<0?0:y)*p(-t*s)*o)]}Bt.invert=function(e,t){var n=(e/=_)*e,r=n+(t/=_)*t,i=b*b;return[e?(r-1+O((1-r)*(1-r)+4*n))/(2*e)*_:0,q((function(e){return r*(b*g(e)-2*e)*b+4*e*e*(t-g(e))+2*b*e-i*t}),0)]};var jt=1.0148,Ut=.23185,Vt=-.14499,qt=.02406,Ht=1.790857183;function $t(e,t){var n=t*t;return[e,t*(jt+n*n*(Ut+n*(Vt+qt*n)))]}function Wt(e,t){if(r(t)<v)return[e,0];var n=m(t),i=e*g(t);return[g(i)/n,t+(1-a(i))/n]}function Gt(e,t){var n=Zt(e[1],e[0]),r=Zt(t[1],t[0]),i=function(e,t){return o(e[0]*t[1]-e[1]*t[0],e[0]*t[0]+e[1]*t[1])}(n,r),s=Kt(n)/Kt(r);return Xt([1,0,e[0][0],0,1,e[0][1]],Xt([s,0,0,0,s,0],Xt([a(i),g(i),0,-g(i),a(i),0],[1,0,-t[0][0],0,1,-t[0][1]])))}function Yt(e){var t=1/(e[0]*e[4]-e[1]*e[3]);return[t*e[4],-t*e[1],t*(e[1]*e[5]-e[2]*e[4]),-t*e[3],t*e[0],t*(e[2]*e[3]-e[0]*e[5])]}function Xt(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function Zt(e,t){return[e[0]-t[0],e[1]-t[1]]}function Kt(e){return O(e[0]*e[0]+e[1]*e[1])}function Jt(e,n,r){function i(e,t){var r,i=n(e,t),o=i.project([e*S,t*S]);return(r=i.transform)?[r[0]*o[0]+r[1]*o[1]+r[2],-(r[3]*o[0]+r[4]*o[1]+r[5])]:(o[1]=-o[1],o)}function o(e,t){var r=e.project.invert,i=e.transform,a=t;if(i&&(a=[(i=Yt(i))[0]*a[0]+i[1]*a[1]+i[2],i[3]*a[0]+i[4]*a[1]+i[5]]),r&&e===function(e){return n(e[0]*E,e[1]*E)}(s=r(a)))return s;for(var s,l=e.children,c=0,u=l&&l.length;c<u;++c)if(s=o(l[c],t))return s}(function e(t,n){if(t.edges=function(e){for(var t=e.length,n=[],r=e[t-1],i=0;i<t;++i)n.push([r,r=e[i]]);return n}(t.face),n.face){var r=t.shared=function(e,t){for(var n,r,i=e.length,o=null,a=0;a<i;++a){n=e[a];for(var s=t.length;--s>=0;)if(r=t[s],n[0]===r[0]&&n[1]===r[1]){if(o)return[o,n];o=n}}}(t.face,n.face),i=Gt(r.map(n.project),r.map(t.project));t.transform=n.transform?Xt(n.transform,i):i;for(var o=n.edges,a=0,s=o.length;a<s;++a)en(r[0],o[a][1])&&en(r[1],o[a][0])&&(o[a]=t),en(r[0],o[a][0])&&en(r[1],o[a][1])&&(o[a]=t);for(a=0,s=(o=t.edges).length;a<s;++a)en(r[0],o[a][0])&&en(r[1],o[a][1])&&(o[a]=n),en(r[0],o[a][1])&&en(r[1],o[a][0])&&(o[a]=n)}else t.transform=n.transform;return t.children&&t.children.forEach((function(n){e(n,t)})),t})(e,{transform:null}),tn(e)&&(i.invert=function(t,n){var r=o(e,[t,-n]);return r&&(r[0]*=E,r[1]*=E,r)});var a=t.geoProjection(i),s=a.stream;return a.stream=function(t){var n=a.rotate(),r=s(t),i=(a.rotate([0,0]),s(t));return a.rotate(n),r.sphere=function(){i.polygonStart(),i.lineStart(),Qt(i,e),i.lineEnd(),i.polygonEnd()},r},a.angle(null==r?-30:r*S)}function Qt(e,n,i){var o,a,s=n.edges,l=s.length,c={type:"MultiPoint",coordinates:n.face},u=n.face.filter((function(e){return 90!==r(e[1])})),h=t.geoBounds({type:"MultiPoint",coordinates:u}),d=!1,f=-1,p=h[1][0]-h[0][0],g=180===p||360===p?[(h[0][0]+h[1][0])/2,(h[0][1]+h[1][1])/2]:t.geoCentroid(c);if(i)for(;++f<l&&s[f]!==i;);++f;for(var m=0;m<l;++m)a=s[(m+f)%l],Array.isArray(a)?(d||(e.point((o=t.geoInterpolate(a[0],g)(v))[0],o[1]),d=!0),e.point((o=t.geoInterpolate(a[1],g)(v))[0],o[1])):(d=!1,a!==i&&Qt(e,a,n))}function en(e,t){return e&&t&&e[0]===t[0]&&e[1]===t[1]}function tn(e){return e.project.invert||e.children&&e.children.some(tn)}$t.invert=function(e,t){t>Ht?t=Ht:t<-1.790857183&&(t=-1.790857183);var n,i=t;do{var o=i*i;i-=n=(i*(jt+o*o*(Ut+o*(Vt+qt*o)))-t)/(1.0148+o*o*(1.1592500000000001+o*(.21654*o-1.01493)))}while(r(n)>v);return[e,i]},Wt.invert=function(e,t){if(r(t)<v)return[e,0];var n,i=e*e+t*t,o=.5*t,s=10;do{var l=m(o),c=1/a(o),u=i-2*t*o+o*o;o-=n=(l*u+2*(o-t))/(2+u*c*c+2*(o-t)*l)}while(r(n)>v&&--s>0);return l=m(o),[(r(t)<r(o+1/l)?C(e*l):p(t)*p(e)*(M(r(e*l))+_))/g(o),o]};var nn=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],rn=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map((function(e){return e.map((function(e){return nn[e]}))}));var on=2/O(3);function an(e,t){var n=ce(e,t);return[n[0]*on,n[1]]}function sn(e,t){for(var n=0,r=e.length,i=0;n<r;++n)i+=e[n]*t[n];return i}function ln(e){return[o(e[1],e[0])*S,C(u(-1,h(1,e[2])))*S]}function cn(e){var t=e[0]*E,n=e[1]*E,r=a(n);return[r*a(t),r*g(t),g(n)]}function un(){}function hn(e,t){return{type:"FeatureCollection",features:e.features.map((function(e){return dn(e,t)}))}}function dn(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:fn(e.geometry,t)}}function fn(e,n){if(!e)return null;if("GeometryCollection"===e.type)return function(e,t){return{type:"GeometryCollection",geometries:e.geometries.map((function(e){return fn(e,t)}))}}(e,n);var r;switch(e.type){case"Point":case"MultiPoint":r=mn;break;case"LineString":case"MultiLineString":r=vn;break;case"Polygon":case"MultiPolygon":case"Sphere":r=yn;break;default:return null}return t.geoStream(e,n(r)),r.result()}an.invert=function(e,t){return ce.invert(e/on,t)};var pn=[],gn=[],mn={point:function(e,t){pn.push([e,t])},result:function(){var e=pn.length?pn.length<2?{type:"Point",coordinates:pn[0]}:{type:"MultiPoint",coordinates:pn}:null;return pn=[],e}},vn={lineStart:un,point:function(e,t){pn.push([e,t])},lineEnd:function(){pn.length&&(gn.push(pn),pn=[])},result:function(){var e=gn.length?gn.length<2?{type:"LineString",coordinates:gn[0]}:{type:"MultiLineString",coordinates:gn}:null;return gn=[],e}},yn={polygonStart:un,lineStart:un,point:function(e,t){pn.push([e,t])},lineEnd:function(){var e=pn.length;if(e){do{pn.push(pn[0].slice())}while(++e<4);gn.push(pn),pn=[]}},polygonEnd:un,result:function(){if(!gn.length)return null;var e=[],t=[];return gn.forEach((function(n){!function(e){if((t=e.length)<4)return!1;for(var t,n=0,r=e[t-1][1]*e[0][0]-e[t-1][0]*e[0][1];++n<t;)r+=e[n-1][1]*e[n][0]-e[n-1][0]*e[n][1];return r<=0}(n)?t.push(n):e.push([n])})),t.forEach((function(t){var n=t[0];e.some((function(e){if(function(e,t){for(var n=t[0],r=t[1],i=!1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],c=l[0],u=l[1],h=e[s],d=h[0],f=h[1];u>r^f>r&&n<(d-c)*(r-u)/(f-u)+c&&(i=!i)}return i}(e[0],n))return e.push(t),!0}))||e.push([t])})),gn=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function bn(e){var n=e(_,0)[0]-e(-_,0)[0];function i(t,i){var o=r(t)<_,a=e(o?t:t>0?t-b:t+b,i),s=(a[0]-a[1])*w,l=(a[0]+a[1])*w;if(o)return[s,l];var c=n*w,u=s>0^l>0?-1:1;return[u*s-p(l)*c,u*l-p(s)*c]}return e.invert&&(i.invert=function(t,i){var o=(t+i)*w,a=(i-t)*w,s=r(o)<.5*n&&r(a)<.5*n;if(!s){var l=n*w,c=o>0^a>0?-1:1,u=-c*t+(a>0?1:-1)*l,h=-c*i+(o>0?1:-1)*l;o=(-u-h)*w,a=(u-h)*w}var d=e.invert(o,a);return s||(d[0]+=o>0?b:-b),d}),t.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function _n(){return bn(Ve).scale(111.48)}function xn(e){var t=g(e);function n(n,r){var o=t?m(n*t/2)/t:n/2;if(!r)return[2*o,-e];var s=2*i(o*g(r)),l=1/m(r);return[g(s)*l,r+(1-a(s))*l-e]}return n.invert=function(n,o){if(r(o+=e)<v)return[t?2*i(t*n/2)/t:n,0];var s,l=n*n+o*o,c=0,u=10;do{var h=m(c),d=1/a(c),f=l-2*o*c+c*c;c-=s=(h*f+2*(c-o))/(2+f*d*d+2*(c-o)*h)}while(r(s)>v&&--u>0);var p=n*(h=m(c)),y=m(r(o)<r(c+1/h)?.5*C(p):.5*M(p)+b/4)/g(c);return[t?2*i(t*y)/t:2*y,c]},n}var wn=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function An(e,t){var n,i=h(18,36*r(t)/b),o=l(i),a=i-o,s=(n=wn[o])[0],c=n[1],u=(n=wn[++o])[0],d=n[1],f=(n=wn[h(19,++o)])[0],p=n[1];return[e*(u+a*(f-s)/2+a*a*(f-2*u+s)/2),(t>0?_:-_)*(d+a*(p-c)/2+a*a*(p-2*d+c)/2)]}function kn(e,t){var n=function(e){function t(t,n){var r=a(n),i=(e-1)/(e-r*a(t));return[i*r*g(t),i*g(n)]}return t.invert=function(t,n){var r=t*t+n*n,i=O(r),a=(e-O(1-r*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[o(t*a,i*O(1-a*a)),i?C(n*a/i):0]},t}(e);if(!t)return n;var r=a(t),i=g(t);function s(t,o){var a=n(t,o),s=a[1],l=s*i/(e-1)+r;return[a[0]*r/l,s/l]}return s.invert=function(t,o){var a=(e-1)/(e-1-o*i);return n.invert(a*t,a*o*r)},s}wn.forEach((function(e){e[1]*=1.0144})),An.invert=function(e,t){var n=t/_,i=90*n,o=h(18,r(i/5)),a=u(0,l(o));do{var s=wn[a][1],c=wn[a+1][1],d=wn[h(19,a+2)][1],f=d-s,p=d-2*c+s,g=2*(r(n)-c)/f,m=p/f,v=g*(1-m*g*(1-2*m*g));if(v>=0||1===a){i=(t>=0?5:-5)*(v+o);var b,x=50;do{v=(o=h(18,r(i)/5))-(a=l(o)),s=wn[a][1],c=wn[a+1][1],d=wn[h(19,a+2)][1],i-=(b=(t>=0?_:-_)*(c+v*(d-s)/2+v*v*(d-2*c+s)/2)-t)*S}while(r(b)>y&&--x>0);break}}while(--a>=0);var w=wn[a][0],A=wn[a+1][0],k=wn[h(19,a+2)][0];return[e/(A+v*(k-w)/2+v*v*(k-2*A+w)/2),i*E]};var Tn=-180,Sn=-179.9999,En=179.9999,Cn=-89.9999,Mn=89.9999;function On(e){return e.length>0}function Ln(e){return-90===e||90===e?[0,e]:[Tn,(t=e,Math.floor(1e4*t)/1e4)];var t}function Dn(e){var t=e[0],n=e[1],r=!1;return t<=Sn?(t=Tn,r=!0):t>=En&&(t=180,r=!0),n<=Cn?(n=-90,r=!0):n>=Mn&&(n=90,r=!0),r?[t,n]:e}function In(e){return e.map(Dn)}function Rn(e,t,n){for(var r=0,i=e.length;r<i;++r){var o=e[r].slice();n.push({index:-1,polygon:t,ring:o});for(var a=0,s=o.length;a<s;++a){var l=o[a],c=l[0],u=l[1];if(c<=Sn||c>=En||u<=Cn||u>=Mn){o[a]=Dn(l);for(var h=a+1;h<s;++h){var d=o[h],f=d[0],p=d[1];if(f>Sn&&f<En&&p>Cn&&p<Mn)break}if(h===a+1)continue;if(a){var g={index:-1,polygon:t,ring:o.slice(0,a+1)};g.ring[g.ring.length-1]=Ln(u),n[n.length-1]=g}else n.pop();if(h>=s)break;n.push({index:-1,polygon:t,ring:o=o.slice(h-1)}),o[0]=Ln(o[0][1]),a=-1,s=o.length}}}}function Pn(e){var t,n,r,i,o,a,s=e.length,l={},c={};for(t=0;t<s;++t)r=(n=e[t]).ring[0],o=n.ring[n.ring.length-1],r[0]!==o[0]||r[1]!==o[1]?(n.index=t,l[r]=c[o]=n):(n.polygon.push(n.ring),e[t]=null);for(t=0;t<s;++t)if(n=e[t]){if(r=n.ring[0],o=n.ring[n.ring.length-1],i=c[r],a=l[o],delete l[r],delete c[o],r[0]===o[0]&&r[1]===o[1]){n.polygon.push(n.ring);continue}i?(delete c[r],delete l[i.ring[0]],i.ring.pop(),e[i.index]=null,n={index:-1,polygon:i.polygon,ring:i.ring.concat(n.ring)},i===a?n.polygon.push(n.ring):(n.index=s++,e.push(l[n.ring[0]]=c[n.ring[n.ring.length-1]]=n))):a?(delete l[o],delete c[a.ring[a.ring.length-1]],n.ring.pop(),n={index:s++,polygon:a.polygon,ring:n.ring.concat(a.ring)},e[a.index]=null,e.push(l[n.ring[0]]=c[n.ring[n.ring.length-1]]=n)):(n.ring.push(n.ring[0]),n.polygon.push(n.ring))}}function Nn(e){var t={type:"Feature",geometry:zn(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function zn(e){if(null==e)return e;var t,n,r,i;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(zn)};break;case"Point":t={type:"Point",coordinates:Dn(e.coordinates)};break;case"MultiPoint":case"LineString":t={type:e.type,coordinates:In(e.coordinates)};break;case"MultiLineString":t={type:"MultiLineString",coordinates:e.coordinates.map(In)};break;case"Polygon":var o=[];Rn(e.coordinates,o,n=[]),Pn(n),t={type:"Polygon",coordinates:o};break;case"MultiPolygon":n=[],r=-1,i=e.coordinates.length;for(var a=new Array(i);++r<i;)Rn(e.coordinates[r],a[r]=[],n);Pn(n),t={type:"MultiPolygon",coordinates:a.filter(On)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function Fn(e,t){var n=m(t/2),r=g(x*n);return[e*(.74482-.34588*r*r),1.70711*n]}function Bn(e,n,r){var i=t.geoInterpolate(n,r),o=i(.5),a=t.geoRotation([-o[0],-o[1]])(n),s=i.distance/2,l=-C(g(a[1]*E)/g(s)),c=[-o[0],-o[1],-(a[0]>0?b-l:l)*S],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),d=u.center;return delete u.rotate,u.center=function(e){return arguments.length?d(h(e)):h.invert(d())},u.clipAngle(90)}function jn(e){var n=a(e);function r(e,r){var i=t.geoGnomonicRaw(e,r);return i[0]*=n,i}return r.invert=function(e,r){return t.geoGnomonicRaw.invert(e/n,r)},r}function Un(e,t){return Bn(jn,e,t)}function Vn(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var n=-e/2,r=-n,i=e*e,s=m(r),l=.5/g(r);function c(t,o){var s=M(a(o)*a(t-n)),l=M(a(o)*a(t-r));return[((s*=s)-(l*=l))/(2*e),(o<0?-1:1)*O(4*i*l-(i-s+l)*(i-s+l))/(2*e)]}return c.invert=function(e,t){var i,c,u=t*t,h=a(O(u+(i=e+n)*i)),d=a(O(u+(i=e+r)*i));return[o(c=h-d,i=(h+d)*s),(t<0?-1:1)*M(O(i*i+c*c)*l)]},c}function qn(e,t){return Bn(Vn,e,t)}function Hn(e,t){if(r(t)<v)return[e,0];var n=r(t/_),i=C(n);if(r(e)<v||r(r(t)-_)<v)return[0,p(t)*b*m(i/2)];var o=a(i),s=r(b/e-e/b)/2,l=s*s,c=o/(n+o-1),u=c*(2/n-1),h=u*u,d=h+l,f=c-h,g=l+c;return[p(e)*b*(s*f+O(l*f*f-d*(c*c-h)))/d,p(t)*b*(u*g-s*O((l+1)*d-g*g))/d]}function $n(e,t){if(r(t)<v)return[e,0];var n=r(t/_),i=C(n);if(r(e)<v||r(r(t)-_)<v)return[0,p(t)*b*m(i/2)];var o=a(i),s=r(b/e-e/b)/2,l=s*s,c=o*(O(1+l)-s*o)/(1+l*n*n);return[p(e)*b*c,p(t)*b*O(1-c*(2*s+c))]}function Wn(e,t){if(r(t)<v)return[e,0];var n=t/_,i=C(n);if(r(e)<v||r(r(t)-_)<v)return[0,b*m(i/2)];var o=(b/e-e/b)/2,s=n/(1+a(i));return[b*(p(e)*O(o*o+1-s*s)-o),b*s]}function Gn(e,t){if(!t)return[e,0];var n=r(t);if(!e||n===_)return[0,t];var i=n/_,o=i*i,a=(8*i-o*(o+2)-5)/(2*o*(i-1)),s=a*a,l=i*a,c=o+s+2*l,u=i+3*a,h=e/_,d=h+1/h,f=p(r(e)-_)*O(d*d-4),g=f*f,m=(f*(c+s-1)+2*O(c*(o+s*g-1)+(1-o)*(o*(u*u+4*s)+12*l*s+4*s*s)))/(4*c+g);return[p(e)*_*m,p(t)*_*O(1+f*r(m)-m*m)]}function Yn(e,t,n,r){var i=b/3;e=u(e,v),t=u(t,v),e=h(e,_),t=h(t,b-v),n=u(n,0),n=h(n,99.999999);var s=(r=u(r,v))/100,l=M((n/100+1)*a(i))/i,c=g(e)/g(l*_),d=t/b,f=O(s*g(e/2)/g(t/2));return function(e,t,n,r,i){function s(o,s){var l=n*g(r*s),c=O(1-l*l),u=O(2/(1+c*a(o*=i)));return[e*c*u*g(o),t*l*u]}return s.invert=function(a,s){var l=a/e,c=s/t,u=O(l*l+c*c),h=2*C(u/2);return[o(a*m(h),e*u)/i,u&&C(s*g(h)/(t*n*u))/r]},s}(f/O(d*c*l),1/(f*O(d*c*l)),c,l,d)}function Xn(){var e=65*E,n=60*E,r=20,i=200,o=t.geoProjectionMutator(Yn),a=o(e,n,r,i);return a.poleline=function(t){return arguments.length?o(e=+t*E,n,r,i):e*S},a.parallels=function(t){return arguments.length?o(e,n=+t*E,r,i):n*S},a.inflation=function(t){return arguments.length?o(e,n,r=+t,i):r},a.ratio=function(t){return arguments.length?o(e,n,r,i=+t):i},a.scale(163.775)}Fn.invert=function(e,t){var n=t/1.70711,r=g(x*n);return[e/(.74482-.34588*r*r),2*i(n)]},Hn.invert=function(e,t){if(r(t)<v)return[e,0];if(r(e)<v)return[0,_*g(2*i(t/b))];var n=(e/=b)*e,o=(t/=b)*t,s=n+o,l=s*s,c=-r(t)*(1+s),u=c-2*o+n,h=-2*c+1+2*o+l,d=o/h+(2*u*u*u/(h*h*h)-9*c*u/(h*h))/27,f=(c-u*u/(3*h))/h,m=2*O(-f/3),y=M(3*d/(f*m))/3;return[b*(s-1+O(1+2*(n-o)+l))/(2*e),p(t)*b*(-m*a(y+b/3)-u/(3*h))]},$n.invert=function(e,t){if(!e)return[0,_*g(2*i(t/b))];var n=r(e/b),a=(1-n*n-(t/=b)*t)/(2*n),s=O(a*a+1);return[p(e)*b*(s-a),p(t)*_*g(2*o(O((1-2*a*n)*(a+s)-n),O(s+a+n)))]},Wn.invert=function(e,t){if(!t)return[e,0];var n=t/b,r=(b*b*(1-n*n)-e*e)/(2*b*e);return[e?b*(p(e)*O(r*r+1)-r):0,_*g(2*i(n))]},Gn.invert=function(e,t){var n;if(!e||!t)return[e,t];t/=b;var i=p(e)*e/_,o=(i*i-1+4*t*t)/r(i),a=o*o,s=2*t,l=50;do{var c=s*s,u=(8*s-c*(c+2)-5)/(2*c*(s-1)),h=(3*s-c*s-10)/(2*c*s),d=u*u,f=s*u,g=s+u,m=g*g,y=s+3*u,x=-2*g*(4*f*d+(1-4*c+3*c*c)*(1+h)+d*(14*c-6-a+(8*c-8-2*a)*h)+f*(12*c-8+(10*c-10-a)*h)),w=O(m*(c+d*a-1)+(1-c)*(c*(y*y+4*d)+d*(12*f+4*d)));s-=n=(o*(m+d-1)+2*w-i*(4*m+a))/(o*(2*u*h+2*g*(1+h))+x/w-8*g*(o*(-1+d+m)+2*w)*(1+h)/(a+4*m))}while(n>v&&--l>0);return[p(e)*(O(o*o+4)+o)*b/4,_*s]};var Zn=4*b+3*O(3),Kn=2*O(2*b*O(3)/Zn),Jn=G(Kn*O(3)/b,Kn,Zn/6);function Qn(e,t){return[e*O(1-3*t*t/(b*b)),t]}function er(e,t){var n=a(t),r=a(e)*n,i=1-r,s=a(e=o(g(e)*n,-g(t))),l=g(e);return[l*(n=O(1-r*r))-s*i,-s*n-l*i]}function tr(e,t){var n=R(e,t);return[(n[0]+e/_)/2,(n[1]+t)/2]}Qn.invert=function(e,t){return[e/O(1-3*t*t/(b*b)),t]},er.invert=function(e,t){var n=(e*e+t*t)/-2,r=O(-n*(2+n)),i=t*n+e*r,a=e*n-t*r,s=O(a*a+i*i);return[o(r*i,s*(1+n)),s?-C(r*a/s):0]},tr.invert=function(e,t){var n=e,i=t,o=25;do{var s,l=a(i),c=g(i),u=g(2*i),h=c*c,d=l*l,f=g(n),p=a(n/2),m=g(n/2),y=m*m,b=1-d*p*p,x=b?M(l*p)*O(s=1/b):s=0,w=.5*(2*x*l*m+n/_)-e,A=.5*(x*c+i)-t,k=.5*s*(d*y+x*l*p*h)+.5/_,T=s*(f*u/4-x*c*m),S=.125*s*(u*m-x*c*d*f),E=.5*s*(h*p+x*y*l)+.5,C=T*S-E*k,L=(A*T-w*E)/C,D=(w*S-A*k)/C;n-=L,i-=D}while((r(L)>v||r(D)>v)&&--o>0);return[n,i]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=_,n=t.geoProjectionMutator(I),r=n(e);return r.radius=function(t){return arguments.length?n(e=t*E):e*S},r.scale(179.976).clipAngle(147)},e.geoAiryRaw=I,e.geoAitoff=function(){return t.geoProjection(R).scale(152.63)},e.geoAitoffRaw=R,e.geoArmadillo=function(){var e=20*E,n=e>=0?1:-1,r=m(n*e),i=t.geoProjectionMutator(P),s=i(e),l=s.stream;return s.parallel=function(t){return arguments.length?(r=m((n=(e=t*E)>=0?1:-1)*e),i(e)):e*S},s.stream=function(t){var i=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*n;n*t<180;t+=90*n)u.point(t,90*n);if(e)for(;n*(t-=3*n*h)>=-180;)u.point(t,n*-o(a(t*E/2),r)*S);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=P,e.geoAugust=function(){return t.geoProjection(N).scale(66.1603)},e.geoAugustRaw=N,e.geoBaker=function(){return t.geoProjection(B).scale(112.314)},e.geoBakerRaw=B,e.geoBerghaus=function(){var e=5,n=t.geoProjectionMutator(j),r=n(e),i=r.stream,s=.01,l=-a(s*E),c=g(s*E);return r.lobes=function(t){return arguments.length?n(e=+t):e},r.stream=function(t){var n=r.rotate(),u=i(t),h=(r.rotate([0,0]),i(t));return r.rotate(n),u.sphere=function(){h.polygonStart(),h.lineStart();for(var t=0,n=360/e,r=2*b/e,i=90-180/e,u=_;t<e;++t,i-=n,u-=r)h.point(o(c*a(u),l)*S,C(c*g(u))*S),i<-90?(h.point(-90,-180-i-s),h.point(-90,-180-i+s)):(h.point(90,i+s),h.point(90,i-s));h.lineEnd(),h.polygonEnd()},u},r.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},e.geoBerghausRaw=j,e.geoBertin1953=function(){return t.geoProjection($()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},e.geoBertin1953Raw=$,e.geoBoggs=function(){return t.geoProjection(K).scale(160.857)},e.geoBoggsRaw=K,e.geoBonne=function(){return J(ee).scale(123.082).center([0,26.1441]).parallel(45)},e.geoBonneRaw=ee,e.geoBottomley=function(){var e=.5,n=t.geoProjectionMutator(te),r=n(e);return r.fraction=function(t){return arguments.length?n(e=+t):e},r.scale(158.837)},e.geoBottomleyRaw=te,e.geoBromley=function(){return t.geoProjection(ne).scale(152.63)},e.geoBromleyRaw=ne,e.geoChamberlin=le,e.geoChamberlinRaw=ae,e.geoChamberlinAfrica=function(){return le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},e.geoCollignon=function(){return t.geoProjection(ce).scale(95.6464).center([0,30])},e.geoCollignonRaw=ce,e.geoCraig=function(){return J(ue).scale(249.828).clipAngle(90)},e.geoCraigRaw=ue,e.geoCraster=function(){return t.geoProjection(de).scale(156.19)},e.geoCrasterRaw=de,e.geoCylindricalEqualArea=function(){return J(fe).parallel(38.58).scale(195.044)},e.geoCylindricalEqualAreaRaw=fe,e.geoCylindricalStereographic=function(){return J(pe).scale(124.75)},e.geoCylindricalStereographicRaw=pe,e.geoEckert1=function(){return t.geoProjection(ge).scale(165.664)},e.geoEckert1Raw=ge,e.geoEckert2=function(){return t.geoProjection(me).scale(165.664)},e.geoEckert2Raw=me,e.geoEckert3=function(){return t.geoProjection(ve).scale(180.739)},e.geoEckert3Raw=ve,e.geoEckert4=function(){return t.geoProjection(ye).scale(180.739)},e.geoEckert4Raw=ye,e.geoEckert5=function(){return t.geoProjection(be).scale(173.044)},e.geoEckert5Raw=be,e.geoEckert6=function(){return t.geoProjection(_e).scale(173.044)},e.geoEckert6Raw=_e,e.geoEisenlohr=function(){return t.geoProjection(we).scale(62.5271)},e.geoEisenlohrRaw=we,e.geoFahey=function(){return t.geoProjection(ke).scale(137.152)},e.geoFaheyRaw=ke,e.geoFoucaut=function(){return t.geoProjection(Te).scale(135.264)},e.geoFoucautRaw=Te,e.geoFoucautSinusoidal=function(){var e=.5,n=t.geoProjectionMutator(Se),r=n(e);return r.alpha=function(t){return arguments.length?n(e=+t):e},r.scale(168.725)},e.geoFoucautSinusoidalRaw=Se,e.geoGilbert=function(e){null==e&&(e=t.geoOrthographic);var n=e(),r=t.geoEquirectangular().scale(S).precision(0).clipAngle(null).translate([0,0]);function i(e){return n(Ee(e))}function o(e){i[e]=function(){return arguments.length?(n[e].apply(n,arguments),i):n[e]()}}return n.invert&&(i.invert=function(e){return Ce(n.invert(e))}),i.stream=function(e){var t=n.stream(e),i=r.stream({point:function(e,n){t.point(e/2,C(m(-n/2*E))*S)},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}});return i.sphere=t.sphere,i},i.rotate=function(e){return arguments.length?(r.rotate(e),i):r.rotate()},i.center=function(e){return arguments.length?(n.center(Ee(e)),i):Ce(n.center())},o("angle"),o("clipAngle"),o("clipExtent"),o("fitExtent"),o("fitHeight"),o("fitSize"),o("fitWidth"),o("scale"),o("translate"),o("precision"),i.scale(249.5)},e.geoGingery=function(){var e=6,n=30*E,r=a(n),i=g(n),s=t.geoProjectionMutator(Me),l=s(n,e),c=l.stream,u=-a(.01*E),h=g(.01*E);return l.radius=function(t){return arguments.length?(r=a(n=t*E),i=g(n),s(n,e)):n*S},l.lobes=function(t){return arguments.length?s(n,e=+t):e},l.stream=function(t){var n=l.rotate(),s=c(t),d=(l.rotate([0,0]),c(t));return l.rotate(n),s.sphere=function(){d.polygonStart(),d.lineStart();for(var t=0,n=2*b/e,s=0;t<e;++t,s-=n)d.point(o(h*a(s),u)*S,C(h*g(s))*S),d.point(o(i*a(s-n/2),r)*S,C(i*g(s-n/2))*S);d.lineEnd(),d.polygonEnd()},s},l.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},e.geoGingeryRaw=Me,e.geoGinzburg4=function(){return t.geoProjection(Ie).scale(149.995)},e.geoGinzburg4Raw=Ie,e.geoGinzburg5=function(){return t.geoProjection(Re).scale(153.93)},e.geoGinzburg5Raw=Re,e.geoGinzburg6=function(){return t.geoProjection(Pe).scale(130.945)},e.geoGinzburg6Raw=Pe,e.geoGinzburg8=function(){return t.geoProjection(Ne).scale(131.747)},e.geoGinzburg8Raw=Ne,e.geoGinzburg9=function(){return t.geoProjection(ze).scale(131.087)},e.geoGinzburg9Raw=ze,e.geoGringorten=function(){return t.geoProjection(Fe(Be)).scale(239.75)},e.geoGringortenRaw=Be,e.geoGuyou=function(){return t.geoProjection(Fe(Ve)).scale(151.496)},e.geoGuyouRaw=Ve,e.geoHammer=function(){var e=2,n=t.geoProjectionMutator(U),r=n(e);return r.coefficient=function(t){return arguments.length?n(e=+t):e},r.scale(169.529)},e.geoHammerRaw=U,e.geoHammerRetroazimuthal=function(){var e=0,n=t.geoProjectionMutator(qe),r=n(e),i=r.rotate,o=r.stream,a=t.geoCircle();return r.parallel=function(t){if(!arguments.length)return e*S;var i=r.rotate();return n(e=t*E).rotate(i)},r.rotate=function(t){return arguments.length?(i.call(r,[t[0],t[1]-e*S]),a.center([-t[0],-t[1]]),r):((t=i.call(r))[1]+=e*S,t)},r.stream=function(e){return(e=o(e)).sphere=function(){e.polygonStart();var t,n=a.radius(89.99)().coordinates[0],r=n.length-1,i=-1;for(e.lineStart();++i<r;)e.point((t=n[i])[0],t[1]);for(e.lineEnd(),r=(n=a.radius(90.01)().coordinates[0]).length-1,e.lineStart();--i>=0;)e.point((t=n[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},r.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=qe,e.geoHealpix=function(){var e=4,r=t.geoProjectionMutator(Ge),i=r(e),o=i.stream;return i.lobes=function(t){return arguments.length?r(e=+t):e},i.stream=function(r){var a=i.rotate(),s=o(r),l=(i.rotate([0,0]),o(r));return i.rotate(a),s.sphere=function(){var r,i;t.geoStream((r=180/e,i=[].concat(n.range(-180,180+r/2,r).map(Ye),n.range(180,-180-r/2,-r).map(Xe)),{type:"Polygon",coordinates:[180===r?i.map(Ze):i]}),l)},s},i.scale(239.75)},e.geoHealpixRaw=Ge,e.geoHill=function(){var e=1,n=t.geoProjectionMutator(Ke),r=n(e);return r.ratio=function(t){return arguments.length?n(e=+t):e},r.scale(167.774).center([0,18.67])},e.geoHillRaw=Ke,e.geoHomolosine=function(){return t.geoProjection(tt).scale(152.63)},e.geoHomolosineRaw=tt,e.geoHufnagel=function(){var e=1,n=0,r=45*E,i=2,o=t.geoProjectionMutator(nt),a=o(e,n,r,i);return a.a=function(t){return arguments.length?o(e=+t,n,r,i):e},a.b=function(t){return arguments.length?o(e,n=+t,r,i):n},a.psiMax=function(t){return arguments.length?o(e,n,r=+t*E,i):r*S},a.ratio=function(t){return arguments.length?o(e,n,r,i=+t):i},a.scale(180.739)},e.geoHufnagelRaw=nt,e.geoHyperelliptical=function(){var e=0,n=2.5,r=1.183136,i=t.geoProjectionMutator(ot),o=i(e,n,r);return o.alpha=function(t){return arguments.length?i(e=+t,n,r):e},o.k=function(t){return arguments.length?i(e,n=+t,r):n},o.gamma=function(t){return arguments.length?i(e,n,r=+t):r},o.scale(152.63)},e.geoHyperellipticalRaw=ot,e.geoInterrupt=ct,e.geoInterruptedBoggs=function(){return ct(K,ut).scale(160.857)},e.geoInterruptedHomolosine=function(){return ct(tt,ht).scale(152.63)},e.geoInterruptedMollweide=function(){return ct(Y,dt).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return ct(Y,ft).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return ct(et,pt,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return ct(Q,gt).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(mt).scale(158.837)},e.geoKavrayskiy7Raw=mt,e.geoLagrange=function(){var e=.5,n=t.geoProjectionMutator(vt),r=n(e);return r.spacing=function(t){return arguments.length?n(e=+t):e},r.scale(124.75)},e.geoLagrangeRaw=vt,e.geoLarrivee=function(){return t.geoProjection(bt).scale(97.2672)},e.geoLarriveeRaw=bt,e.geoLaskowski=function(){return t.geoProjection(_t).scale(139.98)},e.geoLaskowskiRaw=_t,e.geoLittrow=function(){return t.geoProjection(xt).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=xt,e.geoLoximuthal=function(){return J(wt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=wt,e.geoMiller=function(){return t.geoProjection(At).scale(108.318)},e.geoMillerRaw=At,e.geoModifiedStereographic=Ot,e.geoModifiedStereographicRaw=kt,e.geoModifiedStereographicAlaska=function(){return Ot(Tt,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return Ot(St,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return Ot(Et,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return Ot(Ct,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return Ot(Mt,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(Y).scale(169.529)},e.geoMollweideRaw=Y,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(It).scale(164.859)},e.geoMtFlatPolarParabolicRaw=It,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(Rt).scale(188.209)},e.geoMtFlatPolarQuarticRaw=Rt,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(Pt).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=Pt,e.geoNaturalEarth2=function(){return t.geoProjection(Nt).scale(175.295)},e.geoNaturalEarth2Raw=Nt,e.geoNellHammer=function(){return t.geoProjection(zt).scale(152.63)},e.geoNellHammerRaw=zt,e.geoInterruptedQuarticAuthalic=function(){return ct(U(1/0),Ft).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(Bt).scale(127.267)},e.geoNicolosiRaw=Bt,e.geoPatterson=function(){return t.geoProjection($t).scale(139.319)},e.geoPattersonRaw=$t,e.geoPolyconic=function(){return t.geoProjection(Wt).scale(103.74)},e.geoPolyconicRaw=Wt,e.geoPolyhedral=Jt,e.geoPolyhedralButterfly=function(e){e=e||function(e){var n=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var n=rn.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var r=n[e];r&&(r.children||(r.children=[])).push(n[t])})),Jt(n[0],(function(e,t){return n[e<-b/2?t<0?6:4:e<0?t<0?2:0:e<b/2?t<0?3:1:t<0?7:5]})).angle(-30).scale(101.858).center([0,45])},e.geoPolyhedralCollignon=function(e){e=e||function(e){var n=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoProjection(an).translate([0,0]).scale(1).rotate(n[1]>0?[-n[0],0]:[180-n[0],180])};var n=rn.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var r=n[e];r&&(r.children||(r.children=[])).push(n[t])})),Jt(n[0],(function(e,t){return n[e<-b/2?t<0?6:4:e<0?t<0?2:0:e<b/2?t<0?3:1:t<0?7:5]})).angle(-30).scale(121.906).center([0,48.5904])},e.geoPolyhedralWaterman=function(e){e=e||function(e){var n=6===e.length?t.geoCentroid({type:"MultiPoint",coordinates:e}):e[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-n[0],-n[1]])};var n=rn.map((function(e){for(var t,n=e.map(cn),r=n.length,i=n[r-1],o=[],a=0;a<r;++a)t=n[a],o.push(ln([.9486832980505138*i[0]+.31622776601683794*t[0],.9486832980505138*i[1]+.31622776601683794*t[1],.9486832980505138*i[2]+.31622776601683794*t[2]]),ln([.9486832980505138*t[0]+.31622776601683794*i[0],.9486832980505138*t[1]+.31622776601683794*i[1],.9486832980505138*t[2]+.31622776601683794*i[2]])),i=t;return o})),r=[],i=[-1,0,0,1,0,1,4,5];n.forEach((function(e,t){for(var o=rn[t],a=o.length,s=r[t]=[],l=0;l<a;++l)n.push([o[l],e[(2*l+2)%(2*a)],e[(2*l+1)%(2*a)]]),i.push(t),s.push((c=cn(e[(2*l+2)%(2*a)]),u=cn(e[(2*l+1)%(2*a)]),[c[1]*u[2]-c[2]*u[1],c[2]*u[0]-c[0]*u[2],c[0]*u[1]-c[1]*u[0]]));var c,u}));var o=n.map((function(t){return{project:e(t),face:t}}));return i.forEach((function(e,t){var n=o[e];n&&(n.children||(n.children=[])).push(o[t])})),Jt(o[0],(function(e,t){var n=a(t),i=[n*a(e),n*g(e),g(t)],s=e<-b/2?t<0?6:4:e<0?t<0?2:0:e<b/2?t<0?3:1:t<0?7:5,l=r[s];return o[sn(l[0],i)<0?8+3*s:sn(l[1],i)<0?8+3*s+1:sn(l[2],i)<0?8+3*s+2:s]})).angle(-30).scale(110.625).center([0,45])},e.geoProject=function(e,t){var n,r=t.stream;if(!r)throw new Error("invalid projection");switch(e&&e.type){case"Feature":n=dn;break;case"FeatureCollection":n=hn;break;default:n=fn}return n(e,r)},e.geoGringortenQuincuncial=function(){return bn(Be).scale(176.423)},e.geoPeirceQuincuncial=_n,e.geoPierceQuincuncial=_n,e.geoQuantize=function(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function n(e){var n=e.length,r=2,i=new Array(n);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);r<n;)i[r]=e[r],++r;return i}function r(e){return e.map(n)}function i(e){for(var t=n(e[0]),r=[t],i=1;i<e.length;i++){var o=n(e[i]);(o.length>2||o[0]!=t[0]||o[1]!=t[1])&&(r.push(o),t=o)}return 1===r.length&&e.length>1&&r.push(n(e[e.length-1])),r}function o(e){return e.map(i)}function a(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:n(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:r(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:o(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(o)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return a(e)}return e},e.geoQuincuncial=bn,e.geoRectangularPolyconic=function(){return J(xn).scale(131.215)},e.geoRectangularPolyconicRaw=xn,e.geoRobinson=function(){return t.geoProjection(An).scale(152.63)},e.geoRobinsonRaw=An,e.geoSatellite=function(){var e=2,n=0,r=t.geoProjectionMutator(kn),i=r(e,n);return i.distance=function(t){return arguments.length?r(e=+t,n):e},i.tilt=function(t){return arguments.length?r(e,n=t*E):n*S},i.scale(432.147).clipAngle(M(1/e)*S-1e-6)},e.geoSatelliteRaw=kn,e.geoSinuMollweide=function(){return t.geoProjection(et).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=et,e.geoSinusoidal=function(){return t.geoProjection(Q).scale(152.63)},e.geoSinusoidalRaw=Q,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return Nn(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(Nn)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return zn(e)}},e.geoTimes=function(){return t.geoProjection(Fn).scale(146.153)},e.geoTimesRaw=Fn,e.geoTwoPointAzimuthal=Un,e.geoTwoPointAzimuthalRaw=jn,e.geoTwoPointAzimuthalUsa=function(){return Un([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=qn,e.geoTwoPointEquidistantRaw=Vn,e.geoTwoPointEquidistantUsa=function(){return qn([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(Hn).scale(79.4183)},e.geoVanDerGrintenRaw=Hn,e.geoVanDerGrinten2=function(){return t.geoProjection($n).scale(79.4183)},e.geoVanDerGrinten2Raw=$n,e.geoVanDerGrinten3=function(){return t.geoProjection(Wn).scale(79.4183)},e.geoVanDerGrinten3Raw=Wn,e.geoVanDerGrinten4=function(){return t.geoProjection(Gn).scale(127.16)},e.geoVanDerGrinten4Raw=Gn,e.geoWagner=Xn,e.geoWagner7=function(){return Xn().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=Yn,e.geoWagner4=function(){return t.geoProjection(Jn).scale(176.84)},e.geoWagner4Raw=Jn,e.geoWagner6=function(){return t.geoProjection(Qn).scale(152.63)},e.geoWagner6Raw=Qn,e.geoWiechel=function(){return t.geoProjection(er).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=er,e.geoWinkel3=function(){return t.geoProjection(tr).scale(158.837)},e.geoWinkel3Raw=tr,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-geo"),e("d3-array")):i(r.d3=r.d3||{},r.d3,r.d3)},{"d3-array":107,"d3-geo":114}],114:[function(e,t,n){var r,i;r=this,i=function(e,t){"use strict";function n(){return new r}function r(){this.reset()}r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(e){o(i,e,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(e,t,n){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}var a=1e-6,s=1e-12,l=Math.PI,c=l/2,u=l/4,h=2*l,d=180/l,f=l/180,p=Math.abs,g=Math.atan,m=Math.atan2,v=Math.cos,y=Math.ceil,b=Math.exp,_=Math.log,x=Math.pow,w=Math.sin,A=Math.sign||function(e){return e>0?1:e<0?-1:0},k=Math.sqrt,T=Math.tan;function S(e){return e>1?0:e<-1?l:Math.acos(e)}function E(e){return e>1?c:e<-1?-c:Math.asin(e)}function C(e){return(e=w(e/2))*e}function M(){}function O(e,t){e&&D.hasOwnProperty(e.type)&&D[e.type](e,t)}var L={Feature:function(e,t){O(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)O(n[r].geometry,t)}},D={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){I(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)I(n[r],t,0)},Polygon:function(e,t){R(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)R(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)O(n[r],t)}};function I(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function R(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)I(e[n],t,1);t.polygonEnd()}function P(e,t){e&&L.hasOwnProperty(e.type)?L[e.type](e,t):O(e,t)}var N,z,F,B,j,U=n(),V=n(),q={point:M,lineStart:M,lineEnd:M,polygonStart:function(){U.reset(),q.lineStart=H,q.lineEnd=$},polygonEnd:function(){var e=+U;V.add(e<0?h+e:e),this.lineStart=this.lineEnd=this.point=M},sphere:function(){V.add(h)}};function H(){q.point=W}function $(){G(N,z)}function W(e,t){q.point=G,N=e,z=t,F=e*=f,B=v(t=(t*=f)/2+u),j=w(t)}function G(e,t){var n=(e*=f)-F,r=n>=0?1:-1,i=r*n,o=v(t=(t*=f)/2+u),a=w(t),s=j*a,l=B*o+s*v(i),c=s*r*w(i);U.add(m(c,l)),F=e,B=o,j=a}function Y(e){return[m(e[1],e[0]),E(e[2])]}function X(e){var t=e[0],n=e[1],r=v(n);return[r*v(t),r*w(t),w(n)]}function Z(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function K(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function J(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Q(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ee(e){var t=k(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var te,ne,re,ie,oe,ae,se,le,ce,ue,he,de,fe,pe,ge,me,ve,ye,be,_e,xe,we,Ae,ke,Te,Se,Ee=n(),Ce={point:Me,lineStart:Le,lineEnd:De,polygonStart:function(){Ce.point=Ie,Ce.lineStart=Re,Ce.lineEnd=Pe,Ee.reset(),q.polygonStart()},polygonEnd:function(){q.polygonEnd(),Ce.point=Me,Ce.lineStart=Le,Ce.lineEnd=De,U<0?(te=-(re=180),ne=-(ie=90)):Ee>a?ie=90:Ee<-a&&(ne=-90),ue[0]=te,ue[1]=re},sphere:function(){te=-(re=180),ne=-(ie=90)}};function Me(e,t){ce.push(ue=[te=e,re=e]),t<ne&&(ne=t),t>ie&&(ie=t)}function Oe(e,t){var n=X([e*f,t*f]);if(le){var r=K(le,n),i=K([r[1],-r[0],0],r);ee(i),i=Y(i);var o,a=e-oe,s=a>0?1:-1,l=i[0]*d*s,c=p(a)>180;c^(s*oe<l&&l<s*e)?(o=i[1]*d)>ie&&(ie=o):c^(s*oe<(l=(l+360)%360-180)&&l<s*e)?(o=-i[1]*d)<ne&&(ne=o):(t<ne&&(ne=t),t>ie&&(ie=t)),c?e<oe?Ne(te,e)>Ne(te,re)&&(re=e):Ne(e,re)>Ne(te,re)&&(te=e):re>=te?(e<te&&(te=e),e>re&&(re=e)):e>oe?Ne(te,e)>Ne(te,re)&&(re=e):Ne(e,re)>Ne(te,re)&&(te=e)}else ce.push(ue=[te=e,re=e]);t<ne&&(ne=t),t>ie&&(ie=t),le=n,oe=e}function Le(){Ce.point=Oe}function De(){ue[0]=te,ue[1]=re,Ce.point=Me,le=null}function Ie(e,t){if(le){var n=e-oe;Ee.add(p(n)>180?n+(n>0?360:-360):n)}else ae=e,se=t;q.point(e,t),Oe(e,t)}function Re(){q.lineStart()}function Pe(){Ie(ae,se),q.lineEnd(),p(Ee)>a&&(te=-(re=180)),ue[0]=te,ue[1]=re,le=null}function Ne(e,t){return(t-=e)<0?t+360:t}function ze(e,t){return e[0]-t[0]}function Fe(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var Be={sphere:M,point:je,lineStart:Ve,lineEnd:$e,polygonStart:function(){Be.lineStart=We,Be.lineEnd=Ge},polygonEnd:function(){Be.lineStart=Ve,Be.lineEnd=$e}};function je(e,t){e*=f;var n=v(t*=f);Ue(n*v(e),n*w(e),w(t))}function Ue(e,t,n){++he,fe+=(e-fe)/he,pe+=(t-pe)/he,ge+=(n-ge)/he}function Ve(){Be.point=qe}function qe(e,t){e*=f;var n=v(t*=f);ke=n*v(e),Te=n*w(e),Se=w(t),Be.point=He,Ue(ke,Te,Se)}function He(e,t){e*=f;var n=v(t*=f),r=n*v(e),i=n*w(e),o=w(t),a=m(k((a=Te*o-Se*i)*a+(a=Se*r-ke*o)*a+(a=ke*i-Te*r)*a),ke*r+Te*i+Se*o);de+=a,me+=a*(ke+(ke=r)),ve+=a*(Te+(Te=i)),ye+=a*(Se+(Se=o)),Ue(ke,Te,Se)}function $e(){Be.point=je}function We(){Be.point=Ye}function Ge(){Xe(we,Ae),Be.point=je}function Ye(e,t){we=e,Ae=t,e*=f,t*=f,Be.point=Xe;var n=v(t);ke=n*v(e),Te=n*w(e),Se=w(t),Ue(ke,Te,Se)}function Xe(e,t){e*=f;var n=v(t*=f),r=n*v(e),i=n*w(e),o=w(t),a=Te*o-Se*i,s=Se*r-ke*o,l=ke*i-Te*r,c=k(a*a+s*s+l*l),u=E(c),h=c&&-u/c;be+=h*a,_e+=h*s,xe+=h*l,de+=u,me+=u*(ke+(ke=r)),ve+=u*(Te+(Te=i)),ye+=u*(Se+(Se=o)),Ue(ke,Te,Se)}function Ze(e){return function(){return e}}function Ke(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Je(e,t){return[p(e)>l?e+Math.round(-e/h)*h:e,t]}function Qe(e,t,n){return(e%=h)?t||n?Ke(tt(e),nt(t,n)):tt(e):t||n?nt(t,n):Je}function et(e){return function(t,n){return[(t+=e)>l?t-h:t<-l?t+h:t,n]}}function tt(e){var t=et(e);return t.invert=et(-e),t}function nt(e,t){var n=v(e),r=w(e),i=v(t),o=w(t);function a(e,t){var a=v(t),s=v(e)*a,l=w(e)*a,c=w(t),u=c*n+s*r;return[m(l*i-u*o,s*n-c*r),E(u*i+l*o)]}return a.invert=function(e,t){var a=v(t),s=v(e)*a,l=w(e)*a,c=w(t),u=c*i-l*o;return[m(l*i+c*o,s*n+u*r),E(u*n-s*r)]},a}function rt(e){function t(t){return(t=e(t[0]*f,t[1]*f))[0]*=d,t[1]*=d,t}return e=Qe(e[0]*f,e[1]*f,e.length>2?e[2]*f:0),t.invert=function(t){return(t=e.invert(t[0]*f,t[1]*f))[0]*=d,t[1]*=d,t},t}function it(e,t,n,r,i,o){if(n){var a=v(t),s=w(t),l=r*n;null==i?(i=t+r*h,o=t-l/2):(i=ot(a,i),o=ot(a,o),(r>0?i<o:i>o)&&(i+=r*h));for(var c,u=i;r>0?u>o:u<o;u-=l)c=Y([a,-s*v(u),-s*w(u)]),e.point(c[0],c[1])}}function ot(e,t){(t=X(t))[0]-=e,ee(t);var n=S(-t[1]);return((-t[2]<0?-n:n)+h-a)%h}function at(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:M,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function st(e,t){return p(e[0]-t[0])<a&&p(e[1]-t[1])<a}function lt(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function ct(e,t,n,r,i){var o,a,s=[],l=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],a=e[t];if(st(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<t;++o)i.point((r=e[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new lt(r,e,null,!0)),l.push(n.o=new lt(r,null,n,!1)),s.push(n=new lt(a,e,null,!1)),l.push(n.o=new lt(a,null,n,!0))}})),s.length){for(l.sort(t),ut(s),ut(l),o=0,a=l.length;o<a;++o)l[o].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,a=c.length;o<a;++o)i.point((u=c[o])[0],u[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(c=d.p.z,o=c.length-1;o>=0;--o)i.point((u=c[o])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function ut(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}Je.invert=Je;var ht=n();function dt(e){return p(e[0])<=l?e[0]:A(e[0])*((p(e[0])+l)%h-l)}function ft(e,t){var n=dt(t),r=t[1],i=w(r),o=[w(n),-v(n),0],s=0,d=0;ht.reset(),1===i?r=c+a:-1===i&&(r=-c-a);for(var f=0,p=e.length;f<p;++f)if(y=(g=e[f]).length)for(var g,y,b=g[y-1],_=dt(b),x=b[1]/2+u,A=w(x),k=v(x),T=0;T<y;++T,_=C,A=O,k=L,b=S){var S=g[T],C=dt(S),M=S[1]/2+u,O=w(M),L=v(M),D=C-_,I=D>=0?1:-1,R=I*D,P=R>l,N=A*O;if(ht.add(m(N*I*w(R),k*L+N*v(R))),s+=P?D+I*h:D,P^_>=n^C>=n){var z=K(X(b),X(S));ee(z);var F=K(o,z);ee(F);var B=(P^D>=0?-1:1)*E(F[2]);(r>B||r===B&&(z[0]||z[1]))&&(d+=P^D>=0?1:-1)}}return(s<-a||s<a&&ht<-a)^1&d}function pt(e,n,r,i){return function(o){var a,s,l,c=n(o),u=at(),h=n(u),d=!1,f={point:p,lineStart:m,lineEnd:v,polygonStart:function(){f.point=y,f.lineStart=b,f.lineEnd=_,s=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=m,f.lineEnd=v,s=t.merge(s);var e=ft(a,i);s.length?(d||(o.polygonStart(),d=!0),ct(s,mt,e,r,o)):e&&(d||(o.polygonStart(),d=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),d&&(o.polygonEnd(),d=!1),s=a=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(t,n){e(t,n)&&o.point(t,n)}function g(e,t){c.point(e,t)}function m(){f.point=g,c.lineStart()}function v(){f.point=p,c.lineEnd()}function y(e,t){l.push([e,t]),h.point(e,t)}function b(){h.lineStart(),l=[]}function _(){y(l[0][0],l[0][1]),h.lineEnd();var e,t,n,r,i=h.clean(),c=u.result(),f=c.length;if(l.pop(),a.push(l),l=null,f)if(1&i){if((t=(n=c[0]).length-1)>0){for(d||(o.polygonStart(),d=!0),o.lineStart(),e=0;e<t;++e)o.point((r=n[e])[0],r[1]);o.lineEnd()}}else f>1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(gt))}return f}}function gt(e){return e.length>1}function mt(e,t){return((e=e.x)[0]<0?e[1]-c-a:c-e[1])-((t=t.x)[0]<0?t[1]-c-a:c-t[1])}var vt=pt((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var u=o>0?l:-l,h=p(o-n);p(h-l)<a?(e.point(n,r=(r+s)/2>0?c:-c),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(o,r),t=0):i!==u&&h>=l&&(p(n-i)<a&&(n-=i*a),p(o-u)<a&&(o-=u*a),r=function(e,t,n,r){var i,o,s=w(e-n);return p(s)>a?g((w(t)*(o=v(r))*w(n)-w(r)*(i=v(t))*w(e))/(i*o*s)):(t+r)/2}(n,r,o,s),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),t=0),e.point(n=o,r=s),i=u},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*c,r.point(-l,i),r.point(0,i),r.point(l,i),r.point(l,0),r.point(l,-i),r.point(0,-i),r.point(-l,-i),r.point(-l,0),r.point(-l,i);else if(p(e[0]-t[0])>a){var o=e[0]<t[0]?l:-l;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-l,-c]);function yt(e){var t=v(e),n=6*f,r=t>0,i=p(t)>a;function o(e,n){return v(e)*v(n)>t}function s(e,n,r){var i=[1,0,0],o=K(X(e),X(n)),s=Z(o,o),c=o[0],u=s-c*c;if(!u)return!r&&e;var h=t*s/u,d=-t*c/u,f=K(i,o),g=Q(i,h);J(g,Q(o,d));var m=f,v=Z(g,m),y=Z(m,m),b=v*v-y*(Z(g,g)-1);if(!(b<0)){var _=k(b),x=Q(m,(-v-_)/y);if(J(x,g),x=Y(x),!r)return x;var w,A=e[0],T=n[0],S=e[1],E=n[1];T<A&&(w=A,A=T,T=w);var C=T-A,M=p(C-l)<a;if(!M&&E<S&&(w=S,S=E,E=w),M||C<a?M?S+E>0^x[1]<(p(x[0]-A)<a?S:E):S<=x[1]&&x[1]<=E:C>l^(A<=x[0]&&x[0]<=T)){var O=Q(m,(-v+_)/y);return J(O,g),[x,Y(O)]}}}function c(t,n){var i=r?e:l-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return pt(o,(function(e){var t,n,a,u,h;return{lineStart:function(){u=a=!1,h=1},point:function(d,f){var p,g=[d,f],m=o(d,f),v=r?m?0:c(d,f):m?c(d+(d<0?l:-l),f):0;if(!t&&(u=a=m)&&e.lineStart(),m!==a&&(!(p=s(t,g))||st(t,p)||st(g,p))&&(g[2]=1),m!==a)h=0,m?(e.lineStart(),p=s(g,t),e.point(p[0],p[1])):(p=s(t,g),e.point(p[0],p[1],2),e.lineEnd()),t=p;else if(i&&t&&r^m){var y;v&n||!(y=s(g,t,!0))||(h=0,r?(e.lineStart(),e.point(y[0][0],y[0][1]),e.point(y[1][0],y[1][1]),e.lineEnd()):(e.point(y[1][0],y[1][1]),e.lineEnd(),e.lineStart(),e.point(y[0][0],y[0][1],3)))}!m||t&&st(t,g)||e.point(g[0],g[1]),t=g,a=m,n=v},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return h|(u&&a)<<1}}}),(function(t,r,i,o){it(o,e,n,i,t,r)}),r?[0,-e]:[-l,e-l])}var bt=1e9,_t=-bt;function xt(e,n,r,i){function o(t,o){return e<=t&&t<=r&&n<=o&&o<=i}function s(t,o,a,s){var c=0,h=0;if(null==t||(c=l(t,a))!==(h=l(o,a))||u(t,o)<0^a>0)do{s.point(0===c||3===c?e:r,c>1?i:n)}while((c=(c+a+4)%4)!==h);else s.point(o[0],o[1])}function l(t,i){return p(t[0]-e)<a?i>0?0:3:p(t[0]-r)<a?i>0?2:1:p(t[1]-n)<a?i>0?1:0:i>0?3:2}function c(e,t){return u(e.x,t.x)}function u(e,t){var n=l(e,1),r=l(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var l,u,h,d,f,p,g,m,v,y,b,_=a,x=at(),w={point:A,lineStart:function(){w.point=k,u&&u.push(h=[]),y=!0,v=!1,g=m=NaN},lineEnd:function(){l&&(k(d,f),p&&v&&x.rejoin(),l.push(x.result())),w.point=A,v&&_.lineEnd()},polygonStart:function(){_=x,l=[],u=[],b=!0},polygonEnd:function(){var n=function(){for(var t=0,n=0,r=u.length;n<r;++n)for(var o,a,s=u[n],l=1,c=s.length,h=s[0],d=h[0],f=h[1];l<c;++l)o=d,a=f,d=(h=s[l])[0],f=h[1],a<=i?f>i&&(d-o)*(i-a)>(f-a)*(e-o)&&++t:f<=i&&(d-o)*(i-a)<(f-a)*(e-o)&&--t;return t}(),r=b&&n,o=(l=t.merge(l)).length;(r||o)&&(a.polygonStart(),r&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),o&&ct(l,c,n,s,a),a.polygonEnd()),_=a,l=u=h=null}};function A(e,t){o(e,t)&&_.point(e,t)}function k(t,a){var s=o(t,a);if(u&&h.push([t,a]),y)d=t,f=a,p=s,y=!1,s&&(_.lineStart(),_.point(t,a));else if(s&&v)_.point(t,a);else{var l=[g=Math.max(_t,Math.min(bt,g)),m=Math.max(_t,Math.min(bt,m))],c=[t=Math.max(_t,Math.min(bt,t)),a=Math.max(_t,Math.min(bt,a))];!function(e,t,n,r,i,o){var a,s=e[0],l=e[1],c=0,u=1,h=t[0]-s,d=t[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>c&&(c=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<u&&(u=a)}if(a=r-l,d||!(a>0)){if(a/=d,d<0){if(a<c)return;a<u&&(u=a)}else if(d>0){if(a>u)return;a>c&&(c=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a<c)return;a<u&&(u=a)}return c>0&&(e[0]=s+c*h,e[1]=l+c*d),u<1&&(t[0]=s+u*h,t[1]=l+u*d),!0}}}}}(l,c,e,n,r,i)?s&&(_.lineStart(),_.point(t,a),b=!1):(v||(_.lineStart(),_.point(l[0],l[1])),_.point(c[0],c[1]),s||_.lineEnd(),b=!1)}g=t,m=a,v=s}return w}}var wt,At,kt,Tt=n(),St={sphere:M,point:M,lineStart:function(){St.point=Ct,St.lineEnd=Et},lineEnd:M,polygonStart:M,polygonEnd:M};function Et(){St.point=St.lineEnd=M}function Ct(e,t){wt=e*=f,At=w(t*=f),kt=v(t),St.point=Mt}function Mt(e,t){e*=f;var n=w(t*=f),r=v(t),i=p(e-wt),o=v(i),a=r*w(i),s=kt*n-At*r*o,l=At*n+kt*r*o;Tt.add(m(k(a*a+s*s),l)),wt=e,At=n,kt=r}function Ot(e){return Tt.reset(),P(e,St),+Tt}var Lt=[null,null],Dt={type:"LineString",coordinates:Lt};function It(e,t){return Lt[0]=e,Lt[1]=t,Ot(Dt)}var Rt={Feature:function(e,t){return Nt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Nt(n[r].geometry,t))return!0;return!1}},Pt={Sphere:function(){return!0},Point:function(e,t){return zt(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(zt(n[r],t))return!0;return!1},LineString:function(e,t){return Ft(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Ft(n[r],t))return!0;return!1},Polygon:function(e,t){return Bt(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Bt(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Nt(n[r],t))return!0;return!1}};function Nt(e,t){return!(!e||!Pt.hasOwnProperty(e.type))&&Pt[e.type](e,t)}function zt(e,t){return 0===It(e,t)}function Ft(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(0===(r=It(e[o],t)))return!0;if(o>0&&(i=It(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<s*i)return!0;n=r}return!1}function Bt(e,t){return!!ft(e.map(jt),Ut(t))}function jt(e){return(e=e.map(Ut)).pop(),e}function Ut(e){return[e[0]*f,e[1]*f]}function Vt(e,n,r){var i=t.range(e,n-a,r).concat(n);return function(e){return i.map((function(t){return[e,t]}))}}function qt(e,n,r){var i=t.range(e,n-a,r).concat(n);return function(e){return i.map((function(t){return[t,e]}))}}function Ht(){var e,n,r,i,o,s,l,c,u,h,d,f,g=10,m=g,v=90,b=360,_=2.5;function x(){return{type:"MultiLineString",coordinates:w()}}function w(){return t.range(y(i/v)*v,r,v).map(d).concat(t.range(y(c/b)*b,l,b).map(f)).concat(t.range(y(n/g)*g,e,g).filter((function(e){return p(e%v)>a})).map(u)).concat(t.range(y(s/m)*m,o,m).filter((function(e){return p(e%b)>a})).map(h))}return x.lines=function(){return w().map((function(e){return{type:"LineString",coordinates:e}}))},x.outline=function(){return{type:"Polygon",coordinates:[d(i).concat(f(l).slice(1),d(r).reverse().slice(1),f(c).reverse().slice(1))]}},x.extent=function(e){return arguments.length?x.extentMajor(e).extentMinor(e):x.extentMinor()},x.extentMajor=function(e){return arguments.length?(i=+e[0][0],r=+e[1][0],c=+e[0][1],l=+e[1][1],i>r&&(e=i,i=r,r=e),c>l&&(e=c,c=l,l=e),x.precision(_)):[[i,c],[r,l]]},x.extentMinor=function(t){return arguments.length?(n=+t[0][0],e=+t[1][0],s=+t[0][1],o=+t[1][1],n>e&&(t=n,n=e,e=t),s>o&&(t=s,s=o,o=t),x.precision(_)):[[n,s],[e,o]]},x.step=function(e){return arguments.length?x.stepMajor(e).stepMinor(e):x.stepMinor()},x.stepMajor=function(e){return arguments.length?(v=+e[0],b=+e[1],x):[v,b]},x.stepMinor=function(e){return arguments.length?(g=+e[0],m=+e[1],x):[g,m]},x.precision=function(t){return arguments.length?(_=+t,u=Vt(s,o,90),h=qt(n,e,_),d=Vt(c,l,90),f=qt(i,r,_),x):_},x.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function $t(e){return e}var Wt,Gt,Yt,Xt,Zt=n(),Kt=n(),Jt={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Jt.lineStart=Qt,Jt.lineEnd=nn},polygonEnd:function(){Jt.lineStart=Jt.lineEnd=Jt.point=M,Zt.add(p(Kt)),Kt.reset()},result:function(){var e=Zt/2;return Zt.reset(),e}};function Qt(){Jt.point=en}function en(e,t){Jt.point=tn,Wt=Yt=e,Gt=Xt=t}function tn(e,t){Kt.add(Xt*e-Yt*t),Yt=e,Xt=t}function nn(){tn(Wt,Gt)}var rn=1/0,on=rn,an=-rn,sn=an,ln={point:function(e,t){e<rn&&(rn=e),e>an&&(an=e),t<on&&(on=t),t>sn&&(sn=t)},lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M,result:function(){var e=[[rn,on],[an,sn]];return an=sn=-(on=rn=1/0),e}};var cn,un,hn,dn,fn=0,pn=0,gn=0,mn=0,vn=0,yn=0,bn=0,_n=0,xn=0,wn={point:An,lineStart:kn,lineEnd:En,polygonStart:function(){wn.lineStart=Cn,wn.lineEnd=Mn},polygonEnd:function(){wn.point=An,wn.lineStart=kn,wn.lineEnd=En},result:function(){var e=xn?[bn/xn,_n/xn]:yn?[mn/yn,vn/yn]:gn?[fn/gn,pn/gn]:[NaN,NaN];return fn=pn=gn=mn=vn=yn=bn=_n=xn=0,e}};function An(e,t){fn+=e,pn+=t,++gn}function kn(){wn.point=Tn}function Tn(e,t){wn.point=Sn,An(hn=e,dn=t)}function Sn(e,t){var n=e-hn,r=t-dn,i=k(n*n+r*r);mn+=i*(hn+e)/2,vn+=i*(dn+t)/2,yn+=i,An(hn=e,dn=t)}function En(){wn.point=An}function Cn(){wn.point=On}function Mn(){Ln(cn,un)}function On(e,t){wn.point=Ln,An(cn=hn=e,un=dn=t)}function Ln(e,t){var n=e-hn,r=t-dn,i=k(n*n+r*r);mn+=i*(hn+e)/2,vn+=i*(dn+t)/2,yn+=i,bn+=(i=dn*e-hn*t)*(hn+e),_n+=i*(dn+t),xn+=3*i,An(hn=e,dn=t)}function Dn(e){this._context=e}Dn.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,h)}},result:M};var In,Rn,Pn,Nn,zn,Fn=n(),Bn={point:M,lineStart:function(){Bn.point=jn},lineEnd:function(){In&&Un(Rn,Pn),Bn.point=M},polygonStart:function(){In=!0},polygonEnd:function(){In=null},result:function(){var e=+Fn;return Fn.reset(),e}};function jn(e,t){Bn.point=Un,Rn=Nn=e,Pn=zn=t}function Un(e,t){Nn-=e,zn-=t,Fn.add(k(Nn*Nn+zn*zn)),Nn=e,zn=t}function Vn(){this._string=[]}function qn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Hn(e){return function(t){var n=new $n;for(var r in e)n[r]=e[r];return n.stream=t,n}}function $n(){}function Wn(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),P(n,e.stream(ln)),t(ln.result()),null!=r&&e.clipExtent(r),e}function Gn(e,t,n){return Wn(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])}),n)}function Yn(e,t,n){return Gn(e,[[0,0],t],n)}function Xn(e,t,n){return Wn(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}function Zn(e,t,n){return Wn(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}Vn.prototype={_radius:4.5,_circle:qn(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=qn(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},$n.prototype={constructor:$n,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Kn=v(30*f);function Jn(e,t){return+t?function(e,t){function n(r,i,o,s,l,c,u,h,d,f,g,v,y,b){var _=u-r,x=h-i,w=_*_+x*x;if(w>4*t&&y--){var A=s+f,T=l+g,S=c+v,C=k(A*A+T*T+S*S),M=E(S/=C),O=p(p(S)-1)<a||p(o-d)<a?(o+d)/2:m(T,A),L=e(O,M),D=L[0],I=L[1],R=D-r,P=I-i,N=x*R-_*P;(N*N/w>t||p((_*R+x*P)/w-.5)>.3||s*f+l*g+c*v<Kn)&&(n(r,i,o,s,l,c,D,I,O,A/=C,T/=C,S,y,b),b.point(D,I),n(D,I,O,A,T,S,u,h,d,f,g,v,y,b))}}return function(t){var r,i,o,a,s,l,c,u,h,d,f,p,g={point:m,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),g.lineStart=_},polygonEnd:function(){t.polygonEnd(),g.lineStart=v}};function m(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){u=NaN,g.point=y,t.lineStart()}function y(r,i){var o=X([r,i]),a=e(r,i);n(u,h,c,d,f,p,u=a[0],h=a[1],c=r,d=o[0],f=o[1],p=o[2],16,t),t.point(u,h)}function b(){g.point=m,t.lineEnd()}function _(){v(),g.point=x,g.lineEnd=w}function x(e,t){y(r=e,t),i=u,o=h,a=d,s=f,l=p,g.point=y}function w(){n(u,h,c,d,f,p,i,o,r,a,s,l,16,t),g.lineEnd=b,b()}return g}}(e,t):function(e){return Hn({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var Qn=Hn({point:function(e,t){this.stream.point(e*f,t*f)}});function er(e,t,n,r,i){function o(o,a){return[t+e*(o*=r),n-e*(a*=i)]}return o.invert=function(o,a){return[(o-t)/e*r,(n-a)/e*i]},o}function tr(e,t,n,r,i,o){var a=v(o),s=w(o),l=a*e,c=s*e,u=a/e,h=s/e,d=(s*n-a*t)/e,f=(s*t+a*n)/e;function p(e,o){return[l*(e*=r)-c*(o*=i)+t,n-c*e-l*o]}return p.invert=function(e,t){return[r*(u*e-h*t+d),i*(f-h*e-u*t)]},p}function nr(e){return rr((function(){return e}))()}function rr(e){var t,n,r,i,o,a,s,l,c,u,h=150,p=480,g=250,m=0,v=0,y=0,b=0,_=0,x=0,w=1,A=1,T=null,S=vt,E=null,C=$t,M=.5;function O(e){return l(e[0]*f,e[1]*f)}function L(e){return(e=l.invert(e[0],e[1]))&&[e[0]*d,e[1]*d]}function D(){var e=tr(h,0,0,w,A,x).apply(null,t(m,v)),r=(x?tr:er)(h,p-e[0],g-e[1],w,A,x);return n=Qe(y,b,_),s=Ke(t,r),l=Ke(n,s),a=Jn(s,M),I()}function I(){return c=u=null,O}return O.stream=function(e){return c&&u===e?c:c=Qn(function(e){return Hn({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(S(a(C(u=e)))))},O.preclip=function(e){return arguments.length?(S=e,T=void 0,I()):S},O.postclip=function(e){return arguments.length?(C=e,E=r=i=o=null,I()):C},O.clipAngle=function(e){return arguments.length?(S=+e?yt(T=e*f):(T=null,vt),I()):T*d},O.clipExtent=function(e){return arguments.length?(C=null==e?(E=r=i=o=null,$t):xt(E=+e[0][0],r=+e[0][1],i=+e[1][0],o=+e[1][1]),I()):null==E?null:[[E,r],[i,o]]},O.scale=function(e){return arguments.length?(h=+e,D()):h},O.translate=function(e){return arguments.length?(p=+e[0],g=+e[1],D()):[p,g]},O.center=function(e){return arguments.length?(m=e[0]%360*f,v=e[1]%360*f,D()):[m*d,v*d]},O.rotate=function(e){return arguments.length?(y=e[0]%360*f,b=e[1]%360*f,_=e.length>2?e[2]%360*f:0,D()):[y*d,b*d,_*d]},O.angle=function(e){return arguments.length?(x=e%360*f,D()):x*d},O.reflectX=function(e){return arguments.length?(w=e?-1:1,D()):w<0},O.reflectY=function(e){return arguments.length?(A=e?-1:1,D()):A<0},O.precision=function(e){return arguments.length?(a=Jn(s,M=e*e),I()):k(M)},O.fitExtent=function(e,t){return Gn(O,e,t)},O.fitSize=function(e,t){return Yn(O,e,t)},O.fitWidth=function(e,t){return Xn(O,e,t)},O.fitHeight=function(e,t){return Zn(O,e,t)},function(){return t=e.apply(this,arguments),O.invert=t.invert&&L,D()}}function ir(e){var t=0,n=l/3,r=rr(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*f,n=e[1]*f):[t*d,n*d]},i}function or(e,t){var n=w(e),r=(n+w(t))/2;if(p(r)<a)return function(e){var t=v(e);function n(e,n){return[e*t,w(n)/t]}return n.invert=function(e,n){return[e/t,E(n*t)]},n}(e);var i=1+n*(2*r-n),o=k(i)/r;function s(e,t){var n=k(i-2*r*w(t))/r;return[n*w(e*=r),o-n*v(e)]}return s.invert=function(e,t){var n=o-t,a=m(e,p(n))*A(n);return n*r<0&&(a-=l*A(e)*A(n)),[a/r,E((i-(e*e+n*n)*r*r)/(2*r))]},s}function ar(){return ir(or).scale(155.424).center([0,33.6442])}function sr(){return ar().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function lr(e){return function(t,n){var r=v(t),i=v(n),o=e(r*i);return[o*i*w(t),o*w(n)]}}function cr(e){return function(t,n){var r=k(t*t+n*n),i=e(r),o=w(i),a=v(i);return[m(t*o,r*a),E(r&&n*o/r)]}}var ur=lr((function(e){return k(2/(1+e))}));ur.invert=cr((function(e){return 2*E(e/2)}));var hr=lr((function(e){return(e=S(e))&&e/w(e)}));function dr(e,t){return[e,_(T((c+t)/2))]}function fr(e){var t,n,r,i=nr(e),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,u=null;function h(){var o=l*a(),s=i(rt(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:e===dr?[[Math.max(s[0]-o,u),t],[Math.min(s[0]+o,n),r]]:[[u,Math.max(s[1]-o,t)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(e){return arguments.length?(a(e),h()):a()},i.translate=function(e){return arguments.length?(s(e),h()):s()},i.center=function(e){return arguments.length?(o(e),h()):o()},i.clipExtent=function(e){return arguments.length?(null==e?u=t=n=r=null:(u=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),h()):null==u?null:[[u,t],[n,r]]},h()}function pr(e){return T((c+e)/2)}function gr(e,t){var n=v(e),r=e===t?w(e):_(n/v(t))/_(pr(t)/pr(e)),i=n*x(pr(e),r)/r;if(!r)return dr;function o(e,t){i>0?t<-c+a&&(t=-c+a):t>c-a&&(t=c-a);var n=i/x(pr(t),r);return[n*w(r*e),i-n*v(r*e)]}return o.invert=function(e,t){var n=i-t,o=A(r)*k(e*e+n*n),a=m(e,p(n))*A(n);return n*r<0&&(a-=l*A(e)*A(n)),[a/r,2*g(x(i/o,1/r))-c]},o}function mr(e,t){return[e,t]}function vr(e,t){var n=v(e),r=e===t?w(e):(n-v(t))/(t-e),i=n/r+e;if(p(r)<a)return mr;function o(e,t){var n=i-t,o=r*e;return[n*w(o),i-n*v(o)]}return o.invert=function(e,t){var n=i-t,o=m(e,p(n))*A(n);return n*r<0&&(o-=l*A(e)*A(n)),[o/r,i-A(r)*k(e*e+n*n)]},o}hr.invert=cr((function(e){return e})),dr.invert=function(e,t){return[e,2*g(b(t))-c]},mr.invert=mr;var yr=1.340264,br=-.081106,_r=893e-6,xr=.003796,wr=k(3)/2;function Ar(e,t){var n=E(wr*w(t)),r=n*n,i=r*r*r;return[e*v(n)/(wr*(yr+3*br*r+i*(7*_r+9*xr*r))),n*(yr+br*r+i*(_r+xr*r))]}function kr(e,t){var n=v(t),r=v(e)*n;return[n*w(e)/r,w(t)/r]}function Tr(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function Sr(e,t){return[v(t)*w(e),w(t)]}function Er(e,t){var n=v(t),r=1+v(e)*n;return[n*w(e)/r,w(t)/r]}function Cr(e,t){return[_(T((c+t)/2)),-e]}Ar.invert=function(e,t){for(var n,r=t,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(yr+br*i+o*(_r+xr*i))-t)/(yr+3*br*i+o*(7*_r+9*xr*i)))*r)*i*i,!(p(n)<s));++a);return[wr*e*(yr+3*br*i+o*(7*_r+9*xr*i))/v(r),E(w(r)/wr)]},kr.invert=cr(g),Tr.invert=function(e,t){var n,r=t,i=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(p(n)>a&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Sr.invert=cr(E),Er.invert=cr((function(e){return 2*g(e)})),Cr.invert=function(e,t){return[-t,2*g(b(e))-c]},e.geoAlbers=sr,e.geoAlbersUsa=function(){var e,t,n,r,i,o,s=sr(),l=ar().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=ar().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,t){o=[e,t]}};function h(e){var t=e[0],a=e[1];return o=null,n.point(t,a),o||(r.point(t,a),o)||(i.point(t,a),o)}function d(){return e=t=null,h}return h.invert=function(e){var t=s.scale(),n=s.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:s).invert(e)},h.stream=function(n){return e&&t===n?e:(r=[s.stream(t=n),l.stream(n),c.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n<i;)r[n].point(e,t)},sphere:function(){for(var e=-1;++e<i;)r[e].sphere()},lineStart:function(){for(var e=-1;++e<i;)r[e].lineStart()},lineEnd:function(){for(var e=-1;++e<i;)r[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<i;)r[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<i;)r[e].polygonEnd()}});var r,i},h.precision=function(e){return arguments.length?(s.precision(e),l.precision(e),c.precision(e),d()):s.precision()},h.scale=function(e){return arguments.length?(s.scale(e),l.scale(.35*e),c.scale(e),h.translate(s.translate())):s.scale()},h.translate=function(e){if(!arguments.length)return s.translate();var t=s.scale(),o=+e[0],h=+e[1];return n=s.translate(e).clipExtent([[o-.455*t,h-.238*t],[o+.455*t,h+.238*t]]).stream(u),r=l.translate([o-.307*t,h+.201*t]).clipExtent([[o-.425*t+a,h+.12*t+a],[o-.214*t-a,h+.234*t-a]]).stream(u),i=c.translate([o-.205*t,h+.212*t]).clipExtent([[o-.214*t+a,h+.166*t+a],[o-.115*t-a,h+.234*t-a]]).stream(u),d()},h.fitExtent=function(e,t){return Gn(h,e,t)},h.fitSize=function(e,t){return Yn(h,e,t)},h.fitWidth=function(e,t){return Xn(h,e,t)},h.fitHeight=function(e,t){return Zn(h,e,t)},h.scale(1070)},e.geoArea=function(e){return V.reset(),P(e,q),2*V},e.geoAzimuthalEqualArea=function(){return nr(ur).scale(124.75).clipAngle(179.999)},e.geoAzimuthalEqualAreaRaw=ur,e.geoAzimuthalEquidistant=function(){return nr(hr).scale(79.4188).clipAngle(179.999)},e.geoAzimuthalEquidistantRaw=hr,e.geoBounds=function(e){var t,n,r,i,o,a,s;if(ie=re=-(te=ne=1/0),ce=[],P(e,Ce),n=ce.length){for(ce.sort(ze),t=1,o=[r=ce[0]];t<n;++t)Fe(r,(i=ce[t])[0])||Fe(r,i[1])?(Ne(r[0],i[1])>Ne(r[0],r[1])&&(r[1]=i[1]),Ne(i[0],r[1])>Ne(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=Ne(r[1],i[0]))>a&&(a=s,te=i[0],re=r[1])}return ce=ue=null,te===1/0||ne===1/0?[[NaN,NaN],[NaN,NaN]]:[[te,ne],[re,ie]]},e.geoCentroid=function(e){he=de=fe=pe=ge=me=ve=ye=be=_e=xe=0,P(e,Be);var t=be,n=_e,r=xe,i=t*t+n*n+r*r;return i<s&&(t=me,n=ve,r=ye,de<a&&(t=fe,n=pe,r=ge),(i=t*t+n*n+r*r)<s)?[NaN,NaN]:[m(n,t)*d,E(r/k(i))*d]},e.geoCircle=function(){var e,t,n=Ze([0,0]),r=Ze(90),i=Ze(6),o={point:function(n,r){e.push(n=t(n,r)),n[0]*=d,n[1]*=d}};function a(){var a=n.apply(this,arguments),s=r.apply(this,arguments)*f,l=i.apply(this,arguments)*f;return e=[],t=Qe(-a[0]*f,-a[1]*f,0).invert,it(o,s,l,1),a={type:"Polygon",coordinates:[e]},e=t=null,a}return a.center=function(e){return arguments.length?(n="function"==typeof e?e:Ze([+e[0],+e[1]]),a):n},a.radius=function(e){return arguments.length?(r="function"==typeof e?e:Ze(+e),a):r},a.precision=function(e){return arguments.length?(i="function"==typeof e?e:Ze(+e),a):i},a},e.geoClipAntimeridian=vt,e.geoClipCircle=yt,e.geoClipExtent=function(){var e,t,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return e&&t===n?e:e=xt(r,i,o,a)(t=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],e=t=null,n):[[r,i],[o,a]]}}},e.geoClipRectangle=xt,e.geoConicConformal=function(){return ir(gr).scale(109.5).parallels([30,30])},e.geoConicConformalRaw=gr,e.geoConicEqualArea=ar,e.geoConicEqualAreaRaw=or,e.geoConicEquidistant=function(){return ir(vr).scale(131.154).center([0,13.9389])},e.geoConicEquidistantRaw=vr,e.geoContains=function(e,t){return(e&&Rt.hasOwnProperty(e.type)?Rt[e.type]:Nt)(e,t)},e.geoDistance=It,e.geoEqualEarth=function(){return nr(Ar).scale(177.158)},e.geoEqualEarthRaw=Ar,e.geoEquirectangular=function(){return nr(mr).scale(152.63)},e.geoEquirectangularRaw=mr,e.geoGnomonic=function(){return nr(kr).scale(144.049).clipAngle(60)},e.geoGnomonicRaw=kr,e.geoGraticule=Ht,e.geoGraticule10=function(){return Ht()()},e.geoIdentity=function(){var e,t,n,r,i,o,a,s=1,l=0,c=0,u=1,h=1,p=0,g=null,m=1,y=1,b=Hn({point:function(e,t){var n=A([e,t]);this.stream.point(n[0],n[1])}}),_=$t;function x(){return m=s*u,y=s*h,o=a=null,A}function A(n){var r=n[0]*m,i=n[1]*y;if(p){var o=i*e-r*t;r=r*e+i*t,i=o}return[r+l,i+c]}return A.invert=function(n){var r=n[0]-l,i=n[1]-c;if(p){var o=i*e+r*t;r=r*e-i*t,i=o}return[r/m,i/y]},A.stream=function(e){return o&&a===e?o:o=b(_(a=e))},A.postclip=function(e){return arguments.length?(_=e,g=n=r=i=null,x()):_},A.clipExtent=function(e){return arguments.length?(_=null==e?(g=n=r=i=null,$t):xt(g=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),x()):null==g?null:[[g,n],[r,i]]},A.scale=function(e){return arguments.length?(s=+e,x()):s},A.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],x()):[l,c]},A.angle=function(n){return arguments.length?(t=w(p=n%360*f),e=v(p),x()):p*d},A.reflectX=function(e){return arguments.length?(u=e?-1:1,x()):u<0},A.reflectY=function(e){return arguments.length?(h=e?-1:1,x()):h<0},A.fitExtent=function(e,t){return Gn(A,e,t)},A.fitSize=function(e,t){return Yn(A,e,t)},A.fitWidth=function(e,t){return Xn(A,e,t)},A.fitHeight=function(e,t){return Zn(A,e,t)},A},e.geoInterpolate=function(e,t){var n=e[0]*f,r=e[1]*f,i=t[0]*f,o=t[1]*f,a=v(r),s=w(r),l=v(o),c=w(o),u=a*v(n),h=a*w(n),p=l*v(i),g=l*w(i),y=2*E(k(C(o-r)+a*l*C(i-n))),b=w(y),_=y?function(e){var t=w(e*=y)/b,n=w(y-e)/b,r=n*u+t*p,i=n*h+t*g,o=n*s+t*c;return[m(i,r)*d,m(o,k(r*r+i*i))*d]}:function(){return[n*d,r*d]};return _.distance=y,_},e.geoLength=Ot,e.geoMercator=function(){return fr(dr).scale(961/h)},e.geoMercatorRaw=dr,e.geoNaturalEarth1=function(){return nr(Tr).scale(175.295)},e.geoNaturalEarth1Raw=Tr,e.geoOrthographic=function(){return nr(Sr).scale(249.5).clipAngle(90.000001)},e.geoOrthographicRaw=Sr,e.geoPath=function(e,t){var n,r,i=4.5;function o(e){return e&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),P(e,n(r))),r.result()}return o.area=function(e){return P(e,n(Jt)),Jt.result()},o.measure=function(e){return P(e,n(Bn)),Bn.result()},o.bounds=function(e){return P(e,n(ln)),ln.result()},o.centroid=function(e){return P(e,n(wn)),wn.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,$t):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new Vn):new Dn(t=e),"function"!=typeof i&&r.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"==typeof e?e:(r.pointRadius(+e),+e),o):i},o.projection(e).context(t)},e.geoProjection=nr,e.geoProjectionMutator=rr,e.geoRotation=rt,e.geoStereographic=function(){return nr(Er).scale(250).clipAngle(142)},e.geoStereographicRaw=Er,e.geoStream=P,e.geoTransform=function(e){return{stream:Hn(e)}},e.geoTransverseMercator=function(){var e=fr(Cr),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=Cr,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-array")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-array":107}],115:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e,t){return e.parent===t.parent?1:2}function n(e,t){return e+t.x}function r(e,t){return Math.max(e,t.y)}function i(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function o(e,t){var n,r,i,o,s,u=new c(e),h=+e.value&&(u.value=e.value),d=[u];for(null==t&&(t=a);n=d.pop();)if(h&&(n.value=+n.data.value),(i=t(n.data))&&(s=i.length))for(n.children=new Array(s),o=s-1;o>=0;--o)d.push(r=n.children[o]=new c(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(l)}function a(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=o.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return o(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(u.call(e))).length,o=[];r<i;)t=e[r],n&&p(n,t)?++r:(n=m(o=d(o,t)),r=0);return n}function d(e,t){var n,r;if(g(t,e))return[t];for(n=0;n<e.length;++n)if(f(t,e[n])&&g(v(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(f(v(e[n],e[r]),t)&&f(v(e[n],t),e[r])&&f(v(e[r],t),e[n])&&g(y(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function f(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function p(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function g(e,t){for(var n=0;n<t.length;++n)if(!p(e,t[n]))return!1;return!0}function m(e){switch(e.length){case 1:return{x:(t=e[0]).x,y:t.y,r:t.r};case 2:return v(e[0],e[1]);case 3:return y(e[0],e[1],e[2])}var t}function v(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,c=a-r,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(n+o+l/h*u)/2,y:(r+a+c/h*u)/2,r:(h+i+s)/2}}function y(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=n.x,u=n.y,h=n.r,d=r-a,f=r-c,p=i-s,g=i-u,m=l-o,v=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+l*l,_=y-c*c-u*u+h*h,x=f*p-d*g,w=(p*_-g*b)/(2*x)-r,A=(g*m-p*v)/x,k=(f*b-d*_)/(2*x)-i,T=(d*v-f*m)/x,S=A*A+T*T-1,E=2*(o+w*A+k*T),C=w*w+k*k-o*o,M=-(S?(E+Math.sqrt(E*E-4*S*C))/(2*S):C/E);return{x:r+w+A*M,y:i+k+T*M,r:M}}function b(e,t,n){var r,i,o,a,s=e.x-t.x,l=e.y-t.y,c=s*s+l*l;c?(i=t.r+n.r,i*=i,a=e.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*s-o*l,n.y=e.y-r*l+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-o*l,n.y=t.y+r*l+o*s)):(n.x=t.x+n.r,n.y=t.y)}function _(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function x(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function w(e){this._=e,this.next=null,this.previous=null}function A(e){if(!(i=e.length))return 0;var t,n,r,i,o,a,s,l,c,u,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;b(n,t,r=e[2]),t=new w(t),n=new w(n),r=new w(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){b(t._,n._,r=e[s]),r=new w(r),l=n.next,c=t.previous,u=n._.r,d=t._.r;do{if(u<=d){if(_(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}u+=l._.r,l=l.next}else{if(_(c._,r._)){(t=c).next=n,n.previous=t,--s;continue e}d+=c._.r,c=c.previous}}while(l!==c.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=x(t);(r=r.next)!==n;)(a=x(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=h(t),s=0;s<i;++s)(t=e[s]).x-=r.x,t.y-=r.y;return r.r}function k(e){return null==e?null:T(e)}function T(e){if("function"!=typeof e)throw new Error;return e}function S(){return 0}function E(e){return function(){return e}}function C(e){return Math.sqrt(e.value)}function M(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function O(e,t){return function(n){if(r=n.children){var r,i,o,a=r.length,s=e(n)*t||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=A(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function L(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function D(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function I(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}var R={depth:-1},P={};function N(e){return e.id}function z(e){return e.parentId}function F(e,t){return e.parent===t.parent?1:2}function B(e){var t=e.children;return t?t[0]:e.t}function j(e){var t=e.children;return t?t[t.length-1]:e.t}function U(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function V(e,t,n){return e.a.parent===t.parent?e.a:n}function q(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function H(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}q.prototype=Object.create(c.prototype);var $=(1+Math.sqrt(5))/2;function W(e,t,n,r,i,o){for(var a,s,l,c,u,h,d,f,p,g,m,v=[],y=t.children,b=0,_=0,x=y.length,w=t.value;b<x;){l=i-n,c=o-r;do{u=y[_++].value}while(!u&&_<x);for(h=d=u,m=u*u*(g=Math.max(c/l,l/c)/(w*e)),p=Math.max(d/m,m/h);_<x;++_){if(u+=s=y[_].value,s<h&&(h=s),s>d&&(d=s),m=u*u*g,(f=Math.max(d/m,m/h))>p){u-=s;break}p=f}v.push(a={value:u,dice:l<c,children:y.slice(b,_)}),a.dice?I(a,n,r,i,w?r+=c*u/w:o):H(a,n,r,w?n+=l*u/w:i,o),w-=u,b=_}return v}var G=function e(t){function n(e,n,r,i,o){W(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}($);var Y=function e(t){function n(e,n,r,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,s,l,c,u,h=-1,d=a.length,f=e.value;++h<d;){for(l=(s=a[h]).children,c=s.value=0,u=l.length;c<u;++c)s.value+=l[c].value;s.dice?I(s,n,r,i,r+=(o-r)*s.value/f):H(s,n,r,n+=(i-n)*s.value/f,o),f-=s.value}else e._squarify=a=W(t,e,n,r,i,o),a.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}($);e.cluster=function(){var e=t,i=1,o=1,a=!1;function s(t){var s,l=0;t.eachAfter((function(t){var i=t.children;i?(t.x=function(e){return e.reduce(n,0)/e.length}(i),t.y=function(e){return 1+e.reduce(r,0)}(i)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,d=u.x+e(u,c)/2;return t.eachAfter(a?function(e){e.x=(e.x-t.x)*i,e.y=(t.y-e.y)*o}:function(e){e.x=(e.x-h)/(d-h)*i,e.y=(1-(t.y?e.y/t.y:1))*o})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(a=!1,i=+e[0],o=+e[1],s):a?null:[i,o]},s.nodeSize=function(e){return arguments.length?(a=!0,i=+e[0],o=+e[1],s):a?[i,o]:null},s},e.hierarchy=o,e.pack=function(){var e=null,t=1,n=1,r=S;function i(i){return i.x=t/2,i.y=n/2,e?i.eachBefore(M(e)).eachAfter(O(r,.5)).eachBefore(L(1)):i.eachBefore(M(C)).eachAfter(O(S,1)).eachAfter(O(r,i.r/Math.min(t,n))).eachBefore(L(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=k(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:E(+e),i):r},i},e.packEnclose=h,e.packSiblings=function(e){return A(e),e},e.partition=function(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(function(e,t){return function(r){r.children&&I(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(t,o)),r&&i.eachBefore(D),i}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i},e.stratify=function(){var e=N,t=z;function n(n){var r,i,o,a,s,u,h,d=n.length,f=new Array(d),p={};for(i=0;i<d;++i)r=n[i],s=f[i]=new c(r),null!=(u=e(r,i,n))&&(u+="")&&(p[h="$"+(s.id=u)]=h in p?P:s);for(i=0;i<d;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=p["$"+u]))throw new Error("missing: "+u);if(a===P)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=R,o.eachBefore((function(e){e.depth=e.parent.depth+1,--d})).eachBefore(l),o.parent=null,d>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=T(t),n):e},n.parentId=function(e){return arguments.length?(t=T(e),n):t},n},e.tree=function(){var e=F,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,o,a=new q(e,0),s=[a];t=s.pop();)if(r=t._.children)for(t.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=t.children[i]=new q(r[i],i)),n.parent=t;return(a.parent=new q(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var c=i,u=i,h=i;i.eachBefore((function(e){e.x<c.x&&(c=e),e.x>u.x&&(u=e),e.depth>h.depth&&(h=e)}));var d=c===u?1:e(c,u)/2,f=d-c.x,p=t/(u.x+d+f),g=n/(h.depth||1);i.eachBefore((function(e){e.x=(e.x+f)*p,e.y=e.depth*g}))}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,l=o.parent.children[0],c=o.m,u=a.m,h=s.m,d=l.m;s=j(s),o=B(o),s&&o;)l=B(l),(a=j(a)).a=t,(i=s.z+h-o.z-c+e(s._,o._))>0&&(U(V(s,t,r),t,i),c+=i,u+=i),h+=s.m,c+=o.m,d+=l.m,u+=a.m;s&&!j(a)&&(a.t=s,a.m+=h-u),o&&!B(l)&&(l.t=o,l.m+=c-d,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i},e.treemap=function(){var e=G,t=!1,n=1,r=1,i=[0],o=S,a=S,s=S,l=S,c=S;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(h),i=[0],t&&e.eachBefore(D),e}function h(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,h=t.x1-n,d=t.y1-n;h<r&&(r=h=(r+h)/2),d<u&&(u=d=(u+d)/2),t.x0=r,t.y0=u,t.x1=h,t.y1=d,t.children&&(n=i[t.depth+1]=o(t)/2,r+=c(t)-n,u+=a(t)-n,(h-=s(t)-n)<r&&(r=h=(r+h)/2),(d-=l(t)-n)<u&&(u=d=(u+d)/2),e(t,r,u,h,d))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=T(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(o="function"==typeof e?e:E(+e),u):o},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(a="function"==typeof e?e:E(+e),u):a},u.paddingRight=function(e){return arguments.length?(s="function"==typeof e?e:E(+e),u):s},u.paddingBottom=function(e){return arguments.length?(l="function"==typeof e?e:E(+e),u):l},u.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:E(+e),u):c},u},e.treemapBinary=function(e,t,n,r,i){var o,a,s=e.children,l=s.length,c=new Array(l+1);for(c[0]=a=o=0;o<l;++o)c[o+1]=a+=s[o].value;!function e(t,n,r,i,o,a,l){if(t>=n-1){var u=s[t];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=l)}for(var h=c[t],d=r/2+h,f=t+1,p=n-1;f<p;){var g=f+p>>>1;c[g]<d?f=g+1:p=g}d-c[f-1]<c[f]-d&&t+1<f&&--f;var m=c[f]-h,v=r-m;if(a-i>l-o){var y=(i*v+a*m)/r;e(t,f,m,i,o,y,l),e(f,n,v,y,o,a,l)}else{var b=(o*v+l*m)/r;e(t,f,m,i,o,a,b),e(f,n,v,i,b,a,l)}}(0,l,e.value,t,n,r,i)},e.treemapDice=I,e.treemapResquarify=Y,e.treemapSlice=H,e.treemapSliceDice=function(e,t,n,r,i){(1&e.depth?H:I)(e,t,n,r,i)},e.treemapSquarify=G,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],116:[function(e,t,n){var r,i;r=this,i=function(e,t){"use strict";function n(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function r(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),o=e[i],a=e[i+1],s=i>0?e[i-1]:2*o-a,l=i<t-1?e[i+2]:2*a-o;return n((r-i/t)*t,s,o,a,l)}}function i(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),o=e[(i+t-1)%t],a=e[i%t],s=e[(i+1)%t],l=e[(i+2)%t];return n((r-i/t)*t,o,a,s,l)}}function o(e){return function(){return e}}function a(e,t){return function(n){return e+n*t}}function s(e,t){var n=t-e;return n?a(e,n>180||n<-180?n-360*Math.round(n/360):n):o(isNaN(e)?t:e)}function l(e){return 1==(e=+e)?c:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):o(isNaN(t)?n:t)}}function c(e,t){var n=t-e;return n?a(e,n):o(isNaN(e)?t:e)}var u=function e(n){var r=l(n);function i(e,n){var i=r((e=t.rgb(e)).r,(n=t.rgb(n)).r),o=r(e.g,n.g),a=r(e.b,n.b),s=c(e.opacity,n.opacity);return function(t){return e.r=i(t),e.g=o(t),e.b=a(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function h(e){return function(n){var r,i,o=n.length,a=new Array(o),s=new Array(o),l=new Array(o);for(r=0;r<o;++r)i=t.rgb(n[r]),a[r]=i.r||0,s[r]=i.g||0,l[r]=i.b||0;return a=e(a),s=e(s),l=e(l),i.opacity=1,function(e){return i.r=a(e),i.g=s(e),i.b=l(e),i+""}}}var d=h(r),f=h(i);function p(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function g(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=A(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function v(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function y(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=A(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var _=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(_.source,"g");function w(e,t){var n,r,i,o=_.lastIndex=x.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=_.exec(e))&&(r=x.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:y(n,r)})),o=x.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function A(e,n){var r,i=typeof n;return null==n||"boolean"===i?o(n):("number"===i?y:"string"===i?(r=t.color(n))?(n=r,u):w:n instanceof t.color?u:n instanceof Date?v:g(n)?p:Array.isArray(n)?m:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?b:y)(e,n)}var k,T,S,E,C=180/Math.PI,M={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function O(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*C,skewX:Math.atan(l)*C,scaleX:a,scaleY:s}}function L(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:y(e,i)},{i:l-2,x:y(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:y(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:y(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:y(e,n)},{i:s-2,x:y(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var D=L((function(e){return"none"===e?M:(k||(k=document.createElement("DIV"),T=document.documentElement,S=document.defaultView),k.style.transform=e,e=S.getComputedStyle(T.appendChild(k),null).getPropertyValue("transform"),T.removeChild(k),O(+(e=e.slice(7,-1).split(","))[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}),"px, ","px)","deg)"),I=L((function(e){return null==e?M:(E||(E=document.createElementNS("path_to_url","g")),E.setAttribute("transform",e),(e=E.transform.baseVal.consolidate())?O((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):M)}),", ",")",")"),R=Math.SQRT2;function P(e){return((e=Math.exp(e))+1/e)/2}function N(e){return function(n,r){var i=e((n=t.hsl(n)).h,(r=t.hsl(r)).h),o=c(n.s,r.s),a=c(n.l,r.l),s=c(n.opacity,r.opacity);return function(e){return n.h=i(e),n.s=o(e),n.l=a(e),n.opacity=s(e),n+""}}}var z=N(s),F=N(c);function B(e){return function(n,r){var i=e((n=t.hcl(n)).h,(r=t.hcl(r)).h),o=c(n.c,r.c),a=c(n.l,r.l),s=c(n.opacity,r.opacity);return function(e){return n.h=i(e),n.c=o(e),n.l=a(e),n.opacity=s(e),n+""}}}var j=B(s),U=B(c);function V(e){return function n(r){function i(n,i){var o=e((n=t.cubehelix(n)).h,(i=t.cubehelix(i)).h),a=c(n.s,i.s),s=c(n.l,i.l),l=c(n.opacity,i.opacity);return function(e){return n.h=o(e),n.s=a(e),n.l=s(Math.pow(e,r)),n.opacity=l(e),n+""}}return r=+r,i.gamma=n,i}(1)}var q=V(s),H=V(c);e.interpolate=A,e.interpolateArray=function(e,t){return(g(t)?p:m)(e,t)},e.interpolateBasis=r,e.interpolateBasisClosed=i,e.interpolateCubehelix=q,e.interpolateCubehelixLong=H,e.interpolateDate=v,e.interpolateDiscrete=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}},e.interpolateHcl=j,e.interpolateHclLong=U,e.interpolateHsl=z,e.interpolateHslLong=F,e.interpolateHue=function(e,t){var n=s(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}},e.interpolateLab=function(e,n){var r=c((e=t.lab(e)).l,(n=t.lab(n)).l),i=c(e.a,n.a),o=c(e.b,n.b),a=c(e.opacity,n.opacity);return function(t){return e.l=r(t),e.a=i(t),e.b=o(t),e.opacity=a(t),e+""}},e.interpolateNumber=y,e.interpolateNumberArray=p,e.interpolateObject=b,e.interpolateRgb=u,e.interpolateRgbBasis=d,e.interpolateRgbBasisClosed=f,e.interpolateRound=function(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}},e.interpolateString=w,e.interpolateTransformCss=D,e.interpolateTransformSvg=I,e.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],c=t[2],u=s-i,h=l-o,d=u*u+h*h;if(d<1e-12)r=Math.log(c/a)/R,n=function(e){return[i+e*u,o+e*h,a*Math.exp(R*e*r)]};else{var f=Math.sqrt(d),p=(c*c-a*a+4*d)/(2*a*2*f),g=(c*c-a*a-4*d)/(2*c*2*f),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-m)/R,n=function(e){var t,n=e*r,s=P(m),l=a/(2*f)*(s*(t=R*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[i+l*u,o+l*h,a*s/P(R*n+m)]}}return n.duration=1e3*r,n},e.piecewise=function(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}},e.quantize=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-color")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-color":109}],117:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";var t=Math.PI,n=2*t,r=1e-6,i=n-r;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new o}o.prototype=a.prototype={constructor:o,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,n,i,o,a){e=+e,n=+n,i=+i,o=+o,a=+a;var s=this._x1,l=this._y1,c=i-e,u=o-n,h=s-e,d=l-n,f=h*h+d*d;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=n);else if(f>r)if(Math.abs(d*c-u*h)>r&&a){var p=i-s,g=o-l,m=c*c+u*u,v=p*p+g*g,y=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((t-Math.acos((m+f-v)/(2*y*b)))/2),x=_/b,w=_/y;Math.abs(x-1)>r&&(this._+="L"+(e+x*h)+","+(n+x*d)),this._+="A"+a+","+a+",0,0,"+ +(d*p>h*g)+","+(this._x1=e+w*c)+","+(this._y1=n+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=n)},arc:function(e,o,a,s,l,c){e=+e,o=+o,c=!!c;var u=(a=+a)*Math.cos(s),h=a*Math.sin(s),d=e+u,f=o+h,p=1^c,g=c?s-l:l-s;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+d+","+f:(Math.abs(this._x1-d)>r||Math.abs(this._y1-f)>r)&&(this._+="L"+d+","+f),a&&(g<0&&(g=g%n+n),g>i?this._+="A"+a+","+a+",0,1,"+p+","+(e-u)+","+(o-h)+"A"+a+","+a+",0,1,"+p+","+(this._x1=d)+","+(this._y1=f):g>r&&(this._+="A"+a+","+a+",0,"+ +(g>=t)+","+p+","+(this._x1=e+a*Math.cos(l))+","+(this._y1=o+a*Math.sin(l))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.path=a,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],118:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,c,u,h,d,f=e._root,p={data:r},g=e._x0,m=e._y0,v=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(m+y)/2))?m=a:y=a,i=f,!(f=f[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[h]=p:e._root=p,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(m+y)/2))?m=a:y=a}while((h=u<<1|c)==(d=(l>=a)<<1|s>=o));return i[d]=f,i[h]=p,e}function n(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function r(e){return e[0]}function i(e){return e[1]}function o(e,t,n){var o=new a(null==t?r:t,null==n?i:n,NaN,NaN,NaN,NaN);return null==e?o:o.addAll(e)}function a(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function s(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var l=o.prototype=a.prototype;l.copy=function(){var e,t,n=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=s(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=s(t));return n},l.add=function(e){var n=+this._x.call(null,e),r=+this._y.call(null,e);return t(this.cover(n,r),n,r,e)},l.addAll=function(e){var n,r,i,o,a=e.length,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,d=-1/0;for(r=0;r<a;++r)isNaN(i=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=i,l[r]=o,i<c&&(c=i),i>h&&(h=i),o<u&&(u=o),o>d&&(d=o));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),r=0;r<a;++r)t(this,s[r],l[r],e[r]);return this},l.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n,c=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},l.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},l.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(e,t,r){var i,o,a,s,l,c,u,h=this._x0,d=this._y0,f=this._x1,p=this._y1,g=[],m=this._root;for(m&&g.push(new n(m,h,d,f,p)),null==r?r=1/0:(h=e-r,d=t-r,f=e+r,p=t+r,r*=r);c=g.pop();)if(!(!(m=c.node)||(o=c.x0)>f||(a=c.y0)>p||(s=c.x1)<h||(l=c.y1)<d))if(m.length){var v=(o+s)/2,y=(a+l)/2;g.push(new n(m[3],v,y,s,l),new n(m[2],o,y,v,l),new n(m[1],v,a,s,y),new n(m[0],o,a,v,y)),(u=(t>=y)<<1|e>=v)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var b=e-+this._x.call(null,m.data),_=t-+this._y.call(null,m.data),x=b*b+_*_;if(x<r){var w=Math.sqrt(r=x);h=e-w,d=t-w,f=e+w,p=t+w,i=m.data}}return i},l.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f=this._root,p=this._x0,g=this._y0,m=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((c=o>=(s=(p+m)/2))?p=s:m=s,(u=a>=(l=(g+v)/2))?g=l:v=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},l.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},l.root=function(){return this._root},l.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},l.visit=function(e){var t,r,i,o,a,s,l=[],c=this._root;for(c&&l.push(new n(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,i=t.x0,o=t.y0,a=t.x1,s=t.y1)&&c.length){var u=(i+a)/2,h=(o+s)/2;(r=c[3])&&l.push(new n(r,u,h,a,s)),(r=c[2])&&l.push(new n(r,i,h,u,s)),(r=c[1])&&l.push(new n(r,u,o,a,h)),(r=c[0])&&l.push(new n(r,i,o,u,h))}return this},l.visitAfter=function(e){var t,r=[],i=[];for(this._root&&r.push(new n(this._root,this._x0,this._y0,this._x1,this._y1));t=r.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.x1,u=t.y1,h=(s+c)/2,d=(l+u)/2;(a=o[0])&&r.push(new n(a,s,l,h,d)),(a=o[1])&&r.push(new n(a,h,l,c,d)),(a=o[2])&&r.push(new n(a,s,d,h,u)),(a=o[3])&&r.push(new n(a,h,d,c,u))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},l.x=function(e){return arguments.length?(this._x=e,this):this._x},l.y=function(e){return arguments.length?(this._y=e,this):this._y},e.quadtree=o,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],119:[function(e,t,n){var r,i;r=this,i=function(e,t){"use strict";function n(e){return function(){return e}}var r=Math.abs,i=Math.atan2,o=Math.cos,a=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=1e-12,h=Math.PI,d=h/2,f=2*h;function p(e){return e>1?0:e<-1?h:Math.acos(e)}function g(e){return e>=1?d:e<=-1?-d:Math.asin(e)}function m(e){return e.innerRadius}function v(e){return e.outerRadius}function y(e){return e.startAngle}function b(e){return e.endAngle}function _(e){return e&&e.padAngle}function x(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,h=a-i,d=s-o,f=d*l-h*c;if(!(f*f<u))return[e+(f=(h*(t-o)-d*(e-i))/f)*l,t+f*c]}function w(e,t,n,r,i,o,s){var l=e-n,u=t-r,h=(s?o:-o)/c(l*l+u*u),d=h*u,f=-h*l,p=e+d,g=t+f,m=n+d,v=r+f,y=(p+m)/2,b=(g+v)/2,_=m-p,x=v-g,w=_*_+x*x,A=i-o,k=p*v-m*g,T=(x<0?-1:1)*c(a(0,A*A*w-k*k)),S=(k*x-_*T)/w,E=(-k*_-x*T)/w,C=(k*x+_*T)/w,M=(-k*_+x*T)/w,O=S-y,L=E-b,D=C-y,I=M-b;return O*O+L*L>D*D+I*I&&(S=C,E=M),{cx:S,cy:E,x01:-d,y01:-f,x11:S*(i/A-1),y11:E*(i/A-1)}}function A(e){this._context=e}function k(e){return new A(e)}function T(e){return e[0]}function S(e){return e[1]}function E(){var e=T,r=S,i=n(!0),o=null,a=k,s=null;function l(n){var l,c,u,h=n.length,d=!1;for(null==o&&(s=a(u=t.path())),l=0;l<=h;++l)!(l<h&&i(c=n[l],l,n))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+e(c,l,n),+r(c,l,n));if(u)return s=null,u+""||null}return l.x=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),l):e},l.y=function(e){return arguments.length?(r="function"==typeof e?e:n(+e),l):r},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:n(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function C(){var e=T,r=null,i=n(0),o=S,a=n(!0),s=null,l=k,c=null;function u(n){var u,h,d,f,p,g=n.length,m=!1,v=new Array(g),y=new Array(g);for(null==s&&(c=l(p=t.path())),u=0;u<=g;++u){if(!(u<g&&a(f=n[u],u,n))===m)if(m=!m)h=u,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),d=u-1;d>=h;--d)c.point(v[d],y[d]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+e(f,u,n),y[u]=+i(f,u,n),c.point(r?+r(f,u,n):v[u],o?+o(f,u,n):y[u]))}if(p)return c=null,p+""||null}function h(){return E().defined(a).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),r=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),u):e},u.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:n(+e),u):r},u.y=function(e){return arguments.length?(i="function"==typeof e?e:n(+e),o=null,u):i},u.y0=function(e){return arguments.length?(i="function"==typeof e?e:n(+e),u):i},u.y1=function(e){return arguments.length?(o=null==e?null:"function"==typeof e?e:n(+e),u):o},u.lineX0=u.lineY0=function(){return h().x(e).y(i)},u.lineY1=function(){return h().x(e).y(o)},u.lineX1=function(){return h().x(r).y(i)},u.defined=function(e){return arguments.length?(a="function"==typeof e?e:n(!!e),u):a},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function M(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function O(e){return e}A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var L=I(k);function D(e){this._curve=e}function I(e){function t(t){return new D(e(t))}return t._curve=e,t}function R(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(I(e)):t()._curve},e}function P(){return R(E().curve(L))}function N(){var e=C().curve(L),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return R(n())},delete e.lineX0,e.lineEndAngle=function(){return R(r())},delete e.lineX1,e.lineInnerRadius=function(){return R(i())},delete e.lineY0,e.lineOuterRadius=function(){return R(o())},delete e.lineY1,e.curve=function(e){return arguments.length?t(I(e)):t()._curve},e}function z(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}D.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var F=Array.prototype.slice;function B(e){return e.source}function j(e){return e.target}function U(e){var r=B,i=j,o=T,a=S,s=null;function l(){var n,l=F.call(arguments),c=r.apply(this,l),u=i.apply(this,l);if(s||(s=n=t.path()),e(s,+o.apply(this,(l[0]=c,l)),+a.apply(this,l),+o.apply(this,(l[0]=u,l)),+a.apply(this,l)),n)return s=null,n+""||null}return l.source=function(e){return arguments.length?(r=e,l):r},l.target=function(e){return arguments.length?(i=e,l):i},l.x=function(e){return arguments.length?(o="function"==typeof e?e:n(+e),l):o},l.y=function(e){return arguments.length?(a="function"==typeof e?e:n(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function V(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function q(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function H(e,t,n,r,i){var o=z(t,n),a=z(t,n=(n+i)/2),s=z(r,n),l=z(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}var $={draw:function(e,t){var n=Math.sqrt(t/h);e.moveTo(n,0),e.arc(0,0,n,0,f)}},W={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},G=Math.sqrt(1/3),Y=2*G,X={draw:function(e,t){var n=Math.sqrt(t/Y),r=n*G;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Z=Math.sin(h/10)/Math.sin(7*h/10),K=Math.sin(f/10)*Z,J=-Math.cos(f/10)*Z,Q={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=K*n,i=J*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=f*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},ee={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},te=Math.sqrt(3),ne={draw:function(e,t){var n=-Math.sqrt(t/(3*te));e.moveTo(0,2*n),e.lineTo(-te*n,-n),e.lineTo(te*n,-n),e.closePath()}},re=-.5,ie=Math.sqrt(3)/2,oe=1/Math.sqrt(12),ae=3*(oe/2+1),se={draw:function(e,t){var n=Math.sqrt(t/ae),r=n/2,i=n*oe,o=r,a=n*oe+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(re*r-ie*i,ie*r+re*i),e.lineTo(re*o-ie*a,ie*o+re*a),e.lineTo(re*s-ie*l,ie*s+re*l),e.lineTo(re*r+ie*i,re*i-ie*r),e.lineTo(re*o+ie*a,re*a-ie*o),e.lineTo(re*s+ie*l,re*l-ie*s),e.closePath()}},le=[$,W,X,ee,Q,ne,se];function ce(){}function ue(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function he(e){this._context=e}function de(e){this._context=e}function fe(e){this._context=e}function pe(e,t){this._basis=new he(e),this._beta=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ue(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ue(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},de.prototype={areaStart:ce,areaEnd:ce,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ue(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ue(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var ge=function e(t){function n(e){return 1===t?new he(e):new pe(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function me(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function ve(e,t){this._context=e,this._k=(1-t)/6}ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:me(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:me(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ye=function e(t){function n(e){return new ve(e,t)}return n.tension=function(t){return e(+t)},n}(0);function be(e,t){this._context=e,this._k=(1-t)/6}be.prototype={areaStart:ce,areaEnd:ce,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:me(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _e=function e(t){function n(e){return new be(e,t)}return n.tension=function(t){return e(+t)},n}(0);function xe(e,t){this._context=e,this._k=(1-t)/6}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:me(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var we=function e(t){function n(e){return new xe(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ae(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>u){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>u){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/h}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function ke(e,t){this._context=e,this._alpha=t}ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ae(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Te=function e(t){function n(e){return t?new ke(e,t):new ve(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Se(e,t){this._context=e,this._alpha=t}Se.prototype={areaStart:ce,areaEnd:ce,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ae(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ee=function e(t){function n(e){return t?new Se(e,t):new be(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ce(e,t){this._context=e,this._alpha=t}Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ae(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Me=function e(t){function n(e){return t?new Ce(e,t):new xe(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Oe(e){this._context=e}function Le(e){return e<0?-1:1}function De(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Le(o)+Le(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ie(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Re(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Pe(e){this._context=e}function Ne(e){this._context=new ze(e)}function ze(e){this._context=e}function Fe(e){this._context=e}function Be(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function je(e,t){this._context=e,this._t=t}function Ue(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ve(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qe(e,t){return e[t]}function He(e){var t=e.map($e);return Ve(e).sort((function(e,n){return t[e]-t[n]}))}function $e(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function We(e){var t=e.map(Ge);return Ve(e).sort((function(e,n){return t[e]-t[n]}))}function Ge(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}Oe.prototype={areaStart:ce,areaEnd:ce,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Re(this,this._t0,Ie(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Re(this,Ie(this,n=De(this,e,t)),n);break;default:Re(this,this._t0,n=De(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Ne.prototype=Object.create(Pe.prototype)).point=function(e,t){Pe.prototype.point.call(this,t,e)},ze.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Be(e),i=Be(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},je.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},e.arc=function(){var e=m,a=v,A=n(0),k=null,T=y,S=b,E=_,C=null;function M(){var n,m,v=+e.apply(this,arguments),y=+a.apply(this,arguments),b=T.apply(this,arguments)-d,_=S.apply(this,arguments)-d,M=r(_-b),O=_>b;if(C||(C=n=t.path()),y<v&&(m=y,y=v,v=m),y>u)if(M>f-u)C.moveTo(y*o(b),y*l(b)),C.arc(0,0,y,b,_,!O),v>u&&(C.moveTo(v*o(_),v*l(_)),C.arc(0,0,v,_,b,O));else{var L,D,I=b,R=_,P=b,N=_,z=M,F=M,B=E.apply(this,arguments)/2,j=B>u&&(k?+k.apply(this,arguments):c(v*v+y*y)),U=s(r(y-v)/2,+A.apply(this,arguments)),V=U,q=U;if(j>u){var H=g(j/v*l(B)),$=g(j/y*l(B));(z-=2*H)>u?(P+=H*=O?1:-1,N-=H):(z=0,P=N=(b+_)/2),(F-=2*$)>u?(I+=$*=O?1:-1,R-=$):(F=0,I=R=(b+_)/2)}var W=y*o(I),G=y*l(I),Y=v*o(N),X=v*l(N);if(U>u){var Z,K=y*o(R),J=y*l(R),Q=v*o(P),ee=v*l(P);if(M<h&&(Z=x(W,G,Q,ee,K,J,Y,X))){var te=W-Z[0],ne=G-Z[1],re=K-Z[0],ie=J-Z[1],oe=1/l(p((te*re+ne*ie)/(c(te*te+ne*ne)*c(re*re+ie*ie)))/2),ae=c(Z[0]*Z[0]+Z[1]*Z[1]);V=s(U,(v-ae)/(oe-1)),q=s(U,(y-ae)/(oe+1))}}F>u?q>u?(L=w(Q,ee,W,G,y,q,O),D=w(K,J,Y,X,y,q,O),C.moveTo(L.cx+L.x01,L.cy+L.y01),q<U?C.arc(L.cx,L.cy,q,i(L.y01,L.x01),i(D.y01,D.x01),!O):(C.arc(L.cx,L.cy,q,i(L.y01,L.x01),i(L.y11,L.x11),!O),C.arc(0,0,y,i(L.cy+L.y11,L.cx+L.x11),i(D.cy+D.y11,D.cx+D.x11),!O),C.arc(D.cx,D.cy,q,i(D.y11,D.x11),i(D.y01,D.x01),!O))):(C.moveTo(W,G),C.arc(0,0,y,I,R,!O)):C.moveTo(W,G),v>u&&z>u?V>u?(L=w(Y,X,K,J,v,-V,O),D=w(W,G,Q,ee,v,-V,O),C.lineTo(L.cx+L.x01,L.cy+L.y01),V<U?C.arc(L.cx,L.cy,V,i(L.y01,L.x01),i(D.y01,D.x01),!O):(C.arc(L.cx,L.cy,V,i(L.y01,L.x01),i(L.y11,L.x11),!O),C.arc(0,0,v,i(L.cy+L.y11,L.cx+L.x11),i(D.cy+D.y11,D.cx+D.x11),O),C.arc(D.cx,D.cy,V,i(D.y11,D.x11),i(D.y01,D.x01),!O))):C.arc(0,0,v,N,P,O):C.lineTo(Y,X)}else C.moveTo(0,0);if(C.closePath(),n)return C=null,n+""||null}return M.centroid=function(){var t=(+e.apply(this,arguments)+ +a.apply(this,arguments))/2,n=(+T.apply(this,arguments)+ +S.apply(this,arguments))/2-h/2;return[o(n)*t,l(n)*t]},M.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),M):e},M.outerRadius=function(e){return arguments.length?(a="function"==typeof e?e:n(+e),M):a},M.cornerRadius=function(e){return arguments.length?(A="function"==typeof e?e:n(+e),M):A},M.padRadius=function(e){return arguments.length?(k=null==e?null:"function"==typeof e?e:n(+e),M):k},M.startAngle=function(e){return arguments.length?(T="function"==typeof e?e:n(+e),M):T},M.endAngle=function(e){return arguments.length?(S="function"==typeof e?e:n(+e),M):S},M.padAngle=function(e){return arguments.length?(E="function"==typeof e?e:n(+e),M):E},M.context=function(e){return arguments.length?(C=null==e?null:e,M):C},M},e.area=C,e.areaRadial=N,e.curveBasis=function(e){return new he(e)},e.curveBasisClosed=function(e){return new de(e)},e.curveBasisOpen=function(e){return new fe(e)},e.curveBundle=ge,e.curveCardinal=ye,e.curveCardinalClosed=_e,e.curveCardinalOpen=we,e.curveCatmullRom=Te,e.curveCatmullRomClosed=Ee,e.curveCatmullRomOpen=Me,e.curveLinear=k,e.curveLinearClosed=function(e){return new Oe(e)},e.curveMonotoneX=function(e){return new Pe(e)},e.curveMonotoneY=function(e){return new Ne(e)},e.curveNatural=function(e){return new Fe(e)},e.curveStep=function(e){return new je(e,.5)},e.curveStepAfter=function(e){return new je(e,1)},e.curveStepBefore=function(e){return new je(e,0)},e.line=E,e.lineRadial=P,e.linkHorizontal=function(){return U(V)},e.linkRadial=function(){var e=U(H);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e},e.linkVertical=function(){return U(q)},e.pie=function(){var e=O,t=M,r=null,i=n(0),o=n(f),a=n(0);function s(n){var s,l,c,u,h,d=n.length,p=0,g=new Array(d),m=new Array(d),v=+i.apply(this,arguments),y=Math.min(f,Math.max(-f,o.apply(this,arguments)-v)),b=Math.min(Math.abs(y)/d,a.apply(this,arguments)),_=b*(y<0?-1:1);for(s=0;s<d;++s)(h=m[g[s]=s]=+e(n[s],s,n))>0&&(p+=h);for(null!=t?g.sort((function(e,n){return t(m[e],m[n])})):null!=r&&g.sort((function(e,t){return r(n[e],n[t])})),s=0,c=p?(y-d*_)/p:0;s<d;++s,v=u)l=g[s],u=v+((h=m[l])>0?h*c:0)+_,m[l]={data:n[l],index:s,value:h,startAngle:v,endAngle:u,padAngle:b};return m}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,r=null,s):t},s.sort=function(e){return arguments.length?(r=e,t=null,s):r},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:n(+e),s):i},s.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:n(+e),s):o},s.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:n(+e),s):a},s},e.pointRadial=z,e.radialArea=N,e.radialLine=P,e.stack=function(){var e=n([]),t=Ve,r=Ue,i=qe;function o(n){var o,a,s=e.apply(this,arguments),l=n.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var h,d=s[o],f=u[o]=new Array(l),p=0;p<l;++p)f[p]=h=[0,+i(n[p],d,p,n)],h.data=n[p];f.key=d}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return r(u,a),u}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:n(F.call(t)),o):e},o.value=function(e){return arguments.length?(i="function"==typeof e?e:n(+e),o):i},o.order=function(e){return arguments.length?(t=null==e?Ve:"function"==typeof e?e:n(F.call(e)),o):t},o.offset=function(e){return arguments.length?(r=null==e?Ue:e,o):r},o},e.stackOffsetDiverging=function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},e.stackOffsetExpand=function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Ue(e,t)}},e.stackOffsetNone=Ue,e.stackOffsetSilhouette=function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ue(e,t)}},e.stackOffsetWiggle=function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],h=u[a][1]||0,d=(h-(u[a-1][1]||0))/2,f=0;f<s;++f){var p=e[t[f]];d+=(p[a][1]||0)-(p[a-1][1]||0)}l+=h,c+=d*h}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Ue(e,t)}},e.stackOrderAppearance=He,e.stackOrderAscending=We,e.stackOrderDescending=function(e){return We(e).reverse()},e.stackOrderInsideOut=function(e){var t,n,r=e.length,i=e.map(Ge),o=He(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},e.stackOrderNone=Ve,e.stackOrderReverse=function(e){return Ve(e).reverse()},e.symbol=function(){var e=n($),r=n(64),i=null;function o(){var n;if(i||(i=n=t.path()),e.apply(this,arguments).draw(i,+r.apply(this,arguments)),n)return i=null,n+""||null}return o.type=function(t){return arguments.length?(e="function"==typeof t?t:n(t),o):e},o.size=function(e){return arguments.length?(r="function"==typeof e?e:n(+e),o):r},o.context=function(e){return arguments.length?(i=null==e?null:e,o):i},o},e.symbolCircle=$,e.symbolCross=W,e.symbolDiamond=X,e.symbolSquare=ee,e.symbolStar=Q,e.symbolTriangle=ne,e.symbolWye=se,e.symbols=le,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-path")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-path":117}],120:[function(e,t,n){var r,i;r=this,i=function(e,t){"use strict";function n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function r(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function o(e){var o=e.dateTime,a=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,d=e.months,ye=e.shortMonths,be=f(c),_e=p(c),xe=f(u),we=p(u),Ae=f(h),ke=p(h),Te=f(d),Se=p(d),Ee=f(ye),Ce=p(ye),Me={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ye[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:P,e:P,f:j,H:N,I:z,j:F,L:B,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:me,s:ve,S:q,u:H,U:$,V:W,w:G,W:Y,x:null,X:null,y:X,Y:Z,Z:K,"%":ge},Oe={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ye[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:J,e:J,f:re,H:Q,I:ee,j:te,L:ne,m:ie,M:oe,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:me,s:ve,S:ae,u:se,U:le,V:ce,w:ue,W:he,x:null,X:null,y:de,Y:fe,Z:pe,"%":ge},Le={a:function(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.w=ke[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=xe.exec(t.slice(n));return r?(e.w=we[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.m=Ce[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=Te.exec(t.slice(n));return r?(e.m=Se[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,t,n){return Re(e,o,t,n)},d:T,e:T,f:L,H:E,I:E,j:S,L:O,m:k,M:C,p:function(e,t,n){var r=be.exec(t.slice(n));return r?(e.p=_e[r[0].toLowerCase()],n+r[0].length):-1},q:A,Q:I,s:R,S:M,u:m,U:v,V:y,w:g,W:b,x:function(e,t,n){return Re(e,a,t,n)},X:function(e,t,n){return Re(e,l,t,n)},y:x,Y:_,Z:w,"%":D};function De(e,t){return function(n){var r,i,o,a=[],l=-1,c=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===e.charCodeAt(l)&&(a.push(e.slice(c,l)),null!=(i=s[r=e.charAt(++l)])?r=e.charAt(++l):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),c=l+1);return a.push(e.slice(c,l)),a.join("")}}function Ie(e,o){return function(a){var s,l,c=i(1900,void 0,1);if(Re(c,e,a+="",0)!=a.length)return null;if("Q"in c)return new Date(c.Q);if("s"in c)return new Date(1e3*c.s+("L"in c?c.L:0));if(o&&!("Z"in c)&&(c.Z=0),"p"in c&&(c.H=c.H%12+12*c.p),void 0===c.m&&(c.m="q"in c?c.q:0),"V"in c){if(c.V<1||c.V>53)return null;"w"in c||(c.w=1),"Z"in c?(l=(s=r(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=n(i(c.y,0,1))).getDay(),s=l>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?r(i(c.y,0,1)).getUTCDay():n(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,r(c)):n(c)}}function Re(e,t,n,r){for(var i,o,a=0,l=t.length,c=n.length;a<l;){if(r>=c)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=Le[i in s?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Me.x=De(a,Me),Me.X=De(l,Me),Me.c=De(o,Me),Oe.x=De(a,Oe),Oe.X=De(l,Oe),Oe.c=De(o,Oe),{format:function(e){var t=De(e+="",Me);return t.toString=function(){return e},t},parse:function(e){var t=Ie(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=De(e+="",Oe);return t.toString=function(){return e},t},utcParse:function(e){var t=Ie(e+="",!0);return t.toString=function(){return e},t}}}var a,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function d(e){return e.replace(u,"\\$&")}function f(e){return new RegExp("^(?:"+e.map(d).join("|")+")","i")}function p(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function g(e,t,n){var r=l.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function m(e,t,n){var r=l.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function v(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function y(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function b(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _(e,t,n){var r=l.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function x(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function w(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function A(e,t,n){var r=l.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function k(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function T(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function S(e,t,n){var r=l.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function E(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function C(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function M(e,t,n){var r=l.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function O(e,t,n){var r=l.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function L(e,t,n){var r=l.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function D(e,t,n){var r=c.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function I(e,t,n){var r=l.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function R(e,t,n){var r=l.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function P(e,t){return h(e.getDate(),t,2)}function N(e,t){return h(e.getHours(),t,2)}function z(e,t){return h(e.getHours()%12||12,t,2)}function F(e,n){return h(1+t.timeDay.count(t.timeYear(e),e),n,3)}function B(e,t){return h(e.getMilliseconds(),t,3)}function j(e,t){return B(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function $(e,n){return h(t.timeSunday.count(t.timeYear(e)-1,e),n,2)}function W(e,n){var r=e.getDay();return e=r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),n,2)}function G(e){return e.getDay()}function Y(e,n){return h(t.timeMonday.count(t.timeYear(e)-1,e),n,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function Z(e,t){return h(e.getFullYear()%1e4,t,4)}function K(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function J(e,t){return h(e.getUTCDate(),t,2)}function Q(e,t){return h(e.getUTCHours(),t,2)}function ee(e,t){return h(e.getUTCHours()%12||12,t,2)}function te(e,n){return h(1+t.utcDay.count(t.utcYear(e),e),n,3)}function ne(e,t){return h(e.getUTCMilliseconds(),t,3)}function re(e,t){return ne(e,t)+"000"}function ie(e,t){return h(e.getUTCMonth()+1,t,2)}function oe(e,t){return h(e.getUTCMinutes(),t,2)}function ae(e,t){return h(e.getUTCSeconds(),t,2)}function se(e){var t=e.getUTCDay();return 0===t?7:t}function le(e,n){return h(t.utcSunday.count(t.utcYear(e)-1,e),n,2)}function ce(e,n){var r=e.getUTCDay();return e=r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),n,2)}function ue(e){return e.getUTCDay()}function he(e,n){return h(t.utcMonday.count(t.utcYear(e)-1,e),n,2)}function de(e,t){return h(e.getUTCFullYear()%100,t,2)}function fe(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function pe(){return"+0000"}function ge(){return"%"}function me(e){return+e}function ve(e){return Math.floor(+e/1e3)}function ye(t){return a=o(t),e.timeFormat=a.format,e.timeParse=a.parse,e.utcFormat=a.utcFormat,e.utcParse=a.utcParse,a}ye({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var be="%Y-%m-%dT%H:%M:%S.%LZ";var _e=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(be);var xe=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(be);e.isoFormat=_e,e.isoParse=xe,e.timeFormatDefaultLocale=ye,e.timeFormatLocale=o,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?i(n,e("d3-time")):i((r=r||self).d3=r.d3||{},r.d3)},{"d3-time":121}],121:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";var t=new Date,n=new Date;function r(e,i,o,a){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(t){return e(t=new Date(t-1)),i(t,1),e(t),t},s.round=function(e){var t=s(e),n=s.ceil(e);return e-t<n-e?t:n},s.offset=function(e,t){return i(e=new Date(+e),null==t?1:Math.floor(t)),e},s.range=function(t,n,r){var o,a=[];if(t=s.ceil(t),r=null==r?1:Math.floor(r),!(t<n&&r>0))return a;do{a.push(o=new Date(+t)),i(t,r),e(t)}while(o<t&&t<n);return a},s.filter=function(t){return r((function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;i(e,-1),!t(e););else for(;--n>=0;)for(;i(e,1),!t(e););}))},o&&(s.count=function(r,i){return t.setTime(+r),n.setTime(+i),e(t),e(n),Math.floor(o(t,n))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var i=r((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):i:null};var o=i.range,a=1e3,s=6e4,l=36e5,c=864e5,u=6048e5,h=r((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*a)}),(function(e,t){return(t-e)/a}),(function(e){return e.getUTCSeconds()})),d=h.range,f=r((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*a)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getMinutes()})),p=f.range,g=r((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*a-e.getMinutes()*s)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getHours()})),m=g.range,v=r((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/c}),(function(e){return e.getDate()-1})),y=v.range;function b(e){return r((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u}))}var _=b(0),x=b(1),w=b(2),A=b(3),k=b(4),T=b(5),S=b(6),E=_.range,C=x.range,M=w.range,O=A.range,L=k.range,D=T.range,I=S.range,R=r((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),P=R.range,N=r((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));N.every=function(e){return isFinite(e=Math.floor(e))&&e>0?r((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var z=N.range,F=r((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getUTCMinutes()})),B=F.range,j=r((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getUTCHours()})),U=j.range,V=r((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/c}),(function(e){return e.getUTCDate()-1})),q=V.range;function H(e){return r((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/u}))}var $=H(0),W=H(1),G=H(2),Y=H(3),X=H(4),Z=H(5),K=H(6),J=$.range,Q=W.range,ee=G.range,te=Y.range,ne=X.range,re=Z.range,ie=K.range,oe=r((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),ae=oe.range,se=r((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));se.every=function(e){return isFinite(e=Math.floor(e))&&e>0?r((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var le=se.range;e.timeDay=v,e.timeDays=y,e.timeFriday=T,e.timeFridays=D,e.timeHour=g,e.timeHours=m,e.timeInterval=r,e.timeMillisecond=i,e.timeMilliseconds=o,e.timeMinute=f,e.timeMinutes=p,e.timeMonday=x,e.timeMondays=C,e.timeMonth=R,e.timeMonths=P,e.timeSaturday=S,e.timeSaturdays=I,e.timeSecond=h,e.timeSeconds=d,e.timeSunday=_,e.timeSundays=E,e.timeThursday=k,e.timeThursdays=L,e.timeTuesday=w,e.timeTuesdays=M,e.timeWednesday=A,e.timeWednesdays=O,e.timeWeek=_,e.timeWeeks=E,e.timeYear=N,e.timeYears=z,e.utcDay=V,e.utcDays=q,e.utcFriday=Z,e.utcFridays=re,e.utcHour=j,e.utcHours=U,e.utcMillisecond=i,e.utcMilliseconds=o,e.utcMinute=F,e.utcMinutes=B,e.utcMonday=W,e.utcMondays=Q,e.utcMonth=oe,e.utcMonths=ae,e.utcSaturday=K,e.utcSaturdays=ie,e.utcSecond=h,e.utcSeconds=d,e.utcSunday=$,e.utcSundays=J,e.utcThursday=X,e.utcThursdays=ne,e.utcTuesday=G,e.utcTuesdays=ee,e.utcWednesday=Y,e.utcWednesdays=te,e.utcWeek=$,e.utcWeeks=J,e.utcYear=se,e.utcYears=le,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],122:[function(e,t,n){arguments[4][121][0].apply(n,arguments)},{dup:121}],123:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";var t,n,r=0,i=0,o=0,a=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return s||(u(d),s=c.now()+l)}function d(){s=0}function f(){this._call=this._time=this._next=null}function p(e,t,n){var r=new f;return r.restart(e,t,n),r}function g(){h(),++r;for(var e,n=t;n;)(e=s-n._time)>=0&&n._call.call(null,e),n=n._next;--r}function m(){s=(a=c.now())+l,r=i=0;try{g()}finally{r=0,function(){for(var e,r,i=t,o=1/0;i;)i._call?(o>i._time&&(o=i._time),e=i,i=i._next):(r=i._next,i._next=null,i=e?e._next=r:t=r);n=e,y(o)}(),s=0}}function v(){var e=c.now(),t=e-a;t>1e3&&(l-=t,a=e)}function y(e){r||(i&&(i=clearTimeout(i)),e-s>24?(e<1/0&&(i=setTimeout(m,e-c.now()-l)),o&&(o=clearInterval(o))):(o||(a=c.now(),o=setInterval(v,1e3)),r=1,u(m)))}f.prototype=p.prototype={constructor:f,restart:function(e,r,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?h():+i)+(null==r?0:+r),this._next||n===this||(n?n._next=this:t=this,n=this),this._call=e,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},e.interval=function(e,t,n){var r=new f,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?h():+n,r.restart((function o(a){a+=i,r.restart(o,i+=t,n),e(a)}),t,n),r)},e.now=h,e.timeout=function(e,t,n){var r=new f;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r},e.timer=p,e.timerFlush=g,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).d3=r.d3||{})},{}],124:[function(e,t,n){t.exports=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}},{}],125:[function(e,t,n){"use strict";t.exports=o;var r=(o.canvas=document.createElement("canvas")).getContext("2d"),i=a([32,126]);function o(e,t){Array.isArray(e)&&(e=e.join(", "));var n,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?n=a(t):Array.isArray(t)?n=t:(t.o?n=a(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),n||(n=i),r.font=s+"px "+e;for(var c=0;c<n.length;c++){var u=n[c],h=r.measureText(u[0]).width+r.measureText(u[1]).width,d=r.measureText(u).width;if(Math.abs(h-d)>s*l){var f=(d-h)/s;o[u]=1e3*f}}return o}function a(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),i=e[0];i<e[1];i++){var o=r+String.fromCharCode(i);t.push(o)}return t}o.createPairs=a,o.ascii=i},{}],126:[function(e,t,n){var r=e("abs-svg-path"),i=e("normalize-svg-path"),o={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),i(r(t)).forEach((function(t){var n=t[0],r=t.slice(1);e[o[n]].apply(e,r)})),e.closePath()}},{"abs-svg-path":70,"normalize-svg-path":246}],127:[function(e,t,n){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],128:[function(e,t,n){"use strict";function r(e,t,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o<i;++o)a[o]=t;else for(o=0;o<i;++o)a[o]=r(e,t,n+1);return a}t.exports=function(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var n,r;for(n=new Array(e),r=0;r<e;++r)n[r]=t;return n}(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}},{}],129:[function(e,t,n){"use strict";function r(e,t,n){n=n||2;var r,s,l,c,u,f,p,m=t&&t.length,v=m?t[0]*n:e.length,y=i(e,0,v,n,!0),b=[];if(!y||y.next===y.prev)return b;if(m&&(y=function(e,t,n,r){var a,s,l,c=[];for(a=0,s=t.length;a<s;a++)(l=i(e,t[a]*r,a<s-1?t[a+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),c.push(g(l));for(c.sort(h),a=0;a<c.length;a++)d(c[a],n),n=o(n,n.next);return n}(e,t,y,n)),e.length>80*n){r=l=e[0],s=c=e[1];for(var _=n;_<v;_+=n)(u=e[_])<r&&(r=u),(f=e[_+1])<s&&(s=f),u>l&&(l=u),f>c&&(c=f);p=0!==(p=Math.max(l-r,c-s))?1/p:0}return a(y,b,n,r,s,p),b}function i(e,t,n,r,i){var o,a;if(i===C(e,t,n,r)>0)for(o=t;o<n;o+=r)a=T(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=T(o,e[o],e[o+1],a);return a&&b(a,a.next)&&(S(a),a=a.next),a}function o(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{if(S(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,i,h,d){if(e){!d&&h&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=p(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,h);for(var f,g,m=e;e.prev!==e.next;)if(f=e.prev,g=e.next,h?l(e,r,i,h):s(e))t.push(f.i/n),t.push(e.i/n),t.push(g.i/n),S(e),e=g.next,m=g.next;else if((e=g)===m){d?1===d?a(e=c(o(e),t,n),t,n,r,i,h,2):2===d&&u(e,t,n,r,i,h):a(o(e),t,n,r,i,h,1);break}}}function s(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(e,t,n,r){var i=e.prev,o=e,a=e.next;if(y(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=p(s,l,t,n,r),d=p(c,u,t,n,r),f=e.prevZ,g=e.nextZ;f&&f.z>=h&&g&&g.z<=d;){if(f!==e.prev&&f!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;g&&g.z<=d;){if(g!==e.prev&&g!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!b(i,a)&&_(i,r,r.next,a)&&A(i,a)&&A(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),S(r),S(r.next),r=e=a),r=r.next}while(r!==e);return o(r)}function u(e,t,n,r,i,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=k(l,c);return l=o(l,l.next),u=o(u,u.next),a(l,t,n,r,i,s),void a(u,t,n,r,i,s)}c=c.next}l=l.next}while(l!==e)}function h(e,t){return e.x-t.x}function d(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),A(r,e)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(e,t)){var n=k(t,e);o(t,t.next),o(n,n.next)}}function f(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function p(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&_(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(A(e,t)&&A(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||b(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function _(e,t,n,r){var i=w(y(e,t,n)),o=w(y(e,t,r)),a=w(y(n,r,e)),s=w(y(n,r,t));return i!==o&&a!==s||!(0!==i||!x(e,n,t))||!(0!==o||!x(e,r,t))||!(0!==a||!x(n,e,r))||!(0!==s||!x(n,t,r))}function x(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function w(e){return e>0?1:e<0?-1:0}function A(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function k(e,t){var n=new E(e.i,e.x,e.y),r=new E(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function T(e,t,n,r){var i=new E(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function E(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(C(e,0,o,n));if(i)for(var s=0,l=t.length;s<l;s++){var c=t[s]*n,u=s<l-1?t[s+1]*n:e.length;a-=Math.abs(C(e,c,u,n))}var h=0;for(s=0;s<r.length;s+=3){var d=r[s]*n,f=r[s+1]*n,p=r[s+2]*n;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n}},{}],130:[function(e,t,n){var r=e("strongly-connected-components");t.exports=function(e,t){var n,i=[],o=[],a=[],s={},l=[];function c(e){a[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],a[t]&&c(t)}))}function u(e){var t,r,i=!1;for(o.push(e),a[e]=!0,t=0;t<l[e].length;t++)(r=l[e][t])===n?(h(n,o),i=!0):a[r]||(i=u(r));if(i)c(e);else for(t=0;t<l[e].length;t++){r=l[e][t];var d=s[r];d||(d={},s[r]=d),d[r]=!0}return o.pop(),i}function h(e,n){var r=[].concat(n).concat(e);t?t(u):i.push(r)}function d(t){!function(t){for(var n=0;n<e.length;n++)n<t&&(e[n]=[]),e[n]=e[n].filter((function(e){return e>=t}))}(t);for(var n,i=r(e).components.filter((function(e){return e.length>1})),o=1/0,a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]<o&&(o=i[a][s],n=a);var l=i[n];if(!l)return!1;var c=e.map((function(e,t){return-1===l.indexOf(t)?[]:e.filter((function(e){return-1!==l.indexOf(e)}))}));return{leastVertex:o,adjList:c}}n=0;for(var f=e.length;n<f;){var p=d(n);if(n=p.leastVertex,l=p.adjList){for(var g=0;g<l.length;g++)for(var m=0;m<l[g].length;m++){var v=l[g][m];a[+v]=!1,s[v]={}}u(n),n+=1}else n=f}return t?void 0:i}},{"strongly-connected-components":306}],131:[function(e,t,n){"use strict";var r=e("../../object/valid-value");t.exports=function(){return r(this).length=0,this}},{"../../object/valid-value":162}],132:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Array.from:e("./shim")},{"./is-implemented":133,"./shim":134}],133:[function(e,t,n){"use strict";t.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(t=n(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},{}],134:[function(e,t,n){"use strict";var r=e("es6-symbol").iterator,i=e("../../function/is-arguments"),o=e("../../function/is-function"),a=e("../../number/to-pos-integer"),s=e("../../object/valid-callable"),l=e("../../object/valid-value"),c=e("../../object/is-value"),u=e("../../string/is-string"),h=Array.isArray,d=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(e){var t,n,g,m,v,y,b,_,x,w,A=arguments[1],k=arguments[2];if(e=Object(l(e)),c(A)&&s(A),this&&this!==Array&&o(this))t=this;else{if(!A){if(i(e))return 1!==(v=e.length)?Array.apply(null,e):((m=new Array(1))[0]=e[0],m);if(h(e)){for(m=new Array(v=e.length),n=0;n<v;++n)m[n]=e[n];return m}}m=[]}if(!h(e))if(void 0!==(x=e[r])){for(b=s(x).call(e),t&&(m=new t),_=b.next(),n=0;!_.done;)w=A?d.call(A,k,_.value,n):_.value,t?(f.value=w,p(m,n,f)):m[n]=w,_=b.next(),++n;v=n}else if(u(e)){for(v=e.length,t&&(m=new t),n=0,g=0;n<v;++n)w=e[n],n+1<v&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=e[++n]),w=A?d.call(A,k,w,g):w,t?(f.value=w,p(m,g,f)):m[g]=w,++g;v=g}if(void 0===v)for(v=a(e.length),t&&(m=new t(v)),n=0;n<v;++n)w=A?d.call(A,k,e[n],n):e[n],t?(f.value=w,p(m,n,f)):m[n]=w;return t&&(f.value=null,m.length=v),m}},{"../../function/is-arguments":135,"../../function/is-function":136,"../../number/to-pos-integer":142,"../../object/is-value":151,"../../object/valid-callable":160,"../../object/valid-value":162,"../../string/is-string":166,"es6-symbol":175}],135:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===i}},{}],136:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&i(r.call(e))}},{}],137:[function(e,t,n){"use strict";t.exports=function(){}},{}],138:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Math.sign:e("./shim")},{"./is-implemented":139,"./shim":140}],139:[function(e,t,n){"use strict";t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}},{}],140:[function(e,t,n){"use strict";t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},{}],141:[function(e,t,n){"use strict";var r=e("../math/sign"),i=Math.abs,o=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*o(i(e)):e}},{"../math/sign":138}],142:[function(e,t,n){"use strict";var r=e("./to-integer"),i=Math.max;t.exports=function(e){return i(0,r(e))}},{"./to-integer":141}],143:[function(e,t,n){"use strict";var r=e("./valid-callable"),i=e("./valid-value"),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(n,c){var u,h=arguments[2],d=arguments[3];return n=Object(i(n)),r(c),u=s(n),d&&u.sort("function"==typeof d?o.call(d,n):void 0),"function"!=typeof e&&(e=u[e]),a.call(e,u,(function(e,r){return l.call(n,e)?a.call(c,h,n[e],e,n,r):t}))}}},{"./valid-callable":160,"./valid-value":162}],144:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(e,t,n){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],146:[function(e,t,n){"use strict";var r=e("../keys"),i=e("../valid-value"),o=Math.max;t.exports=function(e,t){var n,a,s,l=o(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a<l;++a)r(t=arguments[a]).forEach(s);if(void 0!==n)throw n;return e}},{"../keys":152,"../valid-value":162}],147:[function(e,t,n){"use strict";var r=e("../array/from"),i=e("./assign"),o=e("./valid-value");t.exports=function(e){var t=Object(o(e)),n=arguments[1],a=Object(arguments[2]);if(t!==e&&!n)return t;var s={};return n?r(n,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):i(s,e),s}},{"../array/from":132,"./assign":144,"./valid-value":162}],148:[function(e,t,n){"use strict";var r,i,o,a,s=Object.create;e("./set-prototype-of/is-implemented")()||(r=e("./set-prototype-of/shim")),t.exports=r?1!==r.level?s:(i={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){o[e]="__proto__"!==e?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,o),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(e,t){return s(null===e?i:e,t)}):s},{"./set-prototype-of/is-implemented":158,"./set-prototype-of/shim":159}],149:[function(e,t,n){"use strict";t.exports=e("./_iterate")("forEach")},{"./_iterate":143}],150:[function(e,t,n){"use strict";var r=e("./is-value"),i={function:!0,object:!0};t.exports=function(e){return r(e)&&i[typeof e]||!1}},{"./is-value":151}],151:[function(e,t,n){"use strict";var r=e("../function/noop")();t.exports=function(e){return e!==r&&null!==e}},{"../function/noop":137}],152:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Object.keys:e("./shim")},{"./is-implemented":153,"./shim":154}],153:[function(e,t,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},{}],154:[function(e,t,n){"use strict";var r=e("../is-value"),i=Object.keys;t.exports=function(e){return i(r(e)?Object(e):e)}},{"../is-value":151}],155:[function(e,t,n){"use strict";var r=e("./valid-callable"),i=e("./for-each"),o=Function.prototype.call;t.exports=function(e,t){var n={},a=arguments[2];return r(t),i(e,(function(e,r,i,s){n[r]=o.call(t,a,e,r,i,s)})),n}},{"./for-each":149,"./valid-callable":160}],156:[function(e,t,n){"use strict";var r=e("./is-value"),i=Array.prototype.forEach,o=Object.create,a=function(e,t){var n;for(n in e)t[n]=e[n]};t.exports=function(e){var t=o(null);return i.call(arguments,(function(e){r(e)&&a(Object(e),t)})),t}},{"./is-value":151}],157:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?Object.setPrototypeOf:e("./shim")},{"./is-implemented":158,"./shim":159}],158:[function(e,t,n){"use strict";var r=Object.create,i=Object.getPrototypeOf,o={};t.exports=function(){var e=Object.setPrototypeOf;return"function"==typeof e&&i(e((arguments[0]||r)(null),o))===o}},{}],159:[function(e,t,n){"use strict";var r,i,o,a,s=e("../is-object"),l=e("../valid-value"),c=Object.prototype.isPrototypeOf,u=Object.defineProperty,h={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(l(e),null===t||s(t))return e;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{(e=r.set).call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return t.__proto__=n,Object.getPrototypeOf(t)===n?{level:2}:((t={}).__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}(),i?(2===i.level?i.set?(a=i.set,o=function(e,t){return a.call(r(e,t),t),e}):o=function(e,t){return r(e,t).__proto__=t,e}:o=function e(t,n){var i;return r(t,n),(i=c.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&u(e.nullPolyfill,"__proto__",h),t},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),e("../create")},{"../create":148,"../is-object":150,"../valid-value":162}],160:[function(e,t,n){"use strict";t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},{}],161:[function(e,t,n){"use strict";var r=e("./is-object");t.exports=function(e){if(!r(e))throw new TypeError(e+" is not an Object");return e}},{"./is-object":150}],162:[function(e,t,n){"use strict";var r=e("./is-value");t.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},{"./is-value":151}],163:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?String.prototype.contains:e("./shim")},{"./is-implemented":164,"./shim":165}],164:[function(e,t,n){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},{}],165:[function(e,t,n){"use strict";var r=String.prototype.indexOf;t.exports=function(e){return r.call(this,e,arguments[1])>-1}},{}],166:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}},{}],167:[function(e,t,n){"use strict";var r=Object.create(null),i=Math.random;t.exports=function(){var e;do{e=i().toString(36).slice(2)}while(r[e]);return e}},{}],168:[function(e,t,n){"use strict";var r,i=e("es5-ext/object/set-prototype-of"),o=e("es5-ext/string/#/contains"),a=e("d"),s=e("es6-symbol"),l=e("./"),c=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",c(this,"__kind__",a("",t))},i&&i(r,l),delete r.prototype.constructor,r.prototype=Object.create(l.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(r.prototype,s.toStringTag,a("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(e,t,n){"use strict";var r=e("es5-ext/function/is-arguments"),i=e("es5-ext/object/valid-callable"),o=e("es5-ext/string/is-string"),a=e("./get"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(e,t){var n,u,h,d,f,p,g,m,v=arguments[2];if(s(e)||r(e)?n="array":o(e)?n="string":e=a(e),i(t),h=function(){d=!0},"array"!==n)if("string"!==n)for(u=e.next();!u.done;){if(l.call(t,v,u.value,h),d)return;u=e.next()}else for(p=e.length,f=0;f<p&&(g=e[f],f+1<p&&(m=g.charCodeAt(0))>=55296&&m<=56319&&(g+=e[++f]),l.call(t,v,g,h),!d);++f);else c.call(e,(function(e){return l.call(t,v,e,h),d}))}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(e,t,n){"use strict";var r=e("es5-ext/function/is-arguments"),i=e("es5-ext/string/is-string"),o=e("./array"),a=e("./string"),s=e("./valid-iterable"),l=e("es6-symbol").iterator;t.exports=function(e){return"function"==typeof s(e)[l]?e[l]():r(e)?new o(e):i(e)?new a(e):new o(e)}},{"./array":168,"./string":173,"./valid-iterable":174,"es5-ext/function/is-arguments":135,"es5-ext/string/is-string":166,"es6-symbol":175}],171:[function(e,t,n){"use strict";var r,i=e("es5-ext/array/#/clear"),o=e("es5-ext/object/assign"),a=e("es5-ext/object/valid-callable"),s=e("es5-ext/object/valid-value"),l=e("d"),c=e("d/auto-bind"),u=e("es6-symbol"),h=Object.defineProperty,d=Object.defineProperties;t.exports=r=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");d(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete r.prototype.constructor,d(r.prototype,o({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:l((function(){return this._createResult(this._next())})),_createResult:l((function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}})),_resolve:l((function(e){return this.__list__[e]})),_unBind:l((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:l((function(){return"[object "+(this[u.toStringTag]||"Object")+"]"}))},c({_onAdd:l((function(e){e>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,n){t>=e&&(this.__redo__[n]=++t)}),this),this.__redo__.push(e)):h(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,n){t>e&&(this.__redo__[n]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),h(r.prototype,u.iterator,l((function(){return this})))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/valid-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(e,t,n){"use strict";var r=e("es5-ext/function/is-arguments"),i=e("es5-ext/object/is-value"),o=e("es5-ext/string/is-string"),a=e("es6-symbol").iterator,s=Array.isArray;t.exports=function(e){return!(!i(e)||!s(e)&&!o(e)&&!r(e)&&"function"!=typeof e[a])}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(e,t,n){"use strict";var r,i=e("es5-ext/object/set-prototype-of"),o=e("d"),a=e("es6-symbol"),s=e("./"),l=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",o("",e.length))},i&&i(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:o((function(e){var t,n=this.__list__[e];return this.__nextIndex__===this.__length__?n:(t=n.charCodeAt(0))>=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n}))}),l(r.prototype,a.toStringTag,o("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(e,t,n){"use strict";var r=e("./is-iterable");t.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}},{"./is-iterable":172}],175:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?e("ext/global-this").Symbol:e("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(e,t,n){"use strict";var r=e("ext/global-this"),i={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!i[typeof t.iterator]&&!!i[typeof t.toPrimitive]&&!!i[typeof t.toStringTag]}},{"ext/global-this":188}],177:[function(e,t,n){"use strict";t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},{}],178:[function(e,t,n){"use strict";var r=e("d"),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);t.exports=function(e){for(var t,n,i=0;s[e+(i||"")];)++i;return s[e+=i||""]=!0,o(a,t="@@"+e,r.gs(null,(function(e){n||(n=!0,o(this,t,r(e)),n=!1)}))),t}},{d:106}],179:[function(e,t,n){"use strict";var r=e("d"),i=e("ext/global-this").Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",i&&i.iterator||e("iterator")),match:r("",i&&i.match||e("match")),replace:r("",i&&i.replace||e("replace")),search:r("",i&&i.search||e("search")),species:r("",i&&i.species||e("species")),split:r("",i&&i.split||e("split")),toPrimitive:r("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:r("",i&&i.toStringTag||e("toStringTag")),unscopables:r("",i&&i.unscopables||e("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(e,t,n){"use strict";var r=e("d"),i=e("../../../validate-symbol"),o=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:r((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},{"../../../validate-symbol":182,d:106}],181:[function(e,t,n){"use strict";var r,i,o,a=e("d"),s=e("./validate-symbol"),l=e("ext/global-this").Symbol,c=e("./lib/private/generate-name"),u=e("./lib/private/setup/standard-symbols"),h=e("./lib/private/setup/symbol-registry"),d=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),o=!0}catch(e){}else l=null;i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?l(t):(n=d(i.prototype),t=void 0===t?"":String(t),f(n,{__description__:a("",t),__name__:a("",c(t))}))},u(r),h(r),f(i.prototype,{constructor:a(r),toString:a("",(function(){return this.__name__}))}),f(r.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(r.prototype,r.toPrimitive,a("",(function(){var e=s(this);return"symbol"==typeof e?e:e.toString()}))),p(r.prototype,r.toStringTag,a("c","Symbol")),p(i.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),p(i.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))},{"./lib/private/generate-name":178,"./lib/private/setup/standard-symbols":179,"./lib/private/setup/symbol-registry":180,"./validate-symbol":182,d:106,"ext/global-this":188}],182:[function(e,t,n){"use strict";var r=e("./is-symbol");t.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}},{"./is-symbol":177}],183:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?WeakMap:e("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(e,t,n){"use strict";t.exports=function(){var e,t;if("function"!=typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(e){return!1}return"[object WeakMap]"===String(e)&&"function"==typeof e.set&&e.set({},1)===e&&"function"==typeof e.delete&&"function"==typeof e.has&&"one"===e.get(t)}},{}],185:[function(e,t,n){"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(e,t,n){"use strict";var r,i=e("es5-ext/object/is-value"),o=e("es5-ext/object/set-prototype-of"),a=e("es5-ext/object/valid-object"),s=e("es5-ext/object/valid-value"),l=e("es5-ext/string/random-uniq"),c=e("d"),u=e("es6-iterator/get"),h=e("es6-iterator/for-of"),d=e("es6-symbol").toStringTag,f=e("./is-native-implemented"),p=Array.isArray,g=Object.defineProperty,m=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return e=f&&o&&WeakMap!==r?o(new WeakMap,v(this)):this,i(t)&&(p(t)||(t=u(t))),g(e,"__weakMapData__",c("c","$weakMap$"+l())),t?(h(t,(function(t){s(t),e.set(t[0],t[1])})),e):e},f&&(o&&o(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:c(r)})),Object.defineProperties(r.prototype,{delete:c((function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:c((function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:c((function(e){return m.call(a(e),this.__weakMapData__)})),set:c((function(e,t){return g(a(e),this.__weakMapData__,c("c",t)),this})),toString:c((function(){return"[object WeakMap]"}))}),g(r.prototype,d,c("c","WeakMap"))},{"./is-native-implemented":185,d:106,"es5-ext/object/is-value":151,"es5-ext/object/set-prototype-of":157,"es5-ext/object/valid-object":161,"es5-ext/object/valid-value":162,"es5-ext/string/random-uniq":167,"es6-iterator/for-of":169,"es6-iterator/get":170,"es6-symbol":175}],187:[function(e,t,n){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()},{}],188:[function(e,t,n){"use strict";t.exports=e("./is-implemented")()?globalThis:e("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(e,t,n){"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(e,t,n){"use strict";var r=e("is-string-blank");t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0==(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}},{"is-string-blank":237}],191:[function(e,t,n){var r=e("dtype");t.exports=function(e,t,n){if(!e)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!=typeof t||(t=new(r(t||"float32"))(c+n));var u=t.length-n;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=n;i<e.length;i++)for(o=0;o<l;o++)t[a++]=null===e[i][o]?NaN:e[i][o]}else if(t&&"string"!=typeof t)t.set(e,n);else{var h=r(t||"float32");if(Array.isArray(e)||"array"===t)for(i=0,a=n,s=(t=new h(e.length+n)).length;a<s;a++,i++)t[a]=null===e[i]?NaN:e[i];else 0===n?t=new h(e):(t=new h(e.length+n)).set(e,n)}return t}},{dtype:127}],192:[function(e,t,n){"use strict";var r=e("css-font/stringify"),i=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],n=e.canvas||document.createElement("canvas"),o=e.font,a="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;if(o&&"string"!=typeof o&&(o=r(o)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),n.width=t[0],n.height=t[1];var h=n.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,n.width,n.height),h.font=o,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";var d=a[0]/2,f=a[1]/2;for(c=0;c<s.length;c++)h.fillText(s[c],d,f),(d+=a[0])>t[0]-a[0]/2&&(d=a[0]/2,f+=a[1]);return n}},{"css-font/stringify":102}],193:[function(e,t,n){"use strict";function r(e,t){t||(t={}),("string"==typeof e||Array.isArray(e))&&(t.family=e);var n=Array.isArray(t.family)?t.family.join(", "):t.family;if(!n)throw Error("`family` must be defined");var s=t.size||t.fontSize||t.em||48,l=t.weight||t.fontWeight||"",c=(e=[t.style||t.fontStyle||"",l,s].join(" ")+"px "+n,t.origin||"top");if(r.cache[n]&&s<=r.cache[n].em)return i(r.cache[n],c);var u=t.canvas||r.canvas,h=u.getContext("2d"),d={upper:void 0!==t.upper?t.upper:"H",lower:void 0!==t.lower?t.lower:"x",descent:void 0!==t.descent?t.descent:"p",ascent:void 0!==t.ascent?t.ascent:"h",tittle:void 0!==t.tittle?t.tittle:"i",overshoot:void 0!==t.overshoot?t.overshoot:"O"},f=Math.ceil(1.5*s);u.height=f,u.width=.5*f,h.font=e;var p="H",g={top:0};h.clearRect(0,0,f,f),h.textBaseline="top",h.fillStyle="black",h.fillText(p,0,0);var m=o(h.getImageData(0,0,f,f));h.clearRect(0,0,f,f),h.textBaseline="bottom",h.fillText(p,0,f);var v=o(h.getImageData(0,0,f,f));g.lineHeight=g.bottom=f-v+m,h.clearRect(0,0,f,f),h.textBaseline="alphabetic",h.fillText(p,0,f);var y=f-o(h.getImageData(0,0,f,f))-1+m;g.baseline=g.alphabetic=y,h.clearRect(0,0,f,f),h.textBaseline="middle",h.fillText(p,0,.5*f);var b=o(h.getImageData(0,0,f,f));g.median=g.middle=f-b-1+m-.5*f,h.clearRect(0,0,f,f),h.textBaseline="hanging",h.fillText(p,0,.5*f);var _=o(h.getImageData(0,0,f,f));g.hanging=f-_-1+m-.5*f,h.clearRect(0,0,f,f),h.textBaseline="ideographic",h.fillText(p,0,f);var x=o(h.getImageData(0,0,f,f));if(g.ideographic=f-x-1+m,d.upper&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.upper,0,0),g.upper=o(h.getImageData(0,0,f,f)),g.capHeight=g.baseline-g.upper),d.lower&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.lower,0,0),g.lower=o(h.getImageData(0,0,f,f)),g.xHeight=g.baseline-g.lower),d.tittle&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.tittle,0,0),g.tittle=o(h.getImageData(0,0,f,f))),d.ascent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.ascent,0,0),g.ascent=o(h.getImageData(0,0,f,f))),d.descent&&(h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.descent,0,0),g.descent=a(h.getImageData(0,0,f,f))),d.overshoot){h.clearRect(0,0,f,f),h.textBaseline="top",h.fillText(d.overshoot,0,0);var w=a(h.getImageData(0,0,f,f));g.overshoot=w-y}for(var A in g)g[A]/=s;return g.em=s,r.cache[n]=g,i(g,c)}function i(e,t){var n={};for(var r in"string"==typeof t&&(t=e[t]),e)"em"!==r&&(n[r]=e[r]-t);return n}function o(e){for(var t=e.height,n=e.data,r=3;r<n.length;r+=4)if(0!==n[r])return Math.floor(.25*(r-3)/t)}function a(e){for(var t=e.height,n=e.data,r=n.length-1;r>0;r-=4)if(0!==n[r])return Math.floor(.25*(r-3)/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}},{}],194:[function(e,t,n){t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("must specify type string");if(t=t||{},"undefined"==typeof document&&!t.canvas)return null;var n=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(n.width=t.width),"number"==typeof t.height&&(n.height=t.height);var r,i=t;try{var o=[e];0===e.indexOf("webgl")&&o.push("experimental-"+e);for(var a=0;a<o.length;a++)if(r=n.getContext(o[a],i))return r}catch(e){r=null}return r||null}},{}],195:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],g=t[13],m=t[14],v=t[15];return e[0]=s*(d*v-f*m)-h*(l*v-c*m)+g*(l*f-c*d),e[1]=-(r*(d*v-f*m)-h*(i*v-o*m)+g*(i*f-o*d)),e[2]=r*(l*v-c*m)-s*(i*v-o*m)+g*(i*c-o*l),e[3]=-(r*(l*f-c*d)-s*(i*f-o*d)+h*(i*c-o*l)),e[4]=-(a*(d*v-f*m)-u*(l*v-c*m)+p*(l*f-c*d)),e[5]=n*(d*v-f*m)-u*(i*v-o*m)+p*(i*f-o*d),e[6]=-(n*(l*v-c*m)-a*(i*v-o*m)+p*(i*c-o*l)),e[7]=n*(l*f-c*d)-a*(i*f-o*d)+u*(i*c-o*l),e[8]=a*(h*v-f*g)-u*(s*v-c*g)+p*(s*f-c*h),e[9]=-(n*(h*v-f*g)-u*(r*v-o*g)+p*(r*f-o*h)),e[10]=n*(s*v-c*g)-a*(r*v-o*g)+p*(r*c-o*s),e[11]=-(n*(s*f-c*h)-a*(r*f-o*h)+u*(r*c-o*s)),e[12]=-(a*(h*m-d*g)-u*(s*m-l*g)+p*(s*d-l*h)),e[13]=n*(h*m-d*g)-u*(r*m-i*g)+p*(r*d-i*h),e[14]=-(n*(s*m-l*g)-a*(r*m-i*g)+p*(r*l-i*s)),e[15]=n*(s*d-l*h)-a*(r*d-i*h)+u*(r*l-i*s),e}},{}],196:[function(e,t,n){t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],197:[function(e,t,n){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],198:[function(e,t,n){t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],199:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],g=e[14],m=e[15];return(t*a-n*o)*(h*m-d*g)-(t*s-r*o)*(u*m-d*p)+(t*l-i*o)*(u*g-h*p)+(n*s-r*a)*(c*m-d*f)-(n*l-i*a)*(c*g-h*f)+(r*l-i*s)*(c*p-u*f)}},{}],200:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,c=n*a,u=r*a,h=r*s,d=i*a,f=i*s,p=i*l,g=o*a,m=o*s,v=o*l;return e[0]=1-h-p,e[1]=u+v,e[2]=d-m,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=f+g,e[7]=0,e[8]=d+m,e[9]=f-g,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],201:[function(e,t,n){t.exports=function(e,t,n){var r,i,o,a=n[0],s=n[1],l=n[2],c=Math.sqrt(a*a+s*s+l*l);return Math.abs(c)<1e-6?null:(a*=c=1/c,s*=c,l*=c,r=Math.sin(t),o=1-(i=Math.cos(t)),e[0]=a*a*o+i,e[1]=s*a*o+l*r,e[2]=l*a*o-s*r,e[3]=0,e[4]=a*s*o-l*r,e[5]=s*s*o+i,e[6]=l*s*o+a*r,e[7]=0,e[8]=a*l*o+s*r,e[9]=s*l*o-a*r,e[10]=l*l*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},{}],202:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,c=o+o,u=r*s,h=r*l,d=r*c,f=i*l,p=i*c,g=o*c,m=a*s,v=a*l,y=a*c;return e[0]=1-(f+g),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(u+g),e[6]=p+m,e[7]=0,e[8]=d+v,e[9]=p-m,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},{}],203:[function(e,t,n){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],204:[function(e,t,n){t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},{}],205:[function(e,t,n){t.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],206:[function(e,t,n){t.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],207:[function(e,t,n){t.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],208:[function(e,t,n){t.exports=function(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),c=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*c,e[15]=0,e}},{}],209:[function(e,t,n){t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],210:[function(e,t,n){t.exports={create:e("./create"),clone:e("./clone"),copy:e("./copy"),identity:e("./identity"),transpose:e("./transpose"),invert:e("./invert"),adjoint:e("./adjoint"),determinant:e("./determinant"),multiply:e("./multiply"),translate:e("./translate"),scale:e("./scale"),rotate:e("./rotate"),rotateX:e("./rotateX"),rotateY:e("./rotateY"),rotateZ:e("./rotateZ"),fromRotation:e("./fromRotation"),fromRotationTranslation:e("./fromRotationTranslation"),fromScaling:e("./fromScaling"),fromTranslation:e("./fromTranslation"),fromXRotation:e("./fromXRotation"),fromYRotation:e("./fromYRotation"),fromZRotation:e("./fromZRotation"),fromQuat:e("./fromQuat"),frustum:e("./frustum"),perspective:e("./perspective"),perspectiveFromFieldOfView:e("./perspectiveFromFieldOfView"),ortho:e("./ortho"),lookAt:e("./lookAt"),str:e("./str")}},{"./adjoint":195,"./clone":196,"./copy":197,"./create":198,"./determinant":199,"./fromQuat":200,"./fromRotation":201,"./fromRotationTranslation":202,"./fromScaling":203,"./fromTranslation":204,"./fromXRotation":205,"./fromYRotation":206,"./fromZRotation":207,"./frustum":208,"./identity":209,"./invert":211,"./lookAt":212,"./multiply":213,"./ortho":214,"./perspective":215,"./perspectiveFromFieldOfView":216,"./rotate":217,"./rotateX":218,"./rotateY":219,"./rotateZ":220,"./scale":221,"./str":222,"./translate":223,"./transpose":224}],211:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],g=t[13],m=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,_=n*c-o*a,x=r*l-i*s,w=r*c-o*s,A=i*c-o*l,k=u*g-h*p,T=u*m-d*p,S=u*v-f*p,E=h*m-d*g,C=h*v-f*g,M=d*v-f*m,O=y*M-b*C+_*E+x*S-w*T+A*k;return O?(O=1/O,e[0]=(s*M-l*C+c*E)*O,e[1]=(i*C-r*M-o*E)*O,e[2]=(g*A-m*w+v*x)*O,e[3]=(d*w-h*A-f*x)*O,e[4]=(l*S-a*M-c*T)*O,e[5]=(n*M-i*S+o*T)*O,e[6]=(m*_-p*A-v*b)*O,e[7]=(u*A-d*_+f*b)*O,e[8]=(a*C-s*S+c*k)*O,e[9]=(r*S-n*C-o*k)*O,e[10]=(p*w-g*_+v*y)*O,e[11]=(h*_-u*w-f*y)*O,e[12]=(s*T-a*E-l*k)*O,e[13]=(n*E-r*T+i*k)*O,e[14]=(g*b-p*x-m*y)*O,e[15]=(u*x-h*b+d*y)*O,e):null}},{}],212:[function(e,t,n){var r=e("./identity");t.exports=function(e,t,n,i){var o,a,s,l,c,u,h,d,f,p,g=t[0],m=t[1],v=t[2],y=i[0],b=i[1],_=i[2],x=n[0],w=n[1],A=n[2];return Math.abs(g-x)<1e-6&&Math.abs(m-w)<1e-6&&Math.abs(v-A)<1e-6?r(e):(h=g-x,d=m-w,f=v-A,o=b*(f*=p=1/Math.sqrt(h*h+d*d+f*f))-_*(d*=p),a=_*(h*=p)-y*f,s=y*d-b*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=d*s-f*a,c=f*o-h*s,u=h*a-d*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=o,e[1]=l,e[2]=h,e[3]=0,e[4]=a,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(o*g+a*m+s*v),e[13]=-(l*g+c*m+u*v),e[14]=-(h*g+d*m+f*v),e[15]=1,e)}},{"./identity":209}],213:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],g=t[12],m=t[13],v=t[14],y=t[15],b=n[0],_=n[1],x=n[2],w=n[3];return e[0]=b*r+_*s+x*h+w*g,e[1]=b*i+_*l+x*d+w*m,e[2]=b*o+_*c+x*f+w*v,e[3]=b*a+_*u+x*p+w*y,b=n[4],_=n[5],x=n[6],w=n[7],e[4]=b*r+_*s+x*h+w*g,e[5]=b*i+_*l+x*d+w*m,e[6]=b*o+_*c+x*f+w*v,e[7]=b*a+_*u+x*p+w*y,b=n[8],_=n[9],x=n[10],w=n[11],e[8]=b*r+_*s+x*h+w*g,e[9]=b*i+_*l+x*d+w*m,e[10]=b*o+_*c+x*f+w*v,e[11]=b*a+_*u+x*p+w*y,b=n[12],_=n[13],x=n[14],w=n[15],e[12]=b*r+_*s+x*h+w*g,e[13]=b*i+_*l+x*d+w*m,e[14]=b*o+_*c+x*f+w*v,e[15]=b*a+_*u+x*p+w*y,e}},{}],214:[function(e,t,n){t.exports=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1,e}},{}],215:[function(e,t,n){t.exports=function(e,t,n,r,i){var o=1/Math.tan(t/2),a=1/(r-i);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*a,e[15]=0,e}},{}],216:[function(e,t,n){t.exports=function(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}},{}],217:[function(e,t,n){t.exports=function(e,t,n,r){var i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E,C=r[0],M=r[1],O=r[2],L=Math.sqrt(C*C+M*M+O*O);return Math.abs(L)<1e-6?null:(C*=L=1/L,M*=L,O*=L,i=Math.sin(n),a=1-(o=Math.cos(n)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],g=t[8],m=t[9],v=t[10],y=t[11],b=C*C*a+o,_=M*C*a+O*i,x=O*C*a-M*i,w=C*M*a-O*i,A=M*M*a+o,k=O*M*a+C*i,T=C*O*a+M*i,S=M*O*a-C*i,E=O*O*a+o,e[0]=s*b+h*_+g*x,e[1]=l*b+d*_+m*x,e[2]=c*b+f*_+v*x,e[3]=u*b+p*_+y*x,e[4]=s*w+h*A+g*k,e[5]=l*w+d*A+m*k,e[6]=c*w+f*A+v*k,e[7]=u*w+p*A+y*k,e[8]=s*T+h*S+g*E,e[9]=l*T+d*S+m*E,e[10]=c*T+f*S+v*E,e[11]=u*T+p*S+y*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},{}],218:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*r,e[5]=a*i+u*r,e[6]=s*i+h*r,e[7]=l*i+d*r,e[8]=c*i-o*r,e[9]=u*i-a*r,e[10]=h*i-s*r,e[11]=d*i-l*r,e}},{}],219:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i-c*r,e[1]=a*i-u*r,e[2]=s*i-h*r,e[3]=l*i-d*r,e[8]=o*r+c*i,e[9]=a*r+u*i,e[10]=s*r+h*i,e[11]=l*r+d*i,e}},{}],220:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+c*r,e[1]=a*i+u*r,e[2]=s*i+h*r,e[3]=l*i+d*r,e[4]=c*i-o*r,e[5]=u*i-a*r,e[6]=h*i-s*r,e[7]=d*i-l*r,e}},{}],221:[function(e,t,n){t.exports=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],222:[function(e,t,n){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},{}],223:[function(e,t,n){t.exports=function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,g=n[0],m=n[1],v=n[2];return t===e?(e[12]=t[0]*g+t[4]*m+t[8]*v+t[12],e[13]=t[1]*g+t[5]*m+t[9]*v+t[13],e[14]=t[2]*g+t[6]*m+t[10]*v+t[14],e[15]=t[3]*g+t[7]*m+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*g+s*m+h*v+t[12],e[13]=i*g+l*m+d*v+t[13],e[14]=o*g+c*m+f*v+t[14],e[15]=a*g+u*m+p*v+t[15]),e}},{}],224:[function(e,t,n){t.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},{}],225:[function(e,t,n){"use strict";var r=e("css-font"),i=e("pick-by-alias"),o=e("regl"),a=e("gl-util/context"),s=e("es6-weak-map"),l=e("color-normalize"),c=e("font-atlas"),u=e("typedarray-pool"),h=e("parse-rect"),d=e("is-plain-obj"),f=e("parse-unit"),p=e("to-px"),g=e("detect-kerning"),m=e("object-assign"),v=e("font-measure"),y=e("flatten-vertex-data"),b=e("bit-twiddle").nextPow2,_=new s,x=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(x=!0),document.body.removeChild(w)}var A=function(e){!function(e){return"function"==typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=a(e):(e={regl:e},this.gl=e.regl._gl),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||o({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),_.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(d(e)?e:{})};A.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},A.prototype.update=function(e){var t=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=h(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=A.baseFontSize+"px sans-serif");var n,o=!1,a=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,n){if("string"==typeof e)try{e=r.parse(e)}catch(t){e=r.parse(A.baseFontSize+"px "+e)}else e=r.parse(r.stringify(e));var i=r.stringify({size:A.baseFontSize,family:e.family,stretch:x?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=f(e.size),l=Math.round(s[0]*p(s[1]));if(l!==t.fontSize[n]&&(a=!0,t.fontSize[n]=l),!(t.font[n]&&i==t.font[n].baseString||(o=!0,t.font[n]=A.fonts[i],t.font[n]))){var c=e.family.join(", "),u=[e.style];e.style!=e.variant&&u.push(e.variant),e.variant!=e.weight&&u.push(e.weight),x&&e.weight!=e.stretch&&u.push(e.stretch),t.font[n]={baseString:i,family:c,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:A.baseFontSize,fontStyle:u.join(" ")})},A.fonts[i]=t.font[n]}})),(o||a)&&this.font.forEach((function(n,i){var o=r.stringify({size:t.fontSize[i],family:n.family,stretch:x?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(t.fontAtlas[i]=t.shader.atlas[o],!t.fontAtlas[i]){var a=n.metrics;t.shader.atlas[o]=t.fontAtlas[i]={fontString:o,step:2*Math.ceil(t.fontSize[i]*a.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"==typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),d=0;d<s.length;d++)s[d]=e.text;e.text=s}if(null!=e.text||o){if(this.textOffsets=[0],Array.isArray(e.text)){this.count=e.text[0].length,this.counts=[this.count];for(var _=1;_<e.text.length;_++)this.textOffsets[_]=this.textOffsets[_-1]+e.text[_-1].length,this.count+=e.text[_].length,this.counts.push(e.text[_].length);this.text=e.text.join("")}else this.text=e.text,this.count=this.text.length,this.counts=[this.count];n=[],this.font.forEach((function(e,r){A.atlasContext.font=e.baseString;for(var i=t.fontAtlas[r],o=0;o<t.text.length;o++){var a=t.text.charAt(o);if(null==i.ids[a]&&(i.ids[a]=i.chars.length,i.chars.push(a),n.push(a)),null==e.width[a]&&(e.width[a]=A.atlasContext.measureText(a).width/A.baseFontSize,t.kerning)){var s=[];for(var l in e.width)s.push(l+a,a+l);m(e.kerning,g(e.family,{pairs:s}))}}}))}if(e.position)if(e.position.length>2){for(var w=!e.position[0].length,k=u.mallocFloat(2*this.count),T=0,S=0;T<this.counts.length;T++){var E=this.counts[T];if(w)for(var C=0;C<E;C++)k[S++]=e.position[2*T],k[S++]=e.position[2*T+1];else for(var M=0;M<E;M++)k[S++]=e.position[T][0],k[S++]=e.position[T][1]}this.position.call?this.position({type:"float",data:k}):this.position=this.regl.buffer({type:"float",data:k}),u.freeFloat(k)}else this.position.destroy&&this.position.destroy(),this.position={constant:e.position};if(e.text||o){var O=u.mallocUint8(this.count),L=u.mallocFloat(2*this.count);this.textWidth=[];for(var D=0,I=0;D<this.counts.length;D++){for(var R=this.counts[D],P=this.font[D]||this.font[0],N=this.fontAtlas[D]||this.fontAtlas[0],z=0;z<R;z++){var F=this.text.charAt(I),B=this.text.charAt(I-1);if(O[I]=N.ids[F],L[2*I]=P.width[F],z){var j=L[2*I-2],U=L[2*I],V=L[2*I-1]+.5*j+.5*U;if(this.kerning){var q=P.kerning[B+F];q&&(V+=.001*q)}L[2*I+1]=V}else L[2*I+1]=.5*L[2*I];I++}this.textWidth.push(L.length?.5*L[2*I-2]+L[2*I-1]:0)}e.align||(e.align=this.align),this.charBuffer({data:O,type:"uint8",usage:"stream"}),this.sizeBuffer({data:L,type:"float",usage:"stream"}),u.freeUint8(O),u.freeFloat(L),n.length&&this.font.forEach((function(e,n){var r=t.fontAtlas[n],i=r.step,o=Math.floor(A.maxAtlasSize/i),a=Math.min(o,r.chars.length),s=Math.ceil(r.chars.length/a),l=b(a*i),u=b(s*i);r.width=l,r.height=u,r.rows=s,r.cols=a,r.em&&r.texture({data:c({canvas:A.atlasCanvas,font:r.fontString,chars:r.chars,shape:[l,u],step:[i,i]})})}))}if(e.align&&(this.align=e.align,this.alignOffset=this.textWidth.map((function(e,n){var r=Array.isArray(t.align)?t.align.length>1?t.align[n]:t.align[0]:t.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,n){var r=(t.font[n]||t.font[0]).metrics,i=0;return i+=.5*r.bottom,-1*(i+="number"==typeof e?e-r.baseline:-r[e])}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){var H;if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var $=e.color.length;H=u.mallocUint8($);for(var W=(e.color.subarray||e.color.slice).bind(e.color),G=0;G<$;G+=4)H.set(l(W(G,G+4),"uint8"),G)}else{var Y=e.color.length;H=u.mallocUint8(4*Y);for(var X=0;X<Y;X++)H.set(l(e.color[X]||0,"uint8"),4*X)}this.color=H}else this.color=l(e.color,"uint8");if(e.position||e.text||e.color||e.baseline||e.align||e.font||e.offset||e.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Z=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Z);for(var K=0;K<this.batch.length;K++)this.batch[K]={count:this.counts.length>1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={},t.exports=A},{"bit-twiddle":81,"color-normalize":89,"css-font":99,"detect-kerning":125,"es6-weak-map":183,"flatten-vertex-data":191,"font-atlas":192,"font-measure":193,"gl-util/context":226,"is-plain-obj":236,"object-assign":247,"parse-rect":249,"parse-unit":251,"pick-by-alias":253,regl:283,"to-px":314,"typedarray-pool":327}],226:[function(e,t,r){(function(n){(function(){"use strict";var r=e("pick-by-alias");function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*n.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*n.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function o(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=o(e)||(t=e,"string"==typeof t.nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect)?{container:e}:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(e)?{gl:e}:r(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=n.pixelRatio||1),e.gl)return e.gl;var t;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}o(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch(e){}return e.gl})),e.gl}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":253}],227:[function(e,t,n){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r<e.length-1;r++)n.push(e[r],t[r]||"");return n.push(e[r]),n.join("")}},{}],228:[function(e,t,r){(function(n){(function(){"use strict";var r,i=e("is-browser");r="function"==typeof n.matchMedia?!n.matchMedia("(hover: none)").matches:i,t.exports=r}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":232}],229:[function(e,t,n){"use strict";var r=e("is-browser");t.exports=r&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},{"is-browser":232}],230:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g}},{}],231:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],232:[function(e,t,n){t.exports=!0},{}],233:[function(e,t,n){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(e,t,n){"use strict";t.exports=o,t.exports.isMobile=o,t.exports.default=o;var r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function o(e){e||(e={});var t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;var n=e.tablet?i.test(t):r.test(t);return!n&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(n=!0),n}},{}],235:[function(e,t,n){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],236:[function(e,t,n){"use strict";var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},{}],237:[function(e,t,n){"use strict";t.exports=function(e){for(var t,n=e.length,r=0;r<n;r++)if(((t=e.charCodeAt(r))<9||t>13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},{}],238:[function(e,t,n){"use strict";t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},{}],239:[function(e,t,n){var r,i;r=this,i=function(){"use strict";var e,t,n;function r(r,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),(n=i(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else t=i;else e=i}return r(0,(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n="1.10.1",r=i;function i(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=n,this.p2y=r}i.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},i.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},i.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},i.prototype.solveCurveX=function(e,t){var n,r,i,o,a;for(void 0===t&&(t=1e-6),i=e,a=0;a<8;a++){if(o=this.sampleCurveX(i)-e,Math.abs(o)<t)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=o/s}if((i=e)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(o=this.sampleCurveX(i),Math.abs(o-e)<t)return i;e>o?n=i:r=i,i=.5*(r-n)+n}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var o=a;function a(e,t){this.x=e,this.y=t}function s(e,t,n,i){var o=new r(e,t,n,i);return function(e){return o.solve(e)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),o=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(e){return e instanceof a?e:Array.isArray(e)?new a(e[0],e[1]):e};var l=s(.25,.1,.25,1);function c(e,t,n){return Math.min(n,Math.max(t,e))}function u(e,t,n){var r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}function h(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r<i.length;r+=1){var o=i[r];for(var a in o)e[a]=o[a]}return e}var d=1;function f(){return d++}function p(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function g(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function m(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function v(e,t){return-1!==e.indexOf(t,e.length-t.length)}function y(e,t,n){var r={};for(var i in e)r[i]=t.call(n||this,e[i],i,e);return r}function b(e,t,n){var r={};for(var i in e)t.call(n||this,e[i],i,e)&&(r[i]=e[i]);return r}function _(e){return Array.isArray(e)?e.map(_):"object"==typeof e&&e?y(e,_):e}var x={};function w(e){x[e]||("undefined"!=typeof console&&console.warn(e),x[e]=!0)}function A(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function k(e){for(var t=0,n=0,r=e.length,i=r-1,o=void 0,a=void 0;n<r;i=n++)o=e[n],t+=((a=e[i]).x-o.x)*(o.y+a.y);return t}function T(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function S(e){var t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,n,r,i){var o=r||i;return t[n]=!o||o.toLowerCase(),""})),t["max-age"]){var n=parseInt(t["max-age"],10);isNaN(n)?delete t["max-age"]:t["max-age"]=n}return t}var E=null;function C(e){if(null==E){var t=e.navigator?e.navigator.userAgent:null;E=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return E}function M(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}var O,L,D,I,R=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),P=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,N=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,z={now:R,frame:function(e){var t=P(e);return{cancel:function(){return N(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var n=self.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return O||(O=self.document.createElement("a")),O.href=e,O.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==L&&(L=self.matchMedia("(prefers-reduced-motion: reduce)")),L.matches)}},F={API_URL:"path_to_url",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("path_to_url")?"path_to_url":0===this.API_URL.indexOf("path_to_url")?"path_to_url":null:null},FEEDBACK_URL:"path_to_url",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(e){!j&&I&&(U?V(e):D=e)}},j=!1,U=!1;function V(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,I),e.isContextLost())return;B.supported=!0}catch(e){}e.deleteTexture(t),j=!0}self.document&&((I=self.document.createElement("img")).onload=function(){D&&V(D),D=null,U=!0},I.onerror=function(){j=!0,D=null},I.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var q="01";var H=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function $(e){return 0===e.indexOf("mapbox:")}H.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",q,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},H.prototype.normalizeStyleURL=function(e,t){if(!$(e))return e;var n=X(e);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeGlyphsURL=function(e,t){if(!$(e))return e;var n=X(e);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeSourceURL=function(e,t){if(!$(e))return e;var n=X(e);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||t)},H.prototype.normalizeSpriteURL=function(e,t,n,r){var i=X(e);return $(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+n,this._makeAPIURL(i,this._customAccessToken||r)):(i.path+=""+t+n,Z(i))},H.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!$(e))return e;var n=X(e),r=z.devicePixelRatio>=2||512===t?"@2x":"",i=B.supported?".webp":"$1";n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+r+i),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path;var o=this._customAccessToken||function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t].match(/^access_token=(.*)$/);if(r)return r[1]}return null}(n.params)||F.ACCESS_TOKEN;return F.REQUIRE_ACCESS_TOKEN&&o&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,o)},H.prototype.canonicalizeTileURL=function(e,t){var n=X(e);if(!n.path.match(/(^\/v4\/)/)||!n.path.match(/\.[\w]+$/))return e;var r="mapbox://tiles/";r+=n.path.replace("/v4/","");var i=n.params;return t&&(i=i.filter((function(e){return!e.match(/^access_token=/)}))),i.length&&(r+="?"+i.join("&")),r},H.prototype.canonicalizeTileset=function(e,t){for(var n=!!t&&$(t),r=[],i=0,o=e.tiles||[];i<o.length;i+=1){var a=o[i];G(a)?r.push(this.canonicalizeTileURL(a,n)):r.push(a)}return r},H.prototype._makeAPIURL=function(e,t){var n="See path_to_url#access-tokens-and-token-scopes",r=X(F.API_URL);if(e.protocol=r.protocol,e.authority=r.authority,"/"!==r.path&&(e.path=""+r.path+e.path),!F.REQUIRE_ACCESS_TOKEN)return Z(e);if(!(t=t||F.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n);return e.params=e.params.filter((function(e){return-1===e.indexOf("access_token")})),e.params.push("access_token="+t),Z(e)};var W=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function G(e){return W.test(e)}var Y=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function X(e){var t=e.match(Y);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function Z(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}var K="mapbox.eventData";function J(e){if(!e)return null;var t,n=e.split(".");if(!n||3!==n.length)return null;try{return JSON.parse((t=n[1],decodeURIComponent(self.atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(e){return null}}var Q=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Q.prototype.getStorageKey=function(e){var t,n,r=J(F.ACCESS_TOKEN);return t=r&&r.u?(n=r.u,self.btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))):F.ACCESS_TOKEN||"",e?K+"."+e+":"+t:K+":"+t},Q.prototype.fetchEventData=function(){var e=M("localStorage"),t=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{var r=self.localStorage.getItem(t);r&&(this.eventData=JSON.parse(r));var i=self.localStorage.getItem(n);i&&(this.anonId=i)}catch(e){w("Unable to read from LocalStorage")}},Q.prototype.saveEventData=function(){var e=M("localStorage"),t=this.getStorageKey(),n=this.getStorageKey("uuid");if(e)try{self.localStorage.setItem(n,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){w("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(e){},Q.prototype.postEvent=function(e,t,r,i){var o=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push("access_token="+(i||F.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:q,userId:this.anonId},l=t?h(s,t):s,c={url:Z(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=ke(c,(function(e){o.pendingRequest=null,r(e),o.saveEventData(),o.processRequests(i)}))}},Q.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var ee,te,ne=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,n,r){this.skuToken=n,(F.EVENTS_URL&&r||F.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return $(e)||G(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},r)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,i=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||r&&(t.success[r]=!0)}),e))}},t}(Q),re=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return $(e)||G(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=J(F.ACCESS_TOKEN),r=n?n.u:F.ACCESS_TOKEN,i=r!==this.eventData.tokenU;g(this.anonId)||(this.anonId=p(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=o,t.eventData.tokenU=r)}),e)}},t}(Q),ie=new re,oe=ie.postTurnstileEvent.bind(ie),ae=new ne,se=ae.postMapLoadEvent.bind(ae),le="mapbox-tiles",ce=500,ue=50;function he(){self.caches&&!ee&&(ee=self.caches.open(le))}function de(e,t,n){if(he(),ee){var r={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return r.headers.set(t,e)}));var i=S(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&r.headers.set("Expires",new Date(n+1e3*i["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-n<42e4||function(e,t){if(void 0===te)try{new Response(new ReadableStream),te=!0}catch(e){te=!1}te?t(e.body):e.blob().then(t)}(t,(function(t){var n=new self.Response(t,r);he(),ee&&ee.then((function(t){return t.put(fe(e.url),n)})).catch((function(e){return w(e.message)}))})))}}function fe(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}function pe(e,t){if(he(),!ee)return t(null);var n=fe(e.url);ee.then((function(e){e.match(n).then((function(r){var i=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")||0),n=S(e.headers.get("Cache-Control")||"");return t>Date.now()&&!n["no-cache"]}(r);e.delete(n),i&&e.put(n,r.clone()),t(null,r,i)})).catch(t)})).catch(t)}var ge,me=1/0;function ve(){return null==ge&&(ge=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ge}var ye={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ye);var be=function(e){function t(t,n,r){401===n&&G(r)&&(t+=": you may have provided an invalid Mapbox access token. See path_to_url#access-tokens-and-token-scopes"),e.call(this,t),this.status=n,this.url=r,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),_e=T()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function xe(e,t){var n,r=new self.AbortController,i=new self.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:_e(),signal:r.signal}),o=!1,a=!1,s=(n=i.url).indexOf("sku=")>0&&G(n);"json"===e.type&&i.headers.set("Accept","application/json");var l=function(n,r,o){if(!a){if(n&&"SecurityError"!==n.message&&w(n),r&&o)return c(r);var l=Date.now();self.fetch(i).then((function(n){if(n.ok){var r=s?n.clone():null;return c(n,r,l)}return t(new be(n.statusText,n.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},c=function(n,r,s){("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then((function(e){a||(r&&s&&de(i,r,s),o=!0,t(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))})).catch((function(e){a||t(new Error(e.message))}))};return s?pe(i,l):l(null,null),{cancel:function(){a=!0,o||r.abort()}}}var we=function(e,t){if(n=e.url,!(/^file:/.test(n)||/^file:/.test(_e())&&!/^\w+:/.test(n))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return xe(e,t);if(T()&&self.worker&&self.worker.actor){return self.worker.actor.send("getResource",e,t,void 0,!0)}}var n;return function(e,t){var n=new self.XMLHttpRequest;for(var r in n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer"),e.headers)n.setRequestHeader(r,e.headers[r]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=function(){t(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(e){return t(e)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else t(new be(n.statusText,n.status,e.url))},n.send(e.body),{cancel:function(){return n.abort()}}}(e,t)},Ae=function(e,t){return we(h(e,{type:"arrayBuffer"}),t)},ke=function(e,t){return we(h(e,{method:"POST"}),t)};var Te,Se;Te=[],Se=0;var Ee=function(e,t){if(B.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Se>=F.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Te.push(n),n}Se++;var r=!1,i=function(){if(!r)for(r=!0,Se--;Te.length&&Se<F.MAX_PARALLEL_IMAGE_REQUESTS;){var e=Te.shift(),t=e.requestParameters,n=e.callback;e.cancelled||(e.cancel=Ee(t,n).cancel)}},o=Ae(e,(function(e,n,r,o){i(),e?t(e):n&&(ve()?function(e,t){var n=new self.Blob([new Uint8Array(e)],{type:"image/png"});self.createImageBitmap(n).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of "+e.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}(n,t):function(e,t,n,r){var i=new self.Image,o=self.URL;i.onload=function(){t(null,i),o.revokeObjectURL(i.src)},i.onerror=function(){return t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var a=new self.Blob([new Uint8Array(e)],{type:"image/png"});i.cacheControl=n,i.expires=r,i.src=e.byteLength?o.createObjectURL(a):"data:image/png;base64,your_sha256_hashAAUAAarVyFEAAAAASUVORK5CYII="}(n,t,r,o))}));return{cancel:function(){o.cancel(),i()}}};function Ce(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function Me(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}var Oe=function(e,t){void 0===t&&(t={}),h(this,t),this.type=e},Le=function(e){function t(t,n){void 0===n&&(n={}),e.call(this,"error",h({error:t},n))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Oe),De=function(){};De.prototype.on=function(e,t){return this._listeners=this._listeners||{},Ce(e,t,this._listeners),this},De.prototype.off=function(e,t){return Me(e,t,this._listeners),Me(e,t,this._oneTimeListeners),this},De.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},Ce(e,t,this._oneTimeListeners),this},De.prototype.fire=function(e,t){"string"==typeof e&&(e=new Oe(e,t||{}));var n=e.type;if(this.listens(n)){e.target=this;for(var r=0,i=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];r<i.length;r+=1)i[r].call(this,e);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];o<a.length;o+=1){var s=a[o];Me(n,s,this._oneTimeListeners),s.call(this,e)}var l=this._eventedParent;l&&(h(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(e))}else e instanceof Le&&console.error(e.error);return this},De.prototype.listens=function(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},De.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var Ie={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Re=function(e,t,n,r){this.message=(e?e+": ":"")+n,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)};function Pe(e){var t=e.key,n=e.value;return n?[new Re(t,n,"constants have been deprecated as of v8")]:[]}function Ne(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,i=t;r<i.length;r+=1){var o=i[r];for(var a in o)e[a]=o[a]}return e}function ze(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Fe(e){if(Array.isArray(e))return e.map(Fe);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){var t={};for(var n in e)t[n]=Fe(e[n]);return t}return ze(e)}var Be=function(e){function t(t,n){e.call(this,n),this.message=n,this.key=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),je=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var n=0,r=t;n<r.length;n+=1){var i=r[n],o=i[0],a=i[1];this.bindings[o]=a}};je.prototype.concat=function(e){return new je(this,e)},je.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},je.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var Ue={kind:"null"},Ve={kind:"number"},qe={kind:"string"},He={kind:"boolean"},$e={kind:"color"},We={kind:"object"},Ge={kind:"value"},Ye={kind:"collator"},Xe={kind:"formatted"},Ze={kind:"resolvedImage"};function Ke(e,t){return{kind:"array",itemType:e,N:t}}function Je(e){if("array"===e.kind){var t=Je(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Qe=[Ue,Ve,qe,He,$e,Xe,We,Ke(Ge),Ze];function et(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!et(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var n=0,r=Qe;n<r.length;n+=1)if(!et(r[n],t))return null}return"Expected "+Je(e)+" but found "+Je(t)+" instead."}function tt(e,t){return t.some((function(t){return t.kind===e.kind}))}function nt(e,t){return t.some((function(t){return"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e}))}var rt=t((function(e,t){var n={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(e){return(e=Math.round(e))<0?0:e>255?255:e}function i(e){return e<0?0:e>1?1:e}function o(e){return"%"===e[e.length-1]?r(parseFloat(e)/100*255):r(parseInt(e))}function a(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in n)return n[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),h=i.substr(l+1,c-(l+1)).split(","),d=1;switch(u){case"rgba":if(4!==h.length)return null;d=a(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),d];case"hsla":if(4!==h.length)return null;d=a(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,p=a(h[1]),g=a(h[2]),m=g<=.5?g*(p+1):g+p-g*p,v=2*g-m;return[r(255*s(v,m,f+1/3)),r(255*s(v,m,f)),r(255*s(v,m,f-1/3)),d];default:return null}}return null}}catch(e){}})),it=rt.parseCSSColor,ot=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};ot.parse=function(e){if(e){if(e instanceof ot)return e;if("string"==typeof e){var t=it(e);if(t)return new ot(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ot.prototype.toString=function(){var e=this.toArray(),t=e[0],n=e[1],r=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(n)+","+Math.round(r)+","+i+")"},ot.prototype.toArray=function(){var e=this,t=e.r,n=e.g,r=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*n/i,255*r/i,i]},ot.black=new ot(0,0,0,1),ot.white=new ot(1,1,1,1),ot.transparent=new ot(0,0,0,0),ot.red=new ot(1,0,0,1);var at=function(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};at.prototype.compare=function(e,t){return this.collator.compare(e,t)},at.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var st=function(e,t,n,r,i){this.text=e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i},lt=function(e){this.sections=e};lt.fromString=function(e){return new lt([new st(e,null,null,null,null)])},lt.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},lt.factory=function(e){return e instanceof lt?e:lt.fromString(e)},lt.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},lt.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];if(r.image)e.push(["image",r.image.name]);else{e.push(r.text);var i={};r.fontStack&&(i["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(i["font-scale"]=r.scale),r.textColor&&(i["text-color"]=["rgba"].concat(r.textColor.toArray())),e.push(i)}}return e};var ct=function(e){this.name=e.name,this.available=e.available};function ut(e,t,n,r){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[e,t,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ht(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ot)return!0;if(e instanceof at)return!0;if(e instanceof lt)return!0;if(e instanceof ct)return!0;if(Array.isArray(e)){for(var t=0,n=e;t<n.length;t+=1)if(!ht(n[t]))return!1;return!0}if("object"==typeof e){for(var r in e)if(!ht(e[r]))return!1;return!0}return!1}function dt(e){if(null===e)return Ue;if("string"==typeof e)return qe;if("boolean"==typeof e)return He;if("number"==typeof e)return Ve;if(e instanceof ot)return $e;if(e instanceof at)return Ye;if(e instanceof lt)return Xe;if(e instanceof ct)return Ze;if(Array.isArray(e)){for(var t,n=e.length,r=0,i=e;r<i.length;r+=1){var o=dt(i[r]);if(t){if(t===o)continue;t=Ge;break}t=o}return Ke(t||Ge,n)}return We}function ft(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof ot||e instanceof lt||e instanceof ct?e.toString():JSON.stringify(e)}ct.prototype.toString=function(){return this.name},ct.fromString=function(e){return e?new ct({name:e,available:!1}):null},ct.prototype.serialize=function(){return["image",this.name]};var pt=function(e,t){this.type=e,this.value=t};pt.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!ht(e[1]))return t.error("invalid value");var n=e[1],r=dt(n),i=t.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new pt(r,n)},pt.prototype.evaluate=function(){return this.value},pt.prototype.eachChild=function(){},pt.prototype.outputDefined=function(){return!0},pt.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ot?["rgba"].concat(this.value.toArray()):this.value instanceof lt?this.value.serialize():this.value};var gt=function(e){this.name="ExpressionEvaluationError",this.message=e};gt.prototype.toJSON=function(){return this.message};var mt={string:qe,number:Ve,boolean:He,object:We},vt=function(e,t){this.type=e,this.args=t};vt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n,r=1,i=e[0];if("array"===i){var o,a;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in mt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=mt[s],r++}else o=Ge;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],r++}n=Ke(o,a)}else n=mt[i];for(var l=[];r<e.length;r++){var c=t.parse(e[r],r,Ge);if(!c)return null;l.push(c)}return new vt(n,l)},vt.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var n=this.args[t].evaluate(e);if(!et(this.type,dt(n)))return n;if(t===this.args.length-1)throw new gt("Expected value to be of type "+Je(this.type)+", but found "+Je(dt(n))+" instead.")}return null},vt.prototype.eachChild=function(e){this.args.forEach(e)},vt.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},vt.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var n=e.itemType;if("string"===n.kind||"number"===n.kind||"boolean"===n.kind){t.push(n.kind);var r=e.N;("number"==typeof r||this.args.length>1)&&t.push(r)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var yt=function(e){this.type=Xe,this.sections=e};yt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");for(var r=[],i=!1,o=1;o<=e.length-1;++o){var a=e[o];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,Ve)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,Ke(qe))))return null;var c=null;if(a["text-color"]&&!(c=t.parse(a["text-color"],1,$e)))return null;var u=r[r.length-1];u.scale=s,u.font=l,u.textColor=c}else{var h=t.parse(e[o],1,Ge);if(!h)return null;var d=h.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:h,scale:null,font:null,textColor:null})}}return new yt(r)},yt.prototype.evaluate=function(e){return new lt(this.sections.map((function(t){var n=t.content.evaluate(e);return dt(n)===Ze?new st("",n,null,null,null):new st(ft(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},yt.prototype.eachChild=function(e){for(var t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}},yt.prototype.outputDefined=function(){return!1},yt.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t<n.length;t+=1){var r=n[t];e.push(r.content.serialize());var i={};r.scale&&(i["font-scale"]=r.scale.serialize()),r.font&&(i["text-font"]=r.font.serialize()),r.textColor&&(i["text-color"]=r.textColor.serialize()),e.push(i)}return e};var bt=function(e){this.type=Ze,this.input=e};bt.parse=function(e,t){if(2!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,qe);return n?new bt(n):t.error("No image name provided.")},bt.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=ct.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n},bt.prototype.eachChild=function(e){e(this.input)},bt.prototype.outputDefined=function(){return!1},bt.prototype.serialize=function(){return["image",this.input.serialize()]};var _t={"to-boolean":He,"to-color":$e,"to-number":Ve,"to-string":qe},xt=function(e,t){this.type=e,this.args=t};xt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");for(var r=_t[n],i=[],o=1;o<e.length;o++){var a=t.parse(e[o],o,Ge);if(!a)return null;i.push(a)}return new xt(r,i)},xt.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,n,r=0,i=this.args;r<i.length;r+=1){if(n=null,(t=i[r].evaluate(e))instanceof ot)return t;if("string"==typeof t){var o=e.parseColor(t);if(o)return o}else if(Array.isArray(t)&&!(n=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":ut(t[0],t[1],t[2],t[3])))return new ot(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new gt(n||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(e)))return 0;var c=Number(a);if(!isNaN(c))return c}throw new gt("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?lt.fromString(ft(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?ct.fromString(ft(this.args[0].evaluate(e))):ft(this.args[0].evaluate(e))},xt.prototype.eachChild=function(e){this.args.forEach(e)},xt.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},xt.prototype.serialize=function(){if("formatted"===this.type.kind)return new yt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new bt(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var wt=["Unknown","Point","LineString","Polygon"],At=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};At.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},At.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?wt[this.feature.type]:this.feature.type:null},At.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},At.prototype.canonicalID=function(){return this.canonical},At.prototype.properties=function(){return this.feature&&this.feature.properties||{}},At.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=ot.parse(e)),t};var kt=function(e,t,n,r){this.name=e,this.type=t,this._evaluate=n,this.args=r};kt.prototype.evaluate=function(e){return this._evaluate(e,this.args)},kt.prototype.eachChild=function(e){this.args.forEach(e)},kt.prototype.outputDefined=function(){return!1},kt.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},kt.parse=function(e,t){var n,r=e[0],i=kt.definitions[r];if(!i)return t.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=a.filter((function(t){var n=t[0];return!Array.isArray(n)||n.length===e.length-1})),l=null,c=0,u=s;c<u.length;c+=1){var h=u[c],d=h[0],f=h[1];l=new Gt(t.registry,t.path,null,t.scope);for(var p=[],g=!1,m=1;m<e.length;m++){var v=e[m],y=Array.isArray(d)?d[m-1]:d.type,b=l.parse(v,1+p.length,y);if(!b){g=!0;break}p.push(b)}if(!g)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var _=0;_<p.length;_++){var x=Array.isArray(d)?d[_]:d.type,w=p[_];l.concat(_+1).checkSubtype(x,w.type)}if(0===l.errors.length)return new kt(r,o,f,p)}}if(1===s.length)(n=t.errors).push.apply(n,l.errors);else{for(var A=(s.length?s:a).map((function(e){return t=e[0],Array.isArray(t)?"("+t.map(Je).join(", ")+")":"("+Je(t.type)+"...)";var t})).join(" | "),k=[],T=1;T<e.length;T++){var S=t.parse(e[T],1+k.length);if(!S)return null;k.push(Je(S.type))}t.error("Expected arguments of type "+A+", but found ("+k.join(", ")+") instead.")}return null},kt.register=function(e,t){for(var n in kt.definitions=t,t)e[n]=kt};var Tt=function(e,t,n){this.type=Ye,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t};Tt.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");var r=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,He);if(!r)return null;var i=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,He);if(!i)return null;var o=null;return n.locale&&!(o=t.parse(n.locale,1,qe))?null:new Tt(r,i,o)},Tt.prototype.evaluate=function(e){return new at(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},Tt.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},Tt.prototype.outputDefined=function(){return!1},Tt.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var St=8192;function Et(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Ct(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Mt(e,t){var n,r=(180+e[0])/360,i=(n=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360),o=Math.pow(2,t.z);return[Math.round(r*o*St),Math.round(i*o*St)]}function Ot(e,t,n){return t[1]>e[1]!=n[1]>e[1]&&e[0]<(n[0]-t[0])*(e[1]-t[1])/(n[1]-t[1])+t[0]}function Lt(e,t){for(var n=!1,r=0,i=t.length;r<i;r++)for(var o=t[r],a=0,s=o.length;a<s-1;a++){if(l=e,c=o[a],u=o[a+1],h=void 0,d=void 0,f=void 0,p=void 0,h=l[0]-c[0],d=l[1]-c[1],f=l[0]-u[0],p=l[1]-u[1],h*p-f*d==0&&h*f<=0&&d*p<=0)return!1;Ot(e,o[a],o[a+1])&&(n=!n)}var l,c,u,h,d,f,p;return n}function Dt(e,t){for(var n=0;n<t.length;n++)if(Lt(e,t[n]))return!0;return!1}function It(e,t,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=t[0]-n[0],s=t[1]-n[1],l=r[0]-n[0],c=r[1]-n[1],u=i*c-l*o,h=a*c-l*s;return u>0&&h<0||u<0&&h>0}function Rt(e,t,n){for(var r=0,i=n;r<i.length;r+=1)for(var o=i[r],a=0;a<o.length-1;++a)if(s=e,l=t,c=o[a],u=o[a+1],h=void 0,d=void 0,f=void 0,f=[l[0]-s[0],l[1]-s[1]],0!=(h=[u[0]-c[0],u[1]-c[1]],d=f,h[0]*d[1]-h[1]*d[0])&&It(s,l,c,u)&&It(c,u,s,l))return!0;var s,l,c,u,h,d,f;return!1}function Pt(e,t){for(var n=0;n<e.length;++n)if(!Lt(e[n],t))return!1;for(var r=0;r<e.length-1;++r)if(Rt(e[r],e[r+1],t))return!1;return!0}function Nt(e,t){for(var n=0;n<t.length;n++)if(Pt(e,t[n]))return!0;return!1}function zt(e,t,n){for(var r=[],i=0;i<e.length;i++){for(var o=[],a=0;a<e[i].length;a++){var s=Mt(e[i][a],n);Et(t,s),o.push(s)}r.push(o)}return r}function Ft(e,t,n){for(var r=[],i=0;i<e.length;i++){var o=zt(e[i],t,n);r.push(o)}return r}function Bt(e,t,n,r){if(e[0]<n[0]||e[0]>n[2]){var i=.5*r,o=e[0]-n[0]>i?-r:n[0]-e[0]>i?r:0;0===o&&(o=e[0]-n[2]>i?-r:n[2]-e[0]>i?r:0),e[0]+=o}Et(t,e)}function jt(e,t,n,r){for(var i=Math.pow(2,r.z)*St,o=[r.x*St,r.y*St],a=[],s=0,l=e;s<l.length;s+=1)for(var c=0,u=l[s];c<u.length;c+=1){var h=u[c],d=[h.x+o[0],h.y+o[1]];Bt(d,t,n,i),a.push(d)}return a}function Ut(e,t,n,r){for(var i=Math.pow(2,r.z)*St,o=[r.x*St,r.y*St],a=[],s=0,l=e;s<l.length;s+=1){for(var c=[],u=0,h=l[s];u<h.length;u+=1){var d=h[u],f=[d.x+o[0],d.y+o[1]];Et(t,f),c.push(f)}a.push(c)}if(t[2]-t[0]<=i/2){(y=t)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(var p=0,g=a;p<g.length;p+=1)for(var m=0,v=g[p];m<v.length;m+=1)Bt(v[m],t,n,i)}var y;return a}var Vt=function(e,t){this.type=He,this.geojson=e,this.geometries=t};function qt(e){if(e instanceof kt){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Vt)return!1;var t=!0;return e.eachChild((function(e){t&&!qt(e)&&(t=!1)})),t}function Ht(e){if(e instanceof kt&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!Ht(e)&&(t=!1)})),t}function $t(e,t){if(e instanceof kt&&t.indexOf(e.name)>=0)return!1;var n=!0;return e.eachChild((function(e){n&&!$t(e,t)&&(n=!1)})),n}Vt.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(ht(e[1])){var n=e[1];if("FeatureCollection"===n.type)for(var r=0;r<n.features.length;++r){var i=n.features[r].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new Vt(n,n.features[r].geometry)}else if("Feature"===n.type){var o=n.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new Vt(n,n.geometry)}else if("Polygon"===n.type||"MultiPolygon"===n.type)return new Vt(n,n)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Vt.prototype.evaluate=function(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var o=zt(t.coordinates,r,i),a=jt(e.geometry(),n,r,i);if(!Ct(n,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Lt(l[s],o))return!1}if("MultiPolygon"===t.type){var c=Ft(t.coordinates,r,i),u=jt(e.geometry(),n,r,i);if(!Ct(n,r))return!1;for(var h=0,d=u;h<d.length;h+=1)if(!Dt(d[h],c))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){var n=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var o=zt(t.coordinates,r,i),a=Ut(e.geometry(),n,r,i);if(!Ct(n,r))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Pt(l[s],o))return!1}if("MultiPolygon"===t.type){var c=Ft(t.coordinates,r,i),u=Ut(e.geometry(),n,r,i);if(!Ct(n,r))return!1;for(var h=0,d=u;h<d.length;h+=1)if(!Nt(d[h],c))return!1}return!0}(e,this.geometries)}return!1},Vt.prototype.eachChild=function(){},Vt.prototype.outputDefined=function(){return!0},Vt.prototype.serialize=function(){return["within",this.geojson]};var Wt=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};Wt.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var n=e[1];return t.scope.has(n)?new Wt(n,t.scope.get(n)):t.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},Wt.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},Wt.prototype.eachChild=function(){},Wt.prototype.outputDefined=function(){return!1},Wt.prototype.serialize=function(){return["var",this.name]};var Gt=function(e,t,n,r,i){void 0===t&&(t=[]),void 0===r&&(r=new je),void 0===i&&(i=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=r,this.errors=i,this.expectedType=n};function Yt(e){if(e instanceof Wt)return Yt(e.boundExpression);if(e instanceof kt&&"error"===e.name)return!1;if(e instanceof Tt)return!1;if(e instanceof Vt)return!1;var t=e instanceof xt||e instanceof vt,n=!0;return e.eachChild((function(e){n=t?n&&Yt(e):n&&e instanceof pt})),!!n&&qt(e)&&$t(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Xt(e,t){for(var n,r,i=e.length-1,o=0,a=i,s=0;o<=a;)if(n=e[s=Math.floor((o+a)/2)],r=e[s+1],n<=t){if(s===i||t<r)return s;o=s+1}else{if(!(n>t))throw new gt("Input is not a number.");a=s-1}return 0}Gt.prototype.parse=function(e,t,n,r,i){return void 0===i&&(i={}),t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)},Gt.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new vt(t,[e]):"coerce"===n?new xt(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var o=i.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=n(o,a,t.typeAnnotation||"coerce");else o=n(o,a,t.typeAnnotation||"assert")}if(!(o instanceof pt)&&"resolvedImage"!==o.type.kind&&Yt(o)){var l=new At;try{o=new pt(o.type,o.evaluate(l))}catch(e){return this.error(e.message),null}}return o}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Gt.prototype.concat=function(e,t,n){var r="number"==typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new Gt(this.registry,r,t||null,i,this.errors)},Gt.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new Be(r,e))},Gt.prototype.checkSubtype=function(e,t){var n=et(e,t);return n&&this.error(n),n};var Zt=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,i=n;r<i.length;r+=1){var o=i[r],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function Kt(e,t,n){return e*(1-n)+t*n}Zt.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var n=t.parse(e[1],1,Ve);if(!n)return null;var r=[],i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(var o=1;o<e.length;o+=2){var a=1===o?-1/0:e[o],s=e[o+1],l=o,c=o+1;if("number"!=typeof a)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(r.length&&r[r.length-1][0]>=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,r.push([a,u])}return new Zt(i,n,r)},Zt.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[Xt(t,r)].evaluate(e)},Zt.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},Zt.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},Zt.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Jt=Object.freeze({__proto__:null,number:Kt,color:function(e,t,n){return new ot(Kt(e.r,t.r,n),Kt(e.g,t.g,n),Kt(e.b,t.b,n),Kt(e.a,t.a,n))},array:function(e,t,n){return e.map((function(e,r){return Kt(e,t[r],n)}))}}),Qt=.95047,en=1.08883,tn=4/29,nn=6/29,rn=3*nn*nn,on=Math.PI/180,an=180/Math.PI;function sn(e){return e>.008856451679035631?Math.pow(e,1/3):e/rn+tn}function ln(e){return e>nn?e*e*e:rn*(e-tn)}function cn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function un(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hn(e){var t=un(e.r),n=un(e.g),r=un(e.b),i=sn((.4124564*t+.3575761*n+.1804375*r)/Qt),o=sn((.2126729*t+.7151522*n+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-sn((.0193339*t+.119192*n+.9503041*r)/en)),alpha:e.a}}function dn(e){var t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=1*ln(t),n=Qt*ln(n),r=en*ln(r),new ot(cn(3.2404542*n-1.5371385*t-.4985314*r),cn(-.969266*n+1.8760108*t+.041556*r),cn(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function fn(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var pn={forward:hn,reverse:dn,interpolate:function(e,t,n){return{l:Kt(e.l,t.l,n),a:Kt(e.a,t.a,n),b:Kt(e.b,t.b,n),alpha:Kt(e.alpha,t.alpha,n)}}},gn={forward:function(e){var t=hn(e),n=t.l,r=t.a,i=t.b,o=Math.atan2(i,r)*an;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:n,alpha:e.a}},reverse:function(e){var t=e.h*on,n=e.c;return dn({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},interpolate:function(e,t,n){return{h:fn(e.h,t.h,n),c:Kt(e.c,t.c,n),l:Kt(e.l,t.l,n),alpha:Kt(e.alpha,t.alpha,n)}}},mn=Object.freeze({__proto__:null,lab:pn,hcl:gn}),vn=function(e,t,n,r,i){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var o=0,a=i;o<a.length;o+=1){var s=a[o],l=s[0],c=s[1];this.labels.push(l),this.outputs.push(c)}};function yn(e,t,n,r){var i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}vn.interpolationFactor=function(e,t,n,i){var o=0;if("exponential"===e.name)o=yn(t,e.base,n,i);else if("linear"===e.name)o=yn(t,1,n,i);else if("cubic-bezier"===e.name){var a=e.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(yn(t,1,n,i))}return o},vn.parse=function(e,t){var n=e[0],r=e[1],i=e[2],o=e.slice(3);if(!Array.isArray(r)||0===r.length)return t.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var a=r[1];if("number"!=typeof a)return t.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else{if("cubic-bezier"!==r[0])return t.error("Unknown interpolation type "+String(r[0]),1,0);var s=r.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,Ve)))return null;var l=[],c=null;"interpolate-hcl"===n||"interpolate-lab"===n?c=$e:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u<o.length;u+=2){var h=o[u],d=o[u+1],f=u+3,p=u+4;if("number"!=typeof h)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var g=t.parse(d,p,c);if(!g)return null;c=c||g.type,l.push([h,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new vn(c,n,r,i,l):t.error("Type "+Je(c)+" is not interpolatable.")},vn.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);var o=Xt(t,r),a=t[o],s=t[o+1],l=vn.interpolationFactor(this.interpolation,r,a,s),c=n[o].evaluate(e),u=n[o+1].evaluate(e);return"interpolate"===this.operator?Jt[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?gn.reverse(gn.interpolate(gn.forward(c),gn.forward(u),l)):pn.reverse(pn.interpolate(pn.forward(c),pn.forward(u),l))},vn.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t<n.length;t+=1)e(n[t])},vn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))},vn.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],n=0;n<this.labels.length;n++)t.push(this.labels[n],this.outputs[n].serialize());return t};var bn=function(e,t){this.type=e,this.args=t};bn.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var n=null,r=t.expectedType;r&&"value"!==r.kind&&(n=r);for(var i=[],o=0,a=e.slice(1);o<a.length;o+=1){var s=a[o],l=t.parse(s,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!l)return null;n=n||l.type,i.push(l)}var c=r&&i.some((function(e){return et(r,e.type)}));return new bn(c?Ge:n,i)},bn.prototype.evaluate=function(e){for(var t,n=null,r=0,i=0,o=this.args;i<o.length&&(r++,(n=o[i].evaluate(e))&&n instanceof ct&&!n.available&&(t||(t=n.name),n=null,r===this.args.length&&(n=t)),null===n);i+=1);return n},bn.prototype.eachChild=function(e){this.args.forEach(e)},bn.prototype.outputDefined=function(){return this.args.every((function(e){return e.outputDefined()}))},bn.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var _n=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};_n.prototype.evaluate=function(e){return this.result.evaluate(e)},_n.prototype.eachChild=function(e){for(var t=0,n=this.bindings;t<n.length;t+=1)e(n[t][1]);e(this.result)},_n.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var n=[],r=1;r<e.length-1;r+=2){var i=e[r];if("string"!=typeof i)return t.error("Expected string, but found "+typeof i+" instead.",r);if(/[^a-zA-Z0-9_]/.test(i))return t.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=t.parse(e[r+1],r+1);if(!o)return null;n.push([i,o])}var a=t.parse(e[e.length-1],e.length-1,t.expectedType,n);return a?new _n(n,a):null},_n.prototype.outputDefined=function(){return this.result.outputDefined()},_n.prototype.serialize=function(){for(var e=["let"],t=0,n=this.bindings;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];e.push(i,o.serialize())}return e.push(this.result.serialize()),e};var xn=function(e,t,n){this.type=e,this.index=t,this.input=n};xn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Ve),r=t.parse(e[2],2,Ke(t.expectedType||Ge));if(!n||!r)return null;var i=r.type;return new xn(i.itemType,n,r)},xn.prototype.evaluate=function(e){var t=this.index.evaluate(e),n=this.input.evaluate(e);if(t<0)throw new gt("Array index out of bounds: "+t+" < 0.");if(t>=n.length)throw new gt("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new gt("Array index must be an integer, but found "+t+" instead.");return n[t]},xn.prototype.eachChild=function(e){e(this.index),e(this.input)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wn=function(e,t){this.type=He,this.needle=e,this.haystack=t};wn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Ge),r=t.parse(e[2],2,Ge);return n&&r?tt(n.type,[He,qe,Ve,Ue,Ge])?new wn(n,r):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Je(n.type)+" instead"):null},wn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!nt(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+Je(dt(t))+" instead.");if(!nt(n,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+Je(dt(n))+" instead.");return n.indexOf(t)>=0},wn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},wn.prototype.outputDefined=function(){return!0},wn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var An=function(e,t,n){this.type=Ve,this.needle=e,this.haystack=t,this.fromIndex=n};An.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Ge),r=t.parse(e[2],2,Ge);if(!n||!r)return null;if(!tt(n.type,[He,qe,Ve,Ue,Ge]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Je(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,Ve);return i?new An(n,r,i):null}return new An(n,r)},An.prototype.evaluate=function(e){var t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!nt(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+Je(dt(t))+" instead.");if(!nt(n,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+Je(dt(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)},An.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},An.prototype.outputDefined=function(){return!1},An.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var kn=function(e,t,n,r,i,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o};kn.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var i={},o=[],a=2;a<e.length-1;a+=2){var s=e[a],l=e[a+1];Array.isArray(s)||(s=[s]);var c=t.concat(a);if(0===s.length)return c.error("Expected at least one branch label.");for(var u=0,h=s;u<h.length;u+=1){var d=h[u];if("number"!=typeof d&&"string"!=typeof d)return c.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,dt(d)))return null}else n=dt(d);if(void 0!==i[String(d)])return c.error("Branch labels must be unique.");i[String(d)]=o.length}var f=t.parse(l,a,r);if(!f)return null;r=r||f.type,o.push(f)}var p=t.parse(e[1],1,Ge);if(!p)return null;var g=t.parse(e[e.length-1],e.length-1,r);return g?"value"!==p.type.kind&&t.concat(1).checkSubtype(n,p.type)?null:new kn(n,r,p,i,o,g):null},kn.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(dt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},kn.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},kn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},kn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],r={},i=0,o=Object.keys(this.cases).sort();i<o.length;i+=1){var a=o[i];void 0===(h=r[this.cases[a]])?(r[this.cases[a]]=n.length,n.push([this.cases[a],[a]])):n[h][1].push(a)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,c=n;l<c.length;l+=1){var u=c[l],h=u[0],d=u[1];1===d.length?t.push(s(d[0])):t.push(d.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Tn=function(e,t,n){this.type=e,this.branches=t,this.otherwise=n};Tn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var r=[],i=1;i<e.length-1;i+=2){var o=t.parse(e[i],i,He);if(!o)return null;var a=t.parse(e[i+1],i+1,n);if(!a)return null;r.push([o,a]),n=n||a.type}var s=t.parse(e[e.length-1],e.length-1,n);return s?new Tn(n,r,s):null},Tn.prototype.evaluate=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];if(i.evaluate(e))return o.evaluate(e)}return this.otherwise.evaluate(e)},Tn.prototype.eachChild=function(e){for(var t=0,n=this.branches;t<n.length;t+=1){var r=n[t],i=r[0],o=r[1];e(i),e(o)}e(this.otherwise)},Tn.prototype.outputDefined=function(){return this.branches.every((function(e){return e[0],e[1].outputDefined()}))&&this.otherwise.outputDefined()},Tn.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Sn=function(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r};function En(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Cn(e,t,n,r){return 0===r.compare(t,n)}function Mn(e,t,n){var r="=="!==e&&"!="!==e;return function(){function i(e,t,n){this.type=He,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var n=e[0],o=t.parse(e[1],1,Ge);if(!o)return null;if(!En(n,o.type))return t.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Je(o.type)+"'.");var a=t.parse(e[2],2,Ge);if(!a)return null;if(!En(n,a.type))return t.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Je(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot compare types '"+Je(o.type)+"' and '"+Je(a.type)+"'.");r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new vt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new vt(o.type,[a])));var s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,Ye)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var s=dt(o),l=dt(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new gt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var c=dt(o),u=dt(a);if("string"!==c.kind||"string"!==u.kind)return t(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):t(i,o,a)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}Sn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1,Ge),r=t.parse(e[2],2,Ve);if(!n||!r)return null;if(!tt(n.type,[Ke(Ge),qe,Ge]))return t.error("Expected first argument to be of type array or string, but found "+Je(n.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,Ve);return i?new Sn(n.type,n,r,i):null}return new Sn(n.type,n,r)},Sn.prototype.evaluate=function(e){var t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!nt(t,["string","array"]))throw new gt("Expected first argument to be of type array or string, but found "+Je(dt(t))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)},Sn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Sn.prototype.outputDefined=function(){return!1},Sn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var On=Mn("==",(function(e,t,n){return t===n}),Cn),Ln=Mn("!=",(function(e,t,n){return t!==n}),(function(e,t,n,r){return!Cn(0,t,n,r)})),Dn=Mn("<",(function(e,t,n){return t<n}),(function(e,t,n,r){return r.compare(t,n)<0})),In=Mn(">",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),Rn=Mn("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),Pn=Mn(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0})),Nn=function(e,t,n,r,i){this.type=qe,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i};Nn.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,Ve);if(!n)return null;var r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var i=null;if(r.locale&&!(i=t.parse(r.locale,1,qe)))return null;var o=null;if(r.currency&&!(o=t.parse(r.currency,1,qe)))return null;var a=null;if(r["min-fraction-digits"]&&!(a=t.parse(r["min-fraction-digits"],1,Ve)))return null;var s=null;return r["max-fraction-digits"]&&!(s=t.parse(r["max-fraction-digits"],1,Ve))?null:new Nn(n,i,o,a,s)},Nn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Nn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Nn.prototype.outputDefined=function(){return!1},Nn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var zn=function(e){this.type=Ve,this.input=e};zn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error("Expected argument of type string or array, but found "+Je(n.type)+" instead."):new zn(n):null},zn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new gt("Expected value to be of type string or array, but found "+Je(dt(t))+" instead.")},zn.prototype.eachChild=function(e){e(this.input)},zn.prototype.outputDefined=function(){return!1},zn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Fn={"==":On,"!=":Ln,">":In,"<":Dn,">=":Pn,"<=":Rn,array:vt,at:xn,boolean:vt,case:Tn,coalesce:bn,collator:Tt,format:yt,image:bt,in:wn,"index-of":An,interpolate:vn,"interpolate-hcl":vn,"interpolate-lab":vn,length:zn,let:_n,literal:pt,match:kn,number:vt,"number-format":Nn,object:vt,slice:Sn,step:Zt,string:vt,"to-boolean":xt,"to-color":xt,"to-number":xt,"to-string":xt,var:Wt,within:Vt};function Bn(e,t){var n=t[0],r=t[1],i=t[2],o=t[3];n=n.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);var a=o?o.evaluate(e):1,s=ut(n,r,i,a);if(s)throw new gt(s);return new ot(n/255*a,r/255*a,i/255*a,a)}function jn(e,t){return e in t}function Un(e,t){var n=t[e];return void 0===n?null:n}function Vn(e){return{type:e}}function qn(e){return{result:"success",value:e}}function Hn(e){return{result:"error",value:e}}function $n(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Wn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Gn(e){return!!e.expression&&e.expression.interpolated}function Yn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Xn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Zn(e){return e}function Kn(e,t){var n,r,i,o="color"===t.type,a=e.stops&&"object"==typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,c=e.type||(Gn(t)?"exponential":"interval");if(o&&((e=Ne({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],ot.parse(e[1])]}))),e.default?e.default=ot.parse(e.default):e.default=ot.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!mn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)n=tr;else if("interval"===c)n=er;else if("categorical"===c){n=Qn,r=Object.create(null);for(var u=0,h=e.stops;u<h.length;u+=1){var d=h[u];r[d[0]]=d[1]}i=typeof e.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');n=nr}if(a){for(var f={},p=[],g=0;g<e.stops.length;g++){var m=e.stops[g],v=m[0].zoom;void 0===f[v]&&(f[v]={zoom:v,type:e.type,property:e.property,default:e.default,stops:[]},p.push(v)),f[v].stops.push([m[0].value,m[1]])}for(var y=[],b=0,_=p;b<_.length;b+=1){var x=_[b];y.push([f[x].zoom,Kn(f[x],t)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:vn.interpolationFactor.bind(void 0,w),zoomStops:y.map((function(e){return e[0]})),evaluate:function(n,r){var i=n.zoom;return tr({stops:y,base:e.base},t,i).evaluate(i,r)}}}if(l){var A="exponential"===c?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:A,interpolationFactor:vn.interpolationFactor.bind(void 0,A),zoomStops:e.stops.map((function(e){return e[0]})),evaluate:function(o){var a=o.zoom;return n(e,t,a,r,i)}}}return{kind:"source",evaluate:function(o,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Jn(e.default,t.default):n(e,t,s,r,i)}}}function Jn(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function Qn(e,t,n,r,i){return Jn(typeof n===i?r[n]:void 0,e.default,t.default)}function er(e,t,n){if("number"!==Yn(n))return Jn(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];var i=Xt(e.stops.map((function(e){return e[0]})),n);return e.stops[i][1]}function tr(e,t,n){var r=void 0!==e.base?e.base:1;if("number"!==Yn(n))return Jn(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];var o=Xt(e.stops.map((function(e){return e[0]})),n),a=function(e,t,n,r){var i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}(n,r,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],c=Jt[t.type]||Zn;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=mn[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=s.evaluate.apply(void 0,e),r=l.evaluate.apply(void 0,e);if(void 0!==n&&void 0!==r)return c(n,r,a)}}:c(s,l,a)}function nr(e,t,n){return"color"===t.type?n=ot.parse(n):"formatted"===t.type?n=lt.fromString(n.toString()):"resolvedImage"===t.type?n=ct.fromString(n.toString()):Yn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0),Jn(n,e.default,t.default)}kt.register(Fn,{error:[{kind:"error"},[qe],function(e,t){var n=t[0];throw new gt(n.evaluate(e))}],typeof:[qe,[Ge],function(e,t){return Je(dt(t[0].evaluate(e)))}],"to-rgba":[Ke(Ve,4),[$e],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[$e,[Ve,Ve,Ve],Bn],rgba:[$e,[Ve,Ve,Ve,Ve],Bn],has:{type:He,overloads:[[[qe],function(e,t){return jn(t[0].evaluate(e),e.properties())}],[[qe,We],function(e,t){var n=t[0],r=t[1];return jn(n.evaluate(e),r.evaluate(e))}]]},get:{type:Ge,overloads:[[[qe],function(e,t){return Un(t[0].evaluate(e),e.properties())}],[[qe,We],function(e,t){var n=t[0],r=t[1];return Un(n.evaluate(e),r.evaluate(e))}]]},"feature-state":[Ge,[qe],function(e,t){return Un(t[0].evaluate(e),e.featureState||{})}],properties:[We,[],function(e){return e.properties()}],"geometry-type":[qe,[],function(e){return e.geometryType()}],id:[Ge,[],function(e){return e.id()}],zoom:[Ve,[],function(e){return e.globals.zoom}],"heatmap-density":[Ve,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Ve,[],function(e){return e.globals.lineProgress||0}],accumulated:[Ge,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Ve,Vn(Ve),function(e,t){for(var n=0,r=0,i=t;r<i.length;r+=1)n+=i[r].evaluate(e);return n}],"*":[Ve,Vn(Ve),function(e,t){for(var n=1,r=0,i=t;r<i.length;r+=1)n*=i[r].evaluate(e);return n}],"-":{type:Ve,overloads:[[[Ve,Ve],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)-r.evaluate(e)}],[[Ve],function(e,t){return-t[0].evaluate(e)}]]},"/":[Ve,[Ve,Ve],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)/r.evaluate(e)}],"%":[Ve,[Ve,Ve],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)%r.evaluate(e)}],ln2:[Ve,[],function(){return Math.LN2}],pi:[Ve,[],function(){return Math.PI}],e:[Ve,[],function(){return Math.E}],"^":[Ve,[Ve,Ve],function(e,t){var n=t[0],r=t[1];return Math.pow(n.evaluate(e),r.evaluate(e))}],sqrt:[Ve,[Ve],function(e,t){var n=t[0];return Math.sqrt(n.evaluate(e))}],log10:[Ve,[Ve],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN10}],ln:[Ve,[Ve],function(e,t){var n=t[0];return Math.log(n.evaluate(e))}],log2:[Ve,[Ve],function(e,t){var n=t[0];return Math.log(n.evaluate(e))/Math.LN2}],sin:[Ve,[Ve],function(e,t){var n=t[0];return Math.sin(n.evaluate(e))}],cos:[Ve,[Ve],function(e,t){var n=t[0];return Math.cos(n.evaluate(e))}],tan:[Ve,[Ve],function(e,t){var n=t[0];return Math.tan(n.evaluate(e))}],asin:[Ve,[Ve],function(e,t){var n=t[0];return Math.asin(n.evaluate(e))}],acos:[Ve,[Ve],function(e,t){var n=t[0];return Math.acos(n.evaluate(e))}],atan:[Ve,[Ve],function(e,t){var n=t[0];return Math.atan(n.evaluate(e))}],min:[Ve,Vn(Ve),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[Ve,Vn(Ve),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[Ve,[Ve],function(e,t){var n=t[0];return Math.abs(n.evaluate(e))}],round:[Ve,[Ve],function(e,t){var n=t[0].evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[Ve,[Ve],function(e,t){var n=t[0];return Math.floor(n.evaluate(e))}],ceil:[Ve,[Ve],function(e,t){var n=t[0];return Math.ceil(n.evaluate(e))}],"filter-==":[He,[qe,Ge],function(e,t){var n=t[0],r=t[1];return e.properties()[n.value]===r.value}],"filter-id-==":[He,[Ge],function(e,t){var n=t[0];return e.id()===n.value}],"filter-type-==":[He,[qe],function(e,t){var n=t[0];return e.geometryType()===n.value}],"filter-<":[He,[qe,Ge],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i<o}],"filter-id-<":[He,[Ge],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<i}],"filter->":[He,[qe,Ge],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>o}],"filter-id->":[He,[Ge],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>i}],"filter-<=":[He,[qe,Ge],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i<=o}],"filter-id-<=":[He,[Ge],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r<=i}],"filter->=":[He,[qe,Ge],function(e,t){var n=t[0],r=t[1],i=e.properties()[n.value],o=r.value;return typeof i==typeof o&&i>=o}],"filter-id->=":[He,[Ge],function(e,t){var n=t[0],r=e.id(),i=n.value;return typeof r==typeof i&&r>=i}],"filter-has":[He,[Ge],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[He,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[He,[Ke(qe)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[He,[Ke(Ge)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[He,[qe,Ke(Ge)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[He,[qe,Ke(Ge)],function(e,t){var n=t[0],r=t[1];return function(e,t,n,r){for(;n<=r;){var i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}(e.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:He,overloads:[[[He,He],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)&&r.evaluate(e)}],[Vn(He),function(e,t){for(var n=0,r=t;n<r.length;n+=1)if(!r[n].evaluate(e))return!1;return!0}]]},any:{type:He,overloads:[[[He,He],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)||r.evaluate(e)}],[Vn(He),function(e,t){for(var n=0,r=t;n<r.length;n+=1)if(r[n].evaluate(e))return!0;return!1}]]},"!":[He,[He],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[He,[qe],function(e,t){var n=t[0],r=e.globals&&e.globals.isSupportedScript;return!r||r(n.evaluate(e))}],upcase:[qe,[qe],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[qe,[qe],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[qe,Vn(Ge),function(e,t){return t.map((function(t){return ft(t.evaluate(e))})).join("")}],"resolved-locale":[qe,[Ye],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var rr=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new At,this._defaultValue=t?function(e){return"color"===e.type&&Xn(e.default)?new ot(0,0,0,0):"color"===e.type?ot.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function ir(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Fn}function or(e,t){var n=new Gt(Fn,[],t?function(e){var t={color:$e,string:qe,number:Ve,enum:qe,boolean:He,formatted:Xe,resolvedImage:Ze};return"array"===e.type?Ke(t[e.value]||Ge,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?qn(new rr(r,t)):Hn(n.errors)}rr.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},rr.prototype.evaluate=function(e,t,n,r,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new gt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var ar=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Ht(t.expression)};ar.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},ar.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)};var sr=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Ht(t.expression),this.interpolationType=r};function lr(e,t){if("error"===(e=or(e,t)).result)return e;var n=e.value.expression,r=qt(n);if(!r&&!$n(t))return Hn([new Be("","data expressions not supported")]);var i=$t(n,["zoom"]);if(!i&&!Wn(t))return Hn([new Be("","zoom expressions not supported")]);var o=ur(n);if(!o&&!i)return Hn([new Be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof Be)return Hn([o]);if(o instanceof vn&&!Gn(t))return Hn([new Be("",'"interpolate" expressions cannot be used with this property')]);if(!o)return qn(new ar(r?"constant":"source",e.value));var a=o instanceof vn?o.interpolation:void 0;return qn(new sr(r?"camera":"composite",e.value,o.labels,a))}sr.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)},sr.prototype.evaluate=function(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)},sr.prototype.interpolationFactor=function(e,t,n){return this.interpolationType?vn.interpolationFactor(this.interpolationType,e,t,n):0};var cr=function(e,t){this._parameters=e,this._specification=t,Ne(this,Kn(this._parameters,this._specification))};function ur(e){var t=null;if(e instanceof _n)t=ur(e.result);else if(e instanceof bn)for(var n=0,r=e.args;n<r.length;n+=1){var i=r[n];if(t=ur(i))break}else(e instanceof Zt||e instanceof vn)&&e.input instanceof kt&&"zoom"===e.input.name&&(t=e);return t instanceof Be||e.eachChild((function(e){var n=ur(e);n instanceof Be?t=n:!t&&n?t=new Be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&n&&t!==n&&(t=new Be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function hr(e){var t=e.key,n=e.value,r=e.valueSpec||{},i=e.objectElementValidators||{},o=e.style,a=e.styleSpec,s=[],l=Yn(n);if("object"!==l)return[new Re(t,n,"object expected, "+l+" found")];for(var c in n){var u=c.split(".")[0],h=r[u]||r["*"],d=void 0;if(i[u])d=i[u];else if(r[u])d=Fr;else if(i["*"])d=i["*"];else{if(!r["*"]){s.push(new Re(t,n[c],'unknown property "'+c+'"'));continue}d=Fr}s=s.concat(d({key:(t?t+".":t)+c,value:n[c],valueSpec:h,style:o,styleSpec:a,object:n,objectKey:c},n))}for(var f in r)i[f]||r[f].required&&void 0===r[f].default&&void 0===n[f]&&s.push(new Re(t,n,'missing required property "'+f+'"'));return s}function dr(e){var t=e.value,n=e.valueSpec,r=e.style,i=e.styleSpec,o=e.key,a=e.arrayElementValidator||Fr;if("array"!==Yn(t))return[new Re(o,t,"array expected, "+Yn(t)+" found")];if(n.length&&t.length!==n.length)return[new Re(o,t,"array length "+n.length+" expected, length "+t.length+" found")];if(n["min-length"]&&t.length<n["min-length"])return[new Re(o,t,"array length at least "+n["min-length"]+" expected, length "+t.length+" found")];var s={type:n.value,values:n.values};i.$version<7&&(s.function=n.function),"object"===Yn(n.value)&&(s=n.value);for(var l=[],c=0;c<t.length;c++)l=l.concat(a({array:t,arrayIndex:c,value:t[c],valueSpec:s,style:r,styleSpec:i,key:o+"["+c+"]"}));return l}function fr(e){var t=e.key,n=e.value,r=e.valueSpec,i=Yn(n);return"number"===i&&n!=n&&(i="NaN"),"number"!==i?[new Re(t,n,"number expected, "+i+" found")]:"minimum"in r&&n<r.minimum?[new Re(t,n,n+" is less than the minimum value "+r.minimum)]:"maximum"in r&&n>r.maximum?[new Re(t,n,n+" is greater than the maximum value "+r.maximum)]:[]}function pr(e){var t,n,r,i=e.valueSpec,o=ze(e.value.type),a={},s="categorical"!==o&&void 0===e.value.property,l=!s,c="array"===Yn(e.value.stops)&&"array"===Yn(e.value.stops[0])&&"object"===Yn(e.value.stops[0][0]),u=hr({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===o)return[new Re(e.key,e.value,'identity function may not have a "stops" property')];var t=[],n=e.value;return t=t.concat(dr({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Yn(n)&&0===n.length&&t.push(new Re(e.key,n,"array must have at least one stop")),t},default:function(e){return Fr({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===o&&s&&u.push(new Re(e.key,e.value,'missing required property "property"')),"identity"===o||e.value.stops||u.push(new Re(e.key,e.value,'missing required property "stops"')),"exponential"===o&&e.valueSpec.expression&&!Gn(e.valueSpec)&&u.push(new Re(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!$n(e.valueSpec)?u.push(new Re(e.key,e.value,"property functions not supported")):s&&!Wn(e.valueSpec)&&u.push(new Re(e.key,e.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==e.value.property||u.push(new Re(e.key,e.value,'"property" property is required')),u;function h(e){var t=[],o=e.value,s=e.key;if("array"!==Yn(o))return[new Re(s,o,"array expected, "+Yn(o)+" found")];if(2!==o.length)return[new Re(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==Yn(o[0]))return[new Re(s,o,"object expected, "+Yn(o[0])+" found")];if(void 0===o[0].zoom)return[new Re(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Re(s,o,"object stop key must have value")];if(r&&r>ze(o[0].zoom))return[new Re(s,o[0].zoom,"stop zoom values must appear in ascending order")];ze(o[0].zoom)!==r&&(r=ze(o[0].zoom),n=void 0,a={}),t=t.concat(hr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:fr,value:d}}))}else t=t.concat(d({key:s+"[0]",value:o[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},o));return ir(Fe(o[1]))?t.concat([new Re(s+"[1]",o[1],"expressions are not allowed in function stops.")]):t.concat(Fr({key:s+"[1]",value:o[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function d(e,r){var s=Yn(e.value),l=ze(e.value),c=null!==e.value?e.value:r;if(t){if(s!==t)return[new Re(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Re(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return $n(i)&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Re(e.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==n&&l<n?[new Re(e.key,c,"stop domain values must appear in ascending order")]:(n=l,"categorical"===o&&l in a?[new Re(e.key,c,"stop domain values must be unique")]:(a[l]=!0,[])):[new Re(e.key,c,"integer expected, found "+l)]}}function gr(e){var t=("property"===e.expressionContext?lr:or)(Fe(e.value),e.valueSpec);if("error"===t.result)return t.value.map((function(t){return new Re(""+e.key+t.key,e.value,t.message)}));var n=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!n.outputDefined())return[new Re(e.key,e.value,'Invalid data expression for "'+e.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===e.expressionContext&&"layout"===e.propertyType&&!Ht(n))return[new Re(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!Ht(n))return[new Re(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!$t(n,["zoom","feature-state"]))return[new Re(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!qt(n))return[new Re(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function mr(e){var t=e.key,n=e.value,r=e.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(ze(n))&&i.push(new Re(t,n,"expected one of ["+r.values.join(", ")+"], "+JSON.stringify(n)+" found")):-1===Object.keys(r.values).indexOf(ze(n))&&i.push(new Re(t,n,"expected one of ["+Object.keys(r.values).join(", ")+"], "+JSON.stringify(n)+" found")),i}function vr(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,n=e.slice(1);t<n.length;t+=1){var r=n[t];if(!vr(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}cr.deserialize=function(e){return new cr(e._parameters,e._specification)},cr.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}};var yr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function br(e){if(null==e)return{filter:function(){return!0},needGeometry:!1};vr(e)||(e=wr(e));var t=or(e,yr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return{filter:function(e,n,r){return t.value.evaluate(e,n,{},r)},needGeometry:xr(e)}}function _r(e,t){return e<t?-1:e>t?1:0}function xr(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t<e.length;t++)if(xr(e[t]))return!0;return!1}function wr(e){if(!e)return!0;var t,n=e[0];return e.length<=1?"any"!==n:"=="===n?Ar(e[1],e[2],"=="):"!="===n?Sr(Ar(e[1],e[2],"==")):"<"===n||">"===n||"<="===n||">="===n?Ar(e[1],e[2],n):"any"===n?(t=e.slice(1),["any"].concat(t.map(wr))):"all"===n?["all"].concat(e.slice(1).map(wr)):"none"===n?["all"].concat(e.slice(1).map(wr).map(Sr)):"in"===n?kr(e[1],e.slice(2)):"!in"===n?Sr(kr(e[1],e.slice(2))):"has"===n?Tr(e[1]):"!has"===n?Sr(Tr(e[1])):"within"!==n||e}function Ar(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function kr(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(_r)]]:["filter-in-small",e,["literal",t]]}}function Tr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Sr(e){return["!",e]}function Er(e){return vr(Fe(e.value))?gr(Ne({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Cr(e)}function Cr(e){var t=e.value,n=e.key;if("array"!==Yn(t))return[new Re(n,t,"array expected, "+Yn(t)+" found")];var r,i=e.styleSpec,o=[];if(t.length<1)return[new Re(n,t,"filter array must have at least 1 element")];switch(o=o.concat(mr({key:n+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),ze(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===ze(t[1])&&o.push(new Re(n,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&o.push(new Re(n,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(r=Yn(t[1]))&&o.push(new Re(n+"[1]",t[1],"string expected, "+r+" found"));for(var a=2;a<t.length;a++)r=Yn(t[a]),"$type"===ze(t[1])?o=o.concat(mr({key:n+"["+a+"]",value:t[a],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==r&&"number"!==r&&"boolean"!==r&&o.push(new Re(n+"["+a+"]",t[a],"string, number, or boolean expected, "+r+" found"));break;case"any":case"all":case"none":for(var s=1;s<t.length;s++)o=o.concat(Cr({key:n+"["+s+"]",value:t[s],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":r=Yn(t[1]),2!==t.length?o.push(new Re(n,t,'filter array for "'+t[0]+'" operator must have 2 elements')):"string"!==r&&o.push(new Re(n+"[1]",t[1],"string expected, "+r+" found"));break;case"within":r=Yn(t[1]),2!==t.length?o.push(new Re(n,t,'filter array for "'+t[0]+'" operator must have 2 elements')):"object"!==r&&o.push(new Re(n+"[1]",t[1],"object expected, "+r+" found"))}return o}function Mr(e,t){var n=e.key,r=e.style,i=e.styleSpec,o=e.value,a=e.objectKey,s=i[t+"_"+e.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===t&&l&&s[l[1]]&&s[l[1]].transition)return Fr({key:n,value:o,valueSpec:i.transition,style:r,styleSpec:i});var c,u=e.valueSpec||s[a];if(!u)return[new Re(n,o,'unknown property "'+a+'"')];if("string"===Yn(o)&&$n(u)&&!u.tokens&&(c=/^{([^}]+)}$/.exec(o)))return[new Re(n,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(c[1])+" }`.")];var h=[];return"symbol"===e.layerType&&("text-field"===a&&r&&!r.glyphs&&h.push(new Re(n,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Xn(Fe(o))&&"identity"===ze(o.type)&&h.push(new Re(n,o,'"text-font" does not support identity functions'))),h.concat(Fr({key:e.key,value:o,valueSpec:u,style:r,styleSpec:i,expressionContext:"property",propertyType:t,propertyKey:a}))}function Or(e){return Mr(e,"paint")}function Lr(e){return Mr(e,"layout")}function Dr(e){var t=[],n=e.value,r=e.key,i=e.style,o=e.styleSpec;n.type||n.ref||t.push(new Re(r,n,'either "type" or "ref" is required'));var a,s=ze(n.type),l=ze(n.ref);if(n.id)for(var c=ze(n.id),u=0;u<e.arrayIndex;u++){var h=i.layers[u];ze(h.id)===c&&t.push(new Re(r,n.id,'duplicate layer id "'+n.id+'", previously used at line '+h.id.__line__))}if("ref"in n)["type","source","source-layer","filter","layout"].forEach((function(e){e in n&&t.push(new Re(r,n[e],'"'+e+'" is prohibited for ref layers'))})),i.layers.forEach((function(e){ze(e.id)===l&&(a=e)})),a?a.ref?t.push(new Re(r,n.ref,"ref cannot reference another ref layer")):s=ze(a.type):t.push(new Re(r,n.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(n.source){var d=i.sources&&i.sources[n.source],f=d&&ze(d.type);d?"vector"===f&&"raster"===s?t.push(new Re(r,n.source,'layer "'+n.id+'" requires a raster source')):"raster"===f&&"raster"!==s?t.push(new Re(r,n.source,'layer "'+n.id+'" requires a vector source')):"vector"!==f||n["source-layer"]?"raster-dem"===f&&"hillshade"!==s?t.push(new Re(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!n.paint||!n.paint["line-gradient"]||"geojson"===f&&d.lineMetrics||t.push(new Re(r,n,'layer "'+n.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):t.push(new Re(r,n,'layer "'+n.id+'" must specify a "source-layer"')):t.push(new Re(r,n.source,'source "'+n.source+'" not found'))}else t.push(new Re(r,n,'missing required property "source"'));return t=t.concat(hr({key:r,value:n,valueSpec:o.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Fr({key:r+".type",value:n.type,valueSpec:o.layer.type,style:e.style,styleSpec:e.styleSpec,object:n,objectKey:"type"})},filter:Er,layout:function(e){return hr({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(e){return Lr(Ne({layerType:s},e))}}})},paint:function(e){return hr({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(e){return Or(Ne({layerType:s},e))}}})}}})),t}function Ir(e){var t=e.value,n=e.key,r=Yn(t);return"string"!==r?[new Re(n,t,"string expected, "+r+" found")]:[]}var Rr={promoteId:function(e){var t=e.key,n=e.value;if("string"===Yn(n))return Ir({key:t,value:n});var r=[];for(var i in n)r.push.apply(r,Ir({key:t+"."+i,value:n[i]}));return r}};function Pr(e){var t=e.value,n=e.key,r=e.styleSpec,i=e.style;if(!t.type)return[new Re(n,t,'"type" is required')];var o,a=ze(t.type);switch(a){case"vector":case"raster":case"raster-dem":return hr({key:n,value:t,valueSpec:r["source_"+a.replace("-","_")],style:e.style,styleSpec:r,objectElementValidators:Rr});case"geojson":if(o=hr({key:n,value:t,valueSpec:r.source_geojson,style:i,styleSpec:r,objectElementValidators:Rr}),t.cluster)for(var s in t.clusterProperties){var l=t.clusterProperties[s],c=l[0],u=l[1],h="string"==typeof c?[c,["accumulated"],["get",s]]:c;o.push.apply(o,gr({key:n+"."+s+".map",value:u,expressionContext:"cluster-map"})),o.push.apply(o,gr({key:n+"."+s+".reduce",value:h,expressionContext:"cluster-reduce"}))}return o;case"video":return hr({key:n,value:t,valueSpec:r.source_video,style:i,styleSpec:r});case"image":return hr({key:n,value:t,valueSpec:r.source_image,style:i,styleSpec:r});case"canvas":return[new Re(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return mr({key:n+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:r})}}function Nr(e){var t=e.value,n=e.styleSpec,r=n.light,i=e.style,o=[],a=Yn(t);if(void 0===t)return o;if("object"!==a)return o.concat([new Re("light",t,"object expected, "+a+" found")]);for(var s in t){var l=s.match(/^(.*)-transition$/);o=l&&r[l[1]]&&r[l[1]].transition?o.concat(Fr({key:s,value:t[s],valueSpec:n.transition,style:i,styleSpec:n})):r[s]?o.concat(Fr({key:s,value:t[s],valueSpec:r[s],style:i,styleSpec:n})):o.concat([new Re(s,t[s],'unknown property "'+s+'"')])}return o}var zr={"*":function(){return[]},array:dr,boolean:function(e){var t=e.value,n=e.key,r=Yn(t);return"boolean"!==r?[new Re(n,t,"boolean expected, "+r+" found")]:[]},number:fr,color:function(e){var t=e.key,n=e.value,r=Yn(n);return"string"!==r?[new Re(t,n,"color expected, "+r+" found")]:null===it(n)?[new Re(t,n,'color expected, "'+n+'" found')]:[]},constants:Pe,enum:mr,filter:Er,function:pr,layer:Dr,object:hr,source:Pr,light:Nr,string:Ir,formatted:function(e){return 0===Ir(e).length?[]:gr(e)},resolvedImage:function(e){return 0===Ir(e).length?[]:gr(e)}};function Fr(e){var t=e.value,n=e.valueSpec,r=e.styleSpec;return n.expression&&Xn(ze(t))?pr(e):n.expression&&ir(Fe(t))?gr(e):n.type&&zr[n.type]?zr[n.type](e):hr(Ne({},e,{valueSpec:n.type?r[n.type]:n}))}function Br(e){var t=e.value,n=e.key,r=Ir(e);return r.length||(-1===t.indexOf("{fontstack}")&&r.push(new Re(n,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&r.push(new Re(n,t,'"glyphs" url must include a "{range}" token'))),r}function jr(e,t){void 0===t&&(t=Ie);var n=[];return n=n.concat(Fr({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Br,"*":function(){return[]}}})),e.constants&&(n=n.concat(Pe({key:"constants",value:e.constants,style:e,styleSpec:t}))),Ur(n)}function Ur(e){return[].concat(e).sort((function(e,t){return e.line-t.line}))}function Vr(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return Ur(e.apply(this,t))}}jr.source=Vr(Pr),jr.light=Vr(Nr),jr.layer=Vr(Dr),jr.filter=Vr(Er),jr.paintProperty=Vr(Or),jr.layoutProperty=Vr(Lr);var qr=jr,Hr=qr.light,$r=qr.paintProperty,Wr=qr.layoutProperty;function Gr(e,t){var n=!1;if(t&&t.length)for(var r=0,i=t;r<i.length;r+=1){var o=i[r];e.fire(new Le(new Error(o.message))),n=!0}return n}var Yr=Xr;function Xr(e,t,n){var r=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var i=new Int32Array(this.arrayBuffer);e=i[0],t=i[1],n=i[2],this.d=t+2*n;for(var o=0;o<this.d*this.d;o++){var a=i[3+o],s=i[3+o+1];r.push(a===s?null:i.subarray(a,s))}var l=i[3+r.length],c=i[3+r.length+1];this.keys=i.subarray(l,c),this.bboxes=i.subarray(c),this.insert=this._insertReadonly}else{this.d=t+2*n;for(var u=0;u<this.d*this.d;u++)r.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=n,this.scale=t/e,this.uid=0;var h=n/t*e;this.min=-h,this.max=e+h}Xr.prototype.insert=function(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Xr.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Xr.prototype._insertCell=function(e,t,n,r,i,o){this.cells[i].push(o)},Xr.prototype.query=function(e,t,n,r,i){var o=this.min,a=this.max;if(e<=o&&t<=o&&a<=n&&a<=r&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,n,r,this._queryCell,s,{},i),s},Xr.prototype._queryCell=function(e,t,n,r,i,o,a,s){var l=this.cells[i];if(null!==l)for(var c=this.keys,u=this.bboxes,h=0;h<l.length;h++){var d=l[h];if(void 0===a[d]){var f=4*d;(s?s(u[f+0],u[f+1],u[f+2],u[f+3]):e<=u[f+2]&&t<=u[f+3]&&n>=u[f+0]&&r>=u[f+1])?(a[d]=!0,o.push(c[d])):a[d]=!1}}},Xr.prototype._forEachCell=function(e,t,n,r,i,o,a,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(n),h=this._convertToCellCoord(r),d=l;d<=u;d++)for(var f=c;f<=h;f++){var p=this.d*f+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(f),this._convertFromCellCoord(d+1),this._convertFromCellCoord(f+1)))&&i.call(this,e,t,n,r,p,o,a,s))return}},Xr.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},Xr.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},Xr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=3+this.cells.length+1+1,n=0,r=0;r<this.cells.length;r++)n+=this.cells[r].length;var i=new Int32Array(t+n+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var o=t,a=0;a<e.length;a++){var s=e[a];i[3+a]=o,i.set(s,o),o+=s.length}return i[3+e.length]=o,i.set(this.keys,o),o+=this.keys.length,i[3+e.length+1]=o,i.set(this.bboxes,o),o+=this.bboxes.length,i.buffer};var Zr=self.ImageData,Kr=self.ImageBitmap,Jr={};function Qr(e,t,n){void 0===n&&(n={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Jr[e]={klass:t,omit:n.omit||[],shallow:n.shallow||[]}}for(var ei in Qr("Object",Object),Yr.serialize=function(e,t){var n=e.toArrayBuffer();return t&&t.push(n),{buffer:n}},Yr.deserialize=function(e){return new Yr(e.buffer)},Qr("Grid",Yr),Qr("Color",ot),Qr("Error",Error),Qr("ResolvedImage",ct),Qr("StylePropertyFunction",cr),Qr("StyleExpression",rr,{omit:["_evaluator"]}),Qr("ZoomDependentExpression",sr),Qr("ZoomConstantExpression",ar),Qr("CompoundExpression",kt,{omit:["_evaluate"]}),Fn)Fn[ei]._classRegistryKey||Qr("Expression_"+ei,Fn[ei]);function ti(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function ni(e){return Kr&&e instanceof Kr}function ri(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(ti(e)||ni(e))return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var n=e;return t&&t.push(n.buffer),n}if(e instanceof Zr)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var r=[],i=0,o=e;i<o.length;i+=1){var a=o[i];r.push(ri(a,t))}return r}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var c=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var u in e)if(e.hasOwnProperty(u)&&!(Jr[l].omit.indexOf(u)>=0)){var h=e[u];c[u]=Jr[l].shallow.indexOf(u)>=0?h:ri(h,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function ii(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||ti(e)||ni(e)||ArrayBuffer.isView(e)||e instanceof Zr)return e;if(Array.isArray(e))return e.map(ii);if("object"==typeof e){var t=e.$name||"Object",n=Jr[t].klass;if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);for(var r=Object.create(n.prototype),i=0,o=Object.keys(e);i<o.length;i+=1){var a=o[i];if("$name"!==a){var s=e[a];r[a]=Jr[t].shallow.indexOf(a)>=0?s:ii(s)}}return r}throw new Error("can't deserialize object of type "+typeof e)}var oi=function(){this.first=!0};oi.prototype.update=function(e,t){var n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<n&&(this.lastIntegerZoom=n,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=n,!0))};var ai={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function si(e){for(var t=0,n=e;t<n.length;t+=1)if(li(n[t].charCodeAt(0)))return!0;return!1}function li(e){return!(746!==e&&747!==e&&(e<4352||!(ai["Bopomofo Extended"](e)||ai.Bopomofo(e)||ai["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||ai["CJK Compatibility Ideographs"](e)||ai["CJK Compatibility"](e)||ai["CJK Radicals Supplement"](e)||ai["CJK Strokes"](e)||!(!ai["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||ai["CJK Unified Ideographs Extension A"](e)||ai["CJK Unified Ideographs"](e)||ai["Enclosed CJK Letters and Months"](e)||ai["Hangul Compatibility Jamo"](e)||ai["Hangul Jamo Extended-A"](e)||ai["Hangul Jamo Extended-B"](e)||ai["Hangul Jamo"](e)||ai["Hangul Syllables"](e)||ai.Hiragana(e)||ai["Ideographic Description Characters"](e)||ai.Kanbun(e)||ai["Kangxi Radicals"](e)||ai["Katakana Phonetic Extensions"](e)||ai.Katakana(e)&&12540!==e||!(!ai["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!ai["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||ai["Unified Canadian Aboriginal Syllabics"](e)||ai["Unified Canadian Aboriginal Syllabics Extended"](e)||ai["Vertical Forms"](e)||ai["Yijing Hexagram Symbols"](e)||ai["Yi Syllables"](e)||ai["Yi Radicals"](e))))}function ci(e){return!(li(e)||function(e){return!!(ai["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||ai["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||ai["Letterlike Symbols"](e)||ai["Number Forms"](e)||ai["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||ai["Control Pictures"](e)&&9251!==e||ai["Optical Character Recognition"](e)||ai["Enclosed Alphanumerics"](e)||ai["Geometric Shapes"](e)||ai["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||ai["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||ai["CJK Symbols and Punctuation"](e)||ai.Katakana(e)||ai["Private Use Area"](e)||ai["CJK Compatibility Forms"](e)||ai["Small Form Variants"](e)||ai["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function ui(e){return ai.Arabic(e)||ai["Arabic Supplement"](e)||ai["Arabic Extended-A"](e)||ai["Arabic Presentation Forms-A"](e)||ai["Arabic Presentation Forms-B"](e)}function hi(e){return e>=1424&&e<=2303||ai["Arabic Presentation Forms-A"](e)||ai["Arabic Presentation Forms-B"](e)}function di(e,t){return!(!t&&hi(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||ai.Khmer(e))}function fi(e){for(var t=0,n=e;t<n.length;t+=1)if(hi(n[t].charCodeAt(0)))return!0;return!1}var pi="deferred",gi="loading",mi="loaded",vi="error",yi=null,bi="unavailable",_i=null,xi=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(bi=vi),yi&&yi(e)};function wi(){Ai.fire(new Oe("pluginStateChange",{pluginStatus:bi,pluginURL:_i}))}var Ai=new De,ki=function(){return bi},Ti=function(){if(bi!==pi||!_i)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");bi=gi,wi(),_i&&Ae({url:_i},(function(e){e?xi(e):(bi=mi,wi())}))},Si={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return bi===mi||null!=Si.applyArabicShaping},isLoading:function(){return bi===gi},setState:function(e){bi=e.pluginStatus,_i=e.pluginURL},isParsed:function(){return null!=Si.applyArabicShaping&&null!=Si.processBidirectionalText&&null!=Si.processStyledBidirectionalText},getPluginURL:function(){return _i}},Ei=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new oi,this.transition={})};Ei.prototype.isSupportedScript=function(e){return function(e,t){for(var n=0,r=e;n<r.length;n+=1)if(!di(r[n].charCodeAt(0),t))return!1;return!0}(e,Si.isLoaded())},Ei.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ei.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),n=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}};var Ci=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(Xn(e))return new cr(e,t);if(ir(e)){var n=lr(e,t);if("error"===n.result)throw new Error(n.value.map((function(e){return e.key+": "+e.message})).join(", "));return n.value}var r=e;return"string"==typeof e&&"color"===t.type&&(r=ot.parse(e)),{kind:"constant",evaluate:function(){return r}}}(void 0===t?e.specification.default:t,e.specification)};Ci.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ci.prototype.possiblyEvaluate=function(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)};var Mi=function(e){this.property=e,this.value=new Ci(e,void 0)};Mi.prototype.transitioned=function(e,t){return new Li(this.property,this.value,t,h({},e.transition,this.transition),e.now)},Mi.prototype.untransitioned=function(){return new Li(this.property,this.value,null,{},0)};var Oi=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Oi.prototype.getValue=function(e){return _(this._values[e].value.value)},Oi.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Mi(this._values[e].property)),this._values[e].value=new Ci(this._values[e].property,null===t?void 0:_(t))},Oi.prototype.getTransition=function(e){return _(this._values[e].transition)},Oi.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Mi(this._values[e].property)),this._values[e].transition=_(t)||void 0},Oi.prototype.serialize=function(){for(var e={},t=0,n=Object.keys(this._values);t<n.length;t+=1){var r=n[t],i=this.getValue(r);void 0!==i&&(e[r]=i);var o=this.getTransition(r);void 0!==o&&(e[r+"-transition"]=o)}return e},Oi.prototype.transitioned=function(e,t){for(var n=new Di(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var o=i[r];n._values[o]=this._values[o].transitioned(e,t._values[o])}return n},Oi.prototype.untransitioned=function(){for(var e=new Di(this._properties),t=0,n=Object.keys(this._values);t<n.length;t+=1){var r=n[t];e._values[r]=this._values[r].untransitioned()}return e};var Li=function(e,t,n,r,i){this.property=e,this.value=t,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,e.specification.transition&&(r.delay||r.duration)&&(this.prior=n)};Li.prototype.possiblyEvaluate=function(e,t,n){var r=e.now||0,i=this.value.possiblyEvaluate(e,t,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r<this.begin)return o.possiblyEvaluate(e,t,n);var a=(r-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(e,t,n),i,function(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}(a))}return i};var Di=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Di.prototype.possiblyEvaluate=function(e,t,n){for(var r=new Pi(this._properties),i=0,o=Object.keys(this._values);i<o.length;i+=1){var a=o[i];r._values[a]=this._values[a].possiblyEvaluate(e,t,n)}return r},Di.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var n=t[e];if(this._values[n].prior)return!0}return!1};var Ii=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};Ii.prototype.getValue=function(e){return _(this._values[e].value)},Ii.prototype.setValue=function(e,t){this._values[e]=new Ci(this._values[e].property,null===t?void 0:_(t))},Ii.prototype.serialize=function(){for(var e={},t=0,n=Object.keys(this._values);t<n.length;t+=1){var r=n[t],i=this.getValue(r);void 0!==i&&(e[r]=i)}return e},Ii.prototype.possiblyEvaluate=function(e,t,n){for(var r=new Pi(this._properties),i=0,o=Object.keys(this._values);i<o.length;i+=1){var a=o[i];r._values[a]=this._values[a].possiblyEvaluate(e,t,n)}return r};var Ri=function(e,t,n){this.property=e,this.value=t,this.parameters=n};Ri.prototype.isConstant=function(){return"constant"===this.value.kind},Ri.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},Ri.prototype.evaluate=function(e,t,n,r){return this.property.evaluate(this.value,this.parameters,e,t,n,r)};var Pi=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};Pi.prototype.get=function(e){return this._values[e]};var Ni=function(e){this.specification=e};Ni.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},Ni.prototype.interpolate=function(e,t,n){var r=Jt[this.specification.type];return r?r(e,t,n):e};var zi=function(e,t){this.specification=e,this.overrides=t};zi.prototype.possiblyEvaluate=function(e,t,n,r){return"constant"===e.expression.kind||"camera"===e.expression.kind?new Ri(this,{kind:"constant",value:e.expression.evaluate(t,null,{},n,r)},t):new Ri(this,e.expression,t)},zi.prototype.interpolate=function(e,t,n){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new Ri(this,{kind:"constant",value:void 0},e.parameters);var r=Jt[this.specification.type];return r?new Ri(this,{kind:"constant",value:r(e.value.value,t.value.value,n)},e.parameters):e},zi.prototype.evaluate=function(e,t,n,r,i,o){return"constant"===e.kind?e.value:e.evaluate(t,n,r,i,o)};var Fi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(e,t,n,r){if(void 0===e.value)return new Ri(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},n,r),o="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,t);return new Ri(this,{kind:"constant",value:a},t)}if("camera"===e.expression.kind){var s=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new Ri(this,{kind:"constant",value:s},t)}return new Ri(this,e.expression,t)},t.prototype.evaluate=function(e,t,n,r,i,o){if("source"===e.kind){var a=e.evaluate(t,n,r,i,o);return this._calculate(a,a,a,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},n,r),e.evaluate({zoom:Math.floor(t.zoom)},n,r),e.evaluate({zoom:Math.floor(t.zoom)+1},n,r),t):e.value},t.prototype._calculate=function(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},t.prototype.interpolate=function(e){return e},t}(zi),Bi=function(e){this.specification=e};Bi.prototype.possiblyEvaluate=function(e,t,n,r){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},n,r);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Ei(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Ei(Math.floor(t.zoom),t)),e.expression.evaluate(new Ei(Math.floor(t.zoom+1),t)),t)}},Bi.prototype._calculate=function(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},Bi.prototype.interpolate=function(e){return e};var ji=function(e){this.specification=e};ji.prototype.possiblyEvaluate=function(e,t,n,r){return!!e.expression.evaluate(t,null,{},n,r)},ji.prototype.interpolate=function(){return!1};var Ui=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var n=e[t];n.specification.overridable&&this.overridableProperties.push(t);var r=this.defaultPropertyValues[t]=new Ci(n,void 0),i=this.defaultTransitionablePropertyValues[t]=new Mi(n);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}};Qr("DataDrivenProperty",zi),Qr("DataConstantProperty",Ni),Qr("CrossFadedDataDrivenProperty",Fi),Qr("CrossFadedProperty",Bi),Qr("ColorRampProperty",ji);var Vi="-transition",qi=function(e){function t(t,n){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),n.layout&&(this._unevaluatedLayout=new Ii(n.layout)),n.paint)){for(var r in this._transitionablePaint=new Oi(n.paint),t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Pi(n.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,n){if(void 0===n&&(n={}),null!=t){var r="layers."+this.id+".layout."+e;if(this._validate(Wr,r,e,t,n))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return v(e,Vi)?this._transitionablePaint.getTransition(e.slice(0,-Vi.length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,n){if(void 0===n&&(n={}),null!=t){var r="layers."+this.id+".paint."+e;if(this._validate($r,r,e,t,n))return!1}if(v(e,Vi))return this._transitionablePaint.setTransition(e.slice(0,-Vi.length),t||void 0),!1;var i=this._transitionablePaint._values[e],o="cross-faded-data-driven"===i.property.specification["property-type"],a=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||a||o||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,n){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,n,r,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Gr(this,e.call(qr,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:Ie,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof Ri&&$n(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(De),Hi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},$i=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Wi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Gi(e,t){void 0===t&&(t=1);var n=0,r=0;return{members:e.map((function(e){var i,o=(i=e.type,Hi[i].BYTES_PER_ELEMENT),a=n=Yi(n,Math.max(t,o)),s=e.components||1;return r=Math.max(r,o),n+=o*s,{name:e.name,type:e.type,components:s,offset:a}})),size:Yi(n,Math.max(r,t)),alignment:t}}function Yi(e,t){return Math.ceil(e/t)*t}Wi.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Wi.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Wi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Wi.prototype.clear=function(){this.length=0},Wi.prototype.resize=function(e){this.reserve(e),this.length=e},Wi.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Wi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Xi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e},t}(Wi);Xi.prototype.bytesPerElement=4,Qr("StructArrayLayout2i4",Xi);var Zi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,e},t}(Wi);Zi.prototype.bytesPerElement=8,Qr("StructArrayLayout4i8",Zi);var Ki=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Wi);Ki.prototype.bytesPerElement=12,Qr("StructArrayLayout2i4i12",Ki);var Ji=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(Wi);Ji.prototype.bytesPerElement=8,Qr("StructArrayLayout2i4ub8",Ji);var Qi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,i,o,a,s,l,c)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,c,u){var h=9*e,d=18*e;return this.uint16[h+0]=t,this.uint16[h+1]=n,this.uint16[h+2]=r,this.uint16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint8[d+16]=c,this.uint8[d+17]=u,e},t}(Wi);Qi.prototype.bytesPerElement=18,Qr("StructArrayLayout8ui2ub18",Qi);var eo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,c,u,h){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,n,r,i,o,a,s,l,c,u,h)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,c,u,h,d){var f=12*e;return this.int16[f+0]=t,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=i,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=c,this.int16[f+9]=u,this.int16[f+10]=h,this.int16[f+11]=d,e},t}(Wi);eo.prototype.bytesPerElement=24,Qr("StructArrayLayout4i4ui4i24",eo);var to=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e},t}(Wi);to.prototype.bytesPerElement=12,Qr("StructArrayLayout3f12",to);var no=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint32[n+0]=t,e},t}(Wi);no.prototype.bytesPerElement=4,Qr("StructArrayLayout1ul4",no);var ro=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,n,r,i,o,a,s,l)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,c){var u=10*e,h=5*e;return this.int16[u+0]=t,this.int16[u+1]=n,this.int16[u+2]=r,this.int16[u+3]=i,this.int16[u+4]=o,this.int16[u+5]=a,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(Wi);ro.prototype.bytesPerElement=20,Qr("StructArrayLayout6i1ul2ui20",ro);var io=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)},t.prototype.emplace=function(e,t,n,r,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(Wi);io.prototype.bytesPerElement=12,Qr("StructArrayLayout2i2i2i12",io);var oo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i)},t.prototype.emplace=function(e,t,n,r,i,o){var a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,e},t}(Wi);oo.prototype.bytesPerElement=16,Qr("StructArrayLayout2f1f2i16",oo);var ao=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,e},t}(Wi);ao.prototype.bytesPerElement=12,Qr("StructArrayLayout2ub2f12",ao);var so=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,this.uint16[i+2]=r,e},t}(Wi);so.prototype.bytesPerElement=6,Qr("StructArrayLayout3ui6",so);var lo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v){var y=24*e,b=12*e,_=48*e;return this.int16[y+0]=t,this.int16[y+1]=n,this.uint16[y+2]=r,this.uint16[y+3]=i,this.uint32[b+2]=o,this.uint32[b+3]=a,this.uint32[b+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[b+7]=h,this.float32[b+8]=d,this.uint8[_+36]=f,this.uint8[_+37]=p,this.uint8[_+38]=g,this.uint32[b+10]=m,this.int16[y+22]=v,e},t}(Wi);lo.prototype.bytesPerElement=48,Qr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",lo);var co=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E){var C=this.length;return this.resize(C+1),this.emplace(C,e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E)},t.prototype.emplace=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E,C){var M=34*e,O=17*e;return this.int16[M+0]=t,this.int16[M+1]=n,this.int16[M+2]=r,this.int16[M+3]=i,this.int16[M+4]=o,this.int16[M+5]=a,this.int16[M+6]=s,this.int16[M+7]=l,this.uint16[M+8]=c,this.uint16[M+9]=u,this.uint16[M+10]=h,this.uint16[M+11]=d,this.uint16[M+12]=f,this.uint16[M+13]=p,this.uint16[M+14]=g,this.uint16[M+15]=m,this.uint16[M+16]=v,this.uint16[M+17]=y,this.uint16[M+18]=b,this.uint16[M+19]=_,this.uint16[M+20]=x,this.uint16[M+21]=w,this.uint16[M+22]=A,this.uint32[O+12]=k,this.float32[O+13]=T,this.float32[O+14]=S,this.float32[O+15]=E,this.float32[O+16]=C,e},t}(Wi);co.prototype.bytesPerElement=68,Qr("StructArrayLayout8i15ui1ul4f68",co);var uo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.float32[n+0]=t,e},t}(Wi);uo.prototype.bytesPerElement=4,Qr("StructArrayLayout1f4",uo);var ho=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,e},t}(Wi);ho.prototype.bytesPerElement=6,Qr("StructArrayLayout3i6",ho);var fo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var i=2*e,o=4*e;return this.uint32[i+0]=t,this.uint16[o+2]=n,this.uint16[o+3]=r,e},t}(Wi);fo.prototype.bytesPerElement=8,Qr("StructArrayLayout1ul2ui8",fo);var po=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e},t}(Wi);po.prototype.bytesPerElement=4,Qr("StructArrayLayout2ui4",po);var go=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint16[n+0]=t,e},t}(Wi);go.prototype.bytesPerElement=2,Qr("StructArrayLayout1ui2",go);var mo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e},t}(Wi);mo.prototype.bytesPerElement=8,Qr("StructArrayLayout2f8",mo);var vo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,i){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,e},t}(Wi);vo.prototype.bytesPerElement=16,Qr("StructArrayLayout4f16",vo);var yo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,n),t}($i);yo.prototype.size=20;var bo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new yo(this,e)},t}(ro);Qr("CollisionBoxArray",bo);var _o=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,n),t}($i);_o.prototype.size=48;var xo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new _o(this,e)},t}(lo);Qr("PlacedSymbolArray",xo);var wo=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,n),t}($i);wo.prototype.size=68;var Ao=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new wo(this,e)},t}(co);Qr("SymbolInstanceArray",Ao);var ko=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(uo);Qr("GlyphOffsetArray",ko);var To=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(ho);Qr("SymbolLineVertexArray",To);var So=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,n),t}($i);So.prototype.size=8;var Eo=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new So(this,e)},t}(fo);Qr("FeatureIndexArray",Eo);var Co=Gi([{name:"a_pos",components:2,type:"Int16"}],4).members,Mo=function(e){void 0===e&&(e=[]),this.segments=e};function Oo(e,t){return 256*(e=c(Math.floor(e),0,255))+c(Math.floor(t),0,255)}Mo.prototype.prepareSegment=function(e,t,n,r){var i=this.segments[this.segments.length-1];return e>Mo.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Mo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Mo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i},Mo.prototype.get=function(){return this.segments},Mo.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var n=t[e];for(var r in n.vaos)n.vaos[r].destroy()}},Mo.simpleSegment=function(e,t,n,r){return new Mo([{vertexOffset:e,primitiveOffset:t,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])},Mo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Qr("SegmentVector",Mo);var Lo=Gi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),Do=t((function(e){e.exports=function(e,t){var n,r,i,o,a,s,l,c;for(n=3&e.length,r=e.length-n,i=t,a=3432918353,s=461845907,c=0;c<r;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,i=27492+(65535&(o=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Io=t((function(e){e.exports=function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),Ro=Do,Po=Do,No=Io;Ro.murmur3=Po,Ro.murmur2=No;var zo=function(){this.ids=[],this.positions=[],this.indexed=!1};zo.prototype.add=function(e,t,n,r){this.ids.push(Bo(e)),this.positions.push(t,n,r)},zo.prototype.getPositions=function(e){for(var t=Bo(e),n=0,r=this.ids.length-1;n<r;){var i=n+r>>1;this.ids[i]>=t?r=i:n=i+1}for(var o=[];this.ids[n]===t;){var a=this.positions[3*n],s=this.positions[3*n+1],l=this.positions[3*n+2];o.push({index:a,start:s,end:l}),n++}return o},zo.serialize=function(e,t){var n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return jo(n,r,0,n.length-1),t&&t.push(n.buffer,r.buffer),{ids:n,positions:r}},zo.deserialize=function(e){var t=new zo;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var Fo=Math.pow(2,53)-1;function Bo(e){var t=+e;return!isNaN(t)&&t<=Fo?t:Ro(String(e))}function jo(e,t,n,r){for(;n<r;){for(var i=e[n+r>>1],o=n-1,a=r+1;;){do{o++}while(e[o]<i);do{a--}while(e[a]>i);if(o>=a)break;Uo(e,o,a),Uo(t,3*o,3*a),Uo(t,3*o+1,3*a+1),Uo(t,3*o+2,3*a+2)}a-n<r-a?(jo(e,t,n,a),n=a+1):(jo(e,t,a+1,r),r=a)}}function Uo(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}Qr("FeaturePositionMap",zo);var Vo=function(e,t){this.gl=e.gl,this.location=t},qo=function(e){function t(t,n){e.call(this,t,n),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Vo),Ho=function(e){function t(t,n){e.call(this,t,n),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Vo),$o=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Vo),Wo=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Vo),Go=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Vo),Yo=function(e){function t(t,n){e.call(this,t,n),this.current=ot.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Vo),Xo=new Float32Array(16),Zo=function(e){function t(t,n){e.call(this,t,n),this.current=Xo}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(var t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}},t}(Vo);function Ko(e){return[Oo(255*e.r,255*e.g),Oo(255*e.b,255*e.a)]}var Jo=function(e,t,n){this.value=e,this.uniformNames=t.map((function(e){return"u_"+e})),this.type=n};Jo.prototype.setUniform=function(e,t,n){e.set(n.constantOr(this.value))},Jo.prototype.getBinding=function(e,t,n){return"color"===this.type?new Yo(e,t):new Ho(e,t)};var Qo=function(e,t){this.uniformNames=t.map((function(e){return"u_"+e})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Qo.prototype.setConstantPatternPositions=function(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr},Qo.prototype.setUniform=function(e,t,n,r){var i="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;i&&e.set(i)},Qo.prototype.getBinding=function(e,t,n){return"u_pattern"===n.substr(0,9)?new Go(e,t):new Ho(e,t)};var ea=function(e,t,n,r){this.expression=e,this.type=n,this.maxValue=0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===n?2:1,offset:0}})),this.paintVertexArray=new r};ea.prototype.populatePaintArray=function(e,t,n,r,i){var o=this.paintVertexArray.length,a=this.expression.evaluate(new Ei(0),t,{},r,[],i);this.paintVertexArray.resize(e),this._setPaintValue(o,e,a)},ea.prototype.updatePaintArray=function(e,t,n,r){var i=this.expression.evaluate({zoom:0},n,r);this._setPaintValue(e,t,i)},ea.prototype._setPaintValue=function(e,t,n){if("color"===this.type)for(var r=Ko(n),i=e;i<t;i++)this.paintVertexArray.emplace(i,r[0],r[1]);else{for(var o=e;o<t;o++)this.paintVertexArray.emplace(o,n);this.maxValue=Math.max(this.maxValue,Math.abs(n))}},ea.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ea.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var ta=function(e,t,n,r,i,o){this.expression=e,this.uniformNames=t.map((function(e){return"u_"+e+"_t"})),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===n?4:2,offset:0}})),this.paintVertexArray=new o};ta.prototype.populatePaintArray=function(e,t,n,r,i){var o=this.expression.evaluate(new Ei(this.zoom),t,{},r,[],i),a=this.expression.evaluate(new Ei(this.zoom+1),t,{},r,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,o,a)},ta.prototype.updatePaintArray=function(e,t,n,r){var i=this.expression.evaluate({zoom:this.zoom},n,r),o=this.expression.evaluate({zoom:this.zoom+1},n,r);this._setPaintValue(e,t,i,o)},ta.prototype._setPaintValue=function(e,t,n,r){if("color"===this.type)for(var i=Ko(n),o=Ko(r),a=e;a<t;a++)this.paintVertexArray.emplace(a,i[0],i[1],o[0],o[1]);else{for(var s=e;s<t;s++)this.paintVertexArray.emplace(s,n,r);this.maxValue=Math.max(this.maxValue,Math.abs(n),Math.abs(r))}},ta.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},ta.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},ta.prototype.setUniform=function(e,t){var n=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,r=c(this.expression.interpolationFactor(n,this.zoom,this.zoom+1),0,1);e.set(r)},ta.prototype.getBinding=function(e,t,n){return new Ho(e,t)};var na=function(e,t,n,r,i,o){this.expression=e,this.type=t,this.useIntegerZoom=n,this.zoom=r,this.layerId=o,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i};na.prototype.populatePaintArray=function(e,t,n){var r=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(r,e,t.patterns&&t.patterns[this.layerId],n)},na.prototype.updatePaintArray=function(e,t,n,r,i){this._setPaintValues(e,t,n.patterns&&n.patterns[this.layerId],i)},na.prototype._setPaintValues=function(e,t,n,r){if(r&&n){var i=n.min,o=n.mid,a=n.max,s=r[i],l=r[o],c=r[a];if(s&&l&&c)for(var u=e;u<t;u++)this.zoomInPaintVertexArray.emplace(u,l.tl[0],l.tl[1],l.br[0],l.br[1],s.tl[0],s.tl[1],s.br[0],s.br[1],l.pixelRatio,s.pixelRatio),this.zoomOutPaintVertexArray.emplace(u,l.tl[0],l.tl[1],l.br[0],l.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1],l.pixelRatio,c.pixelRatio)}},na.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,Lo.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,Lo.members,this.expression.isStateDependent))},na.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ra=function(e,t,n,r){this.binders={},this.layoutAttributes=r,this._buffers=[];var i=[];for(var o in e.paint._values)if(n(o)){var a=e.paint.get(o);if(a instanceof Ri&&$n(a.property.specification)){var s=oa(o,e.type),l=a.value,c=a.property.specification.type,u=a.property.useIntegerZoom,h=a.property.specification["property-type"],d="cross-faded"===h||"cross-faded-data-driven"===h;if("constant"===l.kind)this.binders[o]=d?new Qo(l.value,s):new Jo(l.value,s,c),i.push("/u_"+o);else if("source"===l.kind||d){var f=aa(o,c,"source");this.binders[o]=d?new na(l,c,u,t,f,e.id):new ea(l,s,c,f),i.push("/a_"+o)}else{var p=aa(o,c,"composite");this.binders[o]=new ta(l,s,c,u,t,p),i.push("/z_"+o)}}}this.cacheKey=i.sort().join("")};ra.prototype.getMaxValue=function(e){var t=this.binders[e];return t instanceof ea||t instanceof ta?t.maxValue:0},ra.prototype.populatePaintArrays=function(e,t,n,r,i){for(var o in this.binders){var a=this.binders[o];(a instanceof ea||a instanceof ta||a instanceof na)&&a.populatePaintArray(e,t,n,r,i)}},ra.prototype.setConstantPatternPositions=function(e,t){for(var n in this.binders){var r=this.binders[n];r instanceof Qo&&r.setConstantPatternPositions(e,t)}},ra.prototype.updatePaintArrays=function(e,t,n,r,i){var o=!1;for(var a in e)for(var s=0,l=t.getPositions(a);s<l.length;s+=1){var c=l[s],u=n.feature(c.index);for(var h in this.binders){var d=this.binders[h];if((d instanceof ea||d instanceof ta||d instanceof na)&&!0===d.expression.isStateDependent){var f=r.paint.get(h);d.expression=f.value,d.updatePaintArray(c.start,c.end,u,e[a],i),o=!0}}}return o},ra.prototype.defines=function(){var e=[];for(var t in this.binders){var n=this.binders[t];(n instanceof Jo||n instanceof Qo)&&e.push.apply(e,n.uniformNames.map((function(e){return"#define HAS_UNIFORM_"+e})))}return e},ra.prototype.getPaintVertexBuffers=function(){return this._buffers},ra.prototype.getUniforms=function(e,t){var n=[];for(var r in this.binders){var i=this.binders[r];if(i instanceof Jo||i instanceof Qo||i instanceof ta)for(var o=0,a=i.uniformNames;o<a.length;o+=1){var s=a[o];if(t[s]){var l=i.getBinding(e,t[s],s);n.push({name:s,property:r,binding:l})}}}return n},ra.prototype.setUniforms=function(e,t,n,r){for(var i=0,o=t;i<o.length;i+=1){var a=o[i],s=a.name,l=a.property,c=a.binding;this.binders[l].setUniform(c,r,n.get(l),s)}},ra.prototype.updatePaintBuffers=function(e){for(var t in this._buffers=[],this.binders){var n=this.binders[t];if(e&&n instanceof na){var r=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;r&&this._buffers.push(r)}else(n instanceof ea||n instanceof ta)&&n.paintVertexBuffer&&this._buffers.push(n.paintVertexBuffer)}},ra.prototype.upload=function(e){for(var t in this.binders){var n=this.binders[t];(n instanceof ea||n instanceof ta||n instanceof na)&&n.upload(e)}this.updatePaintBuffers()},ra.prototype.destroy=function(){for(var e in this.binders){var t=this.binders[e];(t instanceof ea||t instanceof ta||t instanceof na)&&t.destroy()}};var ia=function(e,t,n,r){void 0===r&&(r=function(){return!0}),this.programConfigurations={};for(var i=0,o=t;i<o.length;i+=1){var a=o[i];this.programConfigurations[a.id]=new ra(a,n,r,e)}this.needsUpload=!1,this._featureMap=new zo,this._bufferOffset=0};function oa(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function aa(e,t,n){var r={color:{source:mo,composite:vo},number:{source:uo,composite:mo}},i=function(e){return{"line-pattern":{source:Qi,composite:Qi},"fill-pattern":{source:Qi,composite:Qi},"fill-extrusion-pattern":{source:Qi,composite:Qi}}[e]}(e);return i&&i[n]||r[t][n]}ia.prototype.populatePaintArrays=function(e,t,n,r,i,o){for(var a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(e,t,r,i,o);void 0!==t.id&&this._featureMap.add(t.id,n,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0},ia.prototype.updatePaintArrays=function(e,t,n,r){for(var i=0,o=n;i<o.length;i+=1){var a=o[i];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(e,this._featureMap,t,a,r)||this.needsUpload}},ia.prototype.get=function(e){return this.programConfigurations[e]},ia.prototype.upload=function(e){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}},ia.prototype.destroy=function(){for(var e in this.programConfigurations)this.programConfigurations[e].destroy()},Qr("ConstantBinder",Jo),Qr("CrossFadedConstantBinder",Qo),Qr("SourceExpressionBinder",ea),Qr("CrossFadedCompositeBinder",na),Qr("CompositeExpressionBinder",ta),Qr("ProgramConfiguration",ra,{omit:["_buffers"]}),Qr("ProgramConfigurationSet",ia);var sa=8192;var la,ca=(la=15,{min:-1*Math.pow(2,la-1),max:Math.pow(2,la-1)-1});function ua(e){for(var t=sa/e.extent,n=e.loadGeometry(),r=0;r<n.length;r++)for(var i=n[r],o=0;o<i.length;o++){var a=i[o];a.x=Math.round(a.x*t),a.y=Math.round(a.y*t),(a.x<ca.min||a.x>ca.max||a.y<ca.min||a.y>ca.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=c(a.x,ca.min,ca.max),a.y=c(a.y,ca.min,ca.max))}return n}function ha(e,t,n,r,i){e.emplaceBack(2*t+(r+1)/2,2*n+(i+1)/2)}var da=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Xi,this.indexArray=new so,this.segments=new Mo,this.programConfigurations=new ia(Co,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function fa(e,t){for(var n=0;n<e.length;n++)if(wa(t,e[n]))return!0;for(var r=0;r<t.length;r++)if(wa(e,t[r]))return!0;return!!va(e,t)}function pa(e,t,n){return!!wa(e,t)||!!ba(t,e,n)}function ga(e,t){if(1===e.length)return xa(t,e[0]);for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)if(wa(e,r[i]))return!0;for(var o=0;o<e.length;o++)if(xa(t,e[o]))return!0;for(var a=0;a<t.length;a++)if(va(e,t[a]))return!0;return!1}function ma(e,t,n){if(e.length>1){if(va(e,t))return!0;for(var r=0;r<t.length;r++)if(ba(t[r],e,n))return!0}for(var i=0;i<e.length;i++)if(ba(e[i],t,n))return!0;return!1}function va(e,t){if(0===e.length||0===t.length)return!1;for(var n=0;n<e.length-1;n++)for(var r=e[n],i=e[n+1],o=0;o<t.length-1;o++)if(ya(r,i,t[o],t[o+1]))return!0;return!1}function ya(e,t,n,r){return A(e,n,r)!==A(t,n,r)&&A(e,t,n)!==A(e,t,r)}function ba(e,t,n){var r=n*n;if(1===t.length)return e.distSqr(t[0])<r;for(var i=1;i<t.length;i++)if(_a(e,t[i-1],t[i])<r)return!0;return!1}function _a(e,t,n){var r=t.distSqr(n);if(0===r)return e.distSqr(t);var i=((e.x-t.x)*(n.x-t.x)+(e.y-t.y)*(n.y-t.y))/r;return i<0?e.distSqr(t):i>1?e.distSqr(n):e.distSqr(n.sub(t)._mult(i)._add(t))}function xa(e,t){for(var n,r,i,o=!1,a=0;a<e.length;a++)for(var s=0,l=(n=e[a]).length-1;s<n.length;l=s++)r=n[s],i=n[l],r.y>t.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(o=!o);return o}function wa(e,t){for(var n=!1,r=0,i=e.length-1;r<e.length;i=r++){var o=e[r],a=e[i];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function Aa(e,t,n){var r=n[0],i=n[2];if(e.x<r.x&&t.x<r.x||e.x>i.x&&t.x>i.x||e.y<r.y&&t.y<r.y||e.y>i.y&&t.y>i.y)return!1;var o=A(e,t,n[0]);return o!==A(e,t,n[1])||o!==A(e,t,n[2])||o!==A(e,t,n[3])}function ka(e,t,n){var r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).getMaxValue(e)}function Ta(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Sa(e,t,n,r,i){if(!t[0]&&!t[1])return e;var a=o.convert(t)._mult(i);"viewport"===n&&a._rotate(-r);for(var s=[],l=0;l<e.length;l++){var c=e[l];s.push(c.sub(a))}return s}da.prototype.populate=function(e,t,n){var r=this.layers[0],i=[],o=null;"circle"===r.type&&(o=r.layout.get("circle-sort-key"));for(var a=0,s=e;a<s.length;a+=1){var l=s[a],c=l.feature,u=l.id,h=l.index,d=l.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,p={type:c.type,id:u,properties:c.properties,geometry:f?ua(c):[]};if(this.layers[0]._featureFilter.filter(new Ei(this.zoom),p,n)){f||(p.geometry=ua(c));var g=o?o.evaluate(p,{},n):void 0,m={id:u,properties:c.properties,type:c.type,sourceLayerIndex:d,index:h,geometry:p.geometry,patterns:{},sortKey:g};i.push(m)}}o&&i.sort((function(e,t){return e.sortKey-t.sortKey}));for(var v=0,y=i;v<y.length;v+=1){var b=y[v],_=b,x=_.geometry,w=_.index,A=_.sourceLayerIndex,k=e[w].feature;this.addFeature(b,x,w,n),t.featureIndex.insert(k,x,w,A,this.index)}},da.prototype.update=function(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)},da.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},da.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},da.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Co),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},da.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},da.prototype.addFeature=function(e,t,n,r){for(var i=0,o=t;i<o.length;i+=1)for(var a=0,s=o[i];a<s.length;a+=1){var l=s[a],c=l.x,u=l.y;if(!(c<0||c>=sa||u<0||u>=sa)){var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),d=h.vertexLength;ha(this.layoutVertexArray,c,u,-1,-1),ha(this.layoutVertexArray,c,u,1,-1),ha(this.layoutVertexArray,c,u,1,1),ha(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(d,d+1,d+2),this.indexArray.emplaceBack(d,d+3,d+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},r)},Qr("CircleBucket",da,{omit:["layers"]});var Ea=new Ui({"circle-sort-key":new zi(Ie.layout_circle["circle-sort-key"])}),Ca={paint:new Ui({"circle-radius":new zi(Ie.paint_circle["circle-radius"]),"circle-color":new zi(Ie.paint_circle["circle-color"]),"circle-blur":new zi(Ie.paint_circle["circle-blur"]),"circle-opacity":new zi(Ie.paint_circle["circle-opacity"]),"circle-translate":new Ni(Ie.paint_circle["circle-translate"]),"circle-translate-anchor":new Ni(Ie.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ni(Ie.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ni(Ie.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zi(Ie.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zi(Ie.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zi(Ie.paint_circle["circle-stroke-opacity"])}),layout:Ea},Ma="undefined"!=typeof Float32Array?Float32Array:Array;function Oa(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function La(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],g=t[12],m=t[13],v=t[14],y=t[15],b=n[0],_=n[1],x=n[2],w=n[3];return e[0]=b*r+_*s+x*h+w*g,e[1]=b*i+_*l+x*d+w*m,e[2]=b*o+_*c+x*f+w*v,e[3]=b*a+_*u+x*p+w*y,b=n[4],_=n[5],x=n[6],w=n[7],e[4]=b*r+_*s+x*h+w*g,e[5]=b*i+_*l+x*d+w*m,e[6]=b*o+_*c+x*f+w*v,e[7]=b*a+_*u+x*p+w*y,b=n[8],_=n[9],x=n[10],w=n[11],e[8]=b*r+_*s+x*h+w*g,e[9]=b*i+_*l+x*d+w*m,e[10]=b*o+_*c+x*f+w*v,e[11]=b*a+_*u+x*p+w*y,b=n[12],_=n[13],x=n[14],w=n[15],e[12]=b*r+_*s+x*h+w*g,e[13]=b*i+_*l+x*d+w*m,e[14]=b*o+_*c+x*f+w*v,e[15]=b*a+_*u+x*p+w*y,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,n=arguments.length;n--;)t+=e[n]*e[n];return Math.sqrt(t)});var Da=La;var Ia,Ra=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e};function Pa(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}Ia=new Ma(3),Ma!=Float32Array&&(Ia[0]=0,Ia[1]=0,Ia[2]=0),function(){var e=new Ma(4);Ma!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Na=function(e){var t=e[0],n=e[1];return t*t+n*n},za=(function(){var e=new Ma(2);Ma!=Float32Array&&(e[0]=0,e[1]=0)}(),function(e){function t(t){e.call(this,t,Ca)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new da(e)},t.prototype.queryRadius=function(e){var t=e;return ka("circle-radius",this,t)+ka("circle-stroke-width",this,t)+Ta(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,o,a,s){for(var l=Sa(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),c=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),u="map"===this.paint.get("circle-pitch-alignment"),h=u?l:function(e,t){return e.map((function(e){return Fa(e,t)}))}(l,s),d=u?c*a:c,f=0,p=r;f<p.length;f+=1)for(var g=0,m=p[f];g<m.length;g+=1){var v=m[g],y=u?v:Fa(v,s),b=d,_=Pa([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?b*=_[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(b*=o.cameraToCenterDistance/_[3]),pa(h,y,b))return!0}return!1},t}(qi));function Fa(e,t){var n=Pa([],[e.x,e.y,0,1],t);return new o(n[0]/n[3],n[1]/n[3])}var Ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(da);function ja(e,t,n,r){var i=t.width,o=t.height;if(r){if(r instanceof Uint8ClampedArray)r=new Uint8Array(r.buffer);else if(r.length!==i*o*n)throw new RangeError("mismatched image size")}else r=new Uint8Array(i*o*n);return e.width=i,e.height=o,e.data=r,e}function Ua(e,t,n){var r=t.width,i=t.height;if(r!==e.width||i!==e.height){var o=ja({},{width:r,height:i},n);Va(e,o,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,r),height:Math.min(e.height,i)},n),e.width=r,e.height=i,e.data=o.data}}function Va(e,t,n,r,i,o){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l<i.height;l++)for(var c=((n.y+l)*e.width+n.x)*o,u=((r.y+l)*t.width+r.x)*o,h=0;h<i.width*o;h++)s[u+h]=a[c+h];return t}Qr("HeatmapBucket",Ba,{omit:["layers"]});var qa=function(e,t){ja(this,e,1,t)};qa.prototype.resize=function(e){Ua(this,e,1)},qa.prototype.clone=function(){return new qa({width:this.width,height:this.height},new Uint8Array(this.data))},qa.copy=function(e,t,n,r,i){Va(e,t,n,r,i,1)};var Ha=function(e,t){ja(this,e,4,t)};Ha.prototype.resize=function(e){Ua(this,e,4)},Ha.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},Ha.prototype.clone=function(){return new Ha({width:this.width,height:this.height},new Uint8Array(this.data))},Ha.copy=function(e,t,n,r,i){Va(e,t,n,r,i,4)},Qr("AlphaImage",qa),Qr("RGBAImage",Ha);var $a={paint:new Ui({"heatmap-radius":new zi(Ie.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zi(Ie.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ni(Ie.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ji(Ie.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ni(Ie.paint_heatmap["heatmap-opacity"])})};function Wa(e,t){for(var n=new Uint8Array(1024),r={},i=0,o=0;i<256;i++,o+=4){r[t]=i/255;var a=e.evaluate(r);n[o+0]=Math.floor(255*a.r/a.a),n[o+1]=Math.floor(255*a.g/a.a),n[o+2]=Math.floor(255*a.b/a.a),n[o+3]=Math.floor(255*a.a)}return new Ha({width:256,height:1},n)}var Ga=function(e){function t(t){e.call(this,t,$a),this._updateColorRamp()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new Ba(e)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){"heatmap-color"===e&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){var e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Wa(e,"heatmapDensity"),this.colorRampTexture=null},t.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},t}(qi),Ya={paint:new Ui({"hillshade-illumination-direction":new Ni(Ie.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ni(Ie.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ni(Ie.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ni(Ie.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ni(Ie.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ni(Ie.paint_hillshade["hillshade-accent-color"])})},Xa=function(e){function t(t){e.call(this,t,Ya)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},t}(qi),Za=Gi([{name:"a_pos",components:2,type:"Int16"}],4).members,Ka=Qa,Ja=Qa;function Qa(e,t,n){n=n||2;var r,i,o,a,s,l,c,u=t&&t.length,h=u?t[0]*n:e.length,d=es(e,0,h,n,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(e,t,n,r){var i,o,a,s=[];for(i=0,o=t.length;i<o;i++)(a=es(e,t[i]*r,i<o-1?t[i+1]*r:e.length,r,!1))===a.next&&(a.steiner=!0),s.push(hs(a));for(s.sort(ss),i=0;i<s.length;i++)ls(s[i],n),n=ts(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var p=n;p<h;p+=n)(s=e[p])<r&&(r=s),(l=e[p+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?1/c:0}return ns(d,f,n,r,i,c),f}function es(e,t,n,r,i){var o,a;if(i===ks(e,t,n,r)>0)for(o=t;o<n;o+=r)a=xs(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=xs(o,e[o],e[o+1],a);return a&&gs(a,a.next)&&(ws(a),a=a.next),a}function ts(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!gs(r,r.next)&&0!==ps(r.prev,r,r.next))r=r.next;else{if(ws(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function ns(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=us(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?is(e,r,i,o):rs(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),ws(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?ns(e=os(ts(e),t,n),t,n,r,i,o,2):2===a&&as(e,t,n,r,i,o):ns(ts(e),t,n,r,i,o,1);break}}}function rs(e){var t=e.prev,n=e,r=e.next;if(ps(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(ds(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&ps(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function is(e,t,n,r){var i=e.prev,o=e,a=e.next;if(ps(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=us(s,l,t,n,r),d=us(c,u,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&ds(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ps(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&ds(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ps(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&ds(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&ps(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&ds(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ps(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function os(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!gs(i,o)&&ms(i,r,r.next,o)&&bs(i,o)&&bs(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),ws(r),ws(r.next),r=e=o),r=r.next}while(r!==e);return ts(r)}function as(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&fs(a,s)){var l=_s(a,s);return a=ts(a,a.next),l=ts(l,l.next),ns(a,t,n,r,i,o),void ns(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function ss(e,t){return e.x-t.x}function ls(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&ds(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),bs(r,e)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&cs(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(e,t)){var n=_s(t,e);ts(t,t.next),ts(n,n.next)}}function cs(e,t){return ps(e.prev,e,t.prev)<0&&ps(t.next,e,e.next)<0}function us(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function hs(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function ds(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function fs(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ms(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(bs(e,t)&&bs(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(ps(e.prev,e,t.prev)||ps(e,t.prev,t))||gs(e,t)&&ps(e.prev,e,e.next)>0&&ps(t.prev,t,t.next)>0)}function ps(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function gs(e,t){return e.x===t.x&&e.y===t.y}function ms(e,t,n,r){var i=ys(ps(e,t,n)),o=ys(ps(e,t,r)),a=ys(ps(n,r,e)),s=ys(ps(n,r,t));return i!==o&&a!==s||!(0!==i||!vs(e,n,t))||!(0!==o||!vs(e,r,t))||!(0!==a||!vs(n,e,r))||!(0!==s||!vs(n,t,r))}function vs(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ys(e){return e>0?1:e<0?-1:0}function bs(e,t){return ps(e.prev,e,e.next)<0?ps(e,t,e.next)>=0&&ps(e,e.prev,t)>=0:ps(e,t,e.prev)<0||ps(e,e.next,t)<0}function _s(e,t){var n=new As(e.i,e.x,e.y),r=new As(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function xs(e,t,n,r){var i=new As(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ws(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function As(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ks(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function Ts(e,t,n,r,i){Ss(e,t,n||0,r||e.length-1,i||Cs)}function Ss(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Ss(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}var u=e[t],h=n,d=r;for(Es(e,n,t),i(e[r],u)>0&&Es(e,n,r);h<d;){for(Es(e,h,d),h++,d--;i(e[h],u)<0;)h++;for(;i(e[d],u)>0;)d--}0===i(e[n],u)?Es(e,n,d):Es(e,++d,r),d<=t&&(n=d+1),t<=d&&(r=d-1)}}function Es(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Cs(e,t){return e<t?-1:e>t?1:0}function Ms(e,t){var n=e.length;if(n<=1)return[e];for(var r,i,o=[],a=0;a<n;a++){var s=k(e[a]);0!==s&&(e[a].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(r&&o.push(r),r=[e[a]]):r.push(e[a]))}if(r&&o.push(r),t>1)for(var l=0;l<o.length;l++)o[l].length<=t||(Ts(o[l],t,1,o[l].length-1,Os),o[l]=o[l].slice(0,t));return o}function Os(e,t){return t.area-e.area}function Ls(e,t,n){for(var r=n.patternDependencies,i=!1,o=0,a=t;o<a.length;o+=1){var s=a[o].paint.get(e+"-pattern");s.isConstant()||(i=!0);var l=s.constantOr(null);l&&(i=!0,r[l.to]=!0,r[l.from]=!0)}return i}function Ds(e,t,n,r,i){for(var o=i.patternDependencies,a=0,s=t;a<s.length;a+=1){var l=s[a],c=l.paint.get(e+"-pattern").value;if("constant"!==c.kind){var u=c.evaluate({zoom:r-1},n,{},i.availableImages),h=c.evaluate({zoom:r},n,{},i.availableImages),d=c.evaluate({zoom:r+1},n,{},i.availableImages);u=u&&u.name?u.name:u,h=h&&h.name?h.name:h,d=d&&d.name?d.name:d,o[u]=!0,o[h]=!0,o[d]=!0,n.patterns[l.id]={min:u,mid:h,max:d}}}return n}Qa.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(ks(e,0,o,n));if(i)for(var s=0,l=t.length;s<l;s++){var c=t[s]*n,u=s<l-1?t[s+1]*n:e.length;a-=Math.abs(ks(e,c,u,n))}var h=0;for(s=0;s<r.length;s+=3){var d=r[s]*n,f=r[s+1]*n,p=r[s+2]*n;h+=Math.abs((e[d]-e[p])*(e[f+1]-e[d+1])-(e[d]-e[f])*(e[p+1]-e[d+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},Qa.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},Ka.default=Ja;var Is=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Xi,this.indexArray=new so,this.indexArray2=new po,this.programConfigurations=new ia(Za,e.layers,e.zoom),this.segments=new Mo,this.segments2=new Mo,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Is.prototype.populate=function(e,t,n){this.hasPattern=Ls("fill",this.layers,t);for(var r=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,c=s.id,u=s.index,h=s.sourceLayerIndex,d=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:c,properties:l.properties,geometry:d?ua(l):[]};if(this.layers[0]._featureFilter.filter(new Ei(this.zoom),f,n)){d||(f.geometry=ua(l));var p=r?r.evaluate(f,{},n,t.availableImages):void 0,g={id:c,properties:l.properties,type:l.type,sourceLayerIndex:h,index:u,geometry:f.geometry,patterns:{},sortKey:p};i.push(g)}}r&&i.sort((function(e,t){return e.sortKey-t.sortKey}));for(var m=0,v=i;m<v.length;m+=1){var y=v[m],b=y,_=b.geometry,x=b.index,w=b.sourceLayerIndex;if(this.hasPattern){var A=Ds("fill",this.layers,y,this.zoom,t);this.patternFeatures.push(A)}else this.addFeature(y,_,x,n,{});var k=e[x].feature;t.featureIndex.insert(k,_,x,w,this.index)}},Is.prototype.update=function(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)},Is.prototype.addFeatures=function(e,t,n){for(var r=0,i=this.patternFeatures;r<i.length;r+=1){var o=i[r];this.addFeature(o,o.geometry,o.index,t,n)}},Is.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Is.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Is.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Za),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0},Is.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Is.prototype.addFeature=function(e,t,n,r,i){for(var o=0,a=Ms(t,500);o<a.length;o+=1){for(var s=a[o],l=0,c=0,u=s;c<u.length;c+=1)l+=u[c].length;for(var h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),d=h.vertexLength,f=[],p=[],g=0,m=s;g<m.length;g+=1){var v=m[g];if(0!==v.length){v!==s[0]&&p.push(f.length/2);var y=this.segments2.prepareSegment(v.length,this.layoutVertexArray,this.indexArray2),b=y.vertexLength;this.layoutVertexArray.emplaceBack(v[0].x,v[0].y),this.indexArray2.emplaceBack(b+v.length-1,b),f.push(v[0].x),f.push(v[0].y);for(var _=1;_<v.length;_++)this.layoutVertexArray.emplaceBack(v[_].x,v[_].y),this.indexArray2.emplaceBack(b+_-1,b+_),f.push(v[_].x),f.push(v[_].y);y.vertexLength+=v.length,y.primitiveLength+=v.length}}for(var x=Ka(f,p),w=0;w<x.length;w+=3)this.indexArray.emplaceBack(d+x[w],d+x[w+1],d+x[w+2]);h.vertexLength+=l,h.primitiveLength+=x.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)},Qr("FillBucket",Is,{omit:["layers","patternFeatures"]});var Rs=new Ui({"fill-sort-key":new zi(Ie.layout_fill["fill-sort-key"])}),Ps={paint:new Ui({"fill-antialias":new Ni(Ie.paint_fill["fill-antialias"]),"fill-opacity":new zi(Ie.paint_fill["fill-opacity"]),"fill-color":new zi(Ie.paint_fill["fill-color"]),"fill-outline-color":new zi(Ie.paint_fill["fill-outline-color"]),"fill-translate":new Ni(Ie.paint_fill["fill-translate"]),"fill-translate-anchor":new Ni(Ie.paint_fill["fill-translate-anchor"]),"fill-pattern":new Fi(Ie.paint_fill["fill-pattern"])}),layout:Rs},Ns=function(e){function t(t){e.call(this,t,Ps)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,n){e.prototype.recalculate.call(this,t,n);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},t.prototype.createBucket=function(e){return new Is(e)},t.prototype.queryRadius=function(){return Ta(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,o,a){return ga(Sa(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),r)},t.prototype.isTileClipped=function(){return!0},t}(qi),zs=Gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Fs=Bs;function Bs(e,t,n,r,i){this.properties={},this.extent=n,this.type=0,this._pbf=e,this._geometry=-1,this._keys=r,this._values=i,e.readFields(js,this,t)}function js(e,t,n){1==e?t.id=n.readVarint():2==e?function(e,t){for(var n=e.readVarint()+e.pos;e.pos<n;){var r=t._keys[e.readVarint()],i=t._values[e.readVarint()];t.properties[r]=i}}(n,t):3==e?t.type=n.readVarint():4==e&&(t._geometry=n.pos)}function Us(e){for(var t,n,r=0,i=0,o=e.length,a=o-1;i<o;a=i++)t=e[i],r+=((n=e[a]).x-t.x)*(t.y+n.y);return r}Bs.types=["Unknown","Point","LineString","Polygon"],Bs.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,n=e.readVarint()+e.pos,r=1,i=0,a=0,s=0,l=[];e.pos<n;){if(i<=0){var c=e.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)a+=e.readSVarint(),s+=e.readSVarint(),1===r&&(t&&l.push(t),t=[]),t.push(new o(a,s));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Bs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos<t;){if(r<=0){var u=e.readVarint();n=7&u,r=u>>3}if(r--,1===n||2===n)(i+=e.readSVarint())<a&&(a=i),i>s&&(s=i),(o+=e.readSVarint())<l&&(l=o),o>c&&(c=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,c]},Bs.prototype.toGeoJSON=function(e,t,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Bs.types[this.type];function u(e){for(var t=0;t<e.length;t++){var n=e[t],r=180-360*(n.y+s)/o;e[t]=[360*(n.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(r=0;r<l.length;r++)h[r]=l[r][0];u(l=h);break;case 2:for(r=0;r<l.length;r++)u(l[r]);break;case 3:for(l=function(e){var t=e.length;if(t<=1)return[e];for(var n,r,i=[],o=0;o<t;o++){var a=Us(e[o]);0!==a&&(void 0===r&&(r=a<0),r===a<0?(n&&i.push(n),n=[e[o]]):n.push(e[o]))}return n&&i.push(n),i}(l),r=0;r<l.length;r++)for(i=0;i<l[r].length;i++)u(l[r][i])}1===l.length?l=l[0]:c="Multi"+c;var d={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(d.id=this.id),d};var Vs=qs;function qs(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(Hs,this,t),this.length=this._features.length}function Hs(e,t,n){15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){for(var t=null,n=e.readVarint()+e.pos;e.pos<n;){var r=e.readVarint()>>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}function $s(e,t,n){if(3===e){var r=new Vs(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}qs.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Fs(this._pbf,t,this.extent,this._keys,this._values)};var Ws={VectorTile:function(e,t){this.layers=e.readFields($s,{},t)},VectorTileFeature:Fs,VectorTileLayer:Vs},Gs=Ws.VectorTileFeature.types,Ys=Math.pow(2,13);function Xs(e,t,n,r,i,o,a,s){e.emplaceBack(t,n,2*Math.floor(r*Ys)+a,i*Ys*2,o*Ys*2,Math.round(s))}var Zs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Ki,this.indexArray=new so,this.programConfigurations=new ia(zs,e.layers,e.zoom),this.segments=new Mo,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Ks(e,t){return e.x===t.x&&(e.x<0||e.x>sa)||e.y===t.y&&(e.y<0||e.y>sa)}Zs.prototype.populate=function(e,t,n){this.features=[],this.hasPattern=Ls("fill-extrusion",this.layers,t);for(var r=0,i=e;r<i.length;r+=1){var o=i[r],a=o.feature,s=o.id,l=o.index,c=o.sourceLayerIndex,u=this.layers[0]._featureFilter.needGeometry,h={type:a.type,id:s,properties:a.properties,geometry:u?ua(a):[]};if(this.layers[0]._featureFilter.filter(new Ei(this.zoom),h,n)){var d={id:s,sourceLayerIndex:c,index:l,geometry:u?h.geometry:ua(a),properties:a.properties,type:a.type,patterns:{}};void 0!==a.id&&(d.id=a.id),this.hasPattern?this.features.push(Ds("fill-extrusion",this.layers,d,this.zoom,t)):this.addFeature(d,d.geometry,l,n,{}),t.featureIndex.insert(a,d.geometry,l,c,this.index,!0)}}},Zs.prototype.addFeatures=function(e,t,n){for(var r=0,i=this.features;r<i.length;r+=1){var o=i[r],a=o.geometry;this.addFeature(o,a,o.index,t,n)}},Zs.prototype.update=function(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)},Zs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Zs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Zs.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,zs),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Zs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Zs.prototype.addFeature=function(e,t,n,r,i){for(var o=0,a=Ms(t,500);o<a.length;o+=1){for(var s=a[o],l=0,c=0,u=s;c<u.length;c+=1)l+=u[c].length;for(var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),d=0,f=s;d<f.length;d+=1){var p=f[d];if(0!==p.length&&!((D=p).every((function(e){return e.x<0}))||D.every((function(e){return e.x>sa}))||D.every((function(e){return e.y<0}))||D.every((function(e){return e.y>sa}))))for(var g=0,m=0;m<p.length;m++){var v=p[m];if(m>=1){var y=p[m-1];if(!Ks(v,y)){h.vertexLength+4>Mo.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var b=v.sub(y)._perp()._unit(),_=y.dist(v);g+_>32768&&(g=0),Xs(this.layoutVertexArray,v.x,v.y,b.x,b.y,0,0,g),Xs(this.layoutVertexArray,v.x,v.y,b.x,b.y,0,1,g),g+=_,Xs(this.layoutVertexArray,y.x,y.y,b.x,b.y,0,0,g),Xs(this.layoutVertexArray,y.x,y.y,b.x,b.y,0,1,g);var x=h.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),h.vertexLength+=4,h.primitiveLength+=2}}}}if(h.vertexLength+l>Mo.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Gs[e.type]){for(var w=[],A=[],k=h.vertexLength,T=0,S=s;T<S.length;T+=1){var E=S[T];if(0!==E.length){E!==s[0]&&A.push(w.length/2);for(var C=0;C<E.length;C++){var M=E[C];Xs(this.layoutVertexArray,M.x,M.y,0,0,1,1,0),w.push(M.x),w.push(M.y)}}}for(var O=Ka(w,A),L=0;L<O.length;L+=3)this.indexArray.emplaceBack(k+O[L],k+O[L+2],k+O[L+1]);h.primitiveLength+=O.length/3,h.vertexLength+=l}}var D;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)},Qr("FillExtrusionBucket",Zs,{omit:["layers","features"]});var Js={paint:new Ui({"fill-extrusion-opacity":new Ni(Ie["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zi(Ie["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ni(Ie["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ni(Ie["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Fi(Ie["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zi(Ie["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zi(Ie["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ni(Ie["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Qs=function(e){function t(t){e.call(this,t,Js)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new Zs(e)},t.prototype.queryRadius=function(){return Ta(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,a,s,l){var c=Sa(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),u=this.paint.get("fill-extrusion-height").evaluate(t,n),h=this.paint.get("fill-extrusion-base").evaluate(t,n),d=function(e,t,n,r){for(var i=[],a=0,s=e;a<s.length;a+=1){var l=s[a],c=[l.x,l.y,r,1];Pa(c,c,t),i.push(new o(c[0]/c[3],c[1]/c[3]))}return i}(c,l,0,0),f=function(e,t,n,r){for(var i=[],a=[],s=r[8]*t,l=r[9]*t,c=r[10]*t,u=r[11]*t,h=r[8]*n,d=r[9]*n,f=r[10]*n,p=r[11]*n,g=0,m=e;g<m.length;g+=1){for(var v=[],y=[],b=0,_=m[g];b<_.length;b+=1){var x=_[b],w=x.x,A=x.y,k=r[0]*w+r[4]*A+r[12],T=r[1]*w+r[5]*A+r[13],S=r[2]*w+r[6]*A+r[14],E=r[3]*w+r[7]*A+r[15],C=S+c,M=E+u,O=k+h,L=T+d,D=S+f,I=E+p,R=new o((k+s)/M,(T+l)/M);R.z=C/M,v.push(R);var P=new o(O/I,L/I);P.z=D/I,y.push(P)}i.push(v),a.push(y)}return[i,a]}(r,h,u,l);return function(e,t,n){var r=1/0;ga(n,t)&&(r=tl(n,t[0]));for(var i=0;i<t.length;i++)for(var o=t[i],a=e[i],s=0;s<o.length-1;s++){var l=o[s],c=o[s+1],u=a[s],h=[l,c,a[s+1],u,l];fa(n,h)&&(r=Math.min(r,tl(n,h)))}return r!==1/0&&r}(f[0],f[1],d)},t}(qi);function el(e,t){return e.x*t.x+e.y*t.y}function tl(e,t){if(1===e.length){for(var n,r=0,i=t[r++];!n||i.equals(n);)if(!(n=t[r++]))return 1/0;for(;r<t.length;r++){var o=t[r],a=e[0],s=n.sub(i),l=o.sub(i),c=a.sub(i),u=el(s,s),h=el(s,l),d=el(l,l),f=el(c,s),p=el(c,l),g=u*d-h*h,m=(d*f-h*p)/g,v=(u*p-h*f)/g,y=1-m-v,b=i.z*y+n.z*m+o.z*v;if(isFinite(b))return b}return 1/0}for(var _=1/0,x=0,w=t;x<w.length;x+=1){var A=w[x];_=Math.min(_,A.z)}return _}var nl=Gi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,rl=Ws.VectorTileFeature.types,il=Math.cos(Math.PI/180*37.5),ol=Math.pow(2,14)/.5,al=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ji,this.indexArray=new so,this.programConfigurations=new ia(nl,e.layers,e.zoom),this.segments=new Mo,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};al.prototype.populate=function(e,t,n){this.hasPattern=Ls("line",this.layers,t);for(var r=this.layers[0].layout.get("line-sort-key"),i=[],o=0,a=e;o<a.length;o+=1){var s=a[o],l=s.feature,c=s.id,u=s.index,h=s.sourceLayerIndex,d=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:c,properties:l.properties,geometry:d?ua(l):[]};if(this.layers[0]._featureFilter.filter(new Ei(this.zoom),f,n)){d||(f.geometry=ua(l));var p=r?r.evaluate(f,{},n):void 0,g={id:c,properties:l.properties,type:l.type,sourceLayerIndex:h,index:u,geometry:f.geometry,patterns:{},sortKey:p};i.push(g)}}r&&i.sort((function(e,t){return e.sortKey-t.sortKey}));for(var m=0,v=i;m<v.length;m+=1){var y=v[m],b=y,_=b.geometry,x=b.index,w=b.sourceLayerIndex;if(this.hasPattern){var A=Ds("line",this.layers,y,this.zoom,t);this.patternFeatures.push(A)}else this.addFeature(y,_,x,n,{});var k=e[x].feature;t.featureIndex.insert(k,_,x,w,this.index)}},al.prototype.update=function(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)},al.prototype.addFeatures=function(e,t,n){for(var r=0,i=this.patternFeatures;r<i.length;r+=1){var o=i[r];this.addFeature(o,o.geometry,o.index,t,n)}},al.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},al.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},al.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,nl),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},al.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},al.prototype.addFeature=function(e,t,n,r,i){for(var o=this.layers[0].layout,a=o.get("line-join").evaluate(e,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),c=o.get("line-round-limit"),u=0,h=t;u<h.length;u+=1){var d=h[u];this.addLine(d,e,a,s,l,c)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)},al.prototype.addLine=function(e,t,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var a=0;a<e.length-1;a++)this.totalDistance+=e[a].dist(e[a+1]);this.updateScaledDistance()}for(var s="Polygon"===rl[t.type],l=e.length;l>=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c<l-1&&e[c].equals(e[c+1]);)c++;if(!(l<(s?3:2))){"bevel"===n&&(i=1.05);var u,h=this.overscaling<=16?122880/(512*this.overscaling):0,d=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),f=void 0,p=void 0,g=void 0,m=void 0;this.e1=this.e2=-1,s&&(u=e[l-2],m=e[c].sub(u)._unit()._perp());for(var v=c;v<l;v++)if(!(p=v===l-1?s?e[c+1]:void 0:e[v+1])||!e[v].equals(p)){m&&(g=m),u&&(f=u),u=e[v],m=p?p.sub(u)._unit()._perp():g;var y=(g=g||m).add(m);0===y.x&&0===y.y||y._unit();var b=g.x*m.x+g.y*m.y,_=y.x*m.x+y.y*m.y,x=0!==_?1/_:1/0,w=2*Math.sqrt(2-2*_),A=_<il&&f&&p,k=g.x*m.y-g.y*m.x>0;if(A&&v>c){var T=u.dist(f);if(T>2*h){var S=u.sub(u.sub(f)._mult(h/T)._round());this.updateDistance(f,S),this.addCurrentVertex(S,g,0,0,d),f=S}}var E=f&&p,C=E?n:s?"butt":r;if(E&&"round"===C&&(x<o?C="miter":x<=2&&(C="fakeround")),"miter"===C&&x>i&&(C="bevel"),"bevel"===C&&(x>2&&(C="flipbevel"),x<i&&(C="miter")),f&&this.updateDistance(f,u),"miter"===C)y._mult(x),this.addCurrentVertex(u,y,0,0,d);else if("flipbevel"===C){if(x>100)y=m.mult(-1);else{var M=x*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(M*(k?-1:1))}this.addCurrentVertex(u,y,0,0,d),this.addCurrentVertex(u,y.mult(-1),0,0,d)}else if("bevel"===C||"fakeround"===C){var O=-Math.sqrt(x*x-1),L=k?O:0,D=k?0:O;if(f&&this.addCurrentVertex(u,g,L,D,d),"fakeround"===C)for(var I=Math.round(180*w/Math.PI/20),R=1;R<I;R++){var P=R/I;if(.5!==P){var N=P-.5;P+=P*N*(P-1)*((1.0904+b*(b*(3.55645-1.43519*b)-3.2452))*N*N+(.848013+b*(.215638*b-1.06021)))}var z=m.sub(g)._mult(P)._add(g)._unit()._mult(k?-1:1);this.addHalfVertex(u,z.x,z.y,!1,k,0,d)}p&&this.addCurrentVertex(u,m,-L,-D,d)}else if("butt"===C)this.addCurrentVertex(u,y,0,0,d);else if("square"===C){var F=f?1:-1;this.addCurrentVertex(u,y,F,F,d)}else"round"===C&&(f&&(this.addCurrentVertex(u,g,0,0,d),this.addCurrentVertex(u,g,1,1,d,!0)),p&&(this.addCurrentVertex(u,m,-1,-1,d,!0),this.addCurrentVertex(u,m,0,0,d)));if(A&&v<l-1){var B=u.dist(p);if(B>2*h){var j=u.add(p.sub(u)._mult(h/B)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,d),u=j}}}}},al.prototype.addCurrentVertex=function(e,t,n,r,i,o){void 0===o&&(o=!1);var a=t.x+t.y*n,s=t.y-t.x*n,l=-t.x+t.y*r,c=-t.y-t.x*r;this.addHalfVertex(e,a,s,o,!1,n,i),this.addHalfVertex(e,l,c,o,!0,-r,i),this.distance>ol/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,n,r,i,o))},al.prototype.addHalfVertex=function(e,t,n,r,i,o,a){var s=e.x,l=e.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(r?1:0),(l<<1)+(i?1:0),Math.round(63*t)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&c)<<2,c>>6);var u=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),a.primitiveLength++),i?this.e2=u:this.e1=u},al.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ol-1):this.distance},al.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},Qr("LineBucket",al,{omit:["layers","patternFeatures"]});var sl=new Ui({"line-cap":new Ni(Ie.layout_line["line-cap"]),"line-join":new zi(Ie.layout_line["line-join"]),"line-miter-limit":new Ni(Ie.layout_line["line-miter-limit"]),"line-round-limit":new Ni(Ie.layout_line["line-round-limit"]),"line-sort-key":new zi(Ie.layout_line["line-sort-key"])}),ll={paint:new Ui({"line-opacity":new zi(Ie.paint_line["line-opacity"]),"line-color":new zi(Ie.paint_line["line-color"]),"line-translate":new Ni(Ie.paint_line["line-translate"]),"line-translate-anchor":new Ni(Ie.paint_line["line-translate-anchor"]),"line-width":new zi(Ie.paint_line["line-width"]),"line-gap-width":new zi(Ie.paint_line["line-gap-width"]),"line-offset":new zi(Ie.paint_line["line-offset"]),"line-blur":new zi(Ie.paint_line["line-blur"]),"line-dasharray":new Bi(Ie.paint_line["line-dasharray"]),"line-pattern":new Fi(Ie.paint_line["line-pattern"]),"line-gradient":new ji(Ie.paint_line["line-gradient"])}),layout:sl},cl=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,n){return n=new Ei(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),e.prototype.possiblyEvaluate.call(this,t,n)},t.prototype.evaluate=function(t,n,r,i){return n=h({},n,{zoom:Math.floor(n.zoom)}),e.prototype.evaluate.call(this,t,n,r,i)},t}(zi),ul=new cl(ll.paint.properties["line-width"].specification);ul.useIntegerZoom=!0;var hl=function(e){function t(t){e.call(this,t,ll)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Wa(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,n){e.prototype.recalculate.call(this,t,n),this.paint._values["line-floorwidth"]=ul.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new al(e)},t.prototype.queryRadius=function(e){var t=e,n=dl(ka("line-width",this,t),ka("line-gap-width",this,t)),r=ka("line-offset",this,t);return n/2+Math.abs(r)+Ta(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,a,s){var l=Sa(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),c=s/2*dl(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),u=this.paint.get("line-offset").evaluate(t,n);return u&&(r=function(e,t){for(var n=[],r=new o(0,0),i=0;i<e.length;i++){for(var a=e[i],s=[],l=0;l<a.length;l++){var c=a[l-1],u=a[l],h=a[l+1],d=0===l?r:u.sub(c)._unit()._perp(),f=l===a.length-1?r:h.sub(u)._unit()._perp(),p=d._add(f)._unit(),g=p.x*f.x+p.y*f.y;p._mult(1/g),s.push(p._mult(t)._add(u))}n.push(s)}return n}(r,u*s)),function(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];if(e.length>=3)for(var o=0;o<i.length;o++)if(wa(e,i[o]))return!0;if(ma(e,i,n))return!0}return!1}(l,r,c)},t.prototype.isTileClipped=function(){return!0},t}(qi);function dl(e,t){return t>0?t+2*e:e}var fl=Gi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),pl=Gi([{name:"a_projected_pos",components:3,type:"Float32"}],4),gl=(Gi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Gi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),ml=(Gi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Gi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),vl=Gi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function yl(e,t,n){return e.sections.forEach((function(e){e.text=function(e,t,n){var r=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),Si.applyArabicShaping&&(e=Si.applyArabicShaping(e)),e}(e.text,t,n)})),e}Gi([{name:"triangle",components:3,type:"Uint16"}]),Gi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Gi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Gi([{type:"Float32",name:"offsetX"}]),Gi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var bl={"!":"","#":"",$:"","%":"","&":"","(":"",")":"","*":"","+":"",",":"","-":"",".":"","/":"",":":"",";":"","<":"","=":"",">":"","?":"","@":"","[":"","\\":"","]":"","^":"",_:"","`":"","{":"","|":"","}":"","~":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":"","":""};var _l=24,xl=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},wl=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g},Al=kl;function kl(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}kl.Varint=0,kl.Fixed64=1,kl.Bytes=2,kl.Fixed32=5;var Tl=4294967296,Sl=1/Tl,El="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Cl(e){return e.type===kl.Bytes?e.readVarint()+e.pos:e.pos+1}function Ml(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Ol(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function Ll(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function Dl(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function Il(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function Rl(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function Pl(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function Nl(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function zl(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function Fl(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function Bl(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function jl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Ul(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function Vl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}kl.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=jl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Vl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=jl(this.buf,this.pos)+jl(this.buf,this.pos+4)*Tl;return this.pos+=8,e},readSFixed64:function(){var e=jl(this.buf,this.pos)+Vl(this.buf,this.pos+4)*Tl;return this.pos+=8,e},readFloat:function(){var e=xl(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=xl(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return Ml(e,r,t);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return Ml(e,r,t);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return Ml(e,r,t);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return Ml(e,r,t);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return Ml(e,r,t);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return Ml(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&El?function(e,t,n){return El.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",i=t;i<n;){var o,a,s,l=e[i],c=null,u=l>239?4:l>223?3:l>191?2:1;if(i+u>n)break;1===u?l<128&&(c=l):2===u?128==(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==kl.Bytes)return e.push(this.readVarint(t));var n=Cl(this);for(e=e||[];this.pos<n;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==kl.Bytes)return e.push(this.readSVarint());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==kl.Bytes)return e.push(this.readBoolean());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==kl.Bytes)return e.push(this.readFloat());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==kl.Bytes)return e.push(this.readDouble());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==kl.Bytes)return e.push(this.readFixed32());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==kl.Bytes)return e.push(this.readSFixed32());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==kl.Bytes)return e.push(this.readFixed64());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==kl.Bytes)return e.push(this.readSFixed64());var t=Cl(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===kl.Varint)for(;this.buf[this.pos++]>127;);else if(t===kl.Bytes)this.pos=this.readVarint()+this.pos;else if(t===kl.Fixed32)this.pos+=4;else{if(t!==kl.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Ul(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Ul(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Ul(this.buf,-1&e,this.pos),Ul(this.buf,Math.floor(e*Sl),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Ul(this.buf,-1&e,this.pos),Ul(this.buf,Math.floor(e*Sl),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o<t.length;o++){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&Ol(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),wl(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),wl(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&Ol(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,kl.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Ll,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Dl,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Pl,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Il,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Rl,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Nl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,zl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Fl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Bl,t)},writeBytesField:function(e,t){this.writeTag(e,kl.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,kl.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,kl.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,kl.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,kl.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,kl.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,kl.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,kl.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,kl.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,kl.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};function ql(e,t,n){1===e&&n.readMessage(Hl,t)}function Hl(e,t,n){if(3===e){var r=n.readMessage($l,{}),i=r.id,o=r.bitmap,a=r.width,s=r.height,l=r.left,c=r.top,u=r.advance;t.push({id:i,bitmap:new qa({width:a+6,height:s+6},o),metrics:{width:a,height:s,left:l,top:c,advance:u}})}}function $l(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function Wl(e){for(var t=0,n=0,r=0,i=e;r<i.length;r+=1){var o=i[r];t+=o.w*o.h,n=Math.max(n,o.w)}e.sort((function(e,t){return t.h-e.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}],s=0,l=0,c=0,u=e;c<u.length;c+=1)for(var h=u[c],d=a.length-1;d>=0;d--){var f=a[d];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var p=a.pop();d<a.length&&(a[d]=p)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(a.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}var Gl=function(e,t){var n=t.pixelRatio,r=t.version,i=t.stretchX,o=t.stretchY,a=t.content;this.paddedRect=e,this.pixelRatio=n,this.stretchX=i,this.stretchY=o,this.content=a,this.version=r},Yl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Yl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Yl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Yl.tlbr.get=function(){return this.tl.concat(this.br)},Yl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Gl.prototype,Yl);var Xl=function(e,t){var n={},r={};this.haveRenderCallbacks=[];var i=[];this.addImages(e,n,i),this.addImages(t,r,i);var o=Wl(i),a=o.w,s=o.h,l=new Ha({width:a||1,height:s||1});for(var c in e){var u=e[c],h=n[c].paddedRect;Ha.copy(u.data,l,{x:0,y:0},{x:h.x+1,y:h.y+1},u.data)}for(var d in t){var f=t[d],p=r[d].paddedRect,g=p.x+1,m=p.y+1,v=f.data.width,y=f.data.height;Ha.copy(f.data,l,{x:0,y:0},{x:g,y:m},f.data),Ha.copy(f.data,l,{x:0,y:y-1},{x:g,y:m-1},{width:v,height:1}),Ha.copy(f.data,l,{x:0,y:0},{x:g,y:m+y},{width:v,height:1}),Ha.copy(f.data,l,{x:v-1,y:0},{x:g-1,y:m},{width:1,height:y}),Ha.copy(f.data,l,{x:0,y:0},{x:g+v,y:m},{width:1,height:y})}this.image=l,this.iconPositions=n,this.patternPositions=r};Xl.prototype.addImages=function(e,t,n){for(var r in e){var i=e[r],o={x:0,y:0,w:i.data.width+2,h:i.data.height+2};n.push(o),t[r]=new Gl(o,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(r)}},Xl.prototype.patchUpdatedImages=function(e,t){for(var n in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[n],e.getImage(n),t),this.patchUpdatedImage(this.patternPositions[n],e.getImage(n),t)},Xl.prototype.patchUpdatedImage=function(e,t,n){if(e&&t&&e.version!==t.version){e.version=t.version;var r=e.tl,i=r[0],o=r[1];n.update(t.data,void 0,{x:i,y:o})}},Qr("ImagePosition",Gl),Qr("ImageAtlas",Xl);var Zl={horizontal:1,vertical:2,horizontalOnly:3},Kl=-17;var Jl=function(){this.scale=1,this.fontStack="",this.imageName=null};Jl.forText=function(e,t){var n=new Jl;return n.scale=e||1,n.fontStack=t,n},Jl.forImage=function(e){var t=new Jl;return t.imageName=e,t};var Ql=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function ec(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g){var m,v=Ql.fromFeature(e,i);h===Zl.vertical&&v.verticalizePunctuation();var y=Si.processBidirectionalText,b=Si.processStyledBidirectionalText;if(y&&1===v.sections.length){m=[];for(var _=0,x=y(v.toString(),lc(v,c,o,t,r,f,p));_<x.length;_+=1){var w=x[_],A=new Ql;A.text=w,A.sections=v.sections;for(var k=0;k<w.length;k++)A.sectionIndex.push(0);m.push(A)}}else if(b){m=[];for(var T=0,S=b(v.text,v.sectionIndex,lc(v,c,o,t,r,f,p));T<S.length;T+=1){var E=S[T],C=new Ql;C.text=E[0],C.sectionIndex=E[1],C.sections=v.sections,m.push(C)}}else m=function(e,t){for(var n=[],r=e.text,i=0,o=0,a=t;o<a.length;o+=1){var s=a[o];n.push(e.substring(i,s)),i=s}return i<r.length&&n.push(e.substring(i,r.length)),n}(v,lc(v,c,o,t,r,f,p));var M=[],O={positionedLines:M,text:v.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:h,iconsInText:!1,verticalizable:!1};return function(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=0,f=Kl,p=0,g=0,m="right"===s?1:"left"===s?0:.5,v=0,y=0,b=i;y<b.length;y+=1){var _=b[y];_.trim();var x=_.getMaxScale(),w=(x-1)*_l,A={positionedGlyphs:[],lineOffset:0};e.positionedLines[v]=A;var k=A.positionedGlyphs,T=0;if(_.length()){for(var S=0;S<_.length();S++){var E=_.getSection(S),C=_.getSectionIndex(S),M=_.getCharCode(S),O=0,L=null,D=null,I=null,R=_l,P=!(l===Zl.horizontal||!u&&!li(M)||u&&(tc[M]||ui(M)));if(E.imageName){var N=r[E.imageName];if(!N)continue;I=E.imageName,e.iconsInText=e.iconsInText||!0,D=N.paddedRect;var z=N.displaySize;E.scale=E.scale*_l/h,L={width:z[0],height:z[1],left:1,top:-3,advance:P?z[1]:z[0]},O=w+(_l-z[1]*E.scale),R=L.advance;var F=P?z[0]*E.scale-_l*x:z[1]*E.scale-_l*x;F>0&&F>T&&(T=F)}else{var B=n[E.fontStack],j=B&&B[M];if(j&&j.rect)D=j.rect,L=j.metrics;else{var U=t[E.fontStack],V=U&&U[M];if(!V)continue;L=V.metrics}O=(x-E.scale)*_l}P?(e.verticalizable=!0,k.push({glyph:M,imageName:I,x:d,y:f+O,vertical:P,scale:E.scale,fontStack:E.fontStack,sectionIndex:C,metrics:L,rect:D}),d+=R*E.scale+c):(k.push({glyph:M,imageName:I,x:d,y:f+O,vertical:P,scale:E.scale,fontStack:E.fontStack,sectionIndex:C,metrics:L,rect:D}),d+=L.advance*E.scale+c)}if(0!==k.length){var q=d-c;p=Math.max(q,p),uc(k,0,k.length-1,m,T)}d=0;var H=o*x+T;A.lineOffset=Math.max(T,w),f+=H,g=Math.max(H,g),++v}else f+=o,++v}var $=f-Kl,W=cc(a),G=W.horizontalAlign,Y=W.verticalAlign;(function(e,t,n,r,i,o,a,s,l){var c=(t-n)*i,u=0;u=o!==a?-s*r-Kl:(-r*l+.5)*a;for(var h=0,d=e;h<d.length;h+=1)for(var f=0,p=d[h].positionedGlyphs;f<p.length;f+=1){var g=p[f];g.x+=c,g.y+=u}})(e.positionedLines,m,G,Y,p,g,o,$,i.length),e.top+=-Y*$,e.bottom=e.top+$,e.left+=-G*p,e.right=e.left+p}(O,t,n,r,m,a,s,l,h,c,d,g),!function(e){for(var t=0,n=e;t<n.length;t+=1)if(0!==n[t].positionedGlyphs.length)return!1;return!0}(M)&&O}Ql.fromFeature=function(e,t){for(var n=new Ql,r=0;r<e.sections.length;r++){var i=e.sections[r];i.image?n.addImageSection(i):n.addTextSection(i,t)}return n},Ql.prototype.length=function(){return this.text.length},Ql.prototype.getSection=function(e){return this.sections[this.sectionIndex[e]]},Ql.prototype.getSectionIndex=function(e){return this.sectionIndex[e]},Ql.prototype.getCharCode=function(e){return this.text.charCodeAt(e)},Ql.prototype.verticalizePunctuation=function(){this.text=function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n+1)||null,i=e.charCodeAt(n-1)||null;r&&ci(r)&&!bl[e[n+1]]||i&&ci(i)&&!bl[e[n-1]]||!bl[e[n]]?t+=e[n]:t+=bl[e[n]]}return t}(this.text)},Ql.prototype.trim=function(){for(var e=0,t=0;t<this.text.length&&tc[this.text.charCodeAt(t)];t++)e++;for(var n=this.text.length,r=this.text.length-1;r>=0&&r>=e&&tc[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(e,n),this.sectionIndex=this.sectionIndex.slice(e,n)},Ql.prototype.substring=function(e,t){var n=new Ql;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n},Ql.prototype.toString=function(){return this.text},Ql.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,n){return Math.max(t,e.sections[n].scale)}),0)},Ql.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(Jl.forText(e.scale,e.fontStack||t));for(var n=this.sections.length-1,r=0;r<e.text.length;++r)this.sectionIndex.push(n)},Ql.prototype.addImageSection=function(e){var t=e.image?e.image.name:"";if(0!==t.length){var n=this.getNextImageSectionCharCode();n?(this.text+=String.fromCharCode(n),this.sections.push(Jl.forImage(t)),this.sectionIndex.push(this.sections.length-1)):w("Reached maximum number of images 6401")}else w("Can't add FormattedSection with an empty image.")},Ql.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var tc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},nc={};function rc(e,t,n,r,i,o){if(t.imageName){var a=r[t.imageName];return a?a.displaySize[0]*t.scale*_l/o+i:0}var s=n[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function ic(e,t,n,r){var i=Math.pow(e-t,2);return r?e<t?i/2:2*i:i+Math.abs(n)*n}function oc(e,t,n){var r=0;return 10===e&&(r-=1e4),n&&(r+=150),40!==e&&65288!==e||(r+=50),41!==t&&65289!==t||(r+=50),r}function ac(e,t,n,r,i,o){for(var a=null,s=ic(t,n,i,o),l=0,c=r;l<c.length;l+=1){var u=c[l],h=ic(t-u.x,n,i,o)+u.badness;h<=s&&(a=u,s=h)}return{index:e,x:t,priorBreak:a,badness:s}}function sc(e){return e?sc(e.priorBreak).concat(e.index):[]}function lc(e,t,n,r,i,o,a){if("point"!==o)return[];if(!e)return[];for(var s=[],l=function(e,t,n,r,i,o){for(var a=0,s=0;s<e.length();s++){var l=e.getSection(s);a+=rc(e.getCharCode(s),l,r,i,t,o)}return a/Math.max(1,Math.ceil(a/n))}(e,t,n,r,i,a),c=e.text.indexOf("")>=0,u=0,h=0;h<e.length();h++){var d=e.getSection(h),f=e.getCharCode(h);if(tc[f]||(u+=rc(f,d,r,i,t,a)),h<e.length()-1){var p=!((g=f)<11904||!(ai["Bopomofo Extended"](g)||ai.Bopomofo(g)||ai["CJK Compatibility Forms"](g)||ai["CJK Compatibility Ideographs"](g)||ai["CJK Compatibility"](g)||ai["CJK Radicals Supplement"](g)||ai["CJK Strokes"](g)||ai["CJK Symbols and Punctuation"](g)||ai["CJK Unified Ideographs Extension A"](g)||ai["CJK Unified Ideographs"](g)||ai["Enclosed CJK Letters and Months"](g)||ai["Halfwidth and Fullwidth Forms"](g)||ai.Hiragana(g)||ai["Ideographic Description Characters"](g)||ai["Kangxi Radicals"](g)||ai["Katakana Phonetic Extensions"](g)||ai.Katakana(g)||ai["Vertical Forms"](g)||ai["Yi Radicals"](g)||ai["Yi Syllables"](g)));(nc[f]||p||d.imageName)&&s.push(ac(h+1,u,l,s,oc(f,e.getCharCode(h+1),p&&c),!1))}}var g;return sc(ac(e.length(),u,l,s,0,!0))}function cc(e){var t=.5,n=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":n=1;break;case"top":case"top-right":case"top-left":n=0}return{horizontalAlign:t,verticalAlign:n}}function uc(e,t,n,r,i){if(r||i)for(var o=e[n],a=o.metrics.advance*o.scale,s=(e[n].x+a)*r,l=t;l<=n;l++)e[l].x-=s,e[l].y+=i}function hc(e,t,n,r,i,o){var a,s=e.image;if(s.content){var l=s.content,c=s.pixelRatio||1;a=[l[0]/c,l[1]/c,s.displaySize[0]-l[2]/c,s.displaySize[1]-l[3]/c]}var u,h,d,f,p=t.left*o,g=t.right*o;"width"===n||"both"===n?(f=i[0]+p-r[3],h=i[0]+g+r[1]):h=(f=i[0]+(p+g-s.displaySize[0])/2)+s.displaySize[0];var m=t.top*o,v=t.bottom*o;return"height"===n||"both"===n?(u=i[1]+m-r[0],d=i[1]+v+r[2]):d=(u=i[1]+(m+v-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:u,right:h,bottom:d,left:f,collisionPadding:a}}nc[10]=!0,nc[32]=!0,nc[38]=!0,nc[40]=!0,nc[41]=!0,nc[43]=!0,nc[45]=!0,nc[47]=!0,nc[173]=!0,nc[183]=!0,nc[8203]=!0,nc[8208]=!0,nc[8211]=!0,nc[8231]=!0;var dc=function(e){function t(t,n,r,i){e.call(this,t,n),this.angle=r,void 0!==i&&(this.segment=i)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.x,this.y,this.angle,this.segment)},t}(o);Qr("Anchor",dc);var fc=128;function pc(e,t){var n=t.expression;if("constant"===n.kind)return{kind:"constant",layoutSize:n.evaluate(new Ei(e+1))};if("source"===n.kind)return{kind:"source"};for(var r=n.zoomStops,i=n.interpolationType,o=0;o<r.length&&r[o]<=e;)o++;for(var a=o=Math.max(0,o-1);a<r.length&&r[a]<e+1;)a++;a=Math.min(r.length-1,a);var s=r[o],l=r[a];return"composite"===n.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:i}:{kind:"camera",minZoom:s,maxZoom:l,minSize:n.evaluate(new Ei(s)),maxSize:n.evaluate(new Ei(l)),interpolationType:i}}function gc(e,t,n){var r=t.uSize,i=t.uSizeT,o=n.lowerSize,a=n.upperSize;return"source"===e.kind?o/fc:"composite"===e.kind?Kt(o/fc,a/fc,i):r}function mc(e,t){var n=0,r=0;if("constant"===e.kind)r=e.layoutSize;else if("source"!==e.kind){var i=e.interpolationType,o=e.minZoom,a=e.maxZoom,s=i?c(vn.interpolationFactor(i,t,o,a),0,1):0;"camera"===e.kind?r=Kt(e.minSize,e.maxSize,s):n=s}return{uSizeT:n,uSize:r}}var vc=Object.freeze({__proto__:null,getSizeData:pc,evaluateSizeForFeature:gc,evaluateSizeForZoom:mc,SIZE_PACK_FACTOR:fc});function yc(e,t,n,r,i){if(void 0===t.segment)return!0;for(var o=t,a=t.segment+1,s=0;s>-n/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],c=0;s<n/2;){var u=e[a-1],h=e[a],d=e[a+1];if(!d)return!1;var f=u.angleTo(h)-h.angleTo(d);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),c+=f;s-l[0].distance>r;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=h.dist(d)}return!0}function bc(e){for(var t=0,n=0;n<e.length-1;n++)t+=e[n].dist(e[n+1]);return t}function _c(e,t,n){return e?.6*t*n:0}function xc(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function wc(e,t,n,r,i,o){for(var a=_c(n,i,o),s=xc(n,r)*o,l=0,c=bc(e)/2,u=0;u<e.length-1;u++){var h=e[u],d=e[u+1],f=h.dist(d);if(l+f>c){var p=(c-l)/f,g=Kt(h.x,d.x,p),m=Kt(h.y,d.y,p),v=new dc(g,m,d.angleTo(h),u);return v._round(),!a||yc(e,v,s,a,t)?v:void 0}l+=f}}function Ac(e,t,n,r,i,o,a,s,l){var c=_c(r,o,a),u=xc(r,i),h=u*a,d=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),kc(e,d?t/2*s%t:(u/2+2*o)*a*s%t,t,c,n,h,d,!1,l)}function kc(e,t,n,r,i,o,a,s,l){for(var c=o/2,u=bc(e),h=0,d=t-n,f=[],p=0;p<e.length-1;p++){for(var g=e[p],m=e[p+1],v=g.dist(m),y=m.angleTo(g);d+n<h+v;){var b=((d+=n)-h)/v,_=Kt(g.x,m.x,b),x=Kt(g.y,m.y,b);if(_>=0&&_<l&&x>=0&&x<l&&d-c>=0&&d+c<=u){var w=new dc(_,x,y,p);w._round(),r&&!yc(e,w,o,r,i)||f.push(w)}}h+=v}return s||f.length||a||(f=kc(e,h/2,n,r,i,o,a,!0,l)),f}function Tc(e,t,n,r,i){for(var a=[],s=0;s<e.length;s++)for(var l=e[s],c=void 0,u=0;u<l.length-1;u++){var h=l[u],d=l[u+1];h.x<t&&d.x<t||(h.x<t?h=new o(t,h.y+(d.y-h.y)*((t-h.x)/(d.x-h.x)))._round():d.x<t&&(d=new o(t,h.y+(d.y-h.y)*((t-h.x)/(d.x-h.x)))._round()),h.y<n&&d.y<n||(h.y<n?h=new o(h.x+(d.x-h.x)*((n-h.y)/(d.y-h.y)),n)._round():d.y<n&&(d=new o(h.x+(d.x-h.x)*((n-h.y)/(d.y-h.y)),n)._round()),h.x>=r&&d.x>=r||(h.x>=r?h=new o(r,h.y+(d.y-h.y)*((r-h.x)/(d.x-h.x)))._round():d.x>=r&&(d=new o(r,h.y+(d.y-h.y)*((r-h.x)/(d.x-h.x)))._round()),h.y>=i&&d.y>=i||(h.y>=i?h=new o(h.x+(d.x-h.x)*((i-h.y)/(d.y-h.y)),i)._round():d.y>=i&&(d=new o(h.x+(d.x-h.x)*((i-h.y)/(d.y-h.y)),i)._round()),c&&h.equals(c[c.length-1])||(c=[h],a.push(c)),c.push(d)))))}return a}function Sc(e,t,n,r){var i=[],a=e.image,s=a.pixelRatio,l=a.paddedRect.w-2,c=a.paddedRect.h-2,u=e.right-e.left,h=e.bottom-e.top,d=a.stretchX||[[0,l]],f=a.stretchY||[[0,c]],p=function(e,t){return e+t[1]-t[0]},g=d.reduce(p,0),m=f.reduce(p,0),v=l-g,y=c-m,b=0,_=g,x=0,w=m,A=0,k=v,T=0,S=y;if(a.content&&r){var E=a.content;b=Ec(d,0,E[0]),x=Ec(f,0,E[1]),_=Ec(d,E[0],E[2]),w=Ec(f,E[1],E[3]),A=E[0]-b,T=E[1]-x,k=E[2]-E[0]-_,S=E[3]-E[1]-w}var C=function(r,i,l,c){var d=Mc(r.stretch-b,_,u,e.left),f=Oc(r.fixed-A,k,r.stretch,g),p=Mc(i.stretch-x,w,h,e.top),v=Oc(i.fixed-T,S,i.stretch,m),y=Mc(l.stretch-b,_,u,e.left),E=Oc(l.fixed-A,k,l.stretch,g),C=Mc(c.stretch-x,w,h,e.top),M=Oc(c.fixed-T,S,c.stretch,m),O=new o(d,p),L=new o(y,p),D=new o(y,C),I=new o(d,C),R=new o(f/s,v/s),P=new o(E/s,M/s),N=t*Math.PI/180;if(N){var z=Math.sin(N),F=Math.cos(N),B=[F,-z,z,F];O._matMult(B),L._matMult(B),I._matMult(B),D._matMult(B)}var j=r.stretch+r.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,q=c.stretch+c.fixed;return{tl:O,tr:L,bl:I,br:D,tex:{x:a.paddedRect.x+1+j,y:a.paddedRect.y+1+V,w:U-j,h:q-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:R,pixelOffsetBR:P,minFontScaleX:k/s/u,minFontScaleY:S/s/h,isSDF:n}};if(r&&(a.stretchX||a.stretchY))for(var M=Cc(d,v,g),O=Cc(f,y,m),L=0;L<M.length-1;L++)for(var D=M[L],I=M[L+1],R=0;R<O.length-1;R++){var P=O[R],N=O[R+1];i.push(C(D,P,I,N))}else i.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:c+1}));return i}function Ec(e,t,n){for(var r=0,i=0,o=e;i<o.length;i+=1){var a=o[i];r+=Math.max(t,Math.min(n,a[1]))-Math.max(t,Math.min(n,a[0]))}return r}function Cc(e,t,n){for(var r=[{fixed:-1,stretch:0}],i=0,o=e;i<o.length;i+=1){var a=o[i],s=a[0],l=a[1],c=r[r.length-1];r.push({fixed:s-c.stretch,stretch:c.stretch}),r.push({fixed:s-c.stretch,stretch:c.stretch+(l-s)})}return r.push({fixed:t+1,stretch:n}),r}function Mc(e,t,n,r){return e/t*n+r}function Oc(e,t,n,r){return e-t*n/r}var Lc=function(e,t,n,r,i,a,s,l,c,u){if(this.boxStartIndex=e.length,c){var h=a.top,d=a.bottom,f=a.collisionPadding;f&&(h-=f[1],d+=f[3]);var p=d-h;p>0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var g=a.top*s-l,m=a.bottom*s+l,v=a.left*s-l,y=a.right*s+l,b=a.collisionPadding;if(b&&(v-=b[0]*s,g-=b[1]*s,y+=b[2]*s,m+=b[3]*s),u){var _=new o(v,g),x=new o(y,g),w=new o(v,m),A=new o(y,m),k=u*Math.PI/180;_._rotate(k),x._rotate(k),w._rotate(k),A._rotate(k),v=Math.min(_.x,x.x,w.x,A.x),y=Math.max(_.x,x.x,w.x,A.x),g=Math.min(_.y,x.y,w.y,A.y),m=Math.max(_.y,x.y,w.y,A.y)}e.emplaceBack(t.x,t.y,v,g,y,m,n,r,i)}this.boxEndIndex=e.length},Dc=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Ic),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Ic(e,t){return e<t?-1:e>t?1:0}function Rc(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var r=1/0,i=1/0,a=-1/0,s=-1/0,l=e[0],c=0;c<l.length;c++){var u=l[c];(!c||u.x<r)&&(r=u.x),(!c||u.y<i)&&(i=u.y),(!c||u.x>a)&&(a=u.x),(!c||u.y>s)&&(s=u.y)}var h=a-r,d=s-i,f=Math.min(h,d),p=f/2,g=new Dc([],Pc);if(0===f)return new o(r,i);for(var m=r;m<a;m+=f)for(var v=i;v<s;v+=f)g.push(new Nc(m+p,v+p,p,e));for(var y=function(e){for(var t=0,n=0,r=0,i=e[0],o=0,a=i.length,s=a-1;o<a;s=o++){var l=i[o],c=i[s],u=l.x*c.y-c.x*l.y;n+=(l.x+c.x)*u,r+=(l.y+c.y)*u,t+=3*u}return new Nc(n/t,r/t,0,e)}(e),b=g.length;g.length;){var _=g.pop();(_.d>y.d||!y.d)&&(y=_,n&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,b)),_.max-y.d<=t||(p=_.h/2,g.push(new Nc(_.p.x-p,_.p.y-p,p,e)),g.push(new Nc(_.p.x+p,_.p.y-p,p,e)),g.push(new Nc(_.p.x-p,_.p.y+p,p,e)),g.push(new Nc(_.p.x+p,_.p.y+p,p,e)),b+=4)}return n&&(console.log("num probes: "+b),console.log("best distance: "+y.d)),y.p}function Pc(e,t){return t.max-e.max}function Nc(e,t,n,r){this.p=new o(e,t),this.h=n,this.d=function(e,t){for(var n=!1,r=1/0,i=0;i<t.length;i++)for(var o=t[i],a=0,s=o.length,l=s-1;a<s;l=a++){var c=o[a],u=o[l];c.y>e.y!=u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(n=!n),r=Math.min(r,_a(e,c,u))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}Dc.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},Dc.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},Dc.prototype.peek=function(){return this.data[0]},Dc.prototype._up=function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var i=e-1>>1,o=t[i];if(n(r,o)>=0)break;t[e]=o,e=i}t[e]=r},Dc.prototype._down=function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e<r;){var o=1+(e<<1),a=t[o],s=o+1;if(s<this.length&&n(t[s],a)<0&&(o=s,a=t[s]),n(a,i)>=0)break;t[e]=a,e=o}t[e]=i};var zc=Number.POSITIVE_INFINITY;function Fc(e,t){return t[1]!==zc?function(e,t,n){var r=0,i=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,i]}(e,t[0],t[1]):function(e,t){var n=0,r=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-t;break;case"top":r=t-7}switch(e){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=t;break;case"right":n=-t}return[n,r]}(e,t[0])}function Bc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var jc=32640;function Uc(e,t,n,r,i,a,s,l,c,u,h,d,f,p,g){var m=function(e,t,n,r,i,a,s,l){for(var c=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[],h=0,d=t.positionedLines;h<d.length;h+=1)for(var f=d[h],p=0,g=f.positionedGlyphs;p<g.length;p+=1){var m=g[p];if(m.rect){var v=m.rect||{},y=4,b=!0,_=1,x=0,w=(i||l)&&m.vertical,A=m.metrics.advance*m.scale/2;if(l&&t.verticalizable){var k=(m.scale-1)*_l,T=(_l-m.metrics.width*m.scale)/2;x=f.lineOffset/2-(m.imageName?-T:k)}if(m.imageName){var S=s[m.imageName];b=S.sdf,y=1/(_=S.pixelRatio)}var E=i?[m.x+A,m.y]:[0,0],C=i?[0,0]:[m.x+A+n[0],m.y+n[1]-x],M=[0,0];w&&(M=C,C=[0,0]);var O=(m.metrics.left-y)*m.scale-A+C[0],L=(-m.metrics.top-y)*m.scale+C[1],D=O+v.w*m.scale/_,I=L+v.h*m.scale/_,R=new o(O,L),P=new o(D,L),N=new o(O,I),z=new o(D,I);if(w){var F=new o(-A,A-Kl),B=-Math.PI/2,j=12-A,U=m.imageName?j:0,V=new o(22-j,-U),q=new(Function.prototype.bind.apply(o,[null].concat(M)));R._rotateAround(B,F)._add(V)._add(q),P._rotateAround(B,F)._add(V)._add(q),N._rotateAround(B,F)._add(V)._add(q),z._rotateAround(B,F)._add(V)._add(q)}if(c){var H=Math.sin(c),$=Math.cos(c),W=[$,-H,H,$];R._matMult(W),P._matMult(W),N._matMult(W),z._matMult(W)}var G=new o(0,0),Y=new o(0,0);u.push({tl:R,tr:P,bl:N,br:z,tex:v,writingMode:t.writingMode,glyphOffset:E,sectionIndex:m.sectionIndex,isSDF:b,pixelOffsetTL:G,pixelOffsetBR:Y,minFontScaleX:0,minFontScaleY:0})}}return u}(0,n,l,i,a,s,r,e.allowVerticalPlacement),v=e.textSizeData,y=null;"source"===v.kind?(y=[fc*i.layout.get("text-size").evaluate(s,{})])[0]>jc&&w(e.layerIds[0]+': Value for "text-size" is >= '+'255. Reduce your "text-size".'):"composite"===v.kind&&((y=[fc*p.compositeTextSizes[0].evaluate(s,{},g),fc*p.compositeTextSizes[1].evaluate(s,{},g)])[0]>jc||y[1]>jc)&&w(e.layerIds[0]+': Value for "text-size" is >= '+'255. Reduce your "text-size".'),e.addSymbols(e.text,m,y,l,a,s,u,t,c.lineStartIndex,c.lineLength,f,g);for(var b=0,_=h;b<_.length;b+=1)d[_[b]]=e.text.placedSymbolArray.length-1;return 4*m.length}function Vc(e){for(var t in e)return e[t];return null}function qc(e,t,n,r){var i=e.compareText;if(t in i){for(var o=i[t],a=o.length-1;a>=0;a--)if(r.dist(o[a])<n)return!0}else i[t]=[];return i[t].push(r),!1}var Hc=Ws.VectorTileFeature.types,$c=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Wc(e,t,n,r,i,o,a,s,l,c,u,h,d){var f=s?Math.min(jc,Math.round(s[0])):0,p=s?Math.min(jc,Math.round(s[1])):0;e.emplaceBack(t,n,Math.round(32*r),Math.round(32*i),o,a,(f<<1)+(l?1:0),p,16*c,16*u,256*h,256*d)}function Gc(e,t,n){e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n),e.emplaceBack(t.x,t.y,n)}function Yc(e){for(var t=0,n=e.sections;t<n.length;t+=1)if(fi(n[t].text))return!0;return!1}var Xc=function(e){this.layoutVertexArray=new eo,this.indexArray=new so,this.programConfigurations=e,this.segments=new Mo,this.dynamicLayoutVertexArray=new to,this.opacityVertexArray=new no,this.placedSymbolArray=new xo};Xc.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},Xc.prototype.upload=function(e,t,n,r){this.isEmpty()||(n&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,fl.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,pl.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,$c,!0),this.opacityVertexBuffer.itemSize=1),(n||r)&&this.programConfigurations.upload(e))},Xc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Qr("SymbolBuffers",Xc);var Zc=function(e,t,n){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new n,this.segments=new Mo,this.collisionVertexArray=new ao};Zc.prototype.upload=function(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,gl.members,!0)},Zc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Qr("CollisionBuffers",Zc);var Kc=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Oa([]),this.placementViewportMatrix=Oa([]);var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=pc(this.zoom,t["text-size"]),this.iconSizeData=pc(this.zoom,t["icon-size"]);var n=this.layers[0].layout,r=n.get("symbol-sort-key"),i=n.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==i&&void 0!==r.constantOr(1);var o="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(n.get("text-allow-overlap")||n.get("icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement")),"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map((function(e){return Zl[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID};Kc.prototype.createArrays=function(){this.text=new Xc(new ia(fl.members,this.layers,this.zoom,(function(e){return/^text/.test(e)}))),this.icon=new Xc(new ia(fl.members,this.layers,this.zoom,(function(e){return/^icon/.test(e)}))),this.glyphOffsetArray=new ko,this.lineVertexArray=new To,this.symbolInstances=new Ao},Kc.prototype.calculateGlyphDependencies=function(e,t,n,r,i){for(var o=0;o<e.length;o++)if(t[e.charCodeAt(o)]=!0,(n||r)&&i){var a=bl[e.charAt(o)];a&&(t[a.charCodeAt(0)]=!0)}},Kc.prototype.populate=function(e,t,n){var r=this.layers[0],i=r.layout,o=i.get("text-font"),a=i.get("text-field"),s=i.get("icon-image"),l=("constant"!==a.value.kind||a.value.value instanceof lt&&!a.value.value.isEmpty()||a.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var h=t.iconDependencies,d=t.glyphDependencies,f=t.availableImages,p=new Ei(this.zoom),g=0,m=e;g<m.length;g+=1){var v=m[g],y=v.feature,b=v.id,_=v.index,x=v.sourceLayerIndex,w=r._featureFilter.needGeometry,A={type:y.type,id:b,properties:y.properties,geometry:w?ua(y):[]};if(r._featureFilter.filter(p,A,n)){w||(A.geometry=ua(y));var k=void 0;if(l){var T=r.getValueAndResolveTokens("text-field",A,n,f),S=lt.factory(T);Yc(S)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===ki()||this.hasRTLText&&Si.isParsed())&&(k=yl(S,r,A))}var E=void 0;if(c){var C=r.getValueAndResolveTokens("icon-image",A,n,f);E=C instanceof ct?C:ct.fromString(C)}if(k||E){var M=this.sortFeaturesByKey?u.evaluate(A,{},n):void 0,O={id:b,text:k,icon:E,index:_,sourceLayerIndex:x,geometry:ua(y),properties:y.properties,type:Hc[y.type],sortKey:M};if(this.features.push(O),E&&(h[E.name]=!0),k){var L=o.evaluate(A,{},n).join(","),D="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Zl.vertical)>=0;for(var I=0,R=k.sections;I<R.length;I+=1){var P=R[I];if(P.image)h[P.image.name]=!0;else{var N=si(k.toString()),z=P.fontStack||L,F=d[z]=d[z]||{};this.calculateGlyphDependencies(P.text,F,D,this.allowVerticalPlacement,N)}}}}}}"line"===i.get("symbol-placement")&&(this.features=function(e){var t={},n={},r=[],i=0;function o(t){r.push(e[t]),i++}function a(e,t,i){var o=n[e];return delete n[e],n[t]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(e,n,i){var o=t[n];return delete t[n],t[e]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function l(e,t,n){var r=n?t[0][t[0].length-1]:t[0][0];return e+":"+r.x+":"+r.y}for(var c=0;c<e.length;c++){var u=e[c],h=u.geometry,d=u.text?u.text.toString():null;if(d){var f=l(d,h),p=l(d,h,!0);if(f in n&&p in t&&n[f]!==t[p]){var g=s(f,p,h),m=a(f,p,r[g].geometry);delete t[f],delete n[p],n[l(d,r[m].geometry,!0)]=m,r[g].geometry=null}else f in n?a(f,p,h):p in t?s(f,p,h):(o(c),t[f]=i-1,n[p]=i-1)}else o(c)}return r.filter((function(e){return e.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},Kc.prototype.update=function(e,t,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,n))},Kc.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},Kc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Kc.prototype.upload=function(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Kc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Kc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Kc.prototype.addToLineVertexArray=function(e,t){var n=this.lineVertexArray.length;if(void 0!==e.segment){for(var r=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]),o={},a=e.segment+1;a<t.length;a++)o[a]={x:t[a].x,y:t[a].y,tileUnitDistanceFromAnchor:r},a<t.length-1&&(r+=t[a+1].dist(t[a]));for(var s=e.segment||0;s>=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var c=o[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:n,lineLength:this.lineVertexArray.length-n}},Kc.prototype.addSymbols=function(e,t,n,r,i,o,a,s,l,c,u,h){for(var d=e.indexArray,f=e.layoutVertexArray,p=e.segments.prepareSegment(4*t.length,f,d,o.sortKey),g=this.glyphOffsetArray.length,m=p.vertexLength,v=this.allowVerticalPlacement&&a===Zl.vertical?Math.PI/2:0,y=o.text&&o.text.sections,b=0;b<t.length;b++){var _=t[b],x=_.tl,w=_.tr,A=_.bl,k=_.br,T=_.tex,S=_.pixelOffsetTL,E=_.pixelOffsetBR,C=_.minFontScaleX,M=_.minFontScaleY,O=_.glyphOffset,L=_.isSDF,D=_.sectionIndex,I=p.vertexLength,R=O[1];Wc(f,s.x,s.y,x.x,R+x.y,T.x,T.y,n,L,S.x,S.y,C,M),Wc(f,s.x,s.y,w.x,R+w.y,T.x+T.w,T.y,n,L,E.x,S.y,C,M),Wc(f,s.x,s.y,A.x,R+A.y,T.x,T.y+T.h,n,L,S.x,E.y,C,M),Wc(f,s.x,s.y,k.x,R+k.y,T.x+T.w,T.y+T.h,n,L,E.x,E.y,C,M),Gc(e.dynamicLayoutVertexArray,s,v),d.emplaceBack(I,I+1,I+2),d.emplaceBack(I+1,I+2,I+3),p.vertexLength+=4,p.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(O[0]),b!==t.length-1&&D===t[b+1].sectionIndex||e.programConfigurations.populatePaintArrays(f.length,o,o.index,{},h,y&&y[D])}e.placedSymbolArray.emplaceBack(s.x,s.y,g,this.glyphOffsetArray.length-g,m,l,c,s.segment,n?n[0]:0,n?n[1]:0,r[0],r[1],a,0,!1,0,u)},Kc.prototype._addCollisionDebugVertex=function(e,t,n,r,i,o){return t.emplaceBack(0,0),e.emplaceBack(n.x,n.y,r,i,Math.round(o.x),Math.round(o.y))},Kc.prototype.addCollisionDebugVertices=function(e,t,n,r,i,a,s){var l=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),c=l.vertexLength,u=i.layoutVertexArray,h=i.collisionVertexArray,d=s.anchorX,f=s.anchorY;this._addCollisionDebugVertex(u,h,a,d,f,new o(e,t)),this._addCollisionDebugVertex(u,h,a,d,f,new o(n,t)),this._addCollisionDebugVertex(u,h,a,d,f,new o(n,r)),this._addCollisionDebugVertex(u,h,a,d,f,new o(e,r)),l.vertexLength+=4;var p=i.indexArray;p.emplaceBack(c,c+1),p.emplaceBack(c+1,c+2),p.emplaceBack(c+2,c+3),p.emplaceBack(c+3,c),l.primitiveLength+=4},Kc.prototype.addDebugCollisionBoxes=function(e,t,n,r){for(var i=e;i<t;i++){var o=this.collisionBoxArray.get(i),a=o.x1,s=o.y1,l=o.x2,c=o.y2;this.addCollisionDebugVertices(a,s,l,c,r?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,n)}},Kc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Zc(io,ml.members,po),this.iconCollisionBox=new Zc(io,ml.members,po);for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}},Kc.prototype._deserializeCollisionBoxesForSymbol=function(e,t,n,r,i,o,a,s,l){for(var c={},u=t;u<n;u++){var h=e.get(u);c.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},c.textFeatureIndex=h.featureIndex;break}for(var d=r;d<i;d++){var f=e.get(d);c.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},c.verticalTextFeatureIndex=f.featureIndex;break}for(var p=o;p<a;p++){var g=e.get(p);c.iconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},c.iconFeatureIndex=g.featureIndex;break}for(var m=s;m<l;m++){var v=e.get(m);c.verticalIconBox={x1:v.x1,y1:v.y1,x2:v.x2,y2:v.y2,anchorPointX:v.anchorPointX,anchorPointY:v.anchorPointY},c.verticalIconFeatureIndex=v.featureIndex;break}return c},Kc.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var n=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,n.textBoxStartIndex,n.textBoxEndIndex,n.verticalTextBoxStartIndex,n.verticalTextBoxEndIndex,n.iconBoxStartIndex,n.iconBoxEndIndex,n.verticalIconBoxStartIndex,n.verticalIconBoxEndIndex))}},Kc.prototype.hasTextData=function(){return this.text.segments.get().length>0},Kc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Kc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Kc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Kc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Kc.prototype.addIndicesForPlacedSymbol=function(e,t){for(var n=e.placedSymbolArray.get(t),r=n.vertexStartIndex+4*n.numGlyphs,i=n.vertexStartIndex;i<r;i+=4)e.indexArray.emplaceBack(i,i+1,i+2),e.indexArray.emplaceBack(i+1,i+2,i+3)},Kc.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),n=Math.cos(e),r=[],i=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);r.push(0|Math.round(t*s.anchorX+n*s.anchorY)),i.push(s.featureIndex)}return o.sort((function(e,t){return r[e]-r[t]||i[t]-i[e]})),o},Kc.prototype.addToSortKeyRanges=function(e,t){var n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===t?n.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})},Kc.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n<r.length;n+=1){var i=r[n],o=this.symbolInstances.get(i);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e,n,r){e>=0&&r.indexOf(e)===n&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Qr("SymbolBucket",Kc,{omit:["layers","collisionBoxArray","features","compareText"]}),Kc.MAX_GLYPHS=65535,Kc.addDynamicAttributes=Gc;var Jc=new Ui({"symbol-placement":new Ni(Ie.layout_symbol["symbol-placement"]),"symbol-spacing":new Ni(Ie.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ni(Ie.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zi(Ie.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ni(Ie.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ni(Ie.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ni(Ie.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ni(Ie.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ni(Ie.layout_symbol["icon-rotation-alignment"]),"icon-size":new zi(Ie.layout_symbol["icon-size"]),"icon-text-fit":new Ni(Ie.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ni(Ie.layout_symbol["icon-text-fit-padding"]),"icon-image":new zi(Ie.layout_symbol["icon-image"]),"icon-rotate":new zi(Ie.layout_symbol["icon-rotate"]),"icon-padding":new Ni(Ie.layout_symbol["icon-padding"]),"icon-keep-upright":new Ni(Ie.layout_symbol["icon-keep-upright"]),"icon-offset":new zi(Ie.layout_symbol["icon-offset"]),"icon-anchor":new zi(Ie.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ni(Ie.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ni(Ie.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ni(Ie.layout_symbol["text-rotation-alignment"]),"text-field":new zi(Ie.layout_symbol["text-field"]),"text-font":new zi(Ie.layout_symbol["text-font"]),"text-size":new zi(Ie.layout_symbol["text-size"]),"text-max-width":new zi(Ie.layout_symbol["text-max-width"]),"text-line-height":new Ni(Ie.layout_symbol["text-line-height"]),"text-letter-spacing":new zi(Ie.layout_symbol["text-letter-spacing"]),"text-justify":new zi(Ie.layout_symbol["text-justify"]),"text-radial-offset":new zi(Ie.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ni(Ie.layout_symbol["text-variable-anchor"]),"text-anchor":new zi(Ie.layout_symbol["text-anchor"]),"text-max-angle":new Ni(Ie.layout_symbol["text-max-angle"]),"text-writing-mode":new Ni(Ie.layout_symbol["text-writing-mode"]),"text-rotate":new zi(Ie.layout_symbol["text-rotate"]),"text-padding":new Ni(Ie.layout_symbol["text-padding"]),"text-keep-upright":new Ni(Ie.layout_symbol["text-keep-upright"]),"text-transform":new zi(Ie.layout_symbol["text-transform"]),"text-offset":new zi(Ie.layout_symbol["text-offset"]),"text-allow-overlap":new Ni(Ie.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ni(Ie.layout_symbol["text-ignore-placement"]),"text-optional":new Ni(Ie.layout_symbol["text-optional"])}),Qc={paint:new Ui({"icon-opacity":new zi(Ie.paint_symbol["icon-opacity"]),"icon-color":new zi(Ie.paint_symbol["icon-color"]),"icon-halo-color":new zi(Ie.paint_symbol["icon-halo-color"]),"icon-halo-width":new zi(Ie.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zi(Ie.paint_symbol["icon-halo-blur"]),"icon-translate":new Ni(Ie.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ni(Ie.paint_symbol["icon-translate-anchor"]),"text-opacity":new zi(Ie.paint_symbol["text-opacity"]),"text-color":new zi(Ie.paint_symbol["text-color"],{runtimeType:$e,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new zi(Ie.paint_symbol["text-halo-color"]),"text-halo-width":new zi(Ie.paint_symbol["text-halo-width"]),"text-halo-blur":new zi(Ie.paint_symbol["text-halo-blur"]),"text-translate":new Ni(Ie.paint_symbol["text-translate"]),"text-translate-anchor":new Ni(Ie.paint_symbol["text-translate-anchor"])}),layout:Jc},eu=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:Ue,this.defaultValue=e};eu.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},eu.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},eu.prototype.outputDefined=function(){return!1},eu.prototype.serialize=function(){return null},Qr("FormatSectionOverride",eu,{omit:["defaultValue"]});var tu=function(e){function t(t){e.call(this,t,Qc)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,n){if(e.prototype.recalculate.call(this,t,n),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var i=[],o=0,a=r;o<a.length;o+=1){var s=a[o];i.indexOf(s)<0&&i.push(s)}this.layout._values["text-writing-mode"]=i}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(e,t,n,r){var i=this.layout.get(e).evaluate(t,{},n,r),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||ir(o.value)||!i?i:function(e,t){return t.replace(/{([^{}]+)}/g,(function(t,n){return n in e?String(e[n]):""}))}(t.properties,i)},t.prototype.createBucket=function(e){return new Kc(e)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var e=0,n=Qc.paint.overridableProperties;e<n.length;e+=1){var r=n[e];if(t.hasPaintOverride(this.layout,r)){var i,o=this.paint.get(r),a=new eu(o),s=new rr(a,o.property.specification);i="constant"===o.value.kind||"source"===o.value.kind?new ar("source",s):new sr("composite",s,o.value.zoomStops,o.value._interpolationType),this.paint._values[r]=new Ri(o.property,i,o.parameters)}}},t.prototype._handleOverridablePaintPropertyUpdate=function(e,n,r){return!(!this.layout||n.isDataDriven()||r.isDataDriven())&&t.hasPaintOverride(this.layout,e)},t.hasPaintOverride=function(e,t){var n=e.get("text-field"),r=Qc.paint.properties[t],i=!1,o=function(e){for(var t=0,n=e;t<n.length;t+=1){var o=n[t];if(r.overrides&&r.overrides.hasOverride(o))return void(i=!0)}};if("constant"===n.value.kind&&n.value.value instanceof lt)o(n.value.value.sections);else if("source"===n.value.kind){var a=function(e){if(!i)if(e instanceof pt&&dt(e.value)===Xe){var t=e.value;o(t.sections)}else e instanceof yt?o(e.sections):e.eachChild(a)},s=n.value;s._styleExpression&&a(s._styleExpression.expression)}return i},t}(qi),nu={paint:new Ui({"background-color":new Ni(Ie.paint_background["background-color"]),"background-pattern":new Bi(Ie.paint_background["background-pattern"]),"background-opacity":new Ni(Ie.paint_background["background-opacity"])})},ru=function(e){function t(t){e.call(this,t,nu)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(qi),iu={paint:new Ui({"raster-opacity":new Ni(Ie.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ni(Ie.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ni(Ie.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ni(Ie.paint_raster["raster-brightness-max"]),"raster-saturation":new Ni(Ie.paint_raster["raster-saturation"]),"raster-contrast":new Ni(Ie.paint_raster["raster-contrast"]),"raster-resampling":new Ni(Ie.paint_raster["raster-resampling"]),"raster-fade-duration":new Ni(Ie.paint_raster["raster-fade-duration"])})},ou=function(e){function t(t){e.call(this,t,iu)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(qi);var au=function(e){function t(t){e.call(this,t,{}),this.implementation=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},t.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},t.prototype.recalculate=function(){},t.prototype.updateTransitions=function(){},t.prototype.hasTransition=function(){},t.prototype.serialize=function(){},t.prototype.onAdd=function(e){this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},t.prototype.onRemove=function(e){this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},t}(qi),su={circle:za,heatmap:Ga,hillshade:Xa,fill:Ns,"fill-extrusion":Qs,line:hl,symbol:tu,background:ru,raster:ou};var lu=self.HTMLImageElement,cu=self.HTMLCanvasElement,uu=self.HTMLVideoElement,hu=self.ImageData,du=self.ImageBitmap,fu=function(e,t,n,r){this.context=e,this.format=n,this.texture=e.gl.createTexture(),this.update(t,r)};fu.prototype.update=function(e,t,n){var r=e.width,i=e.height,o=!(this.size&&this.size[0]===r&&this.size[1]===i||n),a=this.context,s=a.gl;if(this.useMipmap=Boolean(t&&t.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!t||!1!==t.premultiply)),o)this.size=[r,i],e instanceof lu||e instanceof cu||e instanceof uu||e instanceof hu||du&&e instanceof du?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,e):s.texImage2D(s.TEXTURE_2D,0,this.format,r,i,0,this.format,s.UNSIGNED_BYTE,e.data);else{var l=n||{x:0,y:0},c=l.x,u=l.y;e instanceof lu||e instanceof cu||e instanceof uu||e instanceof hu||du&&e instanceof du?s.texSubImage2D(s.TEXTURE_2D,0,c,u,s.RGBA,s.UNSIGNED_BYTE,e):s.texSubImage2D(s.TEXTURE_2D,0,c,u,r,i,s.RGBA,s.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},fu.prototype.bind=function(e,t,n){var r=this.context.gl;r.bindTexture(r.TEXTURE_2D,this.texture),n!==r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=r.LINEAR),e!==this.filter&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n||e),this.filter=e),t!==this.wrap&&(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,t),this.wrap=t)},fu.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},fu.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var pu=function(e){var t=this;this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};pu.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){e._triggered=!1,e._callback()}),0))},pu.prototype.remove=function(){delete this._channel,this._callback=function(){}};var gu=function(e,t,n){this.target=e,this.parent=t,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},m(["receive","process"],this),this.invoker=new pu(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=T()?e:self};function mu(e,t,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[e*r-2*Math.PI*6378137/2,t*r-2*Math.PI*6378137/2]}gu.prototype.send=function(e,t,n,r,i){var o=this;void 0===i&&(i=!1);var a=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[a]=n);var s=C(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:e,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:ri(t,s)},s),{cancel:function(){n&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:r,sourceMapId:o.mapId})}}},gu.prototype.receive=function(e){var t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else T()||t.mustQueue?(this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,t)},gu.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},gu.prototype.processTask=function(e,t){var n=this;if("<response>"===t.type){var r=this.callbacks[e];delete this.callbacks[e],r&&(t.error?r(ii(t.error)):r(null,ii(t.data)))}else{var i=!1,o=C(this.globalScope)?void 0:[],a=t.hasCallback?function(t,r){i=!0,delete n.cancelCallbacks[e],n.target.postMessage({id:e,type:"<response>",sourceMapId:n.mapId,error:t?ri(t):null,data:ri(r,o)},o)}:function(e){i=!0},s=null,l=ii(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,a);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,a)}else a(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},gu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var vu=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};vu.prototype.setNorthEast=function(e){return this._ne=e instanceof bu?new bu(e.lng,e.lat):bu.convert(e),this},vu.prototype.setSouthWest=function(e){return this._sw=e instanceof bu?new bu(e.lng,e.lat):bu.convert(e),this},vu.prototype.extend=function(e){var t,n,r=this._sw,i=this._ne;if(e instanceof bu)t=e,n=e;else{if(!(e instanceof vu)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var o=e;return this.extend(vu.convert(o))}var a=e;return this.extend(bu.convert(a))}return this}if(t=e._sw,n=e._ne,!t||!n)return this}return r||i?(r.lng=Math.min(t.lng,r.lng),r.lat=Math.min(t.lat,r.lat),i.lng=Math.max(n.lng,i.lng),i.lat=Math.max(n.lat,i.lat)):(this._sw=new bu(t.lng,t.lat),this._ne=new bu(n.lng,n.lat)),this},vu.prototype.getCenter=function(){return new bu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},vu.prototype.getSouthWest=function(){return this._sw},vu.prototype.getNorthEast=function(){return this._ne},vu.prototype.getNorthWest=function(){return new bu(this.getWest(),this.getNorth())},vu.prototype.getSouthEast=function(){return new bu(this.getEast(),this.getSouth())},vu.prototype.getWest=function(){return this._sw.lng},vu.prototype.getSouth=function(){return this._sw.lat},vu.prototype.getEast=function(){return this._ne.lng},vu.prototype.getNorth=function(){return this._ne.lat},vu.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},vu.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},vu.prototype.isEmpty=function(){return!(this._sw&&this._ne)},vu.prototype.contains=function(e){var t=bu.convert(e),n=t.lng,r=t.lat,i=this._sw.lat<=r&&r<=this._ne.lat,o=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=n&&n>=this._ne.lng),i&&o},vu.convert=function(e){return!e||e instanceof vu?e:new vu(e)};var yu=6371008.8,bu=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};bu.prototype.wrap=function(){return new bu(u(this.lng,-180,180),this.lat)},bu.prototype.toArray=function(){return[this.lng,this.lat]},bu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},bu.prototype.distanceTo=function(e){var t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return yu*Math.acos(Math.min(i,1))},bu.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new vu(new bu(this.lng-n,this.lat-t),new bu(this.lng+n,this.lat+t))},bu.convert=function(e){if(e instanceof bu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new bu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new bu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var _u=2*Math.PI*yu;function xu(e){return _u*Math.cos(e*Math.PI/180)}function wu(e){return(180+e)/360}function Au(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function ku(e,t){return e/xu(t)}function Tu(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Su=function(e,t,n){void 0===n&&(n=0),this.x=+e,this.y=+t,this.z=+n};Su.fromLngLat=function(e,t){void 0===t&&(t=0);var n=bu.convert(e);return new Su(wu(n.lng),Au(n.lat),ku(t,n.lat))},Su.prototype.toLngLat=function(){return new bu(360*this.x-180,Tu(this.y))},Su.prototype.toAltitude=function(){return e=this.z,t=this.y,e*xu(Tu(t));var e,t},Su.prototype.meterInMercatorCoordinateUnits=function(){return 1/_u*(e=Tu(this.y),1/Math.cos(e*Math.PI/180));var e};var Eu=function(e,t,n){this.z=e,this.x=t,this.y=n,this.key=Ou(0,e,e,t,n)};Eu.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Eu.prototype.url=function(e,t){var n,r,i,o,a,s=(n=this.x,r=this.y,i=this.z,o=mu(256*n,256*(r=Math.pow(2,i)-r-1),i),a=mu(256*(n+1),256*(r+1),i),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(e,t,n){for(var r,i="",o=e;o>0;o--)i+=(t&(r=1<<o-1)?1:0)+(n&r?2:0);return i}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},Eu.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new o((e.x*t-this.x)*sa,(e.y*t-this.y)*sa)},Eu.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Cu=function(e,t){this.wrap=e,this.canonical=t,this.key=Ou(e,t.z,t.z,t.x,t.y)},Mu=function(e,t,n,r,i){this.overscaledZ=e,this.wrap=t,this.canonical=new Eu(n,+r,+i),this.key=Ou(t,e,n,r,i)};function Ou(e,t,n,r,i){(e*=2)<0&&(e=-1*e-1);var o=1<<n;return(o*o*e+o*i+r).toString(36)+n.toString(36)+t.toString(36)}Mu.prototype.equals=function(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)},Mu.prototype.scaledTo=function(e){var t=this.canonical.z-e;return e>this.canonical.z?new Mu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Mu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Mu.prototype.calculateScaledKey=function(e,t){var n=this.canonical.z-e;return e>this.canonical.z?Ou(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Ou(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)},Mu.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t},Mu.prototype.children=function(e){if(this.overscaledZ>=e)return[new Mu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Mu(t,this.wrap,t,n,r),new Mu(t,this.wrap,t,n+1,r),new Mu(t,this.wrap,t,n,r+1),new Mu(t,this.wrap,t,n+1,r+1)]},Mu.prototype.isLessThan=function(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))},Mu.prototype.wrapped=function(){return new Mu(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Mu.prototype.unwrapTo=function(e){return new Mu(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)},Mu.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Mu.prototype.toUnwrapped=function(){return new Cu(this.wrap,this.canonical)},Mu.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Mu.prototype.getTilePoint=function(e){return this.canonical.getTilePoint(new Su(e.x-this.wrap,e.y))},Qr("CanonicalTileID",Eu),Qr("OverscaledTileID",Mu,{omit:["posMatrix"]});var Lu=function(e,t,n){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(n&&"mapbox"!==n&&"terrarium"!==n)return w('"'+n+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=t.height;var r=this.dim=t.height-2;this.data=new Uint32Array(t.data.buffer),this.encoding=n||"mapbox";for(var i=0;i<r;i++)this.data[this._idx(-1,i)]=this.data[this._idx(0,i)],this.data[this._idx(r,i)]=this.data[this._idx(r-1,i)],this.data[this._idx(i,-1)]=this.data[this._idx(i,0)],this.data[this._idx(i,r)]=this.data[this._idx(i,r-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(r,-1)]=this.data[this._idx(r-1,0)],this.data[this._idx(-1,r)]=this.data[this._idx(0,r-1)],this.data[this._idx(r,r)]=this.data[this._idx(r-1,r-1)]};Lu.prototype.get=function(e,t){var n=new Uint8Array(this.data.buffer),r=4*this._idx(e,t);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(n[r],n[r+1],n[r+2])},Lu.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Lu.prototype._idx=function(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Lu.prototype._unpackMapbox=function(e,t,n){return(256*e*256+256*t+n)/10-1e4},Lu.prototype._unpackTerrarium=function(e,t,n){return 256*e+t+n/256-32768},Lu.prototype.getPixels=function(){return new Ha({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Lu.prototype.backfillBorder=function(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var r=t*this.dim,i=t*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(t){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-t*this.dim,l=-n*this.dim,c=o;c<a;c++)for(var u=r;u<i;u++)this.data[this._idx(u,c)]=e.data[this._idx(u+s,c+l)]},Qr("DEMData",Lu);var Du=function(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var n=e[t];this._stringToNumber[n]=t,this._numberToString[t]=n}};Du.prototype.encode=function(e){return this._stringToNumber[e]},Du.prototype.decode=function(e){return this._numberToString[e]};var Iu=function(e,t,n,r,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=n,e._y=r,this.properties=e.properties,this.id=i},Ru={geometry:{configurable:!0}};Ru.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Ru.geometry.set=function(e){this._geometry=e},Iu.prototype.toJSON=function(){var e={geometry:this.geometry};for(var t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e},Object.defineProperties(Iu.prototype,Ru);var Pu=function(){this.state={},this.stateChanges={},this.deletedStates={}};Pu.prototype.updateState=function(e,t,n){var r=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][r]=this.stateChanges[e][r]||{},h(this.stateChanges[e][r],n),null===this.deletedStates[e])for(var i in this.deletedStates[e]={},this.state[e])i!==r&&(this.deletedStates[e][i]=null);else if(this.deletedStates[e]&&null===this.deletedStates[e][r])for(var o in this.deletedStates[e][r]={},this.state[e][r])n[o]||(this.deletedStates[e][r][o]=null);else for(var a in n)this.deletedStates[e]&&this.deletedStates[e][r]&&null===this.deletedStates[e][r][a]&&delete this.deletedStates[e][r][a]},Pu.prototype.removeFeatureState=function(e,t,n){if(null!==this.deletedStates[e]){var r=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},n&&void 0!==t)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]=this.deletedStates[e][r]||{},this.deletedStates[e][r][n]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][r])for(n in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][n]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}},Pu.prototype.getState=function(e,t){var n=String(t),r=this.state[e]||{},i=this.stateChanges[e]||{},o=h({},r[n],i[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){var a=this.deletedStates[e][t];if(null===a)return{};for(var s in a)delete o[s]}return o},Pu.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},Pu.prototype.coalesceChanges=function(e,t){var n={};for(var r in this.stateChanges){this.state[r]=this.state[r]||{};var i={};for(var o in this.stateChanges[r])this.state[r][o]||(this.state[r][o]={}),h(this.state[r][o],this.stateChanges[r][o]),i[o]=this.state[r][o];n[r]=i}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var l in this.state[a])s[l]={},this.state[a][l]={};else for(var c in this.deletedStates[a]){if(null===this.deletedStates[a][c])this.state[a][c]={};else for(var u=0,d=Object.keys(this.deletedStates[a][c]);u<d.length;u+=1){var f=d[u];delete this.state[a][c][f]}s[c]=this.state[a][c]}n[a]=n[a]||{},h(n[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(var p in e)e[p].setFeatureState(n,t)};var Nu=function(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Yr(sa,16,0),this.grid3D=new Yr(sa,16,0),this.featureIndexArray=new Eo,this.promoteId=t};function zu(e,t,n,r,i){return y(e,(function(e,o){var a=t instanceof Pi?t.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a}))}function Fu(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0,a=e;o<a.length;o+=1){var s=a[o];t=Math.min(t,s.x),n=Math.min(n,s.y),r=Math.max(r,s.x),i=Math.max(i,s.y)}return{minX:t,minY:n,maxX:r,maxY:i}}function Bu(e,t){return t-e}Nu.prototype.insert=function(e,t,n,r,i,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);for(var s=o?this.grid3D:this.grid,l=0;l<t.length;l++){for(var c=t[l],u=[1/0,1/0,-1/0,-1/0],h=0;h<c.length;h++){var d=c[h];u[0]=Math.min(u[0],d.x),u[1]=Math.min(u[1],d.y),u[2]=Math.max(u[2],d.x),u[3]=Math.max(u[3],d.y)}u[0]<sa&&u[1]<sa&&u[2]>=0&&u[3]>=0&&s.insert(a,u[0],u[1],u[2],u[3])}},Nu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ws.VectorTile(new Al(this.rawTileData)).layers,this.sourceLayerCoder=new Du(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nu.prototype.query=function(e,t,n,r){var i=this;this.loadVTLayers();for(var a=e.params||{},s=sa/e.tileSize/e.scale,l=br(a.filter),c=e.queryGeometry,u=e.queryPadding*s,h=Fu(c),d=this.grid.query(h.minX-u,h.minY-u,h.maxX+u,h.maxY+u),f=Fu(e.cameraQueryGeometry),p=0,g=this.grid3D.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u,(function(t,n,r,i){return function(e,t,n,r,i){for(var a=0,s=e;a<s.length;a+=1){var l=s[a];if(t<=l.x&&n<=l.y&&r>=l.x&&i>=l.y)return!0}var c=[new o(t,n),new o(t,i),new o(r,i),new o(r,n)];if(e.length>2)for(var u=0,h=c;u<h.length;u+=1)if(wa(e,h[u]))return!0;for(var d=0;d<e.length-1;d++)if(Aa(e[d],e[d+1],c))return!0;return!1}(e.cameraQueryGeometry,t-u,n-u,r+u,i+u)}));p<g.length;p+=1){var m=g[p];d.push(m)}d.sort(Bu);for(var v,y={},b=function(o){var u=d[o];if(u!==v){v=u;var h=i.featureIndexArray.get(u),f=null;i.loadMatchingFeature(y,h.bucketIndex,h.sourceLayerIndex,h.featureIndex,l,a.layers,a.availableImages,t,n,r,(function(t,n,r){return f||(f=ua(t)),n.queryIntersectsFeature(c,t,r,f,i.z,e.transform,s,e.pixelPosMatrix)}))}},_=0;_<d.length;_++)b(_);return y},Nu.prototype.loadMatchingFeature=function(e,t,n,r,i,o,a,s,l,c,u){var h=this.bucketLayerIDs[t];if(!o||function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>=0)return!0;return!1}(o,h)){var d=this.sourceLayerCoder.decode(n),f=this.vtLayers[d].feature(r);if(i.filter(new Ei(this.tileID.overscaledZ),f))for(var p=this.getId(f,d),g=0;g<h.length;g++){var m=h[g];if(!(o&&o.indexOf(m)<0)){var v=s[m];if(v){var y={};void 0!==p&&c&&(y=c.getState(v.sourceLayer||"_geojsonTileLayer",p));var b=l[m];b.paint=zu(b.paint,v.paint,f,y,a),b.layout=zu(b.layout,v.layout,f,y,a);var _=!u||u(f,v,y);if(_){var x=new Iu(f,this.z,this.x,this.y,p);x.layer=b;var w=e[m];void 0===w&&(w=e[m]=[]),w.push({featureIndex:r,feature:x,intersectionZ:_})}}}}}},Nu.prototype.lookupSymbolFeatures=function(e,t,n,r,i,o,a,s){var l={};this.loadVTLayers();for(var c=br(i),u=0,h=e;u<h.length;u+=1){var d=h[u];this.loadMatchingFeature(l,n,r,d,c,o,a,s,t)}return l},Nu.prototype.hasLayer=function(e){for(var t=0,n=this.bucketLayerIDs;t<n.length;t+=1)for(var r=0,i=n[t];r<i.length;r+=1)if(e===i[r])return!0;return!1},Nu.prototype.getId=function(e,t){var n=e.id;if(this.promoteId){var r="string"==typeof this.promoteId?this.promoteId:this.promoteId[t];"boolean"==typeof(n=e.properties[r])&&(n=Number(n))}return n},Qr("FeatureIndex",Nu,{omit:["rawTileData","sourceLayerCoder"]});var ju=function(e,t){this.tileID=e,this.uid=f(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};ju.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t<z.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},ju.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},ju.prototype.loadVectorData=function(e,t,n){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(var r in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){var n={};if(!t)return n;for(var r=function(){var e=o[i],r=e.layerIds.map((function(e){return t.getLayer(e)})).filter(Boolean);if(0!==r.length){e.layers=r,e.stateDependentLayerIds&&(e.stateDependentLayers=e.stateDependentLayerIds.map((function(e){return r.filter((function(t){return t.id===e}))[0]})));for(var a=0,s=r;a<s.length;a+=1){var l=s[a];n[l.id]=e}}},i=0,o=e;i<o.length;i+=1)r();return n}(e.buckets,t.style),this.hasSymbolBuckets=!1,this.buckets){var i=this.buckets[r];if(i instanceof Kc){if(this.hasSymbolBuckets=!0,!n)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var o in this.buckets){var a=this.buckets[o];if(a instanceof Kc&&a.hasRTLText){this.hasRTLText=!0,Si.isLoading()||Si.isLoaded()||"deferred"!==ki()||Ti();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(s).queryRadius(l))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new bo},ju.prototype.unloadVectorData=function(){for(var e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ju.prototype.getBucket=function(e){return this.buckets[e.id]},ju.prototype.upload=function(e){for(var t in this.buckets){var n=this.buckets[t];n.uploadPending()&&n.upload(e)}var r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new fu(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new fu(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)},ju.prototype.prepare=function(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)},ju.prototype.queryRenderedFeatures=function(e,t,n,r,i,o,a,s,l,c){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:a,queryPadding:this.queryPadding*l},e,t,n):{}},ju.prototype.querySourceFeatures=function(e,t){var n=this.latestFeatureIndex;if(n&&n.rawTileData){var r=n.loadVTLayers(),i=t?t.sourceLayer:"",o=r._geojsonTileLayer||r[i];if(o)for(var a=br(t&&t.filter),s=this.tileID.canonical,l=s.z,c=s.x,u=s.y,h={z:l,x:c,y:u},d=0;d<o.length;d++){var f=o.feature(d);if(a.filter(new Ei(this.tileID.overscaledZ),f)){var p=n.getId(f,i),g=new Iu(f,l,c,u,p);g.tile=h,e.push(g)}}}},ju.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},ju.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},ju.prototype.setExpiryData=function(e){var t=this.expirationTime;if(e.cacheControl){var n=S(e.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var r=Date.now(),i=!1;if(this.expirationTime>r)i=!1;else if(t)if(this.expirationTime<t)i=!0;else{var o=this.expirationTime-t;o?this.expirationTime=r+Math.max(o,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ju.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},ju.prototype.setFeatureState=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(e).length){var n=this.latestFeatureIndex.loadVTLayers();for(var r in this.buckets)if(t.style.hasLayer(r)){var i=this.buckets[r],o=i.layers[0].sourceLayer||"_geojsonTileLayer",a=n[o],s=e[o];if(a&&s&&0!==Object.keys(s).length){i.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=t&&t.style&&t.style.getLayer(r);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(i)))}}}},ju.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},ju.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<z.now()},ju.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},ju.prototype.setHoldDuration=function(e){this.symbolFadeHoldUntil=z.now()+e},ju.prototype.setDependencies=function(e,t){for(var n={},r=0,i=t;r<i.length;r+=1)n[i[r]]=!0;this.dependencies[e]=n},ju.prototype.hasDependency=function(e,t){for(var n=0,r=e;n<r.length;n+=1){var i=r[n],o=this.dependencies[i];if(o)for(var a=0,s=t;a<s.length;a+=1)if(o[s[a]])return!0}return!1};var Uu=self.performance,Vu=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},Uu.mark(this._marks.start)};Vu.prototype.finish=function(){Uu.mark(this._marks.end);var e=Uu.getEntriesByName(this._marks.measure);return 0===e.length&&(Uu.measure(this._marks.measure,this._marks.start,this._marks.end),e=Uu.getEntriesByName(this._marks.measure),Uu.clearMarks(this._marks.start),Uu.clearMarks(this._marks.end),Uu.clearMeasures(this._marks.measure)),e},e.Actor=gu,e.AlphaImage=qa,e.CanonicalTileID=Eu,e.CollisionBoxArray=bo,e.Color=ot,e.DEMData=Lu,e.DataConstantProperty=Ni,e.DictionaryCoder=Du,e.EXTENT=sa,e.ErrorEvent=Le,e.EvaluationParameters=Ei,e.Event=Oe,e.Evented=De,e.FeatureIndex=Nu,e.FillBucket=Is,e.FillExtrusionBucket=Zs,e.ImageAtlas=Xl,e.ImagePosition=Gl,e.LineBucket=al,e.LngLat=bu,e.LngLatBounds=vu,e.MercatorCoordinate=Su,e.ONE_EM=_l,e.OverscaledTileID=Mu,e.Point=o,e.Point$1=o,e.Properties=Ui,e.Protobuf=Al,e.RGBAImage=Ha,e.RequestManager=H,e.RequestPerformance=Vu,e.ResourceType=ye,e.SegmentVector=Mo,e.SourceFeatureState=Pu,e.StructArrayLayout1ui2=go,e.StructArrayLayout2f1f2i16=oo,e.StructArrayLayout2i4=Xi,e.StructArrayLayout3ui6=so,e.StructArrayLayout4i8=Zi,e.SymbolBucket=Kc,e.Texture=fu,e.Tile=ju,e.Transitionable=Oi,e.Uniform1f=Ho,e.Uniform1i=qo,e.Uniform2f=$o,e.Uniform3f=Wo,e.Uniform4f=Go,e.UniformColor=Yo,e.UniformMatrix4f=Zo,e.UnwrappedTileID=Cu,e.ValidationError=Re,e.WritingMode=Zl,e.ZoomHistory=oi,e.add=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e},e.addDynamicAttributes=Gc,e.asyncAll=function(e,t,n){if(!e.length)return n(null,[]);var r=e.length,i=new Array(e.length),o=null;e.forEach((function(e,a){t(e,(function(e,t){e&&(o=e),i[a]=t,0==--r&&n(o,i)}))}))},e.bezier=s,e.bindAll=m,e.browser=z,e.cacheEntryPossiblyAdded=function(e){++me>ue&&(e.getActor().send("enforceCacheSizeLimit",ce),me=0)},e.clamp=c,e.clearTileCache=function(e){var t=self.caches.delete(le);e&&t.catch(e).then((function(){return e()}))},e.clipLine=Tc,e.clone=function(e){var t=new Ma(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=_,e.clone$2=function(e){var t=new Ma(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.collisionCircleLayout=vl,e.config=F,e.create=function(){var e=new Ma(16);return Ma!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new Ma(9);return Ma!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new Ma(4);return Ma!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=or,e.createLayout=Gi,e.createStyleLayer=function(e){return"custom"===e.type?new au(e):new su[e.type](e)},e.cross=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e},e.deepEqual=function e(t,n){if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==n){if("object"!=typeof n)return!1;if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var i in t)if(!e(t[i],n[i]))return!1;return!0}return t===n},e.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.dot$1=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},e.ease=l,e.emitValidationErrors=Gr,e.endsWith=v,e.enforceCacheSizeLimit=function(e){he(),ee&&ee.then((function(t){t.keys().then((function(n){for(var r=0;r<n.length-e;r++)t.delete(n[r])}))}))},e.evaluateSizeForFeature=gc,e.evaluateSizeForZoom=mc,e.evaluateVariableOffset=Fc,e.evented=Ai,e.extend=h,e.featureFilter=br,e.filterObject=b,e.fromRotation=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.getAnchorAlignment=cc,e.getAnchorJustification=Bc,e.getArrayBuffer=Ae,e.getImage=Ee,e.getJSON=function(e,t){return we(h(e,{type:"json"}),t)},e.getRTLTextPluginStatus=ki,e.getReferrer=_e,e.getVideo=function(e,t){var n,r,i=self.document.createElement("video");i.muted=!0,i.onloadstart=function(){t(null,i)};for(var o=0;o<e.length;o++){var a=self.document.createElement("source");n=e[o],r=void 0,(r=self.document.createElement("a")).href=n,r.protocol===self.document.location.protocol&&r.host===self.document.location.host||(i.crossOrigin="Anonymous"),a.src=e[o],i.appendChild(a)}return{cancel:function(){}}},e.identity=Oa,e.invert=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],g=t[13],m=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,_=n*c-o*a,x=r*l-i*s,w=r*c-o*s,A=i*c-o*l,k=u*g-h*p,T=u*m-d*p,S=u*v-f*p,E=h*m-d*g,C=h*v-f*g,M=d*v-f*m,O=y*M-b*C+_*E+x*S-w*T+A*k;return O?(O=1/O,e[0]=(s*M-l*C+c*E)*O,e[1]=(i*C-r*M-o*E)*O,e[2]=(g*A-m*w+v*x)*O,e[3]=(d*w-h*A-f*x)*O,e[4]=(l*S-a*M-c*T)*O,e[5]=(n*M-i*S+o*T)*O,e[6]=(m*_-p*A-v*b)*O,e[7]=(u*A-d*_+f*b)*O,e[8]=(a*C-s*S+c*k)*O,e[9]=(r*S-n*C-o*k)*O,e[10]=(p*w-g*_+v*y)*O,e[11]=(h*_-u*w-f*y)*O,e[12]=(s*T-a*E-l*k)*O,e[13]=(n*E-r*T+i*k)*O,e[14]=(g*b-p*x-m*y)*O,e[15]=(u*x-h*b+d*y)*O,e):null},e.isChar=ai,e.isMapboxURL=$,e.keysDifference=function(e,t){var n=[];for(var r in e)r in t||n.push(r);return n},e.makeRequest=we,e.mapObject=y,e.mercatorXfromLng=wu,e.mercatorYfromLat=Au,e.mercatorZfromAltitude=ku,e.mul=Da,e.multiply=La,e.mvt=Ws,e.normalize=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},e.number=Kt,e.offscreenCanvasSupported=ve,e.ortho=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1,e},e.parseGlyphPBF=function(e){return new Al(e).readFields(ql,[])},e.pbf=Al,e.performSymbolLayout=function(e,t,n,r,i,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=sa/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var h=e.textSizeData,d=h.minZoom,f=h.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new Ei(d),a),c["text-size"].possiblyEvaluate(new Ei(f),a)]}if("composite"===e.iconSizeData.kind){var p=e.iconSizeData,g=p.minZoom,m=p.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new Ei(g),a),c["icon-size"].possiblyEvaluate(new Ei(m),a)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new Ei(e.zoom+1),a),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new Ei(e.zoom+1),a),u.textMaxSize=c["text-size"].possiblyEvaluate(new Ei(18));for(var v=l.get("text-line-height")*_l,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),b=l.get("text-keep-upright"),_=l.get("text-size"),x=function(){var o=k[A],s=l.get("text-font").evaluate(o,{},a).join(","),c=_.evaluate(o,{},a),h=u.layoutTextSize.evaluate(o,{},a),d=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},p=o.text,g=[0,0];if(p){var m=p.toString(),x=l.get("text-letter-spacing").evaluate(o,{},a)*_l,T=function(e){for(var t=0,n=e;t<n.length;t+=1)if(r=n[t].charCodeAt(0),ai.Arabic(r)||ai["Arabic Supplement"](r)||ai["Arabic Extended-A"](r)||ai["Arabic Presentation Forms-A"](r)||ai["Arabic Presentation Forms-B"](r))return!1;var r;return!0}(m)?x:0,S=l.get("text-anchor").evaluate(o,{},a),E=l.get("text-variable-anchor");if(!E){var C=l.get("text-radial-offset").evaluate(o,{},a);g=C?Fc(S,[C*_l,zc]):l.get("text-offset").evaluate(o,{},a).map((function(e){return e*_l}))}var M=y?"center":l.get("text-justify").evaluate(o,{},a),O=l.get("symbol-placement"),L="point"===O?l.get("text-max-width").evaluate(o,{},a)*_l:0,D=function(){e.allowVerticalPlacement&&si(m)&&(f.vertical=ec(p,t,n,i,s,L,v,S,"left",T,g,Zl.vertical,!0,O,h,c))};if(!y&&E){for(var I="auto"===M?E.map((function(e){return Bc(e)})):[M],R=!1,P=0;P<I.length;P++){var N=I[P];if(!f.horizontal[N])if(R)f.horizontal[N]=f.horizontal[0];else{var z=ec(p,t,n,i,s,L,v,"center",N,T,g,Zl.horizontal,!1,O,h,c);z&&(f.horizontal[N]=z,R=1===z.positionedLines.length)}}D()}else{"auto"===M&&(M=Bc(S));var F=ec(p,t,n,i,s,L,v,S,M,T,g,Zl.horizontal,!1,O,h,c);F&&(f.horizontal[M]=F),D(),si(m)&&y&&b&&(f.vertical=ec(p,t,n,i,s,L,v,S,M,T,g,Zl.vertical,!1,O,h,c))}}var B=void 0,j=!1;if(o.icon&&o.icon.name){var U=r[o.icon.name];U&&(B=function(e,t,n){var r=cc(n),i=r.horizontalAlign,o=r.verticalAlign,a=t[0],s=t[1],l=a-e.displaySize[0]*i,c=l+e.displaySize[0],u=s-e.displaySize[1]*o;return{image:e,top:u,bottom:u+e.displaySize[1],left:l,right:c}}(i[o.icon.name],l.get("icon-offset").evaluate(o,{},a),l.get("icon-anchor").evaluate(o,{},a)),j=U.sdf,void 0===e.sdfIcons?e.sdfIcons=U.sdf:e.sdfIcons!==U.sdf&&w("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(U.pixelRatio!==e.pixelRatio||0!==l.get("icon-rotate").constantOr(1))&&(e.iconsNeedLinear=!0))}var V=Vc(f.horizontal)||f.vertical;e.iconsInText=!!V&&V.iconsInText,(V||B)&&function(e,t,n,r,i,o,a,s,l,c,u){var h=o.textMaxSize.evaluate(t,{});void 0===h&&(h=a);var d,f=e.layers[0].layout,p=f.get("icon-offset").evaluate(t,{},u),g=Vc(n.horizontal),m=24,v=a/m,y=e.tilePixelRatio*v,b=e.tilePixelRatio*h/m,_=e.tilePixelRatio*s,x=e.tilePixelRatio*f.get("symbol-spacing"),A=f.get("text-padding")*e.tilePixelRatio,k=f.get("icon-padding")*e.tilePixelRatio,T=f.get("text-max-angle")/180*Math.PI,S="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),E="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),C=f.get("symbol-placement"),M=x/2,O=f.get("icon-text-fit");r&&"none"!==O&&(e.allowVerticalPlacement&&n.vertical&&(d=hc(r,n.vertical,O,f.get("icon-text-fit-padding"),p,v)),g&&(r=hc(r,g,O,f.get("icon-text-fit-padding"),p,v)));var L=function(s,h){h.x<0||h.x>=sa||h.y<0||h.y>=sa||function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,A,k,T){var S,E,C,M,O,L=e.addToLineVertexArray(t,n),D=0,I=0,R=0,P=0,N=-1,z=-1,F={},B=Ro(""),j=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(j=(S=s.layout.get("text-offset").evaluate(_,{},k).map((function(e){return e*_l})))[0],U=S[1]):(j=s.layout.get("text-radial-offset").evaluate(_,{},k)*_l,U=zc),e.allowVerticalPlacement&&r.vertical){var V=s.layout.get("text-rotate").evaluate(_,{},k)+90,q=r.vertical;M=new Lc(l,t,c,u,h,q,d,f,p,V),a&&(O=new Lc(l,t,c,u,h,a,m,v,p,V))}if(i){var H=s.layout.get("icon-rotate").evaluate(_,{}),$="none"!==s.layout.get("icon-text-fit"),W=Sc(i,H,A,$),G=a?Sc(a,H,A,$):void 0;C=new Lc(l,t,c,u,h,i,m,v,!1,H),D=4*W.length;var Y=e.iconSizeData,X=null;"source"===Y.kind?(X=[fc*s.layout.get("icon-size").evaluate(_,{})])[0]>jc&&w(e.layerIds[0]+': Value for "icon-size" is >= '+'255. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[fc*x.compositeIconSizes[0].evaluate(_,{},k),fc*x.compositeIconSizes[1].evaluate(_,{},k)])[0]>jc||X[1]>jc)&&w(e.layerIds[0]+': Value for "icon-size" is >= '+'255. Reduce your "icon-size".'),e.addSymbols(e.icon,W,X,b,y,_,!1,t,L.lineStartIndex,L.lineLength,-1,k),N=e.icon.placedSymbolArray.length-1,G&&(I=4*G.length,e.addSymbols(e.icon,G,X,b,y,_,Zl.vertical,t,L.lineStartIndex,L.lineLength,-1,k),z=e.icon.placedSymbolArray.length-1)}for(var Z in r.horizontal){var K=r.horizontal[Z];if(!E){B=Ro(K.text);var J=s.layout.get("text-rotate").evaluate(_,{},k);E=new Lc(l,t,c,u,h,K,d,f,p,J)}var Q=1===K.positionedLines.length;if(R+=Uc(e,t,K,o,s,p,_,g,L,r.vertical?Zl.horizontal:Zl.horizontalOnly,Q?Object.keys(r.horizontal):[Z],F,N,x,k),Q)break}r.vertical&&(P+=Uc(e,t,r.vertical,o,s,p,_,g,L,Zl.vertical,["vertical"],F,z,x,k));var ee=E?E.boxStartIndex:e.collisionBoxArray.length,te=E?E.boxEndIndex:e.collisionBoxArray.length,ne=M?M.boxStartIndex:e.collisionBoxArray.length,re=M?M.boxEndIndex:e.collisionBoxArray.length,ie=C?C.boxStartIndex:e.collisionBoxArray.length,oe=C?C.boxEndIndex:e.collisionBoxArray.length,ae=O?O.boxStartIndex:e.collisionBoxArray.length,se=O?O.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(E,le),le=ce(M,le),le=ce(C,le);var ue=(le=ce(O,le))>-1?1:0;ue&&(le*=T/_l),e.glyphOffsetArray.length>=Kc.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See path_to_url"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,F.right>=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,N,z,B,ee,te,ne,re,ie,oe,ae,se,c,R,P,D,I,ue,0,d,j,U,le)}(e,h,s,n,r,i,d,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,A,S,l,_,k,E,p,t,o,c,u,a)};if("line"===C)for(var D=0,I=Tc(t.geometry,0,0,sa,sa);D<I.length;D+=1)for(var R=I[D],P=0,N=Ac(R,x,T,n.vertical||g,r,m,b,e.overscaling,sa);P<N.length;P+=1){var z=N[P];g&&qc(e,g.text,M,z)||L(R,z)}else if("line-center"===C)for(var F=0,B=t.geometry;F<B.length;F+=1){var j=B[F];if(j.length>1){var U=wc(j,T,n.vertical||g,r,m,b);U&&L(j,U)}}else if("Polygon"===t.type)for(var V=0,q=Ms(t.geometry,0);V<q.length;V+=1){var H=q[V],$=Rc(H,16);L(H[0],new dc($.x,$.y,0))}else if("LineString"===t.type)for(var W=0,G=t.geometry;W<G.length;W+=1){var Y=G[W];L(Y,new dc(Y[0].x,Y[0].y,0))}else if("Point"===t.type)for(var X=0,Z=t.geometry;X<Z.length;X+=1)for(var K=0,J=Z[X];K<J.length;K+=1){var Q=J[K];L([Q],new dc(Q.x,Q.y,0))}}(e,o,f,B,r,u,h,d,g,j,a)},A=0,k=e.features;A<k.length;A+=1)x();o&&e.generateCollisionDebugBuffers()},e.perspective=function(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e},e.pick=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r];i in e&&(n[i]=e[i])}return n},e.plugin=Si,e.polygonIntersectsPolygon=fa,e.postMapLoadEvent=se,e.postTurnstileEvent=oe,e.potpack=Wl,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.register=Qr,e.registerForPluginStateChange=function(e){return e({pluginStatus:bi,pluginURL:_i}),Ai.on("pluginStateChange",e),e},e.rotate=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*s,e[1]=i*l+a*s,e[2]=r*-s+o*l,e[3]=i*-s+a*l,e},e.rotateX=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*r,e[5]=a*i+u*r,e[6]=s*i+h*r,e[7]=l*i+d*r,e[8]=c*i-o*r,e[9]=u*i-a*r,e[10]=h*i-s*r,e[11]=d*i-l*r,e},e.rotateZ=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+c*r,e[1]=a*i+u*r,e[2]=s*i+h*r,e[3]=l*i+d*r,e[4]=c*i-o*r,e[5]=u*i-a*r,e[6]=h*i-s*r,e[7]=d*i-l*r,e},e.scale=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.scale$1=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e},e.scale$2=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e},e.setCacheLimits=function(e,t){ce=e,ue=t},e.setRTLTextPlugin=function(e,t,n){if(void 0===n&&(n=!1),bi===pi||bi===gi||bi===mi)throw new Error("setRTLTextPlugin cannot be called multiple times.");_i=z.resolveURL(e),bi=pi,yi=t,wi(),n||Ti()},e.sphericalToCartesian=function(e){var t=e[0],n=e[1],r=e[2];return n+=90,n*=Math.PI/180,r*=Math.PI/180,{x:t*Math.cos(n)*Math.sin(r),y:t*Math.sin(n)*Math.sin(r),z:t*Math.cos(r)}},e.sqrLen=Na,e.styleSpec=Ie,e.sub=Ra,e.symbolSize=vc,e.transformMat3=function(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e},e.transformMat4=Pa,e.translate=function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,g=n[0],m=n[1],v=n[2];return t===e?(e[12]=t[0]*g+t[4]*m+t[8]*v+t[12],e[13]=t[1]*g+t[5]*m+t[9]*v+t[13],e[14]=t[2]*g+t[6]*m+t[10]*v+t[14],e[15]=t[3]*g+t[7]*m+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*g+s*m+h*v+t[12],e[13]=i*g+l*m+d*v+t[13],e[14]=o*g+c*m+f*v+t[14],e[15]=a*g+u*m+p*v+t[15]),e},e.triggerPluginCompletionEvent=xi,e.uniqueId=f,e.validateCustomStyleLayer=function(e){var t=[],n=e.id;return void 0===n&&t.push({message:"layers."+n+': missing required property "id"'}),void 0===e.render&&t.push({message:"layers."+n+': missing required method "render"'}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:"layers."+n+': property "renderingMode" must be either "2d" or "3d"'}),t},e.validateLight=Hr,e.validateStyle=qr,e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},e.vectorTile=Ws,e.version=n,e.warnOnce=w,e.webpSupported=B,e.window=self,e.wrap=u})),r(0,(function(e){function t(e){var n=typeof e;if("number"===n||"boolean"===n||"string"===n||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var r="[",i=0,o=e;i<o.length;i+=1)r+=t(o[i])+",";return r+"]"}for(var a=Object.keys(e).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+t(e[a[l]])+",";return s+"}"}function n(n){for(var r="",i=0,o=e.refProperties;i<o.length;i+=1)r+="/"+t(n[o[i]]);return r}var r=function(e){this.keyCache={},e&&this.replace(e)};r.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},r.prototype.update=function(t,r){for(var i=this,o=0,a=t;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=e.createStyleLayer(s);l._featureFilter=e.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var c=0,u=r;c<u.length;c+=1){var h=u[c];delete this.keyCache[h],delete this._layerConfigs[h],delete this._layers[h]}this.familiesBySource={};for(var d=0,f=function(e,t){for(var r={},i=0;i<e.length;i++){var o=t&&t[e[i].id]||n(e[i]);t&&(t[e[i].id]=o);var a=r[o];a||(a=r[o]=[]),a.push(e[i])}var s=[];for(var l in r)s.push(r[l]);return s}(e.values(this._layerConfigs),this.keyCache);d<f.length;d+=1){var p=f[d].map((function(e){return i._layers[e.id]})),g=p[0];if("none"!==g.visibility){var m=g.source||"",v=this.familiesBySource[m];v||(v=this.familiesBySource[m]={});var y=g.sourceLayer||"_geojsonTileLayer",b=v[y];b||(b=v[y]=[]),b.push(p)}}};var i=function(t){var n={},r=[];for(var i in t){var o=t[i],a=n[i]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var c={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};r.push(c),a[s]={rect:c,metrics:l.metrics}}}}var u=e.potpack(r),h=u.w,d=u.h,f=new e.AlphaImage({width:h||1,height:d||1});for(var p in t){var g=t[p];for(var m in g){var v=g[+m];if(v&&0!==v.bitmap.width&&0!==v.bitmap.height){var y=n[p][m].rect;e.AlphaImage.copy(v.bitmap,f,{x:0,y:0},{x:y.x+1,y:y.y+1},v.bitmap)}}}this.image=f,this.positions=n};e.register("GlyphAtlas",i);var o=function(t){this.tileID=new e.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId};function a(t,n,r){for(var i=new e.EvaluationParameters(n),o=0,a=t;o<a.length;o+=1)a[o].recalculate(i,r)}function s(t,n){var r=e.getArrayBuffer(t.request,(function(t,r,i,o){t?n(t):r&&n(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(r)),rawData:r,cacheControl:i,expires:o})}));return function(){r.cancel(),n()}}o.prototype.parse=function(t,n,r,o,s){var l=this;this.status="parsing",this.data=t,this.collisionBoxArray=new e.CollisionBoxArray;var c=new e.DictionaryCoder(Object.keys(t.layers).sort()),u=new e.FeatureIndex(this.tileID,this.promoteId);u.bucketLayerIDs=[];var h,d,f,p,g={},m={featureIndex:u,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:r},v=n.familiesBySource[this.source];for(var y in v){var b=t.layers[y];if(b){1===b.version&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+y+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var _=c.encode(y),x=[],w=0;w<b.length;w++){var A=b.feature(w),k=u.getId(A,y);x.push({feature:A,id:k,index:w,sourceLayerIndex:_})}for(var T=0,S=v[y];T<S.length;T+=1){var E=S[T],C=E[0];C.minzoom&&this.zoom<Math.floor(C.minzoom)||C.maxzoom&&this.zoom>=C.maxzoom||"none"!==C.visibility&&(a(E,this.zoom,r),(g[C.id]=C.createBucket({index:u.bucketLayerIDs.length,layers:E,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(x,m,this.tileID.canonical),u.bucketLayerIDs.push(E.map((function(e){return e.id}))))}}}var M=e.mapObject(m.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(M).length?o.send("getGlyphs",{uid:this.uid,stacks:M},(function(e,t){h||(h=e,d=t,D.call(l))})):d={};var O=Object.keys(m.iconDependencies);O.length?o.send("getImages",{icons:O,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){h||(h=e,f=t,D.call(l))})):f={};var L=Object.keys(m.patternDependencies);function D(){if(h)return s(h);if(d&&f&&p){var t=new i(d),n=new e.ImageAtlas(f,p);for(var o in g){var l=g[o];l instanceof e.SymbolBucket?(a(l.layers,this.zoom,r),e.performSymbolLayout(l,d,t.positions,f,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof e.LineBucket||l instanceof e.FillBucket||l instanceof e.FillExtrusionBucket)&&(a(l.layers,this.zoom,r),l.addFeatures(m,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:e.values(g).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:n,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?t.positions:null})}}L.length?o.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){h||(h=e,p=t,D.call(l))})):p={},D.call(this)};var l=function(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(t,n){var r=this,i=t.uid;this.loading||(this.loading={});var a=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),s=this.loading[i]=new o(t);s.abort=this.loadVectorData(t,(function(t,o){if(delete r.loading[i],t||!o)return s.status="done",r.loaded[i]=s,n(t);var l=o.rawData,c={};o.expires&&(c.expires=o.expires),o.cacheControl&&(c.cacheControl=o.cacheControl);var u={};if(a){var h=a.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(t,r){if(t||!r)return n(t);n(null,e.extend({rawTileData:l.slice(0)},r,c,u))})),r.loaded=r.loaded||{},r.loaded[i]=s}))},l.prototype.reloadTile=function(e,t){var n=this,r=this.loaded,i=e.uid,o=this;if(r&&r[i]){var a=r[i];a.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,r){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,n.availableImages,o.actor,i)),t(e,r)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(e,t){var n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()},l.prototype.removeTile=function(e,t){var n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()};var c=e.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(t,n){var r=t.uid,i=t.encoding,o=t.rawImageData,a=c&&o instanceof c?this.getImageData(o):o,s=new e.DEMData(r,a,i);this.loaded=this.loaded||{},this.loaded[r]=s,n(null,s)},u.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:n.width,height:n.height},n.data)},u.prototype.removeTile=function(e){var t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]};var h=function e(t,n){var r,i=t&&t.type;if("FeatureCollection"===i)for(r=0;r<t.features.length;r++)e(t.features[r],n);else if("GeometryCollection"===i)for(r=0;r<t.geometries.length;r++)e(t.geometries[r],n);else if("Feature"===i)e(t.geometry,n);else if("Polygon"===i)d(t.coordinates,n);else if("MultiPolygon"===i)for(r=0;r<t.coordinates.length;r++)d(t.coordinates[r],n);return t};function d(e,t){if(0!==e.length){f(e[0],t);for(var n=1;n<e.length;n++)f(e[n],!t)}}function f(e,t){for(var n=0,r=0,i=e.length,o=i-1;r<i;o=r++)n+=(e[r][0]-e[o][0])*(e[o][1]+e[r][1]);n>=0!=!!t&&e.reverse()}var p=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,g=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};g.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],n=0,r=this._feature.geometry;n<r.length;n+=1){var i=r[n];t.push([new e.Point$1(i[0],i[1])])}return t}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],c=0,u=s[a];c<u.length;c+=1){var h=u[c];l.push(new e.Point$1(h[0],h[1]))}o.push(l)}return o},g.prototype.toGeoJSON=function(e,t,n){return p.call(this,e,t,n)};var m=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=t.length,this._features=t};m.prototype.feature=function(e){return new g(this._features[e])};var v=e.vectorTile.VectorTileFeature,y=b;function b(e,t){this.options=t||{},this.features=e,this.length=e.length}function _(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}b.prototype.feature=function(e){return new _(this.features[e],this.options.extent)},_.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var n=0;n<t.length;n++){for(var r=t[n],i=[],o=0;o<r.length;o++)i.push(new e.Point$1(r[o][0],r[o][1]));this.geometry.push(i)}return this.geometry},_.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,n=-1/0,r=1/0,i=-1/0,o=0;o<e.length;o++)for(var a=e[o],s=0;s<a.length;s++){var l=a[s];t=Math.min(t,l.x),n=Math.max(n,l.x),r=Math.min(r,l.y),i=Math.max(i,l.y)}return[t,r,n,i]},_.prototype.toGeoJSON=v.prototype.toGeoJSON;var x=T,w=T,A=function(e,t){t=t||{};var n={};for(var r in e)n[r]=new y(e[r].features,t),n[r].name=r,n[r].version=t.version,n[r].extent=t.extent;return T({layers:n})},k=y;function T(t){var n=new e.pbf;return function(e,t){for(var n in e.layers)t.writeMessage(3,S,e.layers[n])}(t,n),n.finish()}function S(e,t){var n;t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);var r={keys:[],values:[],keycache:{},valuecache:{}};for(n=0;n<e.length;n++)r.feature=e.feature(n),t.writeMessage(2,E,r);var i=r.keys;for(n=0;n<i.length;n++)t.writeStringField(3,i[n]);var o=r.values;for(n=0;n<o.length;n++)t.writeMessage(4,D,o[n])}function E(e,t){var n=e.feature;void 0!==n.id&&t.writeVarintField(1,n.id),t.writeMessage(2,C,e),t.writeVarintField(3,n.type),t.writeMessage(4,L,n)}function C(e,t){var n=e.feature,r=e.keys,i=e.values,o=e.keycache,a=e.valuecache;for(var s in n.properties){var l=o[s];void 0===l&&(r.push(s),l=r.length-1,o[s]=l),t.writeVarint(l);var c=n.properties[s],u=typeof c;"string"!==u&&"boolean"!==u&&"number"!==u&&(c=JSON.stringify(c));var h=u+":"+c,d=a[h];void 0===d&&(i.push(c),d=i.length-1,a[h]=d),t.writeVarint(d)}}function M(e,t){return(t<<3)+(7&e)}function O(e){return e<<1^e>>31}function L(e,t){for(var n=e.loadGeometry(),r=e.type,i=0,o=0,a=n.length,s=0;s<a;s++){var l=n[s],c=1;1===r&&(c=l.length),t.writeVarint(M(1,c));for(var u=3===r?l.length-1:l.length,h=0;h<u;h++){1===h&&1!==r&&t.writeVarint(M(2,u-1));var d=l[h].x-i,f=l[h].y-o;t.writeVarint(O(d)),t.writeVarint(O(f)),i+=d,o+=f}3===r&&t.writeVarint(M(7,1))}}function D(e,t){var n=typeof e;"string"===n?t.writeStringField(1,e):"boolean"===n?t.writeBooleanField(7,e):"number"===n&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}function I(e,t,n,r,i,o){if(!(i-r<=n)){var a=r+i>>1;R(e,t,a,r,i,o%2),I(e,t,n,r,a-1,o+1),I(e,t,n,a+1,i,o+1)}}function R(e,t,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);R(e,t,n,Math.max(r,Math.floor(n-s*c/a+u)),Math.min(i,Math.floor(n+(a-s)*c/a+u)),o)}var h=t[2*n+o],d=r,f=i;for(P(e,t,r,n),t[2*i+o]>h&&P(e,t,r,i);d<f;){for(P(e,t,d,f),d++,f--;t[2*d+o]<h;)d++;for(;t[2*f+o]>h;)f--}t[2*r+o]===h?P(e,t,r,f):P(e,t,++f,i),f<=n&&(r=f+1),n<=f&&(i=f-1)}}function P(e,t,n,r){N(e,n,r),N(t,2*n,2*r),N(t,2*n+1,2*r+1)}function N(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function z(e,t,n,r){var i=e-n,o=t-r;return i*i+o*o}x.fromVectorTileJs=w,x.fromGeojsonVt=A,x.GeoJSONWrapper=k;var F=function(e){return e[0]},B=function(e){return e[1]},j=function(e,t,n,r,i){void 0===t&&(t=F),void 0===n&&(n=B),void 0===r&&(r=64),void 0===i&&(i=Float64Array),this.nodeSize=r,this.points=e;for(var o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length),l=0;l<e.length;l++)a[l]=l,s[2*l]=t(e[l]),s[2*l+1]=n(e[l]);I(a,s,r,0,a.length-1,0)};j.prototype.range=function(e,t,n,r){return function(e,t,n,r,i,o,a){for(var s,l,c=[0,e.length-1,0],u=[];c.length;){var h=c.pop(),d=c.pop(),f=c.pop();if(d-f<=a)for(var p=f;p<=d;p++)s=t[2*p],l=t[2*p+1],s>=n&&s<=i&&l>=r&&l<=o&&u.push(e[p]);else{var g=Math.floor((f+d)/2);s=t[2*g],l=t[2*g+1],s>=n&&s<=i&&l>=r&&l<=o&&u.push(e[g]);var m=(h+1)%2;(0===h?n<=s:r<=l)&&(c.push(f),c.push(g-1),c.push(m)),(0===h?i>=s:o>=l)&&(c.push(g+1),c.push(d),c.push(m))}}return u}(this.ids,this.coords,e,t,n,r,this.nodeSize)},j.prototype.within=function(e,t,n){return function(e,t,n,r,i,o){for(var a=[0,e.length-1,0],s=[],l=i*i;a.length;){var c=a.pop(),u=a.pop(),h=a.pop();if(u-h<=o)for(var d=h;d<=u;d++)z(t[2*d],t[2*d+1],n,r)<=l&&s.push(e[d]);else{var f=Math.floor((h+u)/2),p=t[2*f],g=t[2*f+1];z(p,g,n,r)<=l&&s.push(e[f]);var m=(c+1)%2;(0===c?n-i<=p:r-i<=g)&&(a.push(h),a.push(f-1),a.push(m)),(0===c?n+i>=p:r+i>=g)&&(a.push(f+1),a.push(u),a.push(m))}}return s}(this.ids,this.coords,e,t,n,this.nodeSize)};var U={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},V=function(e){this.options=X(Object.create(U),e),this.trees=new Array(this.options.maxZoom+1)};function q(e,t,n,r,i){return{x:e,y:t,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function H(e,t){var n=e.geometry.coordinates,r=n[0],i=n[1];return{x:G(r),y:Y(i),zoom:1/0,index:t,parentId:-1}}function $(e){return{type:"Feature",id:e.id,properties:W(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function W(e){var t=e.numPoints,n=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return X(X({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function G(e){return e/360+.5}function Y(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function X(e,t){for(var n in t)e[n]=t[n];return e}function Z(e){return e.x}function K(e){return e.y}function J(e,t,n,r){for(var i,o=r,a=n-t>>1,s=n-t,l=e[t],c=e[t+1],u=e[n],h=e[n+1],d=t+3;d<n;d+=3){var f=Q(e[d],e[d+1],l,c,u,h);if(f>o)i=d,o=f;else if(f===o){var p=Math.abs(d-a);p<s&&(i=d,s=p)}}o>r&&(i-t>3&&J(e,t,i,r),e[i+2]=o,n-i>3&&J(e,i,n,r))}function Q(e,t,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((e-n)*a+(t-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=e-n)*a+(s=t-r)*s}function ee(e,t,n,r){var i={id:void 0===e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)te(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r<t.length;r++)te(e,t[r]);else if("MultiPolygon"===n)for(r=0;r<t.length;r++)for(var i=0;i<t[r].length;i++)te(e,t[r][i])}(i),i}function te(e,t){for(var n=0;n<t.length;n+=3)e.minX=Math.min(e.minX,t[n]),e.minY=Math.min(e.minY,t[n+1]),e.maxX=Math.max(e.maxX,t[n]),e.maxY=Math.max(e.maxY,t[n+1])}function ne(e,t,n,r){if(t.geometry){var i=t.geometry.coordinates,o=t.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],l=t.id;if(n.promoteId?l=t.properties[n.promoteId]:n.generateId&&(l=r||0),"Point"===o)re(i,s);else if("MultiPoint"===o)for(var c=0;c<i.length;c++)re(i[c],s);else if("LineString"===o)ie(i,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(c=0;c<i.length;c++)s=[],ie(i[c],s,a,!1),e.push(ee(l,"LineString",s,t.properties));return}oe(i,s,a,!1)}else if("Polygon"===o)oe(i,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(c=0;c<t.geometry.geometries.length;c++)ne(e,{id:l,geometry:t.geometry.geometries[c],properties:t.properties},n,r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<i.length;c++){var u=[];oe(i[c],u,a,!0),s.push(u)}}e.push(ee(l,o,s,t.properties))}}function re(e,t){t.push(ae(e[0])),t.push(se(e[1])),t.push(0)}function ie(e,t,n,r){for(var i,o,a=0,s=0;s<e.length;s++){var l=ae(e[s][0]),c=se(e[s][1]);t.push(l),t.push(c),t.push(0),s>0&&(a+=r?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=t.length-3;t[2]=1,J(t,0,u,n),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function oe(e,t,n,r){for(var i=0;i<e.length;i++){var o=[];ie(e[i],o,n,r),t.push(o)}}function ae(e){return e/360+.5}function se(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function le(e,t,n,r,i,o,a,s){if(r/=t,o>=(n/=t)&&a<r)return e;if(a<n||o>=r)return null;for(var l=[],c=0;c<e.length;c++){var u=e[c],h=u.geometry,d=u.type,f=0===i?u.minX:u.minY,p=0===i?u.maxX:u.maxY;if(f>=n&&p<r)l.push(u);else if(!(p<n||f>=r)){var g=[];if("Point"===d||"MultiPoint"===d)ce(h,g,n,r,i);else if("LineString"===d)ue(h,g,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===d)de(h,g,n,r,i,!1);else if("Polygon"===d)de(h,g,n,r,i,!0);else if("MultiPolygon"===d)for(var m=0;m<h.length;m++){var v=[];de(h[m],v,n,r,i,!0),v.length&&g.push(v)}if(g.length){if(s.lineMetrics&&"LineString"===d){for(m=0;m<g.length;m++)l.push(ee(u.id,d,g[m],u.tags));continue}"LineString"!==d&&"MultiLineString"!==d||(1===g.length?(d="LineString",g=g[0]):d="MultiLineString"),"Point"!==d&&"MultiPoint"!==d||(d=3===g.length?"Point":"MultiPoint"),l.push(ee(u.id,d,g,u.tags))}}}return l.length?l:null}function ce(e,t,n,r,i){for(var o=0;o<e.length;o+=3){var a=e[o+i];a>=n&&a<=r&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function ue(e,t,n,r,i,o,a){for(var s,l,c=he(e),u=0===i?pe:ge,h=e.start,d=0;d<e.length-3;d+=3){var f=e[d],p=e[d+1],g=e[d+2],m=e[d+3],v=e[d+4],y=0===i?f:p,b=0===i?m:v,_=!1;a&&(s=Math.sqrt(Math.pow(f-m,2)+Math.pow(p-v,2))),y<n?b>n&&(l=u(c,f,p,m,v,n),a&&(c.start=h+s*l)):y>r?b<r&&(l=u(c,f,p,m,v,r),a&&(c.start=h+s*l)):fe(c,f,p,g),b<n&&y>=n&&(l=u(c,f,p,m,v,n),_=!0),b>r&&y<=r&&(l=u(c,f,p,m,v,r),_=!0),!o&&_&&(a&&(c.end=h+s*l),t.push(c),c=he(e)),a&&(h+=s)}var x=e.length-3;f=e[x],p=e[x+1],g=e[x+2],(y=0===i?f:p)>=n&&y<=r&&fe(c,f,p,g),x=c.length-3,o&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&fe(c,c[0],c[1],c[2]),c.length&&t.push(c)}function he(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function de(e,t,n,r,i,o){for(var a=0;a<e.length;a++)ue(e[a],t,n,r,i,o,!1)}function fe(e,t,n,r){e.push(t),e.push(n),e.push(r)}function pe(e,t,n,r,i,o){var a=(o-t)/(r-t);return e.push(o),e.push(n+(i-n)*a),e.push(1),a}function ge(e,t,n,r,i,o){var a=(o-n)/(i-n);return e.push(t+(r-t)*a),e.push(o),e.push(1),a}function me(e,t){for(var n=[],r=0;r<e.length;r++){var i,o=e[r],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)i=ve(o.geometry,t);else if("MultiLineString"===a||"Polygon"===a){i=[];for(var s=0;s<o.geometry.length;s++)i.push(ve(o.geometry[s],t))}else if("MultiPolygon"===a)for(i=[],s=0;s<o.geometry.length;s++){for(var l=[],c=0;c<o.geometry[s].length;c++)l.push(ve(o.geometry[s][c],t));i.push(l)}n.push(ee(o.id,a,i,o.tags))}return n}function ve(e,t){var n=[];n.size=e.size,void 0!==e.start&&(n.start=e.start,n.end=e.end);for(var r=0;r<e.length;r+=3)n.push(e[r]+t,e[r+1],e[r+2]);return n}function ye(e,t){if(e.transformed)return e;var n,r,i,o=1<<e.z,a=e.x,s=e.y;for(n=0;n<e.features.length;n++){var l=e.features[n],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(r=0;r<c.length;r+=2)l.geometry.push(be(c[r],c[r+1],t,o,a,s));else for(r=0;r<c.length;r++){var h=[];for(i=0;i<c[r].length;i+=2)h.push(be(c[r][i],c[r][i+1],t,o,a,s));l.geometry.push(h)}}return e.transformed=!0,e}function be(e,t,n,r,i,o){return[Math.round(n*(e*r-i)),Math.round(n*(t*r-o))]}function _e(e,t,n,r,i){for(var o=t===i.maxZoom?0:i.tolerance/((1<<t)*i.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:n,y:r,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<e.length;s++){a.numFeatures++,xe(a,e[s],o,i);var l=e[s].minX,c=e[s].minY,u=e[s].maxX,h=e[s].maxY;l<a.minX&&(a.minX=l),c<a.minY&&(a.minY=c),u>a.maxX&&(a.maxX=u),h>a.maxY&&(a.maxY=h)}return a}function xe(e,t,n,r){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<i.length;s+=3)a.push(i[s]),a.push(i[s+1]),e.numPoints++,e.numSimplified++;else if("LineString"===o)we(a,i,e,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<i.length;s++)we(a,i[s],e,n,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<i.length;l++){var c=i[l];for(s=0;s<c.length;s++)we(a,c[s],e,n,!0,0===s)}if(a.length){var u=t.tags||null;if("LineString"===o&&r.lineMetrics){for(var h in u={},t.tags)u[h]=t.tags[h];u.mapbox_clip_start=i.start/i.size,u.mapbox_clip_end=i.end/i.size}var d={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:u};null!==t.id&&(d.id=t.id),e.features.push(d)}}function we(e,t,n,r,i,o){var a=r*r;if(r>0&&t.size<(i?a:r))n.numPoints+=t.length/3;else{for(var s=[],l=0;l<t.length;l+=3)(0===r||t[l+2]>a)&&(n.numSimplified++,s.push(t[l]),s.push(t[l+1])),n.numPoints++;i&&function(e,t){for(var n=0,r=0,i=e.length,o=i-2;r<i;o=r,r+=2)n+=(e[r]-e[o])*(e[r+1]+e[o+1]);if(n>0===t)for(r=0,i=e.length;r<i/2;r+=2){var a=e[r],s=e[r+1];e[r]=e[i-2-r],e[r+1]=e[i-1-r],e[i-2-r]=a,e[i-1-r]=s}}(s,o),e.push(s)}}function Ae(e,t){var n=(t=this.options=function(e,t){for(var n in t)e[n]=t[n];return e}(Object.create(this.options),t)).debug;if(n&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var r=0;r<e.features.length;r++)ne(n,e.features[r],t,r);else"Feature"===e.type?ne(n,e,t):ne(n,{geometry:e},t);return n}(e,t);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(r=function(e,t){var n=t.buffer/t.extent,r=e,i=le(e,1,-1-n,n,0,-1,2,t),o=le(e,1,1-n,2+n,0,-1,2,t);return(i||o)&&(r=le(e,1,-n,1+n,0,-1,2,t)||[],i&&(r=me(i,1).concat(r)),o&&(r=r.concat(me(o,-1)))),r}(r,t)).length&&this.splitTile(r,0,0,0),n&&(r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function ke(e,t,n){return 32*((1<<e)*n+t)+e}function Te(e,t){var n=e.tileID.canonical;if(!this._geoJSONIndex)return t(null,null);var r=this._geoJSONIndex.getTile(n.z,n.x,n.y);if(!r)return t(null,null);var i=new m(r.features),o=x(i);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),t(null,{vectorTile:i,rawData:o.buffer})}V.prototype.load=function(e){var t=this.options,n=t.log,r=t.minZoom,i=t.maxZoom,o=t.nodeSize;n&&console.time("total time");var a="prepare "+e.length+" points";n&&console.time(a),this.points=e;for(var s=[],l=0;l<e.length;l++)e[l].geometry&&s.push(H(e[l],l));this.trees[i+1]=new j(s,Z,K,o,Float32Array),n&&console.timeEnd(a);for(var c=i;c>=r;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new j(s,Z,K,o,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return n&&console.timeEnd("total time"),this},V.prototype.getClusters=function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){var a=this.getClusters([n,r,180,o],t),s=this.getClusters([-180,r,i,o],t);return a.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,h=l.range(G(n),Y(o),G(i),Y(r));u<h.length;u+=1){var d=h[u],f=l.points[d];c.push(f.numPoints?$(f):this.points[f.index])}return c},V.prototype.getChildren=function(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);var o=i.points[t];if(!o)throw new Error(r);for(var a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],l=0,c=i.within(o.x,o.y,a);l<c.length;l+=1){var u=c[l],h=i.points[u];h.parentId===e&&s.push(h.numPoints?$(h):this.points[h.index])}if(0===s.length)throw new Error(r);return s},V.prototype.getLeaves=function(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r},V.prototype.getTile=function(e,t,n){var r=this.trees[this._limitZoom(e)],i=Math.pow(2,e),o=this.options,a=o.extent,s=o.radius/a,l=(n-s)/i,c=(n+1+s)/i,u={features:[]};return this._addTileFeatures(r.range((t-s)/i,l,(t+1+s)/i,c),r.points,t,n,i,u),0===t&&this._addTileFeatures(r.range(1-s/i,l,1,c),r.points,i,n,i,u),t===i-1&&this._addTileFeatures(r.range(0,l,s/i,c),r.points,-1,n,i,u),u.features.length?u:null},V.prototype.getClusterExpansionZoom=function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t},V.prototype._appendLeaves=function(e,t,n,r,i){for(var o=0,a=this.getChildren(t);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?i+l.point_count<=r?i+=l.point_count:i=this._appendLeaves(e,l.cluster_id,n,r,i):i<r?i++:e.push(s),e.length===n)break}return i},V.prototype._addTileFeatures=function(e,t,n,r,i,o){for(var a=0,s=e;a<s.length;a+=1){var l=t[s[a]],c=l.numPoints,u={type:1,geometry:[[Math.round(this.options.extent*(l.x*i-n)),Math.round(this.options.extent*(l.y*i-r))]],tags:c?W(l):this.points[l.index].properties},h=void 0;c?h=l.id:this.options.generateId?h=l.index:this.points[l.index].id&&(h=this.points[l.index].id),void 0!==h&&(u.id=h),o.features.push(u)}},V.prototype._limitZoom=function(e){return Math.max(this.options.minZoom,Math.min(e,this.options.maxZoom+1))},V.prototype._cluster=function(e,t){for(var n=[],r=this.options,i=r.radius,o=r.extent,a=r.reduce,s=i/(o*Math.pow(2,t)),l=0;l<e.length;l++){var c=e[l];if(!(c.zoom<=t)){c.zoom=t;for(var u=this.trees[t+1],h=u.within(c.x,c.y,s),d=c.numPoints||1,f=c.x*d,p=c.y*d,g=a&&d>1?this._map(c,!0):null,m=(l<<5)+(t+1)+this.points.length,v=0,y=h;v<y.length;v+=1){var b=y[v],_=u.points[b];if(!(_.zoom<=t)){_.zoom=t;var x=_.numPoints||1;f+=_.x*x,p+=_.y*x,d+=x,_.parentId=m,a&&(g||(g=this._map(c,!0)),a(g,this._map(_)))}}1===d?n.push(c):(c.parentId=m,n.push(q(f/d,p/d,m,d,g)))}}return n},V.prototype._getOriginId=function(e){return e-this.points.length>>5},V.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},V.prototype._map=function(e,t){if(e.numPoints)return t?X({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?X({},r):r},Ae.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ae.prototype.splitTile=function(e,t,n,r,i,o,a){for(var s=[e,t,n,r],l=this.options,c=l.debug;s.length;){r=s.pop(),n=s.pop(),t=s.pop(),e=s.pop();var u=1<<t,h=ke(t,n,r),d=this.tiles[h];if(!d&&(c>1&&console.time("creation"),d=this.tiles[h]=_e(e,t,n,r,l),this.tileCoords.push({z:t,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));var f="z"+t;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(d.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<<i-t;if(n!==Math.floor(o/p)||r!==Math.floor(a/p))continue}else if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue;if(d.source=null,0!==e.length){c>1&&console.time("clipping");var g,m,v,y,b,_,x=.5*l.buffer/l.extent,w=.5-x,A=.5+x,k=1+x;g=m=v=y=null,b=le(e,u,n-x,n+A,0,d.minX,d.maxX,l),_=le(e,u,n+w,n+k,0,d.minX,d.maxX,l),e=null,b&&(g=le(b,u,r-x,r+A,1,d.minY,d.maxY,l),m=le(b,u,r+w,r+k,1,d.minY,d.maxY,l),b=null),_&&(v=le(_,u,r-x,r+A,1,d.minY,d.maxY,l),y=le(_,u,r+w,r+k,1,d.minY,d.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(g||[],t+1,2*n,2*r),s.push(m||[],t+1,2*n,2*r+1),s.push(v||[],t+1,2*n+1,2*r),s.push(y||[],t+1,2*n+1,2*r+1)}}},Ae.prototype.getTile=function(e,t,n){var r=this.options,i=r.extent,o=r.debug;if(e<0||e>24)return null;var a=1<<e,s=ke(e,t=(t%a+a)%a,n);if(this.tiles[s])return ye(this.tiles[s],i);o>1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,c=e,u=t,h=n;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[ke(c,u,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,h),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,e,t,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ye(this.tiles[s],i):null):null};var Se=function(t){function n(e,n,r,i){t.call(this,e,n,r,Te),i&&(this.loadGeoJSON=i)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new e.RequestPerformance(r.request);this.loadGeoJSON(r,(function(o,a){if(o||!a)return n(o);if("object"!=typeof a)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));h(a,!0);try{t._geoJSONIndex=r.cluster?new V(function(t){var n=t.superclusterOptions,r=t.clusterProperties;if(!r||!n)return n;for(var i={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(r),c=0,u=l;c<u.length;c+=1){var h=u[c],d=r[h],f=d[0],p=d[1],g=e.createExpression(p),m=e.createExpression("string"==typeof f?[f,["accumulated"],["get",h]]:f);i[h]=g.value,o[h]=m.value}return n.map=function(e){s.properties=e;for(var t={},n=0,r=l;n<r.length;n+=1){var o=r[n];t[o]=i[o].evaluate(a,s)}return t},n.reduce=function(e,t){s.properties=t;for(var n=0,r=l;n<r.length;n+=1){var i=r[n];a.accumulated=e[i],e[i]=o[i].evaluate(a,s)}},n}(r)).load(a.features):function(e,t){return new Ae(e,t)}(a,r.geojsonVtOptions)}catch(o){return n(o)}t.loaded={};var s={};if(i){var l=i.finish();l&&(s.resourceTiming={},s.resourceTiming[r.source]=JSON.parse(JSON.stringify(l)))}n(null,s)}))}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(e,n){var r=this.loaded,i=e.uid;return r&&r[i]?t.prototype.reloadTile.call(this,e,n):this.loadTile(e,n)},n.prototype.loadGeoJSON=function(t,n){if(t.request)e.getJSON(t.request,n);else{if("string"!=typeof t.data)return n(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return n(null,JSON.parse(t.data))}catch(e){return n(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},n.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}},n.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}},n.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}},n}(l);var Ee=function(t){var n=this;this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:Se},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(e,t){if(n.workerSourceTypes[e])throw new Error('Worker source with name "'+e+'" already registered.');n.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=function(t){if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}};return Ee.prototype.setReferrer=function(e,t){this.referrer=t},Ee.prototype.setImages=function(e,t,n){for(var r in this.availableImages[e]=t,this.workerSources[e]){var i=this.workerSources[e][r];for(var o in i)i[o].availableImages=t}n()},Ee.prototype.setLayers=function(e,t,n){this.getLayerIndex(e).replace(t),n()},Ee.prototype.updateLayers=function(e,t,n){this.getLayerIndex(e).update(t.layers,t.removedIds),n()},Ee.prototype.loadTile=function(e,t,n){this.getWorkerSource(e,t.type,t.source).loadTile(t,n)},Ee.prototype.loadDEMTile=function(e,t,n){this.getDEMWorkerSource(e,t.source).loadTile(t,n)},Ee.prototype.reloadTile=function(e,t,n){this.getWorkerSource(e,t.type,t.source).reloadTile(t,n)},Ee.prototype.abortTile=function(e,t,n){this.getWorkerSource(e,t.type,t.source).abortTile(t,n)},Ee.prototype.removeTile=function(e,t,n){this.getWorkerSource(e,t.type,t.source).removeTile(t,n)},Ee.prototype.removeDEMTile=function(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t)},Ee.prototype.removeSource=function(e,t,n){if(this.workerSources[e]&&this.workerSources[e][t.type]&&this.workerSources[e][t.type][t.source]){var r=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==r.removeSource?r.removeSource(t,n):n()}},Ee.prototype.loadWorkerSource=function(e,t,n){try{this.self.importScripts(t.url),n()}catch(e){n(e.toString())}},Ee.prototype.syncRTLPluginState=function(t,n,r){try{e.plugin.setState(n);var i=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&null!=i){this.self.importScripts(i);var o=e.plugin.isParsed();r(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+i),o)}}catch(e){r(e.toString())}},Ee.prototype.getAvailableImages=function(e){var t=this.availableImages[e];return t||(t=[]),t},Ee.prototype.getLayerIndex=function(e){var t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new r),t},Ee.prototype.getWorkerSource=function(e,t,n){var r=this;if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][n]){var i={send:function(t,n,i){r.actor.send(t,n,i,e)}};this.workerSources[e][t][n]=new this.workerSourceTypes[t](i,this.getLayerIndex(e),this.getAvailableImages(e))}return this.workerSources[e][t][n]},Ee.prototype.getDEMWorkerSource=function(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new u),this.demWorkerSources[e][t]},Ee.prototype.enforceCacheSizeLimit=function(t,n){e.enforceCacheSizeLimit(n)},"undefined"!=typeof WorkerGlobalScope&&void 0!==e.window&&e.window instanceof WorkerGlobalScope&&(e.window.worker=new Ee(e.window)),Ee})),r(0,(function(e){var t=e.createCommonjsModule((function(e){function t(e){return!n(e)}function n(e){return"undefined"!=typeof window&&"undefined"!=typeof document?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var e,t,n=new Blob([""],{type:"text/javascript"}),r=URL.createObjectURL(n);try{t=new Worker(r),e=!0}catch(t){e=!1}return t&&t.terminate(),URL.revokeObjectURL(r),e}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var e=document.createElement("canvas");e.width=e.height=1;var t=e.getContext("2d");if(!t)return!1;var n=t.getImageData(0,0,1,1);return n&&n.width===e.width}()?(n=e&&e.failIfMajorPerformanceCaveat,void 0===r[n]&&(r[n]=function(e){var n=function(e){var n=document.createElement("canvas"),r=Object.create(t.webGLContextAttributes);return r.failIfMajorPerformanceCaveat=e,n.probablySupportsContext?n.probablySupportsContext("webgl",r)||n.probablySupportsContext("experimental-webgl",r):n.supportsContext?n.supportsContext("webgl",r)||n.supportsContext("experimental-webgl",r):n.getContext("webgl",r)||n.getContext("experimental-webgl",r)}(e);if(!n)return!1;var r=n.createShader(n.VERTEX_SHADER);return!(!r||n.isContextLost())&&(n.shaderSource(r,"void main() {}"),n.compileShader(r),!0===n.getShaderParameter(r,n.COMPILE_STATUS))}(n)),r[n]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support":"not a browser";var n}e.exports?e.exports=t:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=t,window.mapboxgl.notSupportedReason=n);var r={};t.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),n={create:function(t,n,r){var i=e.window.document.createElement(t);return void 0!==n&&(i.className=n),r&&r.appendChild(i),i},createNS:function(t,n){return e.window.document.createElementNS(t,n)}},r=e.window.document.documentElement.style;function i(e){if(!r)return e[0];for(var t=0;t<e.length;t++)if(e[t]in r)return e[t];return e[0]}var o,a=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);n.disableDrag=function(){r&&a&&(o=r[a],r[a]="none")},n.enableDrag=function(){r&&a&&(r[a]=o)};var s=i(["transform","WebkitTransform"]);n.setTransform=function(e,t){e.style[s]=t};var l=!1;try{var c=Object.defineProperty({},"passive",{get:function(){l=!0}});e.window.addEventListener("test",c,c),e.window.removeEventListener("test",c,c)}catch(e){l=!1}n.addEventListener=function(e,t,n,r){void 0===r&&(r={}),"passive"in r&&l?e.addEventListener(t,n,r):e.addEventListener(t,n,r.capture)},n.removeEventListener=function(e,t,n,r){void 0===r&&(r={}),"passive"in r&&l?e.removeEventListener(t,n,r):e.removeEventListener(t,n,r.capture)};var u=function(t){t.preventDefault(),t.stopPropagation(),e.window.removeEventListener("click",u,!0)};function h(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}n.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",u,!0)}),0)},n.mousePos=function(t,n){var r=t.getBoundingClientRect();return new e.Point(n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop)},n.touchPos=function(t,n){for(var r=t.getBoundingClientRect(),i=[],o=0;o<n.length;o++)i.push(new e.Point(n[o].clientX-r.left-t.clientLeft,n[o].clientY-r.top-t.clientTop));return i},n.mouseButton=function(t){return void 0!==e.window.InstallTrigger&&2===t.button&&t.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button},n.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var d=function(t){function n(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,n=this.requestors;t<n.length;t+=1){var r=n[t],i=r.ids,o=r.callback;this._notify(i,o)}this.requestors=[]}},n.prototype.getImage=function(e){return this.images[e]},n.prototype.addImage=function(e,t){this._validate(e,t)&&(this.images[e]=t)},n.prototype._validate=function(t,n){var r=!0;return this._validateStretch(n.stretchX,n.data&&n.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchX" value'))),r=!1),this._validateStretch(n.stretchY,n.data&&n.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+t+'" has invalid "stretchY" value'))),r=!1),this._validateContent(n.content,n)||(this.fire(new e.ErrorEvent(new Error('Image "'+t+'" has invalid "content" value'))),r=!1),r},n.prototype._validateStretch=function(e,t){if(!e)return!0;for(var n=0,r=0,i=e;r<i.length;r+=1){var o=i[r];if(o[0]<n||o[1]<o[0]||t<o[1])return!1;n=o[1]}return!0},n.prototype._validateContent=function(e,t){return!(e&&(4!==e.length||e[0]<0||t.data.width<e[0]||e[1]<0||t.data.height<e[1]||e[2]<0||t.data.width<e[2]||e[3]<0||t.data.height<e[3]||e[2]<e[0]||e[3]<e[1]))},n.prototype.updateImage=function(e,t){var n=this.images[e];t.version=n.version+1,this.images[e]=t,this.updatedImages[e]=!0},n.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},n.prototype.listImages=function(){return Object.keys(this.images)},n.prototype.getImages=function(e,t){var n=!0;if(!this.isLoaded())for(var r=0,i=e;r<i.length;r+=1){var o=i[r];this.images[o]||(n=!1)}this.isLoaded()||n?this._notify(e,t):this.requestors.push({ids:e,callback:t})},n.prototype._notify=function(t,n){for(var r={},i=0,o=t;i<o.length;i+=1){var a=o[i];this.images[a]||this.fire(new e.Event("styleimagemissing",{id:a}));var s=this.images[a];s?r[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:e.warnOnce('Image "'+a+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}n(null,r)},n.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},n.prototype.getPattern=function(t){var n=this.patterns[t],r=this.getImage(t);if(!r)return null;if(n&&n.position.version===r.version)return n.position;if(n)n.position.version=r.version;else{var i={w:r.data.width+2,h:r.data.height+2,x:0,y:0},o=new e.ImagePosition(i,r);this.patterns[t]={bin:i,position:o}}return this._updatePatternAtlas(),this.patterns[t].position},n.prototype.bind=function(t){var n=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(t,this.atlasImage,n.RGBA),this.atlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)},n.prototype._updatePatternAtlas=function(){var t=[];for(var n in this.patterns)t.push(this.patterns[n].bin);var r=e.potpack(t),i=r.w,o=r.h,a=this.atlasImage;for(var s in a.resize({width:i||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,c=l.x+1,u=l.y+1,h=this.images[s].data,d=h.width,f=h.height;e.RGBAImage.copy(h,a,{x:0,y:0},{x:c,y:u},{width:d,height:f}),e.RGBAImage.copy(h,a,{x:0,y:f-1},{x:c,y:u-1},{width:d,height:1}),e.RGBAImage.copy(h,a,{x:0,y:0},{x:c,y:u+f},{width:d,height:1}),e.RGBAImage.copy(h,a,{x:d-1,y:0},{x:c-1,y:u},{width:1,height:f}),e.RGBAImage.copy(h,a,{x:0,y:0},{x:c+d,y:u},{width:1,height:f})}this.dirty=!0},n.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},n.prototype.dispatchRenderCallbacks=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(!this.callbackDispatchedThisFrame[r]){this.callbackDispatchedThisFrame[r]=!0;var i=this.images[r];h(i)&&this.updateImage(r,i)}}},n}(e.Evented);var f=m,p=m,g=1e20;function m(e,t,n,r,i,o){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=o||"normal",this.radius=n||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function v(e,t,n,r,i,o,a){for(var s=0;s<t;s++){for(var l=0;l<n;l++)r[l]=e[l*t+s];for(y(r,i,o,a,n),l=0;l<n;l++)e[l*t+s]=i[l]}for(l=0;l<n;l++){for(s=0;s<t;s++)r[s]=e[l*t+s];for(y(r,i,o,a,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(i[s])}}function y(e,t,n,r,i){n[0]=0,r[0]=-g,r[1]=+g;for(var o=1,a=0;o<i;o++){for(var s=(e[o]+o*o-(e[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);s<=r[a];)a--,s=(e[o]+o*o-(e[n[a]]+n[a]*n[a]))/(2*o-2*n[a]);n[++a]=o,r[a]=s,r[a+1]=+g}for(o=0,a=0;o<i;o++){for(;r[a+1]<o;)a++;t[o]=(o-n[a])*(o-n[a])+e[n[a]]}}m.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),r=0;r<this.size*this.size;r++){var i=t.data[4*r+3]/255;this.gridOuter[r]=1===i?0:0===i?g:Math.pow(Math.max(0,.5-i),2),this.gridInner[r]=1===i?g:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),r=0;r<this.size*this.size;r++){var o=this.gridOuter[r]-this.gridInner[r];n[r]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return n},f.default=p;var b=function(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}};b.prototype.setURL=function(e){this.url=e},b.prototype.getGlyphs=function(t,n){var r=this,i=[];for(var o in t)for(var a=0,s=t[o];a<s.length;a+=1){var l=s[a];i.push({stack:o,id:l})}e.asyncAll(i,(function(e,t){var n=e.stack,i=e.id,o=r.entries[n];o||(o=r.entries[n]={glyphs:{},requests:{},ranges:{}});var a=o.glyphs[i];if(void 0===a){if(a=r._tinySDF(o,n,i))return o.glyphs[i]=a,void t(null,{stack:n,id:i,glyph:a});var s=Math.floor(i/256);if(256*s>65535)t(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])t(null,{stack:n,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],b.loadGlyphRange(n,s,r.url,r.requestManager,(function(e,t){if(t){for(var n in t)r._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=t[+n]);o.ranges[s]=!0}for(var i=0,a=l;i<a.length;i+=1)(0,a[i])(e,t);delete o.requests[s]}))),l.push((function(e,r){e?t(e):r&&t(null,{stack:n,id:i,glyph:r[i]||null})}))}}else t(null,{stack:n,id:i,glyph:a})}),(function(e,t){if(e)n(e);else if(t){for(var r={},i=0,o=t;i<o.length;i+=1){var a=o[i],s=a.stack,l=a.id,c=a.glyph;(r[s]||(r[s]={}))[l]=c&&{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}n(null,r)}}))},b.prototype._doesCharSupportLocalGlyph=function(t){return!!this.localIdeographFontFamily&&(e.isChar["CJK Unified Ideographs"](t)||e.isChar["Hangul Syllables"](t)||e.isChar.Hiragana(t)||e.isChar.Katakana(t))},b.prototype._tinySDF=function(t,n,r){var i=this.localIdeographFontFamily;if(i&&this._doesCharSupportLocalGlyph(r)){var o=t.tinySDF;if(!o){var a="400";/bold/i.test(n)?a="900":/medium/i.test(n)?a="500":/light/i.test(n)&&(a="200"),o=t.tinySDF=new b.TinySDF(24,3,8,.25,i,a)}return{id:r,bitmap:new e.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(r))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},b.loadGlyphRange=function(t,n,r,i,o){var a=256*n,s=a+255,l=i.transformRequest(i.normalizeGlyphsURL(r).replace("{fontstack}",t).replace("{range}",a+"-"+s),e.ResourceType.Glyphs);e.getArrayBuffer(l,(function(t,n){if(t)o(t);else if(n){for(var r={},i=0,a=e.parseGlyphPBF(n);i<a.length;i+=1){var s=a[i];r[s.id]=s}o(null,r)}}))},b.TinySDF=f;var _=function(){this.specification=e.styleSpec.light.position};_.prototype.possiblyEvaluate=function(t,n){return e.sphericalToCartesian(t.expression.evaluate(n))},_.prototype.interpolate=function(t,n,r){return{x:e.number(t.x,n.x,r),y:e.number(t.y,n.y,r),z:e.number(t.z,n.z,r)}};var x=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new _,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),w="-transition",A=function(t){function n(n){t.call(this),this._transitionable=new e.Transitionable(x),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.getLight=function(){return this._transitionable.serialize()},n.prototype.setLight=function(t,n){if(void 0===n&&(n={}),!this._validate(e.validateLight,t,n))for(var r in t){var i=t[r];e.endsWith(r,w)?this._transitionable.setTransition(r.slice(0,-w.length),i):this._transitionable.setValue(r,i)}},n.prototype.updateTransitions=function(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)},n.prototype.hasTransition=function(){return this._transitioning.hasTransition()},n.prototype.recalculate=function(e){this.properties=this._transitioning.possiblyEvaluate(e)},n.prototype._validate=function(t,n,r){return(!r||!1!==r.validate)&&e.emitValidationErrors(this,t.call(e.validateStyle,e.extend({value:n,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},n}(e.Evented),k=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};k.prototype.getDash=function(e,t){var n=e.join(",")+String(t);return this.dashEntry[n]||(this.dashEntry[n]=this.addDash(e,t)),this.dashEntry[n]},k.prototype.getDashRanges=function(e,t,n){var r=[],i=e.length%2==1?-e[e.length-1]*n:0,o=e[0]*n,a=!0;r.push({left:i,right:o,isDash:a,zeroLength:0===e[0]});for(var s=e[0],l=1;l<e.length;l++){a=!a;var c=e[l];i=s*n,o=(s+=c)*n,r.push({left:i,right:o,isDash:a,zeroLength:0===c})}return r},k.prototype.addRoundDash=function(e,t,n){for(var r=t/2,i=-n;i<=n;i++)for(var o=this.nextRow+n+i,a=this.width*o,s=0,l=e[s],c=0;c<this.width;c++){c/l.right>1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),d=Math.min(u,h),f=void 0,p=i/n*(r+1);if(l.isDash){var g=r-Math.abs(p);f=Math.sqrt(d*d+g*g)}else f=r-Math.sqrt(d*d+p*p);this.data[a+c]=Math.max(0,Math.min(255,f+128))}},k.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var n=e[t],r=e[t+1];n.zeroLength?e.splice(t,1):r&&r.isDash===n.isDash&&(r.left=n.left,e.splice(t,1))}var i=e[0],o=e[e.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,l=e[s],c=0;c<this.width;c++){c/l.right>1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),d=Math.min(u,h),f=l.isDash?d:-d;this.data[a+c]=Math.max(0,Math.min(255,f+128))}},k.prototype.addDash=function(t,n){var r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<t.length;a++)o+=t[a];if(0!==o){var s=this.width/o,l=this.getDashRanges(t,this.width,s);n?this.addRoundDash(l,s,r):this.addRegularDash(l)}var c={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:o};return this.nextRow+=i,this.dirty=!0,c},k.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))};var T=function t(n,r){this.workerPool=n,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var i=this.workerPool.acquire(this.id),o=0;o<i.length;o++){var a=i[o],s=new t.Actor(a,r,this.id);s.name="Worker "+o,this.actors.push(s)}};function S(t,n,r){var i=function(i,o){if(i)return r(i);if(o){var a=e.pick(e.extend(o,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map((function(e){return e.id}))),a.tiles=n.canonicalizeTileset(a,t.url),r(null,a)}};return t.url?e.getJSON(n.transformRequest(n.normalizeSourceURL(t.url),e.ResourceType.Source),i):e.browser.frame((function(){return i(null,t)}))}T.prototype.broadcast=function(t,n,r){r=r||function(){},e.asyncAll(this.actors,(function(e,r){e.send(t,n,r)}),r)},T.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},T.prototype.remove=function(){this.actors.forEach((function(e){e.remove()})),this.actors=[],this.workerPool.release(this.id)},T.Actor=e.Actor;var E=function(t,n,r){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=r||24};E.prototype.validateBounds=function(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]},E.prototype.contains=function(t){var n=Math.pow(2,t.z),r=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*n),i=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*n),o=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*n),a=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*n);return t.x>=r&&t.x<o&&t.y>=i&&t.y<a};var C=function(t){function n(n,r,i,o){if(t.call(this),this.id=n,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(r,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){var t=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=S(this._options,this.map._requestManager,(function(n,r){t._tileJSONRequest=null,t._loaded=!0,n?t.fire(new e.ErrorEvent(n)):r&&(e.extend(t,r),r.bounds&&(t.tileBounds=new E(r.bounds,t.minzoom,t.maxzoom)),e.postTurnstileEvent(r.tiles,t.map._requestManager._customAccessToken),e.postMapLoadEvent(r.tiles,t.map._getMapId(),t.map._requestManager._skuToken,t.map._requestManager._customAccessToken),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.hasTile=function(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return e.extend({},this._options)},n.prototype.loadTile=function(t,n){var r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme)),i={request:this.map._requestManager.transformRequest(r,e.ResourceType.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(r,i){return delete t.request,t.aborted?n(null):r&&404!==r.status?n(r):(i&&i.resourceTiming&&(t.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&t.setExpiryData(i),t.loadVectorData(i,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state?"loading"===t.state?t.reloadCallback=n:t.request=t.actor.send("reloadTile",i,o.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",i,o.bind(this)))},n.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id},void 0)},n.prototype.unloadTile=function(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id},void 0)},n.prototype.hasTransition=function(){return!1},n}(e.Evented),M=function(t){function n(n,r,i,o){t.call(this),this.id=n,this.dispatcher=i,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},r),e.extend(this,e.pick(r,["url","scheme","tileSize"]))}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){var t=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=S(this._options,this.map._requestManager,(function(n,r){t._tileJSONRequest=null,t._loaded=!0,n?t.fire(new e.ErrorEvent(n)):r&&(e.extend(t,r),r.bounds&&(t.tileBounds=new E(r.bounds,t.minzoom,t.maxzoom)),e.postTurnstileEvent(r.tiles),e.postMapLoadEvent(r.tiles,t.map._getMapId(),t.map._requestManager._skuToken),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},n.prototype.serialize=function(){return e.extend({},this._options)},n.prototype.hasTile=function(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)},n.prototype.loadTile=function(t,n){var r=this,i=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);t.request=e.getImage(this.map._requestManager.transformRequest(i,e.ResourceType.Tile),(function(i,o){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(i)t.state="errored",n(i);else if(o){r.map._refreshExpiredTiles&&t.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=r.map.painter.context,s=a.gl;t.texture=r.map.painter.getTileTexture(o.width),t.texture?t.texture.update(o,{useMipmap:!0}):(t.texture=new e.Texture(a,o,s.RGBA,{useMipmap:!0}),t.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),t.state="loaded",e.cacheEntryPossiblyAdded(r.dispatcher),n(null)}}))},n.prototype.abortTile=function(e,t){e.request&&(e.request.cancel(),delete e.request),t()},n.prototype.unloadTile=function(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()},n.prototype.hasTransition=function(){return!1},n}(e.Evented),O=function(t){function n(n,r,i,o){t.call(this,n,r,i,o),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox"}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},n.prototype.loadTile=function(t,n){var r=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function i(e,r){e&&(t.state="errored",n(e)),r&&(t.dem=r,t.needsHillshadePrepare=!0,t.state="loaded",n(null))}t.request=e.getImage(this.map._requestManager.transformRequest(r,e.ResourceType.Tile),function(r,o){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(r)t.state="errored",n(r);else if(o){this.map._refreshExpiredTiles&&t.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=e.window.ImageBitmap&&o instanceof e.window.ImageBitmap&&e.offscreenCanvasSupported()?o:e.browser.getImageData(o,1),s={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:a,encoding:this.encoding};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",s,i.bind(this)))}}.bind(this)),t.neighboringTiles=this._getNeighboringTiles(t.tileID)},n.prototype._getNeighboringTiles=function(t){var n=t.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?t.wrap-1:t.wrap,a=(n.x+1+r)%r,s=n.x+1===r?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1<r&&(l[new e.OverscaledTileID(t.overscaledZ,o,n.z,i,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,n.z,a,n.y+1).key]={backfilled:!1}),l},n.prototype.unloadTile=function(e){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&e.actor.send("removeDEMTile",{uid:e.uid,source:this.id})},n}(M),L=function(t){function n(n,r,i,o){t.call(this),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=i.getActor(),this.setEventedParent(o),this._data=r.data,this._options=e.extend({},r),this._collectResourceTiming=r.collectResourceTiming,this._resourceTiming=[],void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId;var a=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:(void 0!==r.buffer?r.buffer:128)*a,tolerance:(void 0!==r.tolerance?r.tolerance:.375)*a,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1},superclusterOptions:{maxZoom:void 0!==r.clusterMaxZoom?Math.min(r.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:e.EXTENT,radius:(r.clusterRadius||50)*a,log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties},r.workerOptions)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){var t=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(n){if(n)t.fire(new e.ErrorEvent(n));else{var r={dataType:"source",sourceDataType:"metadata"};t._collectResourceTiming&&t._resourceTiming&&t._resourceTiming.length>0&&(r.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",r))}}))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setData=function(t){var n=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)n.fire(new e.ErrorEvent(t));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new e.Event("data",r))}})),this},n.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},n.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},n.prototype.getClusterLeaves=function(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this},n.prototype._updateWorkerData=function(t){var n=this;this._loaded=!1;var r=e.extend({},this.workerOptions),i=this._data;"string"==typeof i?(r.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(i),this.actor.send(this.type+".loadData",r,(function(e,i){n._removed||i&&i.abandoned||(n._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[n.id]&&(n._resourceTiming=i.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),t(e))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(t,n){var r=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var o={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,o,(function(e,o){return delete t.request,t.unloadVectorData(),t.aborted?n(null):e?n(e):(t.loadVectorData(o,r.map.painter,"reloadTile"===i),n(null))}))},n.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},n.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(e.Evented),D=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),I=function(t){function n(e,n,r,i){t.call(this),this.id=e,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(t,n){var r=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,o){r._loaded=!0,i?r.fire(new e.ErrorEvent(i)):o&&(r.image=o,t&&(r.coordinates=t),n&&n(),r._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setCoordinates=function(t){var n=this;this.coordinates=t;var r=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0,s=t;a<s.length;a+=1){var l=s[a];n=Math.min(n,l.x),r=Math.min(r,l.y),i=Math.max(i,l.x),o=Math.max(o,l.y)}var c=i-n,u=o-r,h=Math.max(c,u),d=Math.max(0,Math.floor(-Math.log(h)/Math.LN2)),f=Math.pow(2,d);return new e.CanonicalTileID(d,Math.floor((n+i)/2*f),Math.floor((r+o)/2*f))}(r),this.minzoom=this.maxzoom=this.tileID.z;var i=r.map((function(e){return n.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.loadTile=function(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(e.Evented);var R=function(t){function n(e,n,r,i){t.call(this,e,n,r,i),this.roundZoom=!0,this.type="video",this.options=n}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){var t=this;this._loaded=!1;var n=this.options;this.urls=[];for(var r=0,i=n.urls;r<i.length;r+=1){var o=i[r];this.urls.push(this.map._requestManager.transformRequest(o,e.ResourceType.Source).url)}e.getVideo(this.urls,(function(n,r){t._loaded=!0,n?t.fire(new e.ErrorEvent(n)):r&&(t.video=r,t.video.loop=!0,t.video.addEventListener("playing",(function(){t.map.triggerRepaint()})),t.map&&t.video.play(),t._finishLoading())}))},n.prototype.pause=function(){this.video&&this.video.pause()},n.prototype.play=function(){this.video&&this.video.play()},n.prototype.seek=function(t){if(this.video){var n=this.video.seekable;t<n.start(0)||t>n.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=t}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[r];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(I),P=function(t){function n(n,r,i,o){t.call(this,n,r,i,o),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,D.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];e<t.length;e+=1){var n=t[e];if(isNaN(n)||n<=0)return!0}return!1},n}(I),N={vector:C,raster:M,"raster-dem":O,geojson:L,video:R,image:I,canvas:P};function z(t,n){var r=e.identity([]);return e.translate(r,r,[1,1,0]),e.scale(r,r,[.5*t.width,.5*t.height,1]),e.multiply(r,r,t.calculatePosMatrix(n.toUnwrapped()))}function F(e,t,n,r,i,o){var a=function(e,t,n){if(e)for(var r=0,i=e;r<i.length;r+=1){var o=t[i[r]];if(o&&o.source===n&&"fill-extrusion"===o.type)return!0}else for(var a in t){var s=t[a];if(s.source===n&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,t,e.id),s=o.maxPitchScaleFactor(),l=e.tilesIn(r,s,a);l.sort(B);for(var c=[],u=0,h=l;u<h.length;u+=1){var d=h[u];c.push({wrappedTileID:d.tileID.wrapped().key,queryResults:d.tile.queryRenderedFeatures(t,n,e._state,d.queryGeometry,d.cameraQueryGeometry,d.scale,i,o,s,z(e.transform,d.tileID))})}var f=function(e){for(var t={},n={},r=0,i=e;r<i.length;r+=1){var o=i[r],a=o.queryResults,s=o.wrappedTileID,l=n[s]=n[s]||{};for(var c in a)for(var u=a[c],h=l[c]=l[c]||{},d=t[c]=t[c]||[],f=0,p=u;f<p.length;f+=1){var g=p[f];h[g.featureIndex]||(h[g.featureIndex]=!0,d.push(g))}}return t}(c);for(var p in f)f[p].forEach((function(t){var n=t.feature,r=e.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=r}));return f}function B(e,t){var n=e.tileID,r=t.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}var j=function(e,t){this.max=e,this.onRemove=t,this.reset()};j.prototype.reset=function(){for(var e in this.data)for(var t=0,n=this.data[e];t<n.length;t+=1){var r=n[t];r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value)}return this.data={},this.order=[],this},j.prototype.add=function(e,t,n){var r=this,i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var o={value:t,timeout:void 0};if(void 0!==n&&(o.timeout=setTimeout((function(){r.remove(e,o)}),n)),this.data[i].push(o),this.order.push(i),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},j.prototype.has=function(e){return e.wrapped().key in this.data},j.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},j.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},j.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},j.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},j.prototype.remove=function(e,t){if(!this.has(e))return this;var n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this},j.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},j.prototype.filter=function(e){var t=[];for(var n in this.data)for(var r=0,i=this.data[n];r<i.length;r+=1){var o=i[r];e(o.value)||t.push(o)}for(var a=0,s=t;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}};var U=function(e,t,n){this.context=e;var r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};U.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},U.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},U.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},q=function(e,t,n,r){this.length=t.length,this.attributes=n,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;var i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};q.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},q.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},q.prototype.enableAttributes=function(e,t){for(var n=0;n<this.attributes.length;n++){var r=this.attributes[n],i=t.attributes[r.name];void 0!==i&&e.enableVertexAttribArray(i)}},q.prototype.setVertexAttribPointers=function(e,t,n){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],o=t.attributes[i.name];void 0!==o&&e.vertexAttribPointer(o,i.components,e[V[i.type]],!1,this.itemSize,i.offset+this.itemSize*(n||0))}},q.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var H=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};H.prototype.get=function(){return this.current},H.prototype.set=function(e){},H.prototype.getDefault=function(){return this.default},H.prototype.setDefault=function(){this.set(this.default)};var $=function(t){function n(){t.apply(this,arguments)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return e.Color.transparent},n.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},n}(H),W=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(H),G=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(H),Y=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(H),X=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(H),Z=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(H),K=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(H),J=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(H),Q=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(H),ee=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(H),te=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(H),ne=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.LESS},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},t}(H),re=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}},t}(H),ie=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[e.ONE,e.ZERO]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},t}(H),oe=function(t){function n(){t.apply(this,arguments)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.getDefault=function(){return e.Color.transparent},n.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},n}(H),ae=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.FUNC_ADD},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},t}(H),se=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}},t}(H),le=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(H),ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(H),ue=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(H),he=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(H),de=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(H),fe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(H),pe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(H),ge=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(H),me=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(H),ve=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(H),ye=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(H),be=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(H),_e=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(H),xe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(H),we=function(e){function t(t,n){e.call(this,t),this.context=t,this.parent=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(H),Ae=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(we),ke=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(we),Te=function(e,t,n,r){this.context=e,this.width=t,this.height=n;var i=e.gl,o=this.framebuffer=i.createFramebuffer();this.colorAttachment=new Ae(e,o),r&&(this.depthAttachment=new ke(e,o))};Te.prototype.destroy=function(){var e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){var n=this.depthAttachment.get();n&&e.deleteRenderbuffer(n)}e.deleteFramebuffer(this.framebuffer)};var Se=function(e,t,n){this.func=e,this.mask=t,this.range=n};Se.ReadOnly=!1,Se.ReadWrite=!0,Se.disabled=new Se(519,Se.ReadOnly,[0,1]);var Ee=7680,Ce=function(e,t,n,r,i,o){this.test=e,this.ref=t,this.mask=n,this.fail=r,this.depthFail=i,this.pass=o};Ce.disabled=new Ce({func:519,mask:0},0,0,Ee,Ee,Ee);var Me=function(e,t,n){this.blendFunction=e,this.blendColor=t,this.mask=n};Me.disabled=new Me(Me.Replace=[1,0],e.Color.transparent,[!1,!1,!1,!1]),Me.unblended=new Me(Me.Replace,e.Color.transparent,[!0,!0,!0,!0]),Me.alphaBlended=new Me([1,771],e.Color.transparent,[!0,!0,!0,!0]);var Oe=function(e,t,n){this.enable=e,this.mode=t,this.frontFace=n};Oe.disabled=new Oe(!1,1029,2305),Oe.backCCW=new Oe(!0,1029,2305);var Le=function(e){this.gl=e,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new $(this),this.clearDepth=new W(this),this.clearStencil=new G(this),this.colorMask=new Y(this),this.depthMask=new X(this),this.stencilMask=new Z(this),this.stencilFunc=new K(this),this.stencilOp=new J(this),this.stencilTest=new Q(this),this.depthRange=new ee(this),this.depthTest=new te(this),this.depthFunc=new ne(this),this.blend=new re(this),this.blendFunc=new ie(this),this.blendColor=new oe(this),this.blendEquation=new ae(this),this.cullFace=new se(this),this.cullFaceSide=new le(this),this.frontFace=new ce(this),this.program=new ue(this),this.activeTexture=new he(this),this.viewport=new de(this),this.bindFramebuffer=new fe(this),this.bindRenderbuffer=new pe(this),this.bindTexture=new ge(this),this.bindVertexBuffer=new me(this),this.bindElementBuffer=new ve(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ye(this),this.pixelStoreUnpack=new be(this),this.pixelStoreUnpackPremultiplyAlpha=new _e(this),this.pixelStoreUnpackFlipY=new xe(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=e.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(e.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=e.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=e.getExtension("EXT_disjoint_timer_query")};Le.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Le.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Le.prototype.createIndexBuffer=function(e,t){return new U(this,e,t)},Le.prototype.createVertexBuffer=function(e,t,n){return new q(this,e,t,n)},Le.prototype.createRenderbuffer=function(e,t,n){var r=this.gl,i=r.createRenderbuffer();return this.bindRenderbuffer.set(i),r.renderbufferStorage(r.RENDERBUFFER,e,t,n),this.bindRenderbuffer.set(null),i},Le.prototype.createFramebuffer=function(e,t,n){return new Te(this,e,t,n)},Le.prototype.clear=function(e){var t=e.color,n=e.depth,r=this.gl,i=0;t&&(i|=r.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==n&&(i|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(n),this.depthMask.set(!0)),r.clear(i)},Le.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},Le.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},Le.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},Le.prototype.setColorMode=function(t){e.deepEqual(t.blendFunction,Me.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)},Le.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var De=function(t){function n(n,r,i){var o=this;t.call(this),this.id=n,this.dispatcher=i,this.on("data",(function(e){"source"===e.dataType&&"metadata"===e.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))})),this.on("error",(function(){o._sourceErrored=!0})),this._source=function(t,n,r,i){var o=new N[n.type](t,n,r,i);if(o.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+o.id);return e.bindAll(["load","abort","unload","serialize","prepare"],o),o}(n,r,i,this),this._tiles={},this._cache=new j(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new e.SourceFeatureState}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(e)},n.prototype.onRemove=function(e){this._source&&this._source.onRemove&&this._source.onRemove(e)},n.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var e in this._tiles){var t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0},n.prototype.getSource=function(){return this._source},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){if(this._paused){var e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform)}},n.prototype._loadTile=function(e,t){return this._source.loadTile(e,t)},n.prototype._unloadTile=function(e){if(this._source.unloadTile)return this._source.unloadTile(e,(function(){}))},n.prototype._abortTile=function(e){if(this._source.abortTile)return this._source.abortTile(e,(function(){}))},n.prototype.serialize=function(){return this._source.serialize()},n.prototype.prepare=function(e){for(var t in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var n=this._tiles[t];n.upload(e),n.prepare(this.map.style.imageManager)}},n.prototype.getIds=function(){return e.values(this._tiles).map((function(e){return e.tileID})).sort(Ie).map((function(e){return e.key}))},n.prototype.getRenderableIds=function(t){var n=this,r=[];for(var i in this._tiles)this._isIdRenderable(i,t)&&r.push(this._tiles[i]);return t?r.sort((function(t,r){var i=t.tileID,o=r.tileID,a=new e.Point(i.canonical.x,i.canonical.y)._rotate(n.transform.angle),s=new e.Point(o.canonical.x,o.canonical.y)._rotate(n.transform.angle);return i.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})).map((function(e){return e.tileID.key})):r.map((function(e){return e.tileID})).sort(Ie).map((function(e){return e.key}))},n.prototype.hasRenderableParent=function(e){var t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)},n.prototype._isIdRenderable=function(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())},n.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var e in this._cache.reset(),this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")},n.prototype._reloadTile=function(e,t){var n=this._tiles[e];n&&("loading"!==n.state&&(n.state=t),this._loadTile(n,this._tileLoaded.bind(this,n,e,t)))},n.prototype._tileLoaded=function(t,n,r,i){if(i)return t.state="errored",void(404!==i.status?this._source.fire(new e.ErrorEvent(i,{tile:t})):this.update(this.transform));t.timeAdded=e.browser.now(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),this._source.fire(new e.Event("data",{dataType:"source",tile:t,coord:t.tileID}))},n.prototype._backfillDEM=function(e){for(var t=this.getRenderableIds(),n=0;n<t.length;n++){var r=t[n];if(e.neighboringTiles&&e.neighboringTiles[r]){var i=this.getTileByID(r);o(e,i),o(i,e)}}function o(e,t){e.needsHillshadePrepare=!0;var n=t.tileID.canonical.x-e.tileID.canonical.x,r=t.tileID.canonical.y-e.tileID.canonical.y,i=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===n&&0===r||Math.abs(r)>1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}},n.prototype.getTile=function(e){return this.getTileByID(e.key)},n.prototype.getTileByID=function(e){return this._tiles[e]},n.prototype._retainLoadedChildren=function(e,t,n,r){for(var i in this._tiles){var o=this._tiles[i];if(!(r[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>n)){for(var a=o.tileID;o&&o.tileID.overscaledZ>t+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){r[a.key]=a;break}}}},n.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(var r=e.overscaledZ-1;r>=t;r--){var i=e.scaledTo(r),o=this._getLoadedTile(i);if(o)return o}},n.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},n.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),n=Math.floor(5*t),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(r)},n.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,n=Math.round(t);if(this._prevLng=e,n){var r={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+n),r[o.tileID.key]=o}for(var a in this._tiles=r,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},n.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(e){return r._source.hasTile(e)})))):i=[];var o=t.coveringZoomLevel(this._source),a=Math.max(o-n.maxOverzooming,this._source.minzoom),s=Math.max(o+n.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(Re(this._source.type)){for(var c={},u={},h=0,d=Object.keys(l);h<d.length;h+=1){var f=d[h],p=l[f],g=this._tiles[f];if(g&&!(g.fadeEndTime&&g.fadeEndTime<=e.browser.now())){var m=this.findLoadedParent(p,a);m&&(this._addTile(m.tileID),c[m.tileID.key]=m.tileID),u[f]=p}}for(var v in this._retainLoadedChildren(u,o,s,l),c)l[v]||(this._coveredTiles[v]=!0,l[v]=c[v])}for(var y in l)this._tiles[y].clearFadeHold();for(var b=0,_=e.keysDifference(this._tiles,l);b<_.length;b+=1){var x=_[b],w=this._tiles[x];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(x)}this._updateLoadedParentTileCache()}},n.prototype.releaseSymbolFadeTiles=function(){for(var e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)},n.prototype._updateRetainedTiles=function(e,t){for(var r={},i={},o=Math.max(t-n.maxOverzooming,this._source.minzoom),a=Math.max(t+n.maxUnderzooming,this._source.minzoom),s={},l=0,c=e;l<c.length;l+=1){var u=c[l],h=this._addTile(u);r[u.key]=u,h.hasData()||t<this._source.maxzoom&&(s[u.key]=u)}this._retainLoadedChildren(s,t,a,r);for(var d=0,f=e;d<f.length;d+=1){var p=f[d],g=this._tiles[p.key];if(!g.hasData()){if(t+1>this._source.maxzoom){var m=p.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){r[m.key]=m;continue}}else{var y=p.children(this._source.maxzoom);if(r[y[0].key]&&r[y[1].key]&&r[y[2].key]&&r[y[3].key])continue}for(var b=g.wasRequested(),_=p.overscaledZ-1;_>=o;--_){var x=p.scaledTo(_);if(i[x.key])break;if(i[x.key]=!0,!(g=this.getTile(x))&&b&&(g=this._addTile(x)),g&&(r[x.key]=x,b=g.wasRequested(),g.hasData()))break}}}return r},n.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],n=void 0,r=this._tiles[e].tileID;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}t.push(r.key);var i=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(i))break;r=i}for(var o=0,a=t;o<a.length;o+=1){var s=a[o];this._loadedParentTiles[s]=n}}},n.prototype._addTile=function(t){var n=this._tiles[t.key];if(n)return n;(n=this._cache.getAndRemove(t))&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));var r=Boolean(n);return r||(n=new e.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n?(n.uses++,this._tiles[t.key]=n,r||this._source.fire(new e.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=function(e,t){var n=this;e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);var r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout((function(){n._reloadTile(e,"expired"),delete n._timers[e]}),r))},n.prototype._removeTile=function(e){var t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},n.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},n.prototype.tilesIn=function(t,n,r){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=r?a.getCameraQueryGeometry(t):t,l=t.map((function(e){return a.pointCoordinate(e)})),c=s.map((function(e){return a.pointCoordinate(e)})),u=this.getIds(),h=1/0,d=1/0,f=-1/0,p=-1/0,g=0,m=c;g<m.length;g+=1){var v=m[g];h=Math.min(h,v.x),d=Math.min(d,v.y),f=Math.max(f,v.x),p=Math.max(p,v.y)}for(var y=function(t){var r=i._tiles[u[t]];if(!r.holdingForFade()){var s=r.tileID,g=Math.pow(2,a.zoom-r.tileID.overscaledZ),m=n*r.queryPadding*e.EXTENT/r.tileSize/g,v=[s.getTilePoint(new e.MercatorCoordinate(h,d)),s.getTilePoint(new e.MercatorCoordinate(f,p))];if(v[0].x-m<e.EXTENT&&v[0].y-m<e.EXTENT&&v[1].x+m>=0&&v[1].y+m>=0){var y=l.map((function(e){return s.getTilePoint(e)})),b=c.map((function(e){return s.getTilePoint(e)}));o.push({tile:r,tileID:s,queryGeometry:y,cameraQueryGeometry:b,scale:g})}}},b=0;b<u.length;b++)y(b);return o},n.prototype.getVisibleCoordinates=function(e){for(var t=this,n=this.getRenderableIds(e).map((function(e){return t._tiles[e].tileID})),r=0,i=n;r<i.length;r+=1){var o=i[r];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return n},n.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Re(this._source.type))for(var t in this._tiles){var n=this._tiles[t];if(void 0!==n.fadeEndTime&&n.fadeEndTime>=e.browser.now())return!0}return!1},n.prototype.setFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.updateState(e,t,n)},n.prototype.removeFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,n)},n.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},n.prototype.setDependencies=function(e,t,n){var r=this._tiles[e];r&&r.setDependencies(t,n)},n.prototype.reloadTilesForDependencies=function(e,t){for(var n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(e,t)}))},n}(e.Evented);function Ie(e,t){var n=Math.abs(2*e.wrap)-+(e.wrap<0),r=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Re(e){return"raster"===e||"image"===e||"video"===e}function Pe(){return new e.window.Worker(eo.workerUrl)}De.maxOverzooming=10,De.maxUnderzooming=3;var Ne="mapboxgl_preloaded_worker_pool",ze=function(){this.active={}};ze.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<ze.workerCount;)this.workers.push(new Pe);return this.active[e]=!0,this.workers.slice()},ze.prototype.release=function(e){delete this.active[e],0===this.numActive()&&(this.workers.forEach((function(e){e.terminate()})),this.workers=null)},ze.prototype.isPreloaded=function(){return!!this.active[Ne]},ze.prototype.numActive=function(){return Object.keys(this.active).length};var Fe,Be=Math.floor(e.browser.hardwareConcurrency/2);function je(){return Fe||(Fe=new ze),Fe}function Ue(t,n){var r={};for(var i in t)"ref"!==i&&(r[i]=t[i]);return e.refProperties.forEach((function(e){e in n&&(r[e]=n[e])})),r}function Ve(e){e=e.slice();for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].id]=e[n];for(var r=0;r<e.length;r++)"ref"in e[r]&&(e[r]=Ue(e[r],t[e[r].ref]));return e}ze.workerCount=Math.max(Math.min(Be,6),1);var qe={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function He(e,t,n){n.push({command:qe.addSource,args:[e,t[e]]})}function $e(e,t,n){t.push({command:qe.removeSource,args:[e]}),n[e]=!0}function We(e,t,n,r){$e(e,n,r),He(e,t,n)}function Ge(t,n,r){var i;for(i in t[r])if(t[r].hasOwnProperty(i)&&"data"!==i&&!e.deepEqual(t[r][i],n[r][i]))return!1;for(i in n[r])if(n[r].hasOwnProperty(i)&&"data"!==i&&!e.deepEqual(t[r][i],n[r][i]))return!1;return!0}function Ye(t,n,r,i,o,a){var s;for(s in n=n||{},t=t||{})t.hasOwnProperty(s)&&(e.deepEqual(t[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}));for(s in n)n.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(e.deepEqual(t[s],n[s])||r.push({command:a,args:[i,s,n[s],o]}))}function Xe(e){return e.id}function Ze(e,t){return e[t.id]=t,e}function Ke(t,n){if(!t)return[{command:qe.setStyle,args:[n]}];var r=[];try{if(!e.deepEqual(t.version,n.version))return[{command:qe.setStyle,args:[n]}];e.deepEqual(t.center,n.center)||r.push({command:qe.setCenter,args:[n.center]}),e.deepEqual(t.zoom,n.zoom)||r.push({command:qe.setZoom,args:[n.zoom]}),e.deepEqual(t.bearing,n.bearing)||r.push({command:qe.setBearing,args:[n.bearing]}),e.deepEqual(t.pitch,n.pitch)||r.push({command:qe.setPitch,args:[n.pitch]}),e.deepEqual(t.sprite,n.sprite)||r.push({command:qe.setSprite,args:[n.sprite]}),e.deepEqual(t.glyphs,n.glyphs)||r.push({command:qe.setGlyphs,args:[n.glyphs]}),e.deepEqual(t.transition,n.transition)||r.push({command:qe.setTransition,args:[n.transition]}),e.deepEqual(t.light,n.light)||r.push({command:qe.setLight,args:[n.light]});var i={},o=[];!function(t,n,r,i){var o;for(o in n=n||{},t=t||{})t.hasOwnProperty(o)&&(n.hasOwnProperty(o)||$e(o,r,i));for(o in n)n.hasOwnProperty(o)&&(t.hasOwnProperty(o)?e.deepEqual(t[o],n[o])||("geojson"===t[o].type&&"geojson"===n[o].type&&Ge(t,n,o)?r.push({command:qe.setGeoJSONSourceData,args:[o,n[o].data]}):We(o,n,r,i)):He(o,n,r))}(t.sources,n.sources,o,i);var a=[];t.layers&&t.layers.forEach((function(e){i[e.source]?r.push({command:qe.removeLayer,args:[e.id]}):a.push(e)})),r=r.concat(o),function(t,n,r){n=n||[];var i,o,a,s,l,c,u,h=(t=t||[]).map(Xe),d=n.map(Xe),f=t.reduce(Ze,{}),p=n.reduce(Ze,{}),g=h.slice(),m=Object.create(null);for(i=0,o=0;i<h.length;i++)a=h[i],p.hasOwnProperty(a)?o++:(r.push({command:qe.removeLayer,args:[a]}),g.splice(g.indexOf(a,o),1));for(i=0,o=0;i<d.length;i++)a=d[d.length-1-i],g[g.length-1-i]!==a&&(f.hasOwnProperty(a)?(r.push({command:qe.removeLayer,args:[a]}),g.splice(g.lastIndexOf(a,g.length-o),1)):o++,c=g[g.length-i],r.push({command:qe.addLayer,args:[p[a],c]}),g.splice(g.length-i,0,a),m[a]=!0);for(i=0;i<d.length;i++)if(s=f[a=d[i]],l=p[a],!m[a]&&!e.deepEqual(s,l))if(e.deepEqual(s.source,l.source)&&e.deepEqual(s["source-layer"],l["source-layer"])&&e.deepEqual(s.type,l.type)){for(u in Ye(s.layout,l.layout,r,a,null,qe.setLayoutProperty),Ye(s.paint,l.paint,r,a,null,qe.setPaintProperty),e.deepEqual(s.filter,l.filter)||r.push({command:qe.setFilter,args:[a,l.filter]}),e.deepEqual(s.minzoom,l.minzoom)&&e.deepEqual(s.maxzoom,l.maxzoom)||r.push({command:qe.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&&"layout"!==u&&"paint"!==u&&"filter"!==u&&"metadata"!==u&&"minzoom"!==u&&"maxzoom"!==u&&(0===u.indexOf("paint.")?Ye(s[u],l[u],r,a,u.slice(6),qe.setPaintProperty):e.deepEqual(s[u],l[u])||r.push({command:qe.setLayerProperty,args:[a,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&"layout"!==u&&"paint"!==u&&"filter"!==u&&"metadata"!==u&&"minzoom"!==u&&"maxzoom"!==u&&(0===u.indexOf("paint.")?Ye(s[u],l[u],r,a,u.slice(6),qe.setPaintProperty):e.deepEqual(s[u],l[u])||r.push({command:qe.setLayerProperty,args:[a,u,l[u]]}))}else r.push({command:qe.removeLayer,args:[a]}),c=g[g.lastIndexOf(a)+1],r.push({command:qe.addLayer,args:[l,c]})}(a,n.layers,r)}catch(e){console.warn("Unable to compute style diff:",e),r=[{command:qe.setStyle,args:[n]}]}return r}var Je=function(e,t){this.reset(e,t)};Je.prototype.reset=function(e,t){this.points=e||[],this._distances=[0];for(var n=1;n<this.points.length;n++)this._distances[n]=this._distances[n-1]+this.points[n].dist(this.points[n-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Je.prototype.lerp=function(t){if(1===this.points.length)return this.points[0];t=e.clamp(t,0,1);for(var n=1,r=this._distances[n],i=t*this.paddedLength+this.padding;r<i&&n<this._distances.length;)r=this._distances[++n];var o=n-1,a=this._distances[o],s=r-a,l=s>0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))};var Qe=function(e,t,n){var r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(var o=0;o<this.xCellCount*this.yCellCount;o++)r.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0};function et(t,n,r,i,o){var a=e.create();return n?(e.scale(a,a,[1/o,1/o,1]),r||e.rotateZ(a,a,i.angle)):e.multiply(a,i.labelPlaneMatrix,t),a}function tt(t,n,r,i,o){if(n){var a=e.clone(t);return e.scale(a,a,[o,o,1]),r||e.rotateZ(a,a,-i.angle),a}return i.glCoordMatrix}function nt(t,n){var r=[t.x,t.y,0,1];ft(r,r,n);var i=r[3];return{point:new e.Point(r[0]/i,r[1]/i),signedDistanceFromCamera:i}}function rt(e,t){return.5+e/t*.5}function it(e,t){var n=e[0]/e[3],r=e[1]/e[3];return n>=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function ot(t,n,r,i,o,a,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,r.transform.zoom),h=[256/r.width*2+1,256/r.height*2+1],d=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;d.clear();for(var f=t.lineVertexArray,p=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,g=r.transform.width/r.transform.height,m=!1,v=0;v<p.length;v++){var y=p.get(v);if(y.hidden||y.writingMode===e.WritingMode.vertical&&!m)dt(y.numGlyphs,d);else{m=!1;var b=[y.anchorX,y.anchorY,0,1];if(e.transformMat4(b,b,n),it(b,h)){var _=b[3],x=rt(r.transform.cameraToCenterDistance,_),w=e.evaluateSizeForFeature(c,u,y),A=s?w/x:w*x,k=new e.Point(y.anchorX,y.anchorY),T=nt(k,o).point,S={},E=lt(y,A,!1,l,n,o,a,t.glyphOffsetArray,f,d,T,k,S,g);m=E.useVertical,(E.notEnoughRoom||m||E.needsFlipping&&lt(y,A,!0,l,n,o,a,t.glyphOffsetArray,f,d,T,k,S,g).notEnoughRoom)&&dt(y.numGlyphs,d)}else dt(y.numGlyphs,d)}}i?t.text.dynamicLayoutVertexBuffer.updateData(d):t.icon.dynamicLayoutVertexBuffer.updateData(d)}function at(e,t,n,r,i,o,a,s,l,c,u){var h=s.glyphStartIndex+s.numGlyphs,d=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,p=t.getoffsetX(s.glyphStartIndex),g=t.getoffsetX(h-1),m=ut(e*p,n,r,i,o,a,s.segment,d,f,l,c,u);if(!m)return null;var v=ut(e*g,n,r,i,o,a,s.segment,d,f,l,c,u);return v?{first:m,last:v}:null}function st(t,n,r,i){return t===e.WritingMode.horizontal&&Math.abs(r.y-n.y)>Math.abs(r.x-n.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?n.y<r.y:n.x>r.x)?{needsFlipping:!0}:null}function lt(t,n,r,i,o,a,s,l,c,u,h,d,f,p){var g,m=n/24,v=t.lineOffsetX*m,y=t.lineOffsetY*m;if(t.numGlyphs>1){var b=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,w=at(m,l,v,y,r,h,d,t,c,a,f);if(!w)return{notEnoughRoom:!0};var A=nt(w.first.point,s).point,k=nt(w.last.point,s).point;if(i&&!r){var T=st(t.writingMode,A,k,p);if(T)return T}g=[w.first];for(var S=t.glyphStartIndex+1;S<b-1;S++)g.push(ut(m*l.getoffsetX(S),v,y,r,h,d,t.segment,_,x,c,a,f));g.push(w.last)}else{if(i&&!r){var E=nt(d,o).point,C=t.lineStartIndex+t.segment+1,M=new e.Point(c.getx(C),c.gety(C)),O=nt(M,o),L=O.signedDistanceFromCamera>0?O.point:ct(d,M,E,1,o),D=st(t.writingMode,E,L,p);if(D)return D}var I=ut(m*l.getoffsetX(t.glyphStartIndex),v,y,r,h,d,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,a,f);if(!I)return{notEnoughRoom:!0};g=[I]}for(var R=0,P=g;R<P.length;R+=1){var N=P[R];e.addDynamicAttributes(u,N.point,N.angle)}return{}}function ct(e,t,n,r,i){var o=nt(e.add(e.sub(t)._unit()),i).point,a=n.sub(o);return n.add(a._mult(r/a.mag()))}function ut(t,n,r,i,o,a,s,l,c,u,h,d){var f=i?t-n:t+n,p=f>0?1:-1,g=0;i&&(p*=-1,g=Math.PI),p<0&&(g+=Math.PI);for(var m=p>0?l+s:l+s+1,v=o,y=o,b=0,_=0,x=Math.abs(f),w=[];b+_<=x;){if((m+=p)<l||m>=c)return null;if(y=v,w.push(v),void 0===(v=d[m])){var A=new e.Point(u.getx(m),u.gety(m)),k=nt(A,h);if(k.signedDistanceFromCamera>0)v=d[m]=k.point;else{var T=m-p;v=ct(0===b?a:new e.Point(u.getx(T),u.gety(T)),A,y,x-b+1,h)}}b+=_,_=y.dist(v)}var S=(x-b)/_,E=v.sub(y),C=E.mult(S)._add(y);C._add(E._unit()._perp()._mult(r*p));var M=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(C),{point:C,angle:M,path:w}}Qe.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Qe.prototype.insert=function(e,t,n,r,i){this._forEachCell(t,n,r,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(i)},Qe.prototype.insertCircle=function(e,t,n,r){this._forEachCell(t-r,n-r,t+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(r)},Qe.prototype._insertBoxCell=function(e,t,n,r,i,o){this.boxCells[i].push(o)},Qe.prototype._insertCircleCell=function(e,t,n,r,i,o){this.circleCells[i].push(o)},Qe.prototype._query=function(e,t,n,r,i,o){if(n<0||e>this.width||r<0||t>this.height)return!i&&[];var a=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var c=this.circles[3*l],u=this.circles[3*l+1],h=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:c-h,y1:u-h,x2:c+h,y2:u+h})}return o?a.filter(o):a}var d={hitTest:i,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,n,r,this._queryCell,a,d,o),i?a.length>0:a},Qe.prototype._queryCircle=function(e,t,n,r,i){var o=e-n,a=e+n,s=t-n,l=t+n;if(a<0||o>this.width||l<0||s>this.height)return!r&&[];var c=[],u={hitTest:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,c,u,i),r?c.length>0:c},Qe.prototype.query=function(e,t,n,r,i){return this._query(e,t,n,r,!1,i)},Qe.prototype.hitTest=function(e,t,n,r,i){return this._query(e,t,n,r,!0,i)},Qe.prototype.hitTestCircle=function(e,t,n,r){return this._queryCircle(e,t,n,!0,r)},Qe.prototype._queryCell=function(e,t,n,r,i,o,a,s){var l=a.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,h=0,d=c;h<d.length;h+=1){var f=d[h];if(!l.box[f]){l.box[f]=!0;var p=4*f;if(e<=u[p+2]&&t<=u[p+3]&&n>=u[p+0]&&r>=u[p+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:u[p],y1:u[p+1],x2:u[p+2],y2:u[p+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;v<y.length;v+=1){var b=y[v];if(!l.circle[b]){l.circle[b]=!0;var _=3*b;if(this._circleAndRectCollide(m[_],m[_+1],m[_+2],e,t,n,r)&&(!s||s(this.circleKeys[b]))){if(a.hitTest)return o.push(!0),!0;var x=m[_],w=m[_+1],A=m[_+2];o.push({key:this.circleKeys[b],x1:x-A,y1:w-A,x2:x+A,y2:w+A})}}}},Qe.prototype._queryCellCircle=function(e,t,n,r,i,o,a,s){var l=a.circle,c=a.seenUids,u=this.boxCells[i];if(null!==u)for(var h=this.bboxes,d=0,f=u;d<f.length;d+=1){var p=f[d];if(!c.box[p]){c.box[p]=!0;var g=4*p;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[g+0],h[g+1],h[g+2],h[g+3])&&(!s||s(this.boxKeys[p])))return o.push(!0),!0}}var m=this.circleCells[i];if(null!==m)for(var v=this.circles,y=0,b=m;y<b.length;y+=1){var _=b[y];if(!c.circle[_]){c.circle[_]=!0;var x=3*_;if(this._circlesCollide(v[x],v[x+1],v[x+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[_])))return o.push(!0),!0}}},Qe.prototype._forEachCell=function(e,t,n,r,i,o,a,s){for(var l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(n),h=this._convertToYCellCoord(r),d=l;d<=u;d++)for(var f=c;f<=h;f++){var p=this.xCellCount*f+d;if(i.call(this,e,t,n,r,p,o,a,s))return}},Qe.prototype._convertToXCellCoord=function(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))},Qe.prototype._convertToYCellCoord=function(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))},Qe.prototype._circlesCollide=function(e,t,n,r,i,o){var a=r-e,s=i-t,l=n+o;return l*l>a*a+s*s},Qe.prototype._circleAndRectCollide=function(e,t,n,r,i,o,a){var s=(o-r)/2,l=Math.abs(e-(r+s));if(l>s+n)return!1;var c=(a-i)/2,u=Math.abs(t-(i+c));if(u>c+n)return!1;if(l<=s||u<=c)return!0;var h=l-s,d=u-c;return h*h+d*d<=n*n};var ht=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function dt(e,t){for(var n=0;n<e;n++){var r=t.length;t.resize(r+4),t.float32.set(ht,3*r)}}function ft(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e[3]=n[3]*r+n[7]*i+n[15],e}var pt=100,gt=function(e,t,n){void 0===t&&(t=new Qe(e.width+200,e.height+200,25)),void 0===n&&(n=new Qe(e.width+200,e.height+200,25)),this.transform=e,this.grid=t,this.ignoredGrid=n,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+pt,this.screenBottomBoundary=e.height+pt,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200};function mt(t,n,r){return n*(e.EXTENT/(t.tileSize*Math.pow(2,r-t.tileID.overscaledZ)))}gt.prototype.placeCollisionBox=function(e,t,n,r,i){var o=this.projectAndGetPerspectiveRatio(r,e.anchorPointX,e.anchorPointY),a=n*o.perspectiveRatio,s=e.x1*a+o.point.x,l=e.y1*a+o.point.y,c=e.x2*a+o.point.x,u=e.y2*a+o.point.y;return!this.isInsideGrid(s,l,c,u)||!t&&this.grid.hitTest(s,l,c,u,i)?{box:[],offscreen:!1}:{box:[s,l,c,u],offscreen:this.isOffscreen(s,l,c,u)}},gt.prototype.placeCollisionCircles=function(t,n,r,i,o,a,s,l,c,u,h,d,f){var p=[],g=new e.Point(n.anchorX,n.anchorY),m=nt(g,a),v=rt(this.transform.cameraToCenterDistance,m.signedDistanceFromCamera),y=(u?o/v:o*v)/e.ONE_EM,b=nt(g,s).point,_=at(y,i,n.lineOffsetX*y,n.lineOffsetY*y,!1,b,g,n,r,s,{}),x=!1,w=!1,A=!0;if(_){for(var k=.5*d*v+f,T=new e.Point(-100,-100),S=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),E=new Je,C=_.first,M=_.last,O=[],L=C.path.length-1;L>=1;L--)O.push(C.path[L]);for(var D=1;D<M.path.length;D++)O.push(M.path[D]);var I=2.5*k;if(l){var R=O.map((function(e){return nt(e,l)}));O=R.some((function(e){return e.signedDistanceFromCamera<=0}))?[]:R.map((function(e){return e.point}))}var P=[];if(O.length>0){for(var N=O[0].clone(),z=O[0].clone(),F=1;F<O.length;F++)N.x=Math.min(N.x,O[F].x),N.y=Math.min(N.y,O[F].y),z.x=Math.max(z.x,O[F].x),z.y=Math.max(z.y,O[F].y);P=N.x>=T.x&&z.x<=S.x&&N.y>=T.y&&z.y<=S.y?[O]:z.x<T.x||N.x>S.x||z.y<T.y||N.y>S.y?[]:e.clipLine([O],T.x,T.y,S.x,S.y)}for(var B=0,j=P;B<j.length;B+=1){var U=j[B];E.reset(U,.25*k);var V;V=E.length<=.5*k?1:Math.ceil(E.paddedLength/I)+1;for(var q=0;q<V;q++){var H=q/Math.max(V-1,1),$=E.lerp(H),W=$.x+pt,G=$.y+pt;p.push(W,G,k,0);var Y=W-k,X=G-k,Z=W+k,K=G+k;if(A=A&&this.isOffscreen(Y,X,Z,K),w=w||this.isInsideGrid(Y,X,Z,K),!t&&this.grid.hitTestCircle(W,G,k,h)&&(x=!0,!c))return{circles:[],offscreen:!1,collisionDetected:x}}}}return{circles:!c&&x||!w?[]:p,offscreen:A,collisionDetected:x}},gt.prototype.queryRenderedSymbols=function(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var n=[],r=1/0,i=1/0,o=-1/0,a=-1/0,s=0,l=t;s<l.length;s+=1){var c=l[s],u=new e.Point(c.x+pt,c.y+pt);r=Math.min(r,u.x),i=Math.min(i,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y),n.push(u)}for(var h={},d={},f=0,p=this.grid.query(r,i,o,a).concat(this.ignoredGrid.query(r,i,o,a));f<p.length;f+=1){var g=p[f],m=g.key;if(void 0===h[m.bucketInstanceId]&&(h[m.bucketInstanceId]={}),!h[m.bucketInstanceId][m.featureIndex]){var v=[new e.Point(g.x1,g.y1),new e.Point(g.x2,g.y1),new e.Point(g.x2,g.y2),new e.Point(g.x1,g.y2)];e.polygonIntersectsPolygon(n,v)&&(h[m.bucketInstanceId][m.featureIndex]=!0,void 0===d[m.bucketInstanceId]&&(d[m.bucketInstanceId]=[]),d[m.bucketInstanceId].push(m.featureIndex))}}return d},gt.prototype.insertCollisionBox=function(e,t,n,r,i){var o={bucketInstanceId:n,featureIndex:r,collisionGroupID:i};(t?this.ignoredGrid:this.grid).insert(o,e[0],e[1],e[2],e[3])},gt.prototype.insertCollisionCircles=function(e,t,n,r,i){for(var o=t?this.ignoredGrid:this.grid,a={bucketInstanceId:n,featureIndex:r,collisionGroupID:i},s=0;s<e.length;s+=4)o.insertCircle(a,e[s],e[s+1],e[s+2])},gt.prototype.projectAndGetPerspectiveRatio=function(t,n,r){var i=[n,r,0,1];return ft(i,i,t),{point:new e.Point((i[0]/i[3]+1)/2*this.transform.width+pt,(-i[1]/i[3]+1)/2*this.transform.height+pt),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},gt.prototype.isOffscreen=function(e,t,n,r){return n<pt||e>=this.screenRightBoundary||r<pt||t>this.screenBottomBoundary},gt.prototype.isInsideGrid=function(e,t,n,r){return n>=0&&e<this.gridRightBoundary&&r>=0&&t<this.gridBottomBoundary},gt.prototype.getViewportMatrix=function(){var t=e.identity([]);return e.translate(t,t,[-100,-100,0]),t};var vt=function(e,t,n,r){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):r&&n?1:0,this.placed=n};vt.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var yt=function(e,t,n,r,i){this.text=new vt(e?e.text:null,t,n,i),this.icon=new vt(e?e.icon:null,t,r,i)};yt.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var bt=function(e,t,n){this.text=e,this.icon=t,this.skipFade=n},_t=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},xt=function(e,t,n,r,i){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=n,this.bucketIndex=r,this.tileID=i},wt=function(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}};function At(t,n,r,i,o){var a=e.getAnchorAlignment(t),s=-(a.horizontalAlign-.5)*n,l=-(a.verticalAlign-.5)*r,c=e.evaluateVariableOffset(t,i);return new e.Point(s+c[0]*o,l+c[1]*o)}function kt(t,n,r,i,o,a){var s=t.x1,l=t.x2,c=t.y1,u=t.y2,h=t.anchorPointX,d=t.anchorPointY,f=new e.Point(n,r);return i&&f._rotate(o?a:-a),{x1:s+f.x,y1:c+f.y,x2:l+f.x,y2:u+f.y,anchorPointX:h,anchorPointY:d}}wt.prototype.get=function(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){var t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:function(e){return e.collisionGroupID===t}}}return this.collisionGroups[e]};var Tt=function(e,t,n,r){this.transform=e.clone(),this.collisionIndex=new gt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new wt(n),this.collisionCircleArrays={},this.prevPlacement=r,r&&(r.prevPlacement=void 0),this.placedOrientations={}};function St(e,t,n,r,i){e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0)}Tt.prototype.getBucketParts=function(t,n,r,i){var o=r.getBucket(n),a=r.latestFeatureIndex;if(o&&a&&n.id===o.layerIds[0]){var s=r.collisionBoxArray,l=o.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/e.EXTENT,h=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),d="map"===l.get("text-pitch-alignment"),f="map"===l.get("text-rotation-alignment"),p=mt(r,1,this.transform.zoom),g=et(h,d,f,this.transform,p),m=null;if(d){var v=tt(h,d,f,this.transform,p);m=e.multiply([],this.transform.labelPlaneMatrix,v)}this.retainedQueryData[o.bucketInstanceId]=new xt(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);var y={bucket:o,layout:l,posMatrix:h,textLabelPlaneMatrix:g,labelToScreenMatrix:m,scale:c,textPixelRatio:u,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(var b=0,_=o.sortKeyRanges;b<_.length;b+=1){var x=_[b],w=x.sortKey,A=x.symbolInstanceStart,k=x.symbolInstanceEnd;t.push({sortKey:w,symbolInstanceStart:A,symbolInstanceEnd:k,parameters:y})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:y})}},Tt.prototype.attemptAnchorPlacement=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p){var g,m=[h.textOffset0,h.textOffset1],v=At(e,n,r,m,i),y=this.collisionIndex.placeCollisionBox(kt(t,v.x,v.y,o,a,this.transform.angle),u,s,l,c.predicate);if(!p||0!==this.collisionIndex.placeCollisionBox(kt(p,v.x,v.y,o,a,this.transform.angle),u,s,l,c.predicate).box.length)return y.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(g=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:m,width:n,height:r,anchor:e,textBoxScale:i,prevAnchor:g},this.markUsedJustification(d,e,h,f),d.allowVerticalPlacement&&(this.markUsedOrientation(d,f,h),this.placedOrientations[h.crossTileID]=f),{shift:v,placedGlyphBoxes:y}):void 0},Tt.prototype.placeLayerBucketPart=function(t,n,r){var i=this,o=t.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,c=o.textLabelPlaneMatrix,u=o.labelToScreenMatrix,h=o.textPixelRatio,d=o.holdingForFade,f=o.collisionBoxArray,p=o.partiallyEvaluatedTextSize,g=o.collisionGroup,m=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),b=s.get("icon-allow-overlap"),_="map"===s.get("text-rotation-alignment"),x="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),A="viewport-y"===s.get("symbol-z-order"),k=y&&(b||!a.hasIconData()||v),T=b&&(y||!a.hasTextData()||m);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var S=function(t,o){if(!n[t.crossTileID])if(d)i.placements[t.crossTileID]=new bt(!1,!1,!1);else{var f,A=!1,S=!1,E=!0,C=null,M={box:null,offscreen:null},O={box:null,offscreen:null},L=null,D=null,I=0,R=0,P=0;o.textFeatureIndex?I=o.textFeatureIndex:t.useRuntimeCollisionCircles&&(I=t.featureIndex),o.verticalTextFeatureIndex&&(R=o.verticalTextFeatureIndex);var N=o.textBox;if(N){var z=function(n){var r=e.WritingMode.horizontal;if(a.allowVerticalPlacement&&!n&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[t.crossTileID];o&&(i.placedOrientations[t.crossTileID]=o,r=o,i.markUsedOrientation(a,r,t))}return r},F=function(n,r){if(a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i<s.length&&(s[i]===e.WritingMode.vertical?(M=r(),O=M):M=n(),!(M&&M.box&&M.box.length));i+=1);else M=n()};if(s.get("text-variable-anchor")){var B=s.get("text-variable-anchor");if(i.prevPlacement&&i.prevPlacement.variableOffsets[t.crossTileID]){var j=i.prevPlacement.variableOffsets[t.crossTileID];B.indexOf(j.anchor)>0&&(B=B.filter((function(e){return e!==j.anchor}))).unshift(j.anchor)}var U=function(e,n,r){for(var o=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=w&&!b?n:null,d={box:[],offscreen:!1},f=y?2*B.length:B.length,p=0;p<f;++p){var m=B[p%B.length],v=p>=B.length,k=i.attemptAnchorPlacement(m,e,o,s,c,_,x,h,l,g,v,t,a,r,u);if(k&&(d=k.placedGlyphBoxes)&&d.box&&d.box.length){A=!0,C=k.shift;break}}return d};F((function(){return U(N,o.iconBox,e.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox,r=M&&M.box&&M.box.length;return a.allowVerticalPlacement&&!r&&t.numVerticalGlyphVertices>0&&n?U(n,o.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),M&&(A=M.box,E=M.offscreen);var V=z(M&&M.box);if(!A&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[t.crossTileID];q&&(i.variableOffsets[t.crossTileID]=q,i.markUsedJustification(a,q.anchor,t,V))}}else{var H=function(e,n){var r=i.collisionIndex.placeCollisionBox(e,y,h,l,g.predicate);return r&&r.box&&r.box.length&&(i.markUsedOrientation(a,n,t),i.placedOrientations[t.crossTileID]=n),r};F((function(){return H(N,e.WritingMode.horizontal)}),(function(){var n=o.verticalTextBox;return a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?H(n,e.WritingMode.vertical):{box:null,offscreen:null}})),z(M&&M.box&&M.box.length)}}if(A=(f=M)&&f.box&&f.box.length>0,E=f&&f.offscreen,t.useRuntimeCollisionCircles){var $=a.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),W=e.evaluateSizeForFeature(a.textSizeData,p,$),G=s.get("text-padding"),Y=t.collisionCircleDiameter;L=i.collisionIndex.placeCollisionCircles(y,$,a.lineVertexArray,a.glyphOffsetArray,W,l,c,u,r,x,g.predicate,Y,G),A=y||L.circles.length>0&&!L.collisionDetected,E=E&&L.offscreen}if(o.iconFeatureIndex&&(P=o.iconFeatureIndex),o.iconBox){var X=function(e){var t=w&&C?kt(e,C.x,C.y,_,x,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,b,h,l,g.predicate)};S=O&&O.box&&O.box.length&&o.verticalIconBox?(D=X(o.verticalIconBox)).box.length>0:(D=X(o.iconBox)).box.length>0,E=E&&D.offscreen}var Z=m||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,K=v||0===t.numIconVertices;if(Z||K?K?Z||(S=S&&A):A=S&&A:S=A=S&&A,A&&f&&f.box&&(O&&O.box&&R?i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,R,g.ID):i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,I,g.ID)),S&&D&&i.collisionIndex.insertCollisionBox(D.box,s.get("icon-ignore-placement"),a.bucketInstanceId,P,g.ID),L&&(A&&i.collisionIndex.insertCollisionCircles(L.circles,s.get("text-ignore-placement"),a.bucketInstanceId,I,g.ID),r)){var J=a.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new _t);for(var ee=0;ee<L.circles.length;ee+=4)Q.circles.push(L.circles[ee+0]),Q.circles.push(L.circles[ee+1]),Q.circles.push(L.circles[ee+2]),Q.circles.push(L.collisionDetected?1:0)}i.placements[t.crossTileID]=new bt(A||k,S||T,E||a.justReloaded),n[t.crossTileID]=!0}};if(A)for(var E=a.getSortedSymbolIndexes(this.transform.angle),C=E.length-1;C>=0;--C){var M=E[C];S(a.symbolInstances.get(M),a.collisionArrays[M])}else for(var O=t.symbolInstanceStart;O<t.symbolInstanceEnd;O++)S(a.symbolInstances.get(O),a.collisionArrays[O]);if(r&&a.bucketInstanceId in this.collisionCircleArrays){var L=this.collisionCircleArrays[a.bucketInstanceId];e.invert(L.invProjMatrix,l),L.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},Tt.prototype.markUsedJustification=function(t,n,r,i){var o,a={left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex};o=i===e.WritingMode.vertical?r.verticalPlacedTextSymbolIndex:a[e.getAnchorJustification(n)];for(var s=0,l=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];s<l.length;s+=1){var c=l[s];c>=0&&(t.text.placedSymbolArray.get(c).crossTileID=o>=0&&c!==o?0:r.crossTileID)}},Tt.prototype.markUsedOrientation=function(t,n,r){for(var i=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,o=n===e.WritingMode.vertical?n:0,a=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];a<s.length;a+=1){var l=s[a];t.text.placedSymbolArray.get(l).placedOrientation=i}r.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)},Tt.prototype.commit=function(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;var t=this.prevPlacement,n=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;var r=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},o=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],c=i[s];c?(this.opacities[s]=new yt(c,r,l.text,l.icon),n=n||l.text!==c.text.placed||l.icon!==c.icon.placed):(this.opacities[s]=new yt(null,r,l.text,l.icon,l.skipFade),n=n||l.text||l.icon)}for(var u in i){var h=i[u];if(!this.opacities[u]){var d=new yt(h,r,!1,!1);d.isHidden()||(this.opacities[u]=d,n=n||h.text.placed||h.icon.placed)}}for(var f in o)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=o[f]);for(var p in a)this.placedOrientations[p]||!this.opacities[p]||this.opacities[p].isHidden()||(this.placedOrientations[p]=a[p]);n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},Tt.prototype.updateLayerOpacities=function(e,t){for(var n={},r=0,i=t;r<i.length;r+=1){var o=i[r],a=o.getBucket(e);a&&o.latestFeatureIndex&&e.id===a.layerIds[0]&&this.updateBucketOpacities(a,n,o.collisionBoxArray)}},Tt.prototype.updateBucketOpacities=function(t,n,r){var i=this;t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();var o=t.layers[0].layout,a=new yt(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),c=o.get("text-variable-anchor"),u="map"===o.get("text-rotation-alignment"),h="map"===o.get("text-pitch-alignment"),d="none"!==o.get("icon-text-fit"),f=new yt(null,0,s&&(l||!t.hasIconData()||o.get("icon-optional")),l&&(s||!t.hasTextData()||o.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(r);for(var p=function(e,t,n){for(var r=0;r<t/4;r++)e.opacityVertexArray.emplaceBack(n)},g=function(r){var o=t.symbolInstances.get(r),s=o.numHorizontalGlyphVertices,l=o.numVerticalGlyphVertices,g=o.crossTileID,m=n[g],v=i.opacities[g];m?v=a:v||(v=f,i.opacities[g]=v),n[g]=!0;var y=s>0||l>0,b=o.numIconVertices>0,_=i.placedOrientations[o.crossTileID],x=_===e.WritingMode.vertical,w=_===e.WritingMode.horizontal||_===e.WritingMode.horizontalOnly;if(y){var A=Rt(v.text),k=x?Pt:A;p(t.text,s,k);var T=w?Pt:A;p(t.text,l,T);var S=v.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=S||x?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=S||w?1:0);var E=i.variableOffsets[o.crossTileID];E&&i.markUsedJustification(t,E.anchor,o,_);var C=i.placedOrientations[o.crossTileID];C&&(i.markUsedJustification(t,"left",o,C),i.markUsedOrientation(t,C,o))}if(b){var M=Rt(v.icon),O=!(d&&o.verticalPlacedIconSymbolIndex&&x);if(o.placedIconSymbolIndex>=0){var L=O?M:Pt;p(t.icon,o.numIconVertices,L),t.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(o.verticalPlacedIconSymbolIndex>=0){var D=O?Pt:M;p(t.icon,o.numVerticalIconVertices,D),t.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var I=t.collisionArrays[r];if(I){var R=new e.Point(0,0);if(I.textBox||I.verticalTextBox){var P=!0;if(c){var N=i.variableOffsets[g];N?(R=At(N.anchor,N.width,N.height,N.textOffset,N.textBoxScale),u&&R._rotate(h?i.transform.angle:-i.transform.angle)):P=!1}I.textBox&&St(t.textCollisionBox.collisionVertexArray,v.text.placed,!P||x,R.x,R.y),I.verticalTextBox&&St(t.textCollisionBox.collisionVertexArray,v.text.placed,!P||w,R.x,R.y)}var z=Boolean(!w&&I.verticalIconBox);I.iconBox&&St(t.iconCollisionBox.collisionVertexArray,v.icon.placed,z,d?R.x:0,d?R.y:0),I.verticalIconBox&&St(t.iconCollisionBox.collisionVertexArray,v.icon.placed,!z,d?R.x:0,d?R.y:0)}}},m=0;m<t.symbolInstances.length;m++)g(m);if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.bucketInstanceId in this.collisionCircleArrays){var v=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=v.invProjMatrix,t.placementViewportMatrix=v.viewportMatrix,t.collisionCircleArray=v.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}},Tt.prototype.symbolFadeChange=function(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Tt.prototype.zoomAdjustment=function(e){return Math.max(0,(this.transform.zoom-e)/1.5)},Tt.prototype.hasTransitions=function(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration},Tt.prototype.stillRecent=function(e,t){var n=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*n>e},Tt.prototype.setStale=function(){this.stale=!0};var Et=Math.pow(2,25),Ct=Math.pow(2,24),Mt=Math.pow(2,17),Ot=Math.pow(2,16),Lt=Math.pow(2,9),Dt=Math.pow(2,8),It=Math.pow(2,1);function Rt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*Et+t*Ct+n*Mt+t*Ot+n*Lt+t*Dt+n*It+t}var Pt=0,Nt=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Nt.prototype.continuePlacement=function(e,t,n,r,i){for(var o=this._bucketParts;this._currentTileIndex<e.length;){var a=e[this._currentTileIndex];if(t.getBucketParts(o,r,a,this._sortAcrossTiles),this._currentTileIndex++,i())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((function(e,t){return e.sortKey-t.sortKey})));this._currentPartIndex<o.length;){var s=o[this._currentPartIndex];if(t.placeLayerBucketPart(s,this._seenCrossTileIDs,n),this._currentPartIndex++,i())return!0}return!1};var zt=function(e,t,n,r,i,o,a){this.placement=new Tt(e,i,o,a),this._currentPlacementIndex=t.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=r,this._done=!1};zt.prototype.isDone=function(){return this._done},zt.prototype.continuePlacement=function(t,n,r){for(var i=this,o=e.browser.now(),a=function(){var t=e.browser.now()-o;return!i._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=n[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Nt(s)),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},zt.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Ft=512/e.EXTENT/2,Bt=function(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;r<t.length;r++){var i=t.get(r),o=i.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:i.crossTileID,coord:this.getScaledCoordinates(i,e)})}};Bt.prototype.getScaledCoordinates=function(t,n){var r=n.canonical.z-this.tileID.canonical.z,i=Ft/Math.pow(2,r);return{x:Math.floor((n.canonical.x*e.EXTENT+t.anchorX)*i),y:Math.floor((n.canonical.y*e.EXTENT+t.anchorY)*i)}},Bt.prototype.findMatches=function(e,t,n){for(var r=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z),i=0;i<e.length;i++){var o=e.get(i);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,t),l=0,c=a;l<c.length;l+=1){var u=c[l];if(Math.abs(u.coord.x-s.x)<=r&&Math.abs(u.coord.y-s.y)<=r&&!n[u.crossTileID]){n[u.crossTileID]=!0,o.crossTileID=u.crossTileID;break}}}}};var jt=function(){this.maxCrossTileID=0};jt.prototype.generate=function(){return++this.maxCrossTileID};var Ut=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Ut.prototype.handleWrapJump=function(e){var t=Math.round((e-this.lng)/360);if(0!==t)for(var n in this.indexes){var r=this.indexes[n],i={};for(var o in r){var a=r[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+t),i[a.tileID.key]=a}this.indexes[n]=i}this.lng=e},Ut.prototype.addBucket=function(e,t,n){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(var r=0;r<t.symbolInstances.length;r++)t.symbolInstances.get(r).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});var i=this.usedCrossTileIDs[e.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>e.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=a[e.scaledTo(Number(o)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u<t.symbolInstances.length;u++){var h=t.symbolInstances.get(u);h.crossTileID||(h.crossTileID=n.generate(),i[h.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new Bt(e,t.symbolInstances,t.bucketInstanceId),!0},Ut.prototype.removeBucketCrossTileIDs=function(e,t){for(var n in t.indexedSymbolInstances)for(var r=0,i=t.indexedSymbolInstances[n];r<i.length;r+=1){var o=i[r];delete this.usedCrossTileIDs[e][o.crossTileID]}},Ut.prototype.removeStaleBuckets=function(e){var t=!1;for(var n in this.indexes){var r=this.indexes[n];for(var i in r)e[r[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(n,r[i]),delete r[i],t=!0)}return t};var Vt=function(){this.layerIndexes={},this.crossTileIDs=new jt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Vt.prototype.addLayer=function(e,t,n){var r=this.layerIndexes[e.id];void 0===r&&(r=this.layerIndexes[e.id]=new Ut);var i=!1,o={};r.handleWrapJump(n);for(var a=0,s=t;a<s.length;a+=1){var l=s[a],c=l.getBucket(e);c&&e.id===c.layerIds[0]&&(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),r.addBucket(l.tileID,c,this.crossTileIDs)&&(i=!0),o[c.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(i=!0),i},Vt.prototype.pruneUnusedLayers=function(e){var t={};for(var n in e.forEach((function(e){t[e]=!0})),this.layerIndexes)t[n]||delete this.layerIndexes[n]};var qt=function(t,n){return e.emitValidationErrors(t,n&&n.filter((function(e){return"source.canvas"!==e.identifier})))},Ht=e.pick(qe,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),$t=e.pick(qe,["setCenter","setZoom","setBearing","setPitch"]),Wt=function(){var t={},n=e.styleSpec.$version;for(var r in e.styleSpec.$root){var i=e.styleSpec.$root[r];if(i.required){var o;null!=(o="version"===r?n:"array"===i.type?[]:{})&&(t[r]=o)}}return t}(),Gt=function(t){function n(r,i){var o=this;void 0===i&&(i={}),t.call(this),this.map=r,this.dispatcher=new T(je(),this),this.imageManager=new d,this.imageManager.setEventedParent(this),this.glyphManager=new b(r._requestManager,i.localIdeographFontFamily),this.lineAtlas=new k(256,512),this.crossTileSymbolIndex=new Vt,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());var a=this;this._rtlTextPluginCallback=n.registerForPluginStateChange((function(t){var n={pluginStatus:t.pluginStatus,pluginURL:t.pluginURL};a.dispatcher.broadcast("syncRTLPluginState",n,(function(t,n){if(e.triggerPluginCompletionEvent(t),n&&n.every((function(e){return e})))for(var r in a.sourceCaches)a.sourceCaches[r].reload()}))})),this.on("data",(function(e){if("source"===e.dataType&&"metadata"===e.sourceDataType){var t=o.sourceCaches[e.sourceId];if(t){var n=t.getSource();if(n&&n.vectorLayerIds)for(var r in o._layers){var i=o._layers[r];i.source===n.id&&o._validateLayer(i)}}}}))}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.loadURL=function(t,n){var r=this;void 0===n&&(n={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var i="boolean"==typeof n.validate?n.validate:!e.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,n.accessToken);var o=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(o,(function(t,n){r._request=null,t?r.fire(new e.ErrorEvent(t)):n&&r._load(n,i)}))},n.prototype.loadJSON=function(t,n){var r=this;void 0===n&&(n={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame((function(){r._request=null,r._load(t,!1!==n.validate)}))},n.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Wt,!1)},n.prototype._load=function(t,n){if(!n||!qt(this,e.validateStyle(t))){for(var r in this._loaded=!0,this.stylesheet=t,t.sources)this.addSource(r,t.sources[r],{validate:!1});t.sprite?this._loadSprite(t.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var i=Ve(this.stylesheet.layers);this._order=i.map((function(e){return e.id})),this._layers={},this._serializedLayers={};for(var o=0,a=i;o<a.length;o+=1){var s=a[o];(s=e.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new A(this.stylesheet.light),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}},n.prototype._loadSprite=function(t){var n=this;this._spriteRequest=function(t,n,r){var i,o,a,s=e.browser.devicePixelRatio>1?"@2x":"",l=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,a||(a=e,i=t,u())})),c=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,a||(a=e,o=t,u())}));function u(){if(a)r(a);else if(i&&o){var t=e.browser.getImageData(o),n={};for(var s in i){var l=i[s],c=l.width,u=l.height,h=l.x,d=l.y,f=l.sdf,p=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,y,{x:h,y:d},{x:0,y:0},{width:c,height:u}),n[s]={data:y,pixelRatio:p,sdf:f,stretchX:g,stretchY:m,content:v}}r(null,n)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,(function(t,r){if(n._spriteRequest=null,t)n.fire(new e.ErrorEvent(t));else if(r)for(var i in r)n.imageManager.addImage(i,r[i]);n.imageManager.setLoaded(!0),n._availableImages=n.imageManager.listImages(),n.dispatcher.broadcast("setImages",n._availableImages),n.fire(new e.Event("data",{dataType:"style"}))}))},n.prototype._validateLayer=function(t){var n=this.sourceCaches[t.source];if(n){var r=t.sourceLayer;if(r){var i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new e.ErrorEvent(new Error('Source layer "'+r+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')))}}},n.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},n.prototype._serializeLayers=function(e){for(var t=[],n=0,r=e;n<r.length;n+=1){var i=r[n],o=this._layers[i];"custom"!==o.type&&t.push(o.serialize())}return t},n.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(var t in this._layers)if(this._layers[t].hasTransition())return!0;return!1},n.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},n.prototype.update=function(t){if(this._loaded){var n=this._changed;if(this._changed){var r=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var o in(r.length||i.length)&&this._updateWorkerLayers(r,i),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var c=0,u=this._order;c<u.length;c+=1){var h=u[c],d=this._layers[h];d.recalculate(t,this._availableImages),!d.isHidden(t.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new e.Event("data",{dataType:"style"}))}},n.prototype._updateTilesForChangedImages=function(){var e=Object.keys(this._changedImages);if(e.length){for(var t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}},n.prototype._updateWorkerLayers=function(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})},n.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},n.prototype.setState=function(t){var n=this;if(this._checkLoaded(),qt(this,e.validateStyle(t)))return!1;(t=e.clone$1(t)).layers=Ve(t.layers);var r=Ke(this.serialize(),t).filter((function(e){return!(e.command in $t)}));if(0===r.length)return!1;var i=r.filter((function(e){return!(e.command in Ht)}));if(i.length>0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return r.forEach((function(e){"setTransition"!==e.command&&n[e.command].apply(n,e.args)})),this.stylesheet=t,!0},n.prototype.addImage=function(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,n),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},n.prototype.getImage=function(e){return this.imageManager.getImage(e)},n.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(t,n,r){var i=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var o=this.sourceCaches[t]=new De(t,n,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:t}})),o.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],r.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},n.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},n.prototype.addLayer=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===t.type){if(qt(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},r))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},n.prototype.moveLayer=function(t,n){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==n){var r=this._order.indexOf(t);this._order.splice(r,1);var i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(t){this._checkLoaded();var n=this._layers[t];if(n){n.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(e){return this._layers[e]},n.prototype.hasLayer=function(e){return e in this._layers},n.prototype.setLayerZoomRange=function(t,n,r){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",n,null,r)||(i.filter=e.clone$1(n),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},n.prototype.setLayoutProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getLayoutProperty(n),r)||(o.setLayoutProperty(n,r,i),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(t,n){var r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(t,n,r,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getPaintProperty(n),r)||(o.setPaintProperty(n,r,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},n.prototype.setFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=t.sourceLayer,o=this.sourceCaches[r];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,n)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(t,n){this._checkLoaded();var r=t.source,i=this.sourceCaches[r];if(void 0!==i){var o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(a,t.id,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(t){this._checkLoaded();var n=t.source,r=t.sourceLayer,i=this.sourceCaches[n];if(void 0!==i){if("vector"!==i.getSource().type||r)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},n.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,n=function(e){return"fill-extrusion"===t._layers[e].type},r={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(n(a)){r[a]=o;for(var s=0,l=e;s<l.length;s+=1){var c=l[s][a];if(c)for(var u=0,h=c;u<h.length;u+=1){var d=h[u];i.push(d)}}}}i.sort((function(e,t){return t.intersectionZ-e.intersectionZ}));for(var f=[],p=this._order.length-1;p>=0;p--){var g=this._order[p];if(n(g))for(var m=i.length-1;m>=0;m--){var v=i[m].feature;if(r[v.layer.id]<p)break;f.push(v),i.pop()}else for(var y=0,b=e;y<b.length;y+=1){var _=b[y][g];if(_)for(var x=0,w=_;x<w.length;x+=1){var A=w[x];f.push(A.feature)}}}return f},n.prototype.queryRenderedFeatures=function(t,n,r){n&&n.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",n.filter,null,n);var i={};if(n&&n.layers){if(!Array.isArray(n.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=n.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new e.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];i[l.source]=!0}}var c=[];for(var u in n.availableImages=this._availableImages,this.sourceCaches)n.layers&&!i[u]||c.push(F(this.sourceCaches[u],this._layers,this._serializedLayers,t,n,r));return this.placement&&c.push(function(e,t,n,r,i,o,a){for(var s={},l=o.queryRenderedSymbols(r),c=[],u=0,h=Object.keys(l).map(Number);u<h.length;u+=1){var d=h[u];c.push(a[d])}c.sort(B);for(var f=function(){var n=g[p],r=n.featureIndex.lookupSymbolFeatures(l[n.bucketInstanceId],t,n.bucketIndex,n.sourceLayerIndex,i.filter,i.layers,i.availableImages,e);for(var o in r){var a=s[o]=s[o]||[],c=r[o];c.sort((function(e,t){var r=n.featureSortOrder;if(r){var i=r.indexOf(e.featureIndex);return r.indexOf(t.featureIndex)-i}return t.featureIndex-e.featureIndex}));for(var u=0,h=c;u<h.length;u+=1){var d=h[u];a.push(d)}}},p=0,g=c;p<g.length;p+=1)f();var m=function(t){s[t].forEach((function(r){var i=r.feature,o=e[t],a=n[o.source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a}))};for(var v in s)m(v);return s}(this._layers,this._serializedLayers,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(c)},n.prototype.querySourceFeatures=function(t,n){n&&n.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",n.filter,null,n);var r=this.sourceCaches[t];return r?function(e,t){for(var n=e.getRenderableIds().map((function(t){return e.getTileByID(t)})),r=[],i={},o=0;o<n.length;o++){var a=n[o],s=a.tileID.canonical.key;i[s]||(i[s]=!0,a.querySourceFeatures(r,t))}return r}(r,n):[]},n.prototype.addSourceType=function(e,t,r){return n.getSourceType(e)?r(new Error('A source type called "'+e+'" already exists.')):(n.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},r):r(null,null))},n.prototype.getLight=function(){return this.light.getLight()},n.prototype.setLight=function(t,n){void 0===n&&(n={}),this._checkLoaded();var r=this.light.getLight(),i=!1;for(var o in t)if(!e.deepEqual(t[o],r[o])){i=!0;break}if(i){var a={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(a)}},n.prototype._validate=function(t,n,r,i,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&qt(this,t.call(e.validateStyle,e.extend({key:n,style:this.serialize(),value:r,styleSpec:e.styleSpec},i)))},n.prototype._remove=function(){for(var t in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[t].setEventedParent(null);for(var n in this.sourceCaches)this.sourceCaches[n].clearTiles(),this.sourceCaches[n].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},n.prototype._clearSource=function(e){this.sourceCaches[e].clearTiles()},n.prototype._reloadSource=function(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()},n.prototype._updateSources=function(e){for(var t in this.sourceCaches)this.sourceCaches[t].update(e)},n.prototype._generateCollisionBoxes=function(){for(var e in this.sourceCaches)this._reloadSource(e)},n.prototype._updatePlacement=function(t,n,r,i,o){void 0===o&&(o=!1);for(var a=!1,s=!1,l={},c=0,u=this._order;c<u.length;c+=1){var h=u[c],d=this._layers[h];if("symbol"===d.type){if(!l[d.source]){var f=this.sourceCaches[d.source];l[d.source]=f.getRenderableIds(!0).map((function(e){return f.getTileByID(e)})).sort((function(e,t){return t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)}))}var p=this.crossTileSymbolIndex.addLayer(d,l[d.source],t.center.lng);a=a||p}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),t.zoom))&&(this.pauseablePlacement=new zt(t,this._order,o,n,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var g=0,m=this._order;g<m.length;g+=1){var v=m[g],y=this._layers[v];"symbol"===y.type&&this.placement.updateLayerOpacities(y,l[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now())},n.prototype._releaseSymbolFadeTiles=function(){for(var e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()},n.prototype.getImages=function(e,t,n){this.imageManager.getImages(t.icons,n),this._updateTilesForChangedImages();var r=this.sourceCaches[t.source];r&&r.setDependencies(t.tileID.key,t.type,t.icons)},n.prototype.getGlyphs=function(e,t,n){this.glyphManager.getGlyphs(t.stacks,n)},n.prototype.getResource=function(t,n,r){return e.makeRequest(n,r)},n}(e.Evented);Gt.getSourceType=function(e){return N[e]},Gt.setSourceType=function(e,t){N[e]=t},Gt.registerForPluginStateChange=e.registerForPluginStateChange;var Yt=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),Xt=wn("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Zt=wn("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Kt=wn("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Jt=wn("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Qt=wn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),en=wn("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),tn=wn("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),nn=wn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),rn=wn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),on=wn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),an=wn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),sn=wn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ln=wn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),cn=wn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),un=wn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),hn=wn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),dn=wn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),fn=wn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),pn=wn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),gn=wn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),mn=wn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),vn=wn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),yn=wn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),bn=wn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),_n=wn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),xn=wn("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function wn(e,t){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r={};return{fragmentSource:e=e.replace(n,(function(e,t,n,i,o){return r[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(n,(function(e,t,n,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return r[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\nvarying "+n+" "+i+" "+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+n+" "+a+" a_"+o+";\n#else\nuniform "+n+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = a_"+o+";\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+n+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+n+" "+i+" "+o+" = u_"+o+";\n#endif\n"}))}}var An=Object.freeze({__proto__:null,prelude:Xt,background:Zt,backgroundPattern:Kt,circle:Jt,clippingMask:Qt,heatmap:en,heatmapTexture:tn,collisionBox:nn,collisionCircle:rn,debug:on,fill:an,fillOutline:sn,fillOutlinePattern:ln,fillPattern:cn,fillExtrusion:un,fillExtrusionPattern:hn,hillshadePrepare:dn,hillshade:fn,line:pn,lineGradient:gn,linePattern:mn,lineSDF:vn,raster:yn,symbolIcon:bn,symbolSDF:_n,symbolTextAndIcon:xn}),kn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};kn.prototype.bind=function(e,t,n,r,i,o,a,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==r.length,c=0;!l&&c<r.length;c++)this.boundPaintVertexBuffers[c]!==r[c]&&(l=!0);var u=!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==n||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!e.extVertexArrayObject||u?this.freshBind(t,n,r,i,o,a,s):(e.bindVertexArrayOES.set(this.vao),a&&a.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},kn.prototype.freshBind=function(e,t,n,r,i,o,a){var s,l=e.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=n,this.boundIndexBuffer=r,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=c.currentNumAttributes||0;for(var h=l;h<s;h++)u.disableVertexAttribArray(h)}t.enableAttributes(u,e);for(var d=0,f=n;d<f.length;d+=1)f[d].enableAttributes(u,e);o&&o.enableAttributes(u,e),a&&a.enableAttributes(u,e),t.bind(),t.setVertexAttribPointers(u,e,i);for(var p=0,g=n;p<g.length;p+=1){var m=g[p];m.bind(),m.setVertexAttribPointers(u,e,i)}o&&(o.bind(),o.setVertexAttribPointers(u,e,i)),r&&r.bind(),a&&(a.bind(),a.setVertexAttribPointers(u,e,i)),c.currentNumAttributes=l},kn.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Tn=function(e,t,n,r,i){var o=e.gl;this.program=o.createProgram();var a=n?n.defines():[];i&&a.push("#define OVERDRAW_INSPECTOR;");var s=a.concat(Xt.fragmentSource,t.fragmentSource).join("\n"),l=a.concat(Xt.vertexSource,t.vertexSource).join("\n"),c=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(c,s),o.compileShader(c),o.attachShader(this.program,c);var u=o.createShader(o.VERTEX_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(u,l),o.compileShader(u),o.attachShader(this.program,u);for(var h=n?n.layoutAttributes:[],d=0;d<h.length;d++)o.bindAttribLocation(this.program,d,h[d].name);o.linkProgram(this.program),o.deleteShader(u),o.deleteShader(c),this.numAttributes=o.getProgramParameter(this.program,o.ACTIVE_ATTRIBUTES),this.attributes={};for(var f={},p=0;p<this.numAttributes;p++){var g=o.getActiveAttrib(this.program,p);g&&(this.attributes[g.name]=o.getAttribLocation(this.program,g.name))}for(var m=o.getProgramParameter(this.program,o.ACTIVE_UNIFORMS),v=0;v<m;v++){var y=o.getActiveUniform(this.program,v);y&&(f[y.name]=o.getUniformLocation(this.program,y.name))}this.fixedUniforms=r(e,f),this.binderUniforms=n?n.getUniforms(e,f):[]}}};function Sn(e,t,n){var r=1/mt(n,1,t.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,t.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}Tn.prototype.draw=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g){var m,v=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(i),e.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);f&&f.setUniforms(e,this.binderUniforms,h,{zoom:d});for(var b=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[t],_=0,x=u.get();_<x.length;_+=1){var w=x[_],A=w.vaos||(w.vaos={});(A[s]||(A[s]=new kn)).bind(e,this,l,f?f.getPaintVertexBuffers():[],c,w.vertexOffset,p,g),v.drawElements(t,w.primitiveLength*b,v.UNSIGNED_SHORT,w.primitiveOffset*b*2)}}};var En=function(t,n,r,i){var o=n.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=e.create$1();"viewport"===o.properties.get("anchor")&&e.fromRotation(l,-n.transform.angle),e.transformMat3(s,s,l);var c=o.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+r,u_opacity:i}},Cn=function(t,n,r,i,o,a,s){return e.extend(En(t,n,r,i),Sn(a,n,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8})},Mn=function(e){return{u_matrix:e}},On=function(t,n,r,i){return e.extend(Mn(t),Sn(r,n,i))},Ln=function(e,t){return{u_matrix:e,u_world:t}},Dn=function(t,n,r,i,o){return e.extend(On(t,n,r,i),{u_world:o})},In=function(t,n,r,i){var o,a,s=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=mt(r,1,s.zoom);o=!0,a=[l,l]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(n.posMatrix,r,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:a}},Rn=function(e,t,n){var r=mt(n,1,t.zoom),i=Math.pow(2,t.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[t.pixelsToGLUnits[0]/(r*i),t.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:o}},Pn=function(e,t,n){return{u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},Nn=function(e,t,n){return void 0===n&&(n=1),{u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:n}},zn=function(e){return{u_matrix:e}},Fn=function(e,t,n,r){return{u_matrix:e,u_extrude_scale:mt(t,1,n),u_intensity:r}};var Bn=function(t,n,r){var i=t.transform;return{u_matrix:Hn(t,n,r),u_ratio:1/mt(n,1,i.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},jn=function(t,n,r){return e.extend(Bn(t,n,r),{u_image:0})},Un=function(t,n,r,i){var o=t.transform,a=qn(n,o);return{u_matrix:Hn(t,n,r),u_texsize:n.imageAtlasTexture.size,u_ratio:1/mt(n,1,o.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[a,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Vn=function(t,n,r,i,o){var a=t.transform,s=t.lineAtlas,l=qn(n,a),c="round"===r.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),d=u.width*o.fromScale,f=h.width*o.toScale;return e.extend(Bn(t,n,r),{u_patternscale_a:[l/d,-u.height/2],u_patternscale_b:[l/f,-h.height/2],u_sdfgamma:s.width/(256*Math.min(d,f)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:o.t})};function qn(e,t){return 1/mt(e,1,t.tileZoom)}function Hn(e,t,n){return e.translatePosMatrix(t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var $n=function(e,t,n,r,i){return{u_matrix:e,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Wn(i.paint.get("raster-hue-rotate"))};var o,a};function Wn(e){e*=Math.PI/180;var t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}var Gn,Yn=function(e,t,n,r,i,o,a,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:c,u_texture:0}},Xn=function(t,n,r,i,o,a,s,l,c,u,h){var d=o.transform;return e.extend(Yn(t,n,r,i,o,a,s,l,c,u),{u_gamma_scale:i?Math.cos(d._pitch)*d.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+h})},Zn=function(t,n,r,i,o,a,s,l,c,u){return e.extend(Xn(t,n,r,i,o,a,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Kn=function(e,t,n){return{u_matrix:e,u_opacity:t,u_color:n}},Jn=function(t,n,r,i,o,a){return e.extend(function(e,t,n,r){var i=n.imageManager.getPattern(e.from.toString()),o=n.imageManager.getPattern(e.to.toString()),a=n.imageManager.getPixelSize(),s=a.width,l=a.height,c=Math.pow(2,r.tileID.overscaledZ),u=r.tileSize*Math.pow(2,n.transform.tileZoom)/c,h=u*(r.tileID.canonical.x+r.tileID.wrap*c),d=u*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/mt(r,1,n.transform.tileZoom),u_pixel_coord_upper:[h>>16,d>>16],u_pixel_coord_lower:[65535&h,65535&d]}}(i,a,r,o),{u_matrix:t,u_opacity:n})},Qn={fillExtrusion:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fillExtrusionPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fill:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},fillPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},fillOutline:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}},fillOutlinePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},circle:function(t,n){return{u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,n.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},collisionBox:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,n.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,n.u_overscale_factor)}},collisionCircle:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,n.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,n.u_viewport_size)}},debug:function(t,n){return{u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_overlay:new e.Uniform1i(t,n.u_overlay),u_overlay_scale:new e.Uniform1f(t,n.u_overlay_scale)}},clippingMask:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmap:function(t,n){return{u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmapTexture:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}},hillshade:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}},hillshadePrepare:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_maxzoom:new e.Uniform1f(t,n.u_maxzoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}},line:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}},lineGradient:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image)}},linePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform3f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},lineSDF:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,n.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,n.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,n.u_sdfgamma),u_image:new e.Uniform1i(t,n.u_image),u_tex_y_a:new e.Uniform1f(t,n.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,n.u_tex_y_b),u_mix:new e.Uniform1f(t,n.u_mix)}},raster:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}},symbolIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}},symbolSDF:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},symbolTextAndIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1i(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texsize_icon:new e.Uniform2f(t,n.u_texsize_icon),u_texture:new e.Uniform1i(t,n.u_texture),u_texture_icon:new e.Uniform1i(t,n.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,n.u_is_halo)}},background:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}},backgroundPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}}};function er(t,n,r,i,o,a,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),h=[],d=0,f=0,p=0;p<i.length;p++){var g=i[p],m=n.getTile(g),v=m.getBucket(r);if(v){var y=g.posMatrix;0===o[0]&&0===o[1]||(y=t.translatePosMatrix(g.posMatrix,m,o,a));var b=s?v.textCollisionBox:v.iconCollisionBox,_=v.collisionCircleArray;if(_.length>0){var x=e.create(),w=y;e.mul(x,v.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(x,x,v.placementViewportMatrix),h.push({circleArray:_,circleOffset:f,transform:w,invTransform:x}),f=d+=_.length/4}b&&u.draw(l,c.LINES,Se.disabled,Ce.disabled,t.colorModeForRenderPass(),Oe.disabled,Rn(y,t.transform,m),r.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,null,t.transform.zoom,null,null,b.collisionVertexBuffer)}}if(s&&h.length){var A=t.useProgram("collisionCircle"),k=new e.StructArrayLayout2f1f2i16;k.resize(4*d),k._trim();for(var T=0,S=0,E=h;S<E.length;S+=1)for(var C=E[S],M=0;M<C.circleArray.length/4;M++){var O=4*M,L=C.circleArray[O+0],D=C.circleArray[O+1],I=C.circleArray[O+2],R=C.circleArray[O+3];k.emplace(T++,L,D,I,R,0),k.emplace(T++,L,D,I,R,1),k.emplace(T++,L,D,I,R,2),k.emplace(T++,L,D,I,R,3)}(!Gn||Gn.length<2*d)&&(Gn=function(t){var n=2*t,r=new e.StructArrayLayout3ui6;r.resize(n),r._trim();for(var i=0;i<n;i++){var o=6*i;r.uint16[o+0]=4*i+0,r.uint16[o+1]=4*i+1,r.uint16[o+2]=4*i+2,r.uint16[o+3]=4*i+2,r.uint16[o+4]=4*i+3,r.uint16[o+5]=4*i+0}return r}(d));for(var P=l.createIndexBuffer(Gn,!0),N=l.createVertexBuffer(k,e.collisionCircleLayout.members,!0),z=0,F=h;z<F.length;z+=1){var B=F[z],j=Pn(B.transform,B.invTransform,t.transform);A.draw(l,c.TRIANGLES,Se.disabled,Ce.disabled,t.colorModeForRenderPass(),Oe.disabled,j,r.id,N,P,e.SegmentVector.simpleSegment(0,2*B.circleOffset,B.circleArray.length,B.circleArray.length/2),null,t.transform.zoom,null,null,null)}N.destroy(),P.destroy()}}var tr=e.identity(new Float32Array(16));function nr(t,n,r,i,o,a){var s=e.getAnchorAlignment(t),l=-(s.horizontalAlign-.5)*n,c=-(s.verticalAlign-.5)*r,u=e.evaluateVariableOffset(t,i);return new e.Point((l/o+u[0])*a,(c/o+u[1])*a)}function rr(t,n,r,i,o,a,s,l,c,u,h){var d=t.text.placedSymbolArray,f=t.text.dynamicLayoutVertexArray,p=t.icon.dynamicLayoutVertexArray,g={};f.clear();for(var m=0;m<d.length;m++){var v=d.get(m),y=t.allowVerticalPlacement&&!v.placedOrientation,b=v.hidden||!v.crossTileID||y?null:i[v.crossTileID];if(b){var _=new e.Point(v.anchorX,v.anchorY),x=nt(_,r?l:s),w=rt(a.cameraToCenterDistance,x.signedDistanceFromCamera),A=o.evaluateSizeForFeature(t.textSizeData,u,v)*w/e.ONE_EM;r&&(A*=t.tilePixelRatio/c);for(var k=b.width,T=b.height,S=nr(b.anchor,k,T,b.textOffset,b.textBoxScale,A),E=r?nt(_.add(S),s).point:x.point.add(n?S.rotate(-a.angle):S),C=t.allowVerticalPlacement&&v.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,M=0;M<v.numGlyphs;M++)e.addDynamicAttributes(f,E,C);h&&v.associatedIconIndex>=0&&(g[v.associatedIconIndex]={shiftedAnchor:E,angle:C})}else dt(v.numGlyphs,f)}if(h){p.clear();for(var O=t.icon.placedSymbolArray,L=0;L<O.length;L++){var D=O.get(L);if(D.hidden)dt(D.numGlyphs,p);else{var I=g[L];if(I)for(var R=0;R<D.numGlyphs;R++)e.addDynamicAttributes(p,I.shiftedAnchor,I.angle);else dt(D.numGlyphs,p)}}t.icon.dynamicLayoutVertexBuffer.updateData(p)}t.text.dynamicLayoutVertexBuffer.updateData(f)}function ir(e,t,n){return n.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function or(t,n,r,i,o,a,s,l,c,u,h,d){for(var f=t.context,p=f.gl,g=t.transform,m="map"===l,v="map"===c,y=m&&"point"!==r.layout.get("symbol-placement"),b=m&&!v&&!y,_=void 0!==r.layout.get("symbol-sort-key").constantOr(1),x=t.depthModeForSublayer(0,Se.ReadOnly),w=r.layout.get("text-variable-anchor"),A=[],k=0,T=i;k<T.length;k+=1){var S=T[k],E=n.getTile(S),C=E.getBucket(r);if(C){var M=o?C.text:C.icon;if(M&&M.segments.get().length){var O=M.programConfigurations.get(r.id),L=o||C.sdfIcons,D=o?C.textSizeData:C.iconSizeData,I=v||0!==g.pitch,R=t.useProgram(ir(L,o,C),O),P=e.evaluateSizeForZoom(D,g.zoom),N=void 0,z=[0,0],F=void 0,B=void 0,j=null,U=void 0;if(o){if(F=E.glyphAtlasTexture,B=p.LINEAR,N=E.glyphAtlasTexture.size,C.iconsInText){z=E.imageAtlasTexture.size,j=E.imageAtlasTexture;var V="composite"===D.kind||"camera"===D.kind;U=I||t.options.rotating||t.options.zooming||V?p.LINEAR:p.NEAREST}}else{var q=1!==r.layout.get("icon-size").constantOr(0)||C.iconsNeedLinear;F=E.imageAtlasTexture,B=L||t.options.rotating||t.options.zooming||q||I?p.LINEAR:p.NEAREST,N=E.imageAtlasTexture.size}var H=mt(E,1,t.transform.zoom),$=et(S.posMatrix,v,m,t.transform,H),W=tt(S.posMatrix,v,m,t.transform,H),G=w&&C.hasTextData(),Y="none"!==r.layout.get("icon-text-fit")&&G&&C.hasIconData();y&&ot(C,S.posMatrix,t,o,$,W,v,u);var X=t.translatePosMatrix(S.posMatrix,E,a,s),Z=y||o&&w||Y?tr:$,K=t.translatePosMatrix(W,E,a,s,!0),J=L&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),Q={program:R,buffers:M,uniformValues:L?C.iconsInText?Zn(D.kind,P,b,v,t,X,Z,K,N,z):Xn(D.kind,P,b,v,t,X,Z,K,o,N,!0):Yn(D.kind,P,b,v,t,X,Z,K,o,N),atlasTexture:F,atlasTextureIcon:j,atlasInterpolation:B,atlasInterpolationIcon:U,isSDF:L,hasHalo:J};if(_)for(var ee=0,te=M.segments.get();ee<te.length;ee+=1){var ne=te[ee];A.push({segments:new e.SegmentVector([ne]),sortKey:ne.sortKey,state:Q})}else A.push({segments:M.segments,sortKey:0,state:Q})}}}_&&A.sort((function(e,t){return e.sortKey-t.sortKey}));for(var re=0,ie=A;re<ie.length;re+=1){var oe=ie[re],ae=oe.state;if(f.activeTexture.set(p.TEXTURE0),ae.atlasTexture.bind(ae.atlasInterpolation,p.CLAMP_TO_EDGE),ae.atlasTextureIcon&&(f.activeTexture.set(p.TEXTURE1),ae.atlasTextureIcon&&ae.atlasTextureIcon.bind(ae.atlasInterpolationIcon,p.CLAMP_TO_EDGE)),ae.isSDF){var se=ae.uniformValues;ae.hasHalo&&(se.u_is_halo=1,ar(ae.buffers,oe.segments,r,t,ae.program,x,h,d,se)),se.u_is_halo=0}ar(ae.buffers,oe.segments,r,t,ae.program,x,h,d,ae.uniformValues)}}function ar(e,t,n,r,i,o,a,s,l){var c=r.context,u=c.gl;i.draw(c,u.TRIANGLES,o,a,s,Oe.disabled,l,n.id,e.layoutVertexBuffer,e.indexBuffer,t,n.paint,r.transform.zoom,e.programConfigurations.get(n.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function sr(e,t,n,r,i,o,a){var s,l,c,u,h,d=e.context.gl,f=n.paint.get("fill-pattern"),p=f&&f.constantOr(1),g=n.getCrossfadeParameters();a?(l=p&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=d.LINES):(l=p?"fillPattern":"fill",s=d.TRIANGLES);for(var m=0,v=r;m<v.length;m+=1){var y=v[m],b=t.getTile(y);if(!p||b.patternsLoaded()){var _=b.getBucket(n);if(_){var x=_.programConfigurations.get(n.id),w=e.useProgram(l,x);p&&(e.context.activeTexture.set(d.TEXTURE0),b.imageAtlasTexture.bind(d.LINEAR,d.CLAMP_TO_EDGE),x.updatePaintBuffers(g));var A=f.constantOr(null);if(A&&b.imageAtlas){var k=b.imageAtlas,T=k.patternPositions[A.to.toString()],S=k.patternPositions[A.from.toString()];T&&S&&x.setConstantPatternPositions(T,S)}var E=e.translatePosMatrix(y.posMatrix,b,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){u=_.indexBuffer2,h=_.segments2;var C=[d.drawingBufferWidth,d.drawingBufferHeight];c="fillOutlinePattern"===l&&p?Dn(E,e,g,b,C):Ln(E,C)}else u=_.indexBuffer,h=_.segments,c=p?On(E,e,g,b):Mn(E);w.draw(e.context,s,i,e.stencilModeForClipping(y),o,Oe.disabled,c,n.id,_.layoutVertexBuffer,u,h,n.paint,e.transform.zoom,x)}}}}function lr(e,t,n,r,i,o,a){for(var s=e.context,l=s.gl,c=n.paint.get("fill-extrusion-pattern"),u=c.constantOr(1),h=n.getCrossfadeParameters(),d=n.paint.get("fill-extrusion-opacity"),f=0,p=r;f<p.length;f+=1){var g=p[f],m=t.getTile(g),v=m.getBucket(n);if(v){var y=v.programConfigurations.get(n.id),b=e.useProgram(u?"fillExtrusionPattern":"fillExtrusion",y);u&&(e.context.activeTexture.set(l.TEXTURE0),m.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePaintBuffers(h));var _=c.constantOr(null);if(_&&m.imageAtlas){var x=m.imageAtlas,w=x.patternPositions[_.to.toString()],A=x.patternPositions[_.from.toString()];w&&A&&y.setConstantPatternPositions(w,A)}var k=e.translatePosMatrix(g.posMatrix,m,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),T=n.paint.get("fill-extrusion-vertical-gradient"),S=u?Cn(k,e,T,d,g,h,m):En(k,e,T,d);b.draw(s,s.gl.TRIANGLES,i,o,a,Oe.backCCW,S,n.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,n.paint,e.transform.zoom,y)}}}function cr(t,n,r,i,o,a){var s=t.context,l=s.gl,c=n.fbo;if(c){var u=t.useProgram("hillshade");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,c.colorAttachment.get());var h=function(t,n,r){var i=r.paint.get("hillshade-shadow-color"),o=r.paint.get("hillshade-highlight-color"),a=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=t.transform.angle);var l,c,u,h=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(n.tileID.toUnwrapped(),h),u_image:0,u_latrange:(l=n.tileID,c=Math.pow(2,l.canonical.z),u=l.canonical.y,[new e.MercatorCoordinate(0,u/c).toLngLat().lat,new e.MercatorCoordinate(0,(u+1)/c).toLngLat().lat]),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}}(t,n,r);u.draw(s,l.TRIANGLES,i,o,a,Oe.disabled,h,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function ur(t,n,r,i,o,a,s){var l=t.context,c=l.gl,u=n.dem;if(u&&u.data){var h=u.dim,d=u.stride,f=u.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||t.getTileTexture(d),n.demTexture){var p=n.demTexture;p.update(f,{premultiply:!1}),p.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else n.demTexture=new e.Texture(l,f,c.RGBA,{premultiply:!1}),n.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);var g=n.fbo;if(!g){var m=new e.Texture(l,{width:h,height:h,data:null},c.RGBA);m.bind(c.LINEAR,c.CLAMP_TO_EDGE),(g=n.fbo=l.createFramebuffer(h,h,!0)).colorAttachment.set(m.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,h,h]),t.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,o,a,s,Oe.disabled,function(t,n,r){var i=n.stride,o=e.create();return e.ortho(o,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(o,o,[0,-e.EXTENT,0]),{u_matrix:o,u_image:1,u_dimension:[i,i],u_zoom:t.overscaledZ,u_maxzoom:r,u_unpack:n.getUnpackVector()}}(n.tileID,u,i),r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function hr(t,n,r,i,o){var a=i.paint.get("raster-fade-duration");if(a>0){var s=e.browser.now(),l=(s-t.timeAdded)/a,c=n?(s-n.timeAdded)/a:-1,u=r.getSource(),h=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),d=!n||Math.abs(n.tileID.overscaledZ-h)>Math.abs(t.tileID.overscaledZ-h),f=d&&t.refreshedUponExpiration?1:e.clamp(d?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var dr=new e.Color(1,0,0,1),fr=new e.Color(0,1,0,1),pr=new e.Color(0,0,1,1),gr=new e.Color(1,0,1,1),mr=new e.Color(0,1,1,1);function vr(e){var t=e.transform.padding;yr(e,e.transform.height-(t.top||0),3,dr),yr(e,t.bottom||0,3,fr),br(e,t.left||0,3,pr),br(e,e.transform.width-(t.right||0),3,gr);var n=e.transform.centerPoint;!function(e,t,n,r){var i=20,o=2;_r(e,t-o/2,n-i/2,o,i,r),_r(e,t-i/2,n-o/2,i,o,r)}(e,n.x,e.transform.height-n.y,mr)}function yr(e,t,n,r){_r(e,0,t+n/2,e.transform.width,n,r)}function br(e,t,n,r){_r(e,t-n/2,0,n,e.transform.height,r)}function _r(t,n,r,i,o,a){var s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(n*e.browser.devicePixelRatio,r*e.browser.devicePixelRatio,i*e.browser.devicePixelRatio,o*e.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function xr(t,n,r){var i=t.context,o=i.gl,a=r.posMatrix,s=t.useProgram("debug"),l=Se.disabled,c=Ce.disabled,u=t.colorModeForRenderPass(),h="$debug";i.activeTexture.set(o.TEXTURE0),t.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(i,o.LINE_STRIP,l,c,u,Oe.disabled,Nn(a,e.Color.red),h,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var d=n.getTileByID(r.key).latestRawTileData,f=d&&d.byteLength||0,p=Math.floor(f/1024),g=n.getTile(r).tileSize,m=512/Math.min(g,512)*(r.overscaledZ/t.transform.zoom)*.5,v=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(v+=" => "+r.overscaledZ),function(e,t){e.initDebugOverlayCanvas();var n=e.debugOverlayCanvas,r=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,v+" "+p+"kb"),s.draw(i,o.TRIANGLES,l,c,Me.alphaBlended,Oe.disabled,Nn(a,e.Color.transparent,m),h,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}var wr={symbol:function(t,n,r,i,o){if("translucent"===t.renderPass){var a=Ce.disabled,s=t.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(t,n,r,i,o,a,s){for(var l=n.transform,c="map"===o,u="map"===a,h=0,d=t;h<d.length;h+=1){var f=d[h],p=i.getTile(f),g=p.getBucket(r);if(g&&g.text&&g.text.segments.get().length){var m=g.textSizeData,v=e.evaluateSizeForZoom(m,l.zoom),y=mt(p,1,n.transform.zoom),b=et(f.posMatrix,u,c,n.transform,y),_="none"!==r.layout.get("icon-text-fit")&&g.hasIconData();if(v){var x=Math.pow(2,l.zoom-p.tileID.overscaledZ);rr(g,c,u,s,e.symbolSize,l,b,f.posMatrix,x,v,_)}}}}(i,t,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&or(t,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&or(t,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(er(t,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),er(t,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}},circle:function(t,n,r,i){if("translucent"===t.renderPass){var o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=void 0!==r.layout.get("circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var c=t.context,u=c.gl,h=t.depthModeForSublayer(0,Se.ReadOnly),d=Ce.disabled,f=t.colorModeForRenderPass(),p=[],g=0;g<i.length;g++){var m=i[g],v=n.getTile(m),y=v.getBucket(r);if(y){var b=y.programConfigurations.get(r.id),_={programConfiguration:b,program:t.useProgram("circle",b),layoutVertexBuffer:y.layoutVertexBuffer,indexBuffer:y.indexBuffer,uniformValues:In(t,m,v,r)};if(l)for(var x=0,w=y.segments.get();x<w.length;x+=1){var A=w[x];p.push({segments:new e.SegmentVector([A]),sortKey:A.sortKey,state:_})}else p.push({segments:y.segments,sortKey:0,state:_})}}l&&p.sort((function(e,t){return e.sortKey-t.sortKey}));for(var k=0,T=p;k<T.length;k+=1){var S=T[k],E=S.state,C=E.programConfiguration,M=E.program,O=E.layoutVertexBuffer,L=E.indexBuffer,D=E.uniformValues,I=S.segments;M.draw(c,u.TRIANGLES,h,d,f,Oe.disabled,D,r.id,O,L,I,r.paint,t.transform.zoom,C)}}}},heatmap:function(t,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){var o=t.context,a=o.gl,s=Ce.disabled,l=new Me([a.ONE,a.ONE],e.Color.transparent,[!0,!0,!0,!0]);(function(e,t,n){var r=e.gl;e.activeTexture.set(r.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);var i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),e.bindFramebuffer.set(i.framebuffer);else{var o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=e.createFramebuffer(t.width/4,t.height/4,!1),function(e,t,n,r){var i=e.gl,o=e.extRenderToTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t.width/4,t.height/4,0,i.RGBA,o,null),r.colorAttachment.set(n)}(e,t,o,i)}})(o,t,r),o.clear({color:e.Color.transparent});for(var c=0;c<i.length;c++){var u=i[c];if(!n.hasRenderableParent(u)){var h=n.getTile(u),d=h.getBucket(r);if(d){var f=d.programConfigurations.get(r.id),p=t.useProgram("heatmap",f),g=t.transform.zoom;p.draw(o,a.TRIANGLES,Se.disabled,s,l,Oe.disabled,Fn(u.posMatrix,h,g,r.paint.get("heatmap-intensity")),r.id,d.layoutVertexBuffer,d.indexBuffer,d.segments,r.paint,t.transform.zoom,f)}}}o.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),function(t,n){var r=t.context,i=r.gl,o=n.heatmapFbo;if(o){r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,o.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1);var a=n.colorRampTexture;a||(a=n.colorRampTexture=new e.Texture(r,n.colorRamp,i.RGBA)),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(r,i.TRIANGLES,Se.disabled,Ce.disabled,t.colorModeForRenderPass(),Oe.disabled,function(t,n,r,i){var o=e.create();e.ortho(o,0,t.width,t.height,0,0,1);var a=t.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:r,u_color_ramp:i,u_opacity:n.paint.get("heatmap-opacity")}}(t,n,0,1),n.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,n.paint,t.transform.zoom)}}(t,r))},line:function(t,n,r,i){if("translucent"===t.renderPass){var o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=t.depthModeForSublayer(0,Se.ReadOnly),l=t.colorModeForRenderPass(),c=r.paint.get("line-dasharray"),u=r.paint.get("line-pattern"),h=u.constantOr(1),d=r.paint.get("line-gradient"),f=r.getCrossfadeParameters(),p=h?"linePattern":c?"lineSDF":d?"lineGradient":"line",g=t.context,m=g.gl,v=!0;if(d){g.activeTexture.set(m.TEXTURE0);var y=r.gradientTexture;if(!r.gradient)return;y||(y=r.gradientTexture=new e.Texture(g,r.gradient,m.RGBA)),y.bind(m.LINEAR,m.CLAMP_TO_EDGE)}for(var b=0,_=i;b<_.length;b+=1){var x=_[b],w=n.getTile(x);if(!h||w.patternsLoaded()){var A=w.getBucket(r);if(A){var k=A.programConfigurations.get(r.id),T=t.context.program.get(),S=t.useProgram(p,k),E=v||S.program!==T,C=u.constantOr(null);if(C&&w.imageAtlas){var M=w.imageAtlas,O=M.patternPositions[C.to.toString()],L=M.patternPositions[C.from.toString()];O&&L&&k.setConstantPatternPositions(O,L)}var D=h?Un(t,w,r,f):c?Vn(t,w,r,c,f):d?jn(t,w,r):Bn(t,w,r);h?(g.activeTexture.set(m.TEXTURE0),w.imageAtlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE),k.updatePaintBuffers(f)):c&&(E||t.lineAtlas.dirty)&&(g.activeTexture.set(m.TEXTURE0),t.lineAtlas.bind(g)),S.draw(g,m.TRIANGLES,s,t.stencilModeForClipping(x),l,Oe.disabled,D,r.id,A.layoutVertexBuffer,A.indexBuffer,A.segments,r.paint,t.transform.zoom,k),v=!1}}}}}},fill:function(t,n,r,i){var o=r.paint.get("fill-color"),a=r.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=t.colorModeForRenderPass(),l=r.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(e.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){var u=t.depthModeForSublayer(1,"opaque"===t.renderPass?Se.ReadWrite:Se.ReadOnly);sr(t,n,r,i,u,s,!1)}if("translucent"===t.renderPass&&r.paint.get("fill-antialias")){var h=t.depthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,Se.ReadOnly);sr(t,n,r,i,h,s,!0)}}},"fill-extrusion":function(e,t,n,r){var i=n.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===e.renderPass){var o=new Se(e.context.gl.LEQUAL,Se.ReadWrite,e.depthRangeFor3D);if(1!==i||n.paint.get("fill-extrusion-pattern").constantOr(1))lr(e,t,n,r,o,Ce.disabled,Me.disabled),lr(e,t,n,r,o,e.stencilModeFor3D(),e.colorModeForRenderPass());else{var a=e.colorModeForRenderPass();lr(e,t,n,r,o,Ce.disabled,a)}}},hillshade:function(e,t,n,r){if("offscreen"===e.renderPass||"translucent"===e.renderPass){for(var i=e.context,o=t.getSource().maxzoom,a=e.depthModeForSublayer(0,Se.ReadOnly),s=e.colorModeForRenderPass(),l="translucent"===e.renderPass?e.stencilConfigForOverlap(r):[{},r],c=l[0],u=0,h=l[1];u<h.length;u+=1){var d=h[u],f=t.getTile(d);f.needsHillshadePrepare&&"offscreen"===e.renderPass?ur(e,f,n,o,a,Ce.disabled,s):"translucent"===e.renderPass&&cr(e,f,n,a,c[d.overscaledZ],s)}i.viewport.set([0,0,e.width,e.height])}},raster:function(e,t,n,r){if("translucent"===e.renderPass&&0!==n.paint.get("raster-opacity")&&r.length)for(var i=e.context,o=i.gl,a=t.getSource(),s=e.useProgram("raster"),l=e.colorModeForRenderPass(),c=a instanceof I?[{},r]:e.stencilConfigForOverlap(r),u=c[0],h=c[1],d=h[h.length-1].overscaledZ,f=!e.options.moving,p=0,g=h;p<g.length;p+=1){var m=g[p],v=e.depthModeForSublayer(m.overscaledZ-d,1===n.paint.get("raster-opacity")?Se.ReadWrite:Se.ReadOnly,o.LESS),y=t.getTile(m),b=e.transform.calculatePosMatrix(m.toUnwrapped(),f);y.registerFadeDuration(n.paint.get("raster-fade-duration"));var _=t.findLoadedParent(m,0),x=hr(y,_,t,n,e.transform),w=void 0,A=void 0,k="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;i.activeTexture.set(o.TEXTURE0),y.texture.bind(k,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(o.TEXTURE1),_?(_.texture.bind(k,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,_.tileID.overscaledZ-y.tileID.overscaledZ),A=[y.tileID.canonical.x*w%1,y.tileID.canonical.y*w%1]):y.texture.bind(k,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var T=$n(b,A||[0,0],w||1,x,n);a instanceof I?s.draw(i,o.TRIANGLES,v,Ce.disabled,l,Oe.disabled,T,n.id,a.boundsBuffer,e.quadTriangleIndexBuffer,a.boundsSegments):s.draw(i,o.TRIANGLES,v,u[m.overscaledZ],l,Oe.disabled,T,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}},background:function(e,t,n){var r=n.paint.get("background-color"),i=n.paint.get("background-opacity");if(0!==i){var o=e.context,a=o.gl,s=e.transform,l=s.tileSize,c=n.paint.get("background-pattern");if(!e.isPatternMissing(c)){var u=!c&&1===r.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===u){var h=Ce.disabled,d=e.depthModeForSublayer(0,"opaque"===u?Se.ReadWrite:Se.ReadOnly),f=e.colorModeForRenderPass(),p=e.useProgram(c?"backgroundPattern":"background"),g=s.coveringTiles({tileSize:l});c&&(o.activeTexture.set(a.TEXTURE0),e.imageManager.bind(e.context));for(var m=n.getCrossfadeParameters(),v=0,y=g;v<y.length;v+=1){var b=y[v],_=e.transform.calculatePosMatrix(b.toUnwrapped()),x=c?Jn(_,i,e,c,{tileID:b,tileSize:l},m):Kn(_,i,r);p.draw(o,a.TRIANGLES,d,h,f,Oe.disabled,x,n.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}}}},debug:function(e,t,n){for(var r=0;r<n.length;r++)xr(e,t,n[r])},custom:function(e,t,n){var r=e.context,i=n.implementation;if("offscreen"===e.renderPass){var o=i.prerender;o&&(e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),o.call(i,r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),r.setColorMode(e.colorModeForRenderPass()),r.setStencilMode(Ce.disabled);var a="3d"===i.renderingMode?new Se(e.context.gl.LEQUAL,Se.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Se.ReadOnly);r.setDepthMode(a),i.render(r.gl,e.transform.customLayerMatrix()),r.setDirty(),e.setBaseState(),r.bindFramebuffer.set(null)}}},Ar=function(e,t){this.context=new Le(e),this.transform=t,this._tileTextures={},this.setup(),this.numSublayers=De.maxUnderzooming+De.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vt,this.gpuTimers={}};Ar.prototype.resize=function(t,n){if(this.width=t*e.browser.devicePixelRatio,this.height=n*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var r=0,i=this.style._order;r<i.length;r+=1){var o=i[r];this.style._layers[o].resize()}},Ar.prototype.setup=function(){var t=this.context,n=new e.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(n,Yt.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var r=new e.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(e.EXTENT,0),r.emplaceBack(0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(r,Yt.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var i=new e.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(e.EXTENT,0,e.EXTENT,0),i.emplaceBack(0,e.EXTENT,0,e.EXTENT),i.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(i,D.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var o=new e.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,Yt.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var a=new e.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(a);var s=new e.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(s),this.emptyTexture=new e.Texture(t,{width:1,height:1,data:new Uint8Array([0,0,0,0])},t.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new Ce({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},Ar.prototype.clearStencil=function(){var t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var r=e.create();e.ortho(r,0,this.width,this.height,0,0,1),e.scale(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,Se.disabled,this.stencilClearMode,Me.disabled,Oe.disabled,zn(r),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Ar.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var n=this.context,r=n.gl;this.nextStencilID+t.length>256&&this.clearStencil(),n.setColorMode(Me.disabled),n.setDepthMode(Se.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;i.draw(n,r.TRIANGLES,Se.disabled,new Ce({func:r.ALWAYS,mask:0},l,255,r.KEEP,r.KEEP,r.REPLACE),Me.disabled,Oe.disabled,zn(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ar.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ce({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},Ar.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ce({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},Ar.prototype.stencilConfigForOverlap=function(e){var t,n=this.context.gl,r=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=r[r.length-1].overscaledZ,o=r[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+i]=new Ce({func:n.GEQUAL,mask:255},s+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=o,[a,r]}return[(t={},t[i]=Ce.disabled,t),r]},Ar.prototype.colorModeForRenderPass=function(){var t=this.context.gl;if(this._showOverdrawInspector){var n=1/8;return new Me([t.CONSTANT_COLOR,t.ONE],new e.Color(n,n,n,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?Me.unblended:Me.alphaBlended},Ar.prototype.depthModeForSublayer=function(e,t,n){if(!this.opaquePassEnabledForLayer())return Se.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Se(n||this.context.gl.LEQUAL,t,[r,r])},Ar.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Ar.prototype.render=function(t,n){var r=this;this.style=t,this.options=n,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var i=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var l,c,u={},h={},d={};for(var f in o){var p=o[f];u[f]=p.getVisibleCoordinates(),h[f]=u[f].slice().reverse(),d[f]=p.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var g=0;g<i.length;g++){var m=i[g];if(this.style._layers[m].is3D()){this.opaquePassCutoff=g;break}}this.renderPass="offscreen";for(var v=0,y=i;v<y.length;v+=1){var b=y[v],_=this.style._layers[b];if(_.hasOffscreenPass()&&!_.isHidden(this.transform.zoom)){var x=h[_.source];("custom"===_.type||x.length)&&this.renderLayer(this,o[_.source],_,x)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:n.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=n.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],A=o[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,A,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var T=this.style._layers[i[this.currentLayer]],S=o[T.source],E=("symbol"===T.type?d:h)[T.source];this._renderTileClippingMasks(T,u[T.source]),this.renderLayer(this,S,T,E)}this.options.showTileBoundaries&&(e.values(this.style._layers).forEach((function(e){e.source&&!e.isHidden(r.transform.zoom)&&(e.source!==(c&&c.id)&&(c=r.style.sourceCaches[e.source]),(!l||l.getSource().maxzoom<c.getSource().maxzoom)&&(l=c))})),l&&wr.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&vr(this),this.context.setDefault()},Ar.prototype.renderLayer=function(e,t,n,r){n.isHidden(this.transform.zoom)||("background"===n.type||"custom"===n.type||r.length)&&(this.id=n.id,this.gpuTimingStart(n),wr[n.type](e,t,n,r,this.style.placement.variableOffsets),this.gpuTimingEnd())},Ar.prototype.gpuTimingStart=function(e){if(this.options.gpuTiming){var t=this.context.extTimerQuery,n=this.gpuTimers[e.id];n||(n=this.gpuTimers[e.id]={calls:0,cpuTime:0,query:t.createQueryEXT()}),n.calls++,t.beginQueryEXT(t.TIME_ELAPSED_EXT,n.query)}},Ar.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var e=this.context.extTimerQuery;e.endQueryEXT(e.TIME_ELAPSED_EXT)}},Ar.prototype.collectGpuTimers=function(){var e=this.gpuTimers;return this.gpuTimers={},e},Ar.prototype.queryGpuTimers=function(e){var t={};for(var n in e){var r=e[n],i=this.context.extTimerQuery,o=i.getQueryObjectEXT(r.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(r.query),t[n]=o}return t},Ar.prototype.translatePosMatrix=function(t,n,r,i,o){if(!r[0]&&!r[1])return t;var a=o?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);r=[r[0]*l-r[1]*s,r[0]*s+r[1]*l]}var c=[o?r[0]:mt(n,r[0],this.transform.zoom),o?r[1]:mt(n,r[1],this.transform.zoom),0],u=new Float32Array(16);return e.translate(u,t,c),u},Ar.prototype.saveTileTexture=function(e){var t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]},Ar.prototype.getTileTexture=function(e){var t=this._tileTextures[e];return t&&t.length>0?t.pop():null},Ar.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n},Ar.prototype.useProgram=function(e,t){this.cache=this.cache||{};var n=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Tn(this.context,An[e],t,Qn[e],this._showOverdrawInspector)),this.cache[n]},Ar.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ar.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},Ar.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},Ar.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var kr=function(e,t){this.points=e,this.planes=t};kr.fromInvProjectionMatrix=function(t,n,r){var i=Math.pow(2,r),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(n){return e.transformMat4([],n,t)})).map((function(t){return e.scale$1([],t,1/t[3]/n*i)})),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var n=e.sub([],o[t[0]],o[t[1]]),r=e.sub([],o[t[2]],o[t[1]]),i=e.normalize([],e.cross([],n,r)),a=-e.dot(i,o[t[1]]);return i.concat(a)}));return new kr(o,a)};var Tr=function(t,n){this.min=t,this.max=n,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Tr.prototype.quadrant=function(t){for(var n=[t%2==0,t<2],r=e.clone$2(this.min),i=e.clone$2(this.max),o=0;o<n.length;o++)r[o]=n[o]?this.min[o]:this.center[o],i[o]=n[o]?this.center[o]:this.max[o];return i[2]=this.max[2],new Tr(r,i)},Tr.prototype.distanceX=function(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]},Tr.prototype.distanceY=function(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]},Tr.prototype.intersects=function(t){for(var n=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],r=!0,i=0;i<t.planes.length;i++){for(var o=t.planes[i],a=0,s=0;s<n.length;s++)a+=e.dot$1(o,n[s])>=0;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,h=0;h<t.points.length;h++){var d=t.points[h][l]-this.min[l];c=Math.min(c,d),u=Math.max(u,d)}if(u<0||c>this.max[l]-this.min[l])return 0}return 1};var Sr=function(e,t,n,r){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=r};Sr.prototype.interpolate=function(t,n,r){return null!=n.top&&null!=t.top&&(this.top=e.number(t.top,n.top,r)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,n.bottom,r)),null!=n.left&&null!=t.left&&(this.left=e.number(t.left,n.left,r)),null!=n.right&&null!=t.right&&(this.right=e.number(t.right,n.right,r)),this},Sr.prototype.getCenter=function(t,n){var r=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+n-this.bottom)/2,0,n);return new e.Point(r,i)},Sr.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},Sr.prototype.clone=function(){return new Sr(this.top,this.bottom,this.left,this.right)},Sr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Er=function(t,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Sr,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Er.prototype.clone=function(){var e=new Er(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},Cr.minZoom.get=function(){return this._minZoom},Cr.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},Cr.maxZoom.get=function(){return this._maxZoom},Cr.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},Cr.minPitch.get=function(){return this._minPitch},Cr.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},Cr.maxPitch.get=function(){return this._maxPitch},Cr.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},Cr.renderWorldCopies.get=function(){return this._renderWorldCopies},Cr.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},Cr.worldSize.get=function(){return this.tileSize*this.scale},Cr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cr.size.get=function(){return new e.Point(this.width,this.height)},Cr.bearing.get=function(){return-this.angle/Math.PI*180},Cr.bearing.set=function(t){var n=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cr.pitch.get=function(){return this._pitch/Math.PI*180},Cr.pitch.set=function(t){var n=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},Cr.fov.get=function(){return this._fov/Math.PI*180},Cr.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},Cr.zoom.get=function(){return this._zoom},Cr.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},Cr.center.get=function(){return this._center},Cr.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},Cr.padding.get=function(){return this._edgeInsets.toJSON()},Cr.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},Cr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Er.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},Er.prototype.interpolatePadding=function(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()},Er.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},Er.prototype.getVisibleUnwrappedCoordinates=function(t){var n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),o=this.pointCoordinate(new e.Point(this.width,this.height)),a=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),c=s-1;c<=l+1;c++)0!==c&&n.push(new e.UnwrappedTileID(c,t));return n},Er.prototype.coveringTiles=function(t){var n=this.coveringZoomLevel(t),r=n;if(void 0!==t.minzoom&&n<t.minzoom)return[];void 0!==t.maxzoom&&n>t.maxzoom&&(n=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,n),a=[o*i.x,o*i.y,0],s=kr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=n);var c=function(e){return{aabb:new Tr([e*o,0,0],[(e+1)*o,o,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},u=[],h=[],d=n,f=t.reparseOverscaled?r:n;if(this._renderWorldCopies)for(var p=1;p<=3;p++)u.push(c(-p)),u.push(c(p));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var b=g.aabb.intersects(s);if(0===b)continue;y=2===b}var _=g.aabb.distanceX(a),x=g.aabb.distanceY(a),w=Math.max(Math.abs(_),Math.abs(x)),A=3+(1<<d-g.zoom)-2;if(g.zoom===d||w>A&&g.zoom>=l)h.push({tileID:new e.OverscaledTileID(g.zoom===d?f:g.zoom,g.wrap,g.zoom,m,v),distanceSq:e.sqrLen([a[0]-.5-m,a[1]-.5-v])});else for(var k=0;k<4;k++){var T=(m<<1)+k%2,S=(v<<1)+(k>>1);u.push({aabb:g.aabb.quadrant(k),zoom:g.zoom+1,x:T,y:S,wrap:g.wrap,fullyVisible:y})}}return h.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},Er.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},Cr.unmodified.get=function(){return this._unmodified},Er.prototype.zoomScale=function(e){return Math.pow(2,e)},Er.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},Er.prototype.project=function(t){var n=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(n)*this.worldSize)},Er.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},Cr.point.get=function(){return this.project(this.center)},Er.prototype.setLocationAtPoint=function(t,n){var r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.MercatorCoordinate(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},Er.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},Er.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},Er.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},Er.prototype.coordinateLocation=function(e){return e.toLngLat()},Er.prototype.pointCoordinate=function(t){var n=[t.x,t.y,0,1],r=[t.x,t.y,1,1];e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(r,r,this.pixelMatrixInverse);var i=n[3],o=r[3],a=n[0]/i,s=r[0]/o,l=n[1]/i,c=r[1]/o,u=n[2]/i,h=r[2]/o,d=u===h?0:(0-u)/(h-u);return new e.MercatorCoordinate(e.number(a,s,d)/this.worldSize,e.number(l,c,d)/this.worldSize)},Er.prototype.coordinatePoint=function(t){var n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix),new e.Point(n[0]/n[3],n[1]/n[3])},Er.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},Er.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Er.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Er.prototype.calculatePosMatrix=function(t,n){void 0===n&&(n=!1);var r=t.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];var o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*a,o.y*a,0]),e.scale(l,l,[a/e.EXTENT,a/e.EXTENT,1]),e.multiply(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]},Er.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Er.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,n,r,i,o=-90,a=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var h=this.latRange;o=e.mercatorYfromLat(h[1])*this.worldSize,t=(a=e.mercatorYfromLat(h[0])*this.worldSize)-o<c.y?c.y/(a-o):0}if(this.lngRange){var d=this.lngRange;s=e.mercatorXfromLng(d[0])*this.worldSize,n=(l=e.mercatorXfromLng(d[1])*this.worldSize)-s<c.x?c.x/(l-s):0}var f=this.point,p=Math.max(n||0,t||0);if(p)return this.center=this.unproject(new e.Point(n?(l+s)/2:f.x,t?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(p),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var g=f.y,m=c.y/2;g-m<o&&(i=o+m),g+m>a&&(i=a-m)}if(this.lngRange){var v=f.x,y=c.x/2;v-y<s&&(r=s+y),v+y>l&&(r=l-y)}void 0===r&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==r?r:f.x,void 0!==i?i:f.y))),this._unmodified=u,this._constraining=!1}},Er.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var r=Math.PI/2+this._pitch,i=this._fov*(.5+n.y/this.height),o=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-r-i,.01,Math.PI-.01)),a=this.point,s=a.x,l=a.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance),u=this.height/50,h=new Float64Array(16);e.perspective(h,this._fov,this.width/this.height,u,c),h[8]=2*-n.x/this.width,h[9]=2*n.y/this.height,e.scale(h,h,[1,-1,1]),e.translate(h,h,[0,0,-this.cameraToCenterDistance]),e.rotateX(h,h,this._pitch),e.rotateZ(h,h,this.angle),e.translate(h,h,[-s,-l,0]),this.mercatorMatrix=e.scale([],h,[this.worldSize,this.worldSize,this.worldSize]),e.scale(h,h,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=h,this.invProjMatrix=e.invert([],this.projMatrix);var d=this.width%2/2,f=this.height%2/2,p=Math.cos(this.angle),g=Math.sin(this.angle),m=s-Math.round(s)+p*d+g*f,v=l-Math.round(l)+p*f+g*d,y=new Float64Array(h);if(e.translate(y,y,[m>.5?m-1:m,v>.5?v-1:v,0]),this.alignedProjMatrix=y,h=e.create(),e.scale(h,h,[this.width/2,-this.height/2,1]),e.translate(h,h,[1,-1,0]),this.labelPlaneMatrix=h,h=e.create(),e.scale(h,h,[1,-1,1]),e.translate(h,h,[-1,-1,0]),e.scale(h,h,[2/this.width,2/this.height,1]),this.glCoordMatrix=h,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(h=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=h,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Er.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},Er.prototype.getCameraPoint=function(){var t=this._pitch,n=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,n))},Er.prototype.getCameraQueryGeometry=function(t){var n=this.getCameraPoint();if(1===t.length)return[t[0],n];for(var r=n.x,i=n.y,o=n.x,a=n.y,s=0,l=t;s<l.length;s+=1){var c=l[s];r=Math.min(r,c.x),i=Math.min(i,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y)}return[new e.Point(r,i),new e.Point(o,i),new e.Point(o,a),new e.Point(r,a),new e.Point(r,i)]},Object.defineProperties(Er.prototype,Cr);var Mr=function(t){var n,r,i,o,a;this._hashName=t&&encodeURIComponent(t),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(n=this._updateHashUnthrottled.bind(this),r=300,i=!1,o=null,a=function(){o=null,i&&(n(),o=setTimeout(a,r),i=!1)},function(){return i=!0,o||a(),o})};Mr.prototype.addTo=function(t){return this._map=t,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Mr.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Mr.prototype.getHashString=function(t){var n=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,i),a=Math.round(n.lng*o)/o,s=Math.round(n.lat*o)/o,l=this._map.getBearing(),c=this._map.getPitch(),u="";if(u+=t?"/"+a+"/"+s+"/"+r:r+"/"+s+"/"+a,(l||c)&&(u+="/"+Math.round(10*l)/10),c&&(u+="/"+Math.round(c)),this._hashName){var h=this._hashName,d=!1,f=e.window.location.hash.slice(1).split("&").map((function(e){var t=e.split("=")[0];return t===h?(d=!0,t+"="+u):e})).filter((function(e){return e}));return d||f.push(h+"="+u),"#"+f.join("&")}return"#"+u},Mr.prototype._getCurrentHash=function(){var t,n=this,r=e.window.location.hash.replace("#","");return this._hashName?(r.split("&").map((function(e){return e.split("=")})).forEach((function(e){e[0]===n._hashName&&(t=e)})),(t&&t[1]||"").split("/")):r.split("/")},Mr.prototype._onHashChange=function(){var e=this._getCurrentHash();if(e.length>=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},Mr.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(e){}};var Or={linearity:.3,easing:e.bezier(0,0,.3,1)},Lr=e.extend({deceleration:2500,maxSpeed:1400},Or),Dr=e.extend({deceleration:20,maxSpeed:1400},Or),Ir=e.extend({deceleration:1e3,maxSpeed:360},Or),Rr=e.extend({deceleration:1e3,maxSpeed:90},Or),Pr=function(e){this._map=e,this.clear()};function Nr(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function zr(t,n,r){var i=r.maxSpeed,o=r.linearity,a=r.deceleration,s=e.clamp(t*o/(n/1e3),-i,i),l=Math.abs(s)/(a*o);return{easing:r.easing,duration:1e3*l,amount:s*(l/2)}}Pr.prototype.clear=function(){this._inertiaBuffer=[]},Pr.prototype.record=function(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:t})},Pr.prototype._drainInertiaBuffer=function(){for(var t=this._inertiaBuffer,n=e.browser.now();t.length>0&&n-t[0].time>160;)t.shift()},Pr.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},r=0,i=this._inertiaBuffer;r<i.length;r+=1){var o=i[r].settings;n.zoom+=o.zoomDelta||0,n.bearing+=o.bearingDelta||0,n.pitch+=o.pitchDelta||0,o.panDelta&&n.pan._add(o.panDelta),o.around&&(n.around=o.around),o.pinchAround&&(n.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(n.pan.mag()){var l=zr(n.pan.mag(),a,e.extend({},Lr,t||{}));s.offset=n.pan.mult(l.amount/n.pan.mag()),s.center=this._map.transform.center,Nr(s,l)}if(n.zoom){var c=zr(n.zoom,a,Dr);s.zoom=this._map.transform.zoom+c.amount,Nr(s,c)}if(n.bearing){var u=zr(n.bearing,a,Ir);s.bearing=this._map.transform.bearing+e.clamp(u.amount,-179,179),Nr(s,u)}if(n.pitch){var h=zr(n.pitch,a,Rr);s.pitch=this._map.transform.pitch+h.amount,Nr(s,h)}if(s.zoom||s.bearing){var d=void 0===n.pinchAround?n.around:n.pinchAround;s.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),e.extend(s,{noMoveStart:!0})}};var Fr=function(t){function r(r,i,o,a){void 0===a&&(a={});var s=n.mousePos(i.getCanvasContainer(),o),l=i.unproject(s);t.call(this,r,e.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=i}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(e.Event),Br=function(t){function r(r,i,o){var a="touchend"===r?o.changedTouches:o.touches,s=n.touchPos(i.getCanvasContainer(),a),l=s.map((function(e){return i.unproject(e)})),c=s.reduce((function(e,t,n,r){return e.add(t.div(r.length))}),new e.Point(0,0)),u=i.unproject(c);t.call(this,r,{points:s,point:c,lngLats:l,lngLat:u,originalEvent:o}),this._defaultPrevented=!1}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var i={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,i),r}(e.Event),jr=function(e){function t(t,n,r){e.call(this,t,{originalEvent:r}),this._defaultPrevented=!1}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={defaultPrevented:{configurable:!0}};return t.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,n),t}(e.Event),Ur=function(e,t){this._map=e,this._clickTolerance=t.clickTolerance};Ur.prototype.reset=function(){delete this._mousedownPos},Ur.prototype.wheel=function(e){return this._firePreventable(new jr(e.type,this._map,e))},Ur.prototype.mousedown=function(e,t){return this._mousedownPos=t,this._firePreventable(new Fr(e.type,this._map,e))},Ur.prototype.mouseup=function(e){this._map.fire(new Fr(e.type,this._map,e))},Ur.prototype.click=function(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new Fr(e.type,this._map,e))},Ur.prototype.dblclick=function(e){return this._firePreventable(new Fr(e.type,this._map,e))},Ur.prototype.mouseover=function(e){this._map.fire(new Fr(e.type,this._map,e))},Ur.prototype.mouseout=function(e){this._map.fire(new Fr(e.type,this._map,e))},Ur.prototype.touchstart=function(e){return this._firePreventable(new Br(e.type,this._map,e))},Ur.prototype.touchmove=function(e){this._map.fire(new Br(e.type,this._map,e))},Ur.prototype.touchend=function(e){this._map.fire(new Br(e.type,this._map,e))},Ur.prototype.touchcancel=function(e){this._map.fire(new Br(e.type,this._map,e))},Ur.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Ur.prototype.isEnabled=function(){return!0},Ur.prototype.isActive=function(){return!1},Ur.prototype.enable=function(){},Ur.prototype.disable=function(){};var Vr=function(e){this._map=e};Vr.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Vr.prototype.mousemove=function(e){this._map.fire(new Fr(e.type,this._map,e))},Vr.prototype.mousedown=function(){this._delayContextMenu=!0},Vr.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Fr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Vr.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new Fr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Vr.prototype.isEnabled=function(){return!0},Vr.prototype.isActive=function(){return!1},Vr.prototype.enable=function(){},Vr.prototype.disable=function(){};var qr=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Hr(e,t){for(var n={},r=0;r<e.length;r++)n[e[r].identifier]=t[r];return n}qr.prototype.isEnabled=function(){return!!this._enabled},qr.prototype.isActive=function(){return!!this._active},qr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},qr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},qr.prototype.mousedown=function(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(n.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)},qr.prototype.mousemoveWindow=function(e,t){if(this._active){var r=t;if(!(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=r,this._box||(this._box=n.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",e));var o=Math.min(i.x,r.x),a=Math.max(i.x,r.x),s=Math.min(i.y,r.y),l=Math.max(i.y,r.y);n.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=l-s+"px"}}},qr.prototype.mouseupWindow=function(t,r){var i=this;if(this._active&&0===t.button){var o=this._startPos,a=r;if(this.reset(),n.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new e.Event("boxzoomend",{originalEvent:t})),{cameraAnimation:function(e){return e.fitScreenCoordinates(o,a,i._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",t)}},qr.prototype.keydown=function(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))},qr.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos},qr.prototype._fireEvent=function(t,n){return this._map.fire(new e.Event(t,{originalEvent:n}))};var $r=function(e){this.reset(),this.numTouches=e.numTouches};$r.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},$r.prototype.touchstart=function(t,n,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=function(t){for(var n=new e.Point(0,0),r=0,i=t;r<i.length;r+=1){var o=i[r];n._add(o)}return n.div(t.length)}(n),this.touches=Hr(r,n)))},$r.prototype.touchmove=function(e,t,n){if(!this.aborted&&this.centroid){var r=Hr(n,t);for(var i in this.touches){var o=this.touches[i],a=r[i];(!a||a.dist(o)>30)&&(this.aborted=!0)}}},$r.prototype.touchend=function(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}};var Wr=function(e){this.singleTap=new $r(e),this.numTaps=e.numTaps,this.reset()};Wr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Wr.prototype.touchstart=function(e,t,n){this.singleTap.touchstart(e,t,n)},Wr.prototype.touchmove=function(e,t,n){this.singleTap.touchmove(e,t,n)},Wr.prototype.touchend=function(e,t,n){var r=this.singleTap.touchend(e,t,n);if(r){var i=e.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(i&&o||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}};var Gr=function(){this._zoomIn=new Wr({numTouches:1,numTaps:2}),this._zoomOut=new Wr({numTouches:2,numTaps:1}),this.reset()};Gr.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gr.prototype.touchstart=function(e,t,n){this._zoomIn.touchstart(e,t,n),this._zoomOut.touchstart(e,t,n)},Gr.prototype.touchmove=function(e,t,n){this._zoomIn.touchmove(e,t,n),this._zoomOut.touchmove(e,t,n)},Gr.prototype.touchend=function(e,t,n){var r=this,i=this._zoomIn.touchend(e,t,n),o=this._zoomOut.touchend(e,t,n);return i?(this._active=!0,e.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}}):o?(this._active=!0,e.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(o)},{originalEvent:e})}}):void 0},Gr.prototype.touchcancel=function(){this.reset()},Gr.prototype.enable=function(){this._enabled=!0},Gr.prototype.disable=function(){this._enabled=!1,this.reset()},Gr.prototype.isEnabled=function(){return this._enabled},Gr.prototype.isActive=function(){return this._active};var Yr=function(e){this.reset(),this._clickTolerance=e.clickTolerance||1};Yr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yr.prototype._correctButton=function(e,t){return!1},Yr.prototype._move=function(e,t){return{}},Yr.prototype.mousedown=function(e,t){if(!this._lastPoint){var r=n.mouseButton(e);this._correctButton(e,r)&&(this._lastPoint=t,this._eventButton=r)}},Yr.prototype.mousemoveWindow=function(e,t){var n=this._lastPoint;if(n&&(e.preventDefault(),this._moved||!(t.dist(n)<this._clickTolerance)))return this._moved=!0,this._lastPoint=t,this._move(n,t)},Yr.prototype.mouseupWindow=function(e){n.mouseButton(e)===this._eventButton&&(this._moved&&n.suppressClick(),this.reset())},Yr.prototype.enable=function(){this._enabled=!0},Yr.prototype.disable=function(){this._enabled=!1,this.reset()},Yr.prototype.isEnabled=function(){return this._enabled},Yr.prototype.isActive=function(){return this._active};var Xr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.mousedown=function(t,n){e.prototype.mousedown.call(this,t,n),this._lastPoint&&(this._active=!0)},t.prototype._correctButton=function(e,t){return 0===t&&!e.ctrlKey},t.prototype._move=function(e,t){return{around:t,panDelta:t.sub(e)}},t}(Yr),Zr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._correctButton=function(e,t){return 0===t&&e.ctrlKey||2===t},t.prototype._move=function(e,t){var n=.8*(t.x-e.x);if(n)return this._active=!0,{bearingDelta:n}},t.prototype.contextmenu=function(e){e.preventDefault()},t}(Yr),Kr=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._correctButton=function(e,t){return 0===t&&e.ctrlKey||2===t},t.prototype._move=function(e,t){var n=-.5*(t.y-e.y);if(n)return this._active=!0,{pitchDelta:n}},t.prototype.contextmenu=function(e){e.preventDefault()},t}(Yr),Jr=function(e){this._minTouches=1,this._clickTolerance=e.clickTolerance||1,this.reset()};Jr.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},Jr.prototype.touchstart=function(e,t,n){return this._calculateTransform(e,t,n)},Jr.prototype.touchmove=function(e,t,n){if(this._active)return e.preventDefault(),this._calculateTransform(e,t,n)},Jr.prototype.touchend=function(e,t,n){this._calculateTransform(e,t,n),this._active&&n.length<this._minTouches&&this.reset()},Jr.prototype.touchcancel=function(){this.reset()},Jr.prototype._calculateTransform=function(t,n,r){r.length>0&&(this._active=!0);var i=Hr(r,n),o=new e.Point(0,0),a=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(o._add(c),a._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(s<this._minTouches)&&a.mag()){var h=a.div(s);if(this._sum._add(h),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:h}}},Jr.prototype.enable=function(){this._enabled=!0},Jr.prototype.disable=function(){this._enabled=!1,this.reset()},Jr.prototype.isEnabled=function(){return this._enabled},Jr.prototype.isActive=function(){return this._active};var Qr=function(){this.reset()};function ei(e,t,n){for(var r=0;r<e.length;r++)if(e[r].identifier===n)return t[r]}Qr.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Qr.prototype._start=function(e){},Qr.prototype._move=function(e,t,n){return{}},Qr.prototype.touchstart=function(e,t,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([t[0],t[1]]))},Qr.prototype.touchmove=function(e,t,n){if(this._firstTwoTouches){e.preventDefault();var r=this._firstTwoTouches,i=r[0],o=r[1],a=ei(n,t,i),s=ei(n,t,o);if(a&&s){var l=this._aroundCenter?null:a.add(s).div(2);return this._move([a,s],l,e)}}},Qr.prototype.touchend=function(e,t,r){if(this._firstTwoTouches){var i=this._firstTwoTouches,o=i[0],a=i[1],s=ei(r,t,o),l=ei(r,t,a);s&&l||(this._active&&n.suppressClick(),this.reset())}},Qr.prototype.touchcancel=function(){this.reset()},Qr.prototype.enable=function(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around},Qr.prototype.disable=function(){this._enabled=!1,this.reset()},Qr.prototype.isEnabled=function(){return this._enabled},Qr.prototype.isActive=function(){return this._active};function ti(e,t){return Math.log(e/t)/Math.LN2}var ni=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),delete this._distance,delete this._startDistance},t.prototype._start=function(e){this._startDistance=this._distance=e[0].dist(e[1])},t.prototype._move=function(e,t){var n=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(ti(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ti(this._distance,n),pinchAround:t}},t}(Qr);function ri(e,t){return 180*e.angleWith(t)/Math.PI}var ii=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},t.prototype._start=function(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])},t.prototype._move=function(e,t){var n=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ri(this._vector,n),pinchAround:t}},t.prototype._isBelowThreshold=function(e){this._minDiameter=Math.min(this._minDiameter,e.mag());var t=25/(Math.PI*this._minDiameter)*360,n=ri(e,this._startVector);return Math.abs(n)<t},t}(Qr);function oi(e){return Math.abs(e.y)>Math.abs(e.x)}var ai=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,oi(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,n){var r=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,n){if(void 0!==this._valid)return this._valid;var r=e.mag()>=2,i=t.mag()>=2;if(r||i){if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=e.y>0==t.y>0;return oi(e)&&oi(t)&&o}},t}(Qr),si={panStep:100,bearingStep:15,pitchStep:10},li=function(){var e=si;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep};function ci(e){return e*(2-e)}li.prototype.reset=function(){this._active=!1},li.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var n=0,r=0,i=0,o=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ci,zoom:n?Math.round(l)+n*(e.shiftKey?2:1):l,bearing:s.getBearing()+r*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-o*t._panStep,-a*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ui=4.000244140625,hi=function(t,n){this._map=t,this._el=t.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};hi.prototype.setZoomRate=function(e){this._defaultZoomRate=e},hi.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},hi.prototype.isEnabled=function(){return!!this._enabled},hi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},hi.prototype.isZooming=function(){return!!this._zooming},hi.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},hi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},hi.prototype.wheel=function(t){if(this.isEnabled()){var n=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,r=e.browser.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%ui==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}},hi.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},hi.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var r=n.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},hi.prototype.renderFrame=function(){return this._onScrollFrame()},hi.prototype._onScrollFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>ui?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var h=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),d=c(h);a=e.number(l,s,d),h<1?this._frameId||(this._frameId=!0):u=!0}else a=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:a-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},hi.prototype._smoothOutEasing=function(t){var n=e.ease;if(this._prevEase){var r=this._prevEase,i=(e.browser.now()-r.start)/r.duration,o=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);n=e.bezier(a,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:n},n},hi.prototype.reset=function(){this._active=!1};var di=function(e,t){this._clickZoom=e,this._tapZoom=t};di.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},di.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},di.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},di.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var fi=function(){this.reset()};fi.prototype.reset=function(){this._active=!1},fi.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(e.shiftKey?-1:1),around:n.unproject(t)},{originalEvent:e})}}},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var pi=function(){this._tap=new Wr({numTouches:1,numTaps:1}),this.reset()};pi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},pi.prototype.touchstart=function(e,t,n){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=t[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(e,t,n))},pi.prototype.touchmove=function(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var r=t[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,n)},pi.prototype.touchend=function(e,t,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(e,t,n)&&(this._tapTime=e.timeStamp)},pi.prototype.touchcancel=function(){this.reset()},pi.prototype.enable=function(){this._enabled=!0},pi.prototype.disable=function(){this._enabled=!1,this.reset()},pi.prototype.isEnabled=function(){return this._enabled},pi.prototype.isActive=function(){return this._active};var gi=function(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n};gi.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},gi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},gi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},gi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var mi=function(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n};mi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},mi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},mi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},mi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var vi=function(e,t,n,r){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0};vi.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},vi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},vi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},vi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},vi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},vi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var yi=function(e){return e.zoom||e.drag||e.pitch||e.rotate},bi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function _i(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var xi=function(t,r){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pr(t),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],l=s[0],c=s[1],u=s[2];n.addEventListener(l,c,l===e.window.document?this.handleWindowEvent:this.handleEvent,u)}};xi.prototype.destroy=function(){for(var t=0,r=this._listeners;t<r.length;t+=1){var i=r[t],o=i[0],a=i[1],s=i[2];n.removeEventListener(o,a,o===e.window.document?this.handleWindowEvent:this.handleEvent,s)}},xi.prototype._addDefaultHandlers=function(e){var t=this._map,n=t.getCanvasContainer();this._add("mapEvent",new Ur(t,e));var r=t.boxZoom=new qr(t,e);this._add("boxZoom",r);var i=new Gr,o=new fi;t.doubleClickZoom=new di(o,i),this._add("tapZoom",i),this._add("clickZoom",o);var a=new pi;this._add("tapDragZoom",a);var s=t.touchPitch=new ai;this._add("touchPitch",s);var l=new Zr(e),c=new Kr(e);t.dragRotate=new mi(e,l,c),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]);var u=new Xr(e),h=new Jr(e);t.dragPan=new gi(n,u,h),this._add("mousePan",u),this._add("touchPan",h,["touchZoom","touchRotate"]);var d=new ii,f=new ni;t.touchZoomRotate=new vi(n,f,d,a),this._add("touchRotate",d,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]);var p=t.scrollZoom=new hi(t,this);this._add("scrollZoom",p,["mousePan"]);var g=t.keyboard=new li;this._add("keyboard",g),this._add("blockableMapEvent",new Vr(t));for(var m=0,v=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];m<v.length;m+=1){var y=v[m];e.interactive&&e[y]&&t[y].enable(e[y])}},xi.prototype._add=function(e,t,n){this._handlers.push({handlerName:e,handler:t,allowed:n}),this._handlersById[e]=t},xi.prototype.stop=function(){if(!this._updatingCamera){for(var e=0,t=this._handlers;e<t.length;e+=1)t[e].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},xi.prototype.isActive=function(){for(var e=0,t=this._handlers;e<t.length;e+=1)if(t[e].handler.isActive())return!0;return!1},xi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},xi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},xi.prototype.isMoving=function(){return Boolean(yi(this._eventsInProgress))||this.isZooming()},xi.prototype._blockedByActive=function(e,t,n){for(var r in e)if(r!==n&&(!t||t.indexOf(r)<0))return!0;return!1},xi.prototype.handleWindowEvent=function(e){this.handleEvent(e,e.type+"Window")},xi.prototype._getMapTouches=function(e){for(var t=[],n=0,r=e;n<r.length;n+=1){var i=r[n],o=i.target;this._el.contains(o)&&t.push(i)}return t},xi.prototype.handleEvent=function(e,t){if("blur"!==e.type){this._updatingCamera=!0;for(var r="renderFrame"===e.type?void 0:e,i={needsRenderFrame:!1},o={},a={},s=e.touches?this._getMapTouches(e.touches):void 0,l=s?n.touchPos(this._el,s):n.mousePos(this._el,e),c=0,u=this._handlers;c<u.length;c+=1){var h=u[c],d=h.handlerName,f=h.handler,p=h.allowed;if(f.isEnabled()){var g=void 0;this._blockedByActive(a,p,d)?f.reset():f[t||e.type]&&(g=f[t||e.type](e,l,s),this.mergeHandlerResult(i,o,g,d,r),g&&g.needsRenderFrame&&this._triggerRenderFrame()),(g||f.isActive())&&(a[d]=f)}}var m={};for(var v in this._previousActiveHandlers)a[v]||(m[v]=r);this._previousActiveHandlers=a,(Object.keys(m).length||_i(i))&&(this._changes.push([i,o,m]),this._triggerRenderFrame()),(Object.keys(a).length||_i(i))&&this._map._stop(!0),this._updatingCamera=!1;var y=i.cameraAnimation;y&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],y(this._map))}else this.stop()},xi.prototype.mergeHandlerResult=function(t,n,r,i,o){if(r){e.extend(t,r);var a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}},xi.prototype._applyChanges=function(){for(var t={},n={},r={},i=0,o=this._changes;i<o.length;i+=1){var a=o[i],s=a[0],l=a[1],c=a[2];s.panDelta&&(t.panDelta=(t.panDelta||new e.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(t.around=s.around),void 0!==s.pinchAround&&(t.pinchAround=s.pinchAround),s.noInertia&&(t.noInertia=s.noInertia),e.extend(n,l),e.extend(r,c)}this._updateMapTransform(t,n,r),this._changes=[]},xi.prototype._updateMapTransform=function(e,t,n){var r=this._map,i=r.transform;if(!_i(e))return this._fireEvents(t,n);var o=e.panDelta,a=e.zoomDelta,s=e.bearingDelta,l=e.pitchDelta,c=e.around,u=e.pinchAround;void 0!==u&&(c=u),r._stop(!0),c=c||r.transform.centerPoint;var h=i.pointLocation(o?c.sub(o):c);s&&(i.bearing+=s),l&&(i.pitch+=l),a&&(i.zoom+=a),i.setLocationAtPoint(h,c),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,n)},xi.prototype._fireEvents=function(t,n){var r=this,i=yi(this._eventsInProgress),o=yi(t),a={};for(var s in t){var l=t[s].originalEvent;this._eventsInProgress[s]||(a[s+"start"]=l),this._eventsInProgress[s]=t[s]}for(var c in!i&&o&&this._fireEvent("movestart",o.originalEvent),a)this._fireEvent(c,a[c]);for(var u in t.rotate&&(this._bearingChanged=!0),o&&this._fireEvent("move",o.originalEvent),t){var h=t[u].originalEvent;this._fireEvent(u,h)}var d,f={};for(var p in this._eventsInProgress){var g=this._eventsInProgress[p],m=g.handlerName,v=g.originalEvent;this._handlersById[m].isActive()||(delete this._eventsInProgress[p],d=n[m]||v,f[p+"end"]=d)}for(var y in f)this._fireEvent(y,f[y]);var b=yi(this._eventsInProgress);if((i||o)&&!b){this._updatingCamera=!0;var _=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),x=function(e){return 0!==e&&-r._bearingSnap<e&&e<r._bearingSnap};_?(x(_.bearing||this._map.getBearing())&&(_.bearing=0),this._map.easeTo(_,{originalEvent:d})):(this._map.fire(new e.Event("moveend",{originalEvent:d})),x(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},xi.prototype._fireEvent=function(t,n){this._map.fire(new e.Event(t,n?{originalEvent:n}:{}))},xi.prototype._triggerRenderFrame=function(){var e=this;void 0===this._frameId&&(this._frameId=this._map._requestRenderFrame((function(t){delete e._frameId,e.handleEvent(new bi("renderFrame",{timeStamp:t})),e._applyChanges()})))};var wi=function(t){function n(n,r){t.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=r.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},n.prototype.setCenter=function(e,t){return this.jumpTo({center:e},t)},n.prototype.panBy=function(t,n,r){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},n),r)},n.prototype.panTo=function(t,n,r){return this.easeTo(e.extend({center:t},n),r)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(e,t){return this.jumpTo({zoom:e},t),this},n.prototype.zoomTo=function(t,n,r){return this.easeTo(e.extend({zoom:t},n),r)},n.prototype.zoomIn=function(e,t){return this.zoomTo(this.getZoom()+1,e,t),this},n.prototype.zoomOut=function(e,t){return this.zoomTo(this.getZoom()-1,e,t),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(e,t){return this.jumpTo({bearing:e},t),this},n.prototype.getPadding=function(){return this.transform.padding},n.prototype.setPadding=function(e,t){return this.jumpTo({padding:e},t),this},n.prototype.rotateTo=function(t,n,r){return this.easeTo(e.extend({bearing:t},n),r)},n.prototype.resetNorth=function(t,n){return this.rotateTo(0,e.extend({duration:1e3},t),n),this},n.prototype.resetNorthPitch=function(t,n){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),n),this},n.prototype.snapToNorth=function(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this},n.prototype.getPitch=function(){return this.transform.pitch},n.prototype.setPitch=function(e,t){return this.jumpTo({pitch:e},t),this},n.prototype.cameraForBounds=function(t,n){return t=e.LngLatBounds.convert(t),this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),0,n)},n.prototype._cameraForBoxAndBearing=function(t,n,r,i){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(i=e.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var a=i.padding;i.padding={top:a,bottom:a,right:a,left:a}}i.padding=e.extend(o,i.padding);var s=this.transform,l=s.padding,c=s.project(e.LngLat.convert(t)),u=s.project(e.LngLat.convert(n)),h=c.rotate(-r*Math.PI/180),d=u.rotate(-r*Math.PI/180),f=new e.Point(Math.max(h.x,d.x),Math.max(h.y,d.y)),p=new e.Point(Math.min(h.x,d.x),Math.min(h.y,d.y)),g=f.sub(p),m=(s.width-(l.left+l.right+i.padding.left+i.padding.right))/g.x,v=(s.height-(l.top+l.bottom+i.padding.top+i.padding.bottom))/g.y;if(!(v<0||m<0)){var y=Math.min(s.scaleZoom(s.scale*Math.min(m,v)),i.maxZoom),b=e.Point.convert(i.offset),_=(i.padding.left-i.padding.right)/2,x=(i.padding.top-i.padding.bottom)/2,w=new e.Point(b.x+_,b.y+x).mult(s.scale/s.zoomScale(y));return{center:s.unproject(c.add(u).div(2).sub(w)),zoom:y,bearing:r}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},n.prototype.fitBounds=function(e,t,n){return this._fitInternal(this.cameraForBounds(e,t),t,n)},n.prototype.fitScreenCoordinates=function(t,n,r,i,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(t)),this.transform.pointLocation(e.Point.convert(n)),r,i),i,o)},n.prototype._fitInternal=function(t,n,r){return t?(delete(n=e.extend(t,n)).padding,n.linear?this.easeTo(n,r):this.flyTo(n,r)):this},n.prototype.jumpTo=function(t,n){this.stop();var r=this.transform,i=!1,o=!1,a=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(i=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=e.LngLat.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(o=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(a=!0,r.pitch=+t.pitch),null==t.padding||r.isPaddingEqual(t.padding)||(r.padding=t.padding),this.fire(new e.Event("movestart",n)).fire(new e.Event("move",n)),i&&this.fire(new e.Event("zoomstart",n)).fire(new e.Event("zoom",n)).fire(new e.Event("zoomend",n)),o&&this.fire(new e.Event("rotatestart",n)).fire(new e.Event("rotate",n)).fire(new e.Event("rotateend",n)),a&&this.fire(new e.Event("pitchstart",n)).fire(new e.Event("pitch",n)).fire(new e.Event("pitchend",n)),this.fire(new e.Event("moveend",n))},n.prototype.easeTo=function(t,n){var r=this;this._stop(!1,t.easeId),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||!t.essential&&e.browser.prefersReducedMotion)&&(t.duration=0);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=this.getPadding(),c="zoom"in t?+t.zoom:o,u="bearing"in t?this._normalizeBearing(t.bearing,a):a,h="pitch"in t?+t.pitch:s,d="padding"in t?t.padding:i.padding,f=e.Point.convert(t.offset),p=i.centerPoint.add(f),g=i.pointLocation(p),m=e.LngLat.convert(t.center||g);this._normalizeCenter(m);var v,y,b=i.project(g),_=i.project(m).sub(b),x=i.zoomScale(c-o);t.around&&(v=e.LngLat.convert(t.around),y=i.locationPoint(v));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||c!==o,this._rotating=this._rotating||a!==u,this._pitching=this._pitching||h!==s,this._padding=!i.isPaddingEqual(d),this._easeId=t.easeId,this._prepareEase(n,t.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease((function(t){if(r._zooming&&(i.zoom=e.number(o,c,t)),r._rotating&&(i.bearing=e.number(a,u,t)),r._pitching&&(i.pitch=e.number(s,h,t)),r._padding&&(i.interpolatePadding(l,d,t),p=i.centerPoint.add(f)),v)i.setLocationAtPoint(v,y);else{var g=i.zoomScale(i.zoom-o),m=c>o?Math.min(2,x):Math.max(.5,x),w=Math.pow(m,1-t),A=i.unproject(b.add(_.mult(t*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?A.wrap():A,p)}r._fireMoveEvents(n)}),(function(e){r._afterEase(n,e)}),t),this},n.prototype._prepareEase=function(t,n,r){void 0===r&&(r={}),this._moving=!0,n||r.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.Event("pitchstart",t))},n.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},n.prototype._afterEase=function(t,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},n.prototype.flyTo=function(t,n){var r=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,o.minZoom,o.maxZoom):a,h="bearing"in t?this._normalizeBearing(t.bearing,s):s,d="pitch"in t?+t.pitch:l,f="padding"in t?t.padding:o.padding,p=o.zoomScale(u-a),g=e.Point.convert(t.offset),m=o.centerPoint.add(g),v=o.pointLocation(m),y=e.LngLat.convert(t.center||v);this._normalizeCenter(y);var b=o.project(v),_=o.project(y).sub(b),x=t.curve,w=Math.max(o.width,o.height),A=w/p,k=_.mag();if("minZoom"in t){var T=e.clamp(Math.min(t.minZoom,a,u),o.minZoom,o.maxZoom),S=w/o.zoomScale(T-a);x=Math.sqrt(S/k*2)}var E=x*x;function C(e){var t=(A*A-w*w+(e?-1:1)*E*E*k*k)/(2*(e?A:w)*E*k);return Math.log(Math.sqrt(t*t+1)-t)}function M(e){return(Math.exp(e)-Math.exp(-e))/2}function O(e){return(Math.exp(e)+Math.exp(-e))/2}var L=C(0),D=function(e){return O(L)/O(L+x*e)},I=function(e){return w*((O(L)*(M(t=L+x*e)/O(t))-M(L))/E)/k;var t},R=(C(1)-L)/x;if(Math.abs(k)<1e-6||!isFinite(R)){if(Math.abs(w-A)<1e-6)return this.easeTo(t,n);var P=A<w?-1:1;R=Math.abs(Math.log(A/w))/x,I=function(){return 0},D=function(e){return Math.exp(P*x*e)}}if("duration"in t)t.duration=+t.duration;else{var N="screenSpeed"in t?+t.screenSpeed/x:+t.speed;t.duration=1e3*R/N}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=d!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(n,!1),this._ease((function(t){var i=t*R,p=1/D(i);o.zoom=1===t?u:a+o.scaleZoom(p),r._rotating&&(o.bearing=e.number(s,h,t)),r._pitching&&(o.pitch=e.number(l,d,t)),r._padding&&(o.interpolatePadding(c,f,t),m=o.centerPoint.add(g));var v=1===t?y:o.unproject(b.add(_.mult(I(i))).mult(p));o.setLocationAtPoint(o.renderWorldCopies?v.wrap():v,m),r._fireMoveEvents(n)}),(function(){return r._afterEase(n)}),t),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,t)}if(!e){var r=this.handlers;r&&r.stop()}return this},n.prototype._ease=function(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.browser.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(t,n){t=e.wrap(t,-180,180);var r=Math.abs(t-n);return Math.abs(t-360-n)<r&&(t-=360),Math.abs(t+360-n)<r&&(t+=360),t},n.prototype._normalizeCenter=function(e){var t=this.transform;if(t.renderWorldCopies&&!t.lngRange){var n=e.lng-t.center.lng;e.lng+=n>180?-360:n<-180?360:0}},n}(e.Evented),Ai=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ai.prototype.getDefaultPosition=function(){return"bottom-right"},Ai.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ai.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ai.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var r=n.reduce((function(e,t,r){return t.value&&(e+=t.key+"="+t.value+(r<n.length-1?"&":"")),e}),"?");t.href=e.config.FEEDBACK_URL+"/"+r+(this._map._hash?this._map._hash.getHashString(!0):""),t.rel="noopener nofollow"}},Ai.prototype._updateData=function(e){!e||"metadata"!==e.sourceDataType&&"style"!==e.dataType||(this._updateAttributions(),this._updateEditLink())},Ai.prototype._updateAttributions=function(){if(this._map.style){var e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((function(e){return"string"!=typeof e?"":e}))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){var t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}var n=this._map.style.sourceCaches;for(var r in n){var i=n[r];if(i.used){var o=i.getSource();o.attribution&&e.indexOf(o.attribution)<0&&e.push(o.attribution)}}e.sort((function(e,t){return e.length-t.length}));var a=(e=e.filter((function(t,n){for(var r=n+1;r<e.length;r++)if(e[r].indexOf(t)>=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ai.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ki=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};ki.prototype.onAdd=function(e){this._map=e,this._container=n.create("div","mapboxgl-ctrl");var t=n.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="path_to_url",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ki.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ki.prototype.getDefaultPosition=function(){return"bottom-left"},ki.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},ki.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},ki.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Ti=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ti.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Ti.prototype.remove=function(e){for(var t=this._currentlyRunning,n=0,r=t?this._queue.concat(t):this._queue;n<r.length;n+=1){var i=r[n];if(i.id===e)return void(i.cancelled=!0)}},Ti.prototype.run=function(e){void 0===e&&(e=0);var t=this._currentlyRunning=this._queue;this._queue=[];for(var n=0,r=t;n<r.length;n+=1){var i=r[n];if(!i.cancelled&&(i.callback(e),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Ti.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Si={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Ei=e.window.HTMLImageElement,Ci=e.window.HTMLElement,Mi=e.window.ImageBitmap,Oi=60,Li={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:Oi,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Di=function(r){function i(t){var n=this;if(null!=(t=e.extend({},Li,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>Oi)throw new Error("maxPitch must be less than or equal to 60");var i=new Er(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(r.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Ti,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Si,t.locale),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Ci))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new xi(this,t);var o="string"==typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new Mr(o).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Ai({customAttribution:t.customAttribution})),this.addControl(new ki,t.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(t){n._update("style"===t.dataType),n.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){n.fire(new e.Event(t.dataType+"dataloading",t))}))}r&&(i.__proto__=r),i.prototype=Object.create(r&&r.prototype),i.prototype.constructor=i;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,n){if(void 0===n&&t.getDefaultPosition&&(n=t.getDefaultPosition()),void 0===n&&(n="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var r=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this},i.prototype.resize=function(t){var n=this._containerDimensions(),r=n[0],i=n[1];this._resizeCanvas(r,i),this.transform.resize(r,i),this.painter.resize(r,i);var o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},i.prototype.getMinZoom=function(){return this.transform.minZoom},i.prototype.setMaxZoom=function(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()<e&&this.setPitch(e),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},i.prototype.getMinPitch=function(){return this.transform.minPitch},i.prototype.setMaxPitch=function(e){if((e=null==e?Oi:e)>Oi)throw new Error("maxPitch must be less than or equal to 60");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,n){var r,i=this;if("mouseenter"===e||"mouseover"===e){var o=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){var a=i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[];a.length?o||(o=!0,n.call(i,new Fr(e,i,r.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===e||"mouseout"===e){var a=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){(i.getLayer(t)?i.queryRenderedFeatures(r.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(i,new Fr(e,i,r.originalEvent)))},mouseout:function(t){a&&(a=!1,n.call(i,new Fr(e,i,t.originalEvent)))}}}}return{layer:t,listener:n,delegates:(r={},r[e]=function(e){var r=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(i,e),delete e.features)},r)}},i.prototype.on=function(e,t,n){if(void 0===n)return r.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(e,t,n){if(void 0===n)return r.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,n);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(e,t,n){var i=this;if(void 0===n)return r.prototype.off.call(this,e,t);return this._delegatedListeners&&this._delegatedListeners[e]&&function(r){for(var o=r[e],a=0;a<o.length;a++){var s=o[a];if(s.layer===t&&s.listener===n){for(var l in s.delegates)i.off(l,s.delegates[l]);return o.splice(a,1),i}}}(this._delegatedListeners),this},i.prototype.queryRenderedFeatures=function(t,n){if(!this.style)return[];var r;if(void 0!==n||void 0===t||t instanceof e.Point||Array.isArray(t)||(n=t,t=void 0),n=n||{},(t=t||[[0,0],[this.transform.width,this.transform.height]])instanceof e.Point||"number"==typeof t[0])r=[e.Point.convert(t)];else{var i=e.Point.convert(t[0]),o=e.Point.convert(t[1]);r=[i,new e.Point(o.x,i.y),o,new e.Point(i.x,o.y),i]}return this.style.queryRenderedFeatures(r,n,this.transform)},i.prototype.querySourceFeatures=function(e,t){return this.style.querySourceFeatures(e,t)},i.prototype.setStyle=function(t,n){return!1!==(n=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},n)).diff&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(t,n))},i.prototype._getUIString=function(e){var t=this._locale[e];if(null==t)throw new Error("Missing UI string '"+e+"'");return t},i.prototype._updateStyle=function(e,t){return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Gt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},i.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Gt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},i.prototype._diffStyle=function(t,n){var r=this;if("string"==typeof t){var i=this._requestManager.normalizeStyleURL(t),o=this._requestManager.transformRequest(i,e.ResourceType.Style);e.getJSON(o,(function(t,i){t?r.fire(new e.ErrorEvent(t)):i&&r._updateDiff(i,n)}))}else"object"==typeof t&&this._updateDiff(t,n)},i.prototype._updateDiff=function(t,n){try{this.style.setState(t)&&this._update(!0)}catch(r){e.warnOnce("Unable to perform style diff: "+(r.message||r.error||r)+". Rebuilding the style from scratch."),this._updateStyle(t,n)}},i.prototype.getStyle=function(){if(this.style)return this.style.serialize()},i.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},i.prototype.addSource=function(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)},i.prototype.isSourceLoaded=function(t){var n=this.style&&this.style.sourceCaches[t];if(void 0!==n)return n.loaded();this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+t+"'")))},i.prototype.areTilesLoaded=function(){var e=this.style&&this.style.sourceCaches;for(var t in e){var n=e[t]._tiles;for(var r in n){var i=n[r];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0},i.prototype.addSourceType=function(e,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,n)},i.prototype.removeSource=function(e){return this.style.removeSource(e),this._update(!0)},i.prototype.getSource=function(e){return this.style.getSource(e)},i.prototype.addImage=function(t,n,r){void 0===r&&(r={});var i=r.pixelRatio;void 0===i&&(i=1);var o=r.sdf;void 0===o&&(o=!1);var a=r.stretchX,s=r.stretchY,l=r.content;this._lazyInitEmptyStyle();if(n instanceof Ei||Mi&&n instanceof Mi){var c=e.browser.getImageData(n),u=c.width,h=c.height,d=c.data;this.style.addImage(t,{data:new e.RGBAImage({width:u,height:h},d),pixelRatio:i,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}else{if(void 0===n.width||void 0===n.height)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var f=n.width,p=n.height,g=n.data,m=n;this.style.addImage(t,{data:new e.RGBAImage({width:f,height:p},new Uint8Array(g)),pixelRatio:i,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:m}),m.onAdd&&m.onAdd(this,t)}},i.prototype.updateImage=function(t,n){var r=this.style.getImage(t);if(!r)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var i=n instanceof Ei||Mi&&n instanceof Mi?e.browser.getImageData(n):n,o=i.width,a=i.height,s=i.data;if(void 0===o||void 0===a)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==r.data.width||a!==r.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var l=!(n instanceof Ei||Mi&&n instanceof Mi);r.data.replace(s,l),this.style.updateImage(t,r)},i.prototype.hasImage=function(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},i.prototype.removeImage=function(e){this.style.removeImage(e)},i.prototype.loadImage=function(t,n){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),n)},i.prototype.listImages=function(){return this.style.listImages()},i.prototype.addLayer=function(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)},i.prototype.moveLayer=function(e,t){return this.style.moveLayer(e,t),this._update(!0)},i.prototype.removeLayer=function(e){return this.style.removeLayer(e),this._update(!0)},i.prototype.getLayer=function(e){return this.style.getLayer(e)},i.prototype.setLayerZoomRange=function(e,t,n){return this.style.setLayerZoomRange(e,t,n),this._update(!0)},i.prototype.setFilter=function(e,t,n){return void 0===n&&(n={}),this.style.setFilter(e,t,n),this._update(!0)},i.prototype.getFilter=function(e){return this.style.getFilter(e)},i.prototype.setPaintProperty=function(e,t,n,r){return void 0===r&&(r={}),this.style.setPaintProperty(e,t,n,r),this._update(!0)},i.prototype.getPaintProperty=function(e,t){return this.style.getPaintProperty(e,t)},i.prototype.setLayoutProperty=function(e,t,n,r){return void 0===r&&(r={}),this.style.setLayoutProperty(e,t,n,r),this._update(!0)},i.prototype.getLayoutProperty=function(e,t){return this.style.getLayoutProperty(e,t)},i.prototype.setLight=function(e,t){return void 0===t&&(t={}),this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)},i.prototype.getLight=function(){return this.style.getLight()},i.prototype.setFeatureState=function(e,t){return this.style.setFeatureState(e,t),this._update()},i.prototype.removeFeatureState=function(e,t){return this.style.removeFeatureState(e,t),this._update()},i.prototype.getFeatureState=function(e){return this.style.getFeatureState(e)},i.prototype.getContainer=function(){return this._container},i.prototype.getCanvasContainer=function(){return this._canvasContainer},i.prototype.getCanvas=function(){return this._canvas},i.prototype._containerDimensions=function(){var e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]},i.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in path_to_url")},i.prototype._setupContainer=function(){var e=this._container;e.classList.add("mapboxgl-map"),(this._missingCSSCanary=n.create("div","mapboxgl-canary",e)).style.visibility="hidden",this._detectMissingCSS();var t=this._canvasContainer=n.create("div","mapboxgl-canvas-container",e);this._interactive&&t.classList.add("mapboxgl-interactive"),this._canvas=n.create("canvas","mapboxgl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var r=this._containerDimensions();this._resizeCanvas(r[0],r[1]);var i=this._controlContainer=n.create("div","mapboxgl-control-container",e),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(e){o[e]=n.create("div","mapboxgl-ctrl-"+e,i)}))},i.prototype._resizeCanvas=function(t,n){var r=e.browser.devicePixelRatio||1;this._canvas.width=r*t,this._canvas.height=r*n,this._canvas.style.width=t+"px",this._canvas.style.height=n+"px"},i.prototype._setupPainter=function(){var n=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),r=this._canvas.getContext("webgl",n)||this._canvas.getContext("experimental-webgl",n);r?(this.painter=new Ar(r,this.transform),e.webpSupported.testSupport(r)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))},i.prototype._contextLost=function(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))},i.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))},i.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},i.prototype._update=function(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this},i.prototype._requestRenderFrame=function(e){return this._update(),this._renderTaskQueue.add(e)},i.prototype._cancelRenderFrame=function(e){this._renderTaskQueue.remove(e)},i.prototype._render=function(t){var n,r=this,i=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(n=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,n),i=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=e.browser.now();this.style.zoomHistory.update(s,l);var c=new e.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),u=c.crossFadingFactor();1===u&&u===this._crossFadingFactor||(a=!0,this._crossFadingFactor=u),this.style.update(c)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var h=e.browser.now()-i;o.endQueryEXT(o.TIME_ELAPSED_EXT,n),setTimeout((function(){var t=o.getQueryObjectEXT(n,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(n),r.fire(new e.Event("gpu-timing-frame",{cpuTime:h,gpuTime:t}))}),50)}if(this.listens("gpu-timing-layer")){var d=this.painter.collectGpuTimers();setTimeout((function(){var t=r.painter.queryGpuTimers(d);r.fire(new e.Event("gpu-timing-layer",{layerTimes:t}))}),50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new e.Event("idle"))),this}},i.prototype.remove=function(){this._hash&&this._hash.remove();for(var t=0,n=this._controls;t<n.length;t+=1)n[t].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==e.window&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext(),Ii(this._canvasContainer),Ii(this._controlContainer),Ii(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},i.prototype.triggerRepaint=function(){var t=this;this.style&&!this._frame&&(this._frame=e.browser.frame((function(e){t._frame=null,t._render(e)})))},i.prototype._onWindowOnline=function(){this._update()},i.prototype._onWindowResize=function(e){this._trackResize&&this.resize({originalEvent:e})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(e){this._showPadding!==e&&(this._showPadding=e,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(e){this._vertices=e,this._update()},i.prototype._setCacheLimits=function(t,n){e.setCacheLimits(t,n)},o.version.get=function(){return e.version},Object.defineProperties(i.prototype,o),i}(wi);function Ii(e){e.parentNode&&e.parentNode.removeChild(e)}var Ri={showCompass:!0,showZoom:!0,visualizePitch:!1},Pi=function(t){var r=this;this.options=e.extend({},Ri,t),this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(e){return r._map.zoomIn({},{originalEvent:e})})),n.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(e){return r._map.zoomOut({},{originalEvent:e})})),n.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(e){r.options.visualizePitch?r._map.resetNorthPitch({},{originalEvent:e}):r._map.resetNorth({},{originalEvent:e})})),this._compassIcon=n.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Pi.prototype._updateZoomButtons=function(){var e=this._map.getZoom();this._zoomInButton.disabled=e===this._map.getMaxZoom(),this._zoomOutButton.disabled=e===this._map.getMinZoom()},Pi.prototype._rotateCompassArrow=function(){var e=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=e},Pi.prototype.onAdd=function(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ni(this._map,this._compass,this.options.visualizePitch)),this._container},Pi.prototype.onRemove=function(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Pi.prototype._createButton=function(e,t){var r=n.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r},Pi.prototype._setButtonTitle=function(e,t){var n=this._map._getUIString("NavigationControl."+t);e.title=n,e.setAttribute("aria-label",n)};var Ni=function(t,r,i){void 0===i&&(i=!1),this._clickTolerance=10,this.element=r,this.mouseRotate=new Zr({clickTolerance:t.dragRotate._mouseRotate._clickTolerance}),this.map=t,i&&(this.mousePitch=new Kr({clickTolerance:t.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),n.addEventListener(r,"mousedown",this.mousedown),n.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(r,"touchmove",this.touchmove),n.addEventListener(r,"touchend",this.touchend),n.addEventListener(r,"touchcancel",this.reset)};function zi(t,n,r){if(t=new e.LngLat(t.lng,t.lat),n){var i=new e.LngLat(t.lng-360,t.lat),o=new e.LngLat(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(n);r.locationPoint(i).distSqr(n)<a?t=i:r.locationPoint(o).distSqr(n)<a&&(t=o)}for(;Math.abs(t.lng-r.center.lng)>180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}Ni.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),n.disableDrag()},Ni.prototype.move=function(e,t){var n=this.map,r=this.mouseRotate.mousemoveWindow(e,t);if(r&&r.bearingDelta&&n.setBearing(n.getBearing()+r.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&n.setPitch(n.getPitch()+i.pitchDelta)}},Ni.prototype.off=function(){var e=this.element;n.removeEventListener(e,"mousedown",this.mousedown),n.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(e,"touchmove",this.touchmove),n.removeEventListener(e,"touchend",this.touchend),n.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Ni.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(e.window,"mousemove",this.mousemove),n.removeEventListener(e.window,"mouseup",this.mouseup)},Ni.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),n.mousePos(this.element,t)),n.addEventListener(e.window,"mousemove",this.mousemove),n.addEventListener(e.window,"mouseup",this.mouseup)},Ni.prototype.mousemove=function(e){this.move(e,n.mousePos(this.element,e))},Ni.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Ni.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Ni.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Ni.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ni.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var Fi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Bi(e,t,n){var r=e.classList;for(var i in Fi)r.remove("mapboxgl-"+n+"-anchor-"+i);r.add("mapboxgl-"+n+"-anchor-"+t)}var ji,Ui=function(t){function r(r,i){var o=this;if(t.call(this),(r instanceof e.window.HTMLElement||i)&&(r=e.extend({element:r},i)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._draggable=r&&r.draggable||!1,this._state="inactive",this._rotation=r&&r.rotation||0,this._rotationAlignment=r&&r.rotationAlignment||"auto",this._pitchAlignment=r&&r.pitchAlignment&&"auto"!==r.pitchAlignment?r.pitchAlignment:this._rotationAlignment,r&&r.element)this._element=r.element,this._offset=e.Point.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div"),this._element.setAttribute("aria-label","Map marker");var a=n.createNS("path_to_url","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var s=n.createNS("path_to_url","g");s.setAttributeNS(null,"stroke","none"),s.setAttributeNS(null,"stroke-width","1"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"fill-rule","evenodd");var l=n.createNS("path_to_url","g");l.setAttributeNS(null,"fill-rule","nonzero");var c=n.createNS("path_to_url","g");c.setAttributeNS(null,"transform","translate(3.0, 29.0)"),c.setAttributeNS(null,"fill","#000000");for(var u=0,h=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u<h.length;u+=1){var d=h[u],f=n.createNS("path_to_url","ellipse");f.setAttributeNS(null,"opacity","0.04"),f.setAttributeNS(null,"cx","10.5"),f.setAttributeNS(null,"cy","5.80029008"),f.setAttributeNS(null,"rx",d.rx),f.setAttributeNS(null,"ry",d.ry),c.appendChild(f)}var p=n.createNS("path_to_url","g");p.setAttributeNS(null,"fill",this._color);var g=n.createNS("path_to_url","path");g.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),p.appendChild(g);var m=n.createNS("path_to_url","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var v=n.createNS("path_to_url","path");v.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(v);var y=n.createNS("path_to_url","g");y.setAttributeNS(null,"transform","translate(6.0, 7.0)"),y.setAttributeNS(null,"fill","#FFFFFF");var b=n.createNS("path_to_url","g");b.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=n.createNS("path_to_url","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=n.createNS("path_to_url","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),b.appendChild(_),b.appendChild(x),l.appendChild(c),l.appendChild(p),l.appendChild(m),l.appendChild(y),l.appendChild(b),a.appendChild(l),this._element.appendChild(a),this._offset=e.Point.convert(r&&r.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(e){e.preventDefault()})),this._element.addEventListener("mousedown",(function(e){e.preventDefault()})),this._element.addEventListener("focus",(function(){var e=o._map.getContainer();e.scrollTop=0,e.scrollLeft=0})),Bi(this._element,this._anchor,"marker"),this._popup=null}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.addTo=function(e){return this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},r.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},r.prototype.getElement=function(){return this._element},r.prototype.setPopup=function(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){var t=13.5,n=Math.sqrt(Math.pow(t,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[n,-1*(24.6+n)],"bottom-right":[-n,-1*(24.6+n)],left:[t,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},r.prototype._onKeyPress=function(e){var t=e.code,n=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==n&&13!==n||this.togglePopup()},r.prototype._onMapClick=function(e){var t=e.originalEvent.target,n=this._element;this._popup&&(t===n||n.contains(t))&&this.togglePopup()},r.prototype.getPopup=function(){return this._popup},r.prototype.togglePopup=function(){var e=this._popup;return e?(e.isOpen()?e.remove():e.addTo(this._map),this):this},r.prototype._update=function(e){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=zi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var t="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?t="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(t="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r="rotateX("+this._map.getPitch()+"deg)"),e&&"moveend"!==e.type||(this._pos=this._pos.round()),n.setTransform(this._element,Fi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+r+" "+t)}},r.prototype.getOffset=function(){return this._offset},r.prototype.setOffset=function(t){return this._offset=e.Point.convert(t),this._update(),this},r.prototype._onMove=function(t){this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag"))},r.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"},r.prototype._addDragHandler=function(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},r.prototype.setDraggable=function(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},r.prototype.isDraggable=function(){return this._draggable},r.prototype.setRotation=function(e){return this._rotation=e||0,this._update(),this},r.prototype.getRotation=function(){return this._rotation},r.prototype.setRotationAlignment=function(e){return this._rotationAlignment=e||"auto",this._update(),this},r.prototype.getRotationAlignment=function(){return this._rotationAlignment},r.prototype.setPitchAlignment=function(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this},r.prototype.getPitchAlignment=function(){return this._pitchAlignment},r}(e.Evented),Vi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};var qi=0,Hi=!1,$i=function(t){function r(n){t.call(this),this.options=e.extend({},Vi,n),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){return this._map=t,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),r=this._setupUI,void 0!==ji?r(ji):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((function(e){ji="denied"!==e.state,r(ji)})):(ji=!!e.window.navigator.geolocation,r(ji)),this._container;var r},r.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,qi=0,Hi=!1},r.prototype._isOutOfMapMaxBounds=function(e){var t=this._map.getMaxBounds(),n=e.coords;return t&&(n.longitude<t.getWest()||n.longitude>t.getEast()||n.latitude<t.getSouth()||n.latitude>t.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},r.prototype._updateCamera=function(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=this._map.getBearing(),o=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),o,{geolocateSource:!0})},r.prototype._updateMarker=function(t){if(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},r.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),n=this._map.unproject([1,e]),r=t.distanceTo(n),i=Math.ceil(2*this._accuracy/r);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Hi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(t){var r=this;if(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ui(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ui({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var n=t.originalEvent&&"resize"===t.originalEvent.type;t.geolocateSource||"ACTIVE_LOCK"!==r._watchState||n||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new e.Event("trackuserlocationend")))}))},r.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":qi--,Hi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++qi>1?(t={maximumAge:6e5,timeout:0},Hi=!0):(t=this.options.positionOptions,Hi=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(e.Evented),Wi={maxWidth:100,unit:"metric"},Gi=function(t){this.options=e.extend({},Wi,t),e.bindAll(["_onMove","setUnit"],this)};function Yi(e,t,n){var r=n&&n.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){var l=3.2808*s;l>5280?Xi(t,r,l/5280,e._getUIString("ScaleControl.Miles")):Xi(t,r,l,e._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?Xi(t,r,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Xi(t,r,s/1e3,e._getUIString("ScaleControl.Kilometers")):Xi(t,r,s,e._getUIString("ScaleControl.Meters"))}function Xi(e,t,n,r){var i,o,a,s=(i=n,(o=Math.pow(10,(""+Math.floor(i)).length-1))*((a=i/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(a))),l=s/n;e.style.width=t*l+"px",e.innerHTML=s+"&nbsp;"+r}Gi.prototype.getDefaultPosition=function(){return"bottom-left"},Gi.prototype._onMove=function(){Yi(this._map,this._container,this.options)},Gi.prototype.onAdd=function(e){return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Gi.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Gi.prototype.setUnit=function(e){this.options.unit=e,Yi(this._map,this._container,this.options)};var Zi=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Zi.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zi.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zi.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Zi.prototype._setupUI=function(){var t=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zi.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Zi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Zi.prototype._isFullscreen=function(){return this._fullscreen},Zi.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Zi.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Ki={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Ji=function(t){function r(n){t.call(this),this.options=e.extend(Object.create(Ki),n),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},r.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},r.prototype.setHTML=function(t){var n,r=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;n=i.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},r.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},r.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},r.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},r.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},r.prototype._onMouseUp=function(e){this._update(e.point)},r.prototype._onMouseMove=function(e){this._update(e.point)},r.prototype._onDrag=function(e){this._update(e.point)},r.prototype._update=function(e){var t=this,r=this._lngLat||this._trackPointer;if(this._map&&r&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return t._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=zi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=Qi(this.options.offset);if(!o){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+a.bottom.y<c?["top"]:i.y>this._map.transform.height-c?["bottom"]:[],i.x<l/2?s.push("left"):i.x>this._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var u=i.add(a[o]).round();n.setTransform(this._container,Fi[o]+" translate("+u.x+"px,"+u.y+"px)"),Bi(this._container,o,"popup")}},r.prototype._onClose=function(){this.remove()},r}(e.Evented);function Qi(t){if(t){if("number"==typeof t){var n=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(n,n),"top-right":new e.Point(-n,n),bottom:new e.Point(0,-t),"bottom-left":new e.Point(n,-n),"bottom-right":new e.Point(-n,-n),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var r=e.Point.convert(t);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return Qi(new e.Point(0,0))}var eo={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Di,NavigationControl:Pi,GeolocateControl:$i,AttributionControl:Ai,ScaleControl:Gi,FullscreenControl:Zi,Popup:Ji,Marker:Ui,Style:Gt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){je().acquire(Ne)},clearPrewarmedResources:function(){var e=Fe;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(Ne),Fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return ze.workerCount},set workerCount(e){ze.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return eo})),n},"object"==typeof n&&void 0!==t?t.exports=i():(r=r||self).mapboxgl=i()},{}],240:[function(e,t,n){"use strict";t.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},{}],241:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=e,e=window);var n=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=r.x(s),u=r.y(s);"buttons"in s&&(e=0|s.buttons),(e!==n||c!==i||u!==o||l(s))&&(n=0|e,i=c||0,o=u||0,t&&t(n,i,o,a))}function u(e){c(0,e)}function h(){(n||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,n=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function d(e){l(e)&&t&&t(n,i,o,a)}function f(e){0===r.buttons(e)?c(0,e):c(n,e)}function p(e){c(n|r.buttons(e),e)}function g(e){c(n&~r.buttons(e),e)}function m(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}m();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?m():s&&(s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var r=e("mouse-event")},{"mouse-event":243}],242:[function(e,t,n){var r={left:0,top:0};t.exports=function(e,t,n){t=t||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=e.clientX||0,a=e.clientY||0,s=(i=t)===window||i===document||i===document.body?r:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},{}],243:[function(e,t,n){"use strict";function r(e){return e.target||e.srcElement||window}n.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<<t-1}else if("button"in e){var t;if(1===(t=e.button))return 4;if(2===t)return 2;if(t>=0)return 1<<t}}return 0},n.element=r,n.x=function(e){if("object"==typeof e){if("offsetX"in e)return e.offsetX;var t=r(e).getBoundingClientRect();return e.clientX-t.left}return 0},n.y=function(e){if("object"==typeof e){if("offsetY"in e)return e.offsetY;var t=r(e).getBoundingClientRect();return e.clientY-t.top}return 0}},{}],244:[function(e,t,n){"use strict";var r=e("to-px");t.exports=function(e,t,n){"function"==typeof e&&(n=!!t,t=e,e=window);var i=r("ex",e),o=function(e){n&&e.preventDefault();var r=e.deltaX||0,o=e.deltaY||0,a=e.deltaZ||0,s=1;switch(e.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(o*=s,a*=s,(r*=s)||o||a)return t(r,o,a,e)};return e.addEventListener("wheel",o),o}},{"to-px":314}],245:[function(e,t,r){(function(e,n){(function(){!function(e,r,i){r[e]=r[e]||function(){"use strict";var e,t,r,i=Object.prototype.toString,o=void 0!==n?function(e){return n(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,n){r.add(e,n),t||(t=o(r.drain))}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e<this.chain.length;e++)c(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function c(e,t,n){var r,i;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=s(r))?i.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function u(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=s(e))?a((function(){var r=new f(n);try{t.call(e,(function(){u.apply(r,arguments)}),(function(){h.apply(r,arguments)}))}catch(e){h.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&a(l,n))}catch(e){h.call(new f(n),e)}}}function h(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(l,t))}function d(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then((function(e){n(i,e)}),r)}(i)}function f(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new p(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&a(l,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){u.call(t,e)}),(function(e){h.call(t,e)}))}catch(e){h.call(t,e)}}r=function(){var e,n,r;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,o){r=new i(t,o),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var m=e({},"constructor",g,!1);return g.prototype=m,e(m,"__NPO__",0,!1),e(g,"resolve",(function(e){var t=this;return e&&"object"==typeof e&&1===e.__NPO__?e:new t((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(g,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(g,"all",(function(e){var t=this;return"[object Array]"!=i.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;d(t,e,(function(e,t){o[e]=t,++a===i&&n(o)}),r)}))})),e(g,"race",(function(e){var t=this;return"[object Array]"!=i.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");d(t,e,(function(e,t){n(t)}),r)}))})),g}(),void 0!==t&&t.exports&&(t.exports=r[e])}("Promise",void 0!==e?e:this)}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:311}],246:[function(e,t,n){var r=Math.PI,i=c(120);function o(e,t,n,r){return["C",e,t,n,r,n,r]}function a(e,t,n,r,i,o){return["C",e/3+2/3*n,t/3+2/3*r,i/3+2/3*n,o/3+2/3*r,i,o]}function s(e,t,n,o,a,c,u,h,d,f){if(f)A=f[0],k=f[1],x=f[2],w=f[3];else{var p=l(e,t,-a);e=p.x,t=p.y;var g=(e-(h=(p=l(h,d,-a)).x))/2,m=(t-(d=p.y))/2,v=g*g/(n*n)+m*m/(o*o);v>1&&(n*=v=Math.sqrt(v),o*=v);var y=n*n,b=o*o,_=(c==u?-1:1)*Math.sqrt(Math.abs((y*b-y*m*m-b*g*g)/(y*m*m+b*g*g)));_==1/0&&(_=1);var x=_*n*m/o+(e+h)/2,w=_*-o*g/n+(t+d)/2,A=Math.asin(((t-w)/o).toFixed(9)),k=Math.asin(((d-w)/o).toFixed(9));(A=e<x?r-A:A)<0&&(A=2*r+A),(k=h<x?r-k:k)<0&&(k=2*r+k),u&&A>k&&(A-=2*r),!u&&k>A&&(k-=2*r)}if(Math.abs(k-A)>i){var T=k,S=h,E=d;k=A+i*(u&&k>A?1:-1);var C=s(h=x+n*Math.cos(k),d=w+o*Math.sin(k),n,o,a,0,u,S,E,[k,T,x,w])}var M=Math.tan((k-A)/4),O=4/3*n*M,L=4/3*o*M,D=[2*e-(e+O*Math.sin(A)),2*t-(t-L*Math.cos(A)),h+O*Math.sin(k),d-L*Math.cos(k),h,d];if(f)return D;C&&(D=D.concat(C));for(var I=0;I<D.length;){var R=l(D[I],D[I+1],a);D[I++]=R.x,D[I++]=R.y}return D}function l(e,t,n){return{x:e*Math.cos(n)-t*Math.sin(n),y:e*Math.sin(n)+t*Math.cos(n)}}function c(e){return e*(r/180)}t.exports=function(e){for(var t,n=[],r=0,i=0,l=0,u=0,h=null,d=null,f=0,p=0,g=0,m=e.length;g<m;g++){var v=e[g],y=v[0];switch(y){case"M":l=v[1],u=v[2];break;case"A":(v=s(f,p,v[1],v[2],c(v[3]),v[4],v[5],v[6],v[7])).unshift("C"),v.length>7&&(n.push(v.splice(0,7)),v.unshift("C"));break;case"S":var b=f,_=p;"C"!=t&&"S"!=t||(b+=b-r,_+=_-i),v=["C",b,_,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(h=2*f-h,d=2*p-d):(h=f,d=p),v=a(f,p,h,d,v[1],v[2]);break;case"Q":h=v[1],d=v[2],v=a(f,p,v[1],v[2],v[3],v[4]);break;case"L":v=o(f,p,v[1],v[2]);break;case"H":v=o(f,p,v[1],p);break;case"V":v=o(f,p,f,v[1]);break;case"Z":v=o(f,p,l,u)}t=y,f=v[v.length-2],p=v[v.length-1],v.length>4?(r=v[v.length-4],i=v[v.length-3]):(r=f,i=p),n.push(v)}return n}},{}],247:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},{}],248:[function(e,t,n){"use strict";function r(e,t){if("string"!=typeof e)return[e];var n=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",o=!!t.flat;r.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),r=[];function o(t,o,a){var s=n.push(t.slice(e[0].length,-e[1].length))-1;return r.push(s),i+s+i}n.forEach((function(e,r){for(var i,a=0;e!=i;)if(i=e,e=e.replace(t,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");n[r]=e})),r=r.reverse(),n=n.map((function(t){return r.forEach((function(n){t=t.replace(new RegExp("(\\"+i+n+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?n:function e(t,n,r){for(var i,o=[],s=0;i=a.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(t.slice(0,i.index)),o.push(e(n[i[1]],n)),t=t.slice(i.index+i[0].length)}return o.push(t),o}(n[0],n)}function i(e,t){if(t&&t.flat){var n,r=t&&t.escape||"___",i=e[0];if(!i)return"";for(var o=new RegExp("\\"+r+"([0-9]+)\\"+r),a=0;i!=n;){if(a++>1e4)throw Error("Circular references in "+e);n=i,i=i.replace(o,s)}return i}return e.reduce((function e(t,n){return Array.isArray(n)&&(n=n.reduce(e,"")),t+n}),"");function s(t,n){if(null==e[n])throw Error("Reference "+n+"is undefined");return e[n]}}function o(e,t){return Array.isArray(e)?i(e,t):r(e,t)}o.parse=r,o.stringify=i,t.exports=o},{}],249:[function(e,t,n){"use strict";var r=e("pick-by-alias");t.exports=function(e){var t;return arguments.length>1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}},{"pick-by-alias":253}],250:[function(e,t,n){t.exports=function(e){var t=[];return e.replace(i,(function(e,n,i){var a=n.toLowerCase();for(i=function(e){var t=e.match(o);return t?t.map(Number):[]}(i),"m"==a&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n="m"==n?"l":"L");;){if(i.length==r[a])return i.unshift(n),t.push(i);if(i.length<r[a])throw new Error("malformed path data");t.push([n].concat(i.splice(0,r[a])))}})),t};var r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi;var o=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],251:[function(e,t,n){t.exports=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},{}],252:[function(e,t,n){(function(e){(function(){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=e&&e.hrtime?(t.exports=function(){return(n()-a)/1e6},r=e.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*e.uptime(),a=o-s):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this)}).call(this,e("_process"))},{_process:277}],253:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r,o,a={};if("string"==typeof t&&(t=i(t)),Array.isArray(t)){var s={};for(o=0;o<t.length;o++)s[t[o]]=!0;t=s}for(r in t)t[r]=i(t[r]);var l={};for(r in t){var c=t[r];if(Array.isArray(c))for(o=0;o<c.length;o++){var u=c[o];if(n&&(l[u]=!0),u in e){if(a[r]=e[u],n)for(var h=o;h<c.length;h++)l[c[h]]=!0;break}}else r in e&&(t[r]&&(a[r]=e[r]),n&&(l[r]=!0))}if(n)for(r in e)l[r]||(a[r]=e[r]);return a};var r={};function i(e){return r[e]?r[e]:("string"==typeof e&&(e=r[e]=e.split(/\s*,\s*|\s+/)),e)}},{}],254:[function(e,t,n){var r,i=e("./lib/build-log"),o=e("./lib/epsilon"),a=e("./lib/intersecter"),s=e("./lib/segment-chainer"),l=e("./lib/segment-selector"),c=e("./lib/geojson"),u=!1,h=o();function d(e,t,n){var i=r.segments(e),o=r.segments(t),a=n(r.combine(i,o));return r.polygon(a)}r={buildLog:function(e){return!0===e?u=i():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return h.epsilon(e)},segments:function(e){var t=a(!0,h,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:a(!1,h,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,h,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(r,e)},polygonToGeoJSON:function(e){return c.fromPolygon(r,h,e)},union:function(e,t){return d(e,t,r.selectUnion)},intersect:function(e,t){return d(e,t,r.selectIntersect)},difference:function(e,t){return d(e,t,r.selectDifference)},differenceRev:function(e,t){return d(e,t,r.selectDifferenceRev)},xor:function(e,t){return d(e,t,r.selectXor)}},"object"==typeof window&&(window.PolyBool=r),t.exports=r},{"./lib/build-log":255,"./lib/epsilon":256,"./lib/geojson":257,"./lib/intersecter":258,"./lib/segment-chainer":260,"./lib/segment-selector":261}],255:[function(e,t,n){t.exports=function(){var e,t=0,n=!1;function r(t,n){return e.list.push({type:t,data:n?JSON.parse(JSON.stringify(n)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return r("div_seg",{seg:e,pt:t}),r("chop",{seg:e,pt:t})},statusRemove:function(e){return r("pop_seg",{seg:e})},segmentUpdate:function(e){return r("seg_update",{seg:e})},segmentNew:function(e,t){return r("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return r("rem_seg",{seg:e})},tempStatus:function(e,t,n){return r("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return r("rewind",{seg:e})},status:function(e,t,n){return r("status",{seg:e,above:t,below:n})},vert:function(t){return t===n?e:(n=t,r("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),r("log",{txt:e})},reset:function(){return r("reset")},selected:function(e){return r("selected",{segs:e})},chainStart:function(e){return r("chain_start",{seg:e})},chainRemoveHead:function(e,t){return r("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return r("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return r("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return r("chain_match",{index:e})},chainClose:function(e){return r("chain_close",{index:e})},chainAddHead:function(e,t){return r("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return r("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return r("chain_con",{index1:e,index2:t})},chainReverse:function(e){return r("chain_rev",{index:e})},chainJoin:function(e,t){return r("chain_join",{index1:e,index2:t})},done:function(){return r("done")}}}},{}],256:[function(e,t,n){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,n,r){var i=n[0],o=n[1],a=r[0],s=r[1],l=t[0];return(a-i)*(t[1]-o)-(s-o)*(l-i)>=-e},pointBetween:function(t,n,r){var i=t[1]-n[1],o=r[0]-n[0],a=t[0]-n[0],s=r[1]-n[1],l=a*o+i*s;return!(l<e||l-(o*o+s*s)>-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])<e},pointsSameY:function(t,n){return Math.abs(t[1]-n[1])<e},pointsSame:function(e,n){return t.pointsSameX(e,n)&&t.pointsSameY(e,n)},pointsCompare:function(e,n){return t.pointsSameX(e,n)?t.pointsSameY(e,n)?0:e[1]<n[1]?-1:1:e[0]<n[0]?-1:1},pointsCollinear:function(t,n,r){var i=t[0]-n[0],o=t[1]-n[1],a=n[0]-r[0],s=n[1]-r[1];return Math.abs(i*s-a*o)<e},linesIntersect:function(t,n,r,i){var o=n[0]-t[0],a=n[1]-t[1],s=i[0]-r[0],l=i[1]-r[1],c=o*l-a*s;if(Math.abs(c)<e)return!1;var u=t[0]-r[0],h=t[1]-r[1],d=(s*h-l*u)/c,f=(o*h-a*u)/c,p={alongA:0,alongB:0,pt:[t[0]+d*o,t[1]+d*a]};return p.alongA=d<=-e?-2:d<e?-1:d-1<=-e?0:d-1<e?1:2,p.alongB=f<=-e?-2:f<e?-1:f-1<=-e?0:f-1<e?1:2,p},pointInsideRegion:function(t,n){for(var r=t[0],i=t[1],o=n[n.length-1][0],a=n[n.length-1][1],s=!1,l=0;l<n.length;l++){var c=n[l][0],u=n[l][1];u-i>e!=a-i>e&&(o-c)*(i-u)/(a-u)+c-r>e&&(s=!s),o=c,a=u}return s}};return t}},{}],257:[function(e,t,n){var r={toPolygon:function(e,t){function n(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function n(t){var n=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[n]})}for(var r=n(t[0]),i=1;i<t.length;i++)r=e.selectDifference(e.combine(r,n(t[i])));return r}if("Polygon"===t.type)return e.polygon(n(t.coordinates));if("MultiPolygon"===t.type){for(var r=e.segments({inverted:!1,regions:[]}),i=0;i<t.coordinates.length;i++)r=e.selectUnion(e.combine(r,n(t.coordinates[i])));return e.polygon(r)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,n){function r(e,n){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],n)}function i(e){return{region:e,children:[]}}n=e.polygon(e.segments(n));var o=i(null);function a(e,t){for(var n=0;n<e.children.length;n++)if(r(t,(s=e.children[n]).region))return void a(s,t);var o=i(t);for(n=0;n<e.children.length;n++){var s;r((s=e.children[n]).region,t)&&(o.children.push(s),e.children.splice(n,1),n--)}e.children.push(o)}for(var s=0;s<n.regions.length;s++){var l=n.regions[s];l.length<3||a(o,l)}function c(e,t){for(var n=0,r=e[e.length-1][0],i=e[e.length-1][1],o=[],a=0;a<e.length;a++){var s=e[a][0],l=e[a][1];o.push([s,l]),n+=l*r-s*i,r=s,i=l}return n<0!==t&&o.reverse(),o.push([o[0][0],o[0][1]]),o}var u=[];function h(e){var t=[c(e.region,!1)];u.push(t);for(var n=0;n<e.children.length;n++)t.push(d(e.children[n]))}function d(e){for(var t=0;t<e.children.length;t++)h(e.children[t]);return c(e.region,!0)}for(s=0;s<o.children.length;s++)h(o.children[s]);return u.length<=0?{type:"Polygon",coordinates:[]}:1==u.length?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};t.exports=r},{}],258:[function(e,t,n){var r=e("./linked-list");t.exports=function(e,t,n){function i(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var o=r.create();function a(e,n){o.insertBefore(e,(function(r){return i=e.isStart,o=e.pt,a=n,s=r.isStart,l=r.pt,c=r.other.pt,(0!==(u=t.pointsCompare(o,l))?u:t.pointsSame(a,c)?0:i!==s?i?1:-1:t.pointAboveOrOnLine(a,s?l:c,s?c:l)?1:-1)<0;var i,o,a,s,l,c,u}))}function s(e,t){var n=function(e,t){var n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return a(n,e.end),n}(e,t);return function(e,t,n){var i=r.node({isStart:!1,pt:t.end,seg:t,primary:n,other:e,status:null});e.other=i,a(i,e.pt)}(n,e,t),n}function l(e,t){var r=i(t,e.seg.end,e.seg);return function(e,t){n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,a(e.other,e.pt)}(e,t),s(r,e.primary)}function c(i,a){var s=r.create();function c(e){return s.findTransition((function(n){return r=e,i=n.ev,o=r.seg.start,a=r.seg.end,s=i.seg.start,l=i.seg.end,(t.pointsCollinear(o,s,l)?t.pointsCollinear(a,s,l)||t.pointAboveOrOnLine(a,s,l)?1:-1:t.pointAboveOrOnLine(o,s,l)?1:-1)>0;var r,i,o,a,s,l}))}function u(e,r){var i=e.seg,o=r.seg,a=i.start,s=i.end,c=o.start,u=o.end;n&&n.checkIntersection(i,o);var h=t.linesIntersect(a,s,c,u);if(!1===h){if(!t.pointsCollinear(a,s,c))return!1;if(t.pointsSame(a,u)||t.pointsSame(s,c))return!1;var d=t.pointsSame(a,c),f=t.pointsSame(s,u);if(d&&f)return r;var p=!d&&t.pointBetween(a,c,u),g=!f&&t.pointBetween(s,c,u);if(d)return g?l(r,s):l(e,u),r;p&&(f||(g?l(r,s):l(e,u)),l(r,a))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,u)),0===h.alongB&&(-1===h.alongA?l(r,a):0===h.alongA?l(r,h.pt):1===h.alongA&&l(r,s));return!1}for(var h=[];!o.isEmpty();){var d=o.getHead();if(n&&n.vert(d.pt[0]),d.isStart){n&&n.segmentNew(d.seg,d.primary);var f=c(d),p=f.before?f.before.ev:null,g=f.after?f.after.ev:null;function m(){if(p){var e=u(d,p);if(e)return e}return!!g&&u(d,g)}n&&n.tempStatus(d.seg,!!p&&p.seg,!!g&&g.seg);var v,y,b=m();if(b&&(e?(y=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(b.seg.myFill.above=!b.seg.myFill.above):b.seg.otherFill=d.seg.myFill,n&&n.segmentUpdate(b.seg),d.other.remove(),d.remove()),o.getHead()!==d){n&&n.rewind(d.seg);continue}e?(y=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=g?g.seg.myFill.above:i,d.seg.myFill.above=y?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(v=g?d.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:d.primary?a:i,d.seg.otherFill={above:v,below:v}),n&&n.status(d.seg,!!p&&p.seg,!!g&&g.seg),d.other.status=f.insert(r.node({ev:d}))}else{var _=d.status;if(null===_)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(_.prev)&&s.exists(_.next)&&u(_.prev.ev,_.next.ev),n&&n.statusRemove(_.ev.seg),_.remove(),!d.primary){var x=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=x}h.push(d.seg)}o.getHead().remove()}return n&&n.done(),h}return e?{addRegion:function(e){for(var r,i=e[e.length-1],o=0;o<e.length;o++){r=i,i=e[o];var a=t.pointsCompare(r,i);0!==a&&s((l=a<0?r:i,c=a<0?i:r,{id:n?n.segmentId():-1,start:l,end:c,myFill:{above:null,below:null},otherFill:null}),!0)}var l,c},calculate:function(e){return c(e,!1)}}:{calculate:function(e,t,n,r){return e.forEach((function(e){s(i(e.start,e.end,e),!0)})),n.forEach((function(e){s(i(e.start,e.end,e),!1)})),c(t,r)}}}},{"./linked-list":259}],259:[function(e,t,n){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,n){for(var r=e.root,i=e.root.next;null!==i;){if(n(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);r=i,i=i.next}r.next=t,t.prev=r,t.next=null},findTransition:function(t){for(var n=e.root,r=e.root.next;null!==r&&!t(r);)n=r,r=r.next;return{before:n===e.root?null:n,after:r,insert:function(e){return e.prev=n,e.next=r,n.next=e,null!==r&&(r.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},{}],260:[function(e,t,n){t.exports=function(e,t,n){var r=[],i=[];return e.forEach((function(e){var o=e.start,a=e.end;if(t.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{n&&n.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u<r.length;u++){var h=(m=r[u])[0],d=(m[1],m[m.length-1]);if(m[m.length-2],t.pointsSame(h,o)){if(k(u,!0,!0))break}else if(t.pointsSame(h,a)){if(k(u,!0,!1))break}else if(t.pointsSame(d,o)){if(k(u,!1,!0))break}else if(t.pointsSame(d,a)&&k(u,!1,!1))break}if(c===s)return r.push([o,a]),void(n&&n.chainNew(o,a));if(c===l){n&&n.chainMatch(s.index);var f=s.index,p=s.matches_pt1?a:o,g=s.matches_head,m=r[f],v=g?m[0]:m[m.length-1],y=g?m[1]:m[m.length-2],b=g?m[m.length-1]:m[0],_=g?m[m.length-2]:m[1];return t.pointsCollinear(y,v,p)&&(g?(n&&n.chainRemoveHead(s.index,p),m.shift()):(n&&n.chainRemoveTail(s.index,p),m.pop()),v=y),t.pointsSame(b,p)?(r.splice(f,1),t.pointsCollinear(_,b,v)&&(g?(n&&n.chainRemoveTail(s.index,v),m.pop()):(n&&n.chainRemoveHead(s.index,v),m.shift())),n&&n.chainClose(s.index),void i.push(m)):void(g?(n&&n.chainAddHead(s.index,p),m.unshift(p)):(n&&n.chainAddTail(s.index,p),m.push(p)))}var x=s.index,w=l.index;n&&n.chainConnect(x,w);var A=r[x].length<r[w].length;s.matches_head?l.matches_head?A?(T(x),S(x,w)):(T(w),S(w,x)):S(w,x):l.matches_head?S(x,w):A?(T(x),S(w,x)):(T(w),S(x,w))}function k(e,t,n){return c.index=e,c.matches_head=t,c.matches_pt1=n,c===s?(c=l,!1):(c=null,!0)}function T(e){n&&n.chainReverse(e),r[e].reverse()}function S(e,i){var o=r[e],a=r[i],s=o[o.length-1],l=o[o.length-2],c=a[0],u=a[1];t.pointsCollinear(l,s,c)&&(n&&n.chainRemoveTail(e,s),o.pop(),s=l),t.pointsCollinear(s,c,u)&&(n&&n.chainRemoveHead(i,c),a.shift()),n&&n.chainJoin(e,i),r[e]=o.concat(a),r.splice(i,1)}})),i}},{}],261:[function(e,t,n){function r(e,t,n){var r=[];return e.forEach((function(e){var i=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[i]&&r.push({id:n?n.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[i],below:2===t[i]},otherFill:null})})),n&&n.selected(r),r}var i={union:function(e,t){return r(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return r(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return r(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return r(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return r(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=i},{}],262:[function(e,t,n){"use strict";var r=e("stream").Transform,i=e("stream-parser");function o(){r.call(this,{readableObjectMode:!0})}function a(e,t,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),n&&(this.statusCode=n)}o.prototype=Object.create(r.prototype),o.prototype.constructor=o,i(o.prototype),n.ParserStream=o,n.sliceEq=function(e,t,n){for(var r=t,i=0;i<n.length;)if(e[r++]!==n[i++])return!1;return!0},n.str2arr=function(e,t){var n=[],r=0;if(t&&"hex"===t)for(;r<e.length;)n.push(parseInt(e.slice(r,r+2),16)),r+=2;else for(;r<e.length;r++)n.push(255&e.charCodeAt(r));return n},n.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8},n.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8},n.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|16777216*e[t+3]},n.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|16777216*e[t]},a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,n.ProbeError=a},{stream:285,"stream-parser":301}],263:[function(e,t,n){"use strict";function r(e,t){var n=new Error(e);return n.code=t,n}function i(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function o(e,t,n){this.input=e.subarray(t,n),this.start=t;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==i&&"MM\0*"!==i)throw r("invalid TIFF signature","EBADDATA");this.big_endian="M"===i[0]}o.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,e)}},o.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},o.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?16777216*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3]},o.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},o.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},o.prototype.exif_format_read=function(e,t){var n;switch(e){case 1:case 2:return this.input[t];case 6:return(n=this.input[t])|33554430*(128&n);case 3:return this.read_uint16(t);case 8:return(n=this.read_uint16(t))|131070*(32768&n);case 4:return this.read_uint32(t);case 9:return 0|this.read_uint32(t);default:return null}},o.prototype.scan_ifd=function(e,t,n){var o=this.read_uint16(t);t+=2;for(var a=0;a<o;a++){var s=this.read_uint16(t),l=this.read_uint16(t+2),c=this.read_uint32(t+4),u=this.exif_format_length(l),h=c*u,d=h<=4?t+8:this.read_uint32(t+8),f=!1;if(d+h>this.input.length)throw r("unexpected EOF","EBADDATA");for(var p=[],g=d,m=0;m<c;m++,g+=u){var v=this.exif_format_read(l,g);if(null===v){p=null;break}p.push(v)}if(Array.isArray(p)&&2===l&&(p=i(String.fromCharCode.apply(null,p)))&&"\0"===p[p.length-1]&&(p=p.slice(0,-1)),this.is_subifd_link(e,s)&&Array.isArray(p)&&Number.isInteger(p[0])&&p[0]>0&&(this.ifds_to_read.push({id:s,offset:p[0]}),f=!0),!1===n({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:t+this.start,data_length:h,data_offset:d+this.start,value:p,is_subifd_link:f}))return void(this.aborted=!0);t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=o,t.exports.get_orientation=function(e){var t=0;try{return new o(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch(e){return-1}}},{}],264:[function(e,t,n){"use strict";var r=e("./common").readUInt16BE,i=e("./common").readUInt32BE;function o(e,t){if(e.length<4+t)return null;var n=i(e,t);return e.length<n+t||n<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+n),end:t+n}}function a(e,t){for(var n=0;;){var r=o(e,n);if(!r)break;switch(r.boxtype){case"ispe":t.sizes.push({width:i(r.data,4),height:i(r.data,8)});break;case"irot":t.transforms.push({type:"irot",value:3&r.data[0]});break;case"imir":t.transforms.push({type:"imir",value:1&r.data[0]})}n=r.end}}function s(e,t,n){for(var r=0,i=0;i<n;i++)r=256*r+(e[t+i]||0);return r}function l(e,t){for(var n=e[4]>>4&15,i=15&e[4],o=e[5]>>4&15,a=r(e,6),l=8,c=0;c<a;c++){var u=r(e,l),h=r(e,l+=2),d=s(e,l+=2,o),f=r(e,l+=o);if(l+=2,0===h&&1===f){var p=s(e,l,n),g=s(e,l+n,i);t.item_loc[u]={length:g,offset:p+d}}l+=f*(n+i)}}function c(e,t){for(var n=r(e,4),i=6,a=0;a<n;a++){var s=o(e,i);if(!s)break;if("infe"===s.boxtype){for(var l=r(s.data,4),c="",u=8;u<s.data.length&&s.data[u];u++)c+=String.fromCharCode(s.data[u]);t.item_inf[c]=l}i=s.end}}function u(e,t){for(var n=0;;){var r=o(e,n);if(!r)break;"ipco"===r.boxtype&&a(r.data,t),n=r.end}}t.exports.unbox=o,t.exports.readSizeFromMeta=function(e){var t,n,r,i={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(e,t){for(var n=4;;){var r=o(e,n);if(!r)break;"iprp"===r.boxtype&&u(r.data,t),"iloc"===r.boxtype&&l(r.data,t),"iinf"===r.boxtype&&c(r.data,t),n=r.end}}(e,i),i.sizes.length){var a=(t=i.sizes,n=t.reduce((function(e,t){return e.width>t.width||e.width===t.width&&e.height>t.height?e:t})),r=t.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t})),n.width>r.height||n.width===r.height&&n.height>r.width?n:r),s=1;i.transforms.forEach((function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},n={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(s=0===e.value?n[s]:t[s=t[s=n[s]]]),"irot"===e.type)for(var r=0;r<e.value;r++)s=t[s]}));var h=null;return i.item_inf.Exif&&(h=i.item_loc[i.item_inf.Exif]),{width:a.width,height:a.height,orientation:i.transforms.length?s:null,variants:i.sizes,exif_location:h}}},t.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),n={};n[t]=!0;for(var r=8;r<e.length;r+=4)n[String.fromCharCode.apply(null,e.slice(r,r+4))]=!0;if(n.mif1||n.msf1||n.miaf)return"avif"===t||"avis"===t||"avio"===t?{type:"avif",mime:"image/avif"}:"heic"===t||"heix"===t?{type:"heic",mime:"image/heic"}:"hevc"===t||"hevx"===t?{type:"heic",mime:"image/heic-sequence"}:n.avif||n.avis?{type:"avif",mime:"image/avif"}:n.heic||n.heix||n.hevc||n.hevx||n.heis?n.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},{"./common":262}],265:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt32BE,a=e("../miaf_utils"),s=e("../exif_utils"),l=r("ftyp");t.exports=function(e){if(i(e,4,l)){var t=a.unbox(e,0);if(t){var n=a.getMimeType(t.data);if(n){for(var r,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){r=u.data;break}}if(r){var h=a.readSizeFromMeta(r);if(h){var d={width:h.width,height:h.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(d.variants=h.variants),h.orientation&&(d.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var f=o(e,h.exif_location.offset),p=e.slice(h.exif_location.offset+f+4,h.exif_location.offset+h.exif_location.length),g=s.get_orientation(p);g>0&&(d.orientation=g)}return d}}}}}}},{"../common":262,"../exif_utils":263,"../miaf_utils":264}],266:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt16LE,a=r("BM");t.exports=function(e){if(!(e.length<26)&&i(e,0,a))return{width:o(e,18),height:o(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":262}],267:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt16LE,a=r("GIF87a"),s=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&(i(e,0,a)||i(e,0,s)))return{width:o(e,6),height:o(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":262}],268:[function(e,t,n){"use strict";var r=e("../common").readUInt16LE;t.exports=function(e){var t=r(e,0),n=r(e,2),i=r(e,4);if(0===t&&1===n&&i){for(var o=[],a={width:0,height:0},s=0;s<i;s++){var l=e[6+16*s]||256,c=e[6+16*s+1]||256,u={width:l,height:c};o.push(u),(l>a.width||c>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:o,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":262}],269:[function(e,t,n){"use strict";var r=e("../common").readUInt16BE,i=e("../common").str2arr,o=e("../common").sliceEq,a=e("../exif_utils"),s=i("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var n,i,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)n=0;else{if(!(192<=l&&l<=254))return;if(e.length-t<2)return;n=r(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&n>=10&&o(e,t,s)&&(i=a.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t<n)return;var c={width:r(e,t+3),height:r(e,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return i>0&&(c.orientation=i),c}t+=n}}},{"../common":262,"../exif_utils":263}],270:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt32BE,a=r("PNG\r\n\n"),s=r("IHDR");t.exports=function(e){if(!(e.length<24)&&i(e,0,a)&&i(e,12,s))return{width:o(e,16),height:o(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":262}],271:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt32BE,a=r("8BPS\0");t.exports=function(e){if(!(e.length<22)&&i(e,0,a))return{width:o(e,18),height:o(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":262}],272:[function(e,t,n){"use strict";function r(e){return"number"==typeof e&&isFinite(e)&&e>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,o=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(e){return c.test(e)?e.match(c)[0]:"px"}t.exports=function(e){if(function(e){var t,n=0,r=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(n=3);n<r&&(32===(t=e[n])||9===t||13===t||10===t);)n++;return n!==r&&60===e[n]}(e)){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);var c=(t.match(i)||[""])[0];if(o.test(c)){var h=function(e){var t=e.match(a),n=e.match(s),r=e.match(l);return{width:t&&(t[1]||t[2]),height:n&&(n[1]||n[2]),viewbox:r&&(r[1]||r[2])}}(c),d=parseFloat(h.width),f=parseFloat(h.height);if(h.width&&h.height){if(!r(d)||!r(f))return;return{width:d,height:f,type:"svg",mime:"image/svg+xml",wUnits:u(h.width),hUnits:u(h.height)}}var p=(h.viewbox||"").split(" "),g={width:p[2],height:p[3]},m=parseFloat(g.width),v=parseFloat(g.height);if(r(m)&&r(v)&&u(g.width)===u(g.height)){var y=m/v;if(h.width){if(!r(d))return;return{width:d,height:d/y,type:"svg",mime:"image/svg+xml",wUnits:u(h.width),hUnits:u(h.width)}}if(h.height){if(!r(f))return;return{width:f*y,height:f,type:"svg",mime:"image/svg+xml",wUnits:u(h.height),hUnits:u(h.height)}}return{width:m,height:v,type:"svg",mime:"image/svg+xml",wUnits:u(g.width),hUnits:u(g.height)}}}}}},{}],273:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt16LE,a=e("../common").readUInt16BE,s=e("../common").readUInt32LE,l=e("../common").readUInt32BE,c=r("II*\0"),u=r("MM\0*");function h(e,t,n){return n?a(e,t):o(e,t)}function d(e,t,n){return n?l(e,t):s(e,t)}function f(e,t,n){var r=h(e,t+2,n);return 1!==d(e,t+4,n)||3!==r&&4!==r?null:3===r?h(e,t+8,n):d(e,t+8,n)}t.exports=function(e){if(!(e.length<8)&&(i(e,0,c)||i(e,0,u))){var t=77===e[0],n=d(e,4,t)-8;if(!(n<0)){var r=n+8;if(!(e.length-r<2)){var o=12*h(e,r+0,t);if(!(o<=0||(r+=2,e.length-r<o))){var a,s,l,p;for(a=0;a<o;a+=12)256===(p=h(e,r+a,t))?s=f(e,r+a,t):257===p&&(l=f(e,r+a,t));return s&&l?{width:s,height:l,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}:void 0}}}}}},{"../common":262}],274:[function(e,t,n){"use strict";var r=e("../common").str2arr,i=e("../common").sliceEq,o=e("../common").readUInt16LE,a=e("../common").readUInt32LE,s=e("../exif_utils"),l=r("RIFF"),c=r("WEBP");function u(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&o(e,t+6),height:16383&o(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function h(e,t){if(47===e[t]){var n=a(e,t+1);return{width:1+(16383&n),height:1+(n>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function d(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<<t|e[t+8]<<8|e[t+7]),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}t.exports=function(e){if(!(e.length<16)&&(i(e,0,l)||i(e,8,c))){var t=12,n=null,r=0,o=a(e,4)+8;if(!(o>e.length)){for(;t+8<o;)if(0!==e[t]){var f=String.fromCharCode.apply(null,e.slice(t,t+4)),p=a(e,t+4);"VP8 "===f&&p>=10?n=n||u(e,t+8):"VP8L"===f&&p>=9?n=n||h(e,t+8):"VP8X"===f&&p>=10?n=n||d(e,t+8):"EXIF"===f&&(r=s.get_orientation(e.slice(t+8,t+8+p)),t=1/0),t+=8+p}else t++;if(n)return r>0&&(n.orientation=r),n}}}},{"../common":262,"../exif_utils":263}],275:[function(e,t,n){"use strict";t.exports={avif:e("./parse_sync/avif"),bmp:e("./parse_sync/bmp"),gif:e("./parse_sync/gif"),ico:e("./parse_sync/ico"),jpeg:e("./parse_sync/jpeg"),png:e("./parse_sync/png"),psd:e("./parse_sync/psd"),svg:e("./parse_sync/svg"),tiff:e("./parse_sync/tiff"),webp:e("./parse_sync/webp")}},{"./parse_sync/avif":265,"./parse_sync/bmp":266,"./parse_sync/gif":267,"./parse_sync/ico":268,"./parse_sync/jpeg":269,"./parse_sync/png":270,"./parse_sync/psd":271,"./parse_sync/svg":272,"./parse_sync/tiff":273,"./parse_sync/webp":274}],276:[function(e,t,n){"use strict";var r=e("./lib/parsers_sync");t.exports=function(e){return function(e){for(var t=Object.keys(r),n=0;n<t.length;n++){var i=r[t[n]](e);if(i)return i}return null}(e)},t.exports.parsers=r},{"./lib/parsers_sync":275}],277:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var e=l(f);h=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||h||l(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],278:[function(e,t,r){(function(n){(function(){for(var r=e("performance-now"),i="undefined"==typeof window?n:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c<o.length;c++)s=i[o[c]+"Request"+a],l=i[o[c]+"Cancel"+a]||i[o[c]+"CancelRequest"+a];if(!s||!l){var u=0,h=0,d=[];s=function(e){if(0===d.length){var t=r(),n=Math.max(0,16.666666666666668-(t-u));u=n+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return d.push({handle:++h,callback:e,cancelled:!1}),h},l=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return s.call(i,e)},t.exports.cancel=function(){l.apply(i,arguments)},t.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=l}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":252}],279:[function(e,t,n){"use strict";var r=e("array-bounds"),i=e("color-normalize"),o=e("update-diff"),a=e("pick-by-alias"),s=e("object-assign"),l=e("flatten-vertex-data"),c=e("to-float32"),u=c.float32,h=c.fract32;t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var n,c,f,p,g,m,v=e._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},b=[];return p=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=e.buffer({usage:"static",type:"float",data:d}),A(t),n=e({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{color:{buffer:p,offset:function(e,t){return 4*t.offset},divisor:1},position:{buffer:c,offset:function(e,t){return 8*t.offset},divisor:1},positionFract:{buffer:f,offset:function(e,t){return 8*t.offset},divisor:1},error:{buffer:g,offset:function(e,t){return 16*t.offset},divisor:1},direction:{buffer:m,stride:24,offset:0},lineOffset:{buffer:m,stride:24,offset:8},capOffset:{buffer:m,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:d.length}),s(_,{update:A,draw:x,destroy:k,regl:e,gl:v,canvas:v.canvas,groups:b}),_;function _(e){e?A(e):null===e&&k(),x()}function x(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),b.forEach((function(e,n){e&&(t&&(t[n]?e.draw=!0:e.draw=!1),e.draw?w(n):e.draw=!0)}))}function w(e){"number"==typeof e&&(e=b[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],n(e),e.after&&e.after(e))}function A(e){if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var t=0,n=0;if(_.groups=b=e.map((function(e,c){var u=b[c];return e?("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(b[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=s({},y,e)),o(u,e,[{lineWidth:function(e){return.5*+e},capSize:function(e){return.5*+e},opacity:parseFloat,errors:function(e){return e=l(e),n+=e.length,e},positions:function(e,n){return e=l(e,"float64"),n.count=Math.floor(e.length/2),n.bounds=r(e,2),n.offset=t,t+=n.count,e}},{color:function(e,t){var n=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){var r=e;e=Array(n);for(var o=0;o<n;o++)e[o]=r}if(e.length<n)throw Error("Not enough colors");for(var a=new Uint8Array(4*n),s=0;s<n;s++){var l=i(e[s],"uint8");a.set(l,4*s)}return a},range:function(e,t,n){var r=t.bounds;return e||(e=r),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=h(t.scale),t.translateFract=h(t.translate),e},viewport:function(e){var t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:v.drawingBufferWidth,height:v.drawingBufferHeight},t}}]),u):u})),t||n){var d=b.reduce((function(e,t,n){return e+(t?t.count:0)}),0),m=new Float64Array(2*d),x=new Uint8Array(4*d),w=new Float32Array(4*d);b.forEach((function(e,t){if(e){var n=e.positions,r=e.count,i=e.offset,o=e.color,a=e.errors;r&&(x.set(o,4*i),w.set(a,4*i),m.set(n,2*i))}}));var A=u(m);c(A);var k=h(m,A);f(k),p(x),g(w)}}}function k(){c.destroy(),f.destroy(),p.destroy(),g.destroy(),m.destroy()}};var d=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{"array-bounds":71,"color-normalize":89,"flatten-vertex-data":191,"object-assign":247,"pick-by-alias":253,"to-float32":313,"update-diff":329}],280:[function(e,t,n){"use strict";var r=e("color-normalize"),i=e("array-bounds"),o=e("object-assign"),a=e("glslify"),s=e("pick-by-alias"),l=e("flatten-vertex-data"),c=e("earcut"),u=e("array-normalize"),h=e("to-float32"),d=h.float32,f=h.fract32,p=e("es6-weak-map"),g=e("parse-rect"),m=e("array-find-index");function v(e,t){if(!(this instanceof v))return new v(e,t);if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=v.shaders.has(e)?v.shaders.get(e):v.shaders.set(e,v.createShaders(e)).get(e),this.update(t)}t.exports=v,v.dashMult=2,v.maxPatternLength=256,v.precisionThreshold=3e6,v.maxPoints=1e4,v.maxLines=2048,v.shaders=new p,v.createShaders=function(e){var t,n=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:function(e,t){return"round"===t.join?2:1},miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(e,t){return!t.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(o({vert:a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n"]),frag:a(["precision highp float;\n#define GLSLIFY 1\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:n,divisor:0,stride:8,offset:0},lineTop:{buffer:n,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r));try{t=e(o({cull:{enable:!0,face:"back"},vert:a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:a(["precision highp float;\n#define GLSLIFY 1\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:n,divisor:0,stride:8,offset:0},lineTop:{buffer:n,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(e){t=i}return{fill:e({primitive:"triangle",elements:function(e,t){return t.triangles},offset:0,vert:a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:a(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:t}},v.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},v.prototype.render=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];t.length&&(e=this).update.apply(e,t),this.draw()},v.prototype.draw=function(){for(var e=this,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(t.length?t:this.passes).forEach((function(t,n){var r;if(t&&Array.isArray(t))return(r=e).draw.apply(r,t);"number"==typeof t&&(t=e.passes[t]),t&&t.count>1&&t.opacity&&(e.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&e.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>v.precisionThreshold||t.scale[1]*t.viewport.height>v.precisionThreshold||"rect"===t.join||!t.join&&(t.thickness<=2||t.count>=v.maxPoints)?e.shaders.rect(t):e.shaders.miter(t)))})),this},v.prototype.update=function(e){var t=this;if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var n=this.regl,a=this.gl;if(e.forEach((function(e,h){var p=t.passes[h];if(void 0!==e)if(null!==e){if("number"==typeof e[0]&&(e={positions:e}),e=s(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(t.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:n.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=o({},v.defaults,e)),null!=e.thickness&&(p.thickness=parseFloat(e.thickness)),null!=e.opacity&&(p.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(p.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(p.overlay=!!e.overlay,h<v.maxLines&&(p.depth=2*(v.maxLines-1-h%v.maxLines)/v.maxLines-1)),null!=e.join&&(p.join=e.join),null!=e.hole&&(p.hole=e.hole),null!=e.fill&&(p.fill=e.fill?r(e.fill,"uint8"):null),null!=e.viewport&&(p.viewport=g(e.viewport)),p.viewport||(p.viewport=g([a.drawingBufferWidth,a.drawingBufferHeight])),null!=e.close&&(p.close=e.close),null===e.positions&&(e.positions=[]),e.positions){var y,b;if(e.positions.x&&e.positions.y){var _=e.positions.x,x=e.positions.y;b=p.count=Math.max(_.length,x.length),y=new Float64Array(2*b);for(var w=0;w<b;w++)y[2*w]=_[w],y[2*w+1]=x[w]}else y=l(e.positions,"float64"),b=p.count=Math.floor(y.length/2);var A=p.bounds=i(y,2);if(p.fill){for(var k=[],T={},S=0,E=0,C=0,M=p.count;E<M;E++){var O=y[2*E],L=y[2*E+1];isNaN(O)||isNaN(L)||null==O||null==L?(O=y[2*S],L=y[2*S+1],T[E]=S):S=E,k[C++]=O,k[C++]=L}if(e.splitNull){p.count-1 in T||(T[p.count]=p.count-1);var D=Object.keys(T).map(Number).sort((function(e,t){return e-t})),I=[],R=0,P=null!=p.hole?p.hole[0]:null;if(null!=P){var N=m(D,(function(e){return e>=P}));(D=D.slice(0,N)).push(P)}for(var z=function(e){var t=k.slice(2*R,2*D[e]).concat(P?k.slice(2*P):[]),n=(p.hole||[]).map((function(t){return t-P+(D[e]-R)})),r=c(t,n);r=r.map((function(t){return t+R+(t+R<D[e]?0:P-D[e])})),I.push.apply(I,r),R=D[e]+1},F=0;F<D.length;F++)z(F);for(var B=0,j=I.length;B<j;B++)null!=T[I[B]]&&(I[B]=T[I[B]]);p.triangles=I}else{for(var U=c(k,p.hole||[]),V=0,q=U.length;V<q;V++)null!=T[U[V]]&&(U[V]=T[U[V]]);p.triangles=U}}var H=new Float64Array(y);u(H,2,A);var $=new Float64Array(2*b+6);p.close?y[0]===y[2*b-2]&&y[1]===y[2*b-1]?($[0]=H[2*b-4],$[1]=H[2*b-3]):($[0]=H[2*b-2],$[1]=H[2*b-1]):($[0]=H[0],$[1]=H[1]),$.set(H,2),p.close?y[0]===y[2*b-2]&&y[1]===y[2*b-1]?($[2*b+2]=H[2],$[2*b+3]=H[3],p.count-=1):($[2*b+2]=H[0],$[2*b+3]=H[1],$[2*b+4]=H[2],$[2*b+5]=H[3]):($[2*b+2]=H[2*b-2],$[2*b+3]=H[2*b-1],$[2*b+4]=H[2*b-2],$[2*b+5]=H[2*b-1]);var W=d($);p.positionBuffer(W);var G=f($,W);p.positionFractBuffer(G)}if(e.range?p.range=e.range:p.range||(p.range=p.bounds),(e.range||e.positions)&&p.count){var Y=p.bounds,X=Y[2]-Y[0],Z=Y[3]-Y[1],K=p.range[2]-p.range[0],J=p.range[3]-p.range[1];p.scale=[X/K,Z/J],p.translate=[-p.range[0]/K+Y[0]/K||0,-p.range[1]/J+Y[1]/J||0],p.scaleFract=f(p.scale),p.translateFract=f(p.translate)}if(e.dashes){var Q,ee=0;if(!e.dashes||e.dashes.length<2)ee=1,Q=new Uint8Array([255,255,255,255,255,255,255,255]);else{ee=0;for(var te=0;te<e.dashes.length;++te)ee+=e.dashes[te];Q=new Uint8Array(ee*v.dashMult);for(var ne=0,re=255,ie=0;ie<2;ie++)for(var oe=0;oe<e.dashes.length;++oe){for(var ae=0,se=e.dashes[oe]*v.dashMult*.5;ae<se;++ae)Q[ne++]=re;re^=255}}p.dashLength=ee,p.dashTexture({channels:1,data:Q,width:Q.length,height:1,mag:"linear",min:"linear"},0,0)}if(e.color){var le=p.count,ce=e.color;ce||(ce="transparent");var ue=new Uint8Array(4*le+4);if(Array.isArray(ce)&&"number"!=typeof ce[0]){for(var he=0;he<le;he++){var de=r(ce[he],"uint8");ue.set(de,4*he)}ue.set(r(ce[0],"uint8"),4*le)}else for(var fe=r(ce,"uint8"),pe=0;pe<le+1;pe++)ue.set(fe,4*pe);p.colorBuffer({usage:"dynamic",type:"uint8",data:ue})}}else t.passes[h]=null})),e.length<this.passes.length){for(var h=e.length;h<this.passes.length;h++){var p=this.passes[h];p&&(p.colorBuffer.destroy(),p.positionBuffer.destroy(),p.dashTexture.destroy())}this.passes.length=e.length}for(var y=[],b=0;b<this.passes.length;b++)null!==this.passes[b]&&y.push(this.passes[b]);return this.passes=y,this}},v.prototype.destroy=function(){return this.passes.forEach((function(e){e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()})),this.passes.length=0,this}},{"array-bounds":71,"array-find-index":72,"array-normalize":73,"color-normalize":89,earcut:129,"es6-weak-map":183,"flatten-vertex-data":191,glslify:227,"object-assign":247,"parse-rect":249,"pick-by-alias":253,"to-float32":313}],281:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=e("color-normalize"),l=e("array-bounds"),c=e("color-id"),u=e("@plotly/point-cluster"),h=e("object-assign"),d=e("glslify"),f=e("pick-by-alias"),p=e("update-diff"),g=e("flatten-vertex-data"),m=e("is-iexplorer"),v=e("to-float32"),y=e("parse-rect"),b=_;function _(e,t){var n=this;if(!(this instanceof _))return new _(e,t);"function"==typeof e?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t);var r,i=(e=t.regl)._gl,o=[],a=255;this.tooManyColors=m,r=e.texture({data:new Uint8Array(1020),width:a,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),h(this,{regl:e,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:o,paletteIds:{},paletteTexture:r,maxColors:a,maxSize:100,canvas:i.canvas}),this.update(t);var s={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:function(e,t){return[n.tooManyColors?0:a,r.height]},pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:r},attributes:{x:function(e,t){return t.xAttr||{buffer:t.positionBuffer,stride:8,offset:0}},y:function(e,t){return t.yAttr||{buffer:t.positionBuffer,stride:8,offset:4}},xFract:function(e,t){return t.xAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:0}},yFract:function(e,t){return t.yAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:4}},size:function(e,t){return t.size.length?{buffer:t.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*t.size/n.maxSize)]}},borderSize:function(e,t){return t.borderSize.length?{buffer:t.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*t.borderSize/n.maxSize)]}},colorId:function(e,t){return t.color.length?{buffer:t.colorBuffer,stride:n.tooManyColors?8:4,offset:0}:{constant:n.tooManyColors?o.slice(4*t.color,4*t.color+4):[t.color]}},borderColorId:function(e,t){return t.borderColor.length?{buffer:t.colorBuffer,stride:n.tooManyColors?8:4,offset:n.tooManyColors?4:2}:{constant:n.tooManyColors?o.slice(4*t.borderColor,4*t.borderColor+4):[t.borderColor]}},isActive:function(e,t){return!0===t.activation?{constant:[1]}:t.activation?t.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},l=h({},s);l.frag=d(["precision highp float;\n#define GLSLIFY 1\n\nuniform float opacity;\nuniform sampler2D markerTexture;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\n\nfloat smoothStep(float x, float y) {\n return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;\n\n // max-distance alpha\n if (dist < 0.003) discard;\n\n // null-border case\n if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n }\n else {\n float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n\n vec4 color = fragBorderColor;\n color.a *= borderColorAmt;\n color = mix(color, fragColor, colorAmt);\n color.a *= opacity;\n\n gl_FragColor = color;\n }\n\n}\n"]),l.vert=d(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\nconst float borderLevel = .5;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = 2. * size * pointSizeScale;\n fragPointSize = size * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragColor = color;\n fragBorderColor = borderColor;\n fragWidth = 1. / gl_PointSize;\n\n fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n}"]),this.drawMarker=e(l);var c=h({},s);c.frag=d(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nuniform float opacity;\n\nfloat smoothStep(float edge0, float edge1, float x) {\n\tfloat t;\n\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n\treturn t * t * (3.0 - 2.0 * t);\n}\n\nvoid main() {\n\tfloat radius, alpha = 1.0, delta = fragWidth;\n\n\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n\n\tif (radius > 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),c.vert=d(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(c.frag=c.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(c)}_.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},_.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},_.prototype.draw=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=this.groups;if(1===n.length&&Array.isArray(n[0])&&(null===n[0][0]||Array.isArray(n[0][0]))&&(n=n[0]),this.regl._refresh(),n.length)for(var o=0;o<n.length;o++)this.drawItem(o,n[o]);else i.forEach((function(t,n){e.drawItem(n)}));return this},_.prototype.drawItem=function(e,t){var n=this.groups,r=n[e];if("number"==typeof t&&(e=t,r=n[t],t=null),r&&r.count&&r.opacity){r.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,r,t));for(var o=[],a=1;a<r.activation.length;a++)r.activation[a]&&(!0===r.activation[a]||r.activation[a].data.length)&&o.push.apply(o,i(this.getMarkerDrawOptions(a,r,t)));o.length&&this.drawMarker(o)}},_.prototype.getMarkerDrawOptions=function(e,t,n){var i=t.range,o=t.tree,a=t.viewport,s=t.activation,l=t.selectionBuffer,c=t.count;if(this.regl,!o)return n?[h({},t,{markerTexture:this.markerTextures[e],activation:s[e],count:n.length,elements:n,offset:0})]:[h({},t,{markerTexture:this.markerTextures[e],activation:s[e],offset:0})];var u=[],d=o.range(i,{lod:!0,px:[(i[2]-i[0])/a.width,(i[3]-i[1])/a.height]});if(n){for(var f=s[e].data,p=new Uint8Array(c),g=0;g<n.length;g++){var m=n[g];p[m]=f?f[m]:1}l.subdata(p)}for(var v=d.length;v--;){var y=r(d[v],2),b=y[0],_=y[1];u.push(h({},t,{markerTexture:this.markerTextures[e],activation:n?l:s[e],offset:b,count:_-b}))}return u},_.prototype.update=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length){1===n.length&&Array.isArray(n[0])&&(n=n[0]);var i=this.groups,o=this.gl,a=this.regl,s=this.maxSize,c=this.maxColors,d=this.palette;this.groups=i=n.map((function(t,n){var r=i[n];if(void 0===t)return r;null===t?t={positions:null}:"function"==typeof t?t={ondraw:t}:"number"==typeof t[0]&&(t={positions:t}),null===(t=f(t,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(t.positions=[]),null!=t.tooManyColors&&(e.tooManyColors=t.tooManyColors),r||(i[n]=r={id:n,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:a.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},t=h({},_.defaults,t)),t.positions&&!("marker"in t)&&(t.marker=r.marker,delete r.marker),t.marker&&!("positions"in t)&&(t.positions=r.positions,delete r.positions);var m=0,b=0;if(p(r,t,[{snap:!0,size:function(e,t){return null==e&&(e=_.defaults.size),m+=e&&e.length?1:0,e},borderSize:function(e,t){return null==e&&(e=_.defaults.borderSize),m+=e&&e.length?1:0,e},opacity:parseFloat,color:function(t,n){return null==t&&(t=_.defaults.color),t=e.updateColor(t),b++,t},borderColor:function(t,n){return null==t&&(t=_.defaults.borderColor),t=e.updateColor(t),b++,t},bounds:function(e,t,n){return"range"in n||(n.range=null),e},positions:function(e,t,n){var r=t.snap,i=t.positionBuffer,o=t.positionFractBuffer,s=t.selectionBuffer;if(e.x||e.y)return e.x.length?t.xAttr={buffer:a.buffer(e.x),offset:0,stride:4,count:e.x.length}:t.xAttr={buffer:e.x.buffer,offset:4*e.x.offset||0,stride:4*(e.x.stride||1),count:e.x.count},e.y.length?t.yAttr={buffer:a.buffer(e.y),offset:0,stride:4,count:e.y.length}:t.yAttr={buffer:e.y.buffer,offset:4*e.y.offset||0,stride:4*(e.y.stride||1),count:e.y.count},t.count=Math.max(t.xAttr.count,t.yAttr.count),e;e=g(e,"float64");var c=t.count=Math.floor(e.length/2),h=t.bounds=c?l(e,2):null;if(n.range||t.range||(delete t.range,n.range=h),n.marker||t.marker||(delete t.marker,n.marker=null),r&&(!0===r||c>r)?t.tree=u(e,{bounds:h}):r&&r.length&&(t.tree=r),t.tree){var d={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(d):t.elements=a.elements(d)}var f=v.float32(e);return i({data:f,usage:"dynamic"}),o({data:v.fract32(e,f),usage:"dynamic"}),s({data:new Uint8Array(c),type:"uint8",usage:"stream"}),e}},{marker:function(t,n,r){var i=n.activation;if(i.forEach((function(e){return e&&e.destroy&&e.destroy()})),i.length=0,t&&"number"!=typeof t[0]){for(var o=[],s=0,l=Math.min(t.length,n.count);s<l;s++){var c=e.addMarker(t[s]);o[c]||(o[c]=new Uint8Array(n.count)),o[c][s]=1}for(var u=0;u<o.length;u++)if(o[u]){var h={data:o[u],type:"uint8",usage:"static"};i[u]?i[u](h):i[u]=a.buffer(h),i[u].data=o[u]}}else i[e.addMarker(t)]=!0;return t},range:function(e,t,n){var r=t.bounds;if(r)return e||(e=r),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=v.fract(t.scale),t.translateFract=v.fract(t.translate),e},viewport:function(e){return y(e||[o.drawingBufferWidth,o.drawingBufferHeight])}}]),m){var x=r,w=x.count,A=x.size,k=x.borderSize,T=x.sizeBuffer,S=new Uint8Array(2*w);if(A.length||k.length)for(var E=0;E<w;E++)S[2*E]=Math.round(255*(null==A[E]?A:A[E])/s),S[2*E+1]=Math.round(255*(null==k[E]?k:k[E])/s);T({data:S,usage:"dynamic"})}if(b){var C,M=r,O=M.count,L=M.color,D=M.borderColor,I=M.colorBuffer;if(e.tooManyColors){if(L.length||D.length){C=new Uint8Array(8*O);for(var R=0;R<O;R++){var P=L[R];C[8*R]=d[4*P],C[8*R+1]=d[4*P+1],C[8*R+2]=d[4*P+2],C[8*R+3]=d[4*P+3];var N=D[R];C[8*R+4]=d[4*N],C[8*R+5]=d[4*N+1],C[8*R+6]=d[4*N+2],C[8*R+7]=d[4*N+3]}}}else if(L.length||D.length){C=new Uint8Array(4*O+2);for(var z=0;z<O;z++)null!=L[z]&&(C[4*z]=L[z]%c,C[4*z+1]=Math.floor(L[z]/c)),null!=D[z]&&(C[4*z+2]=D[z]%c,C[4*z+3]=Math.floor(D[z]/c))}I({data:C||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return r}))}},_.prototype.addMarker=function(e){var t,n=this.markerTextures,r=this.regl,i=this.markerCache,o=null==e?0:i.indexOf(e);if(o>=0)return o;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var a=0,s=e.length;a<s;a++)t[a]=255*e[a]}var l=Math.floor(Math.sqrt(t.length));return o=n.length,i.push(e),n.push(r.texture({channels:1,data:t,radius:l,mag:"linear",min:"linear"})),o},_.prototype.updateColor=function(e){var t=this.paletteIds,n=this.palette,r=this.maxColors;Array.isArray(e)||(e=[e]);var i=[];if("number"==typeof e[0]){var o=[];if(Array.isArray(e))for(var a=0;a<e.length;a+=4)o.push(e.slice(a,a+4));else for(var l=0;l<e.length;l+=4)o.push(e.subarray(l,l+4));e=o}for(var u=0;u<e.length;u++){var h=e[u];h=s(h,"uint8");var d=c(h,!1);if(null==t[d]){var f=n.length;t[d]=Math.floor(f/4),n[f]=h[0],n[f+1]=h[1],n[f+2]=h[2],n[f+3]=h[3]}i[u]=t[d]}return!this.tooManyColors&&n.length>4*r&&(this.tooManyColors=!0),this.updatePalette(n),1===i.length?i[0]:i},_.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,n=this.paletteTexture,r=Math.ceil(.25*e.length/t);if(r>1)for(var i=.25*(e=e.slice()).length%t;i<r*t;i++)e.push(0,0,0,0);n.height<r&&n.resize(t,r),n.subimage({width:Math.min(.25*e.length,t),height:r,data:e},0,0)}},_.prototype.destroy=function(){return this.groups.forEach((function(e){e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach((function(e){return e&&e.destroy&&e.destroy()})),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()})),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach((function(e){return e&&e.destroy&&e.destroy()})),this};var x=e("object-assign");t.exports=function(e,t){var n=new b(e,t),r=n.render.bind(n);return x(r,{render:r,update:n.update.bind(n),draw:n.draw.bind(n),destroy:n.destroy.bind(n),regl:n.regl,gl:n.gl,canvas:n.gl.canvas,groups:n.groups,markers:n.markerCache,palette:n.palette}),r}},{"@plotly/point-cluster":59,"array-bounds":71,"color-id":87,"color-normalize":89,"flatten-vertex-data":191,glslify:227,"is-iexplorer":233,"object-assign":247,"parse-rect":249,"pick-by-alias":253,"to-float32":313,"update-diff":329}],282:[function(e,t,n){"use strict";var r=e("regl-scatter2d"),i=e("pick-by-alias"),o=e("array-bounds"),a=e("raf"),s=e("array-range"),l=e("parse-rect"),c=e("flatten-vertex-data");function u(e,t){if(!(this instanceof u))return new u(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=r(e),this.canvas=this.scatter.canvas}function h(e,t,n){return(null!=e.id?e.id:e)<<16|(255&t)<<8|255&n}function d(e,t,n){var r,i,o,a,s=e[t],l=e[n];return s.length>2?(s[0],s[2],r=s[1],i=s[3]):s.length?(r=s[0],i=s[1]):(s.x,r=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(o=l[0],a=l[2],l[1],l[3]):l.length?(o=l[0],a=l[1]):(o=l.x,l.y,a=l.x+l.width,l.y,l.height),[o,r,a,i]}function f(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];var t=l(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}t.exports=u,u.prototype.render=function(){for(var e,t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];return n.length&&(e=this).update.apply(e,n),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a((function(){t.draw(),t.dirty=!0,t.planned=null}))):(this.draw(),this.dirty=!0,a((function(){t.dirty=!1}))),this)},u.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length){for(var r=0;r<t.length;r++)this.updateItem(r,t[r]);this.traces=this.traces.filter(Boolean);for(var i=[],o=0,a=0;a<this.traces.length;a++){for(var s=this.traces[a],l=this.traces[a].passes,c=0;c<l.length;c++)i.push(this.passes[l[c]]);s.passOffset=o,o+=s.passes.length}return(e=this.scatter).update.apply(e,i),this}},u.prototype.updateItem=function(e,t){var n=this.regl;if(null===t)return this.traces[e]=null,this;if(!t)return this;var r,a=i(t,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),s=this.traces[e]||(this.traces[e]={id:e,buffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:l([n._gl.drawingBufferWidth,n._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=a.color&&(s.color=a.color),null!=a.size&&(s.size=a.size),null!=a.marker&&(s.marker=a.marker),null!=a.borderColor&&(s.borderColor=a.borderColor),null!=a.borderSize&&(s.borderSize=a.borderSize),null!=a.opacity&&(s.opacity=a.opacity),a.viewport&&(s.viewport=l(a.viewport)),null!=a.diagonal&&(s.diagonal=a.diagonal),null!=a.upper&&(s.upper=a.upper),null!=a.lower&&(s.lower=a.lower),a.data){s.buffer(c(a.data)),s.columns=a.data.length,s.count=a.data[0].length,s.bounds=[];for(var u=0;u<s.columns;u++)s.bounds[u]=o(a.data[u],1)}a.range&&(s.range=a.range,r=s.range&&"number"!=typeof s.range[0]),a.domain&&(s.domain=a.domain);var p=!1;null!=a.padding&&(Array.isArray(a.padding)&&a.padding.length===s.columns&&"number"==typeof a.padding[a.padding.length-1]?(s.padding=a.padding.map(f),p=!0):s.padding=f(a.padding));var g=s.columns,m=s.count,v=s.viewport.width,y=s.viewport.height,b=s.viewport.x,_=s.viewport.y,x=v/g,w=y/g;s.passes=[];for(var A=0;A<g;A++)for(var k=0;k<g;k++)if((s.diagonal||k!==A)&&(s.upper||!(A>k))&&(s.lower||!(A<k))){var T=h(s.id,A,k),S=this.passes[T]||(this.passes[T]={});if(a.data&&(a.transpose?S.positions={x:{buffer:s.buffer,offset:k,count:m,stride:g},y:{buffer:s.buffer,offset:A,count:m,stride:g}}:S.positions={x:{buffer:s.buffer,offset:k*m,count:m},y:{buffer:s.buffer,offset:A*m,count:m}},S.bounds=d(s.bounds,A,k)),a.domain||a.viewport||a.data){var E=p?d(s.padding,A,k):s.padding;if(s.domain){var C=d(s.domain,A,k),M=C[0],O=C[1],L=C[2],D=C[3];S.viewport=[b+M*v+E[0],_+O*y+E[1],b+L*v-E[2],_+D*y-E[3]]}else S.viewport=[b+k*x+x*E[0],_+A*w+w*E[1],b+(k+1)*x-x*E[2],_+(A+1)*w-w*E[3]]}a.color&&(S.color=s.color),a.size&&(S.size=s.size),a.marker&&(S.marker=s.marker),a.borderSize&&(S.borderSize=s.borderSize),a.borderColor&&(S.borderColor=s.borderColor),a.opacity&&(S.opacity=s.opacity),a.range&&(S.range=r?d(s.range,A,k):s.range||S.bounds),s.passes.push(T)}return this},u.prototype.draw=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length){for(var r=[],i=0;i<t.length;i++)if("number"==typeof t[i]){var o=this.traces[t[i]],a=o.passes,l=o.passOffset;r.push.apply(r,s(l,l+a.length))}else if(t[i].length){var c=t[i],u=this.traces[i],h=u.passes,d=u.passOffset;h=h.map((function(e,t){r[d+t]=c}))}(e=this.scatter).draw.apply(e,r)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach((function(e){e.buffer&&e.buffer.destroy&&e.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{"array-bounds":71,"array-range":74,"flatten-vertex-data":191,"parse-rect":249,"pick-by-alias":253,raf:278,"regl-scatter2d":281}],283:[function(e,t,n){var r;r=function(){function e(e,t){this.id=q++,this.type=e,this.data=t}function t(e){if(0===e.length)return[];var n=e.charAt(0),r=e.charAt(e.length-1);if(1<e.length&&n===r&&('"'===n||"'"===n))return['"'+e.substr(1,e.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e))return t(e.substr(0,n.index)).concat(t(n[1])).concat(t(e.substr(n.index+n[0].length)));if(1===(n=e.split(".")).length)return['"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(e=[],r=0;r<n.length;++r)e=e.concat(t(n[r]));return e}function n(e){return"["+t(e).join("][")+"]"}function r(e){return"string"==typeof e?e.split():e}function i(e){return"string"==typeof e?document.querySelector(e):e}function o(e){var t,n,o,a,s=e||{};e={};var l=[],c=[],u="undefined"==typeof window?1:window.devicePixelRatio,h=!1,d=function(e){},f=function(){};if("string"==typeof s?t=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?t=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?o=(a=s).canvas:("gl"in s?a=s.gl:"canvas"in s?o=i(s.canvas):"container"in s&&(n=i(s.container)),"attributes"in s&&(e=s.attributes),"extensions"in s&&(l=r(s.extensions)),"optionalExtensions"in s&&(c=r(s.optionalExtensions)),"onDone"in s&&(d=s.onDone),"profile"in s&&(h=!!s.profile),"pixelRatio"in s&&(u=+s.pixelRatio))),t&&("canvas"===t.nodeName.toLowerCase()?o=t:n=t),!a){if(!o){if(!(t=function(e,t,n){function r(){var t=window.innerWidth,r=window.innerHeight;e!==document.body&&(t=(r=o.getBoundingClientRect()).right-r.left,r=r.bottom-r.top),o.width=n*t,o.height=n*r}var i,o=document.createElement("canvas");return V(o.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),e.appendChild(o),e===document.body&&(o.style.position="absolute",V(e.style,{margin:0,padding:0})),e!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(r)}))).observe(e):window.addEventListener("resize",r,!1),r(),{canvas:o,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",r),e.removeChild(o)}}}(n||document.body,0,u)))return null;o=t.canvas,f=t.onDestroy}void 0===e.premultipliedAlpha&&(e.premultipliedAlpha=!0),a=function(e,t){function n(n){try{return e.getContext(n,t)}catch(e){return null}}return n("webgl")||n("experimental-webgl")||n("webgl-experimental")}(o,e)}return a?{gl:a,canvas:o,container:n,extensions:l,optionalExtensions:c,pixelRatio:u,profile:h,onDone:d,onDestroy:f}:(f(),d("webgl not supported, try upgrading your browser or graphics drivers path_to_url"),null)}function a(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=t(r);return n}function s(e){var t,n;return t=(65535<e)<<4,t|=n=(255<(e>>>=t))<<3,(t|=n=(15<(e>>>=n))<<2)|(n=(3<(e>>>=n))<<1)|e>>>n>>1}function l(){function e(e){e:{for(var t=16;268435456>=t;t*=16)if(e<=t){e=t;break e}e=0}return 0<(t=n[s(e)>>2]).length?t.pop():new ArrayBuffer(e)}function t(e){n[s(e.byteLength)>>2].push(e)}var n=a(8,(function(){return[]}));return{alloc:e,free:t,allocType:function(t,n){var r=null;switch(t){case 5120:r=new Int8Array(e(n),0,n);break;case 5121:r=new Uint8Array(e(n),0,n);break;case 5122:r=new Int16Array(e(2*n),0,n);break;case 5123:r=new Uint16Array(e(2*n),0,n);break;case 5124:r=new Int32Array(e(4*n),0,n);break;case 5125:r=new Uint32Array(e(4*n),0,n);break;case 5126:r=new Float32Array(e(4*n),0,n);break;default:return null}return r.length!==n?r.subarray(0,n):r},freeType:function(e){t(e.buffer)}}}function c(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||X(e.data))}function u(e,t,n,r,i,o){for(var a=0;a<t;++a)for(var s=e[a],l=0;l<n;++l)for(var c=s[l],u=0;u<r;++u)i[o++]=c[u]}function h(e,t,n,r,i){for(var o=1,a=n+1;a<t.length;++a)o*=t[a];var s=t[n];if(4==t.length-n){var l=t[n+1],c=t[n+2];for(t=t[n+3],a=0;a<s;++a)u(e[a],l,c,t,r,i),i+=o}else for(a=0;a<s;++a)h(e[a],t,n+1,r,i),i+=o}function d(e){return 0|J[Object.prototype.toString.call(e)]}function f(e,t){for(var n=0;n<t.length;++n)e[n]=t[n]}function p(e,t,n,r,i,o,a){for(var s=0,l=0;l<n;++l)for(var c=0;c<r;++c)e[s++]=t[i*l+o*c+a]}function g(e,t,n,r){function i(t){this.id=l++,this.buffer=e.createBuffer(),this.type=t,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,n.profile&&(this.stats={size:0})}function o(t,n,r){t.byteLength=n.byteLength,e.bufferData(t.type,n,r)}function a(e,t,n,r,i,a){if(e.usage=n,Array.isArray(t)){if(e.dtype=r||5126,0<t.length)if(Array.isArray(t[0])){i=ne(t);for(var s=r=1;s<i.length;++s)r*=i[s];e.dimension=r,o(e,t=te(t,i,e.dtype),n),a?e.persistentData=t:G.freeType(t)}else"number"==typeof t[0]?(e.dimension=i,f(i=G.allocType(e.dtype,t.length),t),o(e,i,n),a?e.persistentData=i:G.freeType(i)):X(t[0])&&(e.dimension=t[0].length,e.dtype=r||d(t[0])||5126,o(e,t=te(t,[t.length,t[0].length],e.dtype),n),a?e.persistentData=t:G.freeType(t))}else if(X(t))e.dtype=r||d(t),e.dimension=i,o(e,t,n),a&&(e.persistentData=new Uint8Array(new Uint8Array(t.buffer)));else if(c(t)){i=t.shape;var l=t.stride,u=(s=t.offset,0),h=0,g=0,m=0;1===i.length?(u=i[0],h=1,g=l[0],m=0):2===i.length&&(u=i[0],h=i[1],g=l[0],m=l[1]),e.dtype=r||d(t.data)||5126,e.dimension=h,p(i=G.allocType(e.dtype,u*h),t.data,u,h,g,m,s),o(e,i,n),a?e.persistentData=i:G.freeType(i)}else t instanceof ArrayBuffer&&(e.dtype=5121,e.dimension=i,o(e,t,n),a&&(e.persistentData=new Uint8Array(new Uint8Array(t))))}function s(n){t.bufferCount--,r(n),e.deleteBuffer(n.buffer),n.buffer=null,delete u[n.id]}var l=0,u={};i.prototype.bind=function(){e.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var h=[];return n.profile&&(t.getTotalBufferSize=function(){var e=0;return Object.keys(u).forEach((function(t){e+=u[t].stats.size})),e}),{create:function(r,o,l,h){function g(t){var r=35044,i=null,o=0,s=0,l=1;return Array.isArray(t)||X(t)||c(t)||t instanceof ArrayBuffer?i=t:"number"==typeof t?o=0|t:t&&("data"in t&&(i=t.data),"usage"in t&&(r=ee[t.usage]),"type"in t&&(s=Q[t.type]),"dimension"in t&&(l=0|t.dimension),"length"in t&&(o=0|t.length)),m.bind(),i?a(m,i,r,s,l,h):(o&&e.bufferData(m.type,o,r),m.dtype=s||5121,m.usage=r,m.dimension=l,m.byteLength=o),n.profile&&(m.stats.size=m.byteLength*re[m.dtype]),g}t.bufferCount++;var m=new i(o);return u[m.id]=m,l||g(r),g._reglType="buffer",g._buffer=m,g.subdata=function(t,n){var r,i=0|(n||0);if(m.bind(),X(t)||t instanceof ArrayBuffer)e.bufferSubData(m.type,i,t);else if(Array.isArray(t)){if(0<t.length)if("number"==typeof t[0]){var o=G.allocType(m.dtype,t.length);f(o,t),e.bufferSubData(m.type,i,o),G.freeType(o)}else(Array.isArray(t[0])||X(t[0]))&&(r=ne(t),o=te(t,r,m.dtype),e.bufferSubData(m.type,i,o),G.freeType(o))}else if(c(t)){r=t.shape;var a=t.stride,s=o=0,l=0,u=0;1===r.length?(o=r[0],s=1,l=a[0],u=0):2===r.length&&(o=r[0],s=r[1],l=a[0],u=a[1]),r=Array.isArray(t.data)?m.dtype:d(t.data),p(r=G.allocType(r,o*s),t.data,o,s,l,u,t.offset),e.bufferSubData(m.type,i,r),G.freeType(r)}return g},n.profile&&(g.stats=m.stats),g.destroy=function(){s(m)},g},createStream:function(e,t){var n=h.pop();return n||(n=new i(e)),n.bind(),a(n,t,35040,0,1,!1),n},destroyStream:function(e){h.push(e)},clear:function(){Z(u).forEach(s),h.forEach(s)},getBuffer:function(e){return e&&e._buffer instanceof i?e._buffer:null},restore:function(){Z(u).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:a}}function m(e,t,n,r){function i(e){this.id=l++,s[this.id]=this,this.buffer=e,this.primType=4,this.type=this.vertCount=0}function o(r,i,o,a,s,l,u){var h;if(r.buffer.bind(),i?((h=u)||X(i)&&(!c(i)||X(i.data))||(h=t.oes_element_index_uint?5125:5123),n._initBuffer(r.buffer,i,o,h,3)):(e.bufferData(34963,l,o),r.buffer.dtype=h||5121,r.buffer.usage=o,r.buffer.dimension=3,r.buffer.byteLength=l),h=u,!u){switch(r.buffer.dtype){case 5121:case 5120:h=5121;break;case 5123:case 5122:h=5123;break;case 5125:case 5124:h=5125}r.buffer.dtype=h}r.type=h,0>(i=s)&&(i=r.buffer.byteLength,5123===h?i>>=1:5125===h&&(i>>=2)),r.vertCount=i,i=a,0>a&&(i=4,1===(a=r.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),r.primType=i}function a(e){r.elementsCount--,delete s[e.id],e.buffer.destroy(),e.buffer=null}var s={},l=0,u={uint8:5121,uint16:5123};t.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var h=[];return{create:function(e,t){function s(e){if(e)if("number"==typeof e)l(e),h.primType=4,h.vertCount=0|e,h.type=5121;else{var t=null,n=35044,r=-1,i=-1,a=0,d=0;Array.isArray(e)||X(e)||c(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(n=ee[e.usage]),"primitive"in e&&(r=ie[e.primitive]),"count"in e&&(i=0|e.count),"type"in e&&(d=u[e.type]),"length"in e?a=0|e.length:(a=i,5123===d||5122===d?a*=2:5125!==d&&5124!==d||(a*=4))),o(h,t,n,r,i,a,d)}else l(),h.primType=4,h.vertCount=0,h.type=5121;return s}var l=n.create(null,34963,!0),h=new i(l._buffer);return r.elementsCount++,s(e),s._reglType="elements",s._elements=h,s.subdata=function(e,t){return l.subdata(e,t),s},s.destroy=function(){a(h)},s},createStream:function(e){var t=h.pop();return t||(t=new i(n.create(null,34963,!0,!1)._buffer)),o(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){h.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof i?e._elements:null},clear:function(){Z(s).forEach(a)}}}function v(e){for(var t=G.allocType(5123,e.length),n=0;n<e.length;++n)if(isNaN(e[n]))t[n]=65535;else if(1/0===e[n])t[n]=31744;else if(-1/0===e[n])t[n]=64512;else{oe[0]=e[n];var r=(o=ae[0])>>>31<<15,i=(o<<1>>>24)-127,o=o>>13&1023;t[n]=-24>i?r:-14>i?r+(o+1024>>-14-i):15<i?r+31744:r+(i+15<<10)+o}return t}function y(e){return Array.isArray(e)||X(e)}function b(e){return"[object "+e+"]"}function _(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function x(e){return!(!Array.isArray(e)||0===e.length||!y(e[0]))}function w(e){return Object.prototype.toString.call(e)}function A(e){if(!e)return!1;var t=w(e);return 0<=me.indexOf(t)||_(e)||x(e)||c(e)}function k(e,t){36193===e.type?(e.data=v(t),G.freeType(t)):e.data=t}function T(e,t,n,r,i,o){if(e=void 0!==ye[e]?ye[e]:ce[e]*ve[t],o&&(e*=6),i){for(r=0;1<=n;)r+=e*n*n,n/=2;return r}return e*n*r}function S(e,t,n,r,i,o,a){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function l(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function u(e,t){if("object"==typeof t&&t){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=q[t.colorSpace]),"type"in t&&(e.type=H[t.type]);var n=e.width,r=e.height,i=e.channels,o=!1;"shape"in t?(n=t.shape[0],r=t.shape[1],3===t.shape.length&&(i=t.shape[2],o=!0)):("radius"in t&&(n=r=t.radius),"width"in t&&(n=t.width),"height"in t&&(r=t.height),"channels"in t&&(i=t.channels,o=!0)),e.width=0|n,e.height=0|r,e.channels=0|i,n=!1,"format"in t&&(n=t.format,r=e.internalformat=$[n],e.format=oe[r],n in H&&!("type"in t)&&(e.type=H[n]),n in W&&(e.compressed=!0),n=!0),!o&&n?e.channels=ce[e.format]:o&&!n&&e.channels!==le[e.format]&&(e.format=e.internalformat=le[e.channels])}}function h(t){e.pixelStorei(37440,t.flipY),e.pixelStorei(37441,t.premultiplyAlpha),e.pixelStorei(37443,t.colorSpace),e.pixelStorei(3317,t.unpackAlignment)}function d(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function f(e,t){var n=null;if(A(t)?n=t:t&&(u(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),A(t.data)&&(n=t.data)),t.copy){var r=i.viewportWidth,o=i.viewportHeight;e.width=e.width||r-e.xOffset,e.height=e.height||o-e.yOffset,e.needsCopy=!0}else if(n){if(X(n))e.channels=e.channels||4,e.data=n,"type"in t||5121!==e.type||(e.type=0|J[Object.prototype.toString.call(n)]);else if(_(n)){switch(e.channels=e.channels||4,o=(r=n).length,e.type){case 5121:case 5123:case 5125:case 5126:(o=G.allocType(e.type,o)).set(r),e.data=o;break;case 36193:e.data=v(r)}e.alignment=1,e.needsFree=!0}else if(c(n)){r=n.data,Array.isArray(r)||5121!==e.type||(e.type=0|J[Object.prototype.toString.call(r)]),o=n.shape;var a,s,l,h,d=n.stride;3===o.length?(l=o[2],h=d[2]):h=l=1,a=o[0],s=o[1],o=d[0],d=d[1],e.alignment=1,e.width=a,e.height=s,e.channels=l,e.format=e.internalformat=le[l],e.needsFree=!0,a=h,n=n.offset,l=e.width,h=e.height,s=e.channels;for(var f=G.allocType(36193===e.type?5126:e.type,l*h*s),p=0,g=0;g<h;++g)for(var m=0;m<l;++m)for(var b=0;b<s;++b)f[p++]=r[o*m+d*g+a*b+n];k(e,f)}else if(w(n)===ue||w(n)===he||w(n)===de)w(n)===ue||w(n)===he?e.element=n:e.element=n.canvas,e.width=e.element.width,e.height=e.element.height,e.channels=4;else if(w(n)===fe)e.element=n,e.width=n.width,e.height=n.height,e.channels=4;else if(w(n)===pe)e.element=n,e.width=n.naturalWidth,e.height=n.naturalHeight,e.channels=4;else if(w(n)===ge)e.element=n,e.width=n.videoWidth,e.height=n.videoHeight,e.channels=4;else if(x(n)){for(r=e.width||n[0].length,o=e.height||n.length,d=e.channels,d=y(n[0][0])?d||n[0][0].length:d||1,a=K.shape(n),l=1,h=0;h<a.length;++h)l*=a[h];l=G.allocType(36193===e.type?5126:e.type,l),K.flatten(n,a,"",l),k(e,l),e.alignment=1,e.width=r,e.height=o,e.channels=d,e.format=e.internalformat=le[d],e.needsFree=!0}}else e.width=e.width||1,e.height=e.height||1,e.channels=e.channels||4}function p(t,n,i,o,a){var s=t.element,l=t.data,c=t.internalformat,u=t.format,d=t.type,f=t.width,p=t.height;h(t),s?e.texSubImage2D(n,a,i,o,u,d,s):t.compressed?e.compressedTexSubImage2D(n,a,i,o,c,f,p,l):t.needsCopy?(r(),e.copyTexSubImage2D(n,a,i,o,t.xOffset,t.yOffset,f,p)):e.texSubImage2D(n,a,i,o,f,p,u,d,l)}function g(){return ae.pop()||new d}function m(e){e.needsFree&&G.freeType(e.data),d.call(e),ae.push(e)}function b(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function S(e,t,n){var r=e.images[0]=g();e.mipmask=1,r.width=e.width=t,r.height=e.height=n,r.channels=e.channels=4}function E(e,t){var n=null;if(A(t))l(n=e.images[0]=g(),e),f(n,t),e.mipmask=1;else if(u(e,t),Array.isArray(t.mipmap))for(var r=t.mipmap,i=0;i<r.length;++i)l(n=e.images[i]=g(),e),n.width>>=i,n.height>>=i,f(n,r[i]),e.mipmask|=1<<i;else l(n=e.images[0]=g(),e),f(n,t),e.mipmask=1;l(e,e.images[0])}function C(t,n){for(var i=t.images,o=0;o<i.length&&i[o];++o){var a=i[o],s=n,l=o,c=a.element,u=a.data,d=a.internalformat,f=a.format,p=a.type,g=a.width,m=a.height;h(a),c?e.texImage2D(s,l,f,f,p,c):a.compressed?e.compressedTexImage2D(s,l,d,g,m,0,u):a.needsCopy?(r(),e.copyTexImage2D(s,l,f,a.xOffset,a.yOffset,g,m,0)):e.texImage2D(s,l,f,g,m,0,f,p,u||null)}}function M(){var e=me.pop()||new b;s.call(e);for(var t=e.mipmask=0;16>t;++t)e.images[t]=null;return e}function O(e){for(var t=e.images,n=0;n<t.length;++n)t[n]&&m(t[n]),t[n]=null;me.push(e)}function L(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function D(e,t){"min"in t&&(e.minFilter=U[t.min],0<=se.indexOf(e.minFilter)&&!("faces"in t)&&(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=j[t.mag]);var n=e.wrapS,r=e.wrapT;if("wrap"in t){var i=t.wrap;"string"==typeof i?n=r=B[i]:Array.isArray(i)&&(n=B[i[0]],r=B[i[1]])}else"wrapS"in t&&(n=B[t.wrapS]),"wrapT"in t&&(r=B[t.wrapT]);if(e.wrapS=n,e.wrapT=r,"anisotropic"in t&&(e.anisotropic=t.anisotropic),"mipmap"in t){switch(n=!1,typeof t.mipmap){case"string":e.mipmapHint=F[t.mipmap],n=e.genMipmaps=!0;break;case"boolean":n=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,n=!0}!n||"min"in t||(e.minFilter=9984)}}function I(n,r){e.texParameteri(r,10241,n.minFilter),e.texParameteri(r,10240,n.magFilter),e.texParameteri(r,10242,n.wrapS),e.texParameteri(r,10243,n.wrapT),t.ext_texture_filter_anisotropic&&e.texParameteri(r,34046,n.anisotropic),n.genMipmaps&&(e.hint(33170,n.mipmapHint),e.generateMipmap(r))}function R(t){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=ve++,this.refCount=1,this.target=t,this.texture=e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new L,a.profile&&(this.stats={size:0})}function P(t){e.activeTexture(33984),e.bindTexture(t.target,t.texture)}function N(){var t=_e[0];t?e.bindTexture(t.target,t.texture):e.bindTexture(3553,null)}function z(t){var n=t.texture,r=t.unit,i=t.target;0<=r&&(e.activeTexture(33984+r),e.bindTexture(i,null),_e[r]=null),e.deleteTexture(n),t.texture=null,t.params=null,t.pixels=null,t.refCount=0,delete ye[t.id],o.textureCount--}var F={"don't care":4352,"dont care":4352,nice:4354,fast:4353},B={repeat:10497,clamp:33071,mirror:33648},j={nearest:9728,linear:9729},U=V({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},j),q={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},$={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},W={};t.ext_srgb&&($.srgb=35904,$.srgba=35906),t.oes_texture_float&&(H.float32=H.float=5126),t.oes_texture_half_float&&(H.float16=H["half float"]=36193),t.webgl_depth_texture&&(V($,{depth:6402,"depth stencil":34041}),V(H,{uint16:5123,uint32:5125,"depth stencil":34042})),t.webgl_compressed_texture_s3tc&&V(W,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),t.webgl_compressed_texture_atc&&V(W,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),t.webgl_compressed_texture_pvrtc&&V(W,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),t.webgl_compressed_texture_etc1&&(W["rgb etc1"]=36196);var Y=Array.prototype.slice.call(e.getParameter(34467));Object.keys(W).forEach((function(e){var t=W[e];0<=Y.indexOf(t)&&($[e]=t)}));var Q=Object.keys($);n.textureFormats=Q;var ee=[];Object.keys($).forEach((function(e){ee[$[e]]=e}));var te=[];Object.keys(H).forEach((function(e){te[H[e]]=e}));var ne=[];Object.keys(j).forEach((function(e){ne[j[e]]=e}));var re=[];Object.keys(U).forEach((function(e){re[U[e]]=e}));var ie=[];Object.keys(B).forEach((function(e){ie[B[e]]=e}));var oe=Q.reduce((function(e,n){var r=$[n];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r||t.ext_srgb&&(35904===r||35906===r)?e[r]=r:32855===r||0<=n.indexOf("rgba")?e[r]=6408:e[r]=6407,e}),{}),ae=[],me=[],ve=0,ye={},be=n.maxTextureUnits,_e=Array(be).map((function(){return null}));return V(R.prototype,{bind:function(){this.bindCount+=1;var t=this.unit;if(0>t){for(var n=0;n<be;++n){var r=_e[n];if(r){if(0<r.bindCount)continue;r.unit=-1}_e[n]=this,t=n;break}a.profile&&o.maxTextureUnits<t+1&&(o.maxTextureUnits=t+1),this.unit=t,e.activeTexture(33984+t),e.bindTexture(this.target,this.texture)}return t},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&z(this)}}),a.profile&&(o.getTotalTextureSize=function(){var e=0;return Object.keys(ye).forEach((function(t){e+=ye[t].stats.size})),e}),{create2D:function(t,n){function r(e,t){var n=i.texInfo;L.call(n);var o=M();return"number"==typeof e?S(o,0|e,"number"==typeof t?0|t:0|e):e?(D(n,e),E(o,e)):S(o,1,1),n.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,r.width=o.width,r.height=o.height,P(i),C(o,3553),I(n,3553),N(),O(o),a.profile&&(i.stats.size=T(i.internalformat,i.type,o.width,o.height,n.genMipmaps,!1)),r.format=ee[i.internalformat],r.type=te[i.type],r.mag=ne[n.magFilter],r.min=re[n.minFilter],r.wrapS=ie[n.wrapS],r.wrapT=ie[n.wrapT],r}var i=new R(3553);return ye[i.id]=i,o.textureCount++,r(t,n),r.subimage=function(e,t,n,o){t|=0,n|=0,o|=0;var a=g();return l(a,i),a.width=0,a.height=0,f(a,e),a.width=a.width||(i.width>>o)-t,a.height=a.height||(i.height>>o)-n,P(i),p(a,3553,t,n,o),N(),m(a),r},r.resize=function(t,n){var o=0|t,s=0|n||o;if(o===i.width&&s===i.height)return r;r.width=i.width=o,r.height=i.height=s,P(i);for(var l=0;i.mipmask>>l;++l){var c=o>>l,u=s>>l;if(!c||!u)break;e.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return N(),a.profile&&(i.stats.size=T(i.internalformat,i.type,o,s,!1,!1)),r},r._reglType="texture2d",r._texture=i,a.profile&&(r.stats=i.stats),r.destroy=function(){i.decRef()},r},createCube:function(t,n,r,i,s,c){function h(e,t,n,r,i,o){var s,c=d.texInfo;for(L.call(c),s=0;6>s;++s)v[s]=M();if("number"!=typeof e&&e){if("object"==typeof e)if(t)E(v[0],e),E(v[1],t),E(v[2],n),E(v[3],r),E(v[4],i),E(v[5],o);else if(D(c,e),u(d,e),"faces"in e)for(e=e.faces,s=0;6>s;++s)l(v[s],d),E(v[s],e[s]);else for(s=0;6>s;++s)E(v[s],e)}else for(e=0|e||1,s=0;6>s;++s)S(v[s],e,e);for(l(d,v[0]),d.mipmask=c.genMipmaps?(v[0].width<<1)-1:v[0].mipmask,d.internalformat=v[0].internalformat,h.width=v[0].width,h.height=v[0].height,P(d),s=0;6>s;++s)C(v[s],34069+s);for(I(c,34067),N(),a.profile&&(d.stats.size=T(d.internalformat,d.type,h.width,h.height,c.genMipmaps,!0)),h.format=ee[d.internalformat],h.type=te[d.type],h.mag=ne[c.magFilter],h.min=re[c.minFilter],h.wrapS=ie[c.wrapS],h.wrapT=ie[c.wrapT],s=0;6>s;++s)O(v[s]);return h}var d=new R(34067);ye[d.id]=d,o.cubeCount++;var v=Array(6);return h(t,n,r,i,s,c),h.subimage=function(e,t,n,r,i){n|=0,r|=0,i|=0;var o=g();return l(o,d),o.width=0,o.height=0,f(o,t),o.width=o.width||(d.width>>i)-n,o.height=o.height||(d.height>>i)-r,P(d),p(o,34069+e,n,r,i),N(),m(o),h},h.resize=function(t){if((t|=0)!==d.width){h.width=d.width=t,h.height=d.height=t,P(d);for(var n=0;6>n;++n)for(var r=0;d.mipmask>>r;++r)e.texImage2D(34069+n,r,d.format,t>>r,t>>r,0,d.format,d.type,null);return N(),a.profile&&(d.stats.size=T(d.internalformat,d.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=d,a.profile&&(h.stats=d.stats),h.destroy=function(){d.decRef()},h},clear:function(){for(var t=0;t<be;++t)e.activeTexture(33984+t),e.bindTexture(3553,null),_e[t]=null;Z(ye).forEach(z),o.cubeCount=0,o.textureCount=0},getTexture:function(e){return null},restore:function(){for(var t=0;t<be;++t){var n=_e[t];n&&(n.bindCount=0,n.unit=-1,_e[t]=null)}Z(ye).forEach((function(t){t.texture=e.createTexture(),e.bindTexture(t.target,t.texture);for(var n=0;32>n;++n)if(0!=(t.mipmask&1<<n))if(3553===t.target)e.texImage2D(3553,n,t.internalformat,t.width>>n,t.height>>n,0,t.internalformat,t.type,null);else for(var r=0;6>r;++r)e.texImage2D(34069+r,n,t.internalformat,t.width>>n,t.height>>n,0,t.internalformat,t.type,null);I(t.texInfo,t.target)}))},refresh:function(){for(var t=0;t<be;++t){var n=_e[t];n&&(n.bindCount=0,n.unit=-1,_e[t]=null),e.activeTexture(33984+t),e.bindTexture(3553,null),e.bindTexture(34067,null)}}}}function E(e,t,n,r,i,o){function a(e,t,n){this.target=e,this.texture=t,this.renderbuffer=n;var r=e=0;t?(e=t.width,r=t.height):n&&(e=n.width,r=n.height),this.width=e,this.height=r}function s(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function l(e,t,n){e&&(e.texture?e.texture._texture.refCount+=1:e.renderbuffer._renderbuffer.refCount+=1)}function c(t,n){n&&(n.texture?e.framebufferTexture2D(36160,t,n.target,n.texture._texture.texture,0):e.framebufferRenderbuffer(36160,t,36161,n.renderbuffer._renderbuffer.renderbuffer))}function u(e){var t=3553,n=null,r=null,i=e;return"object"==typeof e&&(i=e.data,"target"in e&&(t=0|e.target)),"texture2d"===(e=i._reglType)||"textureCube"===e?n=i:"renderbuffer"===e&&(r=i,t=36161),new a(t,n,r)}function h(e,t,n,o,s){return n?((e=r.create2D({width:e,height:t,format:o,type:s}))._texture.refCount=0,new a(3553,e,null)):((e=i.create({width:e,height:t,format:o}))._renderbuffer.refCount=0,new a(36161,null,e))}function d(e){return e&&(e.texture||e.renderbuffer)}function f(e,t,n){e&&(e.texture?e.texture.resize(t,n):e.renderbuffer&&e.renderbuffer.resize(t,n),e.width=t,e.height=n)}function p(){this.id=A++,k[this.id]=this,this.framebuffer=e.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(e){e.colorAttachments.forEach(s),s(e.depthAttachment),s(e.stencilAttachment),s(e.depthStencilAttachment)}function m(t){e.deleteFramebuffer(t.framebuffer),t.framebuffer=null,o.framebufferCount--,delete k[t.id]}function v(t){var r;e.bindFramebuffer(36160,t.framebuffer);var i=t.colorAttachments;for(r=0;r<i.length;++r)c(36064+r,i[r]);for(r=i.length;r<n.maxColorAttachments;++r)e.framebufferTexture2D(36160,36064+r,3553,null,0);e.framebufferTexture2D(36160,33306,3553,null,0),e.framebufferTexture2D(36160,36096,3553,null,0),e.framebufferTexture2D(36160,36128,3553,null,0),c(36096,t.depthAttachment),c(36128,t.stencilAttachment),c(33306,t.depthStencilAttachment),e.checkFramebufferStatus(36160),e.isContextLost(),e.bindFramebuffer(36160,b.next?b.next.framebuffer:null),b.cur=b.next,e.getError()}function y(e,t){function n(e,t){var i,o=0,a=0,s=!0,c=!0;i=null;var f=!0,p="rgba",m="uint8",y=1,b=null,w=null,A=null,k=!1;"number"==typeof e?(o=0|e,a=0|t||o):e?("shape"in e?(o=(a=e.shape)[0],a=a[1]):("radius"in e&&(o=a=e.radius),"width"in e&&(o=e.width),"height"in e&&(a=e.height)),("color"in e||"colors"in e)&&(i=e.color||e.colors,Array.isArray(i)),i||("colorCount"in e&&(y=0|e.colorCount),"colorTexture"in e&&(f=!!e.colorTexture,p="rgba4"),"colorType"in e&&(m=e.colorType,!f)&&("half float"===m||"float16"===m?p="rgba16f":"float"!==m&&"float32"!==m||(p="rgba32f")),"colorFormat"in e&&(p=e.colorFormat,0<=_.indexOf(p)?f=!0:0<=x.indexOf(p)&&(f=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(k=!(!e.depthTexture&&!e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,c=!1)),"stencil"in e&&("boolean"==typeof e.stencil?c=e.stencil:(w=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=c=e.depthStencil:(A=e.depthStencil,c=s=!1))):o=a=1;var T=null,S=null,E=null,C=null;if(Array.isArray(i))T=i.map(u);else if(i)T=[u(i)];else for(T=Array(y),i=0;i<y;++i)T[i]=h(o,a,f,p,m);for(o=o||T[0].width,a=a||T[0].height,b?S=u(b):s&&!c&&(S=h(o,a,k,"depth","uint32")),w?E=u(w):c&&!s&&(E=h(o,a,!1,"stencil","uint8")),A?C=u(A):!b&&!w&&c&&s&&(C=h(o,a,k,"depth stencil","depth stencil")),s=null,i=0;i<T.length;++i)l(T[i]),T[i]&&T[i].texture&&(c=xe[T[i].texture._texture.format]*we[T[i].texture._texture.type],null===s&&(s=c));return l(S),l(E),l(C),g(r),r.width=o,r.height=a,r.colorAttachments=T,r.depthAttachment=S,r.stencilAttachment=E,r.depthStencilAttachment=C,n.color=T.map(d),n.depth=d(S),n.stencil=d(E),n.depthStencil=d(C),n.width=r.width,n.height=r.height,v(r),n}var r=new p;return o.framebufferCount++,n(e,t),V(n,{resize:function(e,t){var i=Math.max(0|e,1),o=Math.max(0|t||i,1);if(i===r.width&&o===r.height)return n;for(var a=r.colorAttachments,s=0;s<a.length;++s)f(a[s],i,o);return f(r.depthAttachment,i,o),f(r.stencilAttachment,i,o),f(r.depthStencilAttachment,i,o),r.width=n.width=i,r.height=n.height=o,v(r),n},_reglType:"framebuffer",_framebuffer:r,destroy:function(){m(r),g(r)},use:function(e){b.setFBO({framebuffer:n},e)}})}var b={cur:null,next:null,dirty:!1,setFBO:null},_=["rgba"],x=["rgba4","rgb565","rgb5 a1"];t.ext_srgb&&x.push("srgba"),t.ext_color_buffer_half_float&&x.push("rgba16f","rgb16f"),t.webgl_color_buffer_float&&x.push("rgba32f");var w=["uint8"];t.oes_texture_half_float&&w.push("half float","float16"),t.oes_texture_float&&w.push("float","float32");var A=0,k={};return V(b,{getFramebuffer:function(e){return"function"==typeof e&&"framebuffer"===e._reglType&&(e=e._framebuffer)instanceof p?e:null},create:y,createCube:function(e){function t(e){var i,o={color:null},a=0,s=null;i="rgba";var l="uint8",c=1;if("number"==typeof e?a=0|e:e?("shape"in e?a=e.shape[0]:("radius"in e&&(a=0|e.radius),"width"in e?a=0|e.width:"height"in e&&(a=0|e.height)),("color"in e||"colors"in e)&&(s=e.color||e.colors,Array.isArray(s)),s||("colorCount"in e&&(c=0|e.colorCount),"colorType"in e&&(l=e.colorType),"colorFormat"in e&&(i=e.colorFormat)),"depth"in e&&(o.depth=e.depth),"stencil"in e&&(o.stencil=e.stencil),"depthStencil"in e&&(o.depthStencil=e.depthStencil)):a=1,s)if(Array.isArray(s))for(e=[],i=0;i<s.length;++i)e[i]=s[i];else e=[s];else for(e=Array(c),s={radius:a,format:i,type:l},i=0;i<c;++i)e[i]=r.createCube(s);for(o.color=Array(e.length),i=0;i<e.length;++i)c=e[i],a=a||c.width,o.color[i]={target:34069,data:e[i]};for(i=0;6>i;++i){for(c=0;c<e.length;++c)o.color[c].target=34069+i;0<i&&(o.depth=n[0].depth,o.stencil=n[0].stencil,o.depthStencil=n[0].depthStencil),n[i]?n[i](o):n[i]=y(o)}return V(t,{width:a,height:a,color:e})}var n=Array(6);return t(e),V(t,{faces:n,resize:function(e){var r=0|e;if(r===t.width)return t;var i=t.color;for(e=0;e<i.length;++e)i[e].resize(r);for(e=0;6>e;++e)n[e].resize(r);return t.width=t.height=r,t},_reglType:"framebufferCube",destroy:function(){n.forEach((function(e){e.destroy()}))}})},clear:function(){Z(k).forEach(m)},restore:function(){b.cur=null,b.next=null,b.dirty=!0,Z(k).forEach((function(t){t.framebuffer=e.createFramebuffer(),v(t)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function M(e,t,n,r,i,o,a){function s(){this.id=++h,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var e=t.oes_vertex_array_object;this.vao=e?e.createVertexArrayOES():null,d[this.id]=this,this.buffers=[]}var l=n.maxAttributes,u=Array(l);for(n=0;n<l;++n)u[n]=new C;var h=0,d={},f={Record:C,scope:{},state:u,currentVAO:null,targetVAO:null,restore:t.oes_vertex_array_object?function(){t.oes_vertex_array_object&&Z(d).forEach((function(e){e.refresh()}))}:function(){},createVAO:function(e){function t(e){var r;Array.isArray(e)?(r=e,n.elements&&n.ownsElements&&n.elements.destroy(),n.elements=null,n.ownsElements=!1,n.offset=0,n.count=0,n.instances=-1,n.primitive=4):(e.elements?(r=e.elements,n.ownsElements?("function"==typeof r&&"elements"===r._reglType?n.elements.destroy():n.elements(r),n.ownsElements=!1):o.getElements(e.elements)?(n.elements=e.elements,n.ownsElements=!1):(n.elements=o.create(e.elements),n.ownsElements=!0)):(n.elements=null,n.ownsElements=!1),r=e.attributes,n.offset=0,n.count=-1,n.instances=-1,n.primitive=4,n.elements&&(n.count=n.elements._elements.vertCount,n.primitive=n.elements._elements.primType),"offset"in e&&(n.offset=0|e.offset),"count"in e&&(n.count=0|e.count),"instances"in e&&(n.instances=0|e.instances),"primitive"in e&&(n.primitive=ie[e.primitive])),e={};var a=n.attributes;a.length=r.length;for(var s=0;s<r.length;++s){var l,u=r[s],h=a[s]=new C,d=u.data||u;Array.isArray(d)||X(d)||c(d)?(n.buffers[s]&&(l=n.buffers[s],X(d)&&l._buffer.byteLength>=d.byteLength?l.subdata(d):(l.destroy(),n.buffers[s]=null)),n.buffers[s]||(l=n.buffers[s]=i.create(u,34962,!1,!0)),h.buffer=i.getBuffer(l),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1,e[s]=1):i.getBuffer(u)?(h.buffer=i.getBuffer(u),h.size=0|h.buffer.dimension,h.normalized=!1,h.type=h.buffer.dtype,h.offset=0,h.stride=0,h.divisor=0,h.state=1):i.getBuffer(u.buffer)?(h.buffer=i.getBuffer(u.buffer),h.size=0|(+u.size||h.buffer.dimension),h.normalized=!!u.normalized||!1,h.type="type"in u?Q[u.type]:h.buffer.dtype,h.offset=0|(u.offset||0),h.stride=0|(u.stride||0),h.divisor=0|(u.divisor||0),h.state=1):"x"in u&&(h.x=+u.x||0,h.y=+u.y||0,h.z=+u.z||0,h.w=+u.w||0,h.state=2)}for(l=0;l<n.buffers.length;++l)!e[l]&&n.buffers[l]&&(n.buffers[l].destroy(),n.buffers[l]=null);return n.refresh(),t}var n=new s;return r.vaoCount+=1,t.destroy=function(){for(var e=0;e<n.buffers.length;++e)n.buffers[e]&&n.buffers[e].destroy();n.buffers.length=0,n.ownsElements&&(n.elements.destroy(),n.elements=null,n.ownsElements=!1),n.destroy()},t._vao=n,t._reglType="vao",t(e)},getVAO:function(e){return"function"==typeof e&&e._vao?e._vao:null},destroyBuffer:function(t){for(var n=0;n<u.length;++n){var r=u[n];r.buffer===t&&(e.disableVertexAttribArray(n),r.buffer=null)}},setVAO:t.oes_vertex_array_object?function(e){if(e!==f.currentVAO){var n=t.oes_vertex_array_object;e?n.bindVertexArrayOES(e.vao):n.bindVertexArrayOES(null),f.currentVAO=e}}:function(n){if(n!==f.currentVAO){if(n)n.bindAttrs();else{for(var r=t.angle_instanced_arrays,i=0;i<u.length;++i){var o=u[i];o.buffer?(e.enableVertexAttribArray(i),o.buffer.bind(),e.vertexAttribPointer(i,o.size,o.type,o.normalized,o.stride,o.offfset),r&&o.divisor&&r.vertexAttribDivisorANGLE(i,o.divisor)):(e.disableVertexAttribArray(i),e.vertexAttrib4f(i,o.x,o.y,o.z,o.w))}a.elements?e.bindBuffer(34963,a.elements.buffer.buffer):e.bindBuffer(34963,null)}f.currentVAO=n}},clear:t.oes_vertex_array_object?function(){Z(d).forEach((function(e){e.destroy()}))}:function(){}};return s.prototype.bindAttrs=function(){for(var n=t.angle_instanced_arrays,r=this.attributes,i=0;i<r.length;++i){var a=r[i];a.buffer?(e.enableVertexAttribArray(i),e.bindBuffer(34962,a.buffer.buffer),e.vertexAttribPointer(i,a.size,a.type,a.normalized,a.stride,a.offset),n&&a.divisor&&n.vertexAttribDivisorANGLE(i,a.divisor)):(e.disableVertexAttribArray(i),e.vertexAttrib4f(i,a.x,a.y,a.z,a.w))}for(n=r.length;n<l;++n)e.disableVertexAttribArray(n);(n=o.getElements(this.elements))?e.bindBuffer(34963,n.buffer.buffer):e.bindBuffer(34963,null)},s.prototype.refresh=function(){var e=t.oes_vertex_array_object;e&&(e.bindVertexArrayOES(this.vao),this.bindAttrs(),f.currentVAO=null,e.bindVertexArrayOES(null))},s.prototype.destroy=function(){if(this.vao){var e=t.oes_vertex_array_object;this===f.currentVAO&&(f.currentVAO=null,e.bindVertexArrayOES(null)),e.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),d[this.id]&&(delete d[this.id],--r.vaoCount)},f}function O(e,t,n,r){function i(e,t,n,r){this.name=e,this.id=t,this.location=n,this.info=r}function o(e,t){for(var n=0;n<e.length;++n)if(e[n].id===t.id)return void(e[n].location=t.location);e.push(t)}function a(n,r,i){if(!(a=(i=35632===n?c:u)[r])){var o=t.str(r),a=e.createShader(n);e.shaderSource(a,o),e.compileShader(a),i[r]=a}return a}function s(e,t){this.id=f++,this.fragId=e,this.vertId=t,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,r.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(n,s,l){var c;c=a(35632,n.fragId);var u=a(35633,n.vertId);if(s=n.program=e.createProgram(),e.attachShader(s,c),e.attachShader(s,u),l)for(c=0;c<l.length;++c)u=l[c],e.bindAttribLocation(s,u[0],u[1]);e.linkProgram(s),u=e.getProgramParameter(s,35718),r.profile&&(n.stats.uniformsCount=u);var h=n.uniforms;for(c=0;c<u;++c)if(l=e.getActiveUniform(s,c)){if(1<l.size)for(var d=0;d<l.size;++d){var f=l.name.replace("[0]","["+d+"]");o(h,new i(f,t.id(f),e.getUniformLocation(s,f),l))}d=l.name,1<l.size&&(d=d.replace("[0]","")),o(h,new i(d,t.id(d),e.getUniformLocation(s,d),l))}for(u=e.getProgramParameter(s,35721),r.profile&&(n.stats.attributesCount=u),n=n.attributes,c=0;c<u;++c)(l=e.getActiveAttrib(s,c))&&o(n,new i(l.name,t.id(l.name),e.getAttribLocation(s,l.name),l))}var c={},u={},h={},d=[],f=0;return r.profile&&(n.getMaxUniformsCount=function(){var e=0;return d.forEach((function(t){t.stats.uniformsCount>e&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return d.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);Z(c).forEach(t),c={},Z(u).forEach(t),u={},d.forEach((function(t){e.deleteProgram(t.program)})),d.length=0,h={},n.shaderCount=0},program:function(t,r,i,o){var a=h[r];a||(a=h[r]={});var f=a[t];if(f&&(f.refCount++,!o))return f;var p=new s(r,t);return n.shaderCount++,l(p,i,o),f||(a[t]=p),d.push(p),V(p,{destroy:function(){if(p.refCount--,0>=p.refCount){e.deleteProgram(p.program);var t=d.indexOf(p);d.splice(t,1),n.shaderCount--}0>=a[p.vertId].refCount&&(e.deleteShader(u[p.vertId]),delete u[p.vertId],delete h[p.fragId][p.vertId]),Object.keys(h[p.fragId]).length||(e.deleteShader(c[p.fragId]),delete c[p.fragId],delete h[p.fragId])}})},restore:function(){c={},u={};for(var e=0;e<d.length;++e)l(d[e],null,d[e].attributes.map((function(e){return[e.location,e.name]})))},shader:a,frag:-1,vert:-1}}function L(e,t,n,r,i,o,a){function s(i){var o;o=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type;var a=0,s=0,l=r.framebufferWidth,c=r.framebufferHeight,u=null;return X(i)?u=i:i&&(a=0|i.x,s=0|i.y,l=0|(i.width||r.framebufferWidth-a),c=0|(i.height||r.framebufferHeight-s),u=i.data||null),n(),i=l*c*4,u||(5121===o?u=new Uint8Array(i):5126===o&&(u=u||new Float32Array(i))),e.pixelStorei(3333,4),e.readPixels(a,s,l,c,6408,o,u),u}return function(e){return e&&"framebuffer"in e?function(e){var n;return t.setFBO({framebuffer:e.framebuffer},(function(){n=s(e)})),n}(e):s(e)}}function D(e){return Array.prototype.slice.call(e)}function I(e){return D(e).join("")}function R(e){return Array.isArray(e)||X(e)||c(e)}function P(e){return e.sort((function(e,t){return"viewport"===e?-1:"viewport"===t?1:e<t?-1:1}))}function N(e,t,n,r){this.thisDep=e,this.contextDep=t,this.propDep=n,this.append=r}function z(e){return e&&!(e.thisDep||e.contextDep||e.propDep)}function F(e){return new N(!1,!1,!1,e)}function B(e,t){var n=e.type;if(0===n)return new N(!0,1<=(n=e.data.length),2<=n,t);if(4===n)return new N((n=e.data).thisDep,n.contextDep,n.propDep,t);if(5===n)return new N(!1,!1,!1,t);if(6===n){for(var r=n=!1,i=!1,o=0;o<e.data.length;++o){var a=e.data[o];1===a.type?i=!0:2===a.type?r=!0:3===a.type?n=!0:0===a.type?(n=!0,1<=(a=a.data)&&(r=!0),2<=a&&(i=!0)):4===a.type&&(n=n||a.data.thisDep,r=r||a.data.contextDep,i=i||a.data.propDep)}return new N(n,r,i,t)}return new N(3===n,2===n,1===n,t)}function j(e,t,n,r,i,o,s,l,c,u,h,d,f,p,g){function m(e){return e.replace(".","_")}function v(e,t,n){var r=m(e);ae.push(e),oe[r]=re[r]=!!n,se[r]=t}function b(e,t,n){var r=m(e);ae.push(e),Array.isArray(n)?(re[r]=n.slice(),oe[r]=n.slice()):re[r]=oe[r]=n,le[r]=t}function _(){var e=function(){function e(){var e=[],t=[];return V((function(){e.push.apply(e,D(arguments))}),{def:function(){var r="v"+n++;return t.push(r),0<arguments.length&&(e.push(r,"="),e.push.apply(e,D(arguments)),e.push(";")),r},toString:function(){return I([0<t.length?"var "+t.join(",")+";":"",I(e)])}})}function t(){function t(e,t){r(e,t,"=",n.def(e,t),";")}var n=e(),r=e(),i=n.toString,o=r.toString;return V((function(){n.apply(n,D(arguments))}),{def:n.def,entry:n,exit:r,save:t,set:function(e,r,i){t(e,r),n(e,r,"=",i,";")},toString:function(){return i()+o()}})}var n=0,r=[],i=[],o=e(),a={};return{global:o,link:function(e){for(var t=0;t<i.length;++t)if(i[t]===e)return r[t];return t="g"+n++,r.push(t),i.push(e),t},block:e,proc:function(e,n){function r(){var e="a"+i.length;return i.push(e),e}var i=[];n=n||0;for(var o=0;o<n;++o)r();var s=(o=t()).toString;return a[e]=V(o,{arg:r,toString:function(){return I(["function(",i.join(),"){",s(),"}"])}})},scope:t,cond:function(){var e=I(arguments),n=t(),r=t(),i=n.toString,o=r.toString;return V(n,{then:function(){return n.apply(n,D(arguments)),this},else:function(){return r.apply(r,D(arguments)),this},toString:function(){var t=o();return t&&(t="else{"+t+"}"),I(["if(",e,"){",i(),"}",t])}})},compile:function(){var e=['"use strict";',o,"return {"];Object.keys(a).forEach((function(t){e.push('"',t,'":',a[t].toString(),",")})),e.push("}");var t=I(e).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Function.apply(null,r.concat(t)).apply(null,i)}}}(),n=e.link,r=e.global;e.id=he++,e.batchId="0";var i=n(ce),o=e.shared={props:"a0"};Object.keys(ce).forEach((function(e){o[e]=r.def(i,".",e)}));var a=e.next={},s=e.current={};Object.keys(le).forEach((function(e){Array.isArray(re[e])&&(a[e]=r.def(o.next,".",e),s[e]=r.def(o.current,".",e))}));var l=e.constants={};Object.keys(ue).forEach((function(e){l[e]=r.def(JSON.stringify(ue[e]))})),e.invoke=function(t,r){switch(r.type){case 0:var i=["this",o.context,o.props,e.batchId];return t.def(n(r.data),".call(",i.slice(0,Math.max(r.data.length+1,4)),")");case 1:return t.def(o.props,r.data);case 2:return t.def(o.context,r.data);case 3:return t.def("this",r.data);case 4:return r.data.append(e,t),r.data.ref;case 5:return r.data.toString();case 6:return r.data.map((function(n){return e.invoke(t,n)}))}},e.attribCache={};var c={};return e.scopeAttrib=function(e){if((e=t.id(e))in c)return c[e];var r=u.scope[e];return r||(r=u.scope[e]=new K),c[e]=n(r)},e}function x(e,t){var n=e.static,r=e.dynamic;if("framebuffer"in n){var i=n.framebuffer;return i?(i=l.getFramebuffer(i),F((function(e,t){var n=e.link(i),r=e.shared;return t.set(r.framebuffer,".next",n),r=r.context,t.set(r,".framebufferWidth",n+".width"),t.set(r,".framebufferHeight",n+".height"),n}))):F((function(e,t){var n=e.shared;return t.set(n.framebuffer,".next","null"),n=n.context,t.set(n,".framebufferWidth",n+".drawingBufferWidth"),t.set(n,".framebufferHeight",n+".drawingBufferHeight"),"null"}))}if("framebuffer"in r){var o=r.framebuffer;return B(o,(function(e,t){var n=e.invoke(t,o),r=e.shared,i=r.framebuffer;return n=t.def(i,".getFramebuffer(",n,")"),t.set(i,".next",n),r=r.context,t.set(r,".framebufferWidth",n+"?"+n+".width:"+r+".drawingBufferWidth"),t.set(r,".framebufferHeight",n+"?"+n+".height:"+r+".drawingBufferHeight"),n}))}return null}function w(e,n,r){function i(e){if(e in o){var n=t.id(o[e]);return(e=F((function(){return n}))).id=n,e}if(e in a){var r=a[e];return B(r,(function(e,t){var n=e.invoke(t,r);return t.def(e.shared.strings,".id(",n,")")}))}return null}var o=e.static,a=e.dynamic,s=i("frag"),l=i("vert"),c=null;return z(s)&&z(l)?(c=h.program(l.id,s.id,null,r),e=F((function(e,t){return e.link(c)}))):e=new N(s&&s.thisDep||l&&l.thisDep,s&&s.contextDep||l&&l.contextDep,s&&s.propDep||l&&l.propDep,(function(e,t){var n,r,i=e.shared.shader;return n=s?s.append(e,t):t.def(i,".","frag"),r=l?l.append(e,t):t.def(i,".","vert"),t.def(i+".program("+r+","+n+")")})),{frag:s,vert:l,progVar:e,program:c}}function A(e,t){function n(e,t){if(e in r){var n=0|r[e];return t?a.offset=n:a.instances=n,F((function(e,r){return t&&(e.OFFSET=n),n}))}if(e in i){var o=i[e];return B(o,(function(e,n){var r=e.invoke(n,o);return t&&(e.OFFSET=r),r}))}if(t){if(c)return F((function(e,t){return e.OFFSET=0}));if(s)return new N(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.offset:0")}))}else if(s)return new N(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.instances:-1")}));return null}var r=e.static,i=e.dynamic,a={},s=!1,l=function(){if("vao"in r){var e=r.vao;return null!==e&&null===u.getVAO(e)&&(e=u.createVAO(e)),s=!0,a.vao=e,F((function(t){var n=u.getVAO(e);return n?t.link(n):"null"}))}if("vao"in i){s=!0;var t=i.vao;return B(t,(function(e,n){var r=e.invoke(n,t);return n.def(e.shared.vao+".getVAO("+r+")")}))}return null}(),c=!1,h=function(){if("elements"in r){var e=r.elements;if(a.elements=e,R(e)){var t=a.elements=o.create(e,!0);e=o.getElements(t),c=!0}else e&&(e=o.getElements(e),c=!0);return t=F((function(t,n){if(e){var r=t.link(e);return t.ELEMENTS=r}return t.ELEMENTS=null})),t.value=e,t}if("elements"in i){c=!0;var n=i.elements;return B(n,(function(e,t){var r=(i=e.shared).isBufferArgs,i=i.elements,o=e.invoke(t,n),a=t.def("null");return r=t.def(r,"(",o,")"),o=e.cond(r).then(a,"=",i,".createStream(",o,");").else(a,"=",i,".getElements(",o,");"),t.entry(o),t.exit(e.cond(r).then(i,".destroyStream(",a,");")),e.ELEMENTS=a}))}return s?new N(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.elements+".getElements("+e.shared.vao+".currentVAO.elements):null")})):null}(),d=n("offset",!0),f=function(){if("primitive"in r){var e=r.primitive;return a.primitive=e,F((function(t,n){return ie[e]}))}if("primitive"in i){var t=i.primitive;return B(t,(function(e,n){var r=e.constants.primTypes,i=e.invoke(n,t);return n.def(r,"[",i,"]")}))}return c?z(h)?h.value?F((function(e,t){return t.def(e.ELEMENTS,".primType")})):F((function(){return 4})):new N(h.thisDep,h.contextDep,h.propDep,(function(e,t){var n=e.ELEMENTS;return t.def(n,"?",n,".primType:",4)})):s?new N(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.primitive:4")})):null}(),p=function(){if("count"in r){var e=0|r.count;return a.count=e,F((function(){return e}))}if("count"in i){var t=i.count;return B(t,(function(e,n){return e.invoke(n,t)}))}return c?z(h)?h?d?new N(d.thisDep,d.contextDep,d.propDep,(function(e,t){return t.def(e.ELEMENTS,".vertCount-",e.OFFSET)})):F((function(e,t){return t.def(e.ELEMENTS,".vertCount")})):F((function(){return-1})):new N(h.thisDep||d.thisDep,h.contextDep||d.contextDep,h.propDep||d.propDep,(function(e,t){var n=e.ELEMENTS;return e.OFFSET?t.def(n,"?",n,".vertCount-",e.OFFSET,":-1"):t.def(n,"?",n,".vertCount:-1")})):s?new N(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao,".currentVAO?",e.shared.vao,".currentVAO.count:-1")})):null}(),g=n("instances",!1);return{elements:h,primitive:f,count:p,instances:g,offset:d,vao:l,vaoActive:s,elementsActive:c,static:a}}function k(e,n){var r=e.static,o=e.dynamic,a={};return Object.keys(r).forEach((function(e){var n=r[e],o=t.id(e),s=new K;if(R(n))s.state=1,s.buffer=i.getBuffer(i.create(n,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(n))s.state=1,s.buffer=c,s.type=0;else if("constant"in n){var l=n.constant;s.buffer="null",s.state=2,"number"==typeof l?s.x=l:Ae.forEach((function(e,t){t<l.length&&(s[e]=l[t])}))}else{var c=R(n.buffer)?i.getBuffer(i.create(n.buffer,34962,!1,!0)):i.getBuffer(n.buffer),u=0|n.offset,h=0|n.stride,d=0|n.size,f=!!n.normalized,p=0;"type"in n&&(p=Q[n.type]),n=0|n.divisor,s.buffer=c,s.state=1,s.size=d,s.normalized=f,s.type=p||c.dtype,s.offset=u,s.stride=h,s.divisor=n}a[e]=F((function(e,t){var n=e.attribCache;if(o in n)return n[o];var r={isStream:!1};return Object.keys(s).forEach((function(e){r[e]=s[e]})),s.buffer&&(r.buffer=e.link(s.buffer),r.type=r.type||r.buffer+".dtype"),n[o]=r}))})),Object.keys(o).forEach((function(e){var t=o[e];a[e]=B(t,(function(e,n){function r(e){n(l[e],"=",i,".",e,"|0;")}var i=e.invoke(n,t),o=e.shared,a=e.constants,s=o.isBufferArgs,l=(o=o.buffer,{isStream:n.def(!1)}),c=new K;c.state=1,Object.keys(c).forEach((function(e){l[e]=n.def(""+c[e])}));var u=l.buffer,h=l.type;return n("if(",s,"(",i,")){",l.isStream,"=true;",u,"=",o,".createStream(",34962,",",i,");",h,"=",u,".dtype;","}else{",u,"=",o,".getBuffer(",i,");","if(",u,"){",h,"=",u,".dtype;",'}else if("constant" in ',i,"){",l.state,"=",2,";","if(typeof "+i+'.constant === "number"){',l[Ae[0]],"=",i,".constant;",Ae.slice(1).map((function(e){return l[e]})).join("="),"=0;","}else{",Ae.map((function(e,t){return l[e]+"="+i+".constant.length>"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",o,".createStream(",34962,",",i,".buffer);","}else{",u,"=",o,".getBuffer(",i,".buffer);","}",h,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),r("size"),r("offset"),r("stride"),r("divisor"),n("}}"),n.exit("if(",l.isStream,"){",o,".destroyStream(",u,");","}"),l}))})),a}function T(e,t,r,i,o){function s(e){var t=c[e];t&&(d[e]=t)}var l=function(e,t){if("string"==typeof(n=e.static).frag&&"string"==typeof n.vert){if(0<Object.keys(t.dynamic).length)return null;var n=t.static,r=Object.keys(n);if(0<r.length&&"number"==typeof n[r[0]]){for(var i=[],o=0;o<r.length;++o)i.push([0|n[r[o]],r[o]]);return i}}return null}(e,t),c=function(e,t,n){function r(e){if(e in i){var n=i[e];e=!0;var r,a,s=0|n.x,l=0|n.y;return"width"in n?r=0|n.width:e=!1,"height"in n?a=0|n.height:e=!1,new N(!e&&t&&t.thisDep,!e&&t&&t.contextDep,!e&&t&&t.propDep,(function(e,t){var i=e.shared.context,o=r;"width"in n||(o=t.def(i,".","framebufferWidth","-",s));var c=a;return"height"in n||(c=t.def(i,".","framebufferHeight","-",l)),[s,l,o,c]}))}if(e in o){var c=o[e];return e=B(c,(function(e,t){var n=e.invoke(t,c),r=e.shared.context,i=t.def(n,".x|0"),o=t.def(n,".y|0");return[i,o,t.def('"width" in ',n,"?",n,".width|0:","(",r,".","framebufferWidth","-",i,")"),n=t.def('"height" in ',n,"?",n,".height|0:","(",r,".","framebufferHeight","-",o,")")]})),t&&(e.thisDep=e.thisDep||t.thisDep,e.contextDep=e.contextDep||t.contextDep,e.propDep=e.propDep||t.propDep),e}return t?new N(t.thisDep,t.contextDep,t.propDep,(function(e,t){var n=e.shared.context;return[0,0,t.def(n,".","framebufferWidth"),t.def(n,".","framebufferHeight")]})):null}var i=e.static,o=e.dynamic;if(e=r("viewport")){var a=e;e=new N(e.thisDep,e.contextDep,e.propDep,(function(e,t){var n=a.append(e,t),r=e.shared.context;return t.set(r,".viewportWidth",n[2]),t.set(r,".viewportHeight",n[3]),n}))}return{viewport:e,scissor_box:r("scissor.box")}}(e,p=x(e)),h=A(e),d=function(e,t){var n=e.static,r=e.dynamic,i={};return ae.forEach((function(e){function t(t,a){if(e in n){var s=t(n[e]);i[o]=F((function(){return s}))}else if(e in r){var l=r[e];i[o]=B(l,(function(e,t){return a(e,t,e.invoke(t,l))}))}}var o=m(e);switch(e){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":case"lineWidth":return t((function(e){return e}),(function(e,t,n){return n}));case"depth.func":return t((function(e){return Se[e]}),(function(e,t,n){return t.def(e.constants.compareFuncs,"[",n,"]")}));case"depth.range":return t((function(e){return e}),(function(e,t,n){return[t.def("+",n,"[0]"),t=t.def("+",n,"[1]")]}));case"blend.func":return t((function(e){return[Te["srcRGB"in e?e.srcRGB:e.src],Te["dstRGB"in e?e.dstRGB:e.dst],Te["srcAlpha"in e?e.srcAlpha:e.src],Te["dstAlpha"in e?e.dstAlpha:e.dst]]}),(function(e,t,n){function r(e,r){return t.def('"',e,r,'" in ',n,"?",n,".",e,r,":",n,".",e)}e=e.constants.blendFuncs;var i=r("src","RGB"),o=r("dst","RGB"),a=(i=t.def(e,"[",i,"]"),t.def(e,"[",r("src","Alpha"),"]"));return[i,o=t.def(e,"[",o,"]"),a,e=t.def(e,"[",r("dst","Alpha"),"]")]}));case"blend.equation":return t((function(e){return"string"==typeof e?[J[e],J[e]]:"object"==typeof e?[J[e.rgb],J[e.alpha]]:void 0}),(function(e,t,n){var r=e.constants.blendEquations,i=t.def(),o=t.def();return(e=e.cond("typeof ",n,'==="string"')).then(i,"=",o,"=",r,"[",n,"];"),e.else(i,"=",r,"[",n,".rgb];",o,"=",r,"[",n,".alpha];"),t(e),[i,o]}));case"blend.color":return t((function(e){return a(4,(function(t){return+e[t]}))}),(function(e,t,n){return a(4,(function(e){return t.def("+",n,"[",e,"]")}))}));case"stencil.mask":return t((function(e){return 0|e}),(function(e,t,n){return t.def(n,"|0")}));case"stencil.func":return t((function(e){return[Se[e.cmp||"keep"],e.ref||0,"mask"in e?e.mask:-1]}),(function(e,t,n){return[e=t.def('"cmp" in ',n,"?",e.constants.compareFuncs,"[",n,".cmp]",":",7680),t.def(n,".ref|0"),t=t.def('"mask" in ',n,"?",n,".mask|0:-1")]}));case"stencil.opFront":case"stencil.opBack":return t((function(t){return["stencil.opBack"===e?1029:1028,Ee[t.fail||"keep"],Ee[t.zfail||"keep"],Ee[t.zpass||"keep"]]}),(function(t,n,r){function i(e){return n.def('"',e,'" in ',r,"?",o,"[",r,".",e,"]:",7680)}var o=t.constants.stencilOps;return["stencil.opBack"===e?1029:1028,i("fail"),i("zfail"),i("zpass")]}));case"polygonOffset.offset":return t((function(e){return[0|e.factor,0|e.units]}),(function(e,t,n){return[t.def(n,".factor|0"),t=t.def(n,".units|0")]}));case"cull.face":return t((function(e){var t=0;return"front"===e?t=1028:"back"===e&&(t=1029),t}),(function(e,t,n){return t.def(n,'==="front"?',1028,":",1029)}));case"frontFace":return t((function(e){return Ce[e]}),(function(e,t,n){return t.def(n+'==="cw"?2304:2305')}));case"colorMask":return t((function(e){return e.map((function(e){return!!e}))}),(function(e,t,n){return a(4,(function(e){return"!!"+n+"["+e+"]"}))}));case"sample.coverage":return t((function(e){return["value"in e?e.value:1,!!e.invert]}),(function(e,t,n){return[t.def('"value" in ',n,"?+",n,".value:1"),t=t.def("!!",n,".invert")]}))}})),i}(e),f=w(e,0,l);s("viewport"),s(m("scissor.box"));var p,g=0<Object.keys(d).length;if((p={framebuffer:p,draw:h,shader:f,state:d,dirty:g,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(e){var t,n=e.static;if(e=e.dynamic,"profile"in n){var r=!!n.profile;(t=F((function(e,t){return r}))).enable=r}else if("profile"in e){var i=e.profile;t=B(i,(function(e,t){return e.invoke(t,i)}))}return t}(e),p.uniforms=function(e,t){var n=e.static,r=e.dynamic,i={};return Object.keys(n).forEach((function(e){var t,r=n[e];if("number"==typeof r||"boolean"==typeof r)t=F((function(){return r}));else if("function"==typeof r){var o=r._reglType;"texture2d"===o||"textureCube"===o?t=F((function(e){return e.link(r)})):"framebuffer"!==o&&"framebufferCube"!==o||(t=F((function(e){return e.link(r.color[0])})))}else y(r)&&(t=F((function(e){return e.global.def("[",a(r.length,(function(e){return r[e]})),"]")})));t.value=r,i[e]=t})),Object.keys(r).forEach((function(e){var t=r[e];i[e]=B(t,(function(e,n){return e.invoke(n,t)}))})),i}(r),p.drawVAO=p.scopeVAO=h.vao,!p.drawVAO&&f.program&&!l&&n.angle_instanced_arrays&&h.static.elements){var v=!0;if(e=f.program.attributes.map((function(e){return e=t.static[e],v=v&&!!e,e})),v&&0<e.length){var b=u.getVAO(u.createVAO({attributes:e,elements:h.static.elements}));p.drawVAO=new N(null,null,null,(function(e,t){return e.link(b)})),p.useVAO=!0}}return l?p.useVAO=!0:p.attributes=k(t),p.context=function(e){var t=e.static,n=e.dynamic,r={};return Object.keys(t).forEach((function(e){var n=t[e];r[e]=F((function(e,t){return"number"==typeof n||"boolean"==typeof n?""+n:e.link(n)}))})),Object.keys(n).forEach((function(e){var t=n[e];r[e]=B(t,(function(e,n){return e.invoke(n,t)}))})),r}(i),p}function S(e,t,n){var r=e.shared.context,i=e.scope();Object.keys(n).forEach((function(o){t.save(r,"."+o);var a=n[o].append(e,t);Array.isArray(a)?i(r,".",o,"=[",a.join(),"];"):i(r,".",o,"=",a,";")})),t(i)}function E(e,t,n,r){var i,o=(s=e.shared).gl,a=s.framebuffer;te&&(i=t.def(s.extensions,".webgl_draw_buffers"));var s=(l=e.constants).drawBuffer,l=l.backBuffer;e=n?n.append(e,t):t.def(a,".next"),r||t("if(",e,"!==",a,".cur){"),t("if(",e,"){",o,".bindFramebuffer(",36160,",",e,".framebuffer);"),te&&t(i,".drawBuffersWEBGL(",s,"[",e,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),te&&t(i,".drawBuffersWEBGL(",l,");"),t("}",a,".cur=",e,";"),r||t("}")}function C(e,t,n){var r=e.shared,i=r.gl,o=e.current,s=e.next,l=r.current,c=r.next,u=e.cond(l,".dirty");ae.forEach((function(t){var r,h;if(!((t=m(t))in n.state))if(t in s){r=s[t],h=o[t];var d=a(re[t].length,(function(e){return u.def(r,"[",e,"]")}));u(e.cond(d.map((function(e,t){return e+"!=="+h+"["+t+"]"})).join("||")).then(i,".",le[t],"(",d,");",d.map((function(e,t){return h+"["+t+"]="+e})).join(";"),";"))}else r=u.def(c,".",t),d=e.cond(r,"!==",l,".",t),u(d),t in se?d(e.cond(r).then(i,".enable(",se[t],");").else(i,".disable(",se[t],");"),l,".",t,"=",r,";"):d(i,".",le[t],"(",r,");",l,".",t,"=",r,";")})),0===Object.keys(n.state).length&&u(l,".dirty=false;"),t(u)}function M(e,t,n,r){var i=e.shared,o=e.current,a=i.current,s=i.gl;P(Object.keys(n)).forEach((function(i){var l=n[i];if(!r||r(l)){var c=l.append(e,t);if(se[i]){var u=se[i];z(l)?t(s,c?".enable(":".disable(",u,");"):t(e.cond(c).then(s,".enable(",u,");").else(s,".disable(",u,");")),t(a,".",i,"=",c,";")}else if(y(c)){var h=o[i];t(s,".",le[i],"(",c,");",c.map((function(e,t){return h+"["+t+"]="+e})).join(";"),";")}else t(s,".",le[i],"(",c,");",a,".",i,"=",c,";")}}))}function O(e,t){ee&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function L(e,t,n,r,i){function o(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function a(e){e(c=t.def(),"=",o(),";"),"string"==typeof i?e(d,".count+=",i,";"):e(d,".count++;"),p&&(r?e(u=t.def(),"=",g,".getNumPendingQueries();"):e(g,".beginQuery(",d,");"))}function s(e){e(d,".cpuTime+=",o(),"-",c,";"),p&&(r?e(g,".pushScopeStats(",u,",",g,".getNumPendingQueries(),",d,");"):e(g,".endQuery();"))}function l(e){var n=t.def(f,".profile");t(f,".profile=",e,";"),t.exit(f,".profile=",n,";")}var c,u,h=e.shared,d=e.stats,f=h.current,g=h.timer;if(n=n.profile){if(z(n))return void(n.enable?(a(t),s(t.exit),l("true")):l("false"));l(n=n.append(e,t))}else n=t.def(f,".profile");a(h=e.block()),t("if(",n,"){",h,"}"),s(e=e.block()),t.exit("if(",n,"){",e,"}")}function j(e,t,n,r,i){function o(n,r,i){function o(){t("if(!",u,".buffer){",l,".enableVertexAttribArray(",c,");}");var n,o=i.type;n=i.size?t.def(i.size,"||",r):r,t("if(",u,".type!==",o,"||",u,".size!==",n,"||",f.map((function(e){return u+"."+e+"!=="+i[e]})).join("||"),"){",l,".bindBuffer(",34962,",",h,".buffer);",l,".vertexAttribPointer(",[c,n,o,i.normalized,i.stride,i.offset],");",u,".type=",o,";",u,".size=",n,";",f.map((function(e){return u+"."+e+"="+i[e]+";"})).join(""),"}"),ee&&(o=i.divisor,t("if(",u,".divisor!==",o,"){",e.instancing,".vertexAttribDivisorANGLE(",[c,o],");",u,".divisor=",o,";}"))}function s(){t("if(",u,".buffer){",l,".disableVertexAttribArray(",c,");",u,".buffer=null;","}if(",Ae.map((function(e,t){return u+"."+e+"!=="+d[t]})).join("||"),"){",l,".vertexAttrib4f(",c,",",d,");",Ae.map((function(e,t){return u+"."+e+"="+d[t]+";"})).join(""),"}")}var l=a.gl,c=t.def(n,".location"),u=t.def(a.attributes,"[",c,"]");n=i.state;var h=i.buffer,d=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];1===n?o():2===n?s():(t("if(",n,"===",1,"){"),o(),t("}else{"),s(),t("}"))}var a=e.shared;r.forEach((function(r){var a,s=r.name,l=n.attributes[s];if(l){if(!i(l))return;a=l.append(e,t)}else{if(!i(Me))return;var c=e.scopeAttrib(s);a={},Object.keys(new K).forEach((function(e){a[e]=t.def(c,".",e)}))}o(e.link(r),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(r.info.type),a)}))}function U(e,n,r,i,o,s){for(var l,c=e.shared,u=c.gl,h={},d=0;d<i.length;++d){var f=(_=i[d]).name,p=_.info.type,g=_.info.size,m=r.uniforms[f];if(1<g){if(!m)continue;var v=f.replace("[0]","");if(h[v])continue;h[v]=1}var b,_=e.link(_)+".location";if(m){if(!o(m))continue;if(z(m)){if(f=m.value,35678===p||35680===p)n(u,".uniform1i(",_,",",(p=e.link(f._texture||f.color[0]._texture))+".bind());"),n.exit(p,".unbind();");else if(35674===p||35675===p||35676===p)g=e.global.def("new Float32Array(["+Array.prototype.slice.call(f)+"])"),f=2,35675===p?f=3:35676===p&&(f=4),n(u,".uniformMatrix",f,"fv(",_,",false,",g,");");else{switch(p){case 5126:l="1f";break;case 35664:l="2f";break;case 35665:l="3f";break;case 35666:l="4f";break;case 35670:case 5124:l="1i";break;case 35671:case 35667:l="2i";break;case 35672:case 35668:l="3i";break;case 35673:case 35669:l="4i"}1<g?(l+="v",f=e.global.def("["+Array.prototype.slice.call(f)+"]")):f=y(f)?Array.prototype.slice.call(f):f,n(u,".uniform",l,"(",_,",",f,");")}continue}b=m.append(e,n)}else{if(!o(Me))continue;b=n.def(c.uniforms,"[",t.id(f),"]")}switch(35678===p?n("if(",b,"&&",b,'._reglType==="framebuffer"){',b,"=",b,".color[0];","}"):35680===p&&n("if(",b,"&&",b,'._reglType==="framebufferCube"){',b,"=",b,".color[0];","}"),f=1,p){case 35678:case 35680:p=n.def(b,"._texture"),n(u,".uniform1i(",_,",",p,".bind());"),n.exit(p,".unbind();");continue;case 5124:case 35670:l="1i";break;case 35667:case 35671:l="2i",f=2;break;case 35668:case 35672:l="3i",f=3;break;case 35669:case 35673:l="4i",f=4;break;case 5126:l="1f";break;case 35664:l="2f",f=2;break;case 35665:l="3f",f=3;break;case 35666:l="4f",f=4;break;case 35674:l="Matrix2fv";break;case 35675:l="Matrix3fv";break;case 35676:l="Matrix4fv"}if(-1===l.indexOf("Matrix")&&1<g&&(l+="v",f=1),"M"===l.charAt(0)){n(u,".uniform",l,"(",_,","),_=Math.pow(p-35674+2,2);var x=e.global.def("new Float32Array(",_,")");Array.isArray(b)?n("false,(",a(_,(function(e){return x+"["+e+"]="+b[e]})),",",x,")"):n("false,(Array.isArray(",b,")||",b," instanceof Float32Array)?",b,":(",a(_,(function(e){return x+"["+e+"]="+b+"["+e+"]"})),",",x,")"),n(");")}else{if(1<f){p=[];var w=[];for(g=0;g<f;++g)Array.isArray(b)?w.push(b[g]):w.push(n.def(b+"["+g+"]")),s&&p.push(n.def());s&&n("if(!",e.batchId,"||",p.map((function(e,t){return e+"!=="+w[t]})).join("||"),"){",p.map((function(e,t){return e+"="+w[t]+";"})).join("")),n(u,".uniform",l,"(",_,",",w.join(","),");")}else s&&(p=n.def(),n("if(!",e.batchId,"||",p,"!==",b,"){",p,"=",b,";")),n(u,".uniform",l,"(",_,",",b,");");s&&n("}")}}}function q(e,t,n,r){function i(i){var o=d[i];return o?o.contextDep&&r.contextDynamic||o.propDep?o.append(e,n):o.append(e,t):t.def(h,".",i)}function o(){function e(){n(l,".drawElementsInstancedANGLE(",[p,m,v,g+"<<(("+v+"-5121)>>1)",s],");")}function t(){n(l,".drawArraysInstancedANGLE(",[p,g,m,s],");")}f&&"null"!==f?y?e():(n("if(",f,"){"),e(),n("}else{"),t(),n("}")):t()}function a(){function e(){n(u+".drawElements("+[p,m,v,g+"<<(("+v+"-5121)>>1)"]+");")}function t(){n(u+".drawArrays("+[p,g,m]+");")}f&&"null"!==f?y?e():(n("if(",f,"){"),e(),n("}else{"),t(),n("}")):t()}var s,l,c=e.shared,u=c.gl,h=c.draw,d=r.draw,f=function(){var i=d.elements,o=t;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(e,o),d.elementsActive&&o("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=o.def(),o(i,"=",h,".","elements",";","if(",i,"){",u,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",e.shared.elements+".getElements("+c.vao,".currentVAO.elements);",ne?"":"if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),g=i("offset"),m=function(){var i=d.count,o=t;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(e,o)):i=o.def(h,".","count"),i}();if("number"==typeof m){if(0===m)return}else n("if(",m,"){"),n.exit("}");ee&&(s=i("instances"),l=e.instancing);var v=f+".type",y=d.elements&&z(d.elements)&&!d.vaoActive;ee&&("number"!=typeof s||0<=s)?"string"==typeof s?(n("if(",s,">0){"),o(),n("}else if(",s,"<0){"),a(),n("}")):o():a()}function $(e,t,n,r,i){return i=(t=_()).proc("body",i),ee&&(t.instancing=i.def(t.shared.extensions,".angle_instanced_arrays")),e(t,i,n,r),t.compile().body}function W(e,t,n,r){O(e,t),n.useVAO?n.drawVAO?t(e.shared.vao,".setVAO(",n.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),j(e,t,n,r.attributes,(function(){return!0}))),U(e,t,n,r.uniforms,(function(){return!0}),!1),q(e,t,t,n)}function G(e,t,n,r){function i(){return!0}e.batchId="a1",O(e,t),j(e,t,n,r.attributes,i),U(e,t,n,r.uniforms,i,!1),q(e,t,t,n)}function Y(e,t,n,r){function i(e){return e.contextDep&&a||e.propDep}function o(e){return!i(e)}O(e,t);var a=n.contextDep,s=t.def(),l=t.def();e.shared.props=l,e.batchId=s;var c=e.scope(),u=e.scope();t(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),n.needsContext&&S(e,u,n.context),n.needsFramebuffer&&E(e,u,n.framebuffer),M(e,u,n.state,i),n.profile&&i(n.profile)&&L(e,u,n,!1,!0),r?(n.useVAO?n.drawVAO?i(n.drawVAO)?u(e.shared.vao,".setVAO(",n.drawVAO.append(e,u),");"):c(e.shared.vao,".setVAO(",n.drawVAO.append(e,c),");"):c(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(c(e.shared.vao,".setVAO(null);"),j(e,c,n,r.attributes,o),j(e,u,n,r.attributes,i)),U(e,c,n,r.uniforms,o,!1),U(e,u,n,r.uniforms,i,!0),q(e,c,u,n)):(t=e.global.def("{}"),r=n.shader.progVar.append(e,u),l=u.def(r,".id"),c=u.def(t,"[",l,"]"),u(e.shared.gl,".useProgram(",r,".program);","if(!",c,"){",c,"=",t,"[",l,"]=",e.link((function(t){return $(G,e,n,t,2)})),"(",r,");}",c,".call(this,a0[",s,"],",s,");"))}function X(e,n){function r(t){var r=n.shader[t];r&&i.set(o.shader,"."+t,r.append(e,i))}var i=e.proc("scope",3);e.batchId="a2";var o=e.shared,a=o.current;S(e,i,n.context),n.framebuffer&&n.framebuffer.append(e,i),P(Object.keys(n.state)).forEach((function(t){var r=n.state[t].append(e,i);y(r)?r.forEach((function(n,r){i.set(e.next[t],"["+r+"]",n)})):i.set(o.next,"."+t,r)})),L(e,i,n,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(t){var r=n.draw[t];r&&i.set(o.draw,"."+t,""+r.append(e,i))})),Object.keys(n.uniforms).forEach((function(r){var a=n.uniforms[r].append(e,i);Array.isArray(a)&&(a="["+a.join()+"]"),i.set(o.uniforms,"["+t.id(r)+"]",a)})),Object.keys(n.attributes).forEach((function(t){var r=n.attributes[t].append(e,i),o=e.scopeAttrib(t);Object.keys(new K).forEach((function(e){i.set(o,"."+e,r[e])}))})),n.scopeVAO&&i.set(o.vao,".targetVAO",n.scopeVAO.append(e,i)),r("vert"),r("frag"),0<Object.keys(n.state).length&&(i(a,".dirty=true;"),i.exit(a,".dirty=true;")),i("a1(",e.shared.context,",a0,",e.batchId,");")}function Z(e,t,n){var r=t.static[n];if(r&&function(e){if("object"==typeof e&&!y(e)){for(var t=Object.keys(e),n=0;n<t.length;++n)if(H.isDynamic(e[t[n]]))return!0;return!1}}(r)){var i=e.global,o=Object.keys(r),a=!1,s=!1,l=!1,c=e.global.def("{}");o.forEach((function(t){var n=r[t];if(H.isDynamic(n))"function"==typeof n&&(n=r[t]=H.unbox(n)),t=B(n,null),a=a||t.thisDep,l=l||t.propDep,s=s||t.contextDep;else{switch(i(c,".",t,"="),typeof n){case"number":i(n);break;case"string":i('"',n,'"');break;case"object":Array.isArray(n)&&i("[",n.join(),"]");break;default:i(e.link(n))}i(";")}})),t.dynamic[n]=new H.DynamicVariable(4,{thisDep:a,contextDep:s,propDep:l,ref:c,append:function(e,t){o.forEach((function(n){var i=r[n];H.isDynamic(i)&&(i=e.invoke(t,i),t(c,".",n,"=",i,";"))}))}}),delete t.static[n]}}var K=u.Record,J={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(J.min=32775,J.max=32776);var ee=n.angle_instanced_arrays,te=n.webgl_draw_buffers,ne=n.oes_vertex_array_object,re={dirty:!0,profile:g.profile},oe={},ae=[],se={},le={};v("dither",3024),v("blend.enable",3042),b("blend.color","blendColor",[0,0,0,0]),b("blend.equation","blendEquationSeparate",[32774,32774]),b("blend.func","blendFuncSeparate",[1,0,1,0]),v("depth.enable",2929,!0),b("depth.func","depthFunc",513),b("depth.range","depthRange",[0,1]),b("depth.mask","depthMask",!0),b("colorMask","colorMask",[!0,!0,!0,!0]),v("cull.enable",2884),b("cull.face","cullFace",1029),b("frontFace","frontFace",2305),b("lineWidth","lineWidth",1),v("polygonOffset.enable",32823),b("polygonOffset.offset","polygonOffset",[0,0]),v("sample.alpha",32926),v("sample.enable",32928),b("sample.coverage","sampleCoverage",[1,!1]),v("stencil.enable",2960),b("stencil.mask","stencilMask",-1),b("stencil.func","stencilFunc",[519,0,-1]),b("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),b("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),v("scissor.enable",3089),b("scissor.box","scissor",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]),b("viewport","viewport",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]);var ce={gl:e,context:f,strings:t,next:oe,current:re,draw:d,elements:o,buffer:i,shader:h,attributes:u.state,vao:u,uniforms:c,framebuffer:l,extensions:n,timer:p,isBufferArgs:R},ue={primTypes:ie,compareFuncs:Se,blendFuncs:Te,blendEquations:J,stencilOps:Ee,glTypes:Q,orientationType:Ce};te&&(ue.backBuffer=[1029],ue.drawBuffer=a(r.maxDrawbuffers,(function(e){return 0===e?[0]:a(e,(function(e){return 36064+e}))})));var he=0;return{next:oe,current:re,procs:function(){var e=_(),t=e.proc("poll"),i=e.proc("refresh"),o=e.block();t(o),i(o);var s,l=e.shared,c=l.gl,u=l.next,h=l.current;o(h,".dirty=false;"),E(e,t),E(e,i,null,!0),ee&&(s=e.link(ee)),n.oes_vertex_array_object&&i(e.link(n.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var d=0;d<r.maxAttributes;++d){var f=i.def(l.attributes,"[",d,"]"),p=e.cond(f,".buffer");p.then(c,".enableVertexAttribArray(",d,");",c,".bindBuffer(",34962,",",f,".buffer.buffer);",c,".vertexAttribPointer(",d,",",f,".size,",f,".type,",f,".normalized,",f,".stride,",f,".offset);").else(c,".disableVertexAttribArray(",d,");",c,".vertexAttrib4f(",d,",",f,".x,",f,".y,",f,".z,",f,".w);",f,".buffer=null;"),i(p),ee&&i(s,".vertexAttribDivisorANGLE(",d,",",f,".divisor);")}return i(e.shared.vao,".currentVAO=null;",e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"),Object.keys(se).forEach((function(n){var r=se[n],a=o.def(u,".",n),s=e.block();s("if(",a,"){",c,".enable(",r,")}else{",c,".disable(",r,")}",h,".",n,"=",a,";"),i(s),t("if(",a,"!==",h,".",n,"){",s,"}")})),Object.keys(le).forEach((function(n){var r,s,l=le[n],d=re[n],f=e.block();f(c,".",l,"("),y(d)?(l=d.length,r=e.global.def(u,".",n),s=e.global.def(h,".",n),f(a(l,(function(e){return r+"["+e+"]"})),");",a(l,(function(e){return s+"["+e+"]="+r+"["+e+"];"})).join("")),t("if(",a(l,(function(e){return r+"["+e+"]!=="+s+"["+e+"]"})).join("||"),"){",f,"}")):(r=o.def(u,".",n),s=o.def(h,".",n),f(r,");",h,".",n,"=",r,";"),t("if(",r,"!==",s,"){",f,"}")),i(f)})),e.compile()}(),compile:function(e,t,n,r,i){var o=_();o.stats=o.link(i),Object.keys(t.static).forEach((function(e){Z(o,t,e)})),ke.forEach((function(t){Z(o,e,t)}));var a=T(e,t,n,r);return function(e,t){var n=e.proc("draw",1);O(e,n),S(e,n,t.context),E(e,n,t.framebuffer),C(e,n,t),M(e,n,t.state),L(e,n,t,!1,!0);var r=t.shader.progVar.append(e,n);if(n(e.shared.gl,".useProgram(",r,".program);"),t.shader.program)W(e,n,t,t.shader.program);else{n(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),o=n.def(r,".id"),a=n.def(i,"[",o,"]");n(e.cond(a).then(a,".call(this,a0);").else(a,"=",i,"[",o,"]=",e.link((function(n){return $(W,e,t,n,1)})),"(",r,");",a,".call(this,a0);"))}0<Object.keys(t.state).length&&n(e.shared.current,".dirty=true;"),e.shared.vao&&n(e.shared.vao,".setVAO(null);")}(o,a),X(o,a),function(e,t){function n(e){return e.contextDep&&i||e.propDep}var r=e.proc("batch",2);e.batchId="0",O(e,r);var i=!1,o=!0;Object.keys(t.context).forEach((function(e){i=i||t.context[e].propDep})),i||(S(e,r,t.context),o=!1);var a=!1;if((s=t.framebuffer)?(s.propDep?i=a=!0:s.contextDep&&i&&(a=!0),a||E(e,r,s)):E(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(i=!0),C(e,r,t),M(e,r,t.state,(function(e){return!n(e)})),t.profile&&n(t.profile)||L(e,r,t,!1,"a1"),t.contextDep=i,t.needsContext=o,t.needsFramebuffer=a,(o=t.shader.progVar).contextDep&&i||o.propDep)Y(e,r,t,null);else if(o=o.append(e,r),r(e.shared.gl,".useProgram(",o,".program);"),t.shader.program)Y(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var s=e.global.def("{}"),l=(a=r.def(o,".id"),r.def(s,"[",a,"]"));r(e.cond(l).then(l,".call(this,a0,a1);").else(l,"=",s,"[",a,"]=",e.link((function(n){return $(Y,e,t,n,2)})),"(",o,");",l,".call(this,a0,a1);"))}0<Object.keys(t.state).length&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(o,a),V(o.compile(),{destroy:function(){a.shader.program.destroy()}})}}}function U(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}var V=function(e,t){for(var n=Object.keys(t),r=0;r<n.length;++r)e[n[r]]=t[n[r]];return e},q=0,H={DynamicVariable:e,define:function(t,r){return new e(t,n(r+""))},isDynamic:function(t){return"function"==typeof t&&!t._reglType||t instanceof e},unbox:function t(n,r){return"function"==typeof n?new e(0,n):"number"==typeof n||"boolean"==typeof n?new e(5,n):Array.isArray(n)?new e(6,n.map((function(e,n){return t(e,r+"["+n+"]")}))):n instanceof e?n:void 0},accessor:n},$={next:"function"==typeof requestAnimationFrame?function(e){return requestAnimationFrame(e)}:function(e){return setTimeout(e,16)},cancel:"function"==typeof cancelAnimationFrame?function(e){return cancelAnimationFrame(e)}:clearTimeout},W="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},G=l();G.zero=l();var Y=function(e,t){var n=1;t.ext_texture_filter_anisotropic&&(n=e.getParameter(34047));var r=1,i=1;t.webgl_draw_buffers&&(r=e.getParameter(34852),i=e.getParameter(36063));var o=!!t.oes_texture_float;if(o){o=e.createTexture(),e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var a=e.createFramebuffer();if(e.bindFramebuffer(36160,a),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))o=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var s=G.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,s),e.getError()?o=!1:(e.deleteFramebuffer(a),e.deleteTexture(o),o=1===s[0]),G.freeType(s)}}return s=!0,"undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(s=e.createTexture(),a=G.allocType(5121,36),e.activeTexture(33984),e.bindTexture(34067,s),e.texImage2D(34069,0,6408,3,3,0,6408,5121,a),G.freeType(a),e.bindTexture(34067,null),e.deleteTexture(s),s=!e.getError()),{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:n,maxDrawbuffers:r,maxColorAttachments:i,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:o,npotTextureCube:s}},X=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},Z=function(e){return Object.keys(e).map((function(t){return e[t]}))},K={shape:function(e){for(var t=[];e.length;e=e[0])t.push(e.length);return t},flatten:function(e,t,n,r){var i=1;if(t.length)for(var o=0;o<t.length;++o)i*=t[o];else i=0;switch(n=r||G.allocType(n,i),t.length){case 0:break;case 1:for(r=t[0],t=0;t<r;++t)n[t]=e[t];break;case 2:for(r=t[0],t=t[1],o=i=0;o<r;++o)for(var a=e[o],s=0;s<t;++s)n[i++]=a[s];break;case 3:u(e,t[0],t[1],t[2],n,0);break;default:h(e,t,0,n,0)}return n}},J={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Q={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},ee={dynamic:35048,stream:35040,static:35044},te=K.flatten,ne=K.shape,re=[];re[5120]=1,re[5122]=2,re[5124]=4,re[5121]=1,re[5123]=2,re[5125]=4,re[5126]=4;var ie={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},oe=new Float32Array(1),ae=new Uint32Array(oe.buffer),se=[9984,9986,9985,9987],le=[0,6409,6410,6407,6408],ce={};ce[6409]=ce[6406]=ce[6402]=1,ce[34041]=ce[6410]=2,ce[6407]=ce[35904]=3,ce[6408]=ce[35906]=4;var ue=b("HTMLCanvasElement"),he=b("OffscreenCanvas"),de=b("CanvasRenderingContext2D"),fe=b("ImageBitmap"),pe=b("HTMLImageElement"),ge=b("HTMLVideoElement"),me=Object.keys(J).concat([ue,he,de,fe,pe,ge]),ve=[];ve[5121]=1,ve[5126]=4,ve[36193]=2,ve[5123]=2,ve[5125]=4;var ye=[];ye[32854]=2,ye[32855]=2,ye[36194]=2,ye[34041]=4,ye[33776]=.5,ye[33777]=.5,ye[33778]=1,ye[33779]=1,ye[35986]=.5,ye[35987]=1,ye[34798]=1,ye[35840]=.5,ye[35841]=.25,ye[35842]=.5,ye[35843]=.25,ye[36196]=.5;var be=[];be[32854]=2,be[32855]=2,be[36194]=2,be[33189]=2,be[36168]=1,be[34041]=4,be[35907]=4,be[34836]=16,be[34842]=8,be[34843]=6;var _e=function(e,t,n,r,i){function o(e){this.id=c++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function a(t){var n=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(n),t.renderbuffer=null,t.refCount=0,delete u[t.id],r.renderbufferCount--}var s={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(s.srgba=35907),t.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),t.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach((function(e){l[s[e]]=e}));var c=0,u={};return o.prototype.decRef=function(){0>=--this.refCount&&a(this)},i.profile&&(r.getTotalRenderbufferSize=function(){var e=0;return Object.keys(u).forEach((function(t){e+=u[t].stats.size})),e}),{create:function(t,n){function a(t,n){var r=0,o=0,u=32854;if("object"==typeof t&&t?("shape"in t?(r=0|(o=t.shape)[0],o=0|o[1]):("radius"in t&&(r=o=0|t.radius),"width"in t&&(r=0|t.width),"height"in t&&(o=0|t.height)),"format"in t&&(u=s[t.format])):"number"==typeof t?(r=0|t,o="number"==typeof n?0|n:r):t||(r=o=1),r!==c.width||o!==c.height||u!==c.format)return a.width=c.width=r,a.height=c.height=o,c.format=u,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,u,r,o),i.profile&&(c.stats.size=be[c.format]*c.width*c.height),a.format=l[c.format],a}var c=new o(e.createRenderbuffer());return u[c.id]=c,r.renderbufferCount++,a(t,n),a.resize=function(t,n){var r=0|t,o=0|n||r;return r===c.width&&o===c.height||(a.width=c.width=r,a.height=c.height=o,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,c.format,r,o),i.profile&&(c.stats.size=be[c.format]*c.width*c.height)),a},a._reglType="renderbuffer",a._renderbuffer=c,i.profile&&(a.stats=c.stats),a.destroy=function(){c.decRef()},a},clear:function(){Z(u).forEach(a)},restore:function(){Z(u).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}},xe=[];xe[6408]=4,xe[6407]=3;var we=[];we[5121]=1,we[5126]=4,we[36193]=2;var Ae=["x","y","z","w"],ke="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Te={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Se={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ee={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ce={cw:2304,ccw:2305},Me=new N(!1,!1,!1,(function(){}));return function(e){function t(){if(0===Z.length)w&&w.update(),ee=null;else{ee=$.next(t),h();for(var e=Z.length-1;0<=e;--e){var n=Z[e];n&&n(C,null,0)}p.flush(),w&&w.update()}}function n(){!ee&&0<Z.length&&(ee=$.next(t))}function r(){ee&&($.cancel(t),ee=null)}function i(e){e.preventDefault(),r(),K.forEach((function(e){e()}))}function a(e){p.getError(),y.restore(),N.restore(),I.restore(),z.restore(),F.restore(),B.restore(),P.restore(),w&&w.restore(),q.procs.refresh(),n(),J.forEach((function(e){e()}))}function s(e){function t(e,t){var n={},r={};return Object.keys(e).forEach((function(i){var o=e[i];if(H.isDynamic(o))r[i]=H.unbox(o,i);else{if(t&&Array.isArray(o))for(var a=0;a<o.length;++a)if(H.isDynamic(o[a]))return void(r[i]=H.unbox(o,i));n[i]=o}})),{dynamic:r,static:n}}var n=t(e.context||{},!0),r=t(e.uniforms||{},!0),i=t(e.attributes||{},!1);e=t(function(e){function t(e){if(e in n){var t=n[e];delete n[e],Object.keys(t).forEach((function(r){n[e+"."+r]=t[r]}))}}var n=V({},e);return delete n.uniforms,delete n.attributes,delete n.context,delete n.vao,"stencil"in n&&n.stencil.op&&(n.stencil.opBack=n.stencil.opFront=n.stencil.op,delete n.stencil.op),t("blend"),t("depth"),t("cull"),t("stencil"),t("polygonOffset"),t("scissor"),t("sample"),"vao"in e&&(n.vao=e.vao),n}(e),!1);var o={gpuTime:0,cpuTime:0,count:0},a=q.compile(e,i,r,n,o),s=a.draw,l=a.batch,c=a.scope,u=[];return V((function(e,t){var n;if("function"==typeof e)return c.call(this,null,e,0);if("function"==typeof t)if("number"==typeof e)for(n=0;n<e;++n)c.call(this,null,t,n);else{if(!Array.isArray(e))return c.call(this,e,t,0);for(n=0;n<e.length;++n)c.call(this,e[n],t,n)}else if("number"==typeof e){if(0<e)return l.call(this,function(e){for(;u.length<e;)u.push(null);return u}(0|e),0|e)}else{if(!Array.isArray(e))return s.call(this,e);if(e.length)return l.call(this,e,e.length)}}),{stats:o,destroy:function(){a.destroy()}})}function l(e,t){var n=0;q.procs.poll();var r=t.color;r&&(p.clearColor(+r[0]||0,+r[1]||0,+r[2]||0,+r[3]||0),n|=16384),"depth"in t&&(p.clearDepth(+t.depth),n|=256),"stencil"in t&&(p.clearStencil(0|t.stencil),n|=1024),p.clear(n)}function c(e){return Z.push(e),n(),{cancel:function(){var t=U(Z,e);Z[t]=function e(){var t=U(Z,e);Z[t]=Z[Z.length-1],--Z.length,0>=Z.length&&r()}}}}function u(){var e=G.viewport,t=G.scissor_box;e[0]=e[1]=t[0]=t[1]=0,C.viewportWidth=C.framebufferWidth=C.drawingBufferWidth=e[2]=t[2]=p.drawingBufferWidth,C.viewportHeight=C.framebufferHeight=C.drawingBufferHeight=e[3]=t[3]=p.drawingBufferHeight}function h(){C.tick+=1,C.time=f(),u(),q.procs.poll()}function d(){z.refresh(),u(),q.procs.refresh(),w&&w.update()}function f(){return(W()-A)/1e3}if(!(e=o(e)))return null;var p=e.gl,v=p.getContextAttributes();p.isContextLost();var y=function(e,t){function n(t){var n;t=t.toLowerCase();try{n=r[t]=e.getExtension(t)}catch(e){}return!!n}for(var r={},i=0;i<t.extensions.length;++i){var o=t.extensions[i];if(!n(o))return t.onDestroy(),t.onDone('"'+o+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return t.optionalExtensions.forEach(n),{extensions:r,restore:function(){Object.keys(r).forEach((function(e){if(r[e]&&!n(e))throw Error("(regl): error restoring extension "+e)}))}}}(p,e);if(!y)return null;var b=function(){var e={"":0},t=[""];return{id:function(n){var r=e[n];return r||(r=e[n]=t.length,t.push(n),r)},str:function(e){return t[e]}}}(),_={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},x=y.extensions,w=function(e,t){function n(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function r(e,t,r){var i=a.pop()||new n;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=r,s.push(i)}if(!t.ext_disjoint_timer_query)return null;var i=[],o=[],a=[],s=[],l=[],c=[];return{beginQuery:function(e){var n=i.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),o.push(n),r(o.length-1,o.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:r,update:function(){var e,n;if(0!==(e=o.length)){c.length=Math.max(c.length,e+1),l.length=Math.max(l.length,e+1),l[0]=0;var r=c[0]=0;for(n=e=0;n<o.length;++n){var u=o[n];t.ext_disjoint_timer_query.getQueryObjectEXT(u,34919)?(r+=t.ext_disjoint_timer_query.getQueryObjectEXT(u,34918),i.push(u)):o[e++]=u,l[n+1]=r,c[n+1]=e}for(o.length=e,n=e=0;n<s.length;++n){var h=(r=s[n]).startQueryIndex;u=r.endQueryIndex,r.sum+=l[u]-l[h],h=c[h],(u=c[u])===h?(r.stats.gpuTime+=r.sum/1e6,a.push(r)):(r.startQueryIndex=h,r.endQueryIndex=u,s[e++]=r)}s.length=e}},getNumPendingQueries:function(){return o.length},clear:function(){i.push.apply(i,o);for(var e=0;e<i.length;e++)t.ext_disjoint_timer_query.deleteQueryEXT(i[e]);o.length=0,i.length=0},restore:function(){o.length=0,i.length=0}}}(0,x),A=W(),k=p.drawingBufferWidth,T=p.drawingBufferHeight,C={tick:0,time:0,viewportWidth:k,viewportHeight:T,framebufferWidth:k,framebufferHeight:T,drawingBufferWidth:k,drawingBufferHeight:T,pixelRatio:e.pixelRatio},D=(k={elements:null,primitive:4,count:-1,offset:0,instances:-1},Y(p,x)),I=g(p,_,e,(function(e){return P.destroyBuffer(e)})),R=m(p,x,I,_),P=M(p,x,D,_,I,R,k),N=O(p,b,_,e),z=S(p,x,D,(function(){q.procs.poll()}),C,_,e),F=_e(p,x,0,_,e),B=E(p,x,D,z,F,_),q=j(p,b,x,D,I,R,0,B,{},P,N,k,C,w,e),G=(b=L(p,B,q.procs.poll,C),q.next),X=p.canvas,Z=[],K=[],J=[],Q=[e.onDestroy],ee=null;X&&(X.addEventListener("webglcontextlost",i,!1),X.addEventListener("webglcontextrestored",a,!1));var te=B.setFBO=s({framebuffer:H.define.call(null,1,"framebuffer")});return d(),v=V(s,{clear:function(e){if("framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var t=0;6>t;++t)te(V({framebuffer:e.framebuffer.faces[t]},e),l);else te(e,l);else l(0,e)},prop:H.define.bind(null,1),context:H.define.bind(null,2),this:H.define.bind(null,3),draw:s({}),buffer:function(e){return I.create(e,34962,!1,!1)},elements:function(e){return R.create(e,!1)},texture:z.create2D,cube:z.createCube,renderbuffer:F.create,framebuffer:B.create,framebufferCube:B.createCube,vao:P.createVAO,attributes:v,frame:c,on:function(e,t){var n;switch(e){case"frame":return c(t);case"lost":n=K;break;case"restore":n=J;break;case"destroy":n=Q}return n.push(t),{cancel:function(){for(var e=0;e<n.length;++e)if(n[e]===t){n[e]=n[n.length-1],n.pop();break}}}},limits:D,hasExtension:function(e){return 0<=D.extensions.indexOf(e.toLowerCase())},read:b,destroy:function(){Z.length=0,r(),X&&(X.removeEventListener("webglcontextlost",i),X.removeEventListener("webglcontextrestored",a)),N.clear(),B.clear(),F.clear(),P.clear(),z.clear(),R.clear(),I.clear(),w&&w.clear(),Q.forEach((function(e){e()}))},_gl:p,_refresh:d,poll:function(){h(),w&&w.update()},now:f,stats:_}),e.onDone(null,v),v}},"object"==typeof n&&void 0!==t?t.exports=r():this.createREGL=r()},{}],284:[function(e,t,n){var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:85}],285:[function(e,t,n){t.exports=i;var r=e("events").EventEmitter;function i(){r.call(this)}e("inherits")(i,r),i.Readable=e("readable-stream/lib/_stream_readable.js"),i.Writable=e("readable-stream/lib/_stream_writable.js"),i.Duplex=e("readable-stream/lib/_stream_duplex.js"),i.Transform=e("readable-stream/lib/_stream_transform.js"),i.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},{events:84,inherits:231,"readable-stream/lib/_stream_duplex.js":287,"readable-stream/lib/_stream_passthrough.js":288,"readable-stream/lib/_stream_readable.js":289,"readable-stream/lib/_stream_transform.js":290,"readable-stream/lib/_stream_writable.js":291,"readable-stream/lib/internal/streams/end-of-stream.js":295,"readable-stream/lib/internal/streams/pipeline.js":297}],286:[function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){function n(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return i=e,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n;var r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],287:[function(e,t,n){(function(n){(function(){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var i=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(c,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var l=a[s];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":289,"./_stream_writable":291,_process:277,inherits:231}],288:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e("inherits")(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":290,inherits:231}],289:[function(e,t,r){(function(n,r){(function(){"use strict";var i;t.exports=T,T.ReadableState=k,e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),s=e("buffer").Buffer,l=r.Uint8Array||function(){};var c,u=e("util");c=u&&u.debuglog?u.debuglog("stream"):function(){};var h,d,f,p=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,x=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(T,a);var w=g.errorOrDestroy,A=["error","close","destroy","pause","resume"];function k(t,n,r){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=n instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||e("./_stream_duplex"),!(this instanceof T))return new T(t);var n=this instanceof i;this._readableState=new k(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function S(e,t,n,r,i){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,L(e)))}}(e,a);else if(i||(o=function(e,t){var n;return r=t,s.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n;var r}(a,t)),o)w(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?w(e,new x):E(e,a,t,!0);else if(a.ended)w(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):D(e,a)):E(e,a,t,!1)}else r||(a.reading=!1,D(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),D(e,t)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(e,t){t(e)},T.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),S(this,e,t,!1,n)},T.prototype.unshift=function(e){return S(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var n=new h(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(L,e))}function L(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function D(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(c("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){c("readable nexttick read 0"),e.read(0)}function N(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function B(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}T.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):O(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&B(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(n,t))),null===(r=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&B(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){w(this,new _("_read()"))},T.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=t&&!1===t.end||e===n.stdout||e===n.stderr?m:l;function s(t,n){c("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",s),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",d),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){c("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,z(e))}}(r);e.on("drain",u);var h=!1;function d(t){c("ondata");var n=e.write(t);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function f(t){c("onerror",t),m(),e.removeListener("error",f),0===o(e,"error")&&w(e,t)}function p(){e.removeListener("finish",g),m()}function g(){c("onfinish"),e.removeListener("close",p),m()}function m(){c("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",p),e.once("finish",g),e.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},T.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(R,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<A.length;o++)e.on(A[o],this.emit.bind(this,A[o]));return this._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=F,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,n){return void 0===f&&(f=e("./internal/streams/from")),f(T,t,n)})}).call(this)}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/async_iterator":292,"./internal/streams/buffer_list":293,"./internal/streams/destroy":294,"./internal/streams/from":296,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,events:84,inherits:231,"string_decoder/":300,util:83}],290:[function(e,t,n){"use strict";t.exports=u;var r=e("../errors").codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":286,"./_stream_duplex":287,inherits:231}],291:[function(e,t,r){(function(n,r){(function(){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=T,T.WritableState=k;var a={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),l=e("buffer").Buffer,c=r.Uint8Array||function(){};var u,h=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,p=f.ERR_INVALID_ARG_TYPE,g=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,_=f.ERR_STREAM_WRITE_AFTER_END,x=f.ERR_UNKNOWN_ENCODING,w=h.errorOrDestroy;function A(){}function k(t,r,a){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof a&&(a=r instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(D,e,t),e._writableState.errorEmitted=!0,w(e,i)):(o(i),e._writableState.errorEmitted=!0,w(e,i),D(e,t))}(e,r,i,t,o);else{var a=O(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),i?n.nextTick(C,e,r,a,o):C(e,r,a,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var n=this instanceof(o=o||e("./_stream_duplex"));if(!n&&!u.call(T,this))return new T(t);this._writableState=new k(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function S(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,s,r,i,o);return c}function E(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function C(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),D(e,t)}function M(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)o[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;o.allBuffers=l,E(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,h=n.callback;if(E(e,t,!1,t.objectMode?1:c.length,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function L(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),D(e,t)}))}function D(e,t){var r=O(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(L,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}e("inherits")(T,s),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===T&&e&&e._writableState instanceof k}})):u=function(e){return e instanceof this},T.prototype.pipe=function(){w(this,new v)},T.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,l.isBuffer(i)||i instanceof c);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=A),o.ending?function(e,t){var r=new _;w(e,r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o;return null===r?o=new b:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(w(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=S(this,o,s,e,t,r)),a},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,n){n(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,D(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/destroy":294,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,inherits:231,"util-deprecate":330}],292:[function(e,t,n){(function(n){(function(){"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=e("./end-of-stream"),a=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[u]=null,e[a]=null,e[s]=null,t(f(n,!1)))}}function g(e){n.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[l]?r(e[l]):t(f(void 0,!0))}))}));var r,i=this[u];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[h](n,r)}),r)}}(i,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));r=new Promise(this[h])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,n=Object.create(v,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[u]=null,n[a]=null,n[s]=null,e(f(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[u]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[u]=null,n[a]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[a];null!==r&&(n[u]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",g.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":295,_process:277}],293:[function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("buffer").Buffer,s=e("util").inspect,l=s&&s.custom||"inspect";t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),n=this.head,r=0;n;)i=n.data,o=t,s=r,a.prototype.copy.call(i,o,s),r+=n.data.length,n=n.next;var i,o,s;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],n&&o(t.prototype,n),c&&o(t,c),e;var t,n,c}()},{buffer:85,util:83}],294:[function(e,t,n){(function(e){(function(){"use strict";function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:277}],295:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,a||o.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,h=!0,s||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return a&&!h?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},g=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",p),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",d),t.on("finish",u),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},{"../../../errors":286}],296:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],297:[function(e,t,n){"use strict";var r;var i=e("../../../errors").codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(t,n,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=e("./end-of-stream")),r(t,{readable:n,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(e){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}t.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,n){var o=n<t.length-1;return l(e,o,n>0,(function(e){r||(r=e),e&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return t.reduce(u)}},{"../../../errors":286,"./end-of-stream":295}],298:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{"../../../errors":286}],299:[function(e,t,n){t.exports=e("events").EventEmitter},{events:84}],300:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,""}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":284}],301:[function(e,t,n){(function(n,r){(function(){var n=e("assert"),i=e("debug")("stream-parser");t.exports=function(e){var t=e&&"function"==typeof e._transform,n=e&&"function"==typeof e._write;if(!t&&!n)throw new Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),e._bytes=a,e._skipBytes=s,t&&(e._passthrough=l),t?e._transform=u:e._write=c};function o(e){i("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){n(!this._parserCallback,'there is already a "callback" set!'),n(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||o(this),i("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function s(e,t){n(!this._parserCallback,'there is already a "callback" set!'),n(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||o(this),i("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function l(e,t){n(!this._parserCallback,'There is already a "callback" set!'),n(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||o(this),i("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function c(e,t,n){this._parserInit||o(this),i("write(%o bytes)",e.length),"function"==typeof t&&(n=t),d(this,e,null,n)}function u(e,t,n){this._parserInit||o(this),i("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),d(this,e,t,n)}function h(e,t,n,o){if(e._parserBytesLeft-=t.length,i("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&n(t),0!==e._parserBytesLeft)return o;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=r.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var s=[];t&&s.push(t),n&&s.push(n);var l=a.length>s.length;l&&s.push(f(o));var c=a.apply(e,s);if(!l||o===c)return o}}var d=f((function e(t,n,r,i){return t._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):n.length<=t._parserBytesLeft?function(){return h(t,n,r,i)}:function(){var o=n.slice(0,t._parserBytesLeft);return h(t,o,r,(function(a){return a?i(a):n.length>o.length?function(){return e(t,n.slice(o.length),r,i)}:void 0}))}}));function f(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(e,t,n){(function(r){(function(){function i(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(n=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=i,n.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(i())}).call(this)}).call(this,e("_process"))},{"./debug":303,_process:277}],303:[function(e,t,n){var r;function i(e){function t(){if(t.enabled){var e=t,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var l=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(t,r){if("%%"===t)return t;l++;var i=n.formatters[r];if("function"==typeof i){var o=a[l];t=i.call(e,o),a.splice(l,1),l--}return t})),n.formatArgs.call(e,a),(t.log||n.log||console.log.bind(console)).apply(e,a)}}return t.namespace=e,t.enabled=n.enabled(e),t.useColors=n.useColors(),t.color=function(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}(e),"function"==typeof n.init&&n.init(t),t}(n=t.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e),n.names=[],n.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={}},{ms:304}],304:[function(e,t,n){var r=1e3,i=60*r,o=60*i,a=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}t.exports=function(e,t){t=t||{};var n,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===l&&!1===isNaN(e))return t.long?s(n=e,a,"day")||s(n,o,"hour")||s(n,i,"minute")||s(n,r,"second")||n+" ms":function(e){return e>=a?Math.round(e/a)+"d":e>=o?Math.round(e/o)+"h":e>=i?Math.round(e/i)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],305:[function(e,t,n){"use strict";var r=e("parenthesis");t.exports=function(e,t,n){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");n?("string"==typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","",""]:("string"==typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var i=r.parse(e,{flat:!0,brackets:n.ignore}),o=i[0].split(t);if(n.escape){for(var a=[],s=0;s<o.length;s++){var l=o[s],c=o[s+1];"\\"===l[l.length-1]&&"\\"!==l[l.length-2]?(a.push(l+t+c),s++):a.push(l)}o=a}for(s=0;s<o.length;s++)i[0]=o[s],o[s]=r.stringify(i,{flat:!0});return o}},{parenthesis:248}],306:[function(e,t,n){"use strict";t.exports=function(e){for(var t=e.length,n=new Array(t),r=new Array(t),i=new Array(t),o=new Array(t),a=new Array(t),s=new Array(t),l=0;l<t;++l)n[l]=-1,r[l]=0,i[l]=!1,o[l]=0,a[l]=-1,s[l]=[];var c,u=0,h=[],d=[];function f(t){var l=[t],c=[t];for(n[t]=r[t]=u,i[t]=!0,u+=1;c.length>0;){t=c[c.length-1];var f=e[t];if(o[t]<f.length){for(var p=o[t];p<f.length;++p){var g=f[p];if(n[g]<0){n[g]=r[g]=u,i[g]=!0,u+=1,l.push(g),c.push(g);break}i[g]&&(r[t]=0|Math.min(r[t],r[g])),a[g]>=0&&s[t].push(a[g])}o[t]=p}else{if(r[t]===n[t]){var m=[],v=[],y=0;for(p=l.length-1;p>=0;--p){var b=l[p];if(i[b]=!1,m.push(b),v.push(s[b]),y+=s[b].length,a[b]=h.length,b===t){l.length=p;break}}h.push(m);var _=new Array(y);for(p=0;p<v.length;p++)for(var x=0;x<v[p].length;x++)_[--y]=v[p][x];d.push(_)}c.pop()}}}for(l=0;l<t;++l)n[l]<0&&f(l);for(l=0;l<d.length;l++){var p=d[l];if(0!==p.length){p.sort((function(e,t){return e-t})),c=[p[0]];for(var g=1;g<p.length;g++)p[g]!==p[g-1]&&c.push(p[g]);d[l]=c}}return{components:h,adjacencyList:d}}},{}],307:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=2*Math.PI,o=function(e,t,n,r,i,o,a){var s=e.x,l=e.y;return{x:r*(s*=t)-i*(l*=n)+o,y:i*s+r*l+a}},a=function(e,t){var n=1.5707963267948966===t?.551915024494:-1.5707963267948966===t?-.551915024494:4/3*Math.tan(t/4),r=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[{x:r-i*n,y:i+r*n},{x:o+a*n,y:a-o*n},{x:o,y:a}]},s=function(e,t,n,r){var i=e*n+t*r;return i>1&&(i=1),i<-1&&(i=-1),(e*r-t*n<0?-1:1)*Math.acos(i)};n.default=function(e){var t=e.px,n=e.py,l=e.cx,c=e.cy,u=e.rx,h=e.ry,d=e.xAxisRotation,f=void 0===d?0:d,p=e.largeArcFlag,g=void 0===p?0:p,m=e.sweepFlag,v=void 0===m?0:m,y=[];if(0===u||0===h)return[];var b=Math.sin(f*i/360),_=Math.cos(f*i/360),x=_*(t-l)/2+b*(n-c)/2,w=-b*(t-l)/2+_*(n-c)/2;if(0===x&&0===w)return[];u=Math.abs(u),h=Math.abs(h);var A=Math.pow(x,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(h,2);A>1&&(u*=Math.sqrt(A),h*=Math.sqrt(A));var k=function(e,t,n,r,o,a,l,c,u,h,d,f){var p=Math.pow(o,2),g=Math.pow(a,2),m=Math.pow(d,2),v=Math.pow(f,2),y=p*g-p*v-g*m;y<0&&(y=0),y/=p*v+g*m;var b=(y=Math.sqrt(y)*(l===c?-1:1))*o/a*f,_=y*-a/o*d,x=h*b-u*_+(e+n)/2,w=u*b+h*_+(t+r)/2,A=(d-b)/o,k=(f-_)/a,T=(-d-b)/o,S=(-f-_)/a,E=s(1,0,A,k),C=s(A,k,T,S);return 0===c&&C>0&&(C-=i),1===c&&C<0&&(C+=i),[x,w,E,C]}(t,n,l,c,u,h,g,v,b,_,x,w),T=r(k,4),S=T[0],E=T[1],C=T[2],M=T[3],O=Math.abs(M)/(i/4);Math.abs(1-O)<1e-7&&(O=1);var L=Math.max(Math.ceil(O),1);M/=L;for(var D=0;D<L;D++)y.push(a(C,M)),C+=M;return y.map((function(e){var t=o(e[0],u,h,_,b,S,E),n=t.x,r=t.y,i=o(e[1],u,h,_,b,S,E),a=i.x,s=i.y,l=o(e[2],u,h,_,b,S,E);return{x1:n,y1:r,x2:a,y2:s,x:l.x,y:l.y}}))},t.exports=n.default},{}],308:[function(e,t,n){"use strict";var r=e("parse-svg-path"),i=e("abs-svg-path"),o=e("normalize-svg-path"),a=e("is-svg-path"),s=e("assert");t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e&&(s(a(e),"String is not an SVG path."),e=r(e)),s(Array.isArray(e),"Argument should be a string or an array of path segments."),e=i(e),!(e=o(e)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,l=e.length;n<l;n++)for(var c=e[n].slice(1),u=0;u<c.length;u+=2)c[u+0]<t[0]&&(t[0]=c[u+0]),c[u+1]<t[1]&&(t[1]=c[u+1]),c[u+0]>t[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":309,"parse-svg-path":250}],309:[function(e,t,n){"use strict";t.exports=function(e){for(var t,n=[],a=0,s=0,l=0,c=0,u=null,h=null,d=0,f=0,p=0,g=e.length;p<g;p++){var m=e[p],v=m[0];switch(v){case"M":l=m[1],c=m[2];break;case"A":var y=r({px:d,py:f,cx:m[6],cy:m[7],rx:m[1],ry:m[2],xAxisRotation:m[3],largeArcFlag:m[4],sweepFlag:m[5]});if(!y.length)continue;for(var b,_=0;_<y.length;_++)m=["C",(b=y[_]).x1,b.y1,b.x2,b.y2,b.x,b.y],_<y.length-1&&n.push(m);break;case"S":var x=d,w=f;"C"!=t&&"S"!=t||(x+=x-a,w+=w-s),m=["C",x,w,m[1],m[2],m[3],m[4]];break;case"T":"Q"==t||"T"==t?(u=2*d-u,h=2*f-h):(u=d,h=f),m=o(d,f,u,h,m[1],m[2]);break;case"Q":u=m[1],h=m[2],m=o(d,f,m[1],m[2],m[3],m[4]);break;case"L":m=i(d,f,m[1],m[2]);break;case"H":m=i(d,f,m[1],f);break;case"V":m=i(d,f,d,m[1]);break;case"Z":m=i(d,f,l,c)}t=v,d=m[m.length-2],f=m[m.length-1],m.length>4?(a=m[m.length-4],s=m[m.length-3]):(a=d,s=f),n.push(m)}return n};var r=e("svg-arc-to-cubic-bezier");function i(e,t,n,r){return["C",e,t,n,r,n,r]}function o(e,t,n,r,i,o){return["C",e/3+2/3*n,t/3+2/3*r,i/3+2/3*n,o/3+2/3*r,i,o]}},{"svg-arc-to-cubic-bezier":307}],310:[function(e,t,n){"use strict";var r,i=e("svg-path-bounds"),o=e("parse-svg-path"),a=e("draw-svg-path"),s=e("is-svg-path"),l=e("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");t.exports=function(e,t){if(!s(e))throw Error("Argument should be valid svg path string");var n,h;t||(t={}),t.shape?(n=t.shape[0],h=t.shape[1]):(n=c.width=t.w||t.width||200,h=c.height=t.h||t.height||200);var d=Math.min(n,h),f=t.stroke||0,p=t.viewbox||t.viewBox||i(e),g=[n/(p[2]-p[0]),h/(p[3]-p[1])],m=Math.min(g[0]||0,g[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,n,h),u.fillStyle="white",f&&("number"!=typeof f&&(f=1),u.strokeStyle=f>0?"white":"black",u.lineWidth=Math.abs(f)),u.translate(.5*n,.5*h),u.scale(m,m),function(){if(null!=r)return r;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var n=e.getImageData(0,0,1,1);return r=n&&n.data&&255===n.data[3]}()){var v=new Path2D(e);u.fill(v),f&&u.stroke(v)}else{var y=o(e);a(u,y),u.fill(),f&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*d})}},{"bitmap-sdf":82,"draw-svg-path":126,"is-svg-path":238,"parse-svg-path":250,"svg-path-bounds":308}],311:[function(e,t,n){(function(t,r){(function(){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":277,timers:311}],312:[function(e,t,n){!function(e){var n=/^\s+/,r=/\s+$/,i=0,o=e.round,a=e.min,s=e.max,l=e.random;function c(t,l){if(l=l||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,l);var u=function(t){var i={r:0,g:0,b:0},o=1,l=null,c=null,u=null,h=!1,d=!1;return"string"==typeof t&&(t=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,i=!1;if(E[e])e=E[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=j.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=j.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=j.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=j.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=j.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=j.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=j.hex8.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:N(t[4]),format:i?"name":"hex8"}:(t=j.hex6.exec(e))?{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:i?"name":"hex"}:(t=j.hex4.exec(e))?{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:i?"name":"hex8"}:!!(t=j.hex3.exec(e))&&{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:i?"name":"hex"}}(t)),"object"==typeof t&&(U(t.r)&&U(t.g)&&U(t.b)?(f=t.r,p=t.g,g=t.b,i={r:255*O(f,255),g:255*O(p,255),b:255*O(g,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):U(t.h)&&U(t.s)&&U(t.v)?(l=R(t.s),c=R(t.v),i=function(t,n,r){t=6*O(t,360),n=O(n,100),r=O(r,100);var i=e.floor(t),o=t-i,a=r*(1-n),s=r*(1-o*n),l=r*(1-(1-o)*n),c=i%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c]}}(t.h,l,c),h=!0,d="hsv"):U(t.h)&&U(t.s)&&U(t.l)&&(l=R(t.s),u=R(t.l),i=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=O(e,360),t=O(t,100),n=O(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,l,u),h=!0,d="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=M(o),{ok:h,format:t.format||d,r:a(255,s(i.r,0)),g:a(255,s(i.g,0)),b:a(255,s(i.b,0)),a:o};var f,p,g}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=o(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=u.ok,this._tc_id=i++}function u(e,t,n){e=O(e,255),t=O(t,255),n=O(n,255);var r,i,o=s(e,t,n),l=a(e,t,n),c=(o+l)/2;if(o==l)r=i=0;else{var u=o-l;switch(i=c>.5?u/(2-o-l):u/(o+l),o){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,l:c}}function h(e,t,n){e=O(e,255),t=O(t,255),n=O(n,255);var r,i,o=s(e,t,n),l=a(e,t,n),c=o,u=o-l;if(i=0===o?0:u/o,o==l)r=0;else{switch(o){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,v:c}}function d(e,t,n,r){var i=[I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f(e,t,n,r){return[I(P(r)),I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16))].join("")}function p(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=L(n.s),c(n)}function g(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=L(n.s),c(n)}function m(e){return c(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=L(n.l),c(n)}function y(e,t){t=0===t?0:t||10;var n=c(e).toRgb();return n.r=s(0,a(255,n.r-o(-t/100*255))),n.g=s(0,a(255,n.g-o(-t/100*255))),n.b=s(0,a(255,n.b-o(-t/100*255))),c(n)}function b(e,t){t=0===t?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=L(n.l),c(n)}function _(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function x(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function w(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+120)%360,s:t.s,l:t.l}),c({h:(n+240)%360,s:t.s,l:t.l})]}function A(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+90)%360,s:t.s,l:t.l}),c({h:(n+180)%360,s:t.s,l:t.l}),c({h:(n+270)%360,s:t.s,l:t.l})]}function k(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function T(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),i=360/n,o=[c(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(c(r));return o}function S(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(c({h:r,s:i,v:o})),o=(o+s)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,n,r,i=this.toRgb();return t=i.r/255,n=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=o(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return d(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16)),I(P(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*O(this._r,255))+"%",g:o(100*O(this._g,255))+"%",b:o(100*O(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*O(this._r,255))+"%, "+o(100*O(this._g,255))+"%, "+o(100*O(this._b,255))+"%)":"rgba("+o(100*O(this._r,255))+"%, "+o(100*O(this._g,255))+"%, "+o(100*O(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+f(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=c(e);n="#"+f(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(e,t,n){n=0===n?0:n||50;var r=c(e).toRgb(),i=c(t).toRgb(),o=n/100;return c({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},c.readability=function(t,n){var r=c(t),i=c(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(e,t,n){var r,i,o,a,s,l=c.readability(e,t);switch(i=!1,(o=n,"AA"!==(a=((o=o||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(o.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},c.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=c.readability(e,t[u]))>l&&(l=r,s=c(t[u]));return c.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var E=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},C=c.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(E);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function O(t,n){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=a(n,s(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function L(e){return a(1,s(0,e))}function D(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function P(t){return e.round(255*parseFloat(t)).toString(16)}function N(e){return D(e)/255}var z,F,B,j=(F="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",B="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+F),rgba:new RegExp("rgba"+B),hsl:new RegExp("hsl"+F),hsla:new RegExp("hsla"+B),hsv:new RegExp("hsv"+F),hsva:new RegExp("hsva"+B),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!j.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)},{}],313:[function(e,t,n){"use strict";t.exports=i,t.exports.float32=t.exports.float=i,t.exports.fract32=t.exports.fract=function(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=i(e));for(var n=0,r=t.length;n<r;n++)t[n]=e[n]-t[n];return t}return i(e-i(e))};var r=new Float32Array(1);function i(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(r[0]=e,r[0])}},{}],314:[function(e,t,n){"use strict";var r=e("parse-unit");t.exports=o;function i(e,t){var n=r(getComputedStyle(e).getPropertyValue(t));return n[0]*o(n[1],e)}function o(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),t!==window&&t!==document||(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=i(n,"font-size")/128;return t.removeChild(n),r}(e,t);case"em":return i(t,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}},{"parse-unit":251}],315:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function t(e){return e}function n(e){if(null==e)return t;var n,r,i=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(n=r=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(n+=e[0])*i+a,u[1]=(r+=e[1])*o+s;l<c;)u[l]=e[l],++l;return u}}function r(e){var t,r=n(e.transform),i=1/0,o=i,a=-i,s=-i;function l(e){(e=r(e))[0]<i&&(i=e[0]),e[0]>a&&(a=e[0]),e[1]<o&&(o=e[1]),e[1]>s&&(s=e[1])}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,n=-1,l=e.length;++n<l;)(t=r(e[n],n))[0]<i&&(i=t[0]),t[0]>a&&(a=t[0]),t[1]<o&&(o=t[1]),t[1]>s&&(s=t[1])})),e.objects)c(e.objects[t]);return[i,o,a,s]}function i(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=o(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function o(e,t){var r=n(e.transform),i=e.arcs;function o(e,t){t.length&&t.pop();for(var n=i[e<0?~e:e],o=0,a=n.length;o<a;++o)t.push(r(n[o],o));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,a)}function a(e){return r(e)}function s(e){for(var t=[],n=0,r=e.length;n<r;++n)o(e[n],t);return t.length<2&&t.push(t[0]),t}function l(e){for(var t=s(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(l)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=a(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(a);break;case"LineString":n=s(t.arcs);break;case"MultiLineString":n=t.arcs.map(s);break;case"Polygon":n=c(t.arcs);break;case"MultiPolygon":n=t.arcs.map(c);break;default:return null}return{type:r,coordinates:n}}(t)}function a(e,t){var n={},r={},i={},o=[],a=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),o.push(i)}}return t.forEach((function(n,r){var i,o=e.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=t[++a],t[a]=n,t[r]=i)})),t.forEach((function(t){var n,o,a=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),s=a[0],l=a[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,o=r[l]){delete r[o.start];var c=o===n?n:n.concat(o);r[c.start=n.start]=i[c.end=o.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,o=i[s]){delete i[o.end];var u=o===n?n:o.concat(n);r[u.start=o.start]=i[u.end=n.end]=u}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||o.push([e])})),o}function s(e,t,n){var r,i,o;if(arguments.length>1)r=l(0,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:a(e,r)}}function l(e,t,n){var r,i=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:r})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),o.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}function c(e,t){var n={},r=[],i=[];function s(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),r.push(e)}function l(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],o=0;++n<r;)t=i,i=e[n],o+=t[0]*i[1]-t[1]*i[0];return Math.abs(o)}(o(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,i.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var r,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].length<2&&i.push(e)}))}))})),(r=(i=a(e,i)).length)>1)for(var o,s,c=1,u=l(i[0]);c<r;++c)(o=l(i[c]))>u&&(s=i[0],i[0]=i[c],i[c]=s,u=o);return i})).filter((function(e){return e.length>0}))}}function u(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function h(e){if(null==e)return t;var n,r,i=e.scale[0],o=e.scale[1],a=e.translate[0],s=e.translate[1];return function(e,t){t||(n=r=0);var l=2,c=e.length,u=new Array(c),h=Math.round((e[0]-a)/i),d=Math.round((e[1]-s)/o);for(u[0]=h-n,n=h,u[1]=d-r,r=d;l<c;)u[l]=e[l],++l;return u}}e.bbox=r,e.feature=function(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return i(e,t)}))}:i(e,t)},e.merge=function(e){return o(e,c.apply(this,arguments))},e.mergeArcs=c,e.mesh=function(e){return o(e,s.apply(this,arguments))},e.meshArcs=s,e.neighbors=function(e){var t={},n=e.map((function(){return[]}));function r(e,n){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(n):t[e]=[n]}))}function i(e,t){e.forEach((function(e){r(e,t)}))}var o={LineString:r,MultiLineString:i,Polygon:i,MultiPolygon:function(e,t){e.forEach((function(e){i(e,t)}))}};for(var a in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in o&&o[t.type](t.arcs,n)})),t)for(var s=t[a],l=s.length,c=0;c<l;++c)for(var h=c+1;h<l;++h){var d,f=s[c],p=s[h];(d=n[f])[a=u(d,p)]!==p&&d.splice(a,0,p),(d=n[p])[a=u(d,f)]!==f&&d.splice(a,0,f)}return n},e.quantize=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)l=e.bbox;else{if(!((n=Math.floor(t))>=2))throw new Error("n must be 2");var n,i=(l=e.bbox||r(e))[0],o=l[1],a=l[2],s=l[3];t={scale:[a-i?(a-i)/(n-1):1,s-o?(s-o)/(n-1):1],translate:[i,o]}}var l,c,u=h(t),d=e.objects,f={};function p(e){return u(e)}function g(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(g)};break;case"Point":t={type:"Point",coordinates:p(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(p)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in d)f[c]=g(d[c]);return{type:"Topology",bbox:l,transform:t,objects:f,arcs:e.arcs.map((function(e){var t,n=0,r=1,i=e.length,o=new Array(i);for(o[0]=u(e[0],0);++n<i;)((t=u(e[n],n))[0]||t[1])&&(o[r++]=t);return 1===r&&(o[r++]=[0,0]),o.length=r,o}))}},e.transform=n,e.untransform=h,Object.defineProperty(e,"__esModule",{value:!0})},i("object"==typeof n&&void 0!==t?n:(r=r||self).topojson=r.topojson||{})},{}],316:[function(e,t,n){"use strict";var r=e("../prototype/is");t.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},{"../prototype/is":323}],317:[function(e,t,n){"use strict";var r=e("../value/is"),i=e("../object/is"),o=e("../string/coerce"),a=e("./to-short-string"),s=function(e,t){return e.replace("%v",a(t))};t.exports=function(e,t,n){if(!i(n))throw new TypeError(s(t,e));if(!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var a=o(n.errorMessage);throw r(a)||(a=t),new TypeError(s(a,e))}},{"../object/is":320,"../string/coerce":324,"../value/is":326,"./to-short-string":319}],318:[function(e,t,n){"use strict";t.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},{}],319:[function(e,t,n){"use strict";var r=e("./safe-to-string"),i=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+""),t=t.replace(i,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},{"./safe-to-string":318}],320:[function(e,t,n){"use strict";var r=e("../value/is"),i={object:!0,function:!0,undefined:!0};t.exports=function(e){return!!r(e)&&hasOwnProperty.call(i,typeof e)}},{"../value/is":326}],321:[function(e,t,n){"use strict";var r=e("../lib/resolve-exception"),i=e("./is");t.exports=function(e){return i(e)?e:r(e,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":317,"./is":322}],322:[function(e,t,n){"use strict";var r=e("../function/is"),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(e){return!!r(e)&&!i.test(o.call(e))}},{"../function/is":316}],323:[function(e,t,n){"use strict";var r=e("../object/is");t.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},{"../object/is":320}],324:[function(e,t,n){"use strict";var r=e("../value/is"),i=e("../object/is"),o=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===o)return null}try{return""+e}catch(e){return null}}},{"../object/is":320,"../value/is":326}],325:[function(e,t,n){"use strict";var r=e("../lib/resolve-exception"),i=e("./is");t.exports=function(e){return i(e)?e:r(e,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":317,"./is":326}],326:[function(e,t,n){"use strict";t.exports=function(e){return null!=e}},{}],327:[function(e,t,r){(function(t){(function(){"use strict";var n=e("bit-twiddle"),i=e("dup"),o=e("buffer").Buffer;t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=t.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function d(e){if(e){var t=e.length||e.byteLength,r=n.log2(t);u[r].push(e)}}function f(e){e=n.nextPow2(e);var t=n.log2(e),r=u[t];return r.length>0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function g(e){return new Uint16Array(f(2*e),0,e)}function m(e){return new Uint32Array(f(4*e),0,e)}function v(e){return new Int8Array(f(e),0,e)}function y(e){return new Int16Array(f(2*e),0,e)}function b(e){return new Int32Array(f(4*e),0,e)}function _(e){return new Float32Array(f(4*e),0,e)}function x(e){return new Float64Array(f(8*e),0,e)}function w(e){return a?new Uint8ClampedArray(f(e),0,e):p(e)}function A(e){return s?new BigUint64Array(f(8*e),0,e):null}function k(e){return l?new BigInt64Array(f(8*e),0,e):null}function T(e){return new DataView(f(e),0,e)}function S(e){e=n.nextPow2(e);var t=n.log2(e),r=h[t];return r.length>0?r.pop():new o(e)}r.free=function(e){if(o.isBuffer(e))h[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(e){d(e.buffer)},r.freeArrayBuffer=d,r.freeBuffer=function(e){h[n.log2(e.length)].push(e)},r.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return g(e);case"uint32":return m(e);case"int8":return v(e);case"int16":return y(e);case"int32":return b(e);case"float":case"float32":return _(e);case"double":case"float64":return x(e);case"uint8_clamped":return w(e);case"bigint64":return k(e);case"biguint64":return A(e);case"buffer":return S(e);case"data":case"dataview":return T(e);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=p,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=b,r.mallocFloat32=r.mallocFloat=_,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=w,r.mallocBigUint64=A,r.mallocBigInt64=k,r.mallocDataView=T,r.mallocBuffer=S,r.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],328:[function(e,t,n){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},{}],329:[function(e,t,n){"use strict";t.exports=function(e,t,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var r=0,i=n.length;r<i;r++){var o=n[r];for(var a in o)if((void 0===t[a]||Array.isArray(t[a])||e[a]!==t[a])&&a in t){var s;if(!0===o[a])s=t[a];else{if(!1===o[a])continue;if("function"==typeof o[a]&&void 0===(s=o[a](t[a],e,t)))continue}e[a]=s}}return e}},{}],330:[function(e,t,r){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],331:[function(e,t,n){var r=e("get-canvas-context");t.exports=function(e){return r("webgl",e)}},{"get-canvas-context":194}],332:[function(e,t,n){var r=e("../main"),i=e("object-assign"),o=r.instance();function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var n=e.match(l);return n?n[0]:""}var r=this._validateYear(e),i=e.month(),o=""+this.toChineseMonth(r,i);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(r,i)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var n=this._validateYear(e),r=e.month(),i=["","","","","","","","","","","",""][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(i=""+i),i},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var n=this._validateYear(e),r=e.month(),i=["","","","","","","","","","","",""][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(i=""+i),i},parseMonth:function(e,t){e=this._validateYear(e);var n,r=parseInt(t);if(isNaN(r))""===t[0]&&(n=!0,t=t.substring(1)),""===t[t.length-1]&&(t=t.substring(0,t.length-1)),r=1+["","","","","","","","","","","",""].indexOf(t);else{var i=t[t.length-1];n="i"===i||"I"===i}return this.toMonthIndex(e,r,n)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,n){var i=this.intercalaryMonth(e);if(n&&t!==i||t<1||t>12)throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!n&&t<=i?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);if(t<0||t>(n?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?t<n?t+1:t:t+1},intercalaryMonth:function(e){return e=this._validateYear(e),h[e-h[0]]>>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);return!!n&&n===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,n){var i,a=this._validateYear(e,r.local.invalidyear),s=d[a-d[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=o.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),"d");var h=this.toJD(e,t,n)-i.toJD();return 1+Math.floor(h/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var n=h[e-h[0]];if(t>(n>>13?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-t?30:29},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,s,n,r.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),n=i.day();var a=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=function(e,t,n,r,i){var o,a,s;if("object"==typeof e)a=e,o=t||{};else{var l;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof n&&n>=1&&n<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof r?(l=!1,o=r):(l=!!r,o=i||{}),a={year:e,month:t,day:n,isIntercalary:l}}s=a.day-1;var c,u=h[a.year-h[0]],f=u>>13;c=f&&(a.month>f||a.isIntercalary)?a.month:a.month-1;for(var p=0;p<c;p++)s+=u&1<<12-p?30:29;var g=d[a.year-d[0]],m=new Date(g>>9&4095,(g>>5&15)-1,(31&g)+s);return o.year=m.getFullYear(),o.month=1+m.getMonth(),o.day=m.getDate(),o}(e,s,n,a);return o.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=o.fromJD(e),n=function(e,t,n,r){var i,o;if("object"==typeof e)i=e,o=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof n&&n>=1&&n<=31))throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:n},o=r||{}}var a=d[i.year-d[0]],s=i.year<<9|i.month<<5|i.day;o.year=s>=a?i.year:i.year-1,a=d[o.year-d[0]];var l,c=new Date(a>>9&4095,(a>>5&15)-1,31&a),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var f,p=h[o.year-h[0]];for(f=0;f<13;f++){var g=p&1<<12-f?30:29;if(l<g)break;l-=g}var m=p>>13;return!m||f<m?(o.isIntercalary=!1,o.month=1+f):f===m?(o.isIntercalary=!0,o.month=f):(o.isIntercalary=!1,o.month=f),o.day=1+l,o}(t.year(),t.month(),t.day()),r=this.toMonthIndex(n.year,n.month,n.isIntercalary);return this.newDate(n.year,r,n.day)},fromString:function(e){var t=e.match(s),n=this._validateYear(+t[1]),r=+t[2],i=!!t[3],o=this.toMonthIndex(n,r,i),a=+t[4];return this.newDate(n,o,a)},add:function(e,t,n){var r=e.year(),i=e.month(),o=this.isIntercalaryMonth(r,i),s=this.toChineseMonth(r,i),l=Object.getPrototypeOf(a.prototype).add.call(this,e,t,n);if("y"===n){var c=l.year(),u=l.month(),h=this.isIntercalaryMonth(c,s),d=o&&h?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);d!==u&&l.month(d)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,l=/^\d?\d[iI]?/m,c=/^??[]?/m,u=/^??[]?/m;r.calendars.chinese=a;var h=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],d=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":346,"object-assign":247}],333:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return(e=i.year())<0&&e++,i.day()+30*(i.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,i=t-30*(r-1)+1;return this.newDate(n,r,i)}}),r.calendars.coptic=o},{"../main":346,"object-assign":247}],334:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),400},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,n){return(this._validate(e,t,n,r.local.invalidDate).day()+1)%8},weekDay:function(e,t,n){var r=this.dayOfWeek(e,t,n);return r>=2&&r<=6},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return{century:a[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),(n=i.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var n=Math.floor(e/32)+1,r=e-32*(n-1)+1;return this.newDate(t<=0?t-1:t,n,r)}});var a={20:"Fruitbat",21:"Anchovy"};r.calendars.discworld=o},{"../main":346,"object-assign":247}],335:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return(e=i.year())<0&&e++,i.day()+30*(i.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,i=t-30*(r-1)+1;return this.newDate(n,r,i)}}),r.calendars.ethiopian=o},{"../main":346,"object-assign":247}],336:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function a(e,t){return e-t*Math.floor(e/t)}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return a(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===a(this.daysInYear(e),10)?30:9===t&&3===a(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var o=e<=0?e+1:e,a=this.jdEpoch+this._delay1(o)+this._delay2(o)+n+1;if(t<7){for(var s=7;s<=this.monthsInYear(e);s++)a+=this.daysInMonth(e,s);for(s=1;s<t;s++)a+=this.daysInMonth(e,s)}else for(s=7;s<t;s++)a+=this.daysInMonth(e,s);return a},_delay1:function(e){var t=Math.floor((235*e-234)/19),n=12084+13753*t,r=29*t+Math.floor(n/25920);return a(3*(r+1),7)<3&&r++,r},_delay2:function(e){var t=this._delay1(e-1),n=this._delay1(e);return this._delay1(e+1)-n==356?2:n-t==382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor(98496*(e-this.jdEpoch)/35975351)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var n=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,n,this.daysInMonth(t,n));)n++;var r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.hebrew=o},{"../main":346,"object-assign":247}],337:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khams","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year(),t=i.month(),e=e<=0?e+1:e,(n=i.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var n=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.islamic=o},{"../main":346,"object-assign":247}],338:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(4-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=i.year(),t=i.month(),n=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,n=Math.floor((t-122.1)/365.25),r=Math.floor(365.25*n),i=Math.floor((t-r)/30.6001),o=i-Math.floor(i<14?1:13),a=n-Math.floor(o>2?4716:4715),s=t-r-Math.floor(30.6001*i);return a<=0&&a--,this.newDate(a,o,s)}}),r.calendars.julian=o},{"../main":346,"object-assign":247}],339:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function a(e,t){return e-t*Math.floor(e/t)}function s(e,t){return a(e-1,t)+1}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n],10);if(Math.abs(r)>19||n>0&&r<0)throw"Invalid Mayan year";t=20*t+r}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),18},weekOfYear:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,r.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate).day()},weekDay:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),!0},extraInfo:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate).toJD(),o=this._toHaab(i),a=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[o[0]-1],haabMonth:o[0],haabDay:o[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(e){var t=a(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,a(t,20)]},_toTzolkin:function(e){return[s(20+(e-=this.jdEpoch),20),s(e+4,13)]},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var n=Math.floor(e/20),r=e%20;return this.newDate(t,n,r)}}),r.calendars.mayan=o},{"../main":346,"object-assign":247}],340:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar;var a=r.instance("gregorian");i(o.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidMonth);(e=i.year())<0&&e++;for(var o=i.day(),s=1;s<i.month();s++)o+=this.daysPerMonth[s-1];return o+a.toJD(e+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var n=e-Math.floor(this.toJD(t,1,1)+.5)+1,r=1;n>this.daysInMonth(t,r);)n-=this.daysInMonth(t,r),r++;return this.newDate(t,r,n)}}),r.calendars.nanakshahi=o},{"../main":346,"object-assign":247}],341:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var o=r.instance(),a=0,s=t,l=e;this._createMissingCalendarData(e);var c=e-(s>9||9===s&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==t&&(a=n,s--);9!==s;)s<=0&&(s=12,l--),a+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===t?(a+=n-this.NEPALI_CALENDAR_DATA[l][0])<0&&(a+=o.daysInYear(c)):a+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],o.newDate(c,1,1).add(a,"d").toJD()},fromJD:function(e){var t=r.instance().fromJD(e),n=t.year(),i=t.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var a=9,s=this.NEPALI_CALENDAR_DATA[o][0],l=this.NEPALI_CALENDAR_DATA[o][a]-s+1;i>l;)++a>12&&(a=1,o++),l+=this.NEPALI_CALENDAR_DATA[o][a];var c=this.NEPALI_CALENDAR_DATA[o][a]-(l-i);return this.newDate(o,a,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var n=e-1;n<e+2;n++)void 0===this.NEPALI_CALENDAR_DATA[n]&&(this.NEPALI_CALENDAR_DATA[n]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),r.calendars.nepali=o},{"../main":346,"object-assign":247}],342:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function a(e,t){return e-t*Math.floor(e/t)}o.prototype=new r.baseCalendar,i(o.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return 682*((t.year()-(t.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-(r.dayOfWeek()+1)%7,"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);e=i.year(),t=i.month(),n=i.day();var o=e-(e>=0?474:473),s=474+a(o,2820);return n+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),n=Math.floor(t/1029983),r=a(t,1029983),i=2820;if(1029982!==r){var o=Math.floor(r/366),s=a(r,366);i=Math.floor((2134*o+2816*s+2815)/1028522)+o+1}var l=i+2820*n+474;l=l<=0?l-1:l;var c=e-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),h=e-this.toJD(l,u,1)+1;return this.newDate(l,u,h)}}),r.calendars.persian=o,r.calendars.jalali=o},{"../main":346,"object-assign":247}],343:[function(e,t,n){var r=e("../main"),i=e("object-assign"),o=r.instance();function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(t.year()),o.leapYear(e)},weekOfYear:function(e,t,n){var i=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(i.year()),o.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=this._t2gYear(i.year()),o.toJD(e,i.month(),i.day())},fromJD:function(e){var t=o.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),r.calendars.taiwan=a},{"../main":346,"object-assign":247}],344:[function(e,t,n){var r=e("../main"),i=e("object-assign"),o=r.instance();function a(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a.prototype=new r.baseCalendar,i(a.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(t.year()),o.leapYear(e)},weekOfYear:function(e,t,n){var i=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(i.year()),o.weekOfYear(e,i.month(),i.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate);return e=this._t2gYear(i.year()),o.toJD(e,i.month(),i.day())},fromJD:function(e){var t=o.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),r.calendars.thai=a},{"../main":346,"object-assign":247}],345:[function(e,t,n){var r=e("../main"),i=e("object-assign");function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,i(o.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalth","Yawm al-Arba","Yawm al-Khams","Yawm al-Juma","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,n=1;n<=12;n++)t+=this.daysInMonth(e,n);return t},daysInMonth:function(e,t){for(var n=this._validate(e,t,this.minDay,r.local.invalidMonth).toJD()-24e5+.5,i=0,o=0;o<a.length;o++){if(a[o]>n)return a[i]-a[i-1];i++}return 30},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var i=this._validate(e,t,n,r.local.invalidDate),o=12*(i.year()-1)+i.month()-15292;return i.day()+a[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,n=0,r=0;r<a.length&&!(a[r]>t);r++)n++;var i=n+15292,o=Math.floor((i-1)/12),s=o+1,l=i-12*o,c=t-a[n-1]+1;return this.newDate(s,l,c)},isValid:function(e,t,n){var i=r.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(e=null!=e.year?e.year:e)>=1276&&e<=1500),i},_validate:function(e,t,n,i){var o=r.baseCalendar.prototype._validate.apply(this,arguments);if(o.year<1276||o.year>1500)throw i.replace(/\{0\}/,this.local.name);return o}}),r.calendars.ummalqura=o;var a=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":346,"object-assign":247}],346:[function(e,t,n){var r=e("object-assign");function i(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function o(e,t,n,r){if(this._calendar=e,this._year=t,this._month=n,this._day=r,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function s(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(i.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var n=this._localCals[e+"-"+t];if(!n&&this.calendars[e]&&(n=new this.calendars[e](t),this._localCals[e+"-"+t]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return n},newDate:function(e,t,n,r,i){return(r=(null!=e&&e.year?e.calendar():"string"==typeof r?this.instance(r,i):r)||this.instance()).newDate(e,t,n)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(n){for(var r="",i=0;n>0;){var o=n%10;r=(0===o?"":e[o]+t[i])+r,i++,n=Math.floor(n/10)}return 0===r.indexOf(e[1]+t[1])&&(r=r.substr(1)),r||e[0]}}}),r(o.prototype,{newDate:function(e,t,n){return this._calendar.newDate(null==e?this:e,t,n)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,n){if(!this._calendar.isValid(e,t,n))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(s.prototype,{_validateLevel:0,newDate:function(e,t,n){return null==e?this.today():(e.year&&(this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),n=e.day(),t=e.month(),e=e.year()),new o(this,e,t,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var n=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(e,t){var n=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,n,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),n},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);return r.toJD()-this.newDate(r.year(),this.fromMonthOfYear(r.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(r))+2)%this.daysInWeek()},extraInfo:function(e,t,n){return this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,n){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,n),t,n)},_add:function(e,t,n){if(this._validateLevel++,"d"===n||"w"===n){var r=e.toJD()+t*("w"===n?this.daysInWeek():1),i=e.calendar().fromJD(r);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var o=e.year()+("y"===n?t:0),a=e.monthOfYear()+("m"===n?t:0),s=(i=e.day(),function(e){for(;a<e.minMonth;)o--,a+=e.monthsInYear(o);for(var t=e.monthsInYear(o);a>t-1+e.minMonth;)o++,a-=t,t=e.monthsInYear(o)});"y"===n?(e.month()!==this.fromMonthOfYear(o,a)&&(a=this.newDate(o,e.month(),this.minDay).monthOfYear()),a=Math.min(a,this.monthsInYear(o)),i=Math.min(i,this.daysInMonth(o,this.fromMonthOfYear(o,a)))):"m"===n&&(s(this),i=Math.min(i,this.daysInMonth(o,this.fromMonthOfYear(o,a))));var l=[o,this.fromMonthOfYear(o,a),i];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,n,r){if(!(this.hasYearZero||"y"!==r&&"m"!==r||0!==t[0]&&e.year()>0==t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[r],o=n<0?-1:1;t=this._add(e,n*i[0]+o*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,n){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var r="y"===n?t:e.year(),i="m"===n?t:e.month(),o="d"===n?t:e.day();return"y"!==n&&"m"!==n||(o=Math.min(o,this.daysInMonth(r,i))),e.date(r,i,o)},isValid:function(e,t,n){this._validateLevel++;var r=this.hasYearZero||0!==e;if(r){var i=this.newDate(e,t,this.minDay);r=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(i)&&n>=this.minDay&&n-this.minDay<this.daysInMonth(i)}return this._validateLevel--,r},toJSDate:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);return c.instance().fromJD(this.toJD(r)).toJSDate()},fromJSDate:function(e){return this.fromJD(c.instance().fromJSDate(e).toJD())},_validate:function(e,t,n,r){if(e.year){if(0===this._validateLevel&&this.name!==e.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(e,t,n))throw r.replace(/\{0\}/,this.local.name);var i=this.newDate(e,t,n);return this._validateLevel--,i}catch(e){throw this._validateLevel--,e}}}),l.prototype=new s,r(l.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(4-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate);e=r.year(),t=r.month(),n=r.day(),e<0&&e++,t<3&&(t+=12,e--);var i=Math.floor(e/100),o=2-i+Math.floor(i/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+n+o-1524.5},fromJD:function(e){var t=Math.floor(e+.5),n=Math.floor((t-1867216.25)/36524.25),r=1524+(n=t+1+n-Math.floor(n/4)),i=Math.floor((r-122.1)/365.25),o=Math.floor(365.25*i),a=Math.floor((r-o)/30.6001),s=r-o-Math.floor(30.6001*a),l=a-(a>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,n){var r=this._validate(e,t,n,c.local.invalidDate||c.regionalOptions[""].invalidDate),i=new Date(r.year(),r.month()-1,r.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=t.exports=new i;c.cdate=o,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":247}],347:[function(e,t,n){var r=e("object-assign"),i=e("./main");r(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],r(i.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),r(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var r=(n=n||{}).dayNamesShort||this.local.dayNamesShort,o=n.dayNames||this.local.dayNames,a=n.monthNumbers||this.local.monthNumbers,s=n.monthNamesShort||this.local.monthNamesShort,l=n.monthNames||this.local.monthNames,c=(n.calculateWeek||this.local.calculateWeek,function(t,n){for(var r=1;y+r<e.length&&e.charAt(y+r)===t;)r++;return y+=r-1,Math.floor(r/(n||1))>1}),u=function(e,t,n,r){var i=""+t;if(c(e,r))for(;i.length<n;)i="0"+i;return i},h=this,d=function(e){return"function"==typeof a?a.call(h,e,c("m")):g(u("m",e.month(),2))},f=function(e,t){return t?"function"==typeof l?l.call(h,e):l[e.month()-h.minMonth]:"function"==typeof s?s.call(h,e):s[e.month()-h.minMonth]},p=this.local.digits,g=function(e){return n.localNumbers&&p?p(e):e},m="",v=!1,y=0;y<e.length;y++)if(v)"'"!==e.charAt(y)||c("'")?m+=e.charAt(y):v=!1;else switch(e.charAt(y)){case"d":m+=g(u("d",t.day(),2));break;case"D":m+=(b="D",_=t.dayOfWeek(),x=r,w=o,c(b)?w[_]:x[_]);break;case"o":m+=u("o",t.dayOfYear(),3);break;case"w":m+=u("w",t.weekOfYear(),2);break;case"m":m+=d(t);break;case"M":m+=f(t,c("M"));break;case"y":m+=c("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":c("Y",2),m+=t.formatYear();break;case"J":m+=t.toJD();break;case"@":m+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":m+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":c("'")?m+="'":v=!0;break;default:m+=e.charAt(y)}var b,_,x,w;return m},parseDate:function(e,t,n){if(null==t)throw i.local.invalidArguments||i.regionalOptions[""].invalidArguments;if(""===(t="object"==typeof t?t.toString():t+""))return null;e=e||this.local.dateFormat;var r=(n=n||{}).shortYearCutoff||this.shortYearCutoff;r="string"!=typeof r?r:this.today().year()%100+parseInt(r,10);for(var o=n.dayNamesShort||this.local.dayNamesShort,a=n.dayNames||this.local.dayNames,s=n.parseMonth||this.local.parseMonth,l=n.monthNumbers||this.local.monthNumbers,c=n.monthNamesShort||this.local.monthNamesShort,u=n.monthNames||this.local.monthNames,h=-1,d=-1,f=-1,p=-1,g=-1,m=!1,v=!1,y=function(t,n){for(var r=1;S+r<e.length&&e.charAt(S+r)===t;)r++;return S+=r-1,Math.floor(r/(n||1))>1},b=function(e,n){var r=y(e,n),o=[2,3,r?4:2,r?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],a=new RegExp("^-?\\d{1,"+o+"}"),s=t.substring(T).match(a);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=s[0].length,parseInt(s[0],10)},_=this,x=function(){if("function"==typeof l){y("m");var e=l.call(_,t.substring(T));return T+=e.length,e}return b("m")},w=function(e,n,r,o){for(var a=y(e,o)?r:n,s=0;s<a.length;s++)if(t.substr(T,a[s].length).toLowerCase()===a[s].toLowerCase())return T+=a[s].length,s+_.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[""].unknownNameAt).replace(/\{0\}/,T)},A=function(){if("function"==typeof u){var e=y("M")?u.call(_,t.substring(T)):c.call(_,t.substring(T));return T+=e.length,e}return w("M",c,u)},k=function(){if(t.charAt(T)!==e.charAt(S))throw(i.local.unexpectedLiteralAt||i.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,T);T++},T=0,S=0;S<e.length;S++)if(v)"'"!==e.charAt(S)||y("'")?k():v=!1;else switch(e.charAt(S)){case"d":p=b("d");break;case"D":w("D",o,a);break;case"o":g=b("o");break;case"w":b("w");break;case"m":f=x();break;case"M":f=A();break;case"y":var E=S;m=!y("y",2),S=E,d=b("y",2);break;case"Y":d=b("Y",2);break;case"J":h=b("J")+.5,"."===t.charAt(T)&&(T++,b("J"));break;case"@":h=b("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":h=b("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":T=t.length;break;case"'":y("'")?k():v=!0;break;default:k()}if(T<t.length)throw i.local.unexpectedText||i.regionalOptions[""].unexpectedText;if(-1===d?d=this.today().year():d<100&&m&&(d+=-1===r?1900:this.today().year()-this.today().year()%100-(d<=r?0:100)),"string"==typeof f&&(f=s.call(this,d,f)),g>-1){f=1,p=g;for(var C=this.daysInMonth(d,f);p>C;C=this.daysInMonth(d,f))f++,p-=C}return h>-1?this.fromJD(h):this.newDate(d,f,p)},determineDate:function(e,t,n,r,i){n&&"object"!=typeof n&&(i=r,r=n,n=null),"string"!=typeof r&&(i=r,r="");var o=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return o.parseDate(r,e,i)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&n?n.newDate():null)||o.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=a.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=a.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:o.today().add(e,"d"):o.newDate(e)}})},{"./main":346,"object-assign":247}],348:[function(e,t,n){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],349:[function(e,t,n){"use strict";var r=e("./arrow_paths"),i=e("../../plots/font_attributes"),o=e("../../plots/cartesian/constants"),a=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects"),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/font_attributes":585,"./arrow_paths":348}],350:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("./draw").draw;function a(e){var t=e._fullLayout;r.filterVisible(t.annotations).forEach((function(t){var n=i.getFromId(e,t.xref),r=i.getFromId(e,t.yref),o=i.getRefType(t.xref),a=i.getRefType(t.yref);t._extremes={},"range"===o&&s(t,n),"range"===a&&s(t,r)}))}function s(e,t){var n,r=t._id,o=r.charAt(0),a=e[o],s=e["a"+o],l=e[o+"ref"],c=e["a"+o+"ref"],u=e["_"+o+"padplus"],h=e["_"+o+"padminus"],d={x:1,y:-1}[o]*e[o+"shift"],f=3*e.arrowsize*e.arrowwidth||0,p=f+d,g=f-d,m=3*e.startarrowsize*e.arrowwidth||0,v=m+d,y=m-d;if(c===l){var b=i.findExtremes(t,[t.r2c(a)],{ppadplus:p,ppadminus:g}),_=i.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(h,y)});n={min:[b.min[0],_.min[0]],max:[b.max[0],_.max[0]]}}else v=s?v+s:v,y=s?y-s:y,n=i.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(h,g,y)});e._extremes[r]=n}t.exports=function(e){var t=e._fullLayout;if(r.filterVisible(t.annotations).length&&e._fullData.length)return r.syncOrAsync([o,a],e)}},{"../../lib":503,"../../plots/cartesian/axes":554,"./draw":355}],351:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=e("../../plot_api/plot_template").arrayEditor;function a(e,t){var n,r,i,o,a,l,c,u=e._fullLayout.annotations,h=[],d=[],f=[],p=(t||[]).length;for(n=0;n<u.length;n++)if(o=(i=u[n]).clicktoshow){for(r=0;r<p;r++)if(l=(a=t[r]).xaxis,c=a.yaxis,l._id===i.xref&&c._id===i.yref&&l.d2r(a.x)===s(i._xclick,l)&&c.d2r(a.y)===s(i._yclick,c)){(i.visible?"onout"===o?d:f:h).push(n);break}r===p&&i.visible&&"onout"===o&&d.push(n)}return{on:h,off:d,explicitOff:f}}function s(e,t){return"log"===t.type?t.l2r(e):t.d2r(e)}t.exports={hasClickToShow:function(e,t){var n=a(e,t);return n.on.length>0||n.explicitOff.length>0},onClick:function(e,t){var n,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},d=e._fullLayout.annotations;if(c.length||u.length){for(n=0;n<c.length;n++)(s=o(e.layout,"annotations",d[c[n]])).modifyItem("visible",!0),r.extendFlat(h,s.getUpdateObj());for(n=0;n<u.length;n++)(s=o(e.layout,"annotations",d[u[n]])).modifyItem("visible",!1),r.extendFlat(h,s.getUpdateObj());return i.call("update",e,{},h)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638}],352:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../color");t.exports=function(e,t,n,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),u=o("showarrow");if(o("text",u?" ":n._dfltTitle.annotation),o("textangle"),r.coerceFont(o,"font",n.font),o("width"),o("align"),o("height")&&o("valign"),u){var h,d,f=o("arrowside");-1!==f.indexOf("end")&&(h=o("arrowhead"),d=o("arrowsize")),-1!==f.indexOf("start")&&(o("startarrowhead",h),o("startarrowsize",d)),o("arrowcolor",l?t.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),g=n.hoverlabel||{};if(p){var m=o("hoverlabel.bgcolor",g.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",g.bordercolor||i.contrast(m));r.coerceFont(o,"hoverlabel.font",{family:g.font.family,size:g.font.size,color:g.font.color||v})}o("captureevents",!!p)}},{"../../lib":503,"../color":366}],353:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib/to_log_range");t.exports=function(e,t,n,o){t=t||{};var a="log"===n&&"linear"===t.type,s="linear"===n&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.annotations,h=t._id.charAt(0),d=0;d<u.length;d++)l=u[d],c="annotations["+d+"].",l[h+"ref"]===t._id&&f(h),l["a"+h+"ref"]===t._id&&f("a"+h);function f(e){var n=l[e],s=null;s=a?i(n,t.range):Math.pow(10,n),r(s)||(s=null),o(c+e,s)}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],354:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/array_container_defaults"),a=e("./common_defaults"),s=e("./attributes");function l(e,t,n){function o(n,i){return r.coerce(e,t,s,n,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(e,t,n,o);for(var u=t.showarrow,h=["x","y"],d=[-10,-30],f={_fullLayout:n},p=0;p<2;p++){var g=h[p],m=i.coerceRef(e,t,f,g,"","paper");if("paper"!==m&&i.getFromId(f,m)._annIndices.push(t._index),i.coercePosition(t,f,o,m,g,.5),u){var v="a"+g,y=i.coerceRef(e,t,f,v,"pixel",["pixel","paper"]);"pixel"!==y&&y!==m&&(y=t[v]="pixel");var b="pixel"===y?d[p]:.4;i.coercePosition(t,f,o,y,v,b)}o(g+"anchor"),o(g+"shift")}if(r.noneOrAll(e,t,["x","y"]),u&&r.noneOrAll(e,t,["ax","ay"]),c){var _=o("xclick"),x=o("yclick");t._xclick=void 0===_?t.x:i.cleanPosition(_,f,t.xref),t._yclick=void 0===x?t.y:i.cleanPosition(x,f,t.yref)}}}t.exports=function(e,t){o(e,t,{name:"annotations",handleItemDefaults:l})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":349,"./common_defaults":352}],355:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../plots/plots"),a=e("../../lib"),s=a.strTranslate,l=e("../../plots/cartesian/axes"),c=e("../color"),u=e("../drawing"),h=e("../fx"),d=e("../../lib/svg_text_utils"),f=e("../../lib/setcursor"),p=e("../dragelement"),g=e("../../plot_api/plot_template").arrayEditor,m=e("./draw_arrow_head");function v(e,t){var n=e._fullLayout.annotations[t]||{},r=l.getFromId(e,n.xref),i=l.getFromId(e,n.yref);r&&r.setScale(),i&&i.setScale(),b(e,n,t,!1,r,i)}function y(e,t,n,r,i){var o=i[n],a=i[n+"ref"],s=-1!==n.indexOf("y"),c="domain"===l.getRefType(a),u=s?r.h:r.w;return e?c?o+(s?-t:t)/e._length:e.p2r(e.r2p(o)+t):o+(s?-t:t)/u}function b(e,t,n,o,v,b){var _,x,w=e._fullLayout,A=e._fullLayout._size,k=e._context.edits;o?(_="annotation-"+o,x=o+".annotations"):(_="annotation",x="annotations");var T=g(e.layout,x,t),S=T.modifyBase,E=T.modifyItem,C=T.getUpdateObj;w._infolayer.selectAll("."+_+'[data-index="'+n+'"]').remove();var M="clip"+w._uid+"_ann"+n;if(t._input&&!1!==t.visible){var O={x:{},y:{}},L=+t.textangle||0,D=w._infolayer.append("g").classed(_,!0).attr("data-index",String(n)).style("opacity",t.opacity),I=D.append("g").classed("annotation-text-g",!0),R=k[t.showarrow?"annotationTail":"annotationPosition"],P=t.captureevents||k.annotationText||R,N=I.append("g").style("pointer-events",P?"all":null).call(f,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",W(r.event))}));t.hovertext&&N.on("mouseover",(function(){var n=t.hoverlabel,r=n.font,i=this.getBoundingClientRect(),o=e.getBoundingClientRect();h.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:t.hovertext,color:n.bgcolor,borderColor:n.bordercolor,fontFamily:r.family,fontSize:r.size,fontColor:r.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})})).on("mouseout",(function(){h.loneUnhover(w._hoverlayer.node())}));var z=t.borderwidth,F=t.borderpad,B=z+F,j=N.append("rect").attr("class","bg").style("stroke-width",z+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),U=t.width||t.height,V=w._topclips.selectAll("#"+M).data(U?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",M).append("rect"),V.exit().remove();var q=t.font,H=w._meta?a.templateString(t.text,w._meta):t.text,$=N.append("text").classed("annotation-text",!0).text(H);k.annotationText?$.call(d.makeEditable,{delegate:N,gd:e}).call(G).on("edit",(function(n){t.text=n,this.call(G),E("text",n),v&&v.autorange&&S(v._name+".autorange",!0),b&&b.autorange&&S(b._name+".autorange",!0),i.call("_guiRelayout",e,C())})):$.call(G)}else r.selectAll("#"+M).remove();function W(e){var r={index:n,annotation:t._input,fullAnnotation:t,event:e};return o&&(r.subplotId=o),r}function G(n){return n.call(u.font,q).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(n,e,Y),n}function Y(){var n=$.selectAll("a");1===n.size()&&n.text()===$.text()&&N.insert("a",":first-child").attr({"xlink:xlink:href":n.attr("xlink:href"),"xlink:xlink:show":n.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(j.node());var r=N.select(".annotation-text-math-group"),h=!r.empty(),g=u.bBox((h?r:$).node()),_=g.width,x=g.height,T=t.width||_,P=t.height||x,F=Math.round(T+2*B),q=Math.round(P+2*B);function H(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var G=!1,Y=["x","y"],X=0;X<Y.length;X++){var Z,K,J,Q,ee,te=Y[X],ne=t[te+"ref"]||te,re=t["a"+te+"ref"],ie={x:v,y:b}[te],oe=(L+("x"===te?0:-90))*Math.PI/180,ae=F*Math.cos(oe),se=q*Math.sin(oe),le=Math.abs(ae)+Math.abs(se),ce=t[te+"anchor"],ue=t[te+"shift"]*("x"===te?1:-1),he=O[te],de=l.getRefType(ne);if(ie&&"domain"!==de){var fe=ie.r2fraction(t[te]);(fe<0||fe>1)&&(re===ne?((fe=ie.r2fraction(t["a"+te]))<0||fe>1)&&(G=!0):G=!0),Z=ie._offset+ie.r2p(t[te]),Q=.5}else{var pe="domain"===de;"x"===te?(J=t[te],Z=pe?ie._offset+ie._length*J:Z=A.l+A.w*J):(J=1-t[te],Z=pe?ie._offset+ie._length*J:Z=A.t+A.h*J),Q=t.showarrow?.5:J}if(t.showarrow){he.head=Z;var ge=t["a"+te];if(ee=ae*H(.5,t.xanchor)-se*H(.5,t.yanchor),re===ne){var me=l.getRefType(re);"domain"===me?("y"===te&&(ge=1-ge),he.tail=ie._offset+ie._length*ge):"paper"===me?"y"===te?(ge=1-ge,he.tail=A.t+A.h*ge):he.tail=A.l+A.w*ge:he.tail=ie._offset+ie.r2p(ge),K=ee}else he.tail=Z+ge,K=ee+ge;he.text=he.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===ne&&(he.head=a.constrain(he.head,1,ve-1)),"pixel"===re){var ye=-Math.max(he.tail-3,he.text),be=Math.min(he.tail+3,he.text)-ve;ye>0?(he.tail+=ye,he.text+=ye):be>0&&(he.tail-=be,he.text-=be)}he.tail+=ue,he.head+=ue}else K=ee=le*H(Q,ce),he.text=Z+ee;he.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=le/2+K,t["_"+te+"padminus"]=le/2-K,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(G)N.remove();else{var _e=0,xe=0;if("left"!==t.align&&(_e=(T-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(xe=(P-x)*("middle"===t.valign?.5:1)),h)r.select("svg").attr({x:B+_e-1,y:B+xe}).call(u.setClipUrl,U?M:null,e);else{var we=B+xe-g.top,Ae=B+_e-g.left;$.call(d.positionText,Ae,we).call(u.setClipUrl,U?M:null,e)}V.select("rect").call(u.setRect,B,B,T,P),j.call(u.setRect,z/2,z/2,F-z,q-z),N.call(u.setTranslate,Math.round(O.x.text-F/2),Math.round(O.y.text-q/2)),I.attr({transform:"rotate("+L+","+O.x.text+","+O.y.text+")"});var ke,Te=function(n,r){D.selectAll(".annotation-arrow-g").remove();var l=O.x.head,h=O.y.head,d=O.x.tail+n,f=O.y.tail+r,g=O.x.text+n,_=O.y.text+r,x=a.rotationXYMatrix(L,g,_),w=a.apply2DTransform(x),T=a.apply2DTransform2(x),M=+j.attr("width"),R=+j.attr("height"),P=g-.5*M,z=P+M,F=_-.5*R,B=F+R,U=[[P,F,P,B],[P,B,z,B],[z,B,z,F],[z,F,P,F]].map(T);if(!U.reduce((function(e,t){return e^!!a.segmentsIntersect(l,h,l+1e6,h+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=a.segmentsIntersect(d,f,l,h,e[0],e[1],e[2],e[3]);t&&(d=t.x,f=t.y)}));var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,$=D.append("g").style({opacity:c.opacity(q)}).classed("annotation-arrow-g",!0),W=$.append("path").attr("d","M"+d+","+f+"L"+l+","+h).style("stroke-width",V+"px").call(c.stroke,c.rgb(q));if(m(W,H,t),k.annotationPosition&&W.node().parentNode&&!o){var G=l,Y=h;if(t.standoff){var X=Math.sqrt(Math.pow(l-d,2)+Math.pow(h-f,2));G+=t.standoff*(d-l)/X,Y+=t.standoff*(f-h)/X}var Z,K,J=$.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-G)+","+(f-Y),transform:s(G,Y)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=u.getTranslate(N);Z=e.x,K=e.y,v&&v.autorange&&S(v._name+".autorange",!0),b&&b.autorange&&S(b._name+".autorange",!0)},moveFn:function(e,n){var r=w(Z,K),i=r[0]+e,o=r[1]+n;N.call(u.setTranslate,i,o),E("x",y(v,e,"x",A,t)),E("y",y(b,n,"y",A,t)),t.axref===t.xref&&E("ax",y(v,e,"ax",A,t)),t.ayref===t.yref&&E("ay",y(b,n,"ay",A,t)),$.attr("transform",s(e,n)),I.attr({transform:"rotate("+L+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",e,C());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Te(0,0),R&&p.init({element:N.node(),gd:e,prepFn:function(){ke=I.attr("transform")},moveFn:function(e,n){var r="pointer";if(t.showarrow)t.axref===t.xref?E("ax",y(v,e,"ax",A,t)):E("ax",t.ax+e),t.ayref===t.yref?E("ay",y(b,n,"ay",A.w,t)):E("ay",t.ay+n),Te(e,n);else{if(o)return;var i,a;if(v)i=y(v,e,"x",A,t);else{var l=t._xsize/A.w,c=t.x+(t._xshift-t.xshift)/A.w-l/2;i=p.align(c+e/A.w,l,0,1,t.xanchor)}if(b)a=y(b,n,"y",A,t);else{var u=t._ysize/A.h,h=t.y-(t._yshift+t.yshift)/A.h-u/2;a=p.align(h-n/A.h,u,0,1,t.yanchor)}E("x",i),E("y",a),v&&b||(r=p.getCursor(v?.5:i,b?.5:a,t.xanchor,t.yanchor))}I.attr({transform:s(e,n)+ke}),f(N,r)},clickFn:function(n,r){t.captureevents&&e.emit("plotly_clickannotation",W(r))},doneFn:function(){f(N),i.call("_guiRelayout",e,C());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var n=0;n<t.annotations.length;n++)t.annotations[n].visible&&v(e,n);return o.previousPromises(e)},drawOne:v,drawRaw:b}},{"../../lib":503,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/cartesian/axes":554,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../fx":406,"./draw_arrow_head":356,"@plotly/d3":58}],356:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../color"),o=e("./arrow_paths"),a=e("../../lib"),s=a.strScale,l=a.strRotate,c=a.strTranslate;t.exports=function(e,t,n){var a,u,h,d,f=e.node(),p=o[n.arrowhead||0],g=o[n.startarrowhead||0],m=(n.arrowwidth||1)*(n.arrowsize||1),v=(n.arrowwidth||1)*(n.startarrowsize||1),y=t.indexOf("start")>=0,b=t.indexOf("end")>=0,_=p.backoff*m+n.standoff,x=g.backoff*v+n.startstandoff;if("line"===f.nodeName){a={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=a.x-u.x,A=a.y-u.y;if(d=(h=Math.atan2(A,w))+Math.PI,_&&x&&_+x>Math.sqrt(w*w+A*A))return void R();if(_){if(_*_>w*w+A*A)return void R();var k=_*Math.cos(h),T=_*Math.sin(h);u.x+=k,u.y+=T,e.attr({x2:u.x,y2:u.y})}if(x){if(x*x>w*w+A*A)return void R();var S=x*Math.cos(h),E=x*Math.sin(h);a.x-=S,a.y-=E,e.attr({x1:a.x,y1:a.y})}}else if("path"===f.nodeName){var C=f.getTotalLength(),M="";if(C<_+x)return void R();var O=f.getPointAtLength(0),L=f.getPointAtLength(.1);h=Math.atan2(O.y-L.y,O.x-L.x),a=f.getPointAtLength(Math.min(x,C)),M="0px,"+x+"px,";var D=f.getPointAtLength(C),I=f.getPointAtLength(C-.1);d=Math.atan2(D.y-I.y,D.x-I.x),u=f.getPointAtLength(Math.max(0,C-_)),M+=C-(M?x+_:_)+"px,"+C+"px",e.style("stroke-dasharray",M)}function R(){e.style("stroke-dasharray","0px,100px")}function P(t,o,a,u){t.path&&(t.noRotate&&(a=0),r.select(f.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:c(o.x,o.y)+l(180*a/Math.PI)+s(u)}).style({fill:i.rgb(n.arrowcolor),"stroke-width":0}))}y&&P(g,a,h,v),b&&P(p,u,d,m)}},{"../../lib":503,"../color":366,"./arrow_paths":348,"@plotly/d3":58}],357:[function(e,t,n){"use strict";var r=e("./draw"),i=e("./click");t.exports={moduleType:"component",name:"annotations",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("annotations"),calcAutorange:e("./calc_autorange"),draw:r.draw,drawOne:r.drawOne,drawRaw:r.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":349,"./calc_autorange":350,"./click":351,"./convert_coords":353,"./defaults":354,"./draw":355}],358:[function(e,t,n){"use strict";var r=e("../annotations/attributes"),i=e("../../plot_api/edit_types").overrideAll,o=e("../../plot_api/plot_template").templatedArray;t.exports=i(o("annotation",{visible:r.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:r.xanchor,xshift:r.xshift,yanchor:r.yanchor,yshift:r.yshift,text:r.text,textangle:r.textangle,font:r.font,width:r.width,height:r.height,opacity:r.opacity,align:r.align,valign:r.valign,bgcolor:r.bgcolor,bordercolor:r.bordercolor,borderpad:r.borderpad,borderwidth:r.borderwidth,showarrow:r.showarrow,arrowcolor:r.arrowcolor,arrowhead:r.arrowhead,startarrowhead:r.startarrowhead,arrowside:r.arrowside,arrowsize:r.arrowsize,startarrowsize:r.startarrowsize,arrowwidth:r.arrowwidth,standoff:r.standoff,startstandoff:r.startstandoff,hovertext:r.hovertext,hoverlabel:r.hoverlabel,captureevents:r.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../annotations/attributes":349}],359:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes");function o(e,t){var n=t.fullSceneLayout.domain,o=t.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},r.extendFlat(e._xa,a),i.setConvert(e._xa),e._xa._offset=o.l+n.x[0]*o.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*o.w*(n.x[1]-n.x[0])},e._ya={},r.extendFlat(e._ya,a),i.setConvert(e._ya),e._ya._offset=o.t+(1-n.y[1])*o.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*o.h*(n.y[1]-n.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,n=0;n<t.length;n++)o(t[n],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()}},{"../../lib":503,"../../plots/cartesian/axes":554}],360:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/array_container_defaults"),a=e("../annotations/common_defaults"),s=e("./attributes");function l(e,t,n,o){function l(n,i){return r.coerce(e,t,s,n,i)}function c(e){var r=e+"axis",o={_fullLayout:{}};return o._fullLayout[r]=n[r],i.coercePosition(t,o,l,e,e,.5)}l("visible")&&(a(e,t,o.fullLayout,l),c("x"),c("y"),c("z"),r.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",l("ax",-10),l("ay",-30),r.noneOrAll(e,t,["ax","ay"])))}t.exports=function(e,t,n){o(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:n.fullLayout})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../annotations/common_defaults":352,"./attributes":358}],361:[function(e,t,n){"use strict";var r=e("../annotations/draw").drawRaw,i=e("../../plots/gl3d/project"),o=["x","y","z"];t.exports=function(e){for(var t=e.fullSceneLayout,n=e.dataScale,a=t.annotations,s=0;s<a.length;s++){for(var l=a[s],c=!1,u=0;u<3;u++){var h=o[u],d=l[h],f=t[h+"axis"].r2fraction(d);if(f<0||f>1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*n[0],t.yaxis.r2l(l.y)*n[1],t.zaxis.r2l(l.z)*n[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":607,"../annotations/draw":355}],362:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib");t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(n)for(var o=n.attrRegex,a=Object.keys(e),s=0;s<a.length;s++){var l=a[s];o.test(l)&&(e[l].annotations||[]).length&&(i.pushUnique(t._basePlotModules,n),i.pushUnique(t._subplots.gl3d,l))}},convert:e("./convert"),draw:e("./draw")}},{"../../lib":503,"../../registry":638,"./attributes":358,"./convert":359,"./defaults":360,"./draw":361}],363:[function(e,t,n){"use strict";t.exports=e("world-calendars/dist/main"),e("world-calendars/dist/plus"),e("world-calendars/dist/calendars/chinese"),e("world-calendars/dist/calendars/coptic"),e("world-calendars/dist/calendars/discworld"),e("world-calendars/dist/calendars/ethiopian"),e("world-calendars/dist/calendars/hebrew"),e("world-calendars/dist/calendars/islamic"),e("world-calendars/dist/calendars/julian"),e("world-calendars/dist/calendars/mayan"),e("world-calendars/dist/calendars/nanakshahi"),e("world-calendars/dist/calendars/nepali"),e("world-calendars/dist/calendars/persian"),e("world-calendars/dist/calendars/taiwan"),e("world-calendars/dist/calendars/thai"),e("world-calendars/dist/calendars/ummalqura")},{"world-calendars/dist/calendars/chinese":332,"world-calendars/dist/calendars/coptic":333,"world-calendars/dist/calendars/discworld":334,"world-calendars/dist/calendars/ethiopian":335,"world-calendars/dist/calendars/hebrew":336,"world-calendars/dist/calendars/islamic":337,"world-calendars/dist/calendars/julian":338,"world-calendars/dist/calendars/mayan":339,"world-calendars/dist/calendars/nanakshahi":340,"world-calendars/dist/calendars/nepali":341,"world-calendars/dist/calendars/persian":342,"world-calendars/dist/calendars/taiwan":343,"world-calendars/dist/calendars/thai":344,"world-calendars/dist/calendars/ummalqura":345,"world-calendars/dist/main":346,"world-calendars/dist/plus":347}],364:[function(e,t,n){"use strict";var r=e("./calendars"),i=e("../../lib"),o=e("../../constants/numerical"),a=o.EPOCHJD,s=o.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,n,r){var o={};return o[n]=l,i.coerce(e,t,o,n,r)},u="##",h={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};var d={};function f(e){var t=d[e];return t||(d[e]=r.instance(e))}function p(e){return i.extendFlat({},l,{description:e})}function g(e){return"Sets the calendar system to use with `"+e+"` date data."}var m={xcalendar:p(g("x"))},v=i.extendFlat({},m,{ycalendar:p(g("y"))}),y=i.extendFlat({},v,{zcalendar:p(g("z"))}),b=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:m,candlestick:m},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:b},yaxis:{calendar:b},scene:{xaxis:{calendar:b},yaxis:{calendar:b},zaxis:{calendar:b}},polar:{radialaxis:{calendar:b}}},transforms:{filter:{valuecalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(e,t,n,r){for(var i=0;i<n.length;i++)c(e,t,n[i]+"calendar",r.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:f,worldCalFmt:function(e,t,n){for(var r,i,o,l,c,d=Math.floor((t+.05)/s)+a,p=f(n).fromJD(d),g=0;-1!==(g=e.indexOf("%",g));)"0"===(r=e.charAt(g+1))||"-"===r||"_"===r?(o=3,i=e.charAt(g+2),"_"===r&&(r="-")):(i=r,r="0",o=2),(l=h[i])?(c=l===u?u:p.formatDate(l[r]),e=e.substr(0,g)+c+e.substr(g+o),g+=c.length):g+=o;return e}}},{"../../constants/numerical":479,"../../lib":503,"./calendars":363}],365:[function(e,t,n){"use strict";n.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],n.defaultLine="#444",n.lightLine="#eee",n.background="#fff",n.borderLine="#BEC8D9",n.lightFraction=1e3/11},{}],366:[function(e,t,n){"use strict";var r=e("tinycolor2"),i=e("fast-isnumeric"),o=e("../../lib/array").isTypedArray,a=t.exports={},s=e("./attributes");a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function u(e){if(i(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var n=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return e;var r=n[1].trim().split(/\s*[\s,]\s*/),o="a"===t.charAt(3)&&4===r.length;if(!o&&3!==r.length)return e;for(var a=0;a<r.length;a++){if(!r[a].length)return e;if(r[a]=Number(r[a]),!(r[a]>=0))return e;if(3===a)r[a]>1&&(r[a]=1);else if(r[a]>=1)return e}var s=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return o?"rgba("+s+", "+r[3]+")":"rgb("+s+")"}a.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},a.rgb=function(e){return a.tinyRGB(r(e))},a.opacity=function(e){return e?r(e).getAlpha():0},a.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},a.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var i=r(t||c).toRgb(),o=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},a={r:o.r*(1-n.a)+n.r*n.a,g:o.g*(1-n.a)+n.g*n.a,b:o.b*(1-n.a)+n.b*n.a};return r(a).toRgbString()},a.contrast=function(e,t,n){var i=r(e);return 1!==i.getAlpha()&&(i=r(a.combine(e,c))),(i.isDark()?t?i.lighten(t):c:n?i.darken(n):l).toString()},a.stroke=function(e,t){var n=r(t);e.style({stroke:a.tinyRGB(n),"stroke-opacity":n.getAlpha()})},a.fill=function(e,t){var n=r(t);e.style({fill:a.tinyRGB(n),"fill-opacity":n.getAlpha()})},a.clean=function(e){if(e&&"object"==typeof e){var t,n,r,i,s=Object.keys(e);for(t=0;t<s.length;t++)if(i=e[r=s[t]],"color"===r.substr(r.length-5))if(Array.isArray(i))for(n=0;n<i.length;n++)i[n]=u(i[n]);else e[r]=u(i);else if("colorscale"===r.substr(r.length-10)&&Array.isArray(i))for(n=0;n<i.length;n++)Array.isArray(i[n])&&(i[n][1]=u(i[n][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(n=0;n<i.length;n++)a.clean(i[n])}else i&&"object"==typeof i&&!o(i)&&a.clean(i)}}},{"../../lib/array":485,"./attributes":365,"fast-isnumeric":190,tinycolor2:312}],367:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/layout_attributes"),i=e("../../plots/font_attributes"),o=e("../../lib/extend").extendFlat,a=e("../../plot_api/edit_types").overrideAll;t.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:r.linecolor,outlinewidth:r.linewidth,bordercolor:r.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:r.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:o({},r.ticks,{dflt:""}),ticklabeloverflow:o({},r.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,tickfont:i({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/cartesian/layout_attributes":569,"../../plots/font_attributes":585}],368:[function(e,t,n){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},{}],369:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("../../plots/cartesian/tick_value_defaults"),a=e("../../plots/cartesian/tick_mark_defaults"),s=e("../../plots/cartesian/tick_label_defaults"),l=e("../../plots/cartesian/prefix_suffix_defaults"),c=e("./attributes");t.exports=function(e,t,n){var u=i.newContainer(t,"colorbar"),h=e.colorbar||{};function d(e,t){return r.coerce(h,u,c,e,t)}var f=n.margin||{t:0,b:0,l:0,r:0},p=n.width-f.l-f.r,g=n.height-f.t-f.b,m="v"===d("orientation"),v=d("thicknessmode");d("thickness","fraction"===v?30/(m?p:g):30);var y=d("lenmode");d("len","fraction"===y?1:m?g:p),d("x",m?1.02:.5),d("xanchor",m?"left":"center"),d("xpad"),d("y",m?.5:1.02),d("yanchor",m?"middle":"bottom"),d("ypad"),r.noneOrAll(h,u,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var b=r.coerce(h,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:m?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==b.indexOf("inside")?"hide past domain":"hide past div"),o(h,u,d,"linear");var _=n.font,x={outerTicks:!1,font:_};-1!==b.indexOf("inside")&&(x.bgColor="black"),l(h,u,d,"linear",x),s(h,u,d,"linear",x),a(h,u,d,"linear",x),d("title.text",n._dfltTitle.colorbar);var w=u.tickfont,A=r.extendFlat({},w,{color:_.color,size:r.bigFont(w.size)});r.coerceFont(d,"title.font",A),d("title.side",m?"top":"right")}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_mark_defaults":579,"../../plots/cartesian/tick_value_defaults":580,"./attributes":367}],370:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("tinycolor2"),o=e("../../plots/plots"),a=e("../../registry"),s=e("../../plots/cartesian/axes"),l=e("../dragelement"),c=e("../../lib"),u=c.strTranslate,h=e("../../lib/extend").extendFlat,d=e("../../lib/setcursor"),f=e("../drawing"),p=e("../color"),g=e("../titles"),m=e("../../lib/svg_text_utils"),v=e("../colorscale/helpers").flipScale,y=e("../../plots/cartesian/axis_defaults"),b=e("../../plots/cartesian/position_defaults"),_=e("../../plots/cartesian/layout_attributes"),x=e("../../constants/alignment"),w=x.LINE_SPACING,A=x.FROM_TL,k=x.FROM_BR,T=e("./constants").cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(e){var t,n,r,i,o=e._fullLayout,a=e.calcdata,s=[];function l(e){return h(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(e,r,t):(t._fillgradient=n.reversescale?v(n.colorscale):n.colorscale,t._zrange=[n[i.min],n[i.max]])}for(var u=0;u<a.length;u++){var d=a[u],f=(r=d[0].trace)._module.colorbar;if(!0===r.visible&&f)for(var p=Array.isArray(f),g=p?f:[f],m=0;m<g.length;m++){var y=(i=g[m]).container;(n=y?r[y]:r)&&n.showscale&&((t=l(n.colorbar))._id="cb"+r.uid+(p&&y?"-"+y:""),t._traceIndex=r.index,t._propPrefix=(y?y+".":"")+"colorbar.",t._meta=r._meta,c(),s.push(t))}}for(var b in o._colorAxes)if((n=o[b]).showscale){var _=o._colorAxes[b];(t=l(n.colorbar))._id="cb"+b,t._propPrefix=b+".colorbar.",t._meta=o._meta,i={min:"cmin",max:"cmax"},"heatmap"!==_[0]&&(r=_[1],i.calc=r._module.colorbar.calc),c(),s.push(t)}return s}(e),(function(e){return e._id}));t.enter().append("g").attr("class",(function(e){return e._id})).classed(T.colorbar,!0),t.each((function(t){var n=r.select(this);c.ensureSingle(n,"rect",T.cbbg),c.ensureSingle(n,"g",T.cbfills),c.ensureSingle(n,"g",T.cblines),c.ensureSingle(n,"g",T.cbaxis,(function(e){e.classed(T.crisp,!0)})),c.ensureSingle(n,"g",T.cbtitleunshift,(function(e){e.append("g").classed(T.cbtitle,!0)})),c.ensureSingle(n,"rect",T.cboutline);var v=function(e,t,n){var a="v"===t.orientation,l=t.len,d=t.lenmode,v=t.thickness,x=t.thicknessmode,S=t.outlinewidth,E=t.borderwidth,C=t.bgcolor,M=t.xanchor,O=t.yanchor,L=t.xpad,D=t.ypad,I=t.x,R=a?t.y:1-t.y,P=n._fullLayout,N=P._size,z=t._fillcolor,F=t._line,B=t.title,j=B.side,U=t._zrange||r.extent(("function"==typeof z?z:F.color).domain()),V="function"==typeof F.color?F.color:function(){return F.color},q="function"==typeof z?z:function(){return z},H=t._levels,$=function(e,t,n){var r,i,o=t._levels,a=[],s=[],l=o.end+o.size/100,c=o.size,u=1.001*n[0]-.001*n[1],h=1.001*n[1]-.001*n[0];for(i=0;i<1e5&&(r=o.start+i*c,!(c>0?r>=l:r<=l));i++)r>u&&r<h&&a.push(r);if(t._fillgradient)s=[0];else if("function"==typeof t._fillcolor){var d=t._filllevels;if(d)for(l=d.end+d.size/100,c=d.size,i=0;i<1e5&&(r=d.start+i*c,!(c>0?r>=l:r<=l));i++)r>n[0]&&r<n[1]&&s.push(r);else(s=a.map((function(e){return e-o.size/2}))).push(s[s.length-1]+o.size)}else t._fillcolor&&"string"==typeof t._fillcolor&&(s=[0]);return o.size<0&&(a.reverse(),s.reverse()),{line:a,fill:s}}(0,t,U),W=$.fill,G=$.line,Y=Math.round(v*("fraction"===x?a?N.w:N.h:1)),X=Y/(a?N.w:N.h),Z=Math.round(l*("fraction"===d?a?N.h:N.w:1)),K=Z/(a?N.h:N.w),J=Math.round(a?I*N.w+L:R*N.h+D),Q={center:.5,right:1}[M]||0,ee={top:1,middle:.5}[O]||0,te=a?I-Q*X:R-ee*X,ne=a?R-ee*K:I-Q*K,re=Math.round(a?N.h*(1-ne):N.w*ne);t._lenFrac=K,t._thickFrac=X,t._uFrac=te,t._vFrac=ne;var ie=t._axis=function(e,t,n){var r=e._fullLayout,i="v"===t.orientation,o={type:"linear",range:n,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},a=i?"y":"x",s={type:"linear",_id:a+t._id},l={letter:a,font:r.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:r.calendar};function u(e,t){return c.coerce(o,s,_,e,t)}return y(o,s,u,l,r),b(o,s,u,l),s}(n,t,U);ie.position=X+(a?I+L/N.w:R+D/N.h);var oe=-1!==["top","bottom"].indexOf(j);if(a&&oe&&(ie.title.side=j,ie.titlex=I+L/N.w,ie.titley=ne+("top"===B.side?K-D/N.h:D/N.h)),a||oe||(ie.title.side=j,ie.titley=R+D/N.h,ie.titlex=ne+L/N.w),F.color&&"auto"===t.tickmode){ie.tickmode="linear",ie.tick0=H.start;var ae=H.size,se=c.constrain(Z/50,4,15)+1,le=(U[1]-U[0])/((t.nticks||se)*ae);if(le>1){var ce=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));ae*=ce*c.roundUp(le/ce,[2,5,10]),(Math.abs(H.start)/H.size+1e-6)%1<2e-6&&(ie.tick0=0)}ie.dtick=ae}ie.domain=a?[ne+D/N.h,ne+K-D/N.h]:[ne+L/N.w,ne+K-L/N.w],ie.setScale(),e.attr("transform",u(Math.round(N.l),Math.round(N.t)));var ue,he=e.select("."+T.cbtitleunshift).attr("transform",u(-Math.round(N.l),-Math.round(N.t))),de=ie.ticklabelposition,fe=ie.title.font.size,pe=e.select("."+T.cbaxis),ge=0,me=0;function ve(r,i){var o={propContainer:ie,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:P._dfltTitle.colorbar,containerGroup:e.select("."+T.cbtitle)},a="h"===r.charAt(0)?r.substr(1):"h"+r;e.selectAll("."+a+",."+a+"-math-group").remove(),g.draw(n,r,h(o,i||{}))}function ye(){var e,t;(a&&oe||!a&&!oe)&&("top"===j&&(e=L+N.l+N.w*I,t=D+N.t+N.h*(1-ne-K)+3+.75*fe),"bottom"===j&&(e=L+N.l+N.w*I,t=D+N.t+N.h*(1-ne)-3-.25*fe),"right"===j&&(t=D+N.t+N.h*R+3+.75*fe,e=L+N.l+N.w*ne),ve(ie._id+"title",{attributes:{x:e,y:t,"text-anchor":a?"start":"middle"}}))}function be(){if(a&&!oe||!a&&oe){var e,i,o=ie.position||0,s=ie._offset+ie._length/2;if("right"===j)i=s,e=N.l+N.w*o+10+fe*(ie.showticklabels?1:.5);else if(e=s,"bottom"===j&&(i=N.t+N.h*o+10+(-1===de.indexOf("inside")?ie.tickfont.size:0)+("intside"!==ie.ticks&&t.ticklen||0)),"top"===j){var l=B.text.split("<br>").length;i=N.t+N.h*o+10-Y-w*fe*l}ve((a?"h":"v")+ie._id+"title",{avoid:{selection:r.select(n).selectAll("g."+ie._id+"tick"),side:j,offsetTop:a?0:N.t,offsetLeft:a?N.l:0,maxShift:a?P.width:P.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function _e(){if(!a&&!oe||a&&oe){var o,l=e.select("."+T.cbtitle),h=l.select("text"),d=[-S/2,S/2],p=l.select(".h"+ie._id+"title-math-group").node(),g=15.6;if(h.node()&&(g=parseInt(h.node().style.fontSize,10)*w),p?(o=f.bBox(p),me=o.width,(ge=o.height)>g&&(d[1]-=(ge-g)/2)):h.node()&&!h.classed(T.jsPlaceholder)&&(o=f.bBox(h.node()),me=o.width,ge=o.height),a){if(ge){if(ge+=5,"top"===j)ie.domain[1]-=ge/N.h,d[1]*=-1;else{ie.domain[0]+=ge/N.h;var v=m.lineCount(h);d[1]+=(1-v)*g}l.attr("transform",u(d[0],d[1])),ie.setScale()}}else me&&("right"===j&&(ie.domain[0]+=(me+fe/2)/N.w),l.attr("transform",u(d[0],d[1])),ie.setScale())}e.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",a?u(0,Math.round(N.h*(1-ie.domain[1]))):u(Math.round(N.w*ie.domain[0]),0)),pe.attr("transform",a?u(0,Math.round(-N.t)):u(Math.round(-N.l),0));var y=e.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(W);y.enter().append("rect").classed(T.cbfill,!0).style("stroke","none"),y.exit().remove();var b=U.map(ie.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,o){var s=[0===o?U[0]:(W[o]+W[o-1])/2,o===W.length-1?U[1]:(W[o]+W[o+1])/2].map(ie.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,b[0],b[1]));var l=r.select(this).attr(a?"x":"y",J).attr(a?"y":"x",r.min(s)).attr(a?"width":"height",Math.max(Y,2)).attr(a?"height":"width",Math.max(r.max(s)-r.min(s),2));if(t._fillgradient)f.gradient(l,n,t._id,a?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=q(e).replace("e-","");l.attr("fill",i(u).toHexString())}}));var _=e.select("."+T.cblines).selectAll("path."+T.cbline).data(F.color&&F.width?G:[]);_.enter().append("path").classed(T.cbline,!0),_.exit().remove(),_.each((function(e){var t=J,n=Math.round(ie.c2p(e))+F.width/2%1;r.select(this).attr("d","M"+(a?t+","+n:n+","+t)+(a?"h":"v")+Y).call(f.lineGroupStyle,F.width,V(e),F.dash)})),pe.selectAll("g."+ie._id+"tick,path").remove();var x=J+Y+(S||0)/2-("outside"===t.ticks?1:0),A=s.calcTicks(ie),k=s.getTickSigns(ie)[2];return s.drawTicks(n,ie,{vals:"inside"===ie.ticks?s.clipEnds(ie,A):A,layer:pe,path:s.makeTickPath(ie,x,k),transFn:s.makeTransTickFn(ie)}),s.drawLabels(n,ie,{vals:A,layer:pe,transFn:s.makeTransTickLabelFn(ie),labelFns:s.makeLabelFns(ie,x)})}function xe(){var r,s=Y+S/2;-1===de.indexOf("inside")&&(r=f.bBox(pe.node()),s+=a?r.width:r.height),ue=he.select("text");var c=0,h=a&&"top"===j,g=!a&&"right"===j,m=0;if(ue.node()&&!ue.classed(T.jsPlaceholder)){var y,b=he.select(".h"+ie._id+"title-math-group").node();b&&(a&&oe||!a&&!oe)?(c=(r=f.bBox(b)).width,y=r.height):(c=(r=f.bBox(he.node())).right-N.l-(a?J:re),y=r.bottom-N.t-(a?re:J),a||"top"!==j||(s+=r.height,m=r.height)),g&&(ue.attr("transform",u(c/2+fe/2,0)),c*=2),s=Math.max(s,a?c:y)}var _=2*(a?L:D)+s+E+S/2,w=0;!a&&B.text&&"bottom"===O&&R<=0&&(_+=w=_/2,m+=w),P._hColorbarMoveTitle=w,P._hColorbarMoveCBTitle=m;var z=E+S;e.select("."+T.cbbg).attr("x",(a?J:re)-z/2-(a?L:0)).attr("y",(a?re:J)-(a?Z:D+m-w)).attr(a?"width":"height",Math.max(_-w,2)).attr(a?"height":"width",Math.max(Z+z,2)).call(p.fill,C).call(p.stroke,t.bordercolor).style("stroke-width",E);var F=g?Math.max(c-10,0):0;if(e.selectAll("."+T.cboutline).attr("x",(a?J:re+L)+F).attr("y",(a?re+D-Z:J)+(h?ge:0)).attr(a?"width":"height",Math.max(Y,2)).attr(a?"height":"width",Math.max(Z-(a?2*D+ge:2*L+F),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":S}),e.attr("transform",u(N.l-(a?Q*_:0),N.t-(a?0:(1-ee)*_-m))),!a&&(E||i(C).getAlpha()&&!i.equals(P.paper_bgcolor,C))){var U=pe.selectAll("text"),V=U[0].length,q=e.select("."+T.cbbg).node(),H=f.bBox(q),$=f.getTranslate(e),W=2;U.each((function(e,t){var n=0,r=V-1;if(t===n||t===r){var i,o=f.bBox(this),a=f.getTranslate(this);if(t===r){var s=o.right+a.x;(i=H.right+$.x+re-E-W+I-s)>0&&(i=0)}else if(t===n){var l=o.left+a.x;(i=H.left+$.x+re+E+W-l)<0&&(i=0)}i&&(V<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var G={},X=A[M],K=k[M],te=A[O],ne=k[O],ae=_-Y;a?("pixels"===d?(G.y=R,G.t=Z*te,G.b=Z*ne):(G.t=G.b=0,G.yt=R+l*te,G.yb=R-l*ne),"pixels"===x?(G.x=I,G.l=_*X,G.r=_*K):(G.l=ae*X,G.r=ae*K,G.xl=I-v*X,G.xr=I+v*K)):("pixels"===d?(G.x=I,G.l=Z*X,G.r=Z*K):(G.l=G.r=0,G.xl=I+l*X,G.xr=I-l*K),"pixels"===x?(G.y=1-R,G.t=_*te,G.b=_*ne):(G.t=ae*te,G.b=ae*ne,G.yt=R-v*te,G.yb=R+v*ne)),o.autoMargin(n,t._id,G)}return c.syncOrAsync([o.previousPromises,ye,_e,be,o.previousPromises,xe],n)}(n,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,n){var r,i,o,s="v"===t.orientation,c=n._fullLayout._size;l.init({element:e.node(),gd:n,prepFn:function(){r=e.attr("transform"),d(e)},moveFn:function(n,a){e.attr("transform",r+u(n,a)),i=l.align((s?t._uFrac:t._vFrac)+n/c.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=l.align((s?t._vFrac:1-t._uFrac)-a/c.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var h=l.getCursor(i,o,t.xanchor,t.yanchor);d(e,h)},doneFn:function(){if(d(e),void 0!==i&&void 0!==o){var r={};r[t._propPrefix+"x"]=i,r[t._propPrefix+"y"]=o,void 0!==t._traceIndex?a.call("_guiRestyle",n,r,t._traceIndex):a.call("_guiRelayout",n,r)}}})}(n,t,e)})),t.exit().each((function(t){o.autoMargin(e,t._id)})).remove(),t.order()}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/extend":493,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"../../plots/plots":619,"../../registry":638,"../color":366,"../colorscale/helpers":377,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":368,"@plotly/d3":58,tinycolor2:312}],371:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e){return r.isPlainObject(e.colorbar)}},{"../../lib":503}],372:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":367,"./defaults":369,"./draw":370,"./has_colorbar":371}],373:[function(e,t,n){"use strict";var r=e("../colorbar/attributes"),i=e("../../lib/regex").counter,o=e("../../lib/sort_object_keys"),a=e("./scales.js").scales;function s(e){return"`"+e+"`"}o(a),t.exports=function(e,t){e=e||"";var n,o=(t=t||{}).cLetter||"c",l=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===o,u="string"==typeof t.colorscaleDflt?a[t.colorscaleDflt]:null,h=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(n=t.colorAttr,t.colorAttr):s(d+(n={z:"z",c:"color"}[o]));var f=o+"auto",p=o+"min",g=o+"max",m=o+"mid",v=(s(d+f),s(d+p),s(d+g),{});v[p]=v[g]=void 0;var y={};y[f]=!1;var b={};return"color"===n&&(b.color={valType:"color",arrayOk:!0,editType:h||"style"},t.anim&&(b.color.anim=!0)),b[f]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},b[p]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},b[g]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:y},b[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},b.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},b.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},b.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(b.showscale={valType:"boolean",dflt:c,editType:"calc"},b.colorbar=r),t.noColorAxis||(b.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),b}},{"../../lib/regex":520,"../../lib/sort_object_keys":526,"../colorbar/attributes":367,"./scales.js":381}],374:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("./helpers").extractOpts;t.exports=function(e,t,n){var a,s=e._fullLayout,l=n.vals,c=n.containerStr,u=c?i.nestedProperty(t,c).get():t,h=o(u),d=!1!==h.auto,f=h.min,p=h.max,g=h.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===f?f=m():d&&(f=u._colorAx&&r(f)?Math.min(f,m()):m()),void 0===p?p=v():d&&(p=u._colorAx&&r(p)?Math.max(p,v()):v()),d&&void 0!==g&&(p-g>g-f?f=g-(p-g):p-g<g-f&&(p=g+(g-f))),f===p&&(f-=.5,p+=.5),h._sync("min",f),h._sync("max",p),h.autocolorscale&&(a=f*p<0?s.colorscale.diverging:f>=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",a))}},{"../../lib":503,"./helpers":377,"fast-isnumeric":190}],375:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./helpers").hasColorscale,o=e("./helpers").extractOpts;t.exports=function(e,t){function n(e,t){var n=e["_"+t];void 0!==n&&(e[t]=n)}function a(e,i){var a=i.container?r.nestedProperty(e,i.container).get():e;if(a)if(a.coloraxis)a._colorAx=t[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&n(a,i.min),(l||void 0===s.max)&&n(a,i.max),s.autocolorscale&&n(a,"colorscale")}}for(var s=0;s<e.length;s++){var l=e[s],c=l._module.colorbar;if(c)if(Array.isArray(c))for(var u=0;u<c.length;u++)a(l,c[u]);else a(l,c);i(l,"marker.line")&&a(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var h in t._colorAxes)a(t[h],{min:"cmin",max:"cmax"})}},{"../../lib":503,"./helpers":377}],376:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../colorbar/has_colorbar"),a=e("../colorbar/defaults"),s=e("./scales").isValid,l=e("../../registry").traceIs;function c(e,t){var n=t.slice(0,t.length-1);return t?i.nestedProperty(e,n).get()||{}:e}t.exports=function e(t,n,u,h,d){var f=d.prefix,p=d.cLetter,g="_module"in n,m=c(t,f),v=c(n,f),y=c(n._template||{},f)||{},b=function(){return delete t.coloraxis,delete n.coloraxis,e(t,n,u,h,d)};if(g){var _=u._colorAxes||{},x=h(f+"coloraxis");if(x){var w=l(n,"contour")&&i.nestedProperty(n,"contours.coloring").get()||"heatmap",A=_[x];return void(A?(A[2].push(b),A[0]!==w&&(A[0]=!1,i.warn(["Ignoring coloraxis:",x,"setting","as it is linked to incompatible colorscales."].join(" ")))):_[x]=[w,n,[b]])}}var k=m[p+"min"],T=m[p+"max"],S=r(k)&&r(T)&&k<T;h(f+p+"auto",!S)?h(f+p+"mid"):(h(f+p+"min"),h(f+p+"max"));var E,C,M=m.colorscale,O=y.colorscale;void 0!==M&&(E=!s(M)),void 0!==O&&(E=!s(O)),h(f+"autocolorscale",E),h(f+"colorscale"),h(f+"reversescale"),"marker.line."!==f&&(f&&g&&(C=o(m)),h(f+"showscale",C)&&(f&&y&&(v._template=y),a(m,v,u)))}},{"../../lib":503,"../../registry":638,"../colorbar/defaults":369,"../colorbar/has_colorbar":371,"./scales":381,"fast-isnumeric":190}],377:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("tinycolor2"),o=e("fast-isnumeric"),a=e("../../lib"),s=e("../color"),l=e("./scales").isValid;var c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function h(e){var t,n,r,i=e._colorAx,o=i||e,a={};for(n=0;n<c.length;n++)a[r=c[n]]=o[r];if(i)for(t="c",n=0;n<u.length;n++)a[r=u[n]]=o["c"+r];else{var s;for(n=0;n<u.length;n++)((s="c"+(r=u[n]))in o||(s="z"+r)in o)&&(a[r]=o[s]);t=s.charAt(0)}return a._sync=function(e,n){var r=-1!==u.indexOf(e)?t+e:e;o[r]=o["_"+r]=n},a}function d(e){for(var t=h(e),n=t.min,r=t.max,i=t.reversescale?f(t.colorscale):t.colorscale,o=i.length,a=new Array(o),s=new Array(o),l=0;l<o;l++){var c=i[l];a[l]=n+c[0]*(r-n),s[l]=c[1]}return{domain:a,range:s}}function f(e){for(var t=e.length,n=new Array(t),r=t-1,i=0;r>=0;r--,i++){var o=e[r];n[i]=[1-o[0],o[1]]}return n}function p(e,t){t=t||{};for(var n=e.domain,a=e.range,l=a.length,c=new Array(l),u=0;u<l;u++){var h=i(a[u]).toRgb();c[u]=[h.r,h.g,h.b,h.a]}var d,f=r.scale.linear().domain(n).range(c).clamp(!0),p=t.noNumericCheck,m=t.returnArray;return(d=p&&m?f:p?function(e){return g(f(e))}:m?function(e){return o(e)?f(e):i(e).isValid()?e:s.defaultLine}:function(e){return o(e)?g(f(e)):i(e).isValid()?e:s.defaultLine}).domain=f.domain,d.range=function(){return a},d}function g(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return i(t).toRgbString()}t.exports={hasColorscale:function(e,t,n){var r=t?a.nestedProperty(e,t).get()||{}:e,i=r[n||"color"],s=!1;if(a.isArrayOrTypedArray(i))for(var c=0;c<i.length;c++)if(o(i[c])){s=!0;break}return a.isPlainObject(r)&&(s||!0===r.showscale||o(r.cmin)&&o(r.cmax)||l(r.colorscale)||a.isPlainObject(r.colorbar))},extractOpts:h,extractScale:d,flipScale:f,makeColorScaleFunc:p,makeColorScaleFuncFromTrace:function(e,t){return p(d(e),t)}}},{"../../lib":503,"../color":366,"./scales":381,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],378:[function(e,t,n){"use strict";var r=e("./scales"),i=e("./helpers");t.exports={moduleType:"component",name:"colorscale",attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),handleDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc"),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},{"./attributes":373,"./calc":374,"./cross_trace_defaults":375,"./defaults":376,"./helpers":377,"./layout_attributes":379,"./layout_defaults":380,"./scales":381}],379:[function(e,t,n){"use strict";var r=e("../../lib/extend").extendFlat,i=e("./attributes"),o=e("./scales").scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc"}},coloraxis:r({_isSubplotObj:!0,editType:"calc"},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},{"../../lib/extend":493,"./attributes":373,"./scales":381}],380:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("./layout_attributes"),a=e("./defaults");t.exports=function(e,t){function n(n,i){return r.coerce(e,t,o,n,i)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var s,l,c=t._colorAxes;function u(e,t){return r.coerce(s,l,o.coloraxis,e,t)}for(var h in c){var d=c[h];if(d[0])s=e[h]||{},(l=i.newContainer(t,h,"coloraxis"))._name=h,a(s,l,t,u,{prefix:"",cLetter:"c"});else{for(var f=0;f<d[2].length;f++)d[2][f]();delete t._colorAxes[h]}}}},{"../../lib":503,"../../plot_api/plot_template":543,"./defaults":376,"./layout_attributes":379}],381:[function(e,t,n){"use strict";var r=e("tinycolor2"),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},o=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var n=0;n<e.length;n++){var i=e[n];if(2!==i.length||+i[0]<t||!r(i[1]).isValid())return!1;t=+i[0]}return!0}t.exports={scales:i,defaultScale:o,get:function(e,t){if(t||(t=o),!e)return t;function n(){try{e=i[e]||JSON.parse(e)}catch(n){e=t}}return"string"==typeof e&&(n(),"string"==typeof e&&n()),a(e)?e:t},isValid:function(e){return void 0!==i[e]||a(e)}}},{tinycolor2:312}],382:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){var o=(e-n)/(r-n),a=o+t/(r-n),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},{}],383:[function(e,t,n){"use strict";var r=e("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,n,o){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===o?0:"middle"===o?1:"top"===o?2:r.constrain(Math.floor(3*t),0,2),i[t][e]}},{"../../lib":503}],384:[function(e,t,n){"use strict";n.selectMode=function(e){return"lasso"===e||"select"===e},n.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},n.openMode=function(e){return"drawline"===e||"drawopenpath"===e},n.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},n.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},n.selectingOrDrawing=function(e){return n.freeMode(e)||n.rectMode(e)}},{}],385:[function(e,t,n){"use strict";var r=e("mouse-event-offset"),i=e("has-hover"),o=e("has-passive-events"),a=e("../../lib").removeElement,s=e("../../plots/cartesian/constants"),l=t.exports={};l.align=e("./align"),l.getCursor=e("./cursor");var c=e("./unhover");function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function h(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(e){var t,n,r,c,d,f,p,g,m=e.gd,v=1,y=m._context.doubleClickDelay,b=e.element;m._mouseDownTime||(m._mouseDownTime=0),b.style.pointerEvents="all",b.onmousedown=x,o?(b._ontouchstart&&b.removeEventListener("touchstart",b._ontouchstart),b._ontouchstart=x,b.addEventListener("touchstart",x,{passive:!1})):b.ontouchstart=x;var _=e.clampFn||function(e,t,n){return Math.abs(e)<n&&(e=0),Math.abs(t)<n&&(t=0),[e,t]};function x(o){m._dragged=!1,m._dragging=!0;var a=h(o);t=a[0],n=a[1],p=o.target,f=o,g=2===o.buttons||o.ctrlKey,void 0===o.clientX&&void 0===o.clientY&&(o.clientX=t,o.clientY=n),(r=(new Date).getTime())-m._mouseDownTime<y?v+=1:(v=1,m._mouseDownTime=r),e.prepFn&&e.prepFn(o,t,n),i&&!g?(d=u()).style.cursor=window.getComputedStyle(b).cursor:i||(d=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(b).cursor),document.addEventListener("mouseup",A),document.addEventListener("touchend",A),!1!==e.dragmode&&(o.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(r){r.preventDefault();var i=h(r),o=e.minDrag||s.MINDRAG,a=_(i[0]-t,i[1]-n,o),c=a[0],u=a[1];(c||u)&&(m._dragged=!0,l.unhover(m,r)),m._dragged&&e.moveFn&&!g&&(m._dragdata={element:b,dx:c,dy:u},e.moveFn(c,u))}function A(t){if(delete m._dragdata,!1!==e.dragmode&&(t.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),i?a(d):c&&(d.documentElement.style.cursor=c,c=null),m._dragging){if(m._dragging=!1,(new Date).getTime()-m._mouseDownTime>y&&(v=Math.max(v-1,1)),m._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,f),!g){var n;try{n=new MouseEvent("click",t)}catch(e){var r=h(t);(n=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,r[0],r[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(n)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{"../../lib":503,"../../plots/cartesian/constants":561,"./align":382,"./cursor":383,"./unhover":386,"has-hover":228,"has-passive-events":229,"mouse-event-offset":242}],386:[function(e,t,n){"use strict";var r=e("../../lib/events"),i=e("../../lib/throttle"),o=e("../../lib/dom").getGraphDiv,a=e("../fx/constants"),s=t.exports={};s.wrapped=function(e,t,n){(e=o(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID),s.raw(e,t,n)},s.raw=function(e,t){var n=e._fullLayout,i=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===r.triggerHandler(e,"plotly_beforehover",t)||(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},{"../../lib/dom":491,"../../lib/events":492,"../../lib/throttle":530,"../fx/constants":400}],387:[function(e,t,n){"use strict";n.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},n.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],388:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=i.numberFormat,a=e("fast-isnumeric"),s=e("tinycolor2"),l=e("../../registry"),c=e("../color"),u=e("../colorscale"),h=i.strTranslate,d=e("../../lib/svg_text_utils"),f=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,g=e("../../constants/interactions").DESELECTDIM,m=e("../../traces/scatter/subtypes"),v=e("../../traces/scatter/make_bubble_size_func"),y=e("../../components/fx/helpers").appendArrayPointValue,b=t.exports={};b.font=function(e,t,n,r){i.isPlainObject(t)&&(r=t.color,n=t.size,t=t.family),t&&e.style("font-family",t),n+1&&e.style("font-size",n+"px"),r&&e.call(c.fill,r)},b.setPosition=function(e,t,n){e.attr("x",t).attr("y",n)},b.setSize=function(e,t,n){e.attr("width",t).attr("height",n)},b.setRect=function(e,t,n,r,i){e.call(b.setPosition,t,n).call(b.setSize,r,i)},b.translatePoint=function(e,t,n,r){var i=n.c2p(e.x),o=r.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform",h(i,o)),!0)},b.translatePoints=function(e,t,n){e.each((function(e){var i=r.select(this);b.translatePoint(e,i,t,n)}))},b.hideOutsideRangePoint=function(e,t,n,r,i,o){t.attr("display",n.isPtWithinRange(e,i)&&r.isPtWithinRange(e,o)?null:"none")},b.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var n=t.xaxis,i=t.yaxis;e.each((function(t){var o=t[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){b.hideOutsideRangePoint(e,r.select(this),n,i,a,s)}))}))}},b.crispRound=function(e,t,n){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):n||0},b.singleLineStyle=function(e,t,n,r,i){t.style("fill","none");var o=(((e||[])[0]||{}).trace||{}).line||{},a=n||o.width||0,s=i||o.dash||"";c.stroke(t,r||o.color),b.dashLine(t,s,a)},b.lineGroupStyle=function(e,t,n,i){e.style("fill","none").each((function(e){var o=(((e||[])[0]||{}).trace||{}).line||{},a=t||o.width||0,s=i||o.dash||"";r.select(this).call(c.stroke,n||o.color).call(b.dashLine,s,a)}))},b.dashLine=function(e,t,n){n=+n||0,t=b.dashStyle(t,n),e.style({"stroke-dasharray":t,"stroke-width":n+"px"})},b.dashStyle=function(e,t){t=+t||1;var n=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),e},b.singleFillStyle=function(e){var t=(((r.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(c.fill,t)},b.fillGroupStyle=function(e){e.style("stroke-width",0).each((function(e){var t=r.select(this);e[0].trace&&t.call(c.fill,e[0].trace.fillcolor)}))};var _=e("./symbol_defs");b.symbolNames=[],b.symbolFuncs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(_).forEach((function(e){var t=_[e],n=t.n;b.symbolList.push(n,String(n),e,n+100,String(n+100),e+"-open"),b.symbolNames[n]=e,b.symbolFuncs[n]=t.f,t.needLine&&(b.symbolNeedLines[n]=!0),t.noDot?b.symbolNoDot[n]=!0:b.symbolList.push(n+200,String(n+200),e+"-dot",n+300,String(n+300),e+"-open-dot"),t.noFill&&(b.symbolNoFill[n]=!0)}));var x=b.symbolNames.length;function w(e,t){var n=e%100;return b.symbolFuncs[n](t)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(e){if(a(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=b.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=x||e>=400?0:Math.floor(Math.max(e,0))};var A={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},T=o("~f"),S={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:A},horizontalreversed:{node:"linearGradient",attrs:A,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};b.gradient=function(e,t,n,o,a,l){for(var u=a.length,h=S[o],d=new Array(u),f=0;f<u;f++)h.reversed?d[u-1-f]=[T(100*(1-a[f][0])),a[f][1]]:d[f]=[T(100*a[f][0]),a[f][1]];var p=t._fullLayout,g="g"+p._uid+"-"+n,m=p._defs.select(".gradients").selectAll("#"+g).data([o+d.join(";")],i.identity);m.exit().remove(),m.enter().append(h.node).each((function(){var e=r.select(this);h.attrs&&e.attr(h.attrs),e.attr("id",g);var t=e.selectAll("stop").data(d);t.exit().remove(),t.enter().append("stop"),t.each((function(e){var t=s(e[1]);r.select(this).attr({offset:e[0]+"%","stop-color":c.tinyRGB(t),"stop-opacity":t.getAlpha()})}))})),e.style(l,P(g,t)).style(l+"-opacity",null);var v=function(e){return"."+e.attr("class").replace(/\s/g,".")},y=v(r.select(e.node().parentNode))+">"+v(e);p._gradientUrlQueryParts[y]=1},b.pattern=function(e,t,n,o,a,s,l,u,h,d,f,p){var g="legend"===t;u&&("overlay"===h?(d=u,f=c.contrast(d)):(d=void 0,f=u));var m,v,y,b,_,x,w,A,k,T,S,E=n._fullLayout,C="p"+E._uid+"-"+o,M={};switch(a){case"/":m=s*Math.sqrt(2),v=s*Math.sqrt(2),x="path",M={d:y="M-"+m/4+","+v/4+"l"+m/2+",-"+v/2+"M0,"+v+"L"+m+",0M"+m/4*3+","+v/4*5+"l"+m/2+",-"+v/2,opacity:p,stroke:f,"stroke-width":(b=l*s)+"px"};break;case"\\":m=s*Math.sqrt(2),v=s*Math.sqrt(2),x="path",M={d:y="M"+m/4*3+",-"+v/4+"l"+m/2+","+v/2+"M0,0L"+m+","+v+"M-"+m/4+","+v/4*3+"l"+m/2+","+v/2,opacity:p,stroke:f,"stroke-width":(b=l*s)+"px"};break;case"x":m=s*Math.sqrt(2),v=s*Math.sqrt(2),y="M-"+m/4+","+v/4+"l"+m/2+",-"+v/2+"M0,"+v+"L"+m+",0M"+m/4*3+","+v/4*5+"l"+m/2+",-"+v/2+"M"+m/4*3+",-"+v/4+"l"+m/2+","+v/2+"M0,0L"+m+","+v+"M-"+m/4+","+v/4*3+"l"+m/2+","+v/2,b=s-s*Math.sqrt(1-l),x="path",M={d:y,opacity:p,stroke:f,"stroke-width":b+"px"};break;case"|":x="path",x="path",M={d:y="M"+(m=s)/2+",0L"+m/2+","+(v=s),opacity:p,stroke:f,"stroke-width":(b=l*s)+"px"};break;case"-":x="path",x="path",M={d:y="M0,"+(v=s)/2+"L"+(m=s)+","+v/2,opacity:p,stroke:f,"stroke-width":(b=l*s)+"px"};break;case"+":x="path",y="M"+(m=s)/2+",0L"+m/2+","+(v=s)+"M0,"+v/2+"L"+m+","+v/2,b=s-s*Math.sqrt(1-l),x="path",M={d:y,opacity:p,stroke:f,"stroke-width":b+"px"};break;case".":m=s,v=s,_=l<Math.PI/4?Math.sqrt(l*s*s/Math.PI):(w=l,A=Math.PI/4,k=1,T=s/2,S=s/Math.sqrt(2),T+(S-T)*(w-A)/(k-A)),x="circle",M={cx:m/2,cy:v/2,r:_,opacity:p,fill:f}}var O=[a||"noSh",d||"noBg",f||"noFg",s,l].join(";"),L=E._defs.select(".patterns").selectAll("#"+C).data([O],i.identity);L.exit().remove(),L.enter().append("pattern").each((function(){var e=r.select(this);if(e.attr({id:C,width:m+"px",height:v+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),d){var t=e.selectAll("rect").data([0]);t.exit().remove(),t.enter().append("rect").attr({width:m+"px",height:v+"px",fill:d})}var n=e.selectAll(x).data([0]);n.exit().remove(),n.enter().append(x).attr(M)})),e.style("fill",P(C,n)).style("fill-opacity",null),e.classed("pattern_filled",!0);var D="."+r.select(e.node().parentNode).attr("class").replace(/\s/g,".")+">.pattern_filled";E._patternUrlQueryParts[D]=1},b.initGradients=function(e){var t=e._fullLayout;i.ensureSingle(t._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),t._gradientUrlQueryParts={}},b.initPatterns=function(e){var t=e._fullLayout;i.ensureSingle(t._defs,"g","patterns").selectAll("pattern").remove(),t._patternUrlQueryParts={}},b.getPatternAttr=function(e,t,n){return e&&i.isArrayOrTypedArray(e)?t<e.length?e[t]:n:e},b.pointStyle=function(e,t,n){if(e.size()){var i=b.makePointStyleFns(t);e.each((function(e){b.singlePointStyle(e,r.select(this),t,i,n)}))}},b.singlePointStyle=function(e,t,n,r,o){var a=n.marker,s=a.line;if(t.style("opacity",r.selectedOpacityFn?r.selectedOpacityFn(e):void 0===e.mo?a.opacity:e.mo),r.ms2mrc){var l;l="various"===e.ms||"various"===a.size?3:r.ms2mrc(e.ms),e.mrc=l,r.selectedSizeFn&&(l=e.mrc=r.selectedSizeFn(e));var u=b.symbolNumber(e.mx||a.symbol)||0;e.om=u%200>=100,t.attr("d",w(u,l))}var h,d,f,p=!1;if(e.so)f=s.outlierwidth,d=s.outliercolor,h=a.outliercolor;else{var g=(s||{}).width;f=(e.mlw+1||g+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,d="mlc"in e?e.mlcc=r.lineScale(e.mlc):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(a.color)&&(h=c.defaultLine,p=!0),h="mc"in e?e.mcc=r.markerScale(e.mc):a.color||"rgba(0,0,0,0)",r.selectedColorFn&&(h=r.selectedColorFn(e))}if(e.om)t.call(c.stroke,h).style({"stroke-width":(f||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:f)+"px");var m=a.gradient,v=e.mgt;v?p=!0:v=m&&m.type,i.isArrayOrTypedArray(v)&&(v=v[0],S[v]||(v=0));var y=a.pattern,_=y&&b.getPatternAttr(y.shape,e.i,"");if(v&&"none"!==v){var x=e.mgc;x?p=!0:x=m.color;var A=n.uid;p&&(A+="-"+e.i),b.gradient(t,o,A,v,[[0,x],[1,h]],"fill")}else if(_){var k=b.getPatternAttr(y.bgcolor,e.i,null),T=b.getPatternAttr(y.fgcolor,e.i,null),E=y.fgopacity,C=b.getPatternAttr(y.size,e.i,8),M=b.getPatternAttr(y.solidity,e.i,.3),O=e.mcc||i.isArrayOrTypedArray(y.shape)||i.isArrayOrTypedArray(y.bgcolor)||i.isArrayOrTypedArray(y.size)||i.isArrayOrTypedArray(y.solidity),L=n.uid;O&&(L+="-"+e.i),b.pattern(t,"point",o,L,_,C,M,e.mcc,y.fillmode,k,T,E)}else c.fill(t,h);f&&c.stroke(t,d)}},b.makePointStyleFns=function(e){var t={},n=e.marker;return t.markerScale=b.tryColorscale(n,""),t.lineScale=b.tryColorscale(n,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?v(e):function(){return(n.size||6)/2}),e.selectedpoints&&i.extendFlat(t,b.makeSelectedPointStyleFns(e)),t},b.makeSelectedPointStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},o=e.marker||{},a=n.marker||{},s=r.marker||{},c=o.opacity,u=a.opacity,h=s.opacity,d=void 0!==u,f=void 0!==h;(i.isArrayOrTypedArray(c)||d||f)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?o.opacity:e.mo;return e.selected?d?u:t:f?h:g*t});var p=o.color,m=a.color,v=s.color;(m||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?m||t:v||t});var y=o.size,b=a.size,_=s.size,x=void 0!==b,w=void 0!==_;return l.traceIs(e,"symbols")&&(x||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?x?b/2:t:w?_/2:t}),t},b.makeSelectedTextStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},i=e.textfont||{},o=n.textfont||{},a=r.textfont||{},s=i.color,l=o.color,u=a.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:u||(l?t:c.addOpacity(t,g))},t},b.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=b.makeSelectedPointStyleFns(t),i=t.marker||{},o=[];n.selectedOpacityFn&&o.push((function(e,t){e.style("opacity",n.selectedOpacityFn(t))})),n.selectedColorFn&&o.push((function(e,t){c.fill(e,n.selectedColorFn(t))})),n.selectedSizeFn&&o.push((function(e,t){var r=t.mx||i.symbol||0,o=n.selectedSizeFn(t);e.attr("d",w(b.symbolNumber(r),o)),t.mrc2=o})),o.length&&e.each((function(e){for(var t=r.select(this),n=0;n<o.length;n++)o[n](t,e)}))}},b.tryColorscale=function(e,t){var n=t?i.nestedProperty(e,t).get():e;if(n){var r=n.color;if((n.colorscale||n._colorAx)&&i.isArrayOrTypedArray(r))return u.makeColorScaleFuncFromTrace(n)}return i.identity};var E={start:1,end:-1,middle:0,bottom:1,top:-1};function C(e,t,n,i,o){var a=r.select(e.node().parentNode),s=-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle",l=-1!==t.indexOf("left")?"end":-1!==t.indexOf("right")?"start":"middle",c=i?i/.8+1:0,u=(d.lineCount(e)-1)*p+1,f=E[l]*c,g=.75*n+E[s]*c+(E[s]-1)*u*n/2;e.attr("text-anchor",l),o||a.attr("transform",h(f,g))}function M(e,t){var n=e.ts||t.textfont.size;return a(n)&&n>0?n:0}b.textPointStyle=function(e,t,n){if(e.size()){var o;if(t.selectedpoints){var a=b.makeSelectedTextStyleFns(t);o=a.selectedTextColorFn}var s=t.texttemplate,l=n._fullLayout;e.each((function(e){var a=r.select(this),c=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,h=u?u(e,t,l):{},f={};y(f,t,e.i);var p=t._meta||{};c=i.texttemplateString(c,h,l._d3locale,f,e,p)}var g=e.tp||t.textposition,m=M(e,t),v=o?o(e):e.tc||t.textfont.color;a.call(b.font,e.tf||t.textfont.family,m,v).text(c).call(d.convertToTspans,n).call(C,g,m,e.mrc)}else a.remove()}))}},b.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=b.makeSelectedTextStyleFns(t);e.each((function(e){var i=r.select(this),o=n.selectedTextColorFn(e),a=e.tp||t.textposition,s=M(e,t);c.fill(i,o);var u=l.traceIs(t,"bar-like");C(i,a,s,e.mrc2||e.mrc,u)}))}};function O(e,t,n,i){var o=e[0]-t[0],a=e[1]-t[1],s=n[0]-t[0],l=n[1]-t[1],c=Math.pow(o*o+a*a,.25),u=Math.pow(s*s+l*l,.25),h=(u*u*o-c*c*s)*i,d=(u*u*a-c*c*l)*i,f=3*u*(c+u),p=3*c*(c+u);return[[r.round(t[0]+(f&&h/f),2),r.round(t[1]+(f&&d/f),2)],[r.round(t[0]-(p&&h/p),2),r.round(t[1]-(p&&d/p),2)]]}b.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var n,r="M"+e[0],i=[];for(n=1;n<e.length-1;n++)i.push(O(e[n-1],e[n],e[n+1],t));for(r+="Q"+i[0][0]+" "+e[1],n=2;n<e.length-1;n++)r+="C"+i[n-2][1]+" "+i[n-1][0]+" "+e[n];return r+"Q"+i[e.length-3][1]+" "+e[e.length-1]},b.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var n,r="M"+e[0],i=e.length-1,o=[O(e[i],e[0],e[1],t)];for(n=1;n<i;n++)o.push(O(e[n-1],e[n],e[n+1],t));for(o.push(O(e[i-1],e[i],e[0],t)),n=1;n<=i;n++)r+="C"+o[n-1][1]+" "+o[n][0]+" "+e[n];return r+"C"+o[i][1]+" "+o[0][0]+" "+e[0]+"Z"};var L={hv:function(e,t){return"H"+r.round(t[0],2)+"V"+r.round(t[1],2)},vh:function(e,t){return"V"+r.round(t[1],2)+"H"+r.round(t[0],2)},hvh:function(e,t){return"H"+r.round((e[0]+t[0])/2,2)+"V"+r.round(t[1],2)+"H"+r.round(t[0],2)},vhv:function(e,t){return"V"+r.round((e[1]+t[1])/2,2)+"H"+r.round(t[0],2)+"V"+r.round(t[1],2)}},D=function(e,t){return"L"+r.round(t[0],2)+","+r.round(t[1],2)};b.steps=function(e){var t=L[e]||D;return function(e){for(var n="M"+r.round(e[0][0],2)+","+r.round(e[0][1],2),i=1;i<e.length;i++)n+=t(e[i-1],e[i]);return n}},b.makeTester=function(){var e=i.ensureSingleById(r.select("body"),"svg","js-plotly-tester",(function(e){e.attr(f.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),t=i.ensureSingle(e,"path","js-reference-point",(function(e){e.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));b.tester=e,b.testref=t},b.savedBBoxes={};var I=0;function R(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}function P(e,t){if(!e)return null;var n=t._context,r=n._exportedPlot?"":n._baseUrl||"";return r?"url('"+r+"#"+e+"')":"url(#"+e+")"}b.bBox=function(e,t,n){var o,a,s;if(n||(n=R(e)),n){if(o=b.savedBBoxes[n])return i.extendFlat({},o)}else if(1===e.childNodes.length){var l=e.childNodes[0];if(n=R(l)){var c=+l.getAttribute("x")||0,u=+l.getAttribute("y")||0,h=l.getAttribute("transform");if(!h){var f=b.bBox(l,!1,n);return c&&(f.left+=c,f.right+=c),u&&(f.top+=u,f.bottom+=u),f}if(n+="~"+c+"~"+u+"~"+h,o=b.savedBBoxes[n])return i.extendFlat({},o)}}t?a=e:(s=b.tester.node(),a=e.cloneNode(!0),s.appendChild(a)),r.select(a).attr("transform",null).call(d.positionText,0,0);var p=a.getBoundingClientRect(),g=b.testref.node().getBoundingClientRect();t||s.removeChild(a);var m={height:p.height,width:p.width,left:p.left-g.left,top:p.top-g.top,right:p.right-g.left,bottom:p.bottom-g.top};return I>=1e4&&(b.savedBBoxes={},I=0),n&&(b.savedBBoxes[n]=m),I++,i.extendFlat({},m)},b.setClipUrl=function(e,t,n){e.attr("clip-path",P(t,n))},b.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},b.setTranslate=function(e,t,n){var r=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[r]("transform")||"";return t=t||0,n=n||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=h(t,n)).trim(),e[i]("transform",o),o},b.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},b.setScale=function(e,t,n){var r=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[r]("transform")||"";return t=t||1,n=n||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+t+","+n+")").trim(),e[i]("transform",o),o};var N=/\s*sc.*/;b.setPointGroupScale=function(e,t,n){if(t=t||1,n=n||1,e){var r=1===t&&1===n?"":"scale("+t+","+n+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(N,"");e=(e+=r).trim(),this.setAttribute("transform",e)}))}};var z=/translate\([^)]*\)\s*$/;b.setTextPointsScale=function(e,t,n){e&&e.each((function(){var e,i=r.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(z);e=1===t&&1===n?[]:[h(a,s),"scale("+t+","+n+")",h(-a,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))}},{"../../components/fx/helpers":402,"../../constants/alignment":471,"../../constants/interactions":478,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../registry":638,"../../traces/scatter/make_bubble_size_func":943,"../../traces/scatter/subtypes":951,"../color":366,"../colorscale":378,"./symbol_defs":389,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],389:[function(e,t,n){"use strict";var r=e("@plotly/d3");t.exports={circle:{n:0,f:function(e){var t=r.round(e,2);return"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"}},square:{n:1,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=r.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=r.round(.4*e,2),n=r.round(1.2*e,2);return"M"+n+","+t+"H"+t+"V"+n+"H-"+t+"V"+t+"H-"+n+"V-"+t+"H-"+t+"V-"+n+"H"+t+"V-"+t+"H"+n+"Z"}},x:{n:4,f:function(e){var t=r.round(.8*e/Math.sqrt(2),2),n="l"+t+","+t,i="l"+t+",-"+t,o="l-"+t+",-"+t,a="l-"+t+","+t;return"M0,"+t+n+i+o+i+o+a+o+a+n+a+n+"Z"}},"triangle-up":{n:5,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+t+","+r.round(e/2,2)+"H"+t+"L0,-"+r.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+r.round(e/2,2)+"H"+t+"L0,"+r.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M"+r.round(e/2,2)+",-"+t+"V"+t+"L-"+r.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=r.round(2*e/Math.sqrt(3),2);return"M-"+r.round(e/2,2)+",-"+t+"V"+t+"L"+r.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M-"+n+",-"+t+"H"+t+"V"+n+"Z"}},"triangle-se":{n:10,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M"+t+",-"+n+"V"+t+"H-"+n+"Z"}},"triangle-sw":{n:11,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M"+n+","+t+"H-"+t+"V-"+n+"Z"}},"triangle-nw":{n:12,f:function(e){var t=r.round(.6*e,2),n=r.round(1.2*e,2);return"M-"+t+","+n+"V-"+t+"H"+n+"Z"}},pentagon:{n:13,f:function(e){var t=r.round(.951*e,2),n=r.round(.588*e,2),i=r.round(-e,2),o=r.round(-.309*e,2);return"M"+t+","+o+"L"+n+","+r.round(.809*e,2)+"H-"+n+"L-"+t+","+o+"L0,"+i+"Z"}},hexagon:{n:14,f:function(e){var t=r.round(e,2),n=r.round(e/2,2),i=r.round(e*Math.sqrt(3)/2,2);return"M"+i+",-"+n+"V"+n+"L0,"+t+"L-"+i+","+n+"V-"+n+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=r.round(e,2),n=r.round(e/2,2),i=r.round(e*Math.sqrt(3)/2,2);return"M-"+n+","+i+"H"+n+"L"+t+",0L"+n+",-"+i+"H-"+n+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=r.round(.924*e,2),n=r.round(.383*e,2);return"M-"+n+",-"+t+"H"+n+"L"+t+",-"+n+"V"+n+"L"+n+","+t+"H-"+n+"L-"+t+","+n+"V-"+n+"Z"}},star:{n:17,f:function(e){var t=1.4*e,n=r.round(.225*t,2),i=r.round(.951*t,2),o=r.round(.363*t,2),a=r.round(.588*t,2),s=r.round(-t,2),l=r.round(-.309*t,2),c=r.round(.118*t,2),u=r.round(.809*t,2);return"M"+n+","+l+"H"+i+"L"+o+","+c+"L"+a+","+u+"L0,"+r.round(.382*t,2)+"L-"+a+","+u+"L-"+o+","+c+"L-"+i+","+l+"H-"+n+"L0,"+s+"Z"}},hexagram:{n:18,f:function(e){var t=r.round(.66*e,2),n=r.round(.38*e,2),i=r.round(.76*e,2);return"M-"+i+",0l-"+n+",-"+t+"h"+i+"l"+n+",-"+t+"l"+n+","+t+"h"+i+"l-"+n+","+t+"l"+n+","+t+"h-"+i+"l-"+n+","+t+"l-"+n+",-"+t+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=r.round(e*Math.sqrt(3)*.8,2),n=r.round(.8*e,2),i=r.round(1.6*e,2),o=r.round(4*e,2),a="A "+o+","+o+" 0 0 1 ";return"M-"+t+","+n+a+t+","+n+a+"0,-"+i+a+"-"+t+","+n+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=r.round(e*Math.sqrt(3)*.8,2),n=r.round(.8*e,2),i=r.round(1.6*e,2),o=r.round(4*e,2),a="A "+o+","+o+" 0 0 1 ";return"M"+t+",-"+n+a+"-"+t+",-"+n+a+"0,"+i+a+t+",-"+n+"Z"}},"star-square":{n:21,f:function(e){var t=r.round(1.1*e,2),n=r.round(2*e,2),i="A "+n+","+n+" 0 0 1 ";return"M-"+t+",-"+t+i+"-"+t+","+t+i+t+","+t+i+t+",-"+t+i+"-"+t+",-"+t+"Z"}},"star-diamond":{n:22,f:function(e){var t=r.round(1.4*e,2),n=r.round(1.9*e,2),i="A "+n+","+n+" 0 0 1 ";return"M-"+t+",0"+i+"0,"+t+i+t+",0"+i+"0,-"+t+i+"-"+t+",0Z"}},"diamond-tall":{n:23,f:function(e){var t=r.round(.7*e,2),n=r.round(1.4*e,2);return"M0,"+n+"L"+t+",0L0,-"+n+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=r.round(1.4*e,2),n=r.round(.7*e,2);return"M0,"+n+"L"+t+",0L0,-"+n+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"H-"+t+"L"+t+",-"+t+"H-"+t+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"V-"+t+"L-"+t+","+t+"V-"+t+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var t=r.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var t=r.round(e,2),n=r.round(e/Math.sqrt(2),2);return"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var t=r.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var t=r.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM0,-"+t+"V"+t+"M-"+t+",0H"+t},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var t=r.round(1.3*e,2),n=r.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=r.round(1.4*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var t=r.round(1.2*e,2),n=r.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=r.round(e/2,2),n=r.round(e,2);return"M"+t+","+n+"V-"+n+"m-"+n+",0V"+n+"M"+n+","+t+"H-"+n+"m0,-"+n+"H"+n},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),i=r.round(.8*e,2);return"M-"+t+","+i+"L0,0M"+t+","+i+"L0,0M0,-"+n+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),i=r.round(.8*e,2);return"M-"+t+",-"+i+"L0,0M"+t+",-"+i+"L0,0M0,"+n+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),i=r.round(.8*e,2);return"M"+i+","+t+"L0,0M"+i+",-"+t+"L0,0M-"+n+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=r.round(1.2*e,2),n=r.round(1.6*e,2),i=r.round(.8*e,2);return"M-"+i+","+t+"L0,0M-"+i+",-"+t+"L0,0M"+n+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=r.round(1.4*e,2);return"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var t=r.round(1.4*e,2);return"M0,"+t+"V-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var t=r.round(e,2);return"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var t=r.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e){var t=r.round(e,2);return"M0,0L-"+t+","+r.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-down":{n:46,f:function(e){var t=r.round(e,2);return"M0,0L-"+t+",-"+r.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-left":{n:47,f:function(e){var t=r.round(2*e,2),n=r.round(e,2);return"M0,0L"+t+",-"+n+"V"+n+"Z"},noDot:!0},"arrow-right":{n:48,f:function(e){var t=r.round(2*e,2),n=r.round(e,2);return"M0,0L-"+t+",-"+n+"V"+n+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(e){var t=r.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+","+r.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e){var t=r.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+",-"+r.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e){var t=r.round(2*e,2),n=r.round(e,2);return"M0,-"+n+"V"+n+"M0,0L"+t+",-"+n+"V"+n+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e){var t=r.round(2*e,2),n=r.round(e,2);return"M0,-"+n+"V"+n+"M0,0L-"+t+",-"+n+"V"+n+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":58}],390:[function(e,t,n){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],391:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../registry"),o=e("../../plots/cartesian/axes"),a=e("../../lib"),s=e("./compute_error");function l(e,t,n,i){var l=t["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(n.type)){for(var u=s(l),h=0;h<e.length;h++){var d=e[h],f=d.i;if(void 0===f)f=h;else if(null===f)continue;var p=d[i];if(r(n.c2l(p))){var g=u(p,f);if(r(g[0])&&r(g[1])){var m=d[i+"s"]=p-g[0],v=d[i+"h"]=p+g[1];c.push(m,v)}}}var y=n._id,b=t._extremes[y],_=o.findExtremes(n,c,a.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(_.min),b.max=b.max.concat(_.max)}}t.exports=function(e){for(var t=e.calcdata,n=0;n<t.length;n++){var r=t[n],a=r[0].trace;if(!0===a.visible&&i.traceIs(a,"errorBarsOK")){var s=o.getFromId(e,a.xaxis),c=o.getFromId(e,a.yaxis);l(r,a,s,"x"),l(r,a,c,"y")}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./compute_error":392,"fast-isnumeric":190}],392:[function(e,t,n){"use strict";function r(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}t.exports=function(e){var t=e.type,n=e.symmetric;if("data"===t){var i=e.array||[];if(n)return function(e,t){var n=+i[t];return[n,n]};var o=e.arrayminus||[];return function(e,t){var n=+i[t],r=+o[t];return isNaN(n)&&isNaN(r)?[NaN,NaN]:[r||0,n||0]}}var a=r(t,e.value),s=r(t,e.valueminus);return n||void 0===e.valueminus?function(e){var t=a(e);return[t,t]}:function(e){return[s(e),a(e)]}}},{}],393:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../registry"),o=e("../../lib"),a=e("../../plot_api/plot_template"),s=e("./attributes");t.exports=function(e,t,n,l){var c="error_"+l.axis,u=a.newContainer(t,c),h=e[c]||{};function d(e,t){return o.coerce(h,u,s,e,t)}if(!1!==d("visible",void 0!==h.array||void 0!==h.value||"sqrt"===h.type)){var f=d("type","array"in h?"data":"percent"),p=!0;"sqrt"!==f&&(p=d("symmetric",!(("data"===f?"arrayminus":"valueminus")in h))),"data"===f?(d("array"),d("traceref"),p||(d("arrayminus"),d("tracerefminus"))):"percent"!==f&&"constant"!==f||(d("value"),p||d("valueminus"));var g="copy_"+l.inherit+"style";l.inherit&&(t["error_"+l.inherit]||{}).visible&&d(g,!(h.color||r(h.thickness)||r(h.width))),l.inherit&&u[g]||(d("color",n),d("thickness"),d("width",i.traceIs(t,"gl3d")?0:4))}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638,"./attributes":390,"fast-isnumeric":190}],394:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plot_api/edit_types").overrideAll,o=e("./attributes"),a={error_x:r.extendFlat({},o),error_y:r.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:r.extendFlat({},o),error_y:r.extendFlat({},o),error_z:r.extendFlat({},o)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:e("./defaults"),calc:e("./calc"),makeComputeError:e("./compute_error"),plot:e("./plot"),style:e("./style"),hoverInfo:function(e,t,n){(t.error_y||{}).visible&&(n.yerr=e.yh-e.y,t.error_y.symmetric||(n.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(n.xerr=e.xh-e.x,t.error_x.symmetric||(n.xerrneg=e.x-e.xs))}}},{"../../lib":503,"../../plot_api/edit_types":536,"./attributes":390,"./calc":391,"./compute_error":392,"./defaults":393,"./plot":395,"./style":396}],395:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../drawing"),a=e("../../traces/scatter/subtypes");t.exports=function(e,t,n,s){var l=n.xaxis,c=n.yaxis,u=s&&s.duration>0;t.each((function(t){var h,d=t[0].trace,f=d.error_x||{},p=d.error_y||{};d.ids&&(h=function(e){return e.id});var g=a.hasMarkers(d)&&d.marker.maxdisplayed>0;p.visible||f.visible||(t=[]);var m=r.select(this).selectAll("g.errorbar").data(t,h);if(m.exit().remove(),t.length){f.visible||m.selectAll("path.xerror").remove(),p.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var v=m.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(m,n.layerClipId,e),m.each((function(e){var t=r.select(this),n=function(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return void 0!==e.yh&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),i(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),void 0!==e.xh&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),i(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}(e,l,c);if(!g||e.vis){var o,a=t.select("path.yerror");if(p.visible&&i(n.x)&&i(n.yh)&&i(n.ys)){var h=p.width;o="M"+(n.x-h)+","+n.yh+"h"+2*h+"m-"+h+",0V"+n.ys,n.noYS||(o+="m-"+h+",0h"+2*h),a.size()?u&&(a=a.transition().duration(s.duration).ease(s.easing)):a=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),a.attr("d",o)}else a.remove();var d=t.select("path.xerror");if(f.visible&&i(n.y)&&i(n.xh)&&i(n.xs)){var m=(f.copy_ystyle?p:f).width;o="M"+n.xh+","+(n.y-m)+"v"+2*m+"m0,-"+m+"H"+n.xs,n.noXS||(o+="m0,-"+m+"v"+2*m),d.size()?u&&(d=d.transition().duration(s.duration).ease(s.easing)):d=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),d.attr("d",o)}else d.remove()}}))}}))}},{"../../traces/scatter/subtypes":951,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],396:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../color");t.exports=function(e){e.each((function(e){var t=e[0].trace,n=t.error_y||{},o=t.error_x||{},a=r.select(this);a.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(i.stroke,n.color),o.copy_ystyle&&(o=n),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},{"../color":366,"@plotly/d3":58}],397:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("./layout_attributes").hoverlabel,o=e("../../lib/extend").extendFlat;t.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0}),bordercolor:o({},i.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":493,"../../plots/font_attributes":585,"./layout_attributes":407}],398:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry");function o(e,t,n,i){i=i||r.identity,Array.isArray(e)&&(t[0][n]=i(e))}t.exports=function(e){var t=e.calcdata,n=e._fullLayout;function a(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},n)}}for(var s=0;s<t.length;s++){var l=t[s],c=l[0].trace;if(!i.traceIs(c,"pie-like")){var u=i.traceIs(c,"2dMap")?o:r.fillArray;u(c.hoverinfo,l,"hi",a(c)),c.hovertemplate&&u(c.hovertemplate,l,"ht"),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,"hbg"),u(c.hoverlabel.bordercolor,l,"hbc"),u(c.hoverlabel.font.size,l,"hts"),u(c.hoverlabel.font.color,l,"htc"),u(c.hoverlabel.font.family,l,"htf"),u(c.hoverlabel.namelength,l,"hnl"),u(c.hoverlabel.align,l,"hta"))}}}},{"../../lib":503,"../../registry":638}],399:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("./hover").hover;t.exports=function(e,t,n){var o=r.getComponentMethod("annotations","onClick")(e,e._hoverdata);function a(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==n&&i(e,t,n,!0),e._hoverdata&&t&&t.target&&(o&&o.then?o.then(a):a(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},{"../../registry":638,"./hover":403}],400:[function(e,t,n){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],401:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("./hoverlabel_defaults");t.exports=function(e,t,n,a){var s=r.extendFlat({},a.hoverlabel);t.hovertemplate&&(s.namelength=-1),o(e,t,(function(n,o){return r.coerce(e,t,i,n,o)}),s)}},{"../../lib":503,"./attributes":397,"./hoverlabel_defaults":404}],402:[function(e,t,n){"use strict";var r=e("../../lib");n.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},n.isTraceInSubplots=function(e,t){if("splom"===e.type){for(var r=e.xaxes||[],i=e.yaxes||[],o=0;o<r.length;o++)for(var a=0;a<i.length;a++)if(-1!==t.indexOf(r[o]+i[a]))return!0;return!1}return-1!==t.indexOf(n.getSubplot(e))},n.flat=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=t;return n},n.p2c=function(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)n[r]=e[r].p2c(t);return n},n.getDistanceFunction=function(e,t,r,i){return"closest"===e?i||n.quadrature(t,r):"x"===e.charAt(0)?t:r},n.getClosest=function(e,t,n){if(!1!==n.index)n.index>=0&&n.index<e.length?n.distance=0:n.index=!1;else for(var r=0;r<e.length;r++){var i=t(e[r]);i<=n.distance&&(n.index=r,n.distance=i)}return n},n.inbox=function(e,t,n){return e*t<0||0===e?n:1/0},n.quadrature=function(e,t){return function(n){var r=e(n),i=t(n);return Math.sqrt(r*r+i*i)}},n.makeEventData=function(e,t,r){var i="index"in e?e.index:e.pointNumber,o={data:t._input,fullData:t,curveNumber:t.index,pointNumber:i};if(t._indexToPoints){var a=t._indexToPoints[i];1===a.length?o.pointIndex=a[0]:o.pointIndices=a}else o.pointIndex=i;return t._module.eventData?o=t._module.eventData(o,e,t,r,i):("xVal"in e?o.x=e.xVal:"x"in e&&(o.x=e.x),"yVal"in e?o.y=e.yVal:"y"in e&&(o.y=e.y),e.xa&&(o.xaxis=e.xa),e.ya&&(o.yaxis=e.ya),void 0!==e.zLabelVal&&(o.z=e.zLabelVal)),n.appendArrayPointValue(o,t,i),o},n.appendArrayPointValue=function(e,t,n){var i=t._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=o(l);if(void 0===e[c]){var u=a(r.nestedProperty(t,l).get(),n);void 0!==u&&(e[c]=u)}}},n.appendArrayMultiPointValues=function(e,t,n){var i=t._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=o(l);if(void 0===e[c]){for(var u=r.nestedProperty(t,l).get(),h=new Array(n.length),d=0;d<n.length;d++)h[d]=a(u,n[d]);e[c]=h}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function o(e){return i[e]||e}function a(e,t){return Array.isArray(t)?Array.isArray(e)&&Array.isArray(e[t[0]])?e[t[0]][t[1]]:void 0:e[t]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};n.isUnifiedHover=function(e){return"string"==typeof e&&!!l[e]},n.isXYhover=function(e){return"string"==typeof e&&!!s[e]}},{"../../lib":503}],403:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("tinycolor2"),a=e("../../lib"),s=a.strTranslate,l=a.strRotate,c=e("../../lib/events"),u=e("../../lib/svg_text_utils"),h=e("../../lib/override_cursor"),d=e("../drawing"),f=e("../color"),p=e("../dragelement"),g=e("../../plots/cartesian/axes"),m=e("../../registry"),v=e("./helpers"),y=e("./constants"),b=e("../legend/defaults"),_=e("../legend/draw"),x=y.YANGLE,w=Math.PI*x/180,A=1/Math.sin(w),k=Math.cos(w),T=Math.sin(w),S=y.HOVERARROWSIZE,E=y.HOVERTEXTPAD,C={box:!0,ohlc:!0,violin:!0,candlestick:!0},M={scatter:!0,scattergl:!0,splom:!0};function O(e,t,n,o,s){n||(n="xy");var l=Array.isArray(n)?n:[n],u=e._fullLayout,d=u._plots||[],g=d[n],y=u._has("cartesian");if(g){var b=g.overlays.map((function(e){return e.id}));l=l.concat(b)}for(var _=l.length,x=new Array(_),w=new Array(_),k=!1,T=0;T<_;T++){var S=l[T];if(d[S])k=!0,x[T]=d[S].xaxis,w[T]=d[S].yaxis;else{if(!u[S]||!u[S]._subplot)return void a.warn("Unrecognized subplot: "+S);var E=u[S]._subplot;x[T]=E.xaxis,w[T]=E.yaxis}}var O=t.hovermode||u.hovermode;if(O&&!k&&(O="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(O)||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return p.unhoverRaw(e,t);var D=u.hoverdistance;-1===D&&(D=1/0);var R=u.spikedistance;-1===R&&(R=1/0);var B,q,H,$,W,G,Y,X,Z,K,J,Q,ee,te=[],ne=[],re={hLinePoint:null,vLinePoint:null},ie=!1;if(Array.isArray(t))for(O="array",H=0;H<t.length;H++)(W=e.calcdata[t[H].curveNumber||0])&&(G=W[0].trace,"skip"!==W[0].trace.hoverinfo&&(ne.push(W),"h"===G.orientation&&(ie=!0)));else{for($=0;$<e.calcdata.length;$++)W=e.calcdata[$],"skip"!==(G=W[0].trace).hoverinfo&&v.isTraceInSubplots(G,l)&&(ne.push(W),"h"===G.orientation&&(ie=!0));var oe,ae;if(s){if(!1===c.triggerHandler(e,"plotly_beforehover",t))return;var se=s.getBoundingClientRect();oe=t.clientX-se.left,ae=t.clientY-se.top,u._calcInverseTransform(e);var le=a.apply3DTransform(u._invTransform)(oe,ae);if(oe=le[0],ae=le[1],oe<0||oe>x[0]._length||ae<0||ae>w[0]._length)return p.unhoverRaw(e,t)}else oe="xpx"in t?t.xpx:x[0]._length/2,ae="ypx"in t?t.ypx:w[0]._length/2;if(t.pointerX=oe+x[0]._offset,t.pointerY=ae+w[0]._offset,B="xval"in t?v.flat(l,t.xval):v.p2c(x,oe),q="yval"in t?v.flat(l,t.yval):v.p2c(w,ae),!i(B[0])||!i(q[0]))return a.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var ce=1/0;function ue(e,n){for($=0;$<ne.length;$++)if((W=ne[$])&&W[0]&&W[0].trace&&!0===(G=W[0].trace).visible&&0!==G._length&&-1===["carpet","contourcarpet"].indexOf(G._module.name)){if("splom"===G.type?Y=l[X=0]:(Y=v.getSubplot(G),X=l.indexOf(Y)),Z=O,v.isUnifiedHover(Z)&&(Z=Z.charAt(0)),Q={cd:W,trace:G,xa:x[X],ya:w[X],maxHoverDistance:D,maxSpikeDistance:R,index:!1,distance:Math.min(ce,D),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:f.defaultLine,name:G.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[Y]&&(Q.subplot=u[Y]._subplot),u._splomScenes&&u._splomScenes[G.uid]&&(Q.scene=u._splomScenes[G.uid]),ee=te.length,"array"===Z){var r=t[$];"pointNumber"in r?(Q.index=r.pointNumber,Z="closest"):(Z="","xval"in r&&(K=r.xval,Z="x"),"yval"in r&&(J=r.yval,Z=Z?"closest":"y"))}else void 0!==e&&void 0!==n?(K=e,J=n):(K=B[X],J=q[X]);if(0!==D)if(G._module&&G._module.hoverPoints){var o=G._module.hoverPoints(Q,K,J,Z,{finiteRange:!0,hoverLayer:u._hoverlayer});if(o)for(var s,c=0;c<o.length;c++)s=o[c],i(s.x0)&&i(s.y0)&&te.push(N(s,O))}else a.log("Unrecognized trace type in hover:",G);if("closest"===O&&te.length>ee&&(te.splice(0,ee),ce=te[0].distance),y&&0!==R&&0===te.length){Q.distance=R,Q.index=!1;var h=G._module.hoverPoints(Q,K,J,"closest",{hoverLayer:u._hoverlayer});if(h&&(h=h.filter((function(e){return e.spikeDistance<=R}))),h&&h.length){var d,p=h.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var g=p[0];i(g.x0)&&i(g.y0)&&(d=de(g),(!re.vLinePoint||re.vLinePoint.spikeDistance>d.spikeDistance)&&(re.vLinePoint=d))}var m=h.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var b=m[0];i(b.x0)&&i(b.y0)&&(d=de(b),(!re.hLinePoint||re.hLinePoint.spikeDistance>d.spikeDistance)&&(re.hLinePoint=d))}}}}}function he(e,t,n){for(var r,i=null,o=1/0,a=0;a<e.length;a++)r=e[a].spikeDistance,n&&0===a&&(r=-1/0),r<=o&&r<=t&&(i=e[a],o=r);return i}function de(e){return e?{xa:e.xa,ya:e.ya,x:void 0!==e.xSpike?e.xSpike:(e.x0+e.x1)/2,y:void 0!==e.ySpike?e.ySpike:(e.y0+e.y1)/2,distance:e.distance,spikeDistance:e.spikeDistance,curveNumber:e.trace.index,color:e.color,pointNumber:e.index}:null}ue();var fe={fullLayout:u,container:u._hoverlayer,event:t},pe=e._spikepoints,ge={vLinePoint:re.vLinePoint,hLinePoint:re.hLinePoint};e._spikepoints=ge;var me=function(){te.sort((function(e,t){return e.distance-t.distance})),te=function(e,t){for(var n=t.charAt(0),r=[],i=[],o=[],a=0;a<e.length;a++){var s=e[a];m.traceIs(s.trace,"bar-like")||m.traceIs(s.trace,"box-violin")?o.push(s):s.trace[n+"period"]?i.push(s):r.push(s)}return r.concat(i).concat(o)}(te,O)};me();var ve=O.charAt(0),ye=("x"===ve||"y"===ve)&&te[0]&&M[te[0].trace.type];if(y&&0!==R&&0!==te.length){var be=he(te.filter((function(e){return e.ya.showspikes})),R,ye);re.hLinePoint=de(be);var _e=he(te.filter((function(e){return e.xa.showspikes})),R,ye);re.vLinePoint=de(_e)}if(0===te.length){var xe=p.unhoverRaw(e,t);return!y||null===re.hLinePoint&&null===re.vLinePoint||F(pe)&&z(e,re,fe),xe}if(y&&F(pe)&&z(e,re,fe),v.isXYhover(Z)&&0!==te[0].length&&"splom"!==te[0].trace.type){var we=te[0],Ae=(te=C[we.trace.type]?te.filter((function(e){return e.trace.index===we.trace.index})):[we]).length;ue(j("x",we,u),j("y",we,u));var ke,Te=[],Se={},Ee=0,Ce=function(e){var t=C[e.trace.type]?L(e):e.trace.index;if(Se[t]){var n=Se[t]-1,r=Te[n];n>0&&Math.abs(e.distance)<Math.abs(r.distance)&&(Te[n]=e)}else Ee++,Se[t]=Ee,Te.push(e)};for(ke=0;ke<Ae;ke++)Ce(te[ke]);for(ke=te.length-1;ke>Ae-1;ke--)Ce(te[ke]);te=Te,me()}var Me=e._hoverdata,Oe=[],Le=U(e),De=V(e);for(H=0;H<te.length;H++){var Ie=te[H],Re=v.makeEventData(Ie,Ie.trace,Ie.cd);if(!1!==Ie.hovertemplate){var Pe=!1;Ie.cd[Ie.index]&&Ie.cd[Ie.index].ht&&(Pe=Ie.cd[Ie.index].ht),Ie.hovertemplate=Pe||Ie.trace.hovertemplate||!1}if(Ie.xa&&Ie.ya){var Ne=Ie.x0+Ie.xa._offset,ze=Ie.x1+Ie.xa._offset,Fe=Ie.y0+Ie.ya._offset,Be=Ie.y1+Ie.ya._offset,je=Math.min(Ne,ze),Ue=Math.max(Ne,ze),Ve=Math.min(Fe,Be),qe=Math.max(Fe,Be);Re.bbox={x0:je+De,x1:Ue+De,y0:Ve+Le,y1:qe+Le}}Ie.eventData=[Re],Oe.push(Re)}e._hoverdata=Oe;var He="y"===O&&(ne.length>1||te.length>1)||"closest"===O&&ie&&te.length>1,$e=f.combine(u.plot_bgcolor||f.background,u.paper_bgcolor),We=I(te,{gd:e,hovermode:O,rotateLabels:He,bgColor:$e,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});if(v.isUnifiedHover(O)||(function(e,t,n){var r,i,o,a,s,l,c,u=0,h=1,d=e.size(),f=new Array(d),p=0;function g(e){var t=e[0],n=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=n.pos+n.dp+n.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;r=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;r=!1}if(r){var c=0;for(a=0;a<e.length;a++)(l=e[a]).pos+l.dp+l.size>t.pmax&&c++;for(a=e.length-1;a>=0&&!(c<=0);a--)(l=e[a]).pos>t.pmax-1&&(l.del=!0,c--);for(a=0;a<e.length&&!(c<=0);a++)if((l=e[a]).pos<t.pmin+1)for(l.del=!0,c--,o=2*l.size,s=e.length-1;s>=0;s--)e[s].dp-=o;for(a=e.length-1;a>=0&&!(c<=0);a--)(l=e[a]).pos+l.dp+l.size>t.pmax&&(l.del=!0,c--)}}}for(e.each((function(e){var r=e[t],i="x"===r._id.charAt(0),o=r.range;0===p&&o&&o[0]>o[1]!==i&&(h=-1),f[p++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?A:1)/2,pmin:0,pmax:i?n.width:n.height}]})),f.sort((function(e,t){return e[0].posref-t[0].posref||h*(t[0].traceIndex-e[0].traceIndex)}));!r&&u<=d;){for(u++,r=!0,a=0;a<f.length-1;){var m=f[a],v=f[a+1],y=m[m.length-1],b=v[0];if((i=y.pos+y.dp+y.size-b.pos-b.dp+b.size)>.01&&y.pmin===b.pmin&&y.pmax===b.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),f.splice(a+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(o=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=o;r=!1}else a++}f.forEach(g)}for(a=f.length-1;a>=0;a--){var _=f[a];for(s=_.length-1;s>=0;s--){var x=_[s],w=x.datum;w.offset=x.dp,w.del=x.del}}}(We,He?"xa":"ya",u),P(We,He,u._invScaleX,u._invScaleY)),s&&s.tagName){var Ge=m.getComponentMethod("annotations","hasClickToShow")(e,Oe);h(r.select(s),Ge?"pointer":"")}s&&!o&&function(e,t,n){if(!n||n.length!==e._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var i=n[r],o=e._hoverdata[r];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(e,0,Me)&&(Me&&e.emit("plotly_unhover",{event:t,points:Me}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:x,yaxes:w,xvals:B,yvals:q}))}function L(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}n.hover=function(e,t,n,r){e=a.getGraphDiv(e);var i=t.target;a.throttle(e._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){O(e,t,n,r,i)}))},n.loneHover=function(e,t){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var i=t.gd,o=U(i),a=V(i),s=I(e.map((function(e){var n=e._x0||e.x0||e.x||0,r=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(n,r),h=Math.max(n,r),d=Math.min(s,l),p=Math.max(s,l),g=e.trace;if(m.traceIs(g,"gl3d")){var v=i._fullLayout[g.scene]._scene.container,y=v.offsetLeft,b=v.offsetTop;u+=y,h+=y,d+=b,p+=b}c.bbox={x0:u+a,x1:h+a,y0:d+o,y1:p+o},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||f.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:false,bgColor:t.bgColor||f.background,container:r.select(t.container),outerContainer:t.outerContainer||t.container}),l=0,c=0;return s.sort((function(e,t){return e.y0-t.y0})).each((function(e,n){var r=e.y0-e.by/2;e.offset=r-5<l?l-r+5:0,l=r+e.by+e.offset,n===t.anchorIndex&&(c=e.offset)})).each((function(e){e.offset-=c})),P(s,false,i._fullLayout._invScaleX,i._fullLayout._invScaleY),n?s:s.node()};var D=/<extra>([\s\S]*)<\/extra>/;function I(e,t){var n=t.gd,i=n._fullLayout,o=t.hovermode,c=t.rotateLabels,h=t.bgColor,p=t.container,g=t.outerContainer,w=t.commonLabelOpts||{};if(0===e.length)return[[]];var A=t.fontFamily||y.HOVERFONT,k=t.fontSize||y.HOVERFONTSIZE,T=e[0],C=T.xa,M=T.ya,O=o.charAt(0),D=T[O+"Label"],I=q(n,g),P=I.top,N=I.width,z=I.height,F=void 0!==D&&T.distance<=t.hoverdistance&&("x"===o||"y"===o);if(F){var B,j,U=!0;for(B=0;B<e.length;B++)if(U&&void 0===e[B].zLabel&&(U=!1),j=e[B].hoverinfo||e[B].trace.hoverinfo){var V=Array.isArray(j)?j:j.split("+");if(-1===V.indexOf("all")&&-1===V.indexOf(o)){F=!1;break}}U&&(F=!1)}var H=p.selectAll("g.axistext").data(F?[0]:[]);if(H.enter().append("g").classed("axistext",!0),H.exit().remove(),H.each((function(){var e=r.select(this),t=a.ensureSingle(e,"path","",(function(e){e.style({"stroke-width":"1px"})})),l=a.ensureSingle(e,"text","",(function(e){e.attr("data-notex",1)})),c=w.bgcolor||f.defaultLine,h=w.bordercolor||f.contrast(c),p=f.contrast(c),g={family:w.font.family||A,size:w.font.size||k,color:w.font.color||p};t.style({fill:c,stroke:h}),l.text(D).call(d.font,g).call(u.positionText,0,0).call(u.convertToTspans,n),e.attr("transform","");var m,v,y=q(n,l.node());if("x"===o){var b="top"===C.side?"-":"";l.attr("text-anchor","middle").call(u.positionText,0,"top"===C.side?P-y.bottom-S-E:P-y.top+S+E),m=C._offset+(T.x0+T.x1)/2,v=M._offset+("top"===C.side?0:M._length);var _=y.width/2+E;m<_?(m=_,t.attr("d","M-"+(_-S)+",0L-"+(_-2*S)+","+b+S+"H"+(E+y.width/2)+"v"+b+(2*E+y.height)+"H-"+_+"V"+b+S+"Z")):m>i.width-_?(m=i.width-_,t.attr("d","M"+(_-S)+",0L"+_+","+b+S+"v"+b+(2*E+y.height)+"H-"+_+"V"+b+S+"H"+(_-2*S)+"Z")):t.attr("d","M0,0L"+S+","+b+S+"H"+(E+y.width/2)+"v"+b+(2*E+y.height)+"H-"+(E+y.width/2)+"V"+b+S+"H-"+S+"Z")}else{var x,O,L;"right"===M.side?(x="start",O=1,L="",m=C._offset+C._length):(x="end",O=-1,L="-",m=C._offset),v=M._offset+(T.y0+T.y1)/2,l.attr("text-anchor",x),t.attr("d","M0,0L"+L+S+","+S+"V"+(E+y.height/2)+"h"+L+(2*E+y.width)+"V-"+(E+y.height/2)+"H"+L+S+"V-"+S+"Z");var I,R=y.height/2,N=P-y.top-R,z="clip"+i._uid+"commonlabel"+M._id;if(m<y.width+2*E+S){I="M-"+(S+E)+"-"+R+"h-"+(y.width-E)+"V"+R+"h"+(y.width-E)+"Z";var F=y.width-m+E;u.positionText(l,F,N),"end"===x&&l.selectAll("tspan").each((function(){var e=r.select(this),t=d.tester.append("text").text(e.text()).call(d.font,g),i=q(n,t.node());Math.round(i.width)<Math.round(y.width)&&e.attr("x",F-i.width),t.remove()}))}else u.positionText(l,O*(E+S),N),I=null;var B=i._topclips.selectAll("#"+z).data(I?[0]:[]);B.enter().append("clipPath").attr("id",z).append("path"),B.exit().remove(),B.select("path").attr("d",I),d.setClipUrl(l,I?z:null,n)}e.attr("transform",s(m,v))})),v.isUnifiedHover(o)){p.selectAll("g.hovertext").remove();var $=e.filter((function(e){return"none"!==e.hoverinfo}));if(0===$.length)return;var W=i.hoverlabel,G=W.font,Y={showlegend:!0,legend:{title:{text:D,font:G},font:G,bgcolor:W.bgcolor,bordercolor:W.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},X={font:G};b(Y,X,n._fullData);var Z=X.legend;Z.entries=[];for(var K=0;K<$.length;K++){var J=$[K];if("none"!==J.hoverinfo){var Q=R(J,!0,o,i,D),ee=Q[0],te=Q[1];J.name=te,J.text=""!==te?te+" : "+ee:ee;var ne=J.cd[J.index];ne&&(ne.mc&&(J.mc=ne.mc),ne.mcc&&(J.mc=ne.mcc),ne.mlc&&(J.mlc=ne.mlc),ne.mlcc&&(J.mlc=ne.mlcc),ne.mlw&&(J.mlw=ne.mlw),ne.mrc&&(J.mrc=ne.mrc),ne.dir&&(J.dir=ne.dir)),J._distinct=!0,Z.entries.push([J])}}Z.entries.sort((function(e,t){return e[0].trace.index-t[0].trace.index})),Z.layer=p,Z._inHover=!0,Z._groupTitleFont=W.grouptitlefont,_(n,Z);var re,ie,oe,ae,se=p.select("g.legend"),le=q(n,se.node()),ce=le.width+2*E,ue=le.height+2*E,he=$[0],de=(he.x0+he.x1)/2,fe=(he.y0+he.y1)/2,pe=!(m.traceIs(he.trace,"bar-like")||m.traceIs(he.trace,"box-violin"));"y"===O?pe?(ie=fe-E,re=fe+E):(ie=Math.min.apply(null,$.map((function(e){return Math.min(e.y0,e.y1)}))),re=Math.max.apply(null,$.map((function(e){return Math.max(e.y0,e.y1)})))):ie=re=a.mean($.map((function(e){return(e.y0+e.y1)/2})))-ue/2,"x"===O?pe?(oe=de+E,ae=de-E):(oe=Math.max.apply(null,$.map((function(e){return Math.max(e.x0,e.x1)}))),ae=Math.min.apply(null,$.map((function(e){return Math.min(e.x0,e.x1)})))):oe=ae=a.mean($.map((function(e){return(e.x0+e.x1)/2})))-ce/2;var ge,me,ve=C._offset,ye=M._offset;return ae+=ve-ce,ie+=ye-ue,ge=(oe+=ve)+ce<N&&oe>=0?oe:ae+ce<N&&ae>=0?ae:ve+ce<N?ve:oe-de<de-ae+ce?N-ce:0,ge+=E,me=(re+=ye)+ue<z&&re>=0?re:ie+ue<z&&ie>=0?ie:ye+ue<z?ye:re-fe<fe-ie+ue?z-ue:0,me+=E,se.attr("transform",s(ge-1,me-1)),se}var be=p.selectAll("g.hovertext").data(e,(function(e){return L(e)}));return be.enter().append("g").classed("hovertext",!0).each((function(){var e=r.select(this);e.append("rect").call(f.fill,f.addOpacity(h,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(d.font,A,k)})),be.exit().remove(),be.each((function(e){var t=r.select(this).attr("transform",""),a=e.color;Array.isArray(a)&&(a=a[e.eventData[0].pointNumber]);var p=e.bgcolor||a,g=f.combine(f.opacity(p)?p:f.defaultLine,h),m=f.combine(f.opacity(a)?a:f.defaultLine,h),v=e.borderColor||f.contrast(g),y=R(e,F,o,i,D,t),b=y[0],_=y[1],w=t.select("text.nums").call(d.font,e.fontFamily||A,e.fontSize||k,e.fontColor||v).text(b).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,n),T=t.select("text.name"),C=0,M=0;if(_&&_!==b){T.call(d.font,e.fontFamily||A,e.fontSize||k,m).text(_).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,n);var O=q(n,T.node());C=O.width+2*E,M=O.height+2*E}else T.remove(),t.select("rect").remove();t.select("path").style({fill:g,stroke:v});var L=e.xa._offset+(e.x0+e.x1)/2,I=e.ya._offset+(e.y0+e.y1)/2,B=Math.abs(e.x1-e.x0),j=Math.abs(e.y1-e.y0),U=q(n,w.node()),V=U.width/i._invScaleX,H=U.height/i._invScaleY;e.ty0=(P-U.top)/i._invScaleY,e.bx=V+2*E,e.by=Math.max(H+2*E,M),e.anchor="start",e.txwidth=V,e.tx2width=C,e.offset=0;var $,W,G=(V+S+E+C)*i._invScaleX;if(c)e.pos=L,$=I+j/2+G<=z,W=I-j/2-G>=0,"top"!==e.idealAlign&&$||!W?$?(I+=j/2,e.anchor="start"):e.anchor="middle":(I-=j/2,e.anchor="end");else if(e.pos=I,$=L+B/2+G<=N,W=L-B/2-G>=0,"left"!==e.idealAlign&&$||!W)if($)L+=B/2,e.anchor="start";else{e.anchor="middle";var Y=G/2,X=L+Y-N,Z=L-Y;X>0&&(L-=X),Z<0&&(L+=-Z)}else L-=B/2,e.anchor="end";w.attr("text-anchor",e.anchor),C&&T.attr("text-anchor",e.anchor),t.attr("transform",s(L,I)+(c?l(x):""))})),be}function R(e,t,n,r,i,o){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=a.templateString(e.name,e.trace._meta)),s=B(e.name,e.nameLength));var c=n.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"<br>"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"<br>"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===i?l=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"<br>":"")+e.text),void 0!==e.extraText&&(l+=(l?"<br>":"")+e.extraText),o&&""===l&&!e.hovertemplate&&(""===s&&o.remove(),l=s);var h=e.hovertemplate||!1;if(h){var d=e.hovertemplateLabels||e;e[c+"Label"]!==i&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),l=(l=a.hovertemplateString(h,d,r._d3locale,e.eventData[0]||{},e.trace._meta)).replace(D,(function(t,n){return s=B(n,e.nameLength),""}))}return[l,s]}function P(e,t,n,i){var o=function(e){return e*n},a=function(e){return e*i};e.each((function(e){var n=r.select(this);if(e.del)return n.remove();var i=n.select("text.nums"),s=e.anchor,l="end"===s?-1:1,c={start:1,end:-1,middle:0}[s],h=c*(S+E),f=h+c*(e.txwidth+E),p=0,g=e.offset,m="middle"===s;m&&(h-=e.tx2width/2,f+=e.txwidth/2+E),t&&(g*=-T,p=e.offset*k),n.select("path").attr("d",m?"M-"+o(e.bx/2+e.tx2width/2)+","+a(g-e.by/2)+"h"+o(e.bx)+"v"+a(e.by)+"h-"+o(e.bx)+"Z":"M0,0L"+o(l*S+p)+","+a(S+g)+"v"+a(e.by/2-S)+"h"+o(l*e.bx)+"v-"+a(e.by)+"H"+o(l*S+p)+"V"+a(g-S)+"Z");var v=p+h,y=g+e.ty0-e.by/2+E,b=e.textAlign||"auto";"auto"!==b&&("left"===b&&"start"!==s?(i.attr("text-anchor","start"),v=m?-e.bx/2-e.tx2width/2+E:-e.bx-E):"right"===b&&"end"!==s&&(i.attr("text-anchor","end"),v=m?e.bx/2-e.tx2width/2-E:e.bx+E)),i.call(u.positionText,o(v),a(y)),e.tx2width&&(n.select("text.name").call(u.positionText,o(f+c*E+p),a(g+e.ty0-e.by/2+E)),n.select("rect").call(d.setRect,o(f+(c-1)*e.tx2width/2+p),a(g-e.by/2-1),o(e.tx2width),a(e.by+2)))}))}function N(e,t){var n=e.index,r=e.trace||{},o=e.cd[0],s=e.cd[n]||{};function l(e){return e||i(e)&&0===e}var c=Array.isArray(n)?function(e,t){var i=a.castOption(o,n,e);return l(i)?i:a.extractOption({},r,"",t)}:function(e,t){return a.extractOption(s,r,e,t)};function u(t,n,r){var i=c(n,r);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===r.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=a.constrain(e.x0,0,e.xa._length),e.x1=a.constrain(e.x1,0,e.xa._length),e.y0=a.constrain(e.y0,0,e.ya._length),e.y1=a.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:g.hoverLabelText(e.xa,e.xLabelVal,r.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:g.hoverLabelText(e.ya,e.yLabelVal,r.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var h=g.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+h+" / -"+g.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" "+h,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var d=g.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+g.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" "+d,"y"===t&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===f.indexOf("y")&&(e.yLabel=void 0),-1===f.indexOf("z")&&(e.zLabel=void 0),-1===f.indexOf("text")&&(e.text=void 0),-1===f.indexOf("name")&&(e.name=void 0)),e}function z(e,t,n){var r,i,a=n.container,s=n.fullLayout,l=s._size,c=n.event,u=!!t.hLinePoint,h=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),h||u){var p=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=t.hLinePoint;r=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=r._offset+y.x,v=i._offset+y.y);var b,_,x=o.readability(y.color,p)<1.5?f.contrast(p):y.color,w=i.spikemode,A=i.spikethickness,k=i.spikecolor||x,T=g.getPxPosition(e,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(b=T,_=m),-1!==w.indexOf("across")){var S=i._counterDomainMin,E=i._counterDomainMax;"free"===i.anchor&&(S=Math.min(S,i.position),E=Math.max(E,i.position)),b=l.l+S*l.w,_=l.l+E*l.w}a.insert("line",":first-child").attr({x1:b,x2:_,y1:v,y2:v,"stroke-width":A,stroke:k,"stroke-dasharray":d.dashStyle(i.spikedash,A)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:b,x2:_,y1:v,y2:v,"stroke-width":A+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?A:-A),cy:v,r:A,fill:k}).classed("spikeline",!0)}if(h){var C,M,O=t.vLinePoint;r=O&&O.xa,i=O&&O.ya,"cursor"===r.spikesnap?(C=c.pointerX,M=c.pointerY):(C=r._offset+O.x,M=i._offset+O.y);var L,D,I=o.readability(O.color,p)<1.5?f.contrast(p):O.color,R=r.spikemode,P=r.spikethickness,N=r.spikecolor||I,z=g.getPxPosition(e,r);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(L=z,D=M),-1!==R.indexOf("across")){var F=r._counterDomainMin,B=r._counterDomainMax;"free"===r.anchor&&(F=Math.min(F,r.position),B=Math.max(B,r.position)),L=l.t+(1-B)*l.h,D=l.t+(1-F)*l.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:L,y2:D,"stroke-width":P,stroke:N,"stroke-dasharray":d.dashStyle(r.spikedash,P)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:L,y2:D,"stroke-width":P+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:C,cy:z-("top"!==r.side?P:-P),r:P,fill:N}).classed("spikeline",!0)}}}function F(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function B(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function j(e,t,n){var r=t[e+"a"],i=t[e+"Val"],o=t.cd[0];if("category"===r.type)i=r._categoriesMap[i];else if("date"===r.type){var a=t.trace[e+"periodalignment"];if(a){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===a?i+=u:"middle"===a&&(i+=u/2)}i=r.d2c(i)}return o&&o.t&&o.t.posLetter===r._id&&("group"!==n.boxmode&&"group"!==n.violinmode||(i+=o.t.dPos)),i}function U(e){return e.offsetTop+e.clientTop}function V(e){return e.offsetLeft+e.clientLeft}function q(e,t){var n=e._fullLayout,r=t.getBoundingClientRect(),i=r.x,o=r.y,s=i+r.width,l=o+r.height,c=a.apply3DTransform(n._invTransform)(i,o),u=a.apply3DTransform(n._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}},{"../../lib":503,"../../lib/events":492,"../../lib/override_cursor":514,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../legend/defaults":418,"../legend/draw":419,"./constants":400,"./helpers":402,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],404:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../color"),o=e("./helpers").isUnifiedHover;t.exports=function(e,t,n,a){a=a||{};var s=t.legend;function l(e){a.font[e]||(a.font[e]=s?t.legend.font[e]:t.font[e])}t&&o(t.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),s?(a.bgcolor||(a.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),r.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}},{"../../lib":503,"../color":366,"./helpers":402}],405:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return void 0!==t[n]?t[n]:r.coerce(e,t,i,n,o)}return n("clickmode"),n("hovermode")}},{"../../lib":503,"./layout_attributes":407}],406:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../dragelement"),a=e("./helpers"),s=e("./layout_attributes"),l=e("./hover");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:s},attributes:e("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(e,t,n){return i.castOption(e,t,"hoverlabel."+n)},castHoverinfo:function(e,t,n){return i.castOption(e,n,"hoverinfo",(function(n){return i.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:r.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":503,"../dragelement":385,"./attributes":397,"./calc":398,"./click":399,"./constants":400,"./defaults":401,"./helpers":402,"./hover":403,"./layout_attributes":407,"./layout_defaults":408,"./layout_global_defaults":409,"@plotly/d3":58}],407:[function(e,t,n){"use strict";var r=e("./constants"),i=e("../../plots/font_attributes"),o=i({editType:"none"});o.family.dflt=r.HOVERFONT,o.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:o,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":585,"./constants":400}],408:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes"),o=e("./hovermode_defaults"),a=e("./hoverlabel_defaults");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}o(e,t)&&(n("hoverdistance"),n("spikedistance")),"select"===n("dragmode")&&n("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(t.dragmode="pan"),a(e,t,n),r.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},{"../../lib":503,"./hoverlabel_defaults":404,"./hovermode_defaults":405,"./layout_attributes":407}],409:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./hoverlabel_defaults"),o=e("./layout_attributes");t.exports=function(e,t){i(e,t,(function(n,i){return r.coerce(e,t,o,n,i)}))}},{"../../lib":503,"./hoverlabel_defaults":404,"./layout_attributes":407}],410:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../lib/regex").counter,o=e("../../plots/domain").attributes,a=e("../../plots/cartesian/constants").idRegex,s=e("../../plot_api/plot_template"),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:o({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,n){var r=t[n+"axes"],i=Object.keys((e._splomAxes||{})[n]||{});return Array.isArray(r)?r:i.length?i:void 0}function u(e,t,n,r,i,o){var a=t(e+"gap",n),s=t("domain."+e);t(e+"side",r);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-a),h=u*(1-a),d=0;d<i;d++){var f=c+u*d;l[o?i-1-d:d]=[f,f+h]}return l}function h(e,t,n,r,i){var o,a=new Array(n);function s(e,n){-1!==t.indexOf(n)&&void 0===r[n]?(a[e]=n,r[n]=e):a[e]=""}if(Array.isArray(e))for(o=0;o<n;o++)s(o,e[o]);else for(s(0,i),o=1;o<n;o++)s(o,i+(o+1));return a}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(e,t){var n=e.grid||{},i=c(t,n,"x"),o=c(t,n,"y");if(e.grid||i||o){var a,h,d=Array.isArray(n.subplots)&&Array.isArray(n.subplots[0]),f=Array.isArray(i),p=Array.isArray(o),g=f&&i!==n.xaxes&&p&&o!==n.yaxes;d?(a=n.subplots.length,h=n.subplots[0].length):(p&&(a=o.length),f&&(h=i.length));var m=s.newContainer(t,"grid"),v=k("rows",a),y=k("columns",h);if(v*y>1){d||f||p||"independent"===k("pattern")&&(d=!0),m._hasSubplotGrid=d;var b,_,x="top to bottom"===k("roworder"),w=d?.2:.1,A=d?.3:.1;g&&t._splomGridDflt&&(b=t._splomGridDflt.xside,_=t._splomGridDflt.yside),m._domains={x:u("x",k,w,b,y),y:u("y",k,A,_,v,x)}}else delete t.grid}function k(e,t){return r.coerce(n,m,l,e,t)}},contentDefaults:function(e,t){var n=t.grid;if(n&&n._domains){var r,i,o,a,s,l,u,d=e.grid||{},f=t._subplots,p=n._hasSubplotGrid,g=n.rows,m=n.columns,v="independent"===n.pattern,y=n._axisMap={};if(p){var b=d.subplots||[];l=n.subplots=new Array(g);var _=1;for(r=0;r<g;r++){var x=l[r]=new Array(m),w=b[r]||[];for(i=0;i<m;i++)if(v?(s=1===_?"xy":"x"+_+"y"+_,_++):s=w[i],x[i]="",-1!==f.cartesian.indexOf(s)){if(u=s.indexOf("y"),o=s.slice(0,u),a=s.slice(u),void 0!==y[o]&&y[o]!==i||void 0!==y[a]&&y[a]!==r)continue;x[i]=s,y[o]=i,y[a]=r}}}else{var A=c(t,d,"x"),k=c(t,d,"y");n.xaxes=h(A,f.xaxis,m,y,"x"),n.yaxes=h(k,f.yaxis,g,y,"y")}var T=n._anchors={},S="top to bottom"===n.roworder;for(var E in y){var C,M,O,L=E.charAt(0),D=n[L+"side"];if(D.length<8)T[E]="free";else if("x"===L){if("t"===D.charAt(0)===S?(C=0,M=1,O=g):(C=g-1,M=-1,O=-1),p){var I=y[E];for(r=C;r!==O;r+=M)if((s=l[r][I])&&(u=s.indexOf("y"),s.slice(0,u)===E)){T[E]=s.slice(u);break}}else for(r=C;r!==O;r+=M)if(a=n.yaxes[r],-1!==f.cartesian.indexOf(E+a)){T[E]=a;break}}else if("l"===D.charAt(0)?(C=0,M=1,O=m):(C=m-1,M=-1,O=-1),p){var R=y[E];for(r=C;r!==O;r+=M)if((s=l[R][r])&&(u=s.indexOf("y"),s.slice(u)===E)){T[E]=s.slice(0,u);break}}else for(r=C;r!==O;r+=M)if(o=n.xaxes[r],-1!==f.cartesian.indexOf(o+E)){T[E]=o;break}}}}}},{"../../lib":503,"../../lib/regex":520,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/domain":584}],411:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/constants"),i=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects"),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561}],412:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib/to_log_range");t.exports=function(e,t,n,o){t=t||{};var a="log"===n&&"linear"===t.type,s="linear"===n&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.images,h=t._id.charAt(0),d=0;d<u.length;d++)if(c="images["+d+"].",(l=u[d])[h+"ref"]===t._id){var f=l[h],p=l["size"+h],g=null,m=null;if(a){g=i(f,t.range);var v=p/Math.pow(10,g)/2;m=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else m=(g=Math.pow(10,f))*(Math.pow(10,p/2)-Math.pow(10,-p/2));r(g)?r(m)||(m=null):(g=null,m=null),o(c+h,g),o(c+"size"+h,m)}}},{"../../lib/to_log_range":531,"fast-isnumeric":190}],413:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/array_container_defaults"),a=e("./attributes");function s(e,t,n){function o(n,i){return r.coerce(e,t,a,n,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:n},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(e,t,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(t._index),i.coercePosition(t,l,o,d,h,0)}return t}t.exports=function(e,t){o(e,t,{name:"images",handleItemDefaults:s})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":411}],414:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../drawing"),o=e("../../plots/cartesian/axes"),a=e("../../plots/cartesian/axis_ids"),s=e("../../constants/xmlns_namespaces");t.exports=function(e){var t,n,l=e._fullLayout,c=[],u={},h=[];for(n=0;n<l.images.length;n++){var d=l.images[n];if(d.visible)if("below"===d.layer&&"paper"!==d.xref&&"paper"!==d.yref){t=a.ref2id(d.xref)+a.ref2id(d.yref);var f=l._plots[t];if(!f){h.push(d);continue}f.mainplot&&(t=f.mainplot.id),u[t]||(u[t]=[]),u[t].push(d)}else"above"===d.layer?c.push(d):h.push(d)}var p={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},g={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function m(t){var n=r.select(this);if(this._imgSrc!==t.source)if(n.attr("xmlns",s.svg),t.source&&"data:"===t.source.slice(0,5))n.attr("xlink:href",t.source),this._imgSrc=t.source;else{var i=new Promise(function(e){var r=new Image;function i(){n.remove(),e()}this.img=r,r.setAttribute("crossOrigin","anonymous"),r.onerror=i,r.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height,t.getContext("2d").drawImage(this,0,0);var r=t.toDataURL("image/png");n.attr("xlink:href",r),e()},n.on("error",i),r.src=t.source,this._imgSrc=t.source}.bind(this));e._promises.push(i)}}function v(t){var n,a,s=r.select(this),c=o.getFromId(e,t.xref),u=o.getFromId(e,t.yref),h="domain"===o.getRefType(t.xref),d="domain"===o.getRefType(t.yref),f=l._size;n=void 0!==c?"string"==typeof t.xref&&h?c._length*t.sizex:Math.abs(c.l2p(t.sizex)-c.l2p(0)):t.sizex*f.w,a=void 0!==u?"string"==typeof t.yref&&d?u._length*t.sizey:Math.abs(u.l2p(t.sizey)-u.l2p(0)):t.sizey*f.h;var m,v,y=n*p[t.xanchor].offset,b=a*g[t.yanchor].offset,_=p[t.xanchor].sizing+g[t.yanchor].sizing;switch(m=void 0!==c?"string"==typeof t.xref&&h?c._length*t.x+c._offset:c.r2p(t.x)+c._offset:t.x*f.w+f.l,m+=y,v=void 0!==u?"string"==typeof t.yref&&d?u._length*(1-t.y)+u._offset:u.r2p(t.y)+u._offset:f.h-t.y*f.h+f.t,v+=b,t.sizing){case"fill":_+=" slice";break;case"stretch":_="none"}s.attr({x:m,y:v,width:n,height:a,preserveAspectRatio:_,opacity:t.opacity});var x=(c&&"domain"!==o.getRefType(t.xref)?c._id:"")+(u&&"domain"!==o.getRefType(t.yref)?u._id:"");i.setClipUrl(s,x?"clip"+l._uid+x:null,e)}var y=l._imageLowerLayer.selectAll("image").data(h),b=l._imageUpperLayer.selectAll("image").data(c);y.enter().append("image"),b.enter().append("image"),y.exit().remove(),b.exit().remove(),y.each((function(e){m.bind(this)(e),v.bind(this)(e)})),b.each((function(e){m.bind(this)(e),v.bind(this)(e)}));var _=Object.keys(l._plots);for(n=0;n<_.length;n++){t=_[n];var x=l._plots[t];if(x.imagelayer){var w=x.imagelayer.selectAll("image").data(u[t]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(e){m.bind(this)(e),v.bind(this)(e)}))}}}},{"../../constants/xmlns_namespaces":480,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_ids":558,"../drawing":388,"@plotly/d3":58}],415:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("images"),draw:e("./draw"),convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":567,"./attributes":411,"./convert_coords":412,"./defaults":413,"./draw":414}],416:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../color/attributes");t.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:r({editType:"legend"}),grouptitlefont:r({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:r({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},{"../../plots/font_attributes":585,"../color/attributes":365}],417:[function(e,t,n){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},{}],418:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../plot_api/plot_template"),a=e("../../plots/attributes"),s=e("./attributes"),l=e("../../plots/layout_attributes"),c=e("./helpers");t.exports=function(e,t,n){var u,h=e.legend||{},d=o.newContainer(t,"legend");function f(e,t){return i.coerce(h,d,s,e,t)}for(var p=function(e,t){var n=u._input,r=u;return i.coerce(n,r,a,e,t)},g=t.font||{},m=i.coerceFont(f,"grouptitlefont",i.extendFlat({},g,{size:Math.round(1.1*g.size)})),v=0,y=!1,b="normal",_=0;_<n.length;_++)(u=n[_]).visible&&((u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&!1===u._module.attributes.showlegend.dflt))&&(v++,u.showlegend&&(y=!0,(r.traceIs(u,"pie-like")||!0===u._input.showlegend)&&v++),i.coerceFont(p,"legendgrouptitle.font",m)),(r.traceIs(u,"bar")&&"stack"===t.barmode||-1!==["tonextx","tonexty"].indexOf(u.fill))&&(b=c.isGrouped({traceorder:b})?"grouped+reversed":"reversed"),void 0!==u.legendgroup&&""!==u.legendgroup&&(b=c.isReversed({traceorder:b})?"reversed+grouped":"grouped"));var x=i.coerce(e,t,l,"showlegend",y&&v>1);if(!1===x&&(t.legend=void 0),(!1!==x||h.uirevision)&&(f("uirevision",t.uirevision),!1!==x)){f("bgcolor",t.paper_bgcolor),f("bordercolor"),f("borderwidth");var w,A,k,T=i.coerceFont(f,"font",t.font),S="h"===f("orientation");if(S?(w=0,r.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(A=1.1,k="bottom"):(A=-.1,k="top")):(w=1.02,A=1,k="auto"),f("traceorder",b),c.isGrouped(t.legend)&&f("tracegroupgap"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("x",w),f("xanchor"),f("y",A),f("yanchor",k),f("valign"),i.noneOrAll(h,d,["x","y"]),f("title.text")){f("title.side",S?"left":"top");var E=i.extendFlat({},T,{size:i.bigFont(T.size)});i.coerceFont(f,"title.font",E)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/layout_attributes":610,"../../registry":638,"./attributes":416,"./helpers":422}],419:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../plots/plots"),a=e("../../registry"),s=e("../../lib/events"),l=e("../dragelement"),c=e("../drawing"),u=e("../color"),h=e("../../lib/svg_text_utils"),d=e("./handle_click"),f=e("./constants"),p=e("../../constants/alignment"),g=p.LINE_SPACING,m=p.FROM_TL,v=p.FROM_BR,y=e("./get_legend_data"),b=e("./style"),_=e("./helpers");function x(e,t){var n,s=e._fullLayout,h="legend"+s._uid,d=t._inHover;if(d?(n=t.layer,h+="-hover"):n=s._infolayer,n){var p;if(e._legendMouseDownTime||(e._legendMouseDownTime=0),d){if(!t.entries)return;p=y(t.entries,t)}else{if(!e.calcdata)return;p=s.showlegend&&y(e.calcdata,t)}var g=s.hiddenlabels||[];if(!(d||s.showlegend&&p.length))return n.selectAll(".legend").remove(),s._topdefs.select("#"+h).remove(),o.autoMargin(e,"legend");var x=i.ensureSingle(n,"g","legend",(function(e){d||e.attr("pointer-events","all")})),k=i.ensureSingleById(s._topdefs,"clipPath",h,(function(e){e.append("rect")})),M=i.ensureSingle(x,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));M.call(u.stroke,t.bordercolor).call(u.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var O=i.ensureSingle(x,"g","scrollbox"),L=t.title;if(t._titleWidth=0,t._titleHeight=0,L.text){var D=i.ensureSingle(O,"text","legendtitletext");D.attr("text-anchor","start").call(c.font,L.font).text(L.text),S(D,O,e,t,1)}else O.selectAll(".legendtitletext").remove();var I=i.ensureSingle(x,"rect","scrollbar",(function(e){e.attr(f.scrollBarEnterAttrs).call(u.fill,f.scrollBarColor)})),R=O.selectAll("g.groups").data(p);R.enter().append("g").attr("class","groups"),R.exit().remove();var P=R.selectAll("g.traces").data(i.identity);P.enter().append("g").attr("class","traces"),P.exit().remove(),P.style("opacity",(function(e){var t=e[0].trace;return a.traceIs(t,"pie-like")?-1!==g.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){r.select(this).call(A,e,t)})).call(b,e,t).each((function(){d||r.select(this).call(T,e)})),i.syncOrAsync([o.previousPromises,function(){return function(e,t,n,i){var o=e._fullLayout;i||(i=o.legend);var a=o._size,s=_.isVertical(i),l=_.isGrouped(i),u=i.borderwidth,h=2*u,d=f.itemGap,p=i.itemwidth+2*d,g=2*(u+d),m=C(i),v=i.y<0||0===i.y&&"top"===m,y=i.y>1||1===i.y&&"bottom"===m,b=i.tracegroupgap;i._maxHeight=Math.max(v||y?o.height/2:a.h,30);var x=0;i._width=0,i._height=0;var w=function(e){var t=0,n=0,r=e.title.side;return r&&(-1!==r.indexOf("left")&&(t=e._titleWidth),-1!==r.indexOf("top")&&(n=e._titleHeight)),[t,n]}(i);if(s)n.each((function(e){var t=e[0].height;c.setTranslate(this,u+w[0],u+w[1]+i._height+t/2+d),i._height+=t,i._width=Math.max(i._width,e[0].width)})),x=p+i._width,i._width+=d+p+h,i._height+=g,l&&(t.each((function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var A=E(i),k=i.x<0||0===i.x&&"right"===A,T=i.x>1||1===i.x&&"left"===A,S=y||v,M=o.width/2;i._maxWidth=Math.max(k?S&&"left"===A?a.l+a.w:M:T?S&&"right"===A?a.r+a.w:M:a.w,2*p);var O=0,L=0;n.each((function(e){var t=e[0].width+p;O=Math.max(O,t),L+=t})),x=null;var D=0;if(l){var I=0,R=0,P=0;t.each((function(){var e=0,t=0;r.select(this).selectAll("g.traces").each((function(n){var r=n[0].width,i=n[0].height;c.setTranslate(this,w[0],w[1]+u+d+i/2+t),t+=i,e=Math.max(e,p+r)}));var n=e+d;R>0&&n+u+R>i._maxWidth?(D=Math.max(D,R),R=0,P+=I+b,I=t):I=Math.max(I,t),c.setTranslate(this,R,P),R+=n})),i._width=Math.max(D,R)+u,i._height=P+I+g}else{var N=n.size(),z=L+h+(N-1)*d<i._maxWidth,F=0,B=0,j=0,U=0;n.each((function(e){var t=e[0].height,n=p+e[0].width,r=(z?n:O)+d;r+u+B-d>=i._maxWidth&&(D=Math.max(D,U),B=0,j+=F,i._height+=F,F=0),c.setTranslate(this,w[0]+u+B,w[1]+u+j+t/2+d),U=B+n+d,B+=r,F=Math.max(F,t)})),z?(i._width=B+h,i._height=F+g):(i._width=Math.max(D,U)+h,i._height+=F+g)}}i._width=Math.ceil(Math.max(i._width+w[0],i._titleWidth+2*(u+f.titlePad))),i._height=Math.ceil(Math.max(i._height+w[1],i._titleHeight+2*(u+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=e._context.edits,q=V.legendText||V.legendPosition;n.each((function(e){var t=r.select(this).select(".legendtoggle"),n=e[0].height,i=q?p:x||p+e[0].width;s||(i+=d/2),c.setRect(t,0,-n/2,i,n)}))}(e,R,P,t)},function(){var u,p,g,y,b=s._size,_=t.borderwidth;if(!d){if(function(e){var t=e._fullLayout.legend,n=E(t),r=C(t);return o.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*m[n],r:t._width*v[n],b:t._effHeight*v[r],t:t._effHeight*m[r]})}(e))return;var A=b.l+b.w*t.x-m[E(t)]*t._width,T=b.t+b.h*(1-t.y)-m[C(t)]*t._effHeight;if(s.margin.autoexpand){var S=A,L=T;A=i.constrain(A,0,s.width-t._width),T=i.constrain(T,0,s.height-t._effHeight),A!==S&&i.log("Constrain legend.x to make legend fit inside graph"),T!==L&&i.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(x,A,T)}if(I.on(".drag",null),x.on("wheel",null),d||t._height<=t._maxHeight||e._context.staticPlot){var D=t._effHeight;d&&(D=t._height),M.attr({width:t._width-_,height:D-_,x:_/2,y:_/2}),c.setTranslate(O,0,0),k.select("rect").attr({width:t._width-2*_,height:D-2*_,x:_,y:_}),c.setClipUrl(O,h,e),c.setRect(I,0,0,0,0),delete t._scrollY}else{var R,P,N,z=Math.max(f.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),F=t._effHeight-z-2*f.scrollBarMargin,B=t._height-t._effHeight,j=F/B,U=Math.min(t._scrollY||0,B);M.attr({width:t._width-2*_+f.scrollBarWidth+f.scrollBarMargin,height:t._effHeight-_,x:_/2,y:_/2}),k.select("rect").attr({width:t._width-2*_+f.scrollBarWidth+f.scrollBarMargin,height:t._effHeight-2*_,x:_,y:_+U}),c.setClipUrl(O,h,e),H(U,z,j),x.on("wheel",(function(){H(U=i.constrain(t._scrollY+r.event.deltaY/F*B,0,B),z,j),0!==U&&U!==B&&r.event.preventDefault()}));var V=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,N=U})).on("drag",(function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(P="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,H(U=function(e,t,n){var r=(n-t)/j+e;return i.constrain(r,0,B)}(N,R,P),z,j))}));I.call(V);var q=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,N=U)})).on("drag",(function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(P=e.changedTouches[0].clientY,H(U=function(e,t,n){var r=(t-n)/j+e;return i.constrain(r,0,B)}(N,R,P),z,j))}));O.call(q)}function H(n,r,i){t._scrollY=e._fullLayout.legend._scrollY=n,c.setTranslate(O,0,-n),c.setRect(I,t._width,f.scrollBarMargin+n*i,f.scrollBarWidth,r),k.select("rect").attr("y",_+n)}e._context.edits.legendPosition&&(x.classed("cursor-move",!0),l.init({element:x.node(),gd:e,prepFn:function(){var e=c.getTranslate(x);g=e.x,y=e.y},moveFn:function(e,n){var r=g+e,i=y+n;c.setTranslate(x,r,i),u=l.align(r,0,b.l,b.l+b.w,t.xanchor),p=l.align(i,0,b.t+b.h,b.t,t.yanchor)},doneFn:function(){void 0!==u&&void 0!==p&&a.call("_guiRelayout",e,{"legend.x":u,"legend.y":p})},clickFn:function(t,r){var i=n.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));i.size()>0&&w(e,x,i,t,r)}}))}],e)}}function w(e,t,n,r,i){var o=n.data()[0][0].trace,l={event:i,node:n.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=n.datum()[0].label),!1!==s.triggerHandler(e,"plotly_legendclick",l)&&(1===r?t._clickTimeout=setTimeout((function(){e._fullLayout&&d(n,e,r)}),e._context.doubleClickDelay):2===r&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&d(n,e,r)))}function A(e,t,n){var r,o,s=e.data()[0][0],l=s.trace,u=a.traceIs(l,"pie-like"),d=!n._inHover&&t._context.edits.legendText&&!u,p=n._maxNameLength;s.groupTitle?(r=s.groupTitle.text,o=s.groupTitle.font):(o=n.font,n.entries?r=s.text:(r=u?s.label:l.name,l._meta&&(r=i.templateString(r,l._meta))));var g=i.ensureSingle(e,"text","legendtext");g.attr("text-anchor","start").call(c.font,o).text(d?k(r,p):r);var m=n.itemwidth+2*f.itemGap;h.positionText(g,m,0),d?g.call(h.makeEditable,{gd:t,text:r}).call(S,e,t,n).on("edit",(function(r){this.text(k(r,p)).call(S,e,t,n);var o=s.trace._fullInput||{},c={};if(a.hasTransform(o,"groupby")){var u=a.getTransformIndices(o,"groupby"),h=u[u.length-1],d=i.keyedContainer(o,"transforms["+h+"].styles","target","value.name");d.set(s.trace._group,r),c=d.constructUpdate()}else c.name=r;return a.call("_guiRestyle",t,c,l.index)})):S(g,e,t,n)}function k(e,t){var n=Math.max(4,t);if(e&&e.trim().length>=n/2)return e;for(var r=n-(e=e||"").length;r>0;r--)e+=" ";return e}function T(e,t){var n,o=t._context.doubleClickDelay,a=1,s=i.ensureSingle(e,"rect","legendtoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(n=(new Date).getTime())-t._legendMouseDownTime<o?a+=1:(a=1,t._legendMouseDownTime=n)})),s.on("mouseup",(function(){if(!t._dragged&&!t._editing){var n=t._fullLayout.legend;(new Date).getTime()-t._legendMouseDownTime>o&&(a=Math.max(a-1,1)),w(t,n,e,a,r.event)}})))}function S(e,t,n,r,i){r._inHover&&e.attr("data-notex",!0),h.convertToTspans(e,n,(function(){!function(e,t,n,r){var i=e.data()[0][0];if(n._inHover||!i||i.trace.showlegend){var o=e.select("g[class*=math-group]"),a=o.node();n||(n=t._fullLayout.legend);var s,l,u=n.borderwidth,d=(1===r?n.title.font:i.groupTitle?i.groupTitle.font:n.font).size*g;if(a){var p=c.bBox(a);s=p.height,l=p.width,1===r?c.setTranslate(o,u,u+.75*s):c.setTranslate(o,0,.25*s)}else{var m=e.select(1===r?".legendtitletext":".legendtext"),v=h.lineCount(m),y=m.node();if(s=d*v,l=y?c.bBox(y).width:0,1===r)"left"===n.title.side&&(l+=2*f.itemGap),h.positionText(m,u+f.titlePad,u+d);else{var b=2*f.itemGap+n.itemwidth;i.groupTitle&&(b=f.itemGap,l-=n.itemwidth),h.positionText(m,b,-d*((v-1)/2-.3))}}1===r?(n._titleWidth=l,n._titleHeight=s):(i.lineHeight=d,i.height=Math.max(s,16)+3,i.width=l)}else e.remove()}(t,n,r,i)}))}function E(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function C(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){return t||(t=e._fullLayout.legend||{}),x(e,t)}},{"../../constants/alignment":471,"../../lib":503,"../../lib/events":492,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":417,"./get_legend_data":420,"./handle_click":421,"./helpers":422,"./style":424,"@plotly/d3":58}],420:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("./helpers");t.exports=function(e,t){var n,o,a=t._inHover,s=i.isGrouped(t),l=i.isReversed(t),c={},u=[],h=!1,d={},f=0,p=0;function g(e,n){if(""!==e&&i.isGrouped(t))-1===u.indexOf(e)?(u.push(e),h=!0,c[e]=[n]):c[e].push(n);else{var r="~~i"+f;u.push(r),c[r]=[n],f++}}for(n=0;n<e.length;n++){var m=e[n],v=m[0],y=v.trace,b=y.legendgroup;if(a||y.visible&&y.showlegend)if(r.traceIs(y,"pie-like"))for(d[b]||(d[b]={}),o=0;o<m.length;o++){var _=m[o].label;d[b][_]||(g(b,{label:_,color:m[o].color,i:m[o].i,trace:y,pts:m[o].pts}),d[b][_]=!0,p=Math.max(p,(_||"").length))}else g(b,v),p=Math.max(p,(y.name||"").length)}if(!u.length)return[];var x=!h||!s,w=[];for(n=0;n<u.length;n++){var A=c[u[n]];x?w.push(A[0]):w.push(A)}for(x&&(w=[w]),n=0;n<w.length;n++){var k=1/0;for(o=0;o<w[n].length;o++){var T=w[n][o].trace.legendrank;k>T&&(k=T)}w[n][0]._groupMinRank=k,w[n][0]._preGroupSort=n}var S=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(w.forEach((function(e,t){e[0]._preGroupSort=t})),w.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),n=0;n<w.length;n++){w[n].forEach((function(e,t){e._preSort=t})),w[n].sort(S);var E=w[n][0].trace,C=null;for(o=0;o<w[n].length;o++){var M=w[n][o].trace.legendgrouptitle;if(M&&M.text){C=M,a&&(M.font=t._groupTitleFont);break}}if(l&&w[n].reverse(),C){var O=!1;for(o=0;o<w[n].length;o++)if(r.traceIs(w[n][o].trace,"pie-like")){O=!0;break}w[n].unshift({i:-1,groupTitle:C,noClick:O,trace:{showlegend:E.showlegend,legendgroup:E.legendgroup,visible:"toggleitem"===t.groupclick||E.visible}})}for(o=0;o<w[n].length;o++)w[n][o]=[w[n][o]]}return t._lgroupsLength=w.length,t._maxNameLength=p,w}},{"../../registry":638,"./helpers":422}],421:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=!0;t.exports=function(e,t,n){var a=t._fullLayout;if(!t._dragged&&!t._editing){var s,l=a.legend.itemclick,c=a.legend.itemdoubleclick,u=a.legend.groupclick;if(1===n&&"toggle"===l&&"toggleothers"===c&&o&&t.data&&t._context.showTips?(r.notifier(r._(t,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===n?s=l:2===n&&(s=c),s){var h="togglegroup"===u,d=a.hiddenlabels?a.hiddenlabels.slice():[],f=e.data()[0][0];if(!f.groupTitle||!f.noClick){var p,g,m,v,y,b=t._fullData,_=f.trace,x=_.legendgroup,w={},A=[],k=[],T=[];if(i.traceIs(_,"pie-like")){var S=f.label,E=d.indexOf(S);"toggle"===s?-1===E?d.push(S):d.splice(E,1):"toggleothers"===s&&(d=[],t.calcdata[0].forEach((function(e){S!==e.label&&d.push(e.label)})),t._fullLayout.hiddenlabels&&t._fullLayout.hiddenlabels.length===d.length&&-1===E&&(d=[])),i.call("_guiRelayout",t,"hiddenlabels",d)}else{var C,M=x&&x.length,O=[];if(M)for(p=0;p<b.length;p++)(C=b[p]).visible&&C.legendgroup===x&&O.push(p);if("toggle"===s){var L;switch(_.visible){case!0:L="legendonly";break;case!1:L=!1;break;case"legendonly":L=!0}if(M)if(h)for(p=0;p<b.length;p++)!1!==b[p].visible&&b[p].legendgroup===x&&j(b[p],L);else j(_,L);else j(_,L)}else if("toggleothers"===s){var D,I,R,P,N=!0;for(p=0;p<b.length;p++)if(D=b[p]===_,R=!0!==b[p].showlegend,!(D||R||(I=M&&b[p].legendgroup===x)||!0!==b[p].visible||i.traceIs(b[p],"notLegendIsolatable"))){N=!1;break}for(p=0;p<b.length;p++)if(!1!==b[p].visible&&!i.traceIs(b[p],"notLegendIsolatable"))switch(_.visible){case"legendonly":j(b[p],!0);break;case!0:P=!!N||"legendonly",D=b[p]===_,R=!0!==b[p].showlegend&&!b[p].legendgroup,I=D||M&&b[p].legendgroup===x,j(b[p],!(!I&&!R)||P)}}for(p=0;p<k.length;p++)if(m=k[p]){var z=m.constructUpdate(),F=Object.keys(z);for(g=0;g<F.length;g++)v=F[g],(w[v]=w[v]||[])[T[p]]=z[v]}for(y=Object.keys(w),p=0;p<y.length;p++)for(v=y[p],g=0;g<A.length;g++)w[v].hasOwnProperty(g)||(w[v][g]=void 0);i.call("_guiRestyle",t,w,A)}}}}function B(e,t,n){var r=A.indexOf(e),i=w[t];return i||(i=w[t]=[]),-1===A.indexOf(e)&&(A.push(e),r=A.length-1),i[r]=n,r}function j(e,t){if(!f.groupTitle||h){var n=e._fullInput;if(i.hasTransform(n,"groupby")){var o=k[n.index];if(!o){var a=i.getTransformIndices(n,"groupby"),s=a[a.length-1];o=r.keyedContainer(n,"transforms["+s+"].styles","target","value.visible"),k[n.index]=o}var l=o.get(e._group);void 0===l&&(l=!0),!1!==l&&o.set(e._group,t),T[n.index]=B(n.index,"visible",!1!==n.visible)}else{var c=!1!==n.visible&&t;B(n.index,"visible",c)}}}}},{"../../lib":503,"../../registry":638}],422:[function(e,t,n){"use strict";n.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},n.isVertical=function(e){return"h"!==e.orientation},n.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},{}],423:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw"),style:e("./style")}},{"./attributes":416,"./defaults":418,"./draw":419,"./style":424}],424:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../lib"),a=o.strTranslate,s=e("../drawing"),l=e("../color"),c=e("../colorscale/helpers").extractOpts,u=e("../../traces/scatter/subtypes"),h=e("../../traces/pie/style_one"),d=e("../../traces/pie/helpers").castOption,f=e("./constants");function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function g(e){var t=e[0].trace,n=t.contours,r=u.hasLines(t),i=u.hasMarkers(t),o=t.visible&&t.fill&&"none"!==t.fill,a=!1,s=!1;if(n){var l=n.coloring;"lines"===l?a=!0:r="none"===l||"heatmap"===l||n.showlines,"constraint"===n.type?o="="!==n._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:r,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:r||a,anyFill:o||s}}function m(e,t,n){return e&&o.isArrayOrTypedArray(e)?t:e>n?n:e}t.exports=function(e,t,n){var v=t._fullLayout;n||(n=v.legend);var y="constant"===n.itemsizing,b=n.itemwidth,_=(b+2*f.itemGap)/2,x=a(_,0),w=function(e,t,n,r){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?r:Math.min(i,n)};function A(e,o,a){var u=e[0].trace,h=u.marker||{},d=h.line||{},f=a?u.visible&&u.type===a:i.traceIs(u,"bar"),p=r.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(f?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),p.exit().remove(),p.each((function(e){var i=r.select(this),o=e[0],a=w(o.mlw,h.line,5,2);i.style("stroke-width",a+"px");var f=o.mcc;if(!n._inHover&&"mc"in o){var p=c(h),g=p.mid;void 0===g&&(g=(p.max+p.min)/2),f=s.tryColorscale(h,"")(g)}var v=f||o.mc||h.color,y=h.pattern,b=y&&s.getPatternAttr(y.shape,0,"");if(b){var _=s.getPatternAttr(y.bgcolor,0,null),x=s.getPatternAttr(y.fgcolor,0,null),A=y.fgopacity,k=m(y.size,8,10),T=m(y.solidity,.5,1),S="legend-"+u.uid;i.call(s.pattern,"legend",t,S,b,k,T,f,y.fillmode,_,x,A)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||d.color)}))}function k(e,t,n){var a=e[0],s=a.trace,l=n?s.visible&&s.type===n:i.traceIs(s,n),c=r.select(t).select("g.legendpoints").selectAll("path.legend"+n).data(l?[e]:[]);if(c.enter().append("path").classed("legend"+n,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),c.exit().remove(),c.size()){var u=(s.marker||{}).line,f=w(d(u.width,a.pts),u,5,2),p=o.minExtend(s,{marker:{line:{width:f}}});p.marker.line.color=u.color;var g=o.minExtend(a,{trace:p});h(c,g,p)}}e.each((function(e){var t=r.select(this),i=o.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=n.valign,l=e[0].lineHeight,c=e[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",a(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var n,i=e[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":a=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":a=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":a=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":a=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,a){var u,h=r.select(this),d=c(i),f=d.colorscale,g=d.reversescale;if(f){if(!n){var m=f.length;u=0===a?f[g?m-1:0][1]:1===a?f[g?0:m-1][1]:f[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}h.attr("d",e[0]),u?h.call(l.fill,u):h.call((function(e){if(e.size()){var r="legendfill-"+i.uid;s.gradient(e,t,r,p(g,"radial"===n),f,"fill")}}))}))})).each((function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,A(e,this,"waterfall")}var o=[];t.visible&&n&&(o=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(e){var n=r.select(this),i=t[e[0]].marker,o=w(void 0,i.line,5,2);n.attr("d",e[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&n.call(l.stroke,i.line.color)}))})).each((function(e){A(e,this,"funnel")})).each((function(e){A(e,this)})).each((function(e){var n=e[0].trace,a=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(n.visible&&i.traceIs(n,"box-violin")?[e]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),a.exit().remove(),a.each((function(){var e=r.select(this);if("all"!==n.boxpoints&&"all"!==n.points||0!==l.opacity(n.fillcolor)||0!==l.opacity((n.line||{}).color)){var i=w(void 0,n.line,5,2);e.style("stroke-width",i+"px").call(l.fill,n.fillcolor),i&&l.stroke(e,n.line.color)}else{var c=o.minExtend(n,{marker:{size:y?12:o.constrain(n.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,t)}}))})).each((function(e){k(e,this,"funnelarea")})).each((function(e){k(e,this,"pie")})).each((function(e){var n,i,a=g(e),l=a.showFill,h=a.showLine,d=a.showGradientLine,f=a.showGradientFill,m=a.anyFill,v=a.anyLine,y=e[0],_=y.trace,x=c(_),A=x.colorscale,k=x.reversescale,T=u.hasMarkers(_)||!m?"M5,0":v?"M5,-2":"M5,-3",S=r.select(this),E=S.select(".legendfill").selectAll("path").data(l||f?[e]:[]);if(E.enter().append("path").classed("js-fill",!0),E.exit().remove(),E.attr("d",T+"h"+b+"v6h-"+b+"z").call(l?s.fillGroupStyle:function(e){if(e.size()){var n="legendfill-"+_.uid;s.gradient(e,t,n,p(k),A,"fill")}}),h||d){var C=w(void 0,_.line,10,5);i=o.minExtend(_,{line:{width:C}}),n=[o.minExtend(y,{trace:i})]}var M=S.select(".legendlines").selectAll("path").data(h||d?[n]:[]);M.enter().append("path").classed("js-line",!0),M.exit().remove(),M.attr("d",T+(d?"l"+b+",0.0001":"h"+b)).call(h?s.lineGroupStyle:function(e){if(e.size()){var n="legendline-"+_.uid;s.lineGroupStyle(e),s.gradient(e,t,n,p(k),A,"stroke")}})})).each((function(e){var n,i,a=g(e),l=a.anyFill,c=a.anyLine,h=a.showLine,d=a.showMarker,f=e[0],p=f.trace,m=!d&&!c&&!l&&u.hasText(p);function v(e,t,n,r){var i=o.nestedProperty(p,e).get(),a=o.isArrayOrTypedArray(i)&&t?t(i):i;if(y&&a&&void 0!==r&&(a=r),n){if(a<n[0])return n[0];if(a>n[1])return n[1]}return a}function b(e){return f._distinct&&f.index&&e[f.index]?e[f.index]:e[0]}if(d||m||h){var _={},w={};if(d){_.mc=v("marker.color",b),_.mx=v("marker.symbol",b),_.mo=v("marker.opacity",o.mean,[.2,1]),_.mlc=v("marker.line.color",b),_.mlw=v("marker.line.width",o.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var A=v("marker.size",o.mean,[2,16],12);_.ms=A,w.marker.size=A}h&&(w.line={width:v("line.width",b,[0,10],5)}),m&&(_.tx="Aa",_.tp=v("textposition",b),_.ts=10,_.tc=v("textfont.color",b),_.tf=v("textfont.family",b)),n=[o.minExtend(f,_)],(i=o.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var k=r.select(this).select("g.legendpoints"),T=k.selectAll("path.scatterpts").data(d?n:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),T.exit().remove(),T.call(s.pointStyle,i,t),d&&(n[0].mrc=3);var S=k.selectAll("g.pointtext").data(m?n:[]);S.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),S.exit().remove(),S.selectAll("text").call(s.textPointStyle,i,t)})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",x).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),o=t[n?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",x).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),o=t[n?"increasing":"decreasing"],a=w(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},{"../../lib":503,"../../registry":638,"../../traces/pie/helpers":905,"../../traces/pie/style_one":911,"../../traces/scatter/subtypes":951,"../color":366,"../colorscale/helpers":377,"../drawing":388,"./constants":417,"@plotly/d3":58}],425:[function(e,t,n){"use strict";e("./constants"),t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},{"./constants":427}],426:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../plots/plots"),o=e("../../plots/cartesian/axis_ids"),a=e("../../fonts/ploticon"),s=e("../shapes/draw").eraseActiveShape,l=e("../../lib"),c=l._,u=t.exports={};function h(e,t){var n,i,a=t.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=e._fullLayout,u={},h=o.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,g=(1+p)/2,m=(1-p)/2;for(i=0;i<h.length;i++)if(!(n=h[i]).fixedrange)if(f=n._name,"auto"===l)u[f+".autorange"]=!0;else if("reset"===l){if(void 0===n._rangeInitial)u[f+".autorange"]=!0;else{var v=n._rangeInitial.slice();u[f+".range[0]"]=v[0],u[f+".range[1]"]=v[1]}void 0!==n._showSpikeInitial&&(u[f+".showspikes"]=n._showSpikeInitial,"on"!==d||n._showSpikeInitial||(d="off"))}else{var y=[n.r2l(n.range[0]),n.r2l(n.range[1])],b=[g*y[0]+m*y[1],g*y[1]+m*y[0]];u[f+".range[0]"]=n.l2r(b[0]),u[f+".range[1]"]=n.l2r(b[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=c._isHoriz?"y":"x",a.setAttribute("data-val",l)),u[s]=l;c._cartesianSpikesEnabled=d,r.call("_guiRelayout",e,u)}function d(e,t){for(var n=t.currentTarget,i=n.getAttribute("data-attr"),o=n.getAttribute("data-val")||!0,a=e._fullLayout._subplots.gl3d||[],s={},l=i.split("."),c=0;c<a.length;c++)s[a[c]+"."+l[1]]=o;var u="pan"===o?o:"zoom";s.dragmode=u,r.call("_guiRelayout",e,s)}function f(e,t){for(var n=t.currentTarget.getAttribute("data-attr"),i="resetLastSave"===n,o="resetDefault"===n,a=e._fullLayout,s=a._subplots.gl3d||[],l={},c=0;c<s.length;c++){var u,h=s[c],d=h+".camera",f=h+".aspectratio",p=h+".aspectmode",g=a[h]._scene;i?(l[d+".up"]=g.viewInitial.up,l[d+".eye"]=g.viewInitial.eye,l[d+".center"]=g.viewInitial.center,u=!0):o&&(l[d+".up"]=null,l[d+".eye"]=null,l[d+".center"]=null,u=!0),u&&(l[f+".x"]=g.viewInitial.aspectratio.x,l[f+".y"]=g.viewInitial.aspectratio.y,l[f+".z"]=g.viewInitial.aspectratio.z,l[p]=g.viewInitial.aspectmode)}r.call("_guiRelayout",e,l)}function p(e,t){var n=t.currentTarget,r=n._previousVal,i=e._fullLayout,o=i._subplots.gl3d||[],a=["xaxis","yaxis","zaxis"],s={},l={};if(r)l=r,n._previousVal=null;else{for(var c=0;c<o.length;c++){var u=o[c],h=i[u],d=u+".hovermode";s[d]=h.hovermode,l[d]=!1;for(var f=0;f<3;f++){var p=a[f],g=u+"."+p+".showspikes";l[g]=!1,s[g]=h[p].showspikes}}n._previousVal=s}return l}function g(e,t){for(var n=t.currentTarget,i=n.getAttribute("data-attr"),o=n.getAttribute("data-val")||!0,a=e._fullLayout,s=a._subplots.geo||[],l=0;l<s.length;l++){var c=s[l],u=a[c];if("zoom"===i){var h=u.projection.scale,d="in"===o?2*h:.5*h;r.call("_guiRelayout",e,c+".projection.scale",d)}}"reset"===i&&b(e,"geo")}function m(e){var t=e._fullLayout;return!t.hovermode&&(t._has("cartesian")?t._isHoriz?"y":"x":"closest")}function v(e){var t=m(e);r.call("_guiRelayout",e,"hovermode",t)}function y(e,t){for(var n=t.currentTarget.getAttribute("data-val"),i=e._fullLayout,o=i._subplots.mapbox||[],a={},s=0;s<o.length;s++){var l=o[s],c=i[l].zoom,u="in"===n?1.05*c:c/1.05;a[l+".zoom"]=u}r.call("_guiRelayout",e,a)}function b(e,t){for(var n=e._fullLayout,i=n._subplots[t]||[],o={},a=0;a<i.length;a++)for(var s=i[a],l=n[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var h=c[u];o[s+"."+h]=l[h]}r.call("_guiRelayout",e,o)}u.toImage={name:"toImage",title:function(e){var t=(e._context.toImageButtonOptions||{}).format||"png";return c(e,"png"===t?"Download plot as a png":"Download plot")},icon:a.camera,click:function(e){var t=e._context.toImageButtonOptions,n={format:t.format||"png"};l.notifier(c(e,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==n.format&&l.isIE()&&(l.notifier(c(e,"IE only supports svg. Changing format to svg."),"long"),n.format="svg"),["filename","width","height","scale"].forEach((function(e){e in t&&(n[e]=t[e])})),r.call("downloadImage",e,n).then((function(t){l.notifier(c(e,"Snapshot succeeded")+" - "+t,"long")})).catch((function(){l.notifier(c(e,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},u.sendDataToCloud={name:"sendDataToCloud",title:function(e){return c(e,"Edit in Chart Studio")},icon:a.disk,click:function(e){i.sendDataToCloud(e)}},u.editInChartStudio={name:"editInChartStudio",title:function(e){return c(e,"Edit in Chart Studio")},icon:a.pencil,click:function(e){i.sendDataToCloud(e)}},u.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"dragmode",val:"zoom",icon:a.zoombox,click:h},u.pan2d={name:"pan2d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"dragmode",val:"pan",icon:a.pan,click:h},u.select2d={name:"select2d",_cat:"select",title:function(e){return c(e,"Box Select")},attr:"dragmode",val:"select",icon:a.selectbox,click:h},u.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return c(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:a.lasso,click:h},u.drawclosedpath={name:"drawclosedpath",title:function(e){return c(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:a.drawclosedpath,click:h},u.drawopenpath={name:"drawopenpath",title:function(e){return c(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:a.drawopenpath,click:h},u.drawline={name:"drawline",title:function(e){return c(e,"Draw line")},attr:"dragmode",val:"drawline",icon:a.drawline,click:h},u.drawrect={name:"drawrect",title:function(e){return c(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:a.drawrect,click:h},u.drawcircle={name:"drawcircle",title:function(e){return c(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:a.drawcircle,click:h},u.eraseshape={name:"eraseshape",title:function(e){return c(e,"Erase active shape")},icon:a.eraseshape,click:s},u.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:a.zoom_plus,click:h},u.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:a.zoom_minus,click:h},u.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return c(e,"Autoscale")},attr:"zoom",val:"auto",icon:a.autoscale,click:h},u.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return c(e,"Reset axes")},attr:"zoom",val:"reset",icon:a.home,click:h},u.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return c(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:a.tooltip_basic,gravity:"ne",click:h},u.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return c(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:a.tooltip_compare,gravity:"ne",click:h},u.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:a.zoombox,click:d},u.pan3d={name:"pan3d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:a.pan,click:d},u.orbitRotation={name:"orbitRotation",title:function(e){return c(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:a["3d_rotate"],click:d},u.tableRotation={name:"tableRotation",title:function(e){return c(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:a["z-axis"],click:d},u.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return c(e,"Reset camera to default")},attr:"resetDefault",icon:a.home,click:f},u.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return c(e,"Reset camera to last save")},attr:"resetLastSave",icon:a.movie,click:f},u.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:a.tooltip_basic,gravity:"ne",click:function(e,t){var n=p(e,t);r.call("_guiRelayout",e,n)}},u.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:a.zoom_plus,click:g},u.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:a.zoom_minus,click:g},u.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return c(e,"Reset")},attr:"reset",val:null,icon:a.autoscale,click:g},u.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:a.tooltip_basic,gravity:"ne",click:v},u.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:a.tooltip_basic,gravity:"ne",click:v},u.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:a.tooltip_basic,gravity:"ne",click:v},u.resetViewSankey={name:"resetSankeyGroup",title:function(e){return c(e,"Reset view")},icon:a.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},n=0;n<e._fullData.length;n++){var i=e._fullData[n]._viewInitial;t["node.groups"].push(i.node.groups.slice()),t["node.x"].push(i.node.x.slice()),t["node.y"].push(i.node.y.slice())}r.call("restyle",e,t)}},u.toggleHover={name:"toggleHover",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:a.tooltip_basic,gravity:"ne",click:function(e,t){var n=p(e,t);n.hovermode=m(e),r.call("_guiRelayout",e,n)}},u.resetViews={name:"resetViews",title:function(e){return c(e,"Reset views")},icon:a.home,click:function(e,t){var n=t.currentTarget;n.setAttribute("data-attr","zoom"),n.setAttribute("data-val","reset"),h(e,t),n.setAttribute("data-attr","resetLastSave"),f(e,t),b(e,"geo"),b(e,"mapbox")}},u.toggleSpikelines={name:"toggleSpikelines",title:function(e){return c(e,"Toggle Spike Lines")},icon:a.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,n=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled="on"===n?"off":"on",r.call("_guiRelayout",e,function(e){for(var t="on"===e._fullLayout._cartesianSpikesEnabled,n=o.list(e,null,!0),r={},i=0;i<n.length;i++){var a=n[i];r[a._name+".showspikes"]=!!t||a._showSpikeInitial}return r}(e))}},u.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(e){return c(e,"Reset view")},attr:"reset",icon:a.home,click:function(e){b(e,"mapbox")}},u.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:a.zoom_plus,click:y},u.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:a.zoom_minus,click:y}},{"../../fonts/ploticon":482,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../shapes/draw":450}],427:[function(e,t,n){"use strict";var r=e("./buttons"),i=Object.keys(r),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(e){!function(e){if(-1===a.indexOf(e._cat||e.name)){var t=e.name,n=(e._cat||e.name).toLowerCase();-1===s.indexOf(t)&&s.push(t),-1===s.indexOf(n)&&s.push(n)}}(r[e])})),s.sort(),t.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},{"./buttons":426}],428:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../color"),o=e("../../plot_api/plot_template"),a=e("./attributes");t.exports=function(e,t){var n=e.modebar||{},s=o.newContainer(t,"modebar");function l(e,t){return r.coerce(n,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}},{"../../lib":503,"../../plot_api/plot_template":543,"../color":366,"./attributes":425}],429:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),manage:e("./manage")}},{"./attributes":425,"./defaults":428,"./manage":430}],430:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_ids"),i=e("../../traces/scatter/subtypes"),o=e("../../registry"),a=e("../fx/helpers").isUnifiedHover,s=e("./modebar"),l=e("./buttons"),c=e("./constants").DRAW_MODES;function u(e){var t=e._fullLayout,n=e._fullData,s=e._context;function u(e,t){if("string"==typeof t){if(t.toLowerCase()===e.toLowerCase())return!0}else{var n=t.name,r=t._cat||t.name;if(n===e||r===e.toLowerCase())return!0}return!1}var h=t.modebar.add;"string"==typeof h&&(h=[h]);var d=t.modebar.remove;"string"==typeof d&&(d=[d]);var f=s.modeBarButtonsToAdd.concat(h.filter((function(e){for(var t=0;t<s.modeBarButtonsToRemove.length;t++)if(u(e,s.modeBarButtonsToRemove[t]))return!1;return!0}))),p=s.modeBarButtonsToRemove.concat(d.filter((function(e){for(var t=0;t<s.modeBarButtonsToAdd.length;t++)if(u(e,s.modeBarButtonsToAdd[t]))return!1;return!0}))),g=t._has("cartesian"),m=t._has("gl3d"),v=t._has("geo"),y=t._has("pie"),b=t._has("funnelarea"),_=t._has("gl2d"),x=t._has("ternary"),w=t._has("mapbox"),A=t._has("polar"),k=t._has("smith"),T=t._has("sankey"),S=function(e){for(var t=r.list({_fullLayout:e},null,!0),n=0;n<t.length;n++)if(!t[n].fixedrange)return!1;return!0}(t),E=a(t.hovermode),C=[];function M(e){if(e.length){for(var t=[],n=0;n<e.length;n++){for(var r=e[n],i=l[r],o=i.name.toLowerCase(),a=(i._cat||i.name).toLowerCase(),s=!1,c=0;c<p.length;c++){var u=p[c].toLowerCase();if(u===o||u===a){s=!0;break}}s||t.push(l[r])}C.push(t)}}var O=["toImage"];s.showEditInChartStudio?O.push("editInChartStudio"):s.showSendToCloud&&O.push("sendDataToCloud"),M(O);var L=[],D=[],I=[],R=[];(g||_||y||b||x)+v+m+w+A+k>1?(D=["toggleHover"],I=["resetViews"]):v?(L=["zoomInGeo","zoomOutGeo"],D=["hoverClosestGeo"],I=["resetGeo"]):m?(D=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(L=["zoomInMapbox","zoomOutMapbox"],D=["toggleHover"],I=["resetViewMapbox"]):_?D=["hoverClosestGl2d"]:y?D=["hoverClosestPie"]:T?(D=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):D=["toggleHover"],g&&(D=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(e){for(var t=0;t<e.length;t++)if(!o.traceIs(e[t],"noHover"))return!1;return!0}(n)||E)&&(D=[]),!g&&!_||S||(L=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==I[0]&&(I=["resetScale2d"])),m?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:(g||_)&&!S||x?R=["zoom2d","pan2d"]:w||v?R=["pan2d"]:A&&(R=["zoom2d"]),function(e){for(var t=!1,n=0;n<e.length&&!t;n++){var r=e[n];r._module&&r._module.selectPoints&&(o.traceIs(r,"scatter-like")?(i.hasMarkers(r)||i.hasText(r))&&(t=!0):o.traceIs(r,"box-violin")&&"all"!==r.boxpoints&&"all"!==r.points||(t=!0))}return t}(n)&&R.push("select2d","lasso2d");var P=[],N=function(e){-1===P.indexOf(e)&&-1!==D.indexOf(e)&&P.push(e)};if(Array.isArray(f)){for(var z=[],F=0;F<f.length;F++){var B=f[F];"string"==typeof B?(B=B.toLowerCase(),-1!==c.indexOf(B)?(t._has("mapbox")||t._has("cartesian"))&&R.push(B):"togglespikelines"===B?N("toggleSpikelines"):"togglehover"===B?N("toggleHover"):"hovercompare"===B?N("hoverCompareCartesian"):"hoverclosest"===B?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie")):"v1hovermode"===B&&(N("toggleHover"),N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie"))):z.push(B)}f=z}return M(R),M(L.concat(I)),M(P),function(e,t){if(t.length)if(Array.isArray(t[0]))for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t);return e}(C,f)}t.exports=function(e){var t=e._fullLayout,n=e._context,r=t._modeBar;if(n.displayModeBar||n.watermark){if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i,o=n.modeBarButtons;i=Array.isArray(o)&&o.length?function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=0;r<n.length;r++){var i=n[r];if("string"==typeof i){if(void 0===l[i])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[t][r]=l[i]}}return e}(o):!n.displayModeBar&&n.watermark?[]:u(e),r?r.update(e,i):t._modeBar=s(e,i)}else r&&(r.destroy(),delete t._modeBar)}},{"../../plots/cartesian/axis_ids":558,"../../registry":638,"../../traces/scatter/subtypes":951,"../fx/helpers":402,"./buttons":426,"./constants":427,"./modebar":431}],431:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../lib"),a=e("../../fonts/ploticon"),s=e("../../version").version,l=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(e,t){this.graphInfo=e;var n=this.graphInfo._context,r=this.graphInfo._fullLayout,i="modebar-"+r._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===n.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===r.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var a=r.modebar,s="hover"===n.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(t),c=this.hasLogo!==n.displaylogo,u=this.locale!==n.locale;if(this.locale=n.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(t),n.watermark||n.displaylogo)){var h=this.getLogo();n.watermark&&(h.className=h.className+" watermark"),"v"===r.modebar.orientation?this.element.insertBefore(h,this.element.childNodes[0]):this.element.appendChild(h),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var n=t.createGroup();e.forEach((function(e){var r=e.name;if(!r)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(r))throw new Error("button name '"+r+"' is taken");t.buttonsNames.push(r);var i=t.createButton(e);t.buttonElements.push(i),n.appendChild(i)})),t.element.appendChild(n)}))},u.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},u.createButton=function(e){var t=this,n=document.createElement("a");n.setAttribute("rel","tooltip"),n.className="modebar-btn";var i=e.title;void 0===i?i=e.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&n.setAttribute("data-title",i),void 0!==e.attr&&n.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),n.setAttribute("data-val",o)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");n.addEventListener("click",(function(n){e.click(t.graphInfo,n),t.updateActiveButton(n.currentTarget)})),n.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(n).classed("active",!0);var s=e.icon;return"function"==typeof s?n.appendChild(s()):n.appendChild(this.createIcon(s||a.question)),n.setAttribute("data-gravity",e.gravity||"n"),n},u.createIcon=function(e){var t,n=i(e.height)?Number(e.height):e.ascent-e.descent,r="path_to_url";if(e.path){(t=document.createElementNS(r,"svg")).setAttribute("viewBox",[0,0,e.width,n].join(" ")),t.setAttribute("class","icon");var o=document.createElementNS(r,"path");o.setAttribute("d",e.path),e.transform?o.setAttribute("transform",e.transform):void 0!==e.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(o)}return e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},u.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,n=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var i=e.getAttribute("data-val")||!0,a=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e);if(s)a===n&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(t,a).get();l.classed("active",c===i)}}))},u.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n){if(e[n].length!==t[n].length)return!1;for(var r=0;r<e[n].length;r++)if(e[n][r].name!==t[n][r].name)return!1}return!0},u.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="path_to_url",t.target="_blank",t.setAttribute("data-title",o._(this.graphInfo,"Produced with Plotly.js")+" (v"+s+")"),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(a.newplotlylogo)),e.appendChild(t),e},u.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},u.destroy=function(){o.removeElement(this.container.querySelector(".modebar")),o.deleteRelatedStyleRule(this._uid)},t.exports=function(e,t){var n=e._fullLayout,i=new c({graphInfo:e,container:n._modebardiv.node(),buttons:t});return n._privateplot&&r.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},{"../../fonts/ploticon":482,"../../lib":503,"../../version":1119,"@plotly/d3":58,"fast-isnumeric":190}],432:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../color/attributes"),o=(0,e("../../plot_api/plot_template").templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:r({editType:"plot"}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},{"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../color/attributes":365}],433:[function(e,t,n){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],434:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../color"),o=e("../../plot_api/plot_template"),a=e("../../plots/array_container_defaults"),s=e("./attributes"),l=e("./constants");function c(e,t,n,i){var o=i.calendar;function a(n,i){return r.coerce(e,t,s.buttons,n,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):t.stepmode="backward",a("count")),a("label")}}t.exports=function(e,t,n,u,h){var d=e.rangeselector||{},f=o.newContainer(t,"rangeselector");function p(e,t){return r.coerce(d,f,s,e,t)}if(p("visible",a(d,f,{name:"buttons",handleItemDefaults:c,calendar:h}).length>0)){var g=function(e,t,n){for(var r=n.filter((function(n){return t[n].anchor===e._id})),i=0,o=0;o<r.length;o++){var a=t[r[o]].domain;a&&(i=Math.max(a[1],i))}return[e.domain[0],i+l.yPad]}(t,n,u);p("x",g[0]),p("y",g[1]),r.noneOrAll(e,t,["x","y"]),p("xanchor"),p("yanchor"),r.coerceFont(p,"font",n.font);var m=p("bgcolor");p("activecolor",i.contrast(m,l.lightAmount,l.darkAmount)),p("bordercolor"),p("borderwidth")}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../color":366,"./attributes":432,"./constants":433}],435:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../plots/plots"),a=e("../color"),s=e("../drawing"),l=e("../../lib"),c=l.strTranslate,u=e("../../lib/svg_text_utils"),h=e("../../plots/cartesian/axis_ids"),d=e("../../constants/alignment"),f=d.LINE_SPACING,p=d.FROM_TL,g=d.FROM_BR,m=e("./constants"),v=e("./get_update_object");function y(e){return e._id}function b(e,t,n){var r=l.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));r.attr({rx:m.rx,ry:m.ry}),r.call(a.stroke,t.bordercolor).call(a.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,n)).style("stroke-width",t.borderwidth+"px")}function _(e,t,n,r){var i,o;l.ensureSingle(e,"text","selector-text",(function(e){e.attr("text-anchor","middle")})).call(s.font,t.font).text((i=n,o=r._fullLayout._meta,i.label?o?l.templateString(i.label,o):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(e){u.convertToTspans(e,r)}))}t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=h.list(e,"x",!0),n=[],r=0;r<t.length;r++){var i=t[r];i.rangeselector&&i.rangeselector.visible&&n.push(i)}return n}(e),y);t.enter().append("g").classed("rangeselector",!0),t.exit().remove(),t.style({cursor:"pointer","pointer-events":"all"}),t.each((function(t){var n=r.select(this),a=t,h=a.rangeselector,d=n.selectAll("g.button").data(l.filterVisible(h.buttons));d.enter().append("g").classed("button",!0),d.exit().remove(),d.each((function(t){var n=r.select(this),o=v(a,t);t._isActive=function(e,t,n){if("all"===t.step)return!0===e.autorange;var r=Object.keys(n);return e.range[0]===n[r[0]]&&e.range[1]===n[r[1]]}(a,t,o),n.call(b,h,t),n.call(_,h,t,e),n.on("click",(function(){e._dragged||i.call("_guiRelayout",e,o)})),n.on("mouseover",(function(){t._isHovered=!0,n.call(b,h,t)})),n.on("mouseout",(function(){t._isHovered=!1,n.call(b,h,t)}))})),function(e,t,n,i,a){var h=0,d=0,v=n.borderwidth;t.each((function(){var e=r.select(this).select(".selector-text"),t=n.font.size*f,i=Math.max(t*u.lineCount(e),16)+3;d=Math.max(d,i)})),t.each((function(){var e=r.select(this),t=e.select(".selector-rect"),i=e.select(".selector-text"),o=i.node()&&s.bBox(i.node()).width,a=n.font.size*f,l=u.lineCount(i),p=Math.max(o+10,m.minButtonWidth);e.attr("transform",c(v+h,v)),t.attr({x:0,y:0,width:p,height:d}),u.positionText(i,p/2,d/2-(l-1)*a/2+3),h+=p+5}));var y=e._fullLayout._size,b=y.l+y.w*n.x,_=y.t+y.h*(1-n.y),x="left";l.isRightAnchor(n)&&(b-=h,x="right"),l.isCenterAnchor(n)&&(b-=h/2,x="center");var w="top";l.isBottomAnchor(n)&&(_-=d,w="bottom"),l.isMiddleAnchor(n)&&(_-=d/2,w="middle"),h=Math.ceil(h),d=Math.ceil(d),b=Math.round(b),_=Math.round(_),o.autoMargin(e,i+"-range-selector",{x:n.x,y:n.y,l:h*p[x],r:h*g[x],b:d*g[w],t:d*p[w]}),a.attr("transform",c(b,_))}(e,d,h,a._name,n)}))}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"./constants":433,"./get_update_object":436,"@plotly/d3":58}],436:[function(e,t,n){"use strict";var r=e("d3-time"),i=e("../../lib").titleCase;t.exports=function(e,t){var n=e._name,o={};if("all"===t.step)o[n+".autorange"]=!0;else{var a=function(e,t){var n,o=e.range,a=new Date(e.r2l(o[1])),s=t.step,l=r["utc"+i(s)],c=t.count;switch(t.stepmode){case"backward":n=e.l2r(+l.offset(a,-c));break;case"todate":var u=l.offset(a,-c);n=e.l2r(+l.ceil(u))}return[n,o[1]]}(e,t);o[n+".range[0]"]=a[0],o[n+".range[1]"]=a[1]}return o}},{"../../lib":503,"d3-time":122}],437:[function(e,t,n){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":432,"./defaults":434,"./draw":435}],438:[function(e,t,n){"use strict";var r=e("../color/attributes");t.exports={bgcolor:{valType:"color",dflt:r.background,editType:"plot"},bordercolor:{valType:"color",dflt:r.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},{"../color/attributes":365}],439:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_ids").list,i=e("../../plots/cartesian/autorange").getAutoRange,o=e("./constants");t.exports=function(e){for(var t=r(e,"x",!0),n=0;n<t.length;n++){var a=t[n],s=a[o.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(e,a))}}},{"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"./constants":440}],440:[function(e,t,n){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],441:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("../../plots/cartesian/axis_ids"),a=e("./attributes"),s=e("./oppaxis_attributes");t.exports=function(e,t,n){var l=e[n],c=t[n];if(l.rangeslider||t._requestRangeslider[c._id]){r.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,h,d=l.rangeslider,f=i.newContainer(c,"rangeslider");if(x("visible")){x("bgcolor",t.plot_bgcolor),x("bordercolor"),x("borderwidth"),x("thickness"),x("autorange",!c.isValidRange(d.range)),x("range");var p=t._subplots;if(p)for(var g=p.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===o.name2id(n)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),m=r.simpleMap(g,o.id2name),v=0;v<m.length;v++){var y=m[v];u=d[y]||{},h=i.newContainer(f,y,"yaxis");var b,_=t[y];u.range&&_.isValidRange(u.range)&&(b="fixed"),"match"!==w("rangemode",b)&&w("range",_.range.slice())}f._input=d}}function x(e,t){return r.coerce(d,f,a,e,t)}function w(e,t){return r.coerce(u,h,s,e,t)}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_ids":558,"./attributes":438,"./oppaxis_attributes":445}],442:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../plots/plots"),a=e("../../lib"),s=a.strTranslate,l=e("../drawing"),c=e("../color"),u=e("../titles"),h=e("../../plots/cartesian"),d=e("../../plots/cartesian/axis_ids"),f=e("../dragelement"),p=e("../../lib/setcursor"),g=e("./constants");function m(e,t,n,o){if(!t._context.staticPlot){var s=e.select("rect."+g.slideBoxClassName).node(),l=e.select("rect."+g.grabAreaMinClassName).node(),c=e.select("rect."+g.grabAreaMaxClassName).node();e.on("mousedown",u),e.on("touchstart",u)}function u(){var u=r.event,h=u.target,d=u.clientX||u.touches[0].clientX,g=d-e.node().getBoundingClientRect().left,m=o.d2p(n._rl[0]),v=o.d2p(n._rl[1]),y=f.coverSlip();function b(e){var u,f,b,_=+(e.clientX||e.touches[0].clientX)-d;switch(h){case s:b="ew-resize",u=m+_,f=v+_;break;case l:b="col-resize",u=m+_,f=v;break;case c:b="col-resize",u=m,f=v+_;break;default:b="ew-resize",u=g,f=g+_}if(f<u){var x=f;f=u,u=x}o._pixelMin=u,o._pixelMax=f,p(r.select(y),b),function(e,t,n,r){function o(e){return n.l2r(a.constrain(e,r._rl[0],r._rl[1]))}var s=o(r.p2d(r._pixelMin)),l=o(r.p2d(r._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",t,n._name+".range",[s,l])}))}(0,t,n,o)}function _(){y.removeEventListener("mousemove",b),y.removeEventListener("mouseup",_),this.removeEventListener("touchmove",b),this.removeEventListener("touchend",_),a.removeElement(y)}this.addEventListener("touchmove",b),this.addEventListener("touchend",_),y.addEventListener("mousemove",b),y.addEventListener("mouseup",_)}}function v(e,t,n,r){var i=a.ensureSingle(e,"rect",g.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=r.borderwidth%2==0?r.borderwidth:r.borderwidth-1,c=-r._offsetShift,u=l.crispRound(t,r.borderwidth);i.attr({width:r._width+o,height:r._height+o,transform:s(c,c),fill:r.bgcolor,stroke:r.bordercolor,"stroke-width":u})}function y(e,t,n,r){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",r._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:r._width,height:r._height})}function b(e,t,n,i){var s,c=t.calcdata,u=e.selectAll("g."+g.rangePlotClassName).data(n._subplotsWith,a.identity);u.enter().append("g").attr("class",(function(e){return g.rangePlotClassName+" "+e})).call(l.setClipUrl,i._clipId,t),u.order(),u.exit().remove(),u.each((function(e,a){var l=r.select(this),u=0===a,f=d.getFromId(t,e,"y"),p=f._name,g=i[p],m={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:i.range.slice(),calendar:n.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(m.layout.xaxis.rangebreaks=n.rangebreaks),m.layout[p]={type:f.type,domain:[0,1],range:"match"!==g.rangemode?g.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(m.layout[p].rangebreaks=f.rangebreaks),o.supplyDefaults(m);var v=m._fullLayout.xaxis,y=m._fullLayout[p];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var b={id:e,plotgroup:l,xaxis:v,yaxis:y,isRangePlot:!0};u?s=b:(b.mainplot="xy",b.mainplotinfo=s),h.rangePlot(t,b,function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i[0].trace;o.xaxis+o.yaxis===t&&n.push(i)}return n}(c,e))}))}function _(e,t,n,r,i){a.ensureSingle(e,"rect",g.maskMinClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",r._height).call(c.fill,g.maskColor),a.ensureSingle(e,"rect",g.maskMaxClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",r._height).call(c.fill,g.maskColor),"match"!==i.rangemode&&(a.ensureSingle(e,"rect",g.maskMinOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",r._width).call(c.fill,g.maskOppAxisColor),a.ensureSingle(e,"rect",g.maskMaxOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",r._width).style("border-top",g.maskOppBorder).call(c.fill,g.maskOppAxisColor))}function x(e,t,n,r){t._context.staticPlot||a.ensureSingle(e,"rect",g.slideBoxClassName,(function(e){e.attr({y:0,cursor:g.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:r._height,fill:g.slideBoxFill})}function w(e,t,n,r){var i=a.ensureSingle(e,"g",g.grabberMinClassName),o=a.ensureSingle(e,"g",g.grabberMaxClassName),s={x:0,width:g.handleWidth,rx:g.handleRadius,fill:c.background,stroke:c.defaultLine,"stroke-width":g.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(r._height/4),height:Math.round(r._height/2)};a.ensureSingle(i,"rect",g.handleMinClassName,(function(e){e.attr(s)})).attr(l),a.ensureSingle(o,"rect",g.handleMaxClassName,(function(e){e.attr(s)})).attr(l);var u={width:g.grabAreaWidth,x:0,y:0,fill:g.grabAreaFill,cursor:t._context.staticPlot?void 0:g.grabAreaCursor};a.ensureSingle(i,"rect",g.grabAreaMinClassName,(function(e){e.attr(u)})).attr("height",r._height),a.ensureSingle(o,"rect",g.grabAreaMaxClassName,(function(e){e.attr(u)})).attr("height",r._height)}t.exports=function(e){for(var t=e._fullLayout,n=t._rangeSliderData,i=0;i<n.length;i++){var o=n[i][g.name];o._clipId=o._id+"-"+t._uid}var l=t._infolayer.selectAll("g."+g.containerClassName).data(n,(function(e){return e._name}));l.exit().each((function(e){var n=e[g.name];t._topdefs.select("#"+n._clipId).remove()})).remove(),0!==n.length&&(l.enter().append("g").classed(g.containerClassName,!0).attr("pointer-events","all"),l.each((function(n){var i=r.select(this),o=n[g.name],l=t[d.id2name(n.anchor)],c=o[d.id2name(n.anchor)];if(o.range){var h,f=a.simpleMap(o.range,n.r2l),p=a.simpleMap(n.range,n.r2l);h=p[0]<p[1]?[Math.min(f[0],p[0]),Math.max(f[1],p[1])]:[Math.max(f[0],p[0]),Math.min(f[1],p[1])],o.range=o._input.range=a.simpleMap(h,n.l2r)}n.cleanRange("rangeslider.range");var A=t._size,k=n.domain;o._width=A.w*(k[1]-k[0]);var T=Math.round(A.l+A.w*k[0]),S=Math.round(A.t+A.h*(1-n._counterDomainMin)+("bottom"===n.side?n._depth:0)+o._offsetShift+g.extraPad);i.attr("transform",s(T,S)),o._rl=a.simpleMap(o.range,n.r2l);var E=o._rl[0],C=o._rl[1],M=C-E;if(o.p2d=function(e){return e/o._width*M+E},o.d2p=function(e){return(e-E)/M*o._width},n.rangebreaks){var O=n.locateBreaks(E,C);if(O.length){var L,D,I=0;for(L=0;L<O.length;L++)I+=(D=O[L]).max-D.min;var R=o._width/(C-E-I),P=[-R*E];for(L=0;L<O.length;L++)D=O[L],P.push(P[P.length-1]-R*(D.max-D.min));for(o.d2p=function(e){for(var t=P[0],n=0;n<O.length;n++){var r=O[n];if(e>=r.max)t=P[n+1];else if(e<r.min)break}return t+R*e},L=0;L<O.length;L++)(D=O[L]).pmin=o.d2p(D.min),D.pmax=o.d2p(D.max);o.p2d=function(e){for(var t=P[0],n=0;n<O.length;n++){var r=O[n];if(e>=r.pmax)t=P[n+1];else if(e<r.pmin)break}return(e-t)/R}}}if("match"!==c.rangemode){var N=l.r2l(c.range[0]),z=l.r2l(c.range[1])-N;o.d2pOppAxis=function(e){return(e-N)/z*o._height}}i.call(v,e,n,o).call(y,e,n,o).call(b,e,n,o).call(_,e,n,o,c).call(x,e,n,o).call(w,e,n,o),m(i,e,n,o),function(e,t,n,r,i,o){var l=g.handleWidth/2;function c(e){return a.constrain(e,0,r._width)}function u(e){return a.constrain(e,0,r._height)}function h(e){return a.constrain(e,-l,r._width+l)}var d=c(r.d2p(n._rl[0])),f=c(r.d2p(n._rl[1]));if(e.select("rect."+g.slideBoxClassName).attr("x",d).attr("width",f-d),e.select("rect."+g.maskMinClassName).attr("width",d),e.select("rect."+g.maskMaxClassName).attr("x",f).attr("width",r._width-f),"match"!==o.rangemode){var p=r._height-u(r.d2pOppAxis(i._rl[1])),m=r._height-u(r.d2pOppAxis(i._rl[0]));e.select("rect."+g.maskMinOppAxisClassName).attr("x",d).attr("height",p).attr("width",f-d),e.select("rect."+g.maskMaxOppAxisClassName).attr("x",d).attr("y",m).attr("height",r._height-m).attr("width",f-d),e.select("rect."+g.slideBoxClassName).attr("y",p).attr("height",m-p)}var v=.5,y=Math.round(h(d-l))-v,b=Math.round(h(f-l))+v;e.select("g."+g.grabberMinClassName).attr("transform",s(y,v)),e.select("g."+g.grabberMaxClassName).attr("transform",s(b,v))}(i,0,n,o,l,c),"bottom"===n.side&&u.draw(e,n._id+"title",{propContainer:n,propName:n._name+".title",placeholder:t._dfltTitle.x,attributes:{x:n._offset+n._length/2,y:S+o._height+o._offsetShift+10+1.5*n.title.font.size,"text-anchor":"middle"}})})))}},{"../../lib":503,"../../lib/setcursor":524,"../../plots/cartesian":568,"../../plots/cartesian/axis_ids":558,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":440,"@plotly/d3":58}],443:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_ids"),i=e("../../lib/svg_text_utils"),o=e("./constants"),a=e("../../constants/alignment").LINE_SPACING,s=o.name;function l(e){var t=e&&e[s];return t&&t.visible}n.isVisible=l,n.makeData=function(e){var t=r.list({_fullLayout:e},"x",!0),n=e.margin,i=[];if(!e._has("gl2d"))for(var o=0;o<t.length;o++){var a=t[o];if(l(a)){i.push(a);var c=a[s];c._id=s+a._id,c._height=(e.height-n.b-n.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}e._rangeSliderData=i},n.autoMarginOpts=function(e,t){var n=e._fullLayout,r=t[s],l=t._id.charAt(0),c=0,u=0;return"bottom"===t.side&&(c=t._depth,t.title.text!==n._dfltTitle[l]&&(u=1.5*t.title.font.size+10+r._offsetShift,u+=(t.title.text.match(i.BR_TAG_ALL)||[]).length*t.title.font.size*a)),{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:r._height+c+Math.max(n.margin.b,u),pad:o.extraPad+2*r._offsetShift}}},{"../../constants/alignment":471,"../../lib/svg_text_utils":529,"../../plots/cartesian/axis_ids":558,"./constants":440}],444:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("./oppaxis_attributes"),a=e("./helpers");t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:r.extendFlat({},i,{yaxis:o})}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),calcAutorange:e("./calc_autorange"),draw:e("./draw"),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},{"../../lib":503,"./attributes":438,"./calc_autorange":439,"./defaults":441,"./draw":442,"./helpers":443,"./oppaxis_attributes":445}],445:[function(e,t,n){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},{}],446:[function(e,t,n){"use strict";var r=e("../annotations/attributes"),i=e("../../traces/scatter/attributes").line,o=e("../drawing/attributes").dash,a=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects"),t.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:a({},r.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:a({},r.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:a({},i.color,{editType:"arraydraw"}),width:a({},i.width,{editType:"calc+arraydraw"}),dash:a({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":472,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../traces/scatter/attributes":926,"../annotations/attributes":349,"../drawing/attributes":387}],447:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("./constants"),a=e("./helpers");function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,i,s,l){var c=e/2,u=l;if("pixel"===t){var h=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[n,i],d=r.aggNums(Math.max,null,h),f=r.aggNums(Math.min,null,h),p=f<0?Math.abs(f)+c:c,g=d>0?d+c:c;return{ppad:c,ppadplus:u?p:g,ppadminus:u?g:p}}return{ppad:c}}function u(e,t,n,r,i){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(n)];if(r){var l,c,u,h,d=1/0,f=-1/0,p=r.match(o.segmentRE);for("date"===e.type&&(s=a.decodeDate(s)),l=0;l<p.length;l++)void 0!==(c=i[p[l].charAt(0)].drawn)&&(!(u=p[l].substr(1).match(o.paramRE))||u.length<c||((h=s(u[c]))<d&&(d=h),h>f&&(f=h)));return f>=d?[d,f]:void 0}}t.exports=function(e){var t=e._fullLayout,n=r.filterVisible(t.shapes);if(n.length&&e._fullData.length)for(var a=0;a<n.length;a++){var c,h,d=n[a];d._extremes={};var f=i.getRefType(d.xref),p=i.getRefType(d.yref);if("paper"!==d.xref&&"domain"!==f){var g="pixel"===d.xsizemode?d.xanchor:d.x0,m="pixel"===d.xsizemode?d.xanchor:d.x1;(h=u(c=i.getFromId(e,d.xref),g,m,d.path,o.paramIsX))&&(d._extremes[c._id]=i.findExtremes(c,h,s(d)))}if("paper"!==d.yref&&"domain"!==p){var v="pixel"===d.ysizemode?d.yanchor:d.y0,y="pixel"===d.ysizemode?d.yanchor:d.y1;(h=u(c=i.getFromId(e,d.yref),v,y,d.path,o.paramIsY))&&(d._extremes[c._id]=i.findExtremes(c,h,l(d)))}}}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":448,"./helpers":457}],448:[function(e,t,n){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],449:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/array_container_defaults"),a=e("./attributes"),s=e("./helpers");function l(e,t,n){function o(n,i){return r.coerce(e,t,a,n,i)}if(o("visible")){var l=o("path"),c=o("type",l?"path":"rect");"path"!==t.type&&delete t.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var u=o("xsizemode"),h=o("ysizemode"),d=["x","y"],f=0;f<2;f++){var p,g,m,v=d[f],y=v+"anchor",b="x"===v?u:h,_={_fullLayout:n},x=i.coerceRef(e,t,_,v,void 0,"paper");if("range"===i.getRefType(x)?((p=i.getFromId(_,x))._shapeIndices.push(t._index),m=s.rangeToShapePosition(p),g=s.shapePositionToRange(p)):g=m=r.identity,"path"!==c){var w=v+"0",A=v+"1",k=e[w],T=e[A];e[w]=g(e[w],!0),e[A]=g(e[A],!0),"pixel"===b?(o(w,0),o(A,10)):(i.coercePosition(t,_,o,x,w,.25),i.coercePosition(t,_,o,x,A,.75)),t[w]=m(t[w]),t[A]=m(t[A]),e[w]=k,e[A]=T}if("pixel"===b){var S=e[y];e[y]=g(e[y],!0),i.coercePosition(t,_,o,x,y,.25),t[y]=m(t[y]),e[y]=S}}"path"===c?o("path"):r.noneOrAll(e,t,["x0","x1","y0","y1"])}}t.exports=function(e,t){o(e,t,{name:"shapes",handleItemDefaults:l})}},{"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"./attributes":446,"./helpers":457}],450:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../plots/cartesian/axes"),a=e("./draw_newshape/helpers").readPaths,s=e("./draw_newshape/display_outlines"),l=e("../../plots/cartesian/handle_outline").clearOutlineControllers,c=e("../color"),u=e("../drawing"),h=e("../../plot_api/plot_template").arrayEditor,d=e("../dragelement"),f=e("../../lib/setcursor"),p=e("./constants"),g=e("./helpers");function m(e){var t=e._fullLayout;for(var n in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._plots){var r=t._plots[n].shapelayer;r&&r.selectAll("path").remove()}for(var i=0;i<t.shapes.length;i++)t.shapes[i].visible&&b(e,i)}function v(e){return!!e._fullLayout._drawing}function y(e){return!e._context.edits.shapePosition}function b(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var n=g.makeOptionsAndPlotinfo(e,t),l=n.options,b=n.plotinfo;function k(n){var k=x(e,l),T={"data-index":t,"fill-rule":l.fillrule,d:k},S=l.opacity,E=l.fillcolor,C=l.line.width?l.line.color:"rgba(0,0,0,0)",M=l.line.width,O=l.line.dash;M||!0!==l.editable||(M=5,O="solid");var L="Z"!==k[k.length-1],D=y(e)&&l.editable&&e._fullLayout._activeShapeIndex===t;D&&(E=L?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,S=e._fullLayout.activeshape.opacity);var I,R=n.append("path").attr(T).style("opacity",S).call(c.stroke,C).call(c.fill,E).call(u.dashLine,O,M);if(_(R,e,l),(D||e._context.edits.shapePosition)&&(I=h(e.layout,"shapes",l)),D){R.style({cursor:"move"});var P={element:R.node(),plotinfo:b,gd:e,editHelpers:I,isActiveShape:!0},N=a(k,e);s(N,R,P)}else e._context.edits.shapePosition?function(e,t,n,a,s,l){var c,h,m,y,b,A,k,T,S,E,C,M,O,L,D,I,R=10,P=10,N="pixel"===n.xsizemode,z="pixel"===n.ysizemode,F="line"===n.type,B="path"===n.type,j=l.modifyItem,U=o.getFromId(e,n.xref),V=o.getRefType(n.xref),q=o.getFromId(e,n.yref),H=o.getRefType(n.yref),$=g.getDataToPixel(e,U,!1,V),W=g.getDataToPixel(e,q,!0,H),G=g.getPixelToData(e,U,!1,V),Y=g.getPixelToData(e,q,!0,H),X=K(),Z={element:X.node(),gd:e,prepFn:ee,doneFn:te,clickFn:ne};function K(){return F?J():t}function J(){var e=10,r=Math.max(n.line.width,e),i=s.append("g").attr("data-index",a);i.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":r,"stroke-opacity":"0"});var o={"fill-opacity":"0"},l=Math.max(r/2,e);return i.append("circle").attr({"data-line-point":"start-point",cx:N?$(n.xanchor)+n.x0:$(n.x0),cy:z?W(n.yanchor)-n.y0:W(n.y0),r:l}).style(o).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:N?$(n.xanchor)+n.x1:$(n.x1),cy:z?W(n.yanchor)-n.y1:W(n.y1),r:l}).style(o).classed("cursor-grab",!0),i}function Q(n){if(v(e))I=null;else if(F)I="path"===n.target.tagName?"move":"start-point"===n.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=Z.element.getBoundingClientRect(),i=r.right-r.left,o=r.bottom-r.top,a=n.clientX-r.left,s=n.clientY-r.top,l=!B&&i>R&&o>P&&!n.shiftKey?d.getCursor(a/i,1-s/o):"move";f(t,l),I=l.split("-")[0]}}function ee(r){v(e)||(N&&(b=$(n.xanchor)),z&&(A=W(n.yanchor)),"path"===n.type?D=n.path:(c=N?n.x0:$(n.x0),h=z?n.y0:W(n.y0),m=N?n.x1:$(n.x1),y=z?n.y1:W(n.y1)),c<m?(S=c,O="x0",E=m,L="x1"):(S=m,O="x1",E=c,L="x0"),!z&&h<y||z&&h>y?(k=h,C="y0",T=y,M="y1"):(k=y,C="y1",T=h,M="y0"),Q(r),oe(s,n),se(t,n,e),Z.moveFn="move"===I?re:ie,Z.altKey=r.altKey)}function te(){v(e)||(f(t),ae(s),_(t,e,n),r.call("_guiRelayout",e,l.getUpdateObj()))}function ne(){v(e)||ae(s)}function re(r,i){if("path"===n.type){var o=function(e){return e},a=o,l=o;N?j("xanchor",n.xanchor=G(b+r)):(a=function(e){return G($(e)+r)},U&&"date"===U.type&&(a=g.encodeDate(a))),z?j("yanchor",n.yanchor=Y(A+i)):(l=function(e){return Y(W(e)+i)},q&&"date"===q.type&&(l=g.encodeDate(l))),j("path",n.path=w(D,a,l))}else N?j("xanchor",n.xanchor=G(b+r)):(j("x0",n.x0=G(c+r)),j("x1",n.x1=G(m+r))),z?j("yanchor",n.yanchor=Y(A+i)):(j("y0",n.y0=Y(h+i)),j("y1",n.y1=Y(y+i)));t.attr("d",x(e,n)),oe(s,n)}function ie(r,i){if(B){var o=function(e){return e},a=o,l=o;N?j("xanchor",n.xanchor=G(b+r)):(a=function(e){return G($(e)+r)},U&&"date"===U.type&&(a=g.encodeDate(a))),z?j("yanchor",n.yanchor=Y(A+i)):(l=function(e){return Y(W(e)+i)},q&&"date"===q.type&&(l=g.encodeDate(l))),j("path",n.path=w(D,a,l))}else if(F){if("resize-over-start-point"===I){var u=c+r,d=z?h-i:h+i;j("x0",n.x0=N?u:G(u)),j("y0",n.y0=z?d:Y(d))}else if("resize-over-end-point"===I){var f=m+r,p=z?y-i:y+i;j("x1",n.x1=N?f:G(f)),j("y1",n.y1=z?p:Y(p))}}else{var v=function(e){return-1!==I.indexOf(e)},_=v("n"),V=v("s"),H=v("w"),X=v("e"),Z=_?k+i:k,K=V?T+i:T,J=H?S+r:S,Q=X?E+r:E;z&&(_&&(Z=k-i),V&&(K=T-i)),(!z&&K-Z>P||z&&Z-K>P)&&(j(C,n[C]=z?Z:Y(Z)),j(M,n[M]=z?K:Y(K))),Q-J>R&&(j(O,n[O]=N?J:G(J)),j(L,n[L]=N?Q:G(Q)))}t.attr("d",x(e,n)),oe(s,n)}function oe(e,t){function n(){var n="path"!==t.type,r=e.selectAll(".visual-cue").data([0]),o=1;r.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":o}).classed("visual-cue",!0);var a=$(N?t.xanchor:i.midRange(n?[t.x0,t.x1]:g.extractPathCoords(t.path,p.paramIsX))),s=W(z?t.yanchor:i.midRange(n?[t.y0,t.y1]:g.extractPathCoords(t.path,p.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,o),s=g.roundPositionForSharpStrokeRendering(s,o),N&&z){var l="M"+(a-1-o)+","+(s-1-o)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";r.attr("d",l)}else if(N){var c="M"+(a-1-o)+","+(s-9-o)+"v18 h2 v-18 Z";r.attr("d",c)}else{var u="M"+(a-9-o)+","+(s-1-o)+"h18 v2 h-18 Z";r.attr("d",u)}}(N||z)&&n()}function ae(e){e.selectAll(".visual-cue").remove()}function se(e,t,n){var r=t.xref,i=t.yref,a=o.getFromId(n,r),s=o.getFromId(n,i),l="";"paper"===r||a.autorange||(l+=r),"paper"===i||s.autorange||(l+=i),u.setClipUrl(e,l?"clip"+n._fullLayout._uid+l:null,n)}d.init(Z),X.node().onmousemove=Q}(e,R,l,t,n,I):!0===l.editable&&R.style("pointer-events",L||c.opacity(E)*S<=.5?"stroke":"all");R.node().addEventListener("click",(function(){return function(e,t){if(y(e)){var n=+t.node().getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=A,m(e)}}}(e,R)}))}l._input&&!1!==l.visible&&("below"!==l.layer?k(e._fullLayout._shapeUpperLayer):"paper"===l.xref||"paper"===l.yref?k(e._fullLayout._shapeLowerLayer):b._hadPlotinfo?k((b.mainplotinfo||b).shapelayer):k(e._fullLayout._shapeLowerLayer))}function _(e,t,n){var r=(n.xref+n.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}function x(e,t){var n,r,a,s,l,c,u,h,d=t.type,f=o.getRefType(t.xref),m=o.getRefType(t.yref),v=o.getFromId(e,t.xref),y=o.getFromId(e,t.yref),b=e._fullLayout._size;if(v?"domain"===f?r=function(e){return v._offset+v._length*e}:(n=g.shapePositionToRange(v),r=function(e){return v._offset+v.r2p(n(e,!0))}):r=function(e){return b.l+b.w*e},y?"domain"===m?s=function(e){return y._offset+y._length*(1-e)}:(a=g.shapePositionToRange(y),s=function(e){return y._offset+y.r2p(a(e,!0))}):s=function(e){return b.t+b.h*(1-e)},"path"===d)return v&&"date"===v.type&&(r=g.decodeDate(r)),y&&"date"===y.type&&(s=g.decodeDate(s)),function(e,t,n){var r=e.path,o=e.xsizemode,a=e.ysizemode,s=e.xanchor,l=e.yanchor;return r.replace(p.segmentRE,(function(e){var r=0,c=e.charAt(0),u=p.paramIsX[c],h=p.paramIsY[c],d=p.numParams[c],f=e.substr(1).replace(p.paramRE,(function(e){return u[r]?e="pixel"===o?t(s)+Number(e):t(e):h[r]&&(e="pixel"===a?n(l)-Number(e):n(e)),++r>d&&(e="X"),e}));return r>d&&(f=f.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),c+f}))}(t,r,s);if("pixel"===t.xsizemode){var _=r(t.xanchor);l=_+t.x0,c=_+t.x1}else l=r(t.x0),c=r(t.x1);if("pixel"===t.ysizemode){var x=s(t.yanchor);u=x-t.y0,h=x-t.y1}else u=s(t.y0),h=s(t.y1);if("line"===d)return"M"+l+","+u+"L"+c+","+h;if("rect"===d)return"M"+l+","+u+"H"+c+"V"+h+"H"+l+"Z";var w=(l+c)/2,A=(u+h)/2,k=Math.abs(w-l),T=Math.abs(A-u),S="A"+k+","+T,E=w+k+","+A;return"M"+E+S+" 0 1,1 "+w+","+(A-T)+S+" 0 0,1 "+E+"Z"}function w(e,t,n){return e.replace(p.segmentRE,(function(e){var r=0,i=e.charAt(0),o=p.paramIsX[i],a=p.paramIsY[i],s=p.numParams[i];return i+e.substr(1).replace(p.paramRE,(function(e){return r>=s||(o[r]?e=t(e):a[r]&&(e=n(e)),r++),e}))}))}function A(e){y(e)&&e._fullLayout._activeShapeIndex>=0&&(l(e),delete e._fullLayout._activeShapeIndex,m(e))}t.exports={draw:m,drawOne:b,eraseActiveShape:function(e){if(y(e)){l(e);var t=e._fullLayout._activeShapeIndex,n=(e.layout||{}).shapes||[];if(t<n.length){for(var i=[],o=0;o<n.length;o++)o!==t&&i.push(n[o]);delete e._fullLayout._activeShapeIndex,r.call("_guiRelayout",e,{shapes:i})}}}}},{"../../lib":503,"../../lib/setcursor":524,"../../plot_api/plot_template":543,"../../plots/cartesian/axes":554,"../../plots/cartesian/handle_outline":565,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":448,"./draw_newshape/display_outlines":454,"./draw_newshape/helpers":455,"./helpers":457}],451:[function(e,t,n){"use strict";var r=e("../../drawing/attributes").dash,i=e("../../../lib/extend").extendFlat;t.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:i({},r,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},{"../../../lib/extend":493,"../../drawing/attributes":387}],452:[function(e,t,n){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},{}],453:[function(e,t,n){"use strict";var r=e("../../color");t.exports=function(e,t,n){if(n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity"),n("newshape.line.width")){var i=(e||{}).plot_bgcolor||"#FFF";n("newshape.line.color",r.contrast(i)),n("newshape.line.dash")}n("activeshape.fillcolor"),n("activeshape.opacity")}},{"../../color":366}],454:[function(e,t,n){"use strict";var r=e("../../dragelement"),i=e("../../dragelement/helpers").drawMode,o=e("../../../registry"),a=e("./constants"),s=a.i000,l=a.i090,c=a.i180,u=a.i270,h=e("../../../plots/cartesian/handle_outline").clearOutlineControllers,d=e("./helpers"),f=d.pointsShapeRectangle,p=d.pointsShapeEllipse,g=d.writePaths,m=e("./newshapes");t.exports=function e(t,n,a,d){d||(d=0);var v=a.gd;function y(){e(t,n,a,d++),p(t[0])&&b({redrawing:!0})}function b(e){a.isActiveShape=!1;var t=m(n,a);Object.keys(t).length&&o.call((e||{}).redrawing?"relayout":"_guiRelayout",v,t)}var _,x,w,A,k,T=a.isActiveShape,S=v._fullLayout._zoomlayer,E=a.dragmode;function C(e){w=+e.srcElement.getAttribute("data-i"),A=+e.srcElement.getAttribute("data-j"),_[w][A].moveFn=M}function M(e,n){if(t.length){var r=k[w][A][1],i=k[w][A][2],o=t[w],a=o.length;if(f(o)){for(var s=0;s<a;s++)if(s!==A){var l=o[s];l[1]===o[A][1]&&(l[1]=r+e),l[2]===o[A][2]&&(l[2]=i+n)}if(o[A][1]=r+e,o[A][2]=i+n,!f(o))for(var c=0;c<a;c++)for(var u=0;u<o[c].length;u++)o[c][u]=k[w][c][u]}else o[A][1]=r+e,o[A][2]=i+n;y()}}function O(){b()}function L(e,n){if(2===e){w=+n.srcElement.getAttribute("data-i"),A=+n.srcElement.getAttribute("data-j");var r=t[w];f(r)||p(r)||function(){if(t.length&&t[w]&&t[w].length){for(var e=[],n=0;n<t[w].length;n++)n!==A&&e.push(t[w][n]);e.length>1&&(2!==e.length||"Z"!==e[1][0])&&(0===A&&(e[0][0]="M"),t[w]=e,y(),b())}}()}}function D(e,n){(function(e,n){if(t.length)for(var r=0;r<t.length;r++)for(var i=0;i<t[r].length;i++)for(var o=0;o+2<t[r][i].length;o+=2)t[r][i][o+1]=k[r][i][o+1]+e,t[r][i][o+2]=k[r][i][o+2]+n})(e,n),y()}function I(e){(w=+e.srcElement.getAttribute("data-i"))||(w=0),x[w].moveFn=D}function R(){b()}i(E)?v._fullLayout._drawing=!0:v._fullLayout._activeShapeIndex>=0&&h(v),n.attr("d",g(t)),T&&!d&&(k=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e[n]=[];for(var i=0;i<r.length;i++){e[n][i]=[];for(var o=0;o<r[i].length;o++)e[n][i][o]=r[i][o]}}return e}([],t),function(e){_=[];for(var n=0;n<t.length;n++){var i=t[n],o=!f(i)&&p(i);_[n]=[];for(var a=0;a<i.length;a++)if("Z"!==i[a][0]&&(!o||a===s||a===l||a===c||a===u)){var h=i[a][1],d=i[a][2],g=e.append("circle").classed("cursor-grab",!0).attr("data-i",n).attr("data-j",a).attr("cx",h).attr("cy",d).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});_[n][a]={element:g.node(),gd:v,prepFn:C,doneFn:O,clickFn:L},r.init(_[n][a])}}}(S.append("g").attr("class","outline-controllers")),function(){if(x=[],t.length){x[0]={element:n[0][0],gd:v,prepFn:I,doneFn:R},r.init(x[0])}}())}},{"../../../plots/cartesian/handle_outline":565,"../../../registry":638,"../../dragelement":385,"../../dragelement/helpers":384,"./constants":452,"./helpers":455,"./newshapes":456}],455:[function(e,t,n){"use strict";var r=e("parse-svg-path"),i=e("./constants"),o=i.CIRCLE_SIDES,a=i.SQRT2,s=e("../../../plots/cartesian/helpers"),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],h=[0,3,4,1,2];function d(e,t){return Math.abs(e-t)<=1e-6}function f(e,t){var n=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+r*r)}n.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var n="",r=0;r<t;r++)for(var i=e[r].length,o=0;o<i;o++){var a=e[r][o][0];if("Z"===a)n+="Z";else for(var s=e[r][o].length,l=0;l<s;l++){var c=l;"Q"===a||"S"===a?c=h[l]:"C"===a&&(c=u[l]),n+=e[r][o][c],l>0&&l<s-1&&(n+=",")}}return n},n.readPaths=function(e,t,n,i){var a,s,u,h=r(e),d=[],f=-1,p=0,g=0,m=function(){s=p,u=g};m();for(var v=0;v<h.length;v++){var y,b,_,x,w=[],A=h[v][0],k=A;switch(A){case"M":f++,d[f]=[],p=+h[v][1],g=+h[v][2],w.push([k,p,g]),m();break;case"Q":case"S":y=+h[v][1],_=+h[v][2],p=+h[v][3],g=+h[v][4],w.push([k,p,g,y,_]);break;case"C":y=+h[v][1],_=+h[v][2],b=+h[v][3],x=+h[v][4],p=+h[v][5],g=+h[v][6],w.push([k,p,g,y,_,b,x]);break;case"T":case"L":p=+h[v][1],g=+h[v][2],w.push([k,p,g]);break;case"H":k="L",p=+h[v][1],w.push([k,p,g]);break;case"V":k="L",g=+h[v][1],w.push([k,p,g]);break;case"A":k="L";var T=+h[v][1],S=+h[v][2];+h[v][4]||(T=-T,S=-S);var E=p-T,C=g;for(a=1;a<=o/2;a++){var M=2*Math.PI*a/o;w.push([k,E+T*Math.cos(M),C+S*Math.sin(M)])}break;case"Z":p===s&&g===u||(p=s,g=u,w.push([k,p,g]))}for(var O=(n||{}).domain,L=t._fullLayout._size,D=n&&"pixel"===n.xsizemode,I=n&&"pixel"===n.ysizemode,R=!1===i,P=0;P<w.length;P++){for(a=0;a+2<7;a+=2){var N=w[P][a+1],z=w[P][a+2];void 0!==N&&void 0!==z&&(p=N,g=z,n&&(n.xaxis&&n.xaxis.p2r?(R&&(N-=n.xaxis._offset),N=D?c(n.xaxis,n.xanchor)+N:l(n.xaxis,N)):(R&&(N-=L.l),O?N=O.x[0]+N/L.w:N/=L.w),n.yaxis&&n.yaxis.p2r?(R&&(z-=n.yaxis._offset),z=I?c(n.yaxis,n.yanchor)-z:l(n.yaxis,z)):(R&&(z-=L.t),z=O?O.y[1]-z/L.h:1-z/L.h)),w[P][a+1]=N,w[P][a+2]=z)}d[f].push(w[P].slice())}}return d},n.pointsShapeRectangle=function(e){if(5!==e.length)return!1;for(var t=1;t<3;t++){if(!d(e[0][t]-e[1][t],e[3][t]-e[2][t]))return!1;if(!d(e[0][t]-e[3][t],e[1][t]-e[2][t]))return!1}return!(!d(e[0][1],e[1][1])&&!d(e[0][1],e[3][1])||!(f(e[0],e[1])*f(e[0],e[3])))},n.pointsShapeEllipse=function(e){var t=e.length;if(t!==o+1)return!1;t=o;for(var n=0;n<t;n++){var r=(2*t-n)%t,i=(t/2+r)%t,a=(t/2+n)%t;if(!d(f(e[n],e[a]),f(e[r],e[i])))return!1}return!0},n.handleEllipse=function(e,t,r){if(!e)return[t,r];var i=n.ellipseOver({x0:t[0],y0:t[1],x1:r[0],y1:r[1]}),s=(i.x1+i.x0)/2,l=(i.y1+i.y0)/2,c=(i.x1-i.x0)/2,u=(i.y1-i.y0)/2;c||(c=u/=a),u||(u=c/=a);for(var h=[],d=0;d<o;d++){var f=2*d*Math.PI/o;h.push([s+c*Math.cos(f),l+u*Math.sin(f)])}return h},n.ellipseOver=function(e){var t=e.x0,n=e.y0,r=e.x1,i=e.y1,o=r-t,s=i-n,l=((t-=o)+r)/2,c=((n-=s)+i)/2;return{x0:l-(o*=a),y0:c-(s*=a),x1:l+o,y1:c+s}}},{"../../../plots/cartesian/helpers":566,"./constants":452,"parse-svg-path":250}],456:[function(e,t,n){"use strict";var r=e("../../dragelement/helpers"),i=r.drawMode,o=r.openMode,a=e("./constants"),s=a.i000,l=a.i090,c=a.i180,u=a.i270,h=a.cos45,d=a.sin45,f=e("../../../plots/cartesian/helpers"),p=f.p2r,g=f.r2p,m=e("../../../plots/cartesian/handle_outline").clearSelect,v=e("./helpers"),y=v.readPaths,b=v.writePaths,_=v.ellipseOver;t.exports=function(e,t){if(e.length){var n=e[0][0];if(n){var r=n.getAttribute("d"),a=t.gd,f=a._fullLayout.newshape,v=t.plotinfo,x=v.xaxis,w=v.yaxis,A=!!v.domain||!v.xaxis,k=!!v.domain||!v.yaxis,T=t.isActiveShape,S=t.dragmode,E=(a.layout||{}).shapes||[];if(!i(S)&&void 0!==T){var C=a._fullLayout._activeShapeIndex;if(C<E.length)switch(a._fullLayout.shapes[C].type){case"rect":S="drawrect";break;case"circle":S="drawcircle";break;case"line":S="drawline";break;case"path":var M=E[C].path||"";S="Z"===M[M.length-1]?"drawclosedpath":"drawopenpath"}}var O,L=o(S),D=y(r,a,v,T),I={editable:!0,xref:A?"paper":x._id,yref:k?"paper":w._id,layer:f.layer,opacity:f.opacity,line:{color:f.line.color,width:f.line.width,dash:f.line.dash}};if(L||(I.fillcolor=f.fillcolor,I.fillrule=f.fillrule),1===D.length&&(O=D[0]),O&&"drawrect"===S)I.type="rect",I.x0=O[0][1],I.y0=O[0][2],I.x1=O[2][1],I.y1=O[2][2];else if(O&&"drawline"===S)I.type="line",I.x0=O[0][1],I.y0=O[0][2],I.x1=O[1][1],I.y1=O[1][2];else if(O&&"drawcircle"===S){I.type="circle";var R=O[s][1],P=O[l][1],N=O[c][1],z=O[u][1],F=O[s][2],B=O[l][2],j=O[c][2],U=O[u][2],V=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),q=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);V&&(R=g(v.xaxis,R),P=g(v.xaxis,P),N=g(v.xaxis,N),z=g(v.xaxis,z)),q&&(F=g(v.yaxis,F),B=g(v.yaxis,B),j=g(v.yaxis,j),U=g(v.yaxis,U));var H=(P+z)/2,$=(F+j)/2,W=_({x0:H,y0:$,x1:H+(z-P+N-R)/2*h,y1:$+(U-B+j-F)/2*d});V&&(W.x0=p(v.xaxis,W.x0),W.x1=p(v.xaxis,W.x1)),q&&(W.y0=p(v.yaxis,W.y0),W.y1=p(v.yaxis,W.y1)),I.x0=W.x0,I.y0=W.y0,I.x1=W.x1,I.y1=W.y1}else I.type="path",x&&w&&function(e,t,n){var r="date"===t.type,i="date"===n.type;if(!r&&!i)return e;for(var o=0;o<e.length;o++)for(var a=0;a<e[o].length;a++)for(var s=0;s+2<e[o][a].length;s+=2)r&&(e[o][a][s+1]=e[o][a][s+1].replace(" ","_")),i&&(e[o][a][s+2]=e[o][a][s+2].replace(" ","_"))}(D,x,w),I.path=b(D),O=null;m(a);for(var G=t.editHelpers,Y=(G||{}).modifyItem,X=[],Z=0;Z<E.length;Z++){var K=a._fullLayout.shapes[Z];if(X[Z]=K._input,void 0!==T&&Z===a._fullLayout._activeShapeIndex){var J=I;switch(K.type){case"line":case"rect":case"circle":Y("x0",J.x0),Y("x1",J.x1),Y("y0",J.y0),Y("y1",J.y1);break;case"path":Y("path",J.path)}}}return void 0===T?(X.push(I),X):G?G.getUpdateObj():{}}}}},{"../../../plots/cartesian/handle_outline":565,"../../../plots/cartesian/helpers":566,"../../dragelement/helpers":384,"./constants":452,"./helpers":455}],457:[function(e,t,n){"use strict";var r=e("./constants"),i=e("../../lib");n.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},n.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},n.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},n.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},n.extractPathCoords=function(e,t){var n=[];return e.match(r.segmentRE).forEach((function(e){var o=t[e.charAt(0)].drawn;if(void 0!==o){var a=e.substr(1).match(r.paramRE);!a||a.length<o||n.push(i.cleanNumber(a[o]))}})),n},n.getDataToPixel=function(e,t,r,i){var o,a=e._fullLayout._size;if(t)if("domain"===i)o=function(e){return t._length*(r?1-e:e)+t._offset};else{var s=n.shapePositionToRange(t);o=function(e){return t._offset+t.r2p(s(e,!0))},"date"===t.type&&(o=n.decodeDate(o))}else o=r?function(e){return a.t+a.h*(1-e)}:function(e){return a.l+a.w*e};return o},n.getPixelToData=function(e,t,r,i){var o,a=e._fullLayout._size;if(t)if("domain"===i)o=function(e){var n=(e-t._offset)/t._length;return r?1-n:n};else{var s=n.rangeToShapePosition(t);o=function(e){return s(t.p2r(e-t._offset))}}else o=r?function(e){return 1-(e-a.t)/a.h}:function(e){return(e-a.l)/a.w};return o},n.roundPositionForSharpStrokeRendering=function(e,t){var n=1===Math.round(t%2),r=Math.round(e);return n?r+.5:r},n.makeOptionsAndPlotinfo=function(e,t){var n=e._fullLayout.shapes[t]||{},r=e._fullLayout._plots[n.xref+n.yref];return r?r._hadPlotinfo=!0:(r={},n.xref&&"paper"!==n.xref&&(r.xaxis=e._fullLayout[n.xref+"axis"]),n.yref&&"paper"!==n.yref&&(r.yaxis=e._fullLayout[n.yref+"axis"])),r.xsizemode=n.xsizemode,r.ysizemode=n.ysizemode,r.xanchor=n.xanchor,r.yanchor=n.yanchor,{options:n,plotinfo:r}}},{"../../lib":503,"./constants":448}],458:[function(e,t,n){"use strict";var r=e("./draw");t.exports={moduleType:"component",name:"shapes",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),supplyDrawNewShapeDefaults:e("./draw_newshape/defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("shapes"),calcAutorange:e("./calc_autorange"),draw:r.draw,drawOne:r.drawOne}},{"../../plots/cartesian/include_components":567,"./attributes":446,"./calc_autorange":447,"./defaults":449,"./draw":450,"./draw_newshape/defaults":453}],459:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../../plots/pad_attributes"),o=e("../../lib/extend").extendDeepAll,a=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/animation_attributes"),l=e("../../plot_api/plot_template").templatedArray,c=e("./constants"),u=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:o(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:r({})},font:r({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/animation_attributes":548,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"./constants":460}],460:[function(e,t,n){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],461:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/array_container_defaults"),o=e("./attributes"),a=e("./constants").name,s=o.steps;function l(e,t,n){function a(n,i){return r.coerce(e,t,o,n,i)}for(var s=i(e,t,{name:"steps",handleItemDefaults:c}),l=0,u=0;u<s.length;u++)s[u].visible&&l++;if(l<2?t.visible=!1:a("visible")){t._stepCount=l;var h=t._visibleSteps=r.filterVisible(s);(s[a("active")]||{}).visible||(t.active=h[0]._index),a("x"),a("y"),r.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),r.coerceFont(a,"font",n.font),a("currentvalue.visible")&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),r.coerceFont(a,"currentvalue.font",t.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen")}}function c(e,t){function n(n,i){return r.coerce(e,t,s,n,i)}if("skip"===e.method||Array.isArray(e.args)?n("visible"):t.visible=!1){n("method"),n("args");var i=n("label","step-"+t._index);n("value",i),n("execute")}}t.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:l})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":459,"./constants":460}],462:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../plots/plots"),o=e("../color"),a=e("../drawing"),s=e("../../lib"),l=s.strTranslate,c=e("../../lib/svg_text_utils"),u=e("../../plot_api/plot_template").arrayEditor,h=e("./constants"),d=e("../../constants/alignment"),f=d.LINE_SPACING,p=d.FROM_TL,g=d.FROM_BR;function m(e){return h.autoMarginIdRoot+e._index}function v(e){return e._index}function y(e,t){var n=a.tester.selectAll("g."+h.labelGroupClass).data(t._visibleSteps);n.enter().append("g").classed(h.labelGroupClass,!0);var o=0,l=0;n.each((function(e){var n=x(r.select(this),{step:e},t).node();if(n){var i=a.bBox(n);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),n.remove();var u=t._dims={};u.inputAreaWidth=Math.max(h.railWidth,h.gripHeight);var d=e._fullLayout._size;u.lx=d.l+d.w*t.x,u.ly=d.t+d.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(d.w*t.len):u.outerLength=t.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-t.pad.l-t.pad.r);var f=(u.inputAreaLength-2*h.stepInset)/(t._stepCount-1),v=o+h.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/f)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var y=a.tester.append("g");n.each((function(e){var n=b(y,t,e.label),r=n.node()&&a.bBox(n.node())||{width:0,height:0},i=c.lineCount(n);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(r.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(r.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+t.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+h.tickOffset+t.ticklen+h.labelOffset+u.labelHeight+t.pad.t+t.pad.b;var _="left";s.isRightAnchor(t)&&(u.lx-=u.outerLength,_="right"),s.isCenterAnchor(t)&&(u.lx-=u.outerLength/2,_="center");var w="top";s.isBottomAnchor(t)&&(u.ly-=u.height,w="bottom"),s.isMiddleAnchor(t)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var A={y:t.y,b:u.height*g[w],t:u.height*p[w]};"fraction"===t.lenmode?(A.l=0,A.xl=t.x-t.len*p[_],A.r=0,A.xr=t.x+t.len*g[_]):(A.x=t.x,A.l=u.outerLength*p[_],A.r=u.outerLength*g[_]),i.autoMargin(e,m(t),A)}function b(e,t,n){if(t.currentvalue.visible){var r,i,o=t._dims;switch(t.currentvalue.xanchor){case"right":r=o.inputAreaLength-h.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":r=.5*o.inputAreaLength,i="middle";break;default:r=h.currentValueInset,i="left"}var l=s.ensureSingle(e,"text",h.labelClass,(function(e){e.attr({"text-anchor":i,"data-notex":1})})),u=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof n)u+=n;else{var d=t.steps[t.active].label,p=t._gd._fullLayout._meta;p&&(d=s.templateString(d,p)),u+=d}t.currentvalue.suffix&&(u+=t.currentvalue.suffix),l.call(a.font,t.currentvalue.font).text(u).call(c.convertToTspans,t._gd);var g=c.lineCount(l),m=(o.currentValueMaxLines+1-g)*t.currentvalue.font.size*f;return c.positionText(l,r,m),l}}function _(e,t,n){s.ensureSingle(e,"rect",h.gripRectClass,(function(r){r.call(T,t,e,n).style("pointer-events","all")})).attr({width:h.gripWidth,height:h.gripHeight,rx:h.gripRadius,ry:h.gripRadius}).call(o.stroke,n.bordercolor).call(o.fill,n.bgcolor).style("stroke-width",n.borderwidth+"px")}function x(e,t,n){var r=s.ensureSingle(e,"text",h.labelClass,(function(e){e.attr({"text-anchor":"middle","data-notex":1})})),i=t.step.label,o=n._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),r.call(a.font,n.font).text(i).call(c.convertToTspans,n._gd),r}function w(e,t){var n=s.ensureSingle(e,"g",h.labelsClass),i=t._dims,o=n.selectAll("g."+h.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(h.labelGroupClass,!0),o.exit().remove(),o.each((function(e){var n=r.select(this);n.call(x,e,t),a.setTranslate(n,C(t,e.fraction),h.tickOffset+t.ticklen+t.font.size*f+h.labelOffset+i.currentValueTotalHeight)}))}function A(e,t,n,r,i){var o=Math.round(r*(n._stepCount-1)),a=n._visibleSteps[o]._index;a!==n.active&&k(e,t,n,a,!0,i)}function k(e,t,n,r,o,a){var s=n.active;n.active=r,u(e.layout,h.name,n).applyUpdate("active",r);var l=n.steps[n.active];t.call(E,n,a),t.call(b,n),e.emit("plotly_sliderchange",{slider:n,step:n.steps[n.active],interaction:o,previousActive:s}),l&&l.method&&o&&(t._nextMethod?(t._nextMethod.step=l,t._nextMethod.doCallback=o,t._nextMethod.doTransition=a):(t._nextMethod={step:l,doCallback:o,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame((function(){var n=t._nextMethod.step;n.method&&(n.execute&&i.executeAPICommand(e,n.method,n.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function T(e,t,n){var i=n.node(),a=r.select(t);function s(){return n.data()[0]}function l(){var e=s();t.emit("plotly_sliderstart",{slider:e});var l=n.select("."+h.gripRectClass);r.event.stopPropagation(),r.event.preventDefault(),l.call(o.fill,e.activebgcolor);var c=M(e,r.mouse(i)[0]);function u(){var e=s(),o=M(e,r.mouse(i)[0]);A(t,n,e,o,!1)}function d(){var e=s();e._dragging=!1,l.call(o.fill,e.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}A(t,n,e,c,!0),e._dragging=!0,a.on("mousemove",u),a.on("touchmove",u),a.on("mouseup",d),a.on("touchend",d)}e.on("mousedown",l),e.on("touchstart",l)}function S(e,t){var n=e.selectAll("rect."+h.tickRectClass).data(t._visibleSteps),i=t._dims;n.enter().append("rect").classed(h.tickRectClass,!0),n.exit().remove(),n.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),n.each((function(e,n){var s=n%i.labelStride==0,l=r.select(this);l.attr({height:s?t.ticklen:t.minorticklen}).call(o.fill,t.tickcolor),a.setTranslate(l,C(t,n/(t._stepCount-1))-.5*t.tickwidth,(s?h.tickOffset:h.minorTickOffset)+i.currentValueTotalHeight)}))}function E(e,t,n){for(var r=e.select("rect."+h.gripRectClass),i=0,o=0;o<t._stepCount;o++)if(t._visibleSteps[o]._index===t.active){i=o;break}var a=C(t,i/(t._stepCount-1));if(!t._invokingCommand){var s=r;n&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(a-.5*h.gripWidth,t._dims.currentValueTotalHeight))}}function C(e,t){var n=e._dims;return n.inputAreaStart+h.stepInset+(n.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,t))}function M(e,t){var n=e._dims;return Math.min(1,Math.max(0,(t-h.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*h.stepInset-2*n.inputAreaStart)))}function O(e,t,n){var r=n._dims,i=s.ensureSingle(e,"rect",h.railTouchRectClass,(function(r){r.call(T,t,e,n).style("pointer-events","all")}));i.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,h.tickOffset+n.ticklen+r.labelHeight)}).call(o.fill,n.bgcolor).attr("opacity",0),a.setTranslate(i,0,r.currentValueTotalHeight)}function L(e,t){var n=t._dims,r=n.inputAreaLength-2*h.railInset,i=s.ensureSingle(e,"rect",h.railRectClass);i.attr({width:r,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,t.bordercolor).call(o.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(i,h.railInset,.5*(n.inputAreaWidth-h.railWidth)+n.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,n=function(e,t){for(var n=e[h.name],r=[],i=0;i<n.length;i++){var o=n[i];o.visible&&(o._gd=t,r.push(o))}return r}(t,e),o=t._infolayer.selectAll("g."+h.containerClassName).data(n.length>0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,m(t))}if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","ew-resize"),o.exit().each((function(){r.select(this).selectAll("g."+h.groupClassName).each(s)})).remove(),0!==n.length){var l=o.selectAll("g."+h.groupClassName).data(n,v);l.enter().append("g").classed(h.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c<n.length;c++){var u=n[c];y(e,u)}l.each((function(t){var n=r.select(this);(function(e){var t=e._dims;t.labelSteps=[];for(var n=e._stepCount,r=0;r<n;r+=t.labelStride)t.labelSteps.push({fraction:r/(n-1),step:e._visibleSteps[r]})})(t),i.manageCommandObserver(e,t,t._visibleSteps,(function(t){var r=n.data()[0];r.active!==t.index&&(r._dragging||k(e,n,r,t.index,!1,!0))})),function(e,t,n){(n.steps[n.active]||{}).visible||(n.active=n._visibleSteps[0]._index),t.call(b,n).call(L,n).call(w,n).call(S,n).call(O,e,n).call(_,e,n);var r=n._dims;a.setTranslate(t,r.lx+n.pad.l,r.ly+n.pad.t),t.call(E,n,!1),t.call(b,n)}(e,r.select(this),t)}))}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/plots":619,"../color":366,"../drawing":388,"./constants":460,"@plotly/d3":58}],463:[function(e,t,n){"use strict";var r=e("./constants");t.exports={moduleType:"component",name:r.name,layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":459,"./constants":460,"./defaults":461,"./draw":462}],464:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../plots/plots"),a=e("../../registry"),s=e("../../lib"),l=s.strTranslate,c=e("../drawing"),u=e("../color"),h=e("../../lib/svg_text_utils"),d=e("../../constants/interactions"),f=e("../../constants/alignment").OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(e,t,n){var g,m=n.propContainer,v=n.propName,y=n.placeholder,b=n.traceIndex,_=n.avoid||{},x=n.attributes,w=n.transform,A=n.containerGroup,k=e._fullLayout,T=1,S=!1,E=m.title,C=(E&&E.text?E.text:"").trim(),M=E&&E.font?E.font:{},O=M.family,L=M.size,D=M.color;"title.text"===v?g="titleText":-1!==v.indexOf("axis")?g="axisTitleText":v.indexOf(!0)&&(g="colorbarTitleText");var I=e._context.edits[g];""===C?T=0:C.replace(p," % ")===y.replace(p," % ")&&(T=.2,S=!0,I||(C="")),n._meta?C=s.templateString(C,n._meta):k._meta&&(C=s.templateString(C,k._meta));var R,P=C||I;A||(A=s.ensureSingle(k._infolayer,"g","g-"+t),R=k._hColorbarMoveTitle);var N=A.selectAll("text").data(P?[0]:[]);if(N.enter().append("text"),N.text(C).attr("class",t),N.exit().remove(),!P)return A;function z(e){s.syncOrAsync([F,B],e)}function F(t){var n;return!w&&R&&(w={}),w?(n="",w.rotate&&(n+="rotate("+[w.rotate,x.x,x.y]+")"),(w.offset||R)&&(n+=l(0,(w.offset||0)-(R||0)))):n=null,t.attr("transform",n),t.style({"font-family":O,"font-size":r.round(L,2)+"px",fill:u.rgb(D),opacity:T*u.opacity(D),"font-weight":o.fontWeight}).attr(x).call(h.convertToTspans,e),o.previousPromises(e)}function B(e){var t=r.select(e.node().parentNode);if(_&&_.selection&&_.side&&C){t.attr("transform",null);var n=f[_.side],o="left"===_.side||"top"===_.side?-1:1,a=i(_.pad)?_.pad:2,u=c.bBox(t.node()),h={left:0,top:0,right:k.width,bottom:k.height},d=_.maxShift||o*(h[_.side]-u[_.side]),p=0;if(d<0)p=d;else{var g=_.offsetLeft||0,m=_.offsetTop||0;u.left-=g,u.right-=g,u.top-=m,u.bottom-=m,_.selection.each((function(){var e=c.bBox(this);s.bBoxIntersect(u,e,a)&&(p=Math.max(p,o*(e[_.side]-u[n])+a))})),p=Math.min(d,p)}if(p>0||d<0){var v={left:[-p,0],right:[p,0],top:[0,-p],bottom:[0,p]}[_.side];t.attr("transform",l(v[0],v[1]))}}}return N.call(z),I&&(C?N.on(".opacity",null):(T=0,S=!0,N.text(y).on("mouseover.opacity",(function(){r.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){r.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),N.call(h.makeEditable,{gd:e}).on("edit",(function(t){void 0!==b?a.call("_guiRestyle",e,v,t,b):a.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(z)})).on("input",(function(e){this.text(e||" ").call(h.positionText,x.x,x.y)}))),N.classed("js-placeholder",S),A}}},{"../../constants/alignment":471,"../../constants/interactions":478,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],465:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../color/attributes"),o=e("../../lib/extend").extendFlat,a=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/pad_attributes"),l=e("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:o(s({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"../color/attributes":365}],466:[function(e,t,n){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"",right:"",up:"",down:""}}},{}],467:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/array_container_defaults"),o=e("./attributes"),a=e("./constants").name,s=o.buttons;function l(e,t,n){function a(n,i){return r.coerce(e,t,o,n,i)}a("visible",i(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),r.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),r.coerceFont(a,"font",n.font),a("bgcolor",n.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(e,t){function n(n,i){return r.coerce(e,t,s,n,i)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}t.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:l})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":465,"./constants":466}],468:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../plots/plots"),o=e("../color"),a=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../plot_api/plot_template").arrayEditor,u=e("../../constants/alignment").LINE_SPACING,h=e("./constants"),d=e("./scrollbox");function f(e){return e._index}function p(e,t){return+e.attr(h.menuIndexAttrName)===t._index}function g(e,t,n,r,i,o,a,s){t.active=a,c(e.layout,h.name,t).applyUpdate("active",a),"buttons"===t.type?v(e,r,null,null,t):"dropdown"===t.type&&(i.attr(h.menuIndexAttrName,"-1"),m(e,r,i,o,t),s||v(e,r,i,o,t))}function m(e,t,n,r,i){var o=s.ensureSingle(t,"g",h.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,d={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};o.call(y,i,u,e).call(S,i,d,f),s.ensureSingle(t,"text",h.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(a.font,i.font).text(h.arrowSymbol[i.direction])})).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),o.on("click",(function(){n.call(E,String(p(n,i)?-1:i._index)),v(e,t,n,r,i)})),o.on("mouseover",(function(){o.call(w)})),o.on("mouseout",(function(){o.call(A,i)})),a.setTranslate(t,l.lx,l.ly)}function v(e,t,n,o,a){n||(n=t).attr("pointer-events","all");var l=function(e){return-1==+e.attr(h.menuIndexAttrName)}(n)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?h.dropdownButtonClassName:h.buttonClassName,u=n.selectAll("g."+c).data(s.filterVisible(l)),d=u.enter().append("g").classed(c,!0),f=u.exit();"dropdown"===a.type?(d.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var p=0,m=0,v=a._dims,b=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(b?m=v.headerHeight+h.gapButtonHeader:p=v.headerWidth+h.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(m=-h.gapButtonHeader+h.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-h.gapButtonHeader+h.gapButton-v.openWidth);var _={x:v.lx+p+a.pad.l,y:v.ly+m+a.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},k={l:_.x+a.borderwidth,t:_.y+a.borderwidth};u.each((function(s,l){var c=r.select(this);c.call(y,a,s,e).call(S,a,_),c.on("click",(function(){r.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(g(e,a,0,t,n,o,-1),i.executeAPICommand(e,s.method,s.args2)):(g(e,a,0,t,n,o,l),i.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(A,a),u.call(x,a)}))})),u.call(x,a),b?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=_.y-k.t):(k.w=_.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=a.direction,o&&(u.size()?function(e,t,n,r,i,o){var a,s,l,c=i.direction,u="up"===c||"down"===c,d=i._dims,f=i.active;if(u)for(s=0,l=0;l<f;l++)s+=d.heights[l]+h.gapButton;else for(a=0,l=0;l<f;l++)a+=d.widths[l]+h.gapButton;r.enable(o,a,s),r.hbar&&r.hbar.attr("opacity","0").transition().attr("opacity","1"),r.vbar&&r.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,o,a,k):function(e){var t=!!e.hbar,n=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",(function(){t=!1,n||e.disable()})),n&&e.vbar.transition().attr("opacity","0").each("end",(function(){n=!1,t||e.disable()}))}(o))}function y(e,t,n,r){e.call(b,t).call(_,t,n,r)}function b(e,t){s.ensureSingle(e,"rect",h.itemRectClassName,(function(e){e.attr({rx:h.rx,ry:h.ry,"shape-rendering":"crispEdges"})})).call(o.stroke,t.bordercolor).call(o.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function _(e,t,n,r){var i=s.ensureSingle(e,"text",h.itemTextClassName,(function(e){e.attr({"text-anchor":"start","data-notex":1})})),o=n.label,c=r._fullLayout._meta;c&&(o=s.templateString(o,c)),i.call(a.font,t.font).text(o).call(l.convertToTspans,r)}function x(e,t){var n=t.active;e.each((function(e,i){var a=r.select(this);i===n&&t.showactive&&a.select("rect."+h.itemRectClassName).call(o.fill,h.activeColor)}))}function w(e){e.select("rect."+h.itemRectClassName).call(o.fill,h.hoverColor)}function A(e,t){e.select("rect."+h.itemRectClassName).call(o.fill,t.bgcolor)}function k(e,t){var n=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},o=a.tester.selectAll("g."+h.dropdownButtonClassName).data(s.filterVisible(t.buttons));o.enter().append("g").classed(h.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(t.direction);o.each((function(i,o){var s=r.select(this);s.call(y,t,i,e);var d=s.select("."+h.itemTextClassName),f=d.node()&&a.bBox(d.node()).width,p=Math.max(f+h.textPadX,h.minWidth),g=t.font.size*u,m=l.lineCount(d),v=Math.max(g*m,h.minHeight)+h.textOffsetY;v=Math.ceil(v),p=Math.ceil(p),n.widths[o]=p,n.heights[o]=v,n.height1=Math.max(n.height1,v),n.width1=Math.max(n.width1,p),c?(n.totalWidth=Math.max(n.totalWidth,p),n.openWidth=n.totalWidth,n.totalHeight+=v+h.gapButton,n.openHeight+=v+h.gapButton):(n.totalWidth+=p+h.gapButton,n.openWidth+=p+h.gapButton,n.totalHeight=Math.max(n.totalHeight,v),n.openHeight=n.totalHeight)})),c?n.totalHeight-=h.gapButton:n.totalWidth-=h.gapButton,n.headerWidth=n.width1+h.arrowPadX,n.headerHeight=n.height1,"dropdown"===t.type&&(c?(n.width1+=h.arrowPadX,n.totalHeight=n.height1):n.totalWidth=n.width1,n.totalWidth+=h.arrowPadX),o.remove();var d=n.totalWidth+t.pad.l+t.pad.r,f=n.totalHeight+t.pad.t+t.pad.b,p=e._fullLayout._size;n.lx=p.l+p.w*t.x,n.ly=p.t+p.h*(1-t.y);var g="left";s.isRightAnchor(t)&&(n.lx-=d,g="right"),s.isCenterAnchor(t)&&(n.lx-=d/2,g="center");var m="top";s.isBottomAnchor(t)&&(n.ly-=f,m="bottom"),s.isMiddleAnchor(t)&&(n.ly-=f/2,m="middle"),n.totalWidth=Math.ceil(n.totalWidth),n.totalHeight=Math.ceil(n.totalHeight),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly),i.autoMargin(e,T(t),{x:t.x,y:t.y,l:d*({right:1,center:.5}[g]||0),r:d*({left:1,center:.5}[g]||0),b:f*({top:1,middle:.5}[m]||0),t:f*({bottom:1,middle:.5}[m]||0)})}function T(e){return h.autoMarginIdRoot+e._index}function S(e,t,n,r){r=r||{};var i=e.select("."+h.itemRectClassName),o=e.select("."+h.itemTextClassName),s=t.borderwidth,c=n.index,d=t._dims;a.setTranslate(e,s+n.x,s+n.y);var f=-1!==["up","down"].indexOf(t.direction),p=r.height||(f?d.heights[c]:d.height1);i.attr({x:0,y:0,width:r.width||(f?d.width1:d.widths[c]),height:p});var g=t.font.size*u,m=(l.lineCount(o)-1)*g/2;l.positionText(o,h.textOffsetX,p/2-m+h.textOffsetY),f?n.y+=d.heights[c]+n.yPad:n.x+=d.widths[c]+n.xPad,n.index++}function E(e,t){e.attr(h.menuIndexAttrName,t||"-1").selectAll("g."+h.dropdownButtonClassName).remove()}t.exports=function(e){var t=e._fullLayout,n=s.filterVisible(t[h.name]);function o(t){i.autoMargin(e,T(t))}var a=t._menulayer.selectAll("g."+h.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){r.select(this).selectAll("g."+h.headerGroupClassName).each(o)})).remove(),0!==n.length){var l=a.selectAll("g."+h.headerGroupClassName).data(n,f);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",h.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u<n.length;u++){var y=n[u];k(e,y)}var b="updatemenus"+t._uid,_=new d(e,c,b);l.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(E)),l.exit().each((function(e){c.call(E),o(e)})).remove(),l.each((function(t){var n=r.select(this),o="dropdown"===t.type?c:null;i.manageCommandObserver(e,t,t.buttons,(function(r){g(e,t,t.buttons[r.index],n,o,_,r.index,!0)})),"dropdown"===t.type?(m(e,n,c,_,t),p(c,t)&&v(e,n,c,_,t)):v(e,n,null,null,t)}))}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_template":543,"../../plots/plots":619,"../color":366,"../drawing":388,"./constants":466,"./scrollbox":470,"@plotly/d3":58}],469:[function(e,t,n){arguments[4][463][0].apply(n,arguments)},{"./attributes":465,"./constants":466,"./defaults":467,"./draw":468,dup:463}],470:[function(e,t,n){"use strict";t.exports=s;var r=e("@plotly/d3"),i=e("../color"),o=e("../drawing"),a=e("../../lib");function s(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(e,t,n){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=e;var u,h,d,f,p=this.position.l,g=this.position.w,m=this.position.t,v=this.position.h,y=this.position.direction,b="down"===y,_="left"===y,x="up"===y,w=g,A=v;b||_||"right"===y||x||(this.position.direction="down",b=!0),b||x?(h=(u=p)+w,b?(d=m,A=(f=Math.min(d+A,c))-d):A=(f=m+A)-(d=Math.max(f-A,0))):(f=(d=m)+A,_?w=(h=p+w)-(u=Math.max(h-w,0)):(u=p,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:d,w,h:A};var k=g>w,T=s.barLength+2*s.barPad,S=s.barWidth+2*s.barPad,E=p,C=m+v;C+S>c&&(C=c-S);var M=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);M.exit().on(".drag",null).remove(),M.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=M.attr({rx:s.barRadius,ry:s.barRadius,x:E,y:C,width:T,height:S}),this._hbarXMin=E+T/2,this._hbarTranslateMax=w-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=v>A,L=s.barWidth+2*s.barPad,D=s.barLength+2*s.barPad,I=p+g,R=m;I+L>l&&(I=l-L);var P=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);P.exit().on(".drag",null).remove(),P.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),O?(this.vbar=P.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:R,width:L,height:D}),this._vbarYMin=R+D/2,this._vbarTranslateMax=A-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,z=u-.5,F=O?h+L+.5:h+.5,B=d-.5,j=k?f+S+.5:f+.5,U=a._topdefs.selectAll("#"+N).data(k||O?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",N).append("rect"),k||O?(this._clipRect=U.select("rect").attr({x:Math.floor(z),y:Math.floor(B),width:Math.ceil(F)-Math.floor(z),height:Math.ceil(j)-Math.floor(B)}),this.container.call(o.setClipUrl,N,this.gd),this.bg.attr({x:p,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),k||O){var V=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var q=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),O&&this.vbar.on(".drag",null).call(q)}this.setTranslate(t,n)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,i=n+this._hbarTranslateMax;e=(a.constrain(r.event.x,n,i)-n)/(i-n)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(e=a.constrain(e||0,0,n),t=a.constrain(t||0,0,r),this.translateX=e,this.translateY=t,this.container.call(o.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=e/n;this.hbar.call(o.setTranslate,e+i*this._hbarTranslateMax,t)}if(this.vbar){var s=t/r;this.vbar.call(o.setTranslate,e,t+s*this._vbarTranslateMax)}}},{"../../lib":503,"../color":366,"../drawing":388,"@plotly/d3":58}],471:[function(e,t,n){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],472:[function(e,t,n){"use strict";t.exports={axisRefDescription:function(e,t,n){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+n+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",n,"of the domain of the","second",e,"axis."].join(" ")}}},{}],473:[function(e,t,n){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:""},DECREASING:{COLOR:"#FF4136",SYMBOL:""}}},{}],474:[function(e,t,n){"use strict";t.exports={FORMAT_LINK:"path_to_url#d3-format",DATE_FORMAT_LINK:"path_to_url#locale_format"}},{}],475:[function(e,t,n){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],476:[function(e,t,n){"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],477:[function(e,t,n){"use strict";t.exports={circle:"","circle-open":"",square:"","square-open":"",diamond:"","diamond-open":"",cross:"+",x:""}},{}],478:[function(e,t,n){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(e,t,n){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:""}},{}],480:[function(e,t,n){"use strict";n.xmlns="path_to_url",n.svg="path_to_url",n.xlink="path_to_url",n.svgAttrs={xmlns:n.svg,"xmlns:xlink":n.xlink}},{}],481:[function(e,t,n){"use strict";n.version=e("./version").version,e("native-promise-only"),e("../build/plotcss");for(var r=e("./registry"),i=n.register=r.register,o=e("./plot_api"),a=Object.keys(o),s=0;s<a.length;s++){var l=a[s];"_"!==l.charAt(0)&&(n[l]=o[l]),i({moduleType:"apiMethod",name:l,fn:o[l]})}i(e("./traces/scatter")),i([e("./components/legend"),e("./components/fx"),e("./components/annotations"),e("./components/annotations3d"),e("./components/shapes"),e("./components/images"),e("./components/updatemenus"),e("./components/sliders"),e("./components/rangeslider"),e("./components/rangeselector"),e("./components/grid"),e("./components/errorbars"),e("./components/colorscale"),e("./components/colorbar"),e("./components/modebar")]),i([e("./locale-en"),e("./locale-en-us")]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),n.Icons=e("./fonts/ploticon");var c=e("./components/fx"),u=e("./plots/plots");n.Plots={resize:u.resize,graphJson:u.graphJson,sendDataToCloud:u.sendDataToCloud},n.Fx={hover:c.hover,unhover:c.unhover,loneHover:c.loneHover,loneUnhover:c.loneUnhover},n.Snapshot=e("./snapshot"),n.PlotSchema=e("./plot_api/plot_schema")},{"../build/plotcss":1,"./components/annotations":357,"./components/annotations3d":362,"./components/colorbar":372,"./components/colorscale":378,"./components/errorbars":394,"./components/fx":406,"./components/grid":410,"./components/images":415,"./components/legend":423,"./components/modebar":429,"./components/rangeselector":437,"./components/rangeslider":444,"./components/shapes":458,"./components/sliders":463,"./components/updatemenus":469,"./fonts/ploticon":482,"./locale-en":534,"./locale-en-us":533,"./plot_api":538,"./plot_api/plot_schema":542,"./plots/plots":619,"./registry":638,"./snapshot":643,"./traces/scatter":938,"./version":1119,"native-promise-only":245}],482:[function(e,t,n){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='path_to_url viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}}},{}],483:[function(e,t,n){"use strict";n.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},n.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},n.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},n.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},n.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},n.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},{}],484:[function(e,t,n){"use strict";var r=e("./mod"),i=r.mod,o=r.modHalf,a=Math.PI,s=2*a;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function c(e,t){return o(t-e,s)}function u(e,t){if(l(t))return!0;var n,r;t[0]<t[1]?(n=t[0],r=t[1]):(n=t[1],r=t[0]),(n=i(n,s))>(r=i(r,s))&&(r+=s);var o=i(e,s),a=o+s;return o>=n&&o<=r||a>=n&&a<=r}function h(e,t,n,r,i,o,c){i=i||0,o=o||0;var u,h,d,f,p,g=l([n,r]);function m(e,t){return[e*Math.cos(t)+i,o-e*Math.sin(t)]}g?(u=0,h=a,d=s):n<r?(u=n,d=r):(u=r,d=n),e<t?(f=e,p=t):(f=t,p=e);var v,y=Math.abs(d-u)<=a?0:1;function b(e,t,n){return"A"+[e,e]+" "+[0,y,n]+" "+m(e,t)}return g?v=null===f?"M"+m(p,u)+b(p,h,0)+b(p,d,0)+"Z":"M"+m(f,u)+b(f,h,0)+b(f,d,0)+"ZM"+m(p,u)+b(p,h,1)+b(p,d,1)+"Z":null===f?(v="M"+m(p,u)+b(p,d,0),c&&(v+="L0,0Z")):v="M"+m(f,u)+"L"+m(p,u)+b(p,d,0)+"L"+m(f,d)+b(f,u,1)+"Z",v}t.exports={deg2rad:function(e){return e/180*a},rad2deg:function(e){return e/a*180},angleDelta:c,angleDist:function(e,t){return Math.abs(c(e,t))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(e,t,n,r){return!!u(t,r)&&(n[0]<n[1]?(i=n[0],o=n[1]):(i=n[1],o=n[0]),e>=i&&e<=o);var i,o},pathArc:function(e,t,n,r,i){return h(null,e,t,n,r,i,0)},pathSector:function(e,t,n,r,i){return h(null,e,t,n,r,i,1)},pathAnnulus:function(e,t,n,r,i,o){return h(e,t,n,r,i,o,1)}}},{"./mod":510}],485:[function(e,t,n){"use strict";var r=Array.isArray,i=ArrayBuffer,o=DataView;function a(e){return i.isView(e)&&!(e instanceof o)}function s(e){return r(e)||a(e)}function l(e,t,n){if(s(e)){if(s(e[0])){for(var r=n,i=0;i<e.length;i++)r=t(r,e[i].length);return r}return e.length}return 0}n.isTypedArray=a,n.isArrayOrTypedArray=s,n.isArray1D=function(e){return!s(e[0])},n.ensureArray=function(e,t){return r(e)||(e=[]),e.length=t,e},n.concat=function(){var e,t,n,i,o,a,s,l,c=[],u=!0,h=0;for(n=0;n<arguments.length;n++)(a=(i=arguments[n]).length)&&(t?c.push(i):(t=i,o=a),r(i)?e=!1:(u=!1,h?e!==i.constructor&&(e=!1):e=i.constructor),h+=a);if(!h)return[];if(!c.length)return t;if(u)return t.concat.apply(t,c);if(e){for((s=new e(h)).set(t),n=0;n<c.length;n++)i=c[n],s.set(i,o),o+=i.length;return s}for(s=new Array(h),l=0;l<t.length;l++)s[l]=t[l];for(n=0;n<c.length;n++){for(i=c[n],l=0;l<i.length;l++)s[o+l]=i[l];o+=l}return s},n.maxRowLength=function(e){return l(e,Math.max,0)},n.minRowLength=function(e){return l(e,Math.min,1/0)}},{}],486:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../constants/numerical").BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(o,"")),r(e)?Number(e):i}},{"../constants/numerical":479,"fast-isnumeric":190}],487:[function(e,t,n){"use strict";t.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},{}],488:[function(e,t,n){"use strict";t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},{}],489:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../plots/attributes"),a=e("../components/colorscale/scales"),s=e("../components/color"),l=e("../constants/interactions").DESELECTDIM,c=e("./nested_property"),u=e("./regex").counter,h=e("./mod").modHalf,d=e("./array").isArrayOrTypedArray;function f(e,t){var r=n.valObjectMeta[t.valType];if(t.arrayOk&&d(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var i={},o=i,a={set:function(e){o=e}};return r.coerceFunction(e,a,i,t),o!==i}n.valObjectMeta={data_array:{coerceFunction:function(e,t,n){d(e)?t.set(e):void 0!==n&&t.set(n)}},enumerated:{coerceFunction:function(e,t,n,r){r.coerceNumber&&(e=+e),-1===r.values.indexOf(e)?t.set(n):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var n=t.values,r=0;r<n.length;r++){var i=String(n[r]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(e))return!0}else if(e===n[r])return!0}return!1}},boolean:{coerceFunction:function(e,t,n){!0===e||!1===e?t.set(e):t.set(n)}},number:{coerceFunction:function(e,t,n,i){!r(e)||void 0!==i.min&&e<i.min||void 0!==i.max&&e>i.max?t.set(n):t.set(+e)}},integer:{coerceFunction:function(e,t,n,i){e%1||!r(e)||void 0!==i.min&&e<i.min||void 0!==i.max&&e>i.max?t.set(n):t.set(+e)}},string:{coerceFunction:function(e,t,n,r){if("string"!=typeof e){var i="number"==typeof e;!0!==r.strict&&i?t.set(String(e)):t.set(n)}else r.noBlank&&!e?t.set(n):t.set(e)}},color:{coerceFunction:function(e,t,n){i(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,n){t.set(a.get(e,n))}},angle:{coerceFunction:function(e,t,n){"auto"===e?t.set("auto"):r(e)?t.set(h(+e,360)):t.set(n)}},subplotid:{coerceFunction:function(e,t,n,r){var i=r.regex||u(n);"string"==typeof e&&i.test(e)?t.set(e):t.set(n)},validateFunction:function(e,t){var n=t.dflt;return e===n||"string"==typeof e&&!!u(n).test(e)}},flaglist:{coerceFunction:function(e,t,n,r){if("string"==typeof e)if(-1===(r.extras||[]).indexOf(e)){for(var i=e.split("+"),o=0;o<i.length;){var a=i[o];-1===r.flags.indexOf(a)||i.indexOf(a)<o?i.splice(o,1):o++}i.length?t.set(i.join("+")):t.set(n)}else t.set(e);else t.set(n)}},any:{coerceFunction:function(e,t,n){void 0===e?t.set(n):t.set(e)}},info_array:{coerceFunction:function(e,t,r,i){function o(e,t,r){var i,o={set:function(e){i=e}};return void 0===r&&(r=t.dflt),n.valObjectMeta[t.valType].coerceFunction(e,o,r,t),i}var a=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(e)&&Array.isArray(e[0]);if(Array.isArray(e)){var s,l,c,u,h,d,f=i.items,p=[],g=Array.isArray(f),m=g&&a&&Array.isArray(f[0]),v=a&&g&&!m,y=g&&!v?f.length:e.length;if(r=Array.isArray(r)?r:[],a)for(s=0;s<y;s++)for(p[s]=[],c=Array.isArray(e[s])?e[s]:[],h=v?f.length:g?f[s].length:c.length,l=0;l<h;l++)u=v?f[l]:g?f[s][l]:f,void 0!==(d=o(c[l],u,(r[s]||[])[l]))&&(p[s][l]=d);else for(s=0;s<y;s++)void 0!==(d=o(e[s],g?f[s]:f,r[s]))&&(p[s]=d);t.set(p)}else t.set(r)},validateFunction:function(e,t){if(!Array.isArray(e))return!1;var n=t.items,r=Array.isArray(n),i=2===t.dimensions;if(!t.freeLength&&e.length!==n.length)return!1;for(var o=0;o<e.length;o++)if(i){if(!Array.isArray(e[o])||!t.freeLength&&e[o].length!==n[o].length)return!1;for(var a=0;a<e[o].length;a++)if(!f(e[o][a],r?n[o][a]:n))return!1}else if(!f(e[o],r?n[o]:n))return!1;return!0}}},n.coerce=function(e,t,r,i,o){var a=c(r,i).get(),s=c(e,i),l=c(t,i),u=s.get(),h=t._template;if(void 0===u&&h&&(u=c(h,i).get(),h=0),void 0===o&&(o=a.dflt),a.arrayOk&&d(u))return l.set(u),u;var p=n.valObjectMeta[a.valType].coerceFunction;p(u,l,o,a);var g=l.get();return h&&g===o&&!f(u,a)&&(p(u=c(h,i).get(),l,o,a),g=l.get()),g},n.coerce2=function(e,t,r,i,o){var a=c(e,i),s=n.coerce(e,t,r,i,o);return null!=a.get()&&s},n.coerceFont=function(e,t,n){var r={};return n=n||{},r.family=e(t+".family",n.family),r.size=e(t+".size",n.size),r.color=e(t+".color",n.color),r},n.coercePattern=function(e,t,n,r){if(e(t+".shape")){e(t+".solidity"),e(t+".size");var i="overlay"===e(t+".fillmode");if(!r){var o=e(t+".bgcolor",i?n:void 0);e(t+".fgcolor",i?s.contrast(o):n)}e(t+".fgopacity",i?.5:1)}},n.coerceHoverinfo=function(e,t,r){var i,a=t._module.attributes,s=a.hoverinfo?a:o,l=s.hoverinfo;if(1===r._dataLength){var c="all"===l.dflt?l.flags.slice():l.dflt.split("+");c.splice(c.indexOf("name"),1),i=c.join("+")}return n.coerce(e,t,s,"hoverinfo",i)},n.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var n,r,i=e.marker.opacity;void 0!==i&&(d(i)||e.selected||e.unselected||(n=i,r=l*i),t("selected.marker.opacity",n),t("unselected.marker.opacity",r))}},n.validate=f},{"../components/color":366,"../components/colorscale/scales":381,"../constants/interactions":478,"../plots/attributes":550,"./array":485,"./mod":510,"./nested_property":511,"./regex":520,"fast-isnumeric":190,tinycolor2:312}],490:[function(e,t,n){"use strict";var r,i,o=e("d3-time-format").timeFormat,a=e("fast-isnumeric"),s=e("./loggers"),l=e("./mod").mod,c=e("../constants/numerical"),u=c.BADNUM,h=c.ONEDAY,d=c.ONEHOUR,f=c.ONEMIN,p=c.ONESEC,g=c.EPOCHJD,m=e("../registry"),v=e("d3-time-format").utcFormat,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,_=(new Date).getFullYear()-70;function x(e){return e&&m.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}n.dateTick0=function(e,t){var r=function(e,t){return x(e)?t?m.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:m.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!t);if(t<2)return r;var i=n.dateTime2ms(r,e);return i+=h*(t-1),n.ms2DateTime(i,0,e)},n.dfltRange=function(e){return x(e)?m.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},n.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},n.dateTime2ms=function(e,t){if(n.isJSDate(e)){var o=e.getTimezoneOffset()*f,a=(e.getUTCMinutes()-e.getMinutes())*f+(e.getUTCSeconds()-e.getSeconds())*p+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var s=3*f;o=o-s/2+l(a-o+s/2,s)}return(e=Number(e)-o)>=r&&e<=i?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=x(t),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),t="");var w=c&&"chinese"===t.substr(0,7),A=e.match(w?b:y);if(!A)return u;var k=A[1],T=A[3]||"1",S=Number(A[5]||1),E=Number(A[7]||0),C=Number(A[9]||0),M=Number(A[11]||0);if(c){if(2===k.length)return u;var O;k=Number(k);try{var L=m.getComponentMethod("calendars","getCal")(t);if(w){var D="i"===T.charAt(T.length-1);T=parseInt(T,10),O=L.newDate(k,L.toMonthIndex(k,T,D),S)}else O=L.newDate(k,Number(T),S)}catch(e){return u}return O?(O.toJD()-g)*h+E*d+C*f+M*p:u}k=2===k.length?(Number(k)+2e3-_)%100+_:Number(k),T-=1;var I=new Date(Date.UTC(2e3,T,S,E,C));return I.setUTCFullYear(k),I.getUTCMonth()!==T||I.getUTCDate()!==S?u:I.getTime()+M*p},r=n.MIN_MS=n.dateTime2ms("-9999"),i=n.MAX_MS=n.dateTime2ms("9999-12-31 23:59:59.9999"),n.isDateTime=function(e,t){return n.dateTime2ms(e,t)!==u};var A=90*h,k=3*d,T=5*f;function S(e,t,n,r,i){if((t||n||r||i)&&(e+=" "+w(t,2)+":"+w(n,2),(r||i)&&(e+=":"+w(r,2),i))){for(var o=4;i%10==0;)o-=1,i/=10;e+="."+w(i,o)}return e}n.ms2DateTime=function(e,t,n){if("number"!=typeof e||!(e>=r&&e<=i))return u;t||(t=0);var o,a,s,c,y,b,_=Math.floor(10*l(e+.05,1)),w=Math.round(e-_/10);if(x(n)){var E=Math.floor(w/h)+g,C=Math.floor(l(e,h));try{o=m.getComponentMethod("calendars","getCal")(n).fromJD(E).formatDate("yyyy-mm-dd")}catch(e){o=v("G%Y-%m-%d")(new Date(w))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=t<A?Math.floor(C/d):0,s=t<A?Math.floor(C%d/f):0,c=t<k?Math.floor(C%f/p):0,y=t<T?C%p*10+_:0}else b=new Date(w),o=v("%Y-%m-%d")(b),a=t<A?b.getUTCHours():0,s=t<A?b.getUTCMinutes():0,c=t<k?b.getUTCSeconds():0,y=t<T?10*b.getUTCMilliseconds()+_:0;return S(o,a,s,c,y)},n.ms2DateTimeLocal=function(e){if(!(e>=r+h&&e<=i-h))return u;var t=Math.floor(10*l(e+.05,1)),n=new Date(Math.round(e-t/10));return S(o("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+t)},n.cleanDate=function(e,t,r){if(e===u)return t;if(n.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(x(r))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=n.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!n.isDateTime(e,r))return s.error("unrecognized date",e),t;return e};var E=/%\d?f/g,C=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function O(e,t,n,r){e=e.replace(E,(function(e){var n=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(n).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(C,(function(){return M[n("%q")(i)]})),x(r))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,r)}catch(e){return"Invalid"}return n(e)(i)}var L=[59,59.9,59.99,59.999,59.9999];n.formatDate=function(e,t,n,r,i,o){if(i=x(i)&&i,!t)if("y"===n)t=o.year;else if("m"===n)t=o.month;else{if("d"!==n)return function(e,t){var n=l(e+.05,h),r=w(Math.floor(n/d),2)+":"+w(l(Math.floor(n/f),60),2);if("M"!==t){a(t)||(t=0);var i=(100+Math.min(l(e/p,60),L[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+i}return r}(e,n)+"\n"+O(o.dayMonthYear,e,r,i);t=o.dayMonth+"\n"+o.year}return O(t,e,r,i)};var D=3*h;n.incrementMonth=function(e,t,n){n=x(n)&&n;var r=l(e,h);if(e=Math.round(e-r),n)try{var i=Math.round(e/h)+g,o=m.getComponentMethod("calendars","getCal")(n),a=o.fromJD(i);return t%12?o.add(a,t,"m"):o.add(a,t/12,"y"),(a.toJD()-g)*h+r}catch(t){s.error("invalid ms "+e+" in calendar "+n)}var c=new Date(e+D);return c.setUTCMonth(c.getUTCMonth()+t)+r-D},n.findExactDates=function(e,t){for(var n,r,i=0,o=0,s=0,l=0,c=x(t)&&m.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(r=e[u],a(r)){if(!(r%h))if(c)try{1===(n=c.fromJD(r/h+g)).day()?1===n.month()?i++:o++:s++}catch(e){}else 1===(n=new Date(r)).getUTCDate()?0===n.getUTCMonth()?i++:o++:s++}else l++;s+=o+=i;var d=e.length-l;return{exactYears:i/d,exactMonths:o/d,exactDays:s/d}}},{"../constants/numerical":479,"../registry":638,"./loggers":507,"./mod":510,"d3-time-format":120,"fast-isnumeric":190}],491:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("./loggers"),o=e("./matrix"),a=e("gl-mat4");function s(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t,n){var r="plotly.js-style-"+e,o=document.getElementById(r);o||((o=document.createElement("style")).setAttribute("id",r),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(t+"{"+n+"}",0):a.addRule?a.addRule(t,n,0):i.warn("addStyleRule failed")}function c(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===n?null:n.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function u(e){for(var t=[];h(e);)t.push(e),e=e.parentNode;return t}function h(e){return e&&(e instanceof Element||e instanceof HTMLElement)}t.exports={getGraphDiv:function(e){var t;if("string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null==e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=r.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(e,t){l("global",e,t)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,n=document.getElementById(t);n&&s(n)},getFullTransformMatrix:function(e){var t=u(e),n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=c(e);if(t){var r=o.convertCssMatrix(t);n=a.multiply(n,n,r)}})),n},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},{"./loggers":507,"./matrix":509,"@plotly/d3":58,"gl-mat4":210}],492:[function(e,t,n){"use strict";var r=e("events").EventEmitter,i={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(r,i){"undefined"!=typeof jQuery&&jQuery(e).trigger(r,i),t.emit(r,i),n.emit(r,i)},e},triggerHandler:function(e,t,n){var r,i;"undefined"!=typeof jQuery&&(r=jQuery(e).triggerHandler(t,n));var o=e._ev;if(!o)return r;var a,s=o._events[t];if(!s)return r;function l(e){return e.listener?(o.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(o,[n]))):e.apply(o,[n])}for(s=Array.isArray(s)?s:[s],a=0;a<s.length-1;a++)l(s[a]);return i=l(s[a]),void 0!==r?r:i},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};t.exports=i},{events:84}],493:[function(e,t,n){"use strict";var r=e("./is_plain_object.js"),i=Array.isArray;function o(e,t,n,a){var s,l,c,u,h,d,f=e[0],p=e.length;if(2===p&&i(f)&&i(e[1])&&0===f.length){if(function(e,t){var n,r;for(n=0;n<e.length;n++){if(null!==(r=e[n])&&"object"==typeof r)return!1;void 0!==r&&(t[n]=r)}return!0}(e[1],f))return f;f.splice(0,f.length)}for(var g=1;g<p;g++)for(l in s=e[g])c=f[l],u=s[l],a&&i(u)?f[l]=u:t&&u&&(r(u)||(h=i(u)))?(h?(h=!1,d=c&&i(c)?c:[]):d=c&&r(c)?c:{},f[l]=o([d,u],t,n,a)):(void 0!==u||n)&&(f[l]=u);return f}n.extendFlat=function(){return o(arguments,!1,!1,!1)},n.extendDeep=function(){return o(arguments,!0,!1,!1)},n.extendDeepAll=function(){return o(arguments,!0,!0,!1)},n.extendDeepNoArrays=function(){return o(arguments,!0,!1,!0)}},{"./is_plain_object.js":504}],494:[function(e,t,n){"use strict";t.exports=function(e){for(var t={},n=[],r=0,i=0;i<e.length;i++){var o=e[i];1!==t[o]&&(t[o]=1,n[r++]=o)}return n}},{}],495:[function(e,t,n){"use strict";function r(e){return!0===e.visible}function i(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}t.exports=function(e){for(var t=(s=e,Array.isArray(s)&&Array.isArray(s[0])&&s[0][0]&&s[0][0].trace?i:r),n=[],o=0;o<e.length;o++){var a=e[o];t(a)&&n.push(a)}var s;return n}},{}],496:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("country-regex"),o=e("@turf/area"),a=e("@turf/centroid"),s=e("@turf/bbox"),l=e("./identity"),c=e("./loggers"),u=e("./is_plain_object"),h=e("./nested_property"),d=e("./polygon"),f=Object.keys(i),p={"ISO-3":l,"USA-states":l,"country names":function(e){for(var t=0;t<f.length;t++){var n=f[t];if(new RegExp(i[n]).test(e.trim().toLowerCase()))return n}return c.log("Unrecognized country name: "+e+"."),!1}};function g(e){var t=e.geojson,n=window.PlotlyGeoAssets||{},r="string"==typeof t?n[t]:t;return u(r)?r:(c.error("Oops ... something went wrong when fetching "+t),!1)}t.exports={locationToFeature:function(e,t,n){if(!t||"string"!=typeof t)return!1;var r,i,o,a=p[e](t);if(a){if("USA-states"===e)for(r=[],o=0;o<n.length;o++)(i=n[o]).properties&&i.properties.gu&&"USA"===i.properties.gu&&r.push(i);else r=n;for(o=0;o<r.length;o++)if((i=r[o]).id===a)return i;c.log(["Location with id",a,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(e){var t,n,r,i,o=e.geometry,a=o.coordinates,s=e.id,l=[];function c(e){for(var t=0;t<e.length-1;t++)if(e[t][0]>0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;i<e.length;i++)t[i]=[e[i][0]<0?e[i][0]+360:e[i][0],e[i][1]];l.push(d.tester(t))}:"ATA"===s?function(e){var t=c(e);if(null===t)return l.push(d.tester(e));var n=new Array(e.length+1),r=0;for(i=0;i<e.length;i++)i>t?n[r++]=[e[i][0]+360,e[i][1]]:i===t?(n[r++]=e[i],n[r++]=[e[i][0],-90]):n[r++]=e[i];var o=d.tester(n);o.pts.pop(),l.push(o)}:function(e){l.push(d.tester(e))},o.type){case"MultiPolygon":for(n=0;n<a.length;n++)for(r=0;r<a[n].length;r++)t(a[n][r]);break;case"Polygon":for(n=0;n<a.length;n++)t(a[n])}return l},getTraceGeojson:g,extractTraceFeature:function(e){var t=e[0].trace,n=g(t);if(!n)return!1;var r,i={},s=[];for(r=0;r<t._length;r++){var l=e[r];(l.loc||0===l.loc)&&(i[l.loc]=l)}function u(e){var n=h(e,t.featureidkey||"id").get(),r=i[n];if(r){var l=e.geometry;if("Polygon"===l.type||"MultiPolygon"===l.type){var u={type:"Feature",id:n,geometry:l,properties:{}};u.properties.ct=function(e){var t,n=e.geometry;if("MultiPolygon"===n.type)for(var r=n.coordinates,i=0,s=0;s<r.length;s++){var l={type:"Polygon",coordinates:r[s]},c=o.default(l);c>i&&(i=c,t=l)}else t=n;return a.default(t).geometry.coordinates}(u),r.fIn=e,r.fOut=u,s.push(u)}else c.log(["Location",r.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[n]}switch(n.type){case"FeatureCollection":var d=n.features;for(r=0;r<d.length;r++)u(d[r]);break;case"Feature":u(n);break;default:return c.warn(["Invalid GeoJSON type",(n.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var f in i)c.log(["Location *"+f+"*","does not have a matching feature with id-key","*"+t.featureidkey+"*."].join(" "));return s},fetchTraceGeoData:function(e){var t=window.PlotlyGeoAssets||{},n=[];function i(e){return new Promise((function(n,i){r.json(e,(function(r,o){if(r){delete t[e];var a=404===r.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e;return i(new Error(a))}return t[e]=o,n(o)}))}))}function o(e){return new Promise((function(n,r){var i=0,o=setInterval((function(){return t[e]&&"pending"!==t[e]?(clearInterval(o),n(t[e])):i>100?(clearInterval(o),r("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var a=0;a<e.length;a++){var s=e[a][0].trace.geojson;"string"==typeof s&&(t[s]?"pending"===t[s]&&n.push(o(s)):(t[s]="pending",n.push(i(s))))}return n},computeBbox:function(e){return s.default(e)}}},{"./identity":501,"./is_plain_object":504,"./loggers":507,"./nested_property":511,"./polygon":515,"@plotly/d3":58,"@turf/area":61,"@turf/bbox":64,"@turf/centroid":67,"country-regex":94}],497:[function(e,t,n){"use strict";var r=e("../constants/numerical").BADNUM;n.calcTraceToLineCoords=function(e){for(var t=e[0].trace.connectgaps,n=[],i=[],o=0;o<e.length;o++){var a=e[o].lonlat;a[0]!==r?i.push(a):!t&&i.length>0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},n.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},n.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=[e[n]];return{type:"MultiPolygon",coordinates:t}},n.makeBlank=function(){return{type:"Point",coordinates:[]}}},{"../constants/numerical":479}],498:[function(e,t,n){"use strict";var r,i,o,a=e("./mod").mod;function s(e,t,n,r,i,o,a,s){var l=n-e,c=i-e,u=a-i,h=r-t,d=o-t,f=s-o,p=l*f-u*h;if(0===p)return null;var g=(c*f-u*d)/p,m=(c*h-l*d)/p;return m<0||m>1||g<0||g>1?null:{x:e+l*g,y:t+h*g}}function l(e,t,n,r,i){var o=r*e+i*t;if(o<0)return r*r+i*i;if(o>n){var a=r-e,s=i-t;return a*a+s*s}var l=r*t-i*e;return l*l/n}n.segmentsIntersect=s,n.segmentDistance=function(e,t,n,r,i,o,a,c){if(s(e,t,n,r,i,o,a,c))return 0;var u=n-e,h=r-t,d=a-i,f=c-o,p=u*u+h*h,g=d*d+f*f,m=Math.min(l(u,h,p,i-e,o-t),l(u,h,p,a-e,c-t),l(d,f,g,e-i,t-o),l(d,f,g,n-i,r-o));return Math.sqrt(m)},n.getTextLocation=function(e,t,n,s){if(e===i&&s===o||(r={},i=e,o=s),r[n])return r[n];var l=e.getPointAtLength(a(n-s/2,t)),c=e.getPointAtLength(a(n+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(a(n,t)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return r[n]=d,d},n.clearLocationCache=function(){i=null},n.getVisibleSegment=function(e,t,n){var r,i,o=t.left,a=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function d(t){var n=e.getPointAtLength(t);0===t?r=n:t===u&&(i=n);var c=n.x<o?o-n.x:n.x>a?n.x-a:0,h=n.y<s?s-n.y:n.y>l?n.y-l:0;return Math.sqrt(c*c+h*h)}for(var f=d(c);f;){if((c+=f+n)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+n))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(r.x-i.x)<.1&&Math.abs(r.y-i.y)<.1}},n.findPointOnPath=function(e,t,n,r){for(var i,o,a,s=(r=r||{}).pathLength||e.getTotalLength(),l=r.tolerance||.001,c=r.iterationLimit||30,u=e.getPointAtLength(0)[n]>e.getPointAtLength(s)[n]?-1:1,h=0,d=0,f=s;h<c;){if(i=(d+f)/2,a=(o=e.getPointAtLength(i))[n]-t,Math.abs(a)<l)return o;u*a>0?f=i:d=i,h++}return o}},{"./mod":510}],499:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("tinycolor2"),o=e("color-normalize"),a=e("../components/colorscale"),s=e("../components/color/attributes").defaultLine,l=e("./array").isArrayOrTypedArray,c=o(s);function u(e,t){var n=e;return n[3]*=t,n}function h(e){if(r(e))return c;var t=o(e);return t.length?t:c}function d(e){return r(e)?e:1}t.exports={formatColor:function(e,t,n){var r,i,s,f,p,g=e.color,m=l(g),v=l(t),y=a.extractOpts(e),b=[];if(r=void 0!==y.colorscale?a.makeColorScaleFuncFromTrace(e):h,i=m?function(e,t){return void 0===e[t]?c:o(r(e[t]))}:h,s=v?function(e,t){return void 0===e[t]?1:d(e[t])}:d,m||v)for(var _=0;_<n;_++)f=i(g,_),p=s(t,_),b[_]=u(f,p);else b=u(o(g),t);return b},parseColorScale:function(e){var t=a.extractOpts(e),n=t.colorscale;return t.reversescale&&(n=a.flipScale(t.colorscale)),n.map((function(e){var t=e[0],n=i(e[1]).toRgb();return{index:t,rgb:[n.r,n.g,n.b,n.a]}}))}}},{"../components/color/attributes":365,"../components/colorscale":378,"./array":485,"color-normalize":89,"fast-isnumeric":190,tinycolor2:312}],500:[function(e,t,n){"use strict";var r=e("./identity");function i(e){return[e]}t.exports={keyFun:function(e){return e.key},repeat:i,descend:r,wrap:i,unwrap:function(e){return e[0]}}},{"./identity":501}],501:[function(e,t,n){"use strict";t.exports=function(e){return e}},{}],502:[function(e,t,n){"use strict";t.exports=function(e,t){if(!t)return e;var n=1/Math.abs(t),r=n>1?(n*e+n*t)/n:e+t,i=String(r).length;if(i>16){var o=String(t).length;if(i>=String(e).length+o){var a=parseFloat(r).toPrecision(12);-1===a.indexOf("e+")&&(r=+a)}}return r}},{}],503:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-time-format").utcFormat,o=e("d3-format").format,a=e("fast-isnumeric"),s=e("../constants/numerical"),l=s.FP_SAFE,c=-l,u=s.BADNUM,h=t.exports={};h.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var d={};h.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,h.warn('encountered bad format: "'+t+'"'))},h.noFormat=function(e){return String(e)},h.numberFormat=function(e){var t;try{t=o(h.adjustFormat(e))}catch(t){return h.warnBadFormat(e),h.noFormat}return t},h.nestedProperty=e("./nested_property"),h.keyedContainer=e("./keyed_container"),h.relativeAttr=e("./relative_attr"),h.isPlainObject=e("./is_plain_object"),h.toLogRange=e("./to_log_range"),h.relinkPrivateKeys=e("./relink_private");var f=e("./array");h.isTypedArray=f.isTypedArray,h.isArrayOrTypedArray=f.isArrayOrTypedArray,h.isArray1D=f.isArray1D,h.ensureArray=f.ensureArray,h.concat=f.concat,h.maxRowLength=f.maxRowLength,h.minRowLength=f.minRowLength;var p=e("./mod");h.mod=p.mod,h.modHalf=p.modHalf;var g=e("./coerce");h.valObjectMeta=g.valObjectMeta,h.coerce=g.coerce,h.coerce2=g.coerce2,h.coerceFont=g.coerceFont,h.coercePattern=g.coercePattern,h.coerceHoverinfo=g.coerceHoverinfo,h.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,h.validate=g.validate;var m=e("./dates");h.dateTime2ms=m.dateTime2ms,h.isDateTime=m.isDateTime,h.ms2DateTime=m.ms2DateTime,h.ms2DateTimeLocal=m.ms2DateTimeLocal,h.cleanDate=m.cleanDate,h.isJSDate=m.isJSDate,h.formatDate=m.formatDate,h.incrementMonth=m.incrementMonth,h.dateTick0=m.dateTick0,h.dfltRange=m.dfltRange,h.findExactDates=m.findExactDates,h.MIN_MS=m.MIN_MS,h.MAX_MS=m.MAX_MS;var v=e("./search");h.findBin=v.findBin,h.sorterAsc=v.sorterAsc,h.sorterDes=v.sorterDes,h.distinctVals=v.distinctVals,h.roundUp=v.roundUp,h.sort=v.sort,h.findIndexOfMin=v.findIndexOfMin,h.sortObjectKeys=e("./sort_object_keys");var y=e("./stats");h.aggNums=y.aggNums,h.len=y.len,h.mean=y.mean,h.median=y.median,h.midRange=y.midRange,h.variance=y.variance,h.stdev=y.stdev,h.interp=y.interp;var b=e("./matrix");h.init2dArray=b.init2dArray,h.transposeRagged=b.transposeRagged,h.dot=b.dot,h.translationMatrix=b.translationMatrix,h.rotationMatrix=b.rotationMatrix,h.rotationXYMatrix=b.rotationXYMatrix,h.apply3DTransform=b.apply3DTransform,h.apply2DTransform=b.apply2DTransform,h.apply2DTransform2=b.apply2DTransform2,h.convertCssMatrix=b.convertCssMatrix,h.inverseTransformMatrix=b.inverseTransformMatrix;var _=e("./angles");h.deg2rad=_.deg2rad,h.rad2deg=_.rad2deg,h.angleDelta=_.angleDelta,h.angleDist=_.angleDist,h.isFullCircle=_.isFullCircle,h.isAngleInsideSector=_.isAngleInsideSector,h.isPtInsideSector=_.isPtInsideSector,h.pathArc=_.pathArc,h.pathSector=_.pathSector,h.pathAnnulus=_.pathAnnulus;var x=e("./anchor_utils");h.isLeftAnchor=x.isLeftAnchor,h.isCenterAnchor=x.isCenterAnchor,h.isRightAnchor=x.isRightAnchor,h.isTopAnchor=x.isTopAnchor,h.isMiddleAnchor=x.isMiddleAnchor,h.isBottomAnchor=x.isBottomAnchor;var w=e("./geometry2d");h.segmentsIntersect=w.segmentsIntersect,h.segmentDistance=w.segmentDistance,h.getTextLocation=w.getTextLocation,h.clearLocationCache=w.clearLocationCache,h.getVisibleSegment=w.getVisibleSegment,h.findPointOnPath=w.findPointOnPath;var A=e("./extend");h.extendFlat=A.extendFlat,h.extendDeep=A.extendDeep,h.extendDeepAll=A.extendDeepAll,h.extendDeepNoArrays=A.extendDeepNoArrays;var k=e("./loggers");h.log=k.log,h.warn=k.warn,h.error=k.error;var T=e("./regex");h.counterRegex=T.counter;var S=e("./throttle");h.throttle=S.throttle,h.throttleDone=S.done,h.clearThrottle=S.clear;var E=e("./dom");function C(e){var t={};for(var n in e)for(var r=e[n],i=0;i<r.length;i++)t[r[i]]=+n;return t}h.getGraphDiv=E.getGraphDiv,h.isPlotDiv=E.isPlotDiv,h.removeElement=E.removeElement,h.addStyleRule=E.addStyleRule,h.addRelatedStyleRule=E.addRelatedStyleRule,h.deleteRelatedStyleRule=E.deleteRelatedStyleRule,h.getFullTransformMatrix=E.getFullTransformMatrix,h.getElementTransformMatrix=E.getElementTransformMatrix,h.getElementAndAncestors=E.getElementAndAncestors,h.equalDomRects=E.equalDomRects,h.clearResponsive=e("./clear_responsive"),h.preserveDrawingBuffer=e("./preserve_drawing_buffer"),h.makeTraceGroups=e("./make_trace_groups"),h._=e("./localize"),h.notifier=e("./notifier"),h.filterUnique=e("./filter_unique"),h.filterVisible=e("./filter_visible"),h.pushUnique=e("./push_unique"),h.increment=e("./increment"),h.cleanNumber=e("./clean_number"),h.ensureNumber=function(e){return a(e)?(e=Number(e))>l||e<c?u:e:u},h.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&a(e)&&e>=0&&e%1==0},h.noop=e("./noop"),h.identity=e("./identity"),h.repeat=function(e,t){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n},h.swapAttrs=function(e,t,n,r){n||(n="x"),r||(r="y");for(var i=0;i<t.length;i++){var o=t[i],a=h.nestedProperty(e,o.replace("?",n)),s=h.nestedProperty(e,o.replace("?",r)),l=a.get();a.set(s.get()),s.set(l)}},h.raiseToTop=function(e){e.parentNode.appendChild(e)},h.cancelTransition=function(e){return e.transition().duration(0)},h.constrain=function(e,t,n){return t>n?Math.max(n,Math.min(t,e)):Math.max(t,Math.min(n,e))},h.bBoxIntersect=function(e,t,n){return n=n||0,e.left<=t.right+n&&t.left<=e.right+n&&e.top<=t.bottom+n&&t.top<=e.bottom+n},h.simpleMap=function(e,t,n,r,i){for(var o=e.length,a=new Array(o),s=0;s<o;s++)a[s]=t(e[s],n,r,i);return a},h.randstr=function e(t,n,r,i){if(r||(r=16),void 0===n&&(n=24),n<=0)return"0";var o,a,s=Math.log(Math.pow(2,n))/Math.log(r),l="";for(o=2;s===1/0;o*=2)s=Math.log(Math.pow(2,n/o))/Math.log(r)*o;var c=s-Math.floor(s);for(o=0;o<Math.floor(s);o++)l=Math.floor(Math.random()*r).toString(r)+l;c&&(a=Math.pow(r,c),l=Math.floor(Math.random()*a).toString(r)+l);var u=parseInt(l,r);return t&&t[l]||u!==1/0&&u>=Math.pow(2,n)?i>10?(h.warn("randstr failed uniqueness"),l):e(t,n,r,(i||0)+1):l},h.OptionControl=function(e,t){e||(e={}),t||(t="opt");var n={optionList:[],_newoption:function(r){r[t]=e,n[r.name]=r,n.optionList.push(r)}};return n["_"+t]=e,n},h.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var n,r,i,o,a=e.length,s=2*a,l=2*t-1,c=new Array(l),u=new Array(a);for(n=0;n<l;n++)c[n]=(1-Math.cos(Math.PI*(n+1)/t))/(2*t);for(n=0;n<a;n++){for(o=0,r=0;r<l;r++)(i=n+r+1-t)<-a?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=e[i]*c[r];u[n]=o}return u},h.syncOrAsync=function(e,t,n){var r;function i(){return h.syncOrAsync(e,t,n)}for(;e.length;)if((r=(0,e.splice(0,1)[0])(t))&&r.then)return r.then(i);return n&&n(t)},h.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},h.noneOrAll=function(e,t,n){if(e){var r,i=!1,o=!0;for(r=0;r<n.length;r++)null!=e[n[r]]?i=!0:o=!1;if(i&&!o)for(r=0;r<n.length;r++)e[n[r]]=t[n[r]]}},h.mergeArray=function(e,t,n,r){var i="function"==typeof r;if(h.isArrayOrTypedArray(e))for(var o=Math.min(e.length,t.length),a=0;a<o;a++){var s=e[a];t[a][n]=i?r(s):s}},h.mergeArrayCastPositive=function(e,t,n){return h.mergeArray(e,t,n,(function(e){var t=+e;return isFinite(t)&&t>0?t:0}))},h.fillArray=function(e,t,n,r){if(r=r||h.identity,h.isArrayOrTypedArray(e))for(var i=0;i<t.length;i++)t[i][n]=r(e[i])},h.castOption=function(e,t,n,r){r=r||h.identity;var i=h.nestedProperty(e,n).get();return h.isArrayOrTypedArray(i)?Array.isArray(t)&&h.isArrayOrTypedArray(i[t[0]])?r(i[t[0]][t[1]]):r(i[t]):i},h.extractOption=function(e,t,n,r){if(n in e)return e[n];var i=h.nestedProperty(t,r).get();return Array.isArray(i)?void 0:i},h.tagSelected=function(e,t,n){var r,i,o=t.selectedpoints,a=t._indexToPoints;a&&(r=C(a));for(var s=0;s<o.length;s++){var l=o[s];if(h.isIndex(l)||h.isArrayOrTypedArray(l)&&h.isIndex(l[0])&&h.isIndex(l[1])){var c=r?r[l]:l,u=n?n[c]:c;void 0!==(i=u)&&i<e.length&&(e[u].selected=1)}}},h.selIndices2selPoints=function(e){var t=e.selectedpoints,n=e._indexToPoints;if(n){for(var r=C(n),i=[],o=0;o<t.length;o++){var a=t[o];if(h.isIndex(a)){var s=r[a];h.isIndex(s)&&i.push(s)}}return i}return t},h.getTargetArray=function(e,t){var n=t.target;if("string"==typeof n&&n){var r=h.nestedProperty(e,n).get();return!!Array.isArray(r)&&r}return!!Array.isArray(n)&&n},h.minExtend=function(e,t){var n={};"object"!=typeof t&&(t={});var r,i,o,a=Object.keys(e);for(r=0;r<a.length;r++)o=e[i=a[r]],"_"!==i.charAt(0)&&"function"!=typeof o&&("module"===i?n[i]=o:Array.isArray(o)?n[i]="colorscale"===i?o.slice():o.slice(0,3):h.isTypedArray(o)?n[i]=o.subarray(0,3):n[i]=o&&"object"==typeof o?h.minExtend(e[i],t[i]):o);for(a=Object.keys(t),r=0;r<a.length;r++)"object"==typeof(o=t[i=a[r]])&&i in n&&"object"==typeof n[i]||(n[i]=o);return n},h.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},h.containsAny=function(e,t){for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1},h.isIE=function(){return void 0!==window.navigator.msSaveBlob};var M=/Version\/[\d\.]+.*Safari/;h.isSafari=function(){return M.test(window.navigator.userAgent)};var O=/iPad|iPhone|iPod/;h.isIOS=function(){return O.test(window.navigator.userAgent)};var L=/Firefox\/(\d+)\.\d+/;h.getFirefoxVersion=function(){var e=L.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},h.isD3Selection=function(e){return e instanceof r.selection},h.ensureSingle=function(e,t,n,r){var i=e.select(t+(n?"."+n:""));if(i.size())return i;var o=e.append(t);return n&&o.classed(n,!0),r&&o.call(r),o},h.ensureSingleById=function(e,t,n,r){var i=e.select(t+"#"+n);if(i.size())return i;var o=e.append(t).attr("id",n);return r&&o.call(r),o},h.objectFromPath=function(e,t){for(var n,r=e.split("."),i=n={},o=0;o<r.length;o++){var a=r[o],s=null,l=r[o].match(/(.*)\[([0-9]+)\]/);l?(a=l[1],s=l[2],n=n[a]=[],o===r.length-1?n[s]=t:n[s]={},n=n[s]):(o===r.length-1?n[a]=t:n[a]={},n=n[a])}return i};var D=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;h.expandObjectPaths=function(e){var t,n,r,i,o,a,s;if("object"==typeof e&&!Array.isArray(e))for(n in e)e.hasOwnProperty(n)&&((t=n.match(D))?(i=e[n],r=t[1],delete e[n],e[r]=h.extendDeepNoArrays(e[r]||{},h.objectFromPath(n,h.expandObjectPaths(i))[r])):(t=n.match(I))?(i=e[n],r=t[1],o=parseInt(t[2]),delete e[n],e[r]=e[r]||[],"."===t[3]?(s=t[4],a=e[r][o]=e[r][o]||{},h.extendDeepNoArrays(a,h.objectFromPath(s,h.expandObjectPaths(i)))):e[r][o]=h.expandObjectPaths(i)):e[n]=h.expandObjectPaths(e[n]));return e},h.numSeparate=function(e,t,n){if(n||(n=!1),"string"!=typeof t||0===t.length)throw new Error("Separator string required for formatting!");"number"==typeof e&&(e=String(e));var r=/(\d+)(\d{3})/,i=t.charAt(0),o=t.charAt(1),a=e.split("."),s=a[0],l=a.length>1?i+a[1]:"";if(o&&(a.length>1||s.length>4||n))for(;r.test(s);)s=s.replace(r,"$1"+o+"$2");return s+l},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;h.templateString=function(e,t){var n={};return e.replace(h.TEMPLATE_STRING_REGEX,(function(e,r){var i;return R.test(r)?i=t[r]:(n[r]=n[r]||h.nestedProperty(t,r).get,i=n[r]()),h.isValidTextValue(i)?i:""}))};var P={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return F.apply(P,arguments)};var N={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return F.apply(N,arguments)};var z=/^[:|\|]/;function F(e,t,n){var r=this,o=arguments;t||(t={});var a={};return e.replace(h.TEMPLATE_STRING_REGEX,(function(e,s,l){var c,u,d,f="_xother"===s||"_yother"===s,p="_xother_"===s||"_yother_"===s,g="xother_"===s||"yother_"===s,m="xother"===s||"yother"===s||f||g||p,v=s;if((f||p)&&(v=v.substring(1)),(g||p)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=t[v]))return""}else for(d=3;d<o.length;d++)if(u=o[d]){if(u.hasOwnProperty(v)){c=u[v];break}if(R.test(v)||(c=h.nestedProperty(u,v).get(),(c=a[v]||h.nestedProperty(u,v).get())&&(a[v]=c)),void 0!==c)break}if(void 0===c&&r)return r.count<r.max&&(h.warn("Variable '"+v+"' in "+r.name+" could not be found!"),c=e),r.count===r.max&&h.warn("Too many "+r.name+" warnings - additional warnings will be suppressed"),r.count++,e;if(l){var y;if(":"===l[0]&&(c=(y=n?n.numberFormat:h.numberFormat)(l.replace(z,""))(c)),"|"===l[0]){y=n?n.timeFormat:i;var b=h.dateTime2ms(c);c=h.formatDate(b,l.replace(z,""),!1,y)}}else{var _=v+"Label";t.hasOwnProperty(_)&&(c=t[_])}return m&&(c="("+c+")",(f||p)&&(c=" "+c),(g||p)&&(c+=" ")),c}))}h.subplotSort=function(e,t){for(var n=Math.min(e.length,t.length)+1,r=0,i=0,o=0;o<n;o++){var a=e.charCodeAt(o)||0,s=t.charCodeAt(o)||0,l=a>=48&&a<=57,c=s>=48&&s<=57;if(l&&(r=10*r+a-48),c&&(i=10*i+s-48),!l||!c){if(r!==i)return r-i;if(a!==s)return a-s}}return i-r};var B=2e9;h.seedPseudoRandom=function(){B=2e9},h.pseudoRandom=function(){var e=B;return B=(69069*B+1)%4294967296,Math.abs(B-e)<429496729?h.pseudoRandom():B/4294967296},h.fillText=function(e,t,n){var r=Array.isArray(n)?function(e){n.push(e)}:function(e){n.text=e},i=h.extractOption(e,t,"htx","hovertext");if(h.isValidTextValue(i))return r(i);var o=h.extractOption(e,t,"tx","text");return h.isValidTextValue(o)?r(o):void 0},h.isValidTextValue=function(e){return e||0===e},h.formatPercent=function(e,t){t=t||0;for(var n=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",r=0;r<t;r++)-1!==n.indexOf(".")&&(n=(n=n.replace("0%","%")).replace(".%","%"));return n},h.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t},h.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""},h.strRotate=function(e){return e?"rotate("+e+")":""},h.strScale=function(e){return 1!==e?"scale("+e+")":""},h.getTextTransform=function(e){var t=e.noCenter,n=e.textX,r=e.textY,i=e.targetX,o=e.targetY,a=e.anchorX||0,s=e.anchorY||0,l=e.rotate,c=e.scale;return c?c>1&&(c=1):c=0,h.strTranslate(i-c*(n+a),o-c*(r+s))+h.strScale(c)+(l?"rotate("+l+(t?"":" "+n+" "+r)+")":"")},h.ensureUniformFontSize=function(e,t){var n=h.extendFlat({},t);return n.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),n},h.join2=function(e,t,n){var r=e.length;return r>1?e.slice(0,-1).join(t)+n+e[r-1]:e.join(t)},h.bigFont=function(e){return Math.round(1.2*e)};var j=h.getFirefoxVersion(),U=null!==j&&j<86;h.getPositionFromD3Event=function(){return U?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}},{"../constants/numerical":479,"./anchor_utils":483,"./angles":484,"./array":485,"./clean_number":486,"./clear_responsive":488,"./coerce":489,"./dates":490,"./dom":491,"./extend":493,"./filter_unique":494,"./filter_visible":495,"./geometry2d":498,"./identity":501,"./increment":502,"./is_plain_object":504,"./keyed_container":505,"./localize":506,"./loggers":507,"./make_trace_groups":508,"./matrix":509,"./mod":510,"./nested_property":511,"./noop":512,"./notifier":513,"./preserve_drawing_buffer":517,"./push_unique":518,"./regex":520,"./relative_attr":521,"./relink_private":522,"./search":523,"./sort_object_keys":526,"./stats":527,"./throttle":530,"./to_log_range":531,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],504:[function(e,t,n){"use strict";t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},{}],505:[function(e,t,n){"use strict";var r=e("./nested_property"),i=/^\w*$/;t.exports=function(e,t,n,o){var a,s,l;n=n||"name",o=o||"value";var c={};t&&t.length?(l=r(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(a=0;a<s.length;a++)u[s[a][n]]=a;var h=i.test(o),d={set:function(e,t){var i=null===t?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var a=u[e];if(void 0===a){if(4===i)return;i|=3,a=s.length,u[e]=a}else t!==(h?s[a][o]:r(s[a],o).get())&&(i|=2);var f=s[a]=s[a]||{};return f[n]=e,h?f[o]=t:r(f,o).set(t),null!==t&&(i&=-5),c[a]=c[a]|i,d},get:function(e){if(s){var t=u[e];return void 0===t?void 0:h?s[t][o]:r(s[t],o).get()}},rename:function(e,t){var r=u[e];return void 0===r||(c[r]=1|c[r],u[t]=r,delete u[e],s[r][n]=t),d},remove:function(e){var t=u[e];if(void 0===t)return d;var i=s[t];if(Object.keys(i).length>2)return c[t]=2|c[t],d.set(e,null);if(h){for(a=t;a<s.length;a++)c[a]=3|c[a];for(a=t;a<s.length;a++)u[s[a][n]]--;s.splice(t,1),delete u[e]}else r(i,o).set(null),c[t]=6|c[t];return d},constructUpdate:function(){for(var e,i,a={},l=Object.keys(c),u=0;u<l.length;u++)i=l[u],e=t+"["+i+"]",s[i]?(1&c[i]&&(a[e+"."+n]=s[i][n]),2&c[i]&&(a[e+"."+o]=h?4&c[i]?null:s[i][o]:4&c[i]?null:r(s[i],o).get())):a[e]=null;return a}};return d}},{"./nested_property":511}],506:[function(e,t,n){"use strict";var r=e("../registry");t.exports=function(e,t){for(var n=e._context.locale,i=0;i<2;i++){for(var o=e._context.locales,a=0;a<2;a++){var s=(o[n]||{}).dictionary;if(s){var l=s[t];if(l)return l}o=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}},{"../registry":638}],507:[function(e,t,n){"use strict";var r=e("../plot_api/plot_config").dfltConfig,i=e("./notifier"),o=t.exports={};o.log=function(){var e;if(r.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(r.notifyOnLogging>1){var n=[];for(e=0;e<arguments.length;e++)n.push(arguments[e]);i(n.join("<br>"),"long")}},o.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(r.notifyOnLogging>0){var n=[];for(e=0;e<arguments.length;e++)n.push(arguments[e]);i(n.join("<br>"),"stick")}},o.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(r.notifyOnLogging>0){var n=[];for(e=0;e<arguments.length;e++)n.push(arguments[e]);i(n.join("<br>"),"stick")}}},{"../plot_api/plot_config":541,"./notifier":513}],508:[function(e,t,n){"use strict";var r=e("@plotly/d3");t.exports=function(e,t,n){var i=e.selectAll("g."+n.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var o=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][o]=r.select(this)})),i}},{"@plotly/d3":58}],509:[function(e,t,n){"use strict";var r=e("gl-mat4");n.init2dArray=function(e,t){for(var n=new Array(e),r=0;r<e;r++)n[r]=new Array(t);return n},n.transposeRagged=function(e){var t,n,r=0,i=e.length;for(t=0;t<i;t++)r=Math.max(r,e[t].length);var o=new Array(r);for(t=0;t<r;t++)for(o[t]=new Array(i),n=0;n<i;n++)o[t][n]=e[n][t];return o},n.dot=function(e,t){if(!e.length||!t.length||e.length!==t.length)return null;var r,i,o=e.length;if(e[0].length)for(r=new Array(o),i=0;i<o;i++)r[i]=n.dot(e[i],t);else if(t[0].length){var a=n.transposeRagged(t);for(r=new Array(a.length),i=0;i<a.length;i++)r[i]=n.dot(e,a[i])}else for(r=0,i=0;i<o;i++)r+=e[i]*t[i];return r},n.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},n.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]},n.rotationXYMatrix=function(e,t,r){return n.dot(n.dot(n.translationMatrix(t,r),n.rotationMatrix(e)),n.translationMatrix(-t,-r))},n.apply3DTransform=function(e){return function(){var t=arguments,r=1===arguments.length?t[0]:[t[0],t[1],t[2]||0];return n.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}},n.apply2DTransform=function(e){return function(){var t=arguments;3===t.length&&(t=t[0]);var r=1===arguments.length?t[0]:[t[0],t[1]];return n.dot(e,[r[0],r[1],1]).slice(0,2)}},n.apply2DTransform2=function(e){var t=n.apply2DTransform(e);return function(e){return t(e.slice(0,2)).concat(t(e.slice(2,4)))}},n.convertCssMatrix=function(e){if(e){var t=e.length;if(16===t)return e;if(6===t)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},n.inverseTransformMatrix=function(e){var t=[];return r.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}},{"gl-mat4":210}],510:[function(e,t,n){"use strict";t.exports={mod:function(e,t){var n=e%t;return n<0?n+t:n},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},{}],511:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("./array").isArrayOrTypedArray;function o(e,t){return function(){var n,r,a,s,l,c=e;for(s=0;s<t.length-1;s++){if(-1===(n=t[s])){for(r=!0,a=[],l=0;l<c.length;l++)a[l]=o(c[l],t.slice(s+1))(),a[l]!==a[0]&&(r=!1);return r?a[0]:a}if("number"==typeof n&&!i(c))return;if("object"!=typeof(c=c[n])||null===c)return}if("object"==typeof c&&null!==c&&null!==(a=c[t[s]]))return a}}t.exports=function(e,t){if(r(t))t=String(t);else if("string"!=typeof t||"[-1]"===t.substr(t.length-4))throw"bad property string";for(var n,i,a,s=0,c=t.split(".");s<c.length;){if(n=String(c[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(n[1])c[s]=n[1];else{if(0!==s)throw"bad property string";c.splice(0,1)}for(i=n[2].substr(1,n[2].length-2).split("]["),a=0;a<i.length;a++)s++,c.splice(s,0,Number(i[a]))}s++}return"object"!=typeof e?function(e,t,n){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:n,obj:e}}(e,t,c):{set:l(e,c,t),get:o(e,c),astr:t,parts:c,obj:e}};var a=/(^|\.)args\[/;function s(e,t){return void 0===e||null===e&&!t.match(a)}function l(e,t,n){return function(r){var o,a,l=e,d="",f=[[e,d]],p=s(r,n);for(a=0;a<t.length-1;a++){if("number"==typeof(o=t[a])&&!i(l))throw"array index but container is not an array";if(-1===o){if(p=!u(l,t.slice(a+1),r,n))break;return}if(!h(l,o,t[a+1],p))break;if("object"!=typeof(l=l[o])||null===l)throw"container is not an object";d=c(d,o),f.push([l,d])}if(p){if(a===t.length-1&&(delete l[t[a]],Array.isArray(l)&&+t[a]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[t[a]]=r}}function c(e,t){var n=t;return r(t)?n="["+t+"]":e&&(n="."+t),e+n}function u(e,t,n,r){var o,a=i(n),c=!0,u=n,d=r.replace("-1",0),f=!a&&s(n,d),p=t[0];for(o=0;o<e.length;o++)d=r.replace("-1",o),a&&(f=s(u=n[o%n.length],d)),f&&(c=!1),h(e,o,p,f)&&l(e[o],t,r.replace("-1",o))(u);return c}function h(e,t,n,r){if(void 0===e[t]){if(r)return!1;e[t]="number"==typeof n?[]:{}}return!0}},{"./array":485,"fast-isnumeric":190}],512:[function(e,t,n){"use strict";t.exports=function(){}},{}],513:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=[];t.exports=function(e,t){if(-1===o.indexOf(e)){o.push(e);var n=1e3;i(t)?n=t:"long"===t&&(n=3e3);var a=r.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var i=r.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=e.split(/<br\s*\/?>/g),l=0;l<a.length;l++)l&&o.append("br"),o.append("span").text(a[l]);"stick"===t?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(n).call(s)}))}function s(e){e.duration(700).style("opacity",0).each("end",(function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),r.select(this).remove()}))}}},{"@plotly/d3":58,"fast-isnumeric":190}],514:[function(e,t,n){"use strict";var r=e("./setcursor"),i="data-savedcursor";t.exports=function(e,t){var n=e.attr(i);if(t){if(!n){for(var o=(e.attr("class")||"").split(" "),a=0;a<o.length;a++){var s=o[a];0===s.indexOf("cursor-")&&e.attr(i,s.substr(7)).classed(s,!1)}e.attr(i)||e.attr(i,"!!")}r(e,t)}else n&&(e.attr(i,null),"!!"===n?r(e):r(e,n))}},{"./setcursor":524}],515:[function(e,t,n){"use strict";var r=e("./matrix").dot,i=e("../constants/numerical").BADNUM,o=t.exports={};o.tester=function(e){var t,n=e.slice(),r=n[0][0],o=r,a=n[0][1],s=a;for(n.push(n[0]),t=1;t<n.length;t++)r=Math.min(r,n[t][0]),o=Math.max(o,n[t][0]),a=Math.min(a,n[t][1]),s=Math.max(s,n[t][1]);var l,c=!1;5===n.length&&(n[0][0]===n[1][0]?n[2][0]===n[3][0]&&n[0][1]===n[3][1]&&n[1][1]===n[2][1]&&(c=!0,l=function(e){return e[0]===n[0][0]}):n[0][1]===n[1][1]&&n[2][1]===n[3][1]&&n[0][0]===n[3][0]&&n[1][0]===n[2][0]&&(c=!0,l=function(e){return e[1]===n[0][1]}));var u=!0,h=n[0];for(t=1;t<n.length;t++)if(h[0]!==n[t][0]||h[1]!==n[t][1]){u=!1;break}return{xmin:r,xmax:o,ymin:a,ymax:s,pts:n,contains:c?function(e,t){var n=e[0],c=e[1];return!(n===i||n<r||n>o||c===i||c<a||c>s||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||l<r||l>o||c===i||c<a||c>s)return!1;var u,h,d,f,p,g=n.length,m=n[0][0],v=n[0][1],y=0;for(u=1;u<g;u++)if(h=m,d=v,m=n[u][0],v=n[u][1],!(l<(f=Math.min(h,m))||l>Math.max(h,m)||c>Math.max(d,v)))if(c<Math.min(d,v))l!==f&&y++;else{if(c===(p=m===h?c:d+(l-h)*(v-d)/(m-h)))return 1!==u||!t;c<=p&&l!==f&&y++}return y%2==1},isRect:c,degenerate:u}},o.isSegmentBent=function(e,t,n,i){var o,a,s,l=e[t],c=[e[n][0]-l[0],e[n][1]-l[1]],u=r(c,c),h=Math.sqrt(u),d=[-c[1]/h,c[0]/h];for(o=t+1;o<n;o++)if(a=[e[o][0]-l[0],e[o][1]-l[1]],(s=r(a,c))<0||s>u||Math.abs(r(a,d))>i)return!0;return!1},o.filter=function(e,t){var n=[e[0]],r=0,i=0;function a(a){e.push(a);var s=n.length,l=r;n.splice(i+1);for(var c=l+1;c<e.length;c++)(c===e.length-1||o.isSegmentBent(e,l,c+1,t))&&(n.push(e[c]),n.length<s-2&&(r=c,i=n.length-1),l=c)}return e.length>1&&a(e.pop()),{addPt:a,raw:e,filtered:n}}},{"../constants/numerical":479,"./matrix":509}],516:[function(e,t,r){(function(n){(function(){"use strict";var r=e("./show_no_webgl_msg"),i=e("regl");t.exports=function(e,t){var o=e._fullLayout,a=!0;return o._glcanvas.each((function(r){if(!r.regl&&(!r.pick||o._has("parcoords"))){try{r.regl=i({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||n.devicePixelRatio,extensions:t||[]})}catch(e){a=!1}r.regl||(a=!1),a&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})}),!1)}})),a||r({container:o._glcontainer.node()}),a}}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":525,regl:283}],517:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("is-mobile");t.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!=typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var n=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var o=t.split(" "),a=1;a<o.length;a++)if(-1!==o[a].indexOf("Safari"))for(var s=a-1;s>-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(r(c)&&(c=+c),c>=13)return!0}}return n}},{"fast-isnumeric":190,"is-mobile":234}],518:[function(e,t,n){"use strict";t.exports=function(e,t){if(t instanceof RegExp){for(var n=t.toString(),r=0;r<e.length;r++)if(e[r]instanceof RegExp&&e[r].toString()===n)return e;e.push(t)}else!t&&0!==t||-1!==e.indexOf(t)||e.push(t);return e}},{}],519:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plot_api/plot_config").dfltConfig;var o={add:function(e,t,n,r,o){var a,s;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},s=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(s,e.undoQueue.queue.length-s,a),e.undoQueue.index+=1):a=e.undoQueue.queue[s-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(n),a.redo.calls.push(r),a.redo.args.push(o)),e.undoQueue.queue.length>i.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,n;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n<t.undo.calls.length;n++)o.plotDo(e,t.undo.calls[n],t.undo.args[n]);e.undoQueue.inSequence=!1,e.autoplay=!1}},redo:function(e){var t,n;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n<t.redo.calls.length;n++)o.plotDo(e,t.redo.calls[n],t.redo.args[n]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}},plotDo:function(e,t,n){e.autoplay=!0,n=function(e,t){for(var n,i=[],o=0;o<t.length;o++)n=t[o],i[o]=n===e?n:"object"==typeof n?Array.isArray(n)?r.extendDeep([],n):r.extendDeepAll({},n):n;return i}(e,n),t.apply(null,n)}};t.exports=o},{"../lib":503,"../plot_api/plot_config":541}],520:[function(e,t,n){"use strict";n.counter=function(e,t,n,r){var i=(t||"")+(n?"":"$"),o=!1===r?"":"^";return"xy"===e?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+e+"([2-9]|[1-9][0-9]+)?"+i)}},{}],521:[function(e,t,n){"use strict";var r=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,i=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var n=e.match(r);if(n)e=n[1];else{if(!e.match(i))throw new Error("bad relativeAttr call:"+[e,t]);e=""}if("^"!==t.charAt(0))break;t=t.slice(1)}return e&&"["!==t.charAt(0)?e+"."+t:e+t}},{}],522:[function(e,t,n){"use strict";var r=e("./array").isArrayOrTypedArray,i=e("./is_plain_object");t.exports=function e(t,n){for(var o in n){var a=n[o],s=t[o];if(s!==a)if("_"===o.charAt(0)||"function"==typeof a){if(o in t)continue;t[o]=a}else if(r(a)&&r(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c<l;c++)s[c]!==a[c]&&i(a[c])&&i(s[c])&&e(s[c],a[c])}else i(a)&&i(s)&&(e(s,a),Object.keys(s).length||delete t[o])}}},{"./array":485,"./is_plain_object":504}],523:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("./loggers"),o=e("./identity"),a=e("../constants/numerical").BADNUM,s=1e-9;function l(e,t){return e<t}function c(e,t){return e<=t}function u(e,t){return e>t}function h(e,t){return e>=t}n.findBin=function(e,t,n){if(r(t.start))return n?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var o,a,d=0,f=t.length,p=0,g=f>1?(t[f-1]-t[0])/(f-1):1;for(a=g>=0?n?l:c:n?h:u,e+=g*s*(n?-1:1)*(g>=0?1:-1);d<f&&p++<100;)a(t[o=Math.floor((d+f)/2)],e)?d=o+1:f=o;return p>90&&i.log("Long binary search..."),d-1},n.sorterAsc=function(e,t){return e-t},n.sorterDes=function(e,t){return t-e},n.distinctVals=function(e){var t,r=e.slice();for(r.sort(n.sorterAsc),t=r.length-1;t>-1&&r[t]===a;t--);for(var i,o=r[t]-r[0]||1,s=o/(t||1)/1e4,l=[],c=0;c<=t;c++){var u=r[c],h=u-i;void 0===i?(l.push(u),i=u):h>s&&(o=Math.min(o,h),l.push(u),i=u)}return{vals:l,minDiff:o}},n.roundUp=function(e,t,n){for(var r,i=0,o=t.length-1,a=0,s=n?0:1,l=n?1:0,c=n?Math.ceil:Math.floor;i<o&&a++<100;)t[r=c((i+o)/2)]<=e?i=r+s:o=r-l;return t[i]},n.sort=function(e,t){for(var n=0,r=0,i=1;i<e.length;i++){var o=t(e[i],e[i-1]);if(o<0?n=1:o>0&&(r=1),n&&r)return e.sort(t)}return r?e:e.reverse()},n.findIndexOfMin=function(e,t){t=t||o;for(var n,r=1/0,i=0;i<e.length;i++){var a=t(e[i]);a<r&&(r=a,n=i)}return n}},{"../constants/numerical":479,"./identity":501,"./loggers":507,"fast-isnumeric":190}],524:[function(e,t,n){"use strict";t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},{}],525:[function(e,t,n){"use strict";var r=e("../components/color"),i=function(){};t.exports=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=i);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=r.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=r.lightLine,n.style["z-index"]=30;var o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit path_to_url for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",n.appendChild(o),e.container.appendChild(n),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("path_to_url")},!1}},{"../components/color":366}],526:[function(e,t,n){"use strict";t.exports=function(e){return Object.keys(e).sort()}},{}],527:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("./array").isArrayOrTypedArray;n.aggNums=function(e,t,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),r(t)||(t=!1),i(o[0])){for(l=new Array(a),s=0;s<a;s++)l[s]=n.aggNums(e,t,o[s]);o=l}for(s=0;s<a;s++)r(t)?r(o[s])&&(t=e(+t,+o[s])):t=o[s];return t},n.len=function(e){return n.aggNums((function(e){return e+1}),0,e)},n.mean=function(e,t){return t||(t=n.len(e)),n.aggNums((function(e,t){return e+t}),0,e)/t},n.midRange=function(e){if(void 0!==e&&0!==e.length)return(n.aggNums(Math.max,null,e)+n.aggNums(Math.min,null,e))/2},n.variance=function(e,t,i){return t||(t=n.len(e)),r(i)||(i=n.mean(e,t)),n.aggNums((function(e,t){return e+Math.pow(t-i,2)}),0,e)/t},n.stdev=function(e,t,r){return Math.sqrt(n.variance(e,t,r))},n.median=function(e){var t=e.slice().sort();return n.interp(t,.5)},n.interp=function(e,t){if(!r(t))throw"n should be a finite number";if((t=t*e.length-.5)<0)return e[0];if(t>e.length-1)return e[e.length-1];var n=t%1;return n*e[Math.ceil(t)]+(1-n)*e[Math.floor(t)]}},{"./array":485,"fast-isnumeric":190}],528:[function(e,t,n){"use strict";var r=e("color-normalize");t.exports=function(e){return e?r(e):[0,0,0,1]}},{"color-normalize":89}],529:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../lib"),o=i.strTranslate,a=e("../constants/xmlns_namespaces"),s=e("../constants/alignment").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;n.convertToTspans=function(e,t,g){var S=e.text(),E=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),O=r.select(e.node().parentNode);if(!O.empty()){var L=e.attr("class")?e.attr("class").split(" ")[0]:"text";return L+="-math",O.selectAll("svg."+L).remove(),O.selectAll("g."+L+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(t&&t._promises||[]).push(new Promise((function(t){e.style("display","none");var n=parseInt(e.node().style.fontSize,10),a={fontSize:n};!function(e,t,n){var o,a,s,l;MathJax.Hub.Queue((function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var n="math-output-"+i.randstr({},64);return l=r.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var t=r.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())i.log("There was an error in the tex syntax.",e),n();else{var a=l.select("svg").node().getBoundingClientRect();n(l.select(".MathJax_SVG"),t,a)}if(l.remove(),"SVG"!==o)return MathJax.Hub.setRenderer(o)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)}))}(E[2],a,(function(r,i,a){O.selectAll("svg."+L).remove(),O.selectAll("g."+L+"-group").remove();var s=r&&r.select("svg");if(!s||!s.node())return D(),void t();var l=O.append("g").classed(L+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,u=a.height;s.attr({class:L,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=e.node().style.fill||"black",d=s.select("g");d.attr({fill:h,stroke:h});var f=d.node().getBoundingClientRect(),p=f.width,m=f.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+e.attr("x"),y=+e.attr("y"),b=-(n||e.node().getBoundingClientRect().height)/4;if("y"===L[0])l.attr({transform:"rotate("+[-90,v,y]+")"+o(-p/2,b-m/2)});else if("l"===L[0])y=b-m/2;else if("a"===L[0]&&0!==L.indexOf("atitle"))v=0,y=b;else{var _=e.attr("text-anchor");v-=p*("middle"===_?.5:"end"===_?1:0),y=y+b-m/2}s.attr({x:v,y}),g&&g.call(e,l),t(l)}))}))):D(),e}function D(){O.empty()||(L=e.attr("class")+"-math",O.select("svg."+L).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(m," ");var n,o=!1,l=[],c=-1;function u(){c++;var t=document.createElementNS(a.svg,"tspan");r.select(t).attr({class:"line",dy:c*s+"em"}),e.appendChild(t),n=t;var i=l;if(l=[{node:t}],i.length>1)for(var o=1;o<i.length;o++)g(i[o])}function g(e){var t,i=e.type,o={};if("a"===i){t="a";var s=e.target,c=e.href,u=e.popup;c&&(o={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":c},u&&(o.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else t="tspan";e.style&&(o.style=e.style);var h=document.createElementNS(a.svg,t);if("sup"===i||"sub"===i){S(n,p),n.appendChild(h);var g=document.createElementNS(a.svg,"tspan");S(g,p),r.select(g).attr("dy",f[i]),o.dy=d[i],n.appendChild(h),n.appendChild(g)}else n.appendChild(h);r.select(h).attr(o),n=e.node=h,l.push(e)}function S(e,t){e.appendChild(document.createTextNode(t))}function E(e){if(1!==l.length){var r=l.pop();e!==r.type&&i.log("Start tag <"+r.type+"> doesnt match end tag <"+e+">. Pretending it did match.",t),n=l[l.length-1].node}else i.log("Ignoring unexpected end tag </"+e+">.",t)}b.test(t)?u():(n=e,l=[{node:e}]);for(var O=t.split(v),L=0;L<O.length;L++){var D=O[L],I=D.match(y),R=I&&I[2].toLowerCase(),P=h[R];if("br"===R)u();else if(void 0===P)S(n,C(D));else if(I[1])E(R);else{var N=I[4],z={type:R},F=k(N,_);if(F?(F=F.replace(T,"$1 fill:"),P&&(F+=";"+P)):P&&(F=P),F&&(z.style=F),"a"===R){o=!0;var B=k(N,x);if(B){var j=M(B);j&&(z.href=j,z.target=k(N,w)||"_blank",z.popup=k(N,A))}}g(z)}}return o}(e.node(),S)&&e.style("pointer-events","all"),n.positionText(e),g&&g.call(e)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g;var h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},p="",g=["http:","https:","mailto:","",void 0,":"],m=n.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;n.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var n=e.match(t),r=n&&(n[3]||n[4]);return r&&C(r)}var T=/(^|;)\s*color:/;n.plainText=function(e,t){for(var n=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,r=void 0!==t.allowedTags?t.allowedTags:["br"],i="...".length,o=e.split(v),a=[],s="",l=0,c=0;c<o.length;c++){var u=o[c],h=u.match(y),d=h&&h[2].toLowerCase();if(d)-1!==r.indexOf(d)&&(a.push(u),s=d);else{var f=u.length;if(l+f<n)a.push(u),l+=f;else if(l<n){var p=n-l;s&&("br"!==s||p<=i||f<=i)&&a.pop(),n>i?a.push(u.substr(0,p-i)+"..."):a.push(u.substr(0,p));break}s=""}}return a.join("")};var S={mu:"",amp:"&",lt:"<",gt:">",nbsp:"",times:"",plusmn:"",deg:""},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(E,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var n=String.fromCharCode;return e<=65535?n(e):n(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):S[t])||e}))}function M(e){var t=encodeURI(decodeURI(e)),n=document.createElement("a"),r=document.createElement("a");n.href=e,r.href=t;var i=n.protocol,o=r.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?t:""}function O(e,t,n){var r,o,a,s=n.horizontalAlign,l=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-r.height}:"middle"===l?function(){return c.top+(c.height-r.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-r.width}:"center"===s?function(){return c.left+(c.width-r.width)/2}:function(){return c.left},function(){r=this.node().getBoundingClientRect();var e=a()-u.left,t=o()-u.top,s=n.gd||{};if(n.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}n.convertEntities=C,n.sanitizeHTML=function(e){e=e.replace(m," ");for(var t=document.createElement("p"),n=t,i=[],o=e.split(v),a=0;a<o.length;a++){var s=o[a],l=s.match(y),c=l&&l[2].toLowerCase();if(c in h)if(l[1])i.length&&(n=i.pop());else{var u=l[4],d=k(u,_),f=d?{style:d}:{};if("a"===c){var p=k(u,x);if(p){var g=M(p);if(g){f.href=g;var b=k(u,w);b&&(f.target=b)}}}var A=document.createElement(c);n.appendChild(A),r.select(A).attr(f),n=A,i.push(A)}else n.appendChild(document.createTextNode(C(s)))}return t.innerHTML},n.lineCount=function(e){return e.selectAll("tspan.line").size()||1},n.positionText=function(e,t,n){return e.each((function(){var e=r.select(this);function i(t,n){return void 0===n?null===(n=e.attr(t))&&(e.attr(t,0),n=0):e.attr(t,n),n}var o=i("x",t),a=i("y",n);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:o,y:a})}))};var L="1px ";n.makeTextShadow=function(e){return"1px 1px 1px "+e+", -"+"1px -"+L+L+e+", "+"1px -"+L+L+e+", -"+L+L+L+e},n.makeEditable=function(e,t){var n=t.gd,i=t.delegate,o=r.dispatch("edit","input","cancel"),a=i||e;if(e.style({"pointer-events":i?"none":"all"}),1!==e.size())throw new Error("boo");function s(){var i,s,c,u,h;i=r.select(n).select(".svg-container"),s=i.append("div"),c=e.node().style,u=parseFloat(c.fontSize||12),void 0===(h=t.text)&&(h=e.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:t.fill||c.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(h).call(O(e,i,t)).on("blur",(function(){n._editing=!1,e.text(this.textContent).style({opacity:1});var t,i=r.select(this).attr("class");(t=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&r.select(e.node().parentNode).select(t).style({opacity:0});var a=this.textContent;r.select(this).transition().duration(0).remove(),r.select(document).on("mouseup",null),o.edit.call(e,a)})).on("focus",(function(){var e=this;n._editing=!0,r.select(document).on("mouseup",(function(){if(r.event.target===e)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===r.event.which?(n._editing=!1,e.style({opacity:1}),r.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),o.cancel.call(e,this.textContent)):(o.input.call(e,this.textContent),r.select(this).call(O(e,i,t)))})).on("keydown",(function(){13===r.event.which&&this.blur()})).call(l),e.style({opacity:0});var d,f=a.attr("class");(d=f?"."+f.split(" ")[0]+"-math-group":"[class*=-math-group]")&&r.select(e.node().parentNode).select(d).style({opacity:0})}function l(e){var t=e.node(),n=document.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.focus()}return t.immediate?s():a.on("click",s),r.rebind(e,o,"on")}},{"../constants/alignment":471,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],530:[function(e,t,n){"use strict";var r={};function i(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}n.throttle=function(e,t,n){var o=r[e],a=Date.now();if(!o){for(var s in r)r[s].ts<a-6e4&&delete r[s];o=r[e]={ts:0,timer:null}}function l(){n(),o.ts=Date.now(),o.onDone&&(o.onDone(),o.onDone=null)}i(o),a>o.ts+t?l():o.timer=setTimeout((function(){l(),o.timer=null}),t)},n.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var n=t.onDone;t.onDone=function(){n&&n(),e(),t.onDone=null}})):Promise.resolve()},n.clear=function(e){if(e)i(r[e]),delete r[e];else for(var t in r)n.clear(t)}},{}],531:[function(e,t,n){"use strict";var r=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}},{"fast-isnumeric":190}],532:[function(e,t,n){"use strict";var r=t.exports={},i=e("../plots/geo/constants").locationmodeToLayer,o=e("topojson-client").feature;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+t+".json"},r.getTopojsonFeatures=function(e,t){var n=i[e.locationmode],r=t.objects[n];return o(t,r).features}},{"../plots/geo/constants":587,"topojson-client":315}],533:[function(e,t,n){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],534:[function(e,t,n){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],535:[function(e,t,n){"use strict";var r=e("../registry");t.exports=function(e){for(var t,n,i=r.layoutArrayContainers,o=r.layoutArrayRegexes,a=e.split("[")[0],s=0;s<o.length;s++)if((n=e.match(o[s]))&&0===n.index){t=n[0];break}if(t||(t=i[i.indexOf(a)]),!t)return!1;var l=e.substr(t.length);return l?!!(n=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:t,index:Number(n[1]),property:n[3]||""}:{array:t,index:"",property:""}}},{"../registry":638}],536:[function(e,t,n){"use strict";var r=e("../lib"),i=r.extendFlat,o=r.isPlainObject,a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},s={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},l=a.flags.slice().concat(["fullReplot"]),c=s.flags.slice().concat("layoutReplot");function u(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!1;return t}function h(e,t,n){var r=i({},e);for(var a in r){var s=r[a];o(s)&&(r[a]=d(s,t,0,a))}return"from-root"===n&&(r.editType=t),r}function d(e,t,n,r){if(e.valType){var o=i({},e);if(o.editType=t,Array.isArray(e.items)){o.items=new Array(e.items.length);for(var a=0;a<e.items.length;a++)o.items[a]=d(e.items[a],t)}return o}return h(e,t,"_"===r.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(e,t){var n=t.editType;if(n&&"none"!==n)for(var r=n.split("+"),i=0;i<r.length;i++)e[r[i]]=!0},overrideAll:h}},{"../lib":503}],537:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("gl-mat4/fromQuat"),o=e("../registry"),a=e("../lib"),s=e("../plots/plots"),l=e("../plots/cartesian/axis_ids"),c=e("../components/color"),u=l.cleanId,h=l.getFromTrace,d=o.traceIs;function f(e,t){var n=e[t],r=t.charAt(0);n&&"paper"!==n&&(e[t]=u(n,r,!0))}function p(e){function t(t,n){var r=e[t],i=e.title&&e.title[n];r&&!i&&(e.title||(e.title={}),e.title[n]=e[t],delete e[t])}e&&("string"!=typeof e.title&&"number"!=typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function g(e){if(!a.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"==typeof t||"number"==typeof t)&&String(t)}function m(e,t,n,r){if(n&&!r)return e;if(r&&!n)return t;if(!e.trim())return t;if(!t.trim())return e;var i,o=Math.min(e.length,t.length);for(i=0;i<o&&e.charAt(i)===t.charAt(i);i++);return e.substr(0,i).trim()}function v(e){var t="middle",n="center";return"string"==typeof e&&(-1!==e.indexOf("top")?t="top":-1!==e.indexOf("bottom")&&(t="bottom"),-1!==e.indexOf("left")?n="left":-1!==e.indexOf("right")&&(n="right")),t+" "+n}function y(e,t){return t in e&&"object"==typeof e[t]&&0===Object.keys(e[t]).length}n.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&a.log("Clearing previous rejected promises from queue."),e._promises=[]},n.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,d=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(e);for(t=0;t<g.length;t++){var m=g[t];if(o&&o.test(m)){var v=e[m];v.anchor&&"free"!==v.anchor&&(v.anchor=u(v.anchor)),v.overlaying&&(v.overlaying=u(v.overlaying)),v.type||(v.isdate?v.type="date":v.islog?v.type="log":!1===v.isdate&&!1===v.islog&&(v.type="linear")),"withzero"!==v.autorange&&"tozero"!==v.autorange||(v.autorange=!0,v.rangemode="tozero"),delete v.islog,delete v.isdate,delete v.categories,y(v,"domain")&&delete v.domain,void 0!==v.autotick&&(void 0===v.tickmode&&(v.tickmode=v.autotick?"auto":"linear"),delete v.autotick),p(v)}else if(l&&l.test(m))p(e[m].radialaxis);else if(h&&h.test(m)){var b=e[m];p(b.aaxis),p(b.baxis),p(b.caxis)}else if(d&&d.test(m)){var _=e[m],x=_.cameraposition;if(Array.isArray(x)&&4===x[0].length){var w=x[0],A=x[1],k=x[2],T=i([],w),S=[];for(r=0;r<3;++r)S[r]=A[r]+k*T[2+4*r];_.camera={eye:{x:S[0],y:S[1],z:S[2]},center:{x:A[0],y:A[1],z:A[2]},up:{x:0,y:0,z:1}},delete _.cameraposition}p(_.xaxis),p(_.yaxis),p(_.zaxis)}}var E=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<E;t++){var C=e.annotations[t];a.isPlainObject(C)&&(C.ref&&("paper"===C.ref?(C.xref="paper",C.yref="paper"):"data"===C.ref&&(C.xref="x",C.yref="y"),delete C.ref),f(C,"xref"),f(C,"yref"))}var M=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<M;t++){var O=e.shapes[t];a.isPlainObject(O)&&(f(O,"xref"),f(O,"yref"))}var L=Array.isArray(e.images)?e.images.length:0;for(t=0;t<L;t++){var D=e.images[t];a.isPlainObject(D)&&(f(D,"xref"),f(D,"yref"))}var I=e.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&n.cleanLayout(e.template.layout),e},n.cleanData=function(e){for(var t=0;t<e.length;t++){var r,i=e[t];if("histogramy"===i.type&&"xbins"in i&&!("ybins"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&"opacity"in i.error_y){var l=c.defaults,h=i.error_y.color||(d(i,"bar")?c.defaultLine:l[t%l.length]);i.error_y.color=c.addOpacity(c.rgb(h),c.opacity(h)*i.error_y.opacity),delete i.error_y.opacity}if("bardir"in i&&("h"!==i.bardir||!d(i,"bar")&&"histogram"!==i.type.substr(0,9)||(i.orientation="h",n.swapXYData(i)),delete i.bardir),"histogramy"===i.type&&n.swapXYData(i),"histogramx"!==i.type&&"histogramy"!==i.type||(i.type="histogram"),"scl"in i&&!("colorscale"in i)&&(i.colorscale=i.scl,delete i.scl),"reversescl"in i&&!("reversescale"in i)&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=u(i.xaxis,"x")),i.yaxis&&(i.yaxis=u(i.yaxis,"y")),d(i,"gl3d")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!d(i,"pie-like")&&!d(i,"bar-like"))if(Array.isArray(i.textposition))for(r=0;r<i.textposition.length;r++)i.textposition[r]=v(i.textposition[r]);else i.textposition&&(i.textposition=v(i.textposition));var f=o.getModule(i);if(f&&f.colorbar){var b=f.colorbar.container,_=b?i[b]:i;_&&_.colorscale&&("YIGnBu"===_.colorscale&&(_.colorscale="YlGnBu"),"YIOrRd"===_.colorscale&&(_.colorscale="YlOrRd"))}if("surface"===i.type&&a.isPlainObject(i.contours)){var x=["x","y","z"];for(r=0;r<x.length;r++){var w=i.contours[x[r]];a.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===i.type||"ohlc"===i.type){var A=!1!==(i.increasing||{}).showlegend,k=!1!==(i.decreasing||{}).showlegend,T=g(i.increasing),S=g(i.decreasing);if(!1!==T&&!1!==S){var E=m(T,S,A,k);E&&(i.name=E)}else!T&&!S||i.name||(i.name=T||S)}if(Array.isArray(i.transforms)){var C=i.transforms;for(r=0;r<C.length;r++){var M=C[r];if(a.isPlainObject(M))switch(M.type){case"filter":M.filtersrc&&(M.target=M.filtersrc,delete M.filtersrc),M.calendar&&(M.valuecalendar||(M.valuecalendar=M.calendar),delete M.calendar);break;case"groupby":if(M.styles=M.styles||M.style,M.styles&&!Array.isArray(M.styles)){var O=M.styles,L=Object.keys(O);M.styles=[];for(var D=0;D<L.length;D++)M.styles.push({target:L[D],value:O[L[D]]})}}}}y(i,"line")&&delete i.line,"marker"in i&&(y(i.marker,"line")&&delete i.marker.line,y(i,"marker")&&delete i.marker),c.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),p(i),i.colorbar&&p(i.colorbar),i.marker&&i.marker.colorbar&&p(i.marker.colorbar),i.line&&i.line.colorbar&&p(i.line.colorbar),i.aaxis&&p(i.aaxis),i.baxis&&p(i.baxis)}},n.swapXYData=function(e){var t;if(a.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var n=e.error_y,r="copy_ystyle"in n?n.copy_ystyle:!(n.color||n.thickness||n.width);a.swapAttrs(e,["error_?.copy_ystyle"]),r&&a.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof e.hoverinfo){var i=e.hoverinfo.split("+");for(t=0;t<i.length;t++)"x"===i[t]?i[t]="y":"y"===i[t]&&(i[t]="x");e.hoverinfo=i.join("+")}},n.coerceTraceIndices=function(e,t){if(r(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map((function(e,t){return t}));if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++)a.isIndex(t[i],e.data.length)?n.push(t[i]):a.warn("trace index (",t[i],") is not a number or is out of bounds");return n}return t},n.manageArrayContainers=function(e,t,n){var i=e.obj,o=e.parts,s=o.length,l=o[s-1],c=r(l);if(c&&null===t){var u=o.slice(0,s-1).join(".");a.nestedProperty(i,u).get().splice(l,1)}else c&&void 0===e.get()?(void 0===e.get()&&(n[e.astr]=null),e.set(t)):e.set(t)};var b=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function _(e){var t=e.search(b);if(t>0)return e.substr(0,t)}n.hasParent=function(e,t){for(var n=_(t);n;){if(n in e)return!0;n=_(n)}return!1};var x=["x","y","z"];n.clearAxisTypes=function(e,t,n){for(var r=0;r<t.length;r++)for(var i=e._fullData[r],o=0;o<3;o++){var s=h(e,i,x[o]);if(s&&"log"!==s.type){var l=s._name,c=s._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==n[c])continue;l=c+"."+l}var u=l+".type";void 0===n[l]&&void 0===n[u]&&a.nestedProperty(e.layout,u).set(null)}}}},{"../components/color":366,"../lib":503,"../plots/cartesian/axis_ids":558,"../plots/plots":619,"../registry":638,"fast-isnumeric":190,"gl-mat4/fromQuat":200}],538:[function(e,t,n){"use strict";var r=e("./plot_api");n._doPlot=r._doPlot,n.newPlot=r.newPlot,n.restyle=r.restyle,n.relayout=r.relayout,n.redraw=r.redraw,n.update=r.update,n._guiRestyle=r._guiRestyle,n._guiRelayout=r._guiRelayout,n._guiUpdate=r._guiUpdate,n._storeDirectGUIEdit=r._storeDirectGUIEdit,n.react=r.react,n.extendTraces=r.extendTraces,n.prependTraces=r.prependTraces,n.addTraces=r.addTraces,n.deleteTraces=r.deleteTraces,n.moveTraces=r.moveTraces,n.purge=r.purge,n.addFrames=r.addFrames,n.deleteFrames=r.deleteFrames,n.animate=r.animate,n.setPlotConfig=r.setPlotConfig,n.toImage=e("./to_image"),n.validate=e("./validate"),n.downloadImage=e("../snapshot/download");var i=e("./template_api");n.makeTemplate=i.makeTemplate,n.validateTemplate=i.validateTemplate},{"../snapshot/download":640,"./plot_api":540,"./template_api":545,"./to_image":546,"./validate":547}],539:[function(e,t,n){"use strict";var r=e("../lib/is_plain_object"),i=e("../lib/noop"),o=e("../lib/loggers"),a=e("../lib/search").sorterAsc,s=e("../registry");n.containerArrayMatch=e("./container_array_match");var l=n.isAddVal=function(e){return"add"===e||r(e)},c=n.isRemoveVal=function(e){return null===e||"remove"===e};n.applyContainerArrayChanges=function(e,t,n,r,u){var h=t.astr,d=s.getComponentMethod(h,"supplyLayoutDefaults"),f=s.getComponentMethod(h,"draw"),p=s.getComponentMethod(h,"drawOne"),g=r.replot||r.recalc||d===i||f===i,m=e.layout,v=e._fullLayout;if(n[""]){Object.keys(n).length>1&&o.warn("Full array edits are incompatible with other edits",h);var y=n[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return o.warn("Unrecognized full array edit value",h,y),!0;t.set(y)}return!g&&(d(m,v),f(e),!0)}var b,_,x,w,A,k,T,S,E=Object.keys(n).map(Number).sort(a),C=t.get(),M=C||[],O=u(v,h).get(),L=[],D=-1,I=M.length;for(b=0;b<E.length;b++)if(w=n[x=E[b]],A=Object.keys(w),k=w[""],T=l(k),x<0||x>M.length-(T?0:1))o.warn("index out of range",h,x);else if(void 0!==k)A.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",h,x),c(k)?L.push(x):T?("add"===k&&(k={}),M.splice(x,0,k),O&&O.splice(x,0,{})):o.warn("Unrecognized full object edit value",h,x,k),-1===D&&(D=x);else for(_=0;_<A.length;_++)S=h+"["+x+"].",u(M[x],A[_],S).set(w[A[_]]);for(b=L.length-1;b>=0;b--)M.splice(L[b],1),O&&O.splice(L[b],1);if(M.length?C||t.set(M):t.set(null),g)return!1;if(d(m,v),p!==i){var R;if(-1===D)R=E;else{for(I=Math.max(M.length,I),R=[],b=0;b<E.length&&!((x=E[b])>=D);b++)R.push(x);for(b=D;b<I;b++)R.push(b)}for(b=0;b<R.length;b++)p(e,R[b])}else f(e);return!0}},{"../lib/is_plain_object":504,"../lib/loggers":507,"../lib/noop":512,"../lib/search":523,"../registry":638,"./container_array_match":535}],540:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("has-hover"),a=e("../lib"),s=a.nestedProperty,l=e("../lib/events"),c=e("../lib/queue"),u=e("../registry"),h=e("./plot_schema"),d=e("../plots/plots"),f=e("../plots/cartesian/axes"),p=e("../components/drawing"),g=e("../components/color"),m=e("../plots/cartesian/graph_interact").initInteractions,v=e("../constants/xmlns_namespaces"),y=e("../plots/cartesian/select").clearSelect,b=e("./plot_config").dfltConfig,_=e("./manage_arrays"),x=e("./helpers"),w=e("./subroutines"),A=e("./edit_types"),k=e("../plots/cartesian/constants").AX_NAME_PATTERN,T=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){a.error(e)}}function C(e,t){E(e,g.combine(t,"white"))}function M(e,t){if(!e._context){e._context=a.extendDeep({},b);var n=r.select("base");e._context._baseUrl=n.size()&&n.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=e._context;if(t){for(s=Object.keys(t),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in c&&("setBackground"===l&&"opaque"===t[l]?c[l]=C:c[l]=t[l]);t.plot3dPixelRatio&&!c.plotGlPixelRatio&&(c.plotGlPixelRatio=c.plot3dPixelRatio);var u=t.editable;if(void 0!==u)for(c.editable=u,s=Object.keys(c.edits),i=0;i<s.length;i++)c.edits[s[i]]=u;if(t.edits)for(s=Object.keys(t.edits),i=0;i<s.length;i++)(l=s[i])in c.edits&&(c.edits[l]=t.edits[l]);c._exportedPlot=t._exportedPlot}c.staticPlot&&(c.editable=!1,c.edits={},c.autosizable=!1,c.scrollZoom=!1,c.doubleClick=!1,c.showTips=!1,c.showLink=!1,c.displayModeBar=!1),"hover"!==c.displayModeBar||o||(c.displayModeBar=!0),"transparent"!==c.setBackground&&"function"==typeof c.setBackground||(c.setBackground=E),c._hasZeroHeight=c._hasZeroHeight||0===e.clientHeight,c._hasZeroWidth=c._hasZeroWidth||0===e.clientWidth;var h=c.scrollZoom,d=c._scrollZoom={};if(!0===h)d.cartesian=1,d.gl3d=1,d.geo=1,d.mapbox=1;else if("string"==typeof h){var f=h.split("+");for(i=0;i<f.length;i++)d[f[i]]=1}else!1!==h&&(d.gl3d=1,d.geo=1,d.mapbox=1)}function O(e,t){var n,r,i=t+1,o=[];for(n=0;n<e.length;n++)(r=e[n])<0?o.push(i+r):o.push(r);return o}function L(e,t,n){var r,i;for(r=0;r<t.length;r++){if((i=t[r])!==parseInt(i,10))throw new Error("all values in "+n+" must be integers");if(i>=e.data.length||i<-e.data.length)throw new Error(n+" must be valid indices for gd.data.");if(t.indexOf(i,r+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+n+" must be unique.")}}function D(e,t,n){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),L(e,t,"currentIndices"),void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&L(e,n,"newIndices"),void 0!==n&&t.length!==n.length)throw new Error("current and new indices must be of equal length.")}function I(e,t,n,r,o){!function(e,t,n,r){var i=a.isPlainObject(r);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===n)throw new Error("indices must be an integer or array of integers");for(var o in L(e,n,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==n.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in r)||!Array.isArray(r[o])||r[o].length!==t[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,n,r);for(var l=function(e,t,n,r){var o,l,c,u,h,d=a.isPlainObject(r),f=[];for(var p in Array.isArray(n)||(n=[n]),n=O(n,e.data.length-1),t)for(var g=0;g<n.length;g++){if(o=e.data[n[g]],l=(c=s(o,p)).get(),u=t[p][g],!a.isArrayOrTypedArray(u))throw new Error("attribute: "+p+" index: "+g+" must be an array");if(!a.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+p);if(l.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+p);h=d?r[p][g]:r,i(h)||(h=-1),f.push({prop:c,target:l,insert:u,maxp:Math.floor(h)})}return f}(e,t,n,r),c={},u={},h=0;h<l.length;h++){var d=l[h].prop,f=l[h].maxp,p=o(l[h].target,l[h].insert,f);d.set(p[0]),Array.isArray(c[d.astr])||(c[d.astr]=[]),c[d.astr].push(p[1]),Array.isArray(u[d.astr])||(u[d.astr]=[]),u[d.astr].push(l[h].target.length)}return{update:c,maxPoints:u}}function R(e,t){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}function P(e,t,r,i){e=a.getGraphDiv(e),x.clearPromiseQueue(e);var o={};if("string"==typeof t)o[t]=r;else{if(!a.isPlainObject(t))return a.warn("Restyle fail.",t,r,i),Promise.reject();o=a.extendFlat({},t),void 0===i&&(i=r)}Object.keys(o).length&&(e.changed=!0);var s=x.coerceTraceIndices(e,i),l=B(e,o,s),u=l.flags;u.calc&&(e.calcdata=void 0),u.clearAxisTypes&&x.clearAxisTypes(e,s,{});var h=[];u.fullReplot?h.push(n._doPlot):(h.push(d.previousPromises),d.supplyDefaults(e),u.markerSize&&(d.doCalcdata(e),q(h)),u.style&&h.push(w.doTraceStyle),u.colorbars&&h.push(w.doColorBars),h.push(S)),h.push(d.rehover,d.redrag),c.add(e,P,[e,l.undoit,l.traces],P,[e,l.redoit,l.traces]);var f=a.syncOrAsync(h,e);return f&&f.then||(f=Promise.resolve()),f.then((function(){return e.emit("plotly_restyle",l.eventData),e}))}function N(e){return void 0===e?null:e}function z(e,t){return t?function(t,n,r){var i=s(t,n),o=i.set;return i.set=function(t){F((r||"")+n,i.get(),t,e),o(t)},i}:s}function F(e,t,n,r){if(Array.isArray(t)||Array.isArray(n))for(var i=Array.isArray(t)?t:[],o=Array.isArray(n)?n:[],s=Math.max(i.length,o.length),l=0;l<s;l++)F(e+"["+l+"]",i[l],o[l],r);else if(a.isPlainObject(t)||a.isPlainObject(n)){var c=a.isPlainObject(t)?t:{},u=a.isPlainObject(n)?n:{},h=a.extendFlat({},c,u);for(var d in h)F(e+"."+d,c[d],u[d],r)}else void 0===r[e]&&(r[e]=N(t))}function B(e,t,n){var r,i=e._fullLayout,o=e._fullData,l=e.data,c=i._guiEditing,p=z(i._preGUI,c),g=a.extendDeepAll({},t);j(t);var m,v=A.traceFlags(),y={},b={};function _(){return n.map((function(){}))}function w(e){var t=f.id2name(e);-1===m.indexOf(t)&&m.push(t)}function k(e){return"LAYOUT"+e+".autorange"}function T(e){return"LAYOUT"+e+".range"}function S(e){for(var t=e;t<o.length;t++)if(o[t]._input===l[e])return o[t]}function E(r,o,a){if(Array.isArray(r))r.forEach((function(e){E(e,o,a)}));else if(!(r in t)&&!x.hasParent(t,r)){var s;if("LAYOUT"===r.substr(0,6))s=p(e.layout,r.replace("LAYOUT",""));else{var u=n[a];s=z(i._tracePreGUI[S(u)._fullInput.uid],c)(l[u],r)}r in b||(b[r]=_()),void 0===b[r][a]&&(b[r][a]=N(s.get())),void 0!==o&&s.set(o)}}function C(e){return function(t){return o[t][e]}}function M(e){return function(t,r){return!1===t?o[n[r]][e]:null}}for(var O in t){if(x.hasParent(t,O))throw new Error("cannot set "+O+" and a parent attribute simultaneously");var L,D,I,R,P,F,B=t[O];if("autobinx"!==O&&"autobiny"!==O||(O=O.charAt(O.length-1)+"bins",B=Array.isArray(B)?B.map(M(O)):!1===B?n.map(C(O)):null),y[O]=B,"LAYOUT"!==O.substr(0,6)){for(b[O]=_(),r=0;r<n.length;r++)if(L=l[n[r]],D=S(n[r]),R=(I=z(i._tracePreGUI[D._fullInput.uid],c)(L,O)).get(),void 0!==(P=Array.isArray(B)?B[r%B.length]:B)){var U=I.parts[I.parts.length-1],V=O.substr(0,O.length-U.length-1),q=V?V+".":"",H=V?s(D,V).get():D;if((F=h.getTraceValObject(D,I.parts))&&F.impliedEdits&&null!==P)for(var $ in F.impliedEdits)E(a.relativeAttr(O,$),F.impliedEdits[$],r);else if("thicknessmode"!==U&&"lenmode"!==U||R===P||"fraction"!==P&&"pixels"!==P||!H){if("type"===O&&("pie"===P!=("pie"===R)||"funnelarea"===P!=("funnelarea"===R))){var W="x",G="y";"bar"!==P&&"bar"!==R||"h"!==L.orientation||(W="y",G="x"),a.swapAttrs(L,["?","?src"],"labels",W),a.swapAttrs(L,["d?","?0"],"label",W),a.swapAttrs(L,["?","?src"],"values",G),"pie"===R||"funnelarea"===R?(s(L,"marker.color").set(s(L,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):u.traceIs(L,"cartesian")&&s(L,"marker.colors").set(s(L,"marker.color").get())}}else{var Y=i._size,X=H.orient,Z="top"===X||"bottom"===X;if("thicknessmode"===U){var K=Z?Y.h:Y.w;E(q+"thickness",H.thickness*("fraction"===P?1/K:K),r)}else{var J=Z?Y.w:Y.h;E(q+"len",H.len*("fraction"===P?1/J:J),r)}}if(b[O][r]=N(R),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(O)){if("orientation"===O){I.set(P);var Q=L.x&&!L.y?"h":"v";if((I.get()||Q)===D.orientation)continue}else"orientationaxes"===O&&(L.orientation={v:"h",h:"v"}[D.orientation]);x.swapXYData(L),v.calc=v.clearAxisTypes=!0}else-1!==d.dataArrayContainers.indexOf(I.parts[0])?(x.manageArrayContainers(I,P,b),v.calc=!0):(F?F.arrayOk&&!u.traceIs(D,"regl")&&(a.isArrayOrTypedArray(P)||a.isArrayOrTypedArray(R))?v.calc=!0:A.update(v,F):v.calc=!0,I.set(P))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(O)&&f.swap(e,n),"orientationaxes"===O){var ee=s(e.layout,"hovermode"),te=ee.get();"x"===te?ee.set("y"):"y"===te?ee.set("x"):"x unified"===te?ee.set("y unified"):"y unified"===te&&ee.set("x unified")}if(-1!==["orientation","type"].indexOf(O)){for(m=[],r=0;r<n.length;r++){var ne=l[n[r]];u.traceIs(ne,"cartesian")&&(w(ne.xaxis||"x"),w(ne.yaxis||"y"))}E(m.map(k),!0,0),E(m.map(T),[0,1],0)}}else I=p(e.layout,O.replace("LAYOUT","")),b[O]=[N(I.get())],I.set(Array.isArray(B)?B[0]:B),v.calc=!0}return(v.calc||v.plot)&&(v.fullReplot=!0),{flags:v,undoit:b,redoit:y,traces:n,eventData:a.extendDeepNoArrays([],[g,n])}}function j(e){var t,n,r,i=a.counterRegex("axis",".title",!1,!1),o=/colorbar\.title$/,s=Object.keys(e);for(t=0;t<s.length;t++)n=s[t],r=e[n],"title"!==n&&!i.test(n)&&!o.test(n)||"string"!=typeof r&&"number"!=typeof r?n.indexOf("titlefont")>-1&&-1===n.indexOf("grouptitlefont")?l(n,n.replace("titlefont","title.font")):n.indexOf("titleposition")>-1?l(n,n.replace("titleposition","title.position")):n.indexOf("titleside")>-1?l(n,n.replace("titleside","title.side")):n.indexOf("titleoffset")>-1&&l(n,n.replace("titleoffset","title.offset")):l(n,n.replace("title","title.text"));function l(t,n){e[n]=e[t],delete e[t]}}function U(e,t,n){e=a.getGraphDiv(e),x.clearPromiseQueue(e);var r={};if("string"==typeof t)r[t]=n;else{if(!a.isPlainObject(t))return a.warn("Relayout fail.",t,n),Promise.reject();r=a.extendFlat({},t)}Object.keys(r).length&&(e.changed=!0);var i=G(e,r),o=i.flags;o.calc&&(e.calcdata=void 0);var s=[d.previousPromises];o.layoutReplot?s.push(w.layoutReplot):Object.keys(r).length&&(V(e,o,i)||d.supplyDefaults(e),o.legend&&s.push(w.doLegend),o.layoutstyle&&s.push(w.layoutStyles),o.axrange&&q(s,i.rangesAltered),o.ticks&&s.push(w.doTicksRelayout),o.modebar&&s.push(w.doModeBar),o.camera&&s.push(w.doCamera),o.colorbars&&s.push(w.doColorBars),s.push(S)),s.push(d.rehover,d.redrag),c.add(e,U,[e,i.undoit],U,[e,i.redoit]);var l=a.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",i.eventData),e}))}function V(e,t,n){var r=e._fullLayout;if(!t.axrange)return!1;for(var i in t)if("axrange"!==i&&t[i])return!1;for(var o in n.rangesAltered){var a=f.id2name(o),s=e.layout[a],l=r[a];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==o){var u=r[f.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function q(e,t){var n=t?function(e){var n=[],r=!0;for(var i in t){var o=f.getFromId(e,i);if(n.push(i),-1!==(o.ticklabelposition||"").indexOf("inside")&&o._anchorAxis&&n.push(o._anchorAxis._id),o._matchGroup)for(var a in o._matchGroup)t[a]||n.push(a);o.automargin&&(r=!1)}return f.draw(e,n,{skipTitle:r})}:function(e){return f.draw(e,"redraw")};e.push(y,w.doAutoRangeAndConstraints,n,w.drawData,w.finalDraw)}var H=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,$=/^[xyz]axis[0-9]*\.autorange$/,W=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function G(e,t){var n,r,i,o=e.layout,l=e._fullLayout,c=l._guiEditing,d=z(l._preGUI,c),p=Object.keys(t),g=f.list(e),m=a.extendDeepAll({},t),v={};for(j(t),p=Object.keys(t),r=0;r<p.length;r++)if(0===p[r].indexOf("allaxes")){for(i=0;i<g.length;i++){var y=g[i]._id.substr(1),b=-1!==y.indexOf("scene")?y+".":"",w=p[r].replace("allaxes",b+g[i]._name);t[w]||(t[w]=t[p[r]])}delete t[p[r]]}var T=A.layoutFlags(),S={},E={};function C(e,n){if(Array.isArray(e))e.forEach((function(e){C(e,n)}));else if(!(e in t)&&!x.hasParent(t,e)){var r=d(o,e);e in E||(E[e]=N(r.get())),void 0!==n&&r.set(n)}}var M,O={};function L(e){var t=f.name2id(e.split(".")[0]);return O[t]=1,t}for(var D in t){if(x.hasParent(t,D))throw new Error("cannot set "+D+" and a parent attribute simultaneously");for(var I=d(o,D),R=t[D],P=I.parts.length-1;P>0&&"string"!=typeof I.parts[P];)P--;var F=I.parts[P],B=I.parts[P-1]+"."+F,U=I.parts.slice(0,P).join("."),V=s(e.layout,U).get(),q=s(l,U).get(),G=I.get();if(void 0!==R){S[D]=R,E[D]="reverse"===F?R:N(G);var X=h.getLayoutValObject(l,I.parts);if(X&&X.impliedEdits&&null!==R)for(var Z in X.impliedEdits)C(a.relativeAttr(D,Z),X.impliedEdits[Z]);if(-1!==["width","height"].indexOf(D))if(R){C("autosize",null);var K="height"===D?"width":"height";C(K,l[K])}else l[D]=e._initialAutoSize[D];else if("autosize"===D)C("width",R?null:l.width),C("height",R?null:l.height);else if(B.match(H))L(B),s(l,U+"._inputRange").set(null);else if(B.match($)){L(B),s(l,U+"._inputRange").set(null);var J=s(l,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else B.match(W)&&s(l,U+"._inputDomain").set(null);if("type"===F){M=V;var Q="linear"===q.type&&"log"===R,ee="log"===q.type&&"linear"===R;if(Q||ee){if(M&&M.range)if(q.autorange)Q&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var te=M.range[0],ne=M.range[1];Q?(te<=0&&ne<=0&&C(U+".autorange",!0),te<=0?te=ne/1e6:ne<=0&&(ne=te/1e6),C(U+".range[0]",Math.log(te)/Math.LN10),C(U+".range[1]",Math.log(ne)/Math.LN10)):(C(U+".range[0]",Math.pow(10,te)),C(U+".range[1]",Math.pow(10,ne)))}else C(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,q,R,C),u.getComponentMethod("images","convertCoords")(e,q,R,C)}else C(U+".autorange",!0),C(U+".range",null);s(l,U+"._inputRange").set(null)}else if(F.match(k)){var re=s(l,D).get(),ie=(R||{}).type;ie&&"-"!==ie||(ie="linear"),u.getComponentMethod("annotations","convertCoords")(e,re,ie,C),u.getComponentMethod("images","convertCoords")(e,re,ie,C)}var oe=_.containerArrayMatch(D);if(oe){n=oe.array,r=oe.index;var ae=oe.property,se=X||{editType:"calc"};""!==r&&""===ae&&(_.isAddVal(R)?E[D]=null:_.isRemoveVal(R)?E[D]=(s(o,n).get()||[])[r]:a.warn("unrecognized full object value",t)),A.update(T,se),v[n]||(v[n]={});var le=v[n][r];le||(le=v[n][r]={}),le[ae]=R,delete t[D]}else"reverse"===F?(V.range?V.range.reverse():(C(U+".autorange",!0),V.range=[1,0]),q.autorange?T.calc=!0:T.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===D&&("lasso"===R||"select"===R)&&"lasso"!==G&&"select"!==G||l._has("gl2d")?T.plot=!0:X?A.update(T,X):T.calc=!0,I.set(R))}}for(n in v)_.applyContainerArrayChanges(e,d(o,n),v[n],T,d)||(T.plot=!0);for(var ce in O){var ue=(M=f.getFromId(e,ce))&&M._constraintGroup;if(ue)for(var he in T.calc=!0,ue)O[he]||(f.getFromId(e,he)._constraintShrinkable=!0)}return(Y(e)||t.height||t.width)&&(T.plot=!0),(T.plot||T.calc)&&(T.layoutReplot=!0),{flags:T,rangesAltered:O,undoit:E,redoit:S,eventData:m}}function Y(e){var t=e._fullLayout,n=t.width,r=t.height;return e.layout.autosize&&d.plotAutoSize(e,e.layout,t),t.width!==n||t.height!==r}function X(e,t,r,i){e=a.getGraphDiv(e),x.clearPromiseQueue(e),a.isPlainObject(t)||(t={}),a.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var o=x.coerceTraceIndices(e,i),s=B(e,a.extendFlat({},t),o),l=s.flags,u=G(e,a.extendFlat({},r)),h=u.flags;(l.calc||h.calc)&&(e.calcdata=void 0),l.clearAxisTypes&&x.clearAxisTypes(e,o,r);var f=[];h.layoutReplot?f.push(w.layoutReplot):l.fullReplot?f.push(n._doPlot):(f.push(d.previousPromises),V(e,h,u)||d.supplyDefaults(e),l.style&&f.push(w.doTraceStyle),(l.colorbars||h.colorbars)&&f.push(w.doColorBars),h.legend&&f.push(w.doLegend),h.layoutstyle&&f.push(w.layoutStyles),h.axrange&&q(f,u.rangesAltered),h.ticks&&f.push(w.doTicksRelayout),h.modebar&&f.push(w.doModeBar),h.camera&&f.push(w.doCamera),f.push(S)),f.push(d.rehover,d.redrag),c.add(e,X,[e,s.undoit,u.undoit,s.traces],X,[e,s.redoit,u.redoit,s.traces]);var p=a.syncOrAsync(f,e);return p&&p.then||(p=Promise.resolve(e)),p.then((function(){return e.emit("plotly_update",{data:s.eventData,layout:u.eventData}),e}))}function Z(e){return function(t){t._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,n}}var K=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],J=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e.match(r.pattern);if(i){var o=i[1]||"";return{head:o,tail:e.substr(o.length+1),attr:r.attr}}}}function ee(e,t){var n=s(t,e).get();if(void 0!==n)return n;var r=e.split(".");for(r.pop();r.length>1;)if(r.pop(),void 0!==(n=s(t,r.join(".")+".uirevision").get()))return n;return t.uirevision}function te(e,t){for(var n=0;n<t.length;n++)if(t[n]._fullInput.uid===e)return n;return-1}function ne(e,t,n){for(var r=0;r<t.length;r++)if(t[r].uid===e)return r;return!t[n]||t[n].uid?-1:n}function re(e,t){var n=a.isPlainObject(e),r=Array.isArray(e);return n||r?(n&&a.isPlainObject(t)||r&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ie(e,t,n,r){var i,o,l,c=r.getValObject,u=r.flags,h=r.immutable,d=r.inArray,f=r.arrayIndex;function p(){var e=i.editType;d&&-1!==e.indexOf("arraydraw")?a.pushUnique(u.arrays[d],f):(A.update(u,i),"none"!==e&&u.nChanges++,r.transition&&i.anim&&u.nChangesAnim++,(H.test(l)||$.test(l))&&(u.rangesAltered[n[0]]=1),W.test(l)&&s(t,"_inputDomain").set(null),"datarevision"===o&&(u.newDataRevision=1))}function g(e){return"data_array"===e.valType||e.arrayOk}for(o in e){if(u.calc&&!r.transition)return;var m=e[o],v=t[o],y=n.concat(o);if(l=y.join("."),"_"!==o.charAt(0)&&"function"!=typeof m&&m!==v){if(("tick0"===o||"dtick"===o)&&"geo"!==n[0]){var b=t.tickmode;if("auto"===b||"array"===b||!b)continue}if(("range"!==o||!t.autorange)&&("zmin"!==o&&"zmax"!==o||"contourcarpet"!==t.type)&&(i=c(y))&&(!i._compareAsJSON||JSON.stringify(m)!==JSON.stringify(v))){var _,x=i.valType,w=g(i),k=Array.isArray(m),T=Array.isArray(v);if(k&&T){var S="_input_"+o,E=e[S],C=t[S];if(Array.isArray(E)&&E===C)continue}if(void 0===v)w&&k?u.calc=!0:p();else if(i._isLinkedToArray){var M=[],O=!1;d||(u.arrays[o]=M);var L=Math.min(m.length,v.length),D=Math.max(m.length,v.length);if(L!==D){if("arraydraw"!==i.editType){p();continue}O=!0}for(_=0;_<L;_++)ie(m[_],v[_],y.concat(_),a.extendFlat({inArray:o,arrayIndex:_},r));if(O)for(_=L;_<D;_++)M.push(_)}else!x&&a.isPlainObject(m)?ie(m,v,y,r):w?k&&T?(h&&(u.calc=!0),(h||r.newDataRevision)&&p()):k!==T?u.calc=!0:p():k&&T&&m.length===v.length&&String(m)===String(v)||p()}}}for(o in t)if(!(o in e)&&"_"!==o.charAt(0)&&"function"!=typeof t[o]){if(g(i=c(n.concat(o)))&&Array.isArray(t[o]))return void(u.calc=!0);p()}}function oe(e,t){var n;for(n in e)if("_"!==n.charAt(0)){var r=e[n],i=t[n];if(r!==i)if(a.isPlainObject(r)&&a.isPlainObject(i)){if(oe(r,i))return!0}else{if(!Array.isArray(r)||!Array.isArray(i))return!0;if(r.length!==i.length)return!0;for(var o=0;o<r.length;o++)if(r[o]!==i[o]){if(!a.isPlainObject(r[o])||!a.isPlainObject(i[o]))return!0;if(oe(r[o],i[o]))return!0}}}}function ae(e){var t=e._fullLayout,n=e.getBoundingClientRect();if(!a.equalDomRects(n,t._lastBBox)){var r=t._invTransform=a.inverseTransformMatrix(a.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(r[0][0]*r[0][0]+r[0][1]*r[0][1]+r[0][2]*r[0][2]),t._invScaleY=Math.sqrt(r[1][0]*r[1][0]+r[1][1]*r[1][1]+r[1][2]*r[1][2]),t._lastBBox=n}}n.animate=function(e,t,n){if(e=a.getGraphDiv(e),!a.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see path_to_url");var r=e._transitionData;r._frameQueue||(r._frameQueue=[]);var i=(n=d.supplyAnimationDefaults(n)).transition,o=n.frame;function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function l(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var n=0;return function(){if(e&&++n===t)return e()}}return void 0===r._frameWaitingCnt&&(r._frameWaitingCnt=0),new Promise((function(o,u){function h(){r._currentFrame&&r._currentFrame.onComplete&&r._currentFrame.onComplete();var t=r._currentFrame=r._frameQueue.shift();if(t){var n=t.name?t.name.toString():null;e._fullLayout._currentFrame=n,r._lastFrameAt=Date.now(),r._timeToNext=t.frameOpts.duration,d.transition(e,t.frame.data,t.frame.layout,x.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:n,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(r._animationRaf),r._animationRaf=null}function f(){e.emit("plotly_animating"),r._lastFrameAt=-1/0,r._timeToNext=0,r._runningTransitions=0,r._currentFrame=null;var t=function(){r._animationRaf=window.requestAnimationFrame(t),Date.now()-r._lastFrameAt>r._timeToNext&&h()};t()}var p,g,m=0;function v(e){return Array.isArray(i)?m>=i.length?e.transitionOpts=i[m]:e.transitionOpts=i[0]:e.transitionOpts=i,m++,e}var y=[],b=null==t,_=Array.isArray(t);if(b||_||!a.isPlainObject(t)){if(b||-1!==["string","number"].indexOf(typeof t))for(p=0;p<r._frames.length;p++)(g=r._frames[p])&&(b||String(g.group)===String(t))&&y.push({type:"byname",name:String(g.name),data:v({name:g.name})});else if(_)for(p=0;p<t.length;p++){var w=t[p];-1!==["number","string"].indexOf(typeof w)?(w=String(w),y.push({type:"byname",name:w,data:v({name:w})})):a.isPlainObject(w)&&y.push({type:"object",data:v(a.extendFlat({},w))})}}else y.push({type:"object",data:v(a.extendFlat({},t))});for(p=0;p<y.length;p++)if("byname"===(g=y[p]).type&&!r._frameHash[g.data.name])return a.warn('animate failure: frame not found: "'+g.data.name+'"'),void u();-1!==["next","immediate"].indexOf(n.mode)&&function(){if(0!==r._frameQueue.length){for(;r._frameQueue.length;){var t=r._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}(),"reverse"===n.direction&&y.reverse();var A=e._fullLayout._currentFrame;if(A&&n.fromcurrent){var k=-1;for(p=0;p<y.length;p++)if("byname"===(g=y[p]).type&&g.name===A){k=p;break}if(k>0&&k<y.length-1){var T=[];for(p=0;p<y.length;p++)g=y[p],("byname"!==y[p].type||p>k)&&T.push(g);y=T}}y.length>0?function(t){if(0!==t.length){for(var i=0;i<t.length;i++){var a;a="byname"===t[i].type?d.computeFrame(e,t[i].name):t[i].data;var h=l(i),p=s(i);p.duration=Math.min(p.duration,h.duration);var g={frame:a,name:t[i].name,frameOpts:h,transitionOpts:p};i===t.length-1&&(g.onComplete=c(o,2),g.onInterrupt=u),r._frameQueue.push(g)}"immediate"===n.mode&&(r._lastFrameAt=-1/0),r._animationRaf||f()}}(y):(e.emit("plotly_animated"),o())}))},n.addFrames=function(e,t,n){if(e=a.getGraphDiv(e),null==t)return Promise.resolve();if(!a.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see path_to_url");var r,i,o,s,l=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var h=l.length+2*t.length,f=[],p={};for(r=t.length-1;r>=0;r--)if(a.isPlainObject(t[r])){var g=t[r].name,m=(u[g]||p[g]||{}).name,v=t[r].name,y=u[m]||p[m];m&&v&&"number"==typeof v&&y&&T<5&&(T++,a.warn('addFrames: overwriting frame "'+(u[m]||p[m]).name+'" with a frame whose name of type "number" also equates to "'+m+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===T&&a.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[g]={name:g},f.push({frame:d.supplyFrameDefaults(t[r]),index:n&&void 0!==n[r]&&null!==n[r]?n[r]:h+r})}f.sort((function(e,t){return e.index>t.index?-1:e.index<t.index?1:0}));var b=[],_=[],x=l.length;for(r=f.length-1;r>=0;r--){if("number"==typeof(i=f[r].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[i.name]){for(o=0;o<l.length&&(l[o]||{}).name!==i.name;o++);b.push({type:"replace",index:o,value:i}),_.unshift({type:"replace",index:o,value:l[o]})}else s=Math.max(0,Math.min(f[r].index,x)),b.push({type:"insert",index:s,value:i}),_.unshift({type:"delete",index:s}),x++}var w=d.modifyFrames,A=d.modifyFrames,k=[e,_],S=[e,b];return c&&c.add(e,w,k,A,S),d.modifyFrames(e,b)},n.deleteFrames=function(e,t){if(e=a.getGraphDiv(e),!a.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var n,r,i=e._transitionData._frames,o=[],s=[];if(!t)for(t=[],n=0;n<i.length;n++)t.push(n);for((t=t.slice()).sort(),n=t.length-1;n>=0;n--)r=t[n],o.push({type:"delete",index:r}),s.unshift({type:"insert",index:r,value:i[r]});var l=d.modifyFrames,u=d.modifyFrames,h=[e,s],f=[e,o];return c&&c.add(e,l,h,u,f),d.modifyFrames(e,o)},n.addTraces=function e(t,r,i){t=a.getGraphDiv(t);var o,s,l=[],u=n.deleteTraces,h=e,d=[t,l],f=[t,r];for(function(e,t,n){var r,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),r=0;r<t.length;r++)if("object"!=typeof(i=t[r])||Array.isArray(i)||null===i)throw new Error("all values in traces array must be non-array objects");if(void 0===n||Array.isArray(n)||(n=[n]),void 0!==n&&n.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(t,r,i),Array.isArray(r)||(r=[r]),r=r.map((function(e){return a.extendFlat({},e)})),x.cleanData(r),o=0;o<r.length;o++)t.data.push(r[o]);for(o=0;o<r.length;o++)l.push(-r.length+o);if(void 0===i)return s=n.redraw(t),c.add(t,u,d,h,f),s;Array.isArray(i)||(i=[i]);try{D(t,l,i)}catch(e){throw t.data.splice(t.data.length-r.length,r.length),e}return c.startSequence(t),c.add(t,u,d,h,f),s=n.moveTraces(t,l,i),c.stopSequence(t),s},n.deleteTraces=function e(t,r){t=a.getGraphDiv(t);var i,o,s=[],l=n.addTraces,u=e,h=[t,s,r],d=[t,r];if(void 0===r)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(r)||(r=[r]),L(t,r,"indices"),(r=O(r,t.data.length-1)).sort(a.sorterDes),i=0;i<r.length;i+=1)o=t.data.splice(r[i],1)[0],s.push(o);var f=n.redraw(t);return c.add(t,l,h,u,d),f},n.extendTraces=function e(t,r,i,o){function s(e,t,n){var r,i;if(a.isTypedArray(e))if(n<0){var o=new e.constructor(0),s=R(e,t);n<0?(r=s,i=o):(r=o,i=s)}else if(r=new e.constructor(n),i=new e.constructor(e.length+t.length-n),n===t.length)r.set(t),i.set(e);else if(n<t.length){var l=t.length-n;r.set(t.subarray(l)),i.set(e),i.set(t.subarray(0,l),e.length)}else{var c=n-t.length,u=e.length-c;r.set(e.subarray(u)),r.set(t,c),i.set(e.subarray(0,u))}else r=e.concat(t),i=n>=0&&n<r.length?r.splice(0,r.length-n):[];return[r,i]}var l=I(t=a.getGraphDiv(t),r,i,o,s),u=n.redraw(t),h=[t,l.update,i,l.maxPoints];return c.add(t,n.prependTraces,h,e,arguments),u},n.moveTraces=function e(t,r,i){var o,s=[],l=[],u=e,h=e,d=[t=a.getGraphDiv(t),i,r],f=[t,r,i];if(D(t,r,i),r=Array.isArray(r)?r:[r],void 0===i)for(i=[],o=0;o<r.length;o++)i.push(-r.length+o);for(i=Array.isArray(i)?i:[i],r=O(r,t.data.length-1),i=O(i,t.data.length-1),o=0;o<t.data.length;o++)-1===r.indexOf(o)&&s.push(t.data[o]);for(o=0;o<r.length;o++)l.push({newIndex:i[o],trace:t.data[r[o]]});for(l.sort((function(e,t){return e.newIndex-t.newIndex})),o=0;o<l.length;o+=1)s.splice(l[o].newIndex,0,l[o].trace);t.data=s;var p=n.redraw(t);return c.add(t,u,d,h,f),p},n.prependTraces=function e(t,r,i,o){function s(e,t,n){var r,i;if(a.isTypedArray(e))if(n<=0){var o=new e.constructor(0),s=R(t,e);n<0?(r=s,i=o):(r=o,i=s)}else if(r=new e.constructor(n),i=new e.constructor(e.length+t.length-n),n===t.length)r.set(t),i.set(e);else if(n<t.length){var l=t.length-n;r.set(t.subarray(0,l)),i.set(t.subarray(l)),i.set(e,l)}else{var c=n-t.length;r.set(t),r.set(e.subarray(0,c),t.length),i.set(e.subarray(c))}else r=t.concat(e),i=n>=0&&n<r.length?r.splice(n,r.length):[];return[r,i]}var l=I(t=a.getGraphDiv(t),r,i,o,s),u=n.redraw(t),h=[t,l.update,i,l.maxPoints];return c.add(t,n.extendTraces,h,e,arguments),u},n.newPlot=function(e,t,r,i){return e=a.getGraphDiv(e),d.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),d.purge(e),n._doPlot(e,t,r,i)},n._doPlot=function(e,t,i,o){var s;if(e=a.getGraphDiv(e),l.init(e),a.isPlainObject(t)){var c=t;t=c.data,i=c.layout,o=c.config,s=c.frames}if(!1===l.triggerHandler(e,"plotly_beforeplot",[t,i,o]))return Promise.reject();t||i||a.isPlotDiv(e)||a.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e),M(e,o),i||(i={}),r.select(e).classed("js-plotly-plot",!0),p.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var h=0===(e.data||[]).length&&Array.isArray(t);Array.isArray(t)&&(x.cleanData(t),h?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),e.layout&&!h||(e.layout=x.cleanLayout(i)),d.supplyDefaults(e);var g=e._fullLayout,y=g._has("cartesian");g._replotting=!0,(h||g._shouldCreateBgLayer)&&(function(e){var t=r.select(e),n=e._fullLayout;if(n._calcInverseTransform=ae,n._calcInverseTransform(e),n._container=t.selectAll(".plot-container").data([0]),n._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),n._paperdiv=n._container.selectAll(".svg-container").data([0]),n._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),n._glcontainer=n._paperdiv.selectAll(".gl-container").data([{}]),n._glcontainer.enter().append("div").classed("gl-container",!0),n._paperdiv.selectAll(".main-svg").remove(),n._paperdiv.select(".modebar-container").remove(),n._paper=n._paperdiv.insert("svg",":first-child").classed("main-svg",!0),n._toppaper=n._paperdiv.append("svg").classed("main-svg",!0),n._modebardiv=n._paperdiv.append("div"),delete n._modeBar,n._hoverpaper=n._paperdiv.append("svg").classed("main-svg",!0),!n._uid){var i={};r.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),n._uid=a.randstr(i)}n._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),n._defs=n._paper.append("defs").attr("id","defs-"+n._uid),n._clips=n._defs.append("g").classed("clips",!0),n._topdefs=n._toppaper.append("defs").attr("id","topdefs-"+n._uid),n._topclips=n._topdefs.append("g").classed("clips",!0),n._bgLayer=n._paper.append("g").classed("bglayer",!0),n._draggers=n._paper.append("g").classed("draglayer",!0);var o=n._paper.append("g").classed("layer-below",!0);n._imageLowerLayer=o.append("g").classed("imagelayer",!0),n._shapeLowerLayer=o.append("g").classed("shapelayer",!0),n._cartesianlayer=n._paper.append("g").classed("cartesianlayer",!0),n._polarlayer=n._paper.append("g").classed("polarlayer",!0),n._smithlayer=n._paper.append("g").classed("smithlayer",!0),n._ternarylayer=n._paper.append("g").classed("ternarylayer",!0),n._geolayer=n._paper.append("g").classed("geolayer",!0),n._funnelarealayer=n._paper.append("g").classed("funnelarealayer",!0),n._pielayer=n._paper.append("g").classed("pielayer",!0),n._iciclelayer=n._paper.append("g").classed("iciclelayer",!0),n._treemaplayer=n._paper.append("g").classed("treemaplayer",!0),n._sunburstlayer=n._paper.append("g").classed("sunburstlayer",!0),n._indicatorlayer=n._toppaper.append("g").classed("indicatorlayer",!0),n._glimages=n._paper.append("g").classed("glimages",!0);var s=n._toppaper.append("g").classed("layer-above",!0);n._imageUpperLayer=s.append("g").classed("imagelayer",!0),n._shapeUpperLayer=s.append("g").classed("shapelayer",!0),n._infolayer=n._toppaper.append("g").classed("infolayer",!0),n._menulayer=n._toppaper.append("g").classed("menulayer",!0),n._zoomlayer=n._toppaper.append("g").classed("zoomlayer",!0),n._hoverlayer=n._hoverpaper.append("g").classed("hoverlayer",!0),n._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}(e),g._shouldCreateBgLayer&&delete g._shouldCreateBgLayer),p.initGradients(e),p.initPatterns(e),h&&f.saveShowSpikeInitial(e);var b=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;b&&d.doCalcdata(e);for(var _=0;_<e.calcdata.length;_++)e.calcdata[_][0].trace=e._fullData[_];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){a.isHidden(e)||d.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):a.clearResponsive(e);var A=a.extendFlat({},g._size),k=0;function T(){if(d.clearAutoMarginIds(e),w.drawMarginPushers(e),f.allowAutoMargin(e),g._has("pie"))for(var t=e._fullData,n=0;n<t.length;n++){var r=t[n];"pie"===r.type&&r.automargin&&d.allowAutoMargin(e,"pie."+r.uid+".automargin")}return d.doAutoMargin(e),d.previousPromises(e)}function E(){e._transitioning||(w.doAutoRangeAndConstraints(e),h&&f.saveRangeInitial(e),u.getComponentMethod("rangeslider","calcAutorange")(e))}var C=[d.previousPromises,function(){if(s)return n.addFrames(e,s)},function t(){for(var n=g._basePlotModules,r=0;r<n.length;r++)n[r].drawFramework&&n[r].drawFramework(e);!g._glcanvas&&g._has("gl")&&(g._glcanvas=g._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(e){return e.key})),g._glcanvas.enter().append("canvas").attr("class",(function(e){return"gl-canvas gl-canvas-"+e.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var i=e._context.plotGlPixelRatio;if(g._glcanvas){g._glcanvas.attr("width",g.width*i).attr("height",g.height*i).style("width",g.width+"px").style("height",g.height+"px");var o=g._glcanvas.data()[0].regl;if(o&&(Math.floor(g.width*i)!==o._gl.drawingBufferWidth||Math.floor(g.height*i)!==o._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!k)return a.log(s+" Clearing graph and plotting again."),d.cleanPlot([],{},e._fullData,g),d.supplyDefaults(e),g=e._fullLayout,d.doCalcdata(e),k++,t();a.error(s)}}return"h"===g.modebar.orientation?g._modebardiv.style("height",null).style("width","100%"):g._modebardiv.style("width",null).style("height",g.height+"px"),d.previousPromises(e)},T,function(){if(d.didMarginChange(A,g._size))return a.syncOrAsync([T,w.layoutStyles],e)}];y&&C.push((function(){if(b)return a.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),E],e);E()})),C.push(w.layoutStyles),y&&C.push((function(){return f.draw(e,h?"":"redraw")}),(function(e){e._fullLayout._insideTickLabelsAutorange&&U(e,e._fullLayout._insideTickLabelsAutorange).then((function(){e._fullLayout._insideTickLabelsAutorange=void 0}))})),C.push(w.drawData,w.finalDraw,m,d.addLinks,d.rehover,d.redrag,d.doAutoMargin,(function(e){e._fullLayout._insideTickLabelsAutorange&&h&&f.saveRangeInitial(e,!0)}),d.previousPromises);var O=a.syncOrAsync(C,e);return O&&O.then||(O=Promise.resolve()),O.then((function(){return S(e),e}))},n.purge=function(e){var t=(e=a.getGraphDiv(e))._fullLayout||{},n=e._fullData||[];return d.cleanPlot([],{},n,t),d.purge(e),l.purge(e),t._container&&t._container.remove(),delete e._context,e},n.react=function(e,t,r,i){var o,l;e=a.getGraphDiv(e),x.clearPromiseQueue(e);var c=e._fullData,f=e._fullLayout;if(a.isPlotDiv(e)&&c&&f){if(a.isPlainObject(t)){var p=t;t=p.data,r=p.layout,i=p.config,o=p.frames}var g=!1;if(i){var m=a.extendDeep({},e._context);e._context=void 0,M(e,i),g=oe(m,e._context)}e.data=t||[],x.cleanData(e.data),e.layout=r||{},x.cleanLayout(e.layout),function(e,t,n,r){var i,o,l,c,u,h,d,f,p,g,m=r._preGUI,v=[],y={},b={};for(i in m){if(u=Q(i,K)){if(p=u.head,g=u.tail,o=u.attr||p+".uirevision",(c=(l=s(r,o).get())&&ee(o,t))&&c===l){if(null===(h=m[i])&&(h=void 0),re(f=(d=s(t,i)).get(),h)){void 0===f&&"autorange"===g&&v.push(p),d.set(N(s(r,i).get()));continue}if("autorange"===g||"range["===g.substr(0,6)){var _=m[p+".range[0]"],x=m[p+".range[1]"],w=m[p+".autorange"];if(w||null===w&&null===_&&null===x){if(!(p in y)){var A=s(t,p).get();y[p]=A&&(A.autorange||!1!==A.autorange&&(!A.range||2!==A.range.length))}if(y[p]){d.set(N(s(r,i).get()));continue}}}}}else a.warn("unrecognized GUI edit: "+i);delete m[i],u&&"range["===u.tail.substr(0,6)&&(b[u.head]=1)}for(var k=0;k<v.length;k++){var T=v[k];if(b[T]){var S=s(t,T).get();S&&delete S.autorange}}var E=r._tracePreGUI;for(var C in E){var M,O=E[C],L=null;for(i in O){if(!L){var D=te(C,n);if(D<0){delete E[C];break}var I=ne(C,e,(M=n[D]._fullInput).index);if(I<0){delete E[C];break}L=e[I]}if(u=Q(i,J)){if(u.attr?c=(l=s(r,u.attr).get())&&ee(u.attr,t):(l=M.uirevision,void 0===(c=L.uirevision)&&(c=t.uirevision)),c&&c===l&&(null===(h=O[i])&&(h=void 0),re(f=(d=s(L,i)).get(),h))){d.set(N(s(M,i).get()));continue}}else a.warn("unrecognized GUI edit: "+i+" in trace uid "+C);delete O[i]}}}(e.data,e.layout,c,f),d.supplyDefaults(e,{skipUpdateCalc:!0});var v=e._fullData,y=e._fullLayout,b=void 0===y.datarevision,_=y.transition,k=function(e,t,n,r,i){var o=A.layoutFlags();function a(e){return h.getLayoutValObject(n,e)}return o.arrays={},o.rangesAltered={},o.nChanges=0,o.nChangesAnim=0,ie(t,n,[],{getValObject:a,flags:o,immutable:r,transition:i,gd:e}),(o.plot||o.calc)&&(o.layoutReplot=!0),i&&o.nChanges&&o.nChangesAnim&&(o.anim=o.nChanges===o.nChangesAnim?"all":"some"),o}(e,f,y,b,_),T=k.newDataRevision,E=function(e,t,n,r,i,o){var a=t.length===n.length;if(!i&&!a)return{fullReplot:!0,calc:!0};var s,l,c=A.traceFlags();function u(e){var t=h.getTraceValObject(l,e);return!l._module.animatable&&t.anim&&(t.anim=!1),t}c.arrays={},c.nChanges=0,c.nChangesAnim=0;var f={getValObject:u,flags:c,immutable:r,transition:i,newDataRevision:o,gd:e},p={};for(s=0;s<t.length;s++)if(n[s]){if(l=n[s]._fullInput,d.hasMakesDataTransform(l)&&(l=n[s]),p[l.uid])continue;p[l.uid]=1,ie(t[s]._fullInput,l,[],f)}return(c.calc||c.plot)&&(c.fullReplot=!0),i&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&a?"all":"some"),c}(e,c,v,b,_,T);if(Y(e)&&(k.layoutReplot=!0),E.calc||k.calc){e.calcdata=void 0;for(var C=Object.getOwnPropertyNames(y),O=0;O<C.length;O++){var L=C[O],D=L.substring(0,5);if("xaxis"===D||"yaxis"===D){var I=y[L]._emptyCategories;I&&I()}}}else d.supplyDefaultsUpdateCalc(e.calcdata,v);var R=[];if(o&&(e._transitionData={},d.createTransitionData(e),R.push((function(){return n.addFrames(e,o)}))),y.transition&&!g&&(E.anim||k.anim))k.ticks&&R.push(w.doTicksRelayout),d.doCalcdata(e),w.doAutoRangeAndConstraints(e),R.push((function(){return d.transitionFromReact(e,E,k,f)}));else if(E.fullReplot||k.layoutReplot||g)e._fullLayout._skipDefaults=!0,R.push(n._doPlot);else{for(var P in k.arrays){var z=k.arrays[P];if(z.length){var F=u.getComponentMethod(P,"drawOne");if(F!==a.noop)for(var B=0;B<z.length;B++)F(e,z[B]);else{var j=u.getComponentMethod(P,"draw");if(j===a.noop)throw new Error("cannot draw components: "+P);j(e)}}}R.push(d.previousPromises),E.style&&R.push(w.doTraceStyle),(E.colorbars||k.colorbars)&&R.push(w.doColorBars),k.legend&&R.push(w.doLegend),k.layoutstyle&&R.push(w.layoutStyles),k.axrange&&q(R),k.ticks&&R.push(w.doTicksRelayout),k.modebar&&R.push(w.doModeBar),k.camera&&R.push(w.doCamera),R.push(S)}R.push(d.rehover,d.redrag),(l=a.syncOrAsync(R,e))&&l.then||(l=Promise.resolve(e))}else l=n.newPlot(e,t,r,i);return l.then((function(){return e.emit("plotly_react",{data:t,layout:r}),e}))},n.redraw=function(e){if(e=a.getGraphDiv(e),!a.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return x.cleanData(e.data),x.cleanLayout(e.layout),e.calcdata=void 0,n._doPlot(e).then((function(){return e.emit("plotly_redraw"),e}))},n.relayout=U,n.restyle=P,n.setPlotConfig=function(e){return a.extendFlat(b,e)},n.update=X,n._guiRelayout=Z(U),n._guiRestyle=Z(P),n._guiUpdate=Z(X),n._storeDirectGUIEdit=function(e,t,n){for(var r in n)F(r,s(e,r).get(),n[r],t)}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"../lib/events":492,"../lib/queue":519,"../plots/cartesian/axes":554,"../plots/cartesian/constants":561,"../plots/cartesian/graph_interact":564,"../plots/cartesian/select":575,"../plots/plots":619,"../registry":638,"./edit_types":536,"./helpers":537,"./manage_arrays":539,"./plot_config":541,"./plot_schema":542,"./subroutines":544,"@plotly/d3":58,"fast-isnumeric":190,"has-hover":228}],541:[function(e,t,n){"use strict";var r={staticPlot:{valType:"boolean",dflt:!1},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"path_to_url"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},i={};(function e(t,n){for(var r in t){var i=t[r];i.valType?n[r]=i.dflt:(n[r]||(n[r]={}),e(i,n[r]))}})(r,i),t.exports={configAttributes:r,dfltConfig:i}},{}],542:[function(e,t,n){"use strict";var r=e("../registry"),i=e("../lib"),o=e("../plots/attributes"),a=e("../plots/layout_attributes"),s=e("../plots/frame_attributes"),l=e("../plots/animation_attributes"),c=e("./plot_config").configAttributes,u=e("./edit_types"),h=i.extendDeepAll,d=i.isPlainObject,f=i.isArrayOrTypedArray,p=i.nestedProperty,g=i.valObjectMeta,m="_isSubplotObj",v="_isLinkedToArray",y="_deprecated",b=[m,v,"_arrayAttrRegexps",y];function _(e,t,n){if(!e)return!1;if(e._isLinkedToArray)if(x(t[n]))n++;else if(n<t.length)return!1;for(;n<t.length;n++){var r=e[t[n]];if(!d(r))break;if(e=r,n===t.length-1)break;if(e._isLinkedToArray){if(!x(t[++n]))return!1}else if("info_array"===e.valType){var i=t[++n];if(!x(i))return!1;var o=e.items;if(Array.isArray(o)){if(i>=o.length)return!1;if(2===e.dimensions){if(n++,t.length===n)return e;var a=t[n];if(!x(a))return!1;e=o[i][a]}else e=o[i]}else e=o}}return e}function x(e){return e===Math.round(e)&&e>=0}function w(){var e,t,n={};for(e in h(n,a),r.subplotsRegistry)if((t=r.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i<t.attr.length;i++)k(n,t,t.attr[i]);else k(n,t,"subplot"===t.attr?t.name:t.attr);for(e in r.componentsRegistry){var o=(t=r.componentsRegistry[e]).schema;if(o&&(o.subplots||o.layout)){var s=o.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete n.yaxis[l]}else"colorscale"===t.name?h(n,t.layoutAttributes):t.layoutAttributes&&T(n,t.layoutAttributes,t.name)}return{layoutAttributes:A(n)}}function A(e){return function(e){function t(e){return{valType:"string",editType:"none"}}function r(e,r,i){n.isValObject(e)?!0!==e.arrayOk&&"data_array"!==e.valType||(i[r+"src"]=t(r)):d(e)&&(e.role="object")}n.crawl(e,r)}(e),function(e){function t(e,t,n){if(e){var r=e._isLinkedToArray;r&&(delete e._isLinkedToArray,n[t]={items:{}},n[t].items[r]=e,n[t].role="object")}}n.crawl(e,t)}(e),function(e){function t(e){for(var n in e)if(d(e[n]))t(e[n]);else if(Array.isArray(e[n]))for(var r=0;r<e[n].length;r++)t(e[n][r]);else e[n]instanceof RegExp&&(e[n]=e[n].toString())}t(e)}(e),e}function k(e,t,n){var r=p(e,n),i=h({},t.layoutAttributes);i._isSubplotObj=!0,r.set(i)}function T(e,t,n){var r=p(e,n);r.set(h(r.get()||{},t))}n.IS_SUBPLOT_OBJ=m,n.IS_LINKED_TO_ARRAY=v,n.DEPRECATED=y,n.UNDERSCORE_ATTRS=b,n.get=function(){var e={};r.allTypes.forEach((function(t){e[t]=function(e){var t,i;i=(t=r.modules[e]._module).basePlotModule;var a={type:null},s=h({},o),l=h({},t.attributes);n.crawl(l,(function(e,t,n,r,i){p(s,i).set(void 0),void 0===e&&p(l,i).set(void 0)})),h(a,s),r.traceIs(e,"noOpacity")&&delete a.opacity,r.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),r.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),t.selectPoints||delete a.selectedpoints,h(a,l),i.attributes&&h(a,i.attributes),a.type=e;var c={meta:t.meta||{},categories:t.categories||{},animatable:Boolean(t.animatable),type:e,attributes:A(a)};if(t.layoutAttributes){var u={};h(u,t.layoutAttributes),c.layoutAttributes=A(u)}return t.animatable||n.crawl(c,(function(e){n.isValObject(e)&&"anim"in e&&delete e.anim})),c}(t)}));var t,i={};return Object.keys(r.transformsRegistry).forEach((function(e){i[e]=function(e){var t=r.transformsRegistry[e],n=h({},t.attributes);return Object.keys(r.componentsRegistry).forEach((function(t){var i=r.componentsRegistry[t];i.schema&&i.schema.transforms&&i.schema.transforms[e]&&Object.keys(i.schema.transforms[e]).forEach((function(t){T(n,i.schema.transforms[e][t],t)}))})),{attributes:A(n)}}(e)})),{defs:{valObjects:g,metaKeys:b.concat(["description","role","editType","impliedEdits"]),editType:{traces:u.traces,layout:u.layout},impliedEdits:{}},traces:e,layout:w(),transforms:i,frames:(t={frames:h({},s)},A(t),t.frames),animation:A(l),config:A(c)}},n.crawl=function(e,t,r,i){var o=r||0;i=i||"",Object.keys(e).forEach((function(r){var a=e[r];if(-1===b.indexOf(r)){var s=(i?i+".":"")+r;t(a,r,e,o,s),n.isValObject(a)||d(a)&&"impliedEdits"!==r&&n.crawl(a,t,o+1,s)}}))},n.isValObject=function(e){return e&&void 0!==e.valType},n.findArrayAttributes=function(e){var t,r,i=[],a=[],s=[];function l(e,n,r,i){a=a.slice(0,i).concat([n]),s=s.slice(0,i).concat([e&&e._isLinkedToArray]),e&&("data_array"===e.valType||!0===e.arrayOk)&&("colorbar"!==a[i-1]||"ticktext"!==n&&"tickvals"!==n)&&c(t,0,"")}function c(e,t,n){var o=e[a[t]],l=n+a[t];if(t===a.length-1)f(o)&&i.push(r+l);else if(s[t]){if(Array.isArray(o))for(var u=0;u<o.length;u++)d(o[u])&&c(o[u],t+1,l+"["+u+"].")}else d(o)&&c(o,t+1,l+".")}t=e,r="",n.crawl(o,l),e._module&&e._module.attributes&&n.crawl(e._module.attributes,l);var u=e.transforms;if(u)for(var h=0;h<u.length;h++){var p=u[h],g=p._module;g&&(r="transforms["+h+"].",t=p,n.crawl(g.attributes,l))}return i},n.getTraceValObject=function(e,t){var n,i,a=t[0],s=1;if("transforms"===a){if(1===t.length)return o.transforms;var l=e.transforms;if(!Array.isArray(l)||!l.length)return!1;var c=t[1];if(!x(c)||c>=l.length)return!1;i=(n=(r.transformsRegistry[l[c].type]||{}).attributes)&&n[t[2]],s=3}else{var u=e._module;if(u||(u=(r.modules[e.type||o.type.dflt]||{})._module),!u)return!1;if(!(i=(n=u.attributes)&&n[a])){var h=u.basePlotModule;h&&h.attributes&&(i=h.attributes[a])}i||(i=o[a])}return _(i,t,s)},n.getLayoutValObject=function(e,t){return _(function(e,t){var n,i,o,s,l=e._basePlotModules;if(l){var c;for(n=0;n<l.length;n++){if((o=l[n]).attrRegex&&o.attrRegex.test(t)){if(o.layoutAttrOverrides)return o.layoutAttrOverrides;!c&&o.layoutAttributes&&(c=o.layoutAttributes)}var u=o.baseLayoutAttrOverrides;if(u&&t in u)return u[t]}if(c)return c}var h=e._modules;if(h)for(n=0;n<h.length;n++)if((s=h[n].layoutAttributes)&&t in s)return s[t];for(i in r.componentsRegistry){if("colorscale"===(o=r.componentsRegistry[i]).name&&0===t.indexOf("coloraxis"))return o.layoutAttributes[t];if(!o.schema&&t===o.name)return o.layoutAttributes}return t in a&&a[t]}(e,t[0]),t,1)}},{"../lib":503,"../plots/animation_attributes":548,"../plots/attributes":550,"../plots/frame_attributes":586,"../plots/layout_attributes":610,"../registry":638,"./edit_types":536,"./plot_config":541}],543:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plots/attributes"),o={name:{valType:"string",editType:"none"}};function a(e){return e&&"string"==typeof e}function s(e){var t=e.length-1;return"s"!==e.charAt(t)&&r.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}o.templateitemname={valType:"string",editType:"calc"},n.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=o.name,t.templateitemname=o.templateitemname,t},n.traceTemplater=function(e){var t,n,o={};for(t in e)n=e[t],Array.isArray(n)&&n.length&&(o[t]=0);return{newTrace:function(a){var s={type:t=r.coerce(a,{},i,"type"),_template:null};if(t in o){n=e[t];var l=o[t]%n.length;o[t]++,s._template=n[l]}return s}}},n.newContainer=function(e,t,n){var i=e._template,o=i&&(i[t]||n&&i[n]);return r.isPlainObject(o)||(o=null),e[t]={_template:o}},n.arrayTemplater=function(e,t,n){var r=e._template,i=r&&r[s(t)],o=r&&r[t];Array.isArray(o)&&o.length||(o=[]);var l={};return{newItem:function(e){var t={name:e.name,_input:e},r=t.templateitemname=e.templateitemname;if(!a(r))return t._template=i,t;for(var s=0;s<o.length;s++){var c=o[s];if(c.name===r)return l[r]=1,t._template=c,t}return t[n]=e[n]||!1,t._template=!1,t},defaultItems:function(){for(var e=[],t=0;t<o.length;t++){var n=o[t],r=n.name;if(a(r)&&!l[r]){var i={_template:n,name:r,_input:{_templateitemname:r}};i.templateitemname=n.templateitemname,e.push(i),l[r]=1}}return e}}},n.arrayDefaultKey=s,n.arrayEditor=function(e,t,n){var i=(r.nestedProperty(e,t).get()||[]).length,o=n._index,a=o>=i&&(n._input||{})._templateitemname;a&&(o=i);var s,l=t+"["+o+"]";function c(){s={},a&&(s[l]={},s[l].templateitemname=a)}function u(e,t){a?r.nestedProperty(s[l],e).set(t):s[l+"."+e]=t}function h(){var e=s;return c(),e}return c(),{modifyBase:function(e,t){s[e]=t},modifyItem:u,getUpdateObj:h,applyUpdate:function(t,n){t&&u(t,n);var i=h();for(var o in i)r.nestedProperty(e,o).set(i[o])}}}},{"../lib":503,"../plots/attributes":550}],544:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../registry"),o=e("../plots/plots"),a=e("../lib"),s=e("../lib/clear_gl_canvases"),l=e("../components/color"),c=e("../components/drawing"),u=e("../components/titles"),h=e("../components/modebar"),d=e("../plots/cartesian/axes"),f=e("../constants/alignment"),p=e("../plots/cartesian/constraints"),g=p.enforce,m=p.clean,v=e("../plots/cartesian/autorange").doAutoRange,y="start";function b(e,t,n){for(var r=0;r<n.length;r++){var i=n[r][0],o=n[r][1];if(!(i[0]>=e[1]||i[1]<=e[0])&&o[0]<t[1]&&o[1]>t[0])return!0}return!1}function _(e){var t,i,s,u,p,g,m=e._fullLayout,v=m._size,y=v.p,_=d.list(e,"",!0);if(m._paperdiv.style({width:e._context.responsive&&m.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":m.width+"px",height:e._context.responsive&&m.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":m.height+"px"}).selectAll(".main-svg").call(c.setSize,m.width,m.height),e._context.setBackground(e,m.paper_bgcolor),n.drawMainTitle(e),h.manage(e),!m._has("cartesian"))return o.previousPromises(e);function w(e,t,n){var r=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===n?t._offset-y-r:t._offset+t._length+y+r:v.t+v.h*(1-(e.position||0))+r%1:t?"right"===n?t._offset+t._length+y+r:t._offset-y-r:v.l+v.w*(e.position||0)+r%1}for(t=0;t<_.length;t++){var k=(u=_[t])._anchorAxis;u._linepositions={},u._lw=c.crispRound(e,u.linewidth,1),u._mainLinePosition=w(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?w(u,k,f.OPPOSITE_SIDE[u.side]):null}var T=[],S=[],E=[],C=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var M=s.xaxis.domain,O=s.yaxis.domain,L=s.plotgroup;if(b(M,O,E)){var D=L.node(),I=s.bg=a.ensureSingle(L,"rect","bg");D.insertBefore(I.node(),D.childNodes[0]),S.push(i)}else L.select("rect.bg").remove(),E.push([M,O]),C||(T.push(i),S.push(i))}var R,P,N,z,F,B,j,U,V,q,H,$,W,G=m._bgLayer.selectAll(".bg").data(T);for(G.enter().append("rect").classed("bg",!0),G.exit().remove(),G.each((function(e){m._plots[e].bg=r.select(this)})),t=0;t<S.length;t++)s=m._plots[S[t]],p=s.xaxis,g=s.yaxis,s.bg&&void 0!==p._offset&&void 0!==g._offset&&s.bg.call(c.setRect,p._offset-y,g._offset-y,p._length+2*y,g._length+2*y).call(l.fill,m.plot_bgcolor).style("stroke-width",0);if(!m._hasOnlyLargeSploms)for(i in m._plots){s=m._plots[i],p=s.xaxis,g=s.yaxis;var Y,X,Z=s.clipId="clip"+m._uid+i+"plot",K=a.ensureSingleById(m._clips,"clipPath",Z,(function(e){e.classed("plotclip",!0).append("rect")}));s.clipRect=K.select("rect").attr({width:p._length,height:g._length}),c.setTranslate(s.plot,p._offset,g._offset),s._hasClipOnAxisFalse?(Y=null,X=Z):(Y=Z,X=null),c.setClipUrl(s.plot,Y,e),s.layerClipId=X}function J(e){return"M"+R+","+e+"H"+P}function Q(e){return"M"+p._offset+","+e+"h"+p._length}function ee(e){return"M"+e+","+U+"V"+j}function te(e){return"M"+e+","+g._offset+"v"+g._length}function ne(e,t,n){if(!e.showline||i!==e._mainSubplot)return"";if(!e._anchorAxis)return n(e._mainLinePosition);var r=t(e._mainLinePosition);return e.mirror&&(r+=t(e._mainMirrorPosition)),r}for(i in m._plots){s=m._plots[i],p=s.xaxis,g=s.yaxis;var re="M0,0";x(p,i)&&(F=A(p,"left",g,_),R=p._offset-(F?y+F:0),B=A(p,"right",g,_),P=p._offset+p._length+(B?y+B:0),N=w(p,g,"bottom"),z=w(p,g,"top"),!(W=!p._anchorAxis||i!==p._mainSubplot)||"allticks"!==p.mirror&&"all"!==p.mirror||(p._linepositions[i]=[N,z]),re=ne(p,J,Q),W&&p.showline&&("all"===p.mirror||"allticks"===p.mirror)&&(re+=J(N)+J(z)),s.xlines.style("stroke-width",p._lw+"px").call(l.stroke,p.showline?p.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",re);var ie="M0,0";x(g,i)&&(H=A(g,"bottom",p,_),j=g._offset+g._length+(H?y:0),$=A(g,"top",p,_),U=g._offset-($?y:0),V=w(g,p,"left"),q=w(g,p,"right"),!(W=!g._anchorAxis||i!==g._mainSubplot)||"allticks"!==g.mirror&&"all"!==g.mirror||(g._linepositions[i]=[V,q]),ie=ne(g,ee,te),W&&g.showline&&("all"===g.mirror||"allticks"===g.mirror)&&(ie+=ee(V)+ee(q)),s.ylines.style("stroke-width",g._lw+"px").call(l.stroke,g.showline?g.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",ie)}return d.makeClipPaths(e),o.previousPromises(e)}function x(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function w(e,t,n){if(!n.showline||!n._lw)return!1;if("all"===n.mirror||"allticks"===n.mirror)return!0;var r=n._anchorAxis;if(!r)return!1;var i=f.FROM_BL[t];return n.side===t?r.domain[i]===e.domain[i]:n.mirror&&r.domain[1-i]===e.domain[1-i]}function A(e,t,n,r){if(w(e,t,n))return n._lw;for(var i=0;i<r.length;i++){var o=r[i];if(o._mainAxis===n._mainAxis&&w(e,t,o))return o._lw}return 0}function k(e,t){var n=e.title,r=e._size,i=0;return t===y?i=n.pad.l:"end"===t&&(i=-n.pad.r),"paper"===n.xref?r.l+r.w*n.x+i:e.width*n.x+i}function T(e,t){var n=e.title,r=e._size,i=0;return"0em"!==t&&t?t===f.CAP_SHIFT+"em"&&(i=n.pad.t):i=-n.pad.b,"auto"===n.y?r.t/2:"paper"===n.yref?r.t+r.h-r.h*n.y+i:e.height-e.height*n.y+i}n.layoutStyles=function(e){return a.syncOrAsync([o.doAutoMargin,_],e)},n.drawMainTitle=function(e){var t=e._fullLayout,n=function(e){var t=e.title,n="middle";return a.isRightAnchor(t)?n="end":a.isLeftAnchor(t)&&(n=y),n}(t),r=function(e){var t=e.title,n="0em";return a.isTopAnchor(t)?n=f.CAP_SHIFT+"em":a.isMiddleAnchor(t)&&(n=f.MID_SHIFT+"em"),n}(t);u.draw(e,"gtitle",{propContainer:t,propName:"title.text",placeholder:t._dfltTitle.plot,attributes:{x:k(t,n),y:T(t,r),"text-anchor":n,dy:r}})},n.doTraceStyle=function(e){var t,r=e.calcdata,a=[];for(t=0;t<r.length;t++){var l=r[t],c=l[0]||{},u=c.trace||{},h=u._module||{},d=h.arraysToCalcdata;d&&d(l,u);var f=h.editStyle;f&&a.push({fn:f,cd0:c})}if(a.length){for(t=0;t<a.length;t++){var p=a[t];p.fn(e,p.cd0)}s(e),n.redrawReglTraces(e)}return o.style(e),i.getComponentMethod("legend","draw")(e),o.previousPromises(e)},n.doColorBars=function(e){return i.getComponentMethod("colorbar","draw")(e),o.previousPromises(e)},n.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,i.call("_doPlot",e,"",t)},n.doLegend=function(e){return i.getComponentMethod("legend","draw")(e),o.previousPromises(e)},n.doTicksRelayout=function(e){return d.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(e),s(e),n.redrawReglTraces(e)),n.drawMainTitle(e),o.previousPromises(e)},n.doModeBar=function(e){var t=e._fullLayout;h.manage(e);for(var n=0;n<t._basePlotModules.length;n++){var r=t._basePlotModules[n].updateFx;r&&r(e)}return o.previousPromises(e)},n.doCamera=function(e){for(var t=e._fullLayout,n=t._subplots.gl3d,r=0;r<n.length;r++){var i=t[n[r]];i._scene.setViewport(i)}},n.drawData=function(e){var t=e._fullLayout;s(e);for(var r=t._basePlotModules,a=0;a<r.length;a++)r[a].plot(e);return n.redrawReglTraces(e),o.style(e),i.getComponentMethod("shapes","draw")(e),i.getComponentMethod("annotations","draw")(e),i.getComponentMethod("images","draw")(e),t._replotting=!1,o.previousPromises(e)},n.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var n,r,i=e._fullData,o=[],s=[];for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),n=0;n<i.length;n++){var l=i[n];!0===l.visible&&0!==l._length&&("splom"===l.type?t._splomScenes[l.uid].draw():"scattergl"===l.type?a.pushUnique(o,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&a.pushUnique(s,l.subplot))}for(n=0;n<o.length;n++)(r=t._plots[o[n]])._scene&&r._scene.draw();for(n=0;n<s.length;n++)(r=t[s[n]]._subplot)._scene&&r._scene.draw()}},n.doAutoRangeAndConstraints=function(e){for(var t,n=d.list(e,"",!0),r={},i=0;i<n.length;i++)if(!r[(t=n[i])._id]){r[t._id]=1,m(e,t),v(e,t);var o=t._matchGroup;if(o)for(var a in o){var s=d.getFromId(e,a);v(e,s,t.range),r[a]=1}}g(e)},n.finalDraw=function(e){i.getComponentMethod("rangeslider","draw")(e),i.getComponentMethod("rangeselector","draw")(e)},n.drawMarginPushers=function(e){i.getComponentMethod("legend","draw")(e),i.getComponentMethod("rangeselector","draw")(e),i.getComponentMethod("sliders","draw")(e),i.getComponentMethod("updatemenus","draw")(e),i.getComponentMethod("colorbar","draw")(e)}},{"../components/color":366,"../components/drawing":388,"../components/modebar":429,"../components/titles":464,"../constants/alignment":471,"../lib":503,"../lib/clear_gl_canvases":487,"../plots/cartesian/autorange":553,"../plots/cartesian/axes":554,"../plots/cartesian/constraints":562,"../plots/plots":619,"../registry":638,"@plotly/d3":58}],545:[function(e,t,n){"use strict";var r=e("../lib"),i=r.isPlainObject,o=e("./plot_schema"),a=e("../plots/plots"),s=e("../plots/attributes"),l=e("./plot_template"),c=e("./plot_config").dfltConfig;function u(e,t){e=r.extendDeep({},e);var n,o,a=Object.keys(e).sort();function s(t,n,r){if(i(n)&&i(t))u(t,n);else if(Array.isArray(n)&&Array.isArray(t)){var a=l.arrayTemplater({_template:e},r);for(o=0;o<n.length;o++){var s=n[o],c=a.newItem(s)._template;c&&u(c,s)}var h=a.defaultItems();for(o=0;o<h.length;o++)n.push(h[o]._template);for(o=0;o<n.length;o++)delete n[o].templateitemname}}for(n=0;n<a.length;n++){var c=a[n],d=e[c];if(c in t?s(d,t[c],c):t[c]=d,h(c)===c)for(var f in t){var p=h(f);f===p||p!==c||f in e||s(d,t[f],c)}}}function h(e){return e.replace(/[0-9]+$/,"")}function d(e,t,n,o,a){var s=a&&n(a);for(var c in e){var u=e[c],f=g(e,c,o),p=g(e,c,a),m=n(p);if(!m){var v=h(c);v!==c&&(m=n(p=g(e,v,a)))}if(!(s&&s===m||!m||m._noTemplating||"data_array"===m.valType||m.arrayOk&&Array.isArray(u)))if(!m.valType&&i(u))d(u,t,n,f,p);else if(m._isLinkedToArray&&Array.isArray(u))for(var y=!1,b=0,_={},x=0;x<u.length;x++){var w=u[x];if(i(w)){var A=w.name;if(A)_[A]||(d(w,t,n,g(u,b,f),g(u,b,p)),b++,_[A]=1);else if(!y){var k=g(e,l.arrayDefaultKey(c),o),T=g(u,b,f);d(w,t,n,T,g(u,b,p));var S=r.nestedProperty(t,T);r.nestedProperty(t,k).set(S.get()),S.set(null),y=!0}}}else r.nestedProperty(t,f).set(u)}}function f(e,t){return o.getLayoutValObject(e,r.nestedProperty({},t).parts)}function p(e,t){return o.getTraceValObject(e,r.nestedProperty({},t).parts)}function g(e,t,n){return n?Array.isArray(e)?n+"["+t+"]":n+"."+t:t}function m(e){for(var t=0;t<e.length;t++)if(i(e[t]))return!0}function v(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":t=e.path?"There are no templates for item "+e.path+" with name "+e.templateitemname:"There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":t=e.path?"The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?"Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":"The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type."}return e.msg=t,e}n.makeTemplate=function(e){e=r.isPlainObject(e)?e:r.getGraphDiv(e),e=r.extendDeep({_context:c},{data:e.data,layout:e.layout}),a.supplyDefaults(e);var t=e.data||[],n=e.layout||{};n._basePlotModules=e._fullLayout._basePlotModules,n._modules=e._fullLayout._modules;var o={data:{},layout:{}};t.forEach((function(e){var t={};d(e,t,p.bind(null,e));var n=r.coerce(e,{},s,"type"),i=o.data[n];i||(i=o.data[n]=[]),i.push(t)})),d(n,o.layout,f.bind(null,n)),delete o.layout.template;var l=n.template;if(i(l)){var h,g,m,v,y,b,_=l.layout;i(_)&&u(_,o.layout);var x=l.data;if(i(x)){for(g in o.data)if(m=x[g],Array.isArray(m)){for(b=(y=o.data[g]).length,v=m.length,h=0;h<b;h++)u(m[h%v],y[h]);for(h=b;h<v;h++)y.push(r.extendDeep({},m[h]))}for(g in x)g in o.data||(o.data[g]=r.extendDeep([],x[g]))}}return o},n.validateTemplate=function(e,t){var n=r.extendDeep({},{_context:c,data:e.data,layout:e.layout}),o=n.layout||{};i(t)||(t=o.template||{});var s=t.layout,l=t.data,u=[];n.layout=o,n.layout.template=t,a.supplyDefaults(n);var d=n._fullLayout,f=n._fullData,p={};if(i(s)?(function e(t,n){for(var r in t)if("_"!==r.charAt(0)&&i(t[r])){var o,a=h(r),s=[];for(o=0;o<n.length;o++)s.push(g(t,r,n[o])),a!==r&&s.push(g(t,a,n[o]));for(o=0;o<s.length;o++)p[s[o]]=1;e(t[r],s)}}(d,["layout"]),function e(t,n){for(var r in t)if(-1===r.indexOf("defaults")&&i(t[r])){var o=g(t,r,n);p[o]?e(t[r],o):u.push({code:"unused",path:o})}}(s,"layout")):u.push({code:"layout"}),i(l)){for(var y,b={},_=0;_<f.length;_++){var x=f[_];b[y=x.type]=(b[y]||0)+1,x._fullInput._template||u.push({code:"missing",index:x._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,A=b[y]||0;w>A?u.push({code:"unused",traceType:y,templateCount:w,dataCount:A}):A>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:A})}}else u.push({code:"data"});if(function e(t,n){for(var r in t)if("_"!==r.charAt(0)){var o=t[r],a=g(t,r,n);i(o)?(Array.isArray(t)&&!1===o._template&&o.templateitemname&&u.push({code:"missing",path:a,templateitemname:o.templateitemname}),e(o,a)):Array.isArray(o)&&m(o)&&e(o,a)}}({data:f,layout:d},""),u.length)return u.map(v)}},{"../lib":503,"../plots/attributes":550,"../plots/plots":619,"./plot_config":541,"./plot_schema":542,"./plot_template":543}],546:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("./plot_api"),o=e("../plots/plots"),a=e("../lib"),s=e("../snapshot/helpers"),l=e("../snapshot/tosvg"),c=e("../snapshot/svgtoimg"),u=e("../version").version,h={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var n,d,f,p;function g(e){return!(e in t)||a.validate(t[e],h[e])}if(t=t||{},a.isPlainObject(e)?(n=e.data||[],d=e.layout||{},f=e.config||{},p={}):(e=a.getGraphDiv(e),n=a.extendDeep([],e.data),d=a.extendDeep({},e.layout),f=e._context,p=e._fullLayout||{}),!g("width")&&null!==t.width||!g("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!g("format"))throw new Error("Export format is not "+a.join2(h.format.values,", "," or ")+".");var m={};function v(e,n){return a.coerce(t,m,h,e,n)}var y=v("format"),b=v("width"),_=v("height"),x=v("scale"),w=v("setBackground"),A=v("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var T=a.extendFlat({},d);b?T.width=b:null===t.width&&r(p.width)&&(T.width=p.width),_?T.height=_:null===t.height&&r(p.height)&&(T.height=p.height);var S=a.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),E=s.getRedrawFunc(k);function C(){return new Promise((function(e){setTimeout(e,s.getDelay(k._fullLayout))}))}function M(){return new Promise((function(e,t){var n=l(k,y,x),r=k._fullLayout.width,h=k._fullLayout.height;function d(){i.purge(k),document.body.removeChild(k)}if("full-json"===y){var f=o.graphJson(k,!1,"keepdata","object",!0,!0);return f.version=u,f=JSON.stringify(f),d(),e(A?f:s.encodeJSON(f))}if(d(),"svg"===y)return e(A?n:s.encodeSVG(n));var p=document.createElement("canvas");p.id=a.randstr(),c({format:y,width:r,height:h,scale:x,canvas:p,svg:n,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){i.newPlot(k,n,T,S).then(E).then(C).then(M).then((function(t){e(function(e){return A?e.replace(s.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},{"../lib":503,"../plots/plots":619,"../snapshot/helpers":642,"../snapshot/svgtoimg":644,"../snapshot/tosvg":646,"../version":1119,"./plot_api":540,"fast-isnumeric":190}],547:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plots/plots"),o=e("./plot_schema"),a=e("./plot_config").dfltConfig,s=r.isPlainObject,l=Array.isArray,c=r.isArrayOrTypedArray;function u(e,t,n,i,o,a){a=a||[];for(var h=Object.keys(e),d=0;d<h.length;d++){var f=h[d];if("transforms"!==f){var v=a.slice();v.push(f);var y=e[f],b=t[f],_=m(n,f),x=(_||{}).valType,w="info_array"===x,A="colorscale"===x,k=(_||{}).items;if(g(n,f))if(s(y)&&s(b)&&"any"!==x)u(y,b,_,i,o,v);else if(w&&l(y)){y.length>b.length&&i.push(p("unused",o,v.concat(b.length)));var T,S,E,C,M,O=b.length,L=Array.isArray(k);if(L&&(O=Math.min(O,k.length)),2===_.dimensions)for(S=0;S<O;S++)if(l(y[S])){y[S].length>b[S].length&&i.push(p("unused",o,v.concat(S,b[S].length)));var D=b[S].length;for(T=0;T<(L?Math.min(D,k[S].length):D);T++)E=L?k[S][T]:k,C=y[S][T],M=b[S][T],r.validate(C,E)?M!==C&&M!==+C&&i.push(p("dynamic",o,v.concat(S,T),C,M)):i.push(p("value",o,v.concat(S,T),C))}else i.push(p("array",o,v.concat(S),y[S]));else for(S=0;S<O;S++)E=L?k[S]:k,C=y[S],M=b[S],r.validate(C,E)?M!==C&&M!==+C&&i.push(p("dynamic",o,v.concat(S),C,M)):i.push(p("value",o,v.concat(S),C))}else if(_.items&&!w&&l(y)){var I,R,P=k[Object.keys(k)[0]],N=[];for(I=0;I<b.length;I++){var z=b[I]._index||I;if((R=v.slice()).push(z),s(y[z])&&s(b[I])){N.push(z);var F=y[z],B=b[I];s(F)&&!1!==F.visible&&!1===B.visible?i.push(p("invisible",o,R)):u(F,B,P,i,o,R)}}for(I=0;I<y.length;I++)(R=v.slice()).push(I),s(y[I])?-1===N.indexOf(I)&&i.push(p("unused",o,R)):i.push(p("object",o,R,y[I]))}else!s(y)&&s(b)?i.push(p("object",o,v,y)):c(y)||!c(b)||w||A?f in t?r.validate(y,_)?"enumerated"===_.valType&&(_.coerceNumber&&y!==+b||y!==b)&&i.push(p("dynamic",o,v,y,b)):i.push(p("value",o,v,y)):i.push(p("unused",o,v,y)):i.push(p("array",o,v,y));else i.push(p("schema",o,v))}}return i}function h(e,t){for(var n=e.layout.layoutAttributes,i=0;i<t.length;i++){var o=t[i],a=e.traces[o.type],s=a.layoutAttributes;s&&(o.subplot?r.extendFlat(n[a.attributes.subplot.dflt],s):r.extendFlat(n,s))}return n}t.exports=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});var n,c,d=o.get(),f=[],g={_context:r.extendFlat({},a)};l(e)?(g.data=r.extendDeep([],e),n=e):(g.data=[],n=[],f.push(p("array","data"))),s(t)?(g.layout=r.extendDeep({},t),c=t):(g.layout={},c={},arguments.length>1&&f.push(p("object","layout"))),i.supplyDefaults(g);for(var m=g._fullData,v=n.length,y=0;y<v;y++){var b=n[y],_=["data",y];if(s(b)){var x=m[y],w=x.type,A=d.traces[w].attributes;A.type={valType:"enumerated",values:[w]},!1===x.visible&&!1!==b.visible&&f.push(p("invisible",_)),u(b,x,A,f,_);var k=b.transforms,T=x.transforms;if(k){l(k)||f.push(p("array",_,["transforms"])),_.push("transforms");for(var S=0;S<k.length;S++){var E=["transforms",S],C=k[S].type;if(s(k[S])){var M=d.transforms[C]?d.transforms[C].attributes:{};M.type={valType:"enumerated",values:Object.keys(d.transforms)},u(k[S],T[S],M,f,_,E)}else f.push(p("object",_,E))}}}else f.push(p("object",_))}return u(c,g._fullLayout,h(d,m),f,"layout"),0===f.length?void 0:f};var d={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":f(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":f(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return f(e)+"key "+t+" is not part of the schema"},unused:function(e,t,n){var r=s(n)?"container":"key";return f(e)+r+" "+t+" did not get coerced"},dynamic:function(e,t,n,r){return[f(e)+"key",t,"(set to '"+n+"')","got reset to","'"+r+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?f(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,n){return[f(e)+"key "+t,"is set to an invalid value ("+n+")"].join(" ")}};function f(e){return l(e)?"In data trace "+e[1]+", ":"In "+e+", "}function p(e,t,n,i,o){var a,s;n=n||"",l(t)?(a=t[0],s=t[1]):(a=t,s=null);var c=function(e){if(!l(e))return String(e);for(var t="",n=0;n<e.length;n++){var r=e[n];"number"==typeof r?t=t.substr(0,t.length-1)+"["+r+"]":t+=r,n<e.length-1&&(t+=".")}return t}(n),u=d[e](t,c,i,o);return r.log(u),{code:e,container:a,trace:s,path:n,astr:c,msg:u}}function g(e,t){var n=y(t),r=n.keyMinusId,i=n.id;return!!(r in e&&e[r]._isSubplotObj&&i)||t in e}function m(e,t){return t in e?e[t]:e[y(t).keyMinusId]}var v=r.counterRegex("([a-z]+)");function y(e){var t=e.match(v);return{keyMinusId:t&&t[1],id:t&&t[2]}}},{"../lib":503,"../plots/plots":619,"./plot_config":541,"./plot_schema":542}],548:[function(e,t,n){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},{}],549:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plot_api/plot_template");t.exports=function(e,t,n){var o,a,s=n.name,l=n.inclusionAttr||"visible",c=t[s],u=r.isArrayOrTypedArray(e[s])?e[s]:[],h=t[s]=[],d=i.arrayTemplater(t,s,l);for(o=0;o<u.length;o++){var f=u[o];r.isPlainObject(f)?a=d.newItem(f):(a=d.newItem({}))[l]=!1,a._index=o,!1!==a[l]&&n.handleItemDefaults(f,a,t,n),h.push(a)}var p=d.defaultItems();for(o=0;o<p.length;o++)(a=p[o])._index=h.length,n.handleItemDefaults({},a,t,n,{}),h.push(a);if(r.isArrayOrTypedArray(c)){var g=Math.min(c.length,h.length);for(o=0;o<g;o++)r.relinkPrivateKeys(h[o],c[o])}return h}},{"../lib":503,"../plot_api/plot_template":543}],550:[function(e,t,n){"use strict";var r=e("./font_attributes"),i=e("../components/fx/attributes");t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},{"../components/fx/attributes":397,"./font_attributes":585}],551:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=i.dateTime2ms,a=i.incrementMonth,s=e("../../constants/numerical").ONEAVGMONTH;t.exports=function(e,t,n,i){if("date"!==t.type)return{vals:i};var l=e[n+"periodalignment"];if(!l)return{vals:i};var c,u=e[n+"period"];if(r(u)){if((u=+u)<=0)return{vals:i}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:i};c=h}for(var d=t.calendar,f="start"===l,p="end"===l,g=e[n+"period0"],m=o(g,d)||0,v=[],y=[],b=[],_=i.length,x=0;x<_;x++){var w,A,k,T=i[x];if(c){for(w=Math.round((T-m)/(c*s)),k=a(m,c*w,d);k>T;)k=a(k,-c,d);for(;k<=T;)k=a(k,c,d);A=a(k,-c,d)}else{for(k=m+(w=Math.round((T-m)/u))*u;k>T;)k-=u;for(;k<=T;)k+=u;A=k-u}v[x]=f?A:p?k:(A+k)/2,y[x]=A,b[x]=k}return{vals:v,starts:y,ends:b}}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],552:[function(e,t,n){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],553:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../lib"),a=e("../../constants/numerical").FP_SAFE,s=e("../../registry"),l=e("../../components/drawing"),c=e("./axis_ids"),u=c.getFromId,h=c.isLinked;function d(e,t){var n,r,i=[],a=e._fullLayout,s=p(a,t,0),l=p(a,t,1),c=g(e,t),u=c.min,h=c.max;if(0===u.length||0===h.length)return o.simpleMap(t.range,t.r2l);var d=u[0].val,m=h[0].val;for(n=1;n<u.length&&d===m;n++)d=Math.min(d,u[n].val);for(n=1;n<h.length&&d===m;n++)m=Math.max(m,h[n].val);var v=!1;if(t.range){var y=o.simpleMap(t.range,t.r2l);v=y[1]<y[0]}"reversed"===t.autorange&&(v=!0,t.autorange=!0);var b,_,x,w,A,k,T=t.rangemode,S="tozero"===T,E="nonnegative"===T,C=t._length,M=C/10,O=0;for(n=0;n<u.length;n++)for(b=u[n],r=0;r<h.length;r++)(k=(_=h[r]).val-b.val-f(t,b.val,_.val))>0&&((A=C-s(b)-l(_))>M?k/A>O&&(x=b,w=_,O=k/A):k/C>O&&(x={val:b.val,nopad:1},w={val:_.val,nopad:1},O=k/C));if(d===m){var L=d-1,D=d+1;if(S)if(0===d)i=[0,1];else{var I=(d>0?h:u).reduce((function(e,t){return Math.max(e,l(t))}),0),R=d/(1-Math.min(.5,I/C));i=d>0?[0,R]:[R,0]}else i=E?[Math.max(0,L),Math.max(1,D)]:[L,D]}else S?(x.val>=0&&(x={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):E&&(x.val-O*s(x)<0&&(x={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),O=(w.val-x.val-f(t,b.val,_.val))/(C-s(x)-l(w)),i=[x.val-O*s(x),w.val+O*l(w)];return v&&i.reverse(),o.simpleMap(i,t.l2r||Number)}function f(e,t,n){var r=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,n),o=0;o<i.length;o++){var a=i[o];r+=a.max-a.min}return r}function p(e,t,n){var i=.05*t._length,a=t._anchorAxis||{};if(-1!==(t.ticklabelposition||"").indexOf("inside")||-1!==(a.ticklabelposition||"").indexOf("inside")){var s="reversed"===t.autorange;if(!s){var c=o.simpleMap(t.range,t.r2l);s=c[1]<c[0]}s&&(n=!n)}var u=0;return h(e,t._id)||(u=function(e,t,n){var i=0,a="x"===t._id.charAt(0);for(var s in e._plots){var c=e._plots[s];if(t._id===c.xaxis._id||t._id===c.yaxis._id){var u=(a?c.yaxis:c.xaxis)||{};if(-1!==(u.ticklabelposition||"").indexOf("inside")&&(!n&&("left"===u.side||"bottom"===u.side)||n&&("top"===u.side||"right"===u.side))){if(u._vals){var h=o.deg2rad(u._tickAngles[u._id+"tick"]||0),d=Math.abs(Math.cos(h)),f=Math.abs(Math.sin(h));if(!u._vals[0].bb){var p=u._id+"tick";u._selections[p].each((function(e){var t=r.select(this);t.select(".text-math-group").empty()&&(e.bb=l.bBox(t.node()))}))}for(var g=0;g<u._vals.length;g++){var m=u._vals[g].bb;if(m){var v=6+m.width,y=6+m.height;i=Math.max(i,a?Math.max(v*d,y*f):Math.max(y*d,v*f))}}}"inside"===u.ticks&&"inside"===u.ticklabelposition&&(i+=u.ticklen||0)}}}return i}(e,t,n)),i=Math.max(u,i),"domain"===t.constrain&&t._inputDomain&&(i*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(e){return e.nopad?0:e.pad+(e.extrapad?i:u)}}t.exports={getAutoRange:d,makePadFn:p,doAutoRange:function(e,t,n){if(t.setScale(),t.autorange){t.range=n?n.slice():d(e,t),t._r=t.range.slice(),t._rl=o.simpleMap(t._r,t.r2l);var r=t._input,i={};i[t._attr+".range"]=t.range,i[t._attr+".autorange"]=t.autorange,s.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,i),r.range=t.range.slice(),r.autorange=t.autorange}var a=t._anchorAxis;if(a&&a.rangeslider){var l=a.rangeslider[t._name];l&&"auto"===l.rangemode&&(l.range=d(e,t)),a._input.rangeslider[t._name]=o.extendFlat({},l)}},findExtremes:function(e,t,n){n||(n={}),e._m||e.setScale();var r,o,s,l,c,u,h,d,f,p=[],g=[],y=t.length,_=n.padded||!1,x=n.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,A=!1,k=n.vpadLinearized||!1;function T(e){if(Array.isArray(e))return A=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var S=T((e._m>0?n.ppadplus:n.ppadminus)||n.ppad||0),E=T((e._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),C=T(n.vpadplus||n.vpad),M=T(n.vpadminus||n.vpad);if(!A){if(d=1/0,f=-1/0,w)for(r=0;r<y;r++)(o=t[r])<d&&o>0&&(d=o),o>f&&o<a&&(f=o);else for(r=0;r<y;r++)(o=t[r])<d&&o>-a&&(d=o),o>f&&o<a&&(f=o);t=[d,f],y=2}var O={tozero:x,extrapad:_};function L(n){s=t[n],i(s)&&(u=S(n),h=E(n),k?(l=e.c2l(s)-M(n),c=e.c2l(s)+C(n)):(d=s-M(n),f=s+C(n),w&&d<f/10&&(d=f/10),l=e.c2l(d),c=e.c2l(f)),x&&(l=Math.min(0,l),c=Math.max(0,c)),b(l)&&m(p,l,h,O),b(c)&&v(g,c,u,O))}var D=Math.min(6,y);for(r=0;r<D;r++)L(r);for(r=y-1;r>=D;r--)L(r);return{min:p,max:g,opts:n}},concatExtremes:g};function g(e,t,n){var r,i,o,a=t._id,s=e._fullData,l=e._fullLayout,c=[],h=[];function d(e,t){for(r=0;r<t.length;r++){var n=e[t[r]],s=(n._extremes||{})[a];if(!0===n.visible&&s){for(i=0;i<s.min.length;i++)o=s.min[i],m(c,o.val,o.pad,{extrapad:o.extrapad});for(i=0;i<s.max.length;i++)o=s.max[i],v(h,o.val,o.pad,{extrapad:o.extrapad})}}}if(d(s,t._traceIndices),d(l.annotations||[],t._annIndices||[]),d(l.shapes||[],t._shapeIndices||[]),t._matchGroup&&!n)for(var f in t._matchGroup)if(f!==t._id){var p=u(e,f),y=g(e,p,!0),b=t._length/p._length;for(i=0;i<y.min.length;i++)o=y.min[i],m(c,o.val,o.pad*b,{extrapad:o.extrapad});for(i=0;i<y.max.length;i++)o=y.max[i],v(h,o.val,o.pad*b,{extrapad:o.extrapad})}return{min:c,max:h}}function m(e,t,n,r){y(e,t,n,r,_)}function v(e,t,n,r){y(e,t,n,r,x)}function y(e,t,n,r,i){for(var o=r.tozero,a=r.extrapad,s=!0,l=0;l<e.length&&s;l++){var c=e[l];if(i(c.val,t)&&c.pad>=n&&(c.extrapad||!a)){s=!1;break}i(t,c.val)&&c.pad<=n&&(a||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=o&&0===t;e.push({val:t,pad:u?0:n,extrapad:!u&&a})}}function b(e){return i(e)&&Math.abs(e)<a}function _(e,t){return e<=t}function x(e,t){return e>=t}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../../registry":638,"./axis_ids":558,"@plotly/d3":58,"fast-isnumeric":190}],554:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../plots/plots"),a=e("../../registry"),s=e("../../lib"),l=s.strTranslate,c=e("../../lib/svg_text_utils"),u=e("../../components/titles"),h=e("../../components/color"),d=e("../../components/drawing"),f=e("./layout_attributes"),p=e("./clean_ticks"),g=e("../../constants/numerical"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,b=g.ONEMAXQUARTER,_=g.ONEAVGQUARTER,x=g.ONEMINQUARTER,w=g.ONEMAXMONTH,A=g.ONEAVGMONTH,k=g.ONEMINMONTH,T=g.ONEWEEK,S=g.ONEDAY,E=S/2,C=g.ONEHOUR,M=g.ONEMIN,O=g.ONESEC,L=g.MINUS_SIGN,D=g.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},P={K:"tick",L:"path"},N={K:"tick",L:"text"},z=e("../../constants/alignment"),F=z.MID_SHIFT,B=z.CAP_SHIFT,j=z.LINE_SPACING,U=z.OPPOSITE_SIDE,V=t.exports={};V.setConvert=e("./set_convert");var q=e("./axis_autotype"),H=e("./axis_ids"),$=H.idSort,W=H.isLinked;V.id2name=H.id2name,V.name2id=H.name2id,V.cleanId=H.cleanId,V.list=H.list,V.listIds=H.listIds,V.getFromId=H.getFromId,V.getFromTrace=H.getFromTrace;var G=e("./autorange");V.getAutoRange=G.getAutoRange,V.findExtremes=G.findExtremes;function Y(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}V.coerceRef=function(e,t,n,r,i,o){var a=r.charAt(r.length-1),l=n._fullLayout._subplots[a+"axis"],c=r+"ref",u={};return i||(i=l[0]||("string"==typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(o?"string"==typeof o?[o]:o:[]),dflt:i},s.coerce(e,t,u,c)},V.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},V.coercePosition=function(e,t,n,r,i,o){var a,l;if("range"!==V.getRefType(r))a=s.ensureNumber,l=n(i,o);else{var c=V.getFromId(t,r);l=n(i,o=c.fraction2r(o)),a=c.cleanPos}e[i]=a(l)},V.cleanPosition=function(e,t,n){return("paper"===n||"pixel"===n?s.ensureNumber:V.getFromId(t,n).cleanPos)(e)},V.redrawComponents=function(e,t){t=t||V.listIds(e);var n=e._fullLayout;function r(r,i,o,s){for(var l=a.getComponentMethod(r,i),c={},u=0;u<t.length;u++)for(var h=n[V.id2name(t[u])][o],d=0;d<h.length;d++){var f=h[d];if(!c[f]&&(l(e,f),c[f]=1,s))return}}r("annotations","drawOne","_annIndices"),r("shapes","drawOne","_shapeIndices"),r("images","draw","_imgIndices",!0)};var X=V.getDataConversions=function(e,t,n,r){var i,o="x"===n||"y"===n||"z"===n?n:r;if(Array.isArray(o)){if(i={type:q(r,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},V.setConvert(i),"category"===i.type)for(var a=0;a<r.length;a++)i.d2c(r[a])}else i=V.getFromTrace(e,t,o);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===o?{d2c:K,c2d:K}:{d2c:Z,c2d:Z}};function Z(e){return+e}function K(e){return String(e)}function J(e){return+e.substring(1)}V.getDataToCoordFunc=function(e,t,n,r){return X(e,t,n,r).d2c},V.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},V.minDtick=function(e,t,n,r){-1===["log","category","multicategory"].indexOf(e.type)&&r?void 0===e._minDtick?(e._minDtick=t,e._forceTick0=n):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((n-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=n):((t/e._minDtick+1e-6)%1>2e-6||((n-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},V.saveRangeInitial=function(e,t){for(var n=V.list(e,"",!0),r=!1,i=0;i<n.length;i++){var o=n[i],a=void 0===o._rangeInitial,s=a||!(o.range[0]===o._rangeInitial[0]&&o.range[1]===o._rangeInitial[1]);(a&&!1===o.autorange||t&&s)&&(o._rangeInitial=o.range.slice(),r=!0)}return r},V.saveShowSpikeInitial=function(e,t){for(var n=V.list(e,"",!0),r=!1,i="on",o=0;o<n.length;o++){var a=n[o],s=void 0===a._showSpikeInitial,l=s||!(a.showspikes===a._showspikes);(s||t&&l)&&(a._showSpikeInitial=a.showspikes,r=!0),"on"!==i||a.showspikes||(i="off")}return e._fullLayout._cartesianSpikesEnabled=i,r},V.autoBin=function(e,t,n,r,o,a){var l,c=s.aggNums(Math.min,null,e),u=s.aggNums(Math.max,null,e);if("category"===t.type||"multicategory"===t.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(a)||1),_dataSpan:u-c};if(o||(o=t.calendar),l="log"===t.type?{type:"linear",range:[c,u]}:{type:t.type,range:s.simpleMap([c,u],t.c2r,0,o),calendar:o},V.setConvert(l),a=a&&p.dtick(a,l.type))l.dtick=a,l.tick0=p.tick0(void 0,l.type,o);else{var h;if(n)h=(u-c)/n;else{var d=s.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(d.minDiff)/Math.LN10)),g=f*s.roundUp(d.minDiff/f,[.9,1.9,4.9,9.9],!0);h=Math.max(g,2*s.stdev(e)/Math.pow(e.length,r?.25:.4)),i(h)||(h=1)}V.autoTicks(l,h)}var m,v=l.dtick,y=V.tickIncrement(V.tickFirst(l),v,"reverse",o);if("number"==typeof v)m=(y=function(e,t,n,r,o){var a=0,s=0,l=0,c=0;function u(t){return(1+100*(t-e)/n.dtick)%100<2}for(var h=0;h<t.length;h++)t[h]%1==0?l++:i(t[h])||c++,u(t[h])&&a++,u(t[h]+n.dtick/2)&&s++;var d=t.length-c;if(l===d&&"date"!==n.type)n.dtick<1?e=r-.5*n.dtick:(e-=.5)+n.dtick<r&&(e+=n.dtick);else if(s<.1*d&&(a>.3*d||u(r)||u(o))){var f=n.dtick/2;e+=e+f<r?f:-f}return e}(y,e,l,c,u))+(1+Math.floor((u-y)/v))*v;else for("M"===l.dtick.charAt(0)&&(y=function(e,t,n,r,i){var o=s.findExactDates(t,i);if(o.exactDays>.8){var a=Number(n.substr(1));o.exactYears>.8&&a%12==0?e=V.tickIncrement(e,"M6","reverse")+1.5*S:o.exactMonths>.8?e=V.tickIncrement(e,"M1","reverse")+15.5*S:e-=E;var l=V.tickIncrement(e,n);if(l<=r)return l}return e}(y,e,v,c,o)),m=y;m<=u;)m=V.tickIncrement(m,v,!1,o);return{start:t.c2r(y,0,o),end:t.c2r(m,0,o),size:v,_dataSpan:u-c}},V.prepTicks=function(e,t){var n=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e._dtickInit=e.dtick,e._tick0Init=e.tick0,"auto"===e.tickmode||!e.dtick){var r,o=e.nticks;o||("category"===e.type||"multicategory"===e.type?(r=e.tickfont?s.bigFont(e.tickfont.size||12):15,o=e._length/r):(r="y"===e._id.charAt(0)?40:80,o=s.constrain(e._length/r,4,9)+1),"radialaxis"===e._name&&(o*=2)),"array"===e.tickmode&&(o*=100),e._roughDTick=Math.abs(n[1]-n[0])/o,V.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function n(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var r=n(),o=V.getTickFormat(e);if(o){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(t=C,a&&!r&&e.dtick<C&&(e.dtick=C)):/%p/.test(o)?(t=E,a&&!r&&e.dtick<E&&(e.dtick=E)):/%[Aadejuwx]/.test(o)?(t=S,a&&!r&&e.dtick<S&&(e.dtick=S)):/%[UVW]/.test(o)?(t=T,a&&!r&&e.dtick<T&&(e.dtick=T)):/%[Bbm]/.test(o)?(t=A,a&&(r?J(e.dtick)<1:e.dtick<k)&&(e.dtick="M1")):/%[q]/.test(o)?(t=_,a&&(r?J(e.dtick)<3:e.dtick<x)&&(e.dtick="M3")):/%[Yy]/.test(o)&&(t=v,a&&(r?J(e.dtick)<12:e.dtick<y)&&(e.dtick="M12")))}(r=n())&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}(e),e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),"date"===e.type&&e.dtick<.1&&(e.dtick=.1),se(e)},V.calcTicks=function(e,t){V.prepTicks(e,t);var n=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("array"===e.tickmode)return function(e){var t=e.tickvals,n=e.ticktext,r=new Array(t.length),i=Y(s.simpleMap(e.range,e.r2l)),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]),l=0;Array.isArray(n)||(n=[]);var c="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var u=0;u<t.length;u++){var h=c(t[u]);h>o&&h<a&&(void 0===n[u]?r[l]=V.tickText(e,h):r[l]=le(e,h,String(n[u])),l++)}return l<t.length&&r.splice(l,t.length-l),e.rangebreaks&&(r=r.filter((function(t){return e.maskBreaks(t.x)!==D}))),r}(e);var r=Y(n),o=r[0],a=r[1],l=n[1]<n[0],c=Math.min(n[0],n[1]),u=Math.max(n[0],n[1]),h=i(e.dtick),d="log"===e.type&&!(h||"L"===e.dtick.charAt(0)),f="period"===e.ticklabelmode;if(e._tmin=V.tickFirst(e,t),e._tmin<o!==l)return[];"category"!==e.type&&"multicategory"!==e.type||(a=l?Math.max(-.5,a):Math.min(e._categories.length-.5,a));var p=e._tmin;e.rangebreaks&&e._tick0Init!==e.tick0&&(p=Ee(p,e),l||(p=V.tickIncrement(p,e.dtick,!l,e.calendar))),f&&(p=V.tickIncrement(p,e.dtick,!l,e.calendar));var g,M=e.ticklabelstep,O=Math.max(1e3,e._length||0),L=[],I=null;h?g=e.dtick:"date"===e.type?"string"==typeof e.dtick&&"M"===e.dtick.charAt(0)&&(g=A*e.dtick.substring(1)):g=e._roughDTick;for(var R,P,N=Math.round((e.r2l(p)-e.r2l(e.tick0))/g)-1;l?p>=a:p<=a;p=V.tickIncrement(p,e.dtick,l,e.calendar)){if(N++,e.rangebreaks&&!l){if(p<o)continue;if(e.maskBreaks(p)===D&&Ee(p,e)>=u)break}if(L.length>O||p===I)break;I=p;var z=!1;d&&p!==(0|p)&&(z=!0);var F={minor:z,value:p};M>1&&N%M&&(F.skipLabel=!0),L.push(F)}if(f&&function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r].value,o=r,a=r+1;r<e.length-1?(o=r,a=r+1):r>0?(o=r-1,a=r):(o=r,a=r);var s,l=e[o].value,c=e[a].value,u=Math.abs(c-l),h=n||u,d=0;h>=y?d=u>=y&&u<=m?u:v:n===_&&h>=x?d=u>=x&&u<=b?u:_:h>=k?d=u>=k&&u<=w?u:A:n===T&&h>=T?d=T:h>=S?d=S:n===E&&h>=E?d=E:n===C&&h>=C&&(d=C),d>=u&&(d=u,s=!0);var f=i+d;if(t.rangebreaks&&d>0){for(var p=0,g=0;g<84;g++){var M=(g+.5)/84;t.maskBreaks(i*(1-M)+M*f)!==D&&p++}(d*=p/84)||(e[r].drop=!0),s&&u>T&&(d=u)}(d>0||0===r)&&(e[r].periodX=i+d/2)}}(L,e,e._definedDelta),e.rangebreaks){var B="y"===e._id.charAt(0),j=1;"auto"===e.tickmode&&(j=e.tickfont?e.tickfont.size:12);var U=NaN;for(R=L.length-1;R>-1;R--)if(L[R].drop)L.splice(R,1);else{L[R].value=Ee(L[R].value,e);var q=e.c2p(L[R].value);(B?U>q-j:U<q+j)?L.splice(l?R+1:R,1):U=q}}Se(e)&&360===Math.abs(n[1]-n[0])&&L.pop(),e._tmax=(L[L.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var H,$,W=function(t){t.text=" ",e._prevDateHead=P},G=[];for(R=0;R<L.length;R++){var X=L[R].minor,Z=L[R].value;P=e._prevDateHead,H=V.tickText(e,Z,!1,X),void 0!==($=L[R].periodX)&&(H.periodX=$,($>u||$<c)&&($>u&&(H.periodX=u),$<c&&(H.periodX=c),W(H))),L[R].skipLabel&&W(H),G.push(H)}return e._inCalcTicks=!1,G};var Q=[2,5,10],ee=[1,2,3,6,12],te=[1,2,5,10,15,30],ne=[1,2,3,7,14],re=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],ie=[-.301,0,.301,.699,1],oe=[15,30,45,90,180];function ae(e,t,n){return t*s.roundUp(e/t,n)}function se(e){var t=e.dtick;if(e._tickexponent=0,i(t)||"string"==typeof t||(t=1),"category"!==e.type&&"multicategory"!==e.type||(e._tickround=null),"date"===e.type){var n=e.r2l(e.tick0),r=e.l2r(n).replace(/(^-|i)/g,""),o=r.length;if("M"===String(t).charAt(0))o>10||"01-01"!==r.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=S&&o<=10||t>=15*S)e._tickround="d";else if(t>=M&&o<=16||t>=C)e._tickround="M";else if(t>=O&&o<=19||t>=M)e._tickround="S";else{var a=e.l2r(n+t).replace(/^-/,"").length;e._tickround=Math.max(o,a)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(he(e.exponentformat)&&!de(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function le(e,t,n){var r=e.tickfont||{};return{x:t,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}function ce(e,t,n,r,i){if("radians"!==e.thetaunit||n)t.text=fe(t.x,e,i,r);else{var o=t.x/180;if(0===o)t.text="0";else{var a=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function n(e,r){return t(r,0)?e:n(r,e%r)}function r(e){for(var n=1;!t(Math.round(e*n)/n,e);)n*=10;return n}var i=r(e),o=e*i,a=Math.abs(n(o,i));return[Math.round(o/a),Math.round(i/a)]}(o);if(a[1]>=100)t.text=fe(s.deg2rad(t.x),e,i,r);else{var l=t.x<0;1===a[1]?1===a[0]?t.text="":t.text=a[0]+"":t.text=["<sup>",a[0],"</sup>","","<sub>",a[1],"</sub>",""].join(""),l&&(t.text=L+t.text)}}}}V.autoTicks=function(e,t){var n;function r(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var o=2*t;if(o>v)t/=v,n=r(10),e.dtick="M"+12*ae(t,n,Q);else if(o>A)t/=A,e.dtick="M"+ae(t,1,ee);else if(o>S){e.dtick=ae(t,S,e._hasDayOfWeekBreaks?[1,2,7,14]:ne);var a=V.getTickFormat(e),l="period"===e.ticklabelmode;l&&(e._rawTick0=e.tick0),/%[uVW]/.test(a)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}else o>C?e.dtick=ae(t,C,ee):o>M?e.dtick=ae(t,M,te):o>O?e.dtick=ae(t,O,te):(n=r(10),e.dtick=ae(t,n,Q))}else if("log"===e.type){e.tick0=0;var c=s.simpleMap(e.range,e.r2l);if(t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,n=r(10),e.dtick="L"+ae(t,n,Q)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Se(e)?(e.tick0=0,n=1,e.dtick=ae(t,n,oe)):(e.tick0=0,n=r(10),e.dtick=ae(t,n,Q));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!=typeof e.dtick){var h=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(h)}},V.tickIncrement=function(e,t,n,o){var a=n?-1:1;if(i(t))return s.increment(e,a*t);var l=t.charAt(0),c=a*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,o);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?ie:re,h=e+.01*a,d=s.roundUp(s.mod(h,1),u,n);return Math.floor(h)+Math.log(r.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},V.tickFirst=function(e,t){var n=e.r2l||Number,o=s.simpleMap(e.range,n,void 0,void 0,t),a=o[1]<o[0],l=a?Math.floor:Math.ceil,c=Y(o)[0],u=e.dtick,h=n(e.tick0);if(i(u)){var d=l((c-h)/u)*u+h;return"category"!==e.type&&"multicategory"!==e.type||(d=s.constrain(d,0,e._categories.length-1)),d}var f=u.charAt(0),p=Number(u.substr(1));if("M"===f){for(var g,m,v,y=0,b=h;y<10;){if(((g=V.tickIncrement(b,u,a,e.calendar))-c)*(b-c)<=0)return a?Math.min(b,g):Math.max(b,g);m=(c-(b+g)/2)/(g-b),v=f+(Math.abs(Math.round(m))||1)*p,b=V.tickIncrement(b,v,m<0?!a:a,e.calendar),y++}return s.error("tickFirst did not converge",e),b}if("L"===f)return Math.log(l((Math.pow(10,c)-h)/p)*p+h)/Math.LN10;if("D"===f){var _="D2"===u?ie:re,x=s.roundUp(s.mod(c,1),_,a);return Math.floor(c)+Math.log(r.round(Math.pow(10,x),1))/Math.LN10}throw"unrecognized dtick "+String(u)},V.tickText=function(e,t,n,r){var o,a=le(e,t),l="array"===e.tickmode,c=n||l,u=e.type,h="category"===u?e.d2l_noadd:e.d2l;if(l&&Array.isArray(e.ticktext)){var d=s.simpleMap(e.range,e.r2l),f=(Math.abs(d[1]-d[0])-(e._lBreaks||0))/1e4;for(o=0;o<e.ticktext.length&&!(Math.abs(t-h(e.tickvals[o]))<f);o++);if(o<e.ticktext.length)return a.text=String(e.ticktext[o]),a}function p(r){if(void 0===r)return!0;if(n)return"none"===r;var i={first:e._tmin,last:e._tmax}[r];return"all"!==r&&t!==i}var g=n?"never":"none"!==e.exponentformat&&p(e.showexponent)?"hide":"";if("date"===u?function(e,t,n,r){var o=e._tickround,a=n&&e.hoverformat||V.getTickFormat(e);r&&(o=i(o)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[o]);var l,c=s.formatDate(t.x,a,o,e._dateFormat,e.calendar,e._extraFormat),u=c.indexOf("\n");if(-1!==u&&(l=c.substr(u+1),c=c.substr(0,u)),r&&("00:00:00"===c||"00:00"===c?(c=l,l=""):8===c.length&&(c=c.replace(/:00$/,""))),l)if(n)"d"===o?c+=", "+l:c=l+(c?", "+c:"");else if(e._inCalcTicks&&e._prevDateHead===l){var h=Ce(e),d=e._trueSide||e.side;(!h&&"top"===d||h&&"bottom"===d)&&(c+="<br> ")}else e._prevDateHead=l,c+="<br>"+l;t.text=c}(e,a,n,c):"log"===u?function(e,t,n,r,o){var a=e.dtick,l=t.x,c=e.tickformat,u="string"==typeof a&&a.charAt(0);if("never"===o&&(o=""),r&&"L"!==u&&(a="L3",u="L"),c||"L"===u)t.text=fe(Math.pow(10,l),e,o,r);else if(i(a)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),d=Math.abs(h),f=e.exponentformat;"power"===f||he(f)&&de(h)?(t.text=0===h?1:1===h?"10":"10<sup>"+(h>1?"":L)+d+"</sup>",t.fontSize*=1.25):("e"===f||"E"===f)&&d>2?t.text="1"+f+(h>0?"+":L)+d:(t.text=fe(Math.pow(10,l),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(a);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,a,0,c,g):"category"===u?function(e,t){var n=e._categories[Math.round(t.x)];void 0===n&&(n=""),t.text=String(n)}(e,a):"multicategory"===u?function(e,t,n){var r=Math.round(t.x),i=e._categories[r]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);n?t.text=a+" - "+o:(t.text=o,t.text2=a)}(e,a,n):Se(e)?ce(e,a,n,c,g):function(e,t,n,r,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=fe(t.x,e,i,r)}(e,a,0,c,g),r||(e.tickprefix&&!p(e.showtickprefix)&&(a.text=e.tickprefix+a.text),e.ticksuffix&&!p(e.showticksuffix)&&(a.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var m=function(t){var n=e.l2p(t);return n>=0&&n<=e._length?t:null};a.xbnd=[m(a.x-.5),m(a.x+e.dtick-.5)]}return a},V.hoverLabelText=function(e,t,n){n&&(e=s.extendFlat({},e,{hoverformat:n}));var r=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t[1]:void 0;if(void 0!==i&&i!==r)return V.hoverLabelText(e,r,n)+" - "+V.hoverLabelText(e,i,n);var o="log"===e.type&&r<=0,a=V.tickText(e,e.c2l(o?-r:r),"hover").text;return o?0===r?"0":L+a:a};var ue=["f","p","n","","m","","k","M","G","T"];function he(e){return"SI"===e||"B"===e}function de(e){return e>14||e<-15}function fe(e,t,n,r){var o=e<0,a=t._tickround,l=n||t.exponentformat||"B",c=t._tickexponent,u=V.getTickFormat(t),h=t.separatethousands;if(r){var d={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};se(d),a=(Number(d._tickround)||0)+4,c=d._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,L);var f,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(e=Math.abs(e))<p)e="0",o=!1;else{if(e+=p,c&&(e*=Math.pow(10,-c),a+=c),0===a)e=String(Math.floor(e));else if(a<0){e=(e=String(Math.round(e))).substr(0,e.length+a);for(var g=a;g<0;g++)e+="0"}else{var m=(e=String(e)).indexOf(".")+1;m&&(e=e.substr(0,m+a).replace(/\.?0+$/,""))}e=s.numSeparate(e,t._separators,h)}return c&&"hide"!==l&&(he(l)&&de(c)&&(l="power"),f=c<0?L+-c:"power"!==l?"+"+c:String(c),"e"===l||"E"===l?e+=l+f:"power"===l?e+="10<sup>"+f+"</sup>":"B"===l&&9===c?e+="B":he(l)&&(e+=ue[c/3+5])),o?L+e:e}function pe(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i];r[o.text2]?r[o.text2].push(o.x):r[o.text2]=[o.x]}for(var a in r)n.push(le(e,s.interp(r[a],.5),a));return n}function ge(e){return void 0!==e.periodX?e.periodX:e.x}function me(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function ve(e){var t=e.title.font.size,n=(e.title.text.match(c.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?n?t*(B+n*j):t*B:n?t*(n+1)*j:t}function ye(e,t){var n=e.l2p(t);return n>1&&n<e._length-1}function be(e){var t=r.select(e),n=t.select(".text-math-group");return n.empty()?t.select("text"):n}function _e(e){return e._id+".automargin"}function xe(e){return _e(e)+".mirror"}function we(e){return e._id+".rangeslider"}function Ae(e,t){for(var n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n])}function ke(e,t,n){var r,i,o=[],a=[],l=e.layout;for(r=0;r<t.length;r++)o.push(V.getFromId(e,t[r]));for(r=0;r<n.length;r++)a.push(V.getFromId(e,n[r]));var c=Object.keys(f),u=["anchor","domain","overlaying","position","side","tickangle","editType"],h=["linear","log"];for(r=0;r<c.length;r++){var d=c[r],p=o[0][d],g=a[0][d],m=!0,v=!1,y=!1;if("_"!==d.charAt(0)&&"function"!=typeof p&&-1===u.indexOf(d)){for(i=1;i<o.length&&m;i++){var b=o[i][d];"type"===d&&-1!==h.indexOf(p)&&-1!==h.indexOf(b)&&p!==b?v=!0:b!==p&&(m=!1)}for(i=1;i<a.length&&m;i++){var _=a[i][d];"type"===d&&-1!==h.indexOf(g)&&-1!==h.indexOf(_)&&g!==_?y=!0:a[i][d]!==g&&(m=!1)}m&&(v&&(l[o[0]._name].type="linear"),y&&(l[a[0]._name].type="linear"),Te(l,d,o,a,e._fullLayout._dfltTitle))}}for(r=0;r<e._fullLayout.annotations.length;r++){var x=e._fullLayout.annotations[r];-1!==t.indexOf(x.xref)&&-1!==n.indexOf(x.yref)&&s.swapAttrs(l.annotations[r],["?"])}}function Te(e,t,n,r,i){var o,a=s.nestedProperty,l=a(e[n[0]._name],t).get(),c=a(e[r[0]._name],t).get();for("title"===t&&(l&&l.text===i.x&&(l.text=i.y),c&&c.text===i.y&&(c.text=i.x)),o=0;o<n.length;o++)a(e,n[o]._name+"."+t).set(c);for(o=0;o<r.length;o++)a(e,r[o]._name+"."+t).set(l)}function Se(e){return"angularaxis"===e._id}function Ee(e,t){for(var n=t._rangebreaks.length,r=0;r<n;r++){var i=t._rangebreaks[r];if(e>=i.min&&e<i.max)return i.max}return e}function Ce(e){return-1!==(e.ticklabelposition||"").indexOf("inside")}function Me(e,t){Ce(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}V.getTickFormat=function(e){var t,n,r,i,o,a,s,l;function c(e){return"string"!=typeof e?e:Number(e.replace("M",""))*A}function u(e,t){var n=["L","D"];if(typeof e==typeof t){if("number"==typeof e)return e-t;var r=n.indexOf(e.charAt(0)),i=n.indexOf(t.charAt(0));return r===i?Number(e.replace(/(L|D)/g,""))-Number(t.replace(/(L|D)/g,"")):r-i}return"number"==typeof e?1:-1}function h(e,t){var n=null===t[0],r=null===t[1],i=u(e,t[0])>=0,o=u(e,t[1])<=0;return(n||i)&&(r||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t<e.tickformatstops.length;t++)if((r=e.tickformatstops[t]).enabled&&(i=e.dtick,o=r.dtickrange,a=void 0,s=void 0,l=void 0,a=c||function(e){return e},s=o[0],l=o[1],(!s&&"number"!=typeof s||a(s)<=a(i))&&(!l&&"number"!=typeof l||a(l)>=a(i)))){n=r;break}break;case"log":for(t=0;t<e.tickformatstops.length;t++)if((r=e.tickformatstops[t]).enabled&&h(e.dtick,r.dtickrange)){n=r;break}}return n?n.value:e.tickformat},V.getSubplots=function(e,t){var n=e._fullLayout._subplots,r=n.cartesian.concat(n.gl2d||[]),i=t?V.findSubplotsWithAxis(r,t):r;return i.sort((function(e,t){var n=e.substr(1).split("y"),r=t.substr(1).split("y");return n[0]===r[0]?+n[1]-+r[1]:+n[0]-+r[0]})),i},V.findSubplotsWithAxis=function(e,t){for(var n=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),r=[],i=0;i<e.length;i++){var o=e[i];n.test(o)&&r.push(o)}return r},V.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var n,i,o={_offset:0,_length:t.width,_id:""},a={_offset:0,_length:t.height,_id:""},s=V.list(e,"x",!0),l=V.list(e,"y",!0),c=[];for(n=0;n<s.length;n++)for(c.push({x:s[n],y:a}),i=0;i<l.length;i++)0===n&&c.push({x:o,y:l[i]}),c.push({x:s[n],y:l[i]});var u=t._clips.selectAll(".axesclip").data(c,(function(e){return e.x._id+e.y._id}));u.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(e){return"clip"+t._uid+e.x._id+e.y._id})).append("rect"),u.exit().remove(),u.each((function(e){r.select(this).select("rect").attr({x:e.x._offset||0,y:e.y._offset||0,width:e.x._length||1,height:e.y._length||1})}))}},V.draw=function(e,t,n){var r=e._fullLayout;"redraw"===t&&r._paper.selectAll("g.subplot").each((function(e){var t=e[0],n=r._plots[t];if(n){var i=n.xaxis,o=n.yaxis;n.xaxislayer.selectAll("."+i._id+"tick").remove(),n.yaxislayer.selectAll("."+o._id+"tick").remove(),n.xaxislayer.selectAll("."+i._id+"tick2").remove(),n.yaxislayer.selectAll("."+o._id+"tick2").remove(),n.xaxislayer.selectAll("."+i._id+"divider").remove(),n.yaxislayer.selectAll("."+o._id+"divider").remove(),n.gridlayer&&n.gridlayer.selectAll("path").remove(),n.zerolinelayer&&n.zerolinelayer.selectAll("path").remove(),r._infolayer.select(".g-"+i._id+"title").remove(),r._infolayer.select(".g-"+o._id+"title").remove()}}));var i=t&&"redraw"!==t?t:V.listIds(e);return s.syncOrAsync(i.map((function(t){return function(){if(t){var r=V.getFromId(e,t),i=V.drawOne(e,r,n);return r._r=r.range.slice(),r._rl=s.simpleMap(r._r,r.r2l),i}}})))},V.drawOne=function(e,t,n){var r,i,l;n=n||{},t.setScale();var c=e._fullLayout,f=t._id,p=f.charAt(0),g=V.counterLetter(f),m=c._plots[t._mainSubplot];if(m){var v=m[p+"axislayer"],y=t._mainLinePosition,b=t._mainMirrorPosition,_=t._vals=V.calcTicks(t),x=[t.mirror,y,b].join("_");for(r=0;r<_.length;r++)_[r].axInfo=x;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var w={};if(t.visible){var A,k,T=V.makeTransTickFn(t),S=V.makeTransTickLabelFn(t),E="inside"===t.ticks,C="outside"===t.ticks;if("boundaries"===t.tickson){var M=function(e,t){var n,r=[],i=function(e,t){var n=e.xbnd[t];null!==n&&r.push(s.extendFlat({},e,{x:n}))};if(t.length){for(n=0;n<t.length;n++)i(t[n],0);i(t[n-1],1)}return r}(0,_);k=V.clipEnds(t,M),A=E?k:M}else k=V.clipEnds(t,_),A=E&&"period"!==t.ticklabelmode?k:_;var O=t._gridVals=k,L=function(e,t){var n,r,i=[],o=t.length&&t[t.length-1].x<t[0].x,a=function(e,t){var n=e.xbnd[t];null!==n&&i.push(s.extendFlat({},e,{x:n}))};if(e.showdividers&&t.length){for(n=0;n<t.length;n++){var l=t[n];l.text2!==r&&a(l,o?1:0),r=l.text2}a(t[n-1],o?0:1)}return i}(t,_);if(!c._hasOnlyLargeSploms){var D=t._subplotsWith,I={};for(r=0;r<D.length;r++){i=D[r];var R=(l=c._plots[i])[g+"axis"],P=R._mainAxis._id;if(!I[P]){I[P]=1;var N="x"===p?"M0,"+R._offset+"v"+R._length:"M"+R._offset+",0h"+R._length;V.drawGrid(e,t,{vals:O,counterAxis:R,layer:l.gridlayer.select("."+f),path:N,transFn:T}),V.drawZeroLine(e,t,{counterAxis:R,layer:l.zerolinelayer,path:N,transFn:T})}}}var z=V.getTickSigns(t),F=[];if(t.ticks){var B,q,H,$=V.makeTickPath(t,y,z[2]);if(t._anchorAxis&&t.mirror&&!0!==t.mirror?(B=V.makeTickPath(t,b,z[3]),q=$+B):(B="",q=$),t.showdividers&&C&&"boundaries"===t.tickson){var W={};for(r=0;r<L.length;r++)W[L[r].x]=1;H=function(e){return W[e.x]?B:q}}else H=q;V.drawTicks(e,t,{vals:A,layer:v,path:H,transFn:T}),"allticks"===t.mirror&&(F=Object.keys(t._linepositions||{}))}for(r=0;r<F.length;r++){i=F[r],l=c._plots[i];var G=t._linepositions[i]||[],Y=V.makeTickPath(t,G[0],z[0])+V.makeTickPath(t,G[1],z[1]);V.drawTicks(e,t,{vals:A,layer:l[p+"axislayer"],path:Y,transFn:T})}var X=[];if(X.push((function(){return V.drawLabels(e,t,{vals:_,layer:v,plotinfo:l,transFn:S,labelFns:V.makeLabelFns(t,y)})})),"multicategory"===t.type){var Z={x:2,y:10}[p];X.push((function(){var n={x:"height",y:"width"}[p],r=J()[n]+Z+(t._tickAngles[f+"tick"]?t.tickfont.size*j:0);return V.drawLabels(e,t,{vals:pe(t,_),layer:v,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:T,labelFns:V.makeLabelFns(t,y+r*z[4])})})),X.push((function(){return t._depth=z[4]*(J("tick2")[t.side]-y),function(e,t,n){var r=t._id+"divider",i=n.vals,o=n.layer.selectAll("path."+r).data(i,me);o.exit().remove(),o.enter().insert("path",":first-child").classed(r,1).classed("crisp",1).call(h.stroke,t.dividercolor).style("stroke-width",d.crispRound(e,t.dividerwidth,1)+"px"),o.attr("transform",n.transFn).attr("d",n.path)}(e,t,{vals:L,layer:v,path:V.makeTickPath(t,y,z[4],t._depth),transFn:T})}))}else t.title.hasOwnProperty("standoff")&&X.push((function(){t._depth=z[4]*(J()[t.side]-y)}));var K=a.getComponentMethod("rangeslider","isVisible")(t);return X.push((function(){var n,r,i,s,l=t.side.charAt(0),u=U[t.side].charAt(0),h=V.getPxPosition(e,t),d=C?t.ticklen:0;if((t.automargin||K)&&("multicategory"===t.type?n=J("tick2"):(n=J(),"x"===p&&"b"===l&&(t._depth=Math.max(n.width>0?n.bottom-h:0,d)))),t.automargin){r={x:0,y:0,r:0,l:0,t:0,b:0};var f=[0,1];if("x"===p){if("b"===l?r[l]=t._depth:(r[l]=t._depth=Math.max(n.width>0?h-n.top:0,d),f.reverse()),n.width>0){var m=n.right-(t._offset+t._length);m>0&&(r.xr=1,r.r=m);var v=t._offset-n.left;v>0&&(r.xl=0,r.l=v)}}else if("l"===l?r[l]=t._depth=Math.max(n.height>0?h-n.left:0,d):(r[l]=t._depth=Math.max(n.height>0?n.right-h:0,d),f.reverse()),n.height>0){var y=n.bottom-(t._offset+t._length);y>0&&(r.yb=0,r.b=y);var b=t._offset-n.top;b>0&&(r.yt=1,r.t=b)}r[g]="free"===t.anchor?t.position:t._anchorAxis.domain[f[0]],t.title.text!==c._dfltTitle[p]&&(r[l]+=ve(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[u]+=d),!0===t.mirror||"ticks"===t.mirror?i[g]=t._anchorAxis.domain[f[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[g]=[t._counterDomainMin,t._counterDomainMax][f[1]]))}K&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),o.autoMargin(e,_e(t),r),o.autoMargin(e,xe(t),i),o.autoMargin(e,we(t),s)})),n.skipTitle||K&&"bottom"===t.side||X.push((function(){return function(e,t){var n,r=e._fullLayout,i=t._id,o=i.charAt(0),a=t.title.font.size;if(t.title.hasOwnProperty("standoff"))n=t._depth+t.title.standoff+ve(t);else{var s=Ce(t);if("multicategory"===t.type)n=t._depth;else{var l=1.5*a;s&&(l=.5*a,"outside"===t.ticks&&(l+=t.ticklen)),n=10+l+(t.linewidth?t.linewidth-1:0)}s||(n+="x"===o?"top"===t.side?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):"right"===t.side?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c,h,f,p,g=V.getPxPosition(e,t);if("x"===o?(h=t._offset+t._length/2,f="top"===t.side?g-n:g+n):(f=t._offset+t._length/2,h="right"===t.side?g+n:g-n,c={rotate:"-90",offset:0}),"multicategory"!==t.type){var m=t._selections[t._id+"tick"];if(p={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var v=d.getTranslate(m.node().parentNode);p.offsetLeft=v.x,p.offsetTop=v.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return u.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[o],avoid:p,transform:c,attributes:{x:h,y:f,"text-anchor":"middle"}})}(e,t)})),s.syncOrAsync(X)}}function J(e){var n=f+(e||"tick");return w[n]||(w[n]=function(e,t){var n,r,i,o;return e._selections[t].size()?(n=1/0,r=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=be(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),r=Math.max(r,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}))):(n=0,r=0,i=0,o=0),{top:n,bottom:r,left:i,right:o,height:r-n,width:o-i}}(t,n)),w[n]}},V.getTickSigns=function(e){var t=e._id.charAt(0),n={x:"top",y:"right"}[t],r=e.side===n?1:-1,i=[-1,1,r,-r];return"inside"!==e.ticks==("x"===t)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},V.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},V.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",n=function(e){return-1!==t.indexOf(e)},r=n("top"),i=n("left"),o=n("right"),a=n("bottom"),s=n("inside"),l=a||i||r||o;if(!l&&!s)return[0,0];var c=e.side,u=l?(e.tickwidth||0)/2:0,h=3,d=e.tickfont?e.tickfont.size:12;return(a||r)&&(u+=d*B,h+=(e.linewidth||0)/2),(i||o)&&(u+=(e.linewidth||0)/2,h+=3),s&&"top"===c&&(h-=d*(1-B)),(i||r)&&(u=-u),"bottom"!==c&&"right"!==c||(h=-h),[l?u:0,s?h:0]}(e),n=t[0],r=t[1];return"x"===e._id.charAt(0)?function(t){return l(n+e._offset+e.l2p(ge(t)),r)}:function(t){return l(r,n+e._offset+e.l2p(ge(t)))}},V.makeTickPath=function(e,t,n,r){r=void 0!==r?r:e.ticklen;var i=e._id.charAt(0),o=(e.linewidth||1)/2;return"x"===i?"M0,"+(t+o*n)+"v"+r*n:"M"+(t+o*n)+",0h"+r*n},V.makeLabelFns=function(e,t,n){var r=e.ticklabelposition||"",o=function(e){return-1!==r.indexOf(e)},a=o("top"),l=o("left"),c=o("right"),u=o("bottom")||l||a||c,h=o("inside"),d="inside"===r&&"inside"===e.ticks||!h&&"outside"===e.ticks&&"boundaries"!==e.tickson,f=0,p=0,g=d?e.ticklen:0;if(h?g*=-1:u&&(g=0),d&&(f+=g,n)){var m=s.deg2rad(n);f=g*Math.cos(m)+1,p=g*Math.sin(m)}e.showticklabels&&(d||e.showline)&&(f+=.2*e.tickfont.size);var v,y,b,_,x,w={labelStandoff:f+=(e.linewidth||1)/2*(h?-1:1),labelShift:p},A=0,k=e.side,T=e._id.charAt(0),S=e.tickangle;if("x"===T)_=(x=!h&&"bottom"===k||h&&"top"===k)?1:-1,h&&(_*=-1),v=p*_,y=t+f*_,b=x?1:-.2,90===Math.abs(S)&&(h?b+=F:b=-90===S&&"bottom"===k?B:90===S&&"top"===k?F:.5,A=F/2*(S/90)),w.xFn=function(e){return e.dx+v+A*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*b},w.anchorFn=function(e,t){if(u){if(l)return"end";if(c)return"start"}return i(t)&&0!==t&&180!==t?t*_<0!==h?"end":"start":"middle"},w.heightFn=function(t,n,r){return n<-60||n>60?-.5*r:"top"===e.side!==h?-r:0};else if("y"===T){if(_=(x=!h&&"left"===k||h&&"right"===k)?1:-1,h&&(_*=-1),v=f,y=p*_,b=0,h||90!==Math.abs(S)||(b=-90===S&&"left"===k||90===S&&"right"===k?B:.5),h){var E=i(S)?+S:0;if(0!==E){var C=s.deg2rad(E);A=Math.abs(Math.sin(C))*B*_,b=0}}w.xFn=function(e){return e.dx+t-(v+e.fontSize*b)*_+A*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*F},w.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":x?"end":"start"},w.heightFn=function(t,n,r){return"right"===e.side&&(n*=-1),n<-30?-r:n<30?-.5*r:0}}return w},V.drawTicks=function(e,t,n){n=n||{};var r=t._id+"tick",i=n.vals;"period"===t.ticklabelmode&&(i=i.slice()).shift();var o=n.layer.selectAll("path."+r).data(t.ticks?i:[],me);o.exit().remove(),o.enter().append("path").classed(r,1).classed("ticks",1).classed("crisp",!1!==n.crisp).call(h.stroke,t.tickcolor).style("stroke-width",d.crispRound(e,t.tickwidth,1)+"px").attr("d",n.path).style("display",null),Me(t,[P]),o.attr("transform",n.transFn)},V.drawGrid=function(e,t,n){n=n||{};var r=t._id+"grid",i=n.vals,o=n.counterAxis;if(!1===t.showgrid)i=[];else if(o&&V.shouldShowZeroLine(e,t,o))for(var a="array"===t.tickmode,s=0;s<i.length;s++){var l=i[s].x;if(a?!l:Math.abs(l)<t.dtick/100){if(i=i.slice(0,s).concat(i.slice(s+1)),!a)break;s--}}var c=n.layer.selectAll("path."+r).data(i,me);c.exit().remove(),c.enter().append("path").classed(r,1).classed("crisp",!1!==n.crisp),t._gw=d.crispRound(e,t.gridwidth,1),c.attr("transform",n.transFn).attr("d",n.path).call(h.stroke,t.gridcolor||"#ddd").style("stroke-width",t._gw+"px").style("display",null),Me(t,[R]),"function"==typeof n.path&&c.attr("d",n.path)},V.drawZeroLine=function(e,t,n){n=n||n;var r=t._id+"zl",i=V.shouldShowZeroLine(e,t,n.counterAxis),o=n.layer.selectAll("path."+r).data(i?[{x:0,id:t._id}]:[]);o.exit().remove(),o.enter().append("path").classed(r,1).classed("zl",1).classed("crisp",!1!==n.crisp).each((function(){n.layer.selectAll("path").sort((function(e,t){return $(e.id,t.id)}))})),o.attr("transform",n.transFn).attr("d",n.path).call(h.stroke,t.zerolinecolor||h.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Me(t,[I])},V.drawLabels=function(e,t,n){n=n||{};var o=e._fullLayout,a=t._id,u=a.charAt(0),h=n.cls||a+"tick",f=n.vals,p=n.labelFns,g=n.secondary?0:t.tickangle,m=(t._prevTickAngles||{})[h],v=n.layer.selectAll("g."+h).data(t.showticklabels?f:[],me),y=[];function b(e,o){e.each((function(e){var a=r.select(this),s=a.select(".text-math-group"),u=p.anchorFn(e,o),h=n.transFn.call(a.node(),e)+(i(o)&&0!=+o?" rotate("+o+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),f=c.lineCount(a),g=j*e.fontSize,m=p.heightFn(e,i(o)?+o:0,(f-1)*g);if(m&&(h+=l(0,m)),s.empty()){var v=a.select("text");v.attr({transform:h,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=d.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",h+l(y,0))}}))}v.enter().append("g").classed(h,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),i=e._promises.length;n.call(c.positionText,p.xFn(t),p.yFn(t)).call(d.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[i]?y.push(e._promises.pop().then((function(){b(n,g)}))):b(n,g)})),Me(t,[N]),v.exit().remove(),n.repositionOnUpdate&&v.each((function(e){r.select(this).select("text").call(c.positionText,p.xFn(e),p.yFn(e))})),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var i=-1!==n.indexOf("hide"),a="x"===t._id.charAt(0),l=0,c=a?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=s.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var h=Math.min(l,c),f=Math.max(l,c),p=t.side,g=1/0,m=-1/0;for(var y in v.each((function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var o=d.bBox(n.node()),s=0;a?(o.right>f||o.left<h)&&(s=1):(o.bottom>f||o.top+(t.tickangle?0:e.fontSize/4)<h)&&(s=1);var l=n.select("text");s?i&&l.style("opacity",0):(l.style("opacity",1),g="bottom"===p||"right"===p?Math.min(g,a?o.top:o.left):-1/0,m="top"===p||"left"===p?Math.max(m,a?o.bottom:o.right):1/0)}})),o._plots){var b=o._plots[y];if(t._id===b.xaxis._id||t._id===b.yaxis._id){var _=a?b.yaxis:b.xaxis;_&&(_["_visibleLabelMin_"+t._id]=g,_["_visibleLabelMax_"+t._id]=m)}}}},t._hideCounterAxisInsideTickLabels=function(e){var n="x"===t._id.charAt(0),i=[];for(var a in o._plots){var s=o._plots[a];t._id!==s.xaxis._id&&t._id!==s.yaxis._id||i.push(n?s.yaxis:s.xaxis)}i.forEach((function(n,i){n&&Ce(n)&&(e||[I,R,P,N]).forEach((function(e){var a="tick"===e.K&&"text"===e.L&&"period"===t.ticklabelmode,s=o._plots[t._mainSubplot];(e.K===I.K?s.zerolinelayer.selectAll("."+t._id+"zl"):e.K===R.K?s.gridlayer.selectAll("."+t._id):s[t._id.charAt(0)+"axislayer"]).each((function(){var o=r.select(this);e.L&&(o=o.selectAll(e.L)),o.each((function(o){var s=t.l2p(a?ge(o):o.x)+t._offset,l=r.select(this);s<t["_visibleLabelMax_"+n._id]&&s>t["_visibleLabelMin_"+n._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},b(v,m+1?m:g);var _=null;t._selections&&(t._selections[h]=v);var x=[function(){return y.length&&Promise.all(y)}];t.automargin&&o._redrawFromAutoMarginCount&&90===m?(_=90,x.push((function(){b(v,m)}))):x.push((function(){if(b(v,g),f.length&&"x"===u&&!i(g)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){_=0;var e,r=0,o=[];if(v.each((function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),i=be(this),a=d.bBox(i.node());o.push({top:0,bottom:10,height:10,left:n-a.width/2,right:n+a.width/2+2,width:a.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||n.secondary){var a=f.length,l=Math.abs((f[a-1].x-f[0].x)*t._m)/(a-1),c=t.ticklabelposition||"",h=function(e){return-1!==c.indexOf(e)},p=h("top"),m=h("left"),y=h("right"),x=h("bottom")||m||p||y?(t.tickwidth||0)+6:0,w=l<2.5*r||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e<o.length-1;e++)if(s.bBoxIntersect(o[e],o[e+1],x)){_=w?90:30;break}}else{var A=2;for(t.ticks&&(A+=t.tickwidth/2),e=0;e<o.length;e++){var k=f[e].xbnd,T=o[e];if(null!==k[0]&&T.left-t.l2p(k[0])<A||null!==k[1]&&t.l2p(k[1])-T.right<A){_=90;break}}}_&&b(v,_)}})),t._tickAngles&&x.push((function(){t._tickAngles[h]=null===_?i(g)?g:0:_}));var w=t._anchorAxis;w&&w.autorange&&Ce(t)&&!W(o,t._id)&&(o._insideTickLabelsAutorange||(o._insideTickLabelsAutorange={}),o._insideTickLabelsAutorange[w._name+".autorange"]=w.autorange,x.push((function(){v.each((function(e,n){var r=be(this);r.select(".text-math-group").empty()&&(t._vals[n].bb=d.bBox(r.node()))}))})));var A=s.syncOrAsync(x);return A&&A.then&&e._promises.push(A),A},V.getPxPosition=function(e,t){var n,r=e._fullLayout._size,i=t._id.charAt(0),o=t.side;return"free"!==t.anchor?n=t._anchorAxis:"x"===i?n={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:"y"===i&&(n={_offset:r.l+(t.position||0)*r.w,_length:0}),"top"===o||"left"===o?n._offset:"bottom"===o||"right"===o?n._offset+n._length:void 0},V.shouldShowZeroLine=function(e,t,n){var r=s.simpleMap(t.range,t.r2l);return r[0]*r[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===D)&&(ye(t,0)||!function(e,t,n,r){var i=n._mainAxis;if(i){var o=e._fullLayout,a=t._id.charAt(0),s=V.counterLetter(t._id),l=t._offset+(Math.abs(r[0])<Math.abs(r[1])==("x"===a)?0:t._length),c=o._plots[n._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(n);for(var u=V.list(e,s),h=0;h<u.length;h++){var d=u[h];if(d._mainAxis===i&&f(d))return!0}}function f(e){if(!e.showline||!e.linewidth)return!1;var n=Math.max((e.linewidth+t.zerolinewidth)/2,1);function r(e){return"number"==typeof e&&Math.abs(e-l)<n}if(r(e._mainLinePosition)||r(e._mainMirrorPosition))return!0;var i=e._linepositions||{};for(var o in i)if(r(i[o][0])||r(i[o][1]))return!0}}(e,t,n,r)||function(e,t){for(var n=e._fullData,r=t._mainSubplot,i=t._id.charAt(0),o=0;o<n.length;o++){var s=n[o];if(!0===s.visible&&s.xaxis+s.yaxis===r){if(a.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(e,t))},V.clipEnds=function(e,t){return t.filter((function(t){return ye(e,t.x)}))},V.allowAutoMargin=function(e){for(var t=V.list(e,"",!0),n=0;n<t.length;n++){var r=t[n];r.automargin&&(o.allowAutoMargin(e,_e(r)),r.mirror&&o.allowAutoMargin(e,xe(r))),a.getComponentMethod("rangeslider","isVisible")(r)&&o.allowAutoMargin(e,we(r))}},V.swap=function(e,t){for(var n=function(e,t){var n,r,i=[];for(n=0;n<t.length;n++){var o=[],a=e._fullData[t[n]].xaxis,s=e._fullData[t[n]].yaxis;if(a&&s){for(r=0;r<i.length;r++)-1===i[r].x.indexOf(a)&&-1===i[r].y.indexOf(s)||o.push(r);if(o.length){var l,c=i[o[0]];if(o.length>1)for(r=1;r<o.length;r++)l=i[o[r]],Ae(c.x,l.x),Ae(c.y,l.y);Ae(c.x,[a]),Ae(c.y,[s])}else i.push({x:[a],y:[s]})}}return i}(e,t),r=0;r<n.length;r++)ke(e,n[r].x,n[r].y)}},{"../../components/color":366,"../../components/drawing":388,"../../components/titles":464,"../../constants/alignment":471,"../../constants/numerical":479,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"./autorange":553,"./axis_autotype":555,"./axis_ids":558,"./clean_ticks":560,"./layout_attributes":569,"./set_convert":576,"@plotly/d3":58,"fast-isnumeric":190}],555:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical").BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(e,t){return t?r(e):"number"==typeof e}function h(e){return Math.max(1,(e-1)/1e3)}t.exports=function(e,t,n){var i=e,d=n.noMultiCategory;if(a(i)&&!i.length)return"-";if(!d&&function(e){return a(e[0])&&a(e[1])}(i))return"multicategory";if(d&&Array.isArray(i[0])){for(var f=[],p=0;p<i.length;p++)if(a(i[p]))for(var g=0;g<i[p].length;g++)f.push(i[p][g]);i=f}if(function(e,t){for(var n=e.length,i=h(n),o=0,a=0,l={},u=0;u<n;u+=i){var d=e[c(u)],f=String(d);l[f]||(l[f]=1,s(d,t)&&o++,r(d)&&a++)}return o>2*a}(i,t))return"date";var m="strict"!==n.autotypenumbers;return function(e,t){for(var n=e.length,r=h(n),i=0,a=0,s={},u=0;u<n;u+=r){var d=e[c(u)],f=String(d);if(!s[f]){s[f]=1;var p=typeof d;"boolean"===p?a++:(t?l(d)!==o:"number"===p)?i++:"string"===p&&a++}}return a>2*i}(i,m)?"category":function(e,t){for(var n=e.length,r=0;r<n;r++)if(u(e[r],t))return!0;return!1}(i,m)?"linear":"-"}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],556:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../registry"),o=e("../../lib"),a=e("../array_container_defaults"),s=e("./layout_attributes"),l=e("./tick_value_defaults"),c=e("./tick_mark_defaults"),u=e("./tick_label_defaults"),h=e("./prefix_suffix_defaults"),d=e("./category_order_defaults"),f=e("./line_grid_defaults"),p=e("./set_convert"),g=e("./constants").WEEKDAY_PATTERN,m=e("./constants").HOUR_PATTERN;function v(e,t,n){function i(n,r){return o.coerce(e,t,s.rangebreaks,n,r)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var l,c,u="";if(2===a.length)for(l=0;l<2;l++)if(c=b(a[l])){u=g;break}var h=i("pattern",u);if(h===g)for(l=0;l<2;l++)(c=b(a[l]))&&(t.bounds[l]=a[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=a[l],h){case g:if(!r(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=a[l]=c;break;case m:if(!r(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=a[l]=c}if(!1===n.autorange){var d=n.range;if(d[0]<d[1]){if(a[0]<d[0]&&a[1]>d[1])return void(t.enabled=!1)}else if(a[0]>d[0]&&a[1]<d[1])return void(t.enabled=!1)}}else{var f=i("values");if(!f||!f.length)return void(t.enabled=!1);i("dvalue")}}}t.exports=function(e,t,n,r,m){var y,b=r.letter,_=r.font||{},x=r.splomStash||{},w=n("visible",!r.visibleDflt),A=t._template||{},k=t.type||A.type||"-";"date"===k&&(i.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",r.calendar),r.noTicklabelmode||(y=n("ticklabelmode")));var T="";r.noTicklabelposition&&"multicategory"!==k||(T=o.coerce(e,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===y?["outside","inside"]:"x"===b?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),r.noTicklabeloverflow||n("ticklabeloverflow",-1!==T.indexOf("inside")?"hide past domain":"category"===k||"multicategory"===k?"allow":"hide past div"),p(t,m);var S=!t.isValidRange(e.range);S&&r.reverseDflt&&(S="reversed"),!n("autorange",S)||"linear"!==k&&"-"!==k||n("rangemode"),n("range"),t.cleanRange(),d(e,t,n,r),"category"===k||r.noHover||n("hoverformat");var E=n("color"),C=E!==s.color.dflt?E:_.color,M=x.label||m._dfltTitle[b];if(h(e,t,n,k,r),!w)return t;n("title.text",M),o.coerceFont(n,"title.font",{family:_.family,size:o.bigFont(_.size),color:C}),l(e,t,n,k),u(e,t,n,k,r),c(e,t,n,r),f(e,t,n,{dfltColor:E,bgColor:r.bgColor,showGrid:r.showGrid,attributes:s}),(t.showline||t.ticks)&&n("mirror"),r.automargin&&n("automargin");var O,L="multicategory"===k;if(r.noTickson||"category"!==k&&!L||!t.ticks&&!t.showgrid||(L&&(O="boundaries"),"boundaries"===n("tickson",O)&&delete t.ticklabelposition),L&&n("showdividers")&&(n("dividercolor"),n("dividerwidth")),"date"===k)if(a(e,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:v}),t.rangebreaks.length){for(var D=0;D<t.rangebreaks.length;D++)if(t.rangebreaks[D].pattern===g){t._hasDayOfWeekBreaks=!0;break}if(p(t,m),m._has("scattergl")||m._has("splom"))for(var I=0;I<r.data.length;I++){var R=r.data[I];"scattergl"!==R.type&&"splom"!==R.type||(R.visible=!1,o.warn(R.type+" traces do not work on axes with rangebreaks. Setting trace "+R.index+" to `visible: false`."))}}else delete t.rangebreaks;return t};var y={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(e){if("string"==typeof e)return y[e.substr(0,3).toLowerCase()]}},{"../../lib":503,"../../registry":638,"../array_container_defaults":549,"./category_order_defaults":559,"./constants":561,"./layout_attributes":569,"./line_grid_defaults":571,"./prefix_suffix_defaults":573,"./set_convert":576,"./tick_label_defaults":578,"./tick_mark_defaults":579,"./tick_value_defaults":580,"fast-isnumeric":190}],557:[function(e,t,n){"use strict";var r=e("../../constants/docs"),i=r.FORMAT_LINK,o=r.DATE_FORMAT_LINK;function a(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(e,t){return a(e,t)+[" And for dates see: "+o+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?a:s)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},{"../../constants/docs":474}],558:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("./constants");function o(e,t){if(t&&t.length)for(var n=0;n<t.length;n++)if(t[n][e])return!0;return!1}n.id2name=function(e){if("string"==typeof e&&e.match(i.AX_ID_PATTERN)){var t=e.split(" ")[0].substr(1);return"1"===t&&(t=""),e.charAt(0)+"axis"+t}},n.name2id=function(e){if(e.match(i.AX_NAME_PATTERN)){var t=e.substr(5);return"1"===t&&(t=""),e.charAt(0)+t}},n.cleanId=function(e,t,n){var r=/( domain)$/.test(e);if("string"==typeof e&&e.match(i.AX_ID_PATTERN)&&(!t||e.charAt(0)===t)&&(!r||n)){var o=e.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===o&&(o=""),e.charAt(0)+o+(r&&n?" domain":"")}},n.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var o,a=n.listIds(e,t),s=new Array(a.length);for(o=0;o<a.length;o++){var l=a[o];s[o]=i[l.charAt(0)+"axis"+l.substr(1)]}if(!r){var c=i._subplots.gl3d||[];for(o=0;o<c.length;o++){var u=i[c[o]];t?s.push(u[t+"axis"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},n.listIds=function(e,t){var n=e._fullLayout;if(!n)return[];var r=n._subplots;return t?r[t+"axis"]:r.xaxis.concat(r.yaxis)},n.getFromId=function(e,t,r){var i=e._fullLayout;return t=void 0===t||"string"!=typeof t?t:t.replace(" domain",""),"x"===r?t=t.replace(/y[0-9]*/,""):"y"===r&&(t=t.replace(/x[0-9]*/,"")),i[n.id2name(t)]},n.getFromTrace=function(e,t,i){var o=e._fullLayout,a=null;if(r.traceIs(t,"gl3d")){var s=t.scene;"scene"===s.substr(0,5)&&(a=o[s][i+"axis"])}else a=n.getFromId(e,t[i+"axis"]||i);return a},n.idSort=function(e,t){var n=e.charAt(0),r=t.charAt(0);return n!==r?n>r?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},n.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},n.isLinked=function(e,t){return o(t,e._axisMatchGroups)||o(t,e._axisConstraintGroups)}},{"../../registry":638,"./constants":561}],559:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){if("category"===t.type){var i,o=e.categoryarray,a=Array.isArray(o)&&o.length>0;a&&(i="array");var s,l=n("categoryorder",i);"array"===l&&(s=n("categoryarray")),a||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var n,r,i,o=t.dataAttr||e._id.charAt(0),a={};if(t.axData)n=t.axData;else for(n=[],r=0;r<t.data.length;r++){var s=t.data[r];s[o+"axis"]===e._id&&n.push(s)}for(r=0;r<n.length;r++){var l=n[r][o];for(i=0;i<l.length;i++){var c=l[i];null!=c&&(a[c]=1)}}return Object.keys(a)}(t,r).sort(),"category ascending"===l?t._initialCategories=s:"category descending"===l&&(t._initialCategories=s.reverse()))}}},{}],560:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical"),a=o.ONEDAY,s=o.ONEWEEK;n.dtick=function(e,t){var n="log"===t,i="date"===t,o="category"===t,s=i?a:1;if(!e)return s;if(r(e))return(e=Number(e))<=0?s:o?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if("string"!=typeof e||!i&&!n)return s;var l=e.charAt(0),c=e.substr(1);return(c=r(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||n&&"L"===l||n&&"D"===l&&(1===c||2===c))?s:e},n.tick0=function(e,t,n,o){return"date"===t?i.cleanDate(e,i.dateTick0(n,o%s==0?1:0)):"D1"!==o&&"D2"!==o?r(e)?Number(e):0:void 0}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],561:[function(e,t,n){"use strict";var r=e("../../lib/regex").counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},{"../../lib/regex":520}],562:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./autorange"),o=e("./axis_ids").id2name,a=e("./layout_attributes"),s=e("./scale_zoom"),l=e("./set_convert"),c=e("../../constants/numerical").ALMOST_EQUAL,u=e("../../constants/alignment").FROM_BL;function h(e,t,n){var i=n.axIds,s=n.layoutOut,l=n.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,h=t._id,g=h.charAt(0),m=((s._splomAxes||{})[g]||{})[h]||{},v=t._id,y="x"===v.charAt(0);function b(n,i){return r.coerce(e,t,a,n,i)}t._matchGroup=null,t._constraintGroup=null,b("constrain",l?"domain":"range"),r.coerce(e,t,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var _,x,w=t.type,A=[];for(_=0;_<i.length;_++)(x=i[_])!==v&&s[o(x)].type===w&&A.push(x);var k=f(c,v);if(k){var T=[];for(_=0;_<A.length;_++)k[x=A[_]]||T.push(x);A=T}var S,E,C=A.length;C&&(e.matches||m.matches)&&(S=r.coerce(e,t,{matches:{valType:"enumerated",values:A,dflt:-1!==A.indexOf(m.matches)?m.matches:void 0}},"matches"));var M=l&&!y?t.anchor:void 0;if(C&&!S&&(e.scaleanchor||M)&&(E=r.coerce(e,t,{scaleanchor:{valType:"enumerated",values:A}},"scaleanchor",M)),S){t._matchGroup=p(u,v,S,1);var O=s[o(S)],L=d(s,t)/d(s,O);y!==("x"===S.charAt(0))&&(L=(y?"x":"y")+L),p(c,v,S,L)}else e.matches&&-1!==i.indexOf(e.matches)&&r.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(E){var D=b("scaleratio");D||(D=t.scaleratio=1),p(c,v,E,D)}else e.scaleanchor&&-1!==i.indexOf(e.scaleanchor)&&r.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function d(e,t){var n=t.domain;return n||(n=e[o(t.overlaying)].domain),n[1]-n[0]}function f(e,t){for(var n=0;n<e.length;n++)if(e[n][t])return e[n];return null}function p(e,t,n,r){var i,o,a,s,l,c=f(e,t);null===c?((c={})[t]=1,l=e.length,e.push(c)):l=e.indexOf(c);var u=Object.keys(c);for(i=0;i<e.length;i++)if(a=e[i],i!==l&&a[n]){var h=a[n];for(o=0;o<u.length;o++)a[s=u[o]]=g(h,g(r,c[s]));return void e.splice(l,1)}if(1!==r)for(o=0;o<u.length;o++){var d=u[o];c[d]=g(r,c[d])}c[n]=1}function g(e,t){var n,r,i="",o="";"string"==typeof e&&(n=(i=e.match(/^[xy]*/)[0]).length,e=+e.substr(n)),"string"==typeof t&&(r=(o=t.match(/^[xy]*/)[0]).length,t=+t.substr(r));var a=e*t;return n||r?n&&r&&i.charAt(0)!==o.charAt(0)?n===r?a:(n>r?i.substr(r):o.substr(n))+a:i+o+e*t:a}function m(e,t){for(var n=t._size,r=n.h/n.w,i={},o=Object.keys(e),a=0;a<o.length;a++){var s=o[a],l=e[s];if("string"==typeof l){var c=l.match(/^[xy]*/)[0],u=c.length;l=+l.substr(u);for(var h="y"===c.charAt(0)?r:1/r,d=0;d<u;d++)l*=h}i[s]=l}return i}function v(e,t){var n=e._inputDomain,r=u[e.constraintoward],i=n[0]+(n[1]-n[0])*r;e.domain=e._input.domain=[i+(n[0]-i)/t,i+(n[1]-i)/t],e.setScale()}n.handleDefaults=function(e,t,n){var i,a,s,c,u,d,f,p,g=n.axIds,m=n.axHasImage,v=t._axisConstraintGroups=[],y=t._axisMatchGroups=[];for(i=0;i<g.length;i++)h(u=e[c=o(g[i])],d=t[c],{axIds:g,layoutOut:t,hasImage:m[c]});function b(e,n){for(i=0;i<e.length;i++)for(s in a=e[i])t[o(s)][n]=a}for(b(y,"_matchGroup"),i=0;i<v.length;i++)for(s in a=v[i])if((d=t[o(s)]).fixedrange){for(var _ in a){var x=o(_);!1===(e[x]||{}).fixedrange&&r.warn("fixedrange was specified as false for axis "+x+" but was overridden because another axis in its constraint group has fixedrange true"),t[x].fixedrange=!0}break}for(i=0;i<v.length;){for(s in a=v[i]){(d=t[o(s)])._matchGroup&&Object.keys(d._matchGroup).length===Object.keys(a).length&&(v.splice(i,1),i--);break}i++}b(v,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],A=!1,k=!1;function T(){p=d[f],"rangebreaks"===f&&(k=d._hasDayOfWeekBreaks)}for(i=0;i<y.length;i++){a=y[i];for(var S=0;S<w.length;S++){var E;for(s in f=w[S],p=null,a)if(u=e[c=o(s)],d=t[c],f in d){if(!d.matches&&(E=d,f in u)){T();break}null===p&&f in u&&T()}if("range"===f&&p&&(A=!0),"autorange"===f&&null===p&&A&&(p=!1),null===p&&f in E&&(p=E[f]),null!==p)for(s in a)(d=t[o(s)])[f]="range"===f?p.slice():p,"rangebreaks"===f&&(d._hasDayOfWeekBreaks=k,l(d,t))}}},n.enforce=function(e){var t,n,r,a,l,u,h,d,f=e._fullLayout,p=f._axisConstraintGroups||[];for(t=0;t<p.length;t++){r=m(p[t],f);var g=Object.keys(r),y=1/0,b=0,_=1/0,x={},w={},A=!1;for(n=0;n<g.length;n++)w[a=g[n]]=l=f[o(a)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),x[a]=u=Math.abs(l._m)/r[a],y=Math.min(y,u),"domain"!==l.constrain&&l._constraintShrinkable||(_=Math.min(_,u)),delete l._constraintShrinkable,b=Math.max(b,u),"domain"===l.constrain&&(A=!0);if(!(y>c*b)||A)for(n=0;n<g.length;n++)if(u=x[a=g[n]],h=(l=w[a]).constrain,u!==_||"domain"===h)if(d=u/_,"range"===h)s(l,d);else{var k=l._inputDomain,T=(l.domain[1]-l.domain[0])/(k[1]-k[0]),S=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((d/=T)*S<1){l.domain=l._input.domain=k.slice(),s(l,d);continue}if(S<1&&(l.range=l._input.range=l._inputRange.slice(),d*=S),l.autorange){var E=l.r2l(l.range[0]),C=l.r2l(l.range[1]),M=(E+C)/2,O=M,L=M,D=Math.abs(C-M),I=M-D*d*1.0001,R=M+D*d*1.0001,P=i.makePadFn(f,l,0),N=i.makePadFn(f,l,1);v(l,d);var z,F,B=Math.abs(l._m),j=i.concatExtremes(e,l),U=j.min,V=j.max;for(F=0;F<U.length;F++)(z=U[F].val-P(U[F])/B)>I&&z<O&&(O=z);for(F=0;F<V.length;F++)(z=V[F].val+N(V[F])/B)<R&&z>L&&(L=z);d/=(L-O)/(2*D),O=l.l2r(O),L=l.l2r(L),l.range=l._input.range=E<C?[O,L]:[L,O]}v(l,d)}}},n.getAxisGroup=function(e,t){for(var n=e._axisMatchGroups,r=0;r<n.length;r++)if(n[r][t])return"g"+r;return t},n.clean=function(e,t){if(t._inputDomain){for(var n=!1,r=t._id,i=e._fullLayout._axisConstraintGroups,o=0;o<i.length;o++)if(i[o][r]){n=!0;break}n&&"domain"===t.constrain||(t._input.domain=t.domain=t._inputDomain,delete t._inputDomain)}}},{"../../constants/alignment":471,"../../constants/numerical":479,"../../lib":503,"./autorange":553,"./axis_ids":558,"./layout_attributes":569,"./scale_zoom":574,"./set_convert":576}],563:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=i.numberFormat,a=e("tinycolor2"),s=e("has-passive-events"),l=e("../../registry"),c=i.strTranslate,u=e("../../lib/svg_text_utils"),h=e("../../components/color"),d=e("../../components/drawing"),f=e("../../components/fx"),p=e("./axes"),g=e("../../lib/setcursor"),m=e("../../components/dragelement"),v=e("../../components/dragelement/helpers"),y=v.selectingOrDrawing,b=v.freeMode,_=e("../../constants/alignment").FROM_TL,x=e("../../lib/clear_gl_canvases"),w=e("../../plot_api/subroutines").redrawReglTraces,A=e("../plots"),k=e("./axis_ids").getFromId,T=e("./select").prepSelect,S=e("./select").clearSelect,E=e("./select").selectOnClick,C=e("./scale_zoom"),M=e("./constants"),O=M.MINDRAG,L=M.MINZOOM,D=!0;function I(e,t,n,r){var o=i.ensureSingle(e.draglayer,t,n,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return o.call(g,r),o.node()}function R(e,t,n,i,o,a,s){var l=I(e,"rect",t,n);return r.select(l).call(d.setRect,i,o,a,s),l}function P(e,t){for(var n=0;n<e.length;n++)if(!e[n].fixedrange)return t;return""}function N(e,t,n,r,i){for(var o=0;o<e.length;o++){var a=e[o];if(!a.fixedrange)if(a.rangebreaks){var s="y"===a._id.charAt(0),l=s?1-t:t,c=s?1-n:n;r[a._name+".range[0]"]=a.l2r(a.p2l(l*a._length)),r[a._name+".range[1]"]=a.l2r(a.p2l(c*a._length))}else{var u=a._rl[0],h=a._rl[1]-u;r[a._name+".range[0]"]=a.l2r(u+h*t),r[a._name+".range[1]"]=a.l2r(u+h*n)}}if(i&&i.length){var d=(t+(1-n))/2;N(i,d,1-d,r,[])}}function z(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r.fixedrange)if(r.rangebreaks){var i=r._length,o=(r.p2l(0+t)-r.p2l(0)+(r.p2l(i+t)-r.p2l(i)))/2;r.range=[r.l2r(r._rl[0]-o),r.l2r(r._rl[1]-o)]}else r.range=[r.l2r(r._rl[0]-t/r._m),r.l2r(r._rl[1]-t/r._m)]}}function F(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function B(e,t,n,r,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(n,r)).attr("d",i+"Z")}function j(e,t,n){return e.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,n)).attr("d","M0,0Z")}function U(e,t,n,r,i,o){e.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),V(e,t,i,o)}function V(e,t,n,r){n||(e.transition().style("fill",r>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function q(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){D&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),D=!1)}function $(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function W(e,t,n,r,o){for(var a,s,l,c,u=!1,h={},d={},f=(o||{}).xaHash,p=(o||{}).yaHash,g=0;g<t.length;g++){var m=t[g];for(a in n)if(m[a]){for(l in m)o&&(f[l]||p[l])||("x"===l.charAt(0)?n:r)[l]||(h[l]=a);for(s in r)o&&(f[s]||p[s])||!m[s]||(u=!0)}for(s in r)if(m[s])for(c in m)o&&(f[c]||p[c])||("x"===c.charAt(0)?n:r)[c]||(d[c]=s)}u&&(i.extendFlat(h,d),d={});var v={},y=[];for(l in h){var b=k(e,l);y.push(b),v[b._id]=b}var _={},x=[];for(c in d){var w=k(e,c);x.push(w),_[w._id]=w}return{xaHash:v,yaHash:_,xaxes:y,yaxes:x,xLinks:h,yLinks:d,isSubplotConstrained:u}}function G(e,t){if(s){var n=void 0!==e.onwheel?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(n,e._onwheel),e._onwheel=t,e.addEventListener(n,t,{passive:!1})}else void 0!==e.onwheel?e.onwheel=t:void 0!==e.onmousewheel?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener("wheel",t,{passive:!1}))}function Y(e){var t=[];for(var n in e)t.push(e[n]);return t}t.exports={makeDragBox:function(e,t,n,s,c,h,g,v){var D,I,V,X,Z,K,J,Q,ee,te,ne,re,ie,oe,ae,se,le,ce,ue,he,de,fe,pe,ge=e._fullLayout._zoomlayer,me=g+v==="nsew",ve=1===(g+v).length;function ye(){if(D=t.xaxis,I=t.yaxis,ee=D._length,te=I._length,J=D._offset,Q=I._offset,(V={})[D._id]=D,(X={})[I._id]=I,g&&v)for(var n=t.overlays,r=0;r<n.length;r++){var i=n[r].xaxis;V[i._id]=i;var o=n[r].yaxis;X[o._id]=o}Z=Y(V),K=Y(X),ie=P(Z,v),oe=P(K,g),ae=!oe&&!ie,re=W(e,e._fullLayout._axisMatchGroups,V,X);var a=(ne=W(e,e._fullLayout._axisConstraintGroups,V,X,re)).isSubplotConstrained||re.isSubplotConstrained;se=v||a,le=g||a;var s=e._fullLayout;ce=s._has("scattergl"),ue=s._has("splom"),he=s._has("svg")}ye();var be=function(e,t,n){return e?"nsew"===e?n?"":"pan"===t?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}(oe+ie,e._fullLayout.dragmode,me),_e=R(t,g+v+"drag",be,n,s,c,h);if(ae&&!me)return _e.onmousedown=null,_e.style.pointerEvents="none",_e;var xe,we,Ae,ke,Te,Se,Ee,Ce,Me,Oe,Le={element:_e,gd:e,plotinfo:t};function De(){Le.plotinfo.selection=!1,S(e)}function Ie(e,n){var i=Le.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(q(i),2!==e||ve||He(),me)a.indexOf("select")>-1&&E(n,i,Z,K,t.id,Le),a.indexOf("event")>-1&&f.click(i,n,t.id);else if(1===e&&ve){var s=g?I:D,c="s"===g||"w"===v?0:1,h=s._name+".range["+c+"]",d=function(e,t){var n,r=e.range[t],i=Math.abs(r-e.range[1-t]);return"date"===e.type?r:"log"===e.type?(n=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(n)+"g")(r))}(s,c),p="left",m="middle";if(s.fixedrange)return;g?(m="n"===g?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&r.select(_e).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(d),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:m}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,h,t)}))}}}function Re(t,n){if(e._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(ee,fe*t+xe)),i=Math.max(0,Math.min(te,pe*n+we)),o=Math.abs(r-xe),a=Math.abs(i-we);function s(){Ee="",Ae.r=Ae.l,Ae.t=Ae.b,Me.attr("d","M0,0Z")}if(Ae.l=Math.min(xe,r),Ae.r=Math.max(xe,r),Ae.t=Math.min(we,i),Ae.b=Math.max(we,i),ne.isSubplotConstrained)o>L||a>L?(Ee="xy",o/ee>a/te?(a=o*te/ee,we>i?Ae.t=we-a:Ae.b=we+a):(o=a*ee/te,xe>r?Ae.l=xe-o:Ae.r=xe+o),Me.attr("d",$(Ae))):s();else if(re.isSubplotConstrained)if(o>L||a>L){Ee="xy";var l=Math.min(Ae.l/ee,(te-Ae.b)/te),c=Math.max(Ae.r/ee,(te-Ae.t)/te);Ae.l=l*ee,Ae.r=c*ee,Ae.b=(1-l)*te,Ae.t=(1-c)*te,Me.attr("d",$(Ae))}else s();else!oe||a<Math.min(Math.max(.6*o,O),L)?o<O||!ie?s():(Ae.t=0,Ae.b=te,Ee="x",Me.attr("d",function(e,t){return"M"+(e.l-.5)+","+(t-L-.5)+"h-3v"+(2*L+1)+"h3ZM"+(e.r+.5)+","+(t-L-.5)+"h3v"+(2*L+1)+"h-3Z"}(Ae,we))):!ie||o<Math.min(.6*a,L)?(Ae.l=0,Ae.r=ee,Ee="y",Me.attr("d",function(e,t){return"M"+(t-L-.5)+","+(e.t-.5)+"v-3h"+(2*L+1)+"v3ZM"+(t-L-.5)+","+(e.b+.5)+"v3h"+(2*L+1)+"v-3Z"}(Ae,xe))):(Ee="xy",Me.attr("d",$(Ae)));Ae.w=Ae.r-Ae.l,Ae.h=Ae.b-Ae.t,Ee&&(Oe=!0),e._dragged=Oe,U(Ce,Me,Ae,Te,Se,ke),Pe(),e.emit("plotly_relayouting",de),Se=!0}function Pe(){de={},"xy"!==Ee&&"x"!==Ee||(N(Z,Ae.l/ee,Ae.r/ee,de,ne.xaxes),Ve("x",de)),"xy"!==Ee&&"y"!==Ee||(N(K,(te-Ae.b)/te,(te-Ae.t)/te,de,ne.yaxes),Ve("y",de))}function Ne(){Pe(),q(e),$e(),H(e)}Le.prepFn=function(t,n,r){var o=Le.dragmode,s=e._fullLayout.dragmode;s!==o&&(Le.dragmode=s),ye(),fe=e._fullLayout._invScaleX,pe=e._fullLayout._invScaleY,ae||(me?t.shiftKey?"pan"===s?s="zoom":y(s)||(s="pan"):t.ctrlKey&&(s="pan"):s="pan"),b(s)?Le.minDrag=1:Le.minDrag=void 0,y(s)?(Le.xaxes=Z,Le.yaxes=K,T(t,n,r,Le,s)):(Le.clickFn=Ie,y(o)&&De(),ae||("zoom"===s?(Le.moveFn=Re,Le.doneFn=Ne,Le.minDrag=1,function(t,n,r){var o=_e.getBoundingClientRect();xe=n-o.left,we=r-o.top,e._fullLayout._calcInverseTransform(e);var s=i.apply3DTransform(e._fullLayout._invTransform)(xe,we);xe=s[0],we=s[1],Ae={l:xe,r:xe,w:0,t:we,b:we,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:a(e._fullLayout.plot_bgcolor).getLuminance(),Se=!1,Ee="xy",Oe=!1,Ce=B(ge,ke,J,Q,Te="M0,0H"+ee+"V"+te+"H0V0"),Me=j(ge,J,Q)}(0,n,r)):"pan"===s&&(Le.moveFn=Ue,Le.doneFn=$e))),e._fullLayout._redrag=function(){var t=e._dragdata;if(t&&t.element===_e){var n=e._fullLayout.dragmode;y(n)||(ye(),We([0,0,ee,te]),Le.moveFn(t.dx,t.dy))}}},m.init(Le);var ze=[0,0,ee,te],Fe=null,Be=M.REDRAWDELAY,je=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Ue(t,n){if(t*=fe,n*=pe,!e._transitioningWithDuration){if(e._fullLayout._replotting=!0,"ew"===ie||"ns"===oe){var r=ie?-t:0,i=oe?-n:0;if(re.isSubplotConstrained){if(ie&&oe){var o=(t/ee-n/te)/2;r=-(t=o*ee),i=-(n=-o*te)}oe?r=-i*ee/te:i=-r*te/ee}return ie&&(z(Z,t),Ve("x")),oe&&(z(K,n),Ve("y")),We([r,i,ee,te]),qe(),void e.emit("plotly_relayouting",de)}var a,s,l="w"===ie==("n"===oe)?1:-1;if(ie&&oe&&(ne.isSubplotConstrained||re.isSubplotConstrained)){var c=(t/ee+l*n/te)/2;t=c*ee,n=l*c*te}if("w"===ie?t=f(Z,0,t):"e"===ie?t=f(Z,1,-t):ie||(t=0),"n"===oe?n=f(K,1,n):"s"===oe?n=f(K,0,-n):oe||(n=0),a="w"===ie?t:0,s="n"===oe?n:0,ne.isSubplotConstrained&&!re.isSubplotConstrained||re.isSubplotConstrained&&ie&&oe&&l>0){var u;if(re.isSubplotConstrained||!ie&&1===oe.length){for(u=0;u<Z.length;u++)Z[u].range=Z[u]._r.slice(),C(Z[u],1-n/te);a=(t=n*ee/te)/2}if(re.isSubplotConstrained||!oe&&1===ie.length){for(u=0;u<K.length;u++)K[u].range=K[u]._r.slice(),C(K[u],1-t/ee);s=(n=t*te/ee)/2}}re.isSubplotConstrained&&oe||Ve("x"),re.isSubplotConstrained&&ie||Ve("y");var h=ee-t,d=te-n;!re.isSubplotConstrained||ie&&oe||(ie?(s=a?0:t*te/ee,d=h*te/ee):(a=s?0:n*ee/te,h=d*ee/te)),We([a,s,h,d]),qe(),e.emit("plotly_relayouting",de)}function f(e,t,n){for(var r,i,o=1-t,a=0;a<e.length;a++){var s=e[a];if(!s.fixedrange){r=s,i=s._rl[o]+(s._rl[t]-s._rl[o])/F(n/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[t]=l)}}return r._length*(r._rl[t]-i)/(r._rl[t]-r._rl[o])}}function Ve(e,t){for(var n=re.isSubplotConstrained?{x:K,y:Z}[e]:re[e+"axes"],r=re.isSubplotConstrained?{x:Z,y:K}[e]:[],i=0;i<n.length;i++){var o=n[i],a=o._id,s=re.xLinks[a]||re.yLinks[a],l=r[0]||V[s]||X[s];l&&(t?(t[o._name+".range[0]"]=t[l._name+".range[0]"],t[o._name+".range[1]"]=t[l._name+".range[1]"]):o.range=l.range.slice())}}function qe(){var t,n=[];function r(e){for(t=0;t<e.length;t++)e[t].fixedrange||n.push(e[t]._id)}for(se&&(r(Z),r(ne.xaxes),r(re.xaxes)),le&&(r(K),r(ne.yaxes),r(re.yaxes)),de={},t=0;t<n.length;t++){var i=n[t],o=k(e,i);p.drawOne(e,o,{skipTitle:!0}),de[o._name+".range[0]"]=o.range[0],de[o._name+".range[1]"]=o.range[1]}p.redrawComponents(e,n)}function He(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,n=[];ie&&(n=n.concat(Z)),oe&&(n=n.concat(K)),re.xaxes&&(n=n.concat(re.xaxes)),re.yaxes&&(n=n.concat(re.yaxes));var r,i,o,a={};if("reset+autosize"===t)for(t="autosize",i=0;i<n.length;i++)if((r=n[i])._rangeInitial&&(r.range[0]!==r._rangeInitial[0]||r.range[1]!==r._rangeInitial[1])||!r._rangeInitial&&!r.autorange){t="reset";break}if("autosize"===t)for(i=0;i<n.length;i++)(r=n[i]).fixedrange||(a[r._name+".autorange"]=!0);else if("reset"===t)for((ie||ne.isSubplotConstrained)&&(n=n.concat(ne.xaxes)),oe&&!ne.isSubplotConstrained&&(n=n.concat(ne.yaxes)),ne.isSubplotConstrained&&(ie?oe||(n=n.concat(K)):n=n.concat(Z)),i=0;i<n.length;i++)(r=n[i]).fixedrange||(r._rangeInitial?(o=r._rangeInitial,a[r._name+".range[0]"]=o[0],a[r._name+".range[1]"]=o[1]):a[r._name+".autorange"]=!0);e.emit("plotly_doubleclick",null),l.call("_guiRelayout",e,a)}}function $e(){We([0,0,ee,te]),i.syncOrAsync([A.previousPromises,function(){e._fullLayout._replotting=!1,l.call("_guiRelayout",e,de)}],e)}function We(t){var n,r,o,a,s=e._fullLayout,c=s._plots,u=s._subplots.cartesian;if(ue&&l.subplotsRegistry.splom.drag(e),ce)for(n=0;n<u.length;n++)if(o=(r=c[u[n]]).xaxis,a=r.yaxis,r._scene){var h=i.simpleMap(o.range,o.r2l),f=i.simpleMap(a.range,a.r2l);r._scene.update({range:[h[0],f[0],h[1],f[1]]})}if((ue||ce)&&(x(e),w(e)),he){var p=t[2]/D._length,m=t[3]/I._length;for(n=0;n<u.length;n++){o=(r=c[u[n]]).xaxis,a=r.yaxis;var y,b,_,A,k=(se||re.isSubplotConstrained)&&!o.fixedrange&&V[o._id],T=(le||re.isSubplotConstrained)&&!a.fixedrange&&X[a._id];if(k?(y=p,_=v||re.isSubplotConstrained?t[0]:Xe(o,y)):re.xaHash[o._id]?(y=p,_=t[0]*o._length/D._length):re.yaHash[o._id]?(y=m,_="ns"===oe?-t[1]*o._length/I._length:Xe(o,y,{n:"top",s:"bottom"}[oe])):_=Ye(o,y=Ge(o,p,m)),T?(b=m,A=g||re.isSubplotConstrained?t[1]:Xe(a,b)):re.yaHash[a._id]?(b=m,A=t[1]*a._length/I._length):re.xaHash[a._id]?(b=p,A="ew"===ie?-t[0]*a._length/D._length:Xe(a,b,{e:"right",w:"left"}[ie])):A=Ye(a,b=Ge(a,p,m)),y||b){y||(y=1),b||(b=1);var S=o._offset-_/y,E=a._offset-A/b;r.clipRect.call(d.setTranslate,_,A).call(d.setScale,y,b),r.plot.call(d.setTranslate,S,E).call(d.setScale,1/y,1/b),y===r.xScaleFactor&&b===r.yScaleFactor||(d.setPointGroupScale(r.zoomScalePts,y,b),d.setTextPointsScale(r.zoomScaleTxt,y,b)),d.hideOutsideRangePoints(r.clipOnAxisFalseTraces,r),r.xScaleFactor=y,r.yScaleFactor=b}}}}function Ge(e,t,n){return e.fixedrange?0:se&&ne.xaHash[e._id]?t:le&&(ne.isSubplotConstrained?ne.xaHash:ne.yaHash)[e._id]?n:0}function Ye(e,t){return t?(e.range=e._r.slice(),C(e,t),Xe(e,t)):0}function Xe(e,t,n){return e._length*(1-t)*_[n||e.constraintoward||"middle"]}return g.length*v.length!=1&&G(_e,(function(t){if(e._context._scrollZoom.cartesian||e._fullLayout._enablescrollzoom){if(De(),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();ye(),clearTimeout(Fe);var n=-t.deltaY;if(isFinite(n)||(n=t.wheelDelta/10),isFinite(n)){var r,o=Math.exp(-Math.min(Math.max(n,-20),20)/200),a=je.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(t.clientX-a.left)/a.width,l=(a.bottom-t.clientY)/a.height;if(se){for(v||(s=.5),r=0;r<Z.length;r++)c(Z[r],s,o);Ve("x"),ze[2]*=o,ze[0]+=ze[2]*s*(1/o-1)}if(le){for(g||(l=.5),r=0;r<K.length;r++)c(K[r],l,o);Ve("y"),ze[3]*=o,ze[1]+=ze[3]*(1-l)*(1/o-1)}We(ze),qe(),e.emit("plotly_relayouting",de),Fe=setTimeout((function(){e._fullLayout&&(ze=[0,0,ee,te],$e())}),Be),t.preventDefault()}else i.log("Did not find wheel motion attributes: ",t)}function c(e,t,n){if(!e.fixedrange){var r=i.simpleMap(e.range,e.r2l),o=r[0]+(r[1]-r[0])*t;e.range=r.map((function(t){return e.l2r(o+(t-o)*n)}))}}})),_e},makeDragger:I,makeRectDragger:R,makeZoombox:B,makeCorners:j,updateZoombox:U,xyCorners:$,transitionZoombox:V,removeZoombox:q,showDoubleClickNotifier:H,attachWheelEventHandler:G}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../constants/alignment":471,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plot_api/subroutines":544,"../../registry":638,"../plots":619,"./axes":554,"./axis_ids":558,"./constants":561,"./scale_zoom":574,"./select":575,"@plotly/d3":58,"has-passive-events":229,tinycolor2:312}],564:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/fx"),o=e("../../components/dragelement"),a=e("../../lib/setcursor"),s=e("./dragbox").makeDragBox,l=e("./constants").DRAGGERSIZE;n.initInteractions=function(e){var t=e._fullLayout;if(e._context.staticPlot)r.select(e).selectAll(".drag").remove();else if(t._has("cartesian")||t._has("splom")){Object.keys(t._plots||{}).sort((function(e,n){if((t._plots[e].mainplot&&!0)===(t._plots[n].mainplot&&!0)){var r=e.split("y"),i=n.split("y");return r[0]===i[0]?Number(r[1]||1)-Number(i[1]||1):Number(r[0]||1)-Number(i[0]||1)}return t._plots[e].mainplot?1:-1})).forEach((function(n){var r=t._plots[n],a=r.xaxis,c=r.yaxis;if(!r.mainplot){var u=s(e,r,a._offset,c._offset,a._length,c._length,"ns","ew");u.onmousemove=function(t){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===n&&e._fullLayout._plots[n]&&i.hover(e,t,n)},i.hover(e,t,n),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=n},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,o.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,r,a._offset-l,c._offset-l,l,l,"n","w"),s(e,r,a._offset+a._length,c._offset-l,l,l,"n","e"),s(e,r,a._offset-l,c._offset+c._length,l,l,"s","w"),s(e,r,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(n===a._mainSubplot){var h=a._mainLinePosition;"top"===a.side&&(h-=l),s(e,r,a._offset+.1*a._length,h,.8*a._length,l,"","ew"),s(e,r,a._offset,h,.1*a._length,l,"","w"),s(e,r,a._offset+.9*a._length,h,.1*a._length,l,"","e")}if(n===c._mainSubplot){var d=c._mainLinePosition;"right"!==c.side&&(d-=l),s(e,r,d,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(e,r,d,c._offset+.9*c._length,l,.1*c._length,"s",""),s(e,r,d,c._offset,l,.1*c._length,"n","")}}}));var a=t._hoverlayer.node();a.onmousemove=function(n){n.target=e._fullLayout._lasthover,i.hover(e,n,t._hoversubplot)},a.onclick=function(t){t.target=e._fullLayout._lasthover,i.click(e,t)},a.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},n.updateFx(e)}},n.updateFx=function(e){var t=e._fullLayout,n="pan"===t.dragmode?"move":"crosshair";a(t._draggers,n)}},{"../../components/dragelement":385,"../../components/fx":406,"../../lib/setcursor":524,"./constants":561,"./dragbox":563,"@plotly/d3":58}],565:[function(e,t,n){"use strict";t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearSelect:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._drawing=!1}}},{}],566:[function(e,t,n){"use strict";var r=e("../../lib").strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(n){return i(e,n[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}},{"../../lib":503}],567:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("./axis_ids");t.exports=function(e){return function(t,n){var a=t[e];if(Array.isArray(a))for(var s=r.subplotsRegistry.cartesian,l=s.idRegex,c=n._subplots,u=c.xaxis,h=c.yaxis,d=c.cartesian,f=n._has("cartesian")||n._has("gl2d"),p=0;p<a.length;p++){var g=a[p];if(i.isPlainObject(g)){var m=o.cleanId(g.xref,"x",!1),v=o.cleanId(g.yref,"y",!1),y=l.x.test(m),b=l.y.test(v);if(y||b){f||i.pushUnique(n._basePlotModules,s);var _=!1;y&&-1===u.indexOf(m)&&(u.push(m),_=!0),b&&-1===h.indexOf(v)&&(h.push(v),_=!0),_&&y&&b&&d.push(m+v)}}}}}},{"../../lib":503,"../../registry":638,"./axis_ids":558}],568:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../lib"),a=e("../plots"),s=e("../../components/drawing"),l=e("../get_data").getModuleCalcData,c=e("./axis_ids"),u=e("./constants"),h=e("../../constants/xmlns_namespaces"),d=o.ensureSingle;function f(e,t,n){return o.ensureSingle(e,t,n,(function(e){e.datum(n)}))}function p(e,t,n,o,a){for(var c,h,d,f=u.traceLayerClasses,p=e._fullLayout,g=p._modules,m=[],v=[],y=0;y<g.length;y++){var b=(c=g[y]).name,_=i.modules[b].categories;if(_.svg){var x=c.layerName||b+"layer",w=c.plot;d=(h=l(n,w))[0],n=h[1],d.length&&m.push({i:f.indexOf(x),className:x,plotMethod:w,cdModule:d}),_.zoomScale&&v.push("."+x)}}m.sort((function(e,t){return e.i-t.i}));var A=t.plot.selectAll("g.mlayer").data(m,(function(e){return e.className}));if(A.enter().append("g").attr("class",(function(e){return e.className})).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),A.exit().remove(),A.order(),A.each((function(n){var i=r.select(this),l=n.className;n.plotMethod(e,t,n.cdModule,i,o,a),-1===u.clipOnAxisFalseQuery.indexOf("."+l)&&s.setClipUrl(i,t.layerClipId,e)})),p._has("scattergl")&&(c=i.getModule("scattergl"),d=l(n,c)[0],c.plot(e,t,d)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),v.length)){var k=t.plot.selectAll(v.join(",")).selectAll(".trace");t.zoomScalePts=k.selectAll("path.point"),t.zoomScaleTxt=k.selectAll(".textpoint")}}function g(e,t){var n=t.plotgroup,r=t.id,i=u.layerValue2layerClass[t.xaxis.layer],o=u.layerValue2layerClass[t.yaxis.layer],a=e._fullLayout._hasOnlyLargeSploms;if(t.mainplot){var s=t.mainplotinfo,l=s.plotgroup,h=r+"-x",p=r+"-y";t.gridlayer=s.gridlayer,t.zerolinelayer=s.zerolinelayer,d(s.overlinesBelow,"path",h),d(s.overlinesBelow,"path",p),d(s.overaxesBelow,"g",h),d(s.overaxesBelow,"g",p),t.plot=d(s.overplot,"g",r),d(s.overlinesAbove,"path",h),d(s.overlinesAbove,"path",p),d(s.overaxesAbove,"g",h),d(s.overaxesAbove,"g",p),t.xlines=l.select(".overlines-"+i).select("."+h),t.ylines=l.select(".overlines-"+o).select("."+p),t.xaxislayer=l.select(".overaxes-"+i).select("."+h),t.yaxislayer=l.select(".overaxes-"+o).select("."+p)}else if(a)t.xlines=d(n,"path","xlines-above"),t.ylines=d(n,"path","ylines-above"),t.xaxislayer=d(n,"g","xaxislayer-above"),t.yaxislayer=d(n,"g","yaxislayer-above");else{var g=d(n,"g","layer-subplot");t.shapelayer=d(g,"g","shapelayer"),t.imagelayer=d(g,"g","imagelayer"),t.gridlayer=d(n,"g","gridlayer"),t.zerolinelayer=d(n,"g","zerolinelayer"),d(n,"path","xlines-below"),d(n,"path","ylines-below"),t.overlinesBelow=d(n,"g","overlines-below"),d(n,"g","xaxislayer-below"),d(n,"g","yaxislayer-below"),t.overaxesBelow=d(n,"g","overaxes-below"),t.plot=d(n,"g","plot"),t.overplot=d(n,"g","overplot"),t.xlines=d(n,"path","xlines-above"),t.ylines=d(n,"path","ylines-above"),t.overlinesAbove=d(n,"g","overlines-above"),d(n,"g","xaxislayer-above"),d(n,"g","yaxislayer-above"),t.overaxesAbove=d(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+i),t.ylines=n.select(".ylines-"+o),t.xaxislayer=n.select(".xaxislayer-"+i),t.yaxislayer=n.select(".yaxislayer-"+o)}a||(f(t.gridlayer,"g",t.xaxis._id),f(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0)}function m(e,t){if(e){var n={};for(var i in e.each((function(e){var i=e[0];r.select(this).remove(),v(i,t),n[i]=!0})),t._plots)for(var o=t._plots[i].overlays||[],a=0;a<o.length;a++){var s=o[a];n[s.id]&&s.plot.selectAll(".trace").remove()}}}function v(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}n.name="cartesian",n.attr=["xaxis","yaxis"],n.idRoot=["x","y"],n.idRegex=u.idRegex,n.attrRegex=u.attrRegex,n.attributes=e("./attributes"),n.layoutAttributes=e("./layout_attributes"),n.supplyLayoutDefaults=e("./layout_defaults"),n.transitionAxes=e("./transition_axes"),n.finalizeSubplots=function(e,t){var n,r,i,a=t._subplots,s=a.xaxis,l=a.yaxis,h=a.cartesian,d=h.concat(a.gl2d||[]),f={},p={};for(n=0;n<d.length;n++){var g=d[n].split("y");f[g[0]]=1,p["y"+g[1]]=1}for(n=0;n<s.length;n++)f[r=s[n]]||(i=(e[c.id2name(r)]||{}).anchor,u.idRegex.y.test(i)||(i="y"),h.push(r+i),d.push(r+i),p[i]||(p[i]=1,o.pushUnique(l,i)));for(n=0;n<l.length;n++)p[i=l[n]]||(r=(e[c.id2name(i)]||{}).anchor,u.idRegex.x.test(r)||(r="x"),h.push(r+i),d.push(r+i),f[r]||(f[r]=1,o.pushUnique(s,r)));if(!d.length){for(var m in r="",i="",e)u.attrRegex.test(m)&&("x"===m.charAt(0)?(!r||+m.substr(5)<+r.substr(5))&&(r=m):(!i||+m.substr(5)<+i.substr(5))&&(i=m));r=r?c.name2id(r):"x",i=i?c.name2id(i):"y",s.push(r),l.push(i),h.push(r+i)}},n.plot=function(e,t,n,r){var i,o=e._fullLayout,a=o._subplots.cartesian,s=e.calcdata;if(!Array.isArray(t))for(t=[],i=0;i<s.length;i++)t.push(i);for(i=0;i<a.length;i++){for(var l,c=a[i],u=o._plots[c],h=[],d=0;d<s.length;d++){var f=s[d],g=f[0].trace;g.xaxis+g.yaxis===c&&((-1!==t.indexOf(g.index)||g.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===c&&-1!==["tonextx","tonexty","tonext"].indexOf(g.fill)&&-1===h.indexOf(l)&&h.push(l),h.push(f)),l=f)}p(e,u,h,n,r)}},n.clean=function(e,t,n,r){var i,o,a,s=r._plots||{},l=t._plots||{},u=r._subplots||{};if(r._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(a in s)(i=s[a]).plotgroup&&i.plotgroup.remove();var h=r._has&&r._has("gl"),d=t._has&&t._has("gl");if(h&&!d)for(a in s)(i=s[a])._scene&&i._scene.destroy();if(u.xaxis&&u.yaxis){var f=c.listIds({_fullLayout:r});for(o=0;o<f.length;o++){var p=f[o];t[c.id2name(p)]||r._infolayer.selectAll(".g-"+p+"title").remove()}}var g=r._has&&r._has("cartesian"),y=t._has&&t._has("cartesian");if(g&&!y)m(r._cartesianlayer.selectAll(".subplot"),r),r._defs.selectAll(".axesclip").remove(),delete r._axisConstraintGroups,delete r._axisMatchGroups;else if(u.cartesian)for(o=0;o<u.cartesian.length;o++){var b=u.cartesian[o];if(!l[b]){var _="."+b+",."+b+"-x,."+b+"-y";r._cartesianlayer.selectAll(_).remove(),v(b,r)}}},n.drawFramework=function(e){var t=e._fullLayout,n=function(e){var t,n,r,i,o,a,s=e._fullLayout,l=s._subplots.cartesian,c=l.length,u=[],h=[];for(t=0;t<c;t++){r=l[t],o=(i=s._plots[r]).xaxis,a=i.yaxis;var d=o._mainAxis,f=a._mainAxis,p=d._id+f._id,g=s._plots[p];i.overlays=[],p!==r&&g?(i.mainplot=p,i.mainplotinfo=g,h.push(r)):(i.mainplot=void 0,i.mainplotinfo=void 0,u.push(r))}for(t=0;t<h.length;t++)r=h[t],(i=s._plots[r]).mainplotinfo.overlays.push(i);var m=u.concat(h),v=new Array(c);for(t=0;t<c;t++){r=m[t],o=(i=s._plots[r]).xaxis,a=i.yaxis;var y=[r,o.layer,a.layer,o.overlaying||"",a.overlaying||""];for(n=0;n<i.overlays.length;n++)y.push(i.overlays[n].id);v[t]=y}return v}(e),i=t._cartesianlayer.selectAll(".subplot").data(n,String);i.enter().append("g").attr("class",(function(e){return"subplot "+e[0]})),i.order(),i.exit().call(m,t),i.each((function(n){var i=n[0],o=t._plots[i];o.plotgroup=r.select(this),g(e,o),o.draglayer=d(t._draggers,"g",i)}))},n.rangePlot=function(e,t,n){g(e,t),p(e,t,n),a.style(e)},n.toSVG=function(e){var t=e._fullLayout._glimages,n=r.select(e).selectAll(".svg-container");n.filter((function(e,t){return t===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,n=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:h.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})}))},n.updateFx=e("./graph_interact").updateFx},{"../../components/drawing":388,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../registry":638,"../get_data":593,"../plots":619,"./attributes":552,"./axis_ids":558,"./constants":561,"./graph_interact":564,"./layout_attributes":569,"./layout_defaults":570,"./transition_axes":581,"@plotly/d3":58}],569:[function(e,t,n){"use strict";var r=e("../font_attributes"),i=e("../../components/color/attributes"),o=e("../../components/drawing/attributes").dash,a=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray,l=e("../../plots/cartesian/axis_format_attributes").descriptionWithDates,c=e("../../constants/numerical").ONEDAY,u=e("./constants"),h=u.HOUR_PATTERN,d=u.WEEKDAY_PATTERN;t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:i.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:r({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[d,h,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:c},editType:"calc"}),tickmode:{valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:"integer",min:0,dflt:0,editType:"ticks"},tick0:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},dtick:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:{valType:"data_array",editType:"ticks"},ticktext:{valType:"data_array",editType:"ticks"},ticks:{valType:"enumerated",values:["outside","inside",""],editType:"ticks"},tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks"},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},tickcolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"boolean",dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:r({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:{valType:"boolean",editType:"ticks"},gridcolor:{valType:"color",dflt:i.lightLine,editType:"ticks"},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:r({editType:"ticks"})}}},{"../../components/color/attributes":365,"../../components/drawing/attributes":387,"../../constants/numerical":479,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../font_attributes":585,"./constants":561}],570:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../../components/fx/helpers").isUnifiedHover,a=e("../../components/fx/hovermode_defaults"),s=e("../../plot_api/plot_template"),l=e("../layout_attributes"),c=e("./layout_attributes"),u=e("./type_defaults"),h=e("./axis_defaults"),d=e("./constraints"),f=e("./position_defaults"),p=e("./axis_ids"),g=p.id2name,m=p.name2id,v=e("./constants").AX_ID_PATTERN,y=e("../../registry"),b=y.traceIs,_=y.getComponentMethod;function x(e,t,n){Array.isArray(e[t])?e[t].push(n):e[t]=[n]}t.exports=function(e,t,n){var y,w,A=t.autotypenumbers,k={},T={},S={},E={},C={},M={},O={},L={},D={},I={};for(y=0;y<n.length;y++){var R=n[y];if(b(R,"cartesian")||b(R,"gl2d")){var P,N;if(R.xaxis)P=g(R.xaxis),x(k,P,R);else if(R.xaxes)for(w=0;w<R.xaxes.length;w++)x(k,g(R.xaxes[w]),R);if(R.yaxis)N=g(R.yaxis),x(k,N,R);else if(R.yaxes)for(w=0;w<R.yaxes.length;w++)x(k,g(R.yaxes[w]),R);"funnel"===R.type?"h"===R.orientation?(P&&(T[P]=!0),N&&(O[N]=!0)):N&&(S[N]=!0):"image"===R.type?(N&&(L[N]=!0),P&&(L[P]=!0)):(N&&(C[N]=!0,M[N]=!0),b(R,"carpet")&&("carpet"!==R.type||R._cheater)||P&&(E[P]=!0)),"carpet"===R.type&&R._cheater&&P&&(T[P]=!0),b(R,"2dMap")&&(D[P]=!0,D[N]=!0),b(R,"oriented")&&(I["h"===R.orientation?N:P]=!0)}}var z=t._subplots,F=z.xaxis,B=z.yaxis,j=r.simpleMap(F,g),U=r.simpleMap(B,g),V=j.concat(U),q=i.background;F.length&&B.length&&(q=r.coerce(e,t,l,"plot_bgcolor"));var H,$,W,G,Y,X=i.combine(q,t.paper_bgcolor);function Z(){var e=k[H]||[];Y._traceIndices=e.map((function(e){return e._expandedIndex})),Y._annIndices=[],Y._shapeIndices=[],Y._imgIndices=[],Y._subplotsWith=[],Y._counterAxes=[],Y._name=Y._attr=H,Y._id=$}function K(e,t){return r.coerce(G,Y,c,e,t)}function J(e,t){return r.coerce2(G,Y,c,e,t)}function Q(e){return"x"===e?B:F}function ee(t,n){for(var r="x"===t?j:U,i=[],o=0;o<r.length;o++){var a=r[o];a===n||(e[a]||{}).overlaying||i.push(m(a))}return i}var te={x:Q("x"),y:Q("y")},ne=te.x.concat(te.y),re={},ie=[];function oe(){var e=G.matches;v.test(e)&&-1===ne.indexOf(e)&&(re[e]=G.type,ie=Object.keys(re))}var ae=a(e,t),se=o(ae);for(y=0;y<V.length;y++){H=V[y],$=m(H),W=H.charAt(0),r.isPlainObject(e[H])||(e[H]={}),G=e[H],Y=s.newContainer(t,H,W+"axis"),Z();var le="x"===W&&!E[H]&&T[H]||"y"===W&&!C[H]&&S[H],ce="y"===W&&(!M[H]&&O[H]||L[H]),ue={letter:W,font:t.font,outerTicks:D[H],showGrid:!I[H],data:k[H]||[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:le,reverseDflt:ce,autotypenumbersDflt:A,splomStash:((t._splomAxes||{})[W]||{})[$]};K("uirevision",t.uirevision),u(G,Y,K,ue),h(G,Y,K,ue,t);var he=se&&W===ae.charAt(0),de=J("spikecolor",se?Y.color:void 0),fe=J("spikethickness",se?1.5:void 0),pe=J("spikedash",se?"dot":void 0),ge=J("spikemode",se?"across":void 0),me=J("spikesnap");K("showspikes",!!(he||de||fe||pe||ge||me))||(delete Y.spikecolor,delete Y.spikethickness,delete Y.spikedash,delete Y.spikemode,delete Y.spikesnap),f(G,Y,K,{letter:W,counterAxes:te[W],overlayableAxes:ee(W,H),grid:t.grid}),K("title.standoff"),oe(),Y._input=G}for(y=0;y<ie.length;){$=ie[y++],W=(H=g($)).charAt(0),r.isPlainObject(e[H])||(e[H]={}),G=e[H],Y=s.newContainer(t,H,W+"axis"),Z();var ve={letter:W,font:t.font,outerTicks:D[H],showGrid:!I[H],data:[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:A,splomStash:((t._splomAxes||{})[W]||{})[$]};K("uirevision",t.uirevision),Y.type=re[$]||"linear",h(G,Y,K,ve,t),f(G,Y,K,{letter:W,counterAxes:te[W],overlayableAxes:ee(W,H),grid:t.grid}),K("fixedrange"),oe(),Y._input=G}var ye=_("rangeslider","handleDefaults"),be=_("rangeselector","handleDefaults");for(y=0;y<j.length;y++)H=j[y],G=e[H],Y=t[H],ye(e,t,H),"date"===Y.type&&be(G,Y,t,U,Y.calendar),K("fixedrange");for(y=0;y<U.length;y++){H=U[y],G=e[H],Y=t[H];var _e=t[g(Y.anchor)];K("fixedrange",_("rangeslider","isVisible")(_e))}d.handleDefaults(e,t,{axIds:ne.concat(ie).sort(p.idSort),axHasImage:L})}},{"../../components/color":366,"../../components/fx/helpers":402,"../../components/fx/hovermode_defaults":405,"../../lib":503,"../../plot_api/plot_template":543,"../../registry":638,"../layout_attributes":610,"./axis_defaults":556,"./axis_ids":558,"./constants":561,"./constraints":562,"./layout_attributes":569,"./position_defaults":572,"./type_defaults":582}],571:[function(e,t,n){"use strict";var r=e("tinycolor2").mix,i=e("../../components/color/attributes").lightFraction,o=e("../../lib");t.exports=function(e,t,n,a){var s=(a=a||{}).dfltColor;function l(n,r){return o.coerce2(e,t,a.attributes,n,r)}var c=l("linecolor",s),u=l("linewidth");n("showline",a.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var h=l("gridcolor",r(s,a.bgColor,a.blend||i).toRgbString()),d=l("gridwidth");if(n("showgrid",a.showGrid||!!h||!!d)||(delete t.gridcolor,delete t.gridwidth),!a.noZeroLine){var f=l("zerolinecolor",s),p=l("zerolinewidth");n("zeroline",a.showGrid||!!f||!!p)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},{"../../components/color/attributes":365,"../../lib":503,tinycolor2:312}],572:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib");t.exports=function(e,t,n,o){var a,s,l,c,u=o.counterAxes||[],h=o.overlayableAxes||[],d=o.letter,f=o.grid;f&&(s=f._domains[d][f._axisMap[t._id]],a=f._anchors[t._id],s&&(l=f[d+"side"].split(" ")[0],c=f.domain[d]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(r(e.position)?"free":u[0]||"free"),l=l||("x"===d?"bottom":"left"),c=c||0,"free"===i.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(u),dflt:a}},"anchor")&&n("position",c),i.coerce(e,t,{side:{valType:"enumerated",values:"x"===d?["bottom","top"]:["left","right"],dflt:l}},"side");var p=!1;if(h.length&&(p=i.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!p){var g=n("domain",s);g[0]>g[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s)}return n("layer"),t}},{"../../lib":503,"fast-isnumeric":190}],573:[function(e,t,n){"use strict";var r=e("./show_dflt");t.exports=function(e,t,n,i,o){o||(o={});var a=o.tickSuffixDflt,s=r(e);n("tickprefix")&&n("showtickprefix",s),n("ticksuffix",a)&&n("showticksuffix",s)}},{"./show_dflt":577}],574:[function(e,t,n){"use strict";var r=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,n){void 0===n&&(n=r[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],o=i[0]+(i[1]-i[0])*n;e.range=e._input.range=[e.l2r(o+(i[0]-o)*t),e.l2r(o+(i[1]-o)*t)],e.setScale()}},{"../../constants/alignment":471}],575:[function(e,t,n){"use strict";var r=e("polybooljs"),i=e("../../registry"),o=e("../../components/drawing").dashStyle,a=e("../../components/color"),s=e("../../components/fx"),l=e("../../components/fx/helpers").makeEventData,c=e("../../components/dragelement/helpers"),u=c.freeMode,h=c.rectMode,d=c.drawMode,f=c.openMode,p=c.selectMode,g=e("../../components/shapes/draw_newshape/display_outlines"),m=e("../../components/shapes/draw_newshape/helpers").handleEllipse,v=e("../../components/shapes/draw_newshape/newshapes"),y=e("../../lib"),b=e("../../lib/polygon"),_=e("../../lib/throttle"),x=e("./axis_ids").getFromId,w=e("../../lib/clear_gl_canvases"),A=e("../../plot_api/subroutines").redrawReglTraces,k=e("./constants"),T=k.MINSELECT,S=b.filter,E=b.tester,C=e("./handle_outline").clearSelect,M=e("./helpers"),O=M.p2r,L=M.axValue,D=M.getTransform;function I(e,t,n,r,i,o,a){var s,l,c,u,h,d,p,m,v,y=t._hoverdata,b=t._fullLayout.clickmode.indexOf("event")>-1,_=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){z(e,t,o);var x=function(e,t){var n,r,i=e[0],o=-1,a=[];for(r=0;r<t.length;r++)if(n=t[r],i.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?o=i.pointNumber:void 0!==i.binNumber&&(o=i.binNumber,a=i.pointNumbers);break}return{pointNumber:o,pointNumbers:a,searchInfo:n}}(y,s=B(t,n,r,i));if(x.pointNumbers.length>0?function(e,t){var n,r,i,o=[];for(i=0;i<e.length;i++)(n=e[i]).cd[0].trace.selectedpoints&&n.cd[0].trace.selectedpoints.length>0&&o.push(n);if(1===o.length&&o[0]===t.searchInfo&&(r=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i<t.pointNumbers.length;i++)if(r.selectedpoints.indexOf(t.pointNumbers[i])<0)return!1;return!0}return!1}(s,x):function(e){var t,n,r=0;for(n=0;n<e.length;n++)if((t=e[n].cd[0].trace).selectedpoints){if(t.selectedpoints.length>1)return!1;if((r+=t.selectedpoints.length)>1)return!1}return 1===r}(s)&&(d=j(x))){for(a&&a.remove(),v=0;v<s.length;v++)(l=s[v])._module.selectPoints(l,!1);U(t,s),F(o),b&&t.emit("plotly_deselect",null)}else{for(p=e.shiftKey&&(void 0!==d?d:j(x)),c=function(e,t,n){return{pointNumber:e,searchInfo:t,subtract:n}}(x.pointNumber,x.searchInfo,p),u=N(o.selectionDefs.concat([c])),v=0;v<s.length;v++)if(h=V(s[v]._module.selectPoints(s[v],u),s[v]),_.length)for(var w=0;w<h.length;w++)_.push(h[w]);else _=h;if(U(t,s,m={points:_}),c&&o&&o.selectionDefs.push(c),a){var A=o.mergedPolygons,k=f(o.dragmode);g(q(A,k),a,o)}b&&t.emit("plotly_selected",m)}}}function R(e){return"pointNumber"in e&&"searchInfo"in e}function P(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,n,r,i){var o=e.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===o&&r===e.pointNumber},isRect:!1,degenerate:!1,subtract:e.subtract}}function N(e){for(var t=[],n=R(e[0])?0:e[0][0][0],r=n,i=R(e[0])?0:e[0][0][1],o=i,a=0;a<e.length;a++)if(R(e[a]))t.push(P(e[a]));else{var s=b.tester(e[a]);s.subtract=e[a].subtract,t.push(s),n=Math.min(n,s.xmin),r=Math.max(r,s.xmax),i=Math.min(i,s.ymin),o=Math.max(o,s.ymax)}return{xmin:n,xmax:r,ymin:i,ymax:o,pts:[],contains:function(e,n,r,i){for(var o=!1,a=0;a<t.length;a++)t[a].contains(e,n,r,i)&&(o=!1===t[a].subtract);return o},isRect:!1,degenerate:!1}}function z(e,t,n){t._fullLayout._drawing=!1;var r=t._fullLayout,i=n.plotinfo,o=n.dragmode,a=r._lastSelectedSubplot&&r._lastSelectedSubplot===i.id,s=(e.shiftKey||e.altKey)&&!(d(o)&&f(o));a&&s&&i.selection&&i.selection.selectionDefs&&!n.selectionDefs?(n.selectionDefs=i.selection.selectionDefs,n.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||F(n),a||(C(t),r._lastSelectedSubplot=i.id)}function F(e){var t=e.dragmode,n=e.plotinfo,r=e.gd;if(r._fullLayout._activeShapeIndex>=0&&r._fullLayout._deactivateShape(r),d(t)){var o=r._fullLayout._zoomlayer.selectAll(".select-outline-"+n.id);if(o&&r._fullLayout._drawing){var a=v(o,e);a&&i.call("_guiRelayout",r,{shapes:a}),r._fullLayout._drawing=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function B(e,t,n,r){var i,o,a,s=[],l=t.map((function(e){return e._id})),c=n.map((function(e){return e._id}));for(a=0;a<e.calcdata.length;a++)if(!0===(o=(i=e.calcdata[a])[0].trace).visible&&o._module&&o._module.selectPoints)if(!r||o.subplot!==r&&o.geo!==r)if("splom"===o.type&&o._xaxes[l[0]]&&o._yaxes[c[0]]){var u=d(o._module,i,t[0],n[0]);u.scene=e._fullLayout._splomScenes[o.uid],s.push(u)}else if("sankey"===o.type){var h=d(o._module,i,t[0],n[0]);s.push(h)}else{if(-1===l.indexOf(o.xaxis))continue;if(-1===c.indexOf(o.yaxis))continue;s.push(d(o._module,i,x(e,o.xaxis),x(e,o.yaxis)))}else s.push(d(o._module,i,t[0],n[0]));return s;function d(e,t,n,r){return{_module:e,cd:t,xaxis:n,yaxis:r}}}function j(e){var t=e.searchInfo.cd[0].trace,n=e.pointNumber,r=e.pointNumbers,i=r.length>0?r[0]:n;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function U(e,t,n){var r,o,a,s;for(r=0;r<t.length;r++){var l=t[r].cd[0].trace._fullInput,c=e._fullLayout._tracePreGUI[l.uid]||{};void 0===c.selectedpoints&&(c.selectedpoints=l._input.selectedpoints||null)}if(n){var u=n.points||[];for(r=0;r<t.length;r++)(s=t[r].cd[0].trace)._input.selectedpoints=s._fullInput.selectedpoints=[],s._fullInput!==s&&(s.selectedpoints=[]);for(r=0;r<u.length;r++){var h=u[r],d=h.data,f=h.fullData;h.pointIndices?([].push.apply(d.selectedpoints,h.pointIndices),s._fullInput!==s&&[].push.apply(f.selectedpoints,h.pointIndices)):(d.selectedpoints.push(h.pointIndex),s._fullInput!==s&&f.selectedpoints.push(h.pointIndex))}}else for(r=0;r<t.length;r++)delete(s=t[r].cd[0].trace).selectedpoints,delete s._input.selectedpoints,s._fullInput!==s&&delete s._fullInput.selectedpoints;var p=!1;for(r=0;r<t.length;r++){s=(a=(o=t[r]).cd)[0].trace,i.traceIs(s,"regl")&&(p=!0);var g=o._module,m=g.styleOnSelect||g.style;m&&(m(e,a,a[0].node3),a[0].nodeRangePlot3&&m(e,a,a[0].nodeRangePlot3))}p&&(w(e),A(e))}function V(e,t){if(Array.isArray(e))for(var n=t.cd,r=t.cd[0].trace,i=0;i<e.length;i++)e[i]=l(e[i],r,n);return e}function q(e,t){for(var n=[],r=0;r<e.length;r++){n[r]=[];for(var i=0;i<e[r].length;i++){n[r][i]=[],n[r][i][0]=i?"L":"M";for(var o=0;o<e[r][i].length;o++)n[r][i].push(e[r][i][o])}t||n[r].push(["Z",n[r][0][1],n[r][0][2]])}return n}t.exports={prepSelect:function(e,t,n,i,l){var c=u(l),v=h(l),b=f(l),x=d(l),w=p(l),A="drawcircle"===l,C="drawline"===l||A,M=i.gd,R=M._fullLayout,P=R._zoomlayer,j=i.element.getBoundingClientRect(),H=i.plotinfo,$=D(H),W=t-j.left,G=n-j.top;R._calcInverseTransform(M);var Y=y.apply3DTransform(R._invTransform)(W,G);W=Y[0],G=Y[1];var X,Z,K,J,Q,ee,te,ne=R._invScaleX,re=R._invScaleY,ie=W,oe=G,ae="M"+W+","+G,se=i.xaxes[0]._length,le=i.yaxes[0]._length,ce=i.xaxes.concat(i.yaxes),ue=e.altKey&&!(d(l)&&b);z(e,M,i),c&&(X=S([[W,G]],k.BENDPX));var he=P.selectAll("path.select-outline-"+H.id).data(x?[0]:[1,2]),de=R.newshape;he.enter().append("path").attr("class",(function(e){return"select-outline select-outline-"+e+" select-outline-"+H.id})).style(x?{opacity:de.opacity/2,fill:b?void 0:de.fillcolor,stroke:de.line.color,"stroke-dasharray":o(de.line.dash,de.line.width),"stroke-width":de.line.width+"px"}:{}).attr("fill-rule",de.fillrule).classed("cursor-move",!!x).attr("transform",$).attr("d",ae+"Z");var fe,pe=P.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1}).attr("transform",$).attr("d","M0,0Z"),ge=R._uid+k.SELECTID,me=[],ve=B(M,i.xaxes,i.yaxes,i.subplot);function ye(e,t){return e-t}fe=H.fillRangeItems?H.fillRangeItems:v?function(e,t){var n=e.range={};for(Q=0;Q<ce.length;Q++){var r=ce[Q],i=r._id.charAt(0);n[r._id]=[O(r,t[i+"min"]),O(r,t[i+"max"])].sort(ye)}}:function(e,t,n){var r=e.lassoPoints={};for(Q=0;Q<ce.length;Q++){var i=ce[Q];r[i._id]=n.filtered.map(L(i))}},i.moveFn=function(e,t){ie=Math.max(0,Math.min(se,ne*e+W)),oe=Math.max(0,Math.min(le,re*t+G));var n=Math.abs(ie-W),o=Math.abs(oe-G);if(v){var a,s,l;if(w){var u=R.selectdirection;switch(a="any"===u?o<Math.min(.6*n,T)?"h":n<Math.min(.6*o,T)?"v":"d":u){case"h":s=A?le/2:0,l=le;break;case"v":s=A?se/2:0,l=se}}if(x)switch(R.newshape.drawdirection){case"vertical":a="h",s=A?le/2:0,l=le;break;case"horizontal":a="v",s=A?se/2:0,l=se;break;case"ortho":n<o?(a="h",s=G,l=oe):(a="v",s=W,l=ie);break;default:a="d"}"h"===a?((J=C?m(A,[ie,s],[ie,l]):[[W,s],[W,l],[ie,l],[ie,s]]).xmin=C?ie:Math.min(W,ie),J.xmax=C?ie:Math.max(W,ie),J.ymin=Math.min(s,l),J.ymax=Math.max(s,l),pe.attr("d","M"+J.xmin+","+(G-T)+"h-4v"+2*T+"h4ZM"+(J.xmax-1)+","+(G-T)+"h4v"+2*T+"h-4Z")):"v"===a?((J=C?m(A,[s,oe],[l,oe]):[[s,G],[s,oe],[l,oe],[l,G]]).xmin=Math.min(s,l),J.xmax=Math.max(s,l),J.ymin=C?oe:Math.min(G,oe),J.ymax=C?oe:Math.max(G,oe),pe.attr("d","M"+(W-T)+","+J.ymin+"v-4h"+2*T+"v4ZM"+(W-T)+","+(J.ymax-1)+"v4h"+2*T+"v-4Z")):"d"===a&&((J=C?m(A,[W,G],[ie,oe]):[[W,G],[W,oe],[ie,oe],[ie,G]]).xmin=Math.min(W,ie),J.xmax=Math.max(W,ie),J.ymin=Math.min(G,oe),J.ymax=Math.max(G,oe),pe.attr("d","M0,0Z"))}else c&&(X.addPt([ie,oe]),J=X.filtered);i.selectionDefs&&i.selectionDefs.length?(K=function(e,t,n){return n?r.difference({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions:r.union({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions}(i.mergedPolygons,J,ue),J.subtract=ue,Z=N(i.selectionDefs.concat([J]))):(K=[J],Z=E(J)),g(q(K,b),he,i),w&&_.throttle(ge,k.SELECTDELAY,(function(){var e;me=[];var t,n=[];for(Q=0;Q<ve.length;Q++)if(t=(ee=ve[Q])._module.selectPoints(ee,Z),n.push(t),e=V(t,ee),me.length)for(var r=0;r<e.length;r++)me.push(e[r]);else me=e;U(M,ve,te={points:me}),fe(te,J,X),i.gd.emit("plotly_selecting",te)}))},i.clickFn=function(e,t){if(pe.remove(),M._fullLayout._activeShapeIndex>=0)M._fullLayout._deactivateShape(M);else if(!x){var n=R.clickmode;_.done(ge).then((function(){if(_.clear(ge),2===e){for(he.remove(),Q=0;Q<ve.length;Q++)(ee=ve[Q])._module.selectPoints(ee,!1);U(M,ve),F(i),M.emit("plotly_deselect",null)}else n.indexOf("select")>-1&&I(t,M,i.xaxes,i.yaxes,i.subplot,i,he),"event"===n&&M.emit("plotly_selected",void 0);s.click(M,t)})).catch(y.error)}},i.doneFn=function(){pe.remove(),_.done(ge).then((function(){_.clear(ge),i.gd.emit("plotly_selected",te),J&&i.selectionDefs&&(J.subtract=ue,i.selectionDefs.push(J),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(me)})).catch(y.error),x&&F(i)}},clearSelect:C,clearSelectionsCache:F,selectOnClick:I}},{"../../components/color":366,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/fx/helpers":402,"../../components/shapes/draw_newshape/display_outlines":454,"../../components/shapes/draw_newshape/helpers":455,"../../components/shapes/draw_newshape/newshapes":456,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/polygon":515,"../../lib/throttle":530,"../../plot_api/subroutines":544,"../../registry":638,"./axis_ids":558,"./constants":561,"./handle_outline":565,"./helpers":566,polybooljs:254}],576:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-time-format").utcFormat,o=e("../../lib"),a=o.numberFormat,s=e("fast-isnumeric"),l=o.cleanNumber,c=o.ms2DateTime,u=o.dateTime2ms,h=o.ensureNumber,d=o.isArrayOrTypedArray,f=e("../../constants/numerical"),p=f.FP_SAFE,g=f.BADNUM,m=f.LOG_CLIP,v=f.ONEWEEK,y=f.ONEDAY,b=f.ONEHOUR,_=f.ONEMIN,x=f.ONESEC,w=e("./axis_ids"),A=e("./constants"),k=A.HOUR_PATTERN,T=A.WEEKDAY_PATTERN;function S(e){return Math.pow(10,e)}function E(e){return null!=e}t.exports=function(e,t){t=t||{};var n=e._id||"x",f=n.charAt(0);function C(t,n){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&n&&e.range&&2===e.range.length){var r=e.range[0],i=e.range[1];return.5*(r+i-2*m*Math.abs(r-i))}return g}function M(t,n,r,i){if((i||{}).msUTC&&s(t))return+t;var a=u(t,r||e.calendar);if(a===g){if(!s(t))return g;t=+t;var l=Math.floor(10*o.mod(t+.05,1)),c=Math.round(t-l/10);a=u(new Date(c))+l/10}return a}function O(t,n,r){return c(t,n,r||e.calendar)}function L(t){return e._categories[Math.round(t)]}function D(t){if(E(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var n=e._categories.length-1;return e._categoriesMap[t]=n,n}return g}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:s(e)?+e:void 0}function P(e){return s(e)?+e:I(e)}function N(e,t,n){return r.round(n+t*e,2)}function z(e,t,n){return(e-n)/t}var F=function(t){return s(t)?N(t,e._m,e._b):g},B=function(t){return z(t,e._m,e._b)};if(e.rangebreaks){var j="y"===f;F=function(t){if(!s(t))return g;var n=e._rangebreaks.length;if(!n)return N(t,e._m,e._b);var r=j;e.range[0]>e.range[1]&&(r=!r);for(var i=r?-1:1,o=i*t,a=0,l=0;l<n;l++){var c=i*e._rangebreaks[l].min,u=i*e._rangebreaks[l].max;if(o<c)break;if(!(o>u)){a=o<(c+u)/2?l:l+1;break}a=l+1}var h=e._B[a]||0;return isFinite(h)?N(t,e._m2,h):0},B=function(t){var n=e._rangebreaks.length;if(!n)return z(t,e._m,e._b);for(var r=0,i=0;i<n&&!(t<e._rangebreaks[i].pmin);i++)t>e._rangebreaks[i].pmax&&(r=i+1);return z(t,e._m2,e._B[r])}}e.c2l="log"===e.type?C:h,e.l2c="log"===e.type?S:h,e.l2p=F,e.p2l=B,e.c2p="log"===e.type?function(e,t){return F(C(e,t))}:F,e.p2c="log"===e.type?function(e){return S(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=h,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=B,e.cleanPos=h):"log"===e.type?(e.d2r=e.d2l=function(e,t){return C(l(e),t)},e.r2d=e.r2c=function(e){return S(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=h,e.c2r=C,e.l2d=S,e.d2p=function(t,n){return e.l2p(e.d2r(t,n))},e.p2d=function(e){return S(B(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=B,e.cleanPos=h):"date"===e.type?(e.d2r=e.r2d=o.identity,e.d2c=e.r2c=e.d2l=e.r2l=M,e.c2d=e.c2r=e.l2d=e.l2r=O,e.d2p=e.r2p=function(t,n,r){return e.l2p(M(t,0,r))},e.p2d=e.p2r=function(e,t,n){return O(B(e),t,n)},e.cleanPos=function(t){return o.cleanDate(t,g,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=D,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var n=P(t);return void 0!==n?n:e.fraction2r(.5)},e.l2r=e.c2r=h,e.r2l=P,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:h(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var n=R(t);return void 0!==n?n:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=h,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:h(e)},e.setupMultiCategory=function(r){var i,a,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var c in l)if(c!==n){var u=t[w.id2name(c)];s=s.concat(u._traceIndices)}var h=[[0,{}],[0,{}]],p=[];for(i=0;i<s.length;i++){var g=r[s[i]];if(f in g){var m=g[f],v=g._length||o.minRowLength(m);if(d(m[0])&&d(m[1]))for(a=0;a<v;a++){var y=m[0][a],b=m[1][a];E(y)&&E(b)&&(p.push([y,b]),y in h[0][1]||(h[0][1][y]=h[0][0]++),b in h[1][1]||(h[1][1][b]=h[1][0]++))}}}for(p.sort((function(e,t){var n=h[0][1],r=n[e[0]]-n[t[0]];if(r)return r;var i=h[1][1];return i[e[1]]-i[t[1]]})),i=0;i<p.length;i++)D(p[i])}),e.fraction2r=function(t){var n=e.r2l(e.range[0]),r=e.r2l(e.range[1]);return e.l2r(n+t*(r-n))},e.r2fraction=function(t){var n=e.r2l(e.range[0]),r=e.r2l(e.range[1]);return(e.r2l(t)-n)/(r-n)},e.cleanRange=function(t,n){n||(n={}),t||(t="range");var r,i,a=o.nestedProperty(e,t).get();if(i=(i="date"===e.type?o.dfltRange(e.calendar):"y"===f?A.DFLTRANGEY:"realaxis"===e._name?[0,1]:n.dfltRange||A.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),a&&2===a.length)for("date"!==e.type||e.autorange||(a[0]=o.cleanDate(a[0],g,e.calendar),a[1]=o.cleanDate(a[1],g,e.calendar)),r=0;r<2;r++)if("date"===e.type){if(!o.isDateTime(a[r],e.calendar)){e[t]=i;break}if(e.r2l(a[0])===e.r2l(a[1])){var l=o.constrain(e.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=e.l2r(l-1e3),a[1]=e.l2r(l+1e3);break}}else{if(!s(a[r])){if(!s(a[1-r])){e[t]=i;break}a[r]=a[1-r]*(r?10:.1)}if(a[r]<-p?a[r]=-p:a[r]>p&&(a[r]=p),a[0]===a[1]){var c=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=c,a[1]+=c}}else o.nestedProperty(e,t).set(i)},e.setScale=function(n){var r=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var o=n&&e._r?"_r":"range",a=e.calendar;e.cleanRange(o);var s,l,c=e.r2l(e[o][0],a),u=e.r2l(e[o][1],a),h="y"===f;if(h?(e._offset=r.t+(1-e.domain[1])*r.h,e._length=r.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=r.l+e.domain[0]*r.w,e._length=r.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;s<e._rangebreaks.length;s++)l=e._rangebreaks[s],e._lBreaks+=Math.abs(l.max-l.min);var d=h;c>u&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),s=0;s<e._rangebreaks.length;s++)l=e._rangebreaks[s],e._B.push(e._B[e._B.length-1]-p*e._m2*(l.max-l.min));for(s=0;s<e._rangebreaks.length;s++)(l=e._rangebreaks[s]).pmin=F(l.min),l.pmax=F(l.max)}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(t){var n,r,i,a,s,c=e.rangebreaks||[];c._cachedPatterns||(c._cachedPatterns=c.map((function(t){return t.enabled&&t.bounds?o.simpleMap(t.bounds,t.pattern?l:e.d2c):null}))),c._cachedValues||(c._cachedValues=c.map((function(t){return t.enabled&&t.values?o.simpleMap(t.values,e.d2c).sort(o.sorterAsc):null})));for(var u=0;u<c.length;u++){var h=c[u];if(h.enabled)if(h.bounds){var d=h.pattern;switch(r=(n=c._cachedPatterns[u])[0],i=n[1],d){case T:a=(s=new Date(t)).getUTCDay(),r>i&&(i+=7,a<r&&(a+=7));break;case k:a=(s=new Date(t)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),r>i&&(i+=24,a<r&&(a+=24));break;case"":a=t}if(a>=r&&a<i)return g}else for(var f=c._cachedValues[u],p=0;p<f.length;p++)if(i=(r=f[p])+h.dvalue,t>=r&&t<i)return g}return t},e.locateBreaks=function(t,n){var r,i,a,s,c=[];if(!e.rangebreaks)return c;var u=e.rangebreaks.slice().sort((function(e,t){return e.pattern===T&&t.pattern===k?-1:t.pattern===T&&e.pattern===k?1:0})),h=function(e,r){if((e=o.constrain(e,t,n))!==(r=o.constrain(r,t,n))){for(var i=!0,a=0;a<c.length;a++){var s=c[a];e<s.max&&r>=s.min&&(e<s.min&&(s.min=e),r>s.max&&(s.max=r),i=!1)}i&&c.push({min:e,max:r})}};for(r=0;r<u.length;r++){var d=u[r];if(d.enabled)if(d.bounds){var f=t,p=n;d.pattern&&(f=Math.floor(f)),a=(i=o.simpleMap(d.bounds,d.pattern?l:e.r2l))[0],s=i[1];var g,m,w=new Date(f);switch(d.pattern){case T:m=v,g=(s-a+(s<a?7:0))*y,f+=a*y-(w.getUTCDay()*y+w.getUTCHours()*b+w.getUTCMinutes()*_+w.getUTCSeconds()*x+w.getUTCMilliseconds());break;case k:m=y,g=(s-a+(s<a?24:0))*b,f+=a*b-(w.getUTCHours()*b+w.getUTCMinutes()*_+w.getUTCSeconds()*x+w.getUTCMilliseconds());break;default:f=Math.min(i[0],i[1]),g=m=(p=Math.max(i[0],i[1]))-f}for(var A=f;A<p;A+=m)h(A,A+g)}else for(var S=o.simpleMap(d.values,e.d2c),E=0;E<S.length;E++)h(a=S[E],s=a+d.dvalue)}return c.sort((function(e,t){return e.min-t.min})),c},e.makeCalcdata=function(t,n,r){var i,a,s,l,c=e.type,u="date"===c&&t[n+"calendar"];if(n in t){if(i=t[n],l=t._length||o.minRowLength(i),o.isTypedArray(i)&&("linear"===c||"log"===c)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if("multicategory"===c)return function(e,t){for(var n=new Array(t),r=0;r<t;r++){var i=(e[0]||[])[r],o=(e[1]||[])[r];n[r]=I([i,o])}return n}(i,l);for(a=new Array(l),s=0;s<l;s++)a[s]=e.d2c(i[s],0,u,r)}else{var h=n+"0"in t?e.d2c(t[n+"0"],0,u):0,d=t["d"+n]?Number(t["d"+n]):1;for(i=t[{x:"y",y:"x"}[n]],l=t._length||i.length,a=new Array(l),s=0;s<l;s++)a[s]=h+s*d}if(e.rangebreaks)for(s=0;s<l;s++)a[s]=e.maskBreaks(a[s]);return a},e.isValidRange=function(t){return Array.isArray(t)&&2===t.length&&s(e.r2l(t[0]))&&s(e.r2l(t[1]))},e.isPtWithinRange=function(t,n){var r=e.c2l(t[f],null,n),i=e.r2l(e.range[0]),o=e.r2l(e.range[1]);return i<o?i<=r&&r<=o:o<=r&&r<=i},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var n=e._matchGroup;if(n){var r=null,i=null;for(var o in n){var a=t[w.id2name(o)];if(a._categories){r=a._categories,i=a._categoriesMap;break}}r&&i?(e._categories=r,e._categoriesMap=i):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var s=0;s<e._initialCategories.length;s++)D(e._initialCategories[s])},e.sortByInitialCategories=function(){var r=[];if(e._emptyCategories(),e._initialCategories)for(var i=0;i<e._initialCategories.length;i++)D(e._initialCategories[i]);r=r.concat(e._traceIndices);var o=e._matchGroup;for(var a in o)if(n!==a){var s=t[w.id2name(a)];s._categories=e._categories,s._categoriesMap=e._categoriesMap,r=r.concat(s._traceIndices)}return r};var U=t._d3locale;"date"===e.type&&(e._dateFormat=U?U.timeFormat:i,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=U?U.numberFormat:a,delete e._minDtick,delete e._forceTick0}},{"../../constants/numerical":479,"../../lib":503,"./axis_ids":558,"./constants":561,"@plotly/d3":58,"d3-time-format":120,"fast-isnumeric":190}],577:[function(e,t,n){"use strict";t.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(n){return e[n]===e[t[0]]}))||1===t.length)return e[t[0]]}},{}],578:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color").contrast,o=e("./layout_attributes"),a=e("./show_dflt"),s=e("../array_container_defaults");function l(e,t){function n(n,i){return r.coerce(e,t,o.tickformatstops,n,i)}n("enabled")&&(n("dtickrange"),n("value"))}t.exports=function(e,t,n,c,u){u||(u={});var h=a(e);if(n("showticklabels")){var d=u.font||{},f=t.color,p=-1!==(t.ticklabelposition||"").indexOf("inside")?i(u.bgColor):f&&f!==o.color.dflt?f:d.color;if(r.coerceFont(n,"tickfont",{family:d.family,size:d.size,color:p}),u.noTicklabelstep||"multicategory"===c||"log"===c||n("ticklabelstep"),u.noAng||n("tickangle"),"category"!==c){var g=n("tickformat");s(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),t.tickformatstops.length||delete t.tickformatstops,u.noExp||g||"date"===c||(n("showexponent",h),n("exponentformat"),n("minexponent"),n("separatethousands"))}}}},{"../../components/color":366,"../../lib":503,"../array_container_defaults":549,"./layout_attributes":569,"./show_dflt":577}],579:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t,n,o){var a=r.coerce2(e,t,i,"ticklen"),s=r.coerce2(e,t,i,"tickwidth"),l=r.coerce2(e,t,i,"tickcolor",t.color);n("ticks",o.outerTicks||a||s||l?"outside":"")||(delete t.ticklen,delete t.tickwidth,delete t.tickcolor)}},{"../../lib":503,"./layout_attributes":569}],580:[function(e,t,n){"use strict";var r=e("./clean_ticks"),i=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n,o){function a(n){var r=e[n];return void 0!==r?r:(t._template||{})[n]}var s=a("tick0"),l=a("dtick"),c=a("tickvals"),u=n("tickmode",i(c)?"array":l?"linear":"auto");if("auto"===u)n("nticks");else if("linear"===u){var h=t.dtick=r.dtick(l,o);t.tick0=r.tick0(s,o,t.calendar,h)}else"multicategory"!==o&&(void 0===n("tickvals")?t.tickmode="auto":n("ticktext"))}},{"../../lib":503,"./clean_ticks":560}],581:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../lib"),a=e("../../components/drawing"),s=e("./axes");t.exports=function(e,t,n,l){var c=e._fullLayout;if(0!==t.length){var u,h,d,f;l&&(u=l());var p=r.ease(n.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(f),f=null,function(){for(var n={},r=0;r<t.length;r++){var o=t[r],a=o.plotinfo.xaxis,s=o.plotinfo.yaxis;o.xr0&&(n[a._name+".range"]=o.xr0.slice()),o.yr0&&(n[s._name+".range"]=o.yr0.slice())}return i.call("relayout",e,n).then((function(){for(var e=0;e<t.length;e++)g(t[e].plotinfo)}))}()})),h=Date.now(),f=window.requestAnimationFrame((function r(){d=Date.now();for(var o=Math.min(1,(d-h)/n.duration),a=p(o),s=0;s<t.length;s++)m(t[s],a);d-h>n.duration?(function(){for(var n={},r=0;r<t.length;r++){var o=t[r],a=o.plotinfo.xaxis,s=o.plotinfo.yaxis;o.xr1&&(n[a._name+".range"]=o.xr1.slice()),o.yr1&&(n[s._name+".range"]=o.yr1.slice())}u&&u(),i.call("relayout",e,n).then((function(){for(var e=0;e<t.length;e++)g(t[e].plotinfo)}))}(),f=window.cancelAnimationFrame(r)):f=window.requestAnimationFrame(r)})),Promise.resolve()}function g(e){var t=e.xaxis,n=e.yaxis;c._defs.select("#"+e.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,n._offset).call(a.setScale,1,1);var r=e.plot.selectAll(".scatterlayer .trace");r.selectAll(".point").call(a.setPointGroupScale,1,1),r.selectAll(".textpoint").call(a.setTextPointsScale,1,1),r.call(a.hideOutsideRangePoints,e)}function m(t,n){var r=t.plotinfo,i=r.xaxis,l=r.yaxis,c=i._length,u=l._length,h=!!t.xr1,d=!!t.yr1,f=[];if(h){var p=o.simpleMap(t.xr0,i.r2l),g=o.simpleMap(t.xr1,i.r2l),m=p[1]-p[0],v=g[1]-g[0];f[0]=(p[0]*(1-n)+n*g[0]-p[0])/(p[1]-p[0])*c,f[2]=c*(1-n+n*v/m),i.range[0]=i.l2r(p[0]*(1-n)+n*g[0]),i.range[1]=i.l2r(p[1]*(1-n)+n*g[1])}else f[0]=0,f[2]=c;if(d){var y=o.simpleMap(t.yr0,l.r2l),b=o.simpleMap(t.yr1,l.r2l),_=y[1]-y[0],x=b[1]-b[0];f[1]=(y[1]*(1-n)+n*b[1]-y[1])/(y[0]-y[1])*u,f[3]=u*(1-n+n*x/_),l.range[0]=i.l2r(y[0]*(1-n)+n*b[0]),l.range[1]=l.l2r(y[1]*(1-n)+n*b[1])}else f[1]=0,f[3]=u;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var w=h?c/f[2]:1,A=d?u/f[3]:1,k=h?f[0]:0,T=d?f[1]:0,S=h?f[0]/f[2]*c:0,E=d?f[1]/f[3]*u:0,C=i._offset-S,M=l._offset-E;r.clipRect.call(a.setTranslate,k,T).call(a.setScale,1/w,1/A),r.plot.call(a.setTranslate,C,M).call(a.setScale,w,A),a.setPointGroupScale(r.zoomScalePts,1/w,1/A),a.setTextPointsScale(r.zoomScaleTxt,1/w,1/A)}s.redrawComponents(e)}},{"../../components/drawing":388,"../../lib":503,"../../registry":638,"./axes":554,"@plotly/d3":58}],582:[function(e,t,n){"use strict";var r=e("../../registry").traceIs,i=e("./axis_autotype");function o(e,t){if("-"===e.type){var n,o=e._id,l=o.charAt(0);-1!==o.indexOf("scene")&&(o=l);var c=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if("splom"===i.type&&i._length>0&&(i["_"+n+"axes"]||{})[t])return i;if((i[n+"axis"]||n)===t){if(s(i,n))return i;if((i[n]||[]).length||i[n+"0"])return i}}}(t,o,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",h=c[u],d={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,s(c,l)){var f=a(c),p=[];for(n=0;n<t.length;n++){var g=t[n];r(g,"box-violin")&&(g[l+"axis"]||l)===o&&(void 0!==g[f]?p.push(g[f][0]):void 0!==g.name?p.push(g.name):p.push("text"),g[u]!==h&&(h=void 0))}e.type=i(p,h,d)}else if("splom"===c.type){var m=c.dimensions[c._axesDim[o]];m.visible&&(e.type=i(m.values,h,d))}else e.type=i(c[l]||[c[l+"0"]],h,d)}else e.type="linear"}}function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function s(e,t){var n=a(e),i=r(e,"box-violin"),o=r(e._fullInput||{},"candlestick");return i&&!o&&t===n&&void 0===e[n]&&void 0===e[n+"0"]}t.exports=function(e,t,n,r){n("autotypenumbers",r.autotypenumbersDflt),"-"===n("type",(r.splomStash||{}).type)&&(o(t,r.data),"-"===t.type?t.type="linear":e.type=t.type)}},{"../../registry":638,"./axis_autotype":555}],583:[function(e,t,n){"use strict";var r=e("../registry"),i=e("../lib");function o(e,t,n){var r,o,a,s=!1;if("data"===t.type)r=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;r=e._fullLayout}return o=i.nestedProperty(r,t.prop).get(),(a=n[t.type]=n[t.type]||{}).hasOwnProperty(t.prop)&&a[t.prop]!==o&&(s=!0),a[t.prop]=o,{changed:s,value:o}}function a(e,t){var n=[],r=t[0],o={};if("string"==typeof r)o[r]=t[1];else{if(!i.isPlainObject(r))return n;o=r}return l(o,(function(e,t,r){n.push({type:"layout",prop:e,value:r})}),"",0),n}function s(e,t){var n,r,o,a,s=[];if(r=t[0],o=t[1],n=t[2],a={},"string"==typeof r)a[r]=o;else{if(!i.isPlainObject(r))return s;a=r,void 0===n&&(n=o)}return void 0===n&&(n=null),l(a,(function(t,r,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,e.data.length);n&&(l=Math.min(l,n.length)),o=[];for(var c=0;c<l;c++)o[c]=n?n[c]:c}else a=i,o=n?n.slice():null;if(null===o)Array.isArray(a)&&(a=a[0]);else if(Array.isArray(o)){if(!Array.isArray(a)){var u=a;a=[];for(var h=0;h<o.length;h++)a[h]=u}a.length=Math.min(o.length,a.length)}s.push({type:"data",prop:t,traces:o,value:a})}),"",0),s}function l(e,t,n,r){Object.keys(e).forEach((function(o){var a=e[o];if("_"!==o[0]){var s=n+(r>0?".":"")+o;i.isPlainObject(a)?l(a,t,s,r+1):t(s,o,a)}}))}n.manageCommandObserver=function(e,t,r,a){var s={},l=!0;t&&t._commandObserver&&(s=t._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=n.hasSimpleAPICommandBindings(e,r,s.lookupTable);if(t&&t._commandObserver){if(c)return s;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,s}if(c){o(e,c,s.cache),s.check=function(){if(l){var t=o(e,c,s.cache);return t.changed&&a&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(a({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h<u.length;h++)e._internalOn(u[h],s.check);s.remove=function(){for(var t=0;t<u.length;t++)e._removeInternalListener(u[t],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},t&&(t._commandObserver=s),s},n.hasSimpleAPICommandBindings=function(e,t,r){var i,o,a=t.length;for(i=0;i<a;i++){var s,l=t[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var h=n.computeAPICommandBindings(e,c,u);if(1!==h.length)return!1;if(o){if((s=h[0]).type!==o.type)return!1;if(s.prop!==o.prop)return!1;if(Array.isArray(o.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var d=0;d<o.traces.length;d++)if(o.traces[d]!==s.traces[d])return!1}else if(s.prop!==o.prop)return!1}else o=h[0],Array.isArray(o.traces)&&o.traces.sort();var f=(s=h[0]).value;if(Array.isArray(f)){if(1!==f.length)return!1;f=f[0]}r&&(r[f]=i)}return o},n.executeAPICommand=function(e,t,n){if("skip"===t)return Promise.resolve();var o=r.apiMethodRegistry[t],a=[e];Array.isArray(n)||(n=[]);for(var s=0;s<n.length;s++)a.push(n[s]);return o.apply(null,a).catch((function(e){return i.warn("API call to Plotly."+t+" rejected.",e),Promise.reject(e)}))},n.computeAPICommandBindings=function(e,t,n){var r;switch(Array.isArray(n)||(n=[]),t){case"restyle":r=s(e,n);break;case"relayout":r=a(0,n);break;case"update":r=s(e,[n[0],n[2]]).concat(a(0,[n[1]]));break;case"animate":r=function(e,t){return Array.isArray(t[0])&&1===t[0].length&&-1!==["string","number"].indexOf(typeof t[0][0])?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}(0,n);break;default:r=[]}return r}},{"../lib":503,"../registry":638}],584:[function(e,t,n){"use strict";var r=e("../lib/extend").extendFlat;n.attributes=function(e,t){t=t||{};var n={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=(e.name&&e.name,e.trace,t.description&&t.description,{x:r({},n,{}),y:r({},n,{}),editType:e.editType});return e.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:e.editType},i.column={valType:"integer",min:0,dflt:0,editType:e.editType}),i},n.defaults=function(e,t,n,r){var i=r&&r.x||[0,1],o=r&&r.y||[0,1],a=t.grid;if(a){var s=n("domain.column");void 0!==s&&(s<a.columns?i=a._domains.x[s]:delete e.domain.column);var l=n("domain.row");void 0!==l&&(l<a.rows?o=a._domains.y[l]:delete e.domain.row)}var c=n("domain.x",i),u=n("domain.y",o);c[0]<c[1]||(e.domain.x=i.slice()),u[0]<u[1]||(e.domain.y=o.slice())}},{"../lib/extend":493}],585:[function(e,t,n){"use strict";t.exports=function(e){var t=e.editType,n=e.colorEditType;void 0===n&&(n=t);var r={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:n},editType:t};return e.autoSize&&(r.size.dflt="auto"),e.autoColor&&(r.color.dflt="auto"),e.arrayOk&&(r.family.arrayOk=!0,r.size.arrayOk=!0,r.color.arrayOk=!0),r}},{}],586:[function(e,t,n){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},{}],587:[function(e,t,n){"use strict";n.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},n.axesNames=["lonaxis","lataxis"],n.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},n.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},n.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},n.clipPad=.001,n.precision=.1,n.landColor="#F0DC82",n.waterColor="#3399FF",n.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},n.sphereSVG={type:"Sphere"},n.fillLayers={ocean:1,land:1,lakes:1},n.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},n.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],n.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],n.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},{}],588:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-geo"),o=i.geoPath,a=i.geoDistance,s=e("d3-geo-projection"),l=e("../../registry"),c=e("../../lib"),u=c.strTranslate,h=e("../../components/color"),d=e("../../components/drawing"),f=e("../../components/fx"),p=e("../plots"),g=e("../cartesian/axes"),m=e("../cartesian/autorange").getAutoRange,v=e("../../components/dragelement"),y=e("../cartesian/select").prepSelect,b=e("../cartesian/select").clearSelect,_=e("../cartesian/select").selectOnClick,x=e("./zoom"),w=e("./constants"),A=e("../../lib/geo_location_utils"),k=e("../../lib/topojson_utils"),T=e("topojson-client").feature;function S(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var E=S.prototype;function C(e,t){var n=w.clipPad,r=e[0]+n,i=e[1]-n,o=t[0]+n,a=t[1]-n;r>0&&i<0&&(i+=360);var s=(i-r)/4;return{type:"Polygon",coordinates:[[[r,o],[r,a],[r+s,a],[r+2*s,a],[r+3*s,a],[i,a],[i,o],[i-s,o],[i-2*s,o],[i-3*s,o],[r,o]]]}}t.exports=function(e){return new S(e)},E.plot=function(e,t,n){var r=this,i=t[this.id],o=[],a=!1;for(var s in w.layerNameToAdjective)if("frame"!==s&&i["show"+s]){a=!0;break}for(var l=0;l<e.length;l++)if(e[0][0].trace.locationmode){a=!0;break}if(a){var c=k.getTopojsonName(i);null!==r.topojson&&c===r.topojsonName||(r.topojsonName=c,void 0===PlotlyGeoAssets.topojson[r.topojsonName]&&o.push(r.fetchTopojson()))}o=o.concat(A.fetchTraceGeoData(e)),n.push(new Promise((function(n,i){Promise.all(o).then((function(){r.topojson=PlotlyGeoAssets.topojson[r.topojsonName],r.update(e,t),n()})).catch(i)})))},E.fetchTopojson=function(){var e=this,t=k.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise((function(n,i){r.json(t,(function(r,o){if(r)return 404===r.status?i(new Error(["plotly.js could not find topojson file at",t,".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):i(new Error(["unexpected error while fetching topojson file at",t].join(" ")));PlotlyGeoAssets.topojson[e.topojsonName]=o,n()}))}))},E.update=function(e,t){var n=t[this.id];this.hasChoropleth=!1;for(var r=0;r<e.length;r++){var i=e[r],o=i[0].trace;"choropleth"===o.type&&(this.hasChoropleth=!0),!0===o.visible&&o._length>0&&o._module.calcGeoJSON(i,t)}if(!this.updateProjection(e,t)){this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n),this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var a=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=a.selectAll(".point"),this.dataPoints.text=a.selectAll("text"),this.dataPaths.line=a.selectAll(".js-line");var s=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=s.selectAll("path"),this.render()}},E.updateProjection=function(e,t){var n=this.graphDiv,r=t[this.id],l=t._size,u=r.domain,h=r.projection,d=r.lonaxis,f=r.lataxis,p=d._ax,g=f._ax,v=this.projection=function(e){var t=e.projection,n=t.type,r=w.projNames[n];r="geo"+c.titleCase(r);for(var l=(i[r]||s[r])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[n]/2:null,h=["center","rotate","parallels","clipExtent"],d=function(e){return e?l:[]},f=0;f<h.length;f++){var p=h[f];"function"!=typeof l[p]&&(l[p]=d)}return l.isLonLatOverEdges=function(e){if(null===l(e))return!0;if(u){var t=l.rotate();return a(e,[-t[0],-t[1]])>u*Math.PI/180}return!1},l.getPath=function(){return o().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(w.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance),u&&l.clipAngle(u-w.clipPad),l}(r),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],b=r.center||{},_=h.rotation||{},x=d.range||[],A=f.range||[];if(r.fitbounds){p._length=y[1][0]-y[0][0],g._length=y[1][1]-y[0][1],p.range=m(n,p),g.range=m(n,g);var k=(p.range[0]+p.range[1])/2,T=(g.range[0]+g.range[1])/2;if(r._isScoped)b={lon:k,lat:T};else if(r._isClipped){b={lon:k,lat:T},_={lon:k,lat:T,roll:_.roll};var S=h.type,E=w.lonaxisSpan[S]/2||180,M=w.lataxisSpan[S]/2||90;x=[k-E,k+E],A=[T-M,T+M]}else b={lon:k,lat:T},_={lon:k,lat:_.lat,roll:_.roll}}v.center([b.lon-_.lon,b.lat-_.lat]).rotate([-_.lon,-_.lat,_.roll]).parallels(h.parallels);var O=C(x,A);v.fitExtent(y,O);var L=this.bounds=v.getBounds(O),D=this.fitScale=v.scale(),I=v.translate();if(r.fitbounds){var R=v.getBounds(C(p.range,g.range)),P=Math.min((L[1][0]-L[0][0])/(R[1][0]-R[0][0]),(L[1][1]-L[0][1])/(R[1][1]-R[0][1]));isFinite(P)?v.scale(P*D):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(h.scale*D);var N=this.midPt=[(L[0][0]+L[1][0])/2,(L[0][1]+L[1][1])/2];if(v.translate([I[0]+(N[0]-I[0]),I[1]+(N[1]-I[1])]).clipExtent(L),r._isAlbersUsa){var z=v([b.lon,b.lat]),F=v.translate();v.translate([F[0]-(z[0]-F[0]),F[1]-(z[1]-F[1])])}},E.updateBaseLayers=function(e,t){var n=this,i=n.topojson,o=n.layers,a=n.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(w.lineLayers[e])}function c(e){return Boolean(w.fillLayers[e])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),f=n.framework.selectAll(".layer").data(u,String);f.exit().each((function(e){delete o[e],delete a[e],r.select(this).remove()})),f.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=o[e]=r.select(this);"bg"===e?n.bgRect=t.append("rect").style("pointer-events","all"):s(e)?a[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?a[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(a[e]=t.append("path").style("stroke","none"))})),f.order(),f.each((function(n){var r=a[n],o=w.layerNameToAdjective[n];"frame"===n?r.datum(w.sphereSVG):l(n)||c(n)?r.datum(T(i,i.objects[n])):s(n)&&r.datum(function(e,t,n){var r,i,o,a=t[e],s=w.scopeDefaults[t.scope];"lonaxis"===e?(r=s.lonaxisRange,i=s.lataxisRange,o=function(e,t){return[e,t]}):"lataxis"===e&&(r=s.lataxisRange,i=s.lonaxisRange,o=function(e,t){return[t,e]});var l={type:"linear",range:[r[0],r[1]-1e-6],tick0:a.tick0,dtick:a.dtick};g.setConvert(l,n);var c=g.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var u=c.length,h=new Array(u),d=0;d<u;d++)for(var f=c[d].x,p=h[d]=[],m=i[0];m<i[1]+2.5;m+=2.5)p.push(o(f,m));return{type:"MultiLineString",coordinates:h}}(n,t,e)).call(h.stroke,t[n].gridcolor).call(d.dashLine,"",t[n].gridwidth),l(n)?r.call(h.stroke,t[o+"color"]).call(d.dashLine,"",t[o+"width"]):c(n)&&r.call(h.fill,t[o+"color"])}))},E.updateDims=function(e,t){var n=this.bounds,r=(t.framewidth||0)/2,i=n[0][0]-r,o=n[0][1]-r,a=n[1][0]-i+r,s=n[1][1]-o+r;d.setRect(this.clipRect,i,o,a,s),this.bgRect.call(d.setRect,i,o,a,s).call(h.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=a,this.yaxis._offset=o,this.yaxis._length=s},E.updateFx=function(e,t){var n=this,i=n.graphDiv,o=n.bgRect,a=e.dragmode,s=e.clickmode;if(!n.isStatic){var u;"select"===a?u=function(e,t){(e.range={})[n.id]=[d([t.xmin,t.ymin]),d([t.xmax,t.ymax])]}:"lasso"===a&&(u=function(e,t,r){(e.lassoPoints={})[n.id]=r.filtered.map(d)});var h={element:n.bgRect.node(),gd:i,plotinfo:{id:n.id,xaxis:n.xaxis,yaxis:n.yaxis,fillRangeItems:u},xaxes:[n.xaxis],yaxes:[n.yaxis],subplot:n.id,clickFn:function(e){2===e&&b(i)}};"pan"===a?(o.node().onmousedown=null,o.call(x(n,t)),o.on("dblclick.zoom",(function(){var e=n.viewInitial,t={};for(var r in e)t[n.id+"."+r]=e[r];l.call("_guiRelayout",i,t),i.emit("plotly_doubleclick",null)})),i._context._scrollZoom.geo||o.on("wheel.zoom",null)):"select"!==a&&"lasso"!==a||(o.on(".zoom",null),h.prepFn=function(e,t,n){y(e,t,n,h,a)},v.init(h)),o.on("mousemove",(function(){var e=n.projection.invert(c.getPositionFromD3Event());if(!e)return v.unhover(i,r.event);n.xaxis.p2c=function(){return e[0]},n.yaxis.p2c=function(){return e[1]},f.hover(i,r.event,n.id)})),o.on("mouseout",(function(){i._dragging||v.unhover(i,r.event)})),o.on("click",(function(){"select"!==a&&"lasso"!==a&&(s.indexOf("select")>-1&&_(r.event,i,[n.xaxis],[n.yaxis],n.id,h),s.indexOf("event")>-1&&f.click(i,r.event))}))}function d(e){return n.projection.invert([e[0]+n.xaxis._offset,e[1]+n.yaxis._offset])}},E.makeFramework=function(){var e=this,t=e.graphDiv,n=t._fullLayout,i="clip"+n._uid+e.id;e.clipDef=n._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(d.setClipUrl,i,t),e.project=function(t){var n=e.projection(t);return n?[n[0]-e.xaxis._offset,n[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},g.setConvert(e.mockAxis,n)},E.saveViewInitial=function(e){var t,n=e.center||{},r=e.projection,i=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale},t=e._isScoped?{"center.lon":n.lon,"center.lat":n.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":n.lon,"center.lat":n.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,t)},E.render=function(){var e,t=this.projection,n=t.getPath();function r(e){var n=t(e.lonlat);return n?u(n[0],n[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",n);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return n(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",r)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../registry":638,"../cartesian/autorange":553,"../cartesian/axes":554,"../cartesian/select":575,"../plots":619,"./constants":587,"./zoom":592,"@plotly/d3":58,"d3-geo":114,"d3-geo-projection":113,"topojson-client":315}],589:[function(e,t,n){"use strict";var r=e("../../plots/get_data").getSubplotCalcData,i=e("../../lib").counterRegex,o=e("./geo"),a="geo",s=i(a),l={};l.geo={valType:"subplotid",dflt:a,editType:"calc"},t.exports={attr:a,name:a,idRoot:a,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,i=t._subplots.geo,s=0;s<i.length;s++){var l=i[s],c=r(n,a,l),u=t[l]._subplot;u||(u=o({id:l,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[l]._subplot=u),u.plot(c,t,e._promises)}},updateFx:function(e){for(var t=e._fullLayout,n=t._subplots.geo,r=0;r<n.length;r++){var i=t[n[r]];i._subplot.updateFx(t,i)}},clean:function(e,t,n,r){for(var i=r._subplots.geo||[],o=0;o<i.length;o++){var a=i[o],s=r[a]._subplot;!t[a]&&s&&(s.framework.remove(),s.clipDef.remove())}}}},{"../../lib":503,"../../plots/get_data":593,"./geo":588,"./layout_attributes":590,"./layout_defaults":591}],590:[function(e,t,n){"use strict";var r=e("../../components/color/attributes"),i=e("../domain").attributes,o=e("./constants"),a=e("../../plot_api/edit_types").overrideAll,s=e("../../lib/sort_object_keys"),l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1}};(t.exports=a({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(o.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(o.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:o.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:o.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:o.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:o.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":365,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../domain":584,"./constants":587}],591:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../subplot_defaults"),o=e("../get_data").getSubplotData,a=e("./constants"),s=e("./layout_attributes"),l=a.axesNames;function c(e,t,n,i){var s=o(i.fullData,"geo",i.id).map((function(e){return e._expandedIndex})),c=n("resolution"),u=n("scope"),h=a.scopeDefaults[u],d=n("projection.type",h.projType),f=t._isAlbersUsa="albers usa"===d;f&&(u=t.scope="usa");var p=t._isScoped="world"!==u,g=t._isSatellite="satellite"===d,m=t._isConic=-1!==d.indexOf("conic")||"albers"===d,v=t._isClipped=!!a.lonaxisSpan[d];if(!1===e.visible){var y=r.extendDeep({},t._template);y.showcoastlines=!1,y.showcountries=!1,y.showframe=!1,y.showlakes=!1,y.showland=!1,y.showocean=!1,y.showrivers=!1,y.showsubunits=!1,y.lonaxis&&(y.lonaxis.showgrid=!1),y.lataxis&&(y.lataxis.showgrid=!1),t._template=y}for(var b=n("visible"),_=0;_<l.length;_++){var x,w=l[_],A=[30,10][_];if(p)x=h[w+"Range"];else{var k=a[w+"Span"],T=(k[d]||k["*"])/2,S=n("projection.rotation."+w.substr(0,3),h.projRotate[_]);x=[S-T,S+T]}var E=n(w+".range",x);n(w+".tick0"),n(w+".dtick",A),n(w+".showgrid",!!b&&void 0)&&(n(w+".gridcolor"),n(w+".gridwidth")),t[w]._ax={type:"linear",_id:w.slice(0,3),_traceIndices:s,setScale:r.identity,c2l:r.identity,r2l:r.identity,autorange:!0,range:E.slice(),_m:1,_input:{}}}var C=t.lonaxis.range,M=t.lataxis.range,O=C[0],L=C[1];O>0&&L<0&&(L+=360);var D,I,R,P=(O+L)/2;if(!f){var N=p?h.projRotate:[P,0,0];D=n("projection.rotation.lon",N[0]),n("projection.rotation.lat",N[1]),n("projection.rotation.roll",N[2]),n("showcoastlines",!p&&b)&&(n("coastlinecolor"),n("coastlinewidth")),n("showocean",!!b&&void 0)&&n("oceancolor")}f?(I=-96.6,R=38.7):(I=p?P:D,R=(M[0]+M[1])/2),n("center.lon",I),n("center.lat",R),g&&(n("projection.tilt"),n("projection.distance")),m&&n("projection.parallels",h.projParallels||[0,60]),n("projection.scale"),n("showland",!!b&&void 0)&&n("landcolor"),n("showlakes",!!b&&void 0)&&n("lakecolor"),n("showrivers",!!b&&void 0)&&(n("rivercolor"),n("riverwidth")),n("showcountries",p&&"usa"!==u&&b)&&(n("countrycolor"),n("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(n("showsubunits",b),n("subunitcolor"),n("subunitwidth")),p||n("showframe",b)&&(n("framecolor"),n("framewidth")),n("bgcolor"),n("fitbounds")&&(delete t.projection.scale,p?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}t.exports=function(e,t,n){i(e,t,n,{type:"geo",attributes:s,handleDefaults:c,fullData:n,partition:"y"})}},{"../../lib":503,"../get_data":593,"../subplot_defaults":632,"./constants":587,"./layout_attributes":590}],592:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../registry"),a=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(e,t){return r.behavior.zoom().translate(t.translate()).scale(t.scale())}function h(e,t,n){var r=e.id,a=e.graphDiv,s=a.layout,l=s[r],c=a._fullLayout,u=c[r],h={},d={};function f(e,t){h[r+"."+e]=i.nestedProperty(l,e).get(),o.call("_storeDirectGUIEdit",s,c._preGUI,h);var n=i.nestedProperty(u,e);n.get()!==t&&(n.set(t),i.nestedProperty(l,e).set(t),d[r+"."+e]=t)}n(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",d)}function d(e,t){var n=u(0,t);function i(n){var r=t.invert(e.midPt);n("center.lon",r[0]),n("center.lat",r[1])}return n.on("zoomstart",(function(){r.select(this).style(l)})).on("zoom",(function(){t.scale(r.event.scale).translate(r.event.translate),e.render();var n=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})})).on("zoomend",(function(){r.select(this).style(c),h(e,t,i)})),n}function f(e,t){var n,i,o,a,s,d,f,p,g,m=u(0,t);function v(e){return t.invert(e)}function y(n){var r=t.rotate(),i=t.invert(e.midPt);n("projection.rotation.lon",-r[0]),n("center.lon",i[0]),n("center.lat",i[1])}return m.on("zoomstart",(function(){r.select(this).style(l),n=r.mouse(this),i=t.rotate(),o=t.translate(),a=i,s=v(n)})).on("zoom",(function(){if(d=r.mouse(this),function(e){var n=v(e);if(!n)return!0;var r=t(n);return Math.abs(r[0]-e[0])>2||Math.abs(r[1]-e[1])>2}(n))return m.scale(t.scale()),void m.translate(t.translate());t.scale(r.event.scale),t.translate([o[0],r.event.translate[1]]),s?v(d)&&(p=v(d),f=[a[0]+(p[0]-s[0]),i[1],i[2]],t.rotate(f),a=f):s=v(n=d),g=!0,e.render();var l=t.rotate(),c=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){r.select(this).style(c),g&&h(e,t,y)})),m}function p(e,t){var n,i={r:t.rotate(),k:t.scale()},o=u(0,t),a=function(e){for(var t=0,n=arguments.length,i=[];++t<n;)i.push(arguments[t]);var o=r.dispatch.apply(null,i);return o.of=function(t,n){return function(i){var a;try{a=i.sourceEvent=r.event,i.target=e,r.event=i,o[i.type].apply(t,n)}finally{r.event=a}}},o}(o,"zoomstart","zoom","zoomend"),s=0,d=o.on;function f(e){s++||e({type:"zoomstart"})}function p(e){e({type:"zoom"})}function _(e){--s||e({type:"zoomend"})}function x(e){var n=t.rotate();e("projection.rotation.lon",-n[0]),e("projection.rotation.lat",-n[1])}return o.on("zoomstart",(function(){r.select(this).style(l);var e=r.mouse(this),s=t.rotate(),c=s,u=t.translate(),h=m(s);n=g(t,e),d.call(o,"zoom",(function(){var o=r.mouse(this);if(t.scale(i.k=r.event.scale),n){if(g(t,o)){t.rotate(s).translate(u);var l=g(t,o),d=y(n,l),f=A(v(h,d)),m=i.r=b(f,n,c);isFinite(m[0])&&isFinite(m[1])&&isFinite(m[2])||(m=c),t.rotate(m),c=m}}else n=g(t,e=o);p(a.of(this,arguments))})),f(a.of(this,arguments))})).on("zoomend",(function(){r.select(this).style(c),d.call(o,"zoom",null),_(a.of(this,arguments)),h(e,t,x)})).on("zoom.redraw",(function(){e.render();var n=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-n[0],"geo.projection.rotation.lat":-n[1]})})),r.rebind(o,a,"on")}function g(e,t){var n=e.invert(t);return n&&isFinite(n[0])&&isFinite(n[1])&&function(e){var t=e[0]*a,n=e[1]*a,r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}(n)}function m(e){var t=.5*e[0]*a,n=.5*e[1]*a,r=.5*e[2]*a,i=Math.sin(t),o=Math.cos(t),s=Math.sin(n),l=Math.cos(n),c=Math.sin(r),u=Math.cos(r);return[o*l*u+i*s*c,i*l*u-o*s*c,o*s*u+i*l*c,o*l*c-i*s*u]}function v(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=t[0],s=t[1],l=t[2],c=t[3];return[n*a-r*s-i*l-o*c,n*s+r*a+i*c-o*l,n*l-r*c+i*a+o*s,n*c+r*l-i*s+o*a]}function y(e,t){if(e&&t){var n=function(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}(e,t),r=Math.sqrt(k(n,n)),i=.5*Math.acos(Math.max(-1,Math.min(1,k(e,t)))),o=Math.sin(i)/r;return r&&[Math.cos(i),n[2]*o,-n[1]*o,n[0]*o]}}function b(e,t,n){var r=w(t,2,e[0]);r=w(r,1,e[1]),r=w(r,0,e[2]-n[2]);var i,o,a=t[0],l=t[1],c=t[2],u=r[0],h=r[1],d=r[2],f=Math.atan2(l,a)*s,p=Math.sqrt(a*a+l*l);Math.abs(h)>p?(o=(h>0?90:-90)-f,i=0):(o=Math.asin(h/p)*s-f,i=Math.sqrt(p*p-h*h));var g=180-o-2*f,m=(Math.atan2(d,u)-Math.atan2(c,i))*s,v=(Math.atan2(d,u)-Math.atan2(c,-i))*s;return _(n[0],n[1],o,m)<=_(n[0],n[1],g,v)?[o,m,n[2]]:[g,v,n[2]]}function _(e,t,n,r){var i=x(n-e),o=x(r-t);return Math.sqrt(i*i+o*o)}function x(e){return(e%360+540)%360-180}function w(e,t,n){var r=n*a,i=e.slice(),o=0===t?1:0,s=2===t?1:2,l=Math.cos(r),c=Math.sin(r);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function A(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*s,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*s]}function k(e,t){for(var n=0,r=0,i=e.length;r<i;++r)n+=e[r]*t[r];return n}t.exports=function(e,t){var n=e.projection;return(t._isScoped?d:t._isClipped?p:f)(e,n)}},{"../../lib":503,"../../registry":638,"@plotly/d3":58}],593:[function(e,t,n){"use strict";var r=e("../registry"),i=e("./cartesian/constants").SUBPLOT_PATTERN;n.getSubplotCalcData=function(e,t,n){var i=r.subplotsRegistry[t];if(!i)return[];for(var o=i.attr,a=[],s=0;s<e.length;s++){var l=e[s];l[0].trace[o]===n&&a.push(l)}return a},n.getModuleCalcData=function(e,t){var n,i=[],o=[];if(!(n="string"==typeof t?r.getModule(t).plot:"function"==typeof t?t:t.plot))return[i,e];for(var a=0;a<e.length;a++){var s=e[a],l=s[0].trace;!0===l.visible&&0!==l._length&&(l._module.plot===n?i.push(s):o.push(s))}return[i,o]},n.getSubplotData=function(e,t,n){if(!r.subplotsRegistry[t])return[];var o,a,s,l=r.subplotsRegistry[t].attr,c=[];if("gl2d"===t){var u=n.match(i);a="x"+u[1],s="y"+u[2]}for(var h=0;h<e.length;h++)o=e[h],"gl2d"===t&&r.traceIs(o,"gl2d")?o[l[0]]===a&&o[l[1]]===s&&c.push(o):o[l]===n&&c.push(o);return c}},{"../registry":638,"./cartesian/constants":561}],594:[function(e,t,n){"use strict";var r=e("mouse-change"),i=e("mouse-wheel"),o=e("mouse-event-offset"),a=e("../cartesian/constants"),s=e("has-passive-events");function l(e,t){this.element=e,this.plot=t,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}t.exports=function(e){var t=e.mouseContainer,n=e.glplot,c=new l(t,n);function u(){e.xaxis.autorange=!1,e.yaxis.autorange=!1}function h(t,r,i){var o,s,l=e.calcDataBox(),h=n.viewBox,d=c.lastPos[0],f=c.lastPos[1],p=a.MINDRAG*n.pixelRatio,g=a.MINZOOM*n.pixelRatio;function m(t,n,r){var i=Math.min(n,r),o=Math.max(n,r);i!==o?(l[t]=i,l[t+2]=o,c.dataBox=l,e.setRanges(l)):(e.selectBox.selectBox=[0,0,1,1],e.glplot.setDirty())}switch(r*=n.pixelRatio,i*=n.pixelRatio,i=h[3]-h[1]-i,e.fullLayout.dragmode){case"zoom":if(t){var v=r/(h[2]-h[0])*(l[2]-l[0])+l[0],y=i/(h[3]-h[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=r,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var b=Math.abs(c.dragStart[0]-r)<g,_=Math.abs(c.dragStart[1]-i)<g;if(!function(){for(var t=e.graphDiv._fullLayout._axisConstraintGroups,n=e.xaxis._id,r=e.yaxis._id,i=0;i<t.length;i++)if(-1!==t[i][n]){if(-1!==t[i][r])return!0;break}return!1}()||b&&_)b&&(c.boxEnd[0]=c.boxStart[0]),_&&(c.boxEnd[1]=c.boxStart[1]);else{o=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var x=(l[3]-l[1])/(l[2]-l[0]);Math.abs(o*x)>Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(o)*x*(s>=0?1:-1),c.boxEnd[1]<l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(x)):c.boxEnd[1]>l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(x))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/x*(o>=0?1:-1),c.boxEnd[0]<l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(x)):c.boxEnd[0]>l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(x)))}}else c.boxEnabled?(o=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],o||s?(o&&(m(0,c.boxStart[0],c.boxEnd[0]),e.xaxis.autorange=!1),s&&(m(1,c.boxStart[1],c.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,t?(c.panning||(c.dragStart[0]=r,c.dragStart[1]=i),Math.abs(c.dragStart[0]-r)<p&&(r=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<p&&(i=c.dragStart[1]),o=(d-r)*(l[2]-l[0])/(n.viewBox[2]-n.viewBox[0]),s=(f-i)*(l[3]-l[1])/(n.viewBox[3]-n.viewBox[1]),l[0]+=o,l[2]+=o,l[1]+=s,l[3]+=s,e.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),e.cameraChanged(),e.handleAnnotations()):c.panning&&(c.panning=!1,e.relayoutCallback())}c.lastPos[0]=r,c.lastPos[1]=i}return c.mouseListener=r(t,h),t.addEventListener("touchstart",(function(e){var n=o(e.changedTouches[0],t);h(0,n[0],n[1]),h(1,n[0],n[1]),e.preventDefault()}),!!s&&{passive:!1}),t.addEventListener("touchmove",(function(e){e.preventDefault();var n=o(e.changedTouches[0],t);h(1,n[0],n[1]),e.preventDefault()}),!!s&&{passive:!1}),t.addEventListener("touchend",(function(e){h(0,c.lastPos[0],c.lastPos[1]),e.preventDefault()}),!!s&&{passive:!1}),c.wheelListener=i(t,(function(t,r){if(!e.scrollZoom)return!1;var i=e.calcDataBox(),o=n.viewBox,a=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*r/(o[3]-o[1])),h=a/(o[2]-o[0])*(i[2]-i[0])+i[0],d=s/(o[3]-o[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-h)*l+h,i[2]=(i[2]-h)*l+h,i[1]=(i[1]-d)*l+d,i[3]=(i[3]-d)*l+d,e.setRanges(i),c.lastInputTime=Date.now(),u(),e.cameraChanged(),e.handleAnnotations(),e.relayoutCallback(),!0}),!0),c}},{"../cartesian/constants":561,"has-passive-events":229,"mouse-change":241,"mouse-event-offset":242,"mouse-wheel":244}],595:[function(e,t,n){"use strict";var r=e("../cartesian/axes"),i=e("../../lib/str2rgbarray");function o(e){this.scene=e,this.gl=e.gl,this.pixelRatio=e.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var a=o.prototype,s=["xaxis","yaxis"];a.merge=function(e){var t,n,r,o,a,l,c,u,h,d,f;for(this.titleEnable=!1,this.backgroundColor=i(e.plot_bgcolor),d=0;d<2;++d){var p=(t=s[d]).charAt(0);for(r=(n=e[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[p]?"":n.title.text,f=0;f<=2;f+=2)this.labelEnable[d+f]=!1,this.labels[d+f]=r,this.labelColor[d+f]=i(n.title.font.color),this.labelFont[d+f]=n.title.font.family,this.labelSize[d+f]=n.title.font.size,this.labelPad[d+f]=this.getLabelPad(t,n),this.tickEnable[d+f]=!1,this.tickColor[d+f]=i((n.tickfont||{}).color),this.tickAngle[d+f]="auto"===n.tickangle?0:Math.PI*-n.tickangle/180,this.tickPad[d+f]=this.getTickPad(n),this.tickMarkLength[d+f]=0,this.tickMarkWidth[d+f]=n.tickwidth||0,this.tickMarkColor[d+f]=i(n.tickcolor),this.borderLineEnable[d+f]=!1,this.borderLineColor[d+f]=i(n.linecolor),this.borderLineWidth[d+f]=n.linewidth||0;c=this.hasSharedAxis(n),a=this.hasAxisInDfltPos(t,n)&&!c,l=this.hasAxisInAltrPos(t,n)&&!c,o=n.mirror||!1,u=c?-1!==String(o).indexOf("all"):!!o,h=c?"allticks"===o:-1!==String(o).indexOf("ticks"),a?this.labelEnable[d]=!0:l&&(this.labelEnable[d+2]=!0),a?this.tickEnable[d]=n.showticklabels:l&&(this.tickEnable[d+2]=n.showticklabels),(a||u)&&(this.borderLineEnable[d]=n.showline),(l||u)&&(this.borderLineEnable[d+2]=n.showline),(a||h)&&(this.tickMarkLength[d]=this.getTickMarkLength(n)),(l||h)&&(this.tickMarkLength[d+2]=this.getTickMarkLength(n)),this.gridLineEnable[d]=n.showgrid,this.gridLineColor[d]=i(n.gridcolor),this.gridLineWidth[d]=n.gridwidth,this.zeroLineEnable[d]=n.zeroline,this.zeroLineColor[d]=i(n.zerolinecolor),this.zeroLineWidth[d]=n.zerolinewidth}},a.hasSharedAxis=function(e){var t=this.scene,n=t.fullLayout._subplots.gl2d;return 0!==r.findSubplotsWithAxis(n,e).indexOf(t.id)},a.hasAxisInDfltPos=function(e,t){var n=t.side;return"xaxis"===e?"bottom"===n:"yaxis"===e?"left"===n:void 0},a.hasAxisInAltrPos=function(e,t){var n=t.side;return"xaxis"===e?"top"===n:"yaxis"===e?"right"===n:void 0},a.getLabelPad=function(e,t){var n=1.5,r=t.title.font.size,i=t.showticklabels;return"xaxis"===e?"top"===t.side?r*(n+(i?1:0))-10:r*(n+(i?.5:0))-10:"yaxis"===e?"right"===t.side?10+r*(n+(i?1:.5)):10+r*(n+(i?.5:0)):void 0},a.getTickPad=function(e){return"outside"===e.ticks?10+e.ticklen:15},a.getTickMarkLength=function(e){if(!e.ticks)return 0;var t=e.ticklen;return"inside"===e.ticks?-t:t},t.exports=function(e){return new o(e)}},{"../../lib/str2rgbarray":528,"../cartesian/axes":554}],596:[function(e,t,n){"use strict";var r=e("../../plot_api/edit_types").overrideAll,i=e("./scene2d"),o=e("../layout_attributes"),a=e("../../constants/xmlns_namespaces"),s=e("../cartesian/constants"),l=e("../cartesian"),c=e("../../components/fx/layout_attributes"),u=e("../get_data").getSubplotData;n.name="gl2d",n.attr=["xaxis","yaxis"],n.idRoot=["x","y"],n.idRegex=s.idRegex,n.attrRegex=s.attrRegex,n.attributes=e("../cartesian/attributes"),n.supplyLayoutDefaults=function(e,t,n){t._has("cartesian")||l.supplyLayoutDefaults(e,t,n)},n.layoutAttrOverrides=r(l.layoutAttributes,"plot","from-root"),n.baseLayoutAttrOverrides=r({plot_bgcolor:o.plot_bgcolor,hoverlabel:c.hoverlabel},"plot","nested"),n.plot=function(e){for(var t=e._fullLayout,n=e._fullData,r=t._subplots.gl2d,o=0;o<r.length;o++){var a=r[o],s=t._plots[a],l=u(n,"gl2d",a),c=s._scene2d;void 0===c&&(c=new i({id:a,graphDiv:e,container:e.querySelector(".gl-container"),staticPlot:e._context.staticPlot,plotGlPixelRatio:e._context.plotGlPixelRatio},t),s._scene2d=c),c.plot(l,e.calcdata,t,e.layout)}},n.clean=function(e,t,n,r){for(var i=r._subplots.gl2d||[],o=0;o<i.length;o++){var a=i[o],s=r._plots[a];s._scene2d&&0===u(e,"gl2d",a).length&&(s._scene2d.destroy(),delete r._plots[a])}l.clean.apply(this,arguments)},n.drawFramework=function(e){e._context.staticPlot||l.drawFramework(e)},n.toSVG=function(e){for(var t=e._fullLayout,n=t._subplots.gl2d,r=0;r<n.length;r++){var i=t._plots[n[r]]._scene2d,o=i.toImage("png");t._glimages.append("svg:image").attr({xmlns:a.svg,"xlink:href":o,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),i.destroy()}},n.updateFx=function(e){for(var t=e._fullLayout,n=t._subplots.gl2d,r=0;r<n.length;r++)t._plots[n[r]]._scene2d.updateFx(t.dragmode)}},{"../../components/fx/layout_attributes":407,"../../constants/xmlns_namespaces":480,"../../plot_api/edit_types":536,"../cartesian":568,"../cartesian/attributes":552,"../cartesian/constants":561,"../get_data":593,"../layout_attributes":610,"./scene2d":597}],597:[function(e,t,n){"use strict";var r,i,o=e("../../registry"),a=e("../../plots/cartesian/axes"),s=e("../../components/fx"),l=e("../../../stackgl_modules").gl_plot2d,c=e("../../../stackgl_modules").gl_spikes2d,u=e("../../../stackgl_modules").gl_select_box,h=e("webgl-context"),d=e("./convert"),f=e("./camera"),p=e("../../lib/show_no_webgl_msg"),g=e("../cartesian/constraints"),m=g.enforce,v=g.clean,y=e("../cartesian/autorange").doAutoRange,b=e("../../components/dragelement/helpers"),_=b.drawMode,x=b.selectMode,w=["xaxis","yaxis"],A=e("../cartesian/constants").SUBPLOT_PATTERN;function k(e,t){this.container=e.container,this.graphDiv=e.graphDiv,this.pixelRatio=e.plotGlPixelRatio||window.devicePixelRatio,this.id=e.id,this.staticPlot=!!e.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(t),this.makeFramework(),this.stopped||(this.glplotOptions=d(this),this.glplotOptions.merge(t),this.glplot=l(this.glplotOptions),this.camera=f(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}t.exports=k;var T=k.prototype;T.makeFramework=function(){if(this.staticPlot){if(!(i||(r=document.createElement("canvas"),i=h({canvas:r,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=r,this.gl=i}else{var e=this.container.querySelector(".gl-canvas-focus"),t=h({canvas:e,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!t)return p(this),void(this.stopped=!0);this.canvas=e,this.gl=t}var n=this.canvas;n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style["pointer-events"]="none",this.updateSize(n);var o=this.svgContainer=document.createElementNS("path_to_url","svg");o.style.position="absolute",o.style.top=o.style.left="0px",o.style.width=o.style.height="100%",o.style["z-index"]=20,o.style["pointer-events"]="none";var a=this.mouseContainer=document.createElement("div");a.style.position="absolute",a.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(o),s.appendChild(a);var l=this;a.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),a.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},T.toImage=function(e){e||(e="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(r),this.updateSize(this.canvas);var t=this.glplot.gl,n=t.drawingBufferWidth,i=t.drawingBufferHeight;t.clearColor(1,1,1,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),t.bindFramebuffer(t.FRAMEBUFFER,null);var o=new Uint8Array(n*i*4);t.readPixels(0,0,n,i,t.RGBA,t.UNSIGNED_BYTE,o);for(var a=0,s=i-1;a<s;++a,--s)for(var l=0;l<n;++l)for(var c=0;c<4;++c){var u=o[4*(n*a+l)+c];o[4*(n*a+l)+c]=o[4*(n*s+l)+c],o[4*(n*s+l)+c]=u}var h=document.createElement("canvas");h.width=n,h.height=i;var d,f=h.getContext("2d"),p=f.createImageData(n,i);switch(p.data.set(o),f.putImageData(p,0,0),e){case"jpeg":d=h.toDataURL("image/jpeg");break;case"webp":d=h.toDataURL("image/webp");break;default:d=h.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(r),d},T.updateSize=function(e){e||(e=this.canvas);var t=this.pixelRatio,n=this.fullLayout,r=n.width,i=n.height,o=0|Math.ceil(t*r),a=0|Math.ceil(t*i);return e.width===o&&e.height===a||(e.width=o,e.height=a),e},T.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var e=[a.calcTicks(this.xaxis),a.calcTicks(this.yaxis)],t=0;t<2;++t)for(var n=0;n<e[t].length;++n)e[t][n].text=e[t][n].text+"";return e},T.updateRefs=function(e){this.fullLayout=e;var t=this.id.match(A),n="xaxis"+t[1],r="yaxis"+t[2];this.xaxis=this.fullLayout[n],this.yaxis=this.fullLayout[r]},T.relayoutCallback=function(){var e=this.graphDiv,t=this.xaxis,n=this.yaxis,r=e.layout,i={},a=i[t._name+".range"]=t.range.slice(),s=i[n._name+".range"]=n.range.slice();i[t._name+".autorange"]=t.autorange,i[n._name+".autorange"]=n.autorange,o.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,i);var l=r[t._name];l.range=a,l.autorange=t.autorange;var c=r[n._name];c.range=s,c.autorange=n.autorange,i.lastInputTime=this.camera.lastInputTime,e.emit("plotly_relayout",i)},T.cameraChanged=function(){var e=this.camera;this.glplot.setDataBox(this.calcDataBox());var t=this.computeTickMarks();(function(e,t){for(var n=0;n<2;++n){var r=e[n],i=t[n];if(r.length!==i.length)return!0;for(var o=0;o<r.length;++o)if(r[o].x!==i[o].x)return!0}return!1})(t,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=t,this.glplotOptions.dataBox=e.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},T.handleAnnotations=function(){for(var e=this.graphDiv,t=this.fullLayout.annotations,n=0;n<t.length;n++){var r=t[n];r.xref===this.xaxis._id&&r.yref===this.yaxis._id&&o.getComponentMethod("annotations","drawOne")(e,n)}},T.destroy=function(){if(this.glplot){var e=this.traces;e&&Object.keys(e).map((function(t){e[t].dispose(),delete e[t]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},T.plot=function(e,t,n){var r=this.glplot;this.updateRefs(n),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(e,t),this.updateFx(n.dragmode);var i=n.width,o=n.height;this.updateSize(this.canvas);var a=this.glplotOptions;a.merge(n),a.screenBox=[0,0,i,o];var s={_fullLayout:{_axisConstraintGroups:n._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:n._size}};v(s,this.xaxis),v(s,this.yaxis);var l,c,u=n._size,h=this.xaxis.domain,d=this.yaxis.domain;for(a.viewBox=[u.l+h[0]*u.w,u.b+d[0]*u.h,i-u.r-(1-h[1])*u.w,o-u.t-(1-d[1])*u.h],this.mouseContainer.style.width=u.w*(h[1]-h[0])+"px",this.mouseContainer.style.height=u.h*(d[1]-d[0])+"px",this.mouseContainer.height=u.h*(d[1]-d[0]),this.mouseContainer.style.left=u.l+h[0]*u.w+"px",this.mouseContainer.style.top=u.t+(1-d[1])*u.h+"px",c=0;c<2;++c)(l=this[w[c]])._length=a.viewBox[c+2]-a.viewBox[c],y(this.graphDiv,l),l.setScale();m(s),a.ticks=this.computeTickMarks(),a.dataBox=this.calcDataBox(),a.merge(n),r.update(a),this.glplot.draw()},T.calcDataBox=function(){var e=this.xaxis,t=this.yaxis,n=e.range,r=t.range,i=e.r2l,o=t.r2l;return[i(n[0]),o(r[0]),i(n[1]),o(r[1])]},T.setRanges=function(e){var t=this.xaxis,n=this.yaxis,r=t.l2r,i=n.l2r;t.range=[r(e[0]),r(e[2])],n.range=[i(e[1]),i(e[3])]},T.updateTraces=function(e,t){var n,r,i,o=Object.keys(this.traces);this.fullData=e;e:for(n=0;n<o.length;n++){var a=o[n],s=this.traces[a];for(r=0;r<e.length;r++)if((i=e[r]).uid===a&&i.type===s.type)continue e;s.dispose(),delete this.traces[a]}for(n=0;n<e.length;n++){i=e[n];var l=t[n],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort((function(e,t){return e._trace.index-t._trace.index}))},T.updateFx=function(e){x(e)||_(e)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor="pan"===e?"move":"zoom"===e?"crosshair":null},T.emitPointAction=function(e,t){for(var n,r=e.trace.uid,i=e.pointIndex,o=0;o<this.fullData.length;o++)this.fullData[o].uid===r&&(n=this.fullData[o]);var a={x:e.traceCoord[0],y:e.traceCoord[1],curveNumber:n.index,pointNumber:i,data:n._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(a,n,i),this.graphDiv.emit(t,{points:[a]})},T.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var e=this.glplot,t=this.camera,n=t.mouseListener,r=1===this.lastButtonState&&0===n.buttons,i=this.fullLayout;this.lastButtonState=n.buttons,this.cameraChanged();var o,a=n.x*e.pixelRatio,l=this.canvas.height-e.pixelRatio*n.y;if(t.boxEnabled&&"zoom"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(t.boxStart[0],t.boxEnd[0]),Math.min(t.boxStart[1],t.boxEnd[1]),Math.max(t.boxStart[0],t.boxEnd[0]),Math.max(t.boxStart[1],t.boxEnd[1])],u=0;u<2;u++)t.boxStart[u]===t.boxEnd[u]&&(c[u]=e.dataBox[u],c[u+2]=e.dataBox[u+2]);e.setDirty()}else if(!t.panning&&this.isMouseOver){this.selectBox.enabled=!1;var h=i._size,d=this.xaxis.domain,f=this.yaxis.domain,p=(o=e.pick(a/e.pixelRatio+h.l+d[0]*h.w,l/e.pixelRatio-(h.t+(1-f[1])*h.h)))&&o.object._trace.handlePick(o);if(p&&r&&this.emitPointAction(p,"plotly_click"),o&&"skip"!==o.object._trace.hoverinfo&&i.hovermode&&p&&(!this.lastPickResult||this.lastPickResult.traceUid!==p.trace.uid||this.lastPickResult.dataCoord[0]!==p.dataCoord[0]||this.lastPickResult.dataCoord[1]!==p.dataCoord[1])){var g=p;this.lastPickResult={traceUid:p.trace?p.trace.uid:null,dataCoord:p.dataCoord.slice()},this.spikes.update({center:o.dataCoord}),g.screenCoord=[((e.viewBox[2]-e.viewBox[0])*(o.dataCoord[0]-e.dataBox[0])/(e.dataBox[2]-e.dataBox[0])+e.viewBox[0])/e.pixelRatio,(this.canvas.height-(e.viewBox[3]-e.viewBox[1])*(o.dataCoord[1]-e.dataBox[1])/(e.dataBox[3]-e.dataBox[1])-e.viewBox[1])/e.pixelRatio],this.emitPointAction(p,"plotly_hover");var m=this.fullData[g.trace.index]||{},v=g.pointIndex,y=s.castHoverinfo(m,i,v);if(y&&"all"!==y){var b=y.split("+");-1===b.indexOf("x")&&(g.traceCoord[0]=void 0),-1===b.indexOf("y")&&(g.traceCoord[1]=void 0),-1===b.indexOf("z")&&(g.traceCoord[2]=void 0),-1===b.indexOf("text")&&(g.textLabel=void 0),-1===b.indexOf("name")&&(g.name=void 0)}s.loneHover({x:g.screenCoord[0],y:g.screenCoord[1],xLabel:this.hoverFormatter("xaxis",g.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",g.traceCoord[1]),zLabel:g.traceCoord[2],text:g.textLabel,name:g.name,color:s.castHoverOption(m,v,"bgcolor")||g.color,borderColor:s.castHoverOption(m,v,"bordercolor"),fontFamily:s.castHoverOption(m,v,"font.family"),fontSize:s.castHoverOption(m,v,"font.size"),fontColor:s.castHoverOption(m,v,"font.color"),nameLength:s.castHoverOption(m,v,"namelength"),textAlign:s.castHoverOption(m,v,"align")},{container:this.svgContainer,gd:this.graphDiv})}}o||this.unhover(),e.draw()}},T.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),s.loneUnhover(this.svgContainer))},T.hoverFormatter=function(e,t){if(void 0!==t){var n=this[e];return a.tickText(n,n.c2l(t),"hover").text}}},{"../../../stackgl_modules":1120,"../../components/dragelement/helpers":384,"../../components/fx":406,"../../lib/show_no_webgl_msg":525,"../../plots/cartesian/axes":554,"../../registry":638,"../cartesian/autorange":553,"../cartesian/constants":561,"../cartesian/constraints":562,"./camera":594,"./convert":595,"webgl-context":331}],598:[function(e,t,n){"use strict";var r=e("../../plot_api/edit_types").overrideAll,i=e("../../components/fx/layout_attributes"),o=e("./scene"),a=e("../get_data").getSubplotData,s=e("../../lib"),l=e("../../constants/xmlns_namespaces"),c="gl3d",u="scene";n.name=c,n.attr=u,n.idRoot=u,n.idRegex=n.attrRegex=s.counterRegex("scene"),n.attributes=e("./layout/attributes"),n.layoutAttributes=e("./layout/layout_attributes"),n.baseLayoutAttrOverrides=r({hoverlabel:i.hoverlabel},"plot","nested"),n.supplyLayoutDefaults=e("./layout/defaults"),n.plot=function(e){for(var t=e._fullLayout,n=e._fullData,r=t._subplots.gl3d,i=0;i<r.length;i++){var s=r[i],l=a(n,c,s),u=t[s],h=u.camera,d=u._scene;d||(d=new o({id:s,graphDiv:e,container:e.querySelector(".gl-container"),staticPlot:e._context.staticPlot,plotGlPixelRatio:e._context.plotGlPixelRatio,camera:h},t),u._scene=d),d.viewInitial||(d.viewInitial={up:{x:h.up.x,y:h.up.y,z:h.up.z},eye:{x:h.eye.x,y:h.eye.y,z:h.eye.z},center:{x:h.center.x,y:h.center.y,z:h.center.z}}),d.plot(l,t,e.layout)}},n.clean=function(e,t,n,r){for(var i=r._subplots.gl3d||[],o=0;o<i.length;o++){var a=i[o];!t[a]&&r[a]._scene&&(r[a]._scene.destroy(),r._infolayer&&r._infolayer.selectAll(".annotation-"+a).remove())}},n.toSVG=function(e){for(var t=e._fullLayout,n=t._subplots.gl3d,r=t._size,i=0;i<n.length;i++){var o=t[n[i]],a=o.domain,s=o._scene,c=s.toImage("png");t._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":c,x:r.l+r.w*a.x[0],y:r.t+r.h*(1-a.y[1]),width:r.w*(a.x[1]-a.x[0]),height:r.h*(a.y[1]-a.y[0]),preserveAspectRatio:"none"}),s.destroy()}},n.cleanId=function(e){if(e.match(/^scene[0-9]*$/)){var t=e.substr(5);return"1"===t&&(t=""),u+t}},n.updateFx=function(e){for(var t=e._fullLayout,n=t._subplots.gl3d,r=0;r<n.length;r++)t[n[r]]._scene.updateFx(t.dragmode,t.hovermode)}},{"../../components/fx/layout_attributes":407,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../plot_api/edit_types":536,"../get_data":593,"./layout/attributes":599,"./layout/defaults":603,"./layout/layout_attributes":604,"./scene":608}],599:[function(e,t,n){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},{}],600:[function(e,t,n){"use strict";var r=e("../../../components/color"),i=e("../../cartesian/layout_attributes"),o=e("../../../lib/extend").extendFlat,a=e("../../../plot_api/edit_types").overrideAll;t.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,rangemode:i.rangemode,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:o({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},{"../../../components/color":366,"../../../lib/extend":493,"../../../plot_api/edit_types":536,"../../cartesian/layout_attributes":569}],601:[function(e,t,n){"use strict";var r=e("tinycolor2").mix,i=e("../../../lib"),o=e("../../../plot_api/plot_template"),a=e("./axis_attributes"),s=e("../../cartesian/type_defaults"),l=e("../../cartesian/axis_defaults"),c=["xaxis","yaxis","zaxis"];t.exports=function(e,t,n){var u,h;function d(e,t){return i.coerce(u,h,a,e,t)}for(var f=0;f<c.length;f++){var p=c[f];u=e[p]||{},(h=o.newContainer(t,p))._id=p[0]+n.scene,h._name=p,s(u,h,d,n),l(u,h,d,{font:n.font,letter:p[0],data:n.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:n.bgColor,calendar:n.calendar},n.fullLayout),d("gridcolor",r(h.color,n.bgColor,72.72727272727273).toRgbString()),d("title.text",p[0]),h.setScale=i.noop,d("showspikes")&&(d("spikesides"),d("spikethickness"),d("spikecolor",h.color)),d("showaxeslabels"),d("showbackground")&&d("backgroundcolor")}}},{"../../../lib":503,"../../../plot_api/plot_template":543,"../../cartesian/axis_defaults":556,"../../cartesian/type_defaults":582,"./axis_attributes":600,tinycolor2:312}],602:[function(e,t,n){"use strict";var r=e("../../../lib/str2rgbarray"),i=e("../../../lib"),o=["xaxis","yaxis","zaxis"];function a(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}a.prototype.merge=function(e,t){for(var n=this,a=0;a<3;++a){var s=t[o[a]];s.visible?(n.labels[a]=e._meta?i.templateString(s.title.text,e._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(n.labelColor[a]=r(s.title.font.color)),s.title.font.family&&(n.labelFont[a]=s.title.font.family),s.title.font.size&&(n.labelSize[a]=s.title.font.size)),"showline"in s&&(n.lineEnable[a]=s.showline),"linecolor"in s&&(n.lineColor[a]=r(s.linecolor)),"linewidth"in s&&(n.lineWidth[a]=s.linewidth),"showgrid"in s&&(n.gridEnable[a]=s.showgrid),"gridcolor"in s&&(n.gridColor[a]=r(s.gridcolor)),"gridwidth"in s&&(n.gridWidth[a]=s.gridwidth),"log"===s.type?n.zeroEnable[a]=!1:"zeroline"in s&&(n.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(n.zeroLineColor[a]=r(s.zerolinecolor)),"zerolinewidth"in s&&(n.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?n.lineTickEnable[a]=!0:n.lineTickEnable[a]=!1,"ticklen"in s&&(n.lineTickLength[a]=n._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(n.lineTickColor[a]=r(s.tickcolor)),"tickwidth"in s&&(n.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(n.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(n.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(n.tickColor[a]=r(s.tickfont.color)),s.tickfont.family&&(n.tickFont[a]=s.tickfont.family),s.tickfont.size&&(n.tickSize[a]=s.tickfont.size)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(n.lineTickMirror[a]=!0,n.lineMirror[a]=!0):!0===s.mirror?(n.lineTickMirror[a]=!1,n.lineMirror[a]=!0):(n.lineTickMirror[a]=!1,n.lineMirror[a]=!1):n.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(n.backgroundEnable[a]=!0,n.backgroundColor[a]=r(s.backgroundcolor)):n.backgroundEnable[a]=!1):(n.tickEnable[a]=!1,n.labelEnable[a]=!1,n.lineEnable[a]=!1,n.lineTickEnable[a]=!1,n.gridEnable[a]=!1,n.zeroEnable[a]=!1,n.backgroundEnable[a]=!1)}},t.exports=function(e,t){var n=new a;return n.merge(e,t),n}},{"../../../lib":503,"../../../lib/str2rgbarray":528}],603:[function(e,t,n){"use strict";var r=e("../../../lib"),i=e("../../../components/color"),o=e("../../../registry"),a=e("../../subplot_defaults"),s=e("./axis_defaults"),l=e("./layout_attributes"),c=e("../../get_data").getSubplotData,u="gl3d";function h(e,t,n,r){for(var a=n("bgcolor"),l=i.combine(a,r.paper_bgcolor),h=["up","center","eye"],d=0;d<h.length;d++)n("camera."+h[d]+".x"),n("camera."+h[d]+".y"),n("camera."+h[d]+".z");n("camera.projection.type");var f=!!n("aspectratio.x")&&!!n("aspectratio.y")&&!!n("aspectratio.z"),p=n("aspectmode",f?"manual":"auto");f||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},"manual"===p&&(t.aspectmode="auto"),e.aspectmode=t.aspectmode);var g=c(r.fullData,u,r.id);s(e,t,{font:r.font,scene:r.id,data:g,bgColor:l,calendar:r.calendar,autotypenumbersDflt:r.autotypenumbersDflt,fullLayout:r.fullLayout}),o.getComponentMethod("annotations3d","handleDefaults")(e,t,r);var m=r.getDfltFromLayout("dragmode");if(!1!==m&&!m)if(m="orbit",e.camera&&e.camera.up){var v=e.camera.up.x,y=e.camera.up.y,b=e.camera.up.z;0!==b&&(v&&y&&b?b/Math.sqrt(v*v+y*y+b*b)>.999&&(m="turntable"):m="turntable")}else m="turntable";n("dragmode",m),n("hovermode",r.getDfltFromLayout("hovermode"))}t.exports=function(e,t,n){var i=t._basePlotModules.length>1;a(e,t,n,{type:u,attributes:l,handleDefaults:h,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:function(t){if(!i)return r.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},{"../../../components/color":366,"../../../lib":503,"../../../registry":638,"../../get_data":593,"../../subplot_defaults":632,"./axis_defaults":601,"./layout_attributes":604}],604:[function(e,t,n){"use strict";var r=e("./axis_attributes"),i=e("../../domain").attributes,o=e("../../../lib/extend").extendFlat,a=e("../../../lib").counterRegex;function s(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{}),center:o(s(0,0,0),{}),eye:o(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:r,yaxis:r,zaxis:r,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":503,"../../../lib/extend":493,"../../domain":584,"./axis_attributes":600}],605:[function(e,t,n){"use strict";var r=e("../../../lib/str2rgbarray"),i=["xaxis","yaxis","zaxis"];function o(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}o.prototype.merge=function(e){for(var t=0;t<3;++t){var n=e[i[t]];n.visible?(this.enabled[t]=n.showspikes,this.colors[t]=r(n.spikecolor),this.drawSides[t]=n.spikesides,this.lineWidth[t]=n.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},t.exports=function(e){var t=new o;return t.merge(e),t}},{"../../../lib/str2rgbarray":528}],606:[function(e,t,n){"use strict";t.exports=function(e){for(var t=e.axesOptions,n=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[o[c]];if(u._length=(n[c].hi-n[c].lo)*n[c].pixelsPerDataUnit/e.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=n[c].lo/e.dataScale[c],u.range[1]=n[c].hi/e.dataScale[c],u._m=1/(e.dataScale[c]*n[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var d=u.nticks||i.constrain(u._length/40,4,9);r.autoTicks(u,Math.abs(u.range[1]-u.range[0])/d)}for(var f=r.calcTicks(u,{msUTC:!0}),p=0;p<f.length;++p)f[p].x=f[p].x*e.dataScale[c],"date"===u.type&&(f[p].text=f[p].text.replace(/\<br\>/g," "));l[c]=f,u.tickmode=h}}for(t.ticks=l,c=0;c<3;++c)for(a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]),p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c];e.contourLevels=function(e){for(var t=new Array(3),n=0;n<3;++n){for(var r=e[n],i=new Array(r.length),o=0;o<r.length;++o)i[o]=r[o].x;t[n]=i}return t}(l)};var r=e("../../cartesian/axes"),i=e("../../../lib"),o=["xaxis","yaxis","zaxis"],a=[0,0,0]},{"../../../lib":503,"../../cartesian/axes":554}],607:[function(e,t,n){"use strict";function r(e,t){var n,r,i=[0,0,0,0];for(n=0;n<4;++n)for(r=0;r<4;++r)i[r]+=e[4*n+r]*t[n];return i}t.exports=function(e,t){return r(e.projection,r(e.view,r(e.model,[t[0],t[1],t[2],1])))}},{}],608:[function(e,t,n){"use strict";var r,i,o=e("../../../stackgl_modules").gl_plot3d,a=o.createCamera,s=o.createScene,l=e("webgl-context"),c=e("has-passive-events"),u=e("../../registry"),h=e("../../lib"),d=h.preserveDrawingBuffer(),f=e("../../plots/cartesian/axes"),p=e("../../components/fx"),g=e("../../lib/str2rgbarray"),m=e("../../lib/show_no_webgl_msg"),v=e("./project"),y=e("./layout/convert"),b=e("./layout/spikes"),_=e("./layout/tick_marks");function x(e,t){var n=document.createElement("div"),r=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("path_to_url","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",n.appendChild(i),this.svgContainer=i,n.id=e.id,n.style.position="absolute",n.style.top=n.style.left="0px",n.style.width=n.style.height="100%",r.appendChild(n),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(t,t[this.id]),this.spikeOptions=b(t[this.id]),this.container=n,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var w=x.prototype;w.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:d,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!(i||(r=document.createElement("canvas"),i=l({canvas:r,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");t.gl=i,t.canvas=r}return t};var A=!0;w.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),n=!0;try{e.glplot=s(t)}catch(r){if(e.staticMode||!A||d)n=!1;else{h.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{d=t.glOptions.preserveDrawingBuffer=!0,e.glplot=s(t)}catch(e){d=t.glOptions.preserveDrawingBuffer=!1,n=!1}}}return A=!1,n},w.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,n="orthographic"===t.projection.type;e.camera=a(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:n,zoomMin:.01,zoomMax:100,mode:"orbit"})},w.initializeGLPlot=function(){var e=this;if(e.initializeGLCamera(),!e.tryCreatePlot())return m(e);e.traces={},e.make4thDimension();var t=e.graphDiv,n=t.layout,r=function(){var t={};return e.isCameraChanged(n)&&(t[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(t[e.id+".aspectratio"]=e.glplot.getAspectratio(),"manual"!==n[e.id].aspectmode&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=t[e.id+".aspectmode"]="manual")),t},i=function(e){if(!1!==e.fullSceneLayout.dragmode){var t=r();e.saveLayout(n),e.graphDiv.emit("plotly_relayout",t)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",(function(){i(e)})),e.glplot.canvas.addEventListener("wheel",(function(n){if(t._context._scrollZoom.gl3d){if(e.camera._ortho){var r=n.deltaX>n.deltaY?1.1:1/1.1,o=e.glplot.getAspectratio();e.glplot.setAspectratio({x:r*o.x,y:r*o.y,z:r*o.z})}i(e)}}),!!c&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=r();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(n){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:n,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},w.render=function(){var e,t=this,n=t.graphDiv,r=t.svgContainer,i=t.container.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var o=n._fullLayout._invScaleX,a=n._fullLayout._invScaleY,s=i.width*o,l=i.height*a;r.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),r.setAttributeNS(null,"width",s),r.setAttributeNS(null,"height",l),_(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),u=null,d=t.glplot.selection,g=0;g<c.length;++g)"skip"!==(e=t.traces[c[g]]).data.hoverinfo&&e.handlePick(d)&&(u=e),e.setContourLevels&&e.setContourLevels();function m(e,n,r){var i=t.fullSceneLayout[e+"axis"];return"log"!==i.type&&(n=i.d2l(n)),f.hoverLabelText(i,n,r)}if(null!==u){var y=v(t.glplot.cameraParams,d.dataCoordinate);e=u.data;var b,x=n._fullData[e.index],w=d.index,A={xLabel:m("x",d.traceCoordinate[0],e.xhoverformat),yLabel:m("y",d.traceCoordinate[1],e.yhoverformat),zLabel:m("z",d.traceCoordinate[2],e.zhoverformat)},k=p.castHoverinfo(x,t.fullLayout,w),T=(k||"").split("+"),S=k&&"all"===k;x.hovertemplate||S||(-1===T.indexOf("x")&&(A.xLabel=void 0),-1===T.indexOf("y")&&(A.yLabel=void 0),-1===T.indexOf("z")&&(A.zLabel=void 0),-1===T.indexOf("text")&&(d.textLabel=void 0),-1===T.indexOf("name")&&(u.name=void 0));var E=[];"cone"===e.type||"streamtube"===e.type?(A.uLabel=m("x",d.traceCoordinate[3],e.uhoverformat),(S||-1!==T.indexOf("u"))&&E.push("u: "+A.uLabel),A.vLabel=m("y",d.traceCoordinate[4],e.vhoverformat),(S||-1!==T.indexOf("v"))&&E.push("v: "+A.vLabel),A.wLabel=m("z",d.traceCoordinate[5],e.whoverformat),(S||-1!==T.indexOf("w"))&&E.push("w: "+A.wLabel),A.normLabel=d.traceCoordinate[6].toPrecision(3),(S||-1!==T.indexOf("norm"))&&E.push("norm: "+A.normLabel),"streamtube"===e.type&&(A.divergenceLabel=d.traceCoordinate[7].toPrecision(3),(S||-1!==T.indexOf("divergence"))&&E.push("divergence: "+A.divergenceLabel)),d.textLabel&&E.push(d.textLabel),b=E.join("<br>")):"isosurface"===e.type||"volume"===e.type?(A.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(d.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+A.valueLabel),d.textLabel&&E.push(d.textLabel),b=E.join("<br>")):b=d.textLabel;var C={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:w};p.appendArrayPointValue(C,x,w),e._module.eventData&&(C=x._module.eventData(C,d,x,{},w));var M={points:[C]};if(t.fullSceneLayout.hovermode){var O=[];p.loneHover({trace:x,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:A.xLabel,yLabel:A.yLabel,zLabel:A.zLabel,text:b,name:u.name,color:p.castHoverOption(x,w,"bgcolor")||u.color,borderColor:p.castHoverOption(x,w,"bordercolor"),fontFamily:p.castHoverOption(x,w,"font.family"),fontSize:p.castHoverOption(x,w,"font.size"),fontColor:p.castHoverOption(x,w,"font.color"),nameLength:p.castHoverOption(x,w,"namelength"),textAlign:p.castHoverOption(x,w,"align"),hovertemplate:h.castOption(x,w,"hovertemplate"),hovertemplateLabels:h.extendFlat({},C,A),eventData:[C]},{container:r,gd:n,inOut_bbox:O}),C.bbox=O[0]}d.buttons&&d.distance<5?n.emit("plotly_click",M):n.emit("plotly_hover",M),this.oldEventData=M}else p.loneUnhover(r),this.oldEventData&&n.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},w.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var k=["xaxis","yaxis","zaxis"];function T(e,t,n){for(var r=e.fullSceneLayout,i=0;i<3;i++){var o=k[i],a=o.charAt(0),s=r[o],l=t[a],c=t[a+"calendar"],u=t["_"+a+"length"];if(h.isArrayOrTypedArray(l))for(var d,f=0;f<(u||l.length);f++)if(h.isArrayOrTypedArray(l[f]))for(var p=0;p<l[f].length;++p)d=s.d2l(l[f][p],0,c),!isNaN(d)&&isFinite(d)&&(n[0][i]=Math.min(n[0][i],d),n[1][i]=Math.max(n[1][i],d));else d=s.d2l(l[f],0,c),!isNaN(d)&&isFinite(d)&&(n[0][i]=Math.min(n[0][i],d),n[1][i]=Math.max(n[1][i],d));else n[0][i]=Math.min(n[0][i],0),n[1][i]=Math.max(n[1][i],u-1)}}w.plot=function(e,t,n){var r=this;if(r.plotArgs=[e,t,n],!r.glplot.contextLost){var i,o,a,s,l,c,u=t[r.id],h=n[r.id];r.fullLayout=t,r.fullSceneLayout=u,r.axesOptions.merge(t,u),r.spikeOptions.merge(u),r.setViewport(u),r.updateFx(u.dragmode,u.hovermode),r.camera.enableWheel=r.graphDiv._context._scrollZoom.gl3d,r.glplot.setClearColor(g(u.bgcolor)),r.setConvert(l),e?Array.isArray(e)||(e=[e]):e=[];var d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a<e.length;++a)!0===(i=e[a]).visible&&0!==i._length&&T(this,i,d);!function(e,t){for(var n=e.fullSceneLayout,r=n.annotations||[],i=0;i<3;i++)for(var o=k[i],a=o.charAt(0),s=n[o],l=0;l<r.length;l++){var c=r[l];if(c.visible){var u=s.r2l(c[a]);!isNaN(u)&&isFinite(u)&&(t[0][i]=Math.min(t[0][i],u),t[1][i]=Math.max(t[1][i],u))}}}(this,d);var f=[1,1,1];for(s=0;s<3;++s)d[1][s]===d[0][s]?f[s]=1:f[s]=1/(d[1][s]-d[0][s]);for(r.dataScale=f,r.convertAnnotations(this),a=0;a<e.length;++a)!0===(i=e[a]).visible&&0!==i._length&&((o=r.traces[i.uid])?o.data.type===i.type?o.update(i):(o.dispose(),o=i._module.plot(this,i),r.traces[i.uid]=o):(o=i._module.plot(this,i),r.traces[i.uid]=o),o.name=i.name);var p=Object.keys(r.traces);e:for(a=0;a<p.length;++a){for(s=0;s<e.length;++s)if(e[s].uid===p[a]&&!0===e[s].visible&&0!==e[s]._length)continue e;(o=r.traces[p[a]]).dispose(),delete r.traces[p[a]]}r.glplot.objects.sort((function(e,t){return e._trace.data.index-t._trace.data.index}));var m,v=[[0,0,0],[0,0,0]],y=[],b={};for(a=0;a<3;++a){if((c=(l=u[k[a]]).type)in b?(b[c].acc*=f[a],b[c].count+=1):b[c]={acc:f[a],count:1},l.autorange){v[0][a]=1/0,v[1][a]=-1/0;var _=r.glplot.objects,x=r.fullSceneLayout.annotations||[],w=l._name.charAt(0);for(s=0;s<_.length;s++){var A=_[s],S=A.bounds,E=A._trace.data._pad||0;"ErrorBars"===A.constructor.name&&l._lowerLogErrorBound?v[0][a]=Math.min(v[0][a],l._lowerLogErrorBound):v[0][a]=Math.min(v[0][a],S[0][a]/f[a]-E),v[1][a]=Math.max(v[1][a],S[1][a]/f[a]+E)}for(s=0;s<x.length;s++){var C=x[s];if(C.visible){var M=l.r2l(C[w]);v[0][a]=Math.min(v[0][a],M),v[1][a]=Math.max(v[1][a],M)}}if("rangemode"in l&&"tozero"===l.rangemode&&(v[0][a]=Math.min(v[0][a],0),v[1][a]=Math.max(v[1][a],0)),v[0][a]>v[1][a])v[0][a]=-1,v[1][a]=1;else{var O=v[1][a]-v[0][a];v[0][a]-=O/32,v[1][a]+=O/32}if("reversed"===l.autorange){var L=v[0][a];v[0][a]=v[1][a],v[1][a]=L}}else{var D=l.range;v[0][a]=l.r2l(D[0]),v[1][a]=l.r2l(D[1])}v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),y[a]=v[1][a]-v[0][a],r.glplot.setBounds(a,{min:v[0][a]*f[a],max:v[1][a]*f[a]})}var I=u.aspectmode;if("cube"===I)m=[1,1,1];else if("manual"===I){var R=u.aspectratio;m=[R.x,R.y,R.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var P=[1,1,1];for(a=0;a<3;++a){var N=b[c=(l=u[k[a]]).type];P[a]=Math.pow(N.acc,1/N.count)/f[a]}m="data"===I||Math.max.apply(null,P)/Math.min.apply(null,P)<=4?P:[1,1,1]}u.aspectratio.x=h.aspectratio.x=m[0],u.aspectratio.y=h.aspectratio.y=m[1],u.aspectratio.z=h.aspectratio.z=m[2],r.glplot.setAspectratio(u.aspectratio),r.viewInitial.aspectratio||(r.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),r.viewInitial.aspectmode||(r.viewInitial.aspectmode=u.aspectmode);var z=u.domain||null,F=t._size||null;if(z&&F){var B=r.container.style;B.position="absolute",B.left=F.l+z.x[0]*F.w+"px",B.top=F.t+(1-z.y[1])*F.h+"px",B.width=F.w*(z.x[1]-z.x[0])+"px",B.height=F.h*(z.y[1]-z.y[0])+"px"}r.glplot.redraw()}},w.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},w.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},w.setViewport=function(e){var t,n=this,r=e.camera;n.camera.lookAt.apply(this,[[(t=r).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),n.glplot.setAspectratio(e.aspectratio),"orthographic"===r.projection.type!==n.camera._ortho&&(n.glplot.redraw(),n.glplot.clearRGBA(),n.glplot.dispose(),n.initializeGLPlot())},w.isCameraChanged=function(e){var t=this.getCamera(),n=h.nestedProperty(e,this.id+".camera").get();function r(e,t,n,r){var i=["up","center","eye"],o=["x","y","z"];return t[i[n]]&&e[i[n]][o[r]]===t[i[n]][o[r]]}var i=!1;if(void 0===n)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!r(t,n,o,a)){i=!0;break}(!n.projection||t.projection&&t.projection.type!==n.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),n=h.nestedProperty(e,this.id+".aspectratio").get();return void 0===n||n.x!==t.x||n.y!==t.y||n.z!==t.z},w.saveLayout=function(e){var t,n,r,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(e),d=s.isAspectChanged(e),f=c||d;if(f){var p={};c&&(t=s.getCamera(),r=(n=h.nestedProperty(e,s.id+".camera")).get(),p[s.id+".camera"]=r),d&&(i=s.glplot.getAspectratio(),a=(o=h.nestedProperty(e,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),u.call("_storeDirectGUIEdit",e,l._preGUI,p),c&&(n.set(t),h.nestedProperty(l,s.id+".camera").set(t)),d&&(o.set(i),h.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return f},w.updateFx=function(e,t){var n=this,r=n.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var i=n.graphDiv,o=i._fullLayout,a=n.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var d=n.id+".camera.up",f={x:0,y:0,z:1},p={};p[d]=f;var g=i.layout;u.call("_storeDirectGUIEdit",g,o._preGUI,p),a.up=f,h.nestedProperty(g,d).set(f)}}else r.keyBindingMode=e;n.fullSceneLayout.hovermode=t},w.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(r),t.glplot.redraw();var n=t.glplot.gl,i=n.drawingBufferWidth,o=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);n.readPixels(0,0,i,o,n.RGBA,n.UNSIGNED_BYTE,a),function(e,t,n){for(var r=0,i=n-1;r<i;++r,--i)for(var o=0;o<t;++o)for(var a=0;a<4;++a){var s=4*(t*r+o)+a,l=4*(t*i+o)+a,c=e[s];e[s]=e[l],e[l]=c}}(a,i,o),function(e,t,n){for(var r=0;r<n;++r)for(var i=0;i<t;++i){var o=4*(t*r+i),a=e[o+3];if(a>0)for(var s=255/a,l=0;l<3;++l)e[o+l]=Math.min(s*e[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d"),u=c.createImageData(i,o);switch(u.data.set(a),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(r),l},w.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[k[e]];f.setConvert(t,this.fullLayout),t.setScale=h.noop}},w.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(e._mockAxis,t)},t.exports=x},{"../../../stackgl_modules":1120,"../../components/fx":406,"../../lib":503,"../../lib/show_no_webgl_msg":525,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../../registry":638,"./layout/convert":602,"./layout/spikes":605,"./layout/tick_marks":606,"./project":607,"has-passive-events":229,"webgl-context":331}],609:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){r=r||e.length;for(var i=new Array(r),o=0;o<r;o++)i[o]=[e[o],t[o],n[o]];return i}},{}],610:[function(e,t,n){"use strict";var r=e("./font_attributes"),i=e("./animation_attributes"),o=e("../components/color/attributes"),a=e("../components/shapes/draw_newshape/attributes"),s=e("./pad_attributes"),l=e("../lib/extend").extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=o.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:l(s({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:a.newshape,activeshape:a.activeshape,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:r({editType:"layoutstyle"})}}},{"../components/color/attributes":365,"../components/shapes/draw_newshape/attributes":451,"../lib/extend":493,"./animation_attributes":548,"./font_attributes":585,"./pad_attributes":618}],611:[function(e,t,n){"use strict";var r=e("../../lib/sort_object_keys"),i="1.10.1",o=' <a target="_blank" href="path_to_url">OpenStreetMap</a> contributors',a=[' <a target="_blank" href="path_to_url">Carto</a>',o].join(" "),s=['Map tiles by <a target="_blank" href="path_to_url">Stamen Design</a>','under <a target="_blank" href="path_to_url">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="path_to_url">OpenStreetMap</a> contributors','under <a target="_blank" href="path_to_url">ODbL</a>'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,tiles:["path_to_url{z}/{x}/{y}.png","path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,tiles:["path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,tiles:["path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by <a target="_blank" href="path_to_url">Stamen Design</a>','under <a target="_blank" href="path_to_url">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="path_to_url">OpenStreetMap</a> contributors','under <a target="_blank" href="path_to_url">CC BY SA</a>'].join(" "),tiles:["path_to_url{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},c=r(l);t.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: path_to_url"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",c.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="path_to_url"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="path_to_url" xmlns:xlink="path_to_url" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},{"../../lib/sort_object_keys":526}],612:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){var n=e.split(" "),i=n[0],o=n[1],a=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+a/100,l=1.5+a/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(o){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":503}],613:[function(e,t,n){"use strict";var r=e("mapbox-gl/dist/mapbox-gl-unminified"),i=e("../../lib"),o=i.strTranslate,a=i.strScale,s=e("../../plots/get_data").getSubplotCalcData,l=e("../../constants/xmlns_namespaces"),c=e("@plotly/d3"),u=e("../../components/drawing"),h=e("../../lib/svg_text_utils"),d=e("./mapbox"),f="mapbox",p=n.constants=e("./constants");function g(e){return"string"==typeof e&&(-1!==p.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://"))}n.name=f,n.attr="subplot",n.idRoot=f,n.idRegex=n.attrRegex=i.counterRegex(f),n.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},n.layoutAttributes=e("./layout_attributes"),n.supplyLayoutDefaults=e("./layout_defaults"),n.plot=function(e){var t=e._fullLayout,n=e.calcdata,o=t._subplots.mapbox;if(r.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var a=function(e,t){var n=e._fullLayout;if(""===e._context.mapboxAccessToken)return"";for(var r=[],o=[],a=!1,s=!1,l=0;l<t.length;l++){var c=n[t[l]],u=c.accesstoken;g(c.style)&&(u?i.pushUnique(r,u):(g(c._input.style)&&(i.error("Uses Mapbox map style, but did not set an access token."),a=!0),s=!0)),u&&i.pushUnique(o,u)}if(s){var h=a?p.noAccessTokenErrorMsg:p.missingStyleErrorMsg;throw i.error(h),new Error(h)}return r.length?(r.length>1&&i.warn(p.multipleTokensErrorMsg),r[0]):(o.length&&i.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);r.accessToken=a;for(var l=0;l<o.length;l++){var c=o[l],u=s(n,f,c),h=t[c],m=h._subplot;m||(m=new d(e,c),t[c]._subplot=m),m.viewInitial||(m.viewInitial={center:i.extendFlat({},h.center),zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),m.plot(u,t,e._promises)}},n.clean=function(e,t,n,r){for(var i=r._subplots.mapbox||[],o=0;o<i.length;o++){var a=i[o];!t[a]&&r[a]._subplot&&r[a]._subplot.destroy()}},n.toSVG=function(e){for(var t=e._fullLayout,n=t._subplots.mapbox,r=t._size,i=0;i<n.length;i++){var s=t[n[i]],d=s.domain,f=s._subplot.toImage("png");t._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":f,x:r.l+r.w*d.x[0],y:r.t+r.h*(1-d.y[1]),width:r.w*(d.x[1]-d.x[0]),height:r.h*(d.y[1]-d.y[0]),preserveAspectRatio:"none"});var g=c.select(s._subplot.div);if(null!==g.select(".mapboxgl-ctrl-logo").node().offsetParent){var m=t._glimages.append("g");m.attr("transform",o(r.l+r.w*d.x[0]+10,r.t+r.h*(1-d.y[0])-31)),m.append("path").attr("d",p.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),m.append("path").attr("d",p.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),m.append("path").attr("d",p.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),m.append("polygon").attr("points",p.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var v=g.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),y=t._glimages.append("g"),b=y.append("text");b.text(v).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":v});var _=u.bBox(b.node()),x=r.w*(d.x[1]-d.x[0]);if(_.width>x/2){var w=v.split("|").join("<br>");b.text(w).attr("data-unformatted",w).call(h.convertToTspans,e),_=u.bBox(b.node())}b.attr("transform",o(-3,8-_.height)),y.insert("rect",".static-attribution").attr({x:-_.width-6,y:-_.height-3,width:_.width+6,height:_.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;_.width+6>x&&(A=x/(_.width+6));var k=[r.l+r.w*d.x[1],r.t+r.h*(1-d.y[0])];y.attr("transform",o(k[0],k[1])+a(A))}},n.updateFx=function(e){for(var t=e._fullLayout,n=t._subplots.mapbox,r=0;r<n.length;r++)t[n[r]]._subplot.updateFx(t)}},{"../../components/drawing":388,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/get_data":593,"./constants":611,"./layout_attributes":615,"./layout_defaults":616,"./mapbox":617,"@plotly/d3":58,"mapbox-gl/dist/mapbox-gl-unminified":239}],614:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../lib/svg_text_utils").sanitizeHTML,o=e("./convert_text_opts"),a=e("./constants");function s(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function c(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n<t.length;n++)if("string"!=typeof t[n]||0===t[n].length)return!1;return!0}return r.isPlainObject(t)||"string"==typeof t&&t.length>0}function u(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,a=o(i.textposition,i.iconsize);r.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=c(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,c(e)){var n=function(e){var t,n=e.sourcetype,r=e.source,o={type:n};return"geojson"===n?t="data":"vector"===n?t="string"==typeof r?"url":"tiles":"raster"===n?(t="tiles",o.tileSize=256):"image"===n&&(t="url",o.coordinates=e.coordinates),o[t]=r,e.sourceattribution&&(o.attribution=i(e.sourceattribution)),o}(e);t.addSource(this.idSource,n)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),n=0;n<t.length;n++){var r=t[n].id;if("string"==typeof r&&0===r.indexOf(a.traceLayerPrefix)){e=r;break}}return e},l.updateLayer=function(e){var t=this.subplot,n=u(e),r=this.lookupBelow(),i=this.findFollowingMapboxLayerId(r);this.removeLayer(),c(e)&&t.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:n.layout,paint:n.paint},i),this.layerType=e.type,this.below=r},l.updateStyle=function(e){if(c(e)){var t=u(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}},l.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)},l.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)},t.exports=function(e,t,n){var r=new s(e,t);return r.update(n),r}},{"../../lib":503,"../../lib/svg_text_utils":529,"./constants":611,"./convert_text_opts":612}],615:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color").defaultLine,o=e("../domain").attributes,a=e("../font_attributes"),s=e("../../traces/scatter/attributes").textposition,l=e("../../plot_api/edit_types").overrideAll,c=e("../../plot_api/plot_template").templatedArray,u=e("./constants"),h=a({});h.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[r.counterRegex("mapbox",".layers",!0)],domain:o({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:u.styleValuesMapbox.concat(u.styleValuesNonMapbox),dflt:u.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:c("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:h,textposition:r.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color":366,"../../lib":503,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../traces/scatter/attributes":926,"../domain":584,"../font_attributes":585,"./constants":611}],616:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../subplot_defaults"),o=e("../array_container_defaults"),a=e("./layout_attributes");function s(e,t,n,r){n("accesstoken",r.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch"),o(e,t,{name:"layers",handleItemDefaults:l}),t._input=e}function l(e,t){function n(n,i){return r.coerce(e,t,a.layers,n,i)}if(n("visible")){var i,o=n("sourcetype"),s="raster"===o||"image"===o;n("source"),n("sourceattribution"),"vector"===o&&n("sourcelayer"),"image"===o&&n("coordinates"),s&&(i="raster");var l=n("type",i);s&&"raster"!==l&&(l=t.type="raster",r.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),"circle"===l&&n("circle.radius"),"line"===l&&(n("line.width"),n("line.dash")),"fill"===l&&n("fill.outlinecolor"),"symbol"===l&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),r.coerceFont(n,"symbol.textfont"),n("symbol.textposition"),n("symbol.placement"))}}t.exports=function(e,t,n){i(e,t,n,{type:"mapbox",attributes:a,handleDefaults:s,partition:"y",accessToken:t._mapboxAccessToken})}},{"../../lib":503,"../array_container_defaults":549,"../subplot_defaults":632,"./layout_attributes":615}],617:[function(e,t,n){"use strict";var r=e("mapbox-gl/dist/mapbox-gl-unminified"),i=e("../../lib"),o=e("../../lib/geo_location_utils"),a=e("../../registry"),s=e("../cartesian/axes"),l=e("../../components/dragelement"),c=e("../../components/fx"),u=e("../../components/dragelement/helpers"),h=u.rectMode,d=u.drawMode,f=u.selectMode,p=e("../cartesian/select").prepSelect,g=e("../cartesian/select").clearSelect,m=e("../cartesian/select").clearSelectionsCache,v=e("../cartesian/select").selectOnClick,y=e("./constants"),b=e("./layers");function _(e,t){this.id=t,this.gd=e;var n=e._fullLayout,r=e._context;this.container=n._glcontainer.node(),this.isStatic=r.staticPlot,this.uid=n._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(n),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var x=_.prototype;x.plot=function(e,t,n){var r,i=this,o=t[i.id];i.map&&o.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),r=i.map?new Promise((function(n,r){i.updateMap(e,t,n,r)})):new Promise((function(n,r){i.createMap(e,t,n,r)})),n.push(r)},x.createMap=function(e,t,n,i){var a=this,s=t[a.id],l=a.styleObj=A(s.style);a.accessToken=s.accesstoken;var c=a.map=new r.Map({container:a.div,style:l.style,center:T(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new r.AttributionControl({compact:!0}));c._canvas.style.left="0px",c._canvas.style.top="0px",a.rejectOnError(i),a.isStatic||a.initFx(e,t);var u=[];u.push(new Promise((function(e){c.once("load",e)}))),u=u.concat(o.fetchTraceGeoData(e)),Promise.all(u).then((function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(n)})).catch(i)},x.updateMap=function(e,t,n,r){var i=this,a=i.map,s=t[this.id];i.rejectOnError(r);var l=[],c=A(s.style);JSON.stringify(i.styleObj)!==JSON.stringify(c)&&(i.styleObj=c,a.setStyle(c.style),i.traceHash={},l.push(new Promise((function(e){a.once("styledata",e)})))),l=l.concat(o.fetchTraceGeoData(e)),Promise.all(l).then((function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(n)})).catch(r)},x.fillBelowLookup=function(e,t){var n,r,i=t[this.id].layers,o=this.belowLookup={},a=!1;for(n=0;n<e.length;n++){var s=e[n][0].trace,l=s._module;"string"==typeof s.below?r=s.below:l.getBelow&&(r=l.getBelow(s,this)),""===r&&(a=!0),o["trace-"+s.uid]=r||""}for(n=0;n<i.length;n++){var c=i[n];r="string"==typeof c.below?c.below:a?"traces":"",o["layout-"+n]=r}var u,h,d={};for(u in o)d[r=o[u]]?d[r].push(u):d[r]=[u];for(r in d){var f=d[r];if(f.length>1)for(n=0;n<f.length;n++)0===(u=f[n]).indexOf("trace-")?(h=u.split("trace-")[1],this.traceHash[h]&&(this.traceHash[h].below=null)):0===u.indexOf("layout-")&&(h=u.split("layout-")[1],this.layerList[h]&&(this.layerList[h].below=null))}};var w={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function A(e){var t={};return i.isPlainObject(e)?(t.id=e.id,t.style=e):"string"==typeof e?(t.id=e,-1!==y.styleValuesMapbox.indexOf(e)?t.style=k(e):y.stylesNonMapbox[e]?t.style=y.stylesNonMapbox[e]:t.style=e):(t.id=y.styleValueDflt,t.style=k(y.styleValueDflt)),t.transition={duration:0,delay:0},t}function k(e){return y.styleUrlPrefix+e+"-"+y.styleUrlSuffix}function T(e){return[e.lon,e.lat]}x.updateData=function(e){var t,n,r,i,o=this.traceHash,a=e.slice().sort((function(e,t){return w[e[0].trace.type]-w[t[0].trace.type]}));for(r=0;r<a.length;r++){var s=a[r],l=!1;(t=o[(n=s[0].trace).uid])&&(t.type===n.type?(t.update(s),l=!0):t.dispose()),!l&&n._module&&(o[n.uid]=n._module.plot(this,s))}var c=Object.keys(o);e:for(r=0;r<c.length;r++){var u=c[r];for(i=0;i<e.length;i++)if(u===(n=e[i][0].trace).uid)continue e;(t=o[u]).dispose(),delete o[u]}},x.updateLayout=function(e){var t=this.map,n=e[this.id];this.dragging||this.wheeling||(t.setCenter(T(n.center)),t.setZoom(n.zoom),t.setBearing(n.bearing),t.setPitch(n.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()},x.resolveOnRender=function(e){var t=this.map;t.on("render",(function n(){t.loaded()&&(t.off("render",n),setTimeout(e,10))}))},x.rejectOnError=function(e){var t=this.map;function n(){e(new Error(y.mapOnErrorMsg))}t.once("error",n),t.once("style.error",n),t.once("source.error",n),t.once("tile.error",n),t.once("layer.error",n)},x.createFramework=function(e){var t=this,n=t.div=document.createElement("div");n.id=t.uid,n.style.position="absolute",t.container.appendChild(n),t.xaxis={_id:"x",c2p:function(e){return t.project(e).x}},t.yaxis={_id:"y",c2p:function(e){return t.project(e).y}},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},s.setConvert(t.mockAxis,e)},x.initFx=function(e,t){var n=this,r=n.gd,i=n.map;function o(){c.loneUnhover(t._hoverlayer)}function s(){var e=n.getView();r.emit("plotly_relayouting",n.getViewEditsWithDerived(e))}i.on("moveend",(function(e){if(n.map){var t=r._fullLayout;if(e.originalEvent||n.wheeling){var i=t[n.id];a.call("_storeDirectGUIEdit",r.layout,t._preGUI,n.getViewEdits(i));var o=n.getView();i._input.center=i.center=o.center,i._input.zoom=i.zoom=o.zoom,i._input.bearing=i.bearing=o.bearing,i._input.pitch=i.pitch=o.pitch,r.emit("plotly_relayout",n.getViewEditsWithDerived(o))}e.originalEvent&&"mouseup"===e.originalEvent.type?n.dragging=!1:n.wheeling&&(n.wheeling=!1),t._rehover&&t._rehover()}})),i.on("wheel",(function(){n.wheeling=!0})),i.on("mousemove",(function(e){var t=n.div.getBoundingClientRect(),o=[e.originalEvent.offsetX,e.originalEvent.offsetY];e.target.getBoundingClientRect=function(){return t},n.xaxis.p2c=function(){return i.unproject(o).lng},n.yaxis.p2c=function(){return i.unproject(o).lat},r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===n.id&&r._fullLayout[n.id]&&c.hover(r,e,n.id)},c.hover(r,e,n.id),r._fullLayout._hoversubplot=n.id})),i.on("dragstart",(function(){n.dragging=!0,o()})),i.on("zoomstart",o),i.on("mouseout",(function(){r._fullLayout._hoversubplot=null})),i.on("drag",s),i.on("zoom",s),i.on("dblclick",(function(){var e=r._fullLayout[n.id];a.call("_storeDirectGUIEdit",r.layout,r._fullLayout._preGUI,n.getViewEdits(e));var t=n.viewInitial;i.setCenter(T(t.center)),i.setZoom(t.zoom),i.setBearing(t.bearing),i.setPitch(t.pitch);var o=n.getView();e._input.center=e.center=o.center,e._input.zoom=e.zoom=o.zoom,e._input.bearing=e.bearing=o.bearing,e._input.pitch=e.pitch=o.pitch,r.emit("plotly_doubleclick",null),r.emit("plotly_relayout",n.getViewEditsWithDerived(o))})),n.clearSelect=function(){m(n.dragOptions),g(n.dragOptions.gd)},n.onClickInPanFn=function(e){return function(t){var i=r._fullLayout.clickmode;i.indexOf("select")>-1&&v(t.originalEvent,r,[n.xaxis],[n.yaxis],n.id,e),i.indexOf("event")>-1&&c.click(r,t.originalEvent)}}},x.updateFx=function(e){var t=this,n=t.map,r=t.gd;if(!t.isStatic){var o,a=e.dragmode;o=h(a)?function(e,n){(e.range={})[t.id]=[c([n.xmin,n.ymin]),c([n.xmax,n.ymax])]}:function(e,n,r){(e.lassoPoints={})[t.id]=r.filtered.map(c)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:r,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),n.off("click",t.onClickInPanHandler),f(a)||d(a)?(n.dragPan.disable(),n.on("zoomstart",t.clearSelect),t.dragOptions.prepFn=function(e,n,r){p(e,n,r,t.dragOptions,a)},l.init(t.dragOptions)):(n.dragPan.enable(),n.off("zoomstart",t.clearSelect),t.div.onmousedown=null,t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),n.on("click",t.onClickInPanHandler))}function c(e){var n=t.map.unproject(e);return[n.lng,n.lat]}},x.updateFramework=function(e){var t=e[this.id].domain,n=e._size,r=this.div.style;r.width=n.w*(t.x[1]-t.x[0])+"px",r.height=n.h*(t.y[1]-t.y[0])+"px",r.left=n.l+t.x[0]*n.w+"px",r.top=n.t+(1-t.y[1])*n.h+"px",this.xaxis._offset=n.l+t.x[0]*n.w,this.xaxis._length=n.w*(t.x[1]-t.x[0]),this.yaxis._offset=n.t+(1-t.y[1])*n.h,this.yaxis._length=n.h*(t.y[1]-t.y[0])},x.updateLayers=function(e){var t,n=e[this.id].layers,r=this.layerList;if(n.length!==r.length){for(t=0;t<r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t<n.length;t++)r.push(b(this,t,n[t]))}else for(t=0;t<n.length;t++)r[t].update(n[t])},x.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},x.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},x.setOptions=function(e,t,n){for(var r in n)this.map[t](e,r,n[r])},x.getMapLayers=function(){return this.map.getStyle().layers},x.addLayer=function(e,t){var n=this.map;if("string"==typeof t){if(""===t)return void n.addLayer(e,t);for(var r=this.getMapLayers(),o=0;o<r.length;o++)if(t===r[o].id)return void n.addLayer(e,t);i.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}n.addLayer(e)},x.project=function(e){return this.map.project(new r.LngLat(e[0],e[1]))},x.getView=function(){var e=this.map,t=e.getCenter(),n={lon:t.lng,lat:t.lat},r=e.getCanvas(),i=parseInt(r.style.width),o=parseInt(r.style.height);return{center:n,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([i,0]).toArray(),e.unproject([i,o]).toArray(),e.unproject([0,o]).toArray()]}}},x.getViewEdits=function(e){for(var t=this.id,n=["center","zoom","bearing","pitch"],r={},i=0;i<n.length;i++){var o=n[i];r[t+"."+o]=e[o]}return r},x.getViewEditsWithDerived=function(e){var t=this.id,n=this.getViewEdits(e);return n[t+"._derived"]=e._derived,n},t.exports=_},{"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../registry":638,"../cartesian/axes":554,"../cartesian/select":575,"./constants":611,"./layers":614,"mapbox-gl/dist/mapbox-gl-unminified":239}],618:[function(e,t,n){"use strict";t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}},{}],619:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-time-format").timeFormatLocale,o=e("d3-format").formatLocale,a=e("fast-isnumeric"),s=e("../registry"),l=e("../plot_api/plot_schema"),c=e("../plot_api/plot_template"),u=e("../lib"),h=e("../components/color"),d=e("../constants/numerical").BADNUM,f=e("./cartesian/axis_ids"),p=e("./cartesian/handle_outline").clearSelect,g=e("./animation_attributes"),m=e("./frame_attributes"),v=e("../plots/get_data").getModuleCalcData,y=u.relinkPrivateKeys,b=u._,_=t.exports={};u.extendFlat(_,s),_.attributes=e("./attributes"),_.attributes.type.values=_.allTypes,_.fontAttrs=e("./font_attributes"),_.layoutAttributes=e("./layout_attributes"),_.fontWeight="normal";var x=_.transformsRegistry,w=e("./command");_.executeAPICommand=w.executeAPICommand,_.computeAPICommandBindings=w.computeAPICommandBindings,_.manageCommandObserver=w.manageCommandObserver,_.hasSimpleAPICommandBindings=w.hasSimpleAPICommandBindings,_.redrawText=function(e){return e=u.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(s.getComponentMethod("annotations","draw")(e),s.getComponentMethod("legend","draw")(e),s.getComponentMethod("colorbar","draw")(e),t(_.previousPromises(e)))}),300)}))},_.resize=function(e){var t;e=u.getGraphDiv(e);var n=new Promise((function(n,r){e&&!u.isHidden(e)||r(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||u.isHidden(e))n(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,s.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===n&&(delete e._resolveResize,n(e))}))}}),100)}));return t&&t(n),n},_.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},_.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,n=u.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:h.defaultLine,"pointer-events":"all"}).each((function(){var e=r.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),i=n.node(),o={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=t._paper.attr("width")-7),n.attr(o);var a=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),l=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var n=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)n.on("click",(function(){_.sendDataToCloud(e)}));else{var r=window.location.pathname.split("/"),i=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+r[2].split(".")[0]+"/"+r[1]+i})}}(e,a),s.text(a.text()&&l.text()?" - ":"")}},_.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),i=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=_.graphJson(e,!1,"keepdata"),i.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function T(e,t){var n=e._context.locale;n||(n="en-US");var r=!1,i={};function o(e){for(var n=!0,o=0;o<t.length;o++){var a=t[o];i[a]||(e[a]?i[a]=e[a]:n=!1)}n&&(r=!0)}for(var a=0;a<2;a++){for(var l=e._context.locales,c=0;c<2;c++){var u=(l[n]||{}).format;if(u&&(o(u),r))break;l=s.localeRegistry}var h=n.split("-")[0];if(r||h===n)break;n=h}return r||o(s.localeRegistry.en.format),i}function S(e,t){var n={_fullLayout:t},r="x"===e._id.charAt(0),i=e._mainAxis._anchorAxis,o="",a="",s="";if(i&&(s=i._mainAxis._id,o=r?e._id+s:s+e._id),!o||!t._plots[o]){o="";for(var l=e._counterAxes,c=0;c<l.length;c++){var u=l[c],h=r?e._id+u:u+e._id;a||(a=h);var d=f.getFromId(n,u);if(s&&d.overlaying===s){o=h;break}}}return o||a}function E(e){var t=e.transforms;if(Array.isArray(t)&&t.length)for(var n=0;n<t.length;n++){var r=t[n],i=r._module||x[r.type];if(i&&i.makesData)return!0}return!1}function C(e,t,n,r){for(var i=e.transforms,o=[e],a=0;a<i.length;a++){var s=i[a],l=x[s.type];l&&l.transform&&(o=l.transform(o,{transform:s,fullTrace:e,fullData:t,layout:n,fullLayout:r,transformIndex:a}))}return o}function M(e){return"string"==typeof e&&"px"===e.substr(e.length-2)&&parseFloat(e)}function O(e){var t=e.margin;if(!e._size){var n=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};n.w=Math.round(e.width)-n.l-n.r,n.h=Math.round(e.height)-n.t-n.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={})}_.supplyDefaults=function(e,t){var n=t&&t.skipUpdateCalc,r=e._fullLayout||{};if(r._skipDefaults)delete r._skipDefaults;else{var a,l=e._fullLayout={},c=e.layout||{},h=e._fullData||[],d=e._fullData=[],f=e.data||[],g=e.calcdata||[],m=e._context||{};e._transitionData||_.createTransitionData(e),l._dfltTitle={plot:b(e,"Click to enter Plot title"),x:b(e,"Click to enter X axis title"),y:b(e,"Click to enter Y axis title"),colorbar:b(e,"Click to enter Colorscale title"),annotation:b(e,"new text")},l._traceWord=b(e,"trace");var v=T(e,A);if(l._mapboxAccessToken=m.mapboxAccessToken,r._initialAutoSizeIsDone){var x=r.width,w=r.height;_.supplyLayoutGlobalDefaults(c,l,v),c.width||(l.width=x),c.height||(l.height=w),_.sanitizeMargins(l)}else{_.supplyLayoutGlobalDefaults(c,l,v);var S=!c.width||!c.height,E=l.autosize,C=m.autosizable;S&&(E||C)?_.plotAutoSize(e,c,l):S&&_.sanitizeMargins(l),!E&&S&&(c.width=l.width,c.height=l.height)}l._d3locale=function(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(t){try{t=o(e).format(u.adjustFormat(t))}catch(e){return u.warnBadFormat(t),u.noFormat}return t},timeFormat:i(e).utcFormat}}(v,l.separators),l._extraFormat=T(e,k),l._initialAutoSizeIsDone=!0,l._dataLength=f.length,l._modules=[],l._visibleModules=[],l._basePlotModules=[];var M=l._subplots=function(){var e,t,n=s.collectableSubplotTypes,r={};if(!n){n=[];var i=s.subplotsRegistry;for(var o in i){var a=i[o].attr;if(a&&(n.push(o),Array.isArray(a)))for(t=0;t<a.length;t++)u.pushUnique(n,a[t])}}for(e=0;e<n.length;e++)r[n[e]]=[];return r}(),L=l._splomAxes={x:{},y:{}},D=l._splomSubplots={};l._splomGridDflt={},l._scatterStackOpts={},l._firstScatter={},l._alignmentOpts={},l._colorAxes={},l._requestRangeslider={},l._traceUids=function(e,t){var n,r,i=t.length,o=[];for(n=0;n<e.length;n++){var a=e[n]._fullInput;a!==r&&o.push(a),r=a}var s=o.length,l=new Array(i),c={};function h(e,t){l[t]=e,c[e]=1}function d(e,t){if(e&&"string"==typeof e&&!c[e])return h(e,t),!0}for(n=0;n<i;n++){var f=t[n].uid;"number"==typeof f&&(f=String(f)),d(f,n)||n<s&&d(o[n].uid,n)||h(u.randstr(c),n)}return l}(h,f),l._globalTransforms=(e._context||{}).globalTransforms,_.supplyDataDefaults(f,d,c,l);var I=Object.keys(L.x),R=Object.keys(L.y);if(I.length>1&&R.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),a=0;a<I.length;a++)u.pushUnique(M.xaxis,I[a]);for(a=0;a<R.length;a++)u.pushUnique(M.yaxis,R[a]);for(var P in D)u.pushUnique(M.cartesian,P)}if(l._has=_._hasPlotType.bind(l),h.length===d.length)for(a=0;a<d.length;a++)y(d[a],h[a]);_.supplyLayoutModuleDefaults(c,l,d,e._transitionData);var N=l._visibleModules,z=[];for(a=0;a<N.length;a++){var F=N[a].crossTraceDefaults;F&&u.pushUnique(z,F)}for(a=0;a<z.length;a++)z[a](d,l);l._hasOnlyLargeSploms=1===l._basePlotModules.length&&"splom"===l._basePlotModules[0].name&&I.length>15&&R.length>15&&0===l.shapes.length&&0===l.images.length,_.linkSubplots(d,l,h,r),_.cleanPlot(d,l,h,r);var B=!(!r._has||!r._has("gl2d")),j=!(!l._has||!l._has("gl2d")),U=!(!r._has||!r._has("cartesian"))||B,V=!(!l._has||!l._has("cartesian"))||j;U&&!V?r._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),r._zoomlayer&&!e._dragging&&p({_fullLayout:r}),function(e,t){var n,r=[];t.meta&&(n=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i<e.length;i++){var o=e[i];o.meta?r[o.index]=o._meta={meta:o.meta}:t.meta&&(o._meta={meta:t.meta}),t.meta&&(o._meta.layout={meta:t.meta})}r.length&&(n||(n=t._meta={}),n.data=r)}(d,l),y(l,r),s.getComponentMethod("colorscale","crossTraceDefaults")(d,l),l._preGUI||(l._preGUI={}),l._tracePreGUI||(l._tracePreGUI={});var q,H=l._tracePreGUI,$={};for(q in H)$[q]="old";for(a=0;a<d.length;a++)$[q=d[a]._fullInput.uid]||(H[q]={}),$[q]="new";for(q in $)"old"===$[q]&&delete H[q];O(l),s.getComponentMethod("rangeslider","makeData")(l),n||g.length!==d.length||_.supplyDefaultsUpdateCalc(g,d)}},_.supplyDefaultsUpdateCalc=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=(e[n]||[])[0];if(i&&i.trace){var o=i.trace;if(o._hasCalcTransform){var a,s,l,c=o._arrayAttrs;for(a=0;a<c.length;a++)s=c[a],l=u.nestedProperty(o,s).get().slice(),u.nestedProperty(r,s).set(l)}i.trace=r}}},_.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])},_._hasPlotType=function(e){var t,n=this._basePlotModules||[];for(t=0;t<n.length;t++)if(n[t].name===e)return!0;var r=this._modules||[];for(t=0;t<r.length;t++){var i=r[t].name;if(i===e)return!0;var o=s.modules[i];if(o&&o.categories[e])return!0}return!1},_.cleanPlot=function(e,t,n,r){var i,o,a=r._basePlotModules||[];for(i=0;i<a.length;i++){var s=a[i];s.clean&&s.clean(e,t,n,r)}var l=r._has&&r._has("gl"),c=t._has&&t._has("gl");l&&!c&&void 0!==r._glcontainer&&(r._glcontainer.selectAll(".gl-canvas").remove(),r._glcontainer.selectAll(".no-webgl").remove(),r._glcanvas=null);var u=!!r._infolayer;e:for(i=0;i<n.length;i++){var h=n[i].uid;for(o=0;o<e.length;o++)if(h===e[o].uid)continue e;u&&r._infolayer.select(".cb"+h).remove()}},_.linkSubplots=function(e,t,n,r){var i,o,a=r._plots||{},l=t._plots={},c=t._subplots,h={_fullData:e,_fullLayout:t},d=c.cartesian.concat(c.gl2d||[]);for(i=0;i<d.length;i++){var p,g=d[i],m=a[g],v=f.getFromId(h,g,"x"),y=f.getFromId(h,g,"y");for(m?p=l[g]=m:(p=l[g]={}).id=g,v._counterAxes.push(y._id),y._counterAxes.push(v._id),v._subplotsWith.push(g),y._subplotsWith.push(g),p.xaxis=v,p.yaxis=y,p._hasClipOnAxisFalse=!1,o=0;o<e.length;o++){var b=e[o];if(b.xaxis===p.xaxis._id&&b.yaxis===p.yaxis._id&&!1===b.cliponaxis){p._hasClipOnAxisFalse=!0;break}}}var _,x=f.list(h,null,!0);for(i=0;i<x.length;i++){var w=null;(_=x[i]).overlaying&&(w=f.getFromId(h,_.overlaying))&&w.overlaying&&(_.overlaying=!1,w=null),_._mainAxis=w||_,w&&(_.domain=w.domain.slice()),_._anchorAxis="free"===_.anchor?null:f.getFromId(h,_.anchor)}for(i=0;i<x.length;i++)if((_=x[i])._counterAxes.sort(f.idSort),_._subplotsWith.sort(u.subplotSort),_._mainSubplot=S(_,t),_._counterAxes.length&&(_.spikemode&&-1!==_.spikemode.indexOf("across")||_.automargin&&_.mirror&&"free"!==_.anchor||s.getComponentMethod("rangeslider","isVisible")(_))){var A=1,k=0;for(o=0;o<_._counterAxes.length;o++){var T=f.getFromId(h,_._counterAxes[o]);A=Math.min(A,T.domain[0]),k=Math.max(k,T.domain[1])}A<k&&(_._counterDomainMin=A,_._counterDomainMax=k)}},_.clearExpandedTraceDefaultColors=function(e){var t,n,r;for(n=[],(t=e._module._colorAttrs)||(e._module._colorAttrs=t=[],l.crawl(e._module.attributes,(function(e,r,i,o){n[o]=r,n.length=o+1,"color"===e.valType&&void 0===e.dflt&&t.push(n.join("."))}))),r=0;r<t.length;r++)u.nestedProperty(e,"_input."+t[r]).get()||u.nestedProperty(e,t[r]).set(null)},_.supplyDataDefaults=function(e,t,n,r){var i,o,a,l=r._modules,h=r._visibleModules,d=r._basePlotModules,f=0,p=0;function g(e){t.push(e);var n=e._module;n&&(u.pushUnique(l,n),!0===e.visible&&u.pushUnique(h,n),u.pushUnique(d,e._module.basePlotModule),f++,!1!==e._input.visible&&p++)}r._transformModules=[];var m={},v=[],b=(n.template||{}).data||{},x=c.traceTemplater(b);for(i=0;i<e.length;i++){if(a=e[i],(o=x.newTrace(a)).uid=r._traceUids[i],_.supplyTraceDefaults(a,o,p,r,i),o.index=i,o._input=a,o._expandedIndex=f,o.transforms&&o.transforms.length)for(var w=!1!==a.visible&&!1===o.visible,A=C(o,t,n,r),k=0;k<A.length;k++){var T=A[k],S={_template:o._template,type:o.type,uid:o.uid+k};w&&!1===T.visible&&delete T.visible,_.supplyTraceDefaults(T,S,f,r,i),y(S,T),S.index=i,S._input=a,S._fullInput=o,S._expandedIndex=f,S._expandedInput=T,g(S)}else o._fullInput=o,o._expandedInput=o,g(o);s.traceIs(o,"carpetAxis")&&(m[o.carpet]=o),s.traceIs(o,"carpetDependent")&&v.push(i)}for(i=0;i<v.length;i++)if((o=t[v[i]]).visible){var E=m[o.carpet];o._carpet=E,E&&E.visible?(o.xaxis=E.xaxis,o.yaxis=E.yaxis):o.visible=!1}},_.supplyAnimationDefaults=function(e){var t;e=e||{};var n={};function r(t,r){return u.coerce(e||{},n,g,t,r)}if(r("mode"),r("direction"),r("fromcurrent"),Array.isArray(e.frame))for(n.frame=[],t=0;t<e.frame.length;t++)n.frame[t]=_.supplyAnimationFrameDefaults(e.frame[t]||{});else n.frame=_.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(n.transition=[],t=0;t<e.transition.length;t++)n.transition[t]=_.supplyAnimationTransitionDefaults(e.transition[t]||{});else n.transition=_.supplyAnimationTransitionDefaults(e.transition||{});return n},_.supplyAnimationFrameDefaults=function(e){var t={};function n(n,r){return u.coerce(e||{},t,g.frame,n,r)}return n("duration"),n("redraw"),t},_.supplyAnimationTransitionDefaults=function(e){var t={};function n(n,r){return u.coerce(e||{},t,g.transition,n,r)}return n("duration"),n("easing"),t},_.supplyFrameDefaults=function(e){var t={};function n(n,r){return u.coerce(e,t,m,n,r)}return n("group"),n("name"),n("traces"),n("baseframe"),n("data"),n("layout"),t},_.supplyTraceDefaults=function(e,t,n,r,i){var o,a=r.colorway||h.defaults,l=a[n%a.length];function c(n,r){return u.coerce(e,t,_.attributes,n,r)}var d=c("visible");c("type"),c("name",r._traceWord+" "+i),c("uirevision",r.uirevision);var f=_.getModule(t);if(t._module=f,f){var p=f.basePlotModule,g=p.attr,m=p.attributes;if(g&&m){var v=r._subplots,y="";if(d||"gl2d"!==p.name){if(Array.isArray(g))for(o=0;o<g.length;o++){var b=g[o],x=u.coerce(e,t,m,b);v[b]&&u.pushUnique(v[b],x),y+=x}else y=u.coerce(e,t,m,g);v[p.name]&&u.pushUnique(v[p.name],y)}}}return d&&(c("customdata"),c("ids"),c("meta"),s.traceIs(t,"showLegend")?(u.coerce(e,t,f.attributes.showlegend?f.attributes:_.attributes,"showlegend"),c("legendgroup"),c("legendgrouptitle.text"),c("legendrank"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,f&&f.supplyDefaults(e,t,l,r),s.traceIs(t,"noOpacity")||c("opacity"),s.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),s.traceIs(t,"noHover")||(t.hovertemplate||u.coerceHoverinfo(e,t,r),"parcats"!==t.type&&s.getComponentMethod("fx","supplyDefaults")(e,t,l,r)),f&&f.selectPoints&&c("selectedpoints"),_.supplyTransformDefaults(e,t,r)),t},_.hasMakesDataTransform=E,_.supplyTransformDefaults=function(e,t,n){if(t._length||E(e)){var r=n._globalTransforms||[],i=n._transformModules||[];if(Array.isArray(e.transforms)||0!==r.length)for(var o=e.transforms||[],a=r.concat(o),s=t.transforms=[],l=0;l<a.length;l++){var c,h=a[l],d=h.type,f=x[d],p=!(h._module&&h._module===f),g=f&&"function"==typeof f.transform;f||u.warn("Unrecognized transform type "+d+"."),f&&f.supplyDefaults&&(p||g)?((c=f.supplyDefaults(h,t,n,e)).type=d,c._module=f,u.pushUnique(i,f)):c=u.extendFlat({},h),s.push(c)}}},_.supplyLayoutGlobalDefaults=function(e,t,n){function r(n,r){return u.coerce(e,t,_.layoutAttributes,n,r)}var i=e.template;u.isPlainObject(i)&&(t.template=i,t._template=i.layout,t._dataTemplate=i.data),r("autotypenumbers");var o=u.coerceFont(r,"font"),a=o.size;u.coerceFont(r,"title.font",u.extendFlat({},o,{size:Math.round(1.4*a)})),r("title.text",t._dfltTitle.plot),r("title.xref"),r("title.yref"),r("title.x"),r("title.y"),r("title.xanchor"),r("title.yanchor"),r("title.pad.t"),r("title.pad.r"),r("title.pad.b"),r("title.pad.l"),r("uniformtext.mode")&&r("uniformtext.minsize"),r("autosize",!(e.width&&e.height)),r("width"),r("height"),r("margin.l"),r("margin.r"),r("margin.t"),r("margin.b"),r("margin.pad"),r("margin.autoexpand"),e.width&&e.height&&_.sanitizeMargins(t),s.getComponentMethod("grid","sizeDefaults")(e,t),r("paper_bgcolor"),r("separators",n.decimal+n.thousands),r("hidesources"),r("colorway"),r("datarevision");var l=r("uirevision");r("editrevision",l),r("selectionrevision",l),s.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),s.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,r),r("meta"),u.isPlainObject(e.transition)&&(r("transition.duration"),r("transition.easing"),r("transition.ordering")),s.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),s.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,r)},_.plotAutoSize=function(e,t,n){var r,i,o=e._context||{},s=o.frameMargins,l=u.isPlotDiv(e);if(l&&e.emit("plotly_autosize"),o.fillFrame)r=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var c=l?window.getComputedStyle(e):{};if(r=M(c.width)||M(c.maxWidth)||n.width,i=M(c.height)||M(c.maxHeight)||n.height,a(s)&&s>0){var h=1-2*s;r=Math.round(h*r),i=Math.round(h*i)}}var d=_.layoutAttributes.width.min,f=_.layoutAttributes.height.min;r<d&&(r=d),i<f&&(i=f);var p=!t.width&&Math.abs(n.width-r)>1,g=!t.height&&Math.abs(n.height-i)>1;(g||p)&&(p&&(n.width=r),g&&(n.height=i)),e._initialAutoSize||(e._initialAutoSize={width:r,height:i}),_.sanitizeMargins(n)},_.supplyLayoutModuleDefaults=function(e,t,n,r){var i,o,a,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(i in l)(a=l[i]).includeBasePlot&&a.includeBasePlot(e,t);for(var d in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(u.subplotSort);for(o=0;o<c.length;o++)(a=c[o]).supplyLayoutDefaults&&a.supplyLayoutDefaults(e,t,n);var f=t._modules;for(o=0;o<f.length;o++)(a=f[o]).supplyLayoutDefaults&&a.supplyLayoutDefaults(e,t,n);var p=t._transformModules;for(o=0;o<p.length;o++)(a=p[o]).supplyLayoutDefaults&&a.supplyLayoutDefaults(e,t,n,r);for(i in l)(a=l[i]).supplyLayoutDefaults&&a.supplyLayoutDefaults(e,t,n)},_.purge=function(e){var t=e._fullLayout||{};void 0!==t._glcontainer&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),u.clearThrottle(),u.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()},_.style=function(e){var t,n=e._fullLayout._visibleModules,r=[];for(t=0;t<n.length;t++){var i=n[t];i.style&&u.pushUnique(r,i.style)}for(t=0;t<r.length;t++)r[t](e)},_.sanitizeMargins=function(e){if(e&&e.margin){var t,n=e.width,r=e.height,i=e.margin,o=n-(i.l+i.r),a=r-(i.t+i.b);o<0&&(t=(n-1)/(i.l+i.r),i.l=Math.floor(t*i.l),i.r=Math.floor(t*i.r)),a<0&&(t=(r-1)/(i.t+i.b),i.t=Math.floor(t*i.t),i.b=Math.floor(t*i.b))}},_.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}},_.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};_.autoMargin=function(e,t,n){var r=e._fullLayout,i=r.width,o=r.height,a=r.margin,s=u.constrain(i-a.l-a.r,2,64),l=u.constrain(o-a.t-a.b,2,64),c=Math.max(0,i-s),h=Math.max(0,o-l),d=r._pushmargin,f=r._pushmarginIds;if(!1!==a.autoexpand){if(n){var p=n.pad;if(void 0===p&&(p=Math.min(12,a.l,a.r,a.t,a.b)),c){var g=(n.l+n.r)/c;g>1&&(n.l/=g,n.r/=g)}if(h){var m=(n.t+n.b)/h;m>1&&(n.t/=m,n.b/=m)}var v=void 0!==n.xl?n.xl:n.x,y=void 0!==n.xr?n.xr:n.x,b=void 0!==n.yt?n.yt:n.y,x=void 0!==n.yb?n.yb:n.y;d[t]={l:{val:v,size:n.l+p},r:{val:y,size:n.r+p},b:{val:x,size:n.b+p},t:{val:b,size:n.t+p}},f[t]=1}else delete d[t],delete f[t];if(!r._replotting)return _.doAutoMargin(e)}},_.doAutoMargin=function(e){var t=e._fullLayout,n=t.width,r=t.height;t._size||(t._size={}),O(t);var i=t._size,o=t.margin,l=u.extendFlat({},i),c=o.l,h=o.r,d=o.t,p=o.b,g=t._pushmargin,m=t._pushmarginIds;if(!1!==t.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:h},t:{val:1,size:d},b:{val:0,size:p}},g){var b=g[y].l||{},x=g[y].b||{},w=b.val,A=b.size,k=x.val,T=x.size;for(var S in g){if(a(A)&&g[S].r){var E=g[S].r.val,C=g[S].r.size;if(E>w){var M=(A*E+(C-n)*w)/(E-w),L=(C*(1-w)+(A-n)*(1-E))/(E-w);M+L>c+h&&(c=M,h=L)}}if(a(T)&&g[S].t){var D=g[S].t.val,I=g[S].t.size;if(D>k){var R=(T*D+(I-r)*k)/(D-k),P=(I*(1-k)+(T-r)*(1-D))/(D-k);R+P>p+d&&(p=R,d=P)}}}}}var N=u.constrain(n-o.l-o.r,2,64),z=u.constrain(r-o.t-o.b,2,64),F=Math.max(0,n-N),B=Math.max(0,r-z);if(F){var j=(c+h)/F;j>1&&(c/=j,h/=j)}if(B){var U=(p+d)/B;U>1&&(p/=U,d/=U)}if(i.l=Math.round(c),i.r=Math.round(h),i.t=Math.round(d),i.b=Math.round(p),i.p=Math.round(o.pad),i.w=Math.round(n)-i.l-i.r,i.h=Math.round(r)-i.t-i.b,!t._replotting&&_.didMarginChange(l,i)){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(t._redrawFromAutoMarginCount<V)return s.call("_doPlot",e);t._size=l,u.warn("Too many auto-margin redraws.")}!function(e){var t=f.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(e){for(var n=0;n<t.length;n++){var r=t[n][e];r&&r()}}))}(e)};var L=["l","r","t","b","p","w","h"];function D(e,t,n){var r=!1;var i=[_.previousPromises,function(){if(e._transitionData)return e._transitioning=!1,function(e){var t=Promise.resolve();if(!e)return t;for(;e.length;)t=t.then(e.shift());return t}(e._transitionData._interruptCallbacks)},n.prepareFn,_.rehover,function(){return e.emit("plotly_transitioning",[]),new Promise((function(i){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){r=!0})),n.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function l(){return o++,function(){a++,r||a!==o||function(t){if(e._transitionData)(function(e){if(e)for(;e.length;)e.shift()})(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(n.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)}(i)}}n.runFn(l),setTimeout(l())}))}],o=u.syncOrAsync(i,e);return o&&o.then||(o=Promise.resolve()),o.then((function(){return e}))}_.didMarginChange=function(e,t){for(var n=0;n<L.length;n++){var r=L[n],i=e[r],o=t[r];if(!a(i)||Math.abs(o-i)>1)return!0}return!1},_.graphJson=function(e,t,n,r,i,o){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&_.supplyDefaults(e);var a=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r,i={};return Object.keys(e).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!=typeof e[o]){if("keepdata"===n){if("src"===o.substr(o.length-3))return}else if("keepstream"===n){if("string"==typeof(r=e[o+"src"])&&r.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==n&&"string"==typeof(r=e[o+"src"])&&r.indexOf(":")>0)return;i[o]=c(e[o],t)}else t&&(i[o]="_function")})),i}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var h={data:(a||[]).map((function(e){var n=c(e);return t&&delete n.fit,n}))};if(!t&&(h.layout=c(s),i)){var d=s._size;h.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return l&&(h.frames=c(l)),o&&(h.config=c(e._context,!0)),"object"===r?h:JSON.stringify(h)},_.modifyFrames=function(e,t){var n,r,i,o=e._transitionData._frames,a=e._transitionData._frameHash;for(n=0;n<t.length;n++)switch((r=t[n]).type){case"replace":i=r.value;var s=(o[r.index]||{}).name,l=i.name;o[r.index]=a[l]=i,l!==s&&(delete a[s],a[l]=i);break;case"insert":a[(i=r.value).name]=i,o.splice(r.index,0,i);break;case"delete":delete a[(i=o[r.index]).name],o.splice(r.index,1)}return Promise.resolve()},_.computeFrame=function(e,t){var n,r,i,o,a=e._transitionData._frameHash;if(!t)throw new Error("computeFrame must be given a string frame name");var s=a[t.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=a[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=_.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(r=s.traces))for(r=[],n=0;n<s.data.length;n++)r[n]=n;for(u.traces||(u.traces=[]),n=0;n<s.data.length;n++)null!=(i=r[n])&&(-1===(o=u.traces.indexOf(i))&&(o=u.data.length,u.traces[o]=i),u.data[o]=_.extendTrace(u.data[o],s.data[n]))}return u},_.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},n=e._transitionData._frames,r=0;r<n.length;r++){var i=n[r];i&&i.name&&(t[i.name]=i)}},_.extendObjectWithContainers=function(e,t,n){var r,i,o,a,s,l,c,h=u.extendDeepNoArrays({},t||{}),d=u.expandObjectPaths(h),f={};if(n&&n.length)for(o=0;o<n.length;o++)void 0===(i=(r=u.nestedProperty(d,n[o])).get())?u.nestedProperty(f,n[o]).set(null):(r.set(null),u.nestedProperty(f,n[o]).set(i));if(e=u.extendDeepNoArrays(e||{},d),n&&n.length)for(o=0;o<n.length;o++)if(l=u.nestedProperty(f,n[o]).get()){for(c=(s=u.nestedProperty(e,n[o])).get(),Array.isArray(c)||(c=[],s.set(c)),a=0;a<l.length;a++){var p=l[a];c[a]=null===p?null:_.extendObjectWithContainers(c[a],p)}s.set(c)}return e},_.dataArrayContainers=["transforms","dimensions"],_.layoutArrayContainers=s.layoutArrayContainers,_.extendTrace=function(e,t){return _.extendObjectWithContainers(e,t,_.dataArrayContainers)},_.extendLayout=function(e,t){return _.extendObjectWithContainers(e,t,_.layoutArrayContainers)},_.transition=function(e,t,n,r,i,o){var a={redraw:i.redraw},s={},l=[];return a.prepareFn=function(){for(var i=Array.isArray(t)?t.length:0,o=r.slice(0,i),a=0;a<o.length;a++){var c=o[a],h=e._fullData[c]._module;if(h){if(h.animatable){var d=h.basePlotModule.name;s[d]||(s[d]=[]),s[d].push(c)}e.data[o[a]]=_.extendTrace(e.data[o[a]],t[a])}}var f=u.expandObjectPaths(u.extendDeepNoArrays({},n)),p=/^[xy]axis[0-9]*$/;for(var g in f)p.test(g)&&delete f[g].range;_.extendLayout(e.layout,f),delete e.calcdata,_.supplyDefaults(e),_.doCalcdata(e);var m=u.expandObjectPaths(n);if(m){var v=e._fullLayout._plots;for(var y in v){var b=v[y],x=b.xaxis,w=b.yaxis,A=x.range.slice(),k=w.range.slice(),T=null,S=null,E=null,C=null;Array.isArray(m[x._name+".range"])?T=m[x._name+".range"].slice():Array.isArray((m[x._name]||{}).range)&&(T=m[x._name].range.slice()),Array.isArray(m[w._name+".range"])?S=m[w._name+".range"].slice():Array.isArray((m[w._name]||{}).range)&&(S=m[w._name].range.slice()),A&&T&&(x.r2l(A[0])!==x.r2l(T[0])||x.r2l(A[1])!==x.r2l(T[1]))&&(E={xr0:A,xr1:T}),k&&S&&(w.r2l(k[0])!==w.r2l(S[0])||w.r2l(k[1])!==w.r2l(S[1]))&&(C={yr0:k,yr1:S}),(E||C)&&l.push(u.extendFlat({plotinfo:b},E,C))}}return Promise.resolve()},a.runFn=function(t){var r,i,a=e._fullLayout._basePlotModules,c=l.length;if(n)for(i=0;i<a.length;i++)a[i].transitionAxes&&a[i].transitionAxes(e,l,o,t);for(var h in c?((r=u.extendFlat({},o)).duration=0,delete s.cartesian):r=o,s){var d=s[h];e._fullData[d[0]]._module.basePlotModule.plot(e,d,r,t)}},D(e,o,a)},_.transitionFromReact=function(e,t,n,r){var i=e._fullLayout,o=i.transition,a={},s=[];return a.prepareFn=function(){var e=i._plots;for(var o in a.redraw=!1,"some"===t.anim&&(a.redraw=!0),"some"===n.anim&&(a.redraw=!0),e){var l=e[o],c=l.xaxis,h=l.yaxis,d=r[c._name].range.slice(),f=r[h._name].range.slice(),p=c.range.slice(),g=h.range.slice();c.setScale(),h.setScale();var m=null,v=null;c.r2l(d[0])===c.r2l(p[0])&&c.r2l(d[1])===c.r2l(p[1])||(m={xr0:d,xr1:p}),h.r2l(f[0])===h.r2l(g[0])&&h.r2l(f[1])===h.r2l(g[1])||(v={yr0:f,yr1:g}),(m||v)&&s.push(u.extendFlat({plotinfo:l},m,v))}return Promise.resolve()},a.runFn=function(n){for(var r,i,a,l=e._fullData,c=e._fullLayout._basePlotModules,h=[],d=0;d<l.length;d++)h.push(d);function f(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].transitionAxes&&c[t].transitionAxes(e,s,r,n)}function p(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].plot(e,a,i,n)}s.length&&t.anim?"traces first"===o.ordering?(r=u.extendFlat({},o,{duration:0}),a=h,i=o,setTimeout(f,o.duration),p()):(r=o,a=null,i=u.extendFlat({},o,{duration:0}),setTimeout(p,r.duration),f()):s.length?(r=o,f()):t.anim&&(a=h,i=o,p())},D(e,o,a)},_.doCalcdata=function(e,t){var n,r,i,o,a=f.list(e),c=e._fullData,h=e._fullLayout,p=new Array(c.length),g=(e.calcdata||[]).slice();for(e.calcdata=p,h._numBoxes=0,h._numViolins=0,h._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,h._piecolormap={},h._sunburstcolormap={},h._treemapcolormap={},h._iciclecolormap={},h._funnelareacolormap={},i=0;i<c.length;i++)Array.isArray(t)&&-1===t.indexOf(i)&&(p[i]=g[i]);for(i=0;i<c.length;i++)(n=c[i])._arrayAttrs=l.findArrayAttributes(n),n._extremes={};var m=h._subplots.polar||[];for(i=0;i<m.length;i++)a.push(h[m[i]].radialaxis,h[m[i]].angularaxis);for(var v in h._colorAxes){var y=h[v];!1!==y.cauto&&(delete y.cmin,delete y.cmax)}var b=!1;function _(t){if(n=c[t],r=n._module,!0===n.visible&&n.transforms){if(r&&r.calc){var i=r.calc(e,n);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(o=0;o<n.transforms.length;o++){var a=n.transforms[o];(r=x[a.type])&&r.calcTransform&&(n._hasCalcTransform=!0,b=!0,r.calcTransform(e,n,a))}}}function w(t,i){if(n=c[t],!!(r=n._module).isContainer===i){var a=[];if(!0===n.visible&&0!==n._length){delete n._indexToPoints;var s=n.transforms||[];for(o=s.length-1;o>=0;o--)if(s[o].enabled){n._indexToPoints=s[o]._indexToPoints;break}r&&r.calc&&(a=r.calc(e,n))}Array.isArray(a)&&a[0]||(a=[{x:d,y:d}]),a[0].t||(a[0].t={}),a[0].trace=n,p[t]=a}}for(R(a,c,h),i=0;i<c.length;i++)w(i,!0);for(i=0;i<c.length;i++)_(i);for(b&&R(a,c,h),i=0;i<c.length;i++)w(i,!0);for(i=0;i<c.length;i++)w(i,!1);P(e);var A=function(e,t){var n,r,i,o,a,l=[];function c(e,n,r){var i=n._id.charAt(0);if("histogram2dcontour"===e){var o=n._counterAxes[0],a=f.getFromId(t,o),s="x"===i||"x"===o&&"category"===a.type,l="y"===i||"y"===o&&"category"===a.type;return function(e,t){return 0===e||0===t||s&&e===r[t].length-1||l&&t===r.length-1?-1:("y"===i?t:e)-1}}return function(e,t){return"y"===i?t:e}}var h={min:function(e){return u.aggNums(Math.min,null,e)},max:function(e){return u.aggNums(Math.max,null,e)},sum:function(e){return u.aggNums((function(e,t){return e+t}),null,e)},total:function(e){return u.aggNums((function(e,t){return e+t}),null,e)},mean:function(e){return u.mean(e)},median:function(e){return u.median(e)}};for(n=0;n<e.length;n++){var d=e[n];if("category"===d.type){var p=d.categoryorder.match(I);if(p){var g=p[1],m=p[2],v=d._id.charAt(0),y="x"===v,b=[];for(r=0;r<d._categories.length;r++)b.push([d._categories[r],[]]);for(r=0;r<d._traceIndices.length;r++){var _=d._traceIndices[r],x=t._fullData[_];if(!0===x.visible){var w=x.type;s.traceIs(x,"histogram")&&(delete x._xautoBinFinished,delete x._yautoBinFinished);var A="splom"===w,k="scattergl"===w,T=t.calcdata[_];for(i=0;i<T.length;i++){var S,E,C=T[i];if(A){var M=x._axesDim[d._id];if(!y){var O=x._diag[M][0];O&&(d=t._fullLayout[f.id2name(O)])}var L=C.trace.dimensions[M].values;for(o=0;o<L.length;o++)for(S=d._categoriesMap[L[o]],a=0;a<C.trace.dimensions.length;a++)if(a!==M){var D=C.trace.dimensions[a];b[S][1].push(D.values[o])}}else if(k){for(o=0;o<C.t.x.length;o++)y?(S=C.t.x[o],E=C.t.y[o]):(S=C.t.y[o],E=C.t.x[o]),b[S][1].push(E);C.t&&C.t._scene&&delete C.t._scene.dirty}else if(C.hasOwnProperty("z")){E=C.z;var R=c(x.type,d,E);for(o=0;o<E.length;o++)for(a=0;a<E[o].length;a++)(S=R(a,o))+1&&b[S][1].push(E[o][a])}else for(void 0===(S=C.p)&&(S=C[v]),void 0===(E=C.s)&&(E=C.v),void 0===E&&(E=y?C.y:C.x),Array.isArray(E)||(E=void 0===E?[]:[E]),o=0;o<E.length;o++)b[S][1].push(E[o])}}}d._categoriesValue=b;var P=[];for(r=0;r<b.length;r++)P.push([b[r][0],h[g](b[r][1])]);P.sort((function(e,t){return e[1]-t[1]})),d._categoriesAggregatedValue=P,d._initialCategories=P.map((function(e){return e[0]})),"descending"===m&&d._initialCategories.reverse(),l=l.concat(d.sortByInitialCategories())}}}return l}(a,e);if(A.length){for(h._numBoxes=0,h._numViolins=0,i=0;i<A.length;i++)w(A[i],!0);for(i=0;i<A.length;i++)w(A[i],!1);P(e)}s.getComponentMethod("fx","calc")(e),s.getComponentMethod("errorbars","calc")(e)};var I=/(total|sum|min|max|mean|median) (ascending|descending)/;function R(e,t,n){var r={};function i(e){e.clearCalc(),"multicategory"===e.type&&e.setupMultiCategory(t),r[e._id]=1}u.simpleMap(e,i);for(var o=n._axisMatchGroups||[],a=0;a<o.length;a++)for(var s in o[a])r[s]||i(n[f.id2name(s)])}function P(e){var t,n,r,i=e._fullLayout,o=i._visibleModules,a={};for(n=0;n<o.length;n++){var s=o[n],l=s.crossTraceCalc;if(l){var c=s.basePlotModule.name;a[c]?u.pushUnique(a[c],l):a[c]=[l]}}for(r in a){var h=a[r],d=i._subplots[r];if(Array.isArray(d))for(t=0;t<d.length;t++){var f=d[t],p="cartesian"===r?i._plots[f]:i[f];for(n=0;n<h.length;n++)h[n](e,p,f)}else for(n=0;n<h.length;n++)h[n](e)}}_.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},_.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()},_.generalUpdatePerTraceModule=function(e,t,n,r){var i,o=t.traceHash,a={};for(i=0;i<n.length;i++){var s=n[i],l=s[0].trace;l.visible&&(a[l.type]=a[l.type]||[],a[l.type].push(s))}for(var c in o)if(!a[c]){var h=o[c][0];h[0].trace.visible=!1,a[c]=[h]}for(var d in a){var f=a[d];f[0][0].trace._module.plot(e,t,u.filterVisible(f),r)}t.traceHash=a},_.plotBasePlot=function(e,t,n,r,i){var o=s.getModule(e),a=v(t.calcdata,o)[0];o.plot(t,a,r,i)},_.cleanBasePlot=function(e,t,n,r,i){var o=i._has&&i._has(e),a=n._has&&n._has(e);o&&!a&&i["_"+e+"layer"].selectAll("g.trace").remove()}},{"../components/color":366,"../constants/numerical":479,"../lib":503,"../plot_api/plot_schema":542,"../plot_api/plot_template":543,"../plots/get_data":593,"../registry":638,"./animation_attributes":548,"./attributes":550,"./cartesian/axis_ids":558,"./cartesian/handle_outline":565,"./command":583,"./font_attributes":585,"./frame_attributes":586,"./layout_attributes":610,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],620:[function(e,t,n){"use strict";t.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],621:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../lib/polygon").tester,o=r.findIndexOfMin,a=r.isAngleInsideSector,s=r.angleDelta,l=r.angleDist;function c(e,t,n,r){var i,o,a=r[0],s=r[1],l=h(Math.sin(t)-Math.sin(e)),c=h(Math.cos(t)-Math.cos(e)),u=Math.tan(n),d=h(1/u),f=l/c,p=s-f*a;return d?l&&c?o=u*(i=p/(u-f)):c?(i=s*d,o=s):(i=a,o=a*u):l&&c?(i=0,o=p):c?(i=0,o=s):i=o=NaN,[i,o]}function u(e,t,n,i){return r.isFullCircle([t,n])?function(e,t){var n,r=t.length,i=new Array(r+1);for(n=0;n<r;n++){var o=t[n];i[n]=[e*Math.cos(o),e*Math.sin(o)]}return i[n]=i[0].slice(),i}(e,i):function(e,t,n,i){var s,u,h=i.length,d=[];function f(t){return[e*Math.cos(t),e*Math.sin(t)]}function p(e,t,n){return c(e,t,n,f(e))}function g(e){return r.mod(e,h)}function m(e){return a(e,[t,n])}var v=o(i,(function(e){return m(e)?l(e,t):1/0})),y=p(i[v],i[g(v-1)],t);for(d.push(y),s=v,u=0;u<h;s++,u++){var b=i[g(s)];if(!m(b))break;d.push(f(b))}var _=o(i,(function(e){return m(e)?l(e,n):1/0})),x=p(i[_],i[g(_+1)],n);return d.push(x),d.push([0,0]),d.push(d[0].slice()),d}(e,t,n,i)}function h(e){return Math.abs(e)>1e-10?e:0}function d(e,t,n){t=t||0,n=n||0;for(var r=e.length,i=new Array(r),o=0;o<r;o++){var a=e[o];i[o]=[t+a[0],n-a[1]]}return i}t.exports={isPtInsidePolygon:function(e,t,n,r,o){if(!a(t,r))return!1;var s,l;n[0]<n[1]?(s=n[0],l=n[1]):(s=n[1],l=n[0]);var c=i(u(s,r[0],r[1],o)),h=i(u(l,r[0],r[1],o)),d=[e*Math.cos(t),e*Math.sin(t)];return h.contains(d)&&!c.contains(d)},findPolygonOffset:function(e,t,n,r){for(var i=1/0,o=1/0,a=u(e,t,n,r),s=0;s<a.length;s++){var l=a[s];i=Math.min(i,l[0]),o=Math.min(o,-l[1])}return[i,o]},findEnclosingVertexAngles:function(e,t){var n=o(t,(function(t){var n=s(t,e);return n>0?n:1/0})),i=r.mod(n+1,t.length);return[t[n],t[i]]},findIntersectionXY:c,findXYatLength:function(e,t,n,r){var i=-t*n,o=t*t+1,a=2*(t*i-n),s=i*i+n*n-e*e,l=Math.sqrt(a*a-4*o*s),c=(-a+l)/(2*o),u=(-a-l)/(2*o);return[[c,t*c+i+r],[u,t*u+i+r]]},clampTiny:h,pathPolygon:function(e,t,n,r,i,o){return"M"+d(u(e,t,n,r),i,o).join("L")},pathPolygonAnnulus:function(e,t,n,r,i,o,a){var s,l;e<t?(s=e,l=t):(s=t,l=e);var c=d(u(s,n,r,i),o,a);return"M"+d(u(l,n,r,i),o,a).reverse().join("L")+"M"+c.join("L")}}},{"../../lib":503,"../../lib/polygon":515}],622:[function(e,t,n){"use strict";var r=e("../get_data").getSubplotCalcData,i=e("../../lib").counterRegex,o=e("./polar"),a=e("./constants"),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,i=t._subplots[l],a=0;a<i.length;a++){var s=i[a],c=r(n,l,s),u=t[s]._subplot;u||(u=o(e,s),t[s]._subplot=u),u.plot(c,t,e._promises)}},clean:function(e,t,n,r){for(var i=r._subplots[l]||[],o=r._has&&r._has("gl"),a=t._has&&t._has("gl"),s=o&&!a,c=0;c<i.length;c++){var u=i[c],h=r[u]._subplot;if(!t[u]&&h)for(var d in h.framework.remove(),h.layers["radial-axis-title"].remove(),h.clipPaths)h.clipPaths[d].remove();s&&h._scene&&(h._scene.destroy(),h._scene=null)}},toSVG:e("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"./constants":620,"./layout_attributes":623,"./layout_defaults":624,"./polar":625}],623:[function(e,t,n){"use strict";var r=e("../../components/color/attributes"),i=e("../cartesian/layout_attributes"),o=e("../domain").attributes,a=e("../../lib").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},"plot","from-root"),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},"plot","from-root"),u={visible:a({},i.visible,{dflt:!0}),type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:a({},i.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:a({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:a({},i.title.text,{editType:"plot",dflt:""}),font:a({},i.title.font,{editType:"plot"}),editType:"plot"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};a(u,l,c);var h={visible:a({},i.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};a(h,l,c),t.exports={domain:o({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:r.background},radialaxis:u,angularaxis:h,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},{"../../components/color/attributes":365,"../../lib":503,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],624:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../../plot_api/plot_template"),a=e("../subplot_defaults"),s=e("../get_data").getSubplotData,l=e("../cartesian/tick_value_defaults"),c=e("../cartesian/tick_mark_defaults"),u=e("../cartesian/tick_label_defaults"),h=e("../cartesian/prefix_suffix_defaults"),d=e("../cartesian/category_order_defaults"),f=e("../cartesian/line_grid_defaults"),p=e("../cartesian/axis_autotype"),g=e("./layout_attributes"),m=e("./set_convert"),v=e("./constants"),y=v.axisNames;function b(e,t,n,a){var p=n("bgcolor");a.bgColor=i.combine(p,a.paper_bgcolor);var b=n("sector");n("hole");var x,w=s(a.fullData,v.name,a.id),A=a.layoutOut;function k(e,t){return n(x+"."+e,t)}for(var T=0;T<y.length;T++){x=y[T],r.isPlainObject(e[x])||(e[x]={});var S=e[x],E=o.newContainer(t,x);E._id=E._name=x,E._attr=a.id+"."+x,E._traceIndices=w.map((function(e){return e._expandedIndex}));var C=v.axisName2dataArray[x],M=_(S,E,k,w,C,a);d(S,E,k,{axData:w,dataAttr:C});var O=k("visible");switch(m(E,t,A),k("uirevision",t.uirevision),E._m=1,x){case"radialaxis":var L=k("autorange",!E.isValidRange(S.range));S.autorange=L,!L||"linear"!==M&&"-"!==M||k("rangemode"),"reversed"===L&&(E._m=-1),k("range"),E.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if("date"===M){r.log("Polar plots do not support date angular axes yet.");for(var D=0;D<w.length;D++)w[D].visible=!1;M=S.type=E.type="linear"}k("linear"===M?"thetaunit":"period");var I=k("direction");k("rotation",{counterclockwise:0,clockwise:90}[I])}if(h(S,E,k,E.type,{tickSuffixDflt:"degrees"===E.thetaunit?"":void 0}),O){var R,P,N,z,F=a.font||{};P=(R=k("color"))===S.color?R:F.color,N=F.size,z=F.family,l(S,E,k,E.type),u(S,E,k,E.type,{font:{color:P,size:N,family:z}}),c(S,E,k,{outerTicks:!0}),f(S,E,k,{dfltColor:R,bgColor:a.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[x]}),k("layer"),"radialaxis"===x&&(k("side"),k("angle",b[0]),k("title.text"),r.coerceFont(k,"title.font",{color:P,size:r.bigFont(N),family:z}))}"category"!==M&&k("hoverformat"),E._input=S}"category"===t.angularaxis.type&&n("gridshape")}function _(e,t,n,r,i,o){var a=n("autotypenumbers",o.autotypenumbersDflt);if("-"===n("type")){for(var s,l=0;l<r.length;l++)if(r[l].visible){s=r[l];break}s&&s[i]&&(t.type=p(s[i],"gregorian",{noMultiCategory:!0,autotypenumbers:a})),"-"===t.type?t.type="linear":e.type=t.type}return t.type}t.exports=function(e,t,n){a(e,t,n,{type:v.name,attributes:g,handleDefaults:b,font:t.font,autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,fullData:n,layoutOut:t})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/axis_autotype":555,"../cartesian/category_order_defaults":559,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../get_data":593,"../subplot_defaults":632,"./constants":620,"./layout_attributes":623,"./set_convert":626}],625:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("tinycolor2"),o=e("../../registry"),a=e("../../lib"),s=a.strRotate,l=a.strTranslate,c=e("../../components/color"),u=e("../../components/drawing"),h=e("../plots"),d=e("../../plots/cartesian/axes"),f=e("../cartesian/set_convert"),p=e("./set_convert"),g=e("../cartesian/autorange").doAutoRange,m=e("../cartesian/dragbox"),v=e("../../components/dragelement"),y=e("../../components/fx"),b=e("../../components/titles"),_=e("../cartesian/select").prepSelect,x=e("../cartesian/select").selectOnClick,w=e("../cartesian/select").clearSelect,A=e("../../lib/setcursor"),k=e("../../lib/clear_gl_canvases"),T=e("../../plot_api/subroutines").redrawReglTraces,S=e("../../constants/alignment").MID_SHIFT,E=e("./constants"),C=e("./helpers"),M=e("../smith/helpers"),O=M.smith,L=M.reactanceArc,D=M.resistanceArc,I=M.smithTransform,R=a._,P=a.mod,N=a.deg2rad,z=a.rad2deg;function F(e,t,n){this.isSmith=n||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=e._fullLayout,i="clip"+r._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=r._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=r["_"+(n?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(e){return this.isSmith?0:e.hole},this.getSector=function(e){return this.isSmith?[0,360]:e.sector},this.getRadial=function(e){return this.isSmith?e.realaxis:e.radialaxis},this.getAngular=function(e){return this.isSmith?e.imaginaryaxis:e.angularaxis},n||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=F.prototype;function j(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function U(e,t){return t[a.findIndexOfMin(t,(function(t){return a.angleDist(e,t)}))]}function V(e,t,n){return t?(e.attr("display",null),e.attr(n)):e&&e.attr("display","none"),e}t.exports=function(e,t,n){return new F(e,t,n)},B.plot=function(e,t){for(var n=this,r=t[n.id],i=!1,o=0;o<e.length;o++)if(!1===e[o][0].trace.cliponaxis){i=!0;break}n._hasClipOnAxisFalse=i,n.updateLayers(t,r),n.updateLayout(t,r),h.generalUpdatePerTraceModule(n.gd,n,e,r),n.updateFx(t,r),n.isSmith&&(delete r.realaxis.range,delete r.imaginaryaxis.range)},B.updateLayers=function(e,t){var n=this,i=n.isSmith,o=n.layers,a=n.getRadial(t),s=n.getAngular(t),l=E.layerNames,c=l.indexOf("frontplot"),u=l.slice(0,c),h="below traces"===s.layer,d="below traces"===a.layer;h&&u.push("angular-line"),d&&u.push("radial-line"),h&&u.push("angular-axis"),d&&u.push("radial-axis"),u.push("frontplot"),h||u.push("angular-line"),d||u.push("radial-line"),h||u.push("angular-axis"),d||u.push("radial-axis");var f=(i?"smith":"polar")+"sublayer",p=n.framework.selectAll("."+f).data(u,String);p.enter().append("g").attr("class",(function(e){return f+" "+e})).each((function(e){var t=o[e]=r.select(this);switch(e){case"frontplot":i||t.append("g").classed("barlayer",!0),t.append("g").classed("scatterlayer",!0);break;case"backplot":t.append("g").classed("maplayer",!0);break;case"plotbg":o.bg=t.append("path");break;case"radial-grid":case"angular-grid":t.style("fill","none");break;case"radial-line":t.append("line").style("fill","none");break;case"angular-line":t.append("path").style("fill","none")}})),p.order()},B.updateLayout=function(e,t){var n=this,r=n.layers,i=e._size,o=n.getRadial(t),a=n.getAngular(t),s=t.domain.x,h=t.domain.y;n.xOffset=i.l+i.w*s[0],n.yOffset=i.t+i.h*(1-h[1]);var d=n.xLength=i.w*(s[1]-s[0]),f=n.yLength=i.h*(h[1]-h[0]),p=n.getSector(t);n.sectorInRad=p.map(N);var g,m,v,y,b,_=n.sectorBBox=function(e){var t,n=e[0],r=e[1]-n,i=P(n,360),o=i+r,a=Math.cos(N(i)),s=Math.sin(N(i)),l=Math.cos(N(o)),c=Math.sin(N(o));return t=i<=90&&o>=90||i>90&&o>=450?1:s<=0&&c<=0?0:Math.max(s,c),[i<=180&&o>=180||i>180&&o>=540?-1:a>=0&&l>=0?0:Math.min(a,l),i<=270&&o>=270||i>270&&o>=630?-1:s>=0&&c>=0?0:Math.min(s,c),o>=360?1:a<=0&&l<=0?0:Math.max(a,l),t]}(p),x=_[2]-_[0],w=_[3]-_[1],A=f/d,k=Math.abs(w/x);A>k?(g=d,b=(f-(m=d*k))/i.h/2,v=[s[0],s[1]],y=[h[0]+b,h[1]-b]):(m=f,b=(d-(g=f/k))/i.w/2,v=[s[0]+b,s[1]-b],y=[h[0],h[1]]),n.xLength2=g,n.yLength2=m,n.xDomain2=v,n.yDomain2=y;var T,S=n.xOffset2=i.l+i.w*v[0],E=n.yOffset2=i.t+i.h*(1-y[1]),C=n.radius=g/x,M=n.innerRadius=n.getHole(t)*C,O=n.cx=S-C*_[0],L=n.cy=E+C*_[3],D=n.cxx=O-S,I=n.cyy=L-E,R=o.side;"counterclockwise"===R?(T=R,R="top"):"clockwise"===R&&(T=R,R="bottom"),n.radialAxis=n.mockAxis(e,t,o,{_id:"x",side:R,_trueSide:T,domain:[M/i.w,C/i.w]}),n.angularAxis=n.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),n.doAutoRange(e,t),n.updateAngularAxis(e,t),n.updateRadialAxis(e,t),n.updateRadialAxisTitle(e,t),n.xaxis=n.mockCartesianAxis(e,t,{_id:"x",domain:v}),n.yaxis=n.mockCartesianAxis(e,t,{_id:"y",domain:y});var z=n.pathSubplot();n.clipPaths.forTraces.select("path").attr("d",z).attr("transform",l(D,I)),r.frontplot.attr("transform",l(S,E)).call(u.setClipUrl,n._hasClipOnAxisFalse?null:n.clipIds.forTraces,n.gd),r.bg.attr("d",z).attr("transform",l(O,L)).call(c.fill,t.bgcolor)},B.mockAxis=function(e,t,n,r){var i=a.extendFlat({},n,r);return p(i,t,e),i},B.mockCartesianAxis=function(e,t,n){var r=this,i=r.isSmith,o=n._id,s=a.extendFlat({type:"linear"},n);f(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=r.sectorBBox,n=l[o],i=r.radialAxis._rl,a=(i[1]-i[0])/(1-r.getHole(t));s.range=[e[n[0]]*a,e[n[1]]*a]},s.isPtWithinRange="x"!==o||i?function(){return!0}:function(e){return r.isPtInside(e)},s.setRange(),s.setScale(),s},B.doAutoRange=function(e,t){var n=this,r=n.gd,i=n.radialAxis,o=n.getRadial(t);g(r,i);var a=i.range;o.range=a.slice(),o._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")]},B.updateRadialAxis=function(e,t){var n=this,r=n.gd,i=n.layers,o=n.radius,u=n.innerRadius,h=n.cx,f=n.cy,p=n.getRadial(t),g=P(n.getSector(t)[0],360),m=n.radialAxis,v=u<o,y=n.isSmith;y||(n.fillViewInitialKey("radialaxis.angle",p.angle),n.fillViewInitialKey("radialaxis.range",m.range.slice()),m.setGeometry()),"auto"===m.tickangle&&g>90&&g<=270&&(m.tickangle=180);var b=y?function(e){var t=I(n,O([e.x,0]));return l(t[0]-h,t[1]-f)}:function(e){return l(m.l2p(e.x)+u,0)},_=y?function(e){return D(n,e.x,-1/0,1/0)}:function(e){return n.pathArc(m.r2p(e.x)+u)},x=j(p);if(n.radialTickLayout!==x&&(i["radial-axis"].selectAll(".xtick").remove(),n.radialTickLayout=x),v){m.setScale();var w=0,A=y?(m.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return d.tickText(m,e,!0,!1)})):d.calcTicks(m),k=y?A:d.clipEnds(m,A),T=d.getTickSigns(m)[2];y&&(("top"===m.ticks&&"bottom"===m.side||"bottom"===m.ticks&&"top"===m.side)&&(T=-T),"top"===m.ticks&&"top"===m.side&&(w=-m.ticklen),"bottom"===m.ticks&&"bottom"===m.side&&(w=m.ticklen)),d.drawTicks(r,m,{vals:A,layer:i["radial-axis"],path:d.makeTickPath(m,0,T),transFn:b,crisp:!1}),d.drawGrid(r,m,{vals:k,layer:i["radial-grid"],path:_,transFn:a.noop,crisp:!1}),d.drawLabels(r,m,{vals:A,layer:i["radial-axis"],transFn:b,labelFns:d.makeLabelFns(m,w)})}var S=n.radialAxisAngle=n.vangles?z(U(N(p.angle),n.vangles)):p.angle,E=l(h,f),C=E+s(-S);V(i["radial-axis"],v&&(p.showticklabels||p.ticks),{transform:C}),V(i["radial-grid"],v&&p.showgrid,{transform:y?"":E}),V(i["radial-line"].select("line"),v&&p.showline,{x1:y?-o:u,y1:0,x2:o,y2:0,transform:C}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},B.updateRadialAxisTitle=function(e,t,n){if(!this.isSmith){var r=this,i=r.gd,o=r.radius,a=r.cx,s=r.cy,l=r.getRadial(t),c=r.id+"title",h=0;if(l.title){var d=u.bBox(r.layers["radial-axis"].node()).height,f=l.title.font.size,p=l.side;h="top"===p?f:"counterclockwise"===p?-(d+.4*f):d+.8*f}var g=void 0!==n?n:r.radialAxisAngle,m=N(g),v=Math.cos(m),y=Math.sin(m),_=a+o/2*v+h*y,x=s-o/2*y+h*v;r.layers["radial-axis-title"]=b.draw(i,c,{propContainer:l,propName:r.id+".radialaxis.title",placeholder:R(i,"Click to enter radial axis title"),attributes:{x:_,y:x,"text-anchor":"middle"},transform:{rotate:-g}})}},B.updateAngularAxis=function(e,t){var n=this,r=n.gd,i=n.layers,o=n.radius,u=n.innerRadius,h=n.cx,f=n.cy,p=n.getAngular(t),g=n.angularAxis,m=n.isSmith;m||(n.fillViewInitialKey("angularaxis.rotation",p.rotation),g.setGeometry(),g.setScale());var v=m?function(e){var t=I(n,O([0,e.x]));return Math.atan2(t[0]-h,t[1]-f)-Math.PI/2}:function(e){return g.t2g(e.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=z(g.tick0),g.dtick=z(g.dtick));var y=function(e){return l(h+o*Math.cos(e),f-o*Math.sin(e))},b=m?function(e){var t=I(n,O([0,e.x]));return l(t[0],t[1])}:function(e){return y(v(e))},_=m?function(e){var t=I(n,O([0,e.x])),r=Math.atan2(t[0]-h,t[1]-f)-Math.PI/2;return l(t[0],t[1])+s(-z(r))}:function(e){var t=v(e);return y(t)+s(-z(t))},x=m?function(e){return L(n,e.x,0,1/0)}:function(e){var t=v(e),n=Math.cos(t),r=Math.sin(t);return"M"+[h+u*n,f-u*r]+"L"+[h+o*n,f-o*r]},w=d.makeLabelFns(g,0).labelStandoff,A={xFn:function(e){var t=v(e);return Math.cos(t)*w},yFn:function(e){var t=v(e),n=Math.sin(t)>0?.2:1;return-Math.sin(t)*(w+e.fontSize*n)+Math.abs(Math.cos(t))*(e.fontSize*S)},anchorFn:function(e){var t=v(e),n=Math.cos(t);return Math.abs(n)<.1?"middle":n>0?"start":"end"},heightFn:function(e,t,n){var r=v(e);return-.5*(1+Math.sin(r))*n}},k=j(p);n.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+g._id+"tick").remove(),n.angularTickLayout=k);var T,E=m?[1/0].concat(g.tickvals||[]).map((function(e){return d.tickText(g,e,!0,!1)})):d.calcTicks(g);if(m&&(E[0].text="",E[0].fontSize*=1.75),"linear"===t.gridshape?(T=E.map(v),a.angleDelta(T[0],T[1])<0&&(T=T.slice().reverse())):T=null,n.vangles=T,"category"===g.type&&(E=E.filter((function(e){return a.isAngleInsideSector(v(e),n.sectorInRad)}))),g.visible){var C="inside"===g.ticks?-1:1,M=(g.linewidth||1)/2;d.drawTicks(r,g,{vals:E,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*g.ticklen,transFn:_,crisp:!1}),d.drawGrid(r,g,{vals:E,layer:i["angular-grid"],path:x,transFn:a.noop,crisp:!1}),d.drawLabels(r,g,{vals:E,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:A})}V(i["angular-line"].select("path"),p.showline,{d:n.pathSubplot(),transform:l(h,f)}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},B.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},B.updateHoverAndMainDrag=function(e){var t,n,s=this,c=s.isSmith,u=s.gd,h=s.layers,d=e._zoomlayer,f=E.MINZOOM,p=E.OFFEDGE,g=s.radius,b=s.innerRadius,A=s.cx,k=s.cy,T=s.cxx,S=s.cyy,M=s.sectorInRad,O=s.vangles,L=s.radialAxis,D=C.clampTiny,I=C.findXYatLength,R=C.findEnclosingVertexAngles,P=E.cornerHalfWidth,N=E.cornerLen/2,z=m.makeDragger(h,"path","maindrag","crosshair");r.select(z).attr("d",s.pathSubplot()).attr("transform",l(A,k)),z.onmousemove=function(e){y.hover(u,e,s.id),u._fullLayout._lasthover=z,u._fullLayout._hoversubplot=s.id},z.onmouseout=function(e){u._dragging||v.unhover(u,e)};var F,B,j,U,V,q,H,$,W,G={element:z,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function Y(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Y(e-T,t-S)}function Z(e,t){return Math.atan2(S-t,e-T)}function K(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return s.pathSector(2*P);var n=N/e,r=t-n,i=t+n,o=Math.max(0,Math.min(e,g)),a=o-P,l=o+P;return"M"+K(a,r)+"A"+[a,a]+" 0,0,0 "+K(a,i)+"L"+K(l,i)+"A"+[l,l]+" 0,0,1 "+K(l,r)+"Z"}function Q(e,t,n){if(0===e)return s.pathSector(2*P);var r,i,o=K(e,t),a=K(e,n),l=D((o[0]+a[0])/2),c=D((o[1]+a[1])/2);if(l&&c){var u=c/l,h=-1/u,d=I(P,u,l,c);r=I(N,h,d[0][0],d[0][1]),i=I(N,h,d[1][0],d[1][1])}else{var f,p;c?(f=N,p=P):(f=P,p=N),r=[[l-f,c-p],[l+f,c-p]],i=[[l-f,c+p],[l+f,c+p]]}return"M"+r.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,g),b),e<p?e=0:g-e<p?e=g:t<p?t=0:g-t<p&&(t=g),Math.abs(t-e)>f?(e<t?(j=e,U=t):(j=t,U=e),!0):(j=null,U=null,!1)}function te(e,t){e=e||V,t=t||"M0,0Z",$.attr("d",e),W.attr("d",t),m.transitionZoombox($,W,q,H),q=!0;var n={};ae(n),u.emit("plotly_relayouting",n)}function ne(e,r){var i,o,a=F+(e*=t),l=B+(r*=n),c=X(F,B),u=Math.min(X(a,l),g),h=Z(F,B);ee(c,u)&&(i=V+s.pathSector(U),j&&(i+=s.pathSector(j)),o=J(j,h)+J(U,h)),te(i,o)}function re(e,t,n,r){var i=C.findIntersectionXY(n,r,n,[e-T,S-t]);return Y(i[0],i[1])}function ie(e,t){var n,r,i=F+e,o=B+t,a=Z(F,B),l=Z(i,o),c=R(a,O),u=R(l,O);ee(re(F,B,c[0],c[1]),Math.min(re(i,o,u[0],u[1]),g))&&(n=V+s.pathSector(U),j&&(n+=s.pathSector(j)),r=[Q(j,c[0],c[1]),Q(U,c[0],c[1])].join(" ")),te(n,r)}function oe(){if(m.removeZoombox(u),null!==j&&null!==U){var e={};ae(e),m.showDoubleClickNotifier(u),o.call("_guiRelayout",u,e)}}function ae(e){var t=L._rl,n=(t[1]-t[0])/(1-b/g)/g,r=[t[0]+(j-b)*n,t[0]+(U-b)*n];e[s.id+".radialaxis.range"]=r}function se(e,t){var n=u._fullLayout.clickmode;if(m.removeZoombox(u),2===e){var r={};for(var i in s.viewInitial)r[s.id+"."+i]=s.viewInitial[i];u.emit("plotly_doubleclick",null),o.call("_guiRelayout",u,r)}n.indexOf("select")>-1&&1===e&&x(t,u,[s.xaxis],[s.yaxis],s.id,G),n.indexOf("event")>-1&&y.click(u,t,s.id)}G.prepFn=function(e,r,o){var l=u._fullLayout.dragmode,h=z.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var f=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,n=u._fullLayout._invScaleY;var p=a.apply3DTransform(f)(r-h.left,o-h.top);if(F=p[0],B=p[1],O){var v=C.findPolygonOffset(g,M[0],M[1],O);F+=T+v[0],B+=S+v[1]}switch(l){case"zoom":G.clickFn=se,c||(G.moveFn=O?ie:ne,G.doneFn=oe,function(){j=null,U=null,V=s.pathSubplot(),q=!1;var e=u._fullLayout[s.id];H=i(e.bgcolor).getLuminance(),($=m.makeZoombox(d,H,A,k,V)).attr("fill-rule","evenodd"),W=m.makeCorners(d,A,k),w(u)}());break;case"select":case"lasso":_(e,r,o,G,l)}},v.init(G)},B.updateRadialDrag=function(e,t,n){var i=this,c=i.gd,u=i.layers,h=i.radius,d=i.innerRadius,f=i.cx,p=i.cy,g=i.radialAxis,y=E.radialDragBoxSize,b=y/2;if(g.visible){var _,x,A,S=N(i.radialAxisAngle),C=g._rl,M=C[0],O=C[1],L=C[n],D=.75*(C[1]-C[0])/(1-i.getHole(t))/h;n?(_=f+(h+b)*Math.cos(S),x=p-(h+b)*Math.sin(S),A="radialdrag"):(_=f+(d-b)*Math.cos(S),x=p-(d-b)*Math.sin(S),A="radialdrag-inner");var I,R,P,F=m.makeRectDragger(u,A,"crosshair",-b,-b,y,y),B={element:F,gd:c};V(r.select(F),g.visible&&d<h,{transform:l(_,x)}),B.prepFn=function(){I=null,R=null,P=null,B.moveFn=j,B.doneFn=q,w(c)},B.clampFn=function(e,t){return Math.sqrt(e*e+t*t)<E.MINDRAG&&(e=0,t=0),[e,t]},v.init(B)}function j(e,t){if(I)I(e,t);else{var r=[e,-t],o=[Math.cos(S),Math.sin(S)],s=Math.abs(a.dot(r,o)/Math.sqrt(a.dot(r,r)));isNaN(s)||(I=s<.5?H:$)}var l={};(function(e){null!==R?e[i.id+".radialaxis.angle"]=R:null!==P&&(e[i.id+".radialaxis.range["+n+"]"]=P)})(l),c.emit("plotly_relayouting",l)}function q(){null!==R?o.call("_guiRelayout",c,i.id+".radialaxis.angle",R):null!==P&&o.call("_guiRelayout",c,i.id+".radialaxis.range["+n+"]",P)}function H(e,t){if(0!==n){var r=_+e,o=x+t;R=Math.atan2(p-o,r-f),i.vangles&&(R=U(R,i.vangles)),R=z(R);var a=l(f,p)+s(-R);u["radial-axis"].attr("transform",a),u["radial-line"].select("line").attr("transform",a);var c=i.gd._fullLayout,h=c[i.id];i.updateRadialAxisTitle(c,h,R)}}function $(e,t){var r=a.dot([e,-t],[Math.cos(S),Math.sin(S)]);if(P=L-D*r,D>0==(n?P>M:P<O)){var s=c._fullLayout,l=s[i.id];g.range[n]=P,g._rl[n]=P,i.updateRadialAxis(s,l),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale();var u=!1;for(var h in i.traceHash){var d=i.traceHash[h],f=a.filterVisible(d);d[0][0].trace._module.plot(c,i,f,l),o.traceIs(h,"gl")&&f.length&&(u=!0)}u&&(k(c),T(c))}else P=null}},B.updateAngularDrag=function(e){var t=this,n=t.gd,i=t.layers,c=t.radius,h=t.angularAxis,d=t.cx,f=t.cy,p=t.cxx,g=t.cyy,y=E.angularDragBoxSize,b=m.makeDragger(i,"path","angulardrag","move"),_={element:b,gd:n};function x(e,t){return Math.atan2(g+y-t,e-p-y)}r.select(b).attr("d",t.pathAnnulus(c,c+y)).attr("transform",l(d,f)).call(A,"move");var S,C,M,O,L,D,I=i.frontplot.select(".scatterlayer").selectAll(".trace"),R=I.selectAll(".point"),P=I.selectAll(".textpoint");function N(c,m){var v=t.gd._fullLayout,y=v[t.id],b=x(S+c*e._invScaleX,C+m*e._invScaleY),_=z(b-D);if(O=M+_,i.frontplot.attr("transform",l(t.xOffset2,t.yOffset2)+s([-_,p,g])),t.vangles){L=t.radialAxisAngle+_;var w=l(d,f)+s(-_),A=l(d,f)+s(-L);i.bg.attr("transform",w),i["radial-grid"].attr("transform",w),i["radial-axis"].attr("transform",A),i["radial-line"].select("line").attr("transform",A),t.updateRadialAxisTitle(v,y,L)}else t.clipPaths.forTraces.select("path").attr("transform",l(p,g)+s(_));R.each((function(){var e=r.select(this),t=u.getTranslate(e);e.attr("transform",l(t.x,t.y)+s([_]))})),P.each((function(){var e=r.select(this),t=e.select("text"),n=u.getTranslate(e);e.attr("transform",s([_,t.attr("x"),t.attr("y")])+l(n.x,n.y))})),h.rotation=a.modHalf(O,360),t.updateAngularAxis(v,y),t._hasClipOnAxisFalse&&!a.isFullCircle(t.sectorInRad)&&I.call(u.hideOutsideRangePoints,t);var E=!1;for(var N in t.traceHash)if(o.traceIs(N,"gl")){var B=t.traceHash[N],j=a.filterVisible(B);B[0][0].trace._module.plot(n,t,j,y),j.length&&(E=!0)}E&&(k(n),T(n));var U={};F(U),n.emit("plotly_relayouting",U)}function F(e){e[t.id+".angularaxis.rotation"]=O,t.vangles&&(e[t.id+".radialaxis.angle"]=L)}function B(){P.select("text").attr("transform",null);var e={};F(e),o.call("_guiRelayout",n,e)}_.prepFn=function(r,i,o){var s=e[t.id];M=s.angularaxis.rotation;var l=b.getBoundingClientRect();S=i-l.left,C=o-l.top,n._fullLayout._calcInverseTransform(n);var c=a.apply3DTransform(e._invTransform)(S,C);S=c[0],C=c[1],D=x(S,C),_.moveFn=N,_.doneFn=B,w(n)},t.vangles&&!a.isFullCircle(t.sectorInRad)&&(_.prepFn=a.noop,A(r.select(b),null)),v.init(_)},B.isPtInside=function(e){if(this.isSmith)return!0;var t=this.sectorInRad,n=this.vangles,r=this.angularAxis.c2g(e.theta),i=this.radialAxis,o=i.c2l(e.r),s=i._rl;return(n?C.isPtInsidePolygon:a.isPtInsideSector)(o,r,s,t,n)},B.pathArc=function(e){var t=this.sectorInRad,n=this.vangles;return(n?C.pathPolygon:a.pathArc)(e,t[0],t[1],n)},B.pathSector=function(e){var t=this.sectorInRad,n=this.vangles;return(n?C.pathPolygon:a.pathSector)(e,t[0],t[1],n)},B.pathAnnulus=function(e,t){var n=this.sectorInRad,r=this.vangles;return(r?C.pathPolygonAnnulus:a.pathAnnulus)(e,t,n[0],n[1],r)},B.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)},B.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../constants/alignment":471,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/setcursor":524,"../../plot_api/subroutines":544,"../../plots/cartesian/axes":554,"../../registry":638,"../cartesian/autorange":553,"../cartesian/dragbox":563,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"../smith/helpers":628,"./constants":620,"./helpers":621,"./set_convert":626,"@plotly/d3":58,tinycolor2:312}],626:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../cartesian/set_convert"),o=r.deg2rad,a=r.rad2deg;function s(e,t){var n=e.type;if("linear"===n){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?o(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?a(e):e}(e,t))}}e.makeCalcdata=function(t,i){var o,a,s=t[i],l=t._length,c=function(n){return e.d2c(n,t.thetaunit)};if(s){if(r.isTypedArray(s)&&"linear"===n){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(o=new Array(l),a=0;a<l;a++)o[a]=c(s[a])}else{var u=i+"0",h="d"+i,d=u in t?c(t[u]):0,f=t[h]?c(t[h]):(e.period||2*Math.PI)/l;for(o=new Array(l),a=0;a<l;a++)o[a]=d+a*f}return o},e.setGeometry=function(){var i,s,l,c,u=t.sector,h=u.map(o),d={clockwise:-1,counterclockwise:1}[e.direction],f=o(e.rotation),p=function(e){return d*e+f},g=function(e){return(e-f)/d};switch(n){case"linear":s=i=r.identity,c=o,l=a,e.range=r.isFullCircle(h)?[u[0],u[0]+360]:h.map(g).map(a);break;case"category":var m=e._categories.length,v=e.period?Math.max(e.period,m):m;0===v&&(v=1),s=c=function(e){return 2*e*Math.PI/v},i=l=function(e){return e*v/Math.PI/2},e.range=[0,v]}e.c2g=function(e){return p(s(e))},e.g2c=function(e){return i(g(e))},e.t2g=function(e){return p(c(e))},e.g2t=function(e){return l(g(e))}}}t.exports=function(e,t,n){switch(i(e,n),e._id){case"x":case"radialaxis":!function(e,t){var n=t._subplot;e.setGeometry=function(){var t=e._rl[0],r=e._rl[1],i=n.innerRadius,o=(n.radius-i)/(r-t),a=i/o,s=t>r?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(n){var r=e.c2l(n)-t;return(s(r)?r:0)+a},e.g2c=function(n){return e.l2c(n+t-a)},e.g2p=function(e){return e*o},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":s(e,t)}}},{"../../lib":503,"../cartesian/set_convert":576}],627:[function(e,t,n){"use strict";t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},{}],628:[function(e,t,n){"use strict";function r(e){return e<0?-1:e>0?1:0}function i(e){var t=e[0],n=e[1];if(!isFinite(t)||!isFinite(n))return[1,0];var r=(t+1)*(t+1)+n*n;return[(t*t+n*n-1)/r,2*n/r]}function o(e,t){var n=t[0],r=t[1];return[n*e.radius+e.cx,-r*e.radius+e.cy]}function a(e,t){return t*e.radius}t.exports={smith:i,reactanceArc:function(e,t,n,r){var s=o(e,i([n,t])),l=s[0],c=s[1],u=o(e,i([r,t])),h=u[0],d=u[1];if(0===t)return["M"+l+","+c,"L"+h+","+d].join(" ");var f=a(e,1/Math.abs(t));return["M"+l+","+c,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+h+","+d].join(" ")},resistanceArc:function(e,t,n,s){var l=a(e,1/(t+1)),c=o(e,i([t,n])),u=c[0],h=c[1],d=o(e,i([t,s])),f=d[0],p=d[1];if(r(n)!==r(s)){var g=o(e,i([t,0]));return["M"+u+","+h,"A"+l+","+l+" 0 0,"+(0<n?0:1)+" "+g[0]+","+g[1],"A"+l+","+l+" 0 0,"+(s<0?0:1)+f+","+p].join(" ")}return["M"+u+","+h,"A"+l+","+l+" 0 0,"+(s<n?0:1)+" "+f+","+p].join(" ")},smithTransform:o}},{}],629:[function(e,t,n){"use strict";var r=e("../get_data").getSubplotCalcData,i=e("../../lib").counterRegex,o=e("../polar/polar"),a=e("./constants"),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,i=t._subplots[l],a=0;a<i.length;a++){var s=i[a],c=r(n,l,s),u=t[s]._subplot;u||(u=o(e,s,!0),t[s]._subplot=u),u.plot(c,t,e._promises)}},clean:function(e,t,n,r){for(var i=r._subplots[l]||[],o=0;o<i.length;o++){var a=i[o],s=r[a]._subplot;if(!t[a]&&s)for(var c in s.framework.remove(),s.clipPaths)s.clipPaths[c].remove()}},toSVG:e("../cartesian").toSVG}},{"../../lib":503,"../cartesian":568,"../get_data":593,"../polar/polar":625,"./constants":627,"./layout_attributes":630,"./layout_defaults":631}],630:[function(e,t,n){"use strict";var r=e("../../components/color/attributes"),i=e("../cartesian/layout_attributes"),o=e("../domain").attributes,a=e("../../lib").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},"plot","from-root"),c=s({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},"plot","from-root"),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},l,c),h=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:i.ticks,editType:"calc"},l,c);t.exports={domain:o({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:u,imaginaryaxis:h,editType:"calc"}},{"../../components/color/attributes":365,"../../lib":503,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],631:[function(e,t,n){"use strict";var r,i,o,a=e("../../lib"),s=e("../../components/color"),l=e("../../plot_api/plot_template"),c=e("../subplot_defaults"),u=e("../get_data").getSubplotData,h=e("../cartesian/prefix_suffix_defaults"),d=e("../cartesian/tick_label_defaults"),f=e("../cartesian/line_grid_defaults"),p=e("../cartesian/set_convert"),g=e("./layout_attributes"),m=e("./constants"),v=m.axisNames,y=(r=function(e){return e.slice().reverse().map((function(e){return-e})).concat([0]).concat(e)},i=String,o={},function(e){var t=i?i(e):e;if(t in o)return o[t];var n=r(e);return o[t]=n,n});function b(e,t,n,r){var i=n("bgcolor");r.bgColor=s.combine(i,r.paper_bgcolor);var o,c=u(r.fullData,m.name,r.id),b=r.layoutOut;function _(e,t){return n(o+"."+e,t)}for(var x=0;x<v.length;x++){o=v[x],a.isPlainObject(e[o])||(e[o]={});var w=e[o],A=l.newContainer(t,o);A._id=A._name=o,A._attr=r.id+"."+o,A._traceIndices=c.map((function(e){return e._expandedIndex}));var k=_("visible");if(A.type="linear",p(A,b),h(w,A,_,A.type),k){var T,S,E,C,M="realaxis"===o;M&&_("side"),M?_("tickvals"):_("tickvals",y(t.realaxis.tickvals||g.realaxis.tickvals.dflt));var O=r.font||{};k&&(S=(T=_("color"))===w.color?T:O.color,E=O.size,C=O.family),d(w,A,_,A.type,{noTicklabelstep:!0,noAng:!M,noExp:!0,font:{color:S,size:E,family:C}}),a.coerce2(e,t,g,o+".ticklen"),a.coerce2(e,t,g,o+".tickwidth"),a.coerce2(e,t,g,o+".tickcolor",t.color),_("ticks")||(delete t[o].ticklen,delete t[o].tickwidth,delete t[o].tickcolor),f(w,A,_,{dfltColor:T,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[o]}),_("layer")}_("hoverformat"),delete A.type,A._input=w}}t.exports=function(e,t,n){c(e,t,n,{noUirevision:!0,type:m.name,attributes:g,handleDefaults:b,font:t.font,paper_bgcolor:t.paper_bgcolor,fullData:n,layoutOut:t})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/set_convert":576,"../cartesian/tick_label_defaults":578,"../get_data":593,"../subplot_defaults":632,"./constants":627,"./layout_attributes":630}],632:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plot_api/plot_template"),o=e("./domain").defaults;t.exports=function(e,t,n,a){var s,l,c=a.type,u=a.attributes,h=a.handleDefaults,d=a.partition||"x",f=t._subplots[c],p=f.length,g=p&&f[0].replace(/\d+$/,"");function m(e,t){return r.coerce(s,l,u,e,t)}for(var v=0;v<p;v++){var y=f[v];s=e[y]?e[y]:e[y]={},l=i.newContainer(t,y,g),a.noUirevision||m("uirevision",t.uirevision);var b={};b[d]=[v/p,(v+1)/p],o(l,t,m,b),a.id=y,h(s,l,m,a)}}},{"../lib":503,"../plot_api/plot_template":543,"./domain":584}],633:[function(e,t,n){"use strict";var r=e("../constants/docs");function i(e){var t=e.description?" "+e.description:"",n=e.keys||[];if(n.length>0){for(var r=[],i=0;i<n.length;i++)r[i]="`"+n[i]+"`";t+="Finally, the template string has access to ",t=1===n.length?"variable "+r[0]:"variables "+r.slice(0,-1).join(", ")+" and "+r.slice(-1)+"."}return t}r.FORMAT_LINK,r.DATE_FORMAT_LINK,n.hovertemplateAttrs=function(e,t){e=e||{},i(t=t||{});var n={valType:"string",dflt:"",editType:e.editType||"none"};return!1!==e.arrayOk&&(n.arrayOk=!0),n},n.texttemplateAttrs=function(e,t){e=e||{},i(t=t||{});var n={valType:"string",dflt:"",editType:e.editType||"calc"};return!1!==e.arrayOk&&(n.arrayOk=!0),n}},{"../constants/docs":474}],634:[function(e,t,n){"use strict";var r=e("./ternary"),i=e("../../plots/get_data").getSubplotCalcData,o=e("../../lib").counterRegex,a="ternary";n.name=a;var s=n.attr="subplot";n.idRoot=a,n.idRegex=n.attrRegex=o(a),(n.attributes={})[s]={valType:"subplotid",dflt:"ternary",editType:"calc"},n.layoutAttributes=e("./layout_attributes"),n.supplyLayoutDefaults=e("./layout_defaults"),n.plot=function(e){for(var t=e._fullLayout,n=e.calcdata,o=t._subplots.ternary,s=0;s<o.length;s++){var l=o[s],c=i(n,a,l),u=t[l]._subplot;u||(u=new r({id:l,graphDiv:e,container:t._ternarylayer.node()},t),t[l]._subplot=u),u.plot(c,t,e._promises)}},n.clean=function(e,t,n,r){for(var i=r._subplots.ternary||[],o=0;o<i.length;o++){var a=i[o],s=r[a]._subplot;!t[a]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers["a-title"].remove(),s.layers["b-title"].remove(),s.layers["c-title"].remove())}}},{"../../lib":503,"../../plots/get_data":593,"./layout_attributes":635,"./layout_defaults":636,"./ternary":637}],635:[function(e,t,n){"use strict";var r=e("../../components/color/attributes"),i=e("../domain").attributes,o=e("../cartesian/layout_attributes"),a=e("../../plot_api/edit_types").overrideAll,s=e("../../lib/extend").extendFlat,l={title:{text:o.title.text,font:o.title.font},color:o.color,tickmode:o.tickmode,nticks:s({},o.nticks,{dflt:6,min:1}),tick0:o.tick0,dtick:o.dtick,tickvals:o.tickvals,ticktext:o.ticktext,ticks:o.ticks,ticklen:o.ticklen,tickwidth:o.tickwidth,tickcolor:o.tickcolor,ticklabelstep:o.ticklabelstep,showticklabels:o.showticklabels,showtickprefix:o.showtickprefix,tickprefix:o.tickprefix,showticksuffix:o.showticksuffix,ticksuffix:o.ticksuffix,showexponent:o.showexponent,exponentformat:o.exponentformat,minexponent:o.minexponent,separatethousands:o.separatethousands,tickfont:o.tickfont,tickangle:o.tickangle,tickformat:o.tickformat,tickformatstops:o.tickformatstops,hoverformat:o.hoverformat,showline:s({},o.showline,{dflt:!0}),linecolor:o.linecolor,linewidth:o.linewidth,showgrid:s({},o.showgrid,{dflt:!0}),gridcolor:o.gridcolor,gridwidth:o.gridwidth,layer:o.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:o._deprecated.title,titlefont:o._deprecated.titlefont}},c=t.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},"plot","from-root");c.uirevision={valType:"any",editType:"none"},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plot_api/edit_types":536,"../cartesian/layout_attributes":569,"../domain":584}],636:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../../plot_api/plot_template"),o=e("../../lib"),a=e("../subplot_defaults"),s=e("../cartesian/tick_label_defaults"),l=e("../cartesian/prefix_suffix_defaults"),c=e("../cartesian/tick_mark_defaults"),u=e("../cartesian/tick_value_defaults"),h=e("../cartesian/line_grid_defaults"),d=e("./layout_attributes"),f=["aaxis","baxis","caxis"];function p(e,t,n,o){var a,s,l,c=n("bgcolor"),u=n("sum");o.bgColor=r.combine(c,o.paper_bgcolor);for(var h=0;h<f.length;h++)s=e[a=f[h]]||{},(l=i.newContainer(t,a))._name=a,g(s,l,o,t);var d=t.aaxis,p=t.baxis,m=t.caxis;d.min+p.min+m.min>=u&&(d.min=0,p.min=0,m.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function g(e,t,n,r){var i=d[t._name];function a(n,r){return o.coerce(e,t,i,n,r)}a("uirevision",r.uirevision),t.type="linear";var f=a("color"),p=f!==i.color.dflt?f:n.font.color,g=t._name.charAt(0).toUpperCase(),m="Component "+g,v=a("title.text",m);t._hovertitle=v===m?v:g,o.coerceFont(a,"title.font",{family:n.font.family,size:o.bigFont(n.font.size),color:p}),a("min"),u(e,t,a,"linear"),l(e,t,a,"linear"),s(e,t,a,"linear"),c(e,t,a,{outerTicks:!0}),a("showticklabels")&&(o.coerceFont(a,"tickfont",{family:n.font.family,size:n.font.size,color:p}),a("tickangle"),a("tickformat")),h(e,t,a,{dfltColor:f,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}t.exports=function(e,t,n){a(e,t,n,{type:"ternary",attributes:d,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../subplot_defaults":632,"./layout_attributes":635}],637:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("tinycolor2"),o=e("../../registry"),a=e("../../lib"),s=a.strTranslate,l=a._,c=e("../../components/color"),u=e("../../components/drawing"),h=e("../cartesian/set_convert"),d=e("../../lib/extend").extendFlat,f=e("../plots"),p=e("../cartesian/axes"),g=e("../../components/dragelement"),m=e("../../components/fx"),v=e("../../components/dragelement/helpers"),y=v.freeMode,b=v.rectMode,_=e("../../components/titles"),x=e("../cartesian/select").prepSelect,w=e("../cartesian/select").selectOnClick,A=e("../cartesian/select").clearSelect,k=e("../cartesian/select").clearSelectionsCache,T=e("../cartesian/constants");function S(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=S;var E=S.prototype;E.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},E.plot=function(e,t){var n=this,r=t[n.id],i=t._size;n._hasClipOnAxisFalse=!1;for(var o=0;o<e.length;o++)if(!1===e[o][0].trace.cliponaxis){n._hasClipOnAxisFalse=!0;break}n.updateLayers(r),n.adjustLayout(r,i),f.generalUpdatePerTraceModule(n.graphDiv,n,e,r),n.layers.plotbg.select("path").call(c.fill,r.bgcolor)},E.makeFramework=function(e){var t=this,n=t.graphDiv,r=e[t.id],i=t.clipId="clip"+t.layoutId+t.id,o=t.clipIdRelative="clip-relative"+t.layoutId+t.id;t.clipDef=a.ensureSingleById(e._clips,"clipPath",i,(function(e){e.append("path").attr("d","M0,0Z")})),t.clipDefRelative=a.ensureSingleById(e._clips,"clipPath",o,(function(e){e.append("path").attr("d","M0,0Z")})),t.plotContainer=a.ensureSingle(t.container,"g",t.id),t.updateLayers(r),u.setClipUrl(t.layers.backplot,i,n),u.setClipUrl(t.layers.grids,i,n)},E.updateLayers=function(e){var t=this.layers,n=["draglayer","plotbg","backplot","grids"];"below traces"===e.aaxis.layer&&n.push("aaxis","aline"),"below traces"===e.baxis.layer&&n.push("baxis","bline"),"below traces"===e.caxis.layer&&n.push("caxis","cline"),n.push("frontplot"),"above traces"===e.aaxis.layer&&n.push("aaxis","aline"),"above traces"===e.baxis.layer&&n.push("baxis","bline"),"above traces"===e.caxis.layer&&n.push("caxis","cline");var i=this.plotContainer.selectAll("g.toplevel").data(n,String),o=["agrid","bgrid","cgrid"];i.enter().append("g").attr("class",(function(e){return"toplevel "+e})).each((function(e){var n=r.select(this);t[e]=n,"frontplot"===e?n.append("g").classed("scatterlayer",!0):"backplot"===e?n.append("g").classed("maplayer",!0):"plotbg"===e?n.append("path").attr("d","M0,0Z"):"aline"===e||"bline"===e||"cline"===e?n.append("path"):"grids"===e&&o.forEach((function(e){t[e]=n.append("g").classed("grid "+e,!0)}))})),i.order()};var C=Math.sqrt(4/3);E.adjustLayout=function(e,t){var n,r,i,o,a,l,f=this,p=e.domain,g=(p.x[0]+p.x[1])/2,m=(p.y[0]+p.y[1])/2,v=p.x[1]-p.x[0],y=p.y[1]-p.y[0],b=v*t.w,_=y*t.h,x=e.sum,w=e.aaxis.min,A=e.baxis.min,k=e.caxis.min;b>C*_?i=(o=_)*C:o=(i=b)/C,a=v*i/b,l=y*o/_,n=t.l+t.w*g-i/2,r=t.t+t.h*(1-m)-o/2,f.x0=n,f.y0=r,f.w=i,f.h=o,f.sum=x,f.xaxis={type:"linear",range:[w+2*k-x,x-w-2*A],domain:[g-a/2,g+a/2],_id:"x"},h(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[w,x-A-k],domain:[m-l/2,m+l/2],_id:"y"},h(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var T=f.yaxis.domain[0],S=f.aaxis=d({},e.aaxis,{range:[w,x-A-k],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+l*C],anchor:"free",position:0,_id:"y",_length:i});h(S,f.graphDiv._fullLayout),S.setScale();var E=f.baxis=d({},e.baxis,{range:[x-w-k,A],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});h(E,f.graphDiv._fullLayout),E.setScale();var M=f.caxis=d({},e.caxis,{range:[x-w-A,k],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+l*C],anchor:"free",position:0,_id:"y",_length:i});h(M,f.graphDiv._fullLayout),M.setScale();var O="M"+n+","+(r+o)+"h"+i+"l-"+i/2+",-"+o+"Z";f.clipDef.select("path").attr("d",O),f.layers.plotbg.select("path").attr("d",O);var L="M0,"+o+"h"+i+"l-"+i/2+",-"+o+"Z";f.clipDefRelative.select("path").attr("d",L);var D=s(n,r);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",D),f.clipDefRelative.select("path").attr("transform",null);var I=s(n-E._offset,r+o);f.layers.baxis.attr("transform",I),f.layers.bgrid.attr("transform",I);var R=s(n+i/2,r)+"rotate(30)"+s(0,-S._offset);f.layers.aaxis.attr("transform",R),f.layers.agrid.attr("transform",R);var P=s(n+i/2,r)+"rotate(-30)"+s(0,-M._offset);f.layers.caxis.attr("transform",P),f.layers.cgrid.attr("transform",P),f.drawAxes(!0),f.layers.aline.select("path").attr("d",S.showline?"M"+n+","+(r+o)+"l"+i/2+",-"+o:"M0,0").call(c.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",E.showline?"M"+n+","+(r+o)+"h"+i:"M0,0").call(c.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",M.showline?"M"+(n+i/2)+","+r+"l"+i/2+","+o:"M0,0").call(c.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),u.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},E.drawAxes=function(e){var t=this,n=t.graphDiv,r=t.id.substr(7)+"title",i=t.layers,o=t.aaxis,a=t.baxis,s=t.caxis;if(t.drawAx(o),t.drawAx(a),t.drawAx(s),e){var c=Math.max(o.showticklabels?o.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),u=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=_.draw(n,"a"+r,{propContainer:o,propName:t.id+".aaxis.title",placeholder:l(n,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-o.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=_.draw(n,"b"+r,{propContainer:a,propName:t.id+".baxis.title",placeholder:l(n,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*a.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=_.draw(n,"c"+r,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(n,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*s.title.font.size+u,"text-anchor":"middle"}})}},E.drawAx=function(e){var t,n=this,r=n.graphDiv,i=e._name,o=i.charAt(0),s=e._id,l=n.layers[i],c=o+"tickLayout",u=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);n[c]!==u&&(l.selectAll("."+s+"tick").remove(),n[c]=u),e.setScale();var h=p.calcTicks(e),d=p.clipEnds(e,h),f=p.makeTransTickFn(e),g=p.getTickSigns(e)[2],m=a.deg2rad(30),v=g*(e.linewidth||1)/2,y=g*e.ticklen,b=n.w,_=n.h,x="b"===o?"M0,"+v+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+v+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,w={a:"M0,0l"+_+",-"+b/2,b:"M0,0l-"+b/2+",-"+_,c:"M0,0l-"+_+","+b/2}[o];p.drawTicks(r,e,{vals:"inside"===e.ticks?d:h,layer:l,path:x,transFn:f,crisp:!1}),p.drawGrid(r,e,{vals:d,layer:n.layers[o+"grid"],path:w,transFn:f,crisp:!1}),p.drawLabels(r,e,{vals:h,layer:l,transFn:f,labelFns:p.makeLabelFns(e,0,30)})};var M=T.MINZOOM/2+.87,O="m-0.87,.5h"+M+"v3h-"+(M+5.2)+"l"+(M/2+2.6)+",-"+(.87*M+4.5)+"l2.6,1.5l-"+M/2+","+.87*M+"Z",L="m0.87,.5h-"+M+"v3h"+(M+5.2)+"l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-2.6,1.5l"+M/2+","+.87*M+"Z",D="m0,1l"+M/2+","+.87*M+"l2.6,-1.5l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-"+(M/2+2.6)+","+(.87*M+4.5)+"l2.6,1.5l"+M/2+",-"+.87*M+"Z",I=!0;function R(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}E.clearSelect=function(){k(this.dragOptions),A(this.dragOptions.gd)},E.initInteractions=function(){var e,t,n,r,h,d,f,p,v,_,A,k,S=this,E=S.layers.plotbg.select("path").node(),M=S.graphDiv,P=M._fullLayout._zoomlayer;function N(e){var t={};return t[S.id+".aaxis.min"]=e.a,t[S.id+".baxis.min"]=e.b,t[S.id+".caxis.min"]=e.c,t}function z(e,t){var n=M._fullLayout.clickmode;R(M),2===e&&(M.emit("plotly_doubleclick",null),o.call("_guiRelayout",M,N({a:0,b:0,c:0}))),n.indexOf("select")>-1&&1===e&&w(t,M,[S.xaxis],[S.yaxis],S.id,S.dragOptions),n.indexOf("event")>-1&&m.click(M,t,S.id)}function F(e,t){return 1-t/S.h}function B(e,t){return 1-(e+(S.h-t)/Math.sqrt(3))/S.w}function j(e,t){return(e-(S.h-t)/Math.sqrt(3))/S.w}function U(i,o){var a=n+i*e,s=r+o*t,l=Math.max(0,Math.min(1,F(0,r),F(0,s))),c=Math.max(0,Math.min(1,B(n,r),B(a,s))),u=Math.max(0,Math.min(1,j(n,r),j(a,s))),g=(l/2+u)*S.w,m=(1-l/2-c)*S.w,y=(g+m)/2,b=m-g,x=(1-l)*S.h,w=x-b/C;b<T.MINZOOM?(f=h,A.attr("d",v),k.attr("d","M0,0Z")):(f={a:h.a+l*d,b:h.b+c*d,c:h.c+u*d},A.attr("d",v+"M"+g+","+x+"H"+m+"L"+y+","+w+"L"+g+","+x+"Z"),k.attr("d","M"+n+","+r+"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM"+g+","+x+O+"M"+m+","+x+L+"M"+y+","+w+D)),_||(A.transition().style("fill",p>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),_=!0),M.emit("plotly_relayouting",N(f))}function V(){R(M),f!==h&&(o.call("_guiRelayout",M,N(f)),I&&M.data&&M._context.showTips&&(a.notifier(l(M,"Double-click to zoom back out"),"long"),I=!1))}function q(e,t){var n=e/S.xaxis._m,r=t/S.yaxis._m,i=[(f={a:h.a-r,b:h.b+(n+r)/2,c:h.c-(n-r)/2}).a,f.b,f.c].sort(a.sorterAsc),o=i.indexOf(f.a),l=i.indexOf(f.b),c=i.indexOf(f.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),f={a:i[o],b:i[l],c:i[c]},t=(h.a-f.a)*S.yaxis._m,e=(h.c-f.c-h.b+f.b)*S.xaxis._m);var d=s(S.x0+e,S.y0+t);S.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",d);var p=s(-e,-t);S.clipDefRelative.select("path").attr("transform",p),S.aaxis.range=[f.a,S.sum-f.b-f.c],S.baxis.range=[S.sum-f.a-f.c,f.b],S.caxis.range=[S.sum-f.a-f.b,f.c],S.drawAxes(!1),S._hasClipOnAxisFalse&&S.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,S),M.emit("plotly_relayouting",N(f))}function H(){o.call("_guiRelayout",M,N(f))}this.dragOptions={element:E,gd:M,plotinfo:{id:S.id,domain:M._fullLayout[S.id].domain,xaxis:S.xaxis,yaxis:S.yaxis},subplot:S.id,prepFn:function(o,l,u){S.dragOptions.xaxes=[S.xaxis],S.dragOptions.yaxes=[S.yaxis],e=M._fullLayout._invScaleX,t=M._fullLayout._invScaleY;var g=S.dragOptions.dragmode=M._fullLayout.dragmode;y(g)?S.dragOptions.minDrag=1:S.dragOptions.minDrag=void 0,"zoom"===g?(S.dragOptions.moveFn=U,S.dragOptions.clickFn=z,S.dragOptions.doneFn=V,function(e,t,o){var l=E.getBoundingClientRect();n=t-l.left,r=o-l.top,M._fullLayout._calcInverseTransform(M);var u=M._fullLayout._invTransform,g=a.apply3DTransform(u)(n,r);n=g[0],r=g[1],h={a:S.aaxis.range[0],b:S.baxis.range[1],c:S.caxis.range[1]},f=h,d=S.aaxis.range[1]-h.a,p=i(S.graphDiv._fullLayout[S.id].bgcolor).getLuminance(),v="M0,"+S.h+"L"+S.w/2+", 0L"+S.w+","+S.h+"Z",_=!1,A=P.append("path").attr("class","zoombox").attr("transform",s(S.x0,S.y0)).style({fill:p>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),k=P.append("path").attr("class","zoombox-corners").attr("transform",s(S.x0,S.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),S.clearSelect(M)}(0,l,u)):"pan"===g?(S.dragOptions.moveFn=q,S.dragOptions.clickFn=z,S.dragOptions.doneFn=H,h={a:S.aaxis.range[0],b:S.baxis.range[1],c:S.caxis.range[1]},f=h,S.clearSelect(M)):(b(g)||y(g))&&x(o,l,u,S.dragOptions,g)}},E.onmousemove=function(e){m.hover(M,e,S.id),M._fullLayout._lasthover=E,M._fullLayout._hoversubplot=S.id},E.onmouseout=function(e){M._dragging||g.unhover(M,e)},g.init(this.dragOptions)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../lib":503,"../../lib/extend":493,"../../registry":638,"../cartesian/axes":554,"../cartesian/constants":561,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"@plotly/d3":58,tinycolor2:312}],638:[function(e,t,n){"use strict";var r=e("./lib/loggers"),i=e("./lib/noop"),o=e("./lib/push_unique"),a=e("./lib/is_plain_object"),s=e("./lib/dom").addStyleRule,l=e("./lib/extend"),c=e("./plots/attributes"),u=e("./plots/layout_attributes"),h=l.extendFlat,d=l.extendDeepAll;function f(e){var t=e.name,i=e.categories,o=e.meta;if(n.modules[t])r.log("Type "+t+" already registered");else{n.subplotsRegistry[e.basePlotModule.name]||function(e){var t=e.name;if(n.subplotsRegistry[t])r.log("Plot type "+t+" already registered.");else for(var i in v(e),n.subplotsRegistry[t]=e,n.componentsRegistry)_(i,e.name)}(e.basePlotModule);for(var a={},l=0;l<i.length;l++)a[i[l]]=!0,n.allCategories[i[l]]=!0;for(var c in n.modules[t]={_module:e,categories:a},o&&Object.keys(o).length&&(n.modules[t].meta=o),n.allTypes.push(t),n.componentsRegistry)y(c,t);e.layoutAttributes&&h(n.traceLayoutAttributes,e.layoutAttributes);var u=e.basePlotModule,d=u.name;if("mapbox"===d){var f=u.constants.styleRules;for(var p in f)s(".js-plotly-plot .plotly .mapboxgl-"+p,f[p])}"geo"!==d&&"mapbox"!==d||void 0===typeof window||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function p(e){if("string"!=typeof e.name)throw new Error("Component module *name* must be a string.");var t=e.name;for(var r in n.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&o(n.layoutArrayContainers,t),v(e)),n.modules)y(t,r);for(var i in n.subplotsRegistry)_(t,i);for(var a in n.transformsRegistry)b(t,a);e.schema&&e.schema.layout&&d(u,e.schema.layout)}function g(e){if("string"!=typeof e.name)throw new Error("Transform module *name* must be a string.");var t="Transform module "+e.name,i="function"==typeof e.transform,o="function"==typeof e.calcTransform;if(!i&&!o)throw new Error(t+" is missing a *transform* or *calcTransform* method.");for(var s in i&&o&&r.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),a(e.attributes)||r.log(t+" registered without an *attributes* object."),"function"!=typeof e.supplyDefaults&&r.log(t+" registered without a *supplyDefaults* method."),n.transformsRegistry[e.name]=e,n.componentsRegistry)b(s,e.name)}function m(e){var t=e.name,r=t.split("-")[0],i=e.dictionary,o=e.format,a=i&&Object.keys(i).length,s=o&&Object.keys(o).length,l=n.localeRegistry,c=l[t];if(c||(l[t]=c={}),r!==t){var u=l[r];u||(l[r]=u={}),a&&u.dictionary===c.dictionary&&(u.dictionary=i),s&&u.format===c.format&&(u.format=o)}a&&(c.dictionary=i),s&&(c.format=o)}function v(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)o(n.layoutArrayRegexes,t[r])}}function y(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.traces){var i=r.traces[t];i&&d(n.modules[t]._module.attributes,i)}}function b(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.transforms){var i=r.transforms[t];i&&d(n.transformsRegistry[t].attributes,i)}}function _(e,t){var r=n.componentsRegistry[e].schema;if(r&&r.subplots){var i=n.subplotsRegistry[t],o=i.layoutAttributes,a="subplot"===i.attr?i.name:i.attr;Array.isArray(a)&&(a=a[0]);var s=r.subplots[a];o&&s&&d(o,s)}}function x(e){return"object"==typeof e&&(e=e.type),e}n.modules={},n.allCategories={},n.allTypes=[],n.subplotsRegistry={},n.transformsRegistry={},n.componentsRegistry={},n.layoutArrayContainers=[],n.layoutArrayRegexes=[],n.traceLayoutAttributes={},n.localeRegistry={},n.apiMethodRegistry={},n.collectableSubplotTypes=null,n.register=function(e){if(n.collectableSubplotTypes=null,!e)throw new Error("No argument passed to Plotly.register.");e&&!Array.isArray(e)&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t];if(!r)throw new Error("Invalid module was attempted to be registered!");switch(r.moduleType){case"trace":f(r);break;case"transform":g(r);break;case"component":p(r);break;case"locale":m(r);break;case"apiMethod":var i=r.name;n.apiMethodRegistry[i]=r.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},n.getModule=function(e){var t=n.modules[x(e)];return!!t&&t._module},n.traceIs=function(e,t){if("various"===(e=x(e)))return!1;var i=n.modules[e];return i||(e&&r.log("Unrecognized trace type "+e+"."),i=n.modules[c.type.dflt]),!!i.categories[t]},n.getTransformIndices=function(e,t){for(var n=[],r=e.transforms||[],i=0;i<r.length;i++)r[i].type===t&&n.push(i);return n},n.hasTransform=function(e,t){for(var n=e.transforms||[],r=0;r<n.length;r++)if(n[r].type===t)return!0;return!1},n.getComponentMethod=function(e,t){var r=n.componentsRegistry[e];return r&&r[t]||i},n.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return n.apiMethodRegistry[e].apply(null,t)}},{"./lib/dom":491,"./lib/extend":493,"./lib/is_plain_object":504,"./lib/loggers":507,"./lib/noop":512,"./lib/push_unique":518,"./plots/attributes":550,"./plots/layout_attributes":610}],639:[function(e,t,n){"use strict";var r=e("../registry"),i=e("../lib"),o=i.extendFlat,a=i.extendDeep;function s(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var n,i,l=e.data,c=e.layout,u=a([],l),h=a({},c,s(t.tileClass)),d=e._context||{};if(t.width&&(h.width=t.width),t.height&&(h.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){h.annotations=[];var f=Object.keys(h);for(n=0;n<f.length;n++)i=f[n],["xaxis","yaxis","zaxis"].indexOf(i.slice(0,5))>-1&&(h[f[n]].title={text:""});for(n=0;n<u.length;n++){var p=u[n];p.showscale=!1,p.marker&&(p.marker.showscale=!1),r.traceIs(p,"pie-like")&&(p.textposition="none")}}if(Array.isArray(t.annotations))for(n=0;n<t.annotations.length;n++)h.annotations.push(t.annotations[n]);var g=Object.keys(h).filter((function(e){return e.match(/^scene\d*$/)}));if(g.length){var m={};for("thumbnail"===t.tileClass&&(m={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<g.length;n++){var v=h[g[n]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),o(v.xaxis,m),o(v.yaxis,m),o(v.zaxis,m),v._scene=null}}var y=document.createElement("div");t.tileClass&&(y.className=t.tileClass);var b={gd:y,td:y,layout:h,data:u,config:{staticPlot:void 0===t.staticPlot||t.staticPlot,plotGlPixelRatio:void 0===t.plotGlPixelRatio?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:d.mapboxAccessToken}};return"transparent"!==t.setBackground&&(b.config.setBackground=t.setBackground||"opaque"),b.gd.defaultLayout=s(t.tileClass),b}},{"../lib":503,"../registry":638}],640:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plot_api/to_image"),o=e("./filesaver"),a=e("./helpers");t.exports=function(e,t){var n;return r.isPlainObject(e)||(n=r.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise((function(s,l){n&&n._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),r.isIE()&&"svg"!==t.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),n&&(n._snapshotInProgress=!0);var c=i(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format.replace("-","."),c.then((function(e){return n&&(n._snapshotInProgress=!1),o(e,u,t.format)})).then((function(e){s(e)})).catch((function(e){n&&(n._snapshotInProgress=!1),l(e)}))}))}},{"../lib":503,"../plot_api/to_image":546,"./filesaver":641,"./helpers":642}],641:[function(e,t,n){"use strict";var r=e("../lib"),i=e("./helpers");t.exports=function(e,t,n){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,u;if(r.isIE())return c=i.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,s(t);if(a)return c=i.createBlob(e,n),u=i.createObjectURL(c),o.href=u,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(u),c=null,s(t);if(r.isSafari()){var h="svg"===n?",":";base64,";return i.octetStream(h+encodeURIComponent(e)),s(t)}l(new Error("download error"))}))}},{"../lib":503,"./helpers":642}],642:[function(e,t,n){"use strict";var r=e("../registry");n.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},n.getRedrawFunc=function(e){return function(){r.getComponentMethod("colorbar","draw")(e)}},n.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},n.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var i=window.URL||window.webkitURL;n.createObjectURL=function(e){return i.createObjectURL(e)},n.revokeObjectURL=function(e){return i.revokeObjectURL(e)},n.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var n=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}(window.atob(e));return new window.Blob([n],{type:"image/"+t})},n.octetStream=function(e){document.location.href="data:application/octet-stream"+e},n.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,n.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},{"../registry":638}],643:[function(e,t,n){"use strict";var r=e("./helpers"),i={getDelay:r.getDelay,getRedrawFunc:r.getRedrawFunc,clone:e("./cloneplot"),toSVG:e("./tosvg"),svgToImg:e("./svgtoimg"),toImage:e("./toimage"),downloadImage:e("./download")};t.exports=i},{"./cloneplot":639,"./download":640,"./helpers":642,"./svgtoimg":644,"./toimage":645,"./tosvg":646}],644:[function(e,t,n){"use strict";var r=e("../lib"),i=e("events").EventEmitter,o=e("./helpers");t.exports=function(e){var t=e.emitter||new i,n=new Promise((function(i,a){var s=window.Image,l=e.svg,c=e.format||"png";if(r.isIE()&&"svg"!==c){var u=new Error(o.MSG_IE_BAD_FORMAT);return a(u),e.promise?n:t.emit("error",u)}var h,d,f=e.canvas,p=e.scale||1,g=e.width||300,m=e.height||150,v=p*g,y=p*m,b=f.getContext("2d"),_=new s;"svg"===c||r.isSafari()?d=o.encodeSVG(l):(h=o.createBlob(l,"svg"),d=o.createObjectURL(h)),f.width=v,f.height=y,_.onload=function(){var n;switch(h=null,o.revokeObjectURL(d),"svg"!==c&&b.drawImage(_,0,0,v,y),c){case"jpeg":n=f.toDataURL("image/jpeg");break;case"png":n=f.toDataURL("image/png");break;case"webp":n=f.toDataURL("image/webp");break;case"svg":n=d;break;default:var r="Image format is not jpeg, png, svg or webp.";if(a(new Error(r)),!e.promise)return t.emit("error",r)}i(n),e.promise||t.emit("success",n)},_.onerror=function(n){if(h=null,o.revokeObjectURL(d),a(n),!e.promise)return t.emit("error",n)},_.src=d}));return e.promise?n:t}},{"../lib":503,"./helpers":642,events:84}],645:[function(e,t,n){"use strict";var r=e("events").EventEmitter,i=e("../registry"),o=e("../lib"),a=e("./helpers"),s=e("./cloneplot"),l=e("./tosvg"),c=e("./svgtoimg");t.exports=function(e,t){var n=new r,u=s(e,{format:"png"}),h=u.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);var d=a.getRedrawFunc(h);return i.call("_doPlot",h,u.data,u.layout,u.config).then(d).then((function(){var e=a.getDelay(h._fullLayout);setTimeout((function(){var e=l(h),r=document.createElement("canvas");r.id=o.randstr(),(n=c({format:t.format,width:h._fullLayout.width,height:h._fullLayout.height,canvas:r,emitter:n,svg:e})).clean=function(){h&&document.body.removeChild(h)}}),e)})).catch((function(e){n.emit("error",e)})),n}},{"../lib":503,"../registry":638,"./cloneplot":639,"./helpers":642,"./svgtoimg":644,"./tosvg":646,events:84}],646:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../lib"),o=e("../components/drawing"),a=e("../components/color"),s=e("../constants/xmlns_namespaces"),l=/"/g,c="TOBESTRIPPED",u=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");t.exports=function(e,t,n){var h,d,f=e._fullLayout,p=f._paper,g=f._toppaper,m=f.width,v=f.height;p.insert("rect",":first-child").call(o.setRect,0,0,m,v).call(a.fill,f.paper_bgcolor);var y=f._basePlotModules||[];for(h=0;h<y.length;h++){var b=y[h];b.toSVG&&b.toSVG(e)}if(g){var _=g.node().childNodes,x=Array.prototype.slice.call(_);for(h=0;h<x.length;h++){var w=x[h];w.childNodes.length&&p.node().appendChild(w)}}f._draggers&&f._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var e=r.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){e.style({visibility:null,display:null});var t=this.style.fontFamily;t&&-1!==t.indexOf('"')&&e.style("font-family",t.replace(l,c))}else e.remove()}));var A=[];if(f._gradientUrlQueryParts)for(d in f._gradientUrlQueryParts)A.push(d);if(f._patternUrlQueryParts)for(d in f._patternUrlQueryParts)A.push(d);A.length&&p.selectAll(A.join(",")).each((function(){var e=r.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(l,c));var n=this.style.stroke;n&&-1!==n.indexOf("url(")&&e.style("stroke",n.replace(l,c))})),"pdf"!==t&&"eps"!==t||p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(s.xmlns,"xmlns",s.svg),p.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===t&&n&&(p.attr("width",n*m),p.attr("height",n*v),p.attr("viewBox","0 0 "+m+" "+v));var k,T=(new window.XMLSerializer).serializeToString(p.node());return T=(k=T=function(e){var t=r.select("body").append("div").style({display:"none"}).html(""),n=e.replace(/(&[^;]*;)/gi,(function(e){return"&lt;"===e?"&#60;":"&rt;"===e?"&#62;":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()}));return t.remove(),n}(T),T=k.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(u,"'"),i.isIE()&&(T=(T=(T=T.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),T}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],647:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){for(var n=0;n<e.length;n++)e[n].i=n;r.mergeArray(t.text,e,"tx"),r.mergeArray(t.hovertext,e,"htx");var i=t.marker;if(i){r.mergeArray(i.opacity,e,"mo",!0),r.mergeArray(i.color,e,"mc");var o=i.line;o&&(r.mergeArray(o.color,e,"mlc"),r.mergeArrayCastPositive(o.width,e,"mlw"))}}},{"../../lib":503}],648:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../components/colorscale/attributes"),l=e("../../plots/font_attributes"),c=e("./constants"),u=e("../../components/drawing/attributes").pattern,h=e("../../lib/extend").extendFlat,d=l({editType:"calc",arrayOk:!0,colorEditType:"style"}),f=h({},r.marker.line.width,{dflt:0}),p=h({width:f,editType:"calc"},s("marker.line")),g=h({line:p,editType:"calc"},s("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:u});t.exports={x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),text:r.text,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys}),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:h({},d,{}),insidetextfont:h({},d,{}),outsidetextfont:h({},d,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:h({},r.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:g,offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},selected:{marker:{opacity:r.selected.marker.opacity,color:r.selected.marker.color,editType:"style"},textfont:r.selected.textfont,editType:"style"},unselected:{marker:{opacity:r.unselected.marker.opacity,color:r.unselected.marker.color,editType:"style"},textfont:r.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":926,"./constants":650}],649:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../plots/cartesian/align_period"),o=e("../../components/colorscale/helpers").hasColorscale,a=e("../../components/colorscale/calc"),s=e("./arrays_to_calcdata"),l=e("../scatter/calc_selection");t.exports=function(e,t){var n,c,u,h,d,f,p=r.getFromId(e,t.xaxis||"x"),g=r.getFromId(e,t.yaxis||"y"),m={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(n=p.makeCalcdata(t,"x",m),u=g.makeCalcdata(t,"y"),h=i(t,g,"y",u),d=!!t.yperiodalignment,f="y"):(n=g.makeCalcdata(t,"y",m),u=p.makeCalcdata(t,"x"),h=i(t,p,"x",u),d=!!t.xperiodalignment,f="x"),c=h.vals;for(var v=Math.min(c.length,n.length),y=new Array(v),b=0;b<v;b++)y[b]={p:c[b],s:n[b]},d&&(y[b].orig_p=u[b],y[b][f+"End"]=h.ends[b],y[b][f+"Start"]=h.starts[b]),t.ids&&(y[b].id=String(t.ids[b]));return o(t,"marker")&&a(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&a(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),s(y,t),l(y,t),y}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928,"./arrays_to_calcdata":647}],650:[function(e,t,n){"use strict";t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],651:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib").isArrayOrTypedArray,o=e("../../constants/numerical").BADNUM,a=e("../../registry"),s=e("../../plots/cartesian/axes"),l=e("../../plots/cartesian/constraints").getAxisGroup,c=e("./sieve.js");function u(e,t,n,a,u){if(a.length){var _,x,w,A;switch(function(e,t){var n,o;for(n=0;n<t.length;n++){var a,s=t[n],l=s[0].trace,c="funnel"===l.type?l._base:l.base,u="h"===l.orientation?l.xcalendar:l.ycalendar,h="category"===e.type||"multicategory"===e.type?function(){return null}:e.d2c;if(i(c)){for(o=0;o<Math.min(c.length,s.length);o++)a=h(c[o],0,u),r(a)?(s[o].b=+a,s[o].hasB=1):s[o].b=0;for(;o<s.length;o++)s[o].b=0}else{a=h(c,0,u);var d=r(a);for(a=d?a:0,o=0;o<s.length;o++)s[o].b=a,d&&(s[o].hasB=1)}}}(n,a),u.mode){case"overlay":h(t,n,a,u);break;case"group":for(_=[],x=[],w=0;w<a.length;w++)void 0===(A=a[w])[0].trace.offset?x.push(A):_.push(A);x.length&&function(e,t,n,r,i){var a=new c(r,{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});(function(e,t,n,r){for(var i=e._fullLayout,o=n.positions,a=n.distinctPositions,s=n.minDiff,c=n.traces,u=c.length,h=o.length!==a.length,d=s*(1-r.gap),m=l(i,t._id)+c[0][0].trace.orientation,v=i._alignmentOpts[m]||{},y=0;y<u;y++){var b,_,x=c[y],w=x[0].trace,A=v[w.alignmentgroup]||{},k=Object.keys(A.offsetGroups||{}).length,T=(b=k?d/k:h?d/u:d)*(1-(r.groupgap||0));_=k?((2*w._offsetIndex+1-k)*b-T)/2:h?((2*y+1-u)*b-T)/2:-T/2;var S=x[0].t;S.barwidth=T,S.poffset=_,S.bargroupwidth=d,S.bardelta=s}n.binWidth=c[0][0].t.barwidth/100,f(n),p(t,n),g(t,n,h)})(e,t,a,i),function(e,t){for(var n=e.traces,r=0;r<n.length;r++){var i=n[r];if(void 0===i[0].trace.base)for(var a=new c([i],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var l=i[s];if(l.p!==o){var u=a.put(l.p,l.b+l.s);u&&(l.b=u)}}}}(a,t),i.norm?(v(a),y(n,a,i)):m(n,a)}(e,t,n,x,u),_.length&&h(t,n,_,u);break;case"stack":case"relative":for(_=[],x=[],w=0;w<a.length;w++)void 0===(A=a[w])[0].trace.base?x.push(A):_.push(A);x.length&&function(e,t,n,r,i){var a=new c(r,{posAxis:t,sepNegVal:"relative"===i.mode,overlapNoMerge:!(i.norm||"stack"===i.mode||"relative"===i.mode)});d(t,a,i),function(e,t,n){var r,i,a,l,c,u,h=b(e),d=t.traces;for(l=0;l<d.length;l++)if("funnel"===(i=(r=d[l])[0].trace).type)for(c=0;c<r.length;c++)(u=r[c]).s!==o&&t.put(u.p,-.5*u.s);for(l=0;l<d.length;l++){a="funnel"===(i=(r=d[l])[0].trace).type;var f=[];for(c=0;c<r.length;c++)if((u=r[c]).s!==o){var p;p=a?u.s:u.s+u.b;var g=t.put(u.p,p),m=g+p;u.b=g,u[h]=m,n.norm||(f.push(m),u.hasB&&f.push(g))}n.norm||(i._extremes[e._id]=s.findExtremes(e,f,{tozero:!0,padded:!0}))}}(n,a,i);for(var l=0;l<r.length;l++)for(var u=r[l],h=0;h<u.length;h++){var f=u[h];f.s!==o&&f.b+f.s===a.get(f.p,f.s)&&(f._outmost=!0)}i.norm&&y(n,a,i)}(0,t,n,x,u),_.length&&h(t,n,_,u)}!function(e,t){var n,i,o,a=b(t),s={},l=1/0,c=-1/0;for(n=0;n<e.length;n++)for(o=e[n],i=0;i<o.length;i++){var u=o[i].p;r(u)&&(l=Math.min(l,u),c=Math.max(c,u))}var h=1e4/(c-l),d=s.round=function(e){return String(Math.round(h*(e-l)))};for(n=0;n<e.length;n++){(o=e[n])[0].t.extents=s;var f=o[0].t.poffset,p=Array.isArray(f);for(i=0;i<o.length;i++){var g=o[i],m=g[a]-g.w/2;if(r(m)){var v=g[a]+g.w/2,y=d(g.p);s[y]?s[y]=[Math.min(m,s[y][0]),Math.max(v,s[y][1])]:s[y]=[m,v]}g.p0=g.p+(p?f[i]:f),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s}}}(a,t)}}function h(e,t,n,r){for(var i=0;i<n.length;i++){var o=n[i],a=new c([o],{posAxis:e,sepNegVal:!1,overlapNoMerge:!r.norm});d(e,a,r),r.norm?(v(a),y(t,a,r)):m(t,a)}}function d(e,t,n){for(var r=t.minDiff,i=t.traces,o=r*(1-n.gap),a=o*(1-(n.groupgap||0)),s=-a/2,l=0;l<i.length;l++){var c=i[l][0].t;c.barwidth=a,c.poffset=s,c.bargroupwidth=o,c.bardelta=r}t.binWidth=i[0][0].t.barwidth/100,f(t),p(e,t),g(e,t)}function f(e){var t,n,o=e.traces;for(t=0;t<o.length;t++){var a,s=o[t],l=s[0],c=l.trace,u=l.t,h=c._offset||c.offset,d=u.poffset;if(i(h)){for(a=Array.prototype.slice.call(h,0,s.length),n=0;n<a.length;n++)r(a[n])||(a[n]=d);for(n=a.length;n<s.length;n++)a.push(d);u.poffset=a}else void 0!==h&&(u.poffset=h);var f=c._width||c.width,p=u.barwidth;if(i(f)){var g=Array.prototype.slice.call(f,0,s.length);for(n=0;n<g.length;n++)r(g[n])||(g[n]=p);for(n=g.length;n<s.length;n++)g.push(p);if(u.barwidth=g,void 0===h){for(a=[],n=0;n<s.length;n++)a.push(d+(p-g[n])/2);u.poffset=a}}else void 0!==f&&(u.barwidth=f,void 0===h&&(u.poffset=d+(p-f)/2))}}function p(e,t){for(var n=t.traces,r=b(e),i=0;i<n.length;i++)for(var o=n[i],a=o[0].t,s=a.poffset,l=Array.isArray(s),c=a.barwidth,u=Array.isArray(c),h=0;h<o.length;h++){var d=o[h],f=d.w=u?c[h]:c;d[r]=d.p+(l?s[h]:s)+f/2}}function g(e,t,n){var r=t.traces,i=t.minDiff/2;s.minDtick(e,t.minDiff,t.distinctPositions[0],n);for(var o=0;o<r.length;o++){var a,l,c,u,h=r[o],d=h[0],f=d.trace,p=[];for(u=0;u<h.length;u++)l=(a=h[u]).p-i,c=a.p+i,p.push(l,c);if(f.width||f.offset){var g=d.t,m=g.poffset,v=g.barwidth,y=Array.isArray(m),b=Array.isArray(v);for(u=0;u<h.length;u++){a=h[u];var _=y?m[u]:m,x=b?v[u]:v;c=(l=a.p+_)+x,p.push(l,c)}}f._extremes[e._id]=s.findExtremes(e,p,{padded:!1})}}function m(e,t){for(var n=t.traces,r=b(e),i=0;i<n.length;i++){for(var o=n[i],a=o[0].trace,l=[],c=!1,u=0;u<o.length;u++){var h=o[u],d=h.b,f=d+h.s;h[r]=f,l.push(f),h.hasB&&l.push(d),h.hasB&&h.b||(c=!0)}a._extremes[e._id]=s.findExtremes(e,l,{tozero:c,padded:!0})}}function v(e){for(var t=e.traces,n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++){var a=r[i];a.s!==o&&e.put(a.p,a.b+a.s)}}function y(e,t,n){var i=t.traces,a=b(e),l="fraction"===n.norm?1:100,c=l/1e9,u=e.l2c(e.c2l(0)),h="stack"===n.mode?l:u;function d(t){return r(e.c2l(t))&&(t<u-c||t>h+c||!r(u))}for(var f=0;f<i.length;f++){for(var p=i[f],g=p[0].trace,m=[],v=!1,y=!1,_=0;_<p.length;_++){var x=p[_];if(x.s!==o){var w=Math.abs(l/t.get(x.p,x.s));x.b*=w,x.s*=w;var A=x.b,k=A+x.s;x[a]=k,m.push(k),y=y||d(k),x.hasB&&(m.push(A),y=y||d(A)),x.hasB&&x.b||(v=!0)}}g._extremes[e._id]=s.findExtremes(e,m,{tozero:v,padded:y})}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var n=t.xaxis,r=t.yaxis,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],h=0;h<o.length;h++){var d=o[h];if(!0===d.visible&&a.traceIs(d,"bar")&&d.xaxis===n._id&&d.yaxis===r._id&&("h"===d.orientation?l.push(s[h]):c.push(s[h]),d._computePh))for(var f=e.calcdata[h],p=0;p<f.length;p++)"function"==typeof f[p].ph0&&(f[p].ph0=f[p].ph0()),"function"==typeof f[p].ph1&&(f[p].ph1=f[p].ph1())}var g={xCat:"category"===n.type||"multicategory"===n.type,yCat:"category"===r.type||"multicategory"===r.type,mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};u(e,n,r,c,g),u(e,r,n,l,g)},setGroupPositions:u}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562,"../../registry":638,"./sieve.js":661,"fast-isnumeric":190}],652:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../../registry"),a=e("../scatter/xy_defaults"),s=e("../scatter/period_defaults"),l=e("./style_defaults"),c=e("../../plots/cartesian/constraints").getAxisGroup,u=e("./attributes"),h=r.coerceFont;function d(e,t,n,r){var i=t.orientation,o=t[{v:"x",h:"y"}[i]+"axis"],a=c(n,o)+i,s=n._alignmentOpts||{},l=r("alignmentgroup"),u=s[a];u||(u=s[a]={});var h=u[l];h?h.traces.push(t):h=u[l]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var d=r("offsetgroup"),f=h.offsetGroups,p=f[d];d&&(p||(p=f[d]={offsetIndex:Object.keys(f).length}),t._offsetIndex=p.offsetIndex)}function f(e,t,n,i,o,a){var s=!(!1===(a=a||{}).moduleHasSelected),l=!(!1===a.moduleHasUnselected),c=!(!1===a.moduleHasConstrain),u=!(!1===a.moduleHasCliponaxis),d=!(!1===a.moduleHasTextangle),f=!(!1===a.moduleHasInsideanchor),p=!!a.hasPathbar,g=Array.isArray(o)||"auto"===o,m=g||"inside"===o,v=g||"outside"===o;if(m||v){var y=h(i,"textfont",n.font),b=r.extendFlat({},y),_=!(e.textfont&&e.textfont.color);if(_&&delete b.color,h(i,"insidetextfont",b),p){var x=r.extendFlat({},y);_&&delete x.color,h(i,"pathbar.textfont",x)}v&&h(i,"outsidetextfont",y),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),d&&i("textangle"),i("texttemplate")}m&&f&&i("insidetextanchor")}t.exports={supplyDefaults:function(e,t,n,c){function h(n,i){return r.coerce(e,t,u,n,i)}if(a(e,t,c,h)){s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate");var d=h("textposition");f(e,0,c,h,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,n,c);var p=(t.marker.line||{}).color,g=o.getComponentMethod("errorbars","supplyDefaults");g(e,t,p||i.defaultLine,{axis:"y"}),g(e,t,p||i.defaultLine,{axis:"x",inherit:"y"}),r.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1},crossTraceDefaults:function(e,t){var n;function i(e){return r.coerce(n._input,n,u,e)}if("group"===t.barmode)for(var o=0;o<e.length;o++)"bar"===(n=e[o]).type&&d(n._input,n,t,i)},handleGroupingDefaults:d,handleText:f}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/constraints":562,"../../registry":638,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":648,"./style_defaults":663}],653:[function(e,t,n){"use strict";t.exports=function(e,t,n){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===n.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},{}],654:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../lib").isArrayOrTypedArray;n.coerceString=function(e,t,n){if("string"==typeof t){if(t||!e.noBlank)return t}else if(("number"==typeof t||!0===t)&&!e.strict)return String(t);return void 0!==n?n:e.dflt},n.coerceNumber=function(e,t,n){if(r(t)){t=+t;var i=e.min,o=e.max;if(!(void 0!==i&&t<i||void 0!==o&&t>o))return t}return void 0!==n?n:e.dflt},n.coerceColor=function(e,t,n){return i(t).isValid()?t:void 0!==n?n:e.dflt},n.coerceEnumerated=function(e,t,n){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==n?n:e.dflt},n.getValue=function(e,t){var n;return Array.isArray(e)?t<e.length&&(n=e[t]):n=e,n},n.getLineWidth=function(e,t){return 0<t.mlw?t.mlw:o(e.marker.line.width)?0:e.marker.line.width}},{"../../lib":503,"fast-isnumeric":190,tinycolor2:312}],655:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../registry"),o=e("../../components/color"),a=e("../../lib").fillText,s=e("./helpers").getLineWidth,l=e("../../plots/cartesian/axes").hoverLabelText,c=e("../../constants/numerical").BADNUM;function u(e,t,n,i,o){var s,u,h,d,f,p,g,m=e.cd,v=m[0].trace,y=m[0].t,b="closest"===i,_="waterfall"===v.type,x=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===v.orientation?(s=n,u=t,h="y",d="x",f=R,p=D):(s=t,u=n,h="x",d="y",p=R,f=D);var A=v[h+"period"],k=b||A;function T(e){return E(e,-1)}function S(e){return E(e,1)}function E(e,t){var n=e.w;return e[h]+t*n/2}function C(e){return e[h+"End"]-e[h+"Start"]}var M=b?T:A?function(e){return e.p-C(e)/2}:function(e){return Math.min(T(e),e.p-y.bardelta/2)},O=b?S:A?function(e){return e.p+C(e)/2}:function(e){return Math.max(S(e),e.p+y.bardelta/2)};function L(e,t,n){return o.finiteRange&&(n=0),r.inbox(e-s,t-s,n+Math.min(1,Math.abs(t-e)/g)-1)}function D(e){return L(M(e),O(e),x)}function I(e){var t=e[d];if(_){var n=Math.abs(e.rawS)||0;u>0?t+=n:u<0&&(t-=n)}return t}function R(e){var t=u,n=e.b,i=I(e);return r.inbox(n-t,i-t,x+(i-t)/(i-n)-1)}var P=e[h+"a"],N=e[d+"a"];g=Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0]));var z=r.getDistanceFunction(i,f,p,(function(e){return(f(e)+p(e))/2}));if(r.getClosest(m,z,e),!1!==e.index&&m[e.index].p!==c){k||(M=function(e){return Math.min(T(e),e.p-y.bargroupwidth/2)},O=function(e){return Math.max(S(e),e.p+y.bargroupwidth/2)});var F=m[e.index],B=v.base?F.b+F.s:F.s;e[d+"0"]=e[d+"1"]=N.c2p(F[d],!0),e[d+"LabelVal"]=B;var j=y.extents[y.extents.round(F.p)];e[h+"0"]=P.c2p(b?M(F):j[0],!0),e[h+"1"]=P.c2p(b?O(F):j[1],!0);var U=void 0!==F.orig_p;return e[h+"LabelVal"]=U?F.orig_p:F.p,e.labelLabel=l(P,e[h+"LabelVal"],v[h+"hoverformat"]),e.valueLabel=l(N,e[d+"LabelVal"],v[d+"hoverformat"]),e.baseLabel=l(N,F.b,v[d+"hoverformat"]),e.spikeDistance=(function(e){var t=u,n=e.b,i=I(e);return r.inbox(n-t,i-t,w+(i-t)/(i-n)-1)}(F)+function(e){return L(T(e),S(e),w)}(F))/2,e[h+"Spike"]=P.c2p(F.p,!0),a(F,v,e),e.hovertemplate=v.hovertemplate,e}}function h(e,t){var n=t.mcc||e.marker.color,r=t.mlcc||e.marker.line.color,i=s(e,t);return o.opacity(n)?n:o.opacity(r)&&i?r:void 0}t.exports={hoverPoints:function(e,t,n,r,o){var a=u(e,t,n,r,o);if(a){var s=a.cd,l=s[0].trace,c=s[a.index];return a.color=h(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,a),[a]}},hoverOnBars:u,getTraceColor:h}},{"../../components/color":366,"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./helpers":654}],656:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,colorbar:e("../scatter/marker_colorbar"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"bar",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":944,"./arrays_to_calcdata":647,"./attributes":648,"./calc":649,"./cross_trace_calc":651,"./defaults":652,"./event_data":653,"./hover":655,"./layout_attributes":657,"./layout_defaults":658,"./plot":659,"./select":660,"./style":662}],657:[function(e,t,n){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],658:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,n){function s(n,r){return o.coerce(e,t,a,n,r)}for(var l=!1,c=!1,u=!1,h={},d=s("barmode"),f=0;f<n.length;f++){var p=n[f];if(r.traceIs(p,"bar")&&p.visible){if(l=!0,"group"===d){var g=p.xaxis+p.yaxis;h[g]&&(u=!0),h[g]=!0}p.visible&&"histogram"===p.type&&"category"!==i.getFromId({_fullLayout:t},p["v"===p.orientation?"xaxis":"yaxis"]).type&&(c=!0)}}l?("overlay"!==d&&s("barnorm"),s("bargap",c&&!u?0:.2),s("bargroupgap")):delete t.barmode}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./layout_attributes":657}],659:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../lib"),a=e("../../lib/svg_text_utils"),s=e("../../components/color"),l=e("../../components/drawing"),c=e("../../registry"),u=e("../../plots/cartesian/axes").tickText,h=e("./uniform_text"),d=h.recordMinTextSize,f=h.clearMinTextSize,p=e("./style"),g=e("./helpers"),m=e("./constants"),v=e("./attributes"),y=v.text,b=v.textposition,_=e("../../components/fx/helpers").appendArrayPointValue,x=m.TEXTPAD;function w(e){return e.id}function A(e){if(e.ids)return w}function k(e,t){return e<t?1:-1}function T(e,t,n,r){var i;return!t.uniformtext.mode&&S(n)?(r&&(i=r()),e.transition().duration(n.duration).ease(n.easing).each("end",(function(){i&&i()})).each("interrupt",(function(){i&&i()}))):e}function S(e){return e&&e.duration>0}function E(e){return"auto"===e?0:e}function C(e,t){var n=Math.PI/180*t,r=Math.abs(Math.sin(n)),i=Math.abs(Math.cos(n));return{x:e.width*i+e.height*r,y:e.width*r+e.height*i}}function M(e,t,n,r,i,o){var a=!!o.isHorizontal,s=!!o.constrained,l=o.angle||0,c=o.anchor||"end",u="end"===c,h="start"===c,d=((o.leftToRight||0)+1)/2,f=1-d,p=i.width,g=i.height,m=Math.abs(t-e),v=Math.abs(r-n),y=m>2*x&&v>2*x?x:0;m-=2*y,v-=2*y;var b=E(l);"auto"!==l||p<=m&&g<=v||!(p>m||g>v)||(p>v||g>m)&&p<g==m<v||(b+=90);var _=C(i,b),w=1;s&&(w=Math.min(1,m/_.x,v/_.y));var A=i.left*f+i.right*d,T=(i.top+i.bottom)/2,S=(e+x)*f+(t-x)*d,M=(n+r)/2,O=0,L=0;if(h||u){var D=(a?_.x:_.y)/2,I=a?k(e,t):k(n,r);a?h?(S=e+I*y,O=-I*D):(S=t-I*y,O=I*D):h?(M=n+I*y,L=-I*D):(M=r-I*y,L=I*D)}return{textX:A,textY:T,targetX:S,targetY:M,anchorX:O,anchorY:L,scale:w,rotate:b}}t.exports={plot:function(e,t,n,h,m,v){var w=t.xaxis,O=t.yaxis,L=e._fullLayout;m||(m={mode:L.barmode,norm:L.barmode,gap:L.bargap,groupgap:L.bargroupgap},f("bar",L));var D=o.makeTraceGroups(h,n,"trace bars").each((function(n){var c=r.select(this),h=n[0].trace,f="waterfall"===h.type,D="funnel"===h.type,I="bar"===h.type||D,R=0;f&&h.connector.visible&&"between"===h.connector.mode&&(R=h.connector.line.width/2);var P="h"===h.orientation,N=S(m),z=o.ensureSingle(c,"g","points"),F=A(h),B=z.selectAll("g.point").data(o.identity,F);B.enter().append("g").classed("point",!0),B.exit().remove(),B.each((function(c,f){var A,S,D=r.select(this),z=function(e,t,n,r){var i=[],o=[],a=r?t:n,s=r?n:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),r?[i,o]:[o,i]}(c,w,O,P),F=z[0][0],B=z[0][1],j=z[1][0],U=z[1][1],V=0==(P?B-F:U-j);if(V&&I&&g.getLineWidth(h,c)&&(V=!1),V||(V=!(i(F)&&i(B)&&i(j)&&i(U))),c.isBlank=V,V&&(P?B=F:U=j),R&&!V&&(P?(F-=k(F,B)*R,B+=k(F,B)*R):(j-=k(j,U)*R,U+=k(j,U)*R)),"waterfall"===h.type){if(!V){var q=h[c.dir].marker;A=q.line.width,S=q.color}}else A=g.getLineWidth(h,c),S=c.mc||h.marker.color;function H(e){var t=r.round(A/2%1,2);return 0===m.gap&&0===m.groupgap?r.round(Math.round(e)-t,2):e}if(!e._context.staticPlot){var $=s.opacity(S)<1||A>.01?H:function(e,t,n){return n&&e===t?e:Math.abs(e-t)>=2?H(e):e>t?Math.ceil(e):Math.floor(e)};F=$(F,B,P),B=$(B,F,P),j=$(j,U,!P),U=$(U,j,!P)}var W=T(o.ensureSingle(D,"path"),L,m,v);if(W.style("vector-effect","non-scaling-stroke").attr("d",isNaN((B-F)*(U-j))||V&&e._context.staticPlot?"M0,0Z":"M"+F+","+j+"V"+U+"H"+B+"V"+j+"Z").call(l.setClipUrl,t.layerClipId,e),!L.uniformtext.mode&&N){var G=l.makePointStyleFns(h);l.singlePointStyle(c,W,h,G,e)}(function(e,t,n,r,i,s,c,h,f,m,v){var w,A=t.xaxis,S=t.yaxis,O=e._fullLayout;function L(t,n,r){return o.ensureSingle(t,"text").text(n).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,r).call(a.convertToTspans,e)}var D=r[0].trace,I="h"===D.orientation,R=function(e,t,n,r,i){var a,s=t[0].trace;return a=s.texttemplate?function(e,t,n,r,i){var a=t[0].trace,s=o.castOption(a,n,"texttemplate");if(!s)return"";var l,c,h,d,f="histogram"===a.type,p="waterfall"===a.type,g="funnel"===a.type,m="h"===a.orientation;function v(e){return u(c,c.c2l(e),!0).text}function y(e){return u(d,d.c2l(e),!0).text}m?(l="y",c=i,h="x",d=r):(l="x",c=r,h="y",d=i);var b=t[n],x={};x.label=b.p,x.labelLabel=x[l+"Label"]=v(b.p);var w=o.castOption(a,b.i,"text");(0===w||w)&&(x.text=w),x.value=b.s,x.valueLabel=x[h+"Label"]=y(b.s);var A={};_(A,a,b.i),(f||void 0===A.x)&&(A.x=m?x.value:x.label),(f||void 0===A.y)&&(A.y=m?x.label:x.value),(f||void 0===A.xLabel)&&(A.xLabel=m?x.valueLabel:x.labelLabel),(f||void 0===A.yLabel)&&(A.yLabel=m?x.labelLabel:x.valueLabel),p&&(x.delta=+b.rawS||b.s,x.deltaLabel=y(x.delta),x.final=b.v,x.finalLabel=y(x.final),x.initial=x.final-x.delta,x.initialLabel=y(x.initial)),g&&(x.value=b.s,x.valueLabel=y(x.value),x.percentInitial=b.begR,x.percentInitialLabel=o.formatPercent(b.begR),x.percentPrevious=b.difR,x.percentPreviousLabel=o.formatPercent(b.difR),x.percentTotal=b.sumR,x.percenTotalLabel=o.formatPercent(b.sumR));var k=o.castOption(a,b.i,"customdata");return k&&(x.customdata=k),o.texttemplateString(s,x,e._d3locale,A,x,a._meta||{})}(e,t,n,r,i):s.textinfo?function(e,t,n,r){var i=e[0].trace,a="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(e){return u(a?r:n,e,!0).text}function h(e){return u(a?n:r,+e,!0).text}var d,f=i.textinfo,p=e[t],g=f.split("+"),m=[],v=function(e){return-1!==g.indexOf(e)};if(v("label")&&m.push(c(e[t].p)),v("text")&&(0===(d=o.castOption(i,p.i,"text"))||d)&&m.push(d),s){var y=+p.rawS||p.s,b=p.v,_=b-y;v("initial")&&m.push(h(_)),v("delta")&&m.push(h(y)),v("final")&&m.push(h(b))}if(l){v("value")&&m.push(h(p.s));var x=0;v("percent initial")&&x++,v("percent previous")&&x++,v("percent total")&&x++;var w=x>1;v("percent initial")&&(d=o.formatPercent(p.begR),w&&(d+=" of initial"),m.push(d)),v("percent previous")&&(d=o.formatPercent(p.difR),w&&(d+=" of previous"),m.push(d)),v("percent total")&&(d=o.formatPercent(p.sumR),w&&(d+=" of total"),m.push(d))}return m.join("<br>")}(t,n,r,i):g.getValue(s.text,n),g.coerceString(y,a)}(O,r,i,A,S);w=function(e,t){var n=g.getValue(e.textposition,t);return g.coerceEnumerated(b,n)}(D,i);var P="stack"===m.mode||"relative"===m.mode,N=r[i],z=!P||N._outmost;if(R&&"none"!==w&&(!N.isBlank&&s!==c&&h!==f||"auto"!==w&&"inside"!==w)){var F=O.font,B=p.getBarColor(r[i],D),j=p.getInsideTextFont(D,i,F,B),U=p.getOutsideTextFont(D,i,F),V=n.datum();I?"log"===A.type&&V.s0<=0&&(s=A.range[0]<A.range[1]?0:A._length):"log"===S.type&&V.s0<=0&&(h=S.range[0]<S.range[1]?S._length:0);var q,H,$,W,G,Y=Math.abs(c-s)-2*x,X=Math.abs(f-h)-2*x;if("outside"===w&&(z||N.hasB||(w="inside")),"auto"===w&&(z?(w="inside",q=L(n,R,G=o.ensureUniformFontSize(e,j)),$=(H=l.bBox(q.node())).width,W=H.height,$>0&&W>0&&($<=Y&&W<=X||$<=X&&W<=Y||(I?Y>=$*(X/W):X>=W*(Y/$)))?w="inside":(w="outside",q.remove(),q=null)):w="inside"),!q){var Z=(q=L(n,R,G=o.ensureUniformFontSize(e,"outside"===w?U:j))).attr("transform");if(q.attr("transform",""),$=(H=l.bBox(q.node())).width,W=H.height,q.attr("transform",Z),$<=0||W<=0)return void q.remove()}var K,J=D.textangle;(K="outside"===w?function(e,t,n,r,i,o){var a,s=!!o.isHorizontal,l=!!o.constrained,c=o.angle||0,u=i.width,h=i.height,d=Math.abs(t-e),f=Math.abs(r-n);a=s?f>2*x?x:0:d>2*x?x:0;var p=1;l&&(p=s?Math.min(1,f/h):Math.min(1,d/u));var g=E(c),m=C(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,b=(i.top+i.bottom)/2,_=(e+t)/2,w=(n+r)/2,A=0,T=0,S=s?k(t,e):k(n,r);return s?(_=t-S*a,A=S*v):(w=r+S*a,T=-S*v),{textX:y,textY:b,targetX:_,targetY:w,anchorX:A,anchorY:T,scale:p,rotate:g}}(s,c,h,f,H,{isHorizontal:I,constrained:"both"===D.constraintext||"outside"===D.constraintext,angle:J}):M(s,c,h,f,H,{isHorizontal:I,constrained:"both"===D.constraintext||"inside"===D.constraintext,angle:J,anchor:D.insidetextanchor})).fontSize=G.size,d("histogram"===D.type?"bar":D.type,K,O),N.transform=K,T(q,O,m,v).attr("transform",o.getTextTransform(K))}else n.select("text").remove()})(e,t,D,n,f,F,B,j,U,m,v),t.layerClipId&&l.hideOutsideRangePoint(c,D.select("text"),w,O,h.xcalendar,h.ycalendar)}));var j=!1===h.cliponaxis;l.setClipUrl(c,j?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,D,t,m)},toMoveInsideBar:M}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx/helpers":402,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"./attributes":648,"./constants":650,"./helpers":654,"./style":662,"./uniform_text":664,"@plotly/d3":58,"fast-isnumeric":190}],660:[function(e,t,n){"use strict";function r(e,t,n,r,i){var o=t.c2p(r?e.s0:e.p0,!0),a=t.c2p(r?e.s1:e.p1,!0),s=n.c2p(r?e.p0:e.s0,!0),l=n.c2p(r?e.p1:e.s1,!0);return i?[(o+a)/2,(s+l)/2]:r?[a,(s+l)/2]:[(o+a)/2,l]}t.exports=function(e,t){var n,i=e.cd,o=e.xaxis,a=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===t)for(n=0;n<i.length;n++)i[n].selected=0;else for(n=0;n<i.length;n++){var h=i[n],d="ct"in h?h.ct:r(h,o,a,c,l);t.contains(d,!1,n,e)?(u.push({pointNumber:n,x:o.c2d(h.x),y:a.c2d(h.y)}),h.selected=1):h.selected=0}return u}},{}],661:[function(e,t,n){"use strict";t.exports=o;var r=e("../../lib").distinctVals,i=e("../../constants/numerical").BADNUM;function o(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var n=1/0,o=[],a=0;a<e.length;a++){for(var s=e[a],l=0;l<s.length;l++){var c=s[l];c.p!==i&&o.push(c.p)}s[0]&&s[0].width1&&(n=Math.min(s[0].width1,n))}this.positions=o;var u=r(o);this.distinctPositions=u.vals,1===u.vals.length&&n!==1/0?this.minDiff=n:this.minDiff=Math.min(u.minDiff,n);var h=(t.posAxis||{}).type;"category"!==h&&"multicategory"!==h||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}o.prototype.put=function(e,t){var n=this.getLabel(e,t),r=this.bins[n]||0;return this.bins[n]=r+t,r},o.prototype.get=function(e,t){var n=this.getLabel(e,t);return this.bins[n]||0},o.prototype.getLabel=function(e,t){return(t<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?e:Math.round(e/this.binWidth))}},{"../../constants/numerical":479,"../../lib":503}],662:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../components/drawing"),a=e("../../lib"),s=e("../../registry"),l=e("./uniform_text").resizeText,c=e("./attributes"),u=c.textfont,h=c.insidetextfont,d=c.outsidetextfont,f=e("./helpers");function p(e,t,n){o.pointStyle(e.selectAll("path"),t,n),g(e,t,n)}function g(e,t,n){e.selectAll("text").each((function(e){var i=r.select(this),s=a.ensureUniformFontSize(n,m(i,e,t,n));o.font(i,s)}))}function m(e,t,n,r){var i=r._fullLayout.font,o=n.textfont;if(e.classed("bartext-inside")){var a=x(t,n);o=y(n,t.i,i,a)}else e.classed("bartext-outside")&&(o=b(n,t.i,i));return o}function v(e,t,n){return _(u,e.textfont,t,n)}function y(e,t,n,r){var o=v(e,t,n);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(o={color:i.contrast(r),family:o.family,size:o.size}),_(h,e.insidetextfont,t,o)}function b(e,t,n){var r=v(e,t,n);return _(d,e.outsidetextfont,t,r)}function _(e,t,n,r){t=t||{};var i=f.getValue(t.family,n),o=f.getValue(t.size,n),a=f.getValue(t.color,n);return{family:f.coerceString(e.family,i,r.family),size:f.coerceNumber(e.size,o,r.size),color:f.coerceColor(e.color,a,r.color)}}function x(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}t.exports={style:function(e){var t=r.select(e).selectAll("g.barlayer").selectAll("g.trace");l(e,t,"bar");var n=t.size(),i=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===i.barmode&&n>1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(r.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:g,styleOnSelect:function(e,t,n){var i=t[0].trace;i.selectedpoints?function(e,t,n){o.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each((function(e){var i,s=r.select(this);if(e.selected){i=a.ensureUniformFontSize(n,m(s,e,t,n));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),o.font(s,i)}else o.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,n)}(n,i,e):(p(n,i,e),s.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:b,getBarColor:x,resizeText:l}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../registry":638,"./attributes":648,"./helpers":654,"./uniform_text":664,"@plotly/d3":58}],663:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/defaults"),a=e("../../lib").coercePattern;t.exports=function(e,t,n,s,l){var c=n("marker.color",s),u=i(e,"marker");u&&o(e,t,l,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",r.defaultLine),i(e,"marker.line")&&o(e,t,l,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),a(n,"marker.pattern",c,u),n("selected.marker.color"),n("unselected.marker.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],664:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib");function o(e){return"_"+e+"Text_minsize"}t.exports={recordMinTextSize:function(e,t,n){if(n.uniformtext.mode){var r=o(e),i=n.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a<i,n[r]=n[r]||1/0,t.hide||(n[r]=Math.min(n[r],Math.max(a,i)))}},clearMinTextSize:function(e,t){t[o(e)]=void 0},resizeText:function(e,t,n){var o=e._fullLayout,a=o["_"+n+"Text_minsize"];if(a){var s,l="hide"===o.uniformtext.mode;switch(n){case"funnelarea":case"pie":case"sunburst":s="g.slice";break;case"treemap":case"icicle":s="g.slice, g.pathbar";break;default:s="g.points > g.point"}t.selectAll(s).each((function(e){var t=e.transform;t&&(t.scale=l&&t.hide?0:a/t.fontSize,r.select(this).select("text").attr("transform",i.getTextTransform(t)))}))}}}},{"../../lib":503,"@plotly/d3":58}],665:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../lib/extend").extendFlat,o=e("../scatterpolar/attributes"),a=e("../bar/attributes");t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:i({},a.base,{}),offset:i({},a.offset,{}),width:i({},a.width,{}),text:i({},a.text,{}),hovertext:i({},a.hovertext,{}),marker:a.marker,hoverinfo:o.hoverinfo,hovertemplate:r(),selected:a.selected,unselected:a.unselected}},{"../../lib/extend":493,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatterpolar/attributes":1e3}],666:[function(e,t,n){"use strict";var r=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/calc"),o=e("../bar/arrays_to_calcdata"),a=e("../bar/cross_trace_calc").setGroupPositions,s=e("../scatter/calc_selection"),l=e("../../registry").traceIs,c=e("../../lib").extendFlat;t.exports={calc:function(e,t){for(var n=e._fullLayout,a=t.subplot,l=n[a].radialaxis,c=n[a].angularaxis,u=l.makeCalcdata(t,"r"),h=c.makeCalcdata(t,"theta"),d=t._length,f=new Array(d),p=u,g=h,m=0;m<d;m++)f[m]={p:g[m],s:p[m]};function v(e){var n=t[e];void 0!==n&&(t["_"+e]=Array.isArray(n)?c.makeCalcdata(t,e):c.d2c(n,t.thetaunit))}return"linear"===c.type&&(v("width"),v("offset")),r(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),o(f,t),s(f,t),f},crossTraceCalc:function(e,t,n){for(var r=e.calcdata,i=[],o=0;o<r.length;o++){var s=r[o],u=s[0].trace;!0===u.visible&&l(u,"bar")&&u.subplot===n&&i.push(s)}var h=c({},t.radialaxis,{_id:"x"}),d=t.angularaxis;a(e,d,h,i,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../lib":503,"../../registry":638,"../bar/arrays_to_calcdata":647,"../bar/cross_trace_calc":651,"../scatter/calc_selection":928}],667:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatterpolar/defaults").handleRThetaDefaults,o=e("../bar/style_defaults"),a=e("./attributes");t.exports=function(e,t,n,s){function l(n,i){return r.coerce(e,t,a,n,i)}i(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),o(e,t,l,n,s),r.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}},{"../../lib":503,"../bar/style_defaults":663,"../scatterpolar/defaults":1002,"./attributes":665}],668:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../lib"),o=e("../bar/hover").getTraceColor,a=i.fillText,s=e("../scatterpolar/hover").makeHoverPointText,l=e("../../plots/polar/helpers").isPtInsidePolygon;t.exports=function(e,t,n){var c=e.cd,u=c[0].trace,h=e.subplot,d=h.radialAxis,f=h.angularAxis,p=h.vangles,g=p?l:i.isPtInsideSector,m=e.maxHoverDistance,v=f._period||2*Math.PI,y=Math.abs(d.g2p(Math.sqrt(t*t+n*n))),b=Math.atan2(n,t);d.range[0]>d.range[1]&&(b+=Math.PI);if(r.getClosest(c,(function(e){return g(y,b,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?m+Math.min(1,Math.abs(e.thetag1-e.thetag0)/v)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var _=c[e.index];e.x0=e.x1=_.ct[0],e.y0=e.y1=_.ct[1];var x=i.extendFlat({},_,{r:_.s,theta:_.p});return a(_,u,e),s(x,u,h,e),e.hovertemplate=u.hovertemplate,e.color=o(u,_),e.xLabelVal=e.yLabelVal=void 0,_.s<0&&(e.idealAlign="left"),[e]}}},{"../../components/fx":406,"../../lib":503,"../../plots/polar/helpers":621,"../bar/hover":655,"../scatterpolar/hover":1004}],669:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:e("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("../scatterpolar/format_labels"),style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../bar/select"),meta:{}}},{"../../plots/polar":622,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":944,"../scatterpolar/format_labels":1003,"./attributes":665,"./calc":666,"./defaults":667,"./hover":668,"./layout_attributes":670,"./layout_defaults":671,"./plot":672}],670:[function(e,t,n){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],671:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t,n){var o,a={};function s(n,a){return r.coerce(e[o]||{},t[o],i,n,a)}for(var l=0;l<n.length;l++){var c=n[l];"barpolar"===c.type&&!0===c.visible&&(a[o=c.subplot]||(s("barmode"),s("bargap"),a[o]=1))}}},{"../../lib":503,"./layout_attributes":670}],672:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("fast-isnumeric"),o=e("../../lib"),a=e("../../components/drawing"),s=e("../../plots/polar/helpers");t.exports=function(e,t,n){var l=t.xaxis,c=t.yaxis,u=t.radialAxis,h=t.angularAxis,d=function(e){var t=e.cxx,n=e.cyy;return e.vangles?function(r,i,a,l){var c,u;o.angleDelta(a,l)>0?(c=a,u=l):(c=l,u=a);var h=[s.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,e.vangles)[1]];return s.pathPolygonAnnulus(r,i,c,u,h,t,n)}:function(e,r,i,a){return o.pathAnnulus(e,r,i,a,t,n)}}(t),f=t.layers.frontplot.select("g.barlayer");o.makeTraceGroups(f,n,"trace bars").each((function(){var n=r.select(this),s=o.ensureSingle(n,"g","points").selectAll("g.point").data(o.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,n=r.select(this),a=e.rp0=u.c2p(e.s0),s=e.rp1=u.c2p(e.s1),f=e.thetag0=h.c2g(e.p0),p=e.thetag1=h.c2g(e.p1);if(i(a)&&i(s)&&i(f)&&i(p)&&a!==s&&f!==p){var g=u.c2g(e.s1),m=(f+p)/2;e.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],t=d(a,s,f,p)}else t="M0,0Z";o.ensureSingle(n,"path").attr("d",t)})),a.setClipUrl(n,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},{"../../components/drawing":388,"../../lib":503,"../../plots/polar/helpers":621,"@plotly/d3":58,"fast-isnumeric":190}],673:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../bar/attributes"),o=e("../../components/color/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../lib/extend").extendFlat,c=r.marker,u=c.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:l({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:l({},c.size,{arrayOk:!1,editType:"calc"}),color:l({},c.color,{arrayOk:!1,editType:"style"}),line:{color:l({},u.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:l({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:r.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:r.selected.marker,editType:"style"},unselected:{marker:r.unselected.marker,editType:"style"},text:l({},r.text,{}),hovertext:l({},r.hovertext,{}),hovertemplate:s({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926}],674:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../plots/cartesian/axes"),o=e("../../plots/cartesian/align_period"),a=e("../../lib"),s=e("../../constants/numerical").BADNUM,l=a._;t.exports=function(e,t){var n,c,y,b,_,x,w,A=e._fullLayout,k=i.getFromId(e,t.xaxis||"x"),T=i.getFromId(e,t.yaxis||"y"),S=[],E="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(y=k,b="x",_=T,x="y",w=!!t.yperiodalignment):(y=T,b="y",_=k,x="x",w=!!t.xperiodalignment);var C,M,O,L,D,I,R=function(e,t,n,i){var s,l=t+"0"in e;if(t in e||l&&"d"+t in e){var c=n.makeCalcdata(e,t);return[o(e,n,t,c).vals,c]}s=l?e[t+"0"]:"name"in e&&("category"===n.type||r(e.name)&&-1!==["linear","log"].indexOf(n.type)||a.isDateTime(e.name)&&"date"===n.type)?e.name:i;for(var u="multicategory"===n.type?n.r2c_just_indices(s):n.d2c(s,0,e[t+"calendar"]),h=e._length,d=new Array(h),f=0;f<h;f++)d[f]=u;return[d]}(t,x,_,A[E]),P=R[0],N=R[1],z=a.distinctVals(P,_),F=z.vals,B=z.minDiff/2,j="all"===(t.boxpoints||t.points)?a.identity:function(e){return e.v<C.lf||e.v>C.uf};if(t._hasPreCompStats){var U=t[b],V=function(e){return y.d2c((t[e]||[])[n])},q=1/0,H=-1/0;for(n=0;n<t._length;n++){var $=P[n];if(r($)){if((C={}).pos=C[x]=$,w&&N&&(C.orig_p=N[n]),C.q1=V("q1"),C.med=V("median"),C.q3=V("q3"),M=[],U&&a.isArrayOrTypedArray(U[n]))for(c=0;c<U[n].length;c++)(I=y.d2c(U[n][c]))!==s&&(u(D={v:I,i:[n,c]},t,[n,c]),M.push(D));if(C.pts=M.sort(h),L=(O=C[b]=M.map(d)).length,C.med!==s&&C.q1!==s&&C.q3!==s&&C.med>=C.q1&&C.q3>=C.med){var W=V("lowerfence");C.lf=W!==s&&W<=C.q1?W:f(C,O,L);var G=V("upperfence");C.uf=G!==s&&G>=C.q3?G:p(C,O,L);var Y=V("mean");C.mean=Y!==s?Y:L?a.mean(O,L):(C.q1+C.q3)/2;var X=V("sd");C.sd=Y!==s&&X>=0?X:L?a.stdev(O,L,C.mean):C.q3-C.q1,C.lo=g(C),C.uo=m(C);var Z=V("notchspan");Z=Z!==s&&Z>0?Z:v(C,L),C.ln=C.med-Z,C.un=C.med+Z;var K=C.lf,J=C.uf;t.boxpoints&&O.length&&(K=Math.min(K,O[0]),J=Math.max(J,O[L-1])),t.notched&&(K=Math.min(K,C.ln),J=Math.max(J,C.un)),C.min=K,C.max=J}else{var Q;a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+C.q1,"median = "+C.med,"q3 = "+C.q3].join("\n")),Q=C.med!==s?C.med:C.q1!==s?C.q3!==s?(C.q1+C.q3)/2:C.q1:C.q3!==s?C.q3:0,C.med=Q,C.q1=C.q3=Q,C.lf=C.uf=Q,C.mean=C.sd=Q,C.ln=C.un=Q,C.min=C.max=Q}q=Math.min(q,C.min),H=Math.max(H,C.max),C.pts2=M.filter(j),S.push(C)}}t._extremes[y._id]=i.findExtremes(y,[q,H],{padded:!0})}else{var ee=y.makeCalcdata(t,b),te=function(e,t){for(var n=e.length,r=new Array(n+1),i=0;i<n;i++)r[i]=e[i]-t;return r[n]=e[n-1]+t,r}(F,B),ne=F.length,re=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}(ne);for(n=0;n<t._length;n++)if(I=ee[n],r(I)){var ie=a.findBin(P[n],te);ie>=0&&ie<ne&&(u(D={v:I,i:n},t,n),re[ie].push(D))}var oe=1/0,ae=-1/0,se=t.quartilemethod,le="exclusive"===se,ce="inclusive"===se;for(n=0;n<ne;n++)if(re[n].length>0){var ue,he;(C={}).pos=C[x]=F[n],M=C.pts=re[n].sort(h),L=(O=C[b]=M.map(d)).length,C.min=O[0],C.max=O[L-1],C.mean=a.mean(O,L),C.sd=a.stdev(O,L,C.mean),C.med=a.interp(O,.5),L%2&&(le||ce)?(le?(ue=O.slice(0,L/2),he=O.slice(L/2+1)):ce&&(ue=O.slice(0,L/2+1),he=O.slice(L/2)),C.q1=a.interp(ue,.5),C.q3=a.interp(he,.5)):(C.q1=a.interp(O,.25),C.q3=a.interp(O,.75)),C.lf=f(C,O,L),C.uf=p(C,O,L),C.lo=g(C),C.uo=m(C);var de=v(C,L);C.ln=C.med-de,C.un=C.med+de,oe=Math.min(oe,C.ln),ae=Math.max(ae,C.un),C.pts2=M.filter(j),S.push(C)}t._extremes[y._id]=i.findExtremes(y,t.notched?ee.concat([oe,ae]):ee,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var n=0;n<e.length;n++){for(var r=e[n].pts||[],i={},o=0;o<r.length;o++)i[r[o].i]=o;a.tagSelected(r,t,i)}}(S,t),S.length>0?(S[0].t={num:A[E],dPos:B,posLetter:x,valLetter:b,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean?l(e,"mean :"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},A[E]++,S):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(e,t,n){for(var r in c)a.isArrayOrTypedArray(t[r])&&(Array.isArray(n)?a.isArrayOrTypedArray(t[r][n[0]])&&(e[c[r]]=t[r][n[0]][n[1]]):e[c[r]]=t[r][n])}function h(e,t){return e.v-t.v}function d(e){return e.v}function f(e,t,n){return 0===n?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,n-1)])}function p(e,t,n){return 0===n?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function g(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function v(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"fast-isnumeric":190}],675:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib"),o=e("../../plots/cartesian/constraints").getAxisGroup,a=["v","h"];function s(e,t,n,a){var s,l,c,u=t.calcdata,h=t._fullLayout,d=a._id,f=d.charAt(0),p=[],g=0;for(s=0;s<n.length;s++)for(c=u[n[s]],l=0;l<c.length;l++)p.push(a.c2l(c[l].pos,!0)),g+=(c[l].pts2||[]).length;if(p.length){var m=i.distinctVals(p);"category"!==a.type&&"multicategory"!==a.type||(m.minDiff=1);var v=m.minDiff/2;r.minDtick(a,m.minDiff,m.vals[0],!0);var y=h["violin"===e?"_numViolins":"_numBoxes"],b="group"===h[e+"mode"]&&y>1,_=1-h[e+"gap"],x=1-h[e+"groupgap"];for(s=0;s<n.length;s++){var w,A,k,T,S,E,C=(c=u[n[s]])[0].trace,M=c[0].t,O=C.width,L=C.side;if(O)w=A=T=O/2,k=0;else if(w=v,b){var D=o(h,a._id)+C.orientation,I=(h._alignmentOpts[D]||{})[C.alignmentgroup]||{},R=Object.keys(I.offsetGroups||{}).length,P=R||y;A=w*_*x/P,k=2*w*(((R?C._offsetIndex:M.num)+.5)/P-.5)*_,T=w*_/P}else A=w*_*x,k=0,T=w;M.dPos=w,M.bPos=k,M.bdPos=A,M.wHover=T;var N,z,F,B,j,U,V=k+A,q=Boolean(O);if("positive"===L?(S=w*(O?1:.5),N=V,E=N=k):"negative"===L?(S=N=k,E=w*(O?1:.5),z=V):(S=E=w,N=z=V),(C.boxpoints||C.points)&&g>0){var H=C.pointpos,$=C.jitter,W=C.marker.size/2,G=0;H+$>=0&&((G=V*(H+$))>S?(q=!0,j=W,F=G):G>N&&(j=W,F=S)),G<=S&&(F=S);var Y=0;H-$<=0&&((Y=-V*(H-$))>E?(q=!0,U=W,B=Y):Y>z&&(U=W,B=E)),Y<=E&&(B=E)}else F=S,B=E;var X=new Array(c.length);for(l=0;l<c.length;l++)X[l]=c[l].pos;C._extremes[d]=r.findExtremes(a,X,{padded:q,vpadminus:B,vpadplus:F,vpadLinearized:!0,ppadminus:{x:U,y:j}[f],ppadplus:{x:j,y:U}[f]})}}}t.exports={crossTraceCalc:function(e,t){for(var n=e.calcdata,r=t.xaxis,i=t.yaxis,o=0;o<a.length;o++){for(var l=a[o],c="h"===l?i:r,u=[],h=0;h<n.length;h++){var d=n[h],f=d[0].t,p=d[0].trace;!0!==p.visible||"box"!==p.type&&"candlestick"!==p.type||f.empty||(p.orientation||"v")!==l||p.xaxis!==r._id||p.yaxis!==i._id||u.push(h)}s("box",e,u,c)}},setPositionOffset:s}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../plots/cartesian/constraints":562}],676:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=e("../../components/color"),a=e("../scatter/period_defaults"),s=e("../bar/defaults").handleGroupingDefaults,l=e("../../plots/cartesian/axis_autotype"),c=e("./attributes");function u(e,t,n,o){function a(e){var t=0;return e&&e.length&&(t+=1,r.isArrayOrTypedArray(e[0])&&e[0].length&&(t+=1)),t}function s(t){return r.validate(e[t],c[t])}var u,h=n("y"),d=n("x");if("box"===t.type){var f=n("q1"),p=n("median"),g=n("q3");t._hasPreCompStats=f&&f.length&&p&&p.length&&g&&g.length,u=Math.min(r.minRowLength(f),r.minRowLength(p),r.minRowLength(g))}var m,v,y=a(h),b=a(d),_=y&&r.minRowLength(h),x=b&&r.minRowLength(d),w=o.calendar,A={autotypenumbers:o.autotypenumbers};if(t._hasPreCompStats)switch(String(b)+String(y)){case"00":var k=s("x0")||s("dx");m=!s("y0")&&!s("dy")||k?"v":"h",v=u;break;case"10":m="v",v=Math.min(u,x);break;case"20":m="h",v=Math.min(u,d.length);break;case"01":m="h",v=Math.min(u,_);break;case"02":m="v",v=Math.min(u,h.length);break;case"12":m="v",v=Math.min(u,x,h.length);break;case"21":m="h",v=Math.min(u,d.length,_);break;case"11":v=0;break;case"22":var T,S=!1;for(T=0;T<d.length;T++)if("category"===l(d[T],w,A)){S=!0;break}if(S)m="v",v=Math.min(u,x,h.length);else{for(T=0;T<h.length;T++)if("category"===l(h[T],w,A)){S=!0;break}S?(m="h",v=Math.min(u,d.length,_)):(m="v",v=Math.min(u,x,h.length))}}else y>0?(m="v",v=b>0?Math.min(x,_):Math.min(_)):b>0?(m="h",v=Math.min(x)):v=0;if(v){t._length=v;var E=n("orientation",m);t._hasPreCompStats?"v"===E&&0===b?(n("x0",0),n("dx",1)):"h"===E&&0===y&&(n("y0",0),n("dy",1)):"v"===E&&0===b?n("x0"):"h"===E&&0===y&&n("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o)}else t.visible=!1}function h(e,t,n,i){var o=i.prefix,a=r.coerce2(e,t,c,"marker.outliercolor"),s=n("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(a||s)&&(l="suspectedoutliers");var u=n(o+"points",l);u?(n("jitter","all"===u?.3:0),n("pointpos","all"===u?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.color",t.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===u&&(n("marker.line.outliercolor",t.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete t.marker;var h=n("hoveron");"all"!==h&&-1===h.indexOf("points")||n("hovertemplate"),r.coerceSelectionMarkerOpacity(t,n)}t.exports={supplyDefaults:function(e,t,n,i){function s(n,i){return r.coerce(e,t,c,n,i)}if(u(e,t,s,i),!1!==t.visible){a(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||n),s("line.width"),s("fillcolor",o.addOpacity(t.line.color,.5));var d=!1;if(l){var f=s("mean"),p=s("sd");f&&f.length&&(d=!0,p&&p.length&&(d="sd"))}s("boxmean",d),s("whiskerwidth"),s("width"),s("quartilemethod");var g=!1;if(l){var m=s("notchspan");m&&m.length&&(g=!0)}else r.validate(e.notchwidth,c.notchwidth)&&(g=!0);s("notched",g)&&s("notchwidth"),h(e,t,s,{prefix:"box"})}},crossTraceDefaults:function(e,t){var n,i;function o(e){return r.coerce(i._input,i,c,e)}for(var a=0;a<e.length;a++){var l=(i=e[a]).type;"box"!==l&&"violin"!==l||(n=i._input,"group"===t[l+"mode"]&&s(n,i,t,o))}},handleSampleDefaults:u,handlePointsDefaults:h}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/axis_autotype":555,"../../registry":638,"../bar/defaults":652,"../scatter/period_defaults":946,"./attributes":673}],677:[function(e,t,n){"use strict";t.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],678:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib"),o=e("../../components/fx"),a=e("../../components/color"),s=i.fillText;function l(e,t,n,s){var l,c,u,h,d,f,p,g,m,v,y,b,_,x,w=e.cd,A=e.xa,k=e.ya,T=w[0].trace,S=w[0].t,E="violin"===T.type,C=[],M=S.bdPos,O=S.wHover,L=function(e){return u.c2l(e.pos)+S.bPos-u.c2l(f)};E&&"both"!==T.side?("positive"===T.side&&(m=function(e){var t=L(e);return o.inbox(t,t+O,v)},b=M,_=0),"negative"===T.side&&(m=function(e){var t=L(e);return o.inbox(t-O,t,v)},b=0,_=M)):(m=function(e){var t=L(e);return o.inbox(t-O,t+O,v)},b=_=M),x=E?function(e){return o.inbox(e.span[0]-d,e.span[1]-d,v)}:function(e){return o.inbox(e.min-d,e.max-d,v)},"h"===T.orientation?(d=t,f=n,p=x,g=m,l="y",u=k,c="x",h=A):(d=n,f=t,p=m,g=x,l="x",u=A,c="y",h=k);var D=Math.min(1,M/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function I(e){return(p(e)+g(e))/2}v=e.maxHoverDistance-D,y=e.maxSpikeDistance-D;var R=o.getDistanceFunction(s,p,g,I);if(o.getClosest(w,R,e),!1===e.index)return[];var P=w[e.index],N=T.line.color,z=(T.marker||{}).color;a.opacity(N)&&T.line.width?e.color=N:a.opacity(z)&&T.boxpoints?e.color=z:e.color=T.fillcolor,e[l+"0"]=u.c2p(P.pos+S.bPos-_,!0),e[l+"1"]=u.c2p(P.pos+S.bPos+b,!0),e[l+"LabelVal"]=void 0!==P.orig_p?P.orig_p:P.pos;var F=l+"Spike";e.spikeDistance=I(P)*y/v,e[F]=u.c2p(P.pos,!0);var B={},j=["med","q1","q3","min","max"];(T.boxmean||(T.meanline||{}).visible)&&j.push("mean"),(T.boxpoints||T.points)&&j.push("lf","uf");for(var U=0;U<j.length;U++){var V=j[U];if(V in P&&!(P[V]in B)){B[P[V]]=!0;var q=P[V],H=h.c2p(q,!0),$=i.extendFlat({},e);$.attr=V,$[c+"0"]=$[c+"1"]=H,$[c+"LabelVal"]=q,$[c+"Label"]=(S.labels?S.labels[V]+" ":"")+r.hoverLabelText(h,q,T[c+"hoverformat"]),$.hoverOnBox=!0,"mean"===V&&"sd"in P&&"sd"===T.boxmean&&($[c+"err"]=P.sd),e.name="",e.spikeDistance=void 0,e[F]=void 0,$.hovertemplate=!1,C.push($)}}return C}function c(e,t,n){for(var r,a,l,c=e.cd,u=e.xa,h=e.ya,d=c[0].trace,f=u.c2p(t),p=h.c2p(n),g=o.quadrature((function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(u.c2p(e.x)-f)-t,1-3/t)}),(function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(h.c2p(e.y)-p)-t,1-3/t)})),m=!1,v=0;v<c.length;v++){a=c[v];for(var y=0;y<(a.pts||[]).length;y++){var b=g(l=a.pts[y]);b<=e.distance&&(e.distance=b,m=[v,y])}}if(!m)return!1;l=(a=c[m[0]]).pts[m[1]];var _=u.c2p(l.x,!0),x=h.c2p(l.y,!0),w=l.mrc||1;r=i.extendFlat({},e,{index:l.i,color:(d.marker||{}).color,name:d.name,x0:_-w,x1:_+w,y0:x-w,y1:x+w,spikeDistance:e.distance,hovertemplate:d.hovertemplate});var A,k=a.orig_p,T=void 0!==k?k:a.pos;return"h"===d.orientation?(A=h,r.xLabelVal=l.x,r.yLabelVal=T):(A=u,r.xLabelVal=T,r.yLabelVal=l.y),r[A._id.charAt(0)+"Spike"]=A.c2p(a.pos,!0),s(l,d,r),r}t.exports={hoverPoints:function(e,t,n,r){var i,o=e.cd[0].trace.hoveron,a=[];return-1!==o.indexOf("boxes")&&(a=a.concat(l(e,t,n,r))),-1!==o.indexOf("points")&&(i=c(e,t,n)),"closest"===r?i?[i]:a:i?(a.push(i),a):a},hoverOnBoxes:l,hoverOnPoints:c}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],679:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults").supplyLayoutDefaults,calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"box",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./attributes":673,"./calc":674,"./cross_trace_calc":675,"./defaults":676,"./event_data":677,"./hover":678,"./layout_attributes":680,"./layout_defaults":681,"./plot":682,"./select":683,"./style":684}],680:[function(e,t,n){"use strict";t.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},{}],681:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("./layout_attributes");function a(e,t,n,i,o){for(var a=o+"Layout",s=!1,l=0;l<n.length;l++){var c=n[l];if(r.traceIs(c,a)){s=!0;break}}s&&(i(o+"mode"),i(o+"gap"),i(o+"groupgap"))}t.exports={supplyLayoutDefaults:function(e,t,n){a(0,0,n,(function(n,r){return i.coerce(e,t,o,n,r)}),"box")},_supply:a}},{"../../lib":503,"../../registry":638,"./layout_attributes":680}],682:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing");function a(e,t,n,o){var a,s,l="h"===n.orientation,c=t.val,u=t.pos,h=!!u.rangebreaks,d=o.bPos,f=o.wdPos||0,p=o.bPosPxOffset||0,g=n.whiskerwidth||0,m=n.notched||!1,v=m?1-2*n.notchwidth:1;Array.isArray(o.bdPos)?(a=o.bdPos[0],s=o.bdPos[1]):(a=o.bdPos,s=o.bdPos);var y=e.selectAll("path.box").data("violin"!==n.type||n.box.visible?i.identity:[]);y.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),y.exit().remove(),y.each((function(e){if(e.empty)return"M0,0Z";var t=u.c2l(e.pos+d,!0),o=u.l2p(t-a)+p,y=u.l2p(t+s)+p,b=h?(o+y)/2:u.l2p(t)+p,_=n.whiskerwidth,x=h?o*_+(1-_)*b:u.l2p(t-f)+p,w=h?y*_+(1-_)*b:u.l2p(t+f)+p,A=u.l2p(t-a*v)+p,k=u.l2p(t+s*v)+p,T=c.c2p(e.q1,!0),S=c.c2p(e.q3,!0),E=i.constrain(c.c2p(e.med,!0),Math.min(T,S)+1,Math.max(T,S)-1),C=void 0===e.lf||!1===n.boxpoints,M=c.c2p(C?e.min:e.lf,!0),O=c.c2p(C?e.max:e.uf,!0),L=c.c2p(e.ln,!0),D=c.c2p(e.un,!0);l?r.select(this).attr("d","M"+E+","+A+"V"+k+"M"+T+","+o+"V"+y+(m?"H"+L+"L"+E+","+k+"L"+D+","+y:"")+"H"+S+"V"+o+(m?"H"+D+"L"+E+","+A+"L"+L+","+o:"")+"ZM"+T+","+b+"H"+M+"M"+S+","+b+"H"+O+(0===g?"":"M"+M+","+x+"V"+w+"M"+O+","+x+"V"+w)):r.select(this).attr("d","M"+A+","+E+"H"+k+"M"+o+","+T+"H"+y+(m?"V"+L+"L"+k+","+E+"L"+y+","+D:"")+"V"+S+"H"+o+(m?"V"+D+"L"+A+","+E+"L"+o+","+L:"")+"ZM"+b+","+T+"V"+M+"M"+b+","+S+"V"+O+(0===g?"":"M"+x+","+M+"H"+w+"M"+x+","+O+"H"+w))}))}function s(e,t,n,r){var a=t.x,s=t.y,l=r.bdPos,c=r.bPos,u=n.boxpoints||n.points;i.seedPseudoRandom();var h=e.selectAll("g.points").data(u?function(e){return e.forEach((function(e){e.t=r,e.trace=n})),e}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var d=h.selectAll("path").data((function(e){var t,r,o=e.pts2,a=Math.max((e.max-e.min)/10,e.q3-e.q1),s=1e-9*a,h=.01*a,d=[],f=0;if(n.jitter){if(0===a)for(f=1,d=new Array(o.length),t=0;t<o.length;t++)d[t]=1;else for(t=0;t<o.length;t++){var p=Math.max(0,t-5),g=o[p].v,m=Math.min(o.length-1,t+5),v=o[m].v;"all"!==u&&(o[t].v<e.lf?v=Math.min(v,e.lf):g=Math.max(g,e.uf));var y=Math.sqrt(h*(m-p)/(v-g+s))||0;y=i.constrain(Math.abs(y),0,1),d.push(y),f=Math.max(y,f)}r=2*n.jitter/(f||1)}for(t=0;t<o.length;t++){var b=o[t],_=b.v,x=n.jitter?r*d[t]*(i.pseudoRandom()-.5):0,w=e.pos+c+l*(n.pointpos+x);"h"===n.orientation?(b.y=w,b.x=_):(b.x=w,b.y=_),"suspectedoutliers"===u&&_<e.uo&&_>e.lo&&(b.so=!0)}return o}));d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(o.translatePoints,a,s)}function l(e,t,n,o){var a,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=o.bPos,d=o.bPosPxOffset||0,f=n.boxmean||(n.meanline||{}).visible;Array.isArray(o.bdPos)?(a=o.bdPos[0],s=o.bdPos[1]):(a=o.bdPos,s=o.bdPos);var p=e.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=c.c2l(e.pos+h,!0),i=c.l2p(t-a)+d,o=c.l2p(t+s)+d,p=u?(i+o)/2:c.l2p(t)+d,g=l.c2p(e.mean,!0),m=l.c2p(e.mean-e.sd,!0),v=l.c2p(e.mean+e.sd,!0);"h"===n.orientation?r.select(this).attr("d","M"+g+","+i+"V"+o+("sd"===f?"m0,0L"+m+","+p+"L"+g+","+i+"L"+v+","+p+"Z":"")):r.select(this).attr("d","M"+i+","+g+"H"+o+("sd"===f?"m0,0L"+p+","+m+"L"+i+","+g+"L"+p+","+v+"Z":""))}))}t.exports={plot:function(e,t,n,o){var c=t.xaxis,u=t.yaxis;i.makeTraceGroups(o,n,"trace boxes").each((function(e){var t,n,i=r.select(this),o=e[0],h=o.t,d=o.trace;h.wdPos=h.bdPos*d.whiskerwidth,!0!==d.visible||h.empty?i.remove():("h"===d.orientation?(t=u,n=c):(t=c,n=u),a(i,{pos:t,val:n},d,h),s(i,{x:c,y:u},d,h),l(i,{pos:t,val:n},d,h))}))},plotBoxAndWhiskers:a,plotPoints:s,plotBoxMean:l}},{"../../components/drawing":388,"../../lib":503,"@plotly/d3":58}],683:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i=e.cd,o=e.xaxis,a=e.yaxis,s=[];if(!1===t)for(n=0;n<i.length;n++)for(r=0;r<(i[n].pts||[]).length;r++)i[n].pts[r].selected=0;else for(n=0;n<i.length;n++)for(r=0;r<(i[n].pts||[]).length;r++){var l=i[n].pts[r],c=o.c2p(l.x),u=a.c2p(l.y);t.contains([c,u],null,l.i,e)?(s.push({pointNumber:l.i,x:o.c2d(l.x),y:a.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],684:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../components/drawing");t.exports={style:function(e,t,n){var a=n||r.select(e).selectAll("g.trace.boxes");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(t){var n=r.select(this),a=t[0].trace,s=a.line.width;function l(e,t,n,r){e.style("stroke-width",t+"px").call(i.stroke,n).call(i.fill,r)}var c=n.selectAll("path.box");if("candlestick"===a.type)c.each((function(e){if(!e.empty){var t=r.select(this),n=a[e.dir];l(t,n.line.width,n.line.color,n.fillcolor),t.style("opacity",a.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,a.line.color,a.fillcolor),n.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,a.line.color);var u=n.selectAll("path.point");o.pointStyle(u,a,e)}}))},styleOnSelect:function(e,t,n){var r=t[0].trace,i=n.selectAll("path.point");r.selectedpoints?o.selectedPointStyle(i,r):o.pointStyle(i,r,e)}}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],685:[function(e,t,n){"use strict";var r=e("../../lib").extendFlat,i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../ohlc/attributes"),a=e("../box/attributes");function s(e){return{line:{color:r({},a.line.color,{dflt:e}),width:a.line.width,editType:"style"},fillcolor:a.fillcolor,editType:"style"}}t.exports={xperiod:o.xperiod,xperiod0:o.xperiod0,xperiodalignment:o.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:o.x,open:o.open,high:o.high,low:o.low,close:o.close,line:{width:r({},a.line.width,{}),editType:"style"},increasing:s(o.increasing.line.color.dflt),decreasing:s(o.decreasing.line.color.dflt),text:o.text,hovertext:o.hovertext,whiskerwidth:r({},a.whiskerwidth,{dflt:0}),hoverlabel:o.hoverlabel}},{"../../lib":503,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673,"../ohlc/attributes":872}],686:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../plots/cartesian/align_period"),a=e("../ohlc/calc").calcCommon;function s(e,t,n,r){return{min:n,q1:Math.min(e,r),med:r,q3:Math.max(e,r),max:t}}t.exports=function(e,t){var n=e._fullLayout,l=i.getFromId(e,t.xaxis),c=i.getFromId(e,t.yaxis),u=l.makeCalcdata(t,"x"),h=o(t,l,"x",u).vals,d=a(e,t,u,h,c,s);return d.length?(r.extendFlat(d[0].t,{num:n._numBoxes,dPos:r.distinctVals(h).minDiff/2,posLetter:"x",valLetter:"y"}),n._numBoxes++,d):[{t:{empty:!0}}]}},{"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../ohlc/calc":873}],687:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../ohlc/ohlc_defaults"),a=e("../scatter/period_defaults"),s=e("./attributes");function l(e,t,n,r){var o=n(r+".line.color");n(r+".line.width",t.line.width),n(r+".fillcolor",i.addOpacity(o,.5))}t.exports=function(e,t,n,i){function c(n,i){return r.coerce(e,t,s,n,i)}o(e,t,c,i)?(a(e,t,i,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),l(0,t,c,"increasing"),l(0,t,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),i._requestRangeslider[t.xaxis]=!0):t.visible=!1}},{"../../components/color":366,"../../lib":503,"../ohlc/ohlc_defaults":877,"../scatter/period_defaults":946,"./attributes":685}],688:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"candlestick",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e("./attributes"),layoutAttributes:e("../box/layout_attributes"),supplyLayoutDefaults:e("../box/layout_defaults").supplyLayoutDefaults,crossTraceCalc:e("../box/cross_trace_calc").crossTraceCalc,supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("../box/plot").plot,layerName:"boxlayer",style:e("../box/style").style,hoverPoints:e("../ohlc/hover").hoverPoints,selectPoints:e("../ohlc/select")}},{"../../plots/cartesian":568,"../box/cross_trace_calc":675,"../box/layout_attributes":680,"../box/layout_defaults":681,"../box/plot":682,"../box/style":684,"../ohlc/hover":875,"../ohlc/select":879,"./attributes":685,"./calc":686,"./defaults":687}],689:[function(e,t,n){"use strict";var r=e("./axis_defaults"),i=e("../../plot_api/plot_template");t.exports=function(e,t,n,o,a){o("a")||(o("da"),o("a0")),o("b")||(o("db"),o("b0")),function(e,t,n,o){["aaxis","baxis"].forEach((function(a){var s=a.charAt(0),l=e[a]||{},c=i.newContainer(t,a),u={noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:t.font,name:a,data:e[s],calendar:t.calendar,dfltColor:o,bgColor:n.paper_bgcolor,autotypenumbersDflt:n.autotypenumbers,fullLayout:n};r(l,c,u),c._categories=c._categories||[],e[a]||"-"===l.type||(e[a]={type:l.type})}))}(e,t,n,a)}},{"../../plot_api/plot_template":543,"./axis_defaults":694}],690:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray;function i(e,t){if(!r(e)||t>=10)return null;for(var n=1/0,o=-1/0,a=e.length,s=0;s<a;s++){var l=e[s];if(r(l)){var c=i(l,t+1);c&&(n=Math.min(c[0],n),o=Math.max(c[1],o))}else n=Math.min(l,n),o=Math.max(l,o)}return[n,o]}t.exports=function(e){return i(e,0)}},{"../../lib":503}],691:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("./axis_attributes"),o=e("../../components/color/attributes"),a=r({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=o.defaultLine,t.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:i,baxis:i,font:a,color:{valType:"color",dflt:o.defaultLine,editType:"plot"},transforms:void 0}},{"../../components/color/attributes":365,"../../plots/font_attributes":585,"./axis_attributes":693}],692:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n,i){var o,a,s,l,c,u,h,d,f,p,g,m,v,y=r(n)?"a":"b",b=("a"===y?e.aaxis:e.baxis).smoothing,_="a"===y?e.a2i:e.b2j,x="a"===y?n:i,w="a"===y?i:n,A="a"===y?t.a.length:t.b.length,k="a"===y?t.b.length:t.a.length,T=Math.floor("a"===y?e.b2j(w):e.a2i(w)),S="a"===y?function(t){return e.evalxy([],t,T)}:function(t){return e.evalxy([],T,t)};b&&(s=Math.max(0,Math.min(k-2,T)),l=T-s,a="a"===y?function(t,n){return e.dxydi([],t,s,n,l)}:function(t,n){return e.dxydj([],s,t,l,n)});var E=_(x[0]),C=_(x[1]),M=E<C?1:-1,O=1e-8*(C-E),L=M>0?Math.floor:Math.ceil,D=M>0?Math.ceil:Math.floor,I=M>0?Math.min:Math.max,R=M>0?Math.max:Math.min,P=L(E+O),N=D(C-O),z=[[h=S(E)]];for(o=P;o*M<N*M;o+=M)c=[],g=R(E,o),v=(m=I(C,o+M))-g,u=Math.max(0,Math.min(A-2,Math.floor(.5*(g+m)))),d=S(m),b&&(f=a(u,g-u),p=a(u,m-u),c.push([h[0]+f[0]/3*v,h[1]+f[1]/3*v]),c.push([d[0]-p[0]/3*v,d[1]-p[1]/3*v])),c.push(d),z.push(c),h=d;return z}},{"../../lib":503}],693:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../../components/color/attributes"),o=e("../../plots/cartesian/layout_attributes"),a=e("../../plots/cartesian/axis_format_attributes").descriptionWithDates,s=e("../../plot_api/edit_types").overrideAll;t.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:r({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:o.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},tickfont:r({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:a("tick label")},tickformatstops:s(o.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgridcolor:{valType:"color",dflt:i.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:r({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},{"../../components/color/attributes":365,"../../plot_api/edit_types":536,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/layout_attributes":569,"../../plots/font_attributes":585}],694:[function(e,t,n){"use strict";var r=e("./attributes"),i=e("../../components/color").addOpacity,o=e("../../registry"),a=e("../../lib"),s=e("../../plots/cartesian/tick_value_defaults"),l=e("../../plots/cartesian/tick_label_defaults"),c=e("../../plots/cartesian/prefix_suffix_defaults"),u=e("../../plots/cartesian/category_order_defaults"),h=e("../../plots/cartesian/set_convert"),d=e("../../plots/cartesian/axis_autotype");t.exports=function(e,t,n){var f=n.letter,p=n.font||{},g=r[f+"axis"];function m(n,r){return a.coerce(e,t,g,n,r)}function v(n,r){return a.coerce2(e,t,g,n,r)}n.name&&(t._name=n.name,t._id=n.name),m("autotypenumbers",n.autotypenumbersDflt);var y=m("type");"-"===y&&(n.data&&function(e,t){if("-"===e.type){var n=e[e._id.charAt(0)+"calendar"];e.type=d(t,n,{autotypenumbers:e.autotypenumbers})}}(t,n.data),"-"===t.type?t.type="linear":y=e.type=t.type),m("smoothing"),m("cheatertype"),m("showticklabels"),m("labelprefix",f+" = "),m("labelsuffix"),m("showtickprefix"),m("showticksuffix"),m("separatethousands"),m("tickformat"),m("exponentformat"),m("minexponent"),m("showexponent"),m("categoryorder"),m("tickmode"),m("tickvals"),m("ticktext"),m("tick0"),m("dtick"),"array"===t.tickmode&&(m("arraytick0"),m("arraydtick")),m("labelpadding"),t._hovertitle=f,"date"===y&&o.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",n.calendar),h(t,n.fullLayout),t.c2p=a.identity;var b=m("color",n.dfltColor),_=b===e.color?b:p.color;m("title.text")&&(a.coerceFont(m,"title.font",{family:p.family,size:a.bigFont(p.size),color:_}),m("title.offset")),m("tickangle"),m("autorange",!t.isValidRange(e.range))&&m("rangemode"),m("range"),t.cleanRange(),m("fixedrange"),s(e,t,m,y),c(e,t,m,y,n),l(e,t,m,y,n),u(e,t,m,{data:n.data,dataAttr:f});var x=v("gridcolor",i(b,.3)),w=v("gridwidth"),A=m("showgrid");A||(delete t.gridcolor,delete t.gridwidth);var k=v("startlinecolor",b),T=v("startlinewidth",w);m("startline",t.showgrid||!!k||!!T)||(delete t.startlinecolor,delete t.startlinewidth);var S=v("endlinecolor",b),E=v("endlinewidth",w);return m("endline",t.showgrid||!!S||!!E)||(delete t.endlinecolor,delete t.endlinewidth),A?(m("minorgridcount"),m("minorgridwidth",w),m("minorgridcolor",i(x,.06)),t.minorgridcount||(delete t.minorgridwidth,delete t.minorgridcolor)):(delete t.gridcolor,delete t.gridWidth),"none"===t.showticklabels&&(delete t.tickfont,delete t.tickangle,delete t.showexponent,delete t.exponentformat,delete t.minexponent,delete t.tickformat,delete t.showticksuffix,delete t.showtickprefix),t.showticksuffix||delete t.ticksuffix,t.showtickprefix||delete t.tickprefix,m("tickmode"),t}},{"../../components/color":366,"../../lib":503,"../../plots/cartesian/axis_autotype":555,"../../plots/cartesian/category_order_defaults":559,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/set_convert":576,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_value_defaults":580,"../../registry":638,"./attributes":691}],695:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib").isArray1D,o=e("./cheater_basis"),a=e("./array_minmax"),s=e("./calc_gridlines"),l=e("./calc_labels"),c=e("./calc_clippath"),u=e("../heatmap/clean_2d_array"),h=e("./smooth_fill_2d_array"),d=e("../heatmap/convert_column_xyz"),f=e("./set_convert");t.exports=function(e,t){var n=r.getFromId(e,t.xaxis),p=r.getFromId(e,t.yaxis),g=t.aaxis,m=t.baxis,v=t.x,y=t.y,b=[];v&&i(v)&&b.push("x"),y&&i(y)&&b.push("y"),b.length&&d(t,g,m,"a","b",b);var _=t._a=t._a||t.a,x=t._b=t._b||t.b;v=t._x||t.x,y=t._y||t.y;var w={};if(t._cheater){var A="index"===g.cheatertype?_.length:_,k="index"===m.cheatertype?x.length:x;v=o(A,k,t.cheaterslope)}t._x=v=u(v),t._y=y=u(y),h(v,_,x),h(y,_,x),f(t),t.setScale();var T=a(v),S=a(y),E=.5*(T[1]-T[0]),C=.5*(T[1]+T[0]),M=.5*(S[1]-S[0]),O=.5*(S[1]+S[0]),L=1.3;return T=[C-E*L,C+E*L],S=[O-M*L,O+M*L],t._extremes[n._id]=r.findExtremes(n,T,{padded:!0}),t._extremes[p._id]=r.findExtremes(p,S,{padded:!0}),s(t,"a","b"),s(t,"b","a"),l(t,g),l(t,m),w.clipsegments=c(t._xctrl,t._yctrl,g,m),w.x=v,w.y=y,w.a=_,w.b=x,[w]}},{"../../lib":503,"../../plots/cartesian/axes":554,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"./array_minmax":690,"./calc_clippath":696,"./calc_gridlines":697,"./calc_labels":698,"./cheater_basis":700,"./set_convert":713,"./smooth_fill_2d_array":714}],696:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i,o,a,s=[],l=!!n.smoothing,c=!!r.smoothing,u=e[0].length-1,h=e.length-1;for(i=0,o=[],a=[];i<=u;i++)o[i]=e[0][i],a[i]=t[0][i];for(s.push({x:o,y:a,bicubic:l}),i=0,o=[],a=[];i<=h;i++)o[i]=e[i][u],a[i]=t[i][u];for(s.push({x:o,y:a,bicubic:c}),i=u,o=[],a=[];i>=0;i--)o[u-i]=e[h][i],a[u-i]=t[h][i];for(s.push({x:o,y:a,bicubic:l}),i=h,o=[],a=[];i>=0;i--)o[h-i]=e[i][0],a[h-i]=t[i][0];return s.push({x:o,y:a,bicubic:c}),s}},{}],697:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib/extend").extendFlat;t.exports=function(e,t,n){var o,a,s,l,c,u,h,d,f,p,g,m,v,y,b=e["_"+t],_=e[t+"axis"],x=_._gridlines=[],w=_._minorgridlines=[],A=_._boundarylines=[],k=e["_"+n],T=e[n+"axis"];"array"===_.tickmode&&(_.tickvals=b.slice());var S=e._xctrl,E=e._yctrl,C=S[0].length,M=S.length,O=e._a.length,L=e._b.length;r.prepTicks(_),"array"===_.tickmode&&delete _.tickvals;var D=_.smoothing?3:1;function I(r){var i,o,a,s,l,c,u,h,f,p,g,m,v=[],y=[],b={};if("b"===t)for(o=e.b2j(r),a=Math.floor(Math.max(0,Math.min(L-2,o))),s=o-a,b.length=L,b.crossLength=O,b.xy=function(t){return e.evalxy([],t,o)},b.dxy=function(t,n){return e.dxydi([],t,a,n,s)},i=0;i<O;i++)c=Math.min(O-2,i),u=i-c,h=e.evalxy([],i,o),T.smoothing&&i>0&&(f=e.dxydi([],i-1,a,0,s),v.push(l[0]+f[0]/3),y.push(l[1]+f[1]/3),p=e.dxydi([],i-1,a,1,s),v.push(h[0]-p[0]/3),y.push(h[1]-p[1]/3)),v.push(h[0]),y.push(h[1]),l=h;else for(i=e.a2i(r),c=Math.floor(Math.max(0,Math.min(O-2,i))),u=i-c,b.length=O,b.crossLength=L,b.xy=function(t){return e.evalxy([],i,t)},b.dxy=function(t,n){return e.dxydj([],c,t,u,n)},o=0;o<L;o++)a=Math.min(L-2,o),s=o-a,h=e.evalxy([],i,o),T.smoothing&&o>0&&(g=e.dxydj([],c,o-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=e.dxydj([],c,o-1,u,1),v.push(h[0]-m[0]/3),y.push(h[1]-m[1]/3)),v.push(h[0]),y.push(h[1]),l=h;return b.axisLetter=t,b.axis=_,b.crossAxis=T,b.value=r,b.constvar=n,b.index=d,b.x=v,b.y=y,b.smoothing=T.smoothing,b}function R(r){var i,o,a,s,l,c=[],u=[],h={};if(h.length=b.length,h.crossLength=k.length,"b"===t)for(a=Math.max(0,Math.min(L-2,r)),l=Math.min(1,Math.max(0,r-a)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,n){return e.dxydi([],t,a,n,l)},i=0;i<C;i++)c[i]=S[r*D][i],u[i]=E[r*D][i];else for(o=Math.max(0,Math.min(O-2,r)),s=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],r,t)},h.dxy=function(t,n){return e.dxydj([],o,t,s,n)},i=0;i<M;i++)c[i]=S[i][r*D],u[i]=E[i][r*D];return h.axisLetter=t,h.axis=_,h.crossAxis=T,h.value=b[r],h.constvar=n,h.index=r,h.x=c,h.y=u,h.smoothing=T.smoothing,h}if("array"===_.tickmode){for(l=5e-15,u=(c=[Math.floor((b.length-1-_.arraytick0)/_.arraydtick*(1+l)),Math.ceil(-_.arraytick0/_.arraydtick/(1+l))].sort((function(e,t){return e-t})))[0]-1,h=c[1]+1,d=u;d<h;d++)(a=_.arraytick0+_.arraydtick*d)<0||a>b.length-1||x.push(i(R(a),{color:_.gridcolor,width:_.gridwidth}));for(d=u;d<h;d++)if(s=_.arraytick0+_.arraydtick*d,g=Math.min(s+_.arraydtick,b.length-1),!(s<0||s>b.length-1||g<0||g>b.length-1))for(m=b[s],v=b[g],o=0;o<_.minorgridcount;o++)(y=g-s)<=0||(p=m+(v-m)*(o+1)/(_.minorgridcount+1)*(_.arraydtick/y))<b[0]||p>b[b.length-1]||w.push(i(I(p),{color:_.minorgridcolor,width:_.minorgridwidth}));_.startline&&A.push(i(R(0),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&A.push(i(R(b.length-1),{color:_.endlinecolor,width:_.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((b[b.length-1]-_.tick0)/_.dtick*(1+l)),Math.ceil((b[0]-_.tick0)/_.dtick/(1+l))].sort((function(e,t){return e-t})))[0],h=c[1],d=u;d<=h;d++)f=_.tick0+_.dtick*d,x.push(i(I(f),{color:_.gridcolor,width:_.gridwidth}));for(d=u-1;d<h+1;d++)for(f=_.tick0+_.dtick*d,o=0;o<_.minorgridcount;o++)(p=f+_.dtick*(o+1)/(_.minorgridcount+1))<b[0]||p>b[b.length-1]||w.push(i(I(p),{color:_.minorgridcolor,width:_.minorgridwidth}));_.startline&&A.push(i(I(b[0]),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&A.push(i(I(b[b.length-1]),{color:_.endlinecolor,width:_.endlinewidth}))}}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],698:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib/extend").extendFlat;t.exports=function(e,t){var n,o,a,s=t._labels=[],l=t._gridlines;for(n=0;n<l.length;n++)a=l[n],-1!==["start","both"].indexOf(t.showticklabels)&&(o=r.tickText(t,a.value),i(o,{prefix:undefined,suffix:undefined,endAnchor:!0,xy:a.xy(0),dxy:a.dxy(0,0),axis:a.axis,length:a.crossAxis.length,font:a.axis.tickfont,isFirst:0===n,isLast:n===l.length-1}),s.push(o)),-1!==["end","both"].indexOf(t.showticklabels)&&(o=r.tickText(t,a.value),i(o,{endAnchor:!1,xy:a.xy(a.crossLength-1),dxy:a.dxy(a.crossLength-2,1),axis:a.axis,length:a.crossAxis.length,font:a.axis.tickfont,isFirst:0===n,isLast:n===l.length-1}),s.push(o))}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],699:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i=e[0]-t[0],o=e[1]-t[1],a=n[0]-t[0],s=n[1]-t[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*r,h=(c*c*o-l*l*s)*r,d=c*(l+c)*3,f=l*(l+c)*3;return[[t[0]+(d&&u/d),t[1]+(d&&h/d)],[t[0]-(f&&u/f),t[1]-(f&&h/f)]]}},{}],700:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n){var i,o,a,s,l,c,u=[],h=r(e)?e.length:e,d=r(t)?t.length:t,f=r(e)?e:null,p=r(t)?t:null;f&&(a=(f.length-1)/(f[f.length-1]-f[0])/(h-1)),p&&(s=(p.length-1)/(p[p.length-1]-p[0])/(d-1));var g=1/0,m=-1/0;for(o=0;o<d;o++)for(u[o]=[],l=p?(p[o]-p[0])*s:o/(d-1),i=0;i<h;i++)c=(f?(f[i]-f[0])*a:i/(h-1))-l*n,g=Math.min(c,g),m=Math.max(c,m),u[o][i]=c;var v=1/(m-g),y=-g*v;for(o=0;o<d;o++)for(i=0;i<h;i++)u[o][i]=v*u[o][i]+y;return u}},{"../../lib":503}],701:[function(e,t,n){"use strict";var r=e("./catmull_rom"),i=e("../../lib").ensureArray;function o(e,t,n){var r=-.5*n[0]+1.5*t[0],i=-.5*n[1]+1.5*t[1];return[(2*r+e[0])/3,(2*i+e[1])/3]}t.exports=function(e,t,n,a,s,l){var c,u,h,d,f,p,g,m,v,y,b=n[0].length,_=n.length,x=s?3*b-2:b,w=l?3*_-2:_;for(e=i(e,w),t=i(t,w),h=0;h<w;h++)e[h]=i(e[h],x),t[h]=i(t[h],x);for(u=0,d=0;u<_;u++,d+=l?3:1)for(f=e[d],p=t[d],g=n[u],m=a[u],c=0,h=0;c<b;c++,h+=s?3:1)f[h]=g[c],p[h]=m[c];if(s)for(u=0,d=0;u<_;u++,d+=l?3:1){for(c=1,h=3;c<b-1;c++,h+=3)v=r([n[u][c-1],a[u][c-1]],[n[u][c],a[u][c]],[n[u][c+1],a[u][c+1]],s),e[d][h-1]=v[0][0],t[d][h-1]=v[0][1],e[d][h+1]=v[1][0],t[d][h+1]=v[1][1];y=o([e[d][0],t[d][0]],[e[d][2],t[d][2]],[e[d][3],t[d][3]]),e[d][1]=y[0],t[d][1]=y[1],y=o([e[d][x-1],t[d][x-1]],[e[d][x-3],t[d][x-3]],[e[d][x-4],t[d][x-4]]),e[d][x-2]=y[0],t[d][x-2]=y[1]}if(l)for(h=0;h<x;h++){for(d=3;d<w-3;d+=3)v=r([e[d-3][h],t[d-3][h]],[e[d][h],t[d][h]],[e[d+3][h],t[d+3][h]],l),e[d-1][h]=v[0][0],t[d-1][h]=v[0][1],e[d+1][h]=v[1][0],t[d+1][h]=v[1][1];y=o([e[0][h],t[0][h]],[e[2][h],t[2][h]],[e[3][h],t[3][h]]),e[1][h]=y[0],t[1][h]=y[1],y=o([e[w-1][h],t[w-1][h]],[e[w-3][h],t[w-3][h]],[e[w-4][h],t[w-4][h]]),e[w-2][h]=y[0],t[w-2][h]=y[1]}if(s&&l)for(d=1;d<w;d+=(d+1)%3==0?2:1){for(h=3;h<x-3;h+=3)v=r([e[d][h-3],t[d][h-3]],[e[d][h],t[d][h]],[e[d][h+3],t[d][h+3]],s),e[d][h-1]=.5*(e[d][h-1]+v[0][0]),t[d][h-1]=.5*(t[d][h-1]+v[0][1]),e[d][h+1]=.5*(e[d][h+1]+v[1][0]),t[d][h+1]=.5*(t[d][h+1]+v[1][1]);y=o([e[d][0],t[d][0]],[e[d][2],t[d][2]],[e[d][3],t[d][3]]),e[d][1]=.5*(e[d][1]+y[0]),t[d][1]=.5*(t[d][1]+y[1]),y=o([e[d][x-1],t[d][x-1]],[e[d][x-3],t[d][x-3]],[e[d][x-4],t[d][x-4]]),e[d][x-2]=.5*(e[d][x-2]+y[0]),t[d][x-2]=.5*(t[d][x-2]+y[1])}return[e,t]}},{"../../lib":503,"./catmull_rom":699}],702:[function(e,t,n){"use strict";t.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],703:[function(e,t,n){"use strict";t.exports=function(e,t,n){return t&&n?function(t,n,r,i,o){var a,s,l,c,u,h;t||(t=[]),n*=3,r*=3;var d=i*i,f=1-i,p=f*f,g=f*i*2,m=-3*p,v=3*(p-g),y=3*(g-d),b=3*d,_=o*o,x=_*o,w=1-o,A=w*w,k=A*w;for(h=0;h<e.length;h++)a=m*(u=e[h])[r][n]+v*u[r][n+1]+y*u[r][n+2]+b*u[r][n+3],s=m*u[r+1][n]+v*u[r+1][n+1]+y*u[r+1][n+2]+b*u[r+1][n+3],l=m*u[r+2][n]+v*u[r+2][n+1]+y*u[r+2][n+2]+b*u[r+2][n+3],c=m*u[r+3][n]+v*u[r+3][n+1]+y*u[r+3][n+2]+b*u[r+3][n+3],t[h]=k*a+3*(A*o*s+w*_*l)+x*c;return t}:t?function(t,n,r,i,o){var a,s,l,c;t||(t=[]),n*=3;var u=i*i,h=1-i,d=h*h,f=h*i*2,p=-3*d,g=3*(d-f),m=3*(f-u),v=3*u,y=1-o;for(l=0;l<e.length;l++)a=p*(c=e[l])[r][n]+g*c[r][n+1]+m*c[r][n+2]+v*c[r][n+3],s=p*c[r+1][n]+g*c[r+1][n+1]+m*c[r+1][n+2]+v*c[r+1][n+3],t[l]=y*a+o*s;return t}:n?function(t,n,r,i,o){var a,s,l,c,u,h;t||(t=[]),r*=3;var d=o*o,f=d*o,p=1-o,g=p*p,m=g*p;for(u=0;u<e.length;u++)a=(h=e[u])[r][n+1]-h[r][n],s=h[r+1][n+1]-h[r+1][n],l=h[r+2][n+1]-h[r+2][n],c=h[r+3][n+1]-h[r+3][n],t[u]=m*a+3*(g*o*s+p*d*l)+f*c;return t}:function(t,n,r,i,o){var a,s,l,c;t||(t=[]);var u=1-o;for(l=0;l<e.length;l++)a=(c=e[l])[r][n+1]-c[r][n],s=c[r+1][n+1]-c[r+1][n],t[l]=u*a+o*s;return t}}},{}],704:[function(e,t,n){"use strict";t.exports=function(e,t,n){return t&&n?function(t,n,r,i,o){var a,s,l,c,u,h;t||(t=[]),n*=3,r*=3;var d=i*i,f=d*i,p=1-i,g=p*p,m=g*p,v=o*o,y=1-o,b=y*y,_=y*o*2,x=-3*b,w=3*(b-_),A=3*(_-v),k=3*v;for(h=0;h<e.length;h++)a=x*(u=e[h])[r][n]+w*u[r+1][n]+A*u[r+2][n]+k*u[r+3][n],s=x*u[r][n+1]+w*u[r+1][n+1]+A*u[r+2][n+1]+k*u[r+3][n+1],l=x*u[r][n+2]+w*u[r+1][n+2]+A*u[r+2][n+2]+k*u[r+3][n+2],c=x*u[r][n+3]+w*u[r+1][n+3]+A*u[r+2][n+3]+k*u[r+3][n+3],t[h]=m*a+3*(g*i*s+p*d*l)+f*c;return t}:t?function(t,n,r,i,o){var a,s,l,c,u,h;t||(t=[]),n*=3;var d=o*o,f=d*o,p=1-o,g=p*p,m=g*p;for(u=0;u<e.length;u++)a=(h=e[u])[r+1][n]-h[r][n],s=h[r+1][n+1]-h[r][n+1],l=h[r+1][n+2]-h[r][n+2],c=h[r+1][n+3]-h[r][n+3],t[u]=m*a+3*(g*o*s+p*d*l)+f*c;return t}:n?function(t,n,r,i,o){var a,s,l,c;t||(t=[]),r*=3;var u=1-i,h=o*o,d=1-o,f=d*d,p=d*o*2,g=-3*f,m=3*(f-p),v=3*(p-h),y=3*h;for(l=0;l<e.length;l++)a=g*(c=e[l])[r][n]+m*c[r+1][n]+v*c[r+2][n]+y*c[r+3][n],s=g*c[r][n+1]+m*c[r+1][n+1]+v*c[r+2][n+1]+y*c[r+3][n+1],t[l]=u*a+i*s;return t}:function(t,n,r,i,o){var a,s,l,c;t||(t=[]);var u=1-i;for(l=0;l<e.length;l++)a=(c=e[l])[r+1][n]-c[r][n],s=c[r+1][n+1]-c[r][n+1],t[l]=u*a+i*s;return t}}},{}],705:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){var o=t-2,a=n-2;return r&&i?function(t,n,r){var i,s,l,c,u,h;t||(t=[]);var d=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(1,n-d)),g=Math.max(0,Math.min(1,r-f));d*=3,f*=3;var m=p*p,v=m*p,y=1-p,b=y*y,_=b*y,x=g*g,w=x*g,A=1-g,k=A*A,T=k*A;for(h=0;h<e.length;h++)i=_*(u=e[h])[f][d]+3*(b*p*u[f][d+1]+y*m*u[f][d+2])+v*u[f][d+3],s=_*u[f+1][d]+3*(b*p*u[f+1][d+1]+y*m*u[f+1][d+2])+v*u[f+1][d+3],l=_*u[f+2][d]+3*(b*p*u[f+2][d+1]+y*m*u[f+2][d+2])+v*u[f+2][d+3],c=_*u[f+3][d]+3*(b*p*u[f+3][d+1]+y*m*u[f+3][d+2])+v*u[f+3][d+3],t[h]=T*i+3*(k*g*s+A*x*l)+w*c;return t}:r?function(t,n,r){t||(t=[]);var i,s,l,c,u,h,d=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(1,n-d)),g=Math.max(0,Math.min(1,r-f));d*=3;var m=p*p,v=m*p,y=1-p,b=y*y,_=b*y,x=1-g;for(u=0;u<e.length;u++)i=x*(h=e[u])[f][d]+g*h[f+1][d],s=x*h[f][d+1]+g*h[f+1][d+1],l=x*h[f][d+2]+g*h[f+1][d+1],c=x*h[f][d+3]+g*h[f+1][d+1],t[u]=_*i+3*(b*p*s+y*m*l)+v*c;return t}:i?function(t,n,r){t||(t=[]);var i,s,l,c,u,h,d=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(1,n-d)),g=Math.max(0,Math.min(1,r-f));f*=3;var m=g*g,v=m*g,y=1-g,b=y*y,_=b*y,x=1-p;for(u=0;u<e.length;u++)i=x*(h=e[u])[f][d]+p*h[f][d+1],s=x*h[f+1][d]+p*h[f+1][d+1],l=x*h[f+2][d]+p*h[f+2][d+1],c=x*h[f+3][d]+p*h[f+3][d+1],t[u]=_*i+3*(b*g*s+y*m*l)+v*c;return t}:function(t,n,r){t||(t=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(1,n-u)),f=Math.max(0,Math.min(1,r-h)),p=1-f,g=1-d;for(l=0;l<e.length;l++)i=g*(c=e[l])[h][u]+d*c[h][u+1],s=g*c[h+1][u]+d*c[h+1][u+1],t[l]=p*i+f*s;return t}}},{}],706:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./xy_defaults"),o=e("./ab_defaults"),a=e("./attributes"),s=e("../../components/color/attributes");t.exports=function(e,t,n,l){function c(n,i){return r.coerce(e,t,a,n,i)}t._clipPathId="clip"+t.uid+"carpet";var u=c("color",s.defaultLine);r.coerceFont(c,"font"),c("carpet"),o(e,t,l,c,u),t.a&&t.b?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),i(e,t,c)||(t.visible=!1),t._cheater&&c("cheaterslope")):t.visible=!1}},{"../../components/color/attributes":365,"../../lib":503,"./ab_defaults":689,"./attributes":691,"./xy_defaults":715}],707:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),plot:e("./plot"),calc:e("./calc"),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"./attributes":691,"./calc":695,"./defaults":706,"./plot":712}],708:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n,r=e._fullData.length,i=0;i<r;i++){var o=e._fullData[i];if(o.index!==t.index&&"carpet"===o.type&&(n||(n=o),o.carpet===t.carpet))return o}return n}},{}],709:[function(e,t,n){"use strict";t.exports=function(e,t,n){if(0===e.length)return"";var r,i=[],o=n?3:1;for(r=0;r<e.length;r+=o)i.push(e[r]+","+t[r]),n&&r<e.length-o&&(i.push("C"),i.push([e[r+1]+","+t[r+1],e[r+2]+","+t[r+2]+" "].join(" ")));return i.join(n?"":"L")}},{}],710:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n){var i;for(r(e)?e.length>t.length&&(e=e.slice(0,t.length)):e=[],i=0;i<t.length;i++)e[i]=n(t[i]);return e}},{"../../lib":503}],711:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i,o){var a=i[0]*e.dpdx(t),s=i[1]*e.dpdy(n),l=1,c=1;if(o){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(i[0]*o[0]+i[1]*o[1])/u/h;c=Math.max(0,d)}var f=180*Math.atan2(s,a)/Math.PI;return f<-90?(f+=180,l=-l):f>90&&(f-=180,l=-l),{angle:f,flip:l,p:e.c2p(r,t,n),offsetMultplier:c}}},{}],712:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("./map_1d_array"),a=e("./makepath"),s=e("./orient_text"),l=e("../../lib/svg_text_utils"),c=e("../../lib"),u=c.strRotate,h=c.strTranslate,d=e("../../constants/alignment");function f(e,t,n,i,s,l){var c="const-"+s+"-lines",u=n.selectAll("."+c).data(l);u.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),u.each((function(n){var i=n,s=i.x,l=i.y,c=o([],s,e.c2p),u=o([],l,t.c2p),h="M"+a(c,u,i.smoothing);r.select(this).attr("d",h).style("stroke-width",i.width).style("stroke",i.color).style("fill","none")})),u.exit().remove()}function p(e,t,n,o,a,c,d,f){var p=c.selectAll("text."+f).data(d);p.enter().append("text").classed(f,!0);var g=0,m={};return p.each((function(a,c){var d;if("auto"===a.axis.tickangle)d=s(o,t,n,a.xy,a.dxy);else{var f=(a.axis.tickangle+180)*Math.PI/180;d=s(o,t,n,a.xy,[Math.cos(f),Math.sin(f)])}c||(m={angle:d.angle,flip:d.flip});var p=(a.endAnchor?-1:1)*d.flip,v=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,a.font).text(a.text).call(l.convertToTspans,e),y=i.bBox(this);v.attr("transform",h(d.p[0],d.p[1])+u(d.angle)+h(a.axis.labelpadding*p,.3*y.height)),g=Math.max(g,y.width+a.axis.labelpadding)})),p.exit().remove(),m.maxExtent=g,m}t.exports=function(e,t,n,i){var l=t.xaxis,u=t.yaxis,h=e._fullLayout._clips;c.makeTraceGroups(i,n,"trace").each((function(t){var n=r.select(this),i=t[0],d=i.trace,g=d.aaxis,m=d.baxis,y=c.ensureSingle(n,"g","minorlayer"),b=c.ensureSingle(n,"g","majorlayer"),_=c.ensureSingle(n,"g","boundarylayer"),x=c.ensureSingle(n,"g","labellayer");n.style("opacity",d.opacity),f(l,u,b,0,"a",g._gridlines),f(l,u,b,0,"b",m._gridlines),f(l,u,y,0,"a",g._minorgridlines),f(l,u,y,0,"b",m._minorgridlines),f(l,u,_,0,"a-boundary",g._boundarylines),f(l,u,_,0,"b-boundary",m._boundarylines);var w=p(e,l,u,d,0,x,g._labels,"a-label"),A=p(e,l,u,d,0,x,m._labels,"b-label");(function(e,t,n,r,i,o,a,l){var u,h,d,f,p=c.aggNums(Math.min,null,n.a),g=c.aggNums(Math.max,null,n.a),m=c.aggNums(Math.min,null,n.b),y=c.aggNums(Math.max,null,n.b);u=.5*(p+g),h=m,d=n.ab2xy(u,h,!0),f=n.dxyda_rough(u,h),void 0===a.angle&&c.extendFlat(a,s(n,i,o,d,n.dxydb_rough(u,h))),v(e,t,n,0,d,f,n.aaxis,i,o,a,"a-title"),u=p,h=.5*(m+y),d=n.ab2xy(u,h,!0),f=n.dxydb_rough(u,h),void 0===l.angle&&c.extendFlat(l,s(n,i,o,d,n.dxyda_rough(u,h))),v(e,t,n,0,d,f,n.baxis,i,o,l,"b-title")})(e,x,d,0,l,u,w,A),function(e,t,n,r,i){var s,l,u,h,d=n.select("#"+e._clipPathId);d.size()||(d=n.append("clipPath").classed("carpetclip",!0));var f=c.ensureSingle(d,"path","carpetboundary"),p=t.clipsegments,g=[];for(h=0;h<p.length;h++)s=p[h],l=o([],s.x,r.c2p),u=o([],s.y,i.c2p),g.push(a(l,u,s.bicubic));var m="M"+g.join("L")+"Z";d.attr("id",e._clipPathId),f.attr("d",m)}(d,i,h,l,u)}))};var g=d.LINE_SPACING,m=(1-d.MID_SHIFT)/g+1;function v(e,t,n,o,a,c,d,f,p,v,y){var b=[];d.title.text&&b.push(d.title.text);var _=t.selectAll("text."+y).data(b),x=v.maxExtent;_.enter().append("text").classed(y,!0),_.each((function(){var t=s(n,f,p,a,c);-1===["start","both"].indexOf(d.showticklabels)&&(x=0);var o=d.title.font.size;x+=o+d.title.offset;var y=(v.angle+(v.flip<0?180:0)-t.angle+450)%360,b=y>90&&y<270,_=r.select(this);_.text(d.title.text).call(l.convertToTspans,e),b&&(x=(-l.lineCount(_)+m)*g*o-x),_.attr("transform",h(t.p[0],t.p[1])+u(t.angle)+h(0,x)).attr("text-anchor","middle").call(i.font,d.title.font)})),_.exit().remove()}},{"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"./makepath":709,"./map_1d_array":710,"./orient_text":711,"@plotly/d3":58}],713:[function(e,t,n){"use strict";var r=e("./constants"),i=e("../../lib/search").findBin,o=e("./compute_control_points"),a=e("./create_spline_evaluator"),s=e("./create_i_derivative_evaluator"),l=e("./create_j_derivative_evaluator");t.exports=function(e){var t=e._a,n=e._b,c=t.length,u=n.length,h=e.aaxis,d=e.baxis,f=t[0],p=t[c-1],g=n[0],m=n[u-1],v=t[t.length-1]-t[0],y=n[n.length-1]-n[0],b=v*r.RELATIVE_CULL_TOLERANCE,_=y*r.RELATIVE_CULL_TOLERANCE;f-=b,p+=b,g-=_,m+=_,e.isVisible=function(e,t){return e>f&&e<p&&t>g&&t<m},e.isOccluded=function(e,t){return e<f||e>p||t<g||t>m},e.setScale=function(){var t=e._x,n=e._y,r=o(e._xctrl,e._yctrl,t,n,h.smoothing,d.smoothing);e._xctrl=r[0],e._yctrl=r[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,d.smoothing),e.dxydi=s([e._xctrl,e._yctrl],h.smoothing,d.smoothing),e.dxydj=l([e._xctrl,e._yctrl],h.smoothing,d.smoothing)},e.i2a=function(e){var n=Math.max(0,Math.floor(e[0]),c-2),r=e[0]-n;return(1-r)*t[n]+r*t[n+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*n[t]+r*n[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var n=Math.max(0,Math.min(i(e,t),c-2)),r=t[n],o=t[n+1];return Math.max(0,Math.min(c-1,n+(e-r)/(o-r)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,n),u-2)),r=n[t],o=n[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(o-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,n){return e.evalxy([],t,n)},e.ab2xy=function(r,i,o){if(!o&&(r<t[0]||r>t[c-1]|i<n[0]||i>n[u-1]))return[!1,!1];var a=e.a2i(r),s=e.b2j(i),l=e.evalxy([],a,s);if(o){var h,d,f,p,g=0,m=0,v=[];r<t[0]?(h=0,d=0,g=(r-t[0])/(t[1]-t[0])):r>t[c-1]?(h=c-2,d=1,g=(r-t[c-1])/(t[c-1]-t[c-2])):d=a-(h=Math.max(0,Math.min(c-2,Math.floor(a)))),i<n[0]?(f=0,p=0,m=(i-n[0])/(n[1]-n[0])):i>n[u-1]?(f=u-2,p=1,m=(i-n[u-1])/(n[u-1]-n[u-2])):p=s-(f=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(e.dxydi(v,h,f,d,p),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(e.dxydj(v,h,f,d,p),l[0]+=v[0]*m,l[1]+=v[1]*m)}return l},e.c2p=function(e,t,n){return[t.c2p(e[0]),n.c2p(e[1])]},e.p2x=function(e,t,n){return[t.p2c(e[0]),n.p2c(e[1])]},e.dadi=function(e){var n=Math.max(0,Math.min(t.length-2,e));return t[n+1]-t[n]},e.dbdj=function(e){var t=Math.max(0,Math.min(n.length-2,e));return n[t+1]-n[t]},e.dxyda=function(t,n,r,i){var o=e.dxydi(null,t,n,r,i),a=e.dadi(t,r);return[o[0]/a,o[1]/a]},e.dxydb=function(t,n,r,i){var o=e.dxydj(null,t,n,r,i),a=e.dbdj(n,i);return[o[0]/a,o[1]/a]},e.dxyda_rough=function(t,n,r){var i=v*(r||.1),o=e.ab2xy(t+i,n,!0),a=e.ab2xy(t-i,n,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dxydb_rough=function(t,n,r){var i=y*(r||.1),o=e.ab2xy(t,n+i,!0),a=e.ab2xy(t,n-i,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},{"../../lib/search":523,"./compute_control_points":701,"./constants":702,"./create_i_derivative_evaluator":703,"./create_j_derivative_evaluator":704,"./create_spline_evaluator":705}],714:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t,n){var i,o,a,s=[],l=[],c=e[0].length,u=e.length;function h(t,n){var r,i=0,o=0;return t>0&&void 0!==(r=e[n][t-1])&&(o++,i+=r),t<c-1&&void 0!==(r=e[n][t+1])&&(o++,i+=r),n>0&&void 0!==(r=e[n-1][t])&&(o++,i+=r),n<u-1&&void 0!==(r=e[n+1][t])&&(o++,i+=r),i/Math.max(1,o)}var d,f,p,g,m,v,y,b,_,x,w,A=0;for(i=0;i<c;i++)for(o=0;o<u;o++)void 0===e[o][i]&&(s.push(i),l.push(o),e[o][i]=h(i,o)),A=Math.max(A,Math.abs(e[o][i]));if(!s.length)return e;var k=0,T=0,S=s.length;do{for(k=0,a=0;a<S;a++){i=s[a],o=l[a];var E,C,M,O,L,D,I=0,R=0;0===i?(M=t[L=Math.min(c-1,2)],O=t[1],E=e[o][L],R+=(C=e[o][1])+(C-E)*(t[0]-O)/(O-M),I++):i===c-1&&(M=t[L=Math.max(0,c-3)],O=t[c-2],E=e[o][L],R+=(C=e[o][c-2])+(C-E)*(t[c-1]-O)/(O-M),I++),(0===i||i===c-1)&&o>0&&o<u-1&&(d=n[o+1]-n[o],R+=((f=n[o]-n[o-1])*e[o+1][i]+d*e[o-1][i])/(f+d),I++),0===o?(M=n[D=Math.min(u-1,2)],O=n[1],E=e[D][i],R+=(C=e[1][i])+(C-E)*(n[0]-O)/(O-M),I++):o===u-1&&(M=n[D=Math.max(0,u-3)],O=n[u-2],E=e[D][i],R+=(C=e[u-2][i])+(C-E)*(n[u-1]-O)/(O-M),I++),(0===o||o===u-1)&&i>0&&i<c-1&&(d=t[i+1]-t[i],R+=((f=t[i]-t[i-1])*e[o][i+1]+d*e[o][i-1])/(f+d),I++),I?R/=I:(p=t[i+1]-t[i],g=t[i]-t[i-1],b=(m=n[o+1]-n[o])*(v=n[o]-n[o-1])*(m+v),R=((y=p*g*(p+g))*(v*e[o+1][i]+m*e[o-1][i])+b*(g*e[o][i+1]+p*e[o][i-1]))/(b*(g+p)+y*(v+m))),k+=(x=(_=R-e[o][i])/A)*x,w=I?0:.85,e[o][i]+=_*(1+w)}k=Math.sqrt(k)}while(T++<100&&k>1e-5);return r.log("Smoother converged to",k,"after",T,"iterations"),e}},{"../../lib":503}],715:[function(e,t,n){"use strict";var r=e("../../lib").isArray1D;t.exports=function(e,t,n){var i=n("x"),o=i&&i.length,a=n("y"),s=a&&a.length;if(!o&&!s)return!1;if(t._cheater=!i,o&&!r(i)||s&&!r(a))t._length=null;else{var l=o?i.length:1/0;s&&(l=Math.min(l,a.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},{"../../lib":503}],716:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../scattergeo/attributes"),o=e("../../components/colorscale/attributes"),a=e("../../plots/attributes"),s=e("../../components/color/attributes").defaultLine,l=e("../../lib/extend").extendFlat,c=i.marker.line;t.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},a.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:r(),showlegend:l({},a.showlegend,{dflt:!1})},o("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattergeo/attributes":968}],717:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../constants/numerical").BADNUM,o=e("../../components/colorscale/calc"),a=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection");function l(e){return e&&"string"==typeof e}t.exports=function(e,t){var n,c=t._length,u=new Array(c);n=t.geojson?function(e){return l(e)||r(e)}:l;for(var h=0;h<c;h++){var d=u[h]={},f=t.locations[h],p=t.z[h];n(f)&&r(p)?(d.loc=f,d.z=p):(d.loc=null,d.z=i),d.index=h}return a(u,t),o(e,t,{vals:t.z,containerStr:"",cLetter:"z"}),s(u,t),u}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../scatter/arrays_to_calcdata":925,"../scatter/calc_selection":928,"fast-isnumeric":190}],718:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,n,a){function s(n,i){return r.coerce(e,t,o,n,i)}var l=s("locations"),c=s("z");if(l&&l.length&&r.isArrayOrTypedArray(c)&&c.length){t._length=Math.min(l.length,c.length);var u,h=s("geojson");("string"==typeof h&&""!==h||r.isPlainObject(h))&&(u="geojson-id"),"geojson-id"===s("locationmode",u)&&s("featureidkey"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),r.coerceSelectionMarkerOpacity(t,s)}else t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":716}],719:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){e.location=t.location,e.z=t.z;var o=r[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e.ct=o.ct,e}},{}],720:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("./attributes"),o=e("../../lib").fillText;t.exports=function(e,t,n){var a,s,l,c,u=e.cd,h=u[0].trace,d=e.subplot,f=[t,n],p=[t+360,n];for(s=0;s<u.length;s++)if(c=!1,(a=u[s])._polygons){for(l=0;l<a._polygons.length;l++)a._polygons[l].contains(f)&&(c=!c),a._polygons[l].contains(p)&&(c=!c);if(c)break}if(c&&a)return e.x0=e.x1=e.xa.c2p(a.ct),e.y0=e.y1=e.ya.c2p(a.ct),e.index=a.index,e.location=a.loc,e.z=a.z,e.zLabel=r.tickText(d.mockAxis,d.mockAxis.c2l(a.z),"hover").text,e.hovertemplate=a.hovertemplate,function(e,t,n){if(!t.hovertemplate){var r=n.hi||t.hoverinfo,a=String(n.loc),s="all"===r?i.hoverinfo.flags:r.split("+"),l=-1!==s.indexOf("name"),c=-1!==s.indexOf("location"),u=-1!==s.indexOf("z"),h=-1!==s.indexOf("text"),d=[];!l&&c?e.nameOverride=a:(l&&(e.nameOverride=t.name),c&&d.push(a)),u&&d.push(e.zLabel),h&&o(n,t,d),e.extraText=d.join("<br>")}}(e,h,a),[e]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./attributes":716}],721:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"choropleth",basePlotModule:e("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":589,"../heatmap/colorbar":795,"./attributes":716,"./calc":717,"./defaults":718,"./event_data":719,"./hover":720,"./plot":722,"./select":723,"./style":724}],722:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../lib/geo_location_utils"),a=e("../../lib/topojson_utils").getTopojsonFeatures,s=e("../../plots/cartesian/autorange").findExtremes,l=e("./style").style;t.exports={calcGeoJSON:function(e,t){for(var n=e[0].trace,r=t[n.geo],i=r._subplot,l=n.locationmode,c=n._length,u="geojson-id"===l?o.extractTraceFeature(e):a(n,i.topojson),h=[],d=[],f=0;f<c;f++){var p=e[f],g="geojson-id"===l?p.fOut:o.locationToFeature(l,p.loc,u);if(g){p.geojson=g,p.ct=g.properties.ct,p._polygons=o.feature2polygons(g);var m=o.computeBbox(g);h.push(m[0],m[2]),d.push(m[1],m[3])}else p.geojson=null}if("geojson"===r.fitbounds&&"geojson-id"===l){var v=o.computeBbox(o.getTraceGeojson(n));h=[v[0],v[2]],d=[v[1],v[3]]}var y={padded:!0};n._extremes.lon=s(r.lonaxis._ax,h,y),n._extremes.lat=s(r.lataxis._ax,d,y)},plot:function(e,t,n){var o=t.layers.backplot.select(".choroplethlayer");i.makeTraceGroups(o,n,"trace choropleth").each((function(t){var n=r.select(this).selectAll("path.choroplethlocation").data(i.identity);n.enter().append("path").classed("choroplethlocation",!0),n.exit().remove(),l(e,t)}))}}},{"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../plots/cartesian/autorange":553,"./style":724,"@plotly/d3":58}],723:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(n=0;n<s.length;n++)s[n].selected=0;else for(n=0;n<s.length;n++)(i=(r=s[n]).ct)&&(o=l.c2p(i),a=c.c2p(i),t.contains([o,a],null,n,e)?(u.push({pointNumber:n,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0);return u}},{}],724:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../components/drawing"),a=e("../../components/colorscale");function s(e,t){var n=t[0].trace,s=t[0].node3.selectAll(".choroplethlocation"),l=n.marker||{},c=l.line||{},u=a.makeColorScaleFuncFromTrace(n);s.each((function(e){r.select(this).attr("fill",u(e.z)).call(i.stroke,e.mlc||c.color).call(o.dashLine,"",e.mlw||c.width||0).style("opacity",l.opacity)})),o.selectedPointStyle(s,n,e)}t.exports={style:function(e,t){t&&s(e,t)},styleOnSelect:function(e,t){var n=t[0].node3,r=t[0].trace;r.selectedpoints?o.selectedPointStyle(n.selectAll(".choroplethlocation"),r,e):s(e,t)}}},{"../../components/color":366,"../../components/colorscale":378,"../../components/drawing":388,"@plotly/d3":58}],725:[function(e,t,n){"use strict";var r=e("../choropleth/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat;t.exports=s({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:s({},r.featureidkey,{}),below:{valType:"string",editType:"plot"},text:r.text,hovertext:r.hovertext,marker:{line:{color:s({},r.marker.line.color,{editType:"plot"}),width:s({},r.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:s({},r.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:s({},r.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:s({},r.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:r.hoverinfo,hovertemplate:o({},{keys:["properties"]}),showlegend:s({},a.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../choropleth/attributes":716}],726:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../components/colorscale"),a=e("../../components/drawing"),s=e("../../lib/geojson_utils").makeBlank,l=e("../../lib/geo_location_utils");function c(e){var t,n=e[0].trace,r=n._opts;if(n.selectedpoints){for(var o=a.makeSelectedPointStyleFns(n),s=0;s<e.length;s++){var l=e[s];l.fOut&&(l.fOut.properties.mo2=o.selectedOpacityFn(l))}t={type:"identity",property:"mo2"}}else t=i.isArrayOrTypedArray(n.marker.opacity)?{type:"identity",property:"mo"}:n.marker.opacity;return i.extendFlat(r.fill.paint,{"fill-opacity":t}),i.extendFlat(r.line.paint,{"line-opacity":t}),r}t.exports={convert:function(e){var t=e[0].trace,n=!0===t.visible&&0!==t._length,a={layout:{visibility:"none"},paint:{}},u={layout:{visibility:"none"},paint:{}},h=t._opts={fill:a,line:u,geojson:s()};if(!n)return h;var d=l.extractTraceFeature(e);if(!d)return h;var f,p,g,m=o.makeColorScaleFuncFromTrace(t),v=t.marker,y=v.line||{};i.isArrayOrTypedArray(v.opacity)&&(f=function(e){var t=e.mo;return r(t)?+i.constrain(t,0,1):0}),i.isArrayOrTypedArray(y.color)&&(p=function(e){return e.mlc}),i.isArrayOrTypedArray(y.width)&&(g=function(e){return e.mlw});for(var b=0;b<e.length;b++){var _=e[b],x=_.fOut;if(x){var w=x.properties;w.fc=m(_.z),f&&(w.mo=f(_)),p&&(w.mlc=p(_)),g&&(w.mlw=g(_)),_.ct=w.ct,_._polygons=l.feature2polygons(x)}}var A=f?{type:"identity",property:"mo"}:v.opacity;return i.extendFlat(a.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":A}),i.extendFlat(u.paint,{"line-color":p?{type:"identity",property:"mlc"}:y.color,"line-width":g?{type:"identity",property:"mlw"}:y.width,"line-opacity":A}),a.layout.visibility="visible",u.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:d},c(e),h},convertOnSelect:c}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/geojson_utils":497,"fast-isnumeric":190}],727:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,n,a){function s(n,i){return r.coerce(e,t,o,n,i)}var l=s("locations"),c=s("z"),u=s("geojson");r.isArrayOrTypedArray(l)&&l.length&&r.isArrayOrTypedArray(c)&&c.length&&("string"==typeof u&&""!==u||r.isPlainObject(u))?(s("featureidkey"),t._length=Math.min(l.length,c.length),s("below"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),r.coerceSelectionMarkerOpacity(t,s)):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":725}],728:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("../choropleth/calc"),plot:e("./plot"),hoverPoints:e("../choropleth/hover"),eventData:e("../choropleth/event_data"),selectPoints:e("../choropleth/select"),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var n=t.getMapLayers(),r=n.length-2;r>=0;r--){var i=n[r].id;if("string"==typeof i&&0===i.indexOf("water"))for(var o=r+1;o<n.length;o++)if("string"==typeof(i=n[o].id)&&-1===i.indexOf("plotly-"))return i}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},{"../../plots/mapbox":613,"../choropleth/calc":717,"../choropleth/event_data":719,"../choropleth/hover":720,"../choropleth/select":723,"../heatmap/colorbar":795,"./attributes":725,"./defaults":727,"./plot":729}],729:[function(e,t,n){"use strict";var r=e("./convert").convert,i=e("./convert").convertOnSelect,o=e("../../plots/mapbox/constants").traceLayerPrefix;function a(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",o+t+"-fill"],["line",o+t+"-line"]],this.below=null}var s=a.prototype;s.update=function(e){this._update(r(e))},s.updateOnSelect=function(e){this._update(i(e))},s._update=function(e){var t=this.subplot,n=this.layerList,r=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),r!==this.below&&(this._removeLayers(),this._addLayers(e,r),this.below=r);for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1],l=e[a];t.setOptions(s,"setLayoutProperty",l.layout),"visible"===l.layout.visibility&&t.setOptions(s,"setPaintProperty",l.paint)}},s._addLayers=function(e,t){for(var n=this.subplot,r=this.layerList,i=this.sourceId,o=0;o<r.length;o++){var a=r[o],s=a[0],l=e[s];n.addLayer({type:s,id:a[1],source:i,layout:l.layout,paint:l.paint},t)}},s._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,n=t.length-1;n>=0;n--)e.removeLayer(t[n][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}},{"../../plots/mapbox/constants":611,"./convert":726}],730:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../mesh3d/attributes"),s=e("../../plots/attributes"),l=e("../../lib/extend").extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:o({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,r("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,t.exports=c},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],731:[function(e,t,n){"use strict";var r=e("../../components/colorscale/calc");t.exports=function(e,t){for(var n=t.u,i=t.v,o=t.w,a=Math.min(t.x.length,t.y.length,t.z.length,n.length,i.length,o.length),s=-1/0,l=1/0,c=0;c<a;c++){var u=n[c],h=i[c],d=o[c],f=Math.sqrt(u*u+h*h+d*d);s=Math.max(s,f),l=Math.min(l,f)}t._len=a,t._normMax=s,r(e,t,{vals:[l,s],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],732:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_cone3d,i=e("../../../stackgl_modules").gl_cone3d.createConeMesh,o=e("../../lib").simpleMap,a=e("../../lib/gl_format_color").parseColorScale,s=e("../../components/colorscale").extractOpts,l=e("../../plots/gl3d/zip3");function c(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var u=c.prototype;u.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,n=this.data.x[t],r=this.data.y[t],i=this.data.z[t],o=this.data.u[t],a=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[n,r,i,o,a,s,Math.sqrt(o*o+a*a+s*s)];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&void 0!==l[t]?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var h={xaxis:0,yaxis:1,zaxis:2},d={tip:1,tail:0,cm:.25,center:.5},f={tip:1,tail:1,cm:.75,center:.5};function p(e,t){var n=e.fullSceneLayout,i=e.dataScale,c={};function u(e,t){var r=n[t],a=i[h[t]];return o(e,(function(e){return r.d2l(e)*a}))}c.vectors=l(u(t.u,"xaxis"),u(t.v,"yaxis"),u(t.w,"zaxis"),t._len),c.positions=l(u(t.x,"xaxis"),u(t.y,"yaxis"),u(t.z,"zaxis"),t._len);var p=s(t);c.colormap=a(t),c.vertexIntensityBounds=[p.min/t._normMax,p.max/t._normMax],c.coneOffset=d[t.anchor],"scaled"===t.sizemode?c.coneSize=t.sizeref||.5:c.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5;var g=r(c),m=t.lightposition;return g.lightPosition=[m.x,m.y,m.z],g.ambient=t.lighting.ambient,g.diffuse=t.lighting.diffuse,g.specular=t.lighting.specular,g.roughness=t.lighting.roughness,g.fresnel=t.lighting.fresnel,g.opacity=t.opacity,t._pad=f[t.anchor]*g.vectorScale*g.coneScale*t._normMax,g}u.update=function(e){this.data=e;var t=p(this.scene,e);this.mesh.update(t)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,r=p(e,t),o=i(n,r),a=new c(e,t.uid);return a.mesh=o,a.data=t,o._trace=a,e.glplot.add(o),a}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],733:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,n,a){function s(n,i){return r.coerce(e,t,o,n,i)}var l=s("u"),c=s("v"),u=s("w"),h=s("x"),d=s("y"),f=s("z");l&&l.length&&c&&c.length&&u&&u.length&&h&&h.length&&d&&d.length&&f&&f.length?(s("sizeref"),s("sizemode"),s("anchor"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),i(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":730}],734:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"cone",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:e("./calc"),plot:e("./convert"),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}},{"../../plots/gl3d":598,"./attributes":730,"./calc":731,"./convert":732,"./defaults":733}],735:[function(e,t,n){"use strict";var r=e("../heatmap/attributes"),i=e("../scatter/attributes"),o=e("../../plots/cartesian/axis_format_attributes"),a=o.axisHoverFormat,s=o.descriptionOnlyNumbers,l=e("../../components/colorscale/attributes"),c=e("../../components/drawing/attributes").dash,u=e("../../plots/font_attributes"),h=e("../../lib/extend").extendFlat,d=e("../../constants/filter_ops"),f=d.COMPARISON_OPS2,p=d.INTERVAL_OPS,g=i.line;t.exports=h({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,texttemplate:h({},r.texttemplate,{}),textfont:h({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:h({},r.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:u({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:s("contour label")},operation:{valType:"enumerated",values:[].concat(f).concat(p),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:h({},g.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:c,smoothing:h({},g.smoothing,{}),editType:"plot"}},l("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../constants/filter_ops":475,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../heatmap/attributes":792,"../scatter/attributes":926}],736:[function(e,t,n){"use strict";var r=e("../../components/colorscale"),i=e("../heatmap/calc"),o=e("./set_contours"),a=e("./end_plus");t.exports=function(e,t){var n=i(e,t),s=n[0].z;o(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,d=a(c),f=c.size||1,p=Math.floor((d-h)/f)+1;isFinite(f)||(f=1,p=1);var g=h-f/2;l=[g,g+p*f]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),n}},{"../../components/colorscale":378,"../heatmap/calc":793,"./end_plus":746,"./set_contours":754}],737:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r=e[0],i=r.z;switch(t.type){case"levels":var o=Math.min(i[0][0],i[0][1]);for(n=0;n<e.length;n++){var a=e[n];a.prefixBoundary=!a.edgepaths.length&&(o>a.level||a.starts.length&&o===a.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,c=-1/0,u=1/0;for(n=0;n<l;n++)u=Math.min(u,i[n][0]),u=Math.min(u,i[n][s-1]),c=Math.max(c,i[n][0]),c=Math.max(c,i[n][s-1]);for(n=1;n<s-1;n++)u=Math.min(u,i[0][n]),u=Math.min(u,i[l-1][n]),c=Math.max(c,i[0][n]),c=Math.max(c,i[l-1][n]);var h,d,f=t.value;switch(t._operation){case">":f>c&&(r.prefixBoundary=!0);break;case"<":(f<u||r.starts.length&&f===u)&&(r.prefixBoundary=!0);break;case"[]":h=Math.min(f[0],f[1]),((d=Math.max(f[0],f[1]))<u||h>c||r.starts.length&&d===u)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),h<u&&d>c&&(r.prefixBoundary=!0)}}}},{}],738:[function(e,t,n){"use strict";var r=e("../../components/colorscale"),i=e("./make_color_map"),o=e("./end_plus");t.exports={min:"zmin",max:"zmax",calc:function(e,t,n){var a=t.contours,s=t.line,l=a.size||1,c=a.coloring,u=i(t,{isColorbar:!0});if("heatmap"===c){var h=r.extractOpts(t);n._fillgradient=h.reversescale?r.flipScale(h.colorscale):h.colorscale,n._zrange=[h.min,h.max]}else"fill"===c&&(n._fillcolor=u);n._line={color:"lines"===c?u:s.color,width:!1!==a.showlines?s.width:0,dash:s.dash},n._levels={start:a.start,end:o(a),size:l}}}},{"../../components/colorscale":378,"./end_plus":746,"./make_color_map":751}],739:[function(e,t,n){"use strict";t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],740:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("./label_defaults"),o=e("../../components/color"),a=o.addOpacity,s=o.opacity,l=e("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;t.exports=function(e,t,n,o,l,h){var d,f,p,g=t.contours,m=n("contours.operation");g._operation=c[m],function(e,t){var n;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(n=parseFloat(t.value[0]),t.value=[n,n+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r(t.value)&&(n=parseFloat(t.value),t.value=[n,n+1])):(e("contours.value",0),r(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(n,g),"="===m?d=g.showlines=!0:(d=n("contours.showlines"),p=n("fillcolor",a((e.line||{}).color||l,.5))),d&&(f=n("line.color",p&&s(p)?a(t.fillcolor,1):l),n("line.width",2),n("line.dash")),n("line.smoothing"),i(n,o,f,h)}},{"../../components/color":366,"../../constants/filter_ops":475,"./label_defaults":750,"fast-isnumeric":190}],741:[function(e,t,n){"use strict";var r=e("../../constants/filter_ops"),i=e("fast-isnumeric");function o(e,t){var n,o=Array.isArray(t);function a(e){return i(e)?+e:null}return-1!==r.COMPARISON_OPS2.indexOf(e)?n=a(o?t[0]:t):-1!==r.INTERVAL_OPS.indexOf(e)?n=o?[a(t[0]),a(t[1])]:[a(t),a(t)]:-1!==r.SET_OPS.indexOf(e)&&(n=o?t.map(a):[a(t)]),n}function a(e){return function(t){t=o(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function s(e){return function(t){return{start:t=o(e,t),end:1/0,size:1/0}}}t.exports={"[]":a("[]"),"][":a("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":475,"fast-isnumeric":190}],742:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i=r("contours.start"),o=r("contours.end"),a=!1===i||!1===o,s=n("contours.size");!(a?t.autocontour=!0:n("autocontour",!1))&&s||n("ncontours")}},{}],743:[function(e,t,n){"use strict";var r=e("../../lib");function i(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var n,o,a,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),o=e[0],n=0;n<o.edgepaths.length;n++)o.edgepaths[n]=s(o.edgepaths[n]);for(n=0;n<o.paths.length;n++)o.paths[n]=s(o.paths[n]);for(n=0;n<o.starts.length;n++)o.starts[n]=s(o.starts[n]);return e;case"][":var c=s;s=l,l=c;case"[]":for(2!==e.length&&r.warn("Contour data invalid for the specified inequality range operation."),o=i(e[0]),a=i(e[1]),n=0;n<o.edgepaths.length;n++)o.edgepaths[n]=s(o.edgepaths[n]);for(n=0;n<o.paths.length;n++)o.paths[n]=s(o.paths[n]);for(n=0;n<o.starts.length;n++)o.starts[n]=s(o.starts[n]);for(;a.edgepaths.length;)o.edgepaths.push(l(a.edgepaths.shift()));for(;a.paths.length;)o.paths.push(l(a.paths.shift()));for(;a.starts.length;)o.starts.push(l(a.starts.shift()));return[o]}}},{"../../lib":503}],744:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../heatmap/xyz_defaults"),o=e("../scatter/period_defaults"),a=e("./constraint_defaults"),s=e("./contours_defaults"),l=e("./style_defaults"),c=e("../heatmap/label_defaults"),u=e("./attributes");t.exports=function(e,t,n,h){function d(n,i){return r.coerce(e,t,u,n,i)}if(i(e,t,d,h)){o(e,t,h,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate");var f="constraint"===d("contours.type");d("connectgaps",r.isArray1D(t.z)),f?a(e,t,d,h,n):(s(e,t,d,(function(n){return r.coerce2(e,t,u,n)})),l(e,t,d,h)),t.contours&&"heatmap"===t.contours.coloring&&c(d,h)}else t.visible=!1}},{"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/xyz_defaults":807,"../scatter/period_defaults":946,"./attributes":735,"./constraint_defaults":740,"./contours_defaults":742,"./style_defaults":756}],745:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./constraint_mapping"),o=e("./end_plus");t.exports=function(e,t,n){for(var a="constraint"===e.type?i[e._operation](e.value):e,s=a.size,l=[],c=o(a),u=n.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:n.a,y:n.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y},d=a.start;d<c;d+=s)if(l.push(r.extendFlat({level:d,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},h)),l.length>1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}},{"../../lib":503,"./constraint_mapping":741,"./end_plus":746}],746:[function(e,t,n){"use strict";t.exports=function(e){return e.end+e.size/1e6}},{}],747:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./constants");function o(e,t,n,r){return Math.abs(e[0]-t[0])<n&&Math.abs(e[1]-t[1])<r}function a(e,t,n,a,l){var c,u=t.join(","),h=e.crossings[u],d=function(e,t,n){var r=0,o=0;return e>20&&t?208===e||1114===e?r=0===n[0]?1:-1:o=0===n[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(e)?o=1:-1!==i.LEFTSTART.indexOf(e)?r=1:-1!==i.TOPSTART.indexOf(e)?o=-1:r=-1,[r,o]}(h,n,t),f=[s(e,t,[-d[0],-d[1]])],p=e.z.length,g=e.z[0].length,m=t.slice(),v=d.slice();for(c=0;c<1e4;c++){if(h>20?(h=i.CHOOSESADDLE[h][(d[0]||d[1])<0?0:1],e.crossings[u]=i.SADDLEREMAINDER[h]):delete e.crossings[u],!(d=i.NEWDELTA[h])){r.log("Found bad marching index:",h,t,e.level);break}f.push(s(e,t,d)),t[0]+=d[0],t[1]+=d[1],u=t.join(","),o(f[f.length-1],f[f.length-2],a,l)&&f.pop();var y=d[0]&&(t[0]<0||t[0]>g-2)||d[1]&&(t[1]<0||t[1]>p-2);if(t[0]===m[0]&&t[1]===m[1]&&d[0]===v[0]&&d[1]===v[1]||n&&y)break;h=e.crossings[u]}1e4===c&&r.log("Infinite loop in contour?");var b,_,x,w,A,k,T,S,E,C,M,O,L,D,I,R=o(f[0],f[f.length-1],a,l),P=0,N=.2*e.smoothing,z=[],F=0;for(c=1;c<f.length;c++)P+=(O=f[c],L=f[c-1],D=void 0,I=void 0,D=O[2]-L[2],I=O[3]-L[3],T=Math.sqrt(D*D+I*I)),z.push(T);var B=P/z.length*N;function j(e){return f[e%f.length]}for(c=f.length-2;c>=F;c--)if((b=z[c])<B){for(x=0,_=c-1;_>=F&&b+z[_]<B;_--)b+=z[_];if(R&&c===f.length-2)for(x=0;x<_&&b+z[x]<B;x++)b+=z[x];A=c-_+x+1,k=Math.floor((c+_+x+2)/2),w=R||c!==f.length-2?R||-1!==_?A%2?j(k):[(j(k)[0]+j(k+1)[0])/2,(j(k)[1]+j(k+1)[1])/2]:f[0]:f[f.length-1],f.splice(_+1,c-_+1,w),c=_+1,x&&(F=x),R&&(c===f.length-2?f[x]=f[f.length-1]:0===c&&(f[f.length-1]=f[0]))}for(f.splice(0,F),c=0;c<f.length;c++)f[c].length=2;if(!(f.length<2))if(R)f.pop(),e.paths.push(f);else{n||r.log("Unclosed interior contour?",e.level,m.join(","),f.join("L"));var U=!1;for(S=0;S<e.edgepaths.length;S++)if(C=e.edgepaths[S],!U&&o(C[0],f[f.length-1],a,l)){f.pop(),U=!0;var V=!1;for(E=0;E<e.edgepaths.length;E++)if(o((M=e.edgepaths[E])[M.length-1],f[0],a,l)){V=!0,f.shift(),e.edgepaths.splice(S,1),E===S?e.paths.push(f.concat(M)):(E>S&&E--,e.edgepaths[E]=M.concat(f,C));break}V||(e.edgepaths[S]=f.concat(C))}for(S=0;S<e.edgepaths.length&&!U;S++)o((C=e.edgepaths[S])[C.length-1],f[0],a,l)&&(f.shift(),e.edgepaths[S]=C.concat(f),U=!0);U||e.edgepaths.push(f)}}function s(e,t,n){var r=t[0]+Math.max(n[0],0),i=t[1]+Math.max(n[1],0),o=e.z[i][r],a=e.xaxis,s=e.yaxis;if(n[1]){var l=(e.level-o)/(e.z[i][r+1]-o),c=(1!==l?(1-l)*a.c2l(e.x[r]):0)+(0!==l?l*a.c2l(e.x[r+1]):0);return[a.c2p(a.l2c(c),!0),s.c2p(e.y[i],!0),r+l,i]}var u=(e.level-o)/(e.z[i+1][r]-o),h=(1!==u?(1-u)*s.c2l(e.y[i]):0)+(0!==u?u*s.c2l(e.y[i+1]):0);return[a.c2p(e.x[r],!0),s.c2p(s.l2c(h),!0),r,i+u]}t.exports=function(e,t,n){var i,o,s,l;for(t=t||.01,n=n||.01,o=0;o<e.length;o++){for(s=e[o],l=0;l<s.starts.length;l++)a(s,s.starts[l],"edge",t,n);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,a(s,Object.keys(s.crossings)[0].split(",").map(Number),void 0,t,n);1e4===i&&r.log("Infinite loop in contour?")}}},{"../../lib":503,"./constants":739}],748:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../heatmap/hover");t.exports=function(e,t,n,o,a){a||(a={}),a.isContour=!0;var s=i(e,t,n,o,a);return s&&s.forEach((function(e){var t=e.trace;"constraint"===t.contours.type&&(t.fillcolor&&r.opacity(t.fillcolor)?e.color=r.addOpacity(t.fillcolor,1):t.contours.showlines&&r.opacity(t.line.color)&&(e.color=r.addOpacity(t.line.color,1)))})),s}},{"../../components/color":366,"../heatmap/hover":799}],749:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot").plot,style:e("./style"),colorbar:e("./colorbar"),hoverPoints:e("./hover"),moduleType:"trace",name:"contour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},{"../../plots/cartesian":568,"./attributes":735,"./calc":736,"./colorbar":738,"./defaults":744,"./hover":748,"./plot":753,"./style":755}],750:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t,n,i){if(i||(i={}),e("contours.showlabels")){var o=t.font;r.coerceFont(e,"contours.labelfont",{family:o.family,size:o.size,color:n}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}},{"../../lib":503}],751:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/colorscale"),o=e("./end_plus");t.exports=function(e){var t=e.contours,n=t.start,a=o(t),s=t.size||1,l=Math.floor((a-n)/s)+1,c="lines"===t.coloring?0:1,u=i.extractOpts(e);isFinite(s)||(s=1,l=1);var h,d,f=u.reversescale?i.flipScale(u.colorscale):u.colorscale,p=f.length,g=new Array(p),m=new Array(p);if("heatmap"===t.coloring){var v=u.min,y=u.max;for(d=0;d<p;d++)h=f[d],g[d]=h[0]*(y-v)+v,m[d]=h[1];var b=r.extent([v,y,t.start,t.start+s*(l-1)]),_=b[v<y?0:1],x=b[v<y?1:0];_!==v&&(g.splice(0,0,_),m.splice(0,0,m[0])),x!==y&&(g.push(x),m.push(m[m.length-1]))}else for(d=0;d<p;d++)h=f[d],g[d]=(h[0]*(l+c-1)-c/2)*s+n,m[d]=h[1];return i.makeColorScaleFunc({domain:g,range:m},{noNumericCheck:!0})}},{"../../components/colorscale":378,"./end_plus":746,"@plotly/d3":58}],752:[function(e,t,n){"use strict";var r=e("./constants");function i(e,t){var n=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===n||10===n?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===n?713:1114:5===n?104:208:15===n?0:n}t.exports=function(e){var t,n,o,a,s,l,c,u,h,d=e[0].z,f=d.length,p=d[0].length,g=2===f||2===p;for(n=0;n<f-1;n++)for(a=[],0===n&&(a=a.concat(r.BOTTOMSTART)),n===f-2&&(a=a.concat(r.TOPSTART)),t=0;t<p-1;t++)for(o=a.slice(),0===t&&(o=o.concat(r.LEFTSTART)),t===p-2&&(o=o.concat(r.RIGHTSTART)),s=t+","+n,l=[[d[n][t],d[n][t+1]],[d[n+1][t],d[n+1][t+1]]],h=0;h<e.length;h++)(c=i((u=e[h]).level,l))&&(u.crossings[s]=c,-1!==o.indexOf(c)&&(u.starts.push([t,n]),g&&-1!==o.indexOf(c,o.indexOf(c)+1)&&u.starts.push([t,n])))}},{"./constants":739}],753:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../components/colorscale"),s=e("../../lib/svg_text_utils"),l=e("../../plots/cartesian/axes"),c=e("../../plots/cartesian/set_convert"),u=e("../heatmap/plot"),h=e("./make_crossings"),d=e("./find_all_paths"),f=e("./empty_pathinfo"),p=e("./convert_to_constraints"),g=e("./close_boundaries"),m=e("./constants"),v=m.LABELOPTIMIZER;function y(e,t){var n,r,a,s,l,c,u,h="",d=0,f=e.edgepaths.map((function(e,t){return t})),p=!0;function g(e){return Math.abs(e[1]-t[2][1])<.01}function m(e){return Math.abs(e[0]-t[0][0])<.01}function v(e){return Math.abs(e[0]-t[2][0])<.01}for(;f.length;){for(c=o.smoothopen(e.edgepaths[d],e.smoothing),h+=p?c:c.replace(/^M/,"L"),f.splice(f.indexOf(d),1),n=e.edgepaths[d][e.edgepaths[d].length-1],s=-1,a=0;a<4;a++){if(!n){i.log("Missing end?",d,e);break}for(u=n,Math.abs(u[1]-t[0][1])<.01&&!v(n)?r=t[1]:m(n)?r=t[0]:g(n)?r=t[3]:v(n)&&(r=t[2]),l=0;l<e.edgepaths.length;l++){var y=e.edgepaths[l][0];Math.abs(n[0]-r[0])<.01?Math.abs(n[0]-y[0])<.01&&(y[1]-n[1])*(r[1]-y[1])>=0&&(r=y,s=l):Math.abs(n[1]-r[1])<.01?Math.abs(n[1]-y[1])<.01&&(y[0]-n[0])*(r[0]-y[0])>=0&&(r=y,s=l):i.log("endpt to newendpt is not vert. or horz.",n,r,y)}if(n=r,s>=0)break;h+="L"+r}if(s===e.edgepaths.length){i.log("unclosed perimeter path");break}d=s,(p=-1===f.indexOf(d))&&(d=f[0],h+="Z")}for(d=0;d<e.paths.length;d++)h+=o.smoothclosed(e.paths[d],e.smoothing);return h}function b(e,t,n,r){var o=t.width/2,a=t.height/2,s=e.x,l=e.y,c=e.theta,u=Math.cos(c)*o,h=Math.sin(c)*o,d=(s>r.center?r.right-s:s-r.left)/(u+Math.abs(Math.sin(c)*a)),f=(l>r.middle?r.bottom-l:l-r.top)/(Math.abs(h)+Math.cos(c)*a);if(d<1||f<1)return 1/0;var p=v.EDGECOST*(1/(d-1)+1/(f-1));p+=v.ANGLECOST*c*c;for(var g=s-u,m=l-h,y=s+u,b=l+h,_=0;_<n.length;_++){var x=n[_],w=Math.cos(x.theta)*x.width/2,A=Math.sin(x.theta)*x.width/2,k=2*i.segmentDistance(g,m,y,b,x.x-w,x.y-A,x.x+w,x.y+A)/(t.height+x.height),T=x.level===t.level,S=T?v.SAMELEVELDISTANCE:1;if(k<=S)return 1/0;p+=v.NEIGHBORCOST*(T?v.SAMELEVELFACTOR:1)/(k-S)}return p}function _(e){var t,n,r=e.trace._emptypoints,i=[],o=e.z.length,a=e.z[0].length,s=[];for(t=0;t<a;t++)s.push(1);for(t=0;t<o;t++)i.push(s.slice());for(t=0;t<r.length;t++)i[(n=r[t])[0]][n[1]]=0;return e.zmask=i,i}n.plot=function(e,t,a,s){var l=t.xaxis,c=t.yaxis;i.makeTraceGroups(s,a,"contour").each((function(a){var s=r.select(this),v=a[0],b=v.trace,x=v.x,w=v.y,A=b.contours,k=f(A,t,v),T=i.ensureSingle(s,"g","heatmapcoloring"),S=[];"heatmap"===A.coloring&&(S=[a]),u(e,t,S,T),h(k),d(k);var E=l.c2p(x[0],!0),C=l.c2p(x[x.length-1],!0),M=c.c2p(w[0],!0),O=c.c2p(w[w.length-1],!0),L=[[E,O],[C,O],[C,M],[E,M]],D=k;"constraint"===A.type&&(D=p(k,A._operation)),function(e,t,n){var r=i.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"===n.coloring?[0]:[]);r.enter().append("path"),r.exit().remove(),r.attr("d","M"+t.join("L")+"Z").style("stroke","none")}(s,L,A),function(e,t,n,o){var a="fill"===o.coloring||"constraint"===o.type&&"="!==o._operation,s="M"+n.join("L")+"Z";a&&g(t,o);var l=i.ensureSingle(e,"g","contourfill").selectAll("path").data(a?t:[]);l.enter().append("path"),l.exit().remove(),l.each((function(e){var t=(e.prefixBoundary?s:"")+y(e,n);t?r.select(this).attr("d",t).style("stroke","none"):r.select(this).remove()}))}(s,D,L,A),function(e,t,a,s,l){var c=i.ensureSingle(e,"g","contourlines"),u=!1!==l.showlines,h=l.showlabels,d=u&&h,f=n.createLines(c,u||h,t),p=n.createLineClip(c,d,a,s.trace.uid),g=e.selectAll("g.contourlabels").data(h?[0]:[]);if(g.exit().remove(),g.enter().append("g").classed("contourlabels",!0),h){var v=[],y=[];i.clearLocationCache();var b=n.labelFormatter(a,s),_=o.tester.append("text").attr("data-notex",1).call(o.font,l.labelfont),x=t[0].xaxis,w=t[0].yaxis,A=x._length,k=w._length,T=x.range,S=w.range,E=i.aggNums(Math.min,null,s.x),C=i.aggNums(Math.max,null,s.x),M=i.aggNums(Math.min,null,s.y),O=i.aggNums(Math.max,null,s.y),L=Math.max(x.c2p(E,!0),0),D=Math.min(x.c2p(C,!0),A),I=Math.max(w.c2p(O,!0),0),R=Math.min(w.c2p(M,!0),k),P={};T[0]<T[1]?(P.left=L,P.right=D):(P.left=D,P.right=L),S[0]<S[1]?(P.top=I,P.bottom=R):(P.top=R,P.bottom=I),P.middle=(P.top+P.bottom)/2,P.center=(P.left+P.right)/2,v.push([[P.left,P.top],[P.right,P.top],[P.right,P.bottom],[P.left,P.bottom]]);var N=Math.sqrt(A*A+k*k),z=m.LABELDISTANCE*N/Math.max(1,t.length/m.LABELINCREASE);f.each((function(e){var t=n.calcTextOpts(e.level,b,_,a);r.select(this).selectAll("path").each((function(){var e=i.getVisibleSegment(this,P,t.height/2);if(e&&!(e.len<(t.width+t.height)*m.LABELMIN))for(var r=Math.min(Math.ceil(e.len/z),m.LABELMAX),o=0;o<r;o++){var a=n.findBestTextLocation(this,e,t,y,P);if(!a)break;n.addLabelData(a,t,y,v)}}))})),_.remove(),n.drawLabels(g,y,a,p,d?v:null)}h&&!u&&f.remove()}(s,k,e,v,A),function(e,t,n,r,a){var s=r.trace,l=n._fullLayout._clips,c="clip"+s.uid,u=l.selectAll("#"+c).data(s.connectgaps?[]:[0]);if(u.enter().append("clipPath").classed("contourclip",!0).attr("id",c),u.exit().remove(),!1===s.connectgaps){var f={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y,z:_(r),smoothing:0};h([f]),d([f]),g([f],{type:"levels"}),i.ensureSingle(u,"path","").attr("d",(f.prefixBoundary?"M"+a.join("L")+"Z":"")+y(f,a))}else c=null;o.setClipUrl(e,c,n)}(s,t,e,v,L)}))},n.createLines=function(e,t,n){var r=n[0].smoothing,i=e.selectAll("g.contourlevel").data(t?n:[]);if(i.exit().remove(),i.enter().append("g").classed("contourlevel",!0),t){var a=i.selectAll("path.openline").data((function(e){return e.pedgepaths||e.edgepaths}));a.exit().remove(),a.enter().append("path").classed("openline",!0),a.attr("d",(function(e){return o.smoothopen(e,r)})).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke");var s=i.selectAll("path.closedline").data((function(e){return e.ppaths||e.paths}));s.exit().remove(),s.enter().append("path").classed("closedline",!0),s.attr("d",(function(e){return o.smoothclosed(e,r)})).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke")}return i},n.createLineClip=function(e,t,n,r){var i=t?"clipline"+r:null,a=n._fullLayout._clips.selectAll("#"+i).data(t?[0]:[]);return a.exit().remove(),a.enter().append("clipPath").classed("contourlineclip",!0).attr("id",i),o.setClipUrl(e,i,n),a},n.labelFormatter=function(e,t){var n=e._fullLayout,r=t.trace,i=r.contours,o={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(i.labelformat)o.tickformat=i.labelformat,c(o,n);else{var s=a.extractOpts(r);if(s&&s.colorbar&&s.colorbar._axis)o=s.colorbar._axis;else{if("constraint"===i.type){var u=i.value;Array.isArray(u)?o.range=[u[0],u[u.length-1]]:o.range=[u,u]}else o.range=[i.start,i.end],o.nticks=(i.end-i.start)/i.size;o.range[0]===o.range[1]&&(o.range[1]+=o.range[0]||1),o.nticks||(o.nticks=1e3),c(o,n),l.prepTicks(o),o._tmin=null,o._tmax=null}}return function(e){return l.tickText(o,e).text}},n.calcTextOpts=function(e,t,n,r){var i=t(e);n.text(i).call(s.convertToTspans,r);var a=n.node(),l=o.bBox(a,!0);return{text:i,width:l.width,height:l.height,fontSize:+a.style["font-size"].replace("px",""),level:e,dy:(l.top+l.bottom)/2}},n.findBestTextLocation=function(e,t,n,r,o){var a,s,l,c,u,h=n.width;t.isClosed?(s=t.len/v.INITIALSEARCHPOINTS,a=t.min+s/2,l=t.max):(s=(t.len-h)/(v.INITIALSEARCHPOINTS+1),a=t.min+s+h/2,l=t.max-(s+h)/2);for(var d=1/0,f=0;f<v.ITERATIONS;f++){for(var p=a;p<l;p+=s){var g=i.getTextLocation(e,t.total,p,h),m=b(g,n,r,o);m<d&&(d=m,u=g,c=p)}if(d>2*v.MAXCOST)break;f&&(s/=2),l=(a=c-s/2)+1.5*s}if(d<=v.MAXCOST)return u},n.addLabelData=function(e,t,n,r){var i=t.fontSize,o=t.width+i/3,a=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),d=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},f=[d(-o/2,-a/2),d(-o/2,a/2),d(o/2,a/2),d(o/2,-a/2)];n.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:o,height:a}),r.push(f)},n.drawLabels=function(e,t,n,o,a){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;r.select(this).text(e.text).attr({x:t,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+i+")"}).call(s.convertToTspans,n)})),a){for(var c="",u=0;u<a.length;u++)c+="M"+a[u].join("L")+"Z";i.ensureSingle(o,"path","").attr("d",c)}}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/set_convert":576,"../heatmap/plot":804,"./close_boundaries":737,"./constants":739,"./convert_to_constraints":743,"./empty_pathinfo":745,"./find_all_paths":747,"./make_crossings":752,"@plotly/d3":58}],754:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib");function o(e,t,n){var i={type:"linear",range:[e,t]};return r.autoTicks(i,(t-e)/(n||15)),i}t.exports=function(e,t){var n=e.contours;if(e.autocontour){var a=e.zmin,s=e.zmax;(e.zauto||void 0===a)&&(a=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=o(a,s,e.ncontours);n.size=l.dtick,n.start=r.tickFirst(l),l.range.reverse(),n.end=r.tickFirst(l),n.start===a&&(n.start+=n.size),n.end===s&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:n.start,end:n.end,size:n.size}),e._input.autocontour=!0}else if("constraint"!==n.type){var c,u=n.start,h=n.end,d=e._input.contours;u>h&&(n.start=d.start=h,h=n.end=d.end=u,u=n.start),n.size>0||(c=u===h?1:o(u,h,e.ncontours).dtick,d.size=n.size=c)}}},{"../../lib":503,"../../plots/cartesian/axes":554}],755:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../heatmap/style"),a=e("./make_color_map");t.exports=function(e){var t=r.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=r.select(this),n=e[0].trace,o=n.contours,s=n.line,l=o.size||1,c=o.start,u="constraint"===o.type,h=!u&&"lines"===o.coloring,d=!u&&"fill"===o.coloring,f=h||d?a(n):null;t.selectAll("g.contourlevel").each((function(e){r.select(this).selectAll("path").call(i.lineGroupStyle,s.width,h?f(e.level):s.color,s.dash)}));var p=o.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){i.font(r.select(this),{family:p.family,size:p.size,color:p.color||(h?f(e.level):s.color)})})),u)t.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(d){var g;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===g&&(g=e.level),f(e.level+.5*l)})),void 0===g&&(g=c),t.selectAll("g.contourbg path").style("fill",f(g-.5*l))}})),o(e)}},{"../../components/drawing":388,"../heatmap/style":805,"./make_color_map":751,"@plotly/d3":58}],756:[function(e,t,n){"use strict";var r=e("../../components/colorscale/defaults"),i=e("./label_defaults");t.exports=function(e,t,n,o,a){var s,l=n("contours.coloring"),c="";"fill"===l&&(s=n("contours.showlines")),!1!==s&&("lines"!==l&&(c=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,o,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),i(n,o,c,a)}},{"../../components/colorscale/defaults":376,"./label_defaults":750}],757:[function(e,t,n){"use strict";var r=e("../heatmap/attributes"),i=e("../contour/attributes"),o=e("../../components/colorscale/attributes"),a=e("../../lib/extend").extendFlat,s=i.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../contour/attributes":735,"../heatmap/attributes":792}],758:[function(e,t,n){"use strict";var r=e("../../components/colorscale/calc"),i=e("../../lib"),o=e("../heatmap/convert_column_xyz"),a=e("../heatmap/clean_2d_array"),s=e("../heatmap/interp2d"),l=e("../heatmap/find_empties"),c=e("../heatmap/make_bound_array"),u=e("./defaults"),h=e("../carpet/lookup_carpetid"),d=e("../contour/set_contours");t.exports=function(e,t){var n=t._carpetTrace=h(e,t);if(n&&n.visible&&"legendonly"!==n.visible){if(!t.a||!t.b){var f=e.data[n.index],p=e.data[t.index];p.a||(p.a=f.a),p.b||(p.b=f.b),u(p,t,t._defaultColor,e._fullLayout)}var g=function(e,t){var n,u,h,d,f,p,g,m=t._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(t.z)&&o(t,v,y,"a","b",["z"]),n=t._a=t._a||t.a,d=t._b=t._b||t.b,n=n?v.makeCalcdata(t,"_a"):[],d=d?y.makeCalcdata(t,"_b"):[],u=t.a0||0,h=t.da||1,f=t.b0||0,p=t.db||1,g=t._z=a(t._z||t.z,t.transpose),t._emptypoints=l(g),s(g,t._emptypoints);var b=i.maxRowLength(g),_="scaled"===t.xtype?"":n,x=c(t,_,u,h,b,v),w="scaled"===t.ytype?"":d,A={a:x,b:c(t,w,f,p,g.length,y),z:g};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&r(e,t,{vals:g,containerStr:"",cLetter:"z"}),[A]}(e,t);return d(t,t._z),g}}},{"../../components/colorscale/calc":374,"../../lib":503,"../carpet/lookup_carpetid":708,"../contour/set_contours":754,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"../heatmap/find_empties":798,"../heatmap/interp2d":801,"../heatmap/make_bound_array":803,"./defaults":759}],759:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../heatmap/xyz_defaults"),o=e("./attributes"),a=e("../contour/constraint_defaults"),s=e("../contour/contours_defaults"),l=e("../contour/style_defaults");t.exports=function(e,t,n,c){function u(n,i){return r.coerce(e,t,o,n,i)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?a(e,t,u,c,n,{hasHover:!1}):(s(e,t,u,(function(n){return r.coerce2(e,t,o,n)})),l(e,t,u,c,{hasHover:!1}))}else t._defaultColor=n,t._length=null}},{"../../lib":503,"../contour/constraint_defaults":740,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/xyz_defaults":807,"./attributes":757}],760:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../contour/colorbar"),calc:e("./calc"),plot:e("./plot"),style:e("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"../contour/colorbar":738,"../contour/style":755,"./attributes":757,"./calc":758,"./defaults":759,"./plot":761}],761:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../carpet/map_1d_array"),o=e("../carpet/makepath"),a=e("../../components/drawing"),s=e("../../lib"),l=e("../contour/make_crossings"),c=e("../contour/find_all_paths"),u=e("../contour/plot"),h=e("../contour/constants"),d=e("../contour/convert_to_constraints"),f=e("../contour/empty_pathinfo"),p=e("../contour/close_boundaries"),g=e("../carpet/lookup_carpetid"),m=e("../carpet/axis_aligned_line");function v(e,t,n,i,o,l,c){var d=s.ensureSingle(e,"g","contourlines"),f=!1!==o.showlines,p=o.showlabels,g=f&&p,m=u.createLines(d,f||p,t),v=u.createLineClip(d,g,n,i.trace.uid),x=e.selectAll("g.contourlabels").data(p?[0]:[]);if(x.exit().remove(),x.enter().append("g").classed("contourlabels",!0),p){var w=l.xaxis,A=l.yaxis,k=w._length,T=A._length,S=[[[0,0],[k,0],[k,T],[0,T]]],E=[];s.clearLocationCache();var C=u.labelFormatter(n,i),M=a.tester.append("text").attr("data-notex",1).call(a.font,o.labelfont),O={left:0,right:k,center:k/2,top:0,bottom:T,middle:T/2},L=Math.sqrt(k*k+T*T),D=h.LABELDISTANCE*L/Math.max(1,t.length/h.LABELINCREASE);m.each((function(e){var t=u.calcTextOpts(e.level,C,M,n);r.select(this).selectAll("path").each((function(n){var r=this,i=s.getVisibleSegment(r,O,t.height/2);if(i&&(function(e,t,n,r,i,o){for(var a,s=0;s<n.pedgepaths.length;s++)t===n.pedgepaths[s]&&(a=n.edgepaths[s]);if(a){var l=i.a[0],c=i.a[i.a.length-1],u=i.b[0],h=i.b[i.b.length-1],d=y(e,0,1),f=y(e,r.total,r.total-1),p=m(a[0],d),g=r.total-m(a[a.length-1],f);r.min<p&&(r.min=p),r.max>g&&(r.max=g),r.len=r.max-r.min}function m(e,t){var n,r=0,a=.1;return(Math.abs(e[0]-l)<a||Math.abs(e[0]-c)<a)&&(n=b(i.dxydb_rough(e[0],e[1],a)),r=Math.max(r,o*_(t,n)/2)),(Math.abs(e[1]-u)<a||Math.abs(e[1]-h)<a)&&(n=b(i.dxyda_rough(e[0],e[1],a)),r=Math.max(r,o*_(t,n)/2)),r}}(r,n,e,i,c,t.height),!(i.len<(t.width+t.height)*h.LABELMIN)))for(var o=Math.min(Math.ceil(i.len/D),h.LABELMAX),a=0;a<o;a++){var l=u.findBestTextLocation(r,i,t,E,O);if(!l)break;u.addLabelData(l,t,E,S)}}))})),M.remove(),u.drawLabels(x,E,n,v,g?S:null)}p&&!f&&m.remove()}function y(e,t,n){var r=e.getPointAtLength(t),i=e.getPointAtLength(n),o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a);return[o/s,a/s]}function b(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function _(e,t){var n=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-n*n)/n}function x(e,t,n,i,o,l,c,u,h,d,f){var g="fill"===d;g&&p(o,e.contours);var v=s.ensureSingle(t,"g","contourfill").selectAll("path").data(g?o:[]);v.enter().append("path"),v.exit().remove(),v.each((function(e){var t=(e.prefixBoundary?f:"")+function(e,t,n,r,i,o,l,c){var u,h,d,f,p,g,v,y="",b=t.edgepaths.map((function(e,t){return t})),_=!0,x=1e-4*Math.abs(n[0][0]-n[2][0]),w=1e-4*Math.abs(n[0][1]-n[2][1]);function A(e){return Math.abs(e[1]-n[0][1])<w}function k(e){return Math.abs(e[1]-n[2][1])<w}function T(e){return Math.abs(e[0]-n[0][0])<x}function S(e){return Math.abs(e[0]-n[2][0])<x}function E(e,t){var n,r,a,s,u="";for(A(e)&&!S(e)||k(e)&&!T(e)?(s=i.aaxis,a=m(i,o,[e[0],t[0]],.5*(e[1]+t[1]))):(s=i.baxis,a=m(i,o,.5*(e[0]+t[0]),[e[1],t[1]])),n=1;n<a.length;n++)for(u+=s.smoothing?"C":"L",r=0;r<a[n].length;r++){var h=a[n][r];u+=[l.c2p(h[0]),c.c2p(h[1])]+" "}return u}for(u=0,h=null;b.length;){var C=t.edgepaths[u][0];for(h&&(y+=E(h,C)),v=a.smoothopen(t.edgepaths[u].map(r),t.smoothing),y+=_?v:v.replace(/^M/,"L"),b.splice(b.indexOf(u),1),h=t.edgepaths[u][t.edgepaths[u].length-1],p=-1,f=0;f<4;f++){if(!h){s.log("Missing end?",u,t);break}for(A(h)&&!S(h)?d=n[1]:T(h)?d=n[0]:k(h)?d=n[3]:S(h)&&(d=n[2]),g=0;g<t.edgepaths.length;g++){var M=t.edgepaths[g][0];Math.abs(h[0]-d[0])<x?Math.abs(h[0]-M[0])<x&&(M[1]-h[1])*(d[1]-M[1])>=0&&(d=M,p=g):Math.abs(h[1]-d[1])<w?Math.abs(h[1]-M[1])<w&&(M[0]-h[0])*(d[0]-M[0])>=0&&(d=M,p=g):s.log("endpt to newendpt is not vert. or horz.",h,d,M)}if(p>=0)break;y+=E(h,d),h=d}if(p===t.edgepaths.length){s.log("unclosed perimeter path");break}u=p,(_=-1===b.indexOf(u))&&(u=b[0],y+=E(h,d)+"Z",h=null)}for(u=0;u<t.paths.length;u++)y+=a.smoothclosed(t.paths[u].map(r),t.smoothing);return y}(0,e,l,c,u,h,n,i);t?r.select(this).attr("d",t).style("stroke","none"):r.select(this).remove()}))}t.exports=function(e,t,n,u){var h=t.xaxis,p=t.yaxis;s.makeTraceGroups(u,n,"contour").each((function(n){var u=r.select(this),m=n[0],y=m.trace,b=y._carpetTrace=g(e,y),_=e.calcdata[b.index][0];if(b.visible&&"legendonly"!==b.visible){var w=m.a,A=m.b,k=y.contours,T=f(k,t,m),S="constraint"===k.type,E=k._operation,C=S?"="===E?"lines":"fill":k.coloring,M=[[w[0],A[A.length-1]],[w[w.length-1],A[A.length-1]],[w[w.length-1],A[0]],[w[0],A[0]]];l(T);var O=1e-8*(w[w.length-1]-w[0]),L=1e-8*(A[A.length-1]-A[0]);c(T,O,L);var D,I,R,P,N=T;"constraint"===k.type&&(N=d(T,E)),function(e,t){var n,r,i,o,a,s,l,c,u;for(n=0;n<e.length;n++){for(a=(o=e[n]).pedgepaths=[],s=o.ppaths=[],r=0;r<o.edgepaths.length;r++){for(u=o.edgepaths[r],l=[],i=0;i<u.length;i++)l[i]=t(u[i]);a.push(l)}for(r=0;r<o.paths.length;r++){for(u=o.paths[r],c=[],i=0;i<u.length;i++)c[i]=t(u[i]);s.push(c)}}}(T,B);var z=[];for(P=_.clipsegments.length-1;P>=0;P--)D=_.clipsegments[P],I=i([],D.x,h.c2p),R=i([],D.y,p.c2p),I.reverse(),R.reverse(),z.push(o(I,R,D.bicubic));var F="M"+z.join("L")+"Z";(function(e,t,n,r,a,l){var c,u,h,d,f=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||a?[]:[0]);f.enter().append("path"),f.exit().remove();var p=[];for(d=0;d<t.length;d++)c=t[d],u=i([],c.x,n.c2p),h=i([],c.y,r.c2p),p.push(o(u,h,c.bicubic));f.attr("d","M"+p.join("L")+"Z").style("stroke","none")})(u,_.clipsegments,h,p,S,C),x(y,u,h,p,N,M,B,b,_,C,F),v(u,T,e,m,k,t,b),a.setClipUrl(u,b._clipPathId,e)}function B(e){var t=b.ab2xy(e[0],e[1],!0);return[h.c2p(t[0]),p.c2p(t[1])]}}))}},{"../../components/drawing":388,"../../lib":503,"../carpet/axis_aligned_line":692,"../carpet/lookup_carpetid":708,"../carpet/makepath":709,"../carpet/map_1d_array":710,"../contour/close_boundaries":737,"../contour/constants":739,"../contour/convert_to_constraints":743,"../contour/empty_pathinfo":745,"../contour/find_all_paths":747,"../contour/make_crossings":752,"../contour/plot":753,"@plotly/d3":58}],762:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/attributes"),a=e("../scattermapbox/attributes"),s=e("../../lib/extend").extendFlat;t.exports=s({lon:a.lon,lat:a.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:a.text,hovertext:a.hovertext,hoverinfo:s({},o.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:i(),showlegend:s({},o.showlegend,{dflt:!1})},r("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattermapbox/attributes":991}],763:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib").isArrayOrTypedArray,o=e("../../constants/numerical").BADNUM,a=e("../../components/colorscale/calc"),s=e("../../lib")._;t.exports=function(e,t){for(var n=t._length,l=new Array(n),c=t.z,u=i(c)&&c.length,h=0;h<n;h++){var d=l[h]={},f=t.lon[h],p=t.lat[h];if(d.lonlat=r(f)&&r(p)?[+f,+p]:[o,o],u){var g=c[h];d.z=r(g)?g:o}}return a(e,t,{vals:u?c:[0,1],containerStr:"",cLetter:"z"}),n&&(l[0].t={labels:{lat:s(e,"lat:")+" ",lon:s(e,"lon:")+" "}}),l}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],764:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../components/color"),a=e("../../components/colorscale"),s=e("../../constants/numerical").BADNUM,l=e("../../lib/geojson_utils").makeBlank;t.exports=function(e){var t=e[0].trace,n=!0===t.visible&&0!==t._length,c=t._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:l()};if(!n)return c;var u,h=[],d=t.z,f=t.radius,p=i.isArrayOrTypedArray(d)&&d.length,g=i.isArrayOrTypedArray(f);for(u=0;u<e.length;u++){var m=e[u],v=m.lonlat;if(v[0]!==s){var y={};if(p){var b=m.z;y.z=b!==s?b:0}g&&(y.r=r(f[u])&&f[u]>0?+f[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var _=a.extractOpts(t),x=_.reversescale?a.flipScale(_.colorscale):_.colorscale,w=x[0][1],A=["interpolate",["linear"],["heatmap-density"],0,o.opacity(w)<1?w:o.addOpacity(w,0)];for(u=1;u<x.length;u++)A.push(x[u][0],x[u][1]);var k=["interpolate",["linear"],["get","z"],_.min,0,_.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":p?k:1/(_.max-_.min),"heatmap-color":A,"heatmap-radius":g?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}},{"../../components/color":366,"../../components/colorscale":378,"../../constants/numerical":479,"../../lib":503,"../../lib/geojson_utils":497,"fast-isnumeric":190}],765:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,n,a){function s(n,i){return r.coerce(e,t,o,n,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(t._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(e,t,a,s,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":762}],766:[function(e,t,n){"use strict";t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},{}],767:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../scattermapbox/hover").hoverPoints,o=e("../scattermapbox/hover").getExtraText;t.exports=function(e,t,n){var a=i(e,t,n);if(a){var s=a[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=o(c,u,l[0].t.labels),[s]}}},{"../../plots/cartesian/axes":554,"../scattermapbox/hover":996}],768:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),formatLabels:e("../scattermapbox/format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover"),eventData:e("./event_data"),getBelow:function(e,t){for(var n=t.getMapLayers(),r=0;r<n.length;r++){var i=n[r],o=i.id;if("symbol"===i.type&&"string"==typeof o&&-1===o.indexOf("plotly-"))return o}},moduleType:"trace",name:"densitymapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},{"../../plots/mapbox":613,"../heatmap/colorbar":795,"../scattermapbox/format_labels":995,"./attributes":762,"./calc":763,"./defaults":765,"./event_data":766,"./hover":767,"./plot":769}],769:[function(e,t,n){"use strict";var r=e("./convert"),i=e("../../plots/mapbox/constants").traceLayerPrefix;function o(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=o.prototype;a.update=function(e){var t=this.subplot,n=this.layerList,i=r(e),o=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),o!==this.below&&(this._removeLayers(),this._addLayers(i,o),this.below=o);for(var a=0;a<n.length;a++){var s=n[a],l=s[0],c=s[1],u=i[l];t.setOptions(c,"setLayoutProperty",u.layout),"visible"===u.layout.visibility&&t.setOptions(c,"setPaintProperty",u.paint)}},a._addLayers=function(e,t){for(var n=this.subplot,r=this.layerList,i=this.sourceId,o=0;o<r.length;o++){var a=r[o],s=a[0],l=e[s];n.addLayer({type:s,id:a[1],source:i,layout:l.layout,paint:l.paint},t)}},a._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,n=t.length-1;n>=0;n--)e.removeLayer(t[n][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new o(e,n.uid),a=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},{"../../plots/mapbox/constants":611,"./convert":764}],770:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){for(var n=0;n<e.length;n++)e[n].i=n;r.mergeArray(t.text,e,"tx"),r.mergeArray(t.hovertext,e,"htx");var i=t.marker;if(i){r.mergeArray(i.opacity,e,"mo"),r.mergeArray(i.color,e,"mc");var o=i.line;o&&(r.mergeArray(o.color,e,"mlc"),r.mergeArrayCastPositive(o.width,e,"mlw"))}}},{"../../lib":503}],771:[function(e,t,n){"use strict";var r,i=e("../bar/attributes"),o=e("../scatter/attributes").line,a=e("../../plots/attributes"),s=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../plots/template_attributes").texttemplateAttrs,u=e("./constants"),h=e("../../lib/extend").extendFlat,d=e("../../components/color");t.exports={x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),hovertext:i.hovertext,hovertemplate:l({},{keys:u.eventDataKeys}),hoverinfo:h({},a.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:c({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),text:i.text,textposition:i.textposition,insidetextanchor:h({},i.insidetextanchor,{dflt:"middle"}),textangle:h({},i.textangle,{dflt:0}),textfont:i.textfont,insidetextfont:i.insidetextfont,outsidetextfont:i.outsidetextfont,constraintext:i.constraintext,cliponaxis:i.cliponaxis,orientation:h({},i.orientation,{}),offset:h({},i.offset,{arrayOk:!1}),width:h({},i.width,{arrayOk:!1}),marker:(r=h({},i.marker),delete r.pattern,r),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:h({},o.color,{dflt:d.defaultLine}),width:h({},o.width,{dflt:0,editType:"plot"}),dash:o.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup}},{"../../components/color":366,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926,"./constants":773}],772:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../plots/cartesian/align_period"),o=e("./arrays_to_calcdata"),a=e("../scatter/calc_selection"),s=e("../../constants/numerical").BADNUM;function l(e){return e===s?0:e}t.exports=function(e,t){var n,c,u,h,d,f,p,g,m=r.getFromId(e,t.xaxis||"x"),v=r.getFromId(e,t.yaxis||"y");"h"===t.orientation?(n=m.makeCalcdata(t,"x"),u=v.makeCalcdata(t,"y"),h=i(t,v,"y",u),d=!!t.yperiodalignment,f="y"):(n=v.makeCalcdata(t,"y"),u=m.makeCalcdata(t,"x"),h=i(t,m,"x",u),d=!!t.xperiodalignment,f="x"),c=h.vals;var y,b=Math.min(c.length,n.length),_=new Array(b);for(t._base=[],p=0;p<b;p++){n[p]<0&&(n[p]=s);var x=!1;n[p]!==s&&p+1<b&&n[p+1]!==s&&(x=!0),g=_[p]={p:c[p],s:n[p],cNext:x},t._base[p]=-.5*g.s,d&&(_[p].orig_p=u[p],_[p][f+"End"]=h.ends[p],_[p][f+"Start"]=h.starts[p]),t.ids&&(g.id=String(t.ids[p])),0===p&&(_[0].vTotal=0),_[0].vTotal+=l(g.s),g.begR=l(g.s)/l(_[0].s)}for(p=0;p<b;p++)(g=_[p]).s!==s&&(g.sumR=g.s/_[0].vTotal,g.difR=void 0!==y?g.s/y:1,y=g.s);return o(_,t),a(_,t),_}},{"../../constants/numerical":479,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928,"./arrays_to_calcdata":770}],773:[function(e,t,n){"use strict";t.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},{}],774:[function(e,t,n){"use strict";var r=e("../bar/cross_trace_calc").setGroupPositions;t.exports=function(e,t){var n,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],h=[],d=[];for(i=0;i<a.length;i++){var f=a[i],p="h"===f.orientation;!0===f.visible&&f.xaxis===l._id&&f.yaxis===c._id&&"funnel"===f.type&&(n=s[i],p?d.push(n):h.push(n),u.push(n))}var g={mode:o.funnelmode,norm:o.funnelnorm,gap:o.funnelgap,groupgap:o.funnelgroupgap};for(r(e,l,c,h,g),r(e,c,l,d,g),i=0;i<u.length;i++){n=u[i];for(var m=0;m<n.length;m++)m+1<n.length&&(n[m].nextP0=n[m+1].p0,n[m].nextS0=n[m+1].s0,n[m].nextP1=n[m+1].p1,n[m].nextS1=n[m+1].s1)}}},{"../bar/cross_trace_calc":651}],775:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../bar/defaults").handleGroupingDefaults,o=e("../bar/defaults").handleText,a=e("../scatter/xy_defaults"),s=e("../scatter/period_defaults"),l=e("./attributes"),c=e("../../components/color");t.exports={supplyDefaults:function(e,t,n,i){function u(n,i){return r.coerce(e,t,l,n,i)}if(a(e,t,i,u)){s(e,t,i,u),u("xhoverformat"),u("yhoverformat"),u("orientation",t.y&&!t.x?"v":"h"),u("offset"),u("width");var h=u("text");u("hovertext"),u("hovertemplate");var d=u("textposition");o(e,t,i,u,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"===t.textposition||t.texttemplate||u("textinfo",Array.isArray(h)?"text+value":"value");var f=u("marker.color",n);u("marker.line.color",c.defaultLine),u("marker.line.width"),u("connector.visible")&&(u("connector.fillcolor",function(e){var t=r.isArrayOrTypedArray(e)?"#000":e;return c.addOpacity(t,.5*c.opacity(t))}(f)),u("connector.line.width")&&(u("connector.line.color"),u("connector.line.dash")))}else t.visible=!1},crossTraceDefaults:function(e,t){var n,o;function a(e){return r.coerce(o._input,o,l,e)}if("group"===t.funnelmode)for(var s=0;s<e.length;s++)n=(o=e[s])._input,i(n,o,t,a)}}},{"../../components/color":366,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":771}],776:[function(e,t,n){"use strict";t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],777:[function(e,t,n){"use strict";var r=e("../../components/color").opacity,i=e("../bar/hover").hoverOnBars,o=e("../../lib").formatPercent;t.exports=function(e,t,n,a,s){var l=i(e,t,n,a,s);if(l){var c=l.cd,u=c[0].trace,h="h"===u.orientation,d=c[l.index];l[(h?"x":"y")+"LabelVal"]=d.s,l.percentInitial=d.begR,l.percentInitialLabel=o(d.begR,1),l.percentPrevious=d.difR,l.percentPreviousLabel=o(d.difR,1),l.percentTotal=d.sumR,l.percentTotalLabel=o(d.sumR,1);var f=d.hi||u.hoverinfo,p=[];if(f&&"none"!==f&&"skip"!==f){var g="all"===f,m=f.split("+"),v=function(e){return g||-1!==m.indexOf(e)};v("percent initial")&&p.push(l.percentInitialLabel+" of initial"),v("percent previous")&&p.push(l.percentPreviousLabel+" of previous"),v("percent total")&&p.push(l.percentTotalLabel+" of total")}return l.extraText=p.join("<br>"),l.color=function(e,t){var n=e.marker,i=t.mc||n.color,o=t.mlc||n.line.color,a=t.mlw||n.line.width;return r(i)?i:r(o)&&a?o:void 0}(u,d),[l]}}},{"../../components/color":366,"../../lib":503,"../bar/hover":655}],778:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":771,"./calc":772,"./cross_trace_calc":774,"./defaults":775,"./event_data":776,"./hover":777,"./layout_attributes":779,"./layout_defaults":780,"./plot":781,"./style":782}],779:[function(e,t,n){"use strict";t.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],780:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t,n){var o=!1;function a(n,o){return r.coerce(e,t,i,n,o)}for(var s=0;s<n.length;s++){var l=n[s];if(l.visible&&"funnel"===l.type){o=!0;break}}o&&(a("funnelmode"),a("funnelgap",.2),a("funnelgroupgap"))}},{"../../lib":503,"./layout_attributes":779}],781:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../constants/numerical").BADNUM,s=e("../bar/plot"),l=e("../bar/uniform_text").clearMinTextSize;function c(e,t,n,r){var i=[],o=[],a=r?t:n,s=r?n:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),i[3]=a.c2p(e.nextS1,!0),o[3]=s.c2p(e.nextP1,!0),r?[i,o]:[o,i]}t.exports=function(e,t,n,u){var h=e._fullLayout;l("funnel",h),function(e,t,n,s){var l=t.xaxis,u=t.yaxis;i.makeTraceGroups(s,n,"trace bars").each((function(n){var s=r.select(this),h=n[0].trace,d=i.ensureSingle(s,"g","regions");if(h.connector&&h.connector.visible){var f="h"===h.orientation,p=d.selectAll("g.region").data(i.identity);p.enter().append("g").classed("region",!0),p.exit().remove();var g=p.size();p.each((function(n,s){if(s===g-1||n.cNext){var h=c(n,l,u,f),d=h[0],p=h[1],m="";d[0]!==a&&p[0]!==a&&d[1]!==a&&p[1]!==a&&d[2]!==a&&p[2]!==a&&d[3]!==a&&p[3]!==a&&(m+=f?"M"+d[0]+","+p[1]+"L"+d[2]+","+p[2]+"H"+d[3]+"L"+d[1]+","+p[1]+"Z":"M"+d[1]+","+p[1]+"L"+d[2]+","+p[3]+"V"+p[2]+"L"+d[1]+","+p[0]+"Z"),""===m&&(m="M0,0Z"),i.ensureSingle(r.select(this),"path").attr("d",m).call(o.setClipUrl,t.layerClipId,e)}}))}else d.remove()}))}(e,t,n,u),function(e,t,n,a){var s=t.xaxis,l=t.yaxis;i.makeTraceGroups(a,n,"trace bars").each((function(n){var a=r.select(this),u=n[0].trace,h=i.ensureSingle(a,"g","lines");if(u.connector&&u.connector.visible&&u.connector.line.width){var d="h"===u.orientation,f=h.selectAll("g.line").data(i.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var p=f.size();f.each((function(n,a){if(a===p-1||n.cNext){var u=c(n,s,l,d),h=u[0],f=u[1],g="";void 0!==h[3]&&void 0!==f[3]&&(d?(g+="M"+h[0]+","+f[1]+"L"+h[2]+","+f[2],g+="M"+h[1]+","+f[1]+"L"+h[3]+","+f[2]):(g+="M"+h[1]+","+f[1]+"L"+h[2]+","+f[3],g+="M"+h[1]+","+f[0]+"L"+h[2]+","+f[2])),""===g&&(g="M0,0Z"),i.ensureSingle(r.select(this),"path").attr("d",g).call(o.setClipUrl,t.layerClipId,e)}}))}else h.remove()}))}(e,t,n,u),s.plot(e,t,n,u,{mode:h.funnelmode,norm:h.funnelmode,gap:h.funnelgap,groupgap:h.funnelgroupgap})}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],782:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../components/color"),a=e("../../constants/interactions").DESELECTDIM,s=e("../bar/style"),l=e("../bar/uniform_text").resizeText,c=s.styleTextPoints;t.exports={style:function(e,t,n){var s=n||r.select(e).selectAll("g.funnellayer").selectAll("g.trace");l(e,s,"funnel"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var n=r.select(this),s=t[0].trace;n.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(o.fill,e.mc||t.color).call(o.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(n,s,e),n.selectAll(".regions").each((function(){r.select(this).selectAll("path").style("stroke-width",0).call(o.fill,s.connector.fillcolor)})),n.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],783:[function(e,t,n){"use strict";var r=e("../pie/attributes"),i=e("../../plots/attributes"),o=e("../../plots/domain").attributes,a=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../lib/extend").extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:o({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900}],784:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="funnelarea",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],785:[function(e,t,n){"use strict";var r=e("../pie/calc");t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}},{"../pie/calc":902}],786:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../plots/domain").defaults,a=e("../bar/defaults").handleText,s=e("../pie/defaults").handleLabelsAndValues;t.exports=function(e,t,n,l){function c(n,o){return r.coerce(e,t,i,n,o)}var u=c("labels"),h=c("values"),d=s(u,h),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),f){t._length=f,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var p,g=c("text"),m=c("texttemplate");if(m||(p=c("textinfo",Array.isArray(g)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),m||p&&"none"!==p){var v=c("textposition");a(e,t,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}o(t,l,c),c("title.text")&&(c("title.position"),r.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else t.visible=!1}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"../pie/defaults":903,"./attributes":783}],787:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style"),styleOne:e("../pie/style_one"),meta:{}}},{"../pie/style_one":911,"./attributes":783,"./base_plot":784,"./calc":785,"./defaults":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(e,t,n){"use strict";var r=e("../pie/layout_attributes").hiddenlabels;t.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":907}],789:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("hiddenlabels"),n("funnelareacolorway",t.colorway),n("extendfunnelareacolors")}},{"../../lib":503,"./layout_attributes":788}],790:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../lib"),a=o.strScale,s=o.strTranslate,l=e("../../lib/svg_text_utils"),c=e("../bar/plot").toMoveInsideBar,u=e("../bar/uniform_text"),h=u.recordMinTextSize,d=u.clearMinTextSize,f=e("../pie/helpers"),p=e("../pie/plot"),g=p.attachFxHandlers,m=p.determineInsideTextFont,v=p.layoutAreas,y=p.prerenderTitles,b=p.positionTitleOutside,_=p.formatSliceLabel;function x(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function w(e){if(e.length){var t=e[0],n=t.trace,r=n.aspectratio,i=n.baseratio;i>.999&&(i=.999);var o,a,s,l=Math.pow(i,2),c=t.vTotal,u=c,h=c*l/(1-l)/c,d=[];for(d.push(C()),a=e.length-1;a>-1;a--)if(!(s=e[a]).hidden){var f=s.v/u;h+=f,d.push(C())}var p=1/0,g=-1/0;for(a=0;a<d.length;a++)o=d[a],p=Math.min(p,o[1]),g=Math.max(g,o[1]);for(a=0;a<d.length;a++)d[a][1]-=(g+p)/2;var m=d[d.length-1][0],v=t.r,y=(g-p)/2,b=v/m,_=v/y*r;for(t.r=_*y,a=0;a<d.length;a++)d[a][0]*=b,d[a][1]*=_;var x=[-(o=d[0])[0],o[1]],w=[o[0],o[1]],A=0;for(a=e.length-1;a>-1;a--)if(!(s=e[a]).hidden){var k=d[A+=1][0],T=d[A][1];s.TL=[-k,T],s.TR=[k,T],s.BL=x,s.BR=w,s.pxmid=(S=s.TR,E=s.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),x=s.TL,w=s.TR}}var S,E;function C(){var e,t={x:e=Math.sqrt(h),y:-e};return[t.x,t.y]}}t.exports=function(e,t){var n=e._fullLayout;d("funnelarea",n),y(t,e),v(t,n._size),o.makeTraceGroups(n._funnelarealayer,t,"trace").each((function(t){var u=r.select(this),d=t[0],p=d.trace;w(t),u.each((function(){var u=r.select(this).selectAll("g.slice").data(t);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each((function(a,s){if(a.hidden)r.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=p.index;var u=d.cx,v=d.cy,y=r.select(this),b=y.selectAll("path.surface").data([a]);b.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),y.call(g,e,t);var w="M"+(u+a.TR[0])+","+(v+a.TR[1])+x(a.TR,a.BR)+x(a.BR,a.BL)+x(a.BL,a.TL)+"Z";b.attr("d",w),_(e,a,d);var A=f.castOption(p.textposition,a.pts),k=y.selectAll("g.slicetext").data(a.text&&"none"!==A?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each((function(){var d=o.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=o.ensureUniformFontSize(e,m(p,a,n.font));d.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,f).call(l.convertToTspans,e);var g,y,b,_=i.bBox(d.node()),x=Math.min(a.BL[1],a.BR[1])+v,w=Math.max(a.TL[1],a.TR[1])+v;y=Math.max(a.TL[0],a.BL[0])+u,b=Math.min(a.TR[0],a.BR[0])+u,(g=c(y,b,x,w,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,h(p.type,g,n),t[s].transform=g,d.attr("transform",o.getTextTransform(g))}))}}));var v=r.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);v.enter().append("g").classed("titletext",!0),v.exit().remove(),v.each((function(){var t=o.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),c=p.title.text;p._meta&&(c=o.templateString(c,p._meta)),t.text(c).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,p.title.font).call(l.convertToTspans,e);var u=b(d,n._size);t.attr("transform",s(u.x,u.y)+a(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/plot":659,"../bar/uniform_text":664,"../pie/helpers":905,"../pie/plot":909,"@plotly/d3":58}],791:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../pie/style_one"),o=e("../bar/uniform_text").resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");o(e,t,"funnelarea"),t.each((function(e){var t=e[0].trace,n=r.select(this);n.style({opacity:t.opacity}),n.selectAll("path.surface").each((function(e){r.select(this).call(i,e,t)}))}))}},{"../bar/uniform_text":664,"../pie/style_one":911,"@plotly/d3":58}],792:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../../plots/attributes"),o=e("../../plots/font_attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/template_attributes").texttemplateAttrs,c=e("../../components/colorscale/attributes"),u=e("../../lib/extend").extendFlat;t.exports=u({z:{valType:"data_array",editType:"calc"},x:u({},r.x,{impliedEdits:{xtype:"array"}}),x0:u({},r.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},r.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},r.y,{impliedEdits:{ytype:"array"}}),y0:u({},r.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},r.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},r.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},r.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},r.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},r.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},r.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},r.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:o({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":926}],793:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../plots/cartesian/axes"),a=e("../../plots/cartesian/align_period"),s=e("../histogram2d/calc"),l=e("../../components/colorscale/calc"),c=e("./convert_column_xyz"),u=e("./clean_2d_array"),h=e("./interp2d"),d=e("./find_empties"),f=e("./make_bound_array"),p=e("../../constants/numerical").BADNUM;function g(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e[r];i!==p&&t.push(i)}return t}t.exports=function(e,t){var n,m,v,y,b,_,x,w,A,k,T,S=o.getFromId(e,t.xaxis||"x"),E=o.getFromId(e,t.yaxis||"y"),C=r.traceIs(t,"contour"),M=r.traceIs(t,"histogram"),O=r.traceIs(t,"gl2d"),L=C?"best":t.zsmooth;if(S._minDtick=0,E._minDtick=0,M)y=(T=s(e,t)).orig_x,n=T.x,m=T.x0,v=T.dx,w=T.orig_y,b=T.y,_=T.y0,x=T.dy,A=T.z;else{var D=t.z;i.isArray1D(D)?(c(t,S,E,"x","y",["z"]),n=t._x,b=t._y,D=t._z):(y=t.x?S.makeCalcdata(t,"x"):[],w=t.y?E.makeCalcdata(t,"y"):[],n=a(t,S,"x",y).vals,b=a(t,E,"y",w).vals,t._x=n,t._y=b),m=t.x0,v=t.dx,_=t.y0,x=t.dy,A=u(D,t,S,E)}function I(e){L=t._input.zsmooth=t.zsmooth=!1,i.warn('cannot use zsmooth: "fast": '+e)}if((S.rangebreaks||E.rangebreaks)&&(A=function(e,t,n){for(var r=[],i=-1,o=0;o<n.length;o++)if(t[o]!==p){r[++i]=[];for(var a=0;a<n[o].length;a++)e[a]!==p&&r[i].push(n[o][a])}return r}(n,b,A),M||(n=g(n),b=g(b),t._x=n,t._y=b)),M||!C&&!t.connectgaps||(t._emptypoints=d(A),h(A,t._emptypoints)),"fast"===L)if("log"===S.type||"log"===E.type)I("log axis found");else if(!M){if(n.length){var R=(n[n.length-1]-n[0])/(n.length-1),P=Math.abs(R/100);for(k=0;k<n.length-1;k++)if(Math.abs(n[k+1]-n[k]-R)>P){I("x scale is not linear");break}}if(b.length&&"fast"===L){var N=(b[b.length-1]-b[0])/(b.length-1),z=Math.abs(N/100);for(k=0;k<b.length-1;k++)if(Math.abs(b[k+1]-b[k]-N)>z){I("y scale is not linear");break}}}var F=i.maxRowLength(A),B="scaled"===t.xtype?"":n,j=f(t,B,m,v,F,S),U="scaled"===t.ytype?"":b,V=f(t,U,_,x,A.length,E);O||(t._extremes[S._id]=o.findExtremes(S,j),t._extremes[E._id]=o.findExtremes(E,V));var q={x:j,y:V,z:A,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&y&&(q.orig_x=y),t.yperiodalignment&&w&&(q.orig_y=w),B&&B.length===j.length-1&&(q.xCenter=B),U&&U.length===V.length-1&&(q.yCenter=U),M&&(q.xRanges=T.xRanges,q.yRanges=T.yRanges,q.pts=T.pts),C||l(e,t,{vals:A,cLetter:"z"}),C&&t.contours&&"heatmap"===t.contours.coloring){var H={type:"contour"===t.type?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};q.xfill=f(H,B,m,v,F,S),q.yfill=f(H,U,_,x,A.length,E)}return[q]}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../../registry":638,"../histogram2d/calc":826,"./clean_2d_array":794,"./convert_column_xyz":796,"./find_empties":798,"./interp2d":801,"./make_bound_array":803}],794:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical").BADNUM;t.exports=function(e,t,n,a){var s,l,c,u,h,d;function f(e){if(r(e))return+e}if(t&&t.transpose){for(s=0,h=0;h<e.length;h++)s=Math.max(s,e[h].length);if(0===s)return!1;c=function(e){return e.length},u=function(e,t,n){return(e[n]||[])[t]}}else s=e.length,c=function(e,t){return e[t].length},u=function(e,t,n){return(e[t]||[])[n]};var p=function(e,t,n){return t===o||n===o?o:u(e,t,n)};function g(e){if(t&&"carpet"!==t.type&&"contourcarpet"!==t.type&&e&&"category"===e.type&&t["_"+e._id.charAt(0)].length){var n=e._id.charAt(0),r={},a=t["_"+n+"CategoryMap"]||t[n];for(h=0;h<a.length;h++)r[a[h]]=h;return function(t){var n=r[e._categories[t]];return n+1?n:o}}return i.identity}var m=g(n),v=g(a);a&&"category"===a.type&&(s=a._categories.length);var y=new Array(s);for(h=0;h<s;h++)for(l=n&&"category"===n.type?n._categories.length:c(e,h),y[h]=new Array(l),d=0;d<l;d++)y[h][d]=f(p(e,v(h),m(d)));return y}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],795:[function(e,t,n){"use strict";t.exports={min:"zmin",max:"zmax"}},{}],796:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../constants/numerical").BADNUM,o=e("../../plots/cartesian/align_period");t.exports=function(e,t,n,a,s,l){var c=e._length,u=t.makeCalcdata(e,a),h=n.makeCalcdata(e,s);u=o(e,t,a,u).vals,h=o(e,n,s,h).vals;var d,f,p,g,m=e.text,v=void 0!==m&&r.isArray1D(m),y=e.hovertext,b=void 0!==y&&r.isArray1D(y),_=r.distinctVals(u),x=_.vals,w=r.distinctVals(h),A=w.vals,k=[],T=A.length,S=x.length;for(d=0;d<l.length;d++)k[d]=r.init2dArray(T,S);v&&(p=r.init2dArray(T,S)),b&&(g=r.init2dArray(T,S));var E=r.init2dArray(T,S);for(d=0;d<c;d++)if(u[d]!==i&&h[d]!==i){var C=r.findBin(u[d]+_.minDiff/2,x),M=r.findBin(h[d]+w.minDiff/2,A);for(f=0;f<l.length;f++){var O=e[l[f]];k[f][M][C]=O[d],E[M][C]=d}v&&(p[M][C]=m[d]),b&&(g[M][C]=y[d])}for(e["_"+a]=x,e["_"+s]=A,f=0;f<l.length;f++)e["_"+l[f]]=k[f];v&&(e._text=p),b&&(e._hovertext=g),t&&"category"===t.type&&(e["_"+a+"CategoryMap"]=x.map((function(e){return t._categories[e]}))),n&&"category"===n.type&&(e["_"+s+"CategoryMap"]=A.map((function(e){return n._categories[e]}))),e._after2before=E}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551}],797:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./xyz_defaults"),o=e("./label_defaults"),a=e("../scatter/period_defaults"),s=e("./style_defaults"),l=e("../../components/colorscale/defaults"),c=e("./attributes");t.exports=function(e,t,n,u){function h(n,i){return r.coerce(e,t,c,n,i)}i(e,t,h,u)?(a(e,t,u,h),h("xhoverformat"),h("yhoverformat"),h("text"),h("hovertext"),h("hovertemplate"),o(h,u),s(e,t,h,u),h("hoverongaps"),h("connectgaps",r.isArray1D(t.z)&&!1!==t.zsmooth),l(e,t,u,h,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../scatter/period_defaults":946,"./attributes":792,"./label_defaults":802,"./style_defaults":806,"./xyz_defaults":807}],798:[function(e,t,n){"use strict";var r=e("../../lib").maxRowLength;t.exports=function(e){var t,n,i,o,a,s,l,c,u=[],h={},d=[],f=e[0],p=[],g=[0,0,0],m=r(e);for(n=0;n<e.length;n++)for(t=p,p=f,f=e[n+1]||[],i=0;i<m;i++)void 0===p[i]&&((s=(void 0!==p[i-1]?1:0)+(void 0!==p[i+1]?1:0)+(void 0!==t[i]?1:0)+(void 0!==f[i]?1:0))?(0===n&&s++,0===i&&s++,n===e.length-1&&s++,i===p.length-1&&s++,s<4&&(h[[n,i]]=[n,i,s]),u.push([n,i,s])):d.push([n,i]));for(;d.length;){for(l={},c=!1,a=d.length-1;a>=0;a--)(s=((h[[(n=(o=d[a])[0])-1,i=o[1]]]||g)[2]+(h[[n+1,i]]||g)[2]+(h[[n,i-1]]||g)[2]+(h[[n,i+1]]||g)[2])/20)&&(l[o]=[n,i,s],d.splice(a,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(o in l)h[o]=l[o],u.push(l[o])}return u.sort((function(e,t){return t[2]-e[2]}))}},{"../../lib":503}],799:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../lib"),o=e("../../plots/cartesian/axes"),a=e("../../components/colorscale").extractOpts;t.exports=function(e,t,n,s,l){l||(l={});var c,u,h,d,f=l.isContour,p=e.cd[0],g=p.trace,m=e.xa,v=e.ya,y=p.x,b=p.y,_=p.z,x=p.xCenter,w=p.yCenter,A=p.zmask,k=g.zhoverformat,T=y,S=b;if(!1!==e.index){try{h=Math.round(e.index[1]),d=Math.round(e.index[0])}catch(t){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(h<0||h>=_[0].length||d<0||d>_.length)return}else{if(r.inbox(t-y[0],t-y[y.length-1],0)>0||r.inbox(n-b[0],n-b[b.length-1],0)>0)return;if(f){var E;for(T=[2*y[0]-y[1]],E=1;E<y.length;E++)T.push((y[E]+y[E-1])/2);for(T.push([2*y[y.length-1]-y[y.length-2]]),S=[2*b[0]-b[1]],E=1;E<b.length;E++)S.push((b[E]+b[E-1])/2);S.push([2*b[b.length-1]-b[b.length-2]])}h=Math.max(0,Math.min(T.length-2,i.findBin(t,T))),d=Math.max(0,Math.min(S.length-2,i.findBin(n,S)))}var C,M,O=m.c2p(y[h]),L=m.c2p(y[h+1]),D=v.c2p(b[d]),I=v.c2p(b[d+1]);f?(C=p.orig_x||y,M=p.orig_y||b,L=O,c=C[h],I=D,u=M[d]):(C=p.orig_x||x||y,M=p.orig_y||w||b,c=x?C[h]:(C[h]+C[h+1])/2,u=w?M[d]:(M[d]+M[d+1])/2,m&&"category"===m.type&&(c=y[h]),v&&"category"===v.type&&(u=b[d]),g.zsmooth&&(O=L=m.c2p(c),D=I=v.c2p(u)));var R=_[d][h];if(A&&!A[d][h]&&(R=void 0),void 0!==R||g.hoverongaps){var P;Array.isArray(p.hovertext)&&Array.isArray(p.hovertext[d])?P=p.hovertext[d][h]:Array.isArray(p.text)&&Array.isArray(p.text[d])&&(P=p.text[d][h]);var N=a(g),z={type:"linear",range:[N.min,N.max],hoverformat:k,_separators:m._separators,_numFormat:m._numFormat},F=o.tickText(z,R,"hover").text;return[i.extendFlat(e,{index:g._after2before?g._after2before[d][h]:[d,h],distance:e.maxHoverDistance,spikeDistance:e.maxSpikeDistance,x0:O,x1:L,y0:D,y1:I,xLabelVal:c,yLabelVal:u,zLabelVal:R,zLabel:F,text:P})]}}},{"../../components/colorscale":378,"../../components/fx":406,"../../lib":503,"../../plots/cartesian/axes":554}],800:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:e("./colorbar"),style:e("./style"),hoverPoints:e("./hover"),moduleType:"trace",name:"heatmap",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},{"../../plots/cartesian":568,"./attributes":792,"./calc":793,"./colorbar":795,"./defaults":797,"./hover":799,"./plot":804,"./style":805}],801:[function(e,t,n){"use strict";var r=e("../../lib"),i=[[-1,0],[1,0],[0,-1],[0,1]];function o(e){return.5-.25*Math.min(1,.5*e)}function a(e,t,n){var r,o,a,s,l,c,u,h,d,f,p,g,m,v=0;for(s=0;s<t.length;s++){for(o=(r=t[s])[0],a=r[1],p=e[o][a],f=0,d=0,l=0;l<4;l++)(u=e[o+(c=i[l])[0]])&&void 0!==(h=u[a+c[1]])&&(0===f?g=m=h:(g=Math.min(g,h),m=Math.max(m,h)),d++,f+=h);if(0===d)throw"iterateInterp2d order is wrong: no defined neighbors";e[o][a]=f/d,void 0===p?d<4&&(v=1):(e[o][a]=(1+n)*e[o][a]-n*p,m>g&&(v=Math.max(v,Math.abs(e[o][a]-p)/(m-g))))}return v}t.exports=function(e,t){var n,i=1;for(a(e,t),n=0;n<t.length&&!(t[n][2]<4);n++);for(t=t.slice(n),n=0;n<100&&i>.01;n++)i=a(e,t,o(i));return i>.01&&r.log("interp2d didn't converge quickly",i),e}},{"../../lib":503}],802:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){e("texttemplate");var n=r.extendFlat({},t.font,{color:"auto",size:"auto"});r.coerceFont(e,"textfont",n)}},{"../../lib":503}],803:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n,o,a,s){var l,c,u,h=[],d=r.traceIs(e,"contour"),f=r.traceIs(e,"histogram"),p=r.traceIs(e,"gl2d");if(i(t)&&t.length>1&&!f&&"category"!==s.type){var g=t.length;if(!(g<=a))return d?t.slice(0,a):t.slice(0,a+1);if(d||p)h=t.slice(0,a);else if(1===a)h=[t[0]-.5,t[0]+.5];else{for(h=[1.5*t[0]-.5*t[1]],u=1;u<g;u++)h.push(.5*(t[u-1]+t[u]));h.push(1.5*t[g-1]-.5*t[g-2])}if(g<a){var m=h[h.length-1],v=m-h[h.length-2];for(u=g;u<a;u++)m+=v,h.push(m)}}else{var y=e[s._id.charAt(0)+"calendar"];for(l=f?s.r2c(n,0,y):i(t)&&1===t.length?t[0]:void 0===n?0:("log"===s.type?s.d2c:s.r2c)(n,0,y),c=o||1,u=d||p?0:-.5;u<a;u++)h.push(l+c*u)}return h}},{"../../lib":503,"../../registry":638}],804:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("tinycolor2"),o=e("../../registry"),a=e("../../components/drawing"),s=e("../../plots/cartesian/axes"),l=e("../../lib"),c=e("../../lib/svg_text_utils"),u=e("../scatter/format_labels"),h=e("../../components/color"),d=e("../../components/colorscale").extractOpts,f=e("../../components/colorscale").makeColorScaleFuncFromTrace,p=e("../../constants/xmlns_namespaces"),g=e("../../constants/alignment").LINE_SPACING,m="heatmap-label";function v(e){return e.selectAll("g."+m)}function y(e){v(e).remove()}function b(e,t){var n=t.length-2,r=l.constrain(l.findBin(e,t),0,n),i=t[r],o=t[r+1],a=l.constrain(r+(e-i)/(o-i)-.5,0,n),s=Math.round(a),c=Math.abs(a-s);return a&&a!==n&&c?{bin0:s,frac:c,bin1:Math.round(s+c/(a-s))}:{bin0:s,bin1:s,frac:0}}function _(e,t){var n=t.length-1,r=l.constrain(l.findBin(e,t),0,n),i=t[r],o=(e-i)/(t[r+1]-i)||0;return o<=0?{bin0:r,bin1:r,frac:0}:o<.5?{bin0:r,bin1:r+1,frac:o}:{bin0:r+1,bin1:r,frac:1-o}}function x(e,t,n){e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=Math.round(255*n[3])}t.exports=function(e,t,n,w){var A=t.xaxis,k=t.yaxis;l.makeTraceGroups(w,n,"hm").each((function(t){var n,w,T,S,E,C,M,O,L=r.select(this),D=t[0],I=D.trace,R=I.xgap||0,P=I.ygap||0,N=D.z,z=D.x,F=D.y,B=D.xCenter,j=D.yCenter,U=o.traceIs(I,"contour"),V=U?"best":I.zsmooth,q=N.length,H=l.maxRowLength(N),$=!1,W=!1;for(C=0;void 0===n&&C<z.length-1;)n=A.c2p(z[C]),C++;for(C=z.length-1;void 0===w&&C>0;)w=A.c2p(z[C]),C--;for(w<n&&(T=w,w=n,n=T,$=!0),C=0;void 0===S&&C<F.length-1;)S=k.c2p(F[C]),C++;for(C=F.length-1;void 0===E&&C>0;)E=k.c2p(F[C]),C--;if(E<S&&(T=S,S=E,E=T,W=!0),U&&(B=z,j=F,z=D.xfill,F=D.yfill),"fast"!==V){var G="best"===V?0:.5;n=Math.max(-G*A._length,n),w=Math.min((1+G)*A._length,w),S=Math.max(-G*k._length,S),E=Math.min((1+G)*k._length,E)}var Y,X,Z=Math.round(w-n),K=Math.round(E-S);if(Z<=0||K<=0)return L.selectAll("image").data([]).exit().remove(),void y(L);"fast"===V?(Y=H,X=q):(Y=Z,X=K);var J=document.createElement("canvas");J.width=Y,J.height=X;var Q,ee,te=J.getContext("2d"),ne=f(I,{noNumericCheck:!0,returnArray:!0});"fast"===V?(Q=$?function(e){return H-1-e}:l.identity,ee=W?function(e){return q-1-e}:l.identity):(Q=function(e){return l.constrain(Math.round(A.c2p(z[e])-n),0,Z)},ee=function(e){return l.constrain(Math.round(k.c2p(F[e])-S),0,K)});var re,ie,oe,ae,se=ee(0),le=[se,se],ce=$?0:1,ue=W?0:1,he=0,de=0,fe=0,pe=0;function ge(e,t){if(void 0!==e){var n=ne(e);return n[0]=Math.round(n[0]),n[1]=Math.round(n[1]),n[2]=Math.round(n[2]),he+=t,de+=n[0]*t,fe+=n[1]*t,pe+=n[2]*t,n}return[0,0,0,0]}function me(e,t,n,r){var i=e[n.bin0];if(void 0===i)return ge(void 0,1);var o,a=e[n.bin1],s=t[n.bin0],l=t[n.bin1],c=a-i||0,u=s-i||0;return o=void 0===a?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-a-s)/3:void 0===s?2*(2*l-a-i)/3:l+i-a-s,ge(i+n.frac*c+r.frac*(u+n.frac*o))}if(V){var ve,ye=0;try{ve=new Uint8Array(Z*K*4)}catch(e){ve=new Array(Z*K*4)}if("best"===V){var be,_e,xe,we=B||z,Ae=j||F,ke=new Array(we.length),Te=new Array(Ae.length),Se=new Array(Z),Ee=B?_:b,Ce=j?_:b;for(C=0;C<we.length;C++)ke[C]=Math.round(A.c2p(we[C])-n);for(C=0;C<Ae.length;C++)Te[C]=Math.round(k.c2p(Ae[C])-S);for(C=0;C<Z;C++)Se[C]=Ee(C,ke);for(M=0;M<K;M++)for(_e=N[(be=Ce(M,Te)).bin0],xe=N[be.bin1],C=0;C<Z;C++,ye+=4)x(ve,ye,ae=me(_e,xe,Se[C],be))}else for(M=0;M<q;M++)for(oe=N[M],le=ee(M),C=0;C<Z;C++)ae=ge(oe[C],1),x(ve,ye=4*(le*Z+Q(C)),ae);var Me=te.createImageData(Z,K);try{Me.data.set(ve)}catch(e){var Oe=Me.data,Le=Oe.length;for(M=0;M<Le;M++)Oe[M]=ve[M]}te.putImageData(Me,0,0)}else{var De=Math.floor(R/2),Ie=Math.floor(P/2);for(M=0;M<q;M++)if(oe=N[M],le.reverse(),le[ue]=ee(M+1),le[0]!==le[1]&&void 0!==le[0]&&void 0!==le[1])for(re=[ie=Q(0),ie],C=0;C<H;C++)re.reverse(),re[ce]=Q(C+1),re[0]!==re[1]&&void 0!==re[0]&&void 0!==re[1]&&(ae=ge(oe[C],(re[1]-re[0])*(le[1]-le[0])),te.fillStyle="rgba("+ae.join(",")+")",te.fillRect(re[0]+De,le[0]+Ie,re[1]-re[0]-R,le[1]-le[0]-P))}de=Math.round(de/he),fe=Math.round(fe/he),pe=Math.round(pe/he);var Re=i("rgb("+de+","+fe+","+pe+")");e._hmpixcount=(e._hmpixcount||0)+he,e._hmlumcount=(e._hmlumcount||0)+he*Re.getLuminance();var Pe=L.selectAll("image").data(t);Pe.enter().append("svg:image").attr({xmlns:p.svg,preserveAspectRatio:"none"}),Pe.attr({height:K,width:Z,x:n,y:S,"xlink:href":J.toDataURL("image/png")}),y(L);var Ne=I.texttemplate;if(Ne){var ze=d(I),Fe={type:"linear",range:[ze.min,ze.max],_separators:A._separators,_numFormat:A._numFormat},Be="histogram2dcontour"===I.type,je="contour"===I.type,Ue=je?q-1:q,Ve=je?1:0,qe=je?H-1:H,He=[];for(C=je?1:0;C<Ue;C++){var $e;if(je)$e=D.y[C];else if(Be){if(0===C||C===q-1)continue;$e=D.y[C]}else if(D.yCenter)$e=D.yCenter[C];else{if(C+1===q&&void 0===D.y[C+1])continue;$e=(D.y[C]+D.y[C+1])/2}var We=Math.round(k.c2p($e));if(!(0>We||We>k._length))for(M=Ve;M<qe;M++){var Ge;if(je)Ge=D.x[M];else if(Be){if(0===M||M===H-1)continue;Ge=D.x[M]}else if(D.xCenter)Ge=D.xCenter[M];else{if(M+1===H&&void 0===D.x[M+1])continue;Ge=(D.x[M]+D.x[M+1])/2}var Ye=Math.round(A.c2p(Ge));if(!(0>Ye||Ye>A._length)){var Xe=u({x:Ge,y:$e},I,e._fullLayout);Xe.x=Ge,Xe.y=$e;var Ze=D.z[C][M];void 0===Ze?(Xe.z="",Xe.zLabel=""):(Xe.z=Ze,Xe.zLabel=s.tickText(Fe,Ze,"hover").text);var Ke=D.text&&D.text[C]&&D.text[C][M];void 0!==Ke&&!1!==Ke||(Ke=""),Xe.text=Ke;var Je=l.texttemplateString(Ne,Xe,e._fullLayout._d3locale,Xe,I._meta||{});if(Je){var Qe=Je.split("<br>"),et=Qe.length,tt=0;for(O=0;O<et;O++)tt=Math.max(tt,Qe[O].length);He.push({l:et,c:tt,t:Je,x:Ye,y:We,z:Ze})}}}}var nt=I.textfont,rt=nt.family,it=nt.size,ot=e._fullLayout.font.size;if(!it||"auto"===it){var at=1/0,st=1/0,lt=0,ct=0;for(O=0;O<He.length;O++){var ut=He[O];if(lt=Math.max(lt,ut.l),ct=Math.max(ct,ut.c),O<He.length-1){var ht=He[O+1],dt=Math.abs(ht.x-ut.x),ft=Math.abs(ht.y-ut.y);dt&&(at=Math.min(at,dt)),ft&&(st=Math.min(st,ft))}}isFinite(at)&&isFinite(st)?(at-=R,st-=P,at/=ct,st/=lt,at/=g/2,st/=g,it=Math.min(Math.floor(at),Math.floor(st),ot)):it=ot}if(it<=0||!isFinite(it))return;v(L).data(He).enter().append("g").classed(m,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),i=nt.color;i&&"auto"!==i||(i=h.contrast("rgba("+ne(t.z).join()+")")),n.attr("data-notex",1).call(c.positionText,function(e){return e.x}(t),function(e){return e.y-it*(e.l*g/2-1)}(t)).call(a.font,rt,it,i).text(t.t).call(c.convertToTspans,e)}))}}))}},{"../../components/color":366,"../../components/colorscale":378,"../../components/drawing":388,"../../constants/alignment":471,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../scatter/format_labels":935,"@plotly/d3":58,tinycolor2:312}],805:[function(e,t,n){"use strict";var r=e("@plotly/d3");t.exports=function(e){r.select(e).selectAll(".hm image").style("opacity",(function(e){return e.trace.opacity}))}},{"@plotly/d3":58}],806:[function(e,t,n){"use strict";t.exports=function(e,t,n){!1===n("zsmooth")&&(n("xgap"),n("ygap")),n("zhoverformat")}},{}],807:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../registry");function a(e,t){var n=t(e);return"scaled"===(n?t(e+"type","array"):"scaled")&&(t(e+"0"),t("d"+e)),n}t.exports=function(e,t,n,s,l,c){var u,h,d=n("z");if(l=l||"x",c=c||"y",void 0===d||!d.length)return 0;if(i.isArray1D(e.z)){u=n(l),h=n(c);var f=i.minRowLength(u),p=i.minRowLength(h);if(0===f||0===p)return 0;t._length=Math.min(f,p,d.length)}else{if(u=a(l,n),h=a(c,n),!function(e){for(var t,n=!0,o=!1,a=!1,s=0;s<e.length;s++){if(t=e[s],!i.isArrayOrTypedArray(t)){n=!1;break}t.length>0&&(o=!0);for(var l=0;l<t.length;l++)if(r(t[l])){a=!0;break}}return n&&o&&a}(d))return 0;n("transpose"),t._length=null}return"heatmapgl"===e.type||o.getComponentMethod("calendars","handleTraceDefaults")(e,t,[l,c],s),!0}},{"../../lib":503,"../../registry":638,"fast-isnumeric":190}],808:[function(e,t,n){"use strict";for(var r=e("../heatmap/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../lib/extend").extendFlat,a=e("../../plot_api/edit_types").overrideAll,s=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],l={},c=0;c<s.length;c++){var u=s[c];l[u]=r[u]}l.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},o(l,i("",{cLetter:"z",autoColorDflt:!1})),t.exports=a(l,"calc","nested")},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../heatmap/attributes":792}],809:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_heatmap2d,i=e("../../plots/cartesian/axes"),o=e("../../lib/str2rgbarray");function a(e,t){this.scene=e,this.uid=t,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:"fast",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=r(e.glplot,this.options),this.heatmap._trace=this}var s=a.prototype;s.handlePick=function(e){var t=this.options,n=t.shape,r=e.pointId,i=r%n[0],o=Math.floor(r/n[0]),a=r;return{trace:this,dataCoord:e.dataCoord,traceCoord:[t.x[i],t.y[o],t.z[a]],textLabel:this.textLabels[r],name:this.name,pointIndex:[o,i],hoverinfo:this.hoverinfo}},s.update=function(e,t){var n=t[0];this.index=e.index,this.name=e.name,this.hoverinfo=e.hoverinfo;var r=n.z;this.options.z=[].concat.apply([],r);var a=r[0].length,s=r.length;this.options.shape=[a,s],this.options.x=n.x,this.options.y=n.y,this.options.zsmooth=e.zsmooth;var l=function(e){for(var t=e.colorscale,n=e.zmin,r=e.zmax,i=t.length,a=new Array(i),s=new Array(4*i),l=0;l<i;l++){var c=t[l],u=o(c[1]);a[l]=n+c[0]*(r-n);for(var h=0;h<4;h++)s[4*l+h]=u[h]}return{colorLevels:a,colorValues:s}}(e);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],e.text),this.heatmap.update(this.options);var c,u,h=this.scene.xaxis,d=this.scene.yaxis;!1===e.zsmooth&&(c={ppad:n.x[1]-n.x[0]},u={ppad:n.y[1]-n.y[0]}),e._extremes[h._id]=i.findExtremes(h,n.x,c),e._extremes[d._id]=i.findExtremes(d,n.y,u)},s.dispose=function(){this.heatmap.dispose()},t.exports=function(e,t,n){var r=new a(e,t.uid);return r.update(t,n),r}},{"../../../stackgl_modules":1120,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554}],810:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../heatmap/xyz_defaults"),o=e("../../components/colorscale/defaults"),a=e("./attributes");t.exports=function(e,t,n,s){function l(n,i){return r.coerce(e,t,a,n,i)}i(e,t,l,s)?(l("text"),l("zsmooth"),o(e,t,s,l,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/xyz_defaults":807,"./attributes":808}],811:[function(e,t,n){"use strict";["*heatmapgl* trace is deprecated!","Please consider switching to the *heatmap* or *image* trace types.","Alternatively you could contribute/sponsor rewriting this trace type","based on cartesian features and using regl framework."].join(" "),t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("../heatmap/calc"),plot:e("./convert"),moduleType:"trace",name:"heatmapgl",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","2dMap"],meta:{}}},{"../../plots/gl2d":596,"../heatmap/calc":793,"../heatmap/colorbar":795,"./attributes":808,"./convert":809,"./defaults":810}],812:[function(e,t,n){"use strict";var r=e("../bar/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../plots/font_attributes"),l=e("./bin_attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:i("x"),yhoverformat:i("y"),text:u({},r.text,{}),hovertext:u({},r.hovertext,{}),orientation:r.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:l("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:l("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:o({},{keys:c.eventDataKeys}),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:u({},r.textposition,{arrayOk:!1}),textfont:s({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:r.insidetextanchor,textangle:r.textangle,cliponaxis:r.cliponaxis,constraintext:r.constraintext,marker:r.marker,offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,selected:r.selected,unselected:r.unselected,_deprecated:{bardir:r._deprecated.bardir}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../bar/attributes":648,"./bin_attributes":814,"./constants":818}],813:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=e.length,r=0,i=0;i<n;i++)t[i]?(e[i]/=t[i],r+=e[i]):e[i]=null;return r}},{}],814:[function(e,t,n){"use strict";t.exports=function(e,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},{}],815:[function(e,t,n){"use strict";var r=e("fast-isnumeric");t.exports={count:function(e,t,n){return n[e]++,1},sum:function(e,t,n,i){var o=i[t];return r(o)?(o=Number(o),n[e]+=o,o):0},avg:function(e,t,n,i,o){var a=i[t];return r(a)&&(a=Number(a),n[e]+=a,o[e]++),0},min:function(e,t,n,i){var o=i[t];if(r(o)){if(o=Number(o),!r(n[e]))return n[e]=o,o;if(n[e]>o){var a=o-n[e];return n[e]=o,a}}return 0},max:function(e,t,n,i){var o=i[t];if(r(o)){if(o=Number(o),!r(n[e]))return n[e]=o,o;if(n[e]<o){var a=o-n[e];return n[e]=o,a}}return 0}}},{"fast-isnumeric":190}],816:[function(e,t,n){"use strict";var r=e("../../constants/numerical"),i=r.ONEAVGYEAR,o=r.ONEAVGMONTH,a=r.ONEDAY,s=r.ONEHOUR,l=r.ONEMIN,c=r.ONESEC,u=e("../../plots/cartesian/axes").tickIncrement;function h(e,t,n,r){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),o="date"===n.type,a=d(i,o),s=0;s<10;s++){var l=d(80*a,o);if(a===l)break;if(!f(l,e,t,o,n,r))break;a=l}return a}function d(e,t){return t&&e>c?e>a?e>1.1*i?i:e>1.1*o?o:a:e>s?s:e>l?l:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function f(e,t,n,r,o,s){if(r&&e>a){var l=p(t,o,s),c=p(n,o,s),u=e===i?0:1;return l[u]!==c[u]}return Math.floor(n/e)-Math.floor(t/e)>.1}function p(e,t,n){var r=t.c2d(e,i,n).split("-");return""===r[0]&&(r.unshift(),r[0]="-"+r[0]),r}t.exports=function(e,t,n,r,o){var s,l,c=-1.1*t,d=-.1*t,f=e-d,p=n[0],g=n[1],m=Math.min(h(p+d,p+f,r,o),h(g+d,g+f,r,o)),v=Math.min(h(p+c,p+d,r,o),h(g+c,g+d,r,o));if(m>v&&v<Math.abs(g-p)/4e3?(s=m,l=!1):(s=Math.min(m,v),l=!0),"date"===r.type&&s>a){var y=s===i?1:6,b=s===i?"M12":"M1";return function(t,n){var a=r.c2d(t,i,o),s=a.indexOf("-",y);s>0&&(a=a.substr(0,s));var c=r.d2c(a,0,o);if(c<t){var h=u(c,b,!1,o);(c+h)/2<t+e&&(c=h)}return n&&l?u(c,b,!0,o):c}}return function(t,n){var r=s*Math.round(t/s);return r+s/10<t&&r+.9*s<t+e&&(r+=s),n&&l&&(r-=s),r}}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554}],817:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../registry"),a=e("../../plots/cartesian/axes"),s=e("../bar/arrays_to_calcdata"),l=e("./bin_functions"),c=e("./norm_functions"),u=e("./average"),h=e("./bin_label_vals");function d(e,t,n,s,l){var c,u,h,f,p,g,m,v=s+"bins",y=e._fullLayout,b=t["_"+s+"bingroup"],_=y._histogramBinOpts[b],x="overlay"===y.barmode,w=function(e){return n.r2c(e,0,f)},A=function(e){return n.c2r(e,0,f)},k="date"===n.type?function(e){return e||0===e?i.cleanDate(e,null,f):null}:function(e){return r(e)?Number(e):null};function T(e,t,n){t[e+"Found"]?(t[e]=k(t[e]),null===t[e]&&(t[e]=n[e])):(g[e]=t[e]=n[e],i.nestedProperty(u[0],v+"."+e).set(n[e]))}if(t["_"+s+"autoBinFinished"])delete t["_"+s+"autoBinFinished"];else{u=_.traces;var S=[],E=!0,C=!1,M=!1;for(c=0;c<u.length;c++)if((h=u[c]).visible){var O=_.dirs[c];p=h["_"+O+"pos0"]=n.makeCalcdata(h,O),S=i.concat(S,p),delete h["_"+s+"autoBinFinished"],!0===t.visible&&(E?E=!1:(delete h._autoBin,h["_"+s+"autoBinFinished"]=1),o.traceIs(h,"2dMap")&&(C=!0),"histogram2dcontour"===h.type&&(M=!0))}f=u[0][s+"calendar"];var L=a.autoBin(S,n,_.nbins,C,f,_.sizeFound&&_.size),D=u[0]._autoBin={};if(g=D[_.dirs[0]]={},M&&(_.size||(L.start=A(a.tickIncrement(w(L.start),L.size,!0,f))),void 0===_.end&&(L.end=A(a.tickIncrement(w(L.end),L.size,!1,f)))),x&&!o.traceIs(t,"2dMap")&&0===L._dataSpan&&"category"!==n.type&&"multicategory"!==n.type){if(l)return[L,p,!0];L=function(e,t,n,r,o){var a,s,l,c=e._fullLayout,u=function(e,t){for(var n=t.xaxis,r=t.yaxis,i=t.orientation,o=[],a=e._fullData,s=0;s<a.length;s++){var l=a[s];"histogram"===l.type&&!0===l.visible&&l.orientation===i&&l.xaxis===n&&l.yaxis===r&&o.push(l)}return o}(e,t),h=!1,f=1/0,p=[t];for(a=0;a<u.length;a++)if((s=u[a])===t)h=!0;else if(h){var g=d(e,s,n,r,!0),m=g[0],v=g[2];s["_"+r+"autoBinFinished"]=1,s["_"+r+"pos0"]=g[1],v?p.push(s):f=Math.min(f,m.size)}else l=c._histogramBinOpts[s["_"+r+"bingroup"]],f=Math.min(f,l.size||s[o].size);var y=new Array(p.length);for(a=0;a<p.length;a++)for(var b=p[a]["_"+r+"pos0"],_=0;_<b.length;_++)if(void 0!==b[_]){y[a]=b[_];break}for(isFinite(f)||(f=i.distinctVals(y).minDiff),a=0;a<p.length;a++){var x=(s=p[a])[r+"calendar"],w={start:n.c2r(y[a]-f/2,0,x),end:n.c2r(y[a]+f/2,0,x),size:f};s._input[o]=s[o]=w,(l=c._histogramBinOpts[s["_"+r+"bingroup"]])&&i.extendFlat(l,w)}return t[o]}(e,t,n,s,v)}(m=h.cumulative||{}).enabled&&"include"!==m.currentbin&&("decreasing"===m.direction?L.start=A(a.tickIncrement(w(L.start),L.size,!0,f)):L.end=A(a.tickIncrement(w(L.end),L.size,!1,f))),_.size=L.size,_.sizeFound||(g.size=L.size,i.nestedProperty(u[0],v+".size").set(L.size)),T("start",_,L),T("end",_,L)}p=t["_"+s+"pos0"],delete t["_"+s+"pos0"];var I=t._input[v]||{},R=i.extendFlat({},_),P=_.start,N=n.r2l(I.start),z=void 0!==N;if((_.startFound||z)&&N!==n.r2l(P)){var F=z?N:i.aggNums(Math.min,null,p),B={type:"category"===n.type||"multicategory"===n.type?"linear":n.type,r2l:n.r2l,dtick:_.size,tick0:P,calendar:f,range:[F,a.tickIncrement(F,_.size,!1,f)].map(n.l2r)},j=a.tickFirst(B);j>n.r2l(F)&&(j=a.tickIncrement(j,_.size,!0,f)),R.start=n.l2r(j),z||i.nestedProperty(t,v+".start").set(R.start)}var U=_.end,V=n.r2l(I.end),q=void 0!==V;if((_.endFound||q)&&V!==n.r2l(U)){var H=q?V:i.aggNums(Math.max,null,p);R.end=n.l2r(H),q||i.nestedProperty(t,v+".start").set(R.end)}var $="autobin"+s;return!1===t._input[$]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[$],delete t[$]),[R,p]}t.exports={calc:function(e,t){var n,o,f,p,g=[],m=[],v="h"===t.orientation,y=a.getFromId(e,v?t.yaxis:t.xaxis),b=v?"y":"x",_={x:"y",y:"x"}[b],x=t[b+"calendar"],w=t.cumulative,A=d(e,t,y,b),k=A[0],T=A[1],S="string"==typeof k.size,E=[],C=S?E:k,M=[],O=[],L=[],D=0,I=t.histnorm,R=t.histfunc,P=-1!==I.indexOf("density");w.enabled&&P&&(I=I.replace(/ ?density$/,""),P=!1);var N,z="max"===R||"min"===R?null:0,F=l.count,B=c[I],j=!1,U=function(e){return y.r2c(e,0,x)};for(i.isArrayOrTypedArray(t[_])&&"count"!==R&&(N=t[_],j="avg"===R,F=l[R]),n=U(k.start),f=U(k.end)+(n-a.tickIncrement(n,k.size,!1,x))/1e6;n<f&&g.length<1e6&&(o=a.tickIncrement(n,k.size,!1,x),g.push((n+o)/2),m.push(z),L.push([]),E.push(n),P&&M.push(1/(o-n)),j&&O.push(0),!(o<=n));)n=o;E.push(n),S||"date"!==y.type||(C={start:U(C.start),end:U(C.end),size:C.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var V=t["_"+b+"bingroup"],q={leftGap:1/0,rightGap:1/0};V&&(e._fullLayout._roundFnOpts[V]||(e._fullLayout._roundFnOpts[V]=q),q=e._fullLayout._roundFnOpts[V]);var H,$=m.length,W=!0,G=q.leftGap,Y=q.rightGap,X={};for(n=0;n<T.length;n++){var Z=T[n];(p=i.findBin(Z,C))>=0&&p<$&&(D+=F(p,n,m,N,O),W&&L[p].length&&Z!==T[L[p][0]]&&(W=!1),L[p].push(n),X[n]=p,G=Math.min(G,Z-E[p]),Y=Math.min(Y,E[p+1]-Z))}q.leftGap=G,q.rightGap=Y,W||(H=function(t,n){return function(){var r=e._fullLayout._roundFnOpts[V];return h(r.leftGap,r.rightGap,E,y,x)(t,n)}}),j&&(D=u(m,O)),B&&B(m,D,M),w.enabled&&function(e,t,n){var r,i,o;function a(t){o=e[t],e[t]/=2}function s(t){i=e[t],e[t]=o+i/2,o+=i}if("half"===n)if("increasing"===t)for(a(0),r=1;r<e.length;r++)s(r);else for(a(e.length-1),r=e.length-2;r>=0;r--)s(r);else if("increasing"===t){for(r=1;r<e.length;r++)e[r]+=e[r-1];"exclude"===n&&(e.unshift(0),e.pop())}else{for(r=e.length-2;r>=0;r--)e[r]+=e[r+1];"exclude"===n&&(e.push(0),e.shift())}}(m,w.direction,w.currentbin);var K=Math.min(g.length,m.length),J=[],Q=0,ee=K-1;for(n=0;n<K;n++)if(m[n]){Q=n;break}for(n=K-1;n>=Q;n--)if(m[n]){ee=n;break}for(n=Q;n<=ee;n++)if(r(g[n])&&r(m[n])){var te={p:g[n],s:m[n],b:0};w.enabled||(te.pts=L[n],W?te.ph0=te.ph1=L[n].length?T[L[n][0]]:g[n]:(t._computePh=!0,te.ph0=H(E[n]),te.ph1=H(E[n+1],!0))),J.push(te)}return 1===J.length&&(J[0].width1=a.tickIncrement(J[0].p,k.size,!1,x)-J[0].p),s(J,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(J,t,X),J},calcAllAutoBins:d}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"../bar/arrays_to_calcdata":647,"./average":813,"./bin_functions":815,"./bin_label_vals":816,"./norm_functions":824,"fast-isnumeric":190}],818:[function(e,t,n){"use strict";t.exports={eventDataKeys:["binNumber"]}},{}],819:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axis_ids"),o=e("../../registry").traceIs,a=e("../bar/defaults").handleGroupingDefaults,s=r.nestedProperty,l=e("../../plots/cartesian/constraints").getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],u=["x","y"];t.exports=function(e,t){var n,h,d,f,p,g,m,v=t._histogramBinOpts={},y=[],b={},_=[];function x(e,t){return r.coerce(n._input,n,n._module.attributes,e,t)}function w(e){return"v"===e.orientation?"x":"y"}function A(e,n,o){var a=e.uid+"__"+o;n||(n=a);var s=function(e,n){return i.getFromTrace({_fullLayout:t},e,n).type}(e,o),l=e[o+"calendar"]||"",c=v[n],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(o)):(n=a,s!==c.axType&&r.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&r.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[n]={traces:[e],dirs:[o],axType:s,calendar:e[o+"calendar"]||""}),e["_"+o+"bingroup"]=n}for(p=0;p<e.length;p++)n=e[p],o(n,"histogram")&&(y.push(n),delete n._xautoBinFinished,delete n._yautoBinFinished,o(n,"2dMap")||a(n._input,n,t,x));var k=t._alignmentOpts||{};for(p=0;p<y.length;p++){if(n=y[p],d="",!o(n,"2dMap")){if(f=w(n),"group"===t.barmode&&n.alignmentgroup){var T=n[f+"axis"],S=l(t,T)+n.orientation;(k[S]||{})[n.alignmentgroup]&&(d=S)}d||"overlay"===t.barmode||(d=l(t,n.xaxis)+l(t,n.yaxis)+w(n))}d?(b[d]||(b[d]=[]),b[d].push(n)):_.push(n)}for(d in b)if(1!==(h=b[d]).length){var E=!1;for(h.length&&(n=h[0],E=x("bingroup")),d=E||d,p=0;p<h.length;p++){var C=(n=h[p])._input.bingroup;C&&C!==d&&r.warn(["Trace",n.index,"must match","within bingroup",d+".","Ignoring its bingroup:",C,"setting."].join(" ")),n.bingroup=d,A(n,d,w(n))}}else _.push(h[0]);for(p=0;p<_.length;p++){n=_[p];var M=x("bingroup");if(o(n,"2dMap"))for(m=0;m<2;m++){var O=x((f=u[m])+"bingroup",M?M+"__"+f:null);A(n,O,f)}else A(n,M,w(n))}for(d in v){var L=v[d];for(h=L.traces,g=0;g<c.length;g++){var D,I,R=c[g],P=R.name;if("nbins"!==P||!L.sizeFound){for(p=0;p<h.length;p++){if(n=h[p],f=L.dirs[p],D=R.aStr[f],void 0!==s(n._input,D).get()){L[P]=x(D),L[P+"Found"]=!0;break}(I=(n._autoBin||{})[f]||{})[P]&&s(n,D).set(I[P])}if("start"===P||"end"===P)for(;p<h.length;p++)(n=h[p])["_"+f+"bingroup"]&&x(D,(I=(n._autoBin||{})[f]||{})[P]);"nbins"!==P||L.sizeFound||L.nbinsFound||(n=h[0],L[P]=x(D))}}}}},{"../../lib":503,"../../plots/cartesian/axis_ids":558,"../../plots/cartesian/constraints":562,"../../registry":638,"../bar/defaults":652}],820:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../components/color"),a=e("../bar/defaults").handleText,s=e("../bar/style_defaults"),l=e("./attributes");t.exports=function(e,t,n,c){function u(n,r){return i.coerce(e,t,l,n,r)}var h=u("x"),d=u("y");u("cumulative.enabled")&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var f=u("textposition");a(e,t,c,u,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat");var p=u("orientation",d&&!h?"h":"v"),g="v"===p?"x":"y",m="v"===p?"y":"x",v=h&&d?Math.min(i.minRowLength(h)&&i.minRowLength(d)):i.minRowLength(t[g]||[]);if(v){t._length=v,r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],c),t[m]&&u("histfunc"),u("histnorm"),u("autobin"+g),s(e,t,u,n,c),i.coerceSelectionMarkerOpacity(t,u);var y=(t.marker.line||{}).color,b=r.getComponentMethod("errorbars","supplyDefaults");b(e,t,y||o.defaultLine,{axis:"y"}),b(e,t,y||o.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},{"../../components/color":366,"../../lib":503,"../../registry":638,"../bar/defaults":652,"../bar/style_defaults":663,"./attributes":812}],821:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){if(e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(n.cumulative||{}).enabled){var o,a=Array.isArray(i)?r[0].pts[i[0]][i[1]]:r[i].pts;if(e.pointNumbers=a,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex,n._indexToPoints){o=[];for(var s=0;s<a.length;s++)o=o.concat(n._indexToPoints[a[s]])}else o=a;e.pointIndices=o}return e}},{}],822:[function(e,t,n){"use strict";var r=e("../bar/hover").hoverPoints,i=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,n,o,a){var s=r(e,t,n,o,a);if(s){var l=(e=s[0]).cd[e.index],c=e.cd[0].trace;if(!c.cumulative.enabled){var u="h"===c.orientation?"y":"x";e[u+"Label"]=i(e[u+"a"],[l.ph0,l.ph1],c[u+"hoverformat"])}return s}}},{"../../plots/cartesian/axes":554,"../bar/hover":655}],823:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("../bar/layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),supplyLayoutDefaults:e("../bar/layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("../bar/cross_trace_calc").crossTraceCalc,plot:e("../bar/plot").plot,layerName:"barlayer",style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,colorbar:e("../scatter/marker_colorbar"),hoverPoints:e("./hover"),selectPoints:e("../bar/select"),eventData:e("./event_data"),moduleType:"trace",name:"histogram",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../bar/cross_trace_calc":651,"../bar/layout_attributes":657,"../bar/layout_defaults":658,"../bar/plot":659,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":944,"./attributes":812,"./calc":817,"./cross_trace_defaults":819,"./defaults":820,"./event_data":821,"./hover":822}],824:[function(e,t,n){"use strict";t.exports={percent:function(e,t){for(var n=e.length,r=100/t,i=0;i<n;i++)e[i]*=r},probability:function(e,t){for(var n=e.length,r=0;r<n;r++)e[r]/=t},density:function(e,t,n,r){var i=e.length;r=r||1;for(var o=0;o<i;o++)e[o]*=n[o]*r},"probability density":function(e,t,n,r){var i=e.length;r&&(t/=r);for(var o=0;o<i;o++)e[o]*=n[o]/t}}},{}],825:[function(e,t,n){"use strict";var r=e("../histogram/attributes"),i=e("../histogram/bin_attributes"),o=e("../heatmap/attributes"),a=e("../../plots/attributes"),s=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../components/colorscale/attributes"),h=e("../../lib/extend").extendFlat;t.exports=h({x:r.x,y:r.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:i("x"),nbinsy:r.nbinsy,ybins:i("y"),autobinx:r.autobinx,autobiny:r.autobiny,bingroup:h({},r.bingroup,{}),xbingroup:h({},r.bingroup,{}),ybingroup:h({},r.bingroup,{}),xgap:o.xgap,ygap:o.ygap,zsmooth:o.zsmooth,xhoverformat:s("x"),yhoverformat:s("y"),zhoverformat:s("z",1),hovertemplate:l({},{keys:"z"}),texttemplate:c({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:o.textfont,showlegend:h({},a.showlegend,{dflt:!1})},u("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../heatmap/attributes":792,"../histogram/attributes":812,"../histogram/bin_attributes":814}],826:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../histogram/bin_functions"),a=e("../histogram/norm_functions"),s=e("../histogram/average"),l=e("../histogram/bin_label_vals"),c=e("../histogram/calc").calcAllAutoBins;function u(e,t,n,r){var i,o=new Array(e);if(r)for(i=0;i<e;i++)o[i]=1/(t[i+1]-t[i]);else{var a=1/n;for(i=0;i<e;i++)o[i]=a}return o}function h(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function d(e,t,n,r,i,o){var a,s=e.length-1,c=new Array(s),u=l(n,r,e,i,o);for(a=0;a<s;a++){var h=(t||[])[a];c[a]=void 0===h?[u(e[a]),u(e[a+1],!0)]:[h,h]}return c}t.exports=function(e,t){var n,l,f,p,g=i.getFromId(e,t.xaxis),m=i.getFromId(e,t.yaxis),v=t.xcalendar,y=t.ycalendar,b=function(e){return g.r2c(e,0,v)},_=function(e){return m.r2c(e,0,y)},x=c(e,t,g,"x"),w=x[0],A=x[1],k=c(e,t,m,"y"),T=k[0],S=k[1],E=t._length;A.length>E&&A.splice(E,A.length-E),S.length>E&&S.splice(E,S.length-E);var C=[],M=[],O=[],L="string"==typeof w.size,D="string"==typeof T.size,I=[],R=[],P=L?I:w,N=D?R:T,z=0,F=[],B=[],j=t.histnorm,U=t.histfunc,V=-1!==j.indexOf("density"),q="max"===U||"min"===U?null:0,H=o.count,$=a[j],W=!1,G=[],Y=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==U&&(W="avg"===U,H=o[U]);var Z=w.size,K=b(w.start),J=b(w.end)+(K-i.tickIncrement(K,Z,!1,v))/1e6;for(n=K;n<J;n=i.tickIncrement(n,Z,!1,v))M.push(q),I.push(n),W&&O.push(0);I.push(n);var Q,ee=M.length,te=(n-K)/ee,ne=(Q=K+te/2,g.c2r(Q,0,v)),re=T.size,ie=_(T.start),oe=_(T.end)+(ie-i.tickIncrement(ie,re,!1,y))/1e6;for(n=ie;n<oe;n=i.tickIncrement(n,re,!1,y)){C.push(M.slice()),R.push(n);var ae=new Array(ee);for(l=0;l<ee;l++)ae[l]=[];B.push(ae),W&&F.push(O.slice())}R.push(n);var se=C.length,le=(n-ie)/se,ce=function(e){return m.c2r(e,0,y)}(ie+le/2);V&&(G=u(M.length,P,te,L),Y=u(C.length,N,le,D)),L||"date"!==g.type||(P=h(b,P)),D||"date"!==m.type||(N=h(_,N));var ue=!0,he=!0,de=new Array(ee),fe=new Array(se),pe=1/0,ge=1/0,me=1/0,ve=1/0;for(n=0;n<E;n++){var ye=A[n],be=S[n];f=r.findBin(ye,P),p=r.findBin(be,N),f>=0&&f<ee&&p>=0&&p<se&&(z+=H(f,n,C[p],X,F[p]),B[p][f].push(n),ue&&(void 0===de[f]?de[f]=ye:de[f]!==ye&&(ue=!1)),he&&(void 0===fe[p]?fe[p]=be:fe[p]!==be&&(he=!1)),pe=Math.min(pe,ye-I[f]),ge=Math.min(ge,I[f+1]-ye),me=Math.min(me,be-R[p]),ve=Math.min(ve,R[p+1]-be))}if(W)for(p=0;p<se;p++)z+=s(C[p],F[p]);if($)for(p=0;p<se;p++)$(C[p],z,G,Y[p]);return{x:A,xRanges:d(I,ue&&de,pe,ge,g,v),x0:ne,dx:te,y:S,yRanges:d(R,he&&fe,me,ve,m,y),y0:ce,dy:le,z:C,pts:B}}},{"../../lib":503,"../../plots/cartesian/axes":554,"../histogram/average":813,"../histogram/bin_functions":815,"../histogram/bin_label_vals":816,"../histogram/calc":817,"../histogram/norm_functions":824}],827:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./sample_defaults"),o=e("../heatmap/style_defaults"),a=e("../../components/colorscale/defaults"),s=e("../heatmap/label_defaults"),l=e("./attributes");t.exports=function(e,t,n,c){function u(n,i){return r.coerce(e,t,l,n,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,c),a(e,t,c,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),s(u,c),u("xhoverformat"),u("yhoverformat"))}},{"../../components/colorscale/defaults":376,"../../lib":503,"../heatmap/label_defaults":802,"../heatmap/style_defaults":806,"./attributes":825,"./sample_defaults":830}],828:[function(e,t,n){"use strict";var r=e("../heatmap/hover"),i=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,n,o,a){var s=r(e,t,n,o,a);if(s){var l=(e=s[0]).index,c=l[0],u=l[1],h=e.cd[0],d=h.trace,f=h.xRanges[u],p=h.yRanges[c];return e.xLabel=i(e.xa,[f[0],f[1]],d.xhoverformat),e.yLabel=i(e.ya,[p[0],p[1]],d.yhoverformat),s}}},{"../../plots/cartesian/axes":554,"../heatmap/hover":799}],829:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../heatmap/calc"),plot:e("../heatmap/plot"),layerName:"heatmaplayer",colorbar:e("../heatmap/colorbar"),style:e("../heatmap/style"),hoverPoints:e("./hover"),eventData:e("../histogram/event_data"),moduleType:"trace",name:"histogram2d",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../heatmap/calc":793,"../heatmap/colorbar":795,"../heatmap/plot":804,"../heatmap/style":805,"../histogram/cross_trace_defaults":819,"../histogram/event_data":821,"./attributes":825,"./defaults":827,"./hover":828}],830:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib");t.exports=function(e,t,n,o){var a=n("x"),s=n("y"),l=i.minRowLength(a),c=i.minRowLength(s);l&&c?(t._length=Math.min(l,c),r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o),(n("z")||n("marker.color"))&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")):t.visible=!1}},{"../../lib":503,"../../registry":638}],831:[function(e,t,n){"use strict";var r=e("../histogram2d/attributes"),i=e("../contour/attributes"),o=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=e("../../lib/extend").extendFlat;t.exports=s({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:{color:i.line.color,width:s({},i.line.width,{dflt:.5}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,texttemplate:i.texttemplate,textfont:i.textfont},o("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../contour/attributes":735,"../histogram2d/attributes":825}],832:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../histogram2d/sample_defaults"),o=e("../contour/contours_defaults"),a=e("../contour/style_defaults"),s=e("../heatmap/label_defaults"),l=e("./attributes");t.exports=function(e,t,n,c){function u(n,i){return r.coerce(e,t,l,n,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,(function(n){return r.coerce2(e,t,l,n)})),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),t.contours&&"heatmap"===t.contours.coloring&&s(u,c))}},{"../../lib":503,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/label_defaults":802,"../histogram2d/sample_defaults":830,"./attributes":831}],833:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../contour/calc"),plot:e("../contour/plot").plot,layerName:"contourlayer",style:e("../contour/style"),colorbar:e("../contour/colorbar"),hoverPoints:e("../contour/hover"),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":568,"../contour/calc":736,"../contour/colorbar":738,"../contour/hover":748,"../contour/plot":753,"../contour/style":755,"../histogram/cross_trace_defaults":819,"./attributes":831,"./defaults":832}],834:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../components/colorscale/attributes"),a=e("../../plots/domain").attributes,s=e("../pie/attributes"),l=e("../sunburst/attributes"),c=e("../treemap/attributes"),u=e("../treemap/constants"),h=e("../../lib/extend").extendFlat;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:a({name:"icicle",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"../sunburst/attributes":1045,"../treemap/attributes":1071,"../treemap/constants":1074}],835:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="icicle",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],836:[function(e,t,n){"use strict";var r=e("../sunburst/calc");n.calc=function(e,t){return r.calc(e,t)},n.crossTraceCalc=function(e){return r._runCrossTraceCalc("icicle",e)}},{"../sunburst/calc":1047}],837:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../components/color"),a=e("../../plots/domain").defaults,s=e("../bar/defaults").handleText,l=e("../bar/constants").TEXTPAD,c=e("../../components/colorscale"),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,n,c){function d(n,o){return r.coerce(e,t,i,n,o)}var f=d("labels"),p=d("parents");if(f&&f.length&&p&&p.length){var g=d("values");g&&g.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),d("tiling.orientation"),d("tiling.flip"),d("tiling.pad");var m=d("text");d("texttemplate"),t.texttemplate||d("textinfo",Array.isArray(m)?"text+label":"label"),d("hovertext"),d("hovertemplate");var v=d("pathbar.visible");s(e,t,c,d,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition"),d("marker.line.width")&&d("marker.line.color",c.paper_bgcolor),d("marker.colors");var y=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;y&&h(e,t,c,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",y?1:.7),t._hovered={marker:{line:{width:2,color:o.contrast(c.paper_bgcolor)}}},v&&(d("pathbar.thickness",t.pathbar.textfont.size+2*l),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),a(t,c,d),t._length=null}else t.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":834}],838:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,c=e("../treemap/constants"),u=e("../sunburst/helpers"),h=e("../sunburst/fx"),d=e("../sunburst/plot").formatSliceLabel,f=!1;t.exports=function(e,t,n,p,g){var m=g.width,v=g.height,y=g.viewX,b=g.viewY,_=g.pathSlice,x=g.toMoveInsideSlice,w=g.strTransform,A=g.hasTransition,k=g.handleSlicesExit,T=g.makeUpdateSliceInterpolator,S=g.makeUpdateTextInterpolator,E=g.prevEntry,C=e._fullLayout,M=t[0].trace,O=-1!==M.textposition.indexOf("left"),L=-1!==M.textposition.indexOf("right"),D=-1!==M.textposition.indexOf("bottom"),I=s(n,[m,v],{flipX:M.tiling.flip.indexOf("x")>-1,flipY:M.tiling.flip.indexOf("y")>-1,orientation:M.tiling.orientation,pad:{inner:M.tiling.pad},maxDepth:M._maxDepth}).descendants(),R=1/0,P=-1/0;I.forEach((function(e){var t=e.depth;t>=M._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(R=Math.min(R,t),P=Math.max(P,t))})),p=p.data(I,u.getPtId),M._maxVisibleLayers=isFinite(P)?P-R+1:0,p.enter().append("g").classed("slice",!0),k(p,f,{},[m,v],_),p.order();var N=null;if(A&&E){var z=u.getPtId(E);p.each((function(e){null===N&&u.getPtId(e)===z&&(N={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var F=function(){return N||{x0:0,x1:m,y0:0,y1:v}},B=p;return A&&(B=B.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=b(s.y0),s._y1=b(s.y1),s._hoverX=y(s.x1-M.tiling.pad),s._hoverY=b(D?s.y1-M.tiling.pad/2:s.y0+M.tiling.pad/2);var p=r.select(this),g=i.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events","all")}));A?g.transition().attrTween("d",(function(e){var t=T(e,f,F(),[m,v],{orientation:M.tiling.orientation,flipX:M.tiling.flip.indexOf("x")>-1,flipY:M.tiling.flip.indexOf("y")>-1});return function(e){return _(t(e))}})):g.attr("d",_),p.call(h,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),g.call(l,s,M,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=d(s,n,M,t,C)||"";var k=i.ensureSingle(p,"g","slicetext"),E=i.ensureSingle(k,"text","",(function(e){e.attr("data-notex",1)})),I=i.ensureUniformFontSize(e,u.determineTextFont(M,s,C.font));E.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":O?"start":"middle").call(o.font,I).call(a.convertToTspans,e),s.textBB=o.bBox(E.node()),s.transform=x(s,{fontSize:I.size}),s.transform.fontSize=I.size,A?E.transition().attrTween("transform",(function(e){var t=S(e,f,F(),[m,v]);return function(e){return w(t(e))}})):E.attr("transform",w(s))})),N}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"../sunburst/plot":1055,"../treemap/constants":1074,"./partition":842,"./style":844,"@plotly/d3":58}],839:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"icicle",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":834,"./base_plot":835,"./calc":836,"./defaults":837,"./layout_attributes":840,"./layout_defaults":841,"./plot":843,"./style":844}],840:[function(e,t,n){"use strict";t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],841:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("iciclecolorway",t.colorway),n("extendiciclecolors")}},{"../../lib":503,"./layout_attributes":840}],842:[function(e,t,n){"use strict";var r=e("d3-hierarchy"),i=e("../treemap/flip_tree");t.exports=function(e,t,n){var o=n.flipX,a=n.flipY,s="h"===n.orientation,l=n.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(n.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||o||a)&&i(h,t,{swapXY:s,flipX:o,flipY:a}),h}},{"../treemap/flip_tree":1079,"d3-hierarchy":115}],843:[function(e,t,n){"use strict";var r=e("../treemap/draw"),i=e("./draw_descendants");t.exports=function(e,t,n,o){return r(e,t,n,o,{type:"icicle",drawDescendants:i})}},{"../treemap/draw":1076,"./draw_descendants":838}],844:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../lib"),a=e("../bar/uniform_text").resizeText;function s(e,t,n){var r=t.data.data,a=!t.children,s=r.i,l=o.castOption(n,s,"marker.line.color")||i.defaultLine,c=o.castOption(n,s,"marker.line.width")||0;e.style("stroke-width",c).call(i.fill,r.color).call(i.stroke,l).style("opacity",a?n.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each((function(e){var t=r.select(this),n=e[0].trace;t.style("opacity",n.opacity),t.selectAll("path.surface").each((function(e){r.select(this).call(s,e,n)}))}))},styleOne:s}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],845:[function(e,t,n){"use strict";for(var r=e("../../plots/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../lib/extend").extendFlat,a=e("./constants").colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],c=[],u=0;u<s.length;u++){var h=a[s[u]];l.push("For the `"+s[u]+"` colormodel, it is ["+(h.zminDflt||h.min).join(", ")+"]."),c.push("For the `"+s[u]+"` colormodel, it is ["+(h.zmaxDflt||h.max).join(", ")+"].")}t.exports=o({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:s,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:o({},r.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:i({},{keys:["z","color","colormodel"]}),transforms:void 0})},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"./constants":847}],846:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./constants"),o=e("fast-isnumeric"),a=e("../../plots/cartesian/axes"),s=e("../../lib").maxRowLength,l=e("./helpers").getImageSize;function c(e,t,n,i){return function(o){return r.constrain((o-e)*t,n,i)}}function u(e,t){return function(n){return r.constrain(n,e,t)}}t.exports=function(e,t){var n,r;if(t._hasZ)n=t.z.length,r=s(t.z);else if(t._hasSource){var h=l(t.source);n=h.height,r=h.width}var d,f=a.getFromId(e,t.xaxis||"x"),p=a.getFromId(e,t.yaxis||"y"),g=f.d2c(t.x0)-t.dx/2,m=p.d2c(t.y0)-t.dy/2,v=[g,g+r*t.dx],y=[m,m+n*t.dy];if(f&&"log"===f.type)for(d=0;d<r;d++)v.push(g+d*t.dx);if(p&&"log"===p.type)for(d=0;d<n;d++)y.push(m+d*t.dy);return t._extremes[f._id]=a.findExtremes(f,v),t._extremes[p._id]=a.findExtremes(p,y),t._scaler=function(e){var t=i.colormodel[e.colormodel],n=(t.colormodel||e.colormodel).length;e._sArray=[];for(var r=0;r<n;r++)t.min[r]!==e.zmin[r]||t.max[r]!==e.zmax[r]?e._sArray.push(c(e.zmin[r],(t.max[r]-t.min[r])/(e.zmax[r]-e.zmin[r]),t.min[r],t.max[r])):e._sArray.push(u(t.min[r],t.max[r]));return function(t){for(var r=t.slice(0,n),i=0;i<n;i++){var a=r[i];if(!o(a))return!1;r[i]=e._sArray[i](a)}return r}}(t),[{x0:g,y0:m,z:t.z,w:r,h:n}]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./constants":847,"./helpers":850,"fast-isnumeric":190}],847:[function(e,t,n){"use strict";t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["","%","%",""]}},pixelatedStyle:["image-rendering: optimizeSpeed","image-rendering: -moz-crisp-edges","image-rendering: -o-crisp-edges","image-rendering: -webkit-optimize-contrast","image-rendering: optimize-contrast","image-rendering: crisp-edges","image-rendering: pixelated",""].join("; ")}},{}],848:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("./constants"),a=e("../../snapshot/helpers").IMAGE_URL_PREFIX;t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=n("z");t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),t._hasZ||t._hasSource?(n("x0"),n("y0"),n("dx"),n("dy"),t._hasZ?(n("colormodel","rgb"),n("zmin",(s=o.colormodel[t.colormodel]).zminDflt||s.min),n("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=o.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),t._length=null):t.visible=!1}},{"../../lib":503,"../../snapshot/helpers":642,"./attributes":845,"./constants":847}],849:[function(e,t,n){"use strict";t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}},{}],850:[function(e,t,n){"use strict";var r=e("probe-image-size/sync"),i=e("../../snapshot/helpers").IMAGE_URL_PREFIX,o=e("buffer/").Buffer;n.getImageSize=function(e){var t=e.replace(i,""),n=new o(t,"base64");return r(n)}},{"../../snapshot/helpers":642,"buffer/":85,"probe-image-size/sync":276}],851:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../lib"),o=e("./constants");t.exports=function(e,t,n){var a=e.cd[0],s=a.trace,l=e.xa,c=e.ya;if(!(r.inbox(t-a.x0,t-(a.x0+a.w*s.dx),0)>0||r.inbox(n-a.y0,n-(a.y0+a.h*s.dy),0)>0)){var u,h=Math.floor((t-a.x0)/s.dx),d=Math.floor(Math.abs(n-a.y0)/s.dy);if(s._hasZ?u=a.z[d][h]:s._hasSource&&(u=s._canvas.el.getContext("2d").getImageData(h,d,1,1).data),u){var f,p=a.hi||s.hoverinfo;if(p){var g=p.split("+");-1!==g.indexOf("all")&&(g=["color"]),-1!==g.indexOf("color")&&(f=!0)}var m,v=o.colormodel[s.colormodel],y=v.colormodel||s.colormodel,b=y.length,_=s._scaler(u),x=v.suffix,w=[];(s.hovertemplate||f)&&(w.push("["+[_[0]+x[0],_[1]+x[1],_[2]+x[2]].join(", ")),4===b&&w.push(", "+_[3]+x[3]),w.push("]"),w=w.join(""),e.extraText=y.toUpperCase()+": "+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[d])?m=s.hovertext[d][h]:Array.isArray(s.text)&&Array.isArray(s.text[d])&&(m=s.text[d][h]);var A=c.c2p(a.y0+(d+.5)*s.dy),k=a.x0+(h+.5)*s.dx,T=a.y0+(d+.5)*s.dy,S="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[d,h],x0:l.c2p(a.x0+h*s.dx),x1:l.c2p(a.x0+(h+1)*s.dx),y0:A,y1:A,color:_,xVal:k,xLabelVal:k,yVal:T,yLabelVal:T,zLabelVal:S,text:m,hovertemplateLabels:{zLabel:S,colorLabel:w,"color[0]Label":_[0]+x[0],"color[1]Label":_[1]+x[1],"color[2]Label":_[2]+x[2],"color[3]Label":_[3]+x[3]}})]}}}},{"../../components/fx":406,"../../lib":503,"./constants":847}],852:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":568,"./attributes":845,"./calc":846,"./defaults":848,"./event_data":849,"./hover":851,"./plot":853,"./style":854}],853:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=i.strTranslate,a=e("../../constants/xmlns_namespaces"),s=e("./constants"),l=i.isIOS()||i.isSafari()||i.isIE();t.exports=function(e,t,n,c){var u=t.xaxis,h=t.yaxis,d=!(l||e._context._exportedPlot);i.makeTraceGroups(c,n,"im").each((function(t){var n=r.select(this),l=t[0],c=l.trace,f=("fast"===c.zsmooth||!1===c.zsmooth&&d)&&!c._hasZ&&c._hasSource&&"linear"===u.type&&"linear"===h.type;c._realImage=f;var p,g,m,v,y,b,_=l.z,x=l.x0,w=l.y0,A=l.w,k=l.h,T=c.dx,S=c.dy;for(b=0;void 0===p&&b<A;)p=u.c2p(x+b*T),b++;for(b=A;void 0===g&&b>0;)g=u.c2p(x+b*T),b--;for(b=0;void 0===v&&b<k;)v=h.c2p(w+b*S),b++;for(b=k;void 0===y&&b>0;)y=h.c2p(w+b*S),b--;if(g<p&&(m=g,g=p,p=m),y<v&&(m=v,v=y,y=m),!f){p=Math.max(-.5*u._length,p),g=Math.min(1.5*u._length,g),v=Math.max(-.5*h._length,v),y=Math.min(1.5*h._length,y)}var E=Math.round(g-p),C=Math.round(y-v);if(E<=0||C<=0)n.selectAll("image").data([]).exit().remove();else{var M=n.selectAll("image").data([t]);M.enter().append("svg:image").attr({xmlns:a.svg,preserveAspectRatio:"none"}),M.exit().remove();var O=!1===c.zsmooth?s.pixelatedStyle:"";if(f){var L=i.simpleMap(u.range,u.r2l),D=i.simpleMap(h.range,h.r2l),I=L[1]<L[0],R=D[1]>D[0];if(I||R){var P=p+E/2,N=v+C/2;O+="transform:"+o(P+"px",N+"px")+"scale("+(I?-1:1)+","+(R?-1:1)+")"+o(-P+"px",-N+"px")+";"}}M.attr("style",O);var z=new Promise((function(e){if(c._hasZ)e();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===A&&c._canvas.el.height===k&&c._canvas.source===c.source)e();else{var t=document.createElement("canvas");t.width=A,t.height=k;var n=t.getContext("2d");c._image=c._image||new Image;var r=c._image;r.onload=function(){n.drawImage(r,0,0),c._canvas={el:t,source:c.source},e()},r.setAttribute("src",c.source)}})).then((function(){var e,t;if(c._hasZ)t=F((function(e,t){return _[t][e]})),e=t.toDataURL("image/png");else if(c._hasSource)if(f)e=c.source;else{var n=c._canvas.el.getContext("2d").getImageData(0,0,A,k).data;t=F((function(e,t){var r=4*(t*A+e);return[n[r],n[r+1],n[r+2],n[r+3]]})),e=t.toDataURL("image/png")}M.attr({"xlink:href":e,height:C,width:E,x:p,y:v})}));e._promises.push(z)}function F(e){var t=document.createElement("canvas");t.width=E,t.height=C;var n,r=t.getContext("2d"),o=function(e){return i.constrain(Math.round(u.c2p(x+e*T)-p),0,E)},a=function(e){return i.constrain(Math.round(h.c2p(w+e*S)-v),0,C)},d=s.colormodel[c.colormodel],f=d.colormodel||c.colormodel,g=d.fmt;for(b=0;b<l.w;b++){var m=o(b),y=o(b+1);if(y!==m&&!isNaN(y)&&!isNaN(m))for(var _=0;_<l.h;_++){var A=a(_),k=a(_+1);k===A||isNaN(k)||isNaN(A)||!e(b,_)||(n=c._scaler(e(b,_)),r.fillStyle=n?f+"("+g(n).join(",")+")":"rgba(0,0,0,0)",r.fillRect(m,A,y-m,k-A))}}return t}}))}},{"../../constants/xmlns_namespaces":480,"../../lib":503,"./constants":847,"@plotly/d3":58}],854:[function(e,t,n){"use strict";var r=e("@plotly/d3");t.exports=function(e){r.select(e).selectAll(".im image").style("opacity",(function(e){return e[0].trace.opacity}))}},{"@plotly/d3":58}],855:[function(e,t,n){"use strict";var r=e("../../lib/extend").extendFlat,i=e("../../lib/extend").extendDeep,o=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/font_attributes"),s=e("../../components/color/attributes"),l=e("../../plots/domain").attributes,c=e("../../plots/cartesian/layout_attributes"),u=e("../../plot_api/plot_template").templatedArray,h=e("../../constants/delta.js"),d=e("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,f=a({editType:"plot",colorEditType:"plot"}),p={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:s.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},g={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},m=u("step",i({},p,{range:g}));t.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:r({},f,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:d("value")},font:r({},f,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:d("value")},increasing:{symbol:{valType:"string",dflt:h.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:h.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:h.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:h.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:r({},f,{}),editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:i({},p,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:s.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:o({range:g,visible:r({},c.visible,{dflt:!0}),tickmode:c.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:r({},c.ticks,{dflt:"outside"}),ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,tickfont:a({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,editType:"plot"},"plot"),steps:m,threshold:{line:{color:r({},p.line.color,{}),width:r({},p.line.width,{dflt:1}),editType:"plot"},thickness:r({},p.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},{"../../components/color/attributes":365,"../../constants/delta.js":473,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],856:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="indicator",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],857:[function(e,t,n){"use strict";t.exports={calc:function(e,t){var n=[],r=t.value;"number"!=typeof t._lastValue&&(t._lastValue=t.value);var i=t._lastValue,o=i;return t._hasDelta&&"number"==typeof t.delta.reference&&(o=t.delta.reference),n[0]={y:r,lastY:i,delta:r-o,relativeDelta:(r-o)/o},n}}},{}],858:[function(e,t,n){"use strict";t.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},{}],859:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../plots/domain").defaults,a=e("../../plot_api/plot_template"),s=e("../../plots/array_container_defaults"),l=e("./constants.js"),c=e("../../plots/cartesian/tick_value_defaults"),u=e("../../plots/cartesian/tick_mark_defaults"),h=e("../../plots/cartesian/tick_label_defaults"),d=e("../../plots/cartesian/prefix_suffix_defaults");function f(e,t){function n(n,o){return r.coerce(e,t,i.gauge.steps,n,o)}n("color"),n("line.color"),n("line.width"),n("range"),n("thickness")}t.exports={supplyDefaults:function(e,t,n,p){function g(n,o){return r.coerce(e,t,i,n,o)}o(t,p,g),g("mode"),t._hasNumber=-1!==t.mode.indexOf("number"),t._hasDelta=-1!==t.mode.indexOf("delta"),t._hasGauge=-1!==t.mode.indexOf("gauge");var m=g("value");t._range=[0,"number"==typeof m?1.5*m:1];var v,y,b,_,x,w,A=new Array(2);function k(e,t){return r.coerce(b,_,i.gauge,e,t)}function T(e,t){return r.coerce(x,w,i.gauge.axis,e,t)}if(t._hasNumber&&(g("number.valueformat"),g("number.font.color",p.font.color),g("number.font.family",p.font.family),g("number.font.size"),void 0===t.number.font.size&&(t.number.font.size=l.defaultNumberFontSize,A[0]=!0),g("number.prefix"),g("number.suffix"),v=t.number.font.size),t._hasDelta&&(g("delta.font.color",p.font.color),g("delta.font.family",p.font.family),g("delta.font.size"),void 0===t.delta.font.size&&(t.delta.font.size=(t._hasNumber?.5:1)*(v||l.defaultNumberFontSize),A[1]=!0),g("delta.reference",t.value),g("delta.relative"),g("delta.valueformat",t.delta.relative?"2%":""),g("delta.increasing.symbol"),g("delta.increasing.color"),g("delta.decreasing.symbol"),g("delta.decreasing.color"),g("delta.position"),y=t.delta.font.size),t._scaleNumbers=(!t._hasNumber||A[0])&&(!t._hasDelta||A[1])||!1,g("title.font.color",p.font.color),g("title.font.family",p.font.family),g("title.font.size",.25*(v||y||l.defaultNumberFontSize)),g("title.text"),t._hasGauge){(b=e.gauge)||(b={}),_=a.newContainer(t,"gauge"),k("shape"),(t._isBullet="bullet"===t.gauge.shape)||g("title.align","center"),(t._isAngular="angular"===t.gauge.shape)||g("align","center"),k("bgcolor",p.paper_bgcolor),k("borderwidth"),k("bordercolor"),k("bar.color"),k("bar.line.color"),k("bar.line.width"),k("bar.thickness",l.valueThickness*("bullet"===t.gauge.shape?.5:1)),s(b,_,{name:"steps",handleItemDefaults:f}),k("threshold.value"),k("threshold.thickness"),k("threshold.line.width"),k("threshold.line.color"),x={},b&&(x=b.axis||{}),w=a.newContainer(_,"axis"),T("visible"),t._range=T("range",t._range);var S={outerTicks:!0};c(x,w,T,"linear"),d(x,w,T,"linear",S),h(x,w,T,"linear",S),u(x,w,T,S)}else g("title.align","center"),g("align","center"),t._isAngular=t._isBullet=!1;t._length=null}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/cartesian/prefix_suffix_defaults":573,"../../plots/cartesian/tick_label_defaults":578,"../../plots/cartesian/tick_mark_defaults":579,"../../plots/cartesian/tick_value_defaults":580,"../../plots/domain":584,"./attributes":855,"./constants.js":858}],860:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"indicator",basePlotModule:e("./base_plot"),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc").calc,plot:e("./plot"),meta:{}}},{"./attributes":855,"./base_plot":856,"./calc":857,"./defaults":859,"./plot":861}],861:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-interpolate").interpolate,o=e("d3-interpolate").interpolateNumber,a=e("../../lib"),s=a.strScale,l=a.strTranslate,c=a.rad2deg,u=e("../../constants/alignment").MID_SHIFT,h=e("../../components/drawing"),d=e("./constants"),f=e("../../lib/svg_text_utils"),p=e("../../plots/cartesian/axes"),g=e("../../plots/cartesian/axis_defaults"),m=e("../../plots/cartesian/position_defaults"),v=e("../../plots/cartesian/layout_attributes"),y=e("../../components/color"),b={left:"start",center:"middle",right:"end"},_={left:0,center:.5,right:1},x=/[yzafpnmkMGTPEZY]/;function w(e){return e&&e.duration>0}function A(e,t,n,o){var a,s,h,d,f=n[0].trace,g=o.size,m=o.radius,v=o.innerRadius,y=o.gaugeBg,b=o.gaugeOutline,_=[g.l+g.w/2,g.t+g.h/2+m/2],x=o.gauge,A=o.layer,S=o.transitionOpts,E=o.onComplete,C=Math.PI/2;function M(e){var t=f.gauge.axis.range[0],n=(e-t)/(f.gauge.axis.range[1]-t)*Math.PI-C;return n<-C?-C:n>C?C:n}function O(e){return r.svg.arc().innerRadius((v+m)/2-e/2*(m-v)).outerRadius((v+m)/2+e/2*(m-v)).startAngle(-C)}function L(e){e.attr("d",(function(e){return O(e.thickness).startAngle(M(e.range[0])).endAngle(M(e.range[1]))()}))}x.enter().append("g").classed("angular",!0),x.attr("transform",l(_[0],_[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(a=T(e,f.gauge.axis)).type="linear",a.range=f.gauge.axis.range,a._id="xangularaxis",a.ticklabeloverflow="allow",a.setScale();var D=function(e){return(a.range[0]-e.x)/(a.range[1]-a.range[0])*Math.PI+Math.PI},I={},R=p.makeLabelFns(a,0).labelStandoff;I.xFn=function(e){var t=D(e);return Math.cos(t)*R},I.yFn=function(e){var t=D(e),n=Math.sin(t)>0?.2:1;return-Math.sin(t)*(R+e.fontSize*n)+Math.abs(Math.cos(t))*(e.fontSize*u)},I.anchorFn=function(e){var t=D(e),n=Math.cos(t);return Math.abs(n)<.1?"middle":n>0?"start":"end"},I.heightFn=function(e,t,n){var r=D(e);return-.5*(1+Math.sin(r))*n};var P=function(e){return l(_[0]+m*Math.cos(e),_[1]-m*Math.sin(e))};h=function(e){return P(D(e))};if(s=p.calcTicks(a),d=p.getTickSigns(a)[2],a.visible){d="inside"===a.ticks?-1:1;var N=(a.linewidth||1)/2;p.drawTicks(e,a,{vals:s,layer:A,path:"M"+d*N+",0h"+d*a.ticklen,transFn:function(e){var t=D(e);return P(t)+"rotate("+-c(t)+")"}}),p.drawLabels(e,a,{vals:s,layer:A,transFn:h,labelFns:I})}var z=[y].concat(f.gauge.steps),F=x.selectAll("g.bg-arc").data(z);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(k),F.exit().remove();var B=O(f.gauge.bar.thickness),j=x.selectAll("g.value-arc").data([f.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var U,V,q,H=j.select("path");w(S)?(H.transition().duration(S.duration).ease(S.easing).each("end",(function(){E&&E()})).each("interrupt",(function(){E&&E()})).attrTween("d",(U=B,V=M(n[0].lastY),q=M(n[0].y),function(){var e=i(V,q);return function(t){return U.endAngle(e(t))()}})),f._lastValue=n[0].y):H.attr("d","number"==typeof n[0].y?B.endAngle(M(n[0].y)):"M0,0Z"),H.call(k),j.exit().remove(),z=[];var $=f.gauge.threshold.value;($||0===$)&&z.push({range:[$,$],color:f.gauge.threshold.color,line:{color:f.gauge.threshold.line.color,width:f.gauge.threshold.line.width},thickness:f.gauge.threshold.thickness});var W=x.selectAll("g.threshold-arc").data(z);W.enter().append("g").classed("threshold-arc",!0).append("path"),W.select("path").call(L).call(k),W.exit().remove();var G=x.selectAll("g.gauge-outline").data([b]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(L).call(k),G.exit().remove()}function k(e){e.each((function(e){y.stroke(r.select(this),e.line.color)})).each((function(e){y.fill(r.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function T(e,t,n){var r=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:n,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:r.font,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,v,e,t)}return g(i,o,l,s,r),m(i,o,l,s),o}function S(e,t,n){return[Math.min(t/e.width,n/e.height),e,t+"x"+n]}function E(e,t,n,i){var o=document.createElementNS("path_to_url","text"),a=r.select(o);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",e).call(f.convertToTspans,i).call(h.font,t),h.bBox(a.node())}function C(e,t,n,r,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:n});var l=a.aggNums(o,null,[e[s].value,r],2);return e[s].value=l,l}t.exports=function(e,t,n,i){var c,u=e._fullLayout;w(n)&&i&&(c=i()),a.makeTraceGroups(u._indicatorlayer,t,"trace").each((function(t){var i,g,m,v,M,O=t[0].trace,L=r.select(this),D=O._hasGauge,I=O._isAngular,R=O._isBullet,P=O.domain,N={w:u._size.w*(P.x[1]-P.x[0]),h:u._size.h*(P.y[1]-P.y[0]),l:u._size.l+u._size.w*P.x[0],r:u._size.r+u._size.w*(1-P.x[1]),t:u._size.t+u._size.h*(1-P.y[1]),b:u._size.b+u._size.h*P.y[0]},z=N.l+N.w/2,F=N.t+N.h/2,B=Math.min(N.w/2,N.h),j=d.innerRadius*B,U=O.align||"center";if(g=F,D){if(I&&(i=z,g=F+B/2,m=function(e){return function(e,t){return[t/Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),e,t]}(e,.9*j)}),R){var V=d.bulletPadding,q=1-d.bulletNumberDomainSize+V;i=N.l+(q+(1-q)*_[U])*N.w,m=function(e){return S(e,(d.bulletNumberDomainSize-V)*N.w,N.h)}}}else i=N.l+_[U]*N.w,m=function(e){return S(e,N.w,N.h)};(function(e,t,n,i){var c,u,d,g=n[0].trace,m=i.numbersX,v=i.numbersY,A=g.align||"center",k=b[A],S=i.transitionOpts,M=i.onComplete,O=a.ensureSingle(t,"g","numbers"),L=[];g._hasNumber&&L.push("number"),g._hasDelta&&(L.push("delta"),"left"===g.delta.position&&L.reverse());var D=O.selectAll("text").data(L);function I(t,n,r,i){if(!t.match("s")||r>=0==i>=0||n(r).slice(-1).match(x)||n(i).slice(-1).match(x))return n;var o=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),a=T(e,{tickformat:o});return function(e){return Math.abs(e)<1?p.tickText(a,e).text:n(e)}}D.enter().append("text"),D.attr("text-anchor",(function(){return k})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),D.exit().remove();var R,P=g.mode+g.align;if(g._hasDelta&&(R=function(){var t=T(e,{tickformat:g.delta.valueformat},g._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=function(e){return g.delta.relative?e.relativeDelta:e.delta},s=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?g.delta.increasing.symbol:g.delta.decreasing.symbol)+t(e)},l=function(e){return e.delta>=0?g.delta.increasing.color:g.delta.decreasing.color};void 0===g._deltaLastValue&&(g._deltaLastValue=a(n[0]));var c=O.select("text.delta");function d(){c.text(s(a(n[0]),i)).call(y.fill,l(n[0])).call(f.convertToTspans,e)}return c.call(h.font,g.delta.font).call(y.fill,l({delta:g._deltaLastValue})),w(S)?c.transition().duration(S.duration).ease(S.easing).tween("text",(function(){var e=r.select(this),t=a(n[0]),c=g._deltaLastValue,u=I(g.delta.valueformat,i,c,t),h=o(c,t);return g._deltaLastValue=t,function(t){e.text(s(h(t),u)),e.call(y.fill,l({delta:h(t)}))}})).each("end",(function(){d(),M&&M()})).each("interrupt",(function(){d(),M&&M()})):d(),u=E(s(a(n[0]),i),g.delta.font,k,e),c}(),P+=g.delta.position+g.delta.font.size+g.delta.font.family+g.delta.valueformat,P+=g.delta.increasing.symbol+g.delta.decreasing.symbol,d=u),g._hasNumber&&(function(){var t=T(e,{tickformat:g.number.valueformat},g._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=g.number.suffix,s=g.number.prefix,l=O.select("text.number");function u(){var t="number"==typeof n[0].y?s+i(n[0].y)+a:"-";l.text(t).call(h.font,g.number.font).call(f.convertToTspans,e)}w(S)?l.transition().duration(S.duration).ease(S.easing).each("end",(function(){u(),M&&M()})).each("interrupt",(function(){u(),M&&M()})).attrTween("text",(function(){var e=r.select(this),t=o(n[0].lastY,n[0].y);g._lastValue=n[0].y;var l=I(g.number.valueformat,i,n[0].lastY,n[0].y);return function(n){e.text(s+l(t(n))+a)}})):u(),c=E(s+i(n[0].y)+a,g.number.font,k,e)}(),P+=g.number.font.size+g.number.font.family+g.number.valueformat+g.number.suffix+g.number.prefix,d=c),g._hasDelta&&g._hasNumber){var N,z,F=[(c.left+c.right)/2,(c.top+c.bottom)/2],B=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*g.delta.font.size;"left"===g.delta.position&&(N=C(g,"deltaPos",0,-1*(c.width*_[g.align]+u.width*(1-_[g.align])+j),P,Math.min),z=F[1]-B[1],d={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+N,right:c.right,top:Math.min(c.top,u.top+z),bottom:Math.max(c.bottom,u.bottom+z)}),"right"===g.delta.position&&(N=C(g,"deltaPos",0,c.width*(1-_[g.align])+u.width*_[g.align]+j,P,Math.max),z=F[1]-B[1],d={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+N,top:Math.min(c.top,u.top+z),bottom:Math.max(c.bottom,u.bottom+z)}),"bottom"===g.delta.position&&(N=null,z=u.height,d={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),"top"===g.delta.position&&(N=null,z=c.top,d={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),R.attr({dx:N,dy:z})}(g._hasNumber||g._hasDelta)&&O.attr("transform",(function(){var e=i.numbersScaler(d);P+=e[2];var t,n=C(g,"numbersScale",1,e[0],P,Math.min);g._scaleNumbers||(n=1),t=g._isAngular?v-n*d.bottom:v-n*(d.top+d.bottom)/2,g._numbersTop=n*d.top+t;var r=d[A];"center"===A&&(r=(d.left+d.right)/2);var o=m-n*r;return o=C(g,"numbersTranslate",0,o,P,Math.max),l(o,t)+s(n)}))})(e,L,t,{numbersX:i,numbersY:g,numbersScaler:m,transitionOpts:n,onComplete:c}),D&&(v={range:O.gauge.axis.range,color:O.gauge.bgcolor,line:{color:O.gauge.bordercolor,width:0},thickness:1},M={range:O.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:O.gauge.bordercolor,width:O.gauge.borderwidth},thickness:1});var H=L.selectAll("g.angular").data(I?t:[]);H.exit().remove();var $=L.selectAll("g.angularaxis").data(I?t:[]);$.exit().remove(),I&&A(e,0,t,{radius:B,innerRadius:j,gauge:H,layer:$,size:N,gaugeBg:v,gaugeOutline:M,transitionOpts:n,onComplete:c});var W=L.selectAll("g.bullet").data(R?t:[]);W.exit().remove();var G=L.selectAll("g.bulletaxis").data(R?t:[]);G.exit().remove(),R&&function(e,t,n,r){var i,o,a,s,c,u=n[0].trace,h=r.gauge,f=r.layer,g=r.gaugeBg,m=r.gaugeOutline,v=r.size,b=u.domain,_=r.transitionOpts,x=r.onComplete;h.enter().append("g").classed("bullet",!0),h.attr("transform",l(v.l,v.t)),f.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),f.selectAll("g.xbulletaxistick,path,text").remove();var A=v.h,S=u.gauge.bar.thickness*A,E=b.x[0],C=b.x[0]+(b.x[1]-b.x[0])*(u._hasNumber||u._hasDelta?1-d.bulletNumberDomainSize:1);function M(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*A})).attr("height",(function(e){return e.thickness*A}))}(i=T(e,u.gauge.axis))._id="xbulletaxis",i.domain=[E,C],i.setScale(),o=p.calcTicks(i),a=p.makeTransTickFn(i),s=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,o):o,layer:f,path:p.makeTickPath(i,c,s),transFn:a}),p.drawLabels(e,i,{vals:o,layer:f,transFn:a,labelFns:p.makeLabelFns(i,c)}));var O=[g].concat(u.gauge.steps),L=h.selectAll("g.bg-bullet").data(O);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(M).call(k),L.exit().remove();var D=h.selectAll("g.value-bullet").data([u.gauge.bar]);D.enter().append("g").classed("value-bullet",!0).append("rect"),D.select("rect").attr("height",S).attr("y",(A-S)/2).call(k),w(_)?D.select("rect").transition().duration(_.duration).ease(_.easing).each("end",(function(){x&&x()})).each("interrupt",(function(){x&&x()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],n[0].y)))):D.select("rect").attr("width","number"==typeof n[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],n[0].y))):0),D.exit().remove();var I=n.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),R=h.selectAll("g.threshold-bullet").data(I);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*A).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),R.exit().remove();var P=h.selectAll("g.gauge-outline").data([m]);P.enter().append("g").classed("gauge-outline",!0).append("rect"),P.select("rect").call(M).call(k),P.exit().remove()}(e,0,t,{gauge:W,layer:G,size:N,gaugeBg:v,gaugeOutline:M,transitionOpts:n,onComplete:c});var Y=L.selectAll("text.title").data(t);Y.exit().remove(),Y.enter().append("text").classed("title",!0),Y.attr("text-anchor",(function(){return R?b.right:b[O.title.align]})).text(O.title.text).call(h.font,O.title.font).call(f.convertToTspans,e),Y.attr("transform",(function(){var e,t=N.l+N.w*_[O.title.align],n=d.titlePadding,r=h.bBox(Y.node());return D?(I&&(e=O.gauge.axis.visible?h.bBox($.node()).top-n-r.bottom:N.t+N.h/2-B/2-r.bottom-n),R&&(e=g-(r.top+r.bottom)/2,t=N.l-d.bulletPadding*N.w)):e=O._numbersTop-n-r.bottom,l(t,e)}))}))}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"./constants":858,"@plotly/d3":58,"d3-interpolate":116}],862:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../mesh3d/attributes"),s=e("../../plots/attributes"),l=e("../../lib/extend").extendFlat,c=e("../../plot_api/edit_types").overrideAll;var u=t.exports=c(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],863:[function(e,t,n){"use strict";var r=e("../../components/colorscale/calc"),i=e("../streamtube/calc").processGrid,o=e("../streamtube/calc").filter;t.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=o(t.x,t._len),t._y=o(t.y,t._len),t._z=o(t.z,t._len),t._value=o(t.value,t._len);var n=i(t);t._gridFill=n.fill,t._Xs=n.Xs,t._Ys=n.Ys,t._Zs=n.Zs,t._len=n.len;for(var a=1/0,s=-1/0,l=0;l<t._len;l++){var c=t._value[l];a=Math.min(a,c),s=Math.max(s,c)}t._minValues=a,t._maxValues=s,t._vMin=void 0===t.isomin||null===t.isomin?a:t.isomin,t._vMax=void 0===t.isomax||null===t.isomin?s:t.isomax,r(e,t,{vals:[t._vMin,t._vMax],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374,"../streamtube/calc":1041}],864:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_mesh3d,i=e("../../lib/gl_format_color").parseColorScale,o=e("../../lib/str2rgbarray"),a=e("../../components/colorscale").extractOpts,s=e("../../plots/gl3d/zip3"),l=function(e,t){for(var n=t.length-1;n>0;n--){var r=Math.min(t[n],t[n-1]),i=Math.max(t[n],t[n-1]);if(i>r&&r<e&&e<=i)return{id:n,distRatio:(i-e)/(i-r)}}return{id:0,distRatio:0}};function c(e,t,n){this.scene=e,this.uid=n,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var u=c.prototype;u.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,n=this.data._meshX[t],r=this.data._meshY[t],i=this.data._meshZ[t],o=this.data._Ys.length,a=this.data._Zs.length,s=l(n,this.data._Xs).id,c=l(r,this.data._Ys).id,u=l(i,this.data._Zs).id,h=e.index=u+a*c+a*o*s;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return Array.isArray(d)&&void 0!==d[h]?e.textLabel=d[h]:d&&(e.textLabel=d),!0}},u.update=function(e){var t=this.scene,n=t.fullSceneLayout;function r(e,t,n,r){return t.map((function(t){return e.d2l(t,0,r)*n}))}this.data=d(e);var l={positions:s(r(n.xaxis,e._meshX,t.dataScale[0],e.xcalendar),r(n.yaxis,e._meshY,t.dataScale[1],e.ycalendar),r(n.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},c=a(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[c.min,c.max],l.colormap=i(e),this.mesh.update(l)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var h=["xyz","xzy","yxz","yzx","zxy","zyx"];function d(e){e._meshI=[],e._meshJ=[],e._meshK=[];var t,n,r,i,o,a,s,c=e.surface.show,u=e.spaceframe.show,d=e.surface.fill,f=e.spaceframe.fill,p=!1,g=!1,m=0,v=e._Xs,y=e._Ys,b=e._Zs,_=v.length,x=y.length,w=b.length,A=h.indexOf(e._gridFill.replace(/-/g,"").replace(/\+/g,"")),k=function(e,t,n){switch(A){case 5:return n+w*t+w*x*e;case 4:return n+w*e+w*_*t;case 3:return t+x*n+x*w*e;case 2:return t+x*e+x*_*n;case 1:return e+_*n+_*w*t;default:return e+_*t+_*x*n}},T=e._minValues,S=e._maxValues,E=e._vMin,C=e._vMax;function M(e,t,s){for(var l=a.length,c=n;c<l;c++)if(e===r[c]&&t===i[c]&&s===o[c])return c;return-1}function O(){n=t}function L(){r=[],i=[],o=[],a=[],t=0,O()}function D(e,n,s,l){return r.push(e),i.push(n),o.push(s),a.push(l),++t-1}function I(e,t,n){for(var r=[],i=0;i<e.length;i++)r[i]=e[i]*(1-n)+n*t[i];return r}function R(e){s=e}function P(e,t){return"all"===e||null===e||e.indexOf(t)>-1}function N(e,t){return null===e?t:e}function z(t,n,r){O();var i,o,a,l=[n],c=[r];if(s>=1)l=[n],c=[r];else if(s>0){var u=function(e,t){var n=e[0],r=e[1],i=e[2],o=function(e,t,n){for(var r=[],i=0;i<e.length;i++)r[i]=(e[i]+t[i]+n[i])/3;return r}(n,r,i),a=Math.sqrt(1-s),l=I(o,n,a),c=I(o,r,a),u=I(o,i,a),h=t[0],d=t[1],f=t[2];return{xyzv:[[n,r,c],[c,l,n],[r,i,u],[u,c,r],[i,n,l],[l,u,i]],abc:[[h,d,-1],[-1,-1,h],[d,f,-1],[-1,-1,d],[f,h,-1],[-1,-1,f]]}}(n,r);l=u.xyzv,c=u.abc}for(var h=0;h<l.length;h++){n=l[h],r=c[h];for(var d=[],f=0;f<3;f++){var p=n[f][0],g=n[f][1],v=n[f][2],y=n[f][3],b=r[f]>-1?r[f]:M(p,g,v);d[f]=b>-1?b:D(p,g,v,N(t,y))}i=d[0],o=d[1],a=d[2],e._meshI.push(i),e._meshJ.push(o),e._meshK.push(a),++m}}function F(e,t,n,r){var i=e[3];i<n&&(i=n),i>r&&(i=r);for(var o=(e[3]-i)/(e[3]-t[3]+1e-9),a=[],s=0;s<4;s++)a[s]=(1-o)*e[s]+o*t[s];return a}function B(e,t,n){return e>=t&&e<=n}function j(e){var t=.001*(C-E);return e>=E-t&&e<=C+t}function U(t){for(var n=[],r=0;r<4;r++){var i=t[r];n.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return n}function V(e,t,n,r,i,o){o||(o=1),n=[-1,-1,-1];var a=!1,s=[B(t[0][3],r,i),B(t[1][3],r,i),B(t[2][3],r,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,n){return j(t[0][3])&&j(t[1][3])&&j(t[2][3])?(z(e,t,n),!0):o<3&&V(e,t,n,E,C,++o)};if(s[0]&&s[1]&&s[2])return l(e,t,n)||a;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(o){if(s[o[0]]&&s[o[1]]&&!s[o[2]]){var u=t[o[0]],h=t[o[1]],d=t[o[2]],f=F(d,u,r,i),p=F(d,h,r,i);a=l(e,[p,f,u],[-1,-1,n[o[0]]])||a,a=l(e,[u,h,p],[n[o[0]],n[o[1]],-1])||a,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(o){if(s[o[0]]&&!s[o[1]]&&!s[o[2]]){var u=t[o[0]],h=t[o[1]],d=t[o[2]],f=F(h,u,r,i),p=F(d,u,r,i);a=l(e,[p,f,u],[-1,-1,n[o[0]]])||a,c=!0}})),a}function q(e,t,n,r){var i=!1,o=U(t),a=[B(o[0][3],n,r),B(o[1][3],n,r),B(o[2][3],n,r),B(o[3][3],n,r)];if(!(a[0]||a[1]||a[2]||a[3]))return i;if(a[0]&&a[1]&&a[2]&&a[3])return g&&(i=function(e,t,n){var r=function(r,i,o){z(e,[t[r],t[i],t[o]],[n[r],n[i],n[o]])};r(0,1,2),r(3,0,1),r(2,3,0),r(1,2,3)}(e,o,t)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(a[l[0]]&&a[l[1]]&&a[l[2]]&&!a[l[3]]){var c=o[l[0]],u=o[l[1]],h=o[l[2]],d=o[l[3]];if(g)i=z(e,[c,u,h],[t[l[0]],t[l[1]],t[l[2]]])||i;else{var f=F(d,c,n,r),p=F(d,u,n,r),m=F(d,h,n,r);i=z(null,[f,p,m],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(a[l[0]]&&a[l[1]]&&!a[l[2]]&&!a[l[3]]){var c=o[l[0]],u=o[l[1]],h=o[l[2]],d=o[l[3]],f=F(h,c,n,r),p=F(h,u,n,r),m=F(d,u,n,r),v=F(d,c,n,r);g?(i=z(e,[c,v,f],[t[l[0]],-1,-1])||i,i=z(e,[u,p,m],[t[l[1]],-1,-1])||i):i=function(e,t,n){var r=function(r,i,o){z(e,[t[r],t[i],t[o]],[n[r],n[i],n[o]])};r(0,1,2),r(2,3,0)}(null,[f,p,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(a[l[0]]&&!a[l[1]]&&!a[l[2]]&&!a[l[3]]){var c=o[l[0]],u=o[l[1]],h=o[l[2]],d=o[l[3]],f=F(u,c,n,r),p=F(h,c,n,r),m=F(d,c,n,r);g?(i=z(e,[c,f,p],[t[l[0]],-1,-1])||i,i=z(e,[c,p,m],[t[l[0]],-1,-1])||i,i=z(e,[c,m,f],[t[l[0]],-1,-1])||i):i=z(null,[f,p,m],[-1,-1,-1])||i,s=!0}}))),i}function H(e,t,n,r,i,o,a,s,l,c,u){var h=!1;return p&&(P(e,"A")&&(h=q(null,[t,n,r,o],c,u)||h),P(e,"B")&&(h=q(null,[n,r,i,l],c,u)||h),P(e,"C")&&(h=q(null,[n,o,a,l],c,u)||h),P(e,"D")&&(h=q(null,[r,o,s,l],c,u)||h),P(e,"E")&&(h=q(null,[n,r,o,l],c,u)||h)),g&&(h=q(e,[n,r,o,l],c,u)||h),h}function $(e,t,n,r,i,o,a,s){return[!0===s[0]||V(e,U([t,n,r]),[t,n,r],o,a),!0===s[1]||V(e,U([r,i,t]),[r,i,t],o,a)]}function W(e,t,n,r,i,o,a,s,l){return s?$(e,t,n,i,r,o,a,l):$(e,n,i,r,t,o,a,l)}function G(e,t,n,r,i,o,a){var s,l,c,u,h=!1,d=function(){h=V(e,[s,l,c],[-1,-1,-1],i,o)||h,h=V(e,[c,u,s],[-1,-1,-1],i,o)||h},f=a[0],p=a[1],g=a[2];return f&&(s=I(U([k(t,n-0,r-0)])[0],U([k(t-1,n-0,r-0)])[0],f),l=I(U([k(t,n-0,r-1)])[0],U([k(t-1,n-0,r-1)])[0],f),c=I(U([k(t,n-1,r-1)])[0],U([k(t-1,n-1,r-1)])[0],f),u=I(U([k(t,n-1,r-0)])[0],U([k(t-1,n-1,r-0)])[0],f),d()),p&&(s=I(U([k(t-0,n,r-0)])[0],U([k(t-0,n-1,r-0)])[0],p),l=I(U([k(t-0,n,r-1)])[0],U([k(t-0,n-1,r-1)])[0],p),c=I(U([k(t-1,n,r-1)])[0],U([k(t-1,n-1,r-1)])[0],p),u=I(U([k(t-1,n,r-0)])[0],U([k(t-1,n-1,r-0)])[0],p),d()),g&&(s=I(U([k(t-0,n-0,r)])[0],U([k(t-0,n-0,r-1)])[0],g),l=I(U([k(t-0,n-1,r)])[0],U([k(t-0,n-1,r-1)])[0],g),c=I(U([k(t-1,n-1,r)])[0],U([k(t-1,n-1,r-1)])[0],g),u=I(U([k(t-1,n-0,r)])[0],U([k(t-1,n-0,r-1)])[0],g),d()),h}function Y(e,t,n,r,i,o,a,s,l,c,u,h){var d=e;return h?(p&&"even"===e&&(d=null),H(d,t,n,r,i,o,a,s,l,c,u)):(p&&"odd"===e&&(d=null),H(d,l,s,a,o,i,r,n,t,c,u))}function X(e,t,n,r,i){for(var o=[],a=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<w;c++)for(var u=1;u<x;u++)o.push(W(e,k(l,u-1,c-1),k(l,u-1,c),k(l,u,c-1),k(l,u,c),n,r,(l+u+c)%2,i&&i[a]?i[a]:[])),a++;return o}function Z(e,t,n,r,i){for(var o=[],a=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<_;c++)for(var u=1;u<w;u++)o.push(W(e,k(c-1,l,u-1),k(c,l,u-1),k(c-1,l,u),k(c,l,u),n,r,(c+l+u)%2,i&&i[a]?i[a]:[])),a++;return o}function K(e,t,n,r,i){for(var o=[],a=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<x;c++)for(var u=1;u<_;u++)o.push(W(e,k(u-1,c-1,l),k(u-1,c,l),k(u,c-1,l),k(u,c,l),n,r,(u+c+l)%2,i&&i[a]?i[a]:[])),a++;return o}function J(e,t,n){for(var r=1;r<w;r++)for(var i=1;i<x;i++)for(var o=1;o<_;o++)Y(e,k(o-1,i-1,r-1),k(o-1,i-1,r),k(o-1,i,r-1),k(o-1,i,r),k(o,i-1,r-1),k(o,i-1,r),k(o,i,r-1),k(o,i,r),t,n,(o+i+r)%2)}function Q(e,t,n){p=!0,J(e,t,n),p=!1}function ee(e,t,n,r,i,o){for(var a=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<w;u++)for(var h=1;h<x;h++)a.push(G(e,c,h,u,n,r,i[l],o&&o[s]&&o[s])),s++;return a}function te(e,t,n,r,i,o){for(var a=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<_;u++)for(var h=1;h<w;h++)a.push(G(e,u,c,h,n,r,i[l],o&&o[s]&&o[s])),s++;return a}function ne(e,t,n,r,i,o){for(var a=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<x;u++)for(var h=1;h<_;h++)a.push(G(e,h,u,c,n,r,i[l],o&&o[s]&&o[s])),s++;return a}function re(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}return function(){L(),function(){for(var t=0;t<_;t++)for(var n=0;n<x;n++)for(var r=0;r<w;r++){var i=k(t,n,r);D(e._x[i],e._y[i],e._z[i],e._value[i])}}();var t=null;if(u&&f&&(R(f),g=!0,J(t,E,C),g=!1),c&&d){R(d);for(var n=e.surface.pattern,s=e.surface.count,h=0;h<s;h++){var p=1===s?.5:h/(s-1),A=(1-p)*E+p*C,M=Math.abs(A-T)>Math.abs(A-S)?[T,A]:[A,S];Q(n,M[0],M[1])}}var O=[[Math.min(E,S),Math.max(E,S)],[Math.min(T,C),Math.max(T,C)]];["x","y","z"].forEach((function(n){for(var r=[],i=0;i<O.length;i++){var o=0,a=O[i][0],s=O[i][1],c=e.slices[n];if(c.show&&c.fill){R(c.fill);var u=[],h=[],d=[];if(c.locations.length)for(var f=0;f<c.locations.length;f++){var p=l(c.locations[f],"x"===n?v:"y"===n?y:b);0===p.distRatio?u.push(p.id):p.id>0&&(h.push(p.id),"x"===n?d.push([p.distRatio,0,0]):"y"===n?d.push([0,p.distRatio,0]):d.push([0,0,p.distRatio]))}else u=re(1,"x"===n?_-1:"y"===n?x-1:w-1);h.length>0&&(r[o]="x"===n?ee(t,h,a,s,d,r[o]):"y"===n?te(t,h,a,s,d,r[o]):ne(t,h,a,s,d,r[o]),o++),u.length>0&&(r[o]="x"===n?X(t,u,a,s,r[o]):"y"===n?Z(t,u,a,s,r[o]):K(t,u,a,s,r[o]),o++)}var g=e.caps[n];g.show&&g.fill&&(R(g.fill),r[o]="x"===n?X(t,[0,_-1],a,s,r[o]):"y"===n?Z(t,[0,x-1],a,s,r[o]):K(t,[0,w-1],a,s,r[o]),o++)}})),0===m&&L(),e._meshX=r,e._meshY=i,e._meshZ=o,e._meshIntensity=a,e._Xs=v,e._Ys=y,e._Zs=b}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:d,createIsosurfaceTrace:function(e,t){var n=e.glplot.gl,i=r({gl:n}),o=new c(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],865:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=e("./attributes"),a=e("../../components/colorscale/defaults");function s(e,t,n,r,o){var s=o("isomin"),l=o("isomax");null!=l&&null!=s&&s>l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),d=o("value");c&&c.length&&u&&u.length&&h&&h.length&&d&&d.length?(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],r),o("valuehoverformat"),["x","y","z"].forEach((function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var n="slices."+e;o(n+".show")&&(o(n+".fill"),o(n+".locations"))})),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){o(e)})),a(e,t,r,o,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}t.exports={supplyDefaults:function(e,t,n,i){s(e,t,0,i,(function(n,i){return r.coerce(e,t,o,n,i)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":862}],866:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":862,"./calc":863,"./convert":864,"./defaults":865}],867:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../surface/attributes"),s=e("../../plots/attributes"),l=e("../../lib/extend").extendFlat;t.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:o({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},r("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:l({},a.lightposition.x,{dflt:1e5}),y:l({},a.lightposition.y,{dflt:1e5}),z:l({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},a.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../surface/attributes":1057}],868:[function(e,t,n){"use strict";var r=e("../../components/colorscale/calc");t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],869:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_mesh3d,i=e("../../../stackgl_modules").delaunay_triangulate,o=e("../../../stackgl_modules").alpha_shape,a=e("../../../stackgl_modules").convex_hull,s=e("../../lib/gl_format_color").parseColorScale,l=e("../../lib/str2rgbarray"),c=e("../../components/colorscale").extractOpts,u=e("../../plots/gl3d/zip3");function h(e,t,n){this.scene=e,this.uid=n,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=h.prototype;function f(e){for(var t=[],n=e.length,r=0;r<n;r++)t[r]=l(e[r]);return t}function p(e,t,n,r){for(var i=[],o=t.length,a=0;a<o;a++)i[a]=e.d2l(t[a],0,r)*n;return i}function g(e){for(var t=[],n=e.length,r=0;r<n;r++)t[r]=Math.round(e[r]);return t}function m(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]<=-.5||e[r]>=t-.5)return!1;return!0}d.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var n=this.data.hovertext||this.data.text;return Array.isArray(n)&&void 0!==n[t]?e.textLabel=n[t]:n&&(e.textLabel=n),!0}},d.update=function(e){var t=this.scene,n=t.fullSceneLayout;this.data=e;var r,h=e.x.length,d=u(p(n.xaxis,e.x,t.dataScale[0],e.xcalendar),p(n.yaxis,e.y,t.dataScale[1],e.ycalendar),p(n.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!m(e.i,h)||!m(e.j,h)||!m(e.k,h))return;r=u(g(e.i),g(e.j),g(e.k))}else r=0===e.alphahull?a(d):e.alphahull>0?o(e.alphahull,d):function(e,t){for(var n=["x","y","z"].indexOf(e),r=[],o=t.length,a=0;a<o;a++)r[a]=[t[a][(n+1)%3],t[a][(n+2)%3]];return i(r)}(e.delaunayaxis,d);var v={positions:d,cells:r,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:l(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var y=c(e);this.color="#fff";var b=e.intensitymode;v[b+"Intensity"]=e.intensity,v[b+"IntensityBounds"]=[y.min,y.max],v.colormap=s(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],v.vertexColors=f(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],v.cellColors=f(e.facecolor)):(this.color=e.color,v.meshColor=l(e.color));this.mesh.update(v)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,i=r({gl:n}),o=new h(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],870:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../components/colorscale/defaults"),a=e("./attributes");t.exports=function(e,t,n,s){function l(n,r){return i.coerce(e,t,a,n,r)}function c(e){var t=e.map((function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach((function(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),o(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",n)),l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null):t.visible=!1):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":867}],871:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert"),moduleType:"trace",name:"mesh3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":867,"./calc":868,"./convert":869,"./defaults":870}],872:[function(e,t,n){"use strict";var r=e("../../lib").extendFlat,i=e("../scatter/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../components/drawing/attributes").dash,s=e("../../components/fx/attributes"),l=e("../../constants/delta.js"),c=l.INCREASING.COLOR,u=l.DECREASING.COLOR,h=i.line;function d(e){return{line:{color:r({},h.color,{dflt:e}),width:h.width,dash:a,editType:"style"},editType:"style"}}t.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:r({},h.width,{}),dash:r({},a,{}),editType:"style"},increasing:d(c),decreasing:d(u),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:r({},s.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},{"../../components/drawing/attributes":387,"../../components/fx/attributes":397,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axis_format_attributes":557,"../scatter/attributes":926}],873:[function(e,t,n){"use strict";var r=e("../../lib"),i=r._,o=e("../../plots/cartesian/axes"),a=e("../../plots/cartesian/align_period"),s=e("../../constants/numerical").BADNUM;function l(e,t,n,r){return{o:e,h:t,l:n,c:r}}function c(e,t,n,a,l,c){for(var u=l.makeCalcdata(t,"open"),h=l.makeCalcdata(t,"high"),d=l.makeCalcdata(t,"low"),f=l.makeCalcdata(t,"close"),p=Array.isArray(t.text),g=Array.isArray(t.hovertext),m=!0,v=null,y=!!t.xperiodalignment,b=[],_=0;_<a.length;_++){var x=a[_],w=u[_],A=h[_],k=d[_],T=f[_];if(x!==s&&w!==s&&A!==s&&k!==s&&T!==s){T===w?null!==v&&T!==v&&(m=T>v):m=T>w,v=T;var S=c(w,A,k,T);S.pos=x,S.yc=(w+T)/2,S.i=_,S.dir=m?"increasing":"decreasing",S.x=S.pos,S.y=[k,A],y&&(S.orig_p=n[_]),p&&(S.tx=t.text[_]),g&&(S.htx=t.hovertext[_]),b.push(S)}else b.push({pos:x,empty:!0})}return t._extremes[l._id]=o.findExtremes(l,r.concat(d,h),{padded:!0}),b.length&&(b[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),b}t.exports={calc:function(e,t){var n=o.getFromId(e,t.xaxis),i=o.getFromId(e,t.yaxis),s=function(e,t,n){var i=n._minDiff;if(!i){var o,s=e._fullData,l=[];for(i=1/0,o=0;o<s.length;o++){var c=s[o];if("ohlc"===c.type&&!0===c.visible&&c.xaxis===t._id){l.push(c);var u=t.makeCalcdata(c,"x");c._origX=u;var h=a(n,t,"x",u).vals;c._xcalc=h;var d=r.distinctVals(h).minDiff;d&&isFinite(d)&&(i=Math.min(i,d))}}for(i===1/0&&(i=1),o=0;o<l.length;o++)l[o]._minDiff=i}return i*n.tickwidth}(e,n,t),u=t._minDiff;t._minDiff=null;var h=t._origX;t._origX=null;var d=t._xcalc;t._xcalc=null;var f=c(e,t,h,d,i,l);return t._extremes[n._id]=o.findExtremes(n,d,{vpad:u/2}),f.length?(r.extendFlat(f[0].t,{wHover:u/2,tickLen:s}),f):[{t:{empty:!0}}]},calcCommon:c}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554}],874:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./ohlc_defaults"),o=e("../scatter/period_defaults"),a=e("./attributes");function s(e,t,n,r){n(r+".line.color"),n(r+".line.width",t.line.width),n(r+".line.dash",t.line.dash)}t.exports=function(e,t,n,l){function c(n,i){return r.coerce(e,t,a,n,i)}i(e,t,c,l)?(o(e,t,l,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),c("line.dash"),s(0,t,c,"increasing"),s(0,t,c,"decreasing"),c("text"),c("hovertext"),c("tickwidth"),l._requestRangeslider[t.xaxis]=!0):t.visible=!1}},{"../../lib":503,"../scatter/period_defaults":946,"./attributes":872,"./ohlc_defaults":877}],875:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../lib"),o=e("../../components/fx"),a=e("../../components/color"),s=e("../../lib").fillText,l=e("../../constants/delta.js"),c={increasing:l.INCREASING.SYMBOL,decreasing:l.DECREASING.SYMBOL};function u(e,t,n,r){var i,s,l=e.cd,c=e.xa,u=l[0].trace,h=l[0].t,d=u.type,f="ohlc"===d?"l":"min",p="ohlc"===d?"h":"max",g=h.bPos||0,m=h.bdPos||h.tickLen,v=h.wHover,y=Math.min(1,m/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function b(e){var n=function(e){return e.pos+g-t}(e);return o.inbox(n-v,n+v,i)}function _(e){var t=e[f],r=e[p];return t===r||o.inbox(t-n,r-n,i)}function x(e){return(b(e)+_(e))/2}i=e.maxHoverDistance-y,s=e.maxSpikeDistance-y;var w=o.getDistanceFunction(r,b,_,x);if(o.getClosest(l,w,e),!1===e.index)return null;var A=l[e.index];if(A.empty)return null;var k=u[A.dir],T=k.line.color;return a.opacity(T)&&k.line.width?e.color=T:e.color=k.fillcolor,e.x0=c.c2p(A.pos+g-m,!0),e.x1=c.c2p(A.pos+g+m,!0),e.xLabelVal=void 0!==A.orig_p?A.orig_p:A.pos,e.spikeDistance=x(A)*s/i,e.xSpike=c.c2p(A.pos,!0),e}function h(e,t,n,o){var a=e.cd,s=e.ya,l=a[0].trace,c=a[0].t,h=[],d=u(e,t,n,o);if(!d)return[];var f=a[d.index].hi||l.hoverinfo,p=f.split("+");if("all"!==f&&-1===p.indexOf("y"))return[];for(var g=["high","open","close","low"],m={},v=0;v<g.length;v++){var y,b=g[v],_=l[b][d.index],x=s.c2p(_,!0);_ in m?(y=m[_]).yLabel+="<br>"+c.labels[b]+r.hoverLabelText(s,_,l.yhoverformat):((y=i.extendFlat({},d)).y0=y.y1=x,y.yLabelVal=_,y.yLabel=c.labels[b]+r.hoverLabelText(s,_,l.yhoverformat),y.name="",h.push(y),m[_]=y)}return h}function d(e,t,n,i){var o=e.cd,a=e.ya,l=o[0].trace,h=o[0].t,d=u(e,t,n,i);if(!d)return[];var f=o[d.index],p=d.index=f.i,g=f.dir;function m(e){return h.labels[e]+r.hoverLabelText(a,l[e][p],l.yhoverformat)}var v=f.hi||l.hoverinfo,y=v.split("+"),b="all"===v,_=b||-1!==y.indexOf("y"),x=b||-1!==y.indexOf("text"),w=_?[m("open"),m("high"),m("low"),m("close")+" "+c[g]]:[];return x&&s(f,l,w),d.extraText=w.join("<br>"),d.y0=d.y1=a.c2p(f.yc,!0),[d]}t.exports={hoverPoints:function(e,t,n,r){return e.cd[0].trace.hoverlabel.split?h(e,t,n,r):d(e,t,n,r)},hoverSplit:h,hoverOnPoints:d}},{"../../components/color":366,"../../components/fx":406,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axes":554}],876:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"ohlc",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc").calc,plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select")}},{"../../plots/cartesian":568,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./plot":878,"./select":879,"./style":880}],877:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib");t.exports=function(e,t,n,o){var a=n("x"),s=n("open"),l=n("high"),c=n("low"),u=n("close");if(n("hoverlabel.split"),r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],o),s&&l&&c&&u){var h=Math.min(s.length,l.length,c.length,u.length);return a&&(h=Math.min(h,i.minRowLength(a))),t._length=h,h}}},{"../../lib":503,"../../registry":638}],878:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib");t.exports=function(e,t,n,o){var a=t.yaxis,s=t.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(o,n,"trace ohlc").each((function(e){var t=r.select(this),n=e[0],o=n.t;if(!0!==n.trace.visible||o.empty)t.remove();else{var c=o.tickLen,u=t.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=s.c2p(e.pos-c,!0),n=s.c2p(e.pos+c,!0),r=l?(t+n)/2:s.c2p(e.pos,!0);return"M"+t+","+a.c2p(e.o,!0)+"H"+r+"M"+r+","+a.c2p(e.h,!0)+"V"+a.c2p(e.l,!0)+"M"+n+","+a.c2p(e.c,!0)+"H"+r}))}}))}},{"../../lib":503,"@plotly/d3":58}],879:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r=e.cd,i=e.xaxis,o=e.yaxis,a=[],s=r[0].t.bPos||0;if(!1===t)for(n=0;n<r.length;n++)r[n].selected=0;else for(n=0;n<r.length;n++){var l=r[n];t.contains([i.c2p(l.pos+s),o.c2p(l.yc)],null,l.i,e)?(a.push({pointNumber:l.i,x:i.c2d(l.pos),y:o.c2d(l.yc)}),l.selected=1):l.selected=0}return a}},{}],880:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../components/color");t.exports=function(e,t,n){var a=n||r.select(e).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(e){var t=e[0].trace;r.select(this).selectAll("path").each((function(e){if(!e.empty){var n=t[e.dir].line;r.select(this).style("fill","none").call(o.stroke,n.color).call(i.dashLine,n.dash,n.width).style("opacity",t.selectedpoints&&!e.selected?.3:1)}}))}))}},{"../../components/color":366,"../../components/drawing":388,"@plotly/d3":58}],881:[function(e,t,n){"use strict";var r=e("../../lib/extend").extendFlat,i=e("../../plots/attributes"),o=e("../../plots/font_attributes"),a=e("../../components/colorscale/attributes"),s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/domain").attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},i.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:o({editType:"calc"}),tickfont:o({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],882:[function(e,t,n){"use strict";var r=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o="parcats";n.name=o,n.plot=function(e,t,n,a){var s=r(e.calcdata,o);if(s.length){var l=s[0];i(e,l,n,a)}},n.clean=function(e,t,n,r){var i=r._has&&r._has("parcats"),o=t._has&&t._has("parcats");i&&!o&&r._paperdiv.selectAll(".parcats").remove()}},{"../../plots/get_data":593,"./plot":887}],883:[function(e,t,n){"use strict";var r=e("../../lib/gup").wrap,i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/calc"),a=e("../../lib/filter_unique.js"),s=e("../../components/drawing"),l=e("../../lib"),c=e("fast-isnumeric");function u(e,t,n){e.valueInds.push(t),e.count+=n}function h(e,t,n){return{categoryInds:e,color:t,rawColor:n,valueInds:[],count:0}}function d(e,t,n){e.valueInds.push(t),e.count+=n}function f(e){var t;if(function(e){for(var t=new Array(e.length),n=0;n<e.length;n++){if(e[n]<0||e[n]>=e.length)return!1;if(void 0!==t[e[n]])return!1;t[e[n]]=!0}return!0}(e.map((function(e){return e.displayindex}))))for(t=0;t<e.length;t++)e[t]._displayindex=e[t].displayindex;else for(t=0;t<e.length;t++)e[t]._displayindex=t}t.exports=function(e,t){var n=l.filterVisible(t.dimensions);if(0===n.length)return[];var p,g,m,v=n.map((function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var n=!0,r=0;r<t.length;r++)if(!c(t[r])){n=!1;break}t.sort(n?l.sorterAsc:void 0),"category descending"===e.categoryorder&&(t=t.reverse())}return function(e,t){t=null==t?[]:t.map((function(e){return e}));var n={},r={},i=[];t.forEach((function(e,t){n[e]=0,r[e]=t}));for(var o=0;o<e.length;o++){var a,s=e[o];void 0===n[s]?(n[s]=1,a=t.push(s)-1,r[s]=a):(n[s]++,a=r[s]),i.push(a)}var l=t.map((function(e){return n[e]}));return{uniqueValues:t,uniqueCounts:l,inds:i}}(e.values,t)}));p=l.isArrayOrTypedArray(t.counts)?t.counts:[t.counts],f(n),n.forEach((function(e,t){!function(e,t){e._categoryarray=t.uniqueValues,null===e.ticktext||void 0===e.ticktext?e._ticktext=[]:e._ticktext=e.ticktext.slice();for(var n=e._ticktext.length;n<t.uniqueValues.length;n++)e._ticktext.push(t.uniqueValues[n])}(e,v[t])}));var y,b=t.line;b?(i(t,"line")&&o(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),y=s.tryColorscale(b)):y=l.identity;var _,x,w,A,k,T=n[0].values.length,S={},E=v.map((function(e){return e.inds}));for(m=0,_=0;_<T;_++){var C=[];for(x=0;x<E.length;x++)C.push(E[x][_]);g=p[_%p.length],m+=g;var M=(w=_,A=void 0,k=void 0,l.isArrayOrTypedArray(b.color)?k=A=b.color[w%b.color.length]:A=b.color,{color:y(A),rawColor:k}),O=C+"-"+M.rawColor;void 0===S[O]&&(S[O]=h(C,M.color,M.rawColor)),d(S[O],_,g)}var L,D=n.map((function(e,t){return function(e,t,n,r,i){return{dimensionInd:e,containerInd:t,displayInd:n,dimensionLabel:r,count:i,categories:[],dragX:null}}(t,e._index,e._displayindex,e.label,m)}));for(_=0;_<T;_++)for(g=p[_%p.length],x=0;x<D.length;x++){var I=D[x].containerInd,R=v[x].inds[_],P=D[x].categories;if(void 0===P[R]){var N=t.dimensions[I]._categoryarray[R],z=t.dimensions[I]._ticktext[R];P[R]={dimensionInd:x,categoryInd:L=R,categoryValue:N,displayInd:L,categoryLabel:z,valueInds:[],count:0,dragY:null}}u(P[R],_,g)}return r(function(e,t,n){var r=e.map((function(e){return e.categories.length})).reduce((function(e,t){return Math.max(e,t)}));return{dimensions:e,paths:t,trace:void 0,maxCats:r,count:n}}(D,S,m))}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"../../components/drawing":388,"../../lib":503,"../../lib/filter_unique.js":494,"../../lib/gup":500,"fast-isnumeric":190}],884:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/defaults"),a=e("../../plots/domain").defaults,s=e("../../plots/array_container_defaults"),l=e("./attributes"),c=e("../parcoords/merge_length");function u(e,t){function n(n,i){return r.coerce(e,t,l.dimensions,n,i)}var i=n("values"),o=n("visible");if(i&&i.length||(o=t.visible=!1),o){n("label"),n("displayindex",t._index);var a,s=e.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(a="array");var u=n("categoryorder",a);"array"===u?(n("categoryarray"),n("ticktext")):(delete e.categoryarray,delete e.ticktext),c||"array"!==u||(t.categoryorder="trace")}}t.exports=function(e,t,n,h){function d(n,i){return r.coerce(e,t,l,n,i)}var f=s(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,n,a,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",a.colorway[0]);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=n}return 1/0}(e,t,n,h,d);a(t,h,d),Array.isArray(f)&&f.length||(t.visible=!1),c(t,f,"values",p),d("hoveron"),d("hovertemplate"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var g={family:h.font.family,size:Math.round(h.font.size),color:h.font.color};r.coerceFont(d,"labelfont",g);var m={family:h.font.family,size:Math.round(h.font.size/1.2),color:h.font.color};r.coerceFont(d,"tickfont",m)}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/domain":584,"../parcoords/merge_length":897,"./attributes":881}],885:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":881,"./base_plot":882,"./calc":883,"./defaults":884,"./plot":887}],886:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-interpolate").interpolateNumber,o=e("../../plot_api/plot_api"),a=e("../../components/fx"),s=e("../../lib"),l=s.strTranslate,c=e("../../components/drawing"),u=e("tinycolor2"),h=e("../../lib/svg_text_utils");function d(e,t,n,i){var o=e.map(z.bind(0,t,n)),a=i.selectAll("g.parcatslayer").data([null]);a.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=a.selectAll("g.trace.parcats").data(o,f),d=u.enter().append("g").attr("class","trace parcats");u.attr("transform",(function(e){return l(e.x,e.y)})),d.append("g").attr("class","paths");var y=u.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),f);y.attr("fill",(function(e){return e.model.color}));var b=y.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);x(b),y.attr("d",(function(e){return e.svgD})),b.empty()||y.sort(g),y.exit().remove(),y.on("mouseover",m).on("mouseout",v).on("click",_),d.append("g").attr("class","dimensions");var w=u.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),f);w.enter().append("g").attr("class","dimension"),w.attr("transform",(function(e){return l(e.x,0)})),w.exit().remove();var T=w.selectAll("g.category").data((function(e){return e.categories}),f),S=T.enter().append("g").attr("class","category");T.attr("transform",(function(e){return l(0,e.y)})),S.append("rect").attr("class","catrect").attr("pointer-events","none"),T.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),A(S);var E=T.selectAll("rect.bandrect").data((function(e){return e.bands}),f);E.each((function(){s.raiseToTop(this)})),E.attr("fill",(function(e){return e.color}));var C=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);E.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),k(C),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none");var R=t._fullLayout.paper_bgcolor;T.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",h.makeTextShadow(R)).style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){c.font(r.select(this),e.parcatsViewModel.categorylabelfont),h.convertToTspans(r.select(this),t)})),S.append("text").attr("class","dimlabel"),T.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)})),T.selectAll("rect.bandrect").on("mouseover",M).on("mouseout",O),T.exit().remove(),w.call(r.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",L).on("drag",D).on("dragend",I)),u.each((function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),u.exit().remove()}function f(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,n=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===n}function g(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function m(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){s.raiseToTop(this),w(r.select(this));var t=y(e),n=b(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:r.event,constraints:n}),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")){var i,o,l,c=r.mouse(this)[0],h=e.parcatsViewModel.graphDiv,d=e.parcatsViewModel.trace,f=h._fullLayout,p=f._paperdiv.node().getBoundingClientRect(),g=e.parcatsViewModel.graphDiv.getBoundingClientRect();for(l=0;l<e.leftXs.length-1;l++)if(e.leftXs[l]+e.dimWidths[l]-2<=c&&c<=e.leftXs[l+1]+2){var m=e.parcatsViewModel.dimensions[l],v=e.parcatsViewModel.dimensions[l+1];i=(m.x+m.width+v.x)/2,o=(e.topYs[l]+e.topYs[l+1]+e.height)/2;break}var _=e.parcatsViewModel.x+i,x=e.parcatsViewModel.y+o,A=u.mostReadable(e.model.color,["black","white"]),k=e.model.count,T=k/e.parcatsViewModel.model.count,S={countLabel:k,probabilityLabel:T.toFixed(3)},E=[];-1!==e.parcatsViewModel.hoverinfoItems.indexOf("count")&&E.push(["Count:",S.countLabel].join(" ")),-1!==e.parcatsViewModel.hoverinfoItems.indexOf("probability")&&E.push(["P:",S.probabilityLabel].join(" "));var C=E.join("<br>"),M=r.mouse(h)[0];a.loneHover({trace:d,x:_-p.left+g.left,y:x-p.top+g.top,text:C,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:A,idealAlign:M<_?"right":"left",hovertemplate:(d.line||{}).hovertemplate,hovertemplateLabels:S,eventData:[{data:d._input,fullData:d,count:k,probability:T}]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:h})}}}function v(e){if(!e.parcatsViewModel.dragDimension&&(x(r.select(this)),a.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(g),-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var t=y(e),n=b(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:r.event,constraints:n})}}function y(e){for(var t=[],n=R(e.parcatsViewModel),r=0;r<e.model.valueInds.length;r++){var i=e.model.valueInds[r];t.push({curveNumber:n,pointNumber:i})}return t}function b(e){for(var t={},n=e.parcatsViewModel.model.dimensions,r=0;r<n.length;r++){var i=n[r],o=i.categories[e.model.categoryInds[r]];t[i.containerInd]=o.categoryValue}return void 0!==e.model.rawColor&&(t.color=e.model.rawColor),t}function _(e){if(-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t=y(e),n=b(e);e.parcatsViewModel.graphDiv.emit("plotly_click",{points:t,event:r.event,constraints:n})}}function x(e){e.attr("fill",(function(e){return e.model.color})).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function w(e){e.attr("fill-opacity",.8).attr("stroke",(function(e){return u.mostReadable(e.model.color,["black","white"])})).attr("stroke-width",.3)}function A(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function k(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function T(e){var t=e.parcatsViewModel.pathSelection,n=e.categoryViewModel.model.dimensionInd,r=e.categoryViewModel.model.categoryInd;return t.filter((function(t){return t.model.categoryInds[n]===r&&t.model.color===e.color}))}function S(e,t,n){var i=r.select(e).datum(),o=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,s=r.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each((function(e){T(e).each((function(e){Array.prototype.push.apply(l,y(e))}))}));var c={};c[o.dimensionInd]=o.categoryValue,a.emit(t,{points:l,event:n,constraints:c})}function E(e,t,n){var i=r.select(e).datum(),o=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,s=T(i),l=[];s.each((function(e){Array.prototype.push.apply(l,y(e))}));var c={};c[o.dimensionInd]=o.categoryValue,void 0!==i.rawColor&&(c.color=i.rawColor),a.emit(t,{points:l,event:n,constraints:c})}function C(e,t,n){e._fullLayout._calcInverseTransform(e);var i,o,a=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.select(n.parentNode).select("rect.catrect"),c=l.node().getBoundingClientRect(),u=l.datum(),h=u.parcatsViewModel,d=h.model.dimensions[u.model.dimensionInd],f=h.trace,p=c.top+c.height/2;h.dimensions.length>1&&d.displayInd===h.dimensions.length-1?(i=c.left,o="left"):(i=c.left+c.width,o="right");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},b=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&b.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&b.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var _=b.join("<br>");return{trace:f,x:a*(i-t.left),y:s*(p-t.top),text:_,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:o,hovertemplate:f.hovertemplate,hovertemplateLabels:y,eventData:[{data:f._input,fullData:f,count:g,category:m,probability:v}]}}function M(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(r.mouse(this)[1]<-1)return;var t,n=e.parcatsViewModel.graphDiv,i=n._fullLayout,o=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,c=this;"color"===l?(function(e){var t=r.select(e).datum(),n=T(t);w(n),n.each((function(){s.raiseToTop(this)})),r.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(c),E(c,"plotly_hover",r.event)):(function(e){r.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=T(e);w(t),t.each((function(){s.raiseToTop(this)}))})),r.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(c),S(c,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===l?t=C(n,o,c):"color"===l?t=function(e,t,n){e._fullLayout._calcInverseTransform(e);var i,o,a=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=n.getBoundingClientRect(),c=r.select(n).datum(),h=c.categoryViewModel,d=h.parcatsViewModel,f=d.model.dimensions[h.model.dimensionInd],p=d.trace,g=l.y+l.height/2;d.dimensions.length>1&&f.displayInd===d.dimensions.length-1?(i=l.left,o="left"):(i=l.left+l.width,o="right");var m=h.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(e){e.color===c.color&&(y+=e.count)}));var b=h.model.count,_=0;d.pathSelection.each((function(e){e.model.color===c.color&&(_+=e.model.count)}));var x=y/v,w=y/_,A=y/b,k={countLabel:v,categoryLabel:m,probabilityLabel:x.toFixed(3)},T=[];-1!==h.parcatsViewModel.hoverinfoItems.indexOf("count")&&T.push(["Count:",k.countLabel].join(" ")),-1!==h.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(T.push("P(color "+m+"): "+k.probabilityLabel),T.push("P("+m+" | color): "+w.toFixed(3)),T.push("P(color | "+m+"): "+A.toFixed(3)));var S=T.join("<br>"),E=u.mostReadable(c.color,["black","white"]);return{trace:p,x:a*(i-t.left),y:s*(g-t.top),text:S,color:c.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:E,fontSize:10,idealAlign:o,hovertemplate:p.hovertemplate,hovertemplateLabels:k,eventData:[{data:p._input,fullData:p,category:m,count:v,probability:x,categorycount:b,colorcount:_,bandcolorcount:y}]}}(n,o,c):"dimension"===l&&(t=function(e,t,n){var i=[];return r.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(C(e,t,this))})),i}(n,o,c)),t&&a.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:n}))}}function O(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(x(t.pathSelection),A(t.dimensionSelection.selectAll("g.category")),k(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(g),-1===t.hoverinfoItems.indexOf("skip"))){"color"===e.parcatsViewModel.hoveron?E(this,"plotly_unhover",r.event):S(this,"plotly_unhover",r.event)}}function L(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var n=r.mouse(this)[0],i=r.mouse(this)[1];-2<=n&&n<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.y<i&&i<=t.y+t.height&&(e.potentialClickBand=this)})))})),e.parcatsViewModel.dragDimension=e,a.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function D(e){if("fixed"!==e.parcatsViewModel.arrangement&&(e.dragHasMoved=!0,null!==e.dragDimensionDisplayInd)){var t=e.dragDimensionDisplayInd,n=t-1,i=t+1,o=e.parcatsViewModel.dimensions[t];if(null!==e.dragCategoryDisplayInd){var a=o.categories[e.dragCategoryDisplayInd];a.model.dragY+=r.event.dy;var s=a.model.dragY,l=a.model.displayInd,c=o.categories,u=c[l-1],h=c[l+1];void 0!==u&&s<u.y+u.height/2&&(a.model.displayInd=u.model.displayInd,u.model.displayInd=l),void 0!==h&&s+a.height>h.y+h.height/2&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=l),e.dragCategoryDisplayInd=a.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){o.model.dragX=r.event.x;var d=e.parcatsViewModel.dimensions[n],f=e.parcatsViewModel.dimensions[i];void 0!==d&&o.model.dragX<d.x+d.width&&(o.model.displayInd=d.model.displayInd,d.model.displayInd=t),void 0!==f&&o.model.dragX+o.width>f.x&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=o.model.displayInd}j(e.parcatsViewModel),B(e.parcatsViewModel),N(e.parcatsViewModel),P(e.parcatsViewModel)}}function I(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},n=R(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),a=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));a&&i.forEach((function(n,r){var i=e.parcatsViewModel.model.dimensions[r].containerInd;t["dimensions["+i+"].displayindex"]=n}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),h=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?E(e.potentialClickBand,"plotly_click",r.event.sourceEvent):S(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,j(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each((function(){N(e.parcatsViewModel,!0),P(e.parcatsViewModel,!0)})).each("end",(function(){(a||s)&&o.restyle(e.parcatsViewModel.graphDiv,t,[n])}))}}function R(e){for(var t,n=e.graphDiv._fullData,r=0;r<n.length;r++)if(e.key===n[r].uid){t=r;break}return t}function P(e,t){var n;void 0===t&&(t=!1),e.pathSelection.data((function(e){return e.paths}),f),(n=e.pathSelection,t?n.transition():n).attr("d",(function(e){return e.svgD}))}function N(e,t){function n(e){return t?e.transition():e}void 0===t&&(t=!1),e.dimensionSelection.data((function(e){return e.dimensions}),f);var i=e.dimensionSelection.selectAll("g.category").data((function(e){return e.categories}),f);n(e.dimensionSelection).attr("transform",(function(e){return l(e.x,0)})),n(i).attr("transform",(function(e){return l(0,e.y)})),i.select(".dimlabel").text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})),i.select(".catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("x",(function(e){return p(e)?e.width+5:-5})).each((function(e){var t,n;p(e)?(t=e.width+5,n="start"):(t=-5,n="end"),r.select(this).selectAll("tspan").attr("x",t).attr("text-anchor",n)}));var o=i.selectAll("rect.bandrect").data((function(e){return e.bands}),f),a=o.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);o.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})),k(a),o.each((function(){s.raiseToTop(this)})),o.exit().remove()}function z(e,t,n){var r,i=n[0],o=t.margin||{l:80,r:80,t:100,b:80},a=i.trace,s=a.domain,l=t.width,c=t.height,u=Math.floor(l*(s.x[1]-s.x[0])),h=Math.floor(c*(s.y[1]-s.y[0])),d=s.x[0]*l+o.l,f=t.height-s.y[1]*t.height+o.t,p=a.line.shape;r="all"===a.hoverinfo?["count","probability"]:(a.hoverinfo||"").split("+");var g={trace:a,key:a.uid,model:i,x:d,y:f,width:u,height:h,hoveron:a.hoveron,hoverinfoItems:r,arrangement:a.arrangement,bundlecolors:a.bundlecolors,sortpaths:a.sortpaths,labelfont:a.labelfont,categorylabelfont:a.tickfont,pathShape:p,dragDimension:null,margin:o,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return i.dimensions&&(j(g),B(g)),g}function F(e,t,n,r,o){var a,s,l=[],c=[];for(s=0;s<n.length-1;s++)a=i(n[s]+e[s],e[s+1]),l.push(a(o)),c.push(a(1-o));var u="M "+e[0]+","+t[0];for(u+="l"+n[0]+",0 ",s=1;s<n.length;s++)u+="C"+l[s-1]+","+t[s-1]+" "+c[s-1]+","+t[s]+" "+e[s]+","+t[s],u+="l"+n[s]+",0 ";for(u+="l0,"+r+" ",u+="l -"+n[n.length-1]+",0 ",s=n.length-2;s>=0;s--)u+="C"+c[s]+","+(t[s+1]+r)+" "+l[s]+","+(t[s]+r)+" "+(e[s]+n[s])+","+(t[s]+r),u+="l-"+n[s]+",0 ";return u+"Z"}function B(e){var t=e.dimensions,n=e.model,r=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),o=e.model.dimensions.map((function(e){return e.displayInd})),a=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in n.paths)n.paths.hasOwnProperty(u)&&c.push(n.paths[u]);function h(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return a.map((function(e){return t[e]}))}c.sort((function(t,n){var r=h(t),i=h(n);return"backward"===e.sortpaths&&(r.reverse(),i.reverse()),r.push(t.valueInds[0]),i.push(n.valueInds[0]),e.bundlecolors&&(r.unshift(t.rawColor),i.unshift(n.rawColor)),r<i?-1:r>i?1:0}));for(var d=new Array(c.length),f=t[0].model.count,p=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),g=0;g<c.length;g++){var m,v=c[g];m=f>0?p*(v.count/f):0;for(var y,b=new Array(r.length),_=0;_<v.categoryInds.length;_++){var x=v.categoryInds[_],w=i[_][x],A=o[_];b[A]=r[A][w],r[A][w]+=m;var k=e.dimensions[A].categories[w],T=k.bands.length,S=k.bands[T-1];if(void 0===S||v.rawColor!==S.rawColor){var E=void 0===S?0:S.y+S.height;k.bands.push({key:E,color:v.color,rawColor:v.rawColor,height:m,width:k.width,count:v.count,y:E,categoryViewModel:k,parcatsViewModel:e})}else{var C=k.bands[T-1];C.height+=m,C.count+=v.count}}y="hspline"===e.pathShape?F(s,b,l,m,.5):F(s,b,l,m,0),d[g]={key:v.valueInds[0],model:v,height:m,leftXs:s,topYs:b,dimWidths:l,svgD:y,parcatsViewModel:e}}e.paths=d}function j(e){var t=e.model.dimensions.map((function(e){return{displayInd:e.displayInd,dimensionInd:e.dimensionInd}}));t.sort((function(e,t){return e.displayInd-t.displayInd}));var n=[];for(var r in t){var i=t[r].dimensionInd,o=e.model.dimensions[i];n.push(U(e,o))}e.dimensions=n}function U(e,t){var n,r=e.model.dimensions.length,i=t.displayInd;n=40+(r>1?(e.width-80-16)/(r-1):0)*i;var o,a,s,l,c,u=[],h=e.model.maxCats,d=t.categories.length,f=t.count,p=e.height-8*(h-1),g=8*(h-d)/2,m=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(m.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c<d;c++)l=m[c].categoryInd,a=t.categories[l],o=f>0?a.count/f*p:0,s={key:a.valueInds[0],model:a,width:16,height:o,y:null!==a.dragY?a.dragY:g,bands:[],parcatsViewModel:e},g=g+o+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:n,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(e,t,n,r){d(n,e,r,t)}},{"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_api":540,"@plotly/d3":58,"d3-interpolate":116,tinycolor2:312}],887:[function(e,t,n){"use strict";var r=e("./parcats");t.exports=function(e,t,n,i){var o=e._fullLayout,a=o._paper,s=o._size;r(e,a,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}},{"./parcats":886}],888:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/cartesian/layout_attributes"),o=e("../../plots/font_attributes"),a=e("../../plots/domain").attributes,s=e("../../lib/extend").extendFlat,l=e("../../plot_api/plot_template").templatedArray;t.exports={domain:a({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:o({editType:"plot"}),tickfont:o({editType:"plot"}),rangefont:o({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},r("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],889:[function(e,t,n){"use strict";var r=e("./constants"),i=e("@plotly/d3"),o=e("../../lib/gup").keyFun,a=e("../../lib/gup").repeat,s=e("../../lib").sorterAsc,l=e("../../lib").strTranslate,c=r.bar.snapRatio;function u(e,t){return e*(1-c)+t*c}var h=r.bar.snapClose;function d(e,t){return e*(1-h)+t*h}function f(e,t,n,r){if(function(e,t){for(var n=0;n<t.length;n++)if(e>=t[n][0]&&e<=t[n][1])return!0;return!1}(n,r))return n;var i=e?-1:1,o=0,a=t.length-1;if(i<0){var s=o;o=a,a=s}for(var l=t[o],c=l,h=o;i*h<i*a;h+=i){var f=h+i,p=t[f];if(i*n<i*d(l,p))return u(l,c);if(i*n<i*p||f===a)return u(p,l);c=l,l=p}}function p(e){e.attr("x",-r.bar.captureWidth/2).attr("width",r.bar.captureWidth)}function g(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t,n,r,i=v(e.brush.filter.getConsolidated(),e.height),o=[0],a=i.length?i[0][0]:null,s=0;s<i.length;s++)n=(t=i[s])[1]-t[0],o.push(a),o.push(n),(r=s+1)<i.length&&(a=i[r][0]-t[1]);return o.push(e.height),o}function v(e,t){return e.map((function(e){return e.map((function(e){return Math.max(0,e*t)})).sort(s)}))}function y(){i.select(document.body).style("cursor",null)}function b(e){e.attr("stroke-dasharray",m)}function _(e,t){var n=i.select(e).selectAll(".highlight, .highlight-shadow");b(t?n.transition().duration(r.bar.snapDuration).each("end",t):n)}function x(e,t){var n,i=e.brush,o=NaN,a={};if(i.filterSpecified){var s=e.height,l=i.filter.getConsolidated(),c=v(l,s),u=NaN,h=NaN,d=NaN;for(n=0;n<=c.length;n++){var f=c[n];if(f&&f[0]<=t&&t<=f[1]){u=n;break}if(h=n?n-1:NaN,f&&f[0]>t){d=n;break}}if(o=u,isNaN(o)&&(o=isNaN(h)||isNaN(d)?isNaN(h)?d:h:t-c[h][1]<c[d][0]-t?h:d),!isNaN(o)){var p=c[o],g=function(e,t){var n=r.bar.handleHeight;if(!(t>e[1]+n||t<e[0]-n))return t>=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(p,t);g&&(a.interval=l[o],a.intervalPix=p,a.region=g)}}if(e.ordinal&&!a.region){var m=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(n=0;n<m.length;n++){var b=[.25*m[Math.max(n-1,0)]+.75*m[n],.25*m[Math.min(n+1,m.length-1)]+.75*m[n]];if(y>=b[0]&&y<=b[1]){a.clickableOrdinalRange=b;break}}}return a}function w(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,o=t.brush.svgBrush;o.wasDragged=!0,o._dragging=!0,o.grabbingBar?o.newExtent=[n-o.grabPoint,n+o.barLength-o.grabPoint].map(t.unitToPaddedPx.invert):o.newExtent=[o.startExtent,t.unitToPaddedPx.invert(n)].sort(s),t.brush.filterSpecified=!0,o.extent=o.stayingIntervals.concat([o.newExtent]),o.brushCallback(t),_(e.parentNode)}function A(e,t){var n=x(t,t.height-i.mouse(e)[1]-2*r.verticalPadding),o="crosshair";n.clickableOrdinalRange?o="pointer":n.region&&(o=n.region+"-resize"),i.select(document.body).style("cursor",o)}function k(e){e.on("mousemove",(function(e){i.event.preventDefault(),e.parent.inBrushDrag||A(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,o=t.unitToPaddedPx.invert(n),a=t.brush,s=x(t,n),l=s.interval,c=a.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=n-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:o,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){w(this,e)})).on("dragend",(function(e){!function(e,t){var n=t.brush,r=n.filter,o=n.svgBrush;o._dragging||(A(e,t),w(e,t),t.brush.svgBrush.wasDragged=!1),o._dragging=!1,i.event.sourceEvent.stopPropagation();var a=o.grabbingBar;if(o.grabbingBar=!1,o.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!o.wasDragged)return o.wasDragged=void 0,o.clickableOrdinalRange?n.filterSpecified&&t.multiselect?o.extent.push(o.clickableOrdinalRange):(o.extent=[o.clickableOrdinalRange],n.filterSpecified=!0):a?(o.extent=o.stayingIntervals,0===o.extent.length&&S(n)):S(n),o.brushCallback(t),_(e.parentNode),void o.brushEndCallback(n.filterSpecified?r.getConsolidated():[]);var s=function(){r.set(r.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),o.newExtent=[f(0,l,o.newExtent[0],o.stayingIntervals),f(1,l,o.newExtent[1],o.stayingIntervals)];var c=o.newExtent[1]>o.newExtent[0];o.extent=o.stayingIntervals.concat(c?[o.newExtent]:[]),o.extent.length||S(n),o.brushCallback(t),c?_(e.parentNode,s):(s(),_(e.parentNode))}else s();o.brushEndCallback(n.filterSpecified?r.getConsolidated():[])}(this,e)})))}function T(e,t){return e[0]-t[0]}function S(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function E(e){for(var t,n=e.slice(),r=[],i=n.shift();i;){for(t=i.slice();(i=n.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);r.push(t)}return 1===r.length&&r[0][0]>r[0][1]&&(r=[]),r}t.exports={makeBrush:function(e,t,n,r,i,o){var a,l=function(){var e,t,n=[];return{set:function(r){1===(n=r.map((function(e){return e.slice().sort(s)})).sort(T)).length&&n[0][0]===-1/0&&n[0][1]===1/0&&(n=[[0,-1]]),e=E(n),t=n.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return n.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(n),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:r,brushCallback:(a=i,function(e){var t=e.brush,n=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t).slice();t.filter.set(n),a()}),brushEndCallback:o}}},ensureAxisBrush:function(e,t){var n=e.selectAll("."+r.cn.axisBrush).data(a,o);n.enter().append("g").classed(r.cn.axisBrush,!0),function(e,t){var n=e.selectAll(".background").data(a);n.enter().append("rect").classed("background",!0).call(p).call(g).style("pointer-events","auto").attr("transform",l(0,r.verticalPadding)),n.call(k).attr("height",(function(e){return e.height-r.verticalPadding}));var i=e.selectAll(".highlight-shadow").data(a);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",(function(e){return e.height})).call(b);var o=e.selectAll(".highlight").data(a);o.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",(function(e){return e.height})).call(b)}(n,t)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?E(e.sort(T)):[e[0]]):e=[e.sort(s)],t.tickvals){var n=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[f(0,n,e[0],[]),f(1,n,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},{"../../lib":503,"../../lib/gup":500,"./constants":892,"@plotly/d3":58}],890:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../plots/get_data").getModuleCalcData,o=e("./plot"),a=e("../../constants/xmlns_namespaces");n.name="parcoords",n.plot=function(e){var t=i(e.calcdata,"parcoords")[0];t.length&&o(e,t)},n.clean=function(e,t,n,r){var i=r._has&&r._has("parcoords"),o=t._has&&t._has("parcoords");i&&!o&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},n.toSVG=function(e){var t=e._fullLayout._glimages,n=r.select(e).selectAll(".svg-container");n.filter((function(e,t){return t===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,n=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:a.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},{"../../constants/xmlns_namespaces":480,"../../plots/get_data":593,"./plot":899,"@plotly/d3":58}],891:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray,i=e("../../components/colorscale"),o=e("../../lib/gup").wrap;t.exports=function(e,t){var n,a;return i.hasColorscale(t,"line")&&r(t.line.color)?(n=t.line.color,a=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=.5;return t}(t._length),a=[[0,t.line.color],[1,t.line.color]]),o({lineColor:n,cscale:a})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500}],892:[function(e,t,n){"use strict";t.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,deselectedLineColor:"#777",bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},{}],893:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/defaults"),a=e("../../plots/domain").defaults,s=e("../../plots/array_container_defaults"),l=e("../../plots/cartesian/axes"),c=e("./attributes"),u=e("./axisbrush"),h=e("./constants").maxDimensionCount,d=e("./merge_length");function f(e,t,n,i){function o(n,i){return r.coerce(e,t,c.dimensions,n,i)}var a=o("values"),s=o("visible");if(a&&a.length||(s=t.visible=!1),s){o("label"),o("tickvals"),o("ticktext"),o("tickformat");var h=o("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:h},l.setConvert(t._ax,i.layout),o("multiselect");var d=o("constraintrange");d&&(t.constraintrange=u.cleanRanges(d,t))}}t.exports=function(e,t,n,l){function u(n,i){return r.coerce(e,t,c,n,i)}var p=e.dimensions;Array.isArray(p)&&p.length>h&&(r.log("parcoords traces support up to "+h+" dimensions at the moment"),p.splice(h));var g=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:f}),m=function(e,t,n,a,s){var l=s("line.color",n);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=n}return 1/0}(e,t,n,l,u);a(t,l,u),Array.isArray(g)&&g.length||(t.visible=!1),d(t,g,"values",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};r.coerceFont(u,"labelfont",v),r.coerceFont(u,"tickfont",v),r.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../../plots/domain":584,"./attributes":888,"./axisbrush":889,"./constants":892,"./merge_length":897}],894:[function(e,t,n){"use strict";var r=e("../../lib").isTypedArray;n.convertTypedArray=function(e){return r(e)?Array.prototype.slice.call(e):e},n.isOrdinal=function(e){return!!e.tickvals},n.isVisible=function(e){return e.visible||!("visible"in e)}},{"../../lib":503}],895:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":888,"./base_plot":890,"./calc":891,"./defaults":893,"./plot":899}],896:[function(e,t,n){"use strict";var r=e("glslify"),i=r(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\nuniform sampler2D maskTexture, palette;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(maskTexture,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),o=r(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),a=e("./constants").maxDimensionCount,s=e("../../lib"),l=1e-6,c=2048,u=new Uint8Array(4),h=new Uint8Array(4),d={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(e,t,n,r,i){var o=e._gl;o.enable(o.SCISSOR_TEST),o.scissor(t,n,r,i),e.clear({color:[0,0,0,0],depth:1})}function p(e,t,n,r,i,o){var a=o.key;n.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),n.drawCompleted=!0),function s(l){var c=Math.min(r,i-l*r);0===l&&(window.cancelAnimationFrame(n.currentRafs[a]),delete n.currentRafs[a],f(e,o.scissorX,o.scissorY,o.scissorWidth,o.viewBoxSize[1])),n.clearOnly||(o.count=2*c,o.offset=2*l*r,t(o),l*r+c<i&&(n.currentRafs[a]=window.requestAnimationFrame((function(){s(l+1)}))),n.drawCompleted=!1)}(0)}function g(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=e(r/255).concat(t);return n}function m(e,t){return(e>>>8*t)%256/255}function v(e,t,n){for(var r=new Array(8*t),i=0,o=0;o<t;o++)for(var a=0;a<2;a++)for(var s=0;s<4;s++){var l=4*e+s,c=n[64*o+l];63===l&&0===a&&(c*=-1),r[i++]=c}return r}function y(e){var t="0"+e;return t.substr(t.length-2)}function b(e){return e<a?"p"+y(e+1)+"_"+y(e+4):"colors"}function _(e,t,n,r,i,o,a,l,c,u,h,d,f,p){for(var g=[[],[]],m=0;m<64;m++)g[0][m]=m===i?1:0,g[1][m]=m===o?1:0;a*=p,l*=p,c*=p,u*=p;var v=e.lines.canvasOverdrag*p,y=e.domain,b=e.canvasWidth*p,_=e.canvasHeight*p,x=e.pad.l*p,w=e.pad.b*p,A=e.layoutHeight*p,k=e.layoutWidth*p,T=e.deselectedLines.color;return s.extendFlat({key:h,resolution:[b,_],viewBoxPos:[a+v,l],viewBoxSize:[c,u],i0:i,i1:o,dim0A:g[0].slice(0,16),dim0B:g[0].slice(16,32),dim0C:g[0].slice(32,48),dim0D:g[0].slice(48,64),dim1A:g[1].slice(0,16),dim1B:g[1].slice(16,32),dim1C:g[1].slice(32,48),dim1D:g[1].slice(48,64),drwLayer:d,contextColor:[T[0]/255,T[1]/255,T[2]/255,T[3]<1?T[3]:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(r===t?0:a+v)+(x-v)+k*y.x[0],scissorWidth:(r===n?b-a+v:c+.5)+(r===t?a+v:0),scissorY:l+w+A*y.y[0],scissorHeight:u,viewportX:x-v+k*y.x[0],viewportY:w+A*y.y[0],viewportWidth:b,viewportHeight:_},f)}function x(e){var t=2047,n=Math.max(0,Math.floor(e[0]*t),0),r=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(n,r),Math.max(n,r)]}t.exports=function(e,t){var n,r,u,y,w,A=t.context,k=t.pick,T=t.regl,S=T._gl,E=S.getParameter(S.ALIASED_LINE_WIDTH_RANGE),C=Math.max(E[0],Math.min(E[1],t.viewModel.plotGlPixelRatio)),M={currentRafs:{},drawCompleted:!0,clearOnly:!1},O=function(e){for(var t={},n=0;n<=a;n+=4)t[b(n)]=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return t}(T),L=T.texture(d),D=[];R(t);var I=T({profile:!1,blend:{enable:A,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!A,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:T.prop("scissorX"),y:T.prop("scissorY"),width:T.prop("scissorWidth"),height:T.prop("scissorHeight")}},viewport:{x:T.prop("viewportX"),y:T.prop("viewportY"),width:T.prop("viewportWidth"),height:T.prop("viewportHeight")},dither:!1,vert:i,frag:o,primitive:"lines",lineWidth:C,attributes:O,uniforms:{resolution:T.prop("resolution"),viewBoxPos:T.prop("viewBoxPos"),viewBoxSize:T.prop("viewBoxSize"),dim0A:T.prop("dim0A"),dim1A:T.prop("dim1A"),dim0B:T.prop("dim0B"),dim1B:T.prop("dim1B"),dim0C:T.prop("dim0C"),dim1C:T.prop("dim1C"),dim0D:T.prop("dim0D"),dim1D:T.prop("dim1D"),loA:T.prop("loA"),hiA:T.prop("hiA"),loB:T.prop("loB"),hiB:T.prop("hiB"),loC:T.prop("loC"),hiC:T.prop("hiC"),loD:T.prop("loD"),hiD:T.prop("hiD"),palette:L,contextColor:T.prop("contextColor"),maskTexture:T.prop("maskTexture"),drwLayer:T.prop("drwLayer"),maskHeight:T.prop("maskHeight")},offset:T.prop("offset"),count:T.prop("count")});function R(e){n=e.model,r=e.viewModel,u=r.dimensions.slice(),y=u[0]?u[0].values.length:0;var t=n.lines,i=k?t.color.map((function(e,n){return n/t.color.length})):t.color,o=function(e,t,n){for(var r=new Array(e*(a+4)),i=0,o=0;o<e;o++){for(var s=0;s<a;s++)r[i++]=s<t.length?t[s].paddedUnitValues[o]:.5;r[i++]=m(o,2),r[i++]=m(o,1),r[i++]=m(o,0),r[i++]=(c=n[o],Math.max(l,Math.min(.999999,c)))}var c;return r}(y,u,i);(function(e,t,n){for(var r=0;r<=a;r+=4)e[b(r)](v(r/4,t,n))})(O,y,o),A||k||(L=T.texture(s.extendFlat({data:g(n.unitToColor,255)},d)))}return{render:function(e,t,r){var i,o,a,s=e.length,l=1/0,h=-1/0;for(i=0;i<s;i++)e[i].dim0.canvasX<l&&(l=e[i].dim0.canvasX,o=i),e[i].dim1.canvasX>h&&(h=e[i].dim1.canvasX,a=i);0===s&&f(T,0,0,n.canvasWidth,n.canvasHeight);var d=function(e){var t,n,r,i=[[],[]];for(r=0;r<64;r++){var o=!e&&r<u.length?u[r].brush.filter.getBounds():[-1/0,1/0];i[0][r]=o[0],i[1][r]=o[1]}var a=new Array(16384);for(t=0;t<16384;t++)a[t]=255;if(!e)for(t=0;t<u.length;t++){var s=t%8,l=(t-s)/8,h=Math.pow(2,s),d=u[t].brush.filter.get();if(!(d.length<2)){var f=x(d[0])[1];for(n=1;n<d.length;n++){var p=x(d[n]);for(r=f+1;r<p[0];r++)a[8*r+l]&=~h;f=Math.max(f,p[1])}}}var g={shape:[8,c],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:a};return w?w(g):w=T.texture(g),{maskTexture:w,maskHeight:c,loA:i[0].slice(0,16),loB:i[0].slice(16,32),loC:i[0].slice(32,48),loD:i[0].slice(48,64),hiA:i[1].slice(0,16),hiB:i[1].slice(16,32),hiC:i[1].slice(32,48),hiD:i[1].slice(48,64)}}(A);for(i=0;i<s;i++){var g=e[i],m=g.dim0.crossfilterDimensionIndex,v=g.dim1.crossfilterDimensionIndex,b=g.canvasX,S=g.canvasY,E=b+g.panelSizeX,C=g.plotGlPixelRatio;if(t||!D[m]||D[m][0]!==b||D[m][1]!==E){D[m]=[b,E];var O=_(n,o,a,i,m,v,b,S,g.panelSizeX,g.panelSizeY,g.dim0.crossfilterDimensionIndex,A?0:k?2:1,d,C);M.clearOnly=r;var L=t?n.lines.blockLineCount:y;p(T,I,M,L,y,O)}}},readPixel:function(e,t){return T.read({x:e,y:t,width:1,height:1,data:h}),h},readPixels:function(e,t,n,r){var i=new Uint8Array(4*n*r);return T.read({x:e,y:t,width:n,height:r,data:i}),i},destroy:function(){for(var t in e.style["pointer-events"]="none",L.destroy(),w&&w.destroy(),O)O[t].destroy()},update:R}}},{"../../lib":503,"./constants":892,glslify:227}],897:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i,o;for(r||(r=1/0),i=0;i<t.length;i++)(o=t[i]).visible&&(r=Math.min(r,o[n].length));for(r===1/0&&(r=0),e._length=r,i=0;i<t.length;i++)(o=t[i]).visible&&(o._length=r);return r}},{}],898:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=i.numberFormat,a=e("color-rgba"),s=e("../../plots/cartesian/axes"),l=i.strRotate,c=i.strTranslate,u=e("../../lib/svg_text_utils"),h=e("../../components/drawing"),d=e("../../components/colorscale"),f=e("../../lib/gup"),p=f.keyFun,g=f.repeat,m=f.unwrap,v=e("./helpers"),y=e("./constants"),b=e("./axisbrush"),_=e("./lines");function x(e,t,n){return i.aggNums(e,null,t,n)}function w(e,t){return k(x(Math.min,e,t),x(Math.max,e,t))}function A(e){var t=e.range;return t?k(t[0],t[1]):w(e.values,e._length)}function k(e,t){return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(t)&&isFinite(t)||(t=0),e===t&&(0===e?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function T(e,t,n,i,a){var s,l,c=A(n);return i?r.scale.ordinal().domain(i.map((s=o(n.tickformat),l=a,l?function(e,t){var n=l[t];return null==n?s(e):n}:s))).range(i.map((function(n){var r=(n-c[0])/(c[1]-c[0]);return e-t+r*(2*t-e)}))):r.scale.linear().domain(c).range([e-t,t])}function S(e){if(e.tickvals){var t=A(e);return r.scale.ordinal().domain(e.tickvals).range(e.tickvals.map((function(e){return(e-t[0])/(t[1]-t[0])})))}}function E(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){var t=a(e[1]);return r.rgb("rgb("+t[0]+","+t[1]+","+t[2]+")")})),i="rgb".split("").map((function(e){return r.scale.linear().clamp(!0).domain(t).range(n.map((i=e,function(e){return e[i]})));var i}));return function(e){return i.map((function(t){return t(e)}))}}function C(e){return e.dimensions.some((function(e){return e.brush.filterSpecified}))}function M(e,t,n){var o=m(t),s=o.trace,l=v.convertTypedArray(o.lineColor),c=s.line,u={color:a(y.deselectedLineColor)},h=d.extractOpts(c),f=h.reversescale?d.flipScale(o.cscale):o.cscale,p=s.domain,g=s.dimensions,b=e.width,_=s.labelangle,x=s.labelside,w=s.labelfont,k=s.tickfont,T=s.rangefont,S=i.extendDeepNoArrays({},c,{color:l.map(r.scale.linear().domain(A({values:l,range:[h.min,h.max],_length:s._length}))),blockLineCount:y.blockLineCount,canvasOverdrag:y.overdrag*y.canvasPixelRatio}),C=Math.floor(b*(p.x[1]-p.x[0])),M=Math.floor(e.height*(p.y[1]-p.y[0])),O=e.margin||{l:80,r:80,t:100,b:80},L=C,D=M;return{key:n,colCount:g.filter(v.isVisible).length,dimensions:g,tickDistance:y.tickDistance,unitToColor:E(f),lines:S,deselectedLines:u,labelAngle:_,labelSide:x,labelFont:w,tickFont:k,rangeFont:T,layoutWidth:b,layoutHeight:e.height,domain:p,translateX:p.x[0]*b,translateY:e.height-p.y[1]*e.height,pad:O,canvasWidth:L*y.canvasPixelRatio+2*S.canvasOverdrag,canvasHeight:D*y.canvasPixelRatio,width:L,height:D,canvasPixelRatio:y.canvasPixelRatio}}function O(e,t,n){var a=n.width,s=n.height,l=n.dimensions,c=n.canvasPixelRatio,u=function(e){return a*e/Math.max(1,n.colCount-1)},h=y.verticalPadding/s,d=function(e,t){return r.scale.linear().range([t,e-t])}(s,y.verticalPadding),f={key:n.key,xScale:u,model:n,inBrushDrag:!1},p={};return f.dimensions=l.filter(v.isVisible).map((function(a,l){var g=function(e,t){return r.scale.linear().domain(A(e)).range([t,1-t])}(a,h),m=p[a.label];p[a.label]=(m||0)+1;var _=a.label+(m?"__"+m:""),x=a.constraintrange,w=x&&x.length;w&&!Array.isArray(x[0])&&(x=[x]);var k=w?x.map((function(e){return e.map(g)})):[[-1/0,1/0]],E=a.values;E.length>a._length&&(E=E.slice(0,a._length));var M,O=a.tickvals;function L(e,t){return{val:e,text:M[t]}}function D(e,t){return e.val-t.val}if(Array.isArray(O)&&O.length){M=a.ticktext,Array.isArray(M)&&M.length?M.length>O.length?M=M.slice(0,O.length):O.length>M.length&&(O=O.slice(0,M.length)):M=O.map(o(a.tickformat));for(var I=1;I<O.length;I++)if(O[I]<O[I-1]){for(var R=O.map(L).sort(D),P=0;P<O.length;P++)O[P]=R[P].val,M[P]=R[P].text;break}}else O=void 0;return E=v.convertTypedArray(E),{key:_,label:a.label,tickFormat:a.tickformat,tickvals:O,ticktext:M,ordinal:v.isOrdinal(a),multiselect:a.multiselect,xIndex:l,crossfilterDimensionIndex:l,visibleIndex:a._index,height:s,values:E,paddedUnitValues:E.map(g),unitTickvals:O&&O.map(g),xScale:u,x:u(l),canvasX:u(l)*c,unitToPaddedPx:d,domainScale:T(s,y.verticalPadding,a,O,M),ordinalScale:S(a),parent:f,model:n,brush:b.makeBrush(e,w,k,(function(){e.linePickActive(!1)}),(function(){var t=f;t.focusLayer&&t.focusLayer.render(t.panels,!0);var n=C(t);!e.contextShown()&&n?(t.contextLayer&&t.contextLayer.render(t.panels,!0),e.contextShown(!0)):e.contextShown()&&!n&&(t.contextLayer&&t.contextLayer.render(t.panels,!0,!0),e.contextShown(!1))}),(function(n){if(f.focusLayer.render(f.panels,!0),f.pickLayer&&f.pickLayer.render(f.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var r=g.invert,o=n.map((function(e){return e.map(r).sort(i.sorterAsc)})).sort((function(e,t){return e[0]-t[0]}));t.filterChanged(f.key,a._index,o)}}))}})),f}function L(e){e.classed(y.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function D(e,t){var n="top"===t?1:-1,r=e*Math.PI/180;return{dir:n,dx:Math.sin(r),dy:Math.cos(r),degrees:e}}function I(e,t,n){for(var r=t.panels||(t.panels=[]),i=e.data(),o=0;o<i.length-1;o++){var a=r[o]||(r[o]={}),s=i[o],l=i[o+1];a.dim0=s,a.dim1=l,a.canvasX=s.canvasX,a.panelSizeX=l.canvasX-s.canvasX,a.panelSizeY=t.model.canvasHeight,a.y=0,a.canvasY=0,a.plotGlPixelRatio=n}}function R(e,t){return s.tickText(e._ax,t,!1).text}function P(e,t){if(e.ordinal)return"";var n=e.domainScale.domain(),r=n[t?n.length-1:0];return R(e.model.dimensions[e.visibleIndex],r)}t.exports=function(e,t,n,o){var a=e._fullLayout,d=a._toppaper,f=a._glcontainer,x=e._context.plotGlPixelRatio,A=e._fullLayout.paper_bgcolor;!function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].length;n++)for(var r=e[t][n].trace,i=r.dimensions,o=0;o<i.length;o++){var a=i[o].values,l=i[o]._ax;l&&(l.range?l.range=k(l.range[0],l.range[1]):l.range=w(a,r._length),l.dtick||(l.dtick=.01*(Math.abs(l.range[1]-l.range[0])||1)),l.tickformat=i[o].tickformat,s.calcTicks(l),l.cleanRange())}}(t);var T,S,E=(T=!0,S=!1,{linePickActive:function(e){return arguments.length?T=!!e:T},contextShown:function(e){return arguments.length?S=!!e:S}}),N=t.filter((function(e){return m(e).trace.visible})).map(M.bind(0,n)).map(O.bind(0,E,o));f.each((function(e,t){return i.extendFlat(e,N[t])}));var z=f.selectAll(".gl-canvas").each((function(e){e.viewModel=N[0],e.viewModel.plotGlPixelRatio=x,e.viewModel.paperColor=A,e.model=e.viewModel?e.viewModel.model:null})),F=null;z.filter((function(e){return e.pick})).style("pointer-events","auto").on("mousemove",(function(e){if(E.linePickActive()&&e.lineLayer&&o&&o.hover){var t=r.event,n=this.width,i=this.height,a=r.mouse(this),s=a[0],l=a[1];if(s<0||l<0||s>=n||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,d={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==F&&(u?o.hover(d):o.unhover&&o.unhover(d),F=h)}})),z.style("opacity",(function(e){return e.pick?0:1})),d.style("background","rgba(255, 255, 255, 0)");var B=d.selectAll("."+y.cn.parcoords).data(N,p);B.exit().remove(),B.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),B.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var j=B.selectAll("."+y.cn.parcoordsControlView).data(g,p);j.enter().append("g").classed(y.cn.parcoordsControlView,!0),j.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var U=j.selectAll("."+y.cn.yAxis).data((function(e){return e.dimensions}),p);U.enter().append("g").classed(y.cn.yAxis,!0),j.each((function(e){I(U,e,x)})),z.each((function(e){if(e.viewModel){!e.lineLayer||o?e.lineLayer=_(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||o;e.lineLayer.render(e.viewModel.panels,t)}})),U.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),U.call(r.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;E.linePickActive(!1),e.x=Math.max(-y.overdrag,Math.min(e.model.width+y.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,U.sort((function(e,t){return e.x-t.x})).each((function(t,n){t.xIndex=n,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),I(U,t,x),U.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),r.select(this).attr("transform",c(e.x,0)),U.each((function(n,r,i){i===e.parent.key&&(t.dimensions[r]=n)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!C(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,I(U,t,x),r.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!C(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),E.linePickActive(!0),o&&o.axesMoved&&o.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),U.exit().remove();var V=U.selectAll("."+y.cn.axisOverlays).data(g,p);V.enter().append("g").classed(y.cn.axisOverlays,!0),V.selectAll("."+y.cn.axis).remove();var q=V.selectAll("."+y.cn.axis).data(g,p);q.enter().append("g").classed(y.cn.axis,!0),q.each((function(e){var t=e.model.height/e.model.tickDistance,n=e.domainScale,i=n.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return v.isOrdinal(e)?t:R(e.model.dimensions[e.visibleIndex],t)})).scale(n)),h.font(q.selectAll("text"),e.model.tickFont)})),q.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),q.selectAll("text").style("text-shadow",u.makeTextShadow(A)).style("cursor","default");var H=V.selectAll("."+y.cn.axisHeading).data(g,p);H.enter().append("g").classed(y.cn.axisHeading,!0);var $=H.selectAll("."+y.cn.axisTitle).data(g,p);$.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),$.text((function(e){return e.label})).each((function(t){var n=r.select(this);h.font(n,t.model.labelFont),u.convertToTspans(n,e)})).attr("transform",(function(e){var t=D(e.model.labelAngle,e.model.labelSide),n=y.axisTitleOffset;return(t.dir>0?"":c(0,2*n+e.model.height))+l(t.degrees)+c(-n*t.dx,-n*t.dy)})).attr("text-anchor",(function(e){var t=D(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var W=V.selectAll("."+y.cn.axisExtent).data(g,p);W.enter().append("g").classed(y.cn.axisExtent,!0);var G=W.selectAll("."+y.cn.axisExtentTop).data(g,p);G.enter().append("g").classed(y.cn.axisExtentTop,!0),G.attr("transform",c(0,-y.axisExtentOffset));var Y=G.selectAll("."+y.cn.axisExtentTopText).data(g,p);Y.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(L),Y.text((function(e){return P(e,!0)})).each((function(e){h.font(r.select(this),e.model.rangeFont)}));var X=W.selectAll("."+y.cn.axisExtentBottom).data(g,p);X.enter().append("g").classed(y.cn.axisExtentBottom,!0),X.attr("transform",(function(e){return c(0,e.model.height+y.axisExtentOffset)}));var Z=X.selectAll("."+y.cn.axisExtentBottomText).data(g,p);Z.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),Z.text((function(e){return P(e,!1)})).each((function(e){h.font(r.select(this),e.model.rangeFont)})),b.ensureAxisBrush(V,A)}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"./axisbrush":889,"./constants":892,"./helpers":894,"./lines":896,"@plotly/d3":58,"color-rgba":91}],899:[function(e,t,n){"use strict";var r=e("./parcoords"),i=e("../../lib/prepare_regl"),o=e("./helpers").isVisible;function a(e,t,n){var r=t.indexOf(n),i=e.indexOf(r);return-1===i&&(i+=t.length),i}t.exports=function(e,t){var n=e._fullLayout;if(i(e)){var s={},l={},c={},u={},h=n._size;t.forEach((function(t,n){var r=t[0].trace;c[n]=r.index;var i=u[n]=r._fullInput.index;s[n]=e.data[i].dimensions,l[n]=e.data[i].dimensions.slice()}));r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,i){var o=l[t][r],a=i.map((function(e){return e.slice()})),s="dimensions["+r+"].constraintrange",h=n._tracePreGUI[e._fullData[c[t]]._fullInput.uid];if(void 0===h[s]){var d=o.constraintrange;h[s]=d||null}var f=e._fullData[c[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),o.constraintrange=a,f.constraintrange=a.slice(),a=[a]):(delete o.constraintrange,delete f.constraintrange,a=null);var p={};p[s]=a,e.emit("plotly_restyle",[p,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,n){var r=function(e,t){return function(n,r){return a(e,t,n)-a(e,t,r)}}(n,l[t].filter(o));s[t].sort(r),l[t].filter((function(e){return!o(e)})).sort((function(e){return l[t].indexOf(e)})).forEach((function(e){s[t].splice(s[t].indexOf(e),1),s[t].splice(l[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[s[t]]},[u[t]]])}})}}},{"../../lib/prepare_regl":516,"./helpers":894,"./parcoords":898}],900:[function(e,t,n){"use strict";var r=e("../../plots/attributes"),i=e("../../plots/domain").attributes,o=e("../../plots/font_attributes"),a=e("../../components/color/attributes"),s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/template_attributes").texttemplateAttrs,c=e("../../lib/extend").extendFlat,u=o({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],901:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="pie",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],902:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../components/color"),a={};function s(e){return function(t,n){return!!t&&!!(t=i(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),e[n]||(e[n]=t),t)}}function l(e,t){var n,r=JSON.stringify(e),o=t[r];if(!o){for(o=e.slice(),n=0;n<e.length;n++)o.push(i(e[n]).lighten(20).toHexString());for(n=0;n<e.length;n++)o.push(i(e[n]).darken(20).toHexString());t[r]=o}return o}t.exports={calc:function(e,t){var n,i,o=[],a=e._fullLayout,l=a.hiddenlabels||[],c=t.labels,u=t.marker.colors||[],h=t.values,d=t._length,f=t._hasValues&&d;if(t.dlabel)for(c=new Array(d),n=0;n<d;n++)c[n]=String(t.label0+n*t.dlabel);var p={},g=s(a["_"+t.type+"colormap"]),m=0,v=!1;for(n=0;n<d;n++){var y,b,_;if(f){if(y=h[n],!r(y))continue;y=+y}else y=1;void 0!==(b=c[n])&&""!==b||(b=n);var x=p[b=String(b)];void 0===x?(p[b]=o.length,(_=-1!==l.indexOf(b))||(m+=y),o.push({v:y,label:b,color:g(u[n],b),i:n,pts:[n],hidden:_})):(v=!0,(i=o[x]).v+=y,i.pts.push(n),i.hidden||(m+=y),!1===i.color&&u[n]&&(i.color=g(u[n],b)))}return o=o.filter((function(e){return e.v>=0})),("funnelarea"===t.type?v:t.sort)&&o.sort((function(e,t){return t.v-e.v})),o[0]&&(o[0].vTotal=m),o},crossTraceCalc:function(e,t){var n=(t||{}).type;n||(n="pie");var r=e._fullLayout,i=e.calcdata,o=r[n+"colorway"],s=r["_"+n+"colormap"];r["extend"+n+"colors"]&&(o=l(o,a));for(var c=0,u=0;u<i.length;u++){var h=i[u];if(h[0].trace.type===n)for(var d=0;d<h.length;d++){var f=h[d];!1===f.color&&(s[f.label]?f.color=s[f.label]:(s[f.label]=f.color=o[c%o.length],c++))}}},makePullColorFn:s,generateExtendedColors:l}},{"../../components/color":366,"fast-isnumeric":190,tinycolor2:312}],903:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("./attributes"),a=e("../../plots/domain").defaults,s=e("../bar/defaults").handleText;function l(e,t){var n=Array.isArray(e),o=i.isArrayOrTypedArray(t),a=Math.min(n?e.length:1/0,o?t.length:1/0);if(isFinite(a)||(a=0),a&&o){for(var s,l=0;l<a;l++){var c=t[l];if(r(c)&&c>0){s=!0;break}}s||(a=0)}return{hasLabels:n,hasValues:o,len:a}}t.exports={handleLabelsAndValues:l,supplyDefaults:function(e,t,n,r){function c(n,r){return i.coerce(e,t,o,n,r)}var u=l(c("labels"),c("values")),h=u.len;if(t._hasLabels=u.hasLabels,t._hasValues=u.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),h){t._length=h,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var d,f=c("text"),p=c("texttemplate");if(p||(d=c("textinfo",Array.isArray(f)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),p||d&&"none"!==d){var g=c("textposition");s(e,t,r,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&c("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&c("insidetextorientation")}a(t,r,c);var m=c("hole");if(c("title.text")){var v=c("title.position",m?"middle center":"top center");m||"middle center"!==v||(t.title.position="top center"),i.coerceFont(c,"title.font",r.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else t.visible=!1}}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":900,"fast-isnumeric":190}],904:[function(e,t,n){"use strict";var r=e("../../components/fx/helpers").appendArrayMultiPointValues;t.exports=function(e,t){var n={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(n.pointNumber=n.i=e.pts[0]),r(n,t,e.pts),"funnelarea"===t.type&&(delete n.v,delete n.i),n}},{"../../components/fx/helpers":402}],905:[function(e,t,n){"use strict";var r=e("../../lib");function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}n.formatPiePercent=function(e,t){var n=i((100*e).toPrecision(3));return r.numSeparate(n,t)+"%"},n.formatPieValue=function(e,t){var n=i(e.toPrecision(10));return r.numSeparate(n,t)},n.getFirstFilled=function(e,t){if(Array.isArray(e))for(var n=0;n<t.length;n++){var r=e[t[n]];if(r||0===r||""===r)return r}},n.castOption=function(e,t){return Array.isArray(e)?n.getFirstFilled(e,t):e||void 0},n.getRotationAngle=function(e){return("auto"===e?0:e)*Math.PI/180}},{"../../lib":503}],906:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,supplyLayoutDefaults:e("./layout_defaults"),layoutAttributes:e("./layout_attributes"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style"),styleOne:e("./style_one"),moduleType:"trace",name:"pie",basePlotModule:e("./base_plot"),categories:["pie-like","pie","showLegend"],meta:{}}},{"./attributes":900,"./base_plot":901,"./calc":902,"./defaults":903,"./layout_attributes":907,"./layout_defaults":908,"./plot":909,"./style":910,"./style_one":911}],907:[function(e,t,n){"use strict";t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],908:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("hiddenlabels"),n("piecolorway",t.colorway),n("extendpiecolors")}},{"../../lib":503,"./layout_attributes":907}],909:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../plots/plots"),o=e("../../components/fx"),a=e("../../components/color"),s=e("../../components/drawing"),l=e("../../lib"),c=l.strScale,u=l.strTranslate,h=e("../../lib/svg_text_utils"),d=e("../bar/uniform_text"),f=d.recordMinTextSize,p=d.clearMinTextSize,g=e("../bar/constants").TEXTPAD,m=e("./helpers"),v=e("./event_data"),y=e("../../lib").isValidTextValue;function b(e,t,n){var i=n[0],a=i.cx,s=i.cy,c=i.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",(function(e){var n=t._fullLayout,h=t._fullData[c.index];if(!t._dragging&&!1!==n.hovermode){var d=h.hoverinfo;if(Array.isArray(d)&&(d=o.castHoverinfo({hoverinfo:[m.castOption(d,e.pts)],_module:c._module},n,0)),"all"===d&&(d="label+text+value+percent+name"),h.hovertemplate||"none"!==d&&"skip"!==d&&d){var f=e.rInscribed||0,p=a+e.pxmid[0]*(1-f),g=s+e.pxmid[1]*(1-f),y=n.separators,b=[];if(d&&-1!==d.indexOf("label")&&b.push(e.label),e.text=m.castOption(h.hovertext||h.text,e.pts),d&&-1!==d.indexOf("text")){var _=e.text;l.isValidTextValue(_)&&b.push(_)}e.value=e.v,e.valueLabel=m.formatPieValue(e.v,y),d&&-1!==d.indexOf("value")&&b.push(e.valueLabel),e.percent=e.v/i.vTotal,e.percentLabel=m.formatPiePercent(e.percent,y),d&&-1!==d.indexOf("percent")&&b.push(e.percentLabel);var x=h.hoverlabel,w=x.font,A=[];o.loneHover({trace:c,x0:p-f*i.r,x1:p+f*i.r,y:g,_x0:u?a+e.TL[0]:p-f*i.r,_x1:u?a+e.TR[0]:p+f*i.r,_y0:u?s+e.TL[1]:g-f*i.r,_y1:u?s+e.BL[1]:g+f*i.r,text:b.join("<br>"),name:h.hovertemplate||-1!==d.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(x.bgcolor,e.pts)||e.color,borderColor:m.castOption(x.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(x.namelength,e.pts),textAlign:m.castOption(x.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,h)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:A}),e.bbox=A[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,h)],event:r.event})}})),e.on("mouseout",(function(e){var n=t._fullLayout,i=t._fullData[c.index],a=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[v(a,i)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(o.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var n=t._fullLayout,i=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[v(e,i)],o.click(t,r.event))}))}function _(e,t,n){var r=m.castOption(e.insidetextfont.color,t.pts);!r&&e._input.textfont&&(r=m.castOption(e._input.textfont.color,t.pts));var i=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||n.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||n.size;return{color:r||a.contrast(t.color),family:i,size:o}}function x(e,t){for(var n,r,i=0;i<e.length;i++)if((r=(n=e[i][0]).trace).title.text){var o=r.title.text;r._meta&&(o=l.templateString(o,r._meta));var a=s.tester.append("text").attr("data-notex",1).text(o).call(s.font,r.title.font).call(h.convertToTspans,t),c=s.bBox(a.node(),!0);n.titleBox={width:c.width,height:c.height},a.remove()}}function w(e,t,n){var r=n.r||t.rpx1,i=t.rInscribed;if(t.startangle===t.stopangle)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o,a=t.ring,s=1===a&&Math.abs(t.startangle-t.stopangle)===2*Math.PI,l=t.halfangle,c=t.midangle,u=n.trace.insidetextorientation,h="horizontal"===u,d="tangential"===u,f="radial"===u,p="auto"===u,g=[];if(!p){var m,v=function(n,i){if(function(e,t){var n=e.startangle,r=e.stopangle;return n>t&&t>r||n<t&&t<r}(t,n)){var s=Math.abs(n-t.startangle),l=Math.abs(n-t.stopangle),c=s<l?s:l;(o="tan"===i?k(e,r,a,c,0):A(e,r,a,c,Math.PI/2)).textPosAngle=n,g.push(o)}};if(h||d){for(m=4;m>=-4;m-=2)v(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),"tan")}if(h||f){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),"rad")}}if(s||p||h){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((o={scale:i*r*2/y,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,o.scale>=1)return o;g.push(o)}(p||f)&&((o=A(e,r,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,g.push(o)),(p||d)&&((o=k(e,r,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,g.push(o));for(var b=0,_=0,x=0;x<g.length;x++){var w=g[x].scale;if(_<w&&(_=w,b=x),!p&&_>=1)break}return g[b]}function A(e,t,n,r,i){t=Math.max(0,t-2*g);var o=e.width/e.height,a=E(o,r,t,n);return{scale:2*a/e.height,rCenter:T(o,a/t),rotate:S(i)}}function k(e,t,n,r,i){t=Math.max(0,t-2*g);var o=e.height/e.width,a=E(o,r,t,n);return{scale:2*a/e.width,rCenter:T(o,a/t),rotate:S(i+Math.PI/2)}}function T(e,t){return Math.cos(t)-e*t}function S(e){return(180/Math.PI*e+720)%180-90}function E(e,t,n,r){var i=e+1/(2*Math.tan(t));return n*Math.min(1/(Math.sqrt(i*i+.5)+i),r/(Math.sqrt(e*e+r/2)+e))}function C(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function M(e,t){var n=t.pxmid[0],r=t.pxmid[1],i=e.width/2,o=e.height/2;return n<0&&(i*=-1),r<0&&(o*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(o)*(i>0?1:-1)/2,y:o/(1+n*n/(r*r)),outside:!0}}function O(e,t){var n,r,i,o=e.trace,a={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=o.title.font.size,n=D(o),-1!==o.title.position.indexOf("top")?(a.y-=(1+n)*e.r,s.ty-=e.titleBox.height):-1!==o.title.position.indexOf("bottom")&&(a.y+=(1+n)*e.r);var l,c,u=(l=e.r,c=e.trace.aspectratio,l/(void 0===c?1:c)),h=t.w*(o.domain.x[1]-o.domain.x[0])/2;return-1!==o.title.position.indexOf("left")?(h+=u,a.x-=(1+n)*u,s.tx+=e.titleBox.width/2):-1!==o.title.position.indexOf("center")?h*=2:-1!==o.title.position.indexOf("right")&&(h+=u,a.x+=(1+n)*u,s.tx-=e.titleBox.width/2),r=h/e.titleBox.width,i=L(e,t)/e.titleBox.height,{x:a.x,y:a.y,scale:Math.min(r,i),tx:s.tx,ty:s.ty}}function L(e,t){var n=e.trace,r=t.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(e.titleBox.height,r/2)}function D(e){var t,n=e.pull;if(!n)return 0;if(Array.isArray(n))for(n=0,t=0;t<e.pull.length;t++)e.pull[t]>n&&(n=e.pull[t]);return n}function I(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r][0],o=i.trace,a=o.domain,s=t.w*(a.x[1]-a.x[0]),l=t.h*(a.y[1]-a.y[0]);o.title.text&&"middle center"!==o.title.position&&(l-=L(i,t));var c=s/2,u=l/2;"funnelarea"!==o.type||o.scalegroup||(u/=o.aspectratio),i.r=Math.min(c,u)/(1+D(o)),i.cx=t.l+t.w*(o.domain.x[1]+o.domain.x[0])/2,i.cy=t.t+t.h*(1-o.domain.y[0])-l/2,o.title.text&&-1!==o.title.position.indexOf("bottom")&&(i.cy-=L(i,t)),o.scalegroup&&-1===n.indexOf(o.scalegroup)&&n.push(o.scalegroup)}!function(e,t){for(var n,r,i,o=0;o<t.length;o++){var a=1/0,s=t[o];for(r=0;r<e.length;r++)if((i=(n=e[r][0]).trace).scalegroup===s){var l;if("pie"===i.type)l=n.r*n.r;else if("funnelarea"===i.type){var c,u;i.aspectratio>1?u=(c=n.r)/i.aspectratio:c=(u=n.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}a=Math.min(a,l/n.vTotal)}for(r=0;r<e.length;r++)if((i=(n=e[r][0]).trace).scalegroup===s){var h=a*n.vTotal;"funnelarea"===i.type&&(h/=(1+i.baseratio)/2,h/=i.aspectratio),n.r=Math.sqrt(h)}}}(e,n)}function R(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function P(e,t,n){var r=e._fullLayout,i=n.trace,o=i.texttemplate,a=i.textinfo;if(!o&&a&&"none"!==a){var s,c=a.split("+"),u=function(e){return-1!==c.indexOf(e)},h=u("label"),d=u("text"),f=u("value"),p=u("percent"),g=r.separators;if(s=h?[t.label]:[],d){var v=m.getFirstFilled(i.text,t.pts);y(v)&&s.push(v)}f&&s.push(m.formatPieValue(t.v,g)),p&&s.push(m.formatPiePercent(t.v/n.vTotal,g)),t.text=s.join("<br>")}if(o){var b=l.castOption(i,t.i,"texttemplate");if(b){var _=function(e){return{label:e.label,value:e.v,valueLabel:m.formatPieValue(e.v,r.separators),percent:e.v/n.vTotal,percentLabel:m.formatPiePercent(e.v/n.vTotal,r.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")}}(t),x=m.getFirstFilled(i.text,t.pts);(y(x)||""===x)&&(_.text=x),t.text=l.texttemplateString(b,_,e._fullLayout._d3locale,_,i._meta||{})}else t.text=""}}function N(e,t){var n=e.rotate*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=(t.left+t.right)/2,a=(t.top+t.bottom)/2;e.textX=o*r-a*i,e.textY=o*i+a*r,e.noCenter=!0}t.exports={plot:function(e,t){var n=e._fullLayout,o=n._size;p("pie",n),x(t,e),I(t,o);var d=l.makeTraceGroups(n._pielayer,t,"trace").each((function(t){var d=r.select(this),p=t[0],g=p.trace;(function(e){var t,n,r,i=e[0],o=i.r,a=i.trace,s=m.getRotationAngle(a.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===a.direction){for(t=0;t<e.length&&e[t].hidden;t++);if(t===e.length)return;s+=l*e[t].v,l*=-1,c="px1",u="px0"}for(r=R(o,s),t=0;t<e.length;t++)(n=e[t]).hidden||(n[c]=r,n.startangle=s,s+=l*n.v/2,n.pxmid=R(o,s),n.midangle=s,r=R(o,s+=l*n.v/2),n.stopangle=s,n[u]=r,n.largeArc=n.v>i.vTotal/2?1:0,n.halfangle=Math.PI*Math.min(n.v/i.vTotal,.5),n.ring=1-a.hole,n.rInscribed=C(n,i))})(t),d.attr("stroke-linejoin","round"),d.each((function(){var v=r.select(this).selectAll("g.slice").data(t);v.enter().append("g").classed("slice",!0),v.exit().remove();var y=[[[],[]],[[],[]]],x=!1;v.each((function(i,o){if(i.hidden)r.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var a=p.cx,c=p.cy,u=r.select(this),d=u.selectAll("path.surface").data([i]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),u.call(b,e,t),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(a+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=a,i.cyFinal=c;var A=g.hole;if(i.v===p.vTotal){var k="M"+(a+i.px0[0])+","+(c+i.px0[1])+O(i.px0,i.pxmid,!0,1)+O(i.pxmid,i.px0,!0,1)+"Z";A?d.attr("d","M"+(a+A*i.px0[0])+","+(c+A*i.px0[1])+O(i.px0,i.pxmid,!1,A)+O(i.pxmid,i.px0,!1,A)+"Z"+k):d.attr("d",k)}else{var T=O(i.px0,i.px1,!0,1);if(A){var S=1-A;d.attr("d","M"+(a+A*i.px1[0])+","+(c+A*i.px1[1])+O(i.px1,i.px0,!1,A)+"l"+S*i.px0[0]+","+S*i.px0[1]+T+"Z")}else d.attr("d","M"+a+","+c+"l"+i.px0[0]+","+i.px0[1]+T+"Z")}P(e,i,p);var E=m.castOption(g.textposition,i.pts),C=u.selectAll("g.slicetext").data(i.text&&"none"!==E?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var u=l.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),d=l.ensureUniformFontSize(e,"outside"===E?function(e,t,n){return{color:m.castOption(e.outsidetextfont.color,t.pts)||m.castOption(e.textfont.color,t.pts)||n.color,family:m.castOption(e.outsidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||n.family,size:m.castOption(e.outsidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||n.size}}(g,i,n.font):_(g,i,n.font));u.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,d).call(h.convertToTspans,e);var v,y=s.bBox(u.node());if("outside"===E)v=M(y,i);else if(v=w(y,i,p),"auto"===E&&v.scale<1){var b=l.ensureUniformFontSize(e,g.outsidetextfont);u.call(s.font,b),v=M(y=s.bBox(u.node()),i)}var A=v.textPosAngle,k=void 0===A?i.pxmid:R(p.r,A);if(v.targetX=a+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),N(v,y),v.outside){var T=v.targetY;i.yLabelMin=T-y.height/2,i.yLabelMid=T,i.yLabelMax=T+y.height/2,i.labelExtraX=0,i.labelExtraY=0,x=!0}v.fontSize=d.size,f(g.type,v,n),t[o].transform=v,u.attr("transform",l.getTextTransform(v))}))}function O(e,t,n,r){var o=r*(t[0]-e[0]),a=r*(t[1]-e[1]);return"a"+r*p.r+","+r*p.r+" 0 "+i.largeArc+(n?" 1 ":" 0 ")+o+","+a}}));var A=r.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(A.enter().append("g").classed("titletext",!0),A.exit().remove(),A.each((function(){var t,n=l.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),n.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,g.title.font).call(h.convertToTspans,e),t="middle center"===g.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(p):O(p,o),n.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),x&&function(e,t){var n,r,i,o,a,s,l,c,u,h,d,f,p;function g(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,n){n||(n={});var i,c,u,d,f=n.labelExtraY+(r?n.yLabelMax:n.yLabelMin),p=r?e.yLabelMin:e.yLabelMax,g=r?e.yLabelMax:e.yLabelMin,v=e.cyFinal+a(e.px0[1],e.px1[1]),y=f-p;if(y*l>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c<h.length;c++)(u=h[c])===e||(m.castOption(t.pull,e.pts)||0)>=(m.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+a(u.px0[1],u.px1[1])-p-e.labelExtraY)*l>0&&(e.labelExtraY+=y):(g+e.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-h.indexOf(e)),(d=u.cxFinal+o(u.px0[0],u.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=d)))}for(r=0;r<2;r++)for(i=r?g:v,a=r?Math.max:Math.min,l=r?1:-1,n=0;n<2;n++){for(o=n?Math.max:Math.min,s=n?1:-1,(c=e[r][n]).sort(i),u=e[1-r][n],h=u.concat(c),f=[],d=0;d<c.length;d++)void 0!==c[d].yLabelMid&&f.push(c[d]);for(p=!1,d=0;r&&d<u.length;d++)if(void 0!==u[d].yLabelMid){p=u[d];break}for(d=0;d<f.length;d++){var b=d&&f[d-1];p&&!d&&(b=p),y(f[d],b)}}}(y,g),function(e,t){e.each((function(e){var n=r.select(this);if(e.labelExtraX||e.labelExtraY){var i=n.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,i.attr("transform",l.getTextTransform(e.transform));var o=e.cxFinal+e.pxmid[0],s="M"+o+","+(e.cyFinal+e.pxmid[1]),c=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var u=e.labelExtraX*e.pxmid[1]/e.pxmid[0],h=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(u)>Math.abs(h)?s+="l"+h*e.pxmid[0]/e.pxmid[1]+","+h+"H"+(o+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(h-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(n,"path","textline").call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else n.select("path.textline").remove()}))}(v,g),x&&g.automargin){var k=s.bBox(d.node()),T=g.domain,S=o.w*(T.x[1]-T.x[0]),E=o.h*(T.y[1]-T.y[0]),C=(.5*S-p.r)/o.w,L=(.5*E-p.r)/o.h;i.autoMargin(e,"pie."+g.uid+".automargin",{xl:T.x[0]-C,xr:T.x[1]+C,yb:T.y[0]-L,yt:T.y[1]+L,l:Math.max(p.cx-p.r-k.left,0),r:Math.max(k.right-(p.cx+p.r),0),b:Math.max(k.bottom-(p.cy+p.r),0),t:Math.max(p.cy-p.r-k.top,0),pad:5})}}))}));setTimeout((function(){d.selectAll("tspan").each((function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:P,transformInsideText:w,determineInsideTextFont:_,positionTitleOutside:O,prerenderTitles:x,layoutAreas:I,attachFxHandlers:b,computeTransform:N}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../bar/constants":650,"../bar/uniform_text":664,"./event_data":904,"./helpers":905,"@plotly/d3":58}],910:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("./style_one"),o=e("../bar/uniform_text").resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");o(e,t,"pie"),t.each((function(e){var t=e[0].trace,n=r.select(this);n.style({opacity:t.opacity}),n.selectAll("path.surface").each((function(e){r.select(this).call(i,e,t)}))}))}},{"../bar/uniform_text":664,"./style_one":911,"@plotly/d3":58}],911:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("./helpers").castOption;t.exports=function(e,t,n){var o=n.marker.line,a=i(o.color,t.pts)||r.defaultLine,s=i(o.width,t.pts)||0;e.style("stroke-width",s).call(r.fill,t.color).call(r.stroke,a)}},{"../../components/color":366,"./helpers":905}],912:[function(e,t,n){"use strict";var r=e("../scatter/attributes");t.exports={x:r.x,y:r.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:r.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":926}],913:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_pointcloud2d,i=e("../../lib/str2rgbarray"),o=e("../../plots/cartesian/autorange").findExtremes,a=e("../scatter/get_trace_color");function s(e,t){this.scene=e,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=r(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=a(e,{})},l.updateFast=function(e){var t,n,r,a,s,l,c=this.xData=this.pickXData=e.x,u=this.yData=this.pickYData=e.y,h=this.pickXYData=e.xy,d=e.xbounds&&e.ybounds,f=e.indices,p=this.bounds;if(h){if(r=h,t=h.length>>>1,d)p[0]=e.xbounds[0],p[2]=e.xbounds[1],p[1]=e.ybounds[0],p[3]=e.ybounds[1];else for(l=0;l<t;l++)a=r[2*l],s=r[2*l+1],a<p[0]&&(p[0]=a),a>p[2]&&(p[2]=a),s<p[1]&&(p[1]=s),s>p[3]&&(p[3]=s);if(f)n=f;else for(n=new Int32Array(t),l=0;l<t;l++)n[l]=l}else for(t=c.length,r=new Float32Array(2*t),n=new Int32Array(t),l=0;l<t;l++)a=c[l],s=u[l],n[l]=l,r[2*l]=a,r[2*l+1]=s,a<p[0]&&(p[0]=a),a>p[2]&&(p[2]=a),s<p[1]&&(p[1]=s),s>p[3]&&(p[3]=s);this.idToIndex=n,this.pointcloudOptions.idToIndex=n,this.pointcloudOptions.positions=r;var g=i(e.marker.color),m=i(e.marker.border.color),v=e.opacity*e.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=e.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;var b=e.marker.sizemin,_=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=b,this.pointcloudOptions.sizeMax=_,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,w=this.scene.yaxis,A=_/2||.5;e._extremes[x._id]=o(x,[p[0],p[2]],{ppad:A}),e._extremes[w._id]=o(w,[p[1],p[3]],{ppad:A})},l.dispose=function(){this.pointcloud.dispose()},t.exports=function(e,t){var n=new s(e,t.uid);return n.update(t),n}},{"../../../stackgl_modules":1120,"../../lib/str2rgbarray":528,"../../plots/cartesian/autorange":553,"../scatter/get_trace_color":936}],914:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes");t.exports=function(e,t,n){function o(n,o){return r.coerce(e,t,i,n,o)}o("x"),o("y"),o("xbounds"),o("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),o("text"),o("marker.color",n),o("marker.opacity"),o("marker.blend"),o("marker.sizemin"),o("marker.sizemax"),o("marker.border.color",n),o("marker.border.arearatio"),t._length=null}},{"../../lib":503,"./attributes":912}],915:[function(e,t,n){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../scatter3d/calc"),plot:e("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":596,"../scatter3d/calc":955,"./attributes":912,"./convert":913,"./defaults":914}],916:[function(e,t,n){"use strict";var r=e("../../plots/font_attributes"),i=e("../../plots/attributes"),o=e("../../components/color/attributes"),a=e("../../components/fx/attributes"),s=e("../../plots/domain").attributes,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../components/colorscale/attributes"),u=e("../../plot_api/plot_template").templatedArray,h=e("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,d=e("../../lib/extend").extendFlat,f=e("../../plot_api/edit_types").overrideAll;(t.exports=f({hoverinfo:d({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:a.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:h("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:r({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:a.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:a.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:d(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../components/fx/attributes":397,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],917:[function(e,t,n){"use strict";var r=e("../../plot_api/edit_types").overrideAll,i=e("../../plots/get_data").getModuleCalcData,o=e("./plot"),a=e("../../components/fx/layout_attributes"),s=e("../../lib/setcursor"),l=e("../../components/dragelement"),c=e("../../plots/cartesian/select").prepSelect,u=e("../../lib"),h=e("../../registry"),d="sankey";function f(e,t){var n=e._fullData[t],r=e._fullLayout,i=r.dragmode,o="pan"===r.dragmode?"move":"crosshair",a=n._bgRect;if("pan"!==i&&"zoom"!==i){s(a,o);var d={_id:"x",c2p:u.identity,_offset:n._sankey.translateX,_length:n._sankey.width},f={_id:"y",c2p:u.identity,_offset:n._sankey.translateY,_length:n._sankey.height},p={gd:e,element:a.node(),plotinfo:{id:t,xaxis:d,yaxis:f,fillRangeItems:u.noop},subplot:t,xaxes:[d],yaxes:[f],doneFnCompleted:function(n){var r,i=e._fullData[t],o=i.node.groups.slice(),a=[];function s(e){for(var t=i._sankey.graph.nodes,n=0;n<t.length;n++)if(t[n].pointNumber===e)return t[n]}for(var l=0;l<n.length;l++){var c=s(n[l].pointNumber);if(c)if(c.group){for(var u=0;u<c.childrenNodes.length;u++)a.push(c.childrenNodes[u].pointNumber);o[c.pointNumber-i.node._count]=!1}else a.push(c.pointNumber)}r=o.filter(Boolean).concat([a]),h.call("_guiRestyle",e,{"node.groups":[r]},t)},prepFn:function(e,t,n){c(e,t,n,p,i)}};l.init(p)}}n.name=d,n.baseLayoutAttrOverrides=r({hoverlabel:a.hoverlabel},"plot","nested"),n.plot=function(e){var t=i(e.calcdata,d)[0];o(e,t),n.updateFx(e)},n.clean=function(e,t,n,r){var i=r._has&&r._has(d),o=t._has&&t._has(d);i&&!o&&(r._paperdiv.selectAll(".sankey").remove(),r._paperdiv.selectAll(".bgsankey").remove())},n.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)f(e,t)}},{"../../components/dragelement":385,"../../components/fx/layout_attributes":407,"../../lib":503,"../../lib/setcursor":524,"../../plot_api/edit_types":536,"../../plots/cartesian/select":575,"../../plots/get_data":593,"../../registry":638,"./plot":922}],918:[function(e,t,n){"use strict";var r=e("strongly-connected-components"),i=e("../../lib"),o=e("../../lib/gup").wrap,a=i.isArrayOrTypedArray,s=i.isIndex,l=e("../../components/colorscale");function c(e){var t,n=e.node,o=e.link,c=[],u=a(o.color),h=a(o.customdata),d={},f={},p=o.colorscales.length;for(t=0;t<p;t++){var g=o.colorscales[t],m=l.extractScale(g,{cLetter:"c"}),v=l.makeColorScaleFunc(m);f[g.label]=v}var y=0;for(t=0;t<o.value.length;t++)o.source[t]>y&&(y=o.source[t]),o.target[t]>y&&(y=o.target[t]);var b,_=y+1;e.node._count=_;var x=e.node.groups,w={};for(t=0;t<x.length;t++){var A=x[t];for(b=0;b<A.length;b++){var k=A[b],T=_+t;w.hasOwnProperty(k)?i.warn("Node "+k+" is already part of a group."):w[k]=T}}var S={source:[],target:[]};for(t=0;t<o.value.length;t++){var E=o.value[t],C=o.source[t],M=o.target[t];if(E>0&&s(C,_)&&s(M,_)&&(!w.hasOwnProperty(C)||!w.hasOwnProperty(M)||w[C]!==w[M])){w.hasOwnProperty(M)&&(M=w[M]),w.hasOwnProperty(C)&&(C=w[C]),M=+M,d[C=+C]=d[M]=!0;var O="";o.label&&o.label[t]&&(O=o.label[t]);var L=null;O&&f.hasOwnProperty(O)&&(L=f[O]),c.push({pointNumber:t,label:O,color:u?o.color[t]:o.color,customdata:h?o.customdata[t]:o.customdata,concentrationscale:L,source:C,target:M,value:+E}),S.source.push(C),S.target.push(M)}}var D=_+x.length,I=a(n.color),R=a(n.customdata),P=[];for(t=0;t<D;t++)if(d[t]){var N=n.label[t];P.push({group:t>_-1,childrenNodes:[],pointNumber:t,label:N,color:I?n.color[t]:n.color,customdata:R?n.customdata[t]:n.customdata})}var z=!1;return function(e,t,n){for(var o=i.init2dArray(e,0),a=0;a<Math.min(t.length,n.length);a++)if(i.isIndex(t[a],e)&&i.isIndex(n[a],e)){if(t[a]===n[a])return!0;o[t[a]].push(n[a])}return r(o).components.some((function(e){return e.length>1}))}(D,S.source,S.target)&&(z=!0),{circular:z,links:c,nodes:P,groups:x,groupLookup:w}}t.exports=function(e,t){var n=c(t);return o({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500,"strongly-connected-components":306}],919:[function(e,t,n){"use strict";t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},{}],920:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../components/color"),a=e("tinycolor2"),s=e("../../plots/domain").defaults,l=e("../../components/fx/hoverlabel_defaults"),c=e("../../plot_api/plot_template"),u=e("../../plots/array_container_defaults");function h(e,t){function n(n,o){return r.coerce(e,t,i.link.colorscales,n,o)}n("label"),n("cmin"),n("cmax"),n("colorscale")}t.exports=function(e,t,n,d){function f(n,o){return r.coerce(e,t,i,n,o)}var p=r.extendDeep(d.hoverlabel,e.hoverlabel),g=e.node,m=c.newContainer(t,"node");function v(e,t){return r.coerce(g,m,i.node,e,t)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",e.hoverinfo),l(g,m,v,p),v("hovertemplate");var y=d.colorway;v("color",m.label.map((function(e,t){return o.addOpacity(function(e){return y[e%y.length]}(t),.8)}))),v("customdata");var b=e.link||{},_=c.newContainer(t,"link");function x(e,t){return r.coerce(b,_,i.link,e,t)}x("label"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",e.hoverinfo),l(b,_,x,p),x("hovertemplate");var w,A=a(d.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";x("color",r.repeat(A,_.value.length)),x("customdata"),u(b,_,{name:"colorscales",handleItemDefaults:h}),s(t,d,f),f("orientation"),f("valueformat"),f("valuesuffix"),m.x.length&&m.y.length&&(w="freeform"),f("arrangement",w),r.coerceFont(f,"textfont",r.extendFlat({},d.font)),t._length=null}},{"../../components/color":366,"../../components/fx/hoverlabel_defaults":404,"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/domain":584,"./attributes":916,tinycolor2:312}],921:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"sankey",basePlotModule:e("./base_plot"),selectPoints:e("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":916,"./base_plot":917,"./calc":918,"./defaults":920,"./plot":922,"./select.js":924}],922:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=i.numberFormat,a=e("./render"),s=e("../../components/fx"),l=e("../../components/color"),c=e("./constants").cn,u=i._;function h(e){return""!==e}function d(e,t){return e.filter((function(e){return e.key===t.traceId}))}function f(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function p(e){r.select(e).select("text.name").style("fill","black")}function g(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function v(e,t,n){t&&n&&d(n,t).selectAll("."+c.sankeyLink).filter(g(t)).call(b.bind(0,t,n,!1))}function y(e,t,n){t&&n&&d(n,t).selectAll("."+c.sankeyLink).filter(g(t)).call(_.bind(0,t,n,!1))}function b(e,t,n,r){var i=r.datum().link.label;r.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),i&&d(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),n&&d(t,e).selectAll("."+c.sankeyNode).filter(m(e)).call(v)}function _(e,t,n,r){var i=r.datum().link.label;r.style("fill-opacity",(function(e){return e.tinyColorAlpha})),i&&d(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),n&&d(t,e).selectAll(c.sankeyNode).filter(m(e)).call(y)}function x(e,t){var n=e.hoverlabel||{},r=i.nestedProperty(n,t).get();return!Array.isArray(r)&&r}t.exports=function(e,t){for(var n=e._fullLayout,i=n._paper,d=n._size,g=0;g<e._fullData.length;g++)if(e._fullData[g].visible&&e._fullData[g].type===c.sankey&&!e._fullData[g]._viewInitial){var m=e._fullData[g].node;e._fullData[g]._viewInitial={node:{groups:m.groups.slice(),x:m.x.slice(),y:m.y.slice()}}}var w=u(e,"source:")+" ",A=u(e,"target:")+" ",k=u(e,"concentration:")+" ",T=u(e,"incoming flow count:")+" ",S=u(e,"outgoing flow count:")+" ";a(e,i,t,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:function(t,n,i){!1!==e._fullLayout.hovermode&&(r.select(t).call(b.bind(0,n,i,!0)),"skip"!==n.link.trace.link.hoverinfo&&(n.link.fullData=n.link.trace,e.emit("plotly_hover",{event:r.event,points:[n.link]})))},follow:function(t,i){if(!1!==e._fullLayout.hovermode){var a=i.link.trace.link;if("none"!==a.hoverinfo&&"skip"!==a.hoverinfo){for(var c=[],u=0,d=0;d<i.flow.links.length;d++){var g=i.flow.links[d];if("closest"!==e._fullLayout.hovermode||i.link.pointNumber===g.pointNumber){i.link.pointNumber===g.pointNumber&&(u=d),g.fullData=g.trace,a=i.link.trace.link;var m=y(g),v={valueLabel:o(i.valueFormat)(g.value)+i.valueSuffix};c.push({x:m[0],y:m[1],name:v.valueLabel,text:[g.label||"",w+g.source.label,A+g.target.label,g.concentrationscale?k+o("%0.2f")(g.flow.labelConcentration):""].filter(h).join("<br>"),color:x(a,"bgcolor")||l.addOpacity(g.color,1),borderColor:x(a,"bordercolor"),fontFamily:x(a,"font.family"),fontSize:x(a,"font.size"),fontColor:x(a,"font.color"),nameLength:x(a,"namelength"),textAlign:x(a,"align"),idealAlign:r.event.x<m[0]?"right":"left",hovertemplate:a.hovertemplate,hovertemplateLabels:v,eventData:[g]})}}s.loneHover(c,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e,anchorIndex:u}).each((function(){i.link.concentrationscale||f(this,.65),p(this)}))}}function y(e){var t,n;e.circular?(t=(e.circularPathData.leftInnerExtent+e.circularPathData.rightInnerExtent)/2,n=e.circularPathData.verticalFullExtent):(t=(e.source.x1+e.target.x0)/2,n=(e.y0+e.y1)/2);var r=[t,n];return"v"===e.trace.orientation&&r.reverse(),r[0]+=i.parent.translateX,r[1]+=i.parent.translateY,r}},unhover:function(t,i,o){!1!==e._fullLayout.hovermode&&(r.select(t).call(_.bind(0,i,o,!0)),"skip"!==i.link.trace.link.hoverinfo&&(i.link.fullData=i.link.trace,e.emit("plotly_unhover",{event:r.event,points:[i.link]})),s.loneUnhover(n._hoverlayer.node()))},select:function(t,n){var i=n.link;i.originalEvent=r.event,e._hoverdata=[i],s.click(e,{target:!0})}},nodeEvents:{hover:function(t,n,i){!1!==e._fullLayout.hovermode&&(r.select(t).call(v,n,i),"skip"!==n.node.trace.node.hoverinfo&&(n.node.fullData=n.node.trace,e.emit("plotly_hover",{event:r.event,points:[n.node]})))},follow:function(t,i){if(!1!==e._fullLayout.hovermode){var a=i.node.trace.node;if("none"!==a.hoverinfo&&"skip"!==a.hoverinfo){var l=r.select(t).select("."+c.nodeRect),u=e._fullLayout._paperdiv.node().getBoundingClientRect(),d=l.node().getBoundingClientRect(),g=d.left-2-u.left,m=d.right+2-u.left,v=d.top+d.height/4-u.top,y={valueLabel:o(i.valueFormat)(i.node.value)+i.valueSuffix};i.node.fullData=i.node.trace,e._fullLayout._calcInverseTransform(e);var b=e._fullLayout._invScaleX,_=e._fullLayout._invScaleY,w=s.loneHover({x0:b*g,x1:b*m,y:_*v,name:o(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,T+i.node.targetLinks.length,S+i.node.sourceLinks.length].filter(h).join("<br>"),color:x(a,"bgcolor")||i.tinyColorHue,borderColor:x(a,"bordercolor"),fontFamily:x(a,"font.family"),fontSize:x(a,"font.size"),fontColor:x(a,"font.color"),nameLength:x(a,"namelength"),textAlign:x(a,"align"),idealAlign:"left",hovertemplate:a.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e});f(w,.85),p(w)}}},unhover:function(t,i,o){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:r.event,points:[i.node]})),s.loneUnhover(n._hoverlayer.node()))},select:function(t,n,i){var o=n.node;o.originalEvent=r.event,e._hoverdata=[o],r.select(t).call(y,n,i),s.click(e,{target:!0})}}})}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"./constants":919,"./render":923,"@plotly/d3":58}],923:[function(e,t,n){"use strict";var r=e("d3-force"),i=e("d3-interpolate").interpolateNumber,o=e("@plotly/d3"),a=e("@plotly/d3-sankey"),s=e("@plotly/d3-sankey-circular"),l=e("./constants"),c=e("tinycolor2"),u=e("../../components/color"),h=e("../../components/drawing"),d=e("../../lib"),f=d.strTranslate,p=d.strRotate,g=e("../../lib/gup"),m=g.keyFun,v=g.repeat,y=g.unwrap,b=e("../../lib/svg_text_utils"),_=e("../../registry"),x=e("../../constants/alignment"),w=x.CAP_SHIFT,A=x.LINE_SPACING;function k(e,t,n){var r,i=y(t),o=i.trace,u=o.domain,h="h"===o.orientation,f=o.node.pad,p=o.node.thickness,g=e.width*(u.x[1]-u.x[0]),m=e.height*(u.y[1]-u.y[0]),v=i._nodes,b=i._links,_=i.circular;(r=_?s.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(l.sankeyIterations).size(h?[g,m]:[m,g]).nodeWidth(p).nodePadding(f).nodeId((function(e){return e.pointNumber})).nodes(v).links(b);var x,w,A,k=r();for(var T in r.nodePadding()<f&&d.warn("node.pad was reduced to ",r.nodePadding()," to fit within the figure."),i._groupLookup){var S,E=parseInt(i._groupLookup[T]);for(x=0;x<k.nodes.length;x++)if(k.nodes[x].pointNumber===E){S=k.nodes[x];break}if(S){var C={pointNumber:parseInt(T),x0:S.x0,x1:S.x1,y0:S.y0,y1:S.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};k.nodes.unshift(C),S.childrenNodes.unshift(C)}}if(function(){for(x=0;x<k.nodes.length;x++){var e,t,n=k.nodes[x],r={};for(w=0;w<n.targetLinks.length;w++)e=(t=n.targetLinks[w]).source.pointNumber+":"+t.target.pointNumber,r.hasOwnProperty(e)||(r[e]=[]),r[e].push(t);var i=Object.keys(r);for(w=0;w<i.length;w++){var o=r[e=i[w]],a=0,s={};for(A=0;A<o.length;A++)s[(t=o[A]).label]||(s[t.label]=0),s[t.label]+=t.value,a+=t.value;for(A=0;A<o.length;A++)(t=o[A]).flow={value:a,labelConcentration:s[t.label]/a,concentration:t.value/a,links:o},t.concentrationscale&&(t.color=c(t.concentrationscale(t.flow.labelConcentration)))}var l=0;for(w=0;w<n.sourceLinks.length;w++)l+=n.sourceLinks[w].value;for(w=0;w<n.sourceLinks.length;w++)(t=n.sourceLinks[w]).concentrationOut=t.value/l;var u=0;for(w=0;w<n.targetLinks.length;w++)u+=n.targetLinks[w].value;for(w=0;w<n.targetLinks.length;w++)(t=n.targetLinks[w]).concenrationIn=t.value/u}}(),o.node.x.length&&o.node.y.length){for(x=0;x<Math.min(o.node.x.length,o.node.y.length,k.nodes.length);x++)if(o.node.x[x]&&o.node.y[x]){var M=[o.node.x[x]*g,o.node.y[x]*m];k.nodes[x].x0=M[0]-p/2,k.nodes[x].x1=M[0]+p/2;var O=k.nodes[x].y1-k.nodes[x].y0;k.nodes[x].y0=M[1]-O/2,k.nodes[x].y1=M[1]+O/2}"snap"===o.arrangement&&function(e){var t,n,r=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),i=[],o=-1,a=-1/0;for(x=0;x<r.length;x++){var s=e[r[x].index];s.x0>a+p&&(o+=1,t=s.x0),a=s.x0,i[o]||(i[o]=[]),i[o].push(s),n=t-s.x0,s.x0+=n,s.x1+=n}return i}(v=k.nodes).forEach((function(e){var t,n,r,i=0,o=e.length;for(e.sort((function(e,t){return e.y0-t.y0})),r=0;r<o;++r)(t=e[r]).y0>=i||(n=i-t.y0)>1e-6&&(t.y0+=n,t.y1+=n),i=t.y1+f})),r.update(k)}return{circular:_,key:n,trace:o,guid:d.randstr(),horizontal:h,width:g,height:m,nodePad:o.node.pad,nodeLineColor:o.node.line.color,nodeLineWidth:o.node.line.width,linkLineColor:o.link.line.color,linkLineWidth:o.link.line.width,valueFormat:o.valueformat,valueSuffix:o.valuesuffix,textFont:o.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:h?m:g,dragPerpendicular:h?g:m,arrangement:o.arrangement,sankey:r,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function T(e,t,n){var r=c(t.color),i=t.source.label+"|"+t.target.label+"__"+n;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),linkPath:S,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function S(){return function(e){if(e.link.circular)return t=e.link,n=t.width/2,r=t.circularPathData,"top"===t.circularLinkType?"M "+r.targetX+" "+(r.targetY+n)+" L"+r.rightInnerExtent+" "+(r.targetY+n)+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightSmallArcRadius+n)+" 0 0 1 "+(r.rightFullExtent-n)+" "+(r.targetY-r.rightSmallArcRadius)+"L"+(r.rightFullExtent-n)+" "+r.verticalRightInnerExtent+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightLargeArcRadius+n)+" 0 0 1 "+r.rightInnerExtent+" "+(r.verticalFullExtent-n)+"L"+r.leftInnerExtent+" "+(r.verticalFullExtent-n)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftLargeArcRadius+n)+" 0 0 1 "+(r.leftFullExtent+n)+" "+r.verticalLeftInnerExtent+"L"+(r.leftFullExtent+n)+" "+(r.sourceY-r.leftSmallArcRadius)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftSmallArcRadius+n)+" 0 0 1 "+r.leftInnerExtent+" "+(r.sourceY+n)+"L"+r.sourceX+" "+(r.sourceY+n)+"L"+r.sourceX+" "+(r.sourceY-n)+"L"+r.leftInnerExtent+" "+(r.sourceY-n)+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftSmallArcRadius-n)+" 0 0 0 "+(r.leftFullExtent-n)+" "+(r.sourceY-r.leftSmallArcRadius)+"L"+(r.leftFullExtent-n)+" "+r.verticalLeftInnerExtent+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftLargeArcRadius-n)+" 0 0 0 "+r.leftInnerExtent+" "+(r.verticalFullExtent+n)+"L"+r.rightInnerExtent+" "+(r.verticalFullExtent+n)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightLargeArcRadius-n)+" 0 0 0 "+(r.rightFullExtent+n)+" "+r.verticalRightInnerExtent+"L"+(r.rightFullExtent+n)+" "+(r.targetY-r.rightSmallArcRadius)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightSmallArcRadius-n)+" 0 0 0 "+r.rightInnerExtent+" "+(r.targetY-n)+"L"+r.targetX+" "+(r.targetY-n)+"Z":"M "+r.targetX+" "+(r.targetY-n)+" L"+r.rightInnerExtent+" "+(r.targetY-n)+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightSmallArcRadius+n)+" 0 0 0 "+(r.rightFullExtent-n)+" "+(r.targetY+r.rightSmallArcRadius)+"L"+(r.rightFullExtent-n)+" "+r.verticalRightInnerExtent+"A"+(r.rightLargeArcRadius+n)+" "+(r.rightLargeArcRadius+n)+" 0 0 0 "+r.rightInnerExtent+" "+(r.verticalFullExtent+n)+"L"+r.leftInnerExtent+" "+(r.verticalFullExtent+n)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftLargeArcRadius+n)+" 0 0 0 "+(r.leftFullExtent+n)+" "+r.verticalLeftInnerExtent+"L"+(r.leftFullExtent+n)+" "+(r.sourceY+r.leftSmallArcRadius)+"A"+(r.leftLargeArcRadius+n)+" "+(r.leftSmallArcRadius+n)+" 0 0 0 "+r.leftInnerExtent+" "+(r.sourceY-n)+"L"+r.sourceX+" "+(r.sourceY-n)+"L"+r.sourceX+" "+(r.sourceY+n)+"L"+r.leftInnerExtent+" "+(r.sourceY+n)+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftSmallArcRadius-n)+" 0 0 1 "+(r.leftFullExtent-n)+" "+(r.sourceY+r.leftSmallArcRadius)+"L"+(r.leftFullExtent-n)+" "+r.verticalLeftInnerExtent+"A"+(r.leftLargeArcRadius-n)+" "+(r.leftLargeArcRadius-n)+" 0 0 1 "+r.leftInnerExtent+" "+(r.verticalFullExtent-n)+"L"+r.rightInnerExtent+" "+(r.verticalFullExtent-n)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightLargeArcRadius-n)+" 0 0 1 "+(r.rightFullExtent+n)+" "+r.verticalRightInnerExtent+"L"+(r.rightFullExtent+n)+" "+(r.targetY+r.rightSmallArcRadius)+"A"+(r.rightLargeArcRadius-n)+" "+(r.rightSmallArcRadius-n)+" 0 0 1 "+r.rightInnerExtent+" "+(r.targetY+n)+"L"+r.targetX+" "+(r.targetY+n)+"Z";var t,n,r,o=e.link.source.x1,a=e.link.target.x0,s=i(o,a),l=s(.5),c=s(.5),u=e.link.y0-e.link.width/2,h=e.link.y0+e.link.width/2,d=e.link.y1-e.link.width/2,f=e.link.y1+e.link.width/2;return"M"+o+","+u+"C"+l+","+u+" "+c+","+d+" "+a+","+d+"L"+a+","+f+"C"+c+","+f+" "+l+","+h+" "+o+","+h+"Z"}}function E(e,t){var n=c(t.color),r=l.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var o=t.dx,a=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=d.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(o),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:o+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function C(e){e.attr("transform",(function(e){return f(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function M(e){e.call(C)}function O(e,t){e.call(M),t.attr("d",S())}function L(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function D(e){return e.link.width>1||e.linkLineWidth>0}function I(e){return f(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function R(e,t,n){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(n.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(n.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||n.select(this,e,t)}))}function P(e,t,n,i){var a=o.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(o){if("fixed"!==o.arrangement&&(d.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),d.raiseToTop(this),o.interactionState.dragInProgress=o.node,z(o.node),o.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,o.interactionState.hovered),o.interactionState.hovered=!1),"snap"===o.arrangement)){var a=o.traceId+"|"+o.key;o.forceLayouts[a]?o.forceLayouts[a].alpha(1):function(e,t,n,i){!function(e){for(var t=0;t<e.length;t++)e[t].y=(e[t].y0+e[t].y1)/2,e[t].x=(e[t].x0+e[t].x1)/2}(n.graph.nodes);var o=n.graph.nodes.filter((function(e){return e.originalX===n.node.originalX})).filter((function(e){return!e.partOfGroup}));n.forceLayouts[t]=r.forceSimulation(o).alphaDecay(0).force("collide",r.forceCollide().radius((function(e){return e.dy/2+n.nodePad/2})).strength(1).iterations(l.forceIterations)).force("constrain",function(e,t,n,r){return function(){for(var e=0,i=0;i<n.length;i++){var o=n[i];o===r.interactionState.dragInProgress?(o.x=o.lastDraggedX,o.y=o.lastDraggedY):(o.vx=(o.originalX-o.x)/l.forceTicksPerFrame,o.y=Math.min(r.size-o.dy/2,Math.max(o.dy/2,o.y))),e=Math.max(e,Math.abs(o.vx),Math.abs(o.vy))}!r.interactionState.dragInProgress&&e<.1&&r.forceLayouts[t].alpha()>0&&r.forceLayouts[t].alpha(0)}}(0,t,o,n)).stop()}(0,a,o),function(e,t,n,r,i){window.requestAnimationFrame((function o(){var a;for(a=0;a<l.forceTicksPerFrame;a++)n.forceLayouts[r].tick();if(function(e){for(var t=0;t<e.length;t++)e[t].y0=e[t].y-e[t].dy/2,e[t].y1=e[t].y0+e[t].dy,e[t].x0=e[t].x-e[t].dx/2,e[t].x1=e[t].x0+e[t].dx}(n.graph.nodes),n.sankey.update(n.graph),O(e.filter(F(n)),t),n.forceLayouts[r].alpha()>0)window.requestAnimationFrame(o);else{var s=n.node.originalX;n.node.x0=s-n.visibleWidth/2,n.node.x1=s+n.visibleWidth/2,N(n,i)}}))}(e,t,o,a,i)}})).on("drag",(function(n){if("fixed"!==n.arrangement){var r=o.event.x,i=o.event.y;"snap"===n.arrangement?(n.node.x0=r-n.visibleWidth/2,n.node.x1=r+n.visibleWidth/2,n.node.y0=i-n.visibleHeight/2,n.node.y1=i+n.visibleHeight/2):("freeform"===n.arrangement&&(n.node.x0=r-n.visibleWidth/2,n.node.x1=r+n.visibleWidth/2),i=Math.max(0,Math.min(n.size-n.visibleHeight/2,i)),n.node.y0=i-n.visibleHeight/2,n.node.y1=i+n.visibleHeight/2),z(n.node),"snap"!==n.arrangement&&(n.sankey.update(n.graph),O(e.filter(F(n)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t<e.node.childrenNodes.length;t++)e.node.childrenNodes[t].x=e.node.x,e.node.childrenNodes[t].y=e.node.y;"snap"!==e.arrangement&&N(e,i)}}));e.on(".drag",null).call(a)}function N(e,t){for(var n=[],r=[],i=0;i<e.graph.nodes.length;i++){var o=(e.graph.nodes[i].x0+e.graph.nodes[i].x1)/2,a=(e.graph.nodes[i].y0+e.graph.nodes[i].y1)/2;n.push(o/e.figure.width),r.push(a/e.figure.height)}_.call("_guiRestyle",t,{"node.x":[n],"node.y":[r]},e.trace.index).then((function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()}))}function z(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function F(e){return function(t){return t.node.originalX===e.node.originalX}}t.exports=function(e,t,n,r,i){var a=!1;d.ensureSingle(e._fullLayout._infolayer,"g","first-render",(function(){a=!0}));var s=e._fullLayout._dragCover,g=n.filter((function(e){return y(e).trace.visible})).map(k.bind(null,r)),_=t.selectAll("."+l.cn.sankey).data(g,m);_.exit().remove(),_.enter().append("g").classed(l.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",I),_.each((function(t,n){e._fullData[n]._sankey=t;var r="bgsankey-"+t.trace.uid+"-"+n;d.ensureSingle(e._fullLayout._draggers,"rect",r),e._fullData[n]._bgRect=o.select("."+r),e._fullData[n]._bgRect.style("pointer-events","all").attr("width",t.width).attr("height",t.height).attr("x",t.translateX).attr("y",t.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})})),_.transition().ease(l.ease).duration(l.duration).attr("transform",I);var x=_.selectAll("."+l.cn.sankeyLinks).data(v,m);x.enter().append("g").classed(l.cn.sankeyLinks,!0).style("fill","none");var M=x.selectAll("."+l.cn.sankeyLink).data((function(e){return e.graph.links.filter((function(e){return e.value})).map(T.bind(null,e))}),m);M.enter().append("path").classed(l.cn.sankeyLink,!0).call(R,_,i.linkEvents),M.style("stroke",(function(e){return D(e)?u.tinyRGB(c(e.linkLineColor)):e.tinyColorHue})).style("stroke-opacity",(function(e){return D(e)?u.opacity(e.linkLineColor):e.tinyColorAlpha})).style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha})).style("stroke-width",(function(e){return D(e)?e.linkLineWidth:1})).attr("d",S()),M.style("opacity",(function(){return e._context.staticPlot||a||s?1:0})).transition().ease(l.ease).duration(l.duration).style("opacity",1),M.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var O=_.selectAll("."+l.cn.sankeyNodeSet).data(v,m);O.enter().append("g").classed(l.cn.sankeyNodeSet,!0),O.style("cursor",(function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}}));var N=O.selectAll("."+l.cn.sankeyNode).data((function(e){var t=e.graph.nodes;return function(e){var t,n=[];for(t=0;t<e.length;t++)e[t].originalX=(e[t].x0+e[t].x1)/2,e[t].originalY=(e[t].y0+e[t].y1)/2,-1===n.indexOf(e[t].originalX)&&n.push(e[t].originalX);for(n.sort((function(e,t){return e-t})),t=0;t<e.length;t++)e[t].originalLayerIndex=n.indexOf(e[t].originalX),e[t].originalLayer=e[t].originalLayerIndex/(n.length-1)}(t),t.map(E.bind(null,e))}),m);N.enter().append("g").classed(l.cn.sankeyNode,!0).call(C).style("opacity",(function(t){return!e._context.staticPlot&&!a||t.partOfGroup?0:1})),N.call(R,_,i.nodeEvents).call(P,M,i,e),N.transition().ease(l.ease).duration(l.duration).call(C).style("opacity",(function(e){return e.partOfGroup?0:1})),N.exit().transition().ease(l.ease).duration(l.duration).style("opacity",0).remove();var z=N.selectAll("."+l.cn.nodeRect).data(v);z.enter().append("rect").classed(l.cn.nodeRect,!0).call(L),z.style("stroke-width",(function(e){return e.nodeLineWidth})).style("stroke",(function(e){return u.tinyRGB(c(e.nodeLineColor))})).style("stroke-opacity",(function(e){return u.opacity(e.nodeLineColor)})).style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),z.transition().ease(l.ease).duration(l.duration).call(L);var F=N.selectAll("."+l.cn.nodeLabel).data(v);F.enter().append("text").classed(l.cn.nodeLabel,!0).style("cursor","default"),F.attr("data-notex",1).text((function(e){return e.node.label})).each((function(t){var n=o.select(this);h.font(n,t.textFont),b.convertToTspans(n,e)})).style("text-shadow",b.makeTextShadow(e._fullLayout.paper_bgcolor)).attr("text-anchor",(function(e){return e.horizontal&&e.left?"end":"start"})).attr("transform",(function(e){var t=o.select(this),n=b.lineCount(t),r=e.textFont.size*((n-1)*A-w),i=e.nodeLineWidth/2+3,a=((e.horizontal?e.visibleHeight:e.visibleWidth)-r)/2;e.horizontal&&(e.left?i=-i:i+=e.visibleWidth);var s=e.horizontal?"":"scale(-1,1)"+p(90);return f(e.horizontal?i:a,e.horizontal?a:i)+s})),F.transition().ease(l.ease).duration(l.duration)}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../registry":638,"./constants":919,"@plotly/d3":58,"@plotly/d3-sankey":57,"@plotly/d3-sankey-circular":56,"d3-force":111,"d3-interpolate":116,tinycolor2:312}],924:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=[],r=e.cd[0].trace,i=r._sankey.graph.nodes,o=0;o<i.length;o++){var a=i[o];if(!a.partOfGroup){var s=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];"v"===r.orientation&&s.reverse(),t&&t.contains(s,!1,o,e)&&n.push({pointNumber:a.pointNumber})}}return n}},{}],925:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){for(var n=0;n<e.length;n++)e[n].i=n;r.mergeArray(t.text,e,"tx"),r.mergeArray(t.texttemplate,e,"txt"),r.mergeArray(t.hovertext,e,"htx"),r.mergeArray(t.customdata,e,"data"),r.mergeArray(t.textposition,e,"tp"),t.textfont&&(r.mergeArrayCastPositive(t.textfont.size,e,"ts"),r.mergeArray(t.textfont.color,e,"tc"),r.mergeArray(t.textfont.family,e,"tf"));var i=t.marker;if(i){r.mergeArrayCastPositive(i.size,e,"ms"),r.mergeArrayCastPositive(i.opacity,e,"mo"),r.mergeArray(i.symbol,e,"mx"),r.mergeArray(i.color,e,"mc");var o=i.line;i.line&&(r.mergeArray(o.color,e,"mlc"),r.mergeArrayCastPositive(o.width,e,"mlw"));var a=i.gradient;a&&"none"!==a.type&&(r.mergeArray(a.type,e,"mgt"),r.mergeArray(a.color,e,"mgc"))}}},{"../../lib":503}],926:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../components/colorscale/attributes"),s=e("../../plots/font_attributes"),l=e("../../components/drawing/attributes").dash,c=e("../../components/drawing"),u=e("./constants"),h=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:r("x"),yhoverformat:r("y"),stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:o({},{keys:u.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:h({},l,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0},marker:h({symbol:{valType:"enumerated",values:c.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:h({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0})}},{"../../components/colorscale/attributes":373,"../../components/drawing":388,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"./constants":930}],927:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../plots/cartesian/axes"),a=e("../../plots/cartesian/align_period"),s=e("../../constants/numerical").BADNUM,l=e("./subtypes"),c=e("./colorscale_calc"),u=e("./arrays_to_calcdata"),h=e("./calc_selection");function d(e,t,n,r,i,a,s){var c=t._length,u=e._fullLayout,h=n._id,d=r._id,f=u._firstScatter[g(t)]===t.uid,p=(m(t,u,n,r)||{}).orientation,v=t.fill;n._minDtick=0,r._minDtick=0;var y={padded:!0},b={padded:!0};s&&(y.ppad=b.ppad=s);var _=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];_&&("tozerox"===v||"tonextx"===v&&(f||"h"===p))?y.tozero=!0:(t.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(t)||l.hasText(t))||(y.padded=!1,y.ppad=0),_&&("tozeroy"===v||"tonexty"===v&&(f||"v"===p))?b.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(b.padded=!1),h&&(t._extremes[h]=o.findExtremes(n,i,y)),d&&(t._extremes[d]=o.findExtremes(r,a,b))}function f(e,t){if(l.hasMarkers(e)){var n,r=e.marker,a=1.6*(e.marker.sizeref||1);if(n="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/a),3)}:function(e){return Math.max((e||0)/a,3)},i.isArrayOrTypedArray(r.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(e.marker,"size"),u=new Array(t),h=0;h<t;h++)u[h]=n(c[h]);return u}return n(r.size)}}function p(e,t){var n=g(t),r=e._firstScatter;r[n]||(r[n]=t.uid)}function g(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function m(e,t,n,r){var i=e.stackgroup;if(i){var o=t._scatterStackOpts[n._id+r._id][i],a="v"===o.orientation?r:n;return"linear"===a.type||"log"===a.type?o:void 0}}t.exports={calc:function(e,t){var n,l,g,v,y,b,_=e._fullLayout,x=o.getFromId(e,t.xaxis||"x"),w=o.getFromId(e,t.yaxis||"y"),A=x.makeCalcdata(t,"x"),k=w.makeCalcdata(t,"y"),T=a(t,x,"x",A),S=a(t,w,"y",k),E=T.vals,C=S.vals,M=t._length,O=new Array(M),L=t.ids,D=m(t,_,x,w),I=!1;p(_,t);var R,P="x",N="y";D?(i.pushUnique(D.traceIndices,t._expandedIndex),(n="v"===D.orientation)?(N="s",R="x"):(P="s",R="y"),y="interpolate"===D.stackgaps):d(e,t,x,w,E,C,f(t,M));var z=!!t.xperiodalignment,F=!!t.yperiodalignment;for(l=0;l<M;l++){var B=O[l]={},j=r(E[l]),U=r(C[l]);j&&U?(B[P]=E[l],B[N]=C[l],z&&(B.orig_x=A[l],B.xEnd=T.ends[l],B.xStart=T.starts[l]),F&&(B.orig_y=k[l],B.yEnd=S.ends[l],B.yStart=S.starts[l])):D&&(n?j:U)?(B[R]=n?E[l]:C[l],B.gap=!0,y?(B.s=s,I=!0):B.s=0):B[P]=B[N]=s,L&&(B.id=String(L[l]))}if(u(O,t),c(e,t),h(O,t),D){for(l=0;l<O.length;)O[l][R]===s?O.splice(l,1):l++;if(i.sort(O,(function(e,t){return e[R]-t[R]||e.i-t.i})),I){for(l=0;l<O.length-1&&O[l].gap;)l++;for((b=O[l].s)||(b=O[l].s=0),g=0;g<l;g++)O[g].s=b;for(v=O.length-1;v>l&&O[v].gap;)v--;for(b=O[v].s,g=O.length-1;g>v;g--)O[g].s=b;for(;l<v;)if(O[++l].gap){for(g=l+1;O[g].gap;)g++;for(var V=O[l-1][R],q=O[l-1].s,H=(O[g].s-q)/(O[g][R]-V);l<g;)O[l].s=q+(O[l][R]-V)*H,l++}}}return O},calcMarkerSize:f,calcAxisExpansion:d,setFirstScatter:p,getStackOpts:m}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"./arrays_to_calcdata":925,"./calc_selection":928,"./colorscale_calc":929,"./subtypes":951,"fast-isnumeric":190}],928:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){r.isArrayOrTypedArray(t.selectedpoints)&&r.tagSelected(e,t)}},{"../../lib":503}],929:[function(e,t,n){"use strict";var r=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/calc"),o=e("./subtypes");t.exports=function(e,t){o.hasLines(t)&&r(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(t)&&(r(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},{"../../components/colorscale/calc":374,"../../components/colorscale/helpers":377,"./subtypes":951}],930:[function(e,t,n){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],931:[function(e,t,n){"use strict";var r=e("./calc");function i(e,t,n,r,i,o,a){i[r]=!0;var s={i:null,gap:!0,s:0};if(s[a]=n,e.splice(t,0,s),t&&n===e[t-1][a]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(e,t,n,r){var i=e[t-1],o=e[t+1];return o?i?i.s+(o.s-i.s)*(n-i[r])/(o[r]-i[r]):o.s:i.s}(e,t,n,a));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}t.exports=function(e,t){var n=t.xaxis,o=t.yaxis,a=n._id+o._id,s=e._fullLayout._scatterStackOpts[a];if(s){var l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A=e.calcdata;for(var k in s){var T=(v=s[k]).traceIndices;if(T.length){for(y="interpolate"===v.stackgaps,b=v.groupnorm,"v"===v.orientation?(_="x",x="y"):(_="y",x="x"),w=new Array(T.length),l=0;l<w.length;l++)w[l]=!1;f=A[T[0]];var S=new Array(f.length);for(l=0;l<f.length;l++)S[l]=f[l][_];for(l=1;l<T.length;l++){for(d=A[T[l]],c=u=0;c<d.length;c++){for(p=d[c][_];p>S[u]&&u<S.length;u++)i(d,c,S[u],l,w,y,_),c++;if(p!==S[u]){for(h=0;h<l;h++)i(A[T[h]],u,p,h,w,y,_);S.splice(u,0,p)}u++}for(;u<S.length;u++)i(d,c,S[u],l,w,y,_),c++}var E=S.length;for(c=0;c<f.length;c++){for(g=f[c][x]=f[c].s,l=1;l<T.length;l++)(d=A[T[l]])[0].trace._rawLength=d[0].trace._length,d[0].trace._length=E,g+=d[c].s,d[c][x]=g;if(b)for(m=("fraction"===b?g:g/100)||1,l=0;l<T.length;l++){var C=A[T[l]][c];C[x]/=m,C.sNorm=C.s/m}}for(l=0;l<T.length;l++){var M=(d=A[T[l]])[0].trace,O=r.calcMarkerSize(M,M._rawLength),L=Array.isArray(O);if(O&&w[l]||L){var D=O;for(O=new Array(E),c=0;c<E;c++)O[c]=d[c].gap?0:L?D[d[c].i]:D}var I=new Array(E),R=new Array(E);for(c=0;c<E;c++)I[c]=d[c].x,R[c]=d[c].y;r.calcAxisExpansion(e,M,n,o,I,R,O),d[0].t.orientation=v.orientation}}}}}},{"./calc":927}],932:[function(e,t,n){"use strict";t.exports=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("scatter"===n.type){var r=n.fill;if("none"!==r&&"toself"!==r&&(n.opacity=void 0,"tonexty"===r||"tonextx"===r))for(var i=t-1;i>=0;i--){var o=e[i];if("scatter"===o.type&&o.xaxis===n.xaxis&&o.yaxis===n.yaxis){o.opacity=void 0;break}}}}}},{}],933:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=e("./attributes"),a=e("./constants"),s=e("./subtypes"),l=e("./xy_defaults"),c=e("./period_defaults"),u=e("./stack_defaults"),h=e("./marker_defaults"),d=e("./line_defaults"),f=e("./line_shape_defaults"),p=e("./text_defaults"),g=e("./fillcolor_defaults");t.exports=function(e,t,n,m){function v(n,i){return r.coerce(e,t,o,n,i)}var y=l(e,t,m,v);if(y||(t.visible=!1),t.visible){c(e,t,m,v),v("xhoverformat"),v("yhoverformat");var b=u(e,t,m,v),_=!b&&y<a.PTS_LINESONLY?"lines+markers":"lines";v("text"),v("hovertext"),v("mode",_),s.hasLines(t)&&(d(e,t,n,m,v),f(e,t,v),v("connectgaps"),v("line.simplify")),s.hasMarkers(t)&&h(e,t,n,m,v,{gradient:!0}),s.hasText(t)&&(v("texttemplate"),p(e,t,m,v));var x=[];(s.hasMarkers(t)||s.hasText(t))&&(v("cliponaxis"),v("marker.maxdisplayed"),x.push("points")),v("fill",b?b.fillDflt:"none"),"none"!==t.fill&&(g(e,t,n,v),s.hasLines(t)||f(e,t,v));var w=(t.line||{}).color,A=(t.marker||{}).color;"tonext"!==t.fill&&"toself"!==t.fill||x.push("fills"),v("hoveron",x.join("+")||"points"),"fills"!==t.hoveron&&v("hovertemplate");var k=i.getComponentMethod("errorbars","supplyDefaults");k(e,t,w||A||n,{axis:"y"}),k(e,t,w||A||n,{axis:"x",inherit:"y"}),r.coerceSelectionMarkerOpacity(t,v)}}},{"../../lib":503,"../../registry":638,"./attributes":926,"./constants":930,"./fillcolor_defaults":934,"./line_defaults":939,"./line_shape_defaults":941,"./marker_defaults":945,"./period_defaults":946,"./stack_defaults":949,"./subtypes":951,"./text_defaults":952,"./xy_defaults":953}],934:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,n,o){var a=!1;if(t.marker){var s=t.marker.color,l=(t.marker.line||{}).color;s&&!i(s)?a=s:l&&!i(l)&&(a=l)}o("fillcolor",r.addOpacity((t.line||{}).color||a||n,.5))}},{"../../components/color":366,"../../lib":503}],935:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var i={},o={_fullLayout:n},a=r.getFromTrace(o,t,"x"),s=r.getFromTrace(o,t,"y");return i.xLabel=r.tickText(a,a.c2l(e.x),!0).text,i.yLabel=r.tickText(s,s.c2l(e.y),!0).text,i}},{"../../plots/cartesian/axes":554}],936:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("./subtypes");t.exports=function(e,t){var n,o;if("lines"===e.mode)return(n=e.line.color)&&r.opacity(n)?n:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var a=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(o=a&&r.opacity(a)?a:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?r.opacity(o)<.3?r.addOpacity(o,.3):o:(n=(e.line||{}).color)&&r.opacity(n)&&i.hasLines(e)&&e.line.width?n:e.fillcolor}},{"../../components/color":366,"./subtypes":951}],937:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/fx"),o=e("../../registry"),a=e("./get_trace_color"),s=e("../../components/color"),l=r.fillText;t.exports=function(e,t,n,c){var u=e.cd,h=u[0].trace,d=e.xa,f=e.ya,p=d.c2p(t),g=f.c2p(n),m=[p,g],v=h.hoveron||"",y=-1!==h.mode.indexOf("markers")?3:.5,b=!!h.xperiodalignment,_=!!h.yperiodalignment;if(-1!==v.indexOf("points")){var x=function(e){var t=Math.max(y,e.mrc||0),n=d.c2p(e.x)-p,r=f.c2p(e.y)-g;return Math.max(Math.sqrt(n*n+r*r)-t,1-y/t)},w=i.getDistanceFunction(c,(function(e){if(b){var t=d.c2p(e.xStart),n=d.c2p(e.xEnd);return p>=Math.min(t,n)&&p<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,o=Math.abs(d.c2p(e.x)-p);return o<r?i*o/r:o-r+i}),(function(e){if(_){var t=f.c2p(e.yStart),n=f.c2p(e.yEnd);return g>=Math.min(t,n)&&g<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),i=1-1/r,o=Math.abs(f.c2p(e.y)-g);return o<r?i*o/r:o-r+i}),x);if(i.getClosest(u,w,e),!1!==e.index){var A=u[e.index],k=d.c2p(A.x,!0),T=f.c2p(A.y,!0),S=A.mrc||1;e.index=A.i;var E=u[0].t.orientation,C=E&&(A.sNorm||A.s),M="h"===E?C:void 0!==A.orig_x?A.orig_x:A.x,O="v"===E?C:void 0!==A.orig_y?A.orig_y:A.y;return r.extendFlat(e,{color:a(h,A),x0:k-S,x1:k+S,xLabelVal:M,y0:T-S,y1:T+S,yLabelVal:O,spikeDistance:x(A),hovertemplate:h.hovertemplate}),l(A,h,e),o.getComponentMethod("errorbars","hoverInfo")(A,h,e),[e]}}if(-1!==v.indexOf("fills")&&h._polygons){var L,D,I,R,P,N,z,F,B,j=h._polygons,U=[],V=!1,q=1/0,H=-1/0,$=1/0,W=-1/0;for(L=0;L<j.length;L++)(I=j[L]).contains(m)&&(V=!V,U.push(I),$=Math.min($,I.ymin),W=Math.max(W,I.ymax));if(V){var G=(($=Math.max($,0))+(W=Math.min(W,f._length)))/2;for(L=0;L<U.length;L++)for(R=U[L].pts,D=1;D<R.length;D++)(F=R[D-1][1])>G!=(B=R[D][1])>=G&&(N=R[D-1][0],z=R[D][0],B-F&&(P=N+(z-N)*(G-F)/(B-F),q=Math.min(q,P),H=Math.max(H,P)));q=Math.max(q,0),H=Math.min(H,d._length);var Y=s.defaultLine;return s.opacity(h.fillcolor)?Y=h.fillcolor:s.opacity((h.line||{}).color)&&(Y=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:q,x1:H,y0:G,y1:G,color:Y,hovertemplate:!1}),delete e.index,h.text&&!Array.isArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../registry":638,"./get_trace_color":936}],938:[function(e,t,n){"use strict";var r=e("./subtypes");t.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./arrays_to_calcdata":925,"./attributes":926,"./calc":927,"./cross_trace_calc":931,"./cross_trace_defaults":932,"./defaults":933,"./format_labels":935,"./hover":937,"./marker_colorbar":944,"./plot":947,"./select":948,"./style":950,"./subtypes":951}],939:[function(e,t,n){"use strict";var r=e("../../lib").isArrayOrTypedArray,i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/defaults");t.exports=function(e,t,n,a,s,l){var c=(e.marker||{}).color;s("line.color",n),i(e,"line")?o(e,t,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!r(c)&&c||n),s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],940:[function(e,t,n){"use strict";var r=e("../../constants/numerical"),i=r.BADNUM,o=r.LOG_CLIP,a=o+.5,s=o-.5,l=e("../../lib"),c=l.segmentsIntersect,u=l.constrain,h=e("./constants");t.exports=function(e,t){var n,r,o,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E=t.xaxis,C=t.yaxis,M="log"===E.type,O="log"===C.type,L=E._length,D=C._length,I=t.connectGaps,R=t.baseTolerance,P=t.shape,N="linear"===P,z=t.fill&&"none"!==t.fill,F=[],B=h.minTolerance,j=e.length,U=new Array(j),V=0;function q(n){var r=e[n];if(!r)return!1;var o=t.linearized?E.l2p(r.x):E.c2p(r.x),l=t.linearized?C.l2p(r.y):C.c2p(r.y);if(o===i){if(M&&(o=E.c2p(r.x,!0)),o===i)return!1;O&&l===i&&(o*=Math.abs(E._m*D*(E._m>0?a:s)/(C._m*L*(C._m>0?a:s)))),o*=1e3}if(l===i){if(O&&(l=C.c2p(r.y,!0)),l===i)return!1;l*=1e3}return[o,l]}function H(e,t,n,r){var i=n-e,o=r-t,a=.5-e,s=.5-t,l=i*i+o*o,c=i*a+o*s;if(c>0&&c<l){var u=a*o-s*i;if(u*u<l)return!0}}function $(e,t){var n=e[0]/L,r=e[1]/D,i=Math.max(0,-n,n-1,-r,r-1);return i&&void 0!==T&&H(n,r,T,S)&&(i=0),i&&t&&H(n,r,t[0]/L,t[1]/D)&&(i=0),(1+h.toleranceGrowth*i)*R}function W(e,t){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}var G,Y,X,Z,K,J,Q,ee=h.maxScreensAway,te=-L*ee,ne=L*(1+ee),re=-D*ee,ie=D*(1+ee),oe=[[te,re,ne,re],[ne,re,ne,ie],[ne,ie,te,ie],[te,ie,te,re]];function ae(e){if(e[0]<te||e[0]>ne||e[1]<re||e[1]>ie)return[u(e[0],te,ne),u(e[1],re,ie)]}function se(e,t){return e[0]===t[0]&&(e[0]===te||e[0]===ne)||e[1]===t[1]&&(e[1]===re||e[1]===ie)||void 0}function le(e,t,n){return function(r,i){var o=ae(r),a=ae(i),s=[];if(o&&a&&se(o,a))return s;o&&s.push(o),a&&s.push(a);var c=2*l.constrain((r[e]+i[e])/2,t,n)-((o||r)[e]+(a||i)[e]);return c&&((o&&a?c>0==o[e]>a[e]?o:a:o||a)[e]+=c),s}}function ce(e){var t=e[0],n=e[1],r=t===U[V-1][0],i=n===U[V-1][1];if(!r||!i)if(V>1){var o=t===U[V-2][0],a=n===U[V-2][1];r&&(t===te||t===ne)&&o?a?V--:U[V-1]=e:i&&(n===re||n===ie)&&a?o?V--:U[V-1]=e:U[V++]=e}else U[V++]=e}function ue(e){U[V-1][0]!==e[0]&&U[V-1][1]!==e[1]&&ce([X,Z]),ce(e),K=null,X=Z=0}function he(e){if(T=e[0]/L,S=e[1]/D,G=e[0]<te?te:e[0]>ne?ne:0,Y=e[1]<re?re:e[1]>ie?ie:0,G||Y){if(V)if(K){var t=Q(K,e);t.length>1&&(ue(t[0]),U[V++]=t[1])}else J=Q(U[V-1],e)[0],U[V++]=J;else U[V++]=[G||e[0],Y||e[1]];var n=U[V-1];G&&Y&&(n[0]!==G||n[1]!==Y)?(K&&(X!==G&&Z!==Y?ce(X&&Z?(r=K,o=(i=e)[0]-r[0],a=(i[1]-r[1])/o,(r[1]*i[0]-i[1]*r[0])/o>0?[a>0?te:ne,ie]:[a>0?ne:te,re]):[X||G,Z||Y]):X&&Z&&ce([X,Z])),ce([G,Y])):X-G&&Z-Y&&ce([G||X,Y||Z]),K=e,X=G,Z=Y}else K&&ue(Q(K,e)[0]),U[V++]=e;var r,i,o,a}for("linear"===P||"spline"===P?Q=function(e,t){for(var n=[],r=0,i=0;i<4;i++){var o=oe[i],a=c(e[0],e[1],t[0],t[1],o[0],o[1],o[2],o[3]);a&&(!r||Math.abs(a.x-n[0][0])>1||Math.abs(a.y-n[0][1])>1)&&(a=[a.x,a.y],r&&W(a,e)<W(n[0],e)?n.unshift(a):n.push(a),r++)}return n}:"hv"===P||"vh"===P?Q=function(e,t){var n=[],r=ae(e),i=ae(t);return r&&i&&se(r,i)||(r&&n.push(r),i&&n.push(i)),n}:"hvh"===P?Q=le(0,te,ne):"vhv"===P&&(Q=le(1,re,ie)),n=0;n<j;n++)if(r=q(n)){for(V=0,K=null,he(r),n++;n<j;n++){if(!(d=q(n))){if(I)continue;break}if(N&&t.simplify){var de=q(n+1);if(y=W(d,r),z&&(0===V||V===j-1)||!(y<$(d,de)*B)){for(m=[(d[0]-r[0])/y,(d[1]-r[1])/y],f=r,b=y,_=w=A=0,g=!1,o=d,n++;n<e.length;n++){if(p=de,de=q(n+1),!p){if(I)continue;break}if(k=(v=[p[0]-r[0],p[1]-r[1]])[0]*m[1]-v[1]*m[0],w=Math.min(w,k),(A=Math.max(A,k))-w>$(p,de))break;o=p,(x=v[0]*m[0]+v[1]*m[1])>b?(b=x,d=p,g=!1):x<_&&(_=x,f=p,g=!0)}if(g?(he(d),o!==f&&he(f)):(f!==r&&he(f),o!==d&&he(d)),he(o),n>=e.length||!p)break;he(p),r=p}}else he(d)}K&&ce([X||K[0],Z||K[1]]),F.push(U.slice(0,V))}return F}},{"../../constants/numerical":479,"../../lib":503,"./constants":930}],941:[function(e,t,n){"use strict";t.exports=function(e,t,n){"spline"===n("line.shape")&&n("line.smoothing")}},{}],942:[function(e,t,n){"use strict";var r={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,n){var i,o,a,s,l,c={},u=!1,h=-1,d=0,f=-1;for(o=0;o<n.length;o++)(a=(i=n[o][0].trace).stackgroup||"")?a in c?l=c[a]:(l=c[a]=d,d++):i.fill in r&&f>=0?l=f:(l=f=d,d++),l<h&&(u=!0),i._groupIndex=h=l;var p=n.slice();u&&p.sort((function(e,t){var n=e[0].trace,r=t[0].trace;return n._groupIndex-r._groupIndex||n.index-r.index}));var g={};for(o=0;o<p.length;o++)a=(i=p[o][0].trace).stackgroup||"",!0===i.visible?(i._nexttrace=null,i.fill in r&&(s=g[a],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&("tozero"===i.fill.substr(0,6)||"toself"===i.fill||"to"===i.fill.substr(0,2)&&!i._prevtrace),g[a]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return p}},{}],943:[function(e,t,n){"use strict";var r=e("fast-isnumeric");t.exports=function(e,t){t||(t=2);var n=e.marker,i=n.sizeref||1,o=n.sizemin||0,a="area"===n.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var n=a(e/t);return r(n)&&n>0?Math.max(n,o):0}}},{"fast-isnumeric":190}],944:[function(e,t,n){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],945:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../../components/colorscale/helpers").hasColorscale,o=e("../../components/colorscale/defaults"),a=e("./subtypes");t.exports=function(e,t,n,s,l,c){var u=a.isBubble(e),h=(e.line||{}).color;c=c||{},h&&(n=h),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",n),i(e,"marker")&&o(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",h&&!Array.isArray(h)&&t.marker.color!==h?h:u?r.background:r.defaultLine),i(e,"marker.line")&&o(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"./subtypes":951}],946:[function(e,t,n){"use strict";var r=e("../../lib").dateTick0,i=e("../../constants/numerical").ONEWEEK;function o(e,t){return r(t,e%i==0?1:0)}t.exports=function(e,t,n,r,i){if(i||(i={x:!0,y:!0}),i.x){var a=r("xperiod");a&&(r("xperiod0",o(a,t.xcalendar)),r("xperiodalignment"))}if(i.y){var s=r("yperiod");s&&(r("yperiod0",o(s,t.ycalendar)),r("yperiodalignment"))}}},{"../../constants/numerical":479,"../../lib":503}],947:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../lib"),a=o.ensureSingle,s=o.identity,l=e("../../components/drawing"),c=e("./subtypes"),u=e("./line_points"),h=e("./link_traces"),d=e("../../lib/polygon").tester;function f(e,t,n,h,f,p,g){var m;!function(e,t,n,i,a){var s=n.xaxis,l=n.yaxis,u=r.extent(o.simpleMap(s.range,s.r2c)),h=r.extent(o.simpleMap(l.range,l.r2c)),d=i[0].trace;if(c.hasMarkers(d)){var f=d.marker.maxdisplayed;if(0!==f){var p=i.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=h[0]&&e.y<=h[1]})),g=Math.ceil(p.length/f),m=0;a.forEach((function(e,n){var r=e[0].trace;c.hasMarkers(r)&&r.marker.maxdisplayed>0&&n<t&&m++}));var v=Math.round(m*g/3+Math.floor(m/3)*g/7.1);i.forEach((function(e){delete e.vis})),p.forEach((function(e,t){0===Math.round((t+v)%g)&&(e.vis=!0)}))}}}(0,t,n,h,f);var v=!!g&&g.duration>0;function y(e){return v?e.transition():e}var b=n.xaxis,_=n.yaxis,x=h[0].trace,w=x.line,A=r.select(p),k=a(A,"g","errorbars"),T=a(A,"g","lines"),S=a(A,"g","points"),E=a(A,"g","text");if(i.getComponentMethod("errorbars","plot")(e,k,n,g),!0===x.visible){var C,M;y(A).style("opacity",x.opacity);var O=x.fill.charAt(x.fill.length-1);"x"!==O&&"y"!==O&&(O=""),h[0][n.isRangePlot?"nodeRangePlot3":"node3"]=A;var L,D,I="",R=[],P=x._prevtrace;P&&(I=P._prevRevpath||"",M=P._nextFill,R=P._polygons);var N,z,F,B,j,U,V,q="",H="",$=[],W=o.noop;if(C=x._ownFill,c.hasLines(x)||"none"!==x.fill){for(M&&M.datum(h),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(N=l.steps(w.shape),z=l.steps(w.shape.split("").reverse().join(""))):N=z="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),w.smoothing):l.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},F=function(e){return z(e.reverse())},$=u(h,{xaxis:b,yaxis:_,connectGaps:x.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:x.fill}),V=x._polygons=new Array($.length),m=0;m<$.length;m++)x._polygons[m]=d($[m]);$.length&&(B=$[0][0],U=(j=$[$.length-1])[j.length-1]),W=function(e){return function(t){if(L=N(t),D=F(t),q?O?(q+="L"+L.substr(1),H=D+"L"+H.substr(1)):(q+="Z"+L,H=D+"Z"+H):(q=L,H=D),c.hasLines(x)&&t.length>1){var n=r.select(this);if(n.datum(h),e)y(n.style("opacity",0).attr("d",L).call(l.lineGroupStyle)).style("opacity",1);else{var i=y(n);i.attr("d",L),l.singleLineStyle(h,i)}}}}}var G=T.selectAll(".js-line").data($);y(G.exit()).style("opacity",0).remove(),G.each(W(!1)),G.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(W(!0)),l.setClipUrl(G,n.layerClipId,e),$.length?(C?(C.datum(h),B&&U&&(O?("y"===O?B[1]=U[1]=_.c2p(0,!0):"x"===O&&(B[0]=U[0]=b.c2p(0,!0)),y(C).attr("d","M"+U+"L"+B+"L"+q.substr(1)).call(l.singleFillStyle)):y(C).attr("d",q+"Z").call(l.singleFillStyle))):M&&("tonext"===x.fill.substr(0,6)&&q&&I?("tonext"===x.fill?y(M).attr("d",q+"Z"+I+"Z").call(l.singleFillStyle):y(M).attr("d",q+"L"+I.substr(1)+"Z").call(l.singleFillStyle),x._polygons=x._polygons.concat(R)):(X(M),x._polygons=null)),x._prevRevpath=H,x._prevPolygons=V):(C?X(C):M&&X(M),x._polygons=x._prevRevpath=x._prevPolygons=null),S.datum(h),E.datum(h),function(t,i,o){var a,u=o[0].trace,h=c.hasMarkers(u),d=c.hasText(u),f=ee(u),p=te,g=te;if(h||d){var m=s,x=u.stackgroup,w=x&&"infer zero"===e._fullLayout._scatterStackOpts[b._id+_._id][x].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:Z:x&&!w&&(m=J),h&&(p=m),d&&(g=m)}var A,k=(a=t.selectAll("path.point").data(p,f)).enter().append("path").classed("point",!0);v&&k.call(l.pointStyle,u,e).call(l.translatePoints,b,_).style("opacity",0).transition().style("opacity",1),a.order(),h&&(A=l.makePointStyleFns(u)),a.each((function(t){var i=r.select(this),o=y(i);l.translatePoint(t,o,b,_)?(l.singlePointStyle(t,o,u,A,e),n.layerClipId&&l.hideOutsideRangePoint(t,o,b,_,u.xcalendar,u.ycalendar),u.customdata&&i.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):o.remove()})),v?a.exit().transition().style("opacity",0).remove():a.exit().remove(),(a=i.selectAll("g").data(g,f)).enter().append("g").classed("textpoint",!0).append("text"),a.order(),a.each((function(e){var t=r.select(this),i=y(t.select("text"));l.translatePoint(e,i,b,_)?n.layerClipId&&l.hideOutsideRangePoint(e,t,b,_,u.xcalendar,u.ycalendar):t.remove()})),a.selectAll("text").call(l.textPointStyle,u,e).each((function(e){var t=b.c2p(e.x),n=_.c2p(e.y);r.select(this).selectAll("tspan.line").each((function(){y(r.select(this)).attr({x:t,y:n})}))})),a.exit().remove()}(S,E,h);var Y=!1===x.cliponaxis?null:n.layerClipId;l.setClipUrl(S,Y,e),l.setClipUrl(E,Y,e)}function X(e){y(e).attr("d","M0,0Z")}function Z(e){return e.filter((function(e){return!e.gap&&e.vis}))}function K(e){return e.filter((function(e){return e.vis}))}function J(e){return e.filter((function(e){return!e.gap}))}function Q(e){return e.id}function ee(e){if(e.ids)return Q}function te(){return!1}}t.exports=function(e,t,n,i,o,c){var u,d,p=!o,g=!!o&&o.duration>0,m=h(e,t,n);(u=i.selectAll("g.trace").data(m,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,n){t.each((function(t){var i=a(r.select(this),"g","fills");l.setClipUrl(i,n.layerClipId,e);var o=t[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(e){o[e]=null})).remove(),u.order().each((function(e){o[e]=a(r.select(this),"path","js-fill")}))}))}(e,u,t),g?(c&&(d=c()),r.transition().duration(o.duration).ease(o.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){i.selectAll("g.trace").each((function(n,r){f(e,r,t,n,m,this,o)}))}))):u.each((function(n,r){f(e,r,t,n,m,this,o)})),p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},{"../../components/drawing":388,"../../lib":503,"../../lib/polygon":515,"../../registry":638,"./line_points":940,"./link_traces":942,"./subtypes":951,"@plotly/d3":58}],948:[function(e,t,n){"use strict";var r=e("./subtypes");t.exports=function(e,t){var n,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(n=0;n<s.length;n++)s[n].selected=0;else for(n=0;n<s.length;n++)i=s[n],o=l.c2p(i.x),a=c.c2p(i.y),null!==i.i&&t.contains([o,a],!1,n,e)?(u.push({pointNumber:i.i,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{"./subtypes":951}],949:[function(e,t,n){"use strict";var r=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=t.xaxis+t.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],u=!1;c?c.traces.push(t):(c=l[a]={traceIndices:[],traces:[t]},u=!0);for(var h={orientation:t.x&&!t.y?"h":"v"},d=0;d<r.length;d++){var f=r[d],p=f+"Found";if(!c[p]){var g=void 0!==e[f],m="orientation"===f;if((g||u)&&(c[f]=i(f,h[f]),m&&(c.fillDflt="h"===c[f]?"tonextx":"tonexty"),g&&(c[p]=!0,!u&&(delete c.traces[0][f],m))))for(var v=0;v<c.traces.length-1;v++){var y=c.traces[v];y._input.fill!==y.fill&&(y.fill=c.fillDflt)}}}return c}}},{}],950:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../registry");function a(e,t,n){i.pointStyle(e.selectAll("path.point"),t,n)}function s(e,t,n){i.textPointStyle(e.selectAll("text"),t,n)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){a(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){s(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle),o.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:s,styleOnSelect:function(e,t,n){var r=t[0].trace;r.selectedpoints?(i.selectedPointStyle(n.selectAll("path.point"),r),i.selectedTextStyle(n.selectAll("text"),r)):(a(n,r,e),s(n,r,e))}}},{"../../components/drawing":388,"../../registry":638,"@plotly/d3":58}],951:[function(e,t,n){"use strict";var r=e("../../lib");t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){return r.isPlainObject(e.marker)&&r.isArrayOrTypedArray(e.marker.size)}}},{"../../lib":503}],952:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t,n,i,o){o=o||{},i("textposition"),r.coerceFont(i,"textfont",n.font),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},{"../../lib":503}],953:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry");t.exports=function(e,t,n,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],n),s){var c=r.minRowLength(s);l?a=Math.min(c,r.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=r.minRowLength(l),o("x0"),o("dx")}return t._length=a,a}},{"../../lib":503,"../../registry":638}],954:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../plots/attributes"),c=e("../../constants/gl3d_dashes"),u=e("../../constants/gl3d_markers"),h=e("../../lib/extend").extendFlat,d=e("../../plot_api/edit_types").overrideAll,f=e("../../lib/sort_object_keys"),p=r.line,g=r.marker,m=g.line,v=h({width:p.width,dash:{valType:"enumerated",values:f(c),dflt:"solid"}},i("line"));var y=t.exports=d({x:r.x,y:r.y,z:{valType:"data_array"},text:h({},r.text,{}),texttemplate:s({},{}),hovertext:h({},r.hovertext,{}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:h({},r.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},y:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},z:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}},connectgaps:r.connectgaps,line:v,marker:h({symbol:{valType:"enumerated",values:f(u),dflt:"circle",arrayOk:!0},size:h({},g.size,{dflt:8}),sizeref:g.sizeref,sizemin:g.sizemin,sizemode:g.sizemode,opacity:h({},g.opacity,{arrayOk:!1}),colorbar:g.colorbar,line:h({width:h({},m.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:h({},r.textposition,{dflt:"top center"}),textfont:{color:r.textfont.color,size:r.textfont.size,family:h({},r.textfont.family,{arrayOk:!1})},opacity:l.opacity,hoverinfo:h({},l.hoverinfo)},"calc","nested");y.x.editType=y.y.editType=y.z.editType="calc+clearAxisTypes"},{"../../components/colorscale/attributes":373,"../../constants/gl3d_dashes":476,"../../constants/gl3d_markers":477,"../../lib/extend":493,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../scatter/attributes":926}],955:[function(e,t,n){"use strict";var r=e("../scatter/arrays_to_calcdata"),i=e("../scatter/colorscale_calc");t.exports=function(e,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return r(n,t),i(e,t),n}},{"../scatter/arrays_to_calcdata":925,"../scatter/colorscale_calc":929}],956:[function(e,t,n){"use strict";var r=e("../../registry");function i(e,t,n,i){if(!t||!t.visible)return null;for(var o=r.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),s=0;s<e.length;s++){var l=o(+e[s],s);if("log"===i.type){var c=i.c2l(e[s]),u=e[s]-l[0],h=e[s]+l[1];if(a[s]=[(i.c2l(u,!0)-c)*n,(i.c2l(h,!0)-c)*n],u>0){var d=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=d),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,d)}}else a[s]=[-l[0]*n,l[1]*n]}return a}t.exports=function(e,t,n){var r=[i(e.x,e.error_x,t[0],n.xaxis),i(e.y,e.error_y,t[1],n.yaxis),i(e.z,e.error_z,t[2],n.zaxis)],o=function(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}(r);if(0===o)return null;for(var a=new Array(o),s=0;s<o;s++){for(var l=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(r[c])for(var u=0;u<2;u++)l[u][c]=r[c][s][u];a[s]=l}return a}},{"../../registry":638}],957:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_line3d,i=e("../../../stackgl_modules").gl_scatter3d,o=e("../../../stackgl_modules").gl_error3d,a=e("../../../stackgl_modules").gl_mesh3d,s=e("../../../stackgl_modules").delaunay_triangulate,l=e("../../lib"),c=e("../../lib/str2rgbarray"),u=e("../../lib/gl_format_color").formatColor,h=e("../scatter/make_bubble_size_func"),d=e("../../constants/gl3d_dashes"),f=e("../../constants/gl3d_markers"),p=e("../../plots/cartesian/axes"),g=e("../../components/fx/helpers").appendArrayPointValue,m=e("./calc_errors");function v(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var y=v.prototype;function b(e){return null==e?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function _(e){return null==e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function x(e,t){return t(4*e)}function w(e){return f[e]}function A(e,t,n,r,i){var o=null;if(l.isArrayOrTypedArray(e)){o=[];for(var a=0;a<t;a++)void 0===e[a]?o[a]=r:o[a]=n(e[a],i)}else o=n(e,l.identity);return o}function k(e,t){var n,r,i,o,a,s,d=[],f=e.fullSceneLayout,v=e.dataScale,y=f.xaxis,k=f.yaxis,T=f.zaxis,S=t.marker,E=t.line,C=t.x||[],M=t.y||[],O=t.z||[],L=C.length,D=t.xcalendar,I=t.ycalendar,R=t.zcalendar;for(a=0;a<L;a++)n=y.d2l(C[a],0,D)*v[0],r=k.d2l(M[a],0,I)*v[1],i=T.d2l(O[a],0,R)*v[2],d[a]=[n,r,i];if(Array.isArray(t.text))s=t.text;else if(void 0!==t.text)for(s=new Array(L),a=0;a<L;a++)s[a]=t.text;function P(e,t){var n=f[e];return p.tickText(n,n.d2l(t),!0).text}var N=t.texttemplate;if(N){var z=e.fullLayout._d3locale,F=Array.isArray(N),B=F?Math.min(N.length,L):L,j=F?function(e){return N[e]}:function(){return N};for(s=new Array(B),a=0;a<B;a++){var U={x:C[a],y:M[a],z:O[a]},V={xLabel:P("xaxis",C[a]),yLabel:P("yaxis",M[a]),zLabel:P("zaxis",O[a])},q={};g(q,t,a);var H=t._meta||{};s[a]=l.texttemplateString(j(a),V,z,q,U,H)}}if(o={position:d,mode:t.mode,text:s},"line"in t&&(o.lineColor=u(E,1,L),o.lineWidth=E.width,o.lineDashes=E.dash),"marker"in t){var $=h(t);o.scatterColor=u(S,1,L),o.scatterSize=A(S.size,L,x,20,$),o.scatterMarker=A(S.symbol,L,w,""),o.scatterLineWidth=S.line.width,o.scatterLineColor=u(S.line,1,L),o.scatterAngle=0}"textposition"in t&&(o.textOffset=function(e){var t=[0,0];if(Array.isArray(e))for(var n=0;n<e.length;n++)t[n]=[0,0],e[n]&&(t[n][0]=b(e[n]),t[n][1]=_(e[n]));else t[0]=b(e),t[1]=_(e);return t}(t.textposition),o.textColor=u(t.textfont,1,L),o.textSize=A(t.textfont.size,L,l.identity,12),o.textFont=t.textfont.family,o.textAngle=0);var W=["x","y","z"];for(o.project=[!1,!1,!1],o.projectScale=[1,1,1],o.projectOpacity=[1,1,1],a=0;a<3;++a){var G=t.projection[W[a]];(o.project[a]=G.show)&&(o.projectOpacity[a]=G.opacity,o.projectScale[a]=G.scale)}o.errorBounds=m(t,v,f);var Y=function(e){for(var t=[0,0,0],n=[[0,0,0],[0,0,0],[0,0,0]],r=[1,1,1],i=0;i<3;i++){var o=e[i];o&&!1!==o.copy_zstyle&&!1!==e[2].visible&&(o=e[2]),o&&o.visible&&(t[i]=o.width/2,n[i]=c(o.color),r[i]=o.thickness)}return{capSize:t,color:n,lineWidth:r}}([t.error_x,t.error_y,t.error_z]);return o.errorColor=Y.color,o.errorLineWidth=Y.lineWidth,o.errorCapSize=Y.capSize,o.delaunayAxis=t.surfaceaxis,o.delaunayColor=c(t.surfacecolor),o}function T(e){if(l.isArrayOrTypedArray(e)){var t=e[0];return l.isArrayOrTypedArray(t)&&(e=t),"rgb("+e.slice(0,3).map((function(e){return Math.round(255*e)}))+")"}return null}function S(e){return l.isArrayOrTypedArray(e)?4===e.length&&"number"==typeof e[0]?T(e):e.map(T):null}y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[t]||0===this.textLabels[t])&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}},y.update=function(e){var t,n,l,c,u=this.scene.glplot.gl,h=d.solid;this.data=e;var f=k(this.scene,e);"mode"in f&&(this.mode=f.mode),"lineDashes"in f&&f.lineDashes in d&&(h=d[f.lineDashes]),this.color=S(f.scatterColor)||S(f.lineColor),this.dataPoints=f.position,t={gl:this.scene.glplot.gl,position:f.position,color:f.lineColor,lineWidth:f.lineWidth||1,dashes:h[0],dashScale:h[1],opacity:e.opacity,connectGaps:e.connectgaps},-1!==this.mode.indexOf("lines")?this.linePlot?this.linePlot.update(t):(this.linePlot=r(t),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var p=e.opacity;if(e.marker&&e.marker.opacity&&(p*=e.marker.opacity),n={gl:this.scene.glplot.gl,position:f.position,color:f.scatterColor,size:f.scatterSize,glyph:f.scatterMarker,opacity:p,orthographic:!0,lineWidth:f.scatterLineWidth,lineColor:f.scatterLineColor,project:f.project,projectScale:f.projectScale,projectOpacity:f.projectOpacity},-1!==this.mode.indexOf("markers")?this.scatterPlot?this.scatterPlot.update(n):(this.scatterPlot=i(n),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),c={gl:this.scene.glplot.gl,position:f.position,glyph:f.text,color:f.textColor,size:f.textSize,angle:f.textAngle,alignment:f.textOffset,font:f.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,-1!==this.mode.indexOf("text")?this.textMarkers?this.textMarkers.update(c):(this.textMarkers=i(c),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:this.scene.glplot.gl,position:f.position,color:f.errorColor,error:f.errorBounds,lineWidth:f.errorLineWidth,capSize:f.errorCapSize,opacity:e.opacity},this.errorBars?f.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):f.errorBounds&&(this.errorBars=o(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),f.delaunayAxis>=0){var g=function(e,t,n){var r,i=(n+1)%3,o=(n+2)%3,a=[],l=[];for(r=0;r<e.length;++r){var c=e[r];!isNaN(c[i])&&isFinite(c[i])&&!isNaN(c[o])&&isFinite(c[o])&&(a.push([c[i],c[o]]),l.push(r))}var u=s(a);for(r=0;r<u.length;++r)for(var h=u[r],d=0;d<h.length;++d)h[d]=l[h[d]];return{positions:e,cells:u,meshColor:t}}(f.position,f.delaunayColor,f.delaunayAxis);g.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=u,this.delaunayMesh=a(g),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},t.exports=function(e,t){var n=new v(e,t.uid);return n.update(t),n}},{"../../../stackgl_modules":1120,"../../components/fx/helpers":402,"../../constants/gl3d_dashes":476,"../../constants/gl3d_markers":477,"../../lib":503,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../scatter/make_bubble_size_func":943,"./calc_errors":956}],958:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../scatter/subtypes"),a=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/text_defaults"),c=e("./attributes");t.exports=function(e,t,n,u){function h(n,r){return i.coerce(e,t,c,n,r)}if(function(e,t,n,i){var o=0,a=n("x"),s=n("y"),l=n("z");return r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),t._length=t._xlength=t._ylength=t._zlength=o),o}(e,t,h,u)){h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),o.hasLines(t)&&(h("connectgaps"),s(e,t,n,u,h)),o.hasMarkers(t)&&a(e,t,n,u,h,{noSelect:!0}),o.hasText(t)&&(h("texttemplate"),l(e,t,u,h,{noSelect:!0}));var d=(t.line||{}).color,f=(t.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",d||f);for(var p=["x","y","z"],g=0;g<3;++g){var m="projection."+p[g];h(m+".show")&&(h(m+".opacity"),h(m+".scale"))}var v=r.getComponentMethod("errorbars","supplyDefaults");v(e,t,d||f||n,{axis:"z"}),v(e,t,d||f||n,{axis:"y",inherit:"z"}),v(e,t,d||f||n,{axis:"x",inherit:"z"})}else t.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":954}],959:[function(e,t,n){"use strict";t.exports={plot:e("./convert"),attributes:e("./attributes"),markerSymbols:e("../../constants/gl3d_markers"),supplyDefaults:e("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":477,"../../plots/gl3d":598,"./attributes":954,"./calc":955,"./convert":957,"./defaults":958}],960:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../../plots/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../components/colorscale/attributes"),l=e("../../lib/extend").extendFlat,c=r.marker,u=r.line,h=c.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},r.mode,{dflt:"markers"}),text:l({},r.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},r.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:r.connectgaps,fill:l({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:h.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:r.textfont,textposition:r.textposition,selected:r.selected,unselected:r.unselected,hoverinfo:l({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:r.hoveron,hovertemplate:o()}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],961:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../scatter/colorscale_calc"),o=e("../scatter/arrays_to_calcdata"),a=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=e("../carpet/lookup_carpetid");t.exports=function(e,t){var n=t._carpetTrace=l(e,t);if(n&&n.visible&&"legendonly"!==n.visible){var c;t.xaxis=n.xaxis,t.yaxis=n.yaxis;var u,h,d=t._length,f=new Array(d),p=!1;for(c=0;c<d;c++)if(u=t.a[c],h=t.b[c],r(u)&&r(h)){var g=n.ab2xy(+u,+h,!0),m=n.isVisible(+u,+h);m||(p=!0),f[c]={x:g[0],y:g[1],a:u,b:h,vis:m}}else f[c]={x:!1,y:!1};return t._needsCull=p,f[0].carpet=n,f[0].trace=t,s(t,d),i(e,t),o(f,t),a(f,t),f}}},{"../carpet/lookup_carpetid":708,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],962:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/constants"),o=e("../scatter/subtypes"),a=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/line_shape_defaults"),c=e("../scatter/text_defaults"),u=e("../scatter/fillcolor_defaults"),h=e("./attributes");t.exports=function(e,t,n,d){function f(n,i){return r.coerce(e,t,h,n,i)}f("carpet"),t.xaxis="x",t.yaxis="y";var p=f("a"),g=f("b"),m=Math.min(p.length,g.length);if(m){t._length=m,f("text"),f("texttemplate"),f("hovertext"),f("mode",m<i.PTS_LINESONLY?"lines+markers":"lines"),o.hasLines(t)&&(s(e,t,n,d,f),l(e,t,f),f("connectgaps")),o.hasMarkers(t)&&a(e,t,n,d,f,{gradient:!0}),o.hasText(t)&&c(e,t,d,f);var v=[];(o.hasMarkers(t)||o.hasText(t))&&(f("marker.maxdisplayed"),v.push("points")),f("fill"),"none"!==t.fill&&(u(e,t,n,f),o.hasLines(t)||l(e,t,f)),"tonext"!==t.fill&&"toself"!==t.fill||v.push("fills"),"fills"!==f("hoveron",v.join("+")||"points")&&f("hovertemplate"),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":960}],963:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){var o=r[i];return e.a=o.a,e.b=o.b,e.y=o.y,e}},{}],964:[function(e,t,n){"use strict";t.exports=function(e,t){var n={},r=t._carpet,i=r.ab2ij([e.a,e.b]),o=Math.floor(i[0]),a=i[0]-o,s=Math.floor(i[1]),l=i[1]-s,c=r.evalxy([],o,s,a,l);return n.yLabel=c[1].toFixed(3),n}},{}],965:[function(e,t,n){"use strict";var r=e("../scatter/hover"),i=e("../../lib").fillText;t.exports=function(e,t,n,o){var a=r(e,t,n,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index){var l=1-s.y0/e.ya._length,c=e.xa._length,u=c*l/2,h=c-u;return s.x0=Math.max(Math.min(s.x0,h),u),s.x1=Math.max(Math.min(s.x1,h),u),a}var d=s.cd[s.index];s.a=d.a,s.b=d.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var f=s.trace,p=f._carpet,g=f._module.formatLabels(d,f);s.yLabel=g.yLabel,delete s.text;var m=[];if(!f.hovertemplate){var v=(d.hi||f.hoverinfo).split("+");-1!==v.indexOf("all")&&(v=["a","b","text"]),-1!==v.indexOf("a")&&y(p.aaxis,d.a),-1!==v.indexOf("b")&&y(p.baxis,d.b),m.push("y: "+s.yLabel),-1!==v.indexOf("text")&&i(d,f,m),s.extraText=m.join("<br>")}return a}function y(e,t){var n;n=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(n+": "+t.toFixed(3)+e.labelsuffix)}}},{"../../lib":503,"../scatter/hover":937}],966:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:e("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":960,"./calc":961,"./defaults":962,"./event_data":963,"./format_labels":964,"./hover":965,"./plot":967}],967:[function(e,t,n){"use strict";var r=e("../scatter/plot"),i=e("../../plots/cartesian/axes"),o=e("../../components/drawing");t.exports=function(e,t,n,a){var s,l,c,u=n[0][0].carpet,h={xaxis:i.getFromId(e,u.xaxis||"x"),yaxis:i.getFromId(e,u.yaxis||"y"),plot:t.plot};for(r(e,h,n,a),s=0;s<n.length;s++)l=n[s][0].trace,c=a.selectAll("g.trace"+l.uid+" .js-line"),o.setClipUrl(c,n[s][0].carpet._clipPathId,e)}},{"../../components/drawing":388,"../../plots/cartesian/axes":554,"../scatter/plot":947}],968:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../scatter/attributes"),a=e("../../plots/attributes"),s=e("../../components/colorscale/attributes"),l=e("../../components/drawing/attributes").dash,c=e("../../lib/extend").extendFlat,u=e("../../plot_api/edit_types").overrideAll,h=o.marker,d=o.line,f=h.line;t.exports=u({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:c({},o.hovertext,{}),textfont:o.textfont,textposition:o.textposition,line:{color:d.color,width:d.width,dash:l},connectgaps:o.connectgaps,marker:c({symbol:h.symbol,opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,colorbar:h.colorbar,line:c({width:f.width},s("marker.line")),gradient:h.gradient},s("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:o.fillcolor,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:r()},"calc","nested")},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],969:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../constants/numerical").BADNUM,o=e("../scatter/colorscale_calc"),a=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection"),l=e("../../lib")._;function c(e){return e&&"string"==typeof e}t.exports=function(e,t){var n,u=Array.isArray(t.locations),h=u?t.locations.length:t._length,d=new Array(h);n=t.geojson?function(e){return c(e)||r(e)}:c;for(var f=0;f<h;f++){var p=d[f]={};if(u){var g=t.locations[f];p.loc=n(g)?g:null}else{var m=t.lon[f],v=t.lat[f];r(m)&&r(v)?p.lonlat=[+m,+v]:p.lonlat=[i,i]}}return a(d,t),o(e,t),s(d,t),h&&(d[0].t={labels:{lat:l(e,"lat:")+" ",lon:l(e,"lon:")+" "}}),d}},{"../../constants/numerical":479,"../../lib":503,"../scatter/arrays_to_calcdata":925,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],970:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),a=e("../scatter/line_defaults"),s=e("../scatter/text_defaults"),l=e("../scatter/fillcolor_defaults"),c=e("./attributes");t.exports=function(e,t,n,u){function h(n,i){return r.coerce(e,t,c,n,i)}var d,f=h("locations");if(f&&f.length){var p,g=h("geojson");("string"==typeof g&&""!==g||r.isPlainObject(g))&&(p="geojson-id"),"geojson-id"===h("locationmode",p)&&h("featureidkey"),d=f.length}else{var m=h("lon")||[],v=h("lat")||[];d=Math.min(m.length,v.length)}d?(t._length=d,h("text"),h("hovertext"),h("hovertemplate"),h("mode"),i.hasLines(t)&&(a(e,t,n,u,h),h("connectgaps")),i.hasMarkers(t)&&o(e,t,n,u,h,{gradient:!0}),i.hasText(t)&&(h("texttemplate"),s(e,t,u,h)),h("fill"),"none"!==t.fill&&l(e,t,n,h),r.coerceSelectionMarkerOpacity(t,h)):t.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":968}],971:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var o=r[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e}},{}],972:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var i={},o=n[t.geo]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=r.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=r.tickText(o,o.c2l(a[1]),!0).text,i}},{"../../plots/cartesian/axes":554}],973:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../constants/numerical").BADNUM,o=e("../scatter/get_trace_color"),a=e("../../lib").fillText,s=e("./attributes");t.exports=function(e,t,n){var l=e.cd,c=l[0].trace,u=e.xa,h=e.ya,d=e.subplot,f=d.projection.isLonLatOverEdges,p=d.project;if(r.getClosest(l,(function(e){var r=e.lonlat;if(r[0]===i)return 1/0;if(f(r))return 1/0;var o=p(r),a=p([t,n]),s=Math.abs(o[0]-a[0]),l=Math.abs(o[1]-a[1]),c=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)}),e),!1!==e.index){var g=l[e.index],m=g.lonlat,v=[u.c2p(m),h.c2p(m)],y=g.mrc||1;e.x0=v[0]-y,e.x1=v[0]+y,e.y0=v[1]-y,e.y1=v[1]+y,e.loc=g.loc,e.lon=m[0],e.lat=m[1];var b={};b[c.geo]={_subplot:d};var _=c._module.formatLabels(g,c,b);return e.lonLabel=_.lonLabel,e.latLabel=_.latLabel,e.color=o(c,g),e.extraText=function(e,t,n,r){if(!e.hovertemplate){var i=t.hi||e.hoverinfo,o="all"===i?s.hoverinfo.flags:i.split("+"),l=-1!==o.indexOf("location")&&Array.isArray(e.locations),c=-1!==o.indexOf("lon"),u=-1!==o.indexOf("lat"),h=-1!==o.indexOf("text"),d=[];return l?d.push(t.loc):c&&u?d.push("("+f(n.latLabel)+", "+f(n.lonLabel)+")"):c?d.push(r.lon+f(n.lonLabel)):u&&d.push(r.lat+f(n.latLabel)),h&&a(t,e,d),d.join("<br>")}function f(e){return e+""}}(c,g,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":936,"./attributes":968}],974:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:e("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":589,"../scatter/marker_colorbar":944,"../scatter/style":950,"./attributes":968,"./calc":969,"./defaults":970,"./event_data":971,"./format_labels":972,"./hover":973,"./plot":975,"./select":976,"./style":977}],975:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../lib/topojson_utils").getTopojsonFeatures,a=e("../../lib/geojson_utils"),s=e("../../lib/geo_location_utils"),l=e("../../plots/cartesian/autorange").findExtremes,c=e("../../constants/numerical").BADNUM,u=e("../scatter/calc").calcMarkerSize,h=e("../scatter/subtypes"),d=e("./style");t.exports={calcGeoJSON:function(e,t){var n,r,i=e[0].trace,a=t[i.geo],h=a._subplot,d=i._length;if(Array.isArray(i.locations)){var f=i.locationmode,p="geojson-id"===f?s.extractTraceFeature(e):o(i,h.topojson);for(n=0;n<d;n++){r=e[n];var g="geojson-id"===f?r.fOut:s.locationToFeature(f,r.loc,p);r.lonlat=g?g.properties.ct:[c,c]}}var m,v,y={padded:!0};if("geojson"===a.fitbounds&&"geojson-id"===i.locationmode){var b=s.computeBbox(s.getTraceGeojson(i));m=[b[0],b[2]],v=[b[1],b[3]]}else{for(m=new Array(d),v=new Array(d),n=0;n<d;n++)r=e[n],m[n]=r.lonlat[0],v[n]=r.lonlat[1];y.ppad=u(i,d)}i._extremes.lon=l(a.lonaxis._ax,m,y),i._extremes.lat=l(a.lataxis._ax,v,y)},plot:function(e,t,n){var o=t.layers.frontplot.select(".scatterlayer"),s=i.makeTraceGroups(o,n,"trace scattergeo");function l(e,t){e.lonlat[0]===c&&r.select(t).remove()}s.selectAll("*").remove(),s.each((function(t){var n=r.select(this),o=t[0].trace;if(h.hasLines(o)||"none"!==o.fill){var s=a.calcTraceToLineCoords(t),c="none"!==o.fill?a.makePolygon(s):a.makeLine(s);n.selectAll("path.js-line").data([{geojson:c,trace:o}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}h.hasMarkers(o)&&n.selectAll("path.point").data(i.identity).enter().append("path").classed("point",!0).each((function(e){l(e,this)})),h.hasText(o)&&n.selectAll("g").data(i.identity).enter().append("g").append("text").each((function(e){l(e,this)})),d(e,t)}))}}},{"../../constants/numerical":479,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/geojson_utils":497,"../../lib/topojson_utils":532,"../../plots/cartesian/autorange":553,"../scatter/calc":927,"../scatter/subtypes":951,"./style":977,"@plotly/d3":58}],976:[function(e,t,n){"use strict";var r=e("../scatter/subtypes"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t){var n,o,a,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,d=[],f=c[0].trace;if(!r.hasMarkers(f)&&!r.hasText(f))return[];if(!1===t)for(l=0;l<c.length;l++)c[l].selected=0;else for(l=0;l<c.length;l++)(o=(n=c[l]).lonlat)[0]!==i&&(a=u.c2p(o),s=h.c2p(o),t.contains([a,s],null,l,e)?(d.push({pointNumber:l,lon:o[0],lat:o[1]}),n.selected=1):n.selected=0);return d}},{"../../constants/numerical":479,"../scatter/subtypes":951}],977:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../components/color"),a=e("../scatter/style"),s=a.stylePoints,l=a.styleText;t.exports=function(e,t){t&&function(e,t){var n=t[0].trace,a=t[0].node3;a.style("opacity",t[0].trace.opacity),s(a,n,e),l(a,n,e),a.selectAll("path.js-line").style("fill","none").each((function(e){var t=r.select(this),n=e.trace,a=n.line||{};t.call(o.stroke,a.color).call(i.dashLine,a.dash||"",a.width||0),"none"!==n.fill&&t.call(o.fill,n.fillcolor)}))}(e,t)}},{"../../components/color":366,"../../components/drawing":388,"../scatter/style":950,"@plotly/d3":58}],978:[function(e,t,n){"use strict";var r=e("../../plots/attributes"),i=e("../scatter/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../components/colorscale/attributes"),s=e("../../lib/sort_object_keys"),l=e("../../lib/extend").extendFlat,c=e("../../plot_api/edit_types").overrideAll,u=e("./constants").DASHES,h=i.line,d=i.marker,f=d.line,p=t.exports=c({x:i.x,x0:i.x0,dx:i.dx,y:i.y,y0:i.y0,dy:i.dy,xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:h.color,width:h.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:s(u),dflt:"solid"}},marker:l({},a("marker"),{symbol:d.symbol,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:l({},a("marker.line"),{width:f.width})}),connectgaps:i.connectgaps,fill:l({},i.fill,{dflt:"none"}),fillcolor:i.fillcolor,selected:{marker:i.selected.marker,textfont:i.selected.textfont},unselected:{marker:i.unselected.marker,textfont:i.unselected.textfont},opacity:r.opacity},"calc","nested");p.x.editType=p.y.editType=p.x0.editType=p.y0.editType="calc+clearAxisTypes",p.hovertemplate=i.hovertemplate,p.texttemplate=i.texttemplate},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../lib/sort_object_keys":526,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../scatter/attributes":926,"./constants":980}],979:[function(e,t,n){"use strict";var r=e("@plotly/point-cluster"),i=e("../../lib"),o=e("../../plots/cartesian/axis_ids"),a=e("../../plots/cartesian/autorange").findExtremes,s=e("../../plots/cartesian/align_period"),l=e("../scatter/calc"),c=l.calcMarkerSize,u=l.calcAxisExpansion,h=l.setFirstScatter,d=e("../scatter/colorscale_calc"),f=e("./convert"),p=e("./scene_update"),g=e("../../constants/numerical").BADNUM,m=e("./constants").TOO_MANY_POINTS;function v(e,t,n){var r=e._extremes[t._id],i=a(t,n._bnds,{padded:!0});r.min=r.min.concat(i.min),r.max=r.max.concat(i.max)}t.exports=function(e,t){var n,a=e._fullLayout,l=o.getFromId(e,t.xaxis),y=o.getFromId(e,t.yaxis),b=a._plots[t.xaxis+t.yaxis],_=t._length,x=_>=m,w=2*_,A={},k=l.makeCalcdata(t,"x"),T=y.makeCalcdata(t,"y"),S=s(t,l,"x",k),E=s(t,y,"y",T),C=S.vals,M=E.vals;t._x=C,t._y=M,t.xperiodalignment&&(t._origX=k,t._xStarts=S.starts,t._xEnds=S.ends),t.yperiodalignment&&(t._origY=T,t._yStarts=E.starts,t._yEnds=E.ends);var O=new Array(w),L=new Array(_);for(n=0;n<_;n++)O[2*n]=C[n]===g?NaN:C[n],O[2*n+1]=M[n]===g?NaN:M[n],L[n]=n;if("log"===l.type)for(n=0;n<w;n+=2)O[n]=l.c2l(O[n]);if("log"===y.type)for(n=1;n<w;n+=2)O[n]=y.c2l(O[n]);x&&"log"!==l.type&&"log"!==y.type?A.tree=r(O):A.ids=L,d(e,t);var D,I=function(e,t,n,r,o,a){var s=f.style(e,n);if(s.marker&&(s.marker.positions=r),s.line&&r.length>1&&i.extendFlat(s.line,f.linePositions(e,n,r)),s.errorX||s.errorY){var l=f.errorBarPositions(e,n,r,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:r},f.textPosition(e,n,s.text,s.marker)),i.extendFlat(s.textSel,{positions:r},f.textPosition(e,n,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:r},f.textPosition(e,n,s.text,s.markerUnsel))),s}(e,0,t,O,C,M),R=p(e,b);return h(a,t),x?I.marker&&(D=I.marker.sizeAvg||Math.max(I.marker.size,3)):D=c(t,_),u(e,t,l,y,C,M,D),I.errorX&&v(t,l,I.errorX),I.errorY&&v(t,y,I.errorY),I.fill&&!R.fill2d&&(R.fill2d=!0),I.marker&&!R.scatter2d&&(R.scatter2d=!0),I.line&&!R.line2d&&(R.line2d=!0),!I.errorX&&!I.errorY||R.error2d||(R.error2d=!0),I.text&&!R.glText&&(R.glText=!0),I.marker&&(I.marker.snap=_),R.lineOptions.push(I.line),R.errorXOptions.push(I.errorX),R.errorYOptions.push(I.errorY),R.fillOptions.push(I.fill),R.markerOptions.push(I.marker),R.markerSelectedOptions.push(I.markerSel),R.markerUnselectedOptions.push(I.markerUnsel),R.textOptions.push(I.text),R.textSelectedOptions.push(I.textSel),R.textUnselectedOptions.push(I.textUnsel),R.selectBatch.push([]),R.unselectBatch.push([]),A._scene=R,A.index=R.count,A.x=C,A.y=M,A.positions=O,R.count++,[{x:!1,y:!1,t:A,trace:t}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"../scatter/calc":927,"../scatter/colorscale_calc":929,"./constants":980,"./convert":981,"./scene_update":989,"@plotly/point-cluster":59}],980:[function(e,t,n){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],981:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("svg-path-sdf"),o=e("color-normalize"),a=e("../../registry"),s=e("../../lib"),l=e("../../components/drawing"),c=e("../../plots/cartesian/axis_ids"),u=e("../../lib/gl_format_color").formatColor,h=e("../scatter/subtypes"),d=e("../scatter/make_bubble_size_func"),f=e("./helpers"),p=e("./constants"),g=e("../../constants/interactions").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=e("../../components/fx/helpers").appendArrayPointValue;function y(e,t){var n,i=e._fullLayout,o=t._length,a=t.textfont,l=t.textposition,c=Array.isArray(l)?l:[l],u=a.color,h=a.size,d=a.family,f={},p=e._context.plotGlPixelRatio,g=t.texttemplate;if(g){f.text=[];var m=i._d3locale,y=Array.isArray(g),b=y?Math.min(g.length,o):o,_=y?function(e){return g[e]}:function(){return g};for(n=0;n<b;n++){var x={i:n},w=t._module.formatLabels(x,t,i),A={};v(A,t,n);var k=t._meta||{};f.text.push(s.texttemplateString(_(n),w,m,A,x,k))}}else Array.isArray(t.text)&&t.text.length<o?f.text=t.text.slice():f.text=t.text;if(Array.isArray(f.text))for(n=f.text.length;n<o;n++)f.text[n]="";for(f.opacity=t.opacity,f.font={},f.align=[],f.baseline=[],n=0;n<c.length;n++){var T=c[n].split(/\s+/);switch(T[1]){case"left":f.align.push("right");break;case"right":f.align.push("left");break;default:f.align.push(T[1])}switch(T[0]){case"top":f.baseline.push("bottom");break;case"bottom":f.baseline.push("top");break;default:f.baseline.push(T[0])}}if(Array.isArray(u))for(f.color=new Array(o),n=0;n<o;n++)f.color[n]=u[n];else f.color=u;if(s.isArrayOrTypedArray(h)||Array.isArray(d))for(f.font=new Array(o),n=0;n<o;n++){var S=f.font[n]={};S.size=(s.isTypedArray(h)?h[n]:Array.isArray(h)?r(h[n])?h[n]:0:h)*p,S.family=Array.isArray(d)?d[n]:d}else f.font={size:h*p,family:d};return f}function b(e){var t,n,r=e._length,i=e.marker,a={},l=s.isArrayOrTypedArray(i.symbol),c=s.isArrayOrTypedArray(i.color),h=s.isArrayOrTypedArray(i.line.color),p=s.isArrayOrTypedArray(i.opacity),g=s.isArrayOrTypedArray(i.size),m=s.isArrayOrTypedArray(i.line.width);if(l||(n=f.isOpenSymbol(i.symbol)),l||c||h||p){a.colors=new Array(r),a.borderColors=new Array(r);var v=u(i,i.opacity,r),y=u(i.line,i.opacity,r);if(!Array.isArray(y[0])){var b=y;for(y=Array(r),t=0;t<r;t++)y[t]=b}if(!Array.isArray(v[0])){var _=v;for(v=Array(r),t=0;t<r;t++)v[t]=_}for(a.colors=v,a.borderColors=y,t=0;t<r;t++){if(l){var x=i.symbol[t];n=f.isOpenSymbol(x)}n&&(y[t]=v[t].slice(),v[t]=v[t].slice(),v[t][3]=0)}a.opacity=e.opacity}else n?(a.color=o(i.color,"uint8"),a.color[3]=0,a.borderColor=o(i.color,"uint8")):(a.color=o(i.color,"uint8"),a.borderColor=o(i.line.color,"uint8")),a.opacity=e.opacity*i.opacity;if(l)for(a.markers=new Array(r),t=0;t<r;t++)a.markers[t]=C(i.symbol[t]);else a.marker=C(i.symbol);var w,A=d(e,1);if(g||m){var k,T=a.sizes=new Array(r),S=a.borderSizes=new Array(r),E=0;if(g){for(t=0;t<r;t++)T[t]=A(i.size[t]),E+=T[t];k=E/r}else for(w=A(i.size),t=0;t<r;t++)T[t]=w;if(m)for(t=0;t<r;t++)S[t]=i.line.width[t];else for(w=i.line.width,t=0;t<r;t++)S[t]=w;a.sizeAvg=k}else a.size=A(i&&i.size||10),a.borderSizes=A(i.line.width);return a}function _(e,t){var n=e.marker,r={};return t?(t.marker&&t.marker.symbol?r=b(s.extendFlat({},n,t.marker)):t.marker&&(t.marker.size&&(r.size=t.marker.size),t.marker.color&&(r.colors=t.marker.color),void 0!==t.marker.opacity&&(r.opacity=t.marker.opacity)),r):r}function x(e,t,n){var r={};if(!n)return r;if(n.textfont){var i={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:s.extendFlat({},t.textfont)};n.textfont&&s.extendFlat(i.textfont,n.textfont),r=y(e,i)}return r}function w(e,t,n){var r={capSize:2*t.width*n,lineWidth:t.thickness*n,color:t.color};return t.copy_ystyle&&(r=e.error_y),r}var A=p.SYMBOL_SDF_SIZE,k=p.SYMBOL_SIZE,T=p.SYMBOL_STROKE,S={},E=l.symbolFuncs[0](.05*k);function C(e){if("circle"===e)return null;var t,n,r=l.symbolNumber(e),o=l.symbolFuncs[r%100],a=!!l.symbolNoDot[r%100],s=!!l.symbolNoFill[r%100],c=f.isDotSymbol(e);return S[e]?S[e]:(t=c&&!a?o(1.1*k)+E:o(k),n=i(t,{w:A,h:A,viewBox:[-k,-k,k,k],stroke:s?T:-T}),S[e]=n,n||null)}t.exports={style:function(e,t){var n,r={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(!0!==t.visible)return r;if(h.hasText(t)&&(r.text=y(e,t),r.textSel=x(e,t,t.selected),r.textUnsel=x(e,t,t.unselected)),h.hasMarkers(t)&&(r.marker=b(t),r.markerSel=_(t,t.selected),r.markerUnsel=_(t,t.unselected),!t.unselected&&s.isArrayOrTypedArray(t.marker.opacity))){var o=t.marker.opacity;for(r.markerUnsel.opacity=new Array(o.length),n=0;n<o.length;n++)r.markerUnsel.opacity[n]=g*o[n]}if(h.hasLines(t)){r.line={overlay:!0,thickness:t.line.width*i,color:t.line.color,opacity:t.opacity};var a=(p.DASHES[t.line.dash]||[1]).slice();for(n=0;n<a.length;++n)a[n]*=t.line.width*i;r.line.dashes=a}return t.error_x&&t.error_x.visible&&(r.errorX=w(t,t.error_x,i)),t.error_y&&t.error_y.visible&&(r.errorY=w(t,t.error_y,i)),t.fill&&"none"!==t.fill&&(r.fill={closed:!0,fill:t.fillcolor,thickness:0}),r},markerStyle:b,markerSelection:_,linePositions:function(e,t,n){var r,i,o=n.length,a=o/2;if(h.hasLines(t)&&a)if("hv"===t.line.shape){for(r=[],i=0;i<a-1;i++)isNaN(n[2*i])||isNaN(n[2*i+1])?r.push(NaN,NaN,NaN,NaN):(r.push(n[2*i],n[2*i+1]),isNaN(n[2*i+2])||isNaN(n[2*i+3])?r.push(NaN,NaN):r.push(n[2*i+2],n[2*i+1]));r.push(n[o-2],n[o-1])}else if("hvh"===t.line.shape){for(r=[],i=0;i<a-1;i++)if(isNaN(n[2*i])||isNaN(n[2*i+1])||isNaN(n[2*i+2])||isNaN(n[2*i+3]))isNaN(n[2*i])||isNaN(n[2*i+1])?r.push(NaN,NaN):r.push(n[2*i],n[2*i+1]),r.push(NaN,NaN);else{var s=(n[2*i]+n[2*i+2])/2;r.push(n[2*i],n[2*i+1],s,n[2*i+1],s,n[2*i+3])}r.push(n[o-2],n[o-1])}else if("vhv"===t.line.shape){for(r=[],i=0;i<a-1;i++)if(isNaN(n[2*i])||isNaN(n[2*i+1])||isNaN(n[2*i+2])||isNaN(n[2*i+3]))isNaN(n[2*i])||isNaN(n[2*i+1])?r.push(NaN,NaN):r.push(n[2*i],n[2*i+1]),r.push(NaN,NaN);else{var l=(n[2*i+1]+n[2*i+3])/2;r.push(n[2*i],n[2*i+1],n[2*i],l,n[2*i+2],l)}r.push(n[o-2],n[o-1])}else if("vh"===t.line.shape){for(r=[],i=0;i<a-1;i++)isNaN(n[2*i])||isNaN(n[2*i+1])?r.push(NaN,NaN,NaN,NaN):(r.push(n[2*i],n[2*i+1]),isNaN(n[2*i+2])||isNaN(n[2*i+3])?r.push(NaN,NaN):r.push(n[2*i],n[2*i+3]));r.push(n[o-2],n[o-1])}else r=n;var c=!1;for(i=0;i<r.length;i++)if(isNaN(r[i])){c=!0;break}var u=c||r.length>p.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var d=r[0],f=r[1];for(i=0;i<r.length;i+=2)isNaN(r[i])||isNaN(r[i+1])?(r[i]=d,r[i+1]=f):(d=r[i],f=r[i+1])}return{join:u,positions:r}},errorBarPositions:function(e,t,n,i,o){var s=a.getComponentMethod("errorbars","makeComputeError"),l=c.getFromId(e,t.xaxis),u=c.getFromId(e,t.yaxis),h=n.length/2,d={};function f(e,i){var o=i._id.charAt(0),a=t["error_"+o];if(a&&a.visible&&("linear"===i.type||"log"===i.type)){for(var l=s(a),c={x:0,y:1}[o],u={x:[0,1,2,3],y:[2,3,0,1]}[o],f=new Float64Array(4*h),p=1/0,g=-1/0,m=0,v=0;m<h;m++,v+=4){var y=e[m];if(r(y)){var b=n[2*m+c],_=l(y,m),x=_[0],w=_[1];if(r(x)&&r(w)){var A=y-x,k=y+w;f[v+u[0]]=b-i.c2l(A),f[v+u[1]]=i.c2l(k)-b,f[v+u[2]]=0,f[v+u[3]]=0,p=Math.min(p,y-x),g=Math.max(g,y+w)}}}d[o]={positions:n,errors:f,_bnds:[p,g]}}}return f(i,l),f(o,u),d},textPosition:function(e,t,n,r){var i,o=t._length,a={};if(h.hasMarkers(t)){var s=n.font,l=n.align,c=n.baseline;for(a.offset=new Array(o),i=0;i<o;i++){var u=r.sizes?r.sizes[i]:r.size,d=Array.isArray(s)?s[i].size:s.size,f=Array.isArray(l)?l.length>1?l[i]:l[0]:l,p=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[f],v=m[p],y=u?u/.8+1:0,b=-v*y-.5*v;a.offset[i]=[g*y/d,b/d]}}return a}}},{"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/interactions":478,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/cartesian/axis_ids":558,"../../registry":638,"../scatter/make_bubble_size_func":943,"../scatter/subtypes":951,"./constants":980,"./helpers":985,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":310}],982:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../registry"),o=e("./helpers"),a=e("./attributes"),s=e("../scatter/constants"),l=e("../scatter/subtypes"),c=e("../scatter/xy_defaults"),u=e("../scatter/period_defaults"),h=e("../scatter/marker_defaults"),d=e("../scatter/line_defaults"),f=e("../scatter/fillcolor_defaults"),p=e("../scatter/text_defaults");t.exports=function(e,t,n,g){function m(n,i){return r.coerce(e,t,a,n,i)}var v=!!e.marker&&o.isOpenSymbol(e.marker.symbol),y=l.isBubble(e),b=c(e,t,g,m);if(b){u(e,t,g,m),m("xhoverformat"),m("yhoverformat");var _=b<s.PTS_LINESONLY?"lines+markers":"lines";m("text"),m("hovertext"),m("hovertemplate"),m("mode",_),l.hasLines(t)&&(m("connectgaps"),d(e,t,n,g,m),m("line.shape")),l.hasMarkers(t)&&(h(e,t,n,g,m),m("marker.line.width",v||y?1:0)),l.hasText(t)&&(m("texttemplate"),p(e,t,g,m));var x=(t.line||{}).color,w=(t.marker||{}).color;m("fill"),"none"!==t.fill&&f(e,t,n,m);var A=i.getComponentMethod("errorbars","supplyDefaults");A(e,t,x||w||n,{axis:"y"}),A(e,t,x||w||n,{axis:"x",inherit:"y"}),r.coerceSelectionMarkerOpacity(t,m)}else t.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/period_defaults":946,"../scatter/subtypes":951,"../scatter/text_defaults":952,"../scatter/xy_defaults":953,"./attributes":978,"./helpers":985}],983:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../../constants/interactions").DESELECTDIM;t.exports={styleTextSelection:function(e){var t,n,a=e[0],s=a.trace,l=a.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},g=c.textUnselectedOptions[u]||{},m=r.extendFlat({},f);if(h.length||d.length){var v=p.color,y=g.color,b=f.color,_=Array.isArray(b);for(m.color=new Array(s._length),t=0;t<h.length;t++)n=h[t],m.color[n]=v||(_?b[n]:b);for(t=0;t<d.length;t++){n=d[t];var x=_?b[n]:b;m.color[n]=y||(v?x:i.addOpacity(x,o))}}c.glText[u].update(m)}}},{"../../components/color":366,"../../constants/interactions":478,"../../lib":503}],984:[function(e,t,n){"use strict";var r=e("../scatter/format_labels");t.exports=function(e,t,n){var i=e.i;return"x"in e||(e.x=t._x[i]),"y"in e||(e.y=t._y[i]),r(e,t,n)}},{"../scatter/format_labels":935}],985:[function(e,t,n){"use strict";var r=e("./constants");n.isOpenSymbol=function(e){return"string"==typeof e?r.OPEN_RE.test(e):e%200>100},n.isDotSymbol=function(e){return"string"==typeof e?r.DOT_RE.test(e):e>200}},{"./constants":980}],986:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../scatter/get_trace_color");function a(e,t,n,a){var s=e.xa,l=e.ya,c=e.distance,u=e.dxy,h=e.index,d={pointNumber:h,x:t[h],y:n[h]};d.tx=Array.isArray(a.text)?a.text[h]:a.text,d.htx=Array.isArray(a.hovertext)?a.hovertext[h]:a.hovertext,d.data=Array.isArray(a.customdata)?a.customdata[h]:a.customdata,d.tp=Array.isArray(a.textposition)?a.textposition[h]:a.textposition;var f=a.textfont;f&&(d.ts=i.isArrayOrTypedArray(f.size)?f.size[h]:f.size,d.tc=Array.isArray(f.color)?f.color[h]:f.color,d.tf=Array.isArray(f.family)?f.family[h]:f.family);var p=a.marker;p&&(d.ms=i.isArrayOrTypedArray(p.size)?p.size[h]:p.size,d.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[h]:p.opacity,d.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[h]:p.symbol,d.mc=i.isArrayOrTypedArray(p.color)?p.color[h]:p.color);var g=p&&p.line;g&&(d.mlc=Array.isArray(g.color)?g.color[h]:g.color,d.mlw=i.isArrayOrTypedArray(g.width)?g.width[h]:g.width);var m=p&&p.gradient;m&&"none"!==m.type&&(d.mgt=Array.isArray(m.type)?m.type[h]:m.type,d.mgc=Array.isArray(m.color)?m.color[h]:m.color);var v=s.c2p(d.x,!0),y=l.c2p(d.y,!0),b=d.mrc||1,_=a.hoverlabel;_&&(d.hbg=Array.isArray(_.bgcolor)?_.bgcolor[h]:_.bgcolor,d.hbc=Array.isArray(_.bordercolor)?_.bordercolor[h]:_.bordercolor,d.hts=i.isArrayOrTypedArray(_.font.size)?_.font.size[h]:_.font.size,d.htc=Array.isArray(_.font.color)?_.font.color[h]:_.font.color,d.htf=Array.isArray(_.font.family)?_.font.family[h]:_.font.family,d.hnl=i.isArrayOrTypedArray(_.namelength)?_.namelength[h]:_.namelength);var x=a.hoverinfo;x&&(d.hi=Array.isArray(x)?x[h]:x);var w=a.hovertemplate;w&&(d.ht=Array.isArray(w)?w[h]:w);var A={};A[e.index]=d;var k=a._origX,T=a._origY,S=i.extendFlat({},e,{color:o(a,d),x0:v-b,x1:v+b,xLabelVal:k?k[h]:d.x,y0:y-b,y1:y+b,yLabelVal:T?T[h]:d.y,cd:A,distance:c,spikeDistance:u,hovertemplate:d.ht});return d.htx?S.text=d.htx:d.tx?S.text=d.tx:a.text&&(S.text=a.text),i.fillText(d,a,S),r.getComponentMethod("errorbars","hoverInfo")(d,a,S),S}t.exports={hoverPoints:function(e,t,n,r){var i,o,s,l,c,u,h,d,f,p,g=e.cd,m=g[0].t,v=g[0].trace,y=e.xa,b=e.ya,_=m.x,x=m.y,w=y.c2p(t),A=b.c2p(n),k=e.distance;if(m.tree){var T=y.p2c(w-k),S=y.p2c(w+k),E=b.p2c(A-k),C=b.p2c(A+k);i="x"===r?m.tree.range(Math.min(T,S),Math.min(b._rl[0],b._rl[1]),Math.max(T,S),Math.max(b._rl[0],b._rl[1])):m.tree.range(Math.min(T,S),Math.min(E,C),Math.max(T,S),Math.max(E,C))}else i=m.ids;var M=k;if("x"===r){var O=!!v.xperiodalignment,L=!!v.yperiodalignment;for(u=0;u<i.length;u++){if(l=_[o=i[u]],h=Math.abs(y.c2p(l)-w),O){var D=y.c2p(v._xStarts[o]),I=y.c2p(v._xEnds[o]);h=w>=Math.min(D,I)&&w<=Math.max(D,I)?0:1/0}if(h<M){if(M=h,c=x[o],d=b.c2p(c)-A,L){var R=b.c2p(v._yStarts[o]),P=b.c2p(v._yEnds[o]);d=A>=Math.min(R,P)&&A<=Math.max(R,P)?0:1/0}p=Math.sqrt(h*h+d*d),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=_[o=i[u]],c=x[o],h=y.c2p(l)-w,d=b.c2p(c)-A,(f=Math.sqrt(h*h+d*d))<M&&(M=p=f,s=o);return e.index=s,e.distance=M,e.dxy=p,void 0===s?[e]:[a(e,_,x,v)]},calcHover:a}},{"../../lib":503,"../../registry":638,"../scatter/get_trace_color":936}],987:[function(e,t,n){"use strict";var r=e("./hover");t.exports={moduleType:"trace",name:"scattergl",basePlotModule:e("../../plots/cartesian"),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../scatter/cross_trace_defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:r.hoverPoints,selectPoints:e("./select"),meta:{}}},{"../../plots/cartesian":568,"../scatter/cross_trace_defaults":932,"../scatter/marker_colorbar":944,"./attributes":978,"./calc":979,"./defaults":982,"./format_labels":984,"./hover":986,"./plot":988,"./select":990}],988:[function(e,t,n){"use strict";var r=e("regl-scatter2d"),i=e("regl-line2d"),o=e("regl-error2d"),a=e("gl-text"),s=e("../../lib"),l=e("../../components/dragelement/helpers").selectMode,c=e("../../lib/prepare_regl"),u=e("../scatter/subtypes"),h=e("../scatter/link_traces"),d=e("./edit_style").styleTextSelection;function f(e,t,n,r){var i=e._size,o=e.width*r,a=e.height*r,s=i.l*r,l=i.b*r,c=i.r*r,u=i.t*r,h=i.w*r,d=i.h*r;return[s+t.domain[0]*h,l+n.domain[0]*d,o-c-(1-t.domain[1])*h,a-u-(1-n.domain[1])*d]}t.exports=function(e,t,n){if(n.length){var p,g,m=e._fullLayout,v=t._scene,y=t.xaxis,b=t.yaxis;if(v)if(c(e,["ANGLE_instanced_arrays","OES_element_index_uint"])){var _=v.count,x=m._glcanvas.data()[0].regl;if(h(e,t,n),v.dirty){if(!0===v.error2d&&(v.error2d=o(x)),!0===v.line2d&&(v.line2d=i(x)),!0===v.scatter2d&&(v.scatter2d=r(x)),!0===v.fill2d&&(v.fill2d=i(x)),!0===v.glText)for(v.glText=new Array(_),p=0;p<_;p++)v.glText[p]=new a(x);if(v.glText){if(_>v.glText.length){var w=_-v.glText.length;for(p=0;p<w;p++)v.glText.push(new a(x))}else if(_<v.glText.length){var A=v.glText.length-_;v.glText.splice(_,A).forEach((function(e){e.destroy()}))}for(p=0;p<_;p++)v.glText[p].update(v.textOptions[p])}if(v.line2d&&(v.line2d.update(v.lineOptions),v.lineOptions=v.lineOptions.map((function(e){if(e&&e.positions){for(var t=e.positions,n=0;n<t.length&&(isNaN(t[n])||isNaN(t[n+1]));)n+=2;for(var r=t.length-2;r>n&&(isNaN(t[r])||isNaN(t[r+1]));)r-=2;e.positions=t.slice(n,r+2)}return e})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,_),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(e,t){var r=n[t];if(e&&r&&r[0]&&r[0].trace){var i,o,a=r[0],s=a.trace,l=a.t,c=v.lineOptions[t],u=[];s._ownfill&&u.push(t),s._nexttrace&&u.push(t+1),u.length&&(v.fillOrder[t]=u);var h,d,f=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(h=0;h<p.length&&isNaN(p[h+1]);)h+=2;for(d=p.length-2;d>h&&isNaN(p[d+1]);)d-=2;0!==p[h+1]&&(f=[p[h],0]),f=f.concat(p.slice(h,d+2)),0!==p[d+1]&&(f=f.concat([p[d],0]))}else if("tozerox"===s.fill){for(h=0;h<p.length&&isNaN(p[h]);)h+=2;for(d=p.length-2;d>h&&isNaN(p[d]);)d-=2;0!==p[h]&&(f=[0,p[h+1]]),f=f.concat(p.slice(h,d+2)),0!==p[d]&&(f=f.concat([0,p[d+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(f=[],i=0,e.splitNull=!0,o=0;o<p.length;o+=2)(isNaN(p[o])||isNaN(p[o+1]))&&((f=f.concat(p.slice(i,o))).push(p[i],p[i+1]),f.push(null,null),i=o+2);f=f.concat(p.slice(i)),i&&f.push(p[i],p[i+1])}else{var g=s._nexttrace;if(g){var m=v.lineOptions[t+1];if(m){var y=m.positions;if("tonexty"===s.fill){for(f=p.slice(),t=Math.floor(y.length/2);t--;){var b=y[2*t],_=y[2*t+1];isNaN(b)||isNaN(_)||f.push(b,_)}e.fill=g.fillcolor}}}}if(s._prevtrace&&"tonext"===s._prevtrace.fill){var x=v.lineOptions[t-1].positions,w=f.length/2,A=[i=w];for(o=0;o<x.length;o+=2)(isNaN(x[o])||isNaN(x[o+1]))&&(A.push(o/2+w+1),i=o+2);f=f.concat(x),e.hole=A}return e.fillmode=s.fill,e.opacity=s.opacity,e.positions=f,e}})),v.fill2d.update(v.fillOptions))}var T=m.dragmode,S=l(T),E=m.clickmode.indexOf("select")>-1;for(p=0;p<_;p++){var C=n[p][0],M=C.trace,O=C.t,L=O.index,D=M._length,I=O.x,R=O.y;if(M.selectedpoints||S||E){if(S||(S=!0),M.selectedpoints){var P=v.selectBatch[L]=s.selIndices2selPoints(M),N={};for(g=0;g<P.length;g++)N[P[g]]=1;var z=[];for(g=0;g<D;g++)N[g]||z.push(g);v.unselectBatch[L]=z}var F=O.xpx=new Array(D),B=O.ypx=new Array(D);for(g=0;g<D;g++)F[g]=y.c2p(I[g]),B[g]=b.c2p(R[g])}else O.xpx=O.ypx=null}if(S){if(v.select2d||(v.select2d=r(m._glcanvas.data()[1].regl)),v.scatter2d){var j=new Array(_);for(p=0;p<_;p++)j[p]=v.selectBatch[p].length||v.unselectBatch[p].length?v.markerUnselectedOptions[p]:{};v.scatter2d.update(j)}v.select2d&&(v.select2d.update(v.markerOptions),v.select2d.update(v.markerSelectedOptions)),v.glText&&n.forEach((function(e){var t=((e||[])[0]||{}).trace||{};u.hasText(t)&&d(e)}))}else v.scatter2d&&v.scatter2d.update(v.markerOptions);var U={viewport:f(m,y,b,e._context.plotGlPixelRatio),range:[(y._rl||y.range)[0],(b._rl||b.range)[0],(y._rl||y.range)[1],(b._rl||b.range)[1]]},V=s.repeat(U,v.count);v.fill2d&&v.fill2d.update(V),v.line2d&&v.line2d.update(V),v.error2d&&v.error2d.update(V.concat(V)),v.scatter2d&&v.scatter2d.update(V),v.select2d&&v.select2d.update(V),v.glText&&v.glText.forEach((function(e){e.update(U)}))}else v.init()}}},{"../../components/dragelement/helpers":384,"../../lib":503,"../../lib/prepare_regl":516,"../scatter/link_traces":942,"../scatter/subtypes":951,"./edit_style":983,"gl-text":225,"regl-error2d":279,"regl-line2d":280,"regl-scatter2d":281}],989:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){var n=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((n=t._scene={}).init=function(){r.extendFlat(n,o,i)},n.init(),n.update=function(e){var t=r.repeat(e,n.count);if(n.fill2d&&n.fill2d.update(t),n.scatter2d&&n.scatter2d.update(t),n.line2d&&n.line2d.update(t),n.error2d&&n.error2d.update(t.concat(t)),n.select2d&&n.select2d.update(t),n.glText)for(var i=0;i<n.count;i++)n.glText[i].update(e)},n.draw=function(){for(var e=n.count,t=n.fill2d,i=n.error2d,o=n.line2d,a=n.scatter2d,s=n.glText,l=n.select2d,c=n.selectBatch,u=n.unselectBatch,h=0;h<e;h++){if(t&&n.fillOrder[h]&&t.draw(n.fillOrder[h]),o&&n.lineOptions[h]&&o.draw(h),i&&(n.errorXOptions[h]&&i.draw(h),n.errorYOptions[h]&&i.draw(h+e)),a&&n.markerOptions[h])if(u[h].length){var d=r.repeat([],n.count);d[h]=u[h],a.draw(d)}else c[h].length||a.draw(h);s[h]&&n.textOptions[h]&&s[h].render()}l&&l.draw(c),n.dirty=!1},n.destroy=function(){n.fill2d&&n.fill2d.destroy&&n.fill2d.destroy(),n.scatter2d&&n.scatter2d.destroy&&n.scatter2d.destroy(),n.error2d&&n.error2d.destroy&&n.error2d.destroy(),n.line2d&&n.line2d.destroy&&n.line2d.destroy(),n.select2d&&n.select2d.destroy&&n.select2d.destroy(),n.glText&&n.glText.forEach((function(e){e.destroy&&e.destroy()})),n.lineOptions=null,n.fillOptions=null,n.markerOptions=null,n.markerSelectedOptions=null,n.markerUnselectedOptions=null,n.errorXOptions=null,n.errorYOptions=null,n.textOptions=null,n.textSelectedOptions=null,n.textUnselectedOptions=null,n.selectBatch=null,n.unselectBatch=null,t._scene=null}),n.dirty||r.extendFlat(n,i),n}},{"../../lib":503}],990:[function(e,t,n){"use strict";var r=e("../scatter/subtypes"),i=e("./edit_style").styleTextSelection;t.exports=function(e,t){var n=e.cd,o=e.xaxis,a=e.yaxis,s=[],l=n[0].trace,c=n[0].t,u=l._length,h=c.x,d=c.y,f=c._scene,p=c.index;if(!f)return s;var g=r.hasText(l),m=r.hasMarkers(l),v=!m&&!g;if(!0!==l.visible||v)return s;var y=[],b=[];if(!1!==t&&!t.degenerate)for(var _=0;_<u;_++)t.contains([c.xpx[_],c.ypx[_]],!1,_,e)?(y.push(_),s.push({pointNumber:_,x:o.c2d(h[_]),y:a.c2d(d[_])})):b.push(_);if(m){var x=f.scatter2d;if(y.length||b.length){if(!f.selectBatch[p].length&&!f.unselectBatch[p].length){var w=new Array(f.count);w[p]=f.markerUnselectedOptions[p],x.update.apply(x,w)}}else{var A=new Array(f.count);A[p]=f.markerOptions[p],x.update.apply(x,A)}}return f.selectBatch[p]=y,f.unselectBatch[p]=b,g&&i(n),s}},{"../scatter/subtypes":951,"./edit_style":983}],991:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../scattergeo/attributes"),a=e("../scatter/attributes"),s=e("../../plots/mapbox/layout_attributes"),l=e("../../plots/attributes"),c=e("../../components/colorscale/attributes"),u=e("../../lib/extend").extendFlat,h=e("../../plot_api/edit_types").overrideAll,d=o.line,f=o.marker;t.exports=h({lon:o.lon,lat:o.lat,mode:u({},a.mode,{dflt:"markers"}),text:u({},a.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:u({},a.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:a.connectgaps,marker:u({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode},c("marker")),fill:o.fill,fillcolor:a.fillcolor,textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:"string"},selected:{marker:a.selected.marker},unselected:{marker:a.unselected.marker},hoverinfo:u({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r()},"calc","nested")},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/mapbox/layout_attributes":615,"../../plots/template_attributes":633,"../scatter/attributes":926,"../scattergeo/attributes":968}],992:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical").BADNUM,a=e("../../lib/geojson_utils"),s=e("../../components/colorscale"),l=e("../../components/drawing"),c=e("../scatter/make_bubble_size_func"),u=e("../scatter/subtypes"),h=e("../../plots/mapbox/convert_text_opts"),d=e("../../components/fx/helpers").appendArrayPointValue,f=e("../../lib/svg_text_utils").NEWLINES,p=e("../../lib/svg_text_utils").BR_TAG_ALL;function g(){return{geojson:a.makeBlank(),layout:{visibility:"none"},paint:{}}}function m(e,t){return i.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:v}function v(){return""}function y(e){return e[0]===o}t.exports=function(e,t){var n,o=t[0].trace,b=!0===o.visible&&0!==o._length,_="none"!==o.fill,x=u.hasLines(o),w=u.hasMarkers(o),A=u.hasText(o),k=w&&"circle"===o.marker.symbol,T=w&&"circle"!==o.marker.symbol,S=g(),E=g(),C=g(),M=g(),O={fill:S,line:E,circle:C,symbol:M};if(!b)return O;if((_||x)&&(n=a.calcTraceToLineCoords(t)),_&&(S.geojson=a.makePolygon(n),S.layout.visibility="visible",i.extendFlat(S.paint,{"fill-color":o.fillcolor})),x&&(E.geojson=a.makeLine(n),E.layout.visibility="visible",i.extendFlat(E.paint,{"line-width":o.line.width,"line-color":o.line.color,"line-opacity":o.opacity})),k){var L=function(e){var t,n,o,a,u=e[0].trace,h=u.marker,d=u.selectedpoints,f=i.isArrayOrTypedArray(h.color),p=i.isArrayOrTypedArray(h.size),g=i.isArrayOrTypedArray(h.opacity);function m(e){return u.opacity*e}f&&(n=s.hasColorscale(u,"marker")?s.makeColorScaleFuncFromTrace(h):i.identity),p&&(o=c(u)),g&&(a=function(e){return m(r(e)?+i.constrain(e,0,1):0)});var v,b,_=[];for(t=0;t<e.length;t++){var x=e[t],w=x.lonlat;if(!y(w)){var A={};n&&(A.mcc=x.mcc=n(x.mc)),o&&(A.mrc=x.mrc=o(x.ms)),a&&(A.mo=a(x.mo)),d&&(A.selected=x.selected||0),_.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}if(d)for(v=l.makeSelectedPointStyleFns(u),t=0;t<_.length;t++){var k=_[t].properties;v.selectedOpacityFn&&(k.mo=m(v.selectedOpacityFn(k))),v.selectedColorFn&&(k.mcc=v.selectedColorFn(k)),v.selectedSizeFn&&(k.mrc=v.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:_},mcc:f||v&&v.selectedColorFn?{type:"identity",property:"mcc"}:h.color,mrc:p||v&&v.selectedSizeFn?{type:"identity",property:"mrc"}:(b=h.size,b/2),mo:g||v&&v.selectedOpacityFn?{type:"identity",property:"mo"}:m(h.opacity)}}(t);C.geojson=L.geojson,C.layout.visibility="visible",i.extendFlat(C.paint,{"circle-color":L.mcc,"circle-radius":L.mrc,"circle-opacity":L.mo})}if((T||A)&&(M.geojson=function(e,t){for(var n=t._fullLayout,r=e[0].trace,o=r.marker||{},a=o.symbol,s=o.angle,l="circle"!==a?m(a):v,c="auto"!==s?m(s,!0):v,h=u.hasText(r)?m(r.text):v,g=[],b=0;b<e.length;b++){var _=e[b];if(!y(_.lonlat)){var x,w=r.texttemplate;if(w){var A=Array.isArray(w)?w[b]||"":w,k=r._module.formatLabels(_,r,n),T={};d(T,r,_.i);var S=r._meta||{};x=i.texttemplateString(A,k,n._d3locale,T,_,S)}else x=h(b);x&&(x=x.replace(f,"").replace(p,"\n")),g.push({type:"Feature",geometry:{type:"Point",coordinates:_.lonlat},properties:{symbol:l(b),angle:c(b),text:x}})}}return{type:"FeatureCollection",features:g}}(t,e),i.extendFlat(M.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),T&&(i.extendFlat(M.layout,{"icon-size":o.marker.size/10}),"angle"in o.marker&&"auto"!==o.marker.angle&&i.extendFlat(M.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),M.layout["icon-allow-overlap"]=o.marker.allowoverlap,i.extendFlat(M.paint,{"icon-opacity":o.opacity*o.marker.opacity,"icon-color":o.marker.color})),A)){var D=(o.marker||{}).size,I=h(o.textposition,D);i.extendFlat(M.layout,{"text-size":o.textfont.size,"text-anchor":I.anchor,"text-offset":I.offset}),i.extendFlat(M.paint,{"text-color":o.textfont.color,"text-opacity":o.opacity})}return O}},{"../../components/colorscale":378,"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/numerical":479,"../../lib":503,"../../lib/geojson_utils":497,"../../lib/svg_text_utils":529,"../../plots/mapbox/convert_text_opts":612,"../scatter/make_bubble_size_func":943,"../scatter/subtypes":951,"fast-isnumeric":190}],993:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),a=e("../scatter/line_defaults"),s=e("../scatter/text_defaults"),l=e("../scatter/fillcolor_defaults"),c=e("./attributes");t.exports=function(e,t,n,u){function h(n,i){return r.coerce(e,t,c,n,i)}if(function(e,t,n){var r=n("lon")||[],i=n("lat")||[],o=Math.min(r.length,i.length);return t._length=o,o}(0,t,h)){if(h("text"),h("texttemplate"),h("hovertext"),h("hovertemplate"),h("mode"),h("below"),i.hasLines(t)&&(a(e,t,n,u,h,{noDash:!0}),h("connectgaps")),i.hasMarkers(t)){o(e,t,n,u,h,{noLine:!0}),h("marker.allowoverlap"),h("marker.angle");var d=t.marker;"circle"!==d.symbol&&(r.isArrayOrTypedArray(d.size)&&(d.size=d.size[0]),r.isArrayOrTypedArray(d.color)&&(d.color=d.color[0]))}i.hasText(t)&&s(e,t,u,h,{noSelect:!0}),h("fill"),"none"!==t.fill&&l(e,t,n,h),r.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1}},{"../../lib":503,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":991}],994:[function(e,t,n){"use strict";t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}},{}],995:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var i={},o=n[t.subplot]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=r.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=r.tickText(o,o.c2l(a[1]),!0).text,i}},{"../../plots/cartesian/axes":554}],996:[function(e,t,n){"use strict";var r=e("../../components/fx"),i=e("../../lib"),o=e("../scatter/get_trace_color"),a=i.fillText,s=e("../../constants/numerical").BADNUM;function l(e,t,n){if(!e.hovertemplate){var r=(t.hi||e.hoverinfo).split("+"),i=-1!==r.indexOf("all"),o=-1!==r.indexOf("lon"),s=-1!==r.indexOf("lat"),l=t.lonlat,c=[];return i||o&&s?c.push("("+u(l[1])+", "+u(l[0])+")"):o?c.push(n.lon+u(l[0])):s&&c.push(n.lat+u(l[1])),(i||-1!==r.indexOf("text"))&&a(t,e,c),c.join("<br>")}function u(e){return e+""}}t.exports={hoverPoints:function(e,t,n){var a=e.cd,c=a[0].trace,u=e.xa,h=e.ya,d=e.subplot,f=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),p=t-f;if(r.getClosest(a,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;var r=i.modHalf(t[0],360),o=t[1],a=d.project([r,o]),l=a.x-u.c2p([p,o]),c=a.y-h.c2p([r,n]),f=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-f,1-3/f)}),e),!1!==e.index){var g=a[e.index],m=g.lonlat,v=[i.modHalf(m[0],360)+f,m[1]],y=u.c2p(v),b=h.c2p(v),_=g.mrc||1;e.x0=y-_,e.x1=y+_,e.y0=b-_,e.y1=b+_;var x={};x[c.subplot]={_subplot:d};var w=c._module.formatLabels(g,c,x);return e.lonLabel=w.lonLabel,e.latLabel=w.latLabel,e.color=o(c,g),e.extraText=l(c,g,a[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}},getExtraText:l}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":936}],997:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("../scattergeo/calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":613,"../scatter/marker_colorbar":944,"../scattergeo/calc":969,"./attributes":991,"./defaults":993,"./event_data":994,"./format_labels":995,"./hover":996,"./plot":998,"./select":999}],998:[function(e,t,n){"use strict";var r=e("./convert"),i=e("../../plots/mapbox/constants").traceLayerPrefix,o=["fill","line","circle","symbol"];function a(e,t){this.type="scattermapbox",this.subplot=e,this.uid=t,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol"},this.layerIds={fill:i+t+"-fill",line:i+t+"-line",circle:i+t+"-circle",symbol:i+t+"-symbol"},this.below=null}var s=a.prototype;s.addSource=function(e,t){this.subplot.map.addSource(this.sourceIds[e],{type:"geojson",data:t.geojson})},s.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},s.addLayer=function(e,t,n){this.subplot.addLayer({type:e,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint},n)},s.update=function(e){var t,n,i,a=this.subplot,s=a.map,l=r(a.gd,e),c=a.belowLookup["trace-"+this.uid];if(c!==this.below){for(t=o.length-1;t>=0;t--)n=o[t],s.removeLayer(this.layerIds[n]);for(t=0;t<o.length;t++)i=l[n=o[t]],this.addLayer(n,i,c);this.below=c}for(t=0;t<o.length;t++)i=l[n=o[t]],a.setOptions(this.layerIds[n],"setLayoutProperty",i.layout),"visible"===i.layout.visibility&&(this.setSourceData(n,i),a.setOptions(this.layerIds[n],"setPaintProperty",i.paint));e[0].trace._glTrace=this},s.dispose=function(){for(var e=this.subplot.map,t=o.length-1;t>=0;t--){var n=o[t];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){for(var n=t[0].trace,i=new a(e,n.uid),s=r(e.gd,t),l=i.below=e.belowLookup["trace-"+n.uid],c=0;c<o.length;c++){var u=o[c],h=s[u];i.addSource(u,h),i.addLayer(u,h,l)}return t[0].trace._glTrace=i,i}},{"../../plots/mapbox/constants":611,"./convert":992}],999:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../../constants/numerical").BADNUM;t.exports=function(e,t){var n,a=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=a[0].trace;if(!i.hasMarkers(u))return[];if(!1===t)for(n=0;n<a.length;n++)a[n].selected=0;else for(n=0;n<a.length;n++){var h=a[n],d=h.lonlat;if(d[0]!==o){var f=[r.modHalf(d[0],360),d[1]],p=[s.c2p(f),l.c2p(f)];t.contains(p,null,n,e)?(c.push({pointNumber:n,lon:d[0],lat:d[1]}),h.selected=1):h.selected=0}}return c}},{"../../constants/numerical":479,"../../lib":503,"../scatter/subtypes":951}],1e3:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../lib/extend").extendFlat,a=e("../scatter/attributes"),s=e("../../plots/attributes"),l=a.line;t.exports={mode:a.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:a.text,texttemplate:i({editType:"plot"},{keys:["r","theta","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:a.hoveron,hovertemplate:r(),selected:a.selected,unselected:a.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1001:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../constants/numerical").BADNUM,o=e("../../plots/cartesian/axes"),a=e("../scatter/colorscale_calc"),s=e("../scatter/arrays_to_calcdata"),l=e("../scatter/calc_selection"),c=e("../scatter/calc").calcMarkerSize;t.exports=function(e,t){for(var n=e._fullLayout,u=t.subplot,h=n[u].radialaxis,d=n[u].angularaxis,f=h.makeCalcdata(t,"r"),p=d.makeCalcdata(t,"theta"),g=t._length,m=new Array(g),v=0;v<g;v++){var y=f[v],b=p[v],_=m[v]={};r(y)&&r(b)?(_.r=y,_.theta=b):_.r=i}var x=c(t,g);return t._extremes.x=o.findExtremes(h,f,{ppad:x}),a(e,t),s(m,t),l(m,t),m}},{"../../constants/numerical":479,"../../plots/cartesian/axes":554,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1002:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),a=e("../scatter/line_defaults"),s=e("../scatter/line_shape_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,h=e("./attributes");function d(e,t,n,r){var i,o=r("r"),a=r("theta");if(o)a?i=Math.min(o.length,a.length):(i=o.length,r("theta0"),r("dtheta"));else{if(!a)return 0;i=t.theta.length,r("r0"),r("dr")}return t._length=i,i}t.exports={handleRThetaDefaults:d,supplyDefaults:function(e,t,n,f){function p(n,i){return r.coerce(e,t,h,n,i)}var g=d(0,t,0,p);if(g){p("thetaunit"),p("mode",g<u?"lines+markers":"lines"),p("text"),p("hovertext"),"fills"!==t.hoveron&&p("hovertemplate"),i.hasLines(t)&&(a(e,t,n,f,p),s(e,t,p),p("connectgaps")),i.hasMarkers(t)&&o(e,t,n,f,p,{gradient:!0}),i.hasText(t)&&(p("texttemplate"),l(e,t,f,p));var m=[];(i.hasMarkers(t)||i.hasText(t))&&(p("cliponaxis"),p("marker.maxdisplayed"),m.push("points")),p("fill"),"none"!==t.fill&&(c(e,t,n,p),i.hasLines(t)||s(e,t,p)),"tonext"!==t.fill&&"toself"!==t.fill||m.push("fills"),p("hoveron",m.join("+")||"points"),r.coerceSelectionMarkerOpacity(t,p)}else t.visible=!1}}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1e3}],1003:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var o,a,s={},l=n[t.subplot]._subplot;l?(o=l.radialAxis,a=l.angularAxis):(o=(l=n[t.subplot]).radialaxis,a=l.angularaxis);var c=o.c2l(e.r);s.rLabel=i.tickText(o,c,!0).text;var u="degrees"===a.thetaunit?r.rad2deg(e.theta):e.theta;return s.thetaLabel=i.tickText(a,u,!0).text,s}},{"../../lib":503,"../../plots/cartesian/axes":554}],1004:[function(e,t,n){"use strict";var r=e("../scatter/hover");function i(e,t,n,r){var i=n.radialAxis,o=n.angularAxis;i._hovertitle="r",o._hovertitle="";var a={};a[t.subplot]={_subplot:n};var s=t._module.formatLabels(e,t,a);r.rLabel=s.rLabel,r.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var h=l.split("+");-1!==h.indexOf("all")&&(h=["r","theta","text"]),-1!==h.indexOf("r")&&u(i,r.rLabel),-1!==h.indexOf("theta")&&u(o,r.thetaLabel),-1!==h.indexOf("text")&&r.text&&(c.push(r.text),delete r.text),r.extraText=c.join("<br>")}}t.exports={hoverPoints:function(e,t,n,o){var a=r(e,t,n,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},{"../scatter/hover":937}],1005:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1e3,"./calc":1001,"./defaults":1002,"./format_labels":1003,"./hover":1004,"./plot":1006}],1006:[function(e,t,n){"use strict";var r=e("../scatter/plot"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t,n){for(var o=t.layers.frontplot.select("g.scatterlayer"),a={xaxis:t.xaxis,yaxis:t.yaxis,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},s=t.radialAxis,l=t.angularAxis,c=0;c<n.length;c++)for(var u=n[c],h=0;h<u.length;h++){var d=u[h],f=d.r;if(f===i)d.x=d.y=i;else{var p=s.c2g(f),g=l.c2g(d.theta);d.x=p*Math.cos(g),d.y=p*Math.sin(g)}}r(e,a,n,o)}},{"../../constants/numerical":479,"../scatter/plot":947}],1007:[function(e,t,n){"use strict";var r=e("../scatterpolar/attributes"),i=e("../scattergl/attributes"),o=e("../../plots/template_attributes").texttemplateAttrs;t.exports={mode:r.mode,r:r.r,theta:r.theta,r0:r.r0,dr:r.dr,theta0:r.theta0,dtheta:r.dtheta,thetaunit:r.thetaunit,text:r.text,texttemplate:o({editType:"plot"},{keys:["r","theta","text"]}),hovertext:r.hovertext,hovertemplate:r.hovertemplate,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,textposition:i.textposition,textfont:i.textfont,hoverinfo:r.hoverinfo,selected:r.selected,unselected:r.unselected}},{"../../plots/template_attributes":633,"../scattergl/attributes":978,"../scatterpolar/attributes":1e3}],1008:[function(e,t,n){"use strict";var r=e("../scatter/colorscale_calc"),i=e("../scatter/calc").calcMarkerSize,o=e("../scattergl/convert"),a=e("../../plots/cartesian/axes"),s=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t){var n=e._fullLayout,l=t.subplot,c=n[l].radialaxis,u=n[l].angularaxis,h=t._r=c.makeCalcdata(t,"r"),d=t._theta=u.makeCalcdata(t,"theta"),f=t._length,p={};f<h.length&&(h=h.slice(0,f)),f<d.length&&(d=d.slice(0,f)),p.r=h,p.theta=d,r(e,t);var g,m=p.opts=o.style(e,t);return f<s?g=i(t,f):m.marker&&(g=2*(m.marker.sizeAvg||Math.max(m.marker.size,3))),t._extremes.x=a.findExtremes(c,h,{ppad:g}),[{x:!1,y:!1,t:p,trace:t}]}},{"../../plots/cartesian/axes":554,"../scatter/calc":927,"../scatter/colorscale_calc":929,"../scattergl/constants":980,"../scattergl/convert":981}],1009:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatterpolar/defaults").handleRThetaDefaults,a=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,h=e("./attributes");t.exports=function(e,t,n,d){function f(n,i){return r.coerce(e,t,h,n,i)}var p=o(e,t,d,f);p?(f("thetaunit"),f("mode",p<u?"lines+markers":"lines"),f("text"),f("hovertext"),"fills"!==t.hoveron&&f("hovertemplate"),i.hasLines(t)&&(s(e,t,n,d,f),f("connectgaps")),i.hasMarkers(t)&&a(e,t,n,d,f),i.hasText(t)&&(f("texttemplate"),l(e,t,d,f)),f("fill"),"none"!==t.fill&&c(e,t,n,f),r.coerceSelectionMarkerOpacity(t,f)):t.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"../scatterpolar/defaults":1002,"./attributes":1007}],1010:[function(e,t,n){"use strict";var r=e("../scatterpolar/format_labels");t.exports=function(e,t,n){var i=e.i;return"r"in e||(e.r=t._r[i]),"theta"in e||(e.theta=t._theta[i]),r(e,t,n)}},{"../scatterpolar/format_labels":1003}],1011:[function(e,t,n){"use strict";var r=e("../scattergl/hover"),i=e("../scatterpolar/hover").makeHoverPointText;t.exports={hoverPoints:function(e,t,n,o){var a=e.cd[0].t,s=a.r,l=a.theta,c=r.hoverPoints(e,t,n,o);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var h=e.subplot,d=u.cd[u.index],f=u.trace;if(d.r=s[u.index],d.theta=l[u.index],h.isPtInside(d))return u.xLabelVal=void 0,u.yLabelVal=void 0,i(d,f,h,u),c}}}},{"../scattergl/hover":986,"../scatterpolar/hover":1004}],1012:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e("../../plots/polar"),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scattergl/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":944,"../scattergl/select":990,"./attributes":1007,"./calc":1008,"./defaults":1009,"./format_labels":1010,"./hover":1011,"./plot":1013}],1013:[function(e,t,n){"use strict";var r=e("@plotly/point-cluster"),i=e("fast-isnumeric"),o=e("../scattergl/plot"),a=e("../scattergl/scene_update"),s=e("../scattergl/convert"),l=e("../../lib"),c=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t,n){if(n.length){var u=t.radialAxis,h=t.angularAxis,d=a(e,t);return n.forEach((function(n){if(n&&n[0]&&n[0].trace){var o,a=n[0],f=a.trace,p=a.t,g=f._length,m=p.r,v=p.theta,y=p.opts,b=m.slice(),_=v.slice();for(o=0;o<m.length;o++)t.isPtInside({r:m[o],theta:v[o]})||(b[o]=NaN,_[o]=NaN);var x=new Array(2*g),w=Array(g),A=Array(g);for(o=0;o<g;o++){var k,T,S=b[o];if(i(S)){var E=u.c2g(S),C=h.c2g(_[o],f.thetaunit);k=E*Math.cos(C),T=E*Math.sin(C)}else k=T=NaN;w[o]=x[2*o]=k,A[o]=x[2*o+1]=T}p.tree=r(x),y.marker&&g>=c&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=x),y.line&&x.length>1&&l.extendFlat(y.line,s.linePositions(e,f,x)),y.text&&(l.extendFlat(y.text,{positions:x},s.textPosition(e,f,y.text,y.marker)),l.extendFlat(y.textSel,{positions:x},s.textPosition(e,f,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:x},s.textPosition(e,f,y.text,y.markerUnsel))),y.fill&&!d.fill2d&&(d.fill2d=!0),y.marker&&!d.scatter2d&&(d.scatter2d=!0),y.line&&!d.line2d&&(d.line2d=!0),y.text&&!d.glText&&(d.glText=!0),d.lineOptions.push(y.line),d.fillOptions.push(y.fill),d.markerOptions.push(y.marker),d.markerSelectedOptions.push(y.markerSel),d.markerUnselectedOptions.push(y.markerUnsel),d.textOptions.push(y.text),d.textSelectedOptions.push(y.textSel),d.textUnselectedOptions.push(y.textUnsel),d.selectBatch.push([]),d.unselectBatch.push([]),p.x=w,p.y=A,p.rawx=w,p.rawy=A,p.r=m,p.theta=v,p.positions=x,p._scene=d,p.index=d.count,d.count++}})),o(e,t,n)}}},{"../../lib":503,"../scattergl/constants":980,"../scattergl/convert":981,"../scattergl/plot":988,"../scattergl/scene_update":989,"@plotly/point-cluster":59,"fast-isnumeric":190}],1014:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../lib/extend").extendFlat,a=e("../scatter/attributes"),s=e("../../plots/attributes"),l=a.line;t.exports={mode:a.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:a.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:a.hoveron,hovertemplate:r(),selected:a.selected,unselected:a.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1015:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../../constants/numerical").BADNUM,o=e("../scatter/colorscale_calc"),a=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection"),l=e("../scatter/calc").calcMarkerSize;t.exports=function(e,t){for(var n=e._fullLayout,c=t.subplot,u=n[c].realaxis,h=n[c].imaginaryaxis,d=u.makeCalcdata(t,"real"),f=h.makeCalcdata(t,"imag"),p=t._length,g=new Array(p),m=0;m<p;m++){var v=d[m],y=f[m],b=g[m]={};r(v)&&r(y)?(b.real=v,b.imag=y):b.real=i}return l(t,p),o(e,t),a(g,t),s(g,t),g}},{"../../constants/numerical":479,"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1016:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),a=e("../scatter/line_defaults"),s=e("../scatter/line_shape_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,h=e("./attributes");t.exports=function(e,t,n,d){function f(n,i){return r.coerce(e,t,h,n,i)}var p=function(e,t,n,r){var i,o=r("real"),a=r("imag");return o&&a&&(i=Math.min(o.length,a.length)),t._length=i,i}(0,t,0,f);if(p){f("mode",p<u?"lines+markers":"lines"),f("text"),f("hovertext"),"fills"!==t.hoveron&&f("hovertemplate"),i.hasLines(t)&&(a(e,t,n,d,f),s(e,t,f),f("connectgaps")),i.hasMarkers(t)&&o(e,t,n,d,f,{gradient:!0}),i.hasText(t)&&(f("texttemplate"),l(e,t,d,f));var g=[];(i.hasMarkers(t)||i.hasText(t))&&(f("cliponaxis"),f("marker.maxdisplayed"),g.push("points")),f("fill"),"none"!==t.fill&&(c(e,t,n,f),i.hasLines(t)||s(e,t,f)),"tonext"!==t.fill&&"toself"!==t.fill||g.push("fills"),f("hoveron",g.join("+")||"points"),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1014}],1017:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var i={},o=n[t.subplot]._subplot;return i.realLabel=r.tickText(o.radialAxis,e.real,!0).text,i.imagLabel=r.tickText(o.angularAxis,e.imag,!0).text,i}},{"../../plots/cartesian/axes":554}],1018:[function(e,t,n){"use strict";var r=e("../scatter/hover");function i(e,t,n,r){var i=n.radialAxis,o=n.angularAxis;i._hovertitle="real",o._hovertitle="imag";var a={};a[t.subplot]={_subplot:n};var s=t._module.formatLabels(e,t,a);r.realLabel=s.realLabel,r.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var h=l.split("+");-1!==h.indexOf("all")&&(h=["real","imag","text"]),-1!==h.indexOf("real")&&u(i,r.realLabel),-1!==h.indexOf("imag")&&u(o,r.imagLabel),-1!==h.indexOf("text")&&r.text&&(c.push(r.text),delete r.text),r.extraText=c.join("<br>")}}t.exports={hoverPoints:function(e,t,n,o){var a=r(e,t,n,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},{"../scatter/hover":937}],1019:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/smith":629,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1014,"./calc":1015,"./defaults":1016,"./format_labels":1017,"./hover":1018,"./plot":1020}],1020:[function(e,t,n){"use strict";var r=e("../scatter/plot"),i=e("../../constants/numerical").BADNUM,o=e("../../plots/smith/helpers").smith;t.exports=function(e,t,n){for(var a=t.layers.frontplot.select("g.scatterlayer"),s={xaxis:t.xaxis,yaxis:t.yaxis,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},l=0;l<n.length;l++)for(var c=n[l],u=0;u<c.length;u++){var h=c[u],d=h.real;if(d===i)h.x=h.y=i;else{var f=o([d,h.imag]);h.x=f[0],h.y=f[1]}}r(e,s,n,a)}},{"../../constants/numerical":479,"../../plots/smith/helpers":628,"../scatter/plot":947}],1021:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../scatter/attributes"),a=e("../../plots/attributes"),s=e("../../components/colorscale/attributes"),l=e("../../components/drawing/attributes").dash,c=e("../../lib/extend").extendFlat,u=o.marker,h=o.line,d=u.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},o.hovertext,{}),line:{color:h.color,width:h.width,dash:l,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:c({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:d.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r()}},{"../../components/colorscale/attributes":373,"../../components/drawing/attributes":387,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":926}],1022:[function(e,t,n){"use strict";var r=e("fast-isnumeric"),i=e("../scatter/colorscale_calc"),o=e("../scatter/arrays_to_calcdata"),a=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};t.exports=function(e,t){var n,u,h,d,f,p,g=e._fullLayout[t.subplot].sum,m=t.sum||g,v={a:t.a,b:t.b,c:t.c};for(n=0;n<l.length;n++)if(!v[h=l[n]]){for(f=v[c[h][0]],p=v[c[h][1]],d=new Array(f.length),u=0;u<f.length;u++)d[u]=m-f[u]-p[u];v[h]=d}var y,b,_,x,w,A,k=t._length,T=new Array(k);for(n=0;n<k;n++)y=v.a[n],b=v.b[n],_=v.c[n],r(y)&&r(b)&&r(_)?(1!=(x=g/((y=+y)+(b=+b)+(_=+_)))&&(y*=x,b*=x,_*=x),A=y,w=_-b,T[n]={x:w,y:A,a:y,b,c:_}):T[n]={x:!1,y:!1};return s(t,k),i(e,t),o(T,t),a(T,t),T}},{"../scatter/arrays_to_calcdata":925,"../scatter/calc":927,"../scatter/calc_selection":928,"../scatter/colorscale_calc":929,"fast-isnumeric":190}],1023:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/constants"),o=e("../scatter/subtypes"),a=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/line_shape_defaults"),c=e("../scatter/text_defaults"),u=e("../scatter/fillcolor_defaults"),h=e("./attributes");t.exports=function(e,t,n,d){function f(n,i){return r.coerce(e,t,h,n,i)}var p,g=f("a"),m=f("b"),v=f("c");if(g?(p=g.length,m?(p=Math.min(p,m.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):m&&v&&(p=Math.min(m.length,v.length)),p){t._length=p,f("sum"),f("text"),f("hovertext"),"fills"!==t.hoveron&&f("hovertemplate"),f("mode",p<i.PTS_LINESONLY?"lines+markers":"lines"),o.hasLines(t)&&(s(e,t,n,d,f),l(e,t,f),f("connectgaps")),o.hasMarkers(t)&&a(e,t,n,d,f,{gradient:!0}),o.hasText(t)&&(f("texttemplate"),c(e,t,d,f));var y=[];(o.hasMarkers(t)||o.hasText(t))&&(f("cliponaxis"),f("marker.maxdisplayed"),y.push("points")),f("fill"),"none"!==t.fill&&(u(e,t,n,f),o.hasLines(t)||l(e,t,f)),"tonext"!==t.fill&&"toself"!==t.fill||y.push("fills"),f("hoveron",y.join("+")||"points"),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},{"../../lib":503,"../scatter/constants":930,"../scatter/fillcolor_defaults":934,"../scatter/line_defaults":939,"../scatter/line_shape_defaults":941,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scatter/text_defaults":952,"./attributes":1021}],1024:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),r[i]){var o=r[i];e.a=o.a,e.b=o.b,e.c=o.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}},{}],1025:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes");t.exports=function(e,t,n){var i={},o=n[t.subplot]._subplot;return i.aLabel=r.tickText(o.aaxis,e.a,!0).text,i.bLabel=r.tickText(o.baxis,e.b,!0).text,i.cLabel=r.tickText(o.caxis,e.c,!0).text,i}},{"../../plots/cartesian/axes":554}],1026:[function(e,t,n){"use strict";var r=e("../scatter/hover");t.exports=function(e,t,n,i){var o=r(e,t,n,i);if(o&&!1!==o[0].index){var a=o[0];if(void 0===a.index){var s=1-a.y0/e.ya._length,l=e.xa._length,c=l*s/2,u=l-c;return a.x0=Math.max(Math.min(a.x0,u),c),a.x1=Math.max(Math.min(a.x1,u),c),o}var h=a.cd[a.index],d=a.trace,f=a.subplot;a.a=h.a,a.b=h.b,a.c=h.c,a.xLabelVal=void 0,a.yLabelVal=void 0;var p={};p[d.subplot]={_subplot:f};var g=d._module.formatLabels(h,d,p);a.aLabel=g.aLabel,a.bLabel=g.bLabel,a.cLabel=g.cLabel;var m=h.hi||d.hoverinfo,v=[];if(!d.hovertemplate){var y=m.split("+");-1!==y.indexOf("all")&&(y=["a","b","c"]),-1!==y.indexOf("a")&&b(f.aaxis,a.aLabel),-1!==y.indexOf("b")&&b(f.baxis,a.bLabel),-1!==y.indexOf("c")&&b(f.caxis,a.cLabel)}return a.extraText=v.join("<br>"),a.hovertemplate=d.hovertemplate,o}function b(e,t){v.push(e._hovertitle+": "+t)}}},{"../scatter/hover":937}],1027:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":634,"../scatter/marker_colorbar":944,"../scatter/select":948,"../scatter/style":950,"./attributes":1021,"./calc":1022,"./defaults":1023,"./event_data":1024,"./format_labels":1025,"./hover":1026,"./plot":1028}],1028:[function(e,t,n){"use strict";var r=e("../scatter/plot");t.exports=function(e,t,n){var i=t.plotContainer;i.select(".scatterlayer").selectAll("*").remove();var o={xaxis:t.xaxis,yaxis:t.yaxis,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},a=t.layers.frontplot.select("g.scatterlayer");r(e,o,n,a)}},{"../scatter/plot":947}],1029:[function(e,t,n){"use strict";var r=e("../scatter/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../scattergl/attributes"),l=e("../../plots/cartesian/constants").idRegex,c=e("../../plot_api/plot_template").templatedArray,u=e("../../lib/extend").extendFlat,h=r.marker,d=h.line,f=u(i("marker.line",{editTypeOverride:"calc"}),{width:u({},d.width,{editType:"calc"}),editType:"calc"}),p=u(i("marker"),{symbol:h.symbol,size:u({},h.size,{editType:"markerSize"}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:h.opacity,colorbar:h.colorbar,line:f,editType:"calc"});function g(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:l[e],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",t.exports={dimensions:c("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:u({},s.text,{}),hovertext:u({},s.hovertext,{}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),marker:p,xaxes:g("x"),yaxes:g("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:s.selected.marker,editType:"calc"},unselected:{marker:s.unselected.marker,editType:"calc"},opacity:s.opacity}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/constants":561,"../../plots/template_attributes":633,"../scatter/attributes":926,"../scattergl/attributes":978}],1030:[function(e,t,n){"use strict";var r=e("regl-line2d"),i=e("../../registry"),o=e("../../lib/prepare_regl"),a=e("../../plots/get_data").getModuleCalcData,s=e("../../plots/cartesian"),l=e("../../plots/cartesian/axis_ids").getFromId,c=e("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function h(e,t,n){for(var r=n.matrixOptions.data.length,i=t._visibleDims,o=n.viewOpts.ranges=new Array(r),a=0;a<i.length;a++){var s=i[a],c=o[a]=new Array(4),u=l(e,t._diag[s][0]);u&&(c[0]=u.r2l(u.range[0]),c[2]=u.r2l(u.range[1]));var h=l(e,t._diag[s][1]);h&&(c[1]=h.r2l(h.range[0]),c[3]=h.r2l(h.range[1]))}n.selectBatch.length||n.unselectBatch.length?n.matrix.update({ranges:o},{ranges:o}):n.matrix.update({ranges:o})}function d(e){var t=e._fullLayout,n=t._glcanvas.data()[0].regl,i=t._splomGrid;i||(i=t._splomGrid=r(n)),i.update(function(e){var t,n=e._context.plotGlPixelRatio,r=e._fullLayout,i=r._size,o=[0,0,r.width*n,r.height*n],a={};function s(e,t,r,i,s,l){r*=n,i*=n,s*=n,l*=n;var c=t[e+"color"],u=t[e+"width"],h=String(c+u);h in a?a[h].data.push(NaN,NaN,r,i,s,l):a[h]={data:[r,i,s,l],join:"rect",thickness:u*n,color:c,viewport:o,range:o,overlay:!1}}for(t in r._splomSubplots){var l,u,h=r._plots[t],d=h.xaxis,f=h.yaxis,p=d._gridVals,g=f._gridVals,m=d._offset,v=d._length,y=f._length,b=i.b+f.domain[0]*i.h,_=-f._m,x=-_*f.r2l(f.range[0],f.calendar);if(d.showgrid)for(t=0;t<p.length;t++)l=m+d.l2p(p[t].x),s("grid",d,l,b,l,b+y);if(f.showgrid)for(t=0;t<g.length;t++)s("grid",f,m,u=b+x+_*g[t].x,m+v,u);c(e,d,f)&&(l=m+d.l2p(0),s("zeroline",d,l,b,l,b+y)),c(e,f,d)&&s("zeroline",f,m,u=b+x+0,m+v,u)}var w=[];for(t in a)w.push(a[t]);return w}(e))}t.exports={name:u,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(e){var t=e._fullLayout,n=i.getModule(u),r=a(e.calcdata,n)[0];o(e,["ANGLE_instanced_arrays","OES_element_index_uint"])&&(t._hasOnlyLargeSploms&&d(e),n.plot(e,{},r))},drag:function(e){var t=e.calcdata,n=e._fullLayout;n._hasOnlyLargeSploms&&d(e);for(var r=0;r<t.length;r++){var i=t[r][0].trace,o=n._splomScenes[i.uid];"splom"===i.type&&o&&o.matrix&&h(e,i,o)}},updateGrid:d,clean:function(e,t,n,r){var i,o={};if(r._splomScenes){for(i=0;i<e.length;i++){var a=e[i];"splom"===a.type&&(o[a.uid]=1)}for(i=0;i<n.length;i++){var l=n[i];if(!o[l.uid]){var c=r._splomScenes[l.uid];c&&c.destroy&&c.destroy(),r._splomScenes[l.uid]=null,delete r._splomScenes[l.uid]}}}0===Object.keys(r._splomScenes||{}).length&&delete r._splomScenes,r._splomGrid&&!t._hasOnlyLargeSploms&&r._hasOnlyLargeSploms&&(r._splomGrid.destroy(),r._splomGrid=null,delete r._splomGrid),s.clean(e,t,n,r)},updateFx:s.updateFx,toSVG:s.toSVG}},{"../../lib/prepare_regl":516,"../../plots/cartesian":568,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_ids":558,"../../plots/get_data":593,"../../registry":638,"regl-line2d":280}],1031:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axis_ids"),o=e("../scatter/calc").calcMarkerSize,a=e("../scatter/calc").calcAxisExpansion,s=e("../scatter/colorscale_calc"),l=e("../scattergl/convert").markerSelection,c=e("../scattergl/convert").markerStyle,u=e("./scene_update"),h=e("../../constants/numerical").BADNUM,d=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t){var n,f,p,g,m,v,y=t.dimensions,b=t._length,_={},x=_.cdata=[],w=_.data=[],A=t._visibleDims=[];function k(e,n){for(var i=e.makeCalcdata({v:n.values,vcalendar:t.calendar},"v"),o=0;o<i.length;o++)i[o]=i[o]===h?NaN:i[o];x.push(i),w.push("log"===e.type?r.simpleMap(i,e.c2l):i)}for(n=0;n<y.length;n++)if((p=y[n]).visible){if(g=i.getFromId(e,t._diag[n][0]),m=i.getFromId(e,t._diag[n][1]),g&&m&&g.type!==m.type){r.log("Skipping splom dimension "+n+" with conflicting axis types");continue}g?(k(g,p),m&&"category"===m.type&&(m._categories=g._categories.slice())):k(m,p),A.push(n)}for(s(e,t),r.extendFlat(_,c(t)),v=x.length*b>d?_.sizeAvg||Math.max(_.size,3):o(t,b),f=0;f<A.length;f++)p=y[n=A[f]],g=i.getFromId(e,t._diag[n][0])||{},m=i.getFromId(e,t._diag[n][1])||{},a(e,t,g,m,x[f],x[f],v);var T=u(e,t);return T.matrix||(T.matrix=!0),T.matrixOptions=_,T.selectedOptions=l(t,t.selected),T.unselectedOptions=l(t,t.unselected),[{x:!1,y:!1,t:{},trace:t}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axis_ids":558,"../scatter/calc":927,"../scatter/colorscale_calc":929,"../scattergl/constants":980,"../scattergl/convert":981,"./scene_update":1038}],1032:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/array_container_defaults"),o=e("./attributes"),a=e("../scatter/subtypes"),s=e("../scatter/marker_defaults"),l=e("../parcoords/merge_length"),c=e("../scattergl/helpers").isOpenSymbol;function u(e,t){function n(n,i){return r.coerce(e,t,o.dimensions,n,i)}n("label");var i=n("values");i&&i.length?n("visible"):t.visible=!1,n("axis.type"),n("axis.matches")}t.exports=function(e,t,n,h){function d(n,i){return r.coerce(e,t,o,n,i)}var f=i(e,t,{name:"dimensions",handleItemDefaults:u}),p=d("diagonal.visible"),g=d("showupperhalf"),m=d("showlowerhalf");if(l(t,f,"values")&&(p||g||m)){d("text"),d("hovertext"),d("hovertemplate"),d("xhoverformat"),d("yhoverformat"),s(e,t,n,h,d);var v=c(t.marker.symbol),y=a.isBubble(t);d("marker.line.width",v||y?1:0),function(e,t,n,r){var i,o,a=t.dimensions,s=a.length,l=t.showupperhalf,c=t.showlowerhalf,u=t.diagonal.visible,h=new Array(s),d=new Array(s);for(i=0;i<s;i++){var f=i?i+1:"";h[i]="x"+f,d[i]="y"+f}var p=r("xaxes",h),g=r("yaxes",d),m=t._diag=new Array(s);t._xaxes={},t._yaxes={};var v=[],y=[];function b(e,r,i,o){if(e){var a=e.charAt(0),s=n._splomAxes[a];if(t["_"+a+"axes"][e]=1,o.push(e),!(e in s)){var l=s[e]={};i&&(l.label=i.label||"",i.visible&&i.axis&&(i.axis.type&&(l.type=i.axis.type),i.axis.matches&&(l.matches=r)))}}}var _=!u&&!c,x=!u&&!l;for(t._axesDim={},i=0;i<s;i++){var w=a[i],A=0===i,k=i===s-1,T=A&&_||k&&x?void 0:p[i],S=A&&x||k&&_?void 0:g[i];b(T,S,w,v),b(S,T,w,y),m[i]=[T,S],t._axesDim[T]=i,t._axesDim[S]=i}for(i=0;i<v.length;i++)for(o=0;o<y.length;o++){var E=v[i]+y[o];i>o&&l||i<o&&c?n._splomSubplots[E]=1:i!==o||!u&&c&&l||(n._splomSubplots[E]=1)}(!c||!u&&l&&c)&&(n._splomGridDflt.xside="bottom",n._splomGridDflt.yside="left")}(0,t,h,d),r.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1}},{"../../lib":503,"../../plots/array_container_defaults":549,"../parcoords/merge_length":897,"../scatter/marker_defaults":945,"../scatter/subtypes":951,"../scattergl/helpers":985,"./attributes":1029}],1033:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/colorscale_calc"),o=e("../scattergl/convert").markerStyle;t.exports=function(e,t){var n=t.trace,a=e._fullLayout._splomScenes[n.uid];if(a){i(e,n),r.extendFlat(a.matrixOptions,o(n));var s=r.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(s,null)}}},{"../../lib":503,"../scatter/colorscale_calc":929,"../scattergl/convert":981}],1034:[function(e,t,n){"use strict";n.getDimIndex=function(e,t){for(var n=t._id,r={x:0,y:1}[n.charAt(0)],i=e._visibleDims,o=0;o<i.length;o++){var a=i[o];if(e._diag[a][r]===n)return o}return!1}},{}],1035:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("../scattergl/hover").calcHover;t.exports={hoverPoints:function(e,t,n){var o=e.cd[0].trace,a=e.scene.matrixOptions.cdata,s=e.xa,l=e.ya,c=s.c2p(t),u=l.c2p(n),h=e.distance,d=r.getDimIndex(o,s),f=r.getDimIndex(o,l);if(!1===d||!1===f)return[e];for(var p,g,m=a[d],v=a[f],y=h,b=0;b<m.length;b++){var _=m[b],x=v[b],w=s.c2p(_)-c,A=l.c2p(x)-u,k=Math.sqrt(w*w+A*A);k<y&&(y=g=k,p=b)}return e.index=p,e.distance=y,e.dxy=g,void 0===p?[e]:[i(e,m,v,o)]}}},{"../scattergl/hover":986,"./helpers":1034}],1036:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../components/grid");t.exports={moduleType:"trace",name:"splom",basePlotModule:e("./base_plot"),categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select"),editStyle:e("./edit_style"),meta:{}},r.register(i)},{"../../components/grid":410,"../../registry":638,"../scatter/marker_colorbar":944,"./attributes":1029,"./base_plot":1030,"./calc":1031,"./defaults":1032,"./edit_style":1033,"./hover":1035,"./plot":1037,"./select":1039}],1037:[function(e,t,n){"use strict";var r=e("regl-splom"),i=e("../../lib"),o=e("../../plots/cartesian/axis_ids"),a=e("../../components/dragelement/helpers").selectMode;function s(e,t){var n,s,l,c,u,h=e._fullLayout,d=h._size,f=t.trace,p=t.t,g=h._splomScenes[f.uid],m=g.matrixOptions,v=m.cdata,y=h._glcanvas.data()[0].regl,b=h.dragmode;if(0!==v.length){m.lower=f.showupperhalf,m.upper=f.showlowerhalf,m.diagonal=f.diagonal.visible;var _=f._visibleDims,x=v.length,w=g.viewOpts={};for(w.ranges=new Array(x),w.domains=new Array(x),u=0;u<_.length;u++){l=_[u];var A=w.ranges[u]=new Array(4),k=w.domains[u]=new Array(4);(n=o.getFromId(e,f._diag[l][0]))&&(A[0]=n._rl[0],A[2]=n._rl[1],k[0]=n.domain[0],k[2]=n.domain[1]),(s=o.getFromId(e,f._diag[l][1]))&&(A[1]=s._rl[0],A[3]=s._rl[1],k[1]=s.domain[0],k[3]=s.domain[1])}var T=e._context.plotGlPixelRatio,S=d.l*T,E=d.b*T,C=d.w*T,M=d.h*T;w.viewport=[S,E,C+S,M+E],!0===g.matrix&&(g.matrix=r(y));var O=h.clickmode.indexOf("select")>-1,L=!0;if(a(b)||f.selectedpoints||O){var D=f._length;if(f.selectedpoints){g.selectBatch=f.selectedpoints;var I=f.selectedpoints,R={};for(l=0;l<I.length;l++)R[I[l]]=!0;var P=[];for(l=0;l<D;l++)R[l]||P.push(l);g.unselectBatch=P}var N=p.xpx=new Array(x),z=p.ypx=new Array(x);for(u=0;u<_.length;u++){if(l=_[u],n=o.getFromId(e,f._diag[l][0]))for(N[u]=new Array(D),c=0;c<D;c++)N[u][c]=n.c2p(v[u][c]);if(s=o.getFromId(e,f._diag[l][1]))for(z[u]=new Array(D),c=0;c<D;c++)z[u][c]=s.c2p(v[u][c])}if(g.selectBatch.length||g.unselectBatch.length){var F=i.extendFlat({},m,g.unselectedOptions,w),B=i.extendFlat({},m,g.selectedOptions,w);g.matrix.update(F,B),L=!1}}else p.xpx=p.ypx=null;if(L){var j=i.extendFlat({},m,w);g.matrix.update(j,null)}}}t.exports=function(e,t,n){if(n.length)for(var r=0;r<n.length;r++)s(e,n[r][0])}},{"../../components/dragelement/helpers":384,"../../lib":503,"../../plots/cartesian/axis_ids":558,"regl-splom":282}],1038:[function(e,t,n){"use strict";var r=e("../../lib");t.exports=function(e,t){var n=e._fullLayout,i=t.uid,o=n._splomScenes;o||(o=n._splomScenes={});var a={dirty:!0,selectBatch:[],unselectBatch:[]},s=o[t.uid];return s||((s=o[i]=r.extendFlat({},a,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||r.extendFlat(s,a),s}},{"../../lib":503}],1039:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../scatter/subtypes"),o=e("./helpers");t.exports=function(e,t){var n=e.cd,a=n[0].trace,s=n[0].t,l=e.scene,c=l.matrixOptions.cdata,u=e.xaxis,h=e.yaxis,d=[];if(!l)return d;var f=!i.hasMarkers(a)&&!i.hasText(a);if(!0!==a.visible||f)return d;var p=o.getDimIndex(a,u),g=o.getDimIndex(a,h);if(!1===p||!1===g)return d;var m=s.xpx[p],v=s.ypx[g],y=c[p],b=c[g],_=[],x=[];if(!1!==t&&!t.degenerate)for(var w=0;w<y.length;w++)t.contains([m[w],v[w]],null,w,e)?(_.push(w),d.push({pointNumber:w,x:y[w],y:b[w]})):x.push(w);var A=l.matrixOptions;return _.length||x.length?l.selectBatch.length||l.unselectBatch.length||l.matrix.update(l.unselectedOptions,r.extendFlat({},A,l.selectedOptions,l.viewOpts)):l.matrix.update(A,null),l.selectBatch=_,l.unselectBatch=x,d}},{"../../lib":503,"../scatter/subtypes":951,"./helpers":1034}],1040:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../mesh3d/attributes"),s=e("../../plots/attributes"),l=e("../../lib/extend").extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:o({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,r("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,t.exports=c},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],1041:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/calc");function o(e){var t,n,i,o,s,l,c,u,h,d,f,p,g=e._x,m=e._y,v=e._z,y=e._len,b=-1/0,_=1/0,x=-1/0,w=1/0,A=-1/0,k=1/0,T="";for(y&&(c=g[0],h=m[0],f=v[0]),y>1&&(u=g[y-1],d=m[y-1],p=v[y-1]),t=0;t<y;t++)b=Math.max(b,g[t]),_=Math.min(_,g[t]),x=Math.max(x,m[t]),w=Math.min(w,m[t]),A=Math.max(A,v[t]),k=Math.min(k,v[t]),o||g[t]===c||(o=!0,T+="x"),s||m[t]===h||(s=!0,T+="y"),l||v[t]===f||(l=!0,T+="z");o||(T+="x"),s||(T+="y"),l||(T+="z");var S=a(e._x),E=a(e._y),C=a(e._z);T=(T=(T=T.replace("x",(c>u?"-":"+")+"x")).replace("y",(h>d?"-":"+")+"y")).replace("z",(f>p?"-":"+")+"z");var M=function(){y=0,S=[],E=[],C=[]};(!y||y<S.length*E.length*C.length)&&M();var O=function(e){return"x"===e?g:"y"===e?m:v},L=function(e){return"x"===e?S:"y"===e?E:C},D=function(e){return e[y-1]<e[0]?-1:1},I=O(T[1]),R=O(T[3]),P=O(T[5]),N=L(T[1]).length,z=L(T[3]).length,F=L(T[5]).length,B=!1,j=function(e,t,n){return N*(z*e+t)+n},U=D(O(T[1])),V=D(O(T[3])),q=D(O(T[5]));for(t=0;t<F-1;t++){for(n=0;n<z-1;n++){for(i=0;i<N-1;i++){var H=j(t,n,i),$=j(t,n,i+1),W=j(t,n+1,i),G=j(t+1,n,i);if(I[H]*U<I[$]*U&&R[H]*V<R[W]*V&&P[H]*q<P[G]*q||(B=!0),B)break}if(B)break}if(B)break}return B&&(r.warn("Encountered arbitrary coordinates! Unable to input data grid."),M()),{xMin:_,yMin:w,zMin:k,xMax:b,yMax:x,zMax:A,Xs:S,Ys:E,Zs:C,len:y,fill:T}}function a(e){return r.distinctVals(e).vals}function s(e,t){if(void 0===t&&(t=e.length),r.isTypedArray(e))return e.subarray(0,t);for(var n=[],i=0;i<t;i++)n[i]=+e[i];return n}t.exports={calc:function(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=s(t.u,t._len),t._v=s(t.v,t._len),t._w=s(t.w,t._len),t._x=s(t.x,t._len),t._y=s(t.y,t._len),t._z=s(t.z,t._len);var n=o(t);t._gridFill=n.fill,t._Xs=n.Xs,t._Ys=n.Ys,t._Zs=n.Zs,t._len=n.len;var r,a,l,c=0;t.starts&&(r=s(t.starts.x||[]),a=s(t.starts.y||[]),l=s(t.starts.z||[]),c=Math.min(r.length,a.length,l.length)),t._startsX=r||[],t._startsY=a||[],t._startsZ=l||[];var u,h=0,d=1/0;for(u=0;u<t._len;u++){var f=t._u[u],p=t._v[u],g=t._w[u],m=Math.sqrt(f*f+p*p+g*g);h=Math.max(h,m),d=Math.min(d,m)}for(i(e,t,{vals:[d,h],containerStr:"",cLetter:"c"}),u=0;u<c;u++){var v=r[u];n.xMax=Math.max(n.xMax,v),n.xMin=Math.min(n.xMin,v);var y=a[u];n.yMax=Math.max(n.yMax,y),n.yMin=Math.min(n.yMin,y);var b=l[u];n.zMax=Math.max(n.zMax,b),n.zMin=Math.min(n.zMin,b)}t._slen=c,t._normMax=h,t._xbnds=[n.xMin,n.xMax],t._ybnds=[n.yMin,n.yMax],t._zbnds=[n.zMin,n.zMax]},filter:s,processGrid:o}},{"../../components/colorscale/calc":374,"../../lib":503}],1042:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_streamtube3d,i=r.createTubeMesh,o=e("../../lib"),a=e("../../lib/gl_format_color").parseColorScale,s=e("../../components/colorscale").extractOpts,l=e("../../plots/gl3d/zip3"),c={xaxis:0,yaxis:1,zaxis:2};function u(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var h=u.prototype;function d(e){var t=e.length;return t>2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function f(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var n=e.fullSceneLayout,i=e.dataScale,u=t._len,h={};function p(e,t){var r=n[t],a=i[c[t]];return o.simpleMap(e,(function(e){return r.d2l(e)*a}))}if(h.vectors=l(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var g=p(t._Xs,"xaxis"),m=p(t._Ys,"yaxis"),v=p(t._Zs,"zaxis");if(h.meshgrid=[g,m,v],h.gridFill=t._gridFill,t._slen)h.startingPositions=l(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var y=m[0],b=d(g),_=d(v),x=new Array(b.length*_.length),w=0,A=0;A<b.length;A++)for(var k=0;k<_.length;k++)x[w++]=[b[A],y,_[k]];h.startingPositions=x}h.colormap=a(t),h.tubeSize=t.sizeref,h.maxLength=t.maxdisplayed;var T=p(t._xbnds,"xaxis"),S=p(t._ybnds,"yaxis"),E=p(t._zbnds,"zaxis"),C=f(g),M=f(m),O=f(v),L=[[T[0]-C[0],S[0]-M[0],E[0]-O[0]],[T[1]+C[1],S[1]+M[1],E[1]+O[1]]],D=r(h,L),I=s(t);D.vertexIntensityBounds=[I.min/t._normMax,I.max/t._normMax];var R=t.lightposition;return D.lightPosition=[R.x,R.y,R.z],D.ambient=t.lighting.ambient,D.diffuse=t.lighting.diffuse,D.specular=t.lighting.specular,D.roughness=t.lighting.roughness,D.fresnel=t.lighting.fresnel,D.opacity=t.opacity,t._pad=D.tubeScale*t.sizeref*2,D}h.handlePick=function(e){var t=this.scene.fullSceneLayout,n=this.scene.dataScale;function r(e,r){var i=t[r],o=n[c[r]];return i.l2c(e)/o}if(e.object===this.mesh){var i=e.data.position,o=e.data.velocity;return e.traceCoordinate=[r(i[0],"xaxis"),r(i[1],"yaxis"),r(i[2],"zaxis"),r(o[0],"xaxis"),r(o[1],"yaxis"),r(o[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}},h.update=function(e){this.data=e;var t=p(this.scene,e);this.mesh.update(t)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,r=p(e,t),o=i(n,r),a=new u(e,t.uid);return a.mesh=o,a.data=t,o._trace=a,e.glplot.add(o),a}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/gl3d/zip3":609}],1043:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,n,a){function s(n,i){return r.coerce(e,t,o,n,i)}var l=s("u"),c=s("v"),u=s("w"),h=s("x"),d=s("y"),f=s("z");l&&l.length&&c&&c.length&&u&&u.length&&h&&h.length&&d&&d.length&&f&&f.length?(s("starts.x"),s("starts.y"),s("starts.z"),s("maxdisplayed"),s("sizeref"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),i(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},{"../../components/colorscale/defaults":376,"../../lib":503,"./attributes":1040}],1044:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"streamtube",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:e("./calc").calc,plot:e("./convert"),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}},{"../../plots/gl3d":598,"./attributes":1040,"./calc":1041,"./convert":1042,"./defaults":1043}],1045:[function(e,t,n){"use strict";var r=e("../../plots/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,a=e("../../components/colorscale/attributes"),s=e("../../plots/domain").attributes,l=e("../pie/attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:o({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"./constants":1048}],1046:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="sunburst",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],1047:[function(e,t,n){"use strict";var r=e("d3-hierarchy"),i=e("fast-isnumeric"),o=e("../../lib"),a=e("../../components/colorscale").makeColorScaleFuncFromTrace,s=e("../pie/calc").makePullColorFn,l=e("../pie/calc").generateExtendedColors,c=e("../../components/colorscale").calc,u=e("../../constants/numerical").ALMOST_EQUAL,h={},d={},f={};function p(e,t,n){var r=0,i=e.children;if(i){for(var o=i.length,a=0;a<o;a++)r+=p(i[a],t,n);n.branches&&r++}else n.leaves&&r++;return e.value=e.data.data.value=r,t._values||(t._values=[]),t._values[e.data.data.i]=r,r}n.calc=function(e,t){var n,l,h,d,f,g,m=e._fullLayout,v=t.ids,y=o.isArrayOrTypedArray(v),b=t.labels,_=t.parents,x=t.values,w=o.isArrayOrTypedArray(x),A=[],k={},T={},S=function(e){return e||"number"==typeof e},E=function(e){return!w||i(x[e])&&x[e]>=0};y?(n=Math.min(v.length,_.length),l=function(e){return S(v[e])&&E(e)},h=function(e){return String(v[e])}):(n=Math.min(b.length,_.length),l=function(e){return S(b[e])&&E(e)},h=function(e){return String(b[e])}),w&&(n=Math.min(n,x.length));for(var C=0;C<n;C++)if(l(C)){var M=h(C),O=S(_[C])?String(_[C]):"",L={i:C,id:M,pid:O,label:S(b[C])?String(b[C]):""};w&&(L.v=+x[C]),A.push(L),g=M,k[f=O]?k[f].push(g):k[f]=[g],T[g]=1}if(k[""]){if(k[""].length>1){for(var D=o.randstr(),I=0;I<A.length;I++)""===A[I].pid&&(A[I].pid=D);A.unshift({hasMultipleRoots:!0,id:D,pid:"",label:""})}}else{var R,P=[];for(R in k)T[R]||P.push(R);if(1!==P.length)return o.warn(["Multiple implied roots, cannot build",t.type,"hierarchy of",t.name+".","These roots include:",P.join(", ")].join(" "));R=P[0],A.unshift({hasImpliedRoot:!0,id:R,pid:"",label:R})}try{d=r.stratify().id((function(e){return e.id})).parentId((function(e){return e.pid}))(A)}catch(e){return o.warn(["Failed to build",t.type,"hierarchy of",t.name+".","Error:",e.message].join(" "))}var N=r.hierarchy(d),z=!1;if(w)switch(t.branchvalues){case"remainder":N.sum((function(e){return e.data.v}));break;case"total":N.each((function(e){var n=e.data.data,r=n.v;if(e.children){var i=e.children.reduce((function(e,t){return e+t.data.data.v}),0);if((n.hasImpliedRoot||n.hasMultipleRoots)&&(r=i),r<i*u)return z=!0,o.warn(["Total value for node",e.data.data.id,"of",t.name,"is smaller than the sum of its children.","\nparent value =",r,"\nchildren sum =",i].join(" "))}e.value=r}))}else p(N,t,{branches:-1!==t.count.indexOf("branches"),leaves:-1!==t.count.indexOf("leaves")});if(!z){var F,B;t.sort&&N.sort((function(e,t){return t.value-e.value}));var j=t.marker.colors||[],U=!!j.length;return t._hasColorscale?(U||(j=w?t.values:t._values),c(e,t,{vals:j,containerStr:"marker",cLetter:"c"}),B=a(t.marker)):F=s(m["_"+t.type+"colormap"]),N.each((function(e){var n=e.data.data;n.color=t._hasColorscale?B(j[n.i]):F(j[n.i],n.id)})),A[0].hierarchy=N,A}},n._runCrossTraceCalc=function(e,t){var n=t._fullLayout,r=t.calcdata,i=n[e+"colorway"],o=n["_"+e+"colormap"];n["extend"+e+"colors"]&&(i=l(i,"icicle"===e?f:"treemap"===e?d:h));var a,s=0;function c(e){var t=e.data.data,n=t.id;!1===t.color&&(o[n]?t.color=o[n]:e.parent?e.parent.parent?t.color=e.parent.data.data.color:(o[n]=t.color=i[s%i.length],s++):t.color=a)}for(var u=0;u<r.length;u++){var p=r[u][0];p.trace.type===e&&p.hierarchy&&(a=p.trace.root.color,p.hierarchy.each(c))}},n.crossTraceCalc=function(e){return n._runCrossTraceCalc("sunburst",e)}},{"../../components/colorscale":378,"../../constants/numerical":479,"../../lib":503,"../pie/calc":902,"d3-hierarchy":115,"fast-isnumeric":190}],1048:[function(e,t,n){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},{}],1049:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../plots/domain").defaults,a=e("../bar/defaults").handleText,s=e("../../components/colorscale"),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,n,s){function u(n,o){return r.coerce(e,t,i,n,o)}var h=u("labels"),d=u("parents");if(h&&h.length&&d&&d.length){var f=u("values");f&&f.length?u("branchvalues"):u("count"),u("level"),u("maxdepth"),u("marker.line.width")&&u("marker.line.color",s.paper_bgcolor),u("marker.colors");var p=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;p&&c(e,t,s,u,{prefix:"marker.",cLetter:"c"}),u("leaf.opacity",p?1:.7);var g=u("text");u("texttemplate"),t.texttemplate||u("textinfo",Array.isArray(g)?"text+label":"label"),u("hovertext"),u("hovertemplate"),a(e,t,s,u,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),u("insidetextorientation"),u("sort"),u("rotation"),u("root.color"),o(t,s,u),t._length=null}else t.visible=!1}},{"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":1045}],1050:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../registry"),o=e("../../components/fx/helpers").appendArrayPointValue,a=e("../../components/fx"),s=e("../../lib"),l=e("../../lib/events"),c=e("./helpers"),u=e("../pie/helpers").formatPieValue;function h(e,t,n){for(var r=e.data.data,i={curveNumber:t.index,pointNumber:r.i,data:t._input,fullData:t},a=0;a<n.length;a++){var s=n[a];s in e&&(i[s]=e[s])}return"parentString"in e&&!c.isHierarchyRoot(e)&&(i.parent=e.parentString),o(i,t,r.i),i}t.exports=function(e,t,n,o,d){var f=o[0],p=f.trace,g=f.hierarchy,m="sunburst"===p.type,v="treemap"===p.type||"icicle"===p.type;"_hasHoverLabel"in p||(p._hasHoverLabel=!1),"_hasHoverEvent"in p||(p._hasHoverEvent=!1);e.on("mouseover",(function(i){var o=n._fullLayout;if(!n._dragging&&!1!==o.hovermode){var l,y=n._fullData[p.index],b=i.data.data,_=b.i,x=c.isHierarchyRoot(i),w=c.getParent(g,i),A=c.getValue(i),k=function(e){return s.castOption(y,_,e)},T=k("hovertemplate"),S=a.castHoverinfo(y,o,_),E=o.separators;if(T||S&&"none"!==S&&"skip"!==S){var C,M;m&&(C=f.cx+i.pxmid[0]*(1-i.rInscribed),M=f.cy+i.pxmid[1]*(1-i.rInscribed)),v&&(C=i._hoverX,M=i._hoverY);var O,L={},D=[],I=[],R=function(e){return-1!==D.indexOf(e)};S&&(D="all"===S?y._module.attributes.hoverinfo.flags:S.split("+")),L.label=b.label,R("label")&&L.label&&I.push(L.label),b.hasOwnProperty("v")&&(L.value=b.v,L.valueLabel=u(L.value,E),R("value")&&I.push(L.valueLabel)),L.currentPath=i.currentPath=c.getPath(i.data),R("current path")&&!x&&I.push(L.currentPath);var P=[],N=function(){-1===P.indexOf(O)&&(I.push(O),P.push(O))};L.percentParent=i.percentParent=A/c.getValue(w),L.parent=i.parentString=c.getPtLabel(w),R("percent parent")&&(O=c.formatPercent(L.percentParent,E)+" of "+L.parent,N()),L.percentEntry=i.percentEntry=A/c.getValue(t),L.entry=i.entry=c.getPtLabel(t),!R("percent entry")||x||i.onPathbar||(O=c.formatPercent(L.percentEntry,E)+" of "+L.entry,N()),L.percentRoot=i.percentRoot=A/c.getValue(g),L.root=i.root=c.getPtLabel(g),R("percent root")&&!x&&(O=c.formatPercent(L.percentRoot,E)+" of "+L.root,N()),L.text=k("hovertext")||k("text"),R("text")&&(O=L.text,s.isValidTextValue(O)&&I.push(O)),l=[h(i,y,d.eventDataKeys)];var z={trace:y,y:M,_x0:i._x0,_x1:i._x1,_y0:i._y0,_y1:i._y1,text:I.join("<br>"),name:T||R("name")?y.name:void 0,color:k("hoverlabel.bgcolor")||b.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:L,eventData:l};m&&(z.x0=C-i.rInscribed*i.rpx1,z.x1=C+i.rInscribed*i.rpx1,z.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(z.x=C,z.idealAlign=C<0?"left":"right");var F=[];a.loneHover(z,{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:n,inOut_bbox:F}),l[0].bbox=F[0],p._hasHoverLabel=!0}if(v){var B=e.select("path.surface");d.styleOne(B,i,y,{hovered:!0})}p._hasHoverEvent=!0,n.emit("plotly_hover",{points:l||[h(i,y,d.eventDataKeys)],event:r.event})}})),e.on("mouseout",(function(t){var i=n._fullLayout,o=n._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,n.emit("plotly_unhover",{points:[h(s,o,d.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),v){var l=e.select("path.surface");d.styleOne(l,s,o,{hovered:!1})}})),e.on("click",(function(e){var t=n._fullLayout,o=n._fullData[p.index],s=m&&(c.isHierarchyRoot(e)||c.isLeaf(e)),u=c.getPtId(e),f=c.isEntry(e)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(f),y={points:[h(e,o,d.eventDataKeys)],event:r.event};s||(y.nextLevel=v);var b=l.triggerHandler(n,"plotly_"+p.type+"click",y);if(!1!==b&&t.hovermode&&(n._hoverdata=[h(e,o,d.eventDataKeys)],a.click(n,r.event)),!s&&!1!==b&&!n._dragging&&!n._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var _={data:[{level:v}],traces:[p.index]},x={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",n,_,x)}}))}},{"../../components/fx":406,"../../components/fx/helpers":402,"../../lib":503,"../../lib/events":492,"../../registry":638,"../pie/helpers":905,"./helpers":1051,"@plotly/d3":58}],1051:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../../lib/setcursor"),a=e("../pie/helpers");function s(e){return e.data.data.pid}n.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter((function(e){if(n.getPtId(e)===t)return r=e.copy()})),r||e},n.findEntryWithChild=function(e,t){var r;return e.eachAfter((function(e){for(var i=e.children||[],o=0;o<i.length;o++){var a=i[o];if(n.getPtId(a)===t)return r=e.copy()}})),r||e},n.isEntry=function(e){return!e.parent},n.isLeaf=function(e){return!e.children},n.getPtId=function(e){return e.data.data.id},n.getPtLabel=function(e){return e.data.data.label},n.getValue=function(e){return e.value},n.isHierarchyRoot=function(e){return""===s(e)},n.setSliceCursor=function(e,t,r){var i=r.isTransitioning;if(!i){var a=e.datum();i=r.hideOnRoot&&n.isHierarchyRoot(a)||r.hideOnLeaves&&n.isLeaf(a)}o(e,i?null:"pointer")},n.getInsideTextFontKey=function(e,t,n,i,o){var a=(o||{}).onPathbar?"pathbar.textfont":"insidetextfont",s=n.data.data.i;return r.castOption(t,s,a+"."+e)||r.castOption(t,s,"textfont."+e)||i.size},n.getOutsideTextFontKey=function(e,t,n,i){var o=n.data.data.i;return r.castOption(t,o,"outsidetextfont."+e)||r.castOption(t,o,"textfont."+e)||i.size},n.isOutsideText=function(e,t){return!e._hasColorscale&&n.isHierarchyRoot(t)},n.determineTextFont=function(e,t,o,a){return n.isOutsideText(e,t)?function(e,t,r){return{color:n.getOutsideTextFontKey("color",e,t,r),family:n.getOutsideTextFontKey("family",e,t,r),size:n.getOutsideTextFontKey("size",e,t,r)}}(e,t,o):function(e,t,o,a){var s=(a||{}).onPathbar,l=t.data.data,c=l.i,u=r.castOption(e,c,(s?"pathbar.textfont":"insidetextfont")+".color");return!u&&e._input.textfont&&(u=r.castOption(e._input,c,"textfont.color")),{color:u||i.contrast(l.color),family:n.getInsideTextFontKey("family",e,t,o,a),size:n.getInsideTextFontKey("size",e,t,o,a)}}(e,t,o,a)},n.hasTransition=function(e){return!!(e&&e.duration>0)},n.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},n.isHeader=function(e,t){return!(n.isLeaf(e)||e.depth===t._maxDepth-1)},n.getParent=function(e,t){return n.findEntryWithLevel(e,s(t))},n.listPath=function(e,t){var r=e.parent;if(!r)return[];var i=t?[r.data[t]]:[r];return n.listPath(r,t).concat(i)},n.getPath=function(e){return n.listPath(e,"label").join("/")+"/"},n.formatValue=a.formatPieValue,n.formatPercent=function(e,t){var n=r.formatPercent(e,0);return"0%"===n&&(n=a.formatPiePercent(e,t)),n}},{"../../components/color":366,"../../lib":503,"../../lib/setcursor":524,"../pie/helpers":905}],1052:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"sunburst",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":1045,"./base_plot":1046,"./calc":1047,"./defaults":1049,"./layout_attributes":1053,"./layout_defaults":1054,"./plot":1055,"./style":1056}],1053:[function(e,t,n){"use strict";t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1054:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("sunburstcolorway",t.colorway),n("extendsunburstcolors")}},{"../../lib":503,"./layout_attributes":1053}],1055:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-hierarchy"),o=e("d3-interpolate").interpolate,a=e("../../components/drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../bar/uniform_text"),u=c.recordMinTextSize,h=c.clearMinTextSize,d=e("../pie/plot"),f=e("../pie/helpers").getRotationAngle,p=d.computeTransform,g=d.transformInsideText,m=e("./style").styleOne,v=e("../bar/style").resizeText,y=e("./fx"),b=e("./constants"),_=e("./helpers");function x(e,t,c,h){var d=e._fullLayout,v=!d.uniformtext.mode&&_.hasTransition(h),x=r.select(c).selectAll("g.slice"),A=t[0],k=A.trace,T=A.hierarchy,S=_.findEntryWithLevel(T,k.level),E=_.getMaxDepth(k),C=d._size,M=k.domain,O=C.w*(M.x[1]-M.x[0]),L=C.h*(M.y[1]-M.y[0]),D=.5*Math.min(O,L),I=A.cx=C.l+C.w*(M.x[1]+M.x[0])/2,R=A.cy=C.t+C.h*(1-M.y[0])-L/2;if(!S)return x.remove();var P=null,N={};v&&x.each((function(e){N[_.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!P&&_.isEntry(e)&&(P=e)}));var z=function(e){return i.partition().size([2*Math.PI,e.height+1])(e)}(S).descendants(),F=S.height+1,B=0,j=E;A.hasMultipleRoots&&_.isHierarchyRoot(S)&&(z=z.slice(1),F-=1,B=1,j+=1),z=z.filter((function(e){return e.y1<=j}));var U=f(k.rotation);U&&z.forEach((function(e){e.x0+=U,e.x1+=U}));var V=Math.min(F,E),q=function(e){return(e-B)/V*D},H=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},$=function(e){return s.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,I,R)},W=function(e){return I+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},G=function(e){return R+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(x=x.data(z,_.getPtId)).enter().append("g").classed("slice",!0),v?x.exit().transition().each((function(){var e=r.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,n=_.getPtId(e),r=N[n],i=N[_.getPtId(S)];if(i){var a=(e.x1>i.x1?2*Math.PI:0)+U;t=e.rpx1<i.rpx1?{x0:e.x0,x1:e.x1,rpx0:0,rpx1:0}:{x0:a,x1:a,rpx0:e.rpx0,rpx1:e.rpx1}}else{var s,l=_.getPtId(e.parent);x.each((function(e){if(_.getPtId(e)===l)return s=e}));var c,u=s.children;u.forEach((function(e,t){if(_.getPtId(e)===n)return c=t}));var h=u.length,d=o(s.x0,s.x1);t={rpx0:D,rpx1:D,x0:d(c/h),x1:d((c+1)/h)}}return o(r,t)}(e);return function(e){return $(t(e))}})),e.select("g.slicetext").attr("opacity",0)})).remove():x.exit().remove(),x.order();var Y=null;if(v&&P){var X=_.getPtId(P);x.each((function(e){null===Y&&_.getPtId(e)===X&&(Y=e.x1)}))}var Z=x;function K(e){var t,n=N[_.getPtId(e)],r=e.transform;if(n)t=n;else if(t={rpx1:e.rpx1,transform:{textPosAngle:r.textPosAngle,scale:0,rotate:r.rotate,rCenter:r.rCenter,x:r.x,y:r.y}},P)if(e.parent)if(Y){var i=e.x1>Y?2*Math.PI:0;t.x0=t.x1=i}else s.extendFlat(t,J(e));else t.x0=t.x1=U;else t.x0=t.x1=U;var a=o(t.transform.textPosAngle,e.transform.textPosAngle),l=o(t.rpx1,e.rpx1),c=o(t.x0,e.x0),h=o(t.x1,e.x1),f=o(t.transform.scale,r.scale),p=o(t.transform.rotate,r.rotate),g=0===r.rCenter?3:0===t.transform.rCenter?1/3:1,m=o(t.transform.rCenter,r.rCenter);return function(e){var t=l(e),n=c(e),i=h(e),o=function(e){return m(Math.pow(e,g))}(e),s={pxmid:H(t,(n+i)/2),rpx1:t,transform:{textPosAngle:a(e),rCenter:o,x:r.x,y:r.y}};return u(k.type,r,d),{transform:{targetX:W(s),targetY:G(s),scale:f(e),rotate:p(e),rCenter:o}}}}function J(e){var t=e.parent,n=N[_.getPtId(t)],r={};if(n){var i=t.children,a=i.indexOf(e),s=i.length,l=o(n.x0,n.x1);r.x0=l(a/s),r.x1=l(a/s)}else r.x0=r.x1=0;return r}v&&(Z=Z.transition().each("end",(function(){var t=r.select(this);_.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})}))),Z.each((function(i){var c=r.select(this),h=s.ensureSingle(c,"path","surface",(function(e){e.style("pointer-events","all")}));i.rpx0=q(i.y0),i.rpx1=q(i.y1),i.xmid=(i.x0+i.x1)/2,i.pxmid=H(i.rpx1,i.xmid),i.midangle=-(i.xmid-Math.PI/2),i.startangle=-(i.x0-Math.PI/2),i.stopangle=-(i.x1-Math.PI/2),i.halfangle=.5*Math.min(s.angleDelta(i.x0,i.x1)||Math.PI,Math.PI),i.ring=1-i.rpx0/i.rpx1,i.rInscribed=function(e){return 0===e.rpx0&&s.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}(i),v?h.transition().attrTween("d",(function(e){var t=function(e){var t,n=N[_.getPtId(e)],r={x0:e.x0,x1:e.x1,rpx0:e.rpx0,rpx1:e.rpx1};if(n)t=n;else if(P)if(e.parent)if(Y){var i=(e.x1>Y?2*Math.PI:0)+U;t={x0:i,x1:i}}else t={rpx0:D,rpx1:D},s.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:U,x1:U};return o(t,r)}(e);return function(e){return $(t(e))}})):h.attr("d",$),c.call(y,S,e,t,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(_.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),h.call(m,i,k);var f=s.ensureSingle(c,"g","slicetext"),x=s.ensureSingle(f,"text","",(function(e){e.attr("data-notex",1)})),w=s.ensureUniformFontSize(e,_.determineTextFont(k,i,d.font));x.text(n.formatSliceLabel(i,S,k,t,d)).classed("slicetext",!0).attr("text-anchor","middle").call(a.font,w).call(l.convertToTspans,e);var T=a.bBox(x.node());i.transform=g(T,i,A),i.transform.targetX=W(i),i.transform.targetY=G(i);var E=function(e,t){var n=e.transform;return p(n,t),n.fontSize=w.size,u(k.type,n,d),s.getTextTransform(n)};v?x.transition().attrTween("transform",(function(e){var t=K(e);return function(e){return E(t(e),T)}})):x.attr("transform",E(i,T))}))}function w(e){return t=e.rpx1,n=e.transform.textPosAngle,[t*Math.sin(n),-t*Math.cos(n)];var t,n}n.plot=function(e,t,n,i){var o,a,s=e._fullLayout,l=s._sunburstlayer,c=!n,u=!s.uniformtext.mode&&_.hasTransition(n);h("sunburst",s),(o=l.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u?(i&&(a=i()),r.transition().duration(n.duration).ease(n.easing).each("end",(function(){a&&a()})).each("interrupt",(function(){a&&a()})).each((function(){l.selectAll("g.trace").each((function(t){x(e,t,this,n)}))}))):(o.each((function(t){x(e,t,this,n)})),s.uniformtext.mode&&v(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),c&&o.exit().remove()},n.formatSliceLabel=function(e,t,n,r,i){var o=n.texttemplate,a=n.textinfo;if(!(o||a&&"none"!==a))return"";var l=i.separators,c=r[0],u=e.data.data,h=c.hierarchy,d=_.isHierarchyRoot(e),f=_.getParent(h,e),p=_.getValue(e);if(!o){var g,m=a.split("+"),v=function(e){return-1!==m.indexOf(e)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(_.formatValue(u.v,l)),!d){v("current path")&&y.push(_.getPath(e.data));var b=0;v("percent parent")&&b++,v("percent entry")&&b++,v("percent root")&&b++;var x=b>1;if(b){var w,A=function(e){g=_.formatPercent(w,l),x&&(g+=" of "+e),y.push(g)};v("percent parent")&&!d&&(w=p/_.getValue(f),A("parent")),v("percent entry")&&(w=p/_.getValue(t),A("entry")),v("percent root")&&(w=p/_.getValue(h),A("root"))}}return v("text")&&(g=s.castOption(n,u.i,"text"),s.isValidTextValue(g)&&y.push(g)),y.join("<br>")}var k=s.castOption(n,u.i,"texttemplate");if(!k)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=_.formatValue(u.v,l)),T.currentPath=_.getPath(e.data),d||(T.percentParent=p/_.getValue(f),T.percentParentLabel=_.formatPercent(T.percentParent,l),T.parent=_.getPtLabel(f)),T.percentEntry=p/_.getValue(t),T.percentEntryLabel=_.formatPercent(T.percentEntry,l),T.entry=_.getPtLabel(t),T.percentRoot=p/_.getValue(h),T.percentRootLabel=_.formatPercent(T.percentRoot,l),T.root=_.getPtLabel(h),u.hasOwnProperty("color")&&(T.color=u.color);var S=s.castOption(n,u.i,"text");return(s.isValidTextValue(S)||""===S)&&(T.text=S),T.customdata=s.castOption(n,u.i,"customdata"),s.texttemplateString(k,T,i._d3locale,T,n._meta||{})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/style":662,"../bar/uniform_text":664,"../pie/helpers":905,"../pie/plot":909,"./constants":1048,"./fx":1050,"./helpers":1051,"./style":1056,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1056:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../lib"),a=e("../bar/uniform_text").resizeText;function s(e,t,n){var r=t.data.data,a=!t.children,s=r.i,l=o.castOption(n,s,"marker.line.color")||i.defaultLine,c=o.castOption(n,s,"marker.line.width")||0;e.style("stroke-width",c).call(i.fill,r.color).call(i.stroke,l).style("opacity",a?n.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each((function(e){var t=r.select(this),n=e[0].trace;t.style("opacity",n.opacity),t.selectAll("path.surface").each((function(e){r.select(this).call(s,e,n)}))}))},styleOne:s}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],1057:[function(e,t,n){"use strict";var r=e("../../components/color"),i=e("../../components/colorscale/attributes"),o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/attributes"),l=e("../../lib/extend").extendFlat,c=e("../../plot_api/edit_types").overrideAll;function u(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:r.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:r.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var h=t.exports=c(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:u(),y:u(),z:u()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");h.x.editType=h.y.editType=h.z.editType="calc+clearAxisTypes",h.transforms=void 0},{"../../components/color":366,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633}],1058:[function(e,t,n){"use strict";var r=e("../../components/colorscale/calc");t.exports=function(e,t){t.surfacecolor?r(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):r(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],1059:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_surface3d,i=e("../../../stackgl_modules").ndarray,o=e("../../../stackgl_modules").ndarray_linear_interpolate.d2,a=e("../heatmap/interp2d"),s=e("../heatmap/find_empties"),l=e("../../lib").isArrayOrTypedArray,c=e("../../lib/gl_format_color").parseColorScale,u=e("../../lib/str2rgbarray"),h=e("../../components/colorscale").extractOpts;function d(e,t,n){this.scene=e,this.uid=n,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var f=d.prototype;f.getXat=function(e,t,n,r){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===n?i:r.d2l(i,0,n)},f.getYat=function(e,t,n,r){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===n?i:r.d2l(i,0,n)},f.getZat=function(e,t,n,r){var i=this.data.z[t][e];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),void 0===n?i:r.d2l(i,0,n)},f.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,n=(e.data.index[1]-1)/this.dataScaleY-1,r=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(n),this.data._ylength-1),0);e.index=[r,i],e.traceCoordinate=[this.getXat(r,i),this.getYat(r,i),this.getZat(r,i)],e.dataCoordinate=[this.getXat(r,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(r,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(r,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var o=0;o<3;o++){null!=e.dataCoordinate[o]&&(e.dataCoordinate[o]*=this.scene.dataScale[o])}var a=this.data.hovertext||this.data.text;return Array.isArray(a)&&a[i]&&void 0!==a[i][r]?e.textLabel=a[i][r]:e.textLabel=a||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var p=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(e,t){if(e<t)return 0;for(var n=0;0===Math.floor(e%t);)e/=t,n++;return n}function m(e){for(var t=[],n=0;n<p.length;n++){var r=p[n];t.push(g(e,r))}return t}function v(e){for(var t=m(e),n=e,r=0;r<p.length;r++)if(t[r]>0){n=p[r];break}return n}function y(e,t){if(!(e<1||t<1)){for(var n=m(e),r=m(t),i=1,o=0;o<p.length;o++)i*=Math.pow(p[o],Math.max(n[o],r[o]));return i}}f.calcXnums=function(e){var t,n=[];for(t=1;t<e;t++){var r=this.getXat(t-1,0),i=this.getXat(t,0);n[t-1]=i!==r&&null!=r&&null!=i?Math.abs(i-r):0}var o=0;for(t=1;t<e;t++)o+=n[t-1];for(t=1;t<e;t++)0===n[t-1]?n[t-1]=1:n[t-1]=Math.round(o/n[t-1]);return n},f.calcYnums=function(e){var t,n=[];for(t=1;t<e;t++){var r=this.getYat(0,t-1),i=this.getYat(0,t);n[t-1]=i!==r&&null!=r&&null!=i?Math.abs(i-r):0}var o=0;for(t=1;t<e;t++)o+=n[t-1];for(t=1;t<e;t++)0===n[t-1]?n[t-1]=1:n[t-1]=Math.round(o/n[t-1]);return n};var b=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],_=b[9],x=b[13];function w(e,t,n){var r=n[8]+n[2]*t[0]+n[5]*t[1];return e[0]=(n[6]+n[0]*t[0]+n[3]*t[1])/r,e[1]=(n[7]+n[1]*t[0]+n[4]*t[1])/r,e}function A(e,t,n){return function(e,t,n,r){for(var i=[0,0],a=e.shape[0],s=e.shape[1],l=0;l<a;l++)for(var c=0;c<s;c++)n(i,[l,c],r),e.set(l,c,o(t,i[0],i[1]))}(e,t,w,n),e}function k(e,t){for(var n=!1,r=0;r<e.length;r++)if(t===e[r]){n=!0;break}!1===n&&e.push(t)}f.estimateScale=function(e,t){for(var n=1+function(e){if(0!==e.length){for(var t=1,n=0;n<e.length;n++)t=y(t,e[n]);return t}}(0===t?this.calcXnums(e):this.calcYnums(e));n<_;)n*=2;for(;n>x;)n--,n/=v(n),++n<_&&(n=x);var r=Math.round(n/e);return r>1?r:1},f.refineCoords=function(e){for(var t=this.dataScaleX,n=this.dataScaleY,r=e[0].shape[0],o=e[0].shape[1],a=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*n+1),l=1+r+1,c=1+o+1,u=i(new Float32Array(l*c),[l,c]),h=[1/t,0,0,0,1/n,0,0,0,1],d=0;d<e.length;++d){this.surface.padField(u,e[d]);var f=i(new Float32Array(a*s),[a,s]);A(f,u,h),e[d]=f}},f.setContourLevels=function(){var e,t,n,r=[[],[],[]],i=[!1,!1,!1],o=!1;for(e=0;e<3;++e)if(this.showContour[e]&&(o=!0,this.contourSize[e]>0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];t<this.contourEnd[e];t+=this.contourSize[e])n=t*this.scene.dataScale[e],k(r[e],n);if(o){var a=[[],[],[]];for(e=0;e<3;++e)this.showContour[e]&&(a[e]=i[e]?r[e]:this.scene.contourLevels[e]);this.surface.update({levels:a})}},f.update=function(e){var t,n,r,o,l=this.scene,d=l.fullSceneLayout,f=this.surface,p=c(e),g=l.dataScale,m=e.z[0].length,v=e._ylength,y=l.contourLevels;this.data=e;var b=[];for(t=0;t<3;t++)for(b[t]=[],n=0;n<m;n++)b[t][n]=[];for(n=0;n<m;n++)for(r=0;r<v;r++)b[0][n][r]=this.getXat(n,r,e.xcalendar,d.xaxis),b[1][n][r]=this.getYat(n,r,e.ycalendar,d.yaxis),b[2][n][r]=this.getZat(n,r,e.zcalendar,d.zaxis);if(e.connectgaps)for(e._emptypoints=s(b[2]),a(b[2],e._emptypoints),e._interpolatedZ=[],n=0;n<m;n++)for(e._interpolatedZ[n]=[],r=0;r<v;r++)e._interpolatedZ[n][r]=b[2][n][r];for(t=0;t<3;t++)for(n=0;n<m;n++)for(r=0;r<v;r++)null==(o=b[t][n][r])?b[t][n][r]=NaN:o=b[t][n][r]*=g[t];for(t=0;t<3;t++)for(n=0;n<m;n++)for(r=0;r<v;r++)null!=(o=b[t][n][r])&&(this.minValues[t]>o&&(this.minValues[t]=o),this.maxValues[t]<o&&(this.maxValues[t]=o));for(t=0;t<3;t++)this.objectOffset[t]=.5*(this.minValues[t]+this.maxValues[t]);for(t=0;t<3;t++)for(n=0;n<m;n++)for(r=0;r<v;r++)null!=(o=b[t][n][r])&&(b[t][n][r]-=this.objectOffset[t]);var _=[i(new Float32Array(m*v),[m,v]),i(new Float32Array(m*v),[m,v]),i(new Float32Array(m*v),[m,v])];for(t=0;t<3;t++)for(n=0;n<m;n++)for(r=0;r<v;r++)_[t].set(n,r,b[t][n][r]);b=[];var w={colormap:p,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!e.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:e.opacityscale,opacity:e.opacity},A=h(e);if(w.intensityBounds=[A.min,A.max],e.surfacecolor){var k=i(new Float32Array(m*v),[m,v]);for(n=0;n<m;n++)for(r=0;r<v;r++)k.set(n,r,e.surfacecolor[r][n]);_.push(k)}else w.intensityBounds[0]*=g[2],w.intensityBounds[1]*=g[2];(x<_[0].shape[0]||x<_[0].shape[1])&&(this.refineData=!1),!0===this.refineData&&(this.dataScaleX=this.estimateScale(_[0].shape[0],0),this.dataScaleY=this.estimateScale(_[0].shape[1],1),1===this.dataScaleX&&1===this.dataScaleY||this.refineCoords(_)),e.surfacecolor&&(w.intensity=_.pop());var T=[!0,!0,!0],S=["x","y","z"];for(t=0;t<3;++t){var E=e.contours[S[t]];T[t]=E.highlight,w.showContour[t]=E.show||E.highlight,w.showContour[t]&&(w.contourProject[t]=[E.project.x,E.project.y,E.project.z],E.show?(this.showContour[t]=!0,w.levels[t]=y[t],f.highlightColor[t]=w.contourColor[t]=u(E.color),E.usecolormap?f.highlightTint[t]=w.contourTint[t]=0:f.highlightTint[t]=w.contourTint[t]=1,w.contourWidth[t]=E.width,this.contourStart[t]=E.start,this.contourEnd[t]=E.end,this.contourSize[t]=E.size):(this.showContour[t]=!1,this.contourStart[t]=null,this.contourEnd[t]=null,this.contourSize[t]=0),E.highlight&&(w.dynamicColor[t]=u(E.highlightcolor),w.dynamicWidth[t]=E.highlightwidth))}(function(e){var t=e[0].rgb,n=e[e.length-1].rgb;return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]})(p)&&(w.vertexColor=!0),w.objectOffset=this.objectOffset,w.coords=_,f.update(w),f.visible=e.visible,f.enableDynamic=T,f.enableHighlight=T,f.snapToData=!0,"lighting"in e&&(f.ambientLight=e.lighting.ambient,f.diffuseLight=e.lighting.diffuse,f.specularLight=e.lighting.specular,f.roughness=e.lighting.roughness,f.fresnel=e.lighting.fresnel),"lightposition"in e&&(f.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z])},f.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},t.exports=function(e,t){var n=e.glplot.gl,i=r({gl:n}),o=new d(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib":503,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../heatmap/find_empties":798,"../heatmap/interp2d":801}],1060:[function(e,t,n){"use strict";var r=e("../../registry"),i=e("../../lib"),o=e("../../components/colorscale/defaults"),a=e("./attributes");function s(e,t,n,r){var i=r("opacityscale");"max"===i?t.opacityscale=[[0,.1],[1,1]]:"min"===i?t.opacityscale=[[0,1],[1,.1]]:"extremes"===i?t.opacityscale=function(e,t){for(var n=[],r=0;r<32;r++){var i=r/31,o=t+(1-t)*(1-Math.pow(Math.sin(e*i*Math.PI),2));n.push([i,Math.max(0,Math.min(1,o))])}return n}(1,.1):function(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var n=0;n<e.length;n++){var r=e[n];if(2!==r.length||+r[0]<t)return!1;t=+r[0]}return!0}(i)||(t.opacityscale=void 0)}function l(e,t,n){t in e&&!(n in e)&&(e[n]=e[t])}t.exports={supplyDefaults:function(e,t,n,c){var u,h;function d(n,r){return i.coerce(e,t,a,n,r)}var f=d("x"),p=d("y"),g=d("z");if(!g||!g.length||f&&f.length<1||p&&p.length<1)t.visible=!1;else{t._xlength=Array.isArray(f)&&i.isArrayOrTypedArray(f[0])?g.length:g[0].length,t._ylength=g.length,r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],c),d("text"),d("hovertext"),d("hovertemplate"),d("xhoverformat"),d("yhoverformat"),d("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach((function(e){d(e)}));var m=d("surfacecolor"),v=["x","y","z"];for(u=0;u<3;++u){var y="contours."+v[u],b=d(y+".show"),_=d(y+".highlight");if(b||_)for(h=0;h<3;++h)d(y+".project."+v[h]);b&&(d(y+".color"),d(y+".width"),d(y+".usecolormap")),_&&(d(y+".highlightcolor"),d(y+".highlightwidth")),d(y+".start"),d(y+".end"),d(y+".size")}m||(l(e,"zmin","cmin"),l(e,"zmax","cmax"),l(e,"zauto","cauto")),o(e,t,c,d,{prefix:"",cLetter:"c"}),s(0,t,0,d),t._length=null}},opacityscaleDefaults:s}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":1057}],1061:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:e("./calc"),plot:e("./convert"),moduleType:"trace",name:"surface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","2dMap","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":1057,"./calc":1058,"./convert":1059,"./defaults":1060}],1062:[function(e,t,n){"use strict";var r=e("../../components/annotations/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/font_attributes"),s=e("../../plots/domain").attributes,l=e("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers;(t.exports=o({domain:s({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:i({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:i({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:i({},a({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},{"../../components/annotations/attributes":349,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585}],1063:[function(e,t,n){"use strict";var r=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o="table";n.name=o,n.plot=function(e){var t=r(e.calcdata,o)[0];t.length&&i(e,t)},n.clean=function(e,t,n,r){var i=r._has&&r._has(o),a=t._has&&t._has(o);i&&!a&&r._paperdiv.selectAll(".table").remove()}},{"../../plots/get_data":593,"./plot":1070}],1064:[function(e,t,n){"use strict";var r=e("../../lib/gup").wrap;t.exports=function(){return r({})}},{"../../lib/gup":500}],1065:[function(e,t,n){"use strict";t.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1066:[function(e,t,n){"use strict";var r=e("./constants"),i=e("../../lib/extend").extendFlat,o=e("fast-isnumeric");function a(e){if(Array.isArray(e)){for(var t=0,n=0;n<e.length;n++)t=Math.max(t,a(e[n]));return t}return e}function s(e,t){return e+t}function l(e){var t,n=e.slice(),r=1/0,i=0;for(t=0;t<n.length;t++)Array.isArray(n[t])||(n[t]=[n[t]]),r=Math.min(r,n[t].length),i=Math.max(i,n[t].length);if(r!==i)for(t=0;t<n.length;t++){var o=i-n[t].length;o&&(n[t]=n[t].concat(c(o)))}return n}function c(e){for(var t=new Array(e),n=0;n<e;n++)t[n]="";return t}function u(e){return e.calcdata.columns.reduce((function(t,n){return n.xIndex<e.xIndex?t+n.columnWidth:t}),0)}function h(e,t){return Object.keys(e).map((function(n){return i({},e[n],{auxiliaryBlocks:t})}))}function d(e,t){for(var n,r={},i=0,o=0,a={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<e.length;c++)n=e[c],a.rows.push({rowIndex:c,rowHeight:n}),((o+=n)>=t||c===e.length-1)&&(r[i]=a,a.key=l++,a.firstRowIndex=s,a.lastRowIndex=c,a={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=o,s=c+1,o=0);return r}t.exports=function(e,t){var n=l(t.cells.values),f=function(e){return e.slice(t.header.values.length,e.length)},p=l(t.header.values);p.length&&!p[0].length&&(p[0]=[""],p=l(p));var g=p.concat(f(n).map((function(){return c((p[0]||[""]).length)}))),m=t.domain,v=Math.floor(e._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(e._fullLayout._size.h*(m.y[1]-m.y[0])),b=t.header.values.length?g[0].map((function(){return t.header.height})):[r.emptyHeaderHeight],_=n.length?n[0].map((function(){return t.cells.height})):[],x=b.reduce(s,0),w=d(_,y-x+r.uplift),A=h(d(b,x),[]),k=h(w,A),T={},S=t._fullInput.columnorder.concat(f(n.map((function(e,t){return t})))),E=g.map((function(e,n){var r=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(n,t.columnwidth.length-1)]:t.columnwidth;return o(r)?Number(r):1})),C=E.reduce(s,0);E=E.map((function(e){return e/C*v}));var M=Math.max(a(t.header.line.width),a(t.cells.line.width)),O={key:t.uid+e._context.staticPlot,translateX:m.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-m.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:M,height:y,columnOrder:S,groupHeight:y,rowBlocks:k,headerRowBlocks:A,scrollY:0,cells:i({},t.cells,{values:n}),headerCells:i({},t.header,{values:g}),gdColumns:g.map((function(e){return e[0]})),gdColumnsOriginalOrder:g.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(e,t){var n=T[e];return T[e]=(n||0)+1,{key:e+"__"+T[e],label:e,specIndex:t,xIndex:S[t],xScale:u,x:void 0,calcdata:void 0,columnWidth:E[t]}}))};return O.columns.forEach((function(e){e.calcdata=O,e.x=u(e)})),O}},{"../../lib/extend":493,"./constants":1065,"fast-isnumeric":190}],1067:[function(e,t,n){"use strict";var r=e("../../lib/extend").extendFlat;n.splitToPanels=function(e){var t=[0,0],n=r({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:r({},e.calcdata,{cells:e.calcdata.headerCells})});return[r({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n]},n.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],n=t?t.rows[0].rowIndex:0;return[n,t?n+t.rows.length:0]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(n,r){return{keyWithinBlock:r+("string"==typeof n&&n.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:n}}))}},{"../../lib/extend":493}],1068:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../plots/domain").defaults;t.exports=function(e,t,n,a){function s(n,o){return r.coerce(e,t,i,n,o)}o(t,a,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",r.extendFlat({},a.font)),function(e,t){for(var n=e.columnorder||[],r=e.header.values.length,i=n.slice(0,r),o=i.slice().sort((function(e,t){return e-t})),a=i.map((function(e){return o.indexOf(e)})),s=a.length;s<r;s++)a.push(s);t("columnorder",a)}(t,s),s("cells.values"),s("cells.format"),s("cells.align"),s("cells.prefix"),s("cells.suffix"),s("cells.height"),s("cells.line.width"),s("cells.line.color"),s("cells.fill.color"),r.coerceFont(s,"cells.font",r.extendFlat({},a.font)),t._length=null}},{"../../lib":503,"../../plots/domain":584,"./attributes":1062}],1069:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"table",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1062,"./base_plot":1063,"./calc":1064,"./defaults":1068,"./plot":1070}],1070:[function(e,t,n){"use strict";var r=e("./constants"),i=e("@plotly/d3"),o=e("../../lib").numberFormat,a=e("../../lib/gup"),s=e("../../components/drawing"),l=e("../../lib/svg_text_utils"),c=e("../../lib").raiseToTop,u=e("../../lib").strTranslate,h=e("../../lib").cancelTransition,d=e("./data_preparation_helper"),f=e("./data_split_helpers"),p=e("../../components/color");function g(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function m(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function v(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function y(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function b(e,t,n){var o=e.selectAll("."+r.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),o.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return P(t,t.length-1)+(t.length?N(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-E(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){var t=e.width+r.scrollbarWidth/2+r.scrollbarOffset;return u(t,E(e))}));var s=o.selectAll("."+r.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return u(0,e.scrollbarState.topY||0)}));var c=l.selectAll("."+r.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",(function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||n?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",(function(n){var r=i.event.y,o=this.getBoundingClientRect(),a=n.scrollbarState,s=r-o.top,l=i.scale.linear().domain([0,a.scrollableAreaHeight]).range([0,a.totalHeight]).clamp(!0);a.topY<=s&&s<=a.bottomY||M(t,e,null,l(s-a.barLength/2))(n)})).call(i.behavior.drag().origin((function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",M(t,e)).on("dragend",(function(){}))),h.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),h.remove())}function _(e,t,n,o){var l,c=function(e){var t=e.selectAll("."+r.cn.columnCell).data(f.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.columnCell,!0),t.exit().remove(),t}(function(e){var t=e.selectAll("."+r.cn.columnCells).data(a.repeat,a.keyFun);return t.enter().append("g").classed(r.cn.columnCells,!0),t.exit().remove(),t}(n));(function(e){e.each((function(e,t){var n=e.calcdata.cells.font,r=e.column.specIndex,i={size:A(n.size,r,t),color:A(n.color,r,t),family:A(n.family,r,t)};e.rowNumber=e.key,e.align=A(e.calcdata.cells.align,r,t),e.cellBorderWidth=A(e.calcdata.cells.line.width,r,t),e.font=i}))})(c),l=function(e){var t=e.selectAll("."+r.cn.cellRect).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(r.cn.cellRect,!0),t}(c),l.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=i.select(this);p.stroke(t,A(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,A(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}));var u=function(e){var t=e.selectAll("."+r.cn.cellText).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(r.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){i.event.stopPropagation()})),t}(function(e){var t=e.selectAll("."+r.cn.cellTextHolder).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(c));(function(e){e.each((function(e){s.font(i.select(this),e.font)}))})(u),x(u,t,o,e),R(c)}function x(e,t,n,a){e.text((function(e){var t=e.column.specIndex,n=e.rowNumber,i=e.value,a="string"==typeof i,s=a&&i.match(/<br>/i),l=!a||s;e.mayHaveMarkup=a&&i.match(/[<&>]/);var c,u="string"==typeof(c=i)&&c.match(r.latexCheck);e.latex=u;var h,d,f=u?"":A(e.calcdata.cells.prefix,t,n)||"",p=u?"":A(e.calcdata.cells.suffix,t,n)||"",g=u?null:A(e.calcdata.cells.format,t,n)||null,m=f+(g?o(g)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!u&&(h=w(m)),e.cellHeightMayIncrease=s||u||e.mayHaveMarkup||(void 0===h?w(m):h),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var v=(" "===r.wrapSplitCharacter?m.replace(/<a href=/gi,"<a_href="):m).split(r.wrapSplitCharacter),y=" "===r.wrapSplitCharacter?v.map((function(e){return e.replace(/<a_href=/gi,"<a href=")})):v;e.fragments=y.map((function(e){return{text:e,width:null}})),e.fragments.push({fragment:r.wrapSpacer,width:null}),d=y.join(r.lineBreaker)+r.lineBreaker+r.wrapSpacer}else delete e.fragments,d=m;return d})).attr("dy",(function(e){return e.needsConvertToTspans?0:"0.75em"})).each((function(e){var o=this,s=i.select(o),c=e.wrappingNeeded?L:D;e.needsConvertToTspans?l.convertToTspans(s,a,c(n,o,t,a,e)):i.select(o.parentNode).attr("transform",(function(e){return u(I(e),r.cellPad)})).attr("text-anchor",(function(e){return{left:"start",center:"middle",right:"end"}[e.align]}))}))}function w(e){return-1!==e.indexOf(r.wrapSplitCharacter)}function A(e,t,n){if(Array.isArray(e)){var r=e[Math.min(t,e.length-1)];return Array.isArray(r)?r[Math.min(n,r.length-1)]:r}return e}function k(e,t,n){e.transition().ease(r.releaseTransitionEase).duration(r.releaseTransitionDuration).attr("transform",u(t.x,n))}function T(e){return"cells"===e.type}function S(e){return"header"===e.type}function E(e){return(e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[]).reduce((function(e,t){return e+N(t,1/0)}),0)}function C(e,t,n){var r=y(t)[0];if(void 0!==r){var i=r.rowBlocks,o=r.calcdata,a=P(i,i.length),s=r.calcdata.groupHeight-E(r),l=o.scrollY=Math.max(0,Math.min(a-s,o.scrollY)),c=function(e,t,n){for(var r=[],i=0,o=0;o<e.length;o++){for(var a=e[o],s=a.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;a.allRowsHeight=l,t<i+l&&t+n>i&&r.push(o),i+=l}return r}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=P(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(O(e,n,t,c,r.prevPages,r,0),O(e,n,t,c,r.prevPages,r,1),b(n,e))}}function M(e,t,n,o){return function(a){var s=a.calcdata?a.calcdata:a,l=t.filter((function(e){return s.key===e.key})),c=n||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===o?s.scrollY+c*i.event.dy:o;var h=l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(T);return C(e,h,l),s.scrollY===u}}function O(e,t,n,r,i,o,a){r[a]!==i[a]&&(clearTimeout(o.currentRepaint[a]),o.currentRepaint[a]=setTimeout((function(){var o=n.filter((function(e,t){return t===a&&r[t]!==i[t]}));_(e,t,o,n),i[a]=r[a]})))}function L(e,t,n,o){return function(){var a=i.select(t.parentNode);a.each((function(e){var t=e.fragments;a.selectAll("tspan.line").each((function(e,n){t[n].width=this.getComputedTextLength()}));var n,i,o=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(i=(n=s.shift()).width+o)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(n.text),c+=i;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0})),a.selectAll("tspan.line").remove(),x(a.select("."+r.cn.cellText),n,e,o),i.select(t.parentNode.parentNode).call(R)}}function D(e,t,n,o,a){return function(){if(!a.settledY){var s=i.select(t.parentNode),l=F(a),c=a.key-l.firstRowIndex,h=l.rows[c].rowHeight,d=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,f=Math.max(d,h);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,e.selectAll("."+r.cn.columnCell).call(R),C(null,e.filter(T),0),b(n,o,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),n=i.select(e.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),o=e.transform.baseVal.consolidate(),s=n.top-t.top+(o?o.matrix.f:r.cellPad);return u(I(a,i.select(e.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),a.settledY=!0}}}function I(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function R(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+N(t,1/0)}),0),n=N(F(e),e.key);return u(0,n+t)})).selectAll("."+r.cn.cellRect).attr("height",(function(e){return(t=F(e),n=e.key,t.rows[n-t.firstRowIndex]).rowHeight;var t,n}))}function P(e,t){for(var n=0,r=t-1;r>=0;r--)n+=z(e[r]);return n}function N(e,t){for(var n=0,r=0;r<e.rows.length&&e.rows[r].rowIndex<t;r++)n+=e.rows[r].rowHeight;return n}function z(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var n=0,r=0;r<e.rows.length;r++)n+=e.rows[r].rowHeight;return e.allRowsHeight=n,n}function F(e){return e.rowBlocks[e.page]}t.exports=function(e,t){var n=!e._context.staticPlot,o=e._fullLayout._paper.selectAll("."+r.cn.table).data(t.map((function(t){var n=a.unwrap(t).trace;return d(e,n)})),a.keyFun);o.exit().remove(),o.enter().append("g").classed(r.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),o.attr("width",(function(e){return e.width+e.size.l+e.size.r})).attr("height",(function(e){return e.height+e.size.t+e.size.b})).attr("transform",(function(e){return u(e.translateX,e.translateY)}));var l=o.selectAll("."+r.cn.tableControlView).data(a.repeat,a.keyFun),p=l.enter().append("g").classed(r.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var x="onwheel"in document?"wheel":"mousewheel";p.on("mousemove",(function(t){l.filter((function(e){return t===e})).call(b,e)})).on(x,(function(t){if(!t.scrollbarState.wheeling){t.scrollbarState.wheeling=!0;var n=t.scrollY+i.event.deltaY;M(e,l,null,n)(t)||(i.event.stopPropagation(),i.event.preventDefault()),t.scrollbarState.wheeling=!1}})).call(b,e,!0)}l.attr("transform",(function(e){return u(e.size.l,e.size.t)}));var w=l.selectAll("."+r.cn.scrollBackground).data(a.repeat,a.keyFun);w.enter().append("rect").classed(r.cn.scrollBackground,!0).attr("fill","none"),w.attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),l.each((function(t){s.setClipUrl(i.select(this),m(e,t),e)}));var A=l.selectAll("."+r.cn.yColumn).data((function(e){return e.columns}),a.keyFun);A.enter().append("g").classed(r.cn.yColumn,!0),A.exit().remove(),A.attr("transform",(function(e){return u(e.x,0)})),n&&A.call(i.behavior.drag().origin((function(t){return k(i.select(this),t,-r.uplift),c(this),t.calcdata.columnDragInProgress=!0,b(l.filter((function(e){return t.calcdata.key===e.key})),e),t})).on("drag",(function(e){var t=i.select(this),n=function(t){return(e===t?i.event.x:t.x)+t.columnWidth/2};e.x=Math.max(-r.overdrag,Math.min(e.calcdata.width+r.overdrag-e.columnWidth,i.event.x)),y(A).filter((function(t){return t.calcdata.key===e.calcdata.key})).sort((function(e,t){return n(e)-n(t)})).forEach((function(t,n){t.xIndex=n,t.x=e===t?t.x:t.xScale(t)})),A.filter((function(t){return e!==t})).transition().ease(r.transitionEase).duration(r.transitionDuration).attr("transform",(function(e){return u(e.x,0)})),t.call(h).attr("transform",u(e.x,-r.uplift))})).on("dragend",(function(t){var n=i.select(this),r=t.calcdata;t.x=t.xScale(t),t.calcdata.columnDragInProgress=!1,k(n,t,0),function(e,t,n){var r=t.gdColumnsOriginalOrder;t.gdColumns.sort((function(e,t){return n[r.indexOf(e)]-n[r.indexOf(t)]})),t.columnorder=n,e.emit("plotly_restyle")}(e,r,r.columns.map((function(e){return e.xIndex})))}))),A.each((function(t){s.setClipUrl(i.select(this),v(e,t),e)}));var E=A.selectAll("."+r.cn.columnBlock).data(f.splitToPanels,a.keyFun);E.enter().append("g").classed(r.cn.columnBlock,!0).attr("id",(function(e){return e.key})),E.style("cursor",(function(e){return e.dragHandle?"ew-resize":e.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"}));var O=E.filter(S),L=E.filter(T);n&&L.call(i.behavior.drag().origin((function(e){return i.event.stopPropagation(),e})).on("drag",M(e,l,-1)).on("dragend",(function(){}))),_(e,l,O,E),_(e,l,L,E);var D=l.selectAll("."+r.cn.scrollAreaClip).data(a.repeat,a.keyFun);D.enter().append("clipPath").classed(r.cn.scrollAreaClip,!0).attr("id",(function(t){return m(e,t)}));var I=D.selectAll("."+r.cn.scrollAreaClipRect).data(a.repeat,a.keyFun);I.enter().append("rect").classed(r.cn.scrollAreaClipRect,!0).attr("x",-r.overdrag).attr("y",-r.uplift).attr("fill","none"),I.attr("width",(function(e){return e.width+2*r.overdrag})).attr("height",(function(e){return e.height+r.uplift})),A.selectAll("."+r.cn.columnBoundary).data(a.repeat,a.keyFun).enter().append("g").classed(r.cn.columnBoundary,!0);var R=A.selectAll("."+r.cn.columnBoundaryClippath).data(a.repeat,a.keyFun);R.enter().append("clipPath").classed(r.cn.columnBoundaryClippath,!0),R.attr("id",(function(t){return v(e,t)}));var P=R.selectAll("."+r.cn.columnBoundaryRect).data(a.repeat,a.keyFun);P.enter().append("rect").classed(r.cn.columnBoundaryRect,!0).attr("fill","none"),P.attr("width",(function(e){return e.columnWidth+2*g(e)})).attr("height",(function(e){return e.calcdata.height+2*g(e)+r.uplift})).attr("x",(function(e){return-g(e)})).attr("y",(function(e){return-g(e)})),C(null,L,l)}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"./constants":1065,"./data_preparation_helper":1066,"./data_split_helpers":1067,"@plotly/d3":58}],1071:[function(e,t,n){"use strict";var r=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../components/colorscale/attributes"),a=e("../../plots/domain").attributes,s=e("../pie/attributes"),l=e("../sunburst/attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:a({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":900,"../sunburst/attributes":1045,"./constants":1074}],1072:[function(e,t,n){"use strict";var r=e("../../plots/plots");n.name="treemap",n.plot=function(e,t,i,o){r.plotBasePlot(n.name,e,t,i,o)},n.clean=function(e,t,i,o){r.cleanBasePlot(n.name,e,t,i,o)}},{"../../plots/plots":619}],1073:[function(e,t,n){"use strict";var r=e("../sunburst/calc");n.calc=function(e,t){return r.calc(e,t)},n.crossTraceCalc=function(e){return r._runCrossTraceCalc("treemap",e)}},{"../sunburst/calc":1047}],1074:[function(e,t,n){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1075:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../../components/color"),a=e("../../plots/domain").defaults,s=e("../bar/defaults").handleText,l=e("../bar/constants").TEXTPAD,c=e("../../components/colorscale"),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,n,c){function d(n,o){return r.coerce(e,t,i,n,o)}var f=d("labels"),p=d("parents");if(f&&f.length&&p&&p.length){var g=d("values");g&&g.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),"squarify"===d("tiling.packing")&&d("tiling.squarifyratio"),d("tiling.flip"),d("tiling.pad");var m=d("text");d("texttemplate"),t.texttemplate||d("textinfo",Array.isArray(m)?"text+label":"label"),d("hovertext"),d("hovertemplate");var v=d("pathbar.visible");s(e,t,c,d,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition");var y=-1!==t.textposition.indexOf("bottom");d("marker.line.width")&&d("marker.line.color",c.paper_bgcolor);var b=d("marker.colors");(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,c,d,{prefix:"marker.",cLetter:"c"}):d("marker.depthfade",!(b||[]).length);var _=2*t.textfont.size;d("marker.pad.t",y?_/4:_),d("marker.pad.l",_/4),d("marker.pad.r",_/4),d("marker.pad.b",y?_:_/4),t._hovered={marker:{line:{width:2,color:o.contrast(c.paper_bgcolor)}}},v&&(d("pathbar.thickness",t.pathbar.textfont.size+2*l),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),a(t,c,d),t._length=null}else t.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":1071}],1076:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../sunburst/helpers"),o=e("../bar/uniform_text").clearMinTextSize,a=e("../bar/style").resizeText,s=e("./plot_one");t.exports=function(e,t,n,l,c){var u,h,d=c.type,f=c.drawDescendants,p=e._fullLayout,g=p["_"+d+"layer"],m=!n;o(d,p),(u=g.selectAll("g.trace."+d).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(d,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(n)?(l&&(h=l()),r.transition().duration(n.duration).ease(n.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){g.selectAll("g.trace").each((function(t){s(e,t,this,n,f)}))}))):(u.each((function(t){s(e,t,this,n,f)})),p.uniformtext.mode&&a(e,g.selectAll(".trace"),d)),m&&u.exit().remove()}},{"../bar/style":662,"../bar/uniform_text":664,"../sunburst/helpers":1051,"./plot_one":1085,"@plotly/d3":58}],1077:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,c=e("./constants"),u=e("../sunburst/helpers"),h=e("../sunburst/fx"),d=!0;t.exports=function(e,t,n,f,p){var g=p.barDifY,m=p.width,v=p.height,y=p.viewX,b=p.viewY,_=p.pathSlice,x=p.toMoveInsideSlice,w=p.strTransform,A=p.hasTransition,k=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,S=p.makeUpdateTextInterpolator,E={},C=e._fullLayout,M=t[0],O=M.trace,L=M.hierarchy,D=m/O._entryDepth,I=u.listPath(n.data,"id"),R=s(L.copy(),[m,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(R=R.filter((function(e){var t=I.indexOf(e.data.id);return-1!==t&&(e.x0=D*t,e.x1=D*(t+1),e.y0=g,e.y1=g+v,e.onPathbar=!0,!0)}))).reverse(),(f=f.data(R,u.getPtId)).enter().append("g").classed("pathbar",!0),k(f,d,E,[m,v],_),f.order();var P=f;A&&(P=P.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),P.each((function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=b(s.y0),s._y1=b(s.y1),s._hoverX=y(s.x1-Math.min(m,v)/2),s._hoverY=b(s.y1-v/2);var f=r.select(this),p=i.ensureSingle(f,"path","surface",(function(e){e.style("pointer-events","all")}));A?p.transition().attrTween("d",(function(e){var t=T(e,d,E,[m,v]);return function(e){return _(t(e))}})):p.attr("d",_),f.call(h,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),p.call(l,s,O,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("<br>").join(" ")||"";var g=i.ensureSingle(f,"g","slicetext"),k=i.ensureSingle(g,"text","",(function(e){e.attr("data-notex",1)})),M=i.ensureUniformFontSize(e,u.determineTextFont(O,s,C.font,{onPathbar:!0}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(o.font,M).call(a.convertToTspans,e),s.textBB=o.bBox(k.node()),s.transform=x(s,{fontSize:M.size,onPathbar:!0}),s.transform.fontSize=M.size,A?k.transition().attrTween("transform",(function(e){var t=S(e,d,E,[m,v]);return function(e){return w(t(e))}})):k.attr("transform",w(s))}))}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"./constants":1074,"./partition":1083,"./style":1086,"@plotly/d3":58}],1078:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,c=e("./constants"),u=e("../sunburst/helpers"),h=e("../sunburst/fx"),d=e("../sunburst/plot").formatSliceLabel,f=!1;t.exports=function(e,t,n,p,g){var m=g.width,v=g.height,y=g.viewX,b=g.viewY,_=g.pathSlice,x=g.toMoveInsideSlice,w=g.strTransform,A=g.hasTransition,k=g.handleSlicesExit,T=g.makeUpdateSliceInterpolator,S=g.makeUpdateTextInterpolator,E=g.prevEntry,C=e._fullLayout,M=t[0].trace,O=-1!==M.textposition.indexOf("left"),L=-1!==M.textposition.indexOf("right"),D=-1!==M.textposition.indexOf("bottom"),I=!D&&!M.marker.pad.t||D&&!M.marker.pad.b,R=s(n,[m,v],{packing:M.tiling.packing,squarifyratio:M.tiling.squarifyratio,flipX:M.tiling.flip.indexOf("x")>-1,flipY:M.tiling.flip.indexOf("y")>-1,pad:{inner:M.tiling.pad,top:M.marker.pad.t,left:M.marker.pad.l,right:M.marker.pad.r,bottom:M.marker.pad.b}}).descendants(),P=1/0,N=-1/0;R.forEach((function(e){var t=e.depth;t>=M._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(P=Math.min(P,t),N=Math.max(N,t))})),p=p.data(R,u.getPtId),M._maxVisibleLayers=isFinite(N)?N-P+1:0,p.enter().append("g").classed("slice",!0),k(p,f,{},[m,v],_),p.order();var z=null;if(A&&E){var F=u.getPtId(E);p.each((function(e){null===z&&u.getPtId(e)===F&&(z={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var B=function(){return z||{x0:0,x1:m,y0:0,y1:v}},j=p;return A&&(j=j.transition().each("end",(function(){var t=r.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){var p=u.isHeader(s,M);s._x0=y(s.x0),s._x1=y(s.x1),s._y0=b(s.y0),s._y1=b(s.y1),s._hoverX=y(s.x1-M.marker.pad.r),s._hoverY=b(D?s.y1-M.marker.pad.b/2:s.y0+M.marker.pad.t/2);var g=r.select(this),k=i.ensureSingle(g,"path","surface",(function(e){e.style("pointer-events","all")}));A?k.transition().attrTween("d",(function(e){var t=T(e,f,B(),[m,v]);return function(e){return _(t(e))}})):k.attr("d",_),g.call(h,n,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(l,s,M,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?I?"":u.getPtLabel(s)||"":d(s,n,M,t,C)||"";var E=i.ensureSingle(g,"g","slicetext"),R=i.ensureSingle(E,"text","",(function(e){e.attr("data-notex",1)})),P=i.ensureUniformFontSize(e,u.determineTextFont(M,s,C.font));R.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":O||p?"start":"middle").call(o.font,P).call(a.convertToTspans,e),s.textBB=o.bBox(R.node()),s.transform=x(s,{fontSize:P.size,isHeader:p}),s.transform.fontSize=P.size,A?R.transition().attrTween("transform",(function(e){var t=S(e,f,B(),[m,v]);return function(e){return w(t(e))}})):R.attr("transform",w(s))})),z}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1050,"../sunburst/helpers":1051,"../sunburst/plot":1055,"./constants":1074,"./partition":1083,"./style":1086,"@plotly/d3":58}],1079:[function(e,t,n){"use strict";t.exports=function e(t,n,r){var i;r.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),r.flipX&&(i=t.x0,t.x0=n[0]-t.x1,t.x1=n[0]-i),r.flipY&&(i=t.y0,t.y0=n[1]-t.y1,t.y1=n[1]-i);var o=t.children;if(o)for(var a=0;a<o.length;a++)e(o[a],n,r)}},{}],1080:[function(e,t,n){"use strict";t.exports={moduleType:"trace",name:"treemap",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":944,"./attributes":1071,"./base_plot":1072,"./calc":1073,"./defaults":1075,"./layout_attributes":1081,"./layout_defaults":1082,"./plot":1084,"./style":1086}],1081:[function(e,t,n){"use strict";t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1082:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t){function n(n,o){return r.coerce(e,t,i,n,o)}n("treemapcolorway",t.colorway),n("extendtreemapcolors")}},{"../../lib":503,"./layout_attributes":1081}],1083:[function(e,t,n){"use strict";var r=e("d3-hierarchy"),i=e("./flip_tree");t.exports=function(e,t,n){var o,a=n.flipX,s=n.flipY,l="dice-slice"===n.packing,c=n.pad[s?"bottom":"top"],u=n.pad[a?"right":"left"],h=n.pad[a?"left":"right"],d=n.pad[s?"top":"bottom"];l&&(o=u,u=c,c=o,o=h,h=d,d=o);var f=r.treemap().tile(function(e,t){switch(e){case"squarify":return r.treemapSquarify.ratio(t);case"binary":return r.treemapBinary;case"dice":return r.treemapDice;case"slice":return r.treemapSlice;default:return r.treemapSliceDice}}(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(u).paddingRight(h).paddingTop(c).paddingBottom(d).size(l?[t[1],t[0]]:t)(e);return(l||a||s)&&i(f,t,{swapXY:l,flipX:a,flipY:s}),f}},{"./flip_tree":1079,"d3-hierarchy":115}],1084:[function(e,t,n){"use strict";var r=e("./draw"),i=e("./draw_descendants");t.exports=function(e,t,n,o){return r(e,t,n,o,{type:"treemap",drawDescendants:i})}},{"./draw":1076,"./draw_descendants":1078}],1085:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("d3-interpolate").interpolate,o=e("../sunburst/helpers"),a=e("../../lib"),s=e("../bar/constants").TEXTPAD,l=e("../bar/plot").toMoveInsideBar,c=e("../bar/uniform_text").recordMinTextSize,u=e("./constants"),h=e("./draw_ancestors");function d(e){return o.isHierarchyRoot(e)?"":o.getPtId(e)}t.exports=function(e,t,n,f,p){var g=e._fullLayout,m=t[0],v=m.trace,y="icicle"===v.type,b=m.hierarchy,_=o.findEntryWithLevel(b,v.level),x=r.select(n),w=x.selectAll("g.pathbar"),A=x.selectAll("g.slice");if(!_)return w.remove(),void A.remove();var k=o.isHierarchyRoot(_),T=!g.uniformtext.mode&&o.hasTransition(f),S=o.getMaxDepth(v),E=g._size,C=v.domain,M=E.w*(C.x[1]-C.x[0]),O=E.h*(C.y[1]-C.y[0]),L=M,D=v.pathbar.thickness,I=v.marker.line.width+u.gapWithPathbar,R=v.pathbar.visible?v.pathbar.side.indexOf("bottom")>-1?O+I:-(D+I):0,P={x0:L,x1:L,y0:R,y1:R+D},N=function(e,t,n){var r=v.tiling.pad,i=function(e){return e-r<=t.x0},o=function(e){return e+r>=t.x1},a=function(e){return e-r<=t.y0},s=function(e){return e+r>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-r)?0:o(e.x0-r)?n[0]:e.x0,x1:i(e.x1+r)?0:o(e.x1+r)?n[0]:e.x1,y0:a(e.y0-r)?0:s(e.y0-r)?n[1]:e.y0,y1:a(e.y1+r)?0:s(e.y1+r)?n[1]:e.y1}},z=null,F={},B={},j=null,U=function(e,t){return t?F[d(e)]:B[d(e)]},V=function(e,t,n,r){if(t)return F[d(b)]||P;var i=B[v.level]||n;return function(e){return e.data.depth-_.data.depth<S}(e)?N(e,i,r):{}};m.hasMultipleRoots&&k&&S++,v._maxDepth=S,v._backgroundColor=g.paper_bgcolor,v._entryDepth=_.data.depth,v._atRootLevel=k;var q=-M/2+E.l+E.w*(C.x[1]+C.x[0])/2,H=-O/2+E.t+E.h*(1-(C.y[1]+C.y[0])/2),$=function(e){return q+e},W=function(e){return H+e},G=W(0),Y=$(0),X=function(e){return Y+e},Z=function(e){return G+e};function K(e,t){return e+","+t}var J=X(0),Q=function(e){e.x=Math.max(J,e.x)},ee=v.pathbar.edgeshape,te=function(e,t){var n=e.x0,r=e.x1,i=e.y0,o=e.y1,a=e.textBB,u=function(e){return-1!==v.textposition.indexOf(e)},h=u("bottom"),d=u("top")||t.isHeader&&!h?"start":h?"end":"middle",f=u("right"),p=u("left")||t.onPathbar?-1:f?1:0,m=v[y?"tiling":"marker"].pad;if(t.isHeader){if((n+=(y?m:m.l)-s)>=(r-=(y?m:m.r)-s)){var b=(n+r)/2;n=b,r=b}var _;h?i<(_=o-(y?m:m.b))&&_<o&&(i=_):i<(_=i+(y?m:m.t))&&_<o&&(o=_)}var x=l(n,r,i,o,a,{isHorizontal:!1,constrained:!0,angle:0,anchor:d,leftToRight:p});return x.fontSize=t.fontSize,x.targetX=$(x.targetX),x.targetY=W(x.targetY),isNaN(x.targetX)||isNaN(x.targetY)?{}:(n!==r&&i!==o&&c(v.type,x,g),{scale:x.scale,rotate:x.rotate,textX:x.textX,textY:x.textY,anchorX:x.anchorX,anchorY:x.anchorY,targetX:x.targetX,targetY:x.targetY})},ne=function(e,t){for(var n,r=0,i=e;!n&&r<S;)r++,(i=i.parent)?n=U(i,t):r=S;return n||{}},re=function(e,t,n,r,o){var s,l=U(e,t);if(l)s=l;else if(t)s=P;else if(z)if(e.parent){var c=j||n;c&&!t?s=N(e,c,r):(s={},a.extendFlat(s,ne(e,t)))}else s=a.extendFlat({},e),y&&("h"===o.orientation?o.flipX?s.x0=e.x1:s.x1=0:o.flipY?s.y0=e.y1:s.y1=0);else s={};return i(s,{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})},ie=function(e,t,n,r){var s=U(e,t),l={},u=V(e,t,n,r);a.extendFlat(l,{transform:te({x0:u.x0,x1:u.x1,y0:u.y0,y1:u.y1,textBB:e.textBB,_text:e._text},{isHeader:o.isHeader(e,v)})}),s?l=s:e.parent&&a.extendFlat(l,ne(e,t));var h=e.transform;return e.x0!==e.x1&&e.y0!==e.y1&&c(v.type,h,g),i(l,{transform:{scale:h.scale,rotate:h.rotate,textX:h.textX,textY:h.textY,anchorX:h.anchorX,anchorY:h.anchorY,targetX:h.targetX,targetY:h.targetY}})},oe=function(e,t,n,o,a){var s=o[0],l=o[1];T?e.exit().transition().each((function(){var e=r.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var n=function(e,t,n,r){var o,a=U(e,t);if(t)o=P;else{var s=U(_,t);o=s?N(e,s,r):{}}return i(a,o)}(e,t,0,[s,l]);return function(e){return a(n(e))}})),e.select("g.slicetext").attr("opacity",0)})).remove():e.exit().remove()},ae=function(e){var t=e.transform;return e.x0!==e.x1&&e.y0!==e.y1&&c(v.type,t,g),a.getTextTransform({textX:t.textX,textY:t.textY,anchorX:t.anchorX,anchorY:t.anchorY,targetX:t.targetX,targetY:t.targetY,scale:t.scale,rotate:t.rotate})};T&&(w.each((function(e){F[d(e)]={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1},e.transform&&(F[d(e)].transform={textX:e.transform.textX,textY:e.transform.textY,anchorX:e.transform.anchorX,anchorY:e.transform.anchorY,targetX:e.transform.targetX,targetY:e.transform.targetY,scale:e.transform.scale,rotate:e.transform.rotate})})),A.each((function(e){B[d(e)]={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1},e.transform&&(B[d(e)].transform={textX:e.transform.textX,textY:e.transform.textY,anchorX:e.transform.anchorX,anchorY:e.transform.anchorY,targetX:e.transform.targetX,targetY:e.transform.targetY,scale:e.transform.scale,rotate:e.transform.rotate}),!z&&o.isEntry(e)&&(z=e)}))),j=p(e,t,_,A,{width:M,height:O,viewX:$,viewY:W,pathSlice:function(e){var t=$(e.x0),n=$(e.x1),r=W(e.y0),i=W(e.y1),o=n-t,a=i-r;if(!o||!a)return"";return"M"+K(t,r+0)+"L"+K(n-0,r)+"L"+K(n,i-0)+"L"+K(t+0,i)+"Z"},toMoveInsideSlice:te,prevEntry:z,makeUpdateSliceInterpolator:re,makeUpdateTextInterpolator:ie,handleSlicesExit:oe,hasTransition:T,strTransform:ae}),v.pathbar.visible?h(e,t,_,w,{barDifY:R,width:L,height:D,viewX:X,viewY:Z,pathSlice:function(e){var t=X(Math.max(Math.min(e.x0,e.x0),0)),n=X(Math.min(Math.max(e.x1,e.x1),L)),r=Z(e.y0),i=Z(e.y1),o=D/2,a={},s={};a.x=t,s.x=n,a.y=s.y=(r+i)/2;var l={x:t,y:r},c={x:n,y:r},u={x:n,y:i},h={x:t,y:i};return">"===ee?(l.x-=o,c.x-=o,u.x-=o,h.x-=o):"/"===ee?(u.x-=o,h.x-=o,a.x-=o/2,s.x-=o/2):"\\"===ee?(l.x-=o,c.x-=o,a.x-=o/2,s.x-=o/2):"<"===ee&&(a.x-=o,s.x-=o),Q(l),Q(h),Q(a),Q(c),Q(u),Q(s),"M"+K(l.x,l.y)+"L"+K(c.x,c.y)+"L"+K(s.x,s.y)+"L"+K(u.x,u.y)+"L"+K(h.x,h.y)+"L"+K(a.x,a.y)+"Z"},toMoveInsideSlice:te,makeUpdateSliceInterpolator:re,makeUpdateTextInterpolator:ie,handleSlicesExit:oe,hasTransition:T,strTransform:ae}):w.remove()}},{"../../lib":503,"../bar/constants":650,"../bar/plot":659,"../bar/uniform_text":664,"../sunburst/helpers":1051,"./constants":1074,"./draw_ancestors":1077,"@plotly/d3":58,"d3-interpolate":116}],1086:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../../lib"),a=e("../sunburst/helpers"),s=e("../bar/uniform_text").resizeText;function l(e,t,n,r){var s,l,c=(r||{}).hovered,u=t.data.data,h=u.i,d=u.color,f=a.isHierarchyRoot(t),p=1;if(c)s=n._hovered.marker.line.color,l=n._hovered.marker.line.width;else if(f&&d===n.root.color)p=100,s="rgba(0,0,0,0)",l=0;else if(s=o.castOption(n,h,"marker.line.color")||i.defaultLine,l=o.castOption(n,h,"marker.line.width")||0,!n._hasColorscale&&!t.onPathbar){var g=n.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(n._backgroundColor,.75),d);if(!0===g){var y=a.getMaxDepth(n);m=isFinite(y)?a.isLeaf(t)?0:n._maxVisibleLayers-(t.data.depth-n._entryDepth):t.data.height+1}else m=t.data.depth-n._entryDepth,n._atRootLevel||m++;if(m>0)for(var b=0;b<m;b++){var _=.5*b/m;d=i.combine(i.addOpacity(v,_),d)}}}e.style("stroke-width",l).call(i.fill,d).call(i.stroke,s).style("opacity",p)}t.exports={style:function(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");s(e,t,"treemap"),t.each((function(e){var t=r.select(this),n=e[0].trace;t.style("opacity",n.opacity),t.selectAll("path.surface").each((function(e){r.select(this).call(l,e,n,{hovered:!1})}))}))},styleOne:l}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"../sunburst/helpers":1051,"@plotly/d3":58}],1087:[function(e,t,n){"use strict";var r=e("../box/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat;t.exports={y:r.y,x:r.x,x0:r.x0,y0:r.y0,xhoverformat:o("x"),yhoverformat:o("y"),name:i({},r.name,{}),orientation:i({},r.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:r.fillcolor,points:i({},r.boxpoints,{}),jitter:i({},r.jitter,{}),pointpos:i({},r.pointpos,{}),width:i({},r.width,{}),marker:r.marker,text:r.text,hovertext:r.hovertext,hovertemplate:r.hovertemplate,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,selected:r.selected,unselected:r.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673}],1088:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../box/calc"),a=e("./helpers"),s=e("../../constants/numerical").BADNUM;function l(e,t,n){var i=t.max-t.min;if(!i)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,i/1e4);var o=n.length,a=r.stdev(n,o-1,t.mean);return Math.max(function(e,t,n){return 1.059*Math.min(t,n/1.349)*Math.pow(e,-.2)}(o,a,t.q3-t.q1),i/100)}function c(e,t,n,r){var o,a=e.spanmode,l=e.span||[],c=[t.min,t.max],u=[t.min-2*r,t.max+2*r];function h(r){var i=l[r],o="multicategory"===n.type?n.r2c(i):n.d2c(i,0,e[t.valLetter+"calendar"]);return o===s?u[r]:o}var d={type:"linear",range:o="soft"===a?u:"hard"===a?c:[h(0),h(1)]};return i.setConvert(d),d.cleanRange(),o}t.exports=function(e,t){var n=o(e,t);if(n[0].t.empty)return n;for(var s=e._fullLayout,u=i.getFromId(e,t["h"===t.orientation?"xaxis":"yaxis"]),h=1/0,d=-1/0,f=0,p=0,g=0;g<n.length;g++){var m=n[g],v=m.pts.map(a.extractVal),y=m.bandwidth=l(t,m,v),b=m.span=c(t,m,u,y);if(m.min===m.max&&0===y)b=m.span=[m.min,m.max],m.density=[{v:1,t:b[0]}],m.bandwidth=y,f=Math.max(f,1);else{var _=b[1]-b[0],x=Math.ceil(_/(y/3)),w=_/x;if(!isFinite(w)||!isFinite(x))return r.error("Something went wrong with computing the violin span"),n[0].t.empty=!0,n;var A=a.makeKDE(m,t,v);m.density=new Array(x);for(var k=0,T=b[0];T<b[1]+w/2;k++,T+=w){var S=A(T);m.density[k]={v:S,t:T},f=Math.max(f,S)}}p=Math.max(p,v.length),h=Math.min(h,b[0]),d=Math.max(d,b[1])}var E=i.findExtremes(u,[h,d],{padded:!0});if(t._extremes[u._id]=E,t.width)n[0].t.maxKDE=f;else{var C=s._violinScaleGroupStats,M=t.scalegroup,O=C[M];O?(O.maxKDE=Math.max(O.maxKDE,f),O.maxCount=Math.max(O.maxCount,p)):C[M]={maxKDE:f,maxCount:p}}return n[0].t.labels.kde=r._(e,"kde:"),n}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../box/calc":674,"./helpers":1091}],1089:[function(e,t,n){"use strict";var r=e("../box/cross_trace_calc").setPositionOffset,i=["v","h"];t.exports=function(e,t){for(var n=e.calcdata,o=t.xaxis,a=t.yaxis,s=0;s<i.length;s++){for(var l=i[s],c="h"===l?a:o,u=[],h=0;h<n.length;h++){var d=n[h],f=d[0].t,p=d[0].trace;!0!==p.visible||"violin"!==p.type||f.empty||p.orientation!==l||p.xaxis!==o._id||p.yaxis!==a._id||u.push(h)}r("violin",e,u,c)}}},{"../box/cross_trace_calc":675}],1090:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../components/color"),o=e("../box/defaults"),a=e("./attributes");t.exports=function(e,t,n,s){function l(n,i){return r.coerce(e,t,a,n,i)}function c(n,i){return r.coerce2(e,t,a,n,i)}if(o.handleSampleDefaults(e,t,l,s),!1!==t.visible){l("bandwidth"),l("side"),l("width")||(l("scalegroup",t.name),l("scalemode"));var u,h=l("span");Array.isArray(h)&&(u="manual"),l("spanmode",u);var d=l("line.color",(e.marker||{}).color||n),f=l("line.width"),p=l("fillcolor",i.addOpacity(t.line.color,.5));o.handlePointsDefaults(e,t,l,{prefix:""});var g=c("box.width"),m=c("box.fillcolor",p),v=c("box.line.color",d),y=c("box.line.width",f);l("box.visible",Boolean(g||m||v||y))||(t.box={visible:!1});var b=c("meanline.color",d),_=c("meanline.width",f);l("meanline.visible",Boolean(b||_))||(t.meanline={visible:!1})}}},{"../../components/color":366,"../../lib":503,"../box/defaults":676,"./attributes":1087}],1091:[function(e,t,n){"use strict";var r=e("../../lib"),i=function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)};n.makeKDE=function(e,t,n){var r=n.length,o=i,a=e.bandwidth,s=1/(r*a);return function(e){for(var t=0,i=0;i<r;i++)t+=o((e-n[i])/a);return s*t}},n.getPositionOnKdePath=function(e,t,n){var i,o;"h"===t.orientation?(i="y",o="x"):(i="x",o="y");var a=r.findPointOnPath(e.path,n,o,{pathLength:e.pathLength}),s=e.posCenterPx,l=a[i];return[l,"both"===t.side?2*s-l:s]},n.getKdeValue=function(e,t,r){var i=e.pts.map(n.extractVal);return n.makeKDE(e,t,i)(r)/e.posDensityScale},n.extractVal=function(e){return e.v}},{"../../lib":503}],1092:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../box/hover"),a=e("./helpers");t.exports=function(e,t,n,s,l){l||(l={});var c,u,h=l.hoverLayer,d=e.cd,f=d[0].trace,p=f.hoveron,g=-1!==p.indexOf("violins"),m=-1!==p.indexOf("kde"),v=[];if(g||m){var y=o.hoverOnBoxes(e,t,n,s);if(m&&y.length>0){var b,_,x,w,A,k=e.xa,T=e.ya;"h"===f.orientation?(A=t,b="y",x=T,_="x",w=k):(A=n,b="x",x=k,_="y",w=T);var S=d[e.index];if(A>=S.span[0]&&A<=S.span[1]){var E=r.extendFlat({},e),C=w.c2p(A,!0),M=a.getKdeValue(S,f,A),O=a.getPositionOnKdePath(S,f,C),L=x._offset,D=x._length;E[b+"0"]=O[0],E[b+"1"]=O[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+i.hoverLabelText(w,A,f[_+"hoverformat"])+", "+d[0].t.labels.kde+" "+M.toFixed(3),E.spikeDistance=y[0].spikeDistance;var I=b+"Spike";E[I]=y[0][I],y[0].spikeDistance=void 0,y[0][I]=void 0,E.hovertemplate=!1,v.push(E),(u={stroke:e.color})[b+"1"]=r.constrain(L+O[0],L,L+D),u[b+"2"]=r.constrain(L+O[1],L,L+D),u[_+"1"]=u[_+"2"]=w._offset+C}}g&&(v=v.concat(y))}-1!==p.indexOf("points")&&(c=o.hoverOnPoints(e,t,n));var R=h.selectAll(".violinline-"+f.uid).data(u?[0]:[]);return R.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),R.exit().remove(),R.attr(u),"closest"===s?c?[c]:v:c?(v.push(c),v):v}},{"../../lib":503,"../../plots/cartesian/axes":554,"../box/hover":678,"./helpers":1091}],1093:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../box/defaults":676,"../box/select":683,"../scatter/style":950,"./attributes":1087,"./calc":1088,"./cross_trace_calc":1089,"./defaults":1090,"./hover":1092,"./layout_attributes":1094,"./layout_defaults":1095,"./plot":1096,"./style":1097}],1094:[function(e,t,n){"use strict";var r=e("../box/layout_attributes"),i=e("../../lib").extendFlat;t.exports={violinmode:i({},r.boxmode,{}),violingap:i({},r.boxgap,{}),violingroupgap:i({},r.boxgroupgap,{})}},{"../../lib":503,"../box/layout_attributes":680}],1095:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes"),o=e("../box/layout_defaults");t.exports=function(e,t,n){o._supply(e,t,n,(function(n,o){return r.coerce(e,t,i,n,o)}),"violin")}},{"../../lib":503,"../box/layout_defaults":681,"./layout_attributes":1094}],1096:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../box/plot"),s=e("../scatter/line_points"),l=e("./helpers");t.exports=function(e,t,n,c){var u=e._fullLayout,h=t.xaxis,d=t.yaxis;function f(e){var t=s(e,{xaxis:h,yaxis:d,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return o.smoothopen(t[0],1)}i.makeTraceGroups(c,n,"trace violins").each((function(e){var n=r.select(this),o=e[0],s=o.t,c=o.trace;if(!0!==c.visible||s.empty)n.remove();else{var p=s.bPos,g=s.bdPos,m=t[s.valLetter+"axis"],v=t[s.posLetter+"axis"],y="both"===c.side,b=y||"positive"===c.side,_=y||"negative"===c.side,x=n.selectAll("path.violin").data(i.identity);x.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each((function(e){var t,n,i,o,a,l,h,d,x=r.select(this),w=e.density,A=w.length,k=v.c2l(e.pos+p,!0),T=v.l2p(k);if(c.width)t=s.maxKDE/g;else{var S=u._violinScaleGroupStats[c.scalegroup];t="count"===c.scalemode?S.maxKDE/g*(S.maxCount/e.pts.length):S.maxKDE/g}if(b){for(h=new Array(A),a=0;a<A;a++)(d=h[a]={})[s.posLetter]=k+w[a].v/t,d[s.valLetter]=m.c2l(w[a].t,!0);n=f(h)}if(_){for(h=new Array(A),l=0,a=A-1;l<A;l++,a--)(d=h[l]={})[s.posLetter]=k-w[a].v/t,d[s.valLetter]=m.c2l(w[a].t,!0);i=f(h)}if(y)o=n+"L"+i.substr(1)+"Z";else{var E=[T,m.c2p(w[0].t)],C=[T,m.c2p(w[A-1].t)];"h"===c.orientation&&(E.reverse(),C.reverse()),o=b?"M"+E+"L"+n.substr(1)+"L"+C:"M"+C+"L"+i.substr(1)+"L"+E}x.attr("d",o),e.posCenterPx=T,e.posDensityScale=t*g,e.path=x.node(),e.pathLength=e.path.getTotalLength()/(y?2:1)}));var w,A,k,T=c.box,S=T.width,E=(T.line||{}).width;y?(w=g*S,A=0):b?(w=[0,g*S/2],A=E*{x:1,y:-1}[s.posLetter]):(w=[g*S/2,0],A=E*{x:-1,y:1}[s.posLetter]),a.plotBoxAndWhiskers(n,{pos:v,val:m},c,{bPos:p,bdPos:w,bPosPxOffset:A}),a.plotBoxMean(n,{pos:v,val:m},c,{bPos:p,bdPos:w,bPosPxOffset:A}),!c.box.visible&&c.meanline.visible&&(k=i.identity);var C=n.selectAll("path.meanline").data(k||[]);C.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect","non-scaling-stroke"),C.exit().remove(),C.each((function(e){var t=m.c2p(e.mean,!0),n=l.getPositionOnKdePath(e,c,t);r.select(this).attr("d","h"===c.orientation?"M"+t+","+n[0]+"V"+n[1]:"M"+n[0]+","+t+"H"+n[1])})),a.plotPoints(n,{x:h,y:d},c,s)}}))}},{"../../components/drawing":388,"../../lib":503,"../box/plot":682,"../scatter/line_points":940,"./helpers":1091,"@plotly/d3":58}],1097:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/color"),o=e("../scatter/style").stylePoints;t.exports=function(e){var t=r.select(e).selectAll("g.trace.violins");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(t){var n=t[0].trace,a=r.select(this),s=n.box||{},l=s.line||{},c=n.meanline||{},u=c.width;a.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(i.stroke,n.line.color).call(i.fill,n.fillcolor),a.selectAll("path.box").style("stroke-width",l.width+"px").call(i.stroke,l.color).call(i.fill,s.fillcolor);var h={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(h).call(i.stroke,c.color),a.selectAll("path.meanline").style(h).call(i.stroke,c.color),o(a,n,e)}))}},{"../../components/color":366,"../scatter/style":950,"@plotly/d3":58}],1098:[function(e,t,n){"use strict";var r=e("../../components/colorscale/attributes"),i=e("../isosurface/attributes"),o=e("../surface/attributes"),a=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll,c=t.exports=l(s({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:o.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},a.hoverinfo),showlegend:s({},a.showlegend,{dflt:!1})}),"calc","nested");c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../isosurface/attributes":862,"../surface/attributes":1057}],1099:[function(e,t,n){"use strict";var r=e("../../../stackgl_modules").gl_mesh3d,i=e("../../lib/gl_format_color").parseColorScale,o=e("../../lib/str2rgbarray"),a=e("../../components/colorscale").extractOpts,s=e("../../plots/gl3d/zip3"),l=e("../isosurface/convert").findNearestOnAxis,c=e("../isosurface/convert").generateIsoMeshes;function u(e,t,n){this.scene=e,this.uid=n,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,n=this.data._meshX[t],r=this.data._meshY[t],i=this.data._meshZ[t],o=this.data._Ys.length,a=this.data._Zs.length,s=l(n,this.data._Xs).id,c=l(r,this.data._Ys).id,u=l(i,this.data._Zs).id,h=e.index=u+a*c+a*o*s;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return Array.isArray(d)&&void 0!==d[h]?e.textLabel=d[h]:d&&(e.textLabel=d),!0}},h.update=function(e){var t=this.scene,n=t.fullSceneLayout;function r(e,t,n,r){return t.map((function(t){return e.d2l(t,0,r)*n}))}this.data=c(e);var l={positions:s(r(n.xaxis,e._meshX,t.dataScale[0],e.xcalendar),r(n.yaxis,e._meshY,t.dataScale[1],e.ycalendar),r(n.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=a(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,i=r({gl:n}),o=new u(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}},{"../../../stackgl_modules":1120,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609,"../isosurface/convert":864}],1100:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./attributes"),o=e("../isosurface/defaults").supplyIsoDefaults,a=e("../surface/defaults").opacityscaleDefaults;t.exports=function(e,t,n,s){function l(n,o){return r.coerce(e,t,i,n,o)}o(e,t,n,s,l),a(e,t,s,l)}},{"../../lib":503,"../isosurface/defaults":865,"../surface/defaults":1060,"./attributes":1098}],1101:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../isosurface/calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert"),moduleType:"trace",name:"volume",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"../isosurface/calc":863,"./attributes":1098,"./convert":1099,"./defaults":1100}],1102:[function(e,t,n){"use strict";var r=e("../bar/attributes"),i=e("../scatter/attributes").line,o=e("../../plots/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/template_attributes").texttemplateAttrs,c=e("./constants"),u=e("../../lib/extend").extendFlat,h=e("../../components/color");function d(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:s({},{keys:c.eventDataKeys}),hoverinfo:u({},o.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:l({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:d(),decreasing:d(),totals:d(),connector:{line:{color:u({},i.color,{dflt:h.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup}},{"../../components/color":366,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":926,"./constants":1104}],1103:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes"),i=e("../../plots/cartesian/align_period"),o=e("../../lib").mergeArray,a=e("../scatter/calc_selection"),s=e("../../constants/numerical").BADNUM;function l(e){return"a"===e||"absolute"===e}function c(e){return"t"===e||"total"===e}t.exports=function(e,t){var n,u,h,d,f,p,g=r.getFromId(e,t.xaxis||"x"),m=r.getFromId(e,t.yaxis||"y");"h"===t.orientation?(n=g.makeCalcdata(t,"x"),h=m.makeCalcdata(t,"y"),d=i(t,m,"y",h),f=!!t.yperiodalignment,p="y"):(n=m.makeCalcdata(t,"y"),h=g.makeCalcdata(t,"x"),d=i(t,g,"x",h),f=!!t.xperiodalignment,p="x"),u=d.vals;for(var v,y=Math.min(u.length,n.length),b=new Array(y),_=0,x=!1,w=0;w<y;w++){var A=n[w]||0,k=!1;(n[w]!==s||c(t.measure[w])||l(t.measure[w]))&&w+1<y&&(n[w+1]!==s||c(t.measure[w+1])||l(t.measure[w+1]))&&(k=!0);var T=b[w]={i:w,p:u[w],s:A,rawS:A,cNext:k};l(t.measure[w])?(_=T.s,T.isSum=!0,T.dir="totals",T.s=_):c(t.measure[w])?(T.isSum=!0,T.dir="totals",T.s=_):(T.isSum=!1,T.dir=T.rawS<0?"decreasing":"increasing",v=T.s,T.s=_+v,_+=v),"totals"===T.dir&&(x=!0),f&&(b[w].orig_p=h[w],b[w][p+"End"]=d.ends[w],b[w][p+"Start"]=d.starts[w]),t.ids&&(T.id=String(t.ids[w])),T.v=(t.base||0)+_}return b.length&&(b[0].hasTotals=x),o(t.text,b,"tx"),o(t.hovertext,b,"htx"),a(b,t),b}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../scatter/calc_selection":928}],1104:[function(e,t,n){"use strict";t.exports={eventDataKeys:["initial","delta","final"]}},{}],1105:[function(e,t,n){"use strict";var r=e("../bar/cross_trace_calc").setGroupPositions;t.exports=function(e,t){var n,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],h=[],d=[];for(i=0;i<a.length;i++){var f=a[i];!0===f.visible&&f.xaxis===l._id&&f.yaxis===c._id&&"waterfall"===f.type&&(n=s[i],"h"===f.orientation?d.push(n):h.push(n),u.push(n))}var p={mode:o.waterfallmode,norm:o.waterfallnorm,gap:o.waterfallgap,groupgap:o.waterfallgroupgap};for(r(e,l,c,h,p),r(e,c,l,d,p),i=0;i<u.length;i++){n=u[i];for(var g=0;g<n.length;g++){var m=n[g];!1===m.isSum&&(m.s0+=0===g?0:n[g-1].s),g+1<n.length&&(n[g].nextP0=n[g+1].p0,n[g].nextS0=n[g+1].s0)}}}},{"../bar/cross_trace_calc":651}],1106:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("../bar/defaults").handleGroupingDefaults,o=e("../bar/defaults").handleText,a=e("../scatter/xy_defaults"),s=e("../scatter/period_defaults"),l=e("./attributes"),c=e("../../components/color"),u=e("../../constants/delta.js"),h=u.INCREASING.COLOR,d=u.DECREASING.COLOR;function f(e,t,n){e(t+".marker.color",n),e(t+".marker.line.color",c.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,n,i){function c(n,i){return r.coerce(e,t,l,n,i)}if(a(e,t,i,c)){s(e,t,i,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var u=c("textposition");o(e,t,i,c,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),t.texttemplate||c("textinfo")),f(c,"increasing",h),f(c,"decreasing",d),f(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash")))}else t.visible=!1},crossTraceDefaults:function(e,t){var n,o;function a(e){return r.coerce(o._input,o,l,e)}if("group"===t.waterfallmode)for(var s=0;s<e.length;s++)n=(o=e[s])._input,i(n,o,t,a)}}},{"../../components/color":366,"../../constants/delta.js":473,"../../lib":503,"../bar/defaults":652,"../scatter/period_defaults":946,"../scatter/xy_defaults":953,"./attributes":1102}],1107:[function(e,t,n){"use strict";t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],1108:[function(e,t,n){"use strict";var r=e("../../plots/cartesian/axes").hoverLabelText,i=e("../../components/color").opacity,o=e("../bar/hover").hoverOnBars,a=e("../../constants/delta.js"),s=a.INCREASING.SYMBOL,l=a.DECREASING.SYMBOL;t.exports=function(e,t,n,a,c){var u=o(e,t,n,a,c);if(u){var h=u.cd,d=h[0].trace,f="h"===d.orientation,p=f?"x":"y",g=f?e.xa:e.ya,m=h[u.index],v=m.isSum?m.b+m.s:m.rawS;if(!m.isSum){u.initial=m.b+m.s-v,u.delta=v,u.final=u.initial+u.delta;var y=k(Math.abs(u.delta));u.deltaLabel=v<0?"("+y+")":y,u.finalLabel=k(u.final),u.initialLabel=k(u.initial)}var b=m.hi||d.hoverinfo,_=[];if(b&&"none"!==b&&"skip"!==b){var x="all"===b,w=b.split("+"),A=function(e){return x||-1!==w.indexOf(e)};m.isSum||(!A("final")||A(f?"x":"y")||_.push(u.finalLabel),A("delta")&&(v<0?_.push(u.deltaLabel+" "+l):_.push(u.deltaLabel+" "+s)),A("initial")&&_.push("Initial: "+u.initialLabel))}return _.length&&(u.extraText=_.join("<br>")),u.color=function(e,t){var n=e[t.dir].marker,r=n.color,o=n.line.color,a=n.line.width;return i(r)?r:i(o)&&a?o:void 0}(d,m),[u]}function k(e){return r(g,e,d[p+"hoverformat"])}}},{"../../components/color":366,"../../constants/delta.js":473,"../../plots/cartesian/axes":554,"../bar/hover":655}],1109:[function(e,t,n){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":1102,"./calc":1103,"./cross_trace_calc":1105,"./defaults":1106,"./event_data":1107,"./hover":1108,"./layout_attributes":1110,"./layout_defaults":1111,"./plot":1112,"./style":1113}],1110:[function(e,t,n){"use strict";t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1111:[function(e,t,n){"use strict";var r=e("../../lib"),i=e("./layout_attributes");t.exports=function(e,t,n){var o=!1;function a(n,o){return r.coerce(e,t,i,n,o)}for(var s=0;s<n.length;s++){var l=n[s];if(l.visible&&"waterfall"===l.type){o=!0;break}}o&&(a("waterfallmode"),a("waterfallgap",.2),a("waterfallgroupgap"))}},{"../../lib":503,"./layout_attributes":1110}],1112:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../lib"),o=e("../../components/drawing"),a=e("../../constants/numerical").BADNUM,s=e("../bar/plot"),l=e("../bar/uniform_text").clearMinTextSize;t.exports=function(e,t,n,c){var u=e._fullLayout;l("waterfall",u),s.plot(e,t,n,c,{mode:u.waterfallmode,norm:u.waterfallmode,gap:u.waterfallgap,groupgap:u.waterfallgroupgap}),function(e,t,n,s){var l=t.xaxis,c=t.yaxis;i.makeTraceGroups(s,n,"trace bars").each((function(n){var s=r.select(this),u=n[0].trace,h=i.ensureSingle(s,"g","lines");if(u.connector&&u.connector.visible){var d="h"===u.orientation,f=u.connector.mode,p=h.selectAll("g.line").data(i.identity);p.enter().append("g").classed("line",!0),p.exit().remove();var g=p.size();p.each((function(n,s){if(s===g-1||n.cNext){var u=function(e,t,n,r){var i=[],o=[],a=r?t:n,s=r?n:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),r?[i,o]:[o,i]}(n,l,c,d),h=u[0],p=u[1],m="";h[0]!==a&&p[0]!==a&&h[1]!==a&&p[1]!==a&&("spanning"===f&&!n.isSum&&s>0&&(m+=d?"M"+h[0]+","+p[1]+"V"+p[0]:"M"+h[1]+","+p[0]+"H"+h[0]),"between"!==f&&(n.isSum||s<g-1)&&(m+=d?"M"+h[1]+","+p[0]+"V"+p[1]:"M"+h[0]+","+p[1]+"H"+h[1]),h[2]!==a&&p[2]!==a&&(m+=d?"M"+h[1]+","+p[1]+"V"+p[2]:"M"+h[1]+","+p[1]+"H"+h[2])),""===m&&(m="M0,0Z"),i.ensureSingle(r.select(this),"path").attr("d",m).call(o.setClipUrl,t.layerClipId,e)}}))}else h.remove()}))}(e,t,n,c)}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../bar/plot":659,"../bar/uniform_text":664,"@plotly/d3":58}],1113:[function(e,t,n){"use strict";var r=e("@plotly/d3"),i=e("../../components/drawing"),o=e("../../components/color"),a=e("../../constants/interactions").DESELECTDIM,s=e("../bar/style"),l=e("../bar/uniform_text").resizeText,c=s.styleTextPoints;t.exports={style:function(e,t,n){var s=n||r.select(e).selectAll("g.waterfalllayer").selectAll("g.trace");l(e,s,"waterfall"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var n=r.select(this),s=t[0].trace;n.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(o.fill,t.color).call(o.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(n,s,e),n.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],1114:[function(e,t,n){"use strict";var r=e("../plots/cartesian/axes"),i=e("../lib"),o=e("../plot_api/plot_schema"),a=e("./helpers").pointsAccessorFunction,s=e("../constants/numerical").BADNUM;n.moduleType="transform",n.name="aggregate";var l=n.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(e,t,n,o){if(o.enabled){for(var a=o.target,l=i.nestedProperty(t,a),c=l.get(),u=function(e,t){var n=e.func,r=t.d2c,o=t.c2d;switch(n){case"count":return h;case"first":return d;case"last":return f;case"sum":return function(e,t){for(var n=0,i=0;i<t.length;i++){var a=r(e[t[i]]);a!==s&&(n+=a)}return o(n)};case"avg":return function(e,t){for(var n=0,i=0,a=0;a<t.length;a++){var l=r(e[t[a]]);l!==s&&(n+=l,i++)}return i?o(n/i):s};case"min":return function(e,t){for(var n=1/0,i=0;i<t.length;i++){var a=r(e[t[i]]);a!==s&&(n=Math.min(n,a))}return n===1/0?s:o(n)};case"max":return function(e,t){for(var n=-1/0,i=0;i<t.length;i++){var a=r(e[t[i]]);a!==s&&(n=Math.max(n,a))}return n===-1/0?s:o(n)};case"range":return function(e,t){for(var n=1/0,i=-1/0,a=0;a<t.length;a++){var l=r(e[t[a]]);l!==s&&(n=Math.min(n,l),i=Math.max(i,l))}return i===-1/0||n===1/0?s:o(i-n)};case"change":return function(e,t){var n=r(e[t[0]]),i=r(e[t[t.length-1]]);return n===s||i===s?s:o(i-n)};case"median":return function(e,t){for(var n=[],a=0;a<t.length;a++){var l=r(e[t[a]]);l!==s&&n.push(l)}if(!n.length)return s;n.sort(i.sorterAsc);var c=(n.length-1)/2;return o((n[Math.floor(c)]+n[Math.ceil(c)])/2)};case"mode":return function(e,t){for(var n={},i=0,a=s,l=0;l<t.length;l++){var c=r(e[t[l]]);if(c!==s){var u=n[c]=(n[c]||0)+1;u>i&&(i=u,a=c)}}return i?o(a):s};case"rms":return function(e,t){for(var n=0,i=0,a=0;a<t.length;a++){var l=r(e[t[a]]);l!==s&&(n+=l*l,i++)}return i?o(Math.sqrt(n/i)):s};case"stddev":return function(t,n){var i,o=0,a=0,l=1,c=s;for(i=0;i<n.length&&c===s;i++)c=r(t[n[i]]);if(c===s)return s;for(;i<n.length;i++){var u=r(t[n[i]]);if(u!==s){var h=u-c;o+=h,a+=h*h,l++}}var d="sample"===e.funcmode?l-1:l;return d?Math.sqrt((a-o*o/l)/d):0}}}(o,r.getDataConversions(e,t,a,c)),p=new Array(n.length),g=0;g<n.length;g++)p[g]=u(c,n[g]);l.set(p),"count"===o.func&&i.pushUnique(t._arrayAttrs,a)}}function h(e,t){return t.length}function d(e,t){return e[t[0]]}function f(e,t){return e[t[t.length-1]]}n.supplyDefaults=function(e,t){var n,r={};function a(t,n){return i.coerce(e,r,l,t,n)}if(!a("enabled"))return r;var s=o.findArrayAttributes(t),u={};for(n=0;n<s.length;n++)u[s[n]]=1;var h=a("groups");if(!Array.isArray(h)){if(!u[h])return r.enabled=!1,r;u[h]=0}var d,f=e.aggregations||[],p=r.aggregations=new Array(f.length);function g(e,t){return i.coerce(f[n],d,c,e,t)}for(n=0;n<f.length;n++){d={_index:n};var m=g("target"),v=g("func");g("enabled")&&m&&(u[m]||"count"===v&&void 0===u[m])?("stddev"===v&&g("funcmode"),u[m]=0,p[n]=d):p[n]={enabled:!1,_index:n}}for(n=0;n<s.length;n++)u[s[n]]&&p.push({target:s[n],func:c.func.dflt,enabled:!0,_index:-1});return r},n.calcTransform=function(e,t,n){if(n.enabled){var r=n.groups,o=i.getTargetArray(t,{target:r});if(o){var s,l,c,h,d={},f={},p=[],g=a(t.transforms,n),m=o.length;for(t._length&&(m=Math.min(m,t._length)),s=0;s<m;s++)void 0===(c=d[l=o[s]])?(d[l]=p.length,h=[s],p.push(h),f[d[l]]=g(s)):(p[c].push(s),f[d[l]]=(f[d[l]]||[]).concat(g(s)));n._indexToPoints=f;var v=n.aggregations;for(s=0;s<v.length;s++)u(e,t,p,v[s]);"string"==typeof r&&u(e,t,p,{target:r,func:"first",enabled:!0}),t._length=p.length}}}},{"../constants/numerical":479,"../lib":503,"../plot_api/plot_schema":542,"../plots/cartesian/axes":554,"./helpers":1117}],1115:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../registry"),o=e("../plots/cartesian/axes"),a=e("./helpers").pointsAccessorFunction,s=e("../constants/filter_ops"),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;n.moduleType="transform",n.name="filter",n.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(l).concat(c).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},n.supplyDefaults=function(e){var t={};function o(i,o){return r.coerce(e,t,n.attributes,i,o)}if(o("enabled")){var a=o("target");if(r.isArrayOrTypedArray(a)&&0===a.length)return t.enabled=!1,t;o("preservegaps"),o("operation"),o("value");var s=i.getComponentMethod("calendars","handleDefaults");s(e,t,"valuecalendar",null),s(e,t,"targetcalendar",null)}return t},n.calcTransform=function(e,t,n){if(n.enabled){var i=r.getTargetArray(t,n);if(i){var s=n.target,h=i.length;t._length&&(h=Math.min(h,t._length));var d=n.targetcalendar,f=t._arrayAttrs,p=n.preservegaps;if("string"==typeof s){var g=r.nestedProperty(t,s+"calendar").get();g&&(d=g)}var m,v,y=function(e,t,n){var r=e.operation,i=e.value,o=Array.isArray(i);function a(e){return-1!==e.indexOf(r)}var s,h=function(n){return t(n,0,e.valuecalendar)},d=function(e){return t(e,0,n)};switch(a(l)?s=h(o?i[0]:i):a(c)?s=o?[h(i[0]),h(i[1])]:[h(i),h(i)]:a(u)&&(s=o?i.map(h):[h(i)]),r){case"=":return function(e){return d(e)===s};case"!=":return function(e){return d(e)!==s};case"<":return function(e){return d(e)<s};case"<=":return function(e){return d(e)<=s};case">":return function(e){return d(e)>s};case">=":return function(e){return d(e)>=s};case"[]":return function(e){var t=d(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=d(e);return t>s[0]&&t<s[1]};case"[)":return function(e){var t=d(e);return t>=s[0]&&t<s[1]};case"(]":return function(e){var t=d(e);return t>s[0]&&t<=s[1]};case"][":return function(e){var t=d(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=d(e);return t<s[0]||t>s[1]};case"](":return function(e){var t=d(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=d(e);return t<s[0]||t>=s[1]};case"{}":return function(e){return-1!==s.indexOf(d(e))};case"}{":return function(e){return-1===s.indexOf(d(e))}}}(n,o.getDataToCoordFunc(e,t,s,i),d),b={},_={},x=0;p?(m=function(e){b[e.astr]=r.extendDeep([],e.get()),e.set(new Array(h))},v=function(e,t){var n=b[e.astr][t];e.get()[t]=n}):(m=function(e){b[e.astr]=r.extendDeep([],e.get()),e.set([])},v=function(e,t){var n=b[e.astr][t];e.get().push(n)}),k(m);for(var w=a(t.transforms,n),A=0;A<h;A++)y(i[A])?(k(v,A),_[x++]=w(A)):p&&x++;n._indexToPoints=_,t._length=x}}function k(e,n){for(var i=0;i<f.length;i++)e(r.nestedProperty(t,f[i]),n)}}},{"../constants/filter_ops":475,"../lib":503,"../plots/cartesian/axes":554,"../registry":638,"./helpers":1117}],1116:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plot_api/plot_schema"),o=e("../plots/plots"),a=e("./helpers").pointsAccessorFunction;function s(e,t){var n,s,l,c,u,h,d,f,p,g,m=t.transform,v=t.transformIndex,y=e.transforms[v].groups,b=a(e.transforms,m);if(!r.isArrayOrTypedArray(y)||0===y.length)return[e];var _=r.filterUnique(y),x=new Array(_.length),w=y.length,A=i.findArrayAttributes(e),k=m.styles||[],T={};for(n=0;n<k.length;n++)T[k[n].target]=k[n].value;m.styles&&(g=r.keyedContainer(m,"styles","target","value.name"));var S={},E={};for(n=0;n<_.length;n++){S[h=_[n]]=n,E[h]=0,(d=x[n]=r.extendDeepNoArrays({},e))._group=h,d.transforms[v]._indexToPoints={};var C=null;for(g&&(C=g.get(h)),d.name=C||""===C?C:r.templateString(m.nameformat,{trace:e.name,group:h}),f=d.transforms,d.transforms=[],s=0;s<f.length;s++)d.transforms[s]=r.extendDeepNoArrays({},f[s]);for(s=0;s<A.length;s++)r.nestedProperty(d,A[s]).set([])}for(l=0;l<A.length;l++){for(c=A[l],s=0,p=[];s<_.length;s++)p[s]=r.nestedProperty(x[s],c).get();for(u=r.nestedProperty(e,c).get(),s=0;s<w;s++)p[S[y[s]]].push(u[s])}for(s=0;s<w;s++)(d=x[S[y[s]]]).transforms[v]._indexToPoints[E[y[s]]]=b(s),E[y[s]]++;for(n=0;n<_.length;n++)h=_[n],d=x[n],o.clearExpandedTraceDefaultColors(d),d=r.extendDeepNoArrays(d,T[h]||{});return x}n.moduleType="transform",n.name="groupby",n.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},n.supplyDefaults=function(e,t,i){var o,a={};function s(t,i){return r.coerce(e,a,n.attributes,t,i)}if(!s("enabled"))return a;s("groups"),s("nameformat",i._dataLength>1?"%{group} (%{trace})":"%{group}");var l=e.styles,c=a.styles=[];if(l)for(o=0;o<l.length;o++){var u=c[o]={};r.coerce(l[o],c[o],n.attributes.styles,"target");var h=r.coerce(l[o],c[o],n.attributes.styles,"value");r.isPlainObject(h)?u.value=r.extendDeep({},h):h&&delete u.value}return a},n.transform=function(e,t){var n,r,i,o=[];for(r=0;r<e.length;r++)for(n=s(e[r],t),i=0;i<n.length;i++)o.push(n[i]);return o}},{"../lib":503,"../plot_api/plot_schema":542,"../plots/plots":619,"./helpers":1117}],1117:[function(e,t,n){"use strict";n.pointsAccessorFunction=function(e,t){for(var n,r,i=0;i<e.length&&(n=e[i])!==t;i++)n._indexToPoints&&!1!==n.enabled&&(r=n._indexToPoints);var o=r?function(e){return r[e]}:function(e){return[e]};return o}},{}],1118:[function(e,t,n){"use strict";var r=e("../lib"),i=e("../plots/cartesian/axes"),o=e("./helpers").pointsAccessorFunction,a=e("../constants/numerical").BADNUM;function s(e,t,n,r){var i,o=new Array(r),s=new Array(r);for(i=0;i<r;i++)o[i]={v:t[i],i};for(o.sort(function(e,t){switch(e.order){case"ascending":return function(e,n){var r=t(e.v),i=t(n.v);return r===a?1:i===a?-1:r-i};case"descending":return function(e,n){var r=t(e.v),i=t(n.v);return r===a?1:i===a?-1:i-r}}}(e,n)),i=0;i<r;i++)s[i]=o[i].i;return s}n.moduleType="transform",n.name="sort",n.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},n.supplyDefaults=function(e){var t={};function i(i,o){return r.coerce(e,t,n.attributes,i,o)}return i("enabled")&&(i("target"),i("order")),t},n.calcTransform=function(e,t,n){if(n.enabled){var a=r.getTargetArray(t,n);if(a){var l=n.target,c=a.length;t._length&&(c=Math.min(c,t._length));var u,h,d=t._arrayAttrs,f=s(n,a,i.getDataToCoordFunc(e,t,l,a),c),p=o(t.transforms,n),g={};for(u=0;u<d.length;u++){var m=r.nestedProperty(t,d[u]),v=m.get(),y=new Array(c);for(h=0;h<c;h++)y[h]=v[f[h]];m.set(y)}for(h=0;h<c;h++)g[h]=p(f[h]);n._indexToPoints=g,t._length=c}}}},{"../constants/numerical":479,"../lib":503,"../plots/cartesian/axes":554,"./helpers":1117}],1119:[function(e,t,n){"use strict";n.version="2.9.0"},{}],1120:[function(e,t,r){(function(n){(function(){!function(e){"object"==typeof r&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:this).stackgl=e()}((function(){return function t(n,r,i){function o(s,l){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!l&&c)return c(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[s]={exports:{}};n[s][0].call(h.exports,(function(e){return o(n[s][1][e]||e)}),h,h.exports,t,n,r,i)}return r[s].exports}for(var a="function"==typeof e&&e,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,l=n-i;s<l;s+=a)o.push(u(e,s,s+a>l?l:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);var s;return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){(function(){"use strict";var t=e("base64-js"),r=e("ieee754");n.Buffer=a,n.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=a.prototype,t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n)).__proto__=a.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?o(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|h(e))}function u(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(i)return r?-1:N(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),j(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(j(s))return a;e[n+a]=s}return a}function y(e,t,n,r){return F(N(t,e.length-n),e,n,r)}function b(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return b(e,t,n,r)}function x(e,t,n,r){return F(z(t),e,n,r)}function w(e,t,n,r){return F(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}n.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(B(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){o=c[h],s=u[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function M(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function R(e,t,n,i,o){return t=+t,n>>>=0,o||D(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=a.prototype,r},a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;o>=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,r),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var P=/[^+/0-9A-Za-z-_]/g;function N(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*g}},{}],5:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var e=l(f);h=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||h||l(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],6:[function(e,t,n){t.exports={alpha_shape:e("alpha-shape"),convex_hull:e("convex-hull"),delaunay_triangulate:e("delaunay-triangulate"),gl_cone3d:e("gl-cone3d"),gl_error3d:e("gl-error3d"),gl_heatmap2d:e("gl-heatmap2d"),gl_line3d:e("gl-line3d"),gl_mesh3d:e("gl-mesh3d"),gl_plot2d:e("gl-plot2d"),gl_plot3d:e("gl-plot3d"),gl_pointcloud2d:e("gl-pointcloud2d"),gl_scatter3d:e("gl-scatter3d"),gl_select_box:e("gl-select-box"),gl_spikes2d:e("gl-spikes2d"),gl_streamtube3d:e("gl-streamtube3d"),gl_surface3d:e("gl-surface3d"),ndarray:e("ndarray"),ndarray_linear_interpolate:e("ndarray-linear-interpolate")}},{"alpha-shape":12,"convex-hull":58,"delaunay-triangulate":63,"gl-cone3d":79,"gl-error3d":84,"gl-heatmap2d":88,"gl-line3d":91,"gl-mesh3d":112,"gl-plot2d":118,"gl-plot3d":121,"gl-pointcloud2d":123,"gl-scatter3d":128,"gl-select-box":130,"gl-spikes2d":139,"gl-streamtube3d":143,"gl-surface3d":145,ndarray:259,"ndarray-linear-interpolate":253}],7:[function(e,t,n){"use strict";t.exports=function(e){var t=(e=e||{}).eye||[0,0,1],n=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=r(),h=i(),d=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,n,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,n,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,n,s),new a({turntable:u,orbit:h,matrix:d},c)};var r=e("turntable-camera-controller"),i=e("orbit-camera-controller"),o=e("matrix-camera-controller");function a(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=a.prototype;s.flush=function(e){for(var t=this._controllerList,n=0;n<t.length;++n)t[n].flush(e)},s.idle=function(e){for(var t=this._controllerList,n=0;n<t.length;++n)t[n].idle(e)},s.lookAt=function(e,t,n,r){for(var i=this._controllerList,o=0;o<i.length;++o)i[o].lookAt(e,t,n,r)},s.rotate=function(e,t,n,r){for(var i=this._controllerList,o=0;o<i.length;++o)i[o].rotate(e,t,n,r)},s.pan=function(e,t,n,r){for(var i=this._controllerList,o=0;o<i.length;++o)i[o].pan(e,t,n,r)},s.translate=function(e,t,n,r){for(var i=this._controllerList,o=0;o<i.length;++o)i[o].translate(e,t,n,r)},s.setMatrix=function(e,t){for(var n=this._controllerList,r=0;r<n.length;++r)n[r].setMatrix(e,t)},s.setDistanceLimits=function(e,t){for(var n=this._controllerList,r=0;r<n.length;++r)n[r].setDistanceLimits(e,t)},s.setDistance=function(e,t){for(var n=this._controllerList,r=0;r<n.length;++r)n[r].setDistance(e,t)},s.recalcMatrix=function(e){this._active.recalcMatrix(e)},s.getDistance=function(e){return this._active.getDistance(e)},s.getDistanceLimits=function(e){return this._active.getDistanceLimits(e)},s.lastT=function(){return this._active.lastT()},s.setMode=function(e){if(e!==this._mode){var t=this._controllerNames.indexOf(e);if(!(t<0)){var n=this._active,r=this._controllerList[t],i=Math.max(n.lastT(),r.lastT());n.recalcMatrix(i),r.setMatrix(i,n.computedMatrix),this._active=r,this._mode=e,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{"matrix-camera-controller":245,"orbit-camera-controller":263,"turntable-camera-controller":305}],8:[function(e,t,n){"use strict";var r="undefined"==typeof WeakMap?e("weak-map"):WeakMap,i=e("gl-buffer"),o=e("gl-vao"),a=new r;t.exports=function(e){var t=a.get(e),n=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!n||!e.isBuffer(n)){var r=i(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=o(e,[{buffer:r,type:e.FLOAT,size:2}]))._triangleBuffer=r,a.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},{"gl-buffer":78,"gl-vao":150,"weak-map":313}],9:[function(e,t,n){var r=e("pad-left");t.exports=function(e,t,n){t="number"==typeof t?t:1,n=n||": ";var i=e.split(/\r?\n/),o=String(i.length+t-1).length;return i.map((function(e,i){var a=i+t,s=String(a).length;return r(a,o-s)+n+e})).join("\n")}},{"pad-left":264}],10:[function(e,t,n){"use strict";t.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var n=e[0].length,r=[e[0]],o=[0],a=1;a<t;++a)if(r.push(e[a]),i(r,n)){if(o.push(a),o.length===n+1)return o}else r.pop();return o};var r=e("robust-orientation");function i(e,t){for(var n=new Array(t+1),i=0;i<e.length;++i)n[i]=e[i];for(i=0;i<=e.length;++i){for(var o=e.length;o<=t;++o){for(var a=new Array(t),s=0;s<t;++s)a[s]=Math.pow(o+1-i,s);n[o]=a}if(r.apply(void 0,n))return!0}return!1}},{"robust-orientation":284}],11:[function(e,t,n){"use strict";t.exports=function(e,t){return r(t).filter((function(n){for(var r=new Array(n.length),o=0;o<n.length;++o)r[o]=t[n[o]];return i(r)*e<1}))};var r=e("delaunay-triangulate"),i=e("circumradius")},{circumradius:49,"delaunay-triangulate":63}],12:[function(e,t,n){t.exports=function(e,t){return i(r(e,t))};var r=e("alpha-complex"),i=e("simplicial-complex-boundary")},{"alpha-complex":11,"simplicial-complex-boundary":290}],13:[function(e,t,n){t.exports=function(e){return atob(e)}},{}],14:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=t.length,o=new Array(n+1),a=0;a<n;++a){for(var s=new Array(n+1),l=0;l<=n;++l)s[l]=e[l][a];o[a]=s}for(o[n]=new Array(n+1),a=0;a<=n;++a)o[n][a]=1;var c=new Array(n+1);for(a=0;a<n;++a)c[a]=t[a];c[n]=1;var u=r(o,c),h=i(u[n+1]);0===h&&(h=1);var d=new Array(n+1);for(a=0;a<=n;++a)d[a]=i(u[a])/h;return d};var r=e("robust-linear-solve");function i(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return t}},{"robust-linear-solve":283}],15:[function(e,t,n){"use strict";var r=e("./lib/rationalize");t.exports=function(e,t){return r(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},{"./lib/rationalize":25}],16:[function(e,t,n){"use strict";t.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},{}],17:[function(e,t,n){"use strict";var r=e("./lib/rationalize");t.exports=function(e,t){return r(e[0].mul(t[1]),e[1].mul(t[0]))}},{"./lib/rationalize":25}],18:[function(e,t,n){"use strict";var r=e("./is-rat"),i=e("./lib/is-bn"),o=e("./lib/num-to-bn"),a=e("./lib/str-to-bn"),s=e("./lib/rationalize"),l=e("./div");t.exports=function e(t,n){if(r(t))return n?l(t,e(n)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(i(t))c=t.clone();else if("string"==typeof t)c=a(t);else{if(0===t)return[o(0),o(1)];if(t===Math.floor(t))c=o(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),h-=256;c=o(t)}}if(r(n))c.mul(n[1]),u=n[0].clone();else if(i(n))u=n.clone();else if("string"==typeof n)u=a(n);else if(n)if(n===Math.floor(n))u=o(n);else{for(;n!==Math.floor(n);)n*=Math.pow(2,256),h+=256;u=o(n)}else u=o(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(e,t,n){"use strict";var r=e("./lib/is-bn");t.exports=function(e){return Array.isArray(e)&&2===e.length&&r(e[0])&&r(e[1])}},{"./lib/is-bn":23}],20:[function(e,t,n){"use strict";var r=e("bn.js");t.exports=function(e){return e.cmp(new r(0))}},{"bn.js":33}],21:[function(e,t,n){"use strict";var r=e("./bn-sign");t.exports=function(e){var t=e.length,n=e.words,i=0;if(1===t)i=n[0];else if(2===t)i=n[0]+67108864*n[1];else for(var o=0;o<t;o++)i+=n[o]*Math.pow(67108864,o);return r(e)*i}},{"./bn-sign":20}],22:[function(e,t,n){"use strict";var r=e("double-bits"),i=e("bit-twiddle").countTrailingZeros;t.exports=function(e){var t=i(r.lo(e));if(t<32)return t;var n=i(r.hi(e));return n>20?52:n+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(e,t,n){"use strict";e("bn.js"),t.exports=function(e){return e&&"object"==typeof e&&Boolean(e.words)}},{"bn.js":33}],24:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("double-bits");t.exports=function(e){var t=i.exponent(e);return t<52?new r(e):new r(e*Math.pow(2,52-t)).ushln(t-52)}},{"bn.js":33,"double-bits":64}],25:[function(e,t,n){"use strict";var r=e("./num-to-bn"),i=e("./bn-sign");t.exports=function(e,t){var n=i(e),o=i(t);if(0===n)return[r(0),r(1)];if(0===o)return[r(0),r(0)];o<0&&(e=e.neg(),t=t.neg());var a=e.gcd(t);return a.cmpn(1)?[e.div(a),t.div(a)]:[e,t]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(e,t,n){"use strict";var r=e("bn.js");t.exports=function(e){return new r(e)}},{"bn.js":33}],27:[function(e,t,n){"use strict";var r=e("./lib/rationalize");t.exports=function(e,t){return r(e[0].mul(t[0]),e[1].mul(t[1]))}},{"./lib/rationalize":25}],28:[function(e,t,n){"use strict";var r=e("./lib/bn-sign");t.exports=function(e){return r(e[0])*r(e[1])}},{"./lib/bn-sign":20}],29:[function(e,t,n){"use strict";var r=e("./lib/rationalize");t.exports=function(e,t){return r(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},{"./lib/rationalize":25}],30:[function(e,t,n){"use strict";var r=e("./lib/bn-to-num"),i=e("./lib/ctz");t.exports=function(e){var t=e[0],n=e[1];if(0===t.cmpn(0))return 0;var o=t.abs().divmod(n.abs()),a=o.div,s=r(a),l=o.mod,c=t.negative!==n.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(d=r(l.ushln(u).divRound(n)))*Math.pow(2,-u))}var h=n.bitLength()-l.bitLength()+53,d=r(l.ushln(h).divRound(n));return h<1023?c*d*Math.pow(2,-h):c*(d*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},{"./lib/bn-to-num":21,"./lib/ctz":22}],31:[function(e,t,n){"use strict";function r(e,t,n,r,i){for(var o=i+1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)>=0?(o=a,i=a-1):r=a+1}return o}function i(e,t,n,r,i){for(var o=i+1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)>0?(o=a,i=a-1):r=a+1}return o}function o(e,t,n,r,i){for(var o=r-1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)<0?(o=a,r=a+1):i=a-1}return o}function a(e,t,n,r,i){for(var o=r-1;r<=i;){var a=r+i>>>1,s=e[a];(void 0!==n?n(s,t):s-t)<=0?(o=a,r=a+1):i=a-1}return o}function s(e,t,n,r,i){for(;r<=i;){var o=r+i>>>1,a=e[o],s=void 0!==n?n(a,t):a-t;if(0===s)return o;s<=0?r=o+1:i=o-1}return-1}function l(e,t,n,r,i,o){return"function"==typeof n?o(e,t,n,void 0===r?0:0|r,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===n?0:0|n,void 0===r?e.length-1:0|r)}t.exports={ge:function(e,t,n,i,o){return l(e,t,n,i,o,r)},gt:function(e,t,n,r,o){return l(e,t,n,r,o,i)},lt:function(e,t,n,r,i){return l(e,t,n,r,i,o)},le:function(e,t,n,r,i){return l(e,t,n,r,i,a)},eq:function(e,t,n,r,i){return l(e,t,n,r,i,s)}}},{}],32:[function(e,t,n){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}n.INT_BITS=32,n.INT_MAX=2147483647,n.INT_MIN=-1<<31,n.sign=function(e){return(e>0)-(e<0)},n.abs=function(e){var t=e>>31;return(e^t)-t},n.min=function(e,t){return t^(e^t)&-(e<t)},n.max=function(e,t){return e^(e^t)&-(e<t)},n.isPow2=function(e){return!(e&e-1||!e)},n.log2=function(e){var t,n;return t=(e>65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},n.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},n.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},n.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},n.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=new Array(256);!function(e){for(var t=0;t<256;++t){var n=t,r=t,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<<i&255}}(i),n.reverse=function(e){return i[255&e]<<24|i[e>>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},n.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},n.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},n.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},n.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},n.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},{}],33:[function(e,t,n){!function(t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof t?t.exports=o:n.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var h=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,h=67108863&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&a}n.words[c]=0|h,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<i|o)).toString(16);n=0!=(o=s>>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(f).toString(e);n=(p=p.idivn(f)).isZero()?g+n:u[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s<o;s++)c[s]=0}else{for(s=0;s<o-i;s++)c[s]=0;for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[o-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,i,o,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],h=8191&u,d=u>>>13,f=0|a[1],p=8191&f,g=f>>>13,m=0|a[2],v=8191&m,y=m>>>13,b=0|a[3],_=8191&b,x=b>>>13,w=0|a[4],A=8191&w,k=w>>>13,T=0|a[5],S=8191&T,E=T>>>13,C=0|a[6],M=8191&C,O=C>>>13,L=0|a[7],D=8191&L,I=L>>>13,R=0|a[8],P=8191&R,N=R>>>13,z=0|a[9],F=8191&z,B=z>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,$=q>>>13,W=0|s[2],G=8191&W,Y=W>>>13,X=0|s[3],Z=8191&X,K=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],he=8191&ue,de=ue>>>13,fe=0|s[9],pe=8191&fe,ge=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(c+(r=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(g,U)|0,o=Math.imul(g,V);var ve=(c+(r=r+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(d,H)|0))<<13)|0;c=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,o=Math.imul(y,V),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,$)|0;var ye=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(x,U)|0,o=Math.imul(x,V),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,$)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Y)|0;var be=(c+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,V))+Math.imul(k,U)|0,o=Math.imul(k,V),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,$)|0,r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,K)|0;var _e=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,V))+Math.imul(E,U)|0,o=Math.imul(E,V),r=r+Math.imul(A,H)|0,i=(i=i+Math.imul(A,$)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,K)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var xe=(c+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(O,U)|0,o=Math.imul(O,V),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,$)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var we=(c+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(I,U)|0,o=Math.imul(I,V),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ae=(c+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(N,U)|0,o=Math.imul(N,V),r=r+Math.imul(D,H)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,K)|0,r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(F,U),i=(i=Math.imul(F,V))+Math.imul(B,U)|0,o=Math.imul(B,V),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,$)|0,r=r+Math.imul(D,G)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Y)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,K)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,he)|0,o=o+Math.imul(g,de)|0;var Te=(c+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,$))+Math.imul(B,H)|0,o=Math.imul(B,$),r=r+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,K)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ce)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,G),i=(i=Math.imul(F,Y))+Math.imul(B,G)|0,o=Math.imul(B,Y),r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,K)|0,r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,r=r+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(_,he)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Ee=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,Z),i=(i=Math.imul(F,K))+Math.imul(B,Z)|0,o=Math.imul(B,K),r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0,r=r+Math.imul(A,he)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(k,he)|0,o=o+Math.imul(k,de)|0;var Ce=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(E,he)|0,o=o+Math.imul(E,de)|0;var Me=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,ne),i=(i=Math.imul(F,re))+Math.imul(B,ne)|0,o=Math.imul(B,re),r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,r=r+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,r=r+Math.imul(M,he)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ge)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(F,oe),i=(i=Math.imul(F,ae))+Math.imul(B,oe)|0,o=Math.imul(B,ae),r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(D,he)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(I,he)|0,o=o+Math.imul(I,de)|0;var Le=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul(F,le),i=(i=Math.imul(F,ce))+Math.imul(B,le)|0,o=Math.imul(B,ce),r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var De=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ge)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,ge)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(F,he),i=(i=Math.imul(F,de))+Math.imul(B,he)|0,o=Math.imul(B,de);var Ie=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Re=(c+(r=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,ge))+Math.imul(B,pe)|0))<<13)|0;return c=((o=Math.imul(B,ge))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,l[0]=me,l[1]=ve,l[2]=ye,l[3]=be,l[4]=_e,l[5]=xe,l[6]=we,l[7]=Ae,l[8]=ke,l[9]=Te,l[10]=Se,l[11]=Ee,l[12]=Ce,l[13]=Me,l[14]=Oe,l[15]=Le,l[16]=De,l[17]=Ie,l[18]=Re,0!==c&&(l[19]=c,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=f),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,l=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=l;c++){var u=o-c,h=(0|e.words[u])*(0|t.words[c]),d=67108863&h;s=67108863&(d=d+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):g(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var h=l,d=c,f=0;f<a;f++){var p=n[u+f],g=r[u+f],m=n[u+f+a],v=r[u+f+a],y=h*m-d*v;v=h*v+d*m,m=y,n[u+f]=p+m,r[u+f]=g+v,n[u+f+a]=p-m,r[u+f+a]=g-v,f!==s&&(y=l*h-c*d,d=l*d+c*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,o,s,l,r,i),this.transform(c,o,u,h,r,i);for(var f=0;f<r;f++){var p=s[f]*u[f]-l[f]*h[f];l[f]=s[f]*h[f]+l[f]*u[f],s[f]=p}return this.conjugate(s,l,r),this.transform(s,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,l=(0|this.words[t])-s<<n;this.words[t]=l|a,a=s>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,l=n;if(i-=a,i=Math.max(0,i),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-o|h>>>o,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var l=(0|e.words[i])*t;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!=(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(l)):(n.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,y),i(x,y),i(w,y),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return v[e]=t,t},A.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();r(m<p);var v=this.pow(h,new o(1).iushln(p-m-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=m}return d},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var h=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}l=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,A),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:2}],34:[function(e,t,n){"use strict";t.exports=function(e){var t,n,r,i=e.length,o=0;for(t=0;t<i;++t)o+=e[t].length;var a=new Array(o),s=0;for(t=0;t<i;++t){var l=e[t],c=l.length;for(n=0;n<c;++n){var u=a[s++]=new Array(c-1),h=0;for(r=0;r<c;++r)r!==n&&(u[h++]=l[r]);if(1&n){var d=u[1];u[1]=u[0],u[0]=d}}}return a}},{}],35:[function(e,t,n){"use strict";t.exports=function(e,t,n){switch(arguments.length){case 1:return h(e);case 2:return"function"==typeof t?c(e,e,t,!0):d(e,t);case 3:return c(e,t,n,!1);default:throw new Error("box-intersect: Invalid arguments")}};var r,i=e("typedarray-pool"),o=e("./lib/sweep"),a=e("./lib/intersect");function s(e,t){for(var n=0;n<e;++n)if(!(t[n]<=t[n+e]))return!0;return!1}function l(e,t,n,r){for(var i=0,o=0,a=0,l=e.length;a<l;++a){var c=e[a];if(!s(t,c)){for(var u=0;u<2*t;++u)n[i++]=c[u];r[o++]=a}}return o}function c(e,t,n,r){var s=e.length,c=t.length;if(!(s<=0||c<=0)){var u=e[0].length>>>1;if(!(u<=0)){var h,d=i.mallocDouble(2*u*s),f=i.mallocInt32(s);if((s=l(e,u,d,f))>0){if(1===u&&r)o.init(s),h=o.sweepComplete(u,n,0,s,d,f,0,s,d,f);else{var p=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(t,u,p,g))>0&&(o.init(s+c),h=1===u?o.sweepBipartite(u,n,0,s,d,f,0,c,p,g):a(u,n,r,s,d,f,c,p,g),i.free(p),i.free(g))}i.free(d),i.free(f)}return h}}}function u(e,t){r.push([e,t])}function h(e){return r=[],c(e,e,u,!0),r}function d(e,t){return r=[],c(e,t,u,!1),r}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(e,t,n){"use strict";function r(e){return e?function(e,t,n,r,i,o,a,s,l,c,u){return i-r>l-s?function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=r,f=h*r;d<i;++d,f+=h){var p=o[t+f],g=o[t+f+e],m=a[d];e:for(var v=s,y=h*s;v<l;++v,y+=h){var b=c[t+y],_=c[t+y+e],x=u[v];if(!(_<p||g<b)){for(var w=t+1;w<e;++w){var A=o[w+f],k=o[w+e+f],T=c[w+y],S=c[w+e+y];if(k<T||S<A)continue e}var E=n(m,x);if(void 0!==E)return E}}}}(e,t,n,r,i,o,a,s,l,c,u):function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=s,f=h*s;d<l;++d,f+=h){var p=c[t+f],g=c[t+f+e],m=u[d];e:for(var v=r,y=h*r;v<i;++v,y+=h){var b=o[t+y],_=o[t+y+e],x=a[v];if(!(g<b||_<p)){for(var w=t+1;w<e;++w){var A=o[w+y],k=o[w+e+y],T=c[w+f],S=c[w+e+f];if(k<T||S<A)continue e}var E=n(x,m);if(void 0!==E)return E}}}}(e,t,n,r,i,o,a,s,l,c,u)}:function(e,t,n,r,i,o,a,s,l,c,u,h){return o-i>c-l?r?function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=r,f=h*r;d<i;++d,f+=h){var p=o[t+f],g=o[t+f+e],m=a[d];e:for(var v=s,y=h*s;v<l;++v,y+=h){var b=c[t+y],_=u[v];if(!(b<=p||g<b)){for(var x=t+1;x<e;++x){var w=o[x+f],A=o[x+e+f],k=c[x+y],T=c[x+e+y];if(A<k||T<w)continue e}var S=n(_,m);if(void 0!==S)return S}}}}(e,t,n,i,o,a,s,l,c,u,h):function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=r,f=h*r;d<i;++d,f+=h){var p=o[t+f],g=o[t+f+e],m=a[d];e:for(var v=s,y=h*s;v<l;++v,y+=h){var b=c[t+y],_=u[v];if(!(b<p||g<b)){for(var x=t+1;x<e;++x){var w=o[x+f],A=o[x+e+f],k=c[x+y],T=c[x+e+y];if(A<k||T<w)continue e}var S=n(m,_);if(void 0!==S)return S}}}}(e,t,n,i,o,a,s,l,c,u,h):r?function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=s,f=h*s;d<l;++d,f+=h){var p=c[t+f],g=u[d];e:for(var m=r,v=h*r;m<i;++m,v+=h){var y=o[t+v],b=o[t+v+e],_=a[m];if(!(p<=y||b<p)){for(var x=t+1;x<e;++x){var w=o[x+v],A=o[x+e+v],k=c[x+f],T=c[x+e+f];if(A<k||T<w)continue e}var S=n(g,_);if(void 0!==S)return S}}}}(e,t,n,i,o,a,s,l,c,u,h):function(e,t,n,r,i,o,a,s,l,c,u){for(var h=2*e,d=s,f=h*s;d<l;++d,f+=h){var p=c[t+f],g=u[d];e:for(var m=r,v=h*r;m<i;++m,v+=h){var y=o[t+v],b=o[t+v+e],_=a[m];if(!(p<y||b<p)){for(var x=t+1;x<e;++x){var w=o[x+v],A=o[x+e+v],k=c[x+f],T=c[x+e+f];if(A<k||T<w)continue e}var S=n(_,g);if(void 0!==S)return S}}}}(e,t,n,i,o,a,s,l,c,u,h)}}n.partial=r(!1),n.full=r(!0)},{}],37:[function(e,t,n){"use strict";t.exports=function(e,t,n,o,u,w,A,k,T){!function(e,t){var n=8*i.log2(t+1)*(e+1)|0,o=i.nextPow2(6*n);v.length<o&&(r.free(v),v=r.mallocInt32(o));var a=i.nextPow2(2*n);y.length<a&&(r.free(y),y=r.mallocDouble(a))}(e,o+A);var S,E=0,C=2*e;for(b(E++,0,0,o,0,A,n?16:0,-1/0,1/0),n||b(E++,0,0,A,0,o,1,-1/0,1/0);E>0;){var M=6*(E-=1),O=v[M],L=v[M+1],D=v[M+2],I=v[M+3],R=v[M+4],P=v[M+5],N=2*E,z=y[N],F=y[N+1],B=1&P,j=!!(16&P),U=u,V=w,q=k,H=T;if(B&&(U=k,V=T,q=u,H=w),!(2&P&&L>=(D=f(e,O,L,D,U,V,F))||4&P&&(L=p(e,O,L,D,U,V,z))>=D)){var $=D-L,W=R-I;if(j){if(e*$*($+W)<4194304){if(void 0!==(S=l.scanComplete(e,O,t,L,D,U,V,I,R,q,H)))return S;continue}}else{if(e*Math.min($,W)<128){if(void 0!==(S=a(e,O,t,B,L,D,U,V,I,R,q,H)))return S;continue}if(e*$*W<4194304){if(void 0!==(S=l.scanBipartite(e,O,t,B,L,D,U,V,I,R,q,H)))return S;continue}}var G=h(e,O,L,D,U,V,z,F);if(L<G)if(e*(G-L)<128){if(void 0!==(S=s(e,O+1,t,L,G,U,V,I,R,q,H)))return S}else if(O===e-2){if(void 0!==(S=B?l.sweepBipartite(e,t,I,R,q,H,L,G,U,V):l.sweepBipartite(e,t,L,G,U,V,I,R,q,H)))return S}else b(E++,O+1,L,G,I,R,B,-1/0,1/0),b(E++,O+1,I,R,L,G,1^B,-1/0,1/0);if(G<D){var Y=c(e,O,I,R,q,H),X=q[C*Y+O],Z=d(e,O,Y,R,q,H,X);if(Z<R&&b(E++,O,G,D,Z,R,(4|B)+(j?16:0),X,F),I<Y&&b(E++,O,G,D,I,Y,(2|B)+(j?16:0),z,X),Y+1===Z){if(void 0!==(S=j?x(e,O,t,G,D,U,V,Y,q,H[Y]):_(e,O,t,B,G,D,U,V,Y,q,H[Y])))return S}else if(Y<Z){var K;if(j){if(G<(K=g(e,O,G,D,U,V,X))){var J=d(e,O,G,K,U,V,X);if(O===e-2){if(G<J&&void 0!==(S=l.sweepComplete(e,t,G,J,U,V,Y,Z,q,H)))return S;if(J<K&&void 0!==(S=l.sweepBipartite(e,t,J,K,U,V,Y,Z,q,H)))return S}else G<J&&b(E++,O+1,G,J,Y,Z,16,-1/0,1/0),J<K&&(b(E++,O+1,J,K,Y,Z,0,-1/0,1/0),b(E++,O+1,Y,Z,J,K,1,-1/0,1/0))}}else G<(K=B?m(e,O,G,D,U,V,X):g(e,O,G,D,U,V,X))&&(O===e-2?S=B?l.sweepBipartite(e,t,Y,Z,q,H,G,K,U,V):l.sweepBipartite(e,t,G,K,U,V,Y,Z,q,H):(b(E++,O+1,G,K,Y,Z,B,-1/0,1/0),b(E++,O+1,Y,Z,G,K,1^B,-1/0,1/0)))}}}}};var r=e("typedarray-pool"),i=e("bit-twiddle"),o=e("./brute"),a=o.partial,s=o.full,l=e("./sweep"),c=e("./median"),u=e("./partition"),h=u("!(lo>=p0)&&!(p1>=hi)"),d=u("lo===p0"),f=u("lo<p0"),p=u("hi<=p0"),g=u("lo<=p0&&p0<=hi"),m=u("lo<p0&&p0<=hi"),v=r.mallocInt32(1024),y=r.mallocDouble(1024);function b(e,t,n,r,i,o,a,s,l){var c=6*e;v[c]=t,v[c+1]=n,v[c+2]=r,v[c+3]=i,v[c+4]=o,v[c+5]=a;var u=2*e;y[u]=s,y[u+1]=l}function _(e,t,n,r,i,o,a,s,l,c,u){var h=2*e,d=l*h,f=c[d+t];e:for(var p=i,g=i*h;p<o;++p,g+=h){var m=a[g+t],v=a[g+t+e];if(!(f<m||v<f||r&&f===m)){for(var y,b=s[p],_=t+1;_<e;++_){m=a[g+_],v=a[g+_+e];var x=c[d+_],w=c[d+_+e];if(v<x||w<m)continue e}if(void 0!==(y=r?n(u,b):n(b,u)))return y}}}function x(e,t,n,r,i,o,a,s,l,c){var u=2*e,h=s*u,d=l[h+t];e:for(var f=r,p=r*u;f<i;++f,p+=u){var g=a[f];if(g!==c){var m=o[p+t],v=o[p+t+e];if(!(d<m||v<d)){for(var y=t+1;y<e;++y){m=o[p+y],v=o[p+y+e];var b=l[h+y],_=l[h+y+e];if(v<b||_<m)continue e}var x=n(g,c);if(void 0!==x)return x}}}}},{"./brute":36,"./median":38,"./partition":39,"./sweep":41,"bit-twiddle":32,"typedarray-pool":308}],38:[function(e,t,n){"use strict";t.exports=function(e,t,n,o,a,s){if(o<=n+1)return n;for(var l=n,c=o,u=o+n>>>1,h=2*e,d=u,f=a[h*u+t];l<c;){if(c-l<8){i(e,t,l,c,a,s),f=a[h*u+t];break}var p=c-l,g=Math.random()*p+l|0,m=a[h*g+t],v=Math.random()*p+l|0,y=a[h*v+t],b=Math.random()*p+l|0,_=a[h*b+t];m<=y?_>=y?(d=v,f=y):m>=_?(d=g,f=m):(d=b,f=_):y>=_?(d=v,f=y):_>=m?(d=g,f=m):(d=b,f=_);for(var x=h*(c-1),w=h*d,A=0;A<h;++A,++x,++w){var k=a[x];a[x]=a[w],a[w]=k}var T=s[c-1];for(s[c-1]=s[d],s[d]=T,x=h*(c-1),w=h*(d=r(e,t,l,c-1,a,s,f)),A=0;A<h;++A,++x,++w)k=a[x],a[x]=a[w],a[w]=k;if(T=s[c-1],s[c-1]=s[d],s[d]=T,u<d){for(c=d-1;l<c&&a[h*(c-1)+t]===f;)c-=1;c+=1}else{if(!(d<u))break;for(l=d+1;l<c&&a[h*l+t]===f;)l+=1}}return r(e,t,n,u,a,s,a[h*u+t])};var r=e("./partition")("lo<p0");function i(e,t,n,r,i,o){for(var a=2*e,s=a*(n+1)+t,l=n+1;l<r;++l,s+=a)for(var c=i[s],u=l,h=a*(l-1);u>n&&i[h+t]>c;--u,h-=a){for(var d=h,f=h+a,p=0;p<a;++p,++d,++f){var g=i[d];i[d]=i[f],i[f]=g}var m=o[u];o[u]=o[u-1],o[u-1]=m}}},{"./partition":39}],39:[function(e,t,n){"use strict";t.exports=function(e){return r[e]};var r={"lo===p0":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=t,d=n;r>d;++d,l+=s)if(i[l+h]===a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var g=o[d];o[d]=o[u],o[u++]=g}return u},"lo<p0":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=t,d=n;r>d;++d,l+=s)if(i[l+h]<a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var g=o[d];o[d]=o[u],o[u++]=g}return u},"lo<=p0":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=e+t,d=n;r>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var g=o[d];o[d]=o[u],o[u++]=g}return u},"hi<=p0":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=e+t,d=n;r>d;++d,l+=s)if(i[l+h]<=a)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=i[l+f];i[l+f]=i[c],i[c++]=p}var g=o[d];o[d]=o[u],o[u++]=g}return u},"lo<p0&&p0<=hi":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=t,d=e+t,f=n;r>f;++f,l+=s){var p=i[l+h],g=i[l+d];if(p<a&&a<=g)if(u===f)u+=1,c+=s;else{for(var m=0;s>m;++m){var v=i[l+m];i[l+m]=i[c],i[c++]=v}var y=o[f];o[f]=o[u],o[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,n,r,i,o,a){for(var s=2*e,l=s*n,c=l,u=n,h=t,d=e+t,f=n;r>f;++f,l+=s){var p=i[l+h],g=i[l+d];if(p<=a&&a<=g)if(u===f)u+=1,c+=s;else{for(var m=0;s>m;++m){var v=i[l+m];i[l+m]=i[c],i[c++]=v}var y=o[f];o[f]=o[u],o[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,n,r,i,o,a,s){for(var l=2*e,c=l*n,u=c,h=n,d=t,f=e+t,p=n;r>p;++p,c+=l){var g=i[c+d],m=i[c+f];if(!(g>=a||s>=m))if(h===p)h+=1,u+=l;else{for(var v=0;l>v;++v){var y=i[c+v];i[c+v]=i[u],i[u++]=y}var b=o[p];o[p]=o[h],o[h++]=b}}return h}}},{}],40:[function(e,t,n){"use strict";t.exports=function(e,t){t<=128?r(0,t-1,e):u(0,t-1,e)};function r(e,t,n){for(var r=2*(e+1),i=e+1;i<=t;++i){for(var o=n[r++],a=n[r++],s=i,l=r-2;s-- >e;){var c=n[l-2],u=n[l-1];if(c<o)break;if(c===o&&u<a)break;n[l]=c,n[l+1]=u,l-=2}n[l]=o,n[l+1]=a}}function i(e,t,n){t*=2;var r=n[e*=2],i=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=r,n[t+1]=i}function o(e,t,n){t*=2,n[e*=2]=n[t],n[e+1]=n[t+1]}function a(e,t,n,r){t*=2,n*=2;var i=r[e*=2],o=r[e+1];r[e]=r[t],r[e+1]=r[t+1],r[t]=r[n],r[t+1]=r[n+1],r[n]=i,r[n+1]=o}function s(e,t,n,r,i){t*=2,i[e*=2]=i[t],i[t]=n,i[e+1]=i[t+1],i[t+1]=r}function l(e,t,n){t*=2;var r=n[e*=2],i=n[t];return!(r<i)&&(r!==i||n[e+1]>n[t+1])}function c(e,t,n,r){var i=r[e*=2];return i<t||i===t&&r[e+1]<n}function u(e,t,n){var h=(t-e+1)/6|0,d=e+h,f=t-h,p=e+t>>1,g=p-h,m=p+h,v=d,y=g,b=p,_=m,x=f,w=e+1,A=t-1,k=0;l(v,y,n)&&(k=v,v=y,y=k),l(_,x,n)&&(k=_,_=x,x=k),l(v,b,n)&&(k=v,v=b,b=k),l(y,b,n)&&(k=y,y=b,b=k),l(v,_,n)&&(k=v,v=_,_=k),l(b,_,n)&&(k=b,b=_,_=k),l(y,x,n)&&(k=y,y=x,x=k),l(y,b,n)&&(k=y,y=b,b=k),l(_,x,n)&&(k=_,_=x,x=k);for(var T=n[2*y],S=n[2*y+1],E=n[2*_],C=n[2*_+1],M=2*v,O=2*b,L=2*x,D=2*d,I=2*p,R=2*f,P=0;P<2;++P){var N=n[M+P],z=n[O+P],F=n[L+P];n[D+P]=N,n[I+P]=z,n[R+P]=F}o(g,e,n),o(m,t,n);for(var B=w;B<=A;++B)if(c(B,T,S,n))B!==w&&i(B,w,n),++w;else if(!c(B,E,C,n))for(;;){if(c(A,E,C,n)){c(A,T,S,n)?(a(B,w,A,n),++w,--A):(i(B,A,n),--A);break}if(--A<B)break}s(e,w-1,T,S,n),s(t,A+1,E,C,n),w-2-e<=32?r(e,w-2,n):u(e,w-2,n),t-(A+2)<=32?r(A+2,t,n):u(A+2,t,n),A-w<=32?r(w,A,n):u(w,A,n)}},{}],41:[function(e,t,n){"use strict";t.exports={init:function(e){var t=i.nextPow2(e);l.length<t&&(r.free(l),l=r.mallocInt32(t)),c.length<t&&(r.free(c),c=r.mallocInt32(t)),u.length<t&&(r.free(u),u=r.mallocInt32(t)),h.length<t&&(r.free(h),h=r.mallocInt32(t)),d.length<t&&(r.free(d),d=r.mallocInt32(t)),f.length<t&&(r.free(f),f=r.mallocInt32(t));var n=8*t;p.length<n&&(r.free(p),p=r.mallocDouble(n))},sweepBipartite:function(e,t,n,r,i,s,d,f,v,y){for(var b=0,_=2*e,x=e-1,w=_-1,A=n;A<r;++A){var k=s[A],T=_*A;p[b++]=i[T+x],p[b++]=-(k+1),p[b++]=i[T+w],p[b++]=k}for(A=d;A<f;++A){k=y[A]+a;var S=_*A;p[b++]=v[S+x],p[b++]=-k,p[b++]=v[S+w],p[b++]=k}var E=b>>>1;o(p,E);var C=0,M=0;for(A=0;A<E;++A){var O=0|p[2*A+1];if(O>=a)g(u,h,M--,O=O-a|0);else if(O>=0)g(l,c,C--,O);else if(O<=-268435456){O=-O-a|0;for(var L=0;L<C;++L)if(void 0!==(D=t(l[L],O)))return D;m(u,h,M++,O)}else{for(O=-O-1|0,L=0;L<M;++L){var D;if(void 0!==(D=t(O,u[L])))return D}m(l,c,C++,O)}}},sweepComplete:function(e,t,n,r,i,a,s,v,y,b){for(var _=0,x=2*e,w=e-1,A=x-1,k=n;k<r;++k){var T=a[k]+1<<1,S=x*k;p[_++]=i[S+w],p[_++]=-T,p[_++]=i[S+A],p[_++]=T}for(k=s;k<v;++k){T=b[k]+1<<1;var E=x*k;p[_++]=y[E+w],p[_++]=1|-T,p[_++]=y[E+A],p[_++]=1|T}var C=_>>>1;o(p,C);var M=0,O=0,L=0;for(k=0;k<C;++k){var D=0|p[2*k+1],I=1&D;if(k<C-1&&D>>1==p[2*k+3]>>1&&(I=2,k+=1),D<0){for(var R=-(D>>1)-1,P=0;P<L;++P)if(void 0!==(N=t(d[P],R)))return N;if(0!==I)for(P=0;P<M;++P)if(void 0!==(N=t(l[P],R)))return N;if(1!==I)for(P=0;P<O;++P){var N;if(void 0!==(N=t(u[P],R)))return N}0===I?m(l,c,M++,R):1===I?m(u,h,O++,R):2===I&&m(d,f,L++,R)}else R=(D>>1)-1,0===I?g(l,c,M--,R):1===I?g(u,h,O--,R):2===I&&g(d,f,L--,R)}},scanBipartite:function(e,t,n,r,i,s,u,h,d,f,v,y){var b=0,_=2*e,x=t,w=t+e,A=1,k=1;r?k=a:A=a;for(var T=i;T<s;++T){var S=T+A,E=_*T;p[b++]=u[E+x],p[b++]=-S,p[b++]=u[E+w],p[b++]=S}for(T=d;T<f;++T){S=T+k;var C=_*T;p[b++]=v[C+x],p[b++]=-S}var M=b>>>1;o(p,M);var O=0;for(T=0;T<M;++T){var L=0|p[2*T+1];if(L<0){var D=!1;if((S=-L)>=a?(D=!r,S-=a):(D=!!r,S-=1),D)m(l,c,O++,S);else{var I=y[S],R=_*S,P=v[R+t+1],N=v[R+t+1+e];e:for(var z=0;z<O;++z){var F=l[z],B=_*F;if(!(N<u[B+t+1]||u[B+t+1+e]<P)){for(var j=t+2;j<e;++j)if(v[R+j+e]<u[B+j]||u[B+j+e]<v[R+j])continue e;var U,V=h[F];if(void 0!==(U=r?n(I,V):n(V,I)))return U}}}}else g(l,c,O--,L-A)}},scanComplete:function(e,t,n,r,i,s,c,u,h,d,f){for(var g=0,m=2*e,v=t,y=t+e,b=r;b<i;++b){var _=b+a,x=m*b;p[g++]=s[x+v],p[g++]=-_,p[g++]=s[x+y],p[g++]=_}for(b=u;b<h;++b){_=b+1;var w=m*b;p[g++]=d[w+v],p[g++]=-_}var A=g>>>1;o(p,A);var k=0;for(b=0;b<A;++b){var T=0|p[2*b+1];if(T<0)if((_=-T)>=a)l[k++]=_-a;else{var S=f[_-=1],E=m*_,C=d[E+t+1],M=d[E+t+1+e];e:for(var O=0;O<k;++O){var L=l[O],D=c[L];if(D===S)break;var I=m*L;if(!(M<s[I+t+1]||s[I+t+1+e]<C)){for(var R=t+2;R<e;++R)if(d[E+R+e]<s[I+R]||s[I+R+e]<d[E+R])continue e;var P=n(D,S);if(void 0!==P)return P}}}else{for(_=T-a,O=k-1;O>=0;--O)if(l[O]===_){for(R=O+1;R<k;++R)l[R-1]=l[R];break}--k}}}};var r=e("typedarray-pool"),i=e("bit-twiddle"),o=e("./sort"),a=1<<28,s=1024,l=r.mallocInt32(s),c=r.mallocInt32(s),u=r.mallocInt32(s),h=r.mallocInt32(s),d=r.mallocInt32(s),f=r.mallocInt32(s),p=r.mallocDouble(8192);function g(e,t,n,r){var i=t[r],o=e[n-1];e[i]=o,t[o]=i}function m(e,t,n,r){e[n]=r,t[r]=n}},{"./sort":40,"bit-twiddle":32,"typedarray-pool":308}],42:[function(e,t,n){"use strict";var r=e("./lib/monotone"),i=e("./lib/triangulation"),o=e("./lib/delaunay"),a=e("./lib/filter");function s(e){return[Math.min(e[0],e[1]),Math.max(e[0],e[1])]}function l(e,t){return e[0]-t[0]||e[1]-t[1]}function c(e,t,n){return t in e?e[t]:n}t.exports=function(e,t,n){Array.isArray(t)?(n=n||{},t=t||[]):(n=t||{},t=[]);var u=!!c(n,"delaunay",!0),h=!!c(n,"interior",!0),d=!!c(n,"exterior",!0),f=!!c(n,"infinity",!1);if(!h&&!d||0===e.length)return[];var p=r(e,t);if(u||h!==d||f){for(var g=i(e.length,function(e){return e.map(s).sort(l)}(t)),m=0;m<p.length;++m){var v=p[m];g.addTriangle(v[0],v[1],v[2])}return u&&o(e,g),d?h?f?a(g,0,f):g.cells():a(g,1,f):a(g,-1)}return p}},{"./lib/delaunay":43,"./lib/filter":44,"./lib/monotone":45,"./lib/triangulation":46}],43:[function(e,t,n){"use strict";var r=e("robust-in-sphere")[4];function i(e,t,n,i,o,a){var s=t.opposite(i,o);if(!(s<0)){if(o<i){var l=i;i=o,o=l,l=a,a=s,s=l}t.isConstraint(i,o)||r(e[i],e[o],e[a],e[s])<0&&n.push(i,o)}}e("binary-search-bounds"),t.exports=function(e,t){for(var n=[],o=e.length,a=t.stars,s=0;s<o;++s)for(var l=a[s],c=1;c<l.length;c+=2)if(!((f=l[c])<s||t.isConstraint(s,f))){for(var u=l[c-1],h=-1,d=1;d<l.length;d+=2)if(l[d-1]===f){h=l[d];break}h<0||r(e[s],e[f],e[u],e[h])<0&&n.push(s,f)}for(;n.length>0;){for(var f=n.pop(),p=(u=-1,h=-1,l=a[s=n.pop()],1);p<l.length;p+=2){var g=l[p-1],m=l[p];g===f?h=m:m===f&&(u=g)}u<0||h<0||r(e[s],e[f],e[u],e[h])>=0||(t.flip(s,f),i(e,t,n,u,s,h),i(e,t,n,s,h,u),i(e,t,n,h,f,u),i(e,t,n,f,u,h))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(e,t,n){"use strict";var r,i=e("binary-search-bounds");function o(e,t,n,r,i,o,a){this.cells=e,this.neighbor=t,this.flags=r,this.constraint=n,this.active=i,this.next=o,this.boundary=a}function a(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}t.exports=function(e,t,n){var r=function(e,t){for(var n=e.cells(),r=n.length,i=0;i<r;++i){var s=(v=n[i])[0],l=v[1],c=v[2];l<c?l<s&&(v[0]=l,v[1]=c,v[2]=s):c<s&&(v[0]=c,v[1]=s,v[2]=l)}n.sort(a);var u=new Array(r);for(i=0;i<u.length;++i)u[i]=0;var h=[],d=[],f=new Array(3*r),p=new Array(3*r),g=null;t&&(g=[]);var m=new o(n,f,p,u,h,d,g);for(i=0;i<r;++i)for(var v=n[i],y=0;y<3;++y){s=v[y],l=v[(y+1)%3];var b=f[3*i+y]=m.locate(l,s,e.opposite(l,s)),_=p[3*i+y]=e.isConstraint(s,l);b<0&&(_?d.push(i):(h.push(i),u[i]=1),t&&g.push([l,s,-1]))}return m}(e,n);if(0===t)return n?r.cells.concat(r.boundary):r.cells;for(var i=1,s=r.active,l=r.next,c=r.flags,u=r.cells,h=r.constraint,d=r.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-i){c[f]=i,u[f];for(var p=0;p<3;++p){var g=d[3*f+p];g>=0&&0===c[g]&&(h[3*f+p]?l.push(g):(s.push(g),c[g]=i))}}}var m=l;l=s,s=m,l.length=0,i=-i}var v=function(e,t,n){for(var r=0,i=0;i<e.length;++i)t[i]===n&&(e[r++]=e[i]);return e.length=r,e}(u,c,t);return n?v.concat(r.boundary):v},o.prototype.locate=(r=[0,0,0],function(e,t,n){var o=e,s=t,l=n;return t<n?t<e&&(o=t,s=n,l=e):n<e&&(o=n,s=e,l=t),o<0?-1:(r[0]=o,r[1]=s,r[2]=l,i.eq(this.cells,r,a))})},{"binary-search-bounds":31}],45:[function(e,t,n){"use strict";var r=e("binary-search-bounds"),i=e("robust-orientation")[3];function o(e,t,n,r,i){this.a=e,this.b=t,this.idx=n,this.lowerIds=r,this.upperIds=i}function a(e,t,n,r){this.a=e,this.b=t,this.type=n,this.idx=r}function s(e,t){var n=e.a[0]-t.a[0]||e.a[1]-t.a[1]||e.type-t.type;return n||(0!==e.type&&(n=i(e.a,e.b,t.b))?n:e.idx-t.idx)}function l(e,t){return i(e.a,e.b,t)}function c(e,t,n,o,a){for(var s=r.lt(t,o,l),c=r.gt(t,o,l),u=s;u<c;++u){for(var h=t[u],d=h.lowerIds,f=d.length;f>1&&i(n[d[f-2]],n[d[f-1]],o)>0;)e.push([d[f-1],d[f-2],a]),f-=1;d.length=f,d.push(a);var p=h.upperIds;for(f=p.length;f>1&&i(n[p[f-2]],n[p[f-1]],o)<0;)e.push([p[f-2],p[f-1],a]),f-=1;p.length=f,p.push(a)}}function u(e,t){var n;return(n=e.a[0]<t.a[0]?i(e.a,e.b,t.a):i(t.b,t.a,e.a))?n:(n=t.b[0]<e.b[0]?i(e.a,e.b,t.b):i(t.b,t.a,e.b))||e.idx-t.idx}function h(e,t,n){var i=r.le(e,n,u),a=e[i],s=a.upperIds,l=s[s.length-1];a.upperIds=[l],e.splice(i+1,0,new o(n.a,n.b,n.idx,[l],s))}function d(e,t,n){var i=n.a;n.a=n.b,n.b=i;var o=r.eq(e,n,u),a=e[o];e[o-1].upperIds=a.upperIds,e.splice(o,1)}t.exports=function(e,t){for(var n=e.length,r=t.length,i=[],l=0;l<n;++l)i.push(new a(e[l],null,0,l));for(l=0;l<r;++l){var u=t[l],f=e[u[0]],p=e[u[1]];f[0]<p[0]?i.push(new a(f,p,2,l),new a(p,f,1,l)):f[0]>p[0]&&i.push(new a(p,f,2,l),new a(f,p,1,l))}i.sort(s);for(var g=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),m=[new o([g,1],[g,0],-1,[],[],[],[])],v=[],y=(l=0,i.length);l<y;++l){var b=i[l],_=b.type;0===_?c(v,m,e,b.a,b.idx):2===_?h(m,0,b):d(m,0,b)}return v}},{"binary-search-bounds":31,"robust-orientation":284}],46:[function(e,t,n){"use strict";var r=e("binary-search-bounds");function i(e,t){this.stars=e,this.edges=t}t.exports=function(e,t){for(var n=new Array(e),r=0;r<e;++r)n[r]=[];return new i(n,t)};var o=i.prototype;function a(e,t,n){for(var r=1,i=e.length;r<i;r+=2)if(e[r-1]===t&&e[r]===n)return e[r-1]=e[i-2],e[r]=e[i-1],void(e.length=i-2)}o.isConstraint=function(){var e=[0,0];function t(e,t){return e[0]-t[0]||e[1]-t[1]}return function(n,i){return e[0]=Math.min(n,i),e[1]=Math.max(n,i),r.eq(this.edges,e,t)>=0}}(),o.removeTriangle=function(e,t,n){var r=this.stars;a(r[e],t,n),a(r[t],n,e),a(r[n],e,t)},o.addTriangle=function(e,t,n){var r=this.stars;r[e].push(t,n),r[t].push(n,e),r[n].push(e,t)},o.opposite=function(e,t){for(var n=this.stars[t],r=1,i=n.length;r<i;r+=2)if(n[r]===e)return n[r-1];return-1},o.flip=function(e,t){var n=this.opposite(e,t),r=this.opposite(t,e);this.removeTriangle(e,t,n),this.removeTriangle(t,e,r),this.addTriangle(e,r,n),this.addTriangle(t,n,r)},o.edges=function(){for(var e=this.stars,t=[],n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;o+=2)t.push([i[o],i[o+1]]);return t},o.cells=function(){for(var e=this.stars,t=[],n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;o+=2){var s=i[o],l=i[o+1];n<Math.min(s,l)&&t.push([n,s,l])}return t}},{"binary-search-bounds":31}],47:[function(e,t,n){"use strict";t.exports=function(e){for(var t=1,n=1;n<e.length;++n)for(var r=0;r<n;++r)if(e[n]<e[r])t=-t;else if(e[r]===e[n])return 0;return t}},{}],48:[function(e,t,n){"use strict";var r=e("dup"),i=e("robust-linear-solve");function o(e,t){for(var n=0,r=e.length,i=0;i<r;++i)n+=e[i]*t[i];return n}function a(e){var t=e.length;if(0===t)return[];e[0].length;var n=r([e.length+1,e.length+1],1),a=r([e.length+1],1);n[t][t]=0;for(var s=0;s<t;++s){for(var l=0;l<=s;++l)n[l][s]=n[s][l]=2*o(e[s],e[l]);a[s]=o(e[s],e[s])}var c=i(n,a),u=0,h=c[t+1];for(s=0;s<h.length;++s)u+=h[s];var d=new Array(t);for(s=0;s<t;++s){h=c[s];var f=0;for(l=0;l<h.length;++l)f+=h[l];d[s]=f/u}return d}function s(e){if(0===e.length)return[];for(var t=e[0].length,n=r([t]),i=a(e),o=0;o<e.length;++o)for(var s=0;s<t;++s)n[s]+=e[o][s]*i[o];return n}s.barycenetric=a,t.exports=s},{dup:65,"robust-linear-solve":283}],49:[function(e,t,n){t.exports=function(e){for(var t=r(e),n=0,i=0;i<e.length;++i)for(var o=e[i],a=0;a<t.length;++a)n+=Math.pow(o[a]-t[a],2);return Math.sqrt(n/e.length)};var r=e("circumcenter")},{circumcenter:48}],50:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r;if(n){r=t;for(var i=new Array(t.length),o=0;o<t.length;++o){var a=t[o];i[o]=[a[0],a[1],n[o]]}t=i}for(var s=function(e,t,n){var r=p(e,[],f(e));return v(t,r,n),!!r}(e,t,!!n);y(e,t,!!n);)s=!0;if(n&&s)for(r.length=0,n.length=0,o=0;o<t.length;++o)a=t[o],r.push([a[0],a[1]]),n.push(a[2]);return s};var r=e("union-find"),i=e("box-intersect"),o=e("robust-segment-intersect"),a=e("big-rat"),s=e("big-rat/cmp"),l=e("big-rat/to-float"),c=e("rat-vec"),u=e("nextafter"),h=e("./lib/rat-seg-intersect");function d(e){var t=l(e);return[u(t,-1/0),u(t,1/0)]}function f(e){for(var t=new Array(e.length),n=0;n<e.length;++n){var r=e[n];t[n]=[u(r[0],-1/0),u(r[1],-1/0),u(r[0],1/0),u(r[1],1/0)]}return t}function p(e,t,n){for(var o=t.length,a=new r(o),s=[],l=0;l<t.length;++l){var c=t[l],h=d(c[0]),f=d(c[1]);s.push([u(h[0],-1/0),u(f[0],-1/0),u(h[1],1/0),u(f[1],1/0)])}i(s,(function(e,t){a.link(e,t)}));var p=!0,g=new Array(o);for(l=0;l<o;++l)(v=a.find(l))!==l&&(p=!1,e[v]=[Math.min(e[l][0],e[v][0]),Math.min(e[l][1],e[v][1])]);if(p)return null;var m=0;for(l=0;l<o;++l){var v;(v=a.find(l))===l?(g[l]=m,e[m++]=e[l]):g[l]=-1}for(e.length=m,l=0;l<o;++l)g[l]<0&&(g[l]=g[a.find(l)]);return g}function g(e,t){return e[0]-t[0]||e[1]-t[1]}function m(e,t){return e[0]-t[0]||e[1]-t[1]||(e[2]<t[2]?-1:e[2]>t[2]?1:0)}function v(e,t,n){if(0!==e.length){if(t)for(var r=0;r<e.length;++r){var i=t[(a=e[r])[0]],o=t[a[1]];a[0]=Math.min(i,o),a[1]=Math.max(i,o)}else for(r=0;r<e.length;++r){var a;i=(a=e[r])[0],o=a[1],a[0]=Math.min(i,o),a[1]=Math.max(i,o)}n?e.sort(m):e.sort(g);var s=1;for(r=1;r<e.length;++r){var l=e[r-1],c=e[r];(c[0]!==l[0]||c[1]!==l[1]||n&&c[2]!==l[2])&&(e[s++]=c)}e.length=s}}function y(e,t,n){var r=function(e,t){for(var n=new Array(t.length),r=0;r<t.length;++r){var i=t[r],o=e[i[0]],a=e[i[1]];n[r]=[u(Math.min(o[0],a[0]),-1/0),u(Math.min(o[1],a[1]),-1/0),u(Math.max(o[0],a[0]),1/0),u(Math.max(o[1],a[1]),1/0)]}return n}(e,t),d=function(e,t,n){var r=[];return i(n,(function(n,i){var a=t[n],s=t[i];if(a[0]!==s[0]&&a[0]!==s[1]&&a[1]!==s[0]&&a[1]!==s[1]){var l=e[a[0]],c=e[a[1]],u=e[s[0]],h=e[s[1]];o(l,c,u,h)&&r.push([n,i])}})),r}(e,t,r),g=f(e),m=function(e,t,n,r){var a=[];return i(n,r,(function(n,r){var i=t[n];if(i[0]!==r&&i[1]!==r){var s=e[r],l=e[i[0]],c=e[i[1]];o(l,c,s,s)&&a.push([n,r])}})),a}(e,t,r,g),y=p(e,function(e,t,n,r,i){var o,u,d=e.map((function(e){return[a(e[0]),a(e[1])]}));for(o=0;o<n.length;++o){var f=n[o];u=f[0];var p=f[1],g=t[u],m=t[p],v=h(c(e[g[0]]),c(e[g[1]]),c(e[m[0]]),c(e[m[1]]));if(v){var y=e.length;e.push([l(v[0]),l(v[1])]),d.push(v),r.push([u,y],[p,y])}}for(r.sort((function(e,t){if(e[0]!==t[0])return e[0]-t[0];var n=d[e[1]],r=d[t[1]];return s(n[0],r[0])||s(n[1],r[1])})),o=r.length-1;o>=0;--o){var b=t[u=(E=r[o])[0]],_=b[0],x=b[1],w=e[_],A=e[x];if((w[0]-A[0]||w[1]-A[1])<0){var k=_;_=x,x=k}b[0]=_;var T,S=b[1]=E[1];for(i&&(T=b[2]);o>0&&r[o-1][0]===u;){var E,C=(E=r[--o])[1];i?t.push([S,C,T]):t.push([S,C]),S=C}i?t.push([S,x,T]):t.push([S,x])}return d}(e,t,d,m,n));return v(t,y,n),!!y||d.length>0||m.length>0}},{"./lib/rat-seg-intersect":51,"big-rat":18,"big-rat/cmp":16,"big-rat/to-float":30,"box-intersect":35,nextafter:260,"rat-vec":273,"robust-segment-intersect":287,"union-find":309}],51:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var o=s(t,e),h=s(r,n),d=u(o,h);if(0===a(d))return null;var f=u(h,s(e,n)),p=i(f,d),g=c(o,p);return l(e,g)};var r=e("big-rat/mul"),i=e("big-rat/div"),o=e("big-rat/sub"),a=e("big-rat/sign"),s=e("rat-vec/sub"),l=e("rat-vec/add"),c=e("rat-vec/muls");function u(e,t){return o(r(e[0],t[1]),r(e[1],t[0]))}},{"big-rat/div":17,"big-rat/mul":27,"big-rat/sign":28,"big-rat/sub":29,"rat-vec/add":272,"rat-vec/muls":274,"rat-vec/sub":275}],52:[function(e,t,n){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(e,t,n){"use strict";var r=e("./colorScale"),i=e("lerp");function o(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function a(e){for(var t,n="#",r=0;r<3;++r)n+=("00"+(t=(t=e[r]).toString(16))).substr(t.length);return n}function s(e){return"rgba("+e.join(",")+")"}t.exports=function(e){var t,n,l,c,u,h,d,f,p,g;if(e||(e={}),f=(e.nshades||72)-1,d=e.format||"hex",(h=e.colormap)||(h="jet"),"string"==typeof h){if(h=h.toLowerCase(),!r[h])throw Error(h+" not a supported colorscale");u=r[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>f+1)throw new Error(h+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*f)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var m=u.map((function(e,t){var n=u[t].index,r=u[t].rgb.slice();return 4===r.length&&r[3]>=0&&r[3]<=1||(r[3]=p[0]+(p[1]-p[0])*n),r})),v=[];for(g=0;g<t.length-1;++g){c=t[g+1]-t[g],n=m[g],l=m[g+1];for(var y=0;y<c;y++){var b=y/c;v.push([Math.round(i(n[0],l[0],b)),Math.round(i(n[1],l[1],b)),Math.round(i(n[2],l[2],b)),i(n[3],l[3],b)])}}return v.push(u[u.length-1].rgb.concat(p[1])),"hex"===d?v=v.map(a):"rgbaString"===d?v=v.map(s):"float"===d&&(v=v.map(o)),v}},{"./colorScale":52,lerp:240}],54:[function(e,t,n){"use strict";t.exports=function(e,t,n,o){var a=r(t,n,o);if(0===a){var s=i(r(e,t,n)),c=i(r(e,t,o));if(s===c){if(0===s){var u=l(e,t,n);return u===l(e,t,o)?0:u?1:-1}return 0}return 0===c?s>0||l(e,t,o)?-1:1:0===s?c>0||l(e,t,n)?1:-1:i(c-s)}var h=r(e,t,n);return h>0?a>0&&r(e,t,o)>0?1:-1:h<0?a>0||r(e,t,o)>0?1:-1:r(e,t,o)>0||l(e,t,n)?1:-1};var r=e("robust-orientation"),i=e("signum"),o=e("two-sum"),a=e("robust-product"),s=e("robust-sum");function l(e,t,n){var r=o(e[0],-t[0]),i=o(e[1],-t[1]),l=o(n[0],-t[0]),c=o(n[1],-t[1]),u=s(a(r,l),a(i,c));return u[u.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(e,t,n){"use strict";t.exports=function(e){return e<0?-1:e>0?1:0}},{}],56:[function(e,t,n){t.exports=function(e,t){var n=e.length,o=e.length-t.length;if(o)return o;switch(n){case 0:return 0;case 1:return e[0]-t[0];case 2:return e[0]+e[1]-t[0]-t[1]||r(e[0],e[1])-r(t[0],t[1]);case 3:var a=e[0]+e[1],s=t[0]+t[1];if(o=a+e[2]-(s+t[2]))return o;var l=r(e[0],e[1]),c=r(t[0],t[1]);return r(l,e[2])-r(c,t[2])||r(l+e[2],a)-r(c+t[2],s);case 4:var u=e[0],h=e[1],d=e[2],f=e[3],p=t[0],g=t[1],m=t[2],v=t[3];return u+h+d+f-(p+g+m+v)||r(u,h,d,f)-r(p,g,m,v,p)||r(u+h,u+d,u+f,h+d,h+f,d+f)-r(p+g,p+m,p+v,g+m,g+v,m+v)||r(u+h+d,u+h+f,u+d+f,h+d+f)-r(p+g+m,p+g+v,p+m+v,g+m+v);default:for(var y=e.slice().sort(i),b=t.slice().sort(i),_=0;_<n;++_)if(o=y[_]-b[_])return o;return 0}};var r=Math.min;function i(e,t){return e-t}},{}],57:[function(e,t,n){"use strict";var r=e("compare-cell"),i=e("cell-orientation");t.exports=function(e,t){return r(e,t)||i(e)-i(t)}},{"cell-orientation":47,"compare-cell":56}],58:[function(e,t,n){"use strict";var r=e("./lib/ch1d"),i=e("./lib/ch2d"),o=e("./lib/chnd");t.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[[0]];var n=e[0].length;return 0===n?[]:1===n?r(e):2===n?i(e):o(e,n)}},{"./lib/ch1d":59,"./lib/ch2d":60,"./lib/chnd":61}],59:[function(e,t,n){"use strict";t.exports=function(e){for(var t=0,n=0,r=1;r<e.length;++r)e[r][0]<e[t][0]&&(t=r),e[r][0]>e[n][0]&&(n=r);return t<n?[[t],[n]]:t>n?[[n],[t]]:[[t]]}},{}],60:[function(e,t,n){"use strict";t.exports=function(e){var t=r(e),n=t.length;if(n<=2)return[];for(var i=new Array(n),o=t[n-1],a=0;a<n;++a){var s=t[a];i[a]=[o,s],o=s}return i};var r=e("monotone-convex-hull-2d")},{"monotone-convex-hull-2d":246}],61:[function(e,t,n){"use strict";t.exports=function(e,t){try{return r(e,!0)}catch(a){var n=i(e);if(n.length<=t)return[];var o=function(e,t){for(var n=e.length,r=new Array(n),i=0;i<t.length;++i)r[i]=e[t[i]];var o=t.length;for(i=0;i<n;++i)t.indexOf(i)<0&&(r[o++]=e[i]);return r}(e,n);return function(e,t){for(var n=e.length,r=t.length,i=0;i<n;++i)for(var o=e[i],a=0;a<o.length;++a){var s=o[a];if(s<r)o[a]=t[s];else{s-=r;for(var l=0;l<r;++l)s>=t[l]&&(s+=1);o[a]=s}}return e}(r(o,!0),n)}};var r=e("incremental-convex-hull"),i=e("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,u=i*l,h=s*(3-2*i),d=s*a;if(e.length){o||(o=new Array(e.length));for(var f=e.length-1;f>=0;--f)o[f]=c*e[f]+u*t[f]+h*n[f]+d*r[f];return o}return c*e+u*t+h*n+d*r},t.exports.derivative=function(e,t,n,r,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){o||(o=new Array(e.length));for(var u=e.length-1;u>=0;--u)o[u]=a*e[u]+s*t[u]+l*n[u]+c*r[u];return o}return a*e+s*t+l*n[u]+c*r}},{}],63:[function(e,t,n){"use strict";var r=e("incremental-convex-hull"),i=e("uniq");function o(e,t){this.point=e,this.index=t}function a(e,t){for(var n=e.point,r=t.point,i=n.length,o=0;o<i;++o){var a=r[o]-n[o];if(a)return a}return 0}t.exports=function(e,t){var n=e.length;if(0===n)return[];var s=e[0].length;if(s<1)return[];if(1===s)return function(e,t,n){if(1===e)return n?[[-1,0]]:[];var r=t.map((function(e,t){return[e[0],t]}));r.sort((function(e,t){return e[0]-t[0]}));for(var i=new Array(e-1),o=1;o<e;++o){var a=r[o-1],s=r[o];i[o-1]=[a[1],s[1]]}return n&&i.push([-1,i[0][1]],[i[e-1][1],-1]),i}(n,e,t);for(var l=new Array(n),c=1,u=0;u<n;++u){for(var h=e[u],d=new Array(s+1),f=0,p=0;p<s;++p){var g=h[p];d[p]=g,f+=g*g}d[s]=f,l[u]=new o(d,u),c=Math.max(f,c)}i(l,a),n=l.length;var m=new Array(n+s+1),v=new Array(n+s+1),y=(s+1)*(s+1)*c,b=new Array(s+1);for(u=0;u<=s;++u)b[u]=0;for(b[s]=y,m[0]=b.slice(),v[0]=-1,u=0;u<=s;++u)(d=b.slice())[u]=1,m[u+1]=d,v[u+1]=-1;for(u=0;u<n;++u){var _=l[u];m[u+s+1]=_.point,v[u+s+1]=_.index}var x=r(m,!1);if(x=t?x.filter((function(e){for(var t=0,n=0;n<=s;++n){var r=v[e[n]];if(r<0&&++t>=2)return!1;e[n]=r}return!0})):x.filter((function(e){for(var t=0;t<=s;++t){var n=v[e[t]];if(n<0)return!1;e[t]=n}return!0})),1&s)for(u=0;u<x.length;++u)d=(_=x[u])[0],_[0]=_[1],_[1]=d;return x}},{"incremental-convex-hull":233,uniq:310}],64:[function(e,t,n){(function(e){(function(){var n=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);if(r[0]=1,n=!0,1072693248===i[1]){t.exports=function(e){return r[0]=e,[i[0],i[1]]},t.exports.pack=function(e,t){return i[0]=e,i[1]=t,r[0]},t.exports.lo=function(e){return r[0]=e,i[0]},t.exports.hi=function(e){return r[0]=e,i[1]}}else if(1072693248===i[0]){t.exports=function(e){return r[0]=e,[i[1],i[0]]},t.exports.pack=function(e,t){return i[1]=e,i[0]=t,r[0]},t.exports.lo=function(e){return r[0]=e,i[1]},t.exports.hi=function(e){return r[0]=e,i[0]}}else n=!1}if(!n){var o=new e(8);t.exports=function(e){return o.writeDoubleLE(e,0,!0),[o.readUInt32LE(0,!0),o.readUInt32LE(4,!0)]},t.exports.pack=function(e,t){return o.writeUInt32LE(e,0,!0),o.writeUInt32LE(t,4,!0),o.readDoubleLE(0,!0)},t.exports.lo=function(e){return o.writeDoubleLE(e,0,!0),o.readUInt32LE(0,!0)},t.exports.hi=function(e){return o.writeDoubleLE(e,0,!0),o.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var n=t.exports.lo(e),r=t.exports.hi(e),i=1048575&r;return 2146435072&r&&(i+=1<<20),[n,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:3}],65:[function(e,t,n){"use strict";function r(e,t,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o<i;++o)a[o]=t;else for(o=0;o<i;++o)a[o]=r(e,t,n+1);return a}t.exports=function(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var n,r;for(n=new Array(e),r=0;r<e;++r)n[r]=t;return n}(0|e,t);break;case"object":if("number"==typeof e.length)return r(e,t,0)}return[]}},{}],66:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.length;if("number"!=typeof t){t=0;for(var i=0;i<n;++i){var o=e[i];t=Math.max(t,o[0],o[1])}t=1+(0|t)}t|=0;var a=new Array(t);for(i=0;i<t;++i)a[i]=[];for(i=0;i<n;++i)a[(o=e[i])[0]].push(o[1]),a[o[1]].push(o[0]);for(var s=0;s<t;++s)r(a[s],(function(e,t){return e-t}));return a};var r=e("uniq")},{uniq:310}],67:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r=t||0,i=n||1;return[[e[12]+e[0],e[13]+e[1],e[14]+e[2],e[15]+e[3]],[e[12]-e[0],e[13]-e[1],e[14]-e[2],e[15]-e[3]],[e[12]+e[4],e[13]+e[5],e[14]+e[6],e[15]+e[7]],[e[12]-e[4],e[13]-e[5],e[14]-e[6],e[15]-e[7]],[r*e[12]+e[8],r*e[13]+e[9],r*e[14]+e[10],r*e[15]+e[11]],[i*e[12]-e[8],i*e[13]-e[9],i*e[14]-e[10],i*e[15]-e[11]]]}},{}],68:[function(e,t,n){"use strict";t.exports=function(e,t,n){switch(arguments.length){case 0:return new a([0],[0],0);case 1:return"number"==typeof e?new a(r=l(e),r,0):new a(e,l(e.length),0);case 2:var r;if("number"==typeof t)return new a(e,r=l(e.length),+t);n=0;case 3:if(e.length!==t.length)throw new Error("state and velocity lengths must match");return new a(e,t,n)}};var r=e("cubic-hermite"),i=e("binary-search-bounds");function o(e,t,n){return Math.min(t,Math.max(e,n))}function a(e,t,n){this.dimension=e.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var r=0;r<this.dimension;++r)this.bounds[0][r]=-1/0,this.bounds[1][r]=1/0;this._state=e.slice().reverse(),this._velocity=t.slice().reverse(),this._time=[n],this._scratch=[e.slice(),e.slice(),e.slice(),e.slice(),e.slice()]}var s=a.prototype;function l(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=0;return t}s.flush=function(e){var t=i.gt(this._time,e)-1;t<=0||(this._time.splice(0,t),this._state.splice(0,t*this.dimension),this._velocity.splice(0,t*this.dimension))},s.curve=function(e){var t=this._time,n=t.length,a=i.le(t,e),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,h=this.bounds;if(a<0)for(var d=u-1,f=0;f<u;++f,--d)s[f]=l[d];else if(a>=n-1){d=l.length-1;var p=e-t[n-1];for(f=0;f<u;++f,--d)s[f]=l[d]+p*c[d]}else{d=u*(a+1)-1;var g=t[a],m=t[a+1]-g||1,v=this._scratch[1],y=this._scratch[2],b=this._scratch[3],_=this._scratch[4],x=!0;for(f=0;f<u;++f,--d)v[f]=l[d],b[f]=c[d]*m,y[f]=l[d+u],_[f]=c[d+u]*m,x=x&&v[f]===y[f]&&b[f]===_[f]&&0===b[f];if(x)for(f=0;f<u;++f)s[f]=v[f];else r(v,b,y,_,(e-g)/m,s)}var w=h[0],A=h[1];for(f=0;f<u;++f)s[f]=o(w[f],A[f],s[f]);return s},s.dcurve=function(e){var t=this._time,n=t.length,o=i.le(t,e),a=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(o>=n-1)for(var u=s.length-1,h=(t[n-1],0);h<c;++h,--u)a[h]=l[u];else{u=c*(o+1)-1;var d=t[o],f=t[o+1]-d||1,p=this._scratch[1],g=this._scratch[2],m=this._scratch[3],v=this._scratch[4],y=!0;for(h=0;h<c;++h,--u)p[h]=s[u],m[h]=l[u]*f,g[h]=s[u+c],v[h]=l[u+c]*f,y=y&&p[h]===g[h]&&m[h]===v[h]&&0===m[h];if(y)for(h=0;h<c;++h)a[h]=0;else for(r.derivative(p,m,g,v,(e-d)/f,a),h=0;h<c;++h)a[h]/=f}return a},s.lastT=function(){var e=this._time;return e[e.length-1]},s.stable=function(){for(var e=this._velocity,t=e.length,n=this.dimension-1;n>=0;--n)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),n=this.dimension;if(!(e<t||arguments.length!==n+1)){var r=this._state,i=this._velocity,a=r.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(t,e);for(var u=0;u<2;++u)for(var h=0;h<n;++h)r.push(r[a++]),i.push(0);for(this._time.push(e),h=n;h>0;--h)r.push(o(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(e){var t=this.lastT(),n=this.dimension;if(!(e<t||arguments.length!==n+1)){var r=this._state,i=this._velocity,a=r.length-this.dimension,s=e-t,l=this.bounds,c=l[0],u=l[1],h=s>1e-6?1/s:0;this._time.push(e);for(var d=n;d>0;--d){var f=o(c[d-1],u[d-1],arguments[d]);r.push(f),i.push((f-r[a++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e<this.lastT()||arguments.length!==t+1)){var n=this._state,r=this._velocity,i=this.bounds,a=i[0],s=i[1];this._time.push(e);for(var l=t;l>0;--l)n.push(o(a[l-1],s[l-1],arguments[l])),r.push(0)}},s.move=function(e){var t=this.lastT(),n=this.dimension;if(!(e<=t||arguments.length!==n+1)){var r=this._state,i=this._velocity,a=r.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var d=n;d>0;--d){var f=arguments[d];r.push(o(l[d-1],c[d-1],r[a++]+f)),i.push(f*h)}}},s.idle=function(e){var t=this.lastT();if(!(e<t)){var n=this.dimension,r=this._state,i=this._velocity,a=r.length-n,s=this.bounds,l=s[0],c=s[1],u=e-t;this._time.push(e);for(var h=n-1;h>=0;--h)r.push(o(l[h],c[h],r[a]+u*i[a])),i.push(0),a+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(e,t,n){"use strict";t.exports=function(e){return new s(e||g,null)};function r(e,t,n,r,i,o){this._color=e,this.key=t,this.value=n,this.left=r,this.right=i,this._count=o}function i(e){return new r(e._color,e.key,e.value,e.left,e.right,e._count)}function o(e,t){return new r(e,t.key,t.value,t.left,t.right,t._count)}function a(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function s(e,t){this._compare=e,this.root=t}var l=s.prototype;function c(e,t){var n;return t.left&&(n=c(e,t.left))?n:(n=e(t.key,t.value))||(t.right?c(e,t.right):void 0)}function u(e,t,n,r){if(t(e,r.key)<=0){var i;if(r.left&&(i=u(e,t,n,r.left)))return i;if(i=n(r.key,r.value))return i}if(r.right)return u(e,t,n,r.right)}function h(e,t,n,r,i){var o,a=n(e,i.key),s=n(t,i.key);if(a<=0){if(i.left&&(o=h(e,t,n,r,i.left)))return o;if(s>0&&(o=r(i.key,i.value)))return o}if(s>0&&i.right)return h(e,t,n,r,i.right)}function d(e,t){this.tree=e,this._stack=t}Object.defineProperty(l,"keys",{get:function(){var e=[];return this.forEach((function(t,n){e.push(t)})),e}}),Object.defineProperty(l,"values",{get:function(){var e=[];return this.forEach((function(t,n){e.push(n)})),e}}),Object.defineProperty(l,"length",{get:function(){return this.root?this.root._count:0}}),l.insert=function(e,t){for(var n=this._compare,i=this.root,l=[],c=[];i;){var u=n(e,i.key);l.push(i),c.push(u),i=u<=0?i.left:i.right}l.push(new r(0,e,t,null,null,1));for(var h=l.length-2;h>=0;--h)i=l[h],c[h]<=0?l[h]=new r(i._color,i.key,i.value,l[h+1],i.right,i._count+1):l[h]=new r(i._color,i.key,i.value,i.left,l[h+1],i._count+1);for(h=l.length-1;h>1;--h){var d=l[h-1];if(i=l[h],1===d._color||1===i._color)break;var f=l[h-2];if(f.left===d)if(d.left===i){if(!(p=f.right)||0!==p._color){f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=i,a(f),a(d),h>=3&&((g=l[h-3]).left===f?g.left=d:g.right=d);break}d._color=1,f.right=o(1,p),f._color=0,h-=1}else{if(!(p=f.right)||0!==p._color){d.right=i.left,f._color=0,f.left=i.right,i._color=1,i.left=d,i.right=f,l[h-2]=i,l[h-1]=d,a(f),a(d),a(i),h>=3&&((g=l[h-3]).left===f?g.left=i:g.right=i);break}d._color=1,f.right=o(1,p),f._color=0,h-=1}else if(d.right===i){if(!(p=f.left)||0!==p._color){f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=i,a(f),a(d),h>=3&&((g=l[h-3]).right===f?g.right=d:g.left=d);break}d._color=1,f.left=o(1,p),f._color=0,h-=1}else{var p;if(!(p=f.left)||0!==p._color){var g;d.left=i.right,f._color=0,f.right=i.left,i._color=1,i.right=d,i.left=f,l[h-2]=i,l[h-1]=d,a(f),a(d),a(i),h>=3&&((g=l[h-3]).right===f?g.right=i:g.left=i);break}d._color=1,f.left=o(1,p),f._color=0,h-=1}}return l[0]._color=1,new s(n,l[0])},l.forEach=function(e,t,n){if(this.root)switch(arguments.length){case 1:return c(e,this.root);case 2:return u(t,this._compare,e,this.root);case 3:if(this._compare(t,n)>=0)return;return h(t,n,this._compare,e,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new d(this,e)}}),Object.defineProperty(l,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new d(this,e)}}),l.at=function(e){if(e<0)return new d(this,[]);for(var t=this.root,n=[];;){if(n.push(t),t.left){if(e<t.left._count){t=t.left;continue}e-=t.left._count}if(!e)return new d(this,n);if(e-=1,!t.right)break;if(e>=t.right._count)break;t=t.right}return new d(this,[])},l.ge=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o<=0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new d(this,r)},l.gt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o<0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new d(this,r)},l.lt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o>0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new d(this,r)},l.le=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o>=0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new d(this,r)},l.find=function(e){for(var t=this._compare,n=this.root,r=[];n;){var i=t(e,n.key);if(r.push(n),0===i)return new d(this,r);n=i<=0?n.left:n.right}return new d(this,[])},l.remove=function(e){var t=this.find(e);return t?t.remove():this},l.get=function(e){for(var t=this._compare,n=this.root;n;){var r=t(e,n.key);if(0===r)return n.value;n=r<=0?n.left:n.right}};var f=d.prototype;function p(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function g(e,t){return e<t?-1:e>t?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new d(this.tree,this._stack.slice())},f.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var t=new Array(e.length),n=e[e.length-1];t[t.length-1]=new r(n._color,n.key,n.value,n.left,n.right,n._count);for(var l=e.length-2;l>=0;--l)(n=e[l]).left===e[l+1]?t[l]=new r(n._color,n.key,n.value,t[l+1],n.right,n._count):t[l]=new r(n._color,n.key,n.value,n.left,t[l+1],n._count);if((n=t[t.length-1]).left&&n.right){var c=t.length;for(n=n.left;n.right;)t.push(n),n=n.right;var u=t[c-1];for(t.push(new r(n._color,u.key,u.value,n.left,n.right,n._count)),t[c-1].key=n.key,t[c-1].value=n.value,l=t.length-2;l>=c;--l)n=t[l],t[l]=new r(n._color,n.key,n.value,n.left,t[l+1],n._count);t[c-1].left=t[c]}if(0===(n=t[t.length-1])._color){var h=t[t.length-2];for(h.left===n?h.left=null:h.right===n&&(h.right=null),t.pop(),l=0;l<t.length;++l)t[l]._count--;return new s(this.tree._compare,t[0])}if(n.left||n.right){for(n.left?p(n,n.left):n.right&&p(n,n.right),n._color=1,l=0;l<t.length-1;++l)t[l]._count--;return new s(this.tree._compare,t[0])}if(1===t.length)return new s(this.tree._compare,null);for(l=0;l<t.length;++l)t[l]._count--;var d=t[t.length-2];return function(e){for(var t,n,r,s,l=e.length-1;l>=0;--l){if(t=e[l],0===l)return void(t._color=1);if((n=e[l-1]).left===t){if((r=n.right).right&&0===r.right._color)return s=(r=n.right=i(r)).right=i(r.right),n.right=r.left,r.left=n,r.right=s,r._color=n._color,t._color=1,n._color=1,s._color=1,a(n),a(r),l>1&&((c=e[l-2]).left===n?c.left=r:c.right=r),void(e[l-1]=r);if(r.left&&0===r.left._color)return s=(r=n.right=i(r)).left=i(r.left),n.right=s.left,r.left=s.right,s.left=n,s.right=r,s._color=n._color,n._color=1,r._color=1,t._color=1,a(n),a(r),a(s),l>1&&((c=e[l-2]).left===n?c.left=s:c.right=s),void(e[l-1]=s);if(1===r._color){if(0===n._color)return n._color=1,void(n.right=o(0,r));n.right=o(0,r);continue}r=i(r),n.right=r.left,r.left=n,r._color=n._color,n._color=0,a(n),a(r),l>1&&((c=e[l-2]).left===n?c.left=r:c.right=r),e[l-1]=r,e[l]=n,l+1<e.length?e[l+1]=t:e.push(t),l+=2}else{if((r=n.left).left&&0===r.left._color)return s=(r=n.left=i(r)).left=i(r.left),n.left=r.right,r.right=n,r.left=s,r._color=n._color,t._color=1,n._color=1,s._color=1,a(n),a(r),l>1&&((c=e[l-2]).right===n?c.right=r:c.left=r),void(e[l-1]=r);if(r.right&&0===r.right._color)return s=(r=n.left=i(r)).right=i(r.right),n.left=s.right,r.right=s.left,s.right=n,s.left=r,s._color=n._color,n._color=1,r._color=1,t._color=1,a(n),a(r),a(s),l>1&&((c=e[l-2]).right===n?c.right=s:c.left=s),void(e[l-1]=s);if(1===r._color){if(0===n._color)return n._color=1,void(n.left=o(0,r));n.left=o(0,r);continue}var c;r=i(r),n.left=r.right,r.right=n,r._color=n._color,n._color=0,a(n),a(r),l>1&&((c=e[l-2]).right===n?c.right=r:c.left=r),e[l-1]=r,e[l]=n,l+1<e.length?e[l+1]=t:e.push(t),l+=2}}}(t),d.left===n?d.left=null:d.right=null,new s(this.tree._compare,t[0])},Object.defineProperty(f,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var n=this.tree.root;return n?n._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var r=t.length-2;r>=0;--r)t[r+1]===t[r].right&&(++e,t[r].left&&(e+=t[r].left._count));return e},enumerable:!0}),f.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),f.update=function(e){var t=this._stack;if(0===t.length)throw new Error("Can't update empty node!");var n=new Array(t.length),i=t[t.length-1];n[n.length-1]=new r(i._color,i.key,e,i.left,i.right,i._count);for(var o=t.length-2;o>=0;--o)(i=t[o]).left===t[o+1]?n[o]=new r(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new r(i._color,i.key,i.value,i.left,n[o+1],i._count);return new s(this.tree._compare,n[0])},f.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},{}],70:[function(e,t,n){"use strict";t.exports=function(e,t){var n=new u(e);return n.update(t),n};var r=e("./lib/text.js"),i=e("./lib/lines.js"),o=e("./lib/background.js"),a=e("./lib/cube.js"),s=e("./lib/ticks.js"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function u(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(e)}var h=u.prototype;function d(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}h.update=function(e){function t(t,n,r){if(r in e){var i,o=e[r],a=this[r];(t?Array.isArray(o)&&Array.isArray(o[0]):Array.isArray(o))?this[r]=i=[n(o[0]),n(o[1]),n(o[2])]:this[r]=i=[n(o),n(o),n(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}e=e||{};var n,o=t.bind(this,!1,Number),a=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(Array.isArray(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,h=!1;if("bounds"in e)for(var d=e.bounds,f=0;f<2;++f)for(var p=0;p<3;++p)d[f][p]!==this.bounds[f][p]&&(h=!0),this.bounds[f][p]=d[f][p];if("ticks"in e)for(n=e.ticks,u=!0,this.autoTicks=!1,f=0;f<3;++f)this.tickSpacing[f]=0;else o("tickSpacing")&&(this.autoTicks=!0,h=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),h=!0,u=!0,this._firstInit=!1),h&&this.autoTicks&&(n=s.create(this.bounds,this.tickSpacing),u=!0),u){for(f=0;f<3;++f)n[f].sort((function(e,t){return e.x-t.x}));s.equal(n,this.ticks)?u=!1:this.ticks=n}a("tickEnable"),l("tickFont")&&(u=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=r(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var f=[new d,new d,new d];function p(e,t,n,r,i){for(var o=e.primalOffset,a=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=r[t],u=0;u<3;++u)if(t!==u){var h=o,d=s,f=a,p=l;c&1<<u&&(h=s,d=o,f=l,p=a),h[u]=n[0][u],d[u]=n[1][u],i[u]>0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}var g=[0,0,0],m={model:l,view:l,projection:l,_ortho:!1};h.isOpaque=function(){return!0},h.isTransparent=function(){return!1},h.drawTransparent=function(e){};var v=[0,0,0],y=[0,0,0],b=[0,0,0];h.draw=function(e){e=e||m;for(var t=this.gl,n=e.model||l,r=e.view||l,i=e.projection||l,o=this.bounds,s=e._ortho||!1,u=a(n,r,i,o,s),h=u.cubeEdges,d=u.axis,_=r[12],x=r[13],w=r[14],A=r[15],k=(s?2:1)*this.pixelRatio*(i[3]*_+i[7]*x+i[11]*w+i[15]*A)/t.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=h[T],this.lastCubeProps.axis[T]=d[T];var S=f;for(T=0;T<3;++T)p(f[T],T,this.bounds,h,d);t=this.gl;var E,C=g;for(T=0;T<3;++T)this.backgroundEnable[T]?C[T]=d[T]:C[T]=0;for(this._background.draw(n,r,i,o,C,this.backgroundColor),this._lines.bind(n,r,i,this),T=0;T<3;++T){var M=[0,0,0];d[T]>0?M[T]=o[1][T]:M[T]=o[0][T];for(var O=0;O<2;++O){var L=(T+1+O)%3,D=(T+1+(1^O))%3;this.gridEnable[L]&&this._lines.drawGrid(L,D,this.bounds,M,this.gridColor[L],this.gridWidth[L]*this.pixelRatio)}for(O=0;O<2;++O)L=(T+1+O)%3,D=(T+1+(1^O))%3,this.zeroEnable[D]&&Math.min(o[0][D],o[1][D])<=0&&Math.max(o[0][D],o[1][D])>=0&&this._lines.drawZero(L,D,this.bounds,M,this.zeroLineColor[D],this.zeroLineWidth[D]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,S[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,S[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var I=c(v,S[T].primalMinor),R=c(y,S[T].mirrorMinor),P=this.lineTickLength;for(O=0;O<3;++O){var N=k/n[5*O];I[O]*=P[O]*N,R[O]*=P[O]*N}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,S[T].primalOffset,I,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,S[T].mirrorOffset,R,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}this._lines.unbind(),this._text.bind(n,r,i,this.pixelRatio);var z,F;function B(e){(F=[0,0,0])[e]=1}function j(e,t,n){var r=(e+1)%3,i=(e+2)%3,o=t[r],a=t[i],s=n[r],l=n[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?B(r):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&B(i)}for(T=0;T<3;++T){var U=S[T].primalMinor,V=S[T].mirrorMinor,q=c(b,S[T].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[T]&&(q[O]+=k*U[O]*Math.max(this.lineTickLength[O],0)/n[5*O]);var H=[0,0,0];if(H[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,z=1,"auto"===(E=[this.tickAlign[T],.5,z])[0]?E[0]=0:E[0]=parseInt(""+E[0]),F=[0,0,0],j(T,U,V),O=0;O<3;++O)q[O]+=k*U[O]*this.tickPad[O]/n[5*O];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],q,this.tickColor[T],H,F,E)}if(this.labelEnable[T]){for(z=0,F=[0,0,0],this.labels[T].length>4&&(B(T),z=1),"auto"===(E=[this.labelAlign[T],.5,z])[0]?E[0]=0:E[0]=parseInt(""+E[0]),O=0;O<3;++O)q[O]+=k*U[O]*this.labelPad[O]/n[5*O];q[T]+=.5*(o[0][T]+o[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],q,this.labelColor[T],[0,0,0],F,E)}}this._text.unbind()},h.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":71,"./lib/cube.js":72,"./lib/lines.js":73,"./lib/text.js":75,"./lib/ticks.js":76}],71:[function(e,t,n){"use strict";t.exports=function(e){for(var t=[],n=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){n.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var g=-1;g<=1;g+=2)h[u]=g,t.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var m=c;c=u,u=m}var v=r(e,new Float32Array(t)),y=r(e,new Uint16Array(n),e.ELEMENT_ARRAY_BUFFER),b=i(e,[{buffer:v,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:e.FLOAT,size:3,offset:12,stride:24}],y),_=o(e);return _.attributes.position.location=0,_.attributes.normal.location=1,new a(e,v,b,_)};var r=e("gl-buffer"),i=e("gl-vao"),o=e("./shaders").bg;function a(e,t,n,r){this.gl=e,this.buffer=t,this.vao=n,this.shader=r}var s=a.prototype;s.draw=function(e,t,n,r,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:n,bounds:r,enable:i,colors:o},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],72:[function(e,t,n){"use strict";t.exports=function(e,t,n,o,f){i(s,t,e),i(s,n,s);for(var y=0,b=0;b<2;++b){u[2]=o[b][2];for(var _=0;_<2;++_){u[1]=o[_][1];for(var x=0;x<2;++x)u[0]=o[x][0],d(l[y],u,s),y+=1}}var w=-1;for(b=0;b<8;++b){for(var A=l[b][3],k=0;k<3;++k)c[b][k]=l[b][k]/A;f&&(c[b][2]*=-1),A<0&&(w<0||c[b][2]<c[w][2])&&(w=b)}if(w<0){w=0;for(var T=0;T<3;++T){for(var S=(T+2)%3,E=(T+1)%3,C=-1,M=-1,O=0;O<2;++O){var L=(I=O<<T)+(O<<S)+(1-O<<E),D=I+(1-O<<S)+(O<<E);a(c[I],c[L],c[D],h)<0||(O?C=1:M=1)}if(C<0||M<0)M>C&&(w|=1<<T);else{for(O=0;O<2;++O){L=(I=O<<T)+(O<<S)+(1-O<<E),D=I+(1-O<<S)+(O<<E);var I,R=p([l[I],l[L],l[D],l[I+(1<<S)+(1<<E)]]);O?C=R:M=R}M>C&&(w|=1<<T)}}}var P=7^w,N=-1;for(b=0;b<8;++b)b!==w&&b!==P&&(N<0||c[N][1]>c[b][1])&&(N=b);var z=-1;for(b=0;b<3;++b)(B=N^1<<b)!==w&&B!==P&&(z<0&&(z=B),(E=c[B])[0]<c[z][0]&&(z=B));var F=-1;for(b=0;b<3;++b){var B;(B=N^1<<b)!==w&&B!==P&&B!==z&&(F<0&&(F=B),(E=c[B])[0]>c[F][0]&&(F=B))}var j=g;j[0]=j[1]=j[2]=0,j[r.log2(z^N)]=N&z,j[r.log2(N^F)]=N&F;var U=7^F;U===w||U===P?(U=7^z,j[r.log2(F^U)]=U&F):j[r.log2(z^U)]=U&z;var V=m,q=w;for(T=0;T<3;++T)V[T]=q&1<<T?-1:1;return v};var r=e("bit-twiddle"),i=e("gl-mat4/multiply"),o=e("split-polygon"),a=e("robust-orientation"),s=new Array(16),l=new Array(8),c=new Array(8),u=new Array(3),h=[0,0,0];function d(e,t,n){for(var r=0;r<4;++r){e[r]=n[12+r];for(var i=0;i<3;++i)e[r]+=t[i]*n[4*i+r]}}!function(){for(var e=0;e<8;++e)l[e]=[1,1,1,1],c[e]=[1,1,1]}();var f=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function p(e){for(var t=0;t<f.length;++t)if((e=o.positive(e,f[t])).length<3)return 0;var n=e[0],r=n[0]/n[3],i=n[1]/n[3],a=0;for(t=1;t+1<e.length;++t){var s=e[t],l=e[t+1],c=s[0]/s[3]-r,u=s[1]/s[3]-i,h=l[0]/l[3]-r,d=l[1]/l[3]-i;a+=Math.abs(c*d-u*h)}return a}var g=[1,1,1],m=[0,0,0],v={cubeEdges:g,axis:m}},{"bit-twiddle":32,"gl-mat4/multiply":100,"robust-orientation":284,"split-polygon":300}],73:[function(e,t,n){"use strict";t.exports=function(e,t,n){var a=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];a.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var h=0;h<3;++h){for(var d=a.length/3|0,p=0;p<n[h].length;++p){var g=+n[h][p].x;a.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1)}var m=a.length/3|0;s[h]=d,l[h]=m-d,d=a.length/3|0;for(var v=0;v<n[h].length;++v)g=+n[h][v].x,a.push(g,0,1,g,1,1,g,0,-1,g,0,-1,g,1,1,g,1,-1);m=a.length/3|0,c[h]=d,u[h]=m-d}var y=r(e,new Float32Array(a)),b=i(e,[{buffer:y,type:e.FLOAT,size:3,stride:0,offset:0}]),_=o(e);return _.attributes.position.location=0,new f(e,y,b,_,l,s,u,c)};var r=e("gl-buffer"),i=e("gl-vao"),o=e("./shaders").line,a=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function h(e){return e[0]=e[1]=e[2]=0,e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function f(e,t,n,r,i,o,a,s){this.gl=e,this.vertBuffer=t,this.vao=n,this.shader=r,this.tickCount=i,this.tickOffset=o,this.gridCount=a,this.gridOffset=s}var p=f.prototype;p.bind=function(e,t,n){this.shader.bind(),this.shader.uniforms.model=e,this.shader.uniforms.view=t,this.shader.uniforms.projection=n,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},p.unbind=function(){this.vao.unbind()},p.drawAxisLine=function(e,t,n,r,i){var o=h(s);this.shader.uniforms.majorAxis=s,o[e]=t[1][e]-t[0][e],this.shader.uniforms.minorAxis=o;var a,u=d(c,n);u[e]+=t[0][e],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=r,(a=h(l))[(e+2)%3]=1,this.shader.uniforms.screenAxis=a,this.vao.draw(this.gl.TRIANGLES,6),(a=h(l))[(e+1)%3]=1,this.shader.uniforms.screenAxis=a,this.vao.draw(this.gl.TRIANGLES,6)},p.drawAxisTicks=function(e,t,n,r,i){if(this.tickCount[e]){var o=h(a);o[e]=1,this.shader.uniforms.majorAxis=o,this.shader.uniforms.offset=t,this.shader.uniforms.minorAxis=n,this.shader.uniforms.color=r,this.shader.uniforms.lineWidth=i;var s=h(l);s[e]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[e],this.tickOffset[e])}},p.drawGrid=function(e,t,n,r,i,o){if(this.gridCount[e]){var u=h(s);u[t]=n[1][t]-n[0][t],this.shader.uniforms.minorAxis=u;var f=d(c,r);f[t]+=n[0][t],this.shader.uniforms.offset=f;var p=h(a);p[e]=1,this.shader.uniforms.majorAxis=p;var g=h(l);g[e]=1,this.shader.uniforms.screenAxis=g,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[e],this.gridOffset[e])}},p.drawZero=function(e,t,n,r,i,o){var a=h(s);this.shader.uniforms.majorAxis=a,a[e]=n[1][e]-n[0][e],this.shader.uniforms.minorAxis=a;var u=d(c,r);u[e]+=n[0][e],this.shader.uniforms.offset=u;var f=h(l);f[t]=1,this.shader.uniforms.screenAxis=f,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},p.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],74:[function(e,t,n){"use strict";var r=e("glslify"),i=e("gl-shader"),o=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\nuniform float lineWidth;\nuniform vec2 screenShape;\n\nvec3 project(vec3 p) {\n vec4 pp = projection * view * model * vec4(p, 1.0);\n return pp.xyz / max(pp.w, 0.0001);\n}\n\nvoid main() {\n vec3 major = position.x * majorAxis;\n vec3 minor = position.y * minorAxis;\n\n vec3 vPosition = major + minor + offset;\n vec3 pPosition = project(vPosition);\n vec3 offset = project(vPosition + screenAxis * position.z);\n\n vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n\n gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n}\n"]),a=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);n.line=function(e){return i(e,o,a,null,[{name:"position",type:"vec3"}])};var s=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, axis, alignDir, alignOpt;\nuniform float scale, angle, pixelScale;\nuniform vec2 resolution;\n\nvec3 project(vec3 p) {\n vec4 pp = projection * view * model * vec4(p, 1.0);\n return pp.xyz / max(pp.w, 0.0001);\n}\n\nfloat computeViewAngle(vec3 a, vec3 b) {\n vec3 A = project(a);\n vec3 B = project(b);\n\n return atan(\n (B.y - A.y) * resolution.y,\n (B.x - A.x) * resolution.x\n );\n}\n\nconst float PI = 3.141592;\nconst float TWO_PI = 2.0 * PI;\nconst float HALF_PI = 0.5 * PI;\nconst float ONE_AND_HALF_PI = 1.5 * PI;\n\nint option = int(floor(alignOpt.x + 0.001));\nfloat hv_ratio = alignOpt.y;\nbool enableAlign = (alignOpt.z != 0.0);\n\nfloat mod_angle(float a) {\n return mod(a, PI);\n}\n\nfloat positive_angle(float a) {\n return mod_angle((a < 0.0) ?\n a + TWO_PI :\n a\n );\n}\n\nfloat look_upwards(float a) {\n float b = positive_angle(a);\n return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);n.text=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);n.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(e,t,n){(function(n){(function(){"use strict";t.exports=function(e,t,n,o,s,l){var u=r(e),h=i(e,[{buffer:u,size:3}]),d=a(e);d.attributes.position.location=0;var f=new c(e,d,u,h);return f.update(t,n,o,s,l),f};var r=e("gl-buffer"),i=e("gl-vao"),o=e("vectorize-text"),a=e("./shaders").text,s=window||n.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(e,t,n,r){this.gl=e,this.shader=t,this.buffer=n,this.vao=r,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,h=[0,0];u.bind=function(e,t,n,r){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=n,i.pixelScale=r,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,n,r,i){var a=[];function s(e,t,n,r,i,s){var c=l[n];c||(c=l[n]={});var u=c[t];u||(u=c[t]=function(e,t){try{return o(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:n,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(r||12)/12,d=u.positions,f=u.cells,p=0,g=f.length;p<g;++p)for(var m=f[p],v=2;v>=0;--v){var y=d[m[v]];a.push(h*y[0],-h*y[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=a.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],n[p],12,1.25,f),d[p]=(a.length/3|0)-h[p],c[p]=a.length/3|0;for(var g=0;g<r[p].length;++g)r[p][g].text&&s(r[p][g].x,r[p][g].text,r[p][g].font||i,r[p][g].fontSize||12,1.25,f);u[p]=(a.length/3|0)-c[p]}this.buffer.update(a),this.tickOffset=c,this.tickCount=u,this.labelOffset=h,this.labelCount=d},u.drawTicks=function(e,t,n,r,i,o,a,s){this.tickCount[e]&&(this.shader.uniforms.axis=o,this.shader.uniforms.color=i,this.shader.uniforms.angle=n,this.shader.uniforms.scale=t,this.shader.uniforms.offset=r,this.shader.uniforms.alignDir=a,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[e],this.tickOffset[e]))},u.drawLabel=function(e,t,n,r,i,o,a,s){this.labelCount[e]&&(this.shader.uniforms.axis=o,this.shader.uniforms.color=i,this.shader.uniforms.angle=n,this.shader.uniforms.scale=t,this.shader.uniforms.offset=r,this.shader.uniforms.alignDir=a,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[e],this.labelOffset[e]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this)}).call(this,e("_process"))},{"./shaders":74,_process:5,"gl-buffer":78,"gl-vao":150,"vectorize-text":311}],76:[function(e,t,n){"use strict";function r(e,t){var n=e+"",r=n.indexOf("."),i=0;r>=0&&(i=n.length-r-1);var o=Math.pow(10,i),a=Math.round(e*t*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(a<0&&(u="-"+u),i){for(var h=""+c;h.length<i;)h="0"+h;return u+"."+h}return u}n.create=function(e,t){for(var n=[],i=0;i<3;++i){for(var o=[],a=(e[0][i],e[1][i],0);a*t[i]<=e[1][i];++a)o.push({x:a*t[i],text:r(t[i],a)});for(a=-1;a*t[i]>=e[0][i];--a)o.push({x:a*t[i],text:r(t[i],a)});n.push(o)}return n},n.equal=function(e,t){for(var n=0;n<3;++n){if(e[n].length!==t[n].length)return!1;for(var r=0;r<e[n].length;++r){var i=e[n][r],o=t[n][r];if(i.x!==o.x||i.text!==o.text||i.font!==o.font||i.fontColor!==o.fontColor||i.fontSize!==o.fontSize||i.dx!==o.dx||i.dy!==o.dy)return!1}}return!0}},{}],77:[function(e,t,n){"use strict";t.exports=function(e,t,n,l,h){var d=t.model||c,f=t.view||c,v=t.projection||c,y=t._ortho||!1,b=e.bounds,_=(h=h||o(d,f,v,b,y)).axis;a(u,f,d),a(u,v,u);for(var x=g,w=0;w<3;++w)x[w].lo=1/0,x[w].hi=-1/0,x[w].pixelsPerDataUnit=1/0;var A=r(s(u,u));s(u,u);for(var k=0;k<3;++k){var T=(k+1)%3,S=(k+2)%3,E=m;e:for(w=0;w<2;++w){var C=[];if(_[k]<0!=!!w){E[k]=b[w][k];for(var M=0;M<2;++M){E[T]=b[M^w][T];for(var O=0;O<2;++O)E[S]=b[O^M^w][S],C.push(E.slice())}var L=y?5:4;for(M=L;M===L;++M){if(0===C.length)continue e;C=i.positive(C,A[M])}for(M=0;M<C.length;++M){S=C[M];var D=p(m,u,S,n,l);for(O=0;O<3;++O)x[O].lo=Math.min(x[O].lo,S[O]),x[O].hi=Math.max(x[O].hi,S[O]),O!==k&&(x[O].pixelsPerDataUnit=Math.min(x[O].pixelsPerDataUnit,Math.abs(D[O])))}}}}return x};var r=e("extract-frustum-planes"),i=e("split-polygon"),o=e("./lib/cube.js"),a=e("gl-mat4/multiply"),s=e("gl-mat4/transpose"),l=e("gl-vec4/transformMat4"),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function h(e,t,n){this.lo=e,this.hi=t,this.pixelsPerDataUnit=n}var d=[0,0,0,1],f=[0,0,0,1];function p(e,t,n,r,i){for(var o=0;o<3;++o){for(var a=d,s=f,c=0;c<3;++c)s[c]=a[c]=n[c];s[3]=a[3]=1,s[o]+=1,l(s,s,t),s[3]<0&&(e[o]=1/0),a[o]-=1,l(a,a,t),a[3]<0&&(e[o]=1/0);var u=(a[0]/a[3]-s[0]/s[3])*r,h=(a[1]/a[3]-s[1]/s[3])*i;e[o]=.25*Math.sqrt(u*u+h*h)}return e}var g=[new h(1/0,-1/0,1/0),new h(1/0,-1/0,1/0),new h(1/0,-1/0,1/0)],m=[0,0,0]},{"./lib/cube.js":72,"extract-frustum-planes":67,"gl-mat4/multiply":100,"gl-mat4/transpose":109,"gl-vec4/transformMat4":221,"split-polygon":300}],78:[function(e,t,n){"use strict";var r=e("typedarray-pool"),i=e("ndarray-ops"),o=e("ndarray"),a=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(e,t,n,r,i){this.gl=e,this.type=t,this.handle=n,this.length=r,this.usage=i}var l=s.prototype;function c(e,t,n,r,i,o){var a=i.length*i.BYTES_PER_ELEMENT;if(o<0)return e.bufferData(t,i,r),a;if(a+o>n)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,o,i),n}function u(e,t){for(var n=r.malloc(e.length,t),i=e.length,o=0;o<i;++o)n[o]=e[o];return n}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(e,t){if("number"!=typeof t&&(t=-1),this.bind(),"object"==typeof e&&void 0!==e.shape){var n=e.dtype;if(a.indexOf(n)<0&&(n="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(n=gl.getExtension("OES_element_index_uint")&&"uint16"!==n?"uint32":"uint16"),n===e.dtype&&function(e,t){for(var n=1,r=t.length-1;r>=0;--r){if(t[r]!==n)return!1;n*=e[r]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=r.malloc(e.size,n),l=o(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),r.free(s)}}else if(Array.isArray(e)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?h:h.subarray(0,e.length),t),r.free(h)}else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!=typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},t.exports=function(e,t,n,r){if(n=n||e.ARRAY_BUFFER,r=r||e.DYNAMIC_DRAW,n!==e.ARRAY_BUFFER&&n!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(r!==e.DYNAMIC_DRAW&&r!==e.STATIC_DRAW&&r!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),o=new s(e,n,i,0,r);return o.update(t),o}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(e,t,n){"use strict";var r=e("gl-vec3");t.exports=function(e,t){var n=e.positions,i=e.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,g=[],m=1/0,v=!1,y=0;y<n.length;y++){var b=n[y];s=Math.min(b[0],s),l=Math.max(b[0],l),c=Math.min(b[1],c),u=Math.max(b[1],u),h=Math.min(b[2],h),d=Math.max(b[2],d);var _=i[y];if(r.length(_)>a&&(a=r.length(_)),y){var x=2*r.distance(f,b)/(r.length(p)+r.length(_));x?(m=Math.min(m,x),v=!1):v=!0}v||(f=b,p=_),g.push(_)}var w=[s,c,h],A=[l,u,d];t&&(t[0]=w,t[1]=A),0===a&&(a=1);var k=1/a;isFinite(m)||(m=1),o.vectorScale=m;var T=e.coneSize||.5;e.absoluteConeSize&&(T=e.absoluteConeSize*k),o.coneScale=T,y=0;for(var S=0;y<n.length;y++)for(var E=(b=n[y])[0],C=b[1],M=b[2],O=g[y],L=r.length(O)*k,D=0;D<8;D++){o.positions.push([E,C,M,S++]),o.positions.push([E,C,M,S++]),o.positions.push([E,C,M,S++]),o.positions.push([E,C,M,S++]),o.positions.push([E,C,M,S++]),o.positions.push([E,C,M,S++]),o.vectors.push(O),o.vectors.push(O),o.vectors.push(O),o.vectors.push(O),o.vectors.push(O),o.vectors.push(O),o.vertexIntensity.push(L,L,L),o.vertexIntensity.push(L,L,L);var I=o.positions.length;o.cells.push([I-6,I-5,I-4],[I-3,I-2,I-1])}return o};var i=e("./lib/shaders");t.exports.createMesh=e("./create_mesh"),t.exports.createConeMesh=function(e,n){return t.exports.createMesh(e,n,{shaders:i,traceType:"cone"})}},{"./create_mesh":80,"./lib/shaders":81,"gl-vec3":169}],80:[function(e,t,n){"use strict";var r=e("gl-shader"),i=e("gl-buffer"),o=e("gl-vao"),a=e("gl-texture2d"),s=e("gl-mat4/multiply"),l=e("gl-mat4/invert"),c=e("ndarray"),u=e("colormap"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(e,t,n,r,i,o,a,s,l,c,u){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=n,this.pickShader=r,this.trianglePositions=i,this.triangleVectors=o,this.triangleColors=s,this.triangleUVs=l,this.triangleIds=a,this.triangleVAO=c,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=u,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=h,this._view=h,this._projection=h,this._resolution=[1,1]}var f=d.prototype;function p(e,t){var n=r(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return n.attributes.position.location=0,n.attributes.color.location=2,n.attributes.uv.location=3,n.attributes.vector.location=4,n}function g(e,t){var n=r(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return n.attributes.position.location=0,n.attributes.id.location=1,n.attributes.vector.location=4,n}f.isOpaque=function(){return this.opacity>=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(e){this.pickId=e},f.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),n=new Uint8Array(1024),r=0;r<256;++r){for(var i=t[r],o=0;o<3;++o)n[4*r+o]=i[o];n[4*r+3]=255*i[3]}return c(n,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var n=e.cells,r=e.positions,i=e.vectors;if(r&&n&&i){var o=[],a=[],s=[],l=[],h=[];this.cells=n,this.positions=r,this.vectors=i;var d=e.meshColor||[1,1,1,1],f=e.vertexIntensity,p=1/0,g=-1/0;if(f)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],g=+e.vertexIntensityBounds[1];else for(var m=0;m<f.length;++m){var v=f[m];p=Math.min(p,v),g=Math.max(g,v)}else for(m=0;m<r.length;++m)v=r[m][2],p=Math.min(p,v),g=Math.max(g,v);for(this.intensity=f||function(e){for(var t=e.length,n=new Array(t),r=0;r<t;++r)n[r]=e[r][2];return n}(r),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],m=0;m<r.length;++m)for(var y=r[m],b=0;b<3;++b)!isNaN(y[b])&&isFinite(y[b])&&(this.bounds[0][b]=Math.min(this.bounds[0][b],y[b]),this.bounds[1][b]=Math.max(this.bounds[1][b],y[b]));var _=0;e:for(m=0;m<n.length;++m){var x=n[m];if(3===x.length){for(b=0;b<3;++b){y=r[A=x[b]];for(var w=0;w<3;++w)if(isNaN(y[w])||!isFinite(y[w]))continue e}for(b=0;b<3;++b){var A;y=r[A=x[2-b]],o.push(y[0],y[1],y[2],y[3]);var k=i[A];a.push(k[0],k[1],k[2],k[3]||0);var T,S=d;3===S.length?s.push(S[0],S[1],S[2],1):s.push(S[0],S[1],S[2],S[3]),T=f?[(f[A]-p)/(g-p),0]:[(y[2]-p)/(g-p),0],l.push(T[0],T[1]),h.push(m)}_+=1}}this.triangleCount=_,this.trianglePositions.update(o),this.triangleVectors.update(a),this.triangleColors.update(s),this.triangleUVs.update(l),this.triangleIds.update(new Uint32Array(h))}},f.drawTransparent=f.draw=function(e){e=e||{};for(var t=this.gl,n=e.model||h,r=e.view||h,i=e.projection||h,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);var c={model:n,view:r,projection:i,inverseModel:h.slice(),clipBounds:o,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};c.inverseModel=l(c.inverseModel,c.model),t.disable(t.CULL_FACE),this.texture.bind(0);var u=new Array(16);for(s(u,c.view,c.model),s(u,c.projection,u),l(u,u),a=0;a<3;++a)c.eyePosition[a]=u[12+a]/u[15];var d=u[15];for(a=0;a<3;++a)d+=this.lightPosition[a]*u[4*a+3];for(a=0;a<3;++a){for(var f=u[12+a],p=0;p<3;++p)f+=u[4*p+a]*this.lightPosition[p];c.lightPosition[a]=f/d}if(this.triangleCount>0){var g=this.triShader;g.bind(),g.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(e){e=e||{};for(var t=this.gl,n=e.model||h,r=e.view||h,i=e.projection||h,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(n),this._view=[].slice.call(r),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:n,view:r,projection:i,clipBounds:o,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],n=this.cells[t],r=this.positions[n[1]].slice(0,3),i={position:r,dataCoordinate:r,index:Math.floor(n[1]/48)};return"cone"===this.traceType?i.index=Math.floor(n[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[n[1]],i.velocity=this.vectors[n[1]].slice(0,3),i.divergence=this.vectors[n[1]][3],i.index=t),i},f.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(e,t,n){var r=n.shaders;1===arguments.length&&(e=(t=e).gl);var s=p(e,r),l=g(e,r),u=a(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));u.generateMipmap(),u.minFilter=e.LINEAR_MIPMAP_LINEAR,u.magFilter=e.LINEAR;var h=i(e),f=i(e),m=i(e),v=i(e),y=i(e),b=new d(e,u,s,l,h,f,y,m,v,o(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:y,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:v,type:e.FLOAT,size:2},{buffer:f,type:e.FLOAT,size:4}]),n.traceType||"cone");return b.update(t),b}},{colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259}],81:[function(e,t,n){var r=e("glslify"),i=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);n.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},n.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(e,t,n){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],83:[function(e,t,n){var r=e("./1.0/numbers");t.exports=function(e){return r[e]}},{"./1.0/numbers":82}],84:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl,n=r(t),a=i(t,[{buffer:n,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:n,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:n,type:t.FLOAT,size:3,offset:28,stride:40}]),l=o(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,n,a,l);return c.update(e),c};var r=e("gl-buffer"),i=e("gl-vao"),o=e("./shaders/index"),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,n,r){this.gl=e,this.shader=r,this.buffer=t,this.vao=n,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var n=0;n<3;++n)e[0][n]=Math.min(e[0][n],t[n]),e[1][n]=Math.max(e[1][n],t[n])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,n=this.shader.uniforms;this.shader.bind();var r=n.view=e.view||a,i=n.projection=e.projection||a;n.model=e.model||a,n.clipBounds=this.clipBounds,n.opacity=this.opacity;var o=r[12],s=r[13],l=r[14],c=r[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),n.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var n=[],r=1;r<=2;++r)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(r+t)%3]=i,n.push(o)}e[t]=n}return e}();function h(e,t,n,r){for(var i=u[r],o=0;o<i.length;++o){var a=i[o];e.push(t[0],t[1],t[2],n[0],n[1],n[2],n[3],a[0],a[1],a[2])}return i.length}l.update=function(e){"lineWidth"in(e=e||{})&&(this.lineWidth=e.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in e&&(this.capSize=e.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var t=e.color||[[0,0,0],[0,0,0],[0,0,0]],n=e.position,r=e.error;if(Array.isArray(t[0])||(t=[t,t,t]),n&&r){var i=[],o=n.length,a=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=a;e:for(var l=0;l<o;++l){for(var u=n[l],d=0;d<3;++d)if(isNaN(u[d])||!isFinite(u[d]))continue e;var f,p=r[l],g=t[s];Array.isArray(g[0])&&(g=t[l]),3===g.length?g=[g[0],g[1],g[2],1]:4===g.length&&(g=[g[0],g[1],g[2],g[3]],!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0)),isNaN(p[0][s])||isNaN(p[1][s])||(p[0][s]<0&&((f=u.slice())[s]+=p[0][s],i.push(u[0],u[1],u[2],g[0],g[1],g[2],g[3],0,0,0,f[0],f[1],f[2],g[0],g[1],g[2],g[3],0,0,0),c(this.bounds,f),a+=2+h(i,f,g,s)),p[1][s]>0&&((f=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],g[0],g[1],g[2],g[3],0,0,0,f[0],f[1],f[2],g[0],g[1],g[2],g[3],0,0,0),c(this.bounds,f),a+=2+h(i,f,g,s)))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(e,t,n){"use strict";var r=e("glslify"),i=e("gl-shader"),o=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),a=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(e){return i(e,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(e,t,n){"use strict";var r=e("gl-texture2d");t.exports=function(e,t,n,r){i||(i=e.FRAMEBUFFER_UNSUPPORTED,o=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var n=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(n+1);for(var r=0;r<=n;++r){for(var i=new Array(n),o=0;o<r;++o)i[o]=e.COLOR_ATTACHMENT0+o;for(o=r;o<n;++o)i[o]=e.NONE;l[r]=i}}(e,c),Array.isArray(t)&&(r=n,n=0|t[1],t=0|t[0]),"number"!=typeof t)throw new Error("gl-fbo: Missing shape parameter");var u=e.getParameter(e.MAX_RENDERBUFFER_SIZE);if(t<0||t>u||n<0||n>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(r=r||{})){if((h=Math.max(0|r.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var d=e.UNSIGNED_BYTE,f=e.getExtension("OES_texture_float");if(r.float&&h>0){if(!f)throw new Error("gl-fbo: Context does not support floating point textures");d=e.FLOAT}else r.preferFloat&&h>0&&f&&(d=e.FLOAT);var g=!0;"depth"in r&&(g=!!r.depth);var m=!1;return"stencil"in r&&(m=!!r.stencil),new p(e,t,n,d,h,g,m,c)};var i,o,a,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(e,t,n,i,o,a){if(!i)return null;var s=r(e,t,n,o,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,a,e.TEXTURE_2D,s.handle,0),s}function f(e,t,n,r,i){var o=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,o),e.renderbufferStorage(e.RENDERBUFFER,r,t,n),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,o),o}function p(e,t,n,r,i,o,a,s){this.gl=e,this._shape=[0|t,0|n],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p<i;++p)this.color[p]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=r,this._useDepth=o,this._useStencil=a;var g=this,m=[0|t,0|n];Object.defineProperties(m,{0:{get:function(){return g._shape[0]},set:function(e){return g.width=e}},1:{get:function(){return g._shape[1]},set:function(e){return g.height=e}}}),this._shapeVector=m,function(e){var t=c(e.gl),n=e.gl,r=e.handle=n.createFramebuffer(),i=e._shape[0],o=e._shape[1],a=e.color.length,s=e._ext,p=e._useStencil,g=e._useDepth,m=e._colorType;n.bindFramebuffer(n.FRAMEBUFFER,r);for(var v=0;v<a;++v)e.color[v]=d(n,i,o,m,n.RGBA,n.COLOR_ATTACHMENT0+v);0===a?(e._color_rb=f(n,i,o,n.RGBA4,n.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):a>1&&s.drawBuffersWEBGL(l[a]);var y=n.getExtension("WEBGL_depth_texture");y?p?e.depth=d(n,i,o,y.UNSIGNED_INT_24_8_WEBGL,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):g&&(e.depth=d(n,i,o,n.UNSIGNED_SHORT,n.DEPTH_COMPONENT,n.DEPTH_ATTACHMENT)):g&&p?e._depth_rb=f(n,i,o,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):g?e._depth_rb=f(n,i,o,n.DEPTH_COMPONENT16,n.DEPTH_ATTACHMENT):p&&(e._depth_rb=f(n,i,o,n.STENCIL_INDEX,n.STENCIL_ATTACHMENT));var b=n.checkFramebufferStatus(n.FRAMEBUFFER);if(b!==n.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(n.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),v=0;v<e.color.length;++v)e.color[v].dispose(),e.color[v]=null;e._color_rb&&(n.deleteRenderbuffer(e._color_rb),e._color_rb=null),u(n,t),h(b)}u(n,t)}(this)}var g=p.prototype;function m(e,t,n){if(e._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(e._shape[0]!==t||e._shape[1]!==n){var r=e.gl,i=r.getParameter(r.MAX_RENDERBUFFER_SIZE);if(t<0||t>i||n<0||n>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=n;for(var o=c(r),a=0;a<e.color.length;++a)e.color[a].shape=e._shape;e._color_rb&&(r.bindRenderbuffer(r.RENDERBUFFER,e._color_rb),r.renderbufferStorage(r.RENDERBUFFER,r.RGBA4,e._shape[0],e._shape[1])),e.depth&&(e.depth.shape=e._shape),e._depth_rb&&(r.bindRenderbuffer(r.RENDERBUFFER,e._depth_rb),e._useDepth&&e._useStencil?r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,e._shape[0],e._shape[1]):e._useDepth?r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT16,e._shape[0],e._shape[1]):e._useStencil&&r.renderbufferStorage(r.RENDERBUFFER,r.STENCIL_INDEX,e._shape[0],e._shape[1])),r.bindFramebuffer(r.FRAMEBUFFER,e.handle);var s=r.checkFramebufferStatus(r.FRAMEBUFFER);s!==r.FRAMEBUFFER_COMPLETE&&(e.dispose(),u(r,o),h(s)),u(r,o)}}Object.defineProperties(g,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(e){if(Array.isArray(e)||(e=[0|e,0|e]),2!==e.length)throw new Error("gl-fbo: Shape vector must be length 2");var t=0|e[0],n=0|e[1];return m(this,t,n),[t,n]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(e){return m(this,e|=0,this._shape[1]),e},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(e){return e|=0,m(this,this._shape[0],e),e},enumerable:!1}}),g.bind=function(){if(!this._destroyed){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.handle),e.viewport(0,0,this._shape[0],this._shape[1])}},g.dispose=function(){if(!this._destroyed){this._destroyed=!0;var e=this.gl;e.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(e.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var t=0;t<this.color.length;++t)this.color[t].dispose(),this.color[t]=null;this._color_rb&&(e.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{"gl-texture2d":146}],87:[function(e,t,n){var r=e("sprintf-js").sprintf,i=e("gl-constants/lookup"),o=e("glsl-shader-name"),a=e("add-line-numbers");t.exports=function(e,t,n){"use strict";var s=o(t)||"of unknown name (see npm glsl-shader-name)",l="unknown type";void 0!==n&&(l=n===i.FRAGMENT_SHADER?"fragment":"vertex");for(var c=r("Error compiling %s shader %s:\n",l,s),u=r("%s%s",c,e),h=e.split("\n"),d={},f=0;f<h.length;f++){var p=h[f];if(""!==p&&"\0"!==p){var g=parseInt(p.split(":")[2]);if(isNaN(g))throw new Error(r("Could not parse error: %s",p));d[g]=p}}var m=a(t).split("\n");for(f=0;f<m.length;f++)if((d[f+3]||d[f+2]||d[f+1])&&(c+=m[f]+"\n",d[f+1])){var v=d[f+1];v=v.substr(v.split(":",3).join(":").length+1).trim(),c+=r("^^^ %s\n\n",v)}return{long:c.trim(),short:u.trim()}}},{"add-line-numbers":9,"gl-constants/lookup":83,"glsl-shader-name":223,"sprintf-js":301}],88:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.gl,r=new c(e,a(n,l.vertex,l.fragment),a(n,l.pickVertex,l.pickFragment),s(n),s(n),s(n),s(n));return r.update(t),e.addObject(r),r};var r=e("binary-search-bounds"),i=e("iota-array"),o=e("typedarray-pool"),a=e("gl-shader"),s=e("gl-buffer"),l=e("./lib/shaders");function c(e,t,n,r,i,o,a){this.plot=e,this.shader=t,this.pickShader=n,this.positionBuffer=r,this.weightBuffer=i,this.colorBuffer=o,this.idBuffer=a,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,h=c.prototype,d=[0,0,1,0,0,1,1,0,1,1,0,1];h.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var e=this.plot,t=this.shader,n=this.bounds,r=this.numVertices;if(!(r<=0)){var i=e.gl,o=e.dataBox,a=n[2]-n[0],s=n[3]-n[1],l=o[2]-o[0],c=o[3]-o[1];u[0]=2*a/l,u[4]=2*s/c,u[6]=2*(n[0]-o[0])/l-1,u[7]=2*(n[1]-o[1])/c-1,t.bind();var h=t.uniforms;h.viewTransform=u,h.shape=this.shape;var d=t.attributes;this.positionBuffer.bind(),d.position.pointer(),this.weightBuffer.bind(),d.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),d.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,r)}}),h.drawPick=function(){var e=[1,0,0,0,1,0,0,0,1],t=[0,0,0,0];return function(n){var r=this.plot,i=this.pickShader,o=this.bounds,a=this.numVertices;if(!(a<=0)){var s=r.gl,l=r.dataBox,c=o[2]-o[0],u=o[3]-o[1],h=l[2]-l[0],d=l[3]-l[1];e[0]=2*c/h,e[4]=2*u/d,e[6]=2*(o[0]-l[0])/h-1,e[7]=2*(o[1]-l[1])/d-1;for(var f=0;f<4;++f)t[f]=n>>8*f&255;this.pickOffset=n,i.bind();var p=i.uniforms;p.viewTransform=e,p.pickOffset=t,p.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),n+this.shape[0]*this.shape[1]}}}(),h.pick=function(e,t,n){var r=this.pickOffset,i=this.shape[0]*this.shape[1];if(n<r||n>=r+i)return null;var o=n-r,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},h.update=function(e){var t=(e=e||{}).shape||[0,0],n=e.x||i(t[0]),a=e.y||i(t[1]),s=e.z||new Float32Array(t[0]*t[1]),l=!1!==e.zsmooth;this.xData=n,this.yData=a;var c,u,h,f,p=e.colorLevels||[0],g=e.colorValues||[0,0,0,1],m=p.length,v=this.bounds;l?(c=v[0]=n[0],u=v[1]=a[0],h=v[2]=n[n.length-1],f=v[3]=a[a.length-1]):(c=v[0]=n[0]+(n[1]-n[0])/2,u=v[1]=a[0]+(a[1]-a[0])/2,h=v[2]=n[n.length-1]+(n[n.length-1]-n[n.length-2])/2,f=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var y=1/(h-c),b=1/(f-u),_=t[0],x=t[1];this.shape=[_,x];var w=(l?(_-1)*(x-1):_*x)*(d.length>>>1);this.numVertices=w;for(var A=o.mallocUint8(4*w),k=o.mallocFloat32(2*w),T=o.mallocUint8(2*w),S=o.mallocUint32(w),E=0,C=l?_-1:_,M=l?x-1:x,O=0;O<M;++O){var L,D;l?(L=b*(a[O]-u),D=b*(a[O+1]-u)):(L=O<x-1?b*(a[O]-(a[O+1]-a[O])/2-u):b*(a[O]-(a[O]-a[O-1])/2-u),D=O<x-1?b*(a[O]+(a[O+1]-a[O])/2-u):b*(a[O]+(a[O]-a[O-1])/2-u));for(var I=0;I<C;++I){var R,P;l?(R=y*(n[I]-c),P=y*(n[I+1]-c)):(R=I<_-1?y*(n[I]-(n[I+1]-n[I])/2-c):y*(n[I]-(n[I]-n[I-1])/2-c),P=I<_-1?y*(n[I]+(n[I+1]-n[I])/2-c):y*(n[I]+(n[I]-n[I-1])/2-c));for(var N=0;N<d.length;N+=2){var z,F,B,j,U=d[N],V=d[N+1],q=s[l?(O+V)*_+(I+U):O*_+I],H=r.le(p,q);if(H<0)z=g[0],F=g[1],B=g[2],j=g[3];else if(H===m-1)z=g[4*m-4],F=g[4*m-3],B=g[4*m-2],j=g[4*m-1];else{var $=(q-p[H])/(p[H+1]-p[H]),W=1-$,G=4*H,Y=4*(H+1);z=W*g[G]+$*g[Y],F=W*g[G+1]+$*g[Y+1],B=W*g[G+2]+$*g[Y+2],j=W*g[G+3]+$*g[Y+3]}A[4*E]=255*z,A[4*E+1]=255*F,A[4*E+2]=255*B,A[4*E+3]=255*j,k[2*E]=.5*R+.5*P,k[2*E+1]=.5*L+.5*D,T[2*E]=U,T[2*E+1]=V,S[E]=O*_+I,E+=1}}}this.positionBuffer.update(k),this.weightBuffer.update(T),this.colorBuffer.update(A),this.idBuffer.update(S),o.free(k),o.free(A),o.free(T),o.free(S)},h.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{"./lib/shaders":89,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132,"iota-array":235,"typedarray-pool":308}],89:[function(e,t,n){"use strict";var r=e("glslify");t.exports={fragment:r(["precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n}\n"]),vertex:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 color;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n fragColor = color;\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"]),pickFragment:r(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nuniform vec2 shape;\nuniform vec4 pickOffset;\n\nvoid main() {\n vec2 d = step(.5, vWeight);\n vec4 id = fragId + pickOffset;\n id.x += d.x + d.y*shape.x;\n\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n gl_FragColor = id/255.;\n}\n"]),pickVertex:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"])}},{glslify:231}],90:[function(e,t,n){var r=e("glslify"),i=e("gl-shader"),o=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, nextPosition;\nattribute float arcLength, lineWidth;\nattribute vec4 color;\n\nuniform vec2 screenShape;\nuniform float pixelRatio;\nuniform mat4 model, view, projection;\n\nvarying vec4 fragColor;\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n vec4 startPoint = project(position);\n vec4 endPoint = project(nextPosition);\n\n vec2 A = startPoint.xy / startPoint.w;\n vec2 B = endPoint.xy / endPoint.w;\n\n float clipAngle = atan(\n (B.y - A.y) * screenShape.y,\n (B.x - A.x) * screenShape.x\n );\n\n vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\n sin(clipAngle),\n -cos(clipAngle)\n ) / screenShape;\n\n gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\n\n worldPosition = position;\n pixelArcLength = arcLength;\n fragColor = color;\n}\n"]),a=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// path_to_url packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];n.createShader=function(e){return i(e,o,a,null,l)},n.createPickShader=function(e){return i(e,o,s,null,l)}},{"gl-shader":132,glslify:231}],91:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,n=h(t);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;var a=d(t);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=r(t),l=i(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var p=o(t,u);p.wrap=t.REPEAT;var g=new v(t,n,a,s,l,p);return g.update(e),g};var r=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),a=new Uint8Array(4),s=new Float32Array(a.buffer);var l=e("binary-search-bounds"),c=e("ndarray"),u=e("./lib/shaders"),h=u.createShader,d=u.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){for(var n=0,r=0;r<3;++r){var i=e[r]-t[r];n+=i*i}return Math.sqrt(n)}function g(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],n=0;n<3;++n)t[0][n]=Math.max(e[0][n],t[0][n]),t[1][n]=Math.min(e[1][n],t[1][n]);return t}function m(e,t,n,r){this.arcLength=e,this.position=t,this.index=n,this.dataCoordinate=r}function v(e,t,n,r,i,o){this.gl=e,this.shader=t,this.pickShader=n,this.buffer=r,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,n=this.shader,r=this.vao;n.bind(),n.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,clipBounds:g(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},r.bind(),r.draw(t.TRIANGLE_STRIP,this.vertexCount),r.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,n=this.pickShader,r=this.vao;n.bind(),n.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,pickId:this.pickId,clipBounds:g(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},r.bind(),r.draw(t.TRIANGLE_STRIP,this.vertexCount),r.unbind()}},y.update=function(e){var t,n;this.dirty=!0;var r=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],d=e.position||e.positions;if(d){var f=e.color||e.colors||[0,0,0,1],g=e.lineWidth||1,m=!1;e:for(t=1;t<d.length;++t){var v,y,b,_=d[t-1],x=d[t];for(o.push(s),a.push(_.slice()),n=0;n<3;++n){if(isNaN(_[n])||isNaN(x[n])||!isFinite(_[n])||!isFinite(x[n])){if(!r&&i.length>0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,m=!0}continue e}h[0][n]=Math.min(h[0][n],_[n],x[n]),h[1][n]=Math.max(h[1][n],_[n],x[n])}Array.isArray(f[0])?(v=f.length>t-1?f[t-1]:f.length>0?f[f.length-1]:[0,0,0,1],y=f.length>t?f[t]:f.length>0?f[f.length-1]:[0,0,0,1]):v=y=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),b=Array.isArray(g)?g.length>t-1?g[t-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var A=s;if(s+=p(_,x),m){for(n=0;n<2;++n)i.push(_[0],_[1],_[2],x[0],x[1],x[2],A,b,v[0],v[1],v[2],v[3]);u+=2,m=!1}i.push(_[0],_[1],_[2],x[0],x[1],x[2],A,b,v[0],v[1],v[2],v[3],_[0],_[1],_[2],x[0],x[1],x[2],A,-b,v[0],v[1],v[2],v[3],x[0],x[1],x[2],_[0],_[1],_[2],s,-b,y[0],y[1],y[2],y[3],x[0],x[1],x[2],_[0],_[1],_[2],s,b,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),o.push(s),a.push(d[d.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=a,this.arcLength=o,"dashes"in e){var k=e.dashes.slice();for(k.unshift(0),t=1;t<k.length;++t)k[t]=k[t-1]+k[t];var T=c(new Array(1024),[256,1,4]);for(t=0;t<256;++t){for(n=0;n<4;++n)T.set(t,0,n,0);1&l.le(k,k[k.length-1]*t/255)?T.set(t,0,0,0):T.set(t,0,0,255)}this.texture.setPixels(T)}},y.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},y.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=function(e,t,n,r){return a[0]=r,a[1]=n,a[2]=t,a[3]=e,s[0]}(e.value[0],e.value[1],e.value[2],0),n=l.le(this.arcLength,t);if(n<0)return null;if(n===this.arcLength.length-1)return new m(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),n);for(var r=this.points[n],i=this.points[Math.min(n+1,this.points.length-1)],o=(t-this.arcLength[n])/(this.arcLength[n+1]-this.arcLength[n]),c=1-o,u=[0,0,0],h=0;h<3;++h)u[h]=c*r[h]+o*i[h];var d=Math.min(o<.5?n:n+1,this.points.length-1);return new m(t,u,d,this.points[d])}},{"./lib/shaders":90,"binary-search-bounds":31,"gl-buffer":78,"gl-texture2d":146,"gl-vao":150,ndarray:259}],92:[function(e,t,n){t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],93:[function(e,t,n){t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],94:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],g=e[14],m=e[15];return(t*a-n*o)*(h*m-d*g)-(t*s-r*o)*(u*m-d*p)+(t*l-i*o)*(u*g-h*p)+(n*s-r*a)*(c*m-d*f)-(n*l-i*a)*(c*g-h*f)+(r*l-i*s)*(c*p-u*f)}},{}],95:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,c=n*a,u=r*a,h=r*s,d=i*a,f=i*s,p=i*l,g=o*a,m=o*s,v=o*l;return e[0]=1-h-p,e[1]=u+v,e[2]=d-m,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=f+g,e[7]=0,e[8]=d+m,e[9]=f-g,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],96:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,c=o+o,u=r*s,h=r*l,d=r*c,f=i*l,p=i*c,g=o*c,m=a*s,v=a*l,y=a*c;return e[0]=1-(f+g),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(u+g),e[6]=p+m,e[7]=0,e[8]=d+v,e[9]=p-m,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},{}],97:[function(e,t,n){t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],98:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],g=t[13],m=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,_=n*c-o*a,x=r*l-i*s,w=r*c-o*s,A=i*c-o*l,k=u*g-h*p,T=u*m-d*p,S=u*v-f*p,E=h*m-d*g,C=h*v-f*g,M=d*v-f*m,O=y*M-b*C+_*E+x*S-w*T+A*k;return O?(O=1/O,e[0]=(s*M-l*C+c*E)*O,e[1]=(i*C-r*M-o*E)*O,e[2]=(g*A-m*w+v*x)*O,e[3]=(d*w-h*A-f*x)*O,e[4]=(l*S-a*M-c*T)*O,e[5]=(n*M-i*S+o*T)*O,e[6]=(m*_-p*A-v*b)*O,e[7]=(u*A-d*_+f*b)*O,e[8]=(a*C-s*S+c*k)*O,e[9]=(r*S-n*C-o*k)*O,e[10]=(p*w-g*_+v*y)*O,e[11]=(h*_-u*w-f*y)*O,e[12]=(s*T-a*E-l*k)*O,e[13]=(n*E-r*T+i*k)*O,e[14]=(g*b-p*x-m*y)*O,e[15]=(u*x-h*b+d*y)*O,e):null}},{}],99:[function(e,t,n){var r=e("./identity");t.exports=function(e,t,n,i){var o,a,s,l,c,u,h,d,f,p,g=t[0],m=t[1],v=t[2],y=i[0],b=i[1],_=i[2],x=n[0],w=n[1],A=n[2];return Math.abs(g-x)<1e-6&&Math.abs(m-w)<1e-6&&Math.abs(v-A)<1e-6?r(e):(h=g-x,d=m-w,f=v-A,o=b*(f*=p=1/Math.sqrt(h*h+d*d+f*f))-_*(d*=p),a=_*(h*=p)-y*f,s=y*d-b*h,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),l=d*s-f*a,c=f*o-h*s,u=h*a-d*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=o,e[1]=l,e[2]=h,e[3]=0,e[4]=a,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(o*g+a*m+s*v),e[13]=-(l*g+c*m+u*v),e[14]=-(h*g+d*m+f*v),e[15]=1,e)}},{"./identity":97}],100:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],g=t[12],m=t[13],v=t[14],y=t[15],b=n[0],_=n[1],x=n[2],w=n[3];return e[0]=b*r+_*s+x*h+w*g,e[1]=b*i+_*l+x*d+w*m,e[2]=b*o+_*c+x*f+w*v,e[3]=b*a+_*u+x*p+w*y,b=n[4],_=n[5],x=n[6],w=n[7],e[4]=b*r+_*s+x*h+w*g,e[5]=b*i+_*l+x*d+w*m,e[6]=b*o+_*c+x*f+w*v,e[7]=b*a+_*u+x*p+w*y,b=n[8],_=n[9],x=n[10],w=n[11],e[8]=b*r+_*s+x*h+w*g,e[9]=b*i+_*l+x*d+w*m,e[10]=b*o+_*c+x*f+w*v,e[11]=b*a+_*u+x*p+w*y,b=n[12],_=n[13],x=n[14],w=n[15],e[12]=b*r+_*s+x*h+w*g,e[13]=b*i+_*l+x*d+w*m,e[14]=b*o+_*c+x*f+w*v,e[15]=b*a+_*u+x*p+w*y,e}},{}],101:[function(e,t,n){t.exports=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1,e}},{}],102:[function(e,t,n){t.exports=function(e,t,n,r,i){var o=1/Math.tan(t/2),a=1/(r-i);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*a,e[15]=0,e}},{}],103:[function(e,t,n){t.exports=function(e,t,n,r){var i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E,C=r[0],M=r[1],O=r[2],L=Math.sqrt(C*C+M*M+O*O);return Math.abs(L)<1e-6?null:(C*=L=1/L,M*=L,O*=L,i=Math.sin(n),a=1-(o=Math.cos(n)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],g=t[8],m=t[9],v=t[10],y=t[11],b=C*C*a+o,_=M*C*a+O*i,x=O*C*a-M*i,w=C*M*a-O*i,A=M*M*a+o,k=O*M*a+C*i,T=C*O*a+M*i,S=M*O*a-C*i,E=O*O*a+o,e[0]=s*b+h*_+g*x,e[1]=l*b+d*_+m*x,e[2]=c*b+f*_+v*x,e[3]=u*b+p*_+y*x,e[4]=s*w+h*A+g*k,e[5]=l*w+d*A+m*k,e[6]=c*w+f*A+v*k,e[7]=u*w+p*A+y*k,e[8]=s*T+h*S+g*E,e[9]=l*T+d*S+m*E,e[10]=c*T+f*S+v*E,e[11]=u*T+p*S+y*E,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},{}],104:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*r,e[5]=a*i+u*r,e[6]=s*i+h*r,e[7]=l*i+d*r,e[8]=c*i-o*r,e[9]=u*i-a*r,e[10]=h*i-s*r,e[11]=d*i-l*r,e}},{}],105:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i-c*r,e[1]=a*i-u*r,e[2]=s*i-h*r,e[3]=l*i-d*r,e[8]=o*r+c*i,e[9]=a*r+u*i,e[10]=s*r+h*i,e[11]=l*r+d*i,e}},{}],106:[function(e,t,n){t.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+c*r,e[1]=a*i+u*r,e[2]=s*i+h*r,e[3]=l*i+d*r,e[4]=c*i-o*r,e[5]=u*i-a*r,e[6]=h*i-s*r,e[7]=d*i-l*r,e}},{}],107:[function(e,t,n){t.exports=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],108:[function(e,t,n){t.exports=function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,g=n[0],m=n[1],v=n[2];return t===e?(e[12]=t[0]*g+t[4]*m+t[8]*v+t[12],e[13]=t[1]*g+t[5]*m+t[9]*v+t[13],e[14]=t[2]*g+t[6]*m+t[10]*v+t[14],e[15]=t[3]*g+t[7]*m+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*g+s*m+h*v+t[12],e[13]=i*g+l*m+d*v+t[13],e[14]=o*g+c*m+f*v+t[14],e[15]=a*g+u*m+p*v+t[15]),e}},{}],109:[function(e,t,n){t.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},{}],110:[function(e,t,n){"use strict";var r=e("barycentric"),i=e("polytope-closest-point/lib/closest_point_2d.js");function o(e,t){for(var n=[0,0,0,0],r=0;r<4;++r)for(var i=0;i<4;++i)n[i]+=e[4*r+i]*t[r];return n}function a(e,t,n,r,i){for(var a=o(r,o(n,o(t,[e[0],e[1],e[2],1]))),s=0;s<3;++s)a[s]/=a[3];return[.5*i[0]*(1+a[0]),.5*i[1]*(1-a[1])]}function s(e,t){for(var n=[0,0,0],r=0;r<e.length;++r)for(var i=e[r],o=t[r],a=0;a<3;++a)n[a]+=o*i[a];return n}t.exports=function(e,t,n,o,l,c){if(1===e.length)return[0,e[0].slice()];for(var u=new Array(e.length),h=0;h<e.length;++h)u[h]=a(e[h],n,o,l,c);var d=0,f=1/0;for(h=0;h<u.length;++h){for(var p=0,g=0;g<2;++g)p+=Math.pow(u[h][g]-t[g],2);p<f&&(f=p,d=h)}var m=function(e,t){if(2===e.length){for(var n=0,o=0,a=0;a<2;++a)n+=Math.pow(t[a]-e[0][a],2),o+=Math.pow(t[a]-e[1][a],2);return(n=Math.sqrt(n))+(o=Math.sqrt(o))<1e-6?[1,0]:[o/(n+o),n/(o+n)]}if(3===e.length){var s=[0,0];return i(e[0],e[1],e[2],t,s),r(e,s)}return[]}(u,t),v=0;for(h=0;h<3;++h){if(m[h]<-.001||m[h]>1.0001)return null;v+=m[h]}return Math.abs(v-1)>.001?null:[d,s(e,m),m]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(e,t,n){var r=e("glslify"),i=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),o=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),a=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),h=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),d=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),f=r(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),p=r(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);n.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},n.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},n.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},n.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},n.pointPickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},n.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(e,t,n){"use strict";var r=e("gl-shader"),i=e("gl-buffer"),o=e("gl-vao"),a=e("gl-texture2d"),s=e("normals"),l=e("gl-mat4/multiply"),c=e("gl-mat4/invert"),u=e("ndarray"),h=e("colormap"),d=e("simplicial-complex-contour"),f=e("typedarray-pool"),p=e("./lib/shaders"),g=e("./lib/closest-point"),m=p.meshShader,v=p.wireShader,y=p.pointShader,b=p.pickShader,_=p.pointPickShader,x=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function A(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,b,_,x,A,k,T,S,E){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=n,this.lineShader=r,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=d,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=m,this.edgeUVs=v,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=x,this.pointUVs=A,this.pointSizes=k,this.pointIds=_,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=S,this.contourVAO=E,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=A.prototype;function T(e,t){if(!t)return 1;if(!t.length)return 1;for(var n=0;n<t.length;++n){if(t.length<2)return 1;if(t[n][0]===e)return t[n][1];if(t[n][0]>e&&n>0){var r=(t[n][0]-e)/(t[n][0]-t[n-1][0]);return t[n][1]*(1-r)+r*t[n-1][1]}}return 1}function S(e){var t=r(e,m.vertex,m.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.normal.location=4,t}function E(e){var t=r(e,v.vertex,v.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t}function C(e){var t=r(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function M(e){var t=r(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function O(e){var t=r(e,_.vertex,_.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function L(e){var t=r(e,x.vertex,x.fragment);return t.attributes.position.location=0,t}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(e){this.pickId=e},k.highlight=function(e){if(e&&this.contourEnable){for(var t=d(this.cells,this.intensity,e.intensity),n=t.cells,r=t.vertexIds,i=t.vertexWeights,o=n.length,a=f.mallocFloat32(6*o),s=0,l=0;l<o;++l)for(var c=n[l],u=0;u<2;++u){var h=c[0];2===c.length&&(h=c[u]);for(var p=r[h][0],g=r[h][1],m=i[h],v=1-m,y=this.positions[p],b=this.positions[g],_=0;_<3;++_)a[s++]=m*y[_]+v*b[_]}this.contourCount=s/3|0,this.contourPositions.update(a.subarray(0,s)),f.free(a)}else this.contourCount=0},k.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"contourEnable"in e&&(this.contourEnable=e.contourEnable),"contourColor"in e&&(this.contourColor=e.contourColor),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"lightPosition"in e&&(this.lightPosition=e.lightPosition),this.hasAlpha=!1,"opacity"in e&&(this.opacity=e.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in e&&(this.opacityscale=e.opacityscale,this.hasAlpha=!0),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),e.texture?(this.texture.dispose(),this.texture=a(t,e.texture)):e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e,t){for(var n=h({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),i=0;i<256;++i){for(var o=n[i],a=0;a<3;++a)r[4*i+a]=o[a];r[4*i+3]=t?255*T(i/255,t):255*o[3]}return u(r,[256,256,4],[4,0,1])}(e.colormap,this.opacityscale)),this.texture.generateMipmap());var n=e.cells,r=e.positions;if(r&&n){var i=[],o=[],l=[],c=[],d=[],f=[],p=[],g=[],m=[],v=[],y=[],b=[],_=[],x=[];this.cells=n,this.positions=r;var w=e.vertexNormals,A=e.cellNormals,k=void 0===e.vertexNormalsEpsilon?1e-6:e.vertexNormalsEpsilon,S=void 0===e.faceNormalsEpsilon?1e-6:e.faceNormalsEpsilon;e.useFacetNormals&&!A&&(A=s.faceNormals(n,r,S)),A||w||(w=s.vertexNormals(n,r,k));var E=e.vertexColors,C=e.cellColors,M=e.meshColor||[1,1,1,1],O=e.vertexUVs,L=e.vertexIntensity,D=e.cellUVs,I=e.cellIntensity,R=1/0,P=-1/0;if(!O&&!D)if(L)if(e.vertexIntensityBounds)R=+e.vertexIntensityBounds[0],P=+e.vertexIntensityBounds[1];else for(var N=0;N<L.length;++N){var z=L[N];R=Math.min(R,z),P=Math.max(P,z)}else if(I)if(e.cellIntensityBounds)R=+e.cellIntensityBounds[0],P=+e.cellIntensityBounds[1];else for(N=0;N<I.length;++N)z=I[N],R=Math.min(R,z),P=Math.max(P,z);else for(N=0;N<r.length;++N)z=r[N][2],R=Math.min(R,z),P=Math.max(P,z);this.intensity=L||I||function(e){for(var t=e.length,n=new Array(t),r=0;r<t;++r)n[r]=e[r][2];return n}(r),this.pickVertex=!(I||C);var F=e.pointSizes,B=e.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=0;N<r.length;++N)for(var j=r[N],U=0;U<3;++U)!isNaN(j[U])&&isFinite(j[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],j[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],j[U]));var V=0,q=0,H=0;e:for(N=0;N<n.length;++N){var $=n[N];switch($.length){case 1:for(j=r[G=$[0]],U=0;U<3;++U)if(isNaN(j[U])||!isFinite(j[U]))continue e;v.push(j[0],j[1],j[2]),Y=E?E[G]:C?C[N]:M,this.opacityscale&&L?o.push(Y[0],Y[1],Y[2],this.opacity*T((L[G]-R)/(P-R),this.opacityscale)):3===Y.length?y.push(Y[0],Y[1],Y[2],this.opacity):(y.push(Y[0],Y[1],Y[2],Y[3]*this.opacity),Y[3]<1&&(this.hasAlpha=!0)),X=O?O[G]:L?[(L[G]-R)/(P-R),0]:D?D[N]:I?[(I[N]-R)/(P-R),0]:[(j[2]-R)/(P-R),0],b.push(X[0],X[1]),F?_.push(F[G]):_.push(B),x.push(N),H+=1;break;case 2:for(U=0;U<2;++U){j=r[G=$[U]];for(var W=0;W<3;++W)if(isNaN(j[W])||!isFinite(j[W]))continue e}for(U=0;U<2;++U)j=r[G=$[U]],f.push(j[0],j[1],j[2]),Y=E?E[G]:C?C[N]:M,this.opacityscale&&L?o.push(Y[0],Y[1],Y[2],this.opacity*T((L[G]-R)/(P-R),this.opacityscale)):3===Y.length?p.push(Y[0],Y[1],Y[2],this.opacity):(p.push(Y[0],Y[1],Y[2],Y[3]*this.opacity),Y[3]<1&&(this.hasAlpha=!0)),X=O?O[G]:L?[(L[G]-R)/(P-R),0]:D?D[N]:I?[(I[N]-R)/(P-R),0]:[(j[2]-R)/(P-R),0],g.push(X[0],X[1]),m.push(N);q+=1;break;case 3:for(U=0;U<3;++U)for(j=r[G=$[U]],W=0;W<3;++W)if(isNaN(j[W])||!isFinite(j[W]))continue e;for(U=0;U<3;++U){var G,Y,X,Z;j=r[G=$[2-U]],i.push(j[0],j[1],j[2]),(Y=E?E[G]:C?C[N]:M)?this.opacityscale&&L?o.push(Y[0],Y[1],Y[2],this.opacity*T((L[G]-R)/(P-R),this.opacityscale)):3===Y.length?o.push(Y[0],Y[1],Y[2],this.opacity):(o.push(Y[0],Y[1],Y[2],Y[3]*this.opacity),Y[3]<1&&(this.hasAlpha=!0)):o.push(.5,.5,.5,1),X=O?O[G]:L?[(L[G]-R)/(P-R),0]:D?D[N]:I?[(I[N]-R)/(P-R),0]:[(j[2]-R)/(P-R),0],c.push(X[0],X[1]),Z=w?w[G]:A[N],l.push(Z[0],Z[1],Z[2]),d.push(N)}V+=1}}this.pointCount=H,this.edgeCount=q,this.triangleCount=V,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(b),this.pointSizes.update(_),this.pointIds.update(new Uint32Array(x)),this.edgePositions.update(f),this.edgeColors.update(p),this.edgeUVs.update(g),this.edgeIds.update(new Uint32Array(m)),this.trianglePositions.update(i),this.triangleColors.update(o),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(d))}},k.drawTransparent=k.draw=function(e){e=e||{};for(var t=this.gl,n=e.model||w,r=e.view||w,i=e.projection||w,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);var s={model:n,view:r,projection:i,inverseModel:w.slice(),clipBounds:o,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};s.inverseModel=c(s.inverseModel,s.model),t.disable(t.CULL_FACE),this.texture.bind(0);var u=new Array(16);for(l(u,s.view,s.model),l(u,s.projection,u),c(u,u),a=0;a<3;++a)s.eyePosition[a]=u[12+a]/u[15];var h,d=u[15];for(a=0;a<3;++a)d+=this.lightPosition[a]*u[4*a+3];for(a=0;a<3;++a){for(var f=u[12+a],p=0;p<3;++p)f+=u[4*p+a]*this.lightPosition[p];s.lightPosition[a]=f/d}this.triangleCount>0&&((h=this.triShader).bind(),h.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((h=this.lineShader).bind(),h.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((h=this.pointShader).bind(),h.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((h=this.contourShader).bind(),h.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(e){e=e||{};for(var t=this.gl,n=e.model||w,r=e.view||w,i=e.projection||w,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(n),this._view=[].slice.call(r),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:n,view:r,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],n=this.cells[t],r=this.positions,i=new Array(n.length),o=0;o<n.length;++o)i[o]=r[n[o]];var a=e.coord[0],s=e.coord[1];if(!this.pickVertex){var l=this.positions[n[0]],c=this.positions[n[1]],u=this.positions[n[2]],h=[(l[0]+c[0]+u[0])/3,(l[1]+c[1]+u[1])/3,(l[2]+c[2]+u[2])/3];return{_cellCenter:!0,position:[a,s],index:t,cell:n,cellId:t,intensity:this.intensity[t],dataCoordinate:h}}var d=g(i,[a*this.pixelRatio,this._resolution[1]-s*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!d)return null;var f=d[2],p=0;for(o=0;o<n.length;++o)p+=f[o]*this.intensity[n[o]];return{position:d[1],index:n[d[0]],cell:n,cellId:t,intensity:p,dataCoordinate:this.positions[n[d[0]]]}},k.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},t.exports=function(e,t){if(1===arguments.length&&(e=(t=e).gl),!(e.getExtension("OES_standard_derivatives")||e.getExtension("MOZ_OES_standard_derivatives")||e.getExtension("WEBKIT_OES_standard_derivatives")))throw new Error("derivatives not supported");var n=S(e),r=E(e),s=C(e),l=M(e),c=O(e),h=L(e),d=a(e,u(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var f=i(e),p=i(e),g=i(e),m=i(e),v=i(e),y=o(e,[{buffer:f,type:e.FLOAT,size:3},{buffer:v,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:p,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:m,type:e.FLOAT,size:3}]),b=i(e),_=i(e),x=i(e),w=i(e),k=o(e,[{buffer:b,type:e.FLOAT,size:3},{buffer:w,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:_,type:e.FLOAT,size:4},{buffer:x,type:e.FLOAT,size:2}]),T=i(e),D=i(e),I=i(e),R=i(e),P=i(e),N=o(e,[{buffer:T,type:e.FLOAT,size:3},{buffer:P,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:D,type:e.FLOAT,size:4},{buffer:I,type:e.FLOAT,size:2},{buffer:R,type:e.FLOAT,size:1}]),z=i(e),F=new A(e,d,n,r,s,l,c,h,f,v,p,g,m,y,b,w,_,x,k,T,P,D,I,R,N,z,o(e,[{buffer:z,type:e.FLOAT,size:3}]));return F.update(t),F}},{"./lib/closest-point":110,"./lib/shaders":111,colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259,normals:261,"simplicial-complex-contour":291,"typedarray-pool":308}],113:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl;return new a(e,r(t,[0,0,0,1,1,0,1,1]),i(t,o.boxVert,o.lineFrag))};var r=e("gl-buffer"),i=e("gl-shader"),o=e("./shaders");function a(e,t,n){this.plot=e,this.vbo=t,this.shader=n}var s,l,c=a.prototype;c.bind=function(){var e=this.shader;this.vbo.bind(),this.shader.bind(),e.attributes.coord.pointer(),e.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(e,t,n,r,i){var o=this.plot,a=this.shader,c=o.gl;s[0]=e,s[1]=t,l[0]=n,l[1]=r,a.uniforms.lo=s,a.uniforms.hi=l,a.uniforms.color=i,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],114:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl;return new s(e,r(t),i(t,a.gridVert,a.gridFrag),i(t,a.tickVert,a.gridFrag))};var r=e("gl-buffer"),i=e("gl-shader"),o=e("binary-search-bounds"),a=e("./shaders");function s(e,t,n,r){this.plot=e,this.vbo=t,this.shader=n,this.tickShader=r,this.ticks=[[],[]]}function l(e,t){return e-t}var c,u,h,d,f,p=s.prototype;p.draw=(c=[0,0],u=[0,0],h=[0,0],function(){for(var e=this.plot,t=this.vbo,n=this.shader,r=this.ticks,i=e.gl,o=e._tickBounds,a=e.dataBox,s=e.viewBox,l=e.gridLineWidth,d=e.gridLineColor,f=e.gridLineEnable,p=e.pixelRatio,g=0;g<2;++g){var m=o[g],v=o[g+2]-m,y=.5*(a[g+2]+a[g]),b=a[g+2]-a[g];u[g]=2*v/b,c[g]=2*(m-y)/b}n.bind(),t.bind(),n.attributes.dataCoord.pointer(),n.uniforms.dataShift=c,n.uniforms.dataScale=u;var _=0;for(g=0;g<2;++g){h[0]=h[1]=0,h[g]=1,n.uniforms.dataAxis=h,n.uniforms.lineWidth=l[g]/(s[g+2]-s[g])*p,n.uniforms.color=d[g];var x=6*r[g].length;f[g]&&x&&i.drawArrays(i.TRIANGLES,_,x),_+=x}}),p.drawTickMarks=function(){var e=[0,0],t=[0,0],n=[1,0],r=[0,1],i=[0,0],a=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,h=this.ticks,d=s.gl,f=s._tickBounds,p=s.dataBox,g=s.viewBox,m=s.pixelRatio,v=s.screenBox,y=v[2]-v[0],b=v[3]-v[1],_=g[2]-g[0],x=g[3]-g[1],w=0;w<2;++w){var A=f[w],k=f[w+2]-A,T=.5*(p[w+2]+p[w]),S=p[w+2]-p[w];t[w]=2*k/S,e[w]=2*(A-T)/S}t[0]*=_/y,e[0]*=_/y,t[1]*=x/b,e[1]*=x/b,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var E=u.uniforms;E.dataShift=e,E.dataScale=t;var C=s.tickMarkLength,M=s.tickMarkWidth,O=s.tickMarkColor,L=6*h[0].length,D=Math.min(o.ge(h[0],(p[0]-f[0])/(f[2]-f[0]),l),h[0].length),I=Math.min(o.gt(h[0],(p[2]-f[0])/(f[2]-f[0]),l),h[0].length),R=0+6*D,P=6*Math.max(0,I-D),N=Math.min(o.ge(h[1],(p[1]-f[1])/(f[3]-f[1]),l),h[1].length),z=Math.min(o.gt(h[1],(p[3]-f[1])/(f[3]-f[1]),l),h[1].length),F=L+6*N,B=6*Math.max(0,z-N);i[0]=2*(g[0]-C[1])/y-1,i[1]=(g[3]+g[1])/b-1,a[0]=C[1]*m/y,a[1]=M[1]*m/b,B&&(E.color=O[1],E.tickScale=a,E.dataAxis=r,E.screenOffset=i,d.drawArrays(d.TRIANGLES,F,B)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[1]-C[0])/b-1,a[0]=M[0]*m/y,a[1]=C[0]*m/b,P&&(E.color=O[0],E.tickScale=a,E.dataAxis=n,E.screenOffset=i,d.drawArrays(d.TRIANGLES,R,P)),i[0]=2*(g[2]+C[3])/y-1,i[1]=(g[3]+g[1])/b-1,a[0]=C[3]*m/y,a[1]=M[3]*m/b,B&&(E.color=O[3],E.tickScale=a,E.dataAxis=r,E.screenOffset=i,d.drawArrays(d.TRIANGLES,F,B)),i[0]=(g[2]+g[0])/y-1,i[1]=2*(g[3]+C[2])/b-1,a[0]=M[2]*m/y,a[1]=C[2]*m/b,P&&(E.color=O[2],E.tickScale=a,E.dataAxis=n,E.screenOffset=i,d.drawArrays(d.TRIANGLES,R,P))}}(),p.update=(d=[1,1,-1,-1,1,-1],f=[1,-1,1,1,-1,-1],function(e){for(var t=e.ticks,n=e.bounds,r=new Float32Array(18*(t[0].length+t[1].length)),i=(this.plot.zeroLineEnable,0),o=[[],[]],a=0;a<2;++a)for(var s=o[a],l=t[a],c=n[a],u=n[a+2],h=0;h<l.length;++h){var p=(l[h].x-c)/(u-c);s.push(p);for(var g=0;g<6;++g)r[i++]=p,r[i++]=d[g],r[i++]=f[g]}this.ticks=o,this.vbo.update(r)}),p.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{"./shaders":116,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132}],115:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl;return new a(e,r(t,[-1,-1,-1,1,1,-1,1,1]),i(t,o.lineVert,o.lineFrag))};var r=e("gl-buffer"),i=e("gl-shader"),o=e("./shaders");function a(e,t,n){this.plot=e,this.vbo=t,this.shader=n}var s,l,c=a.prototype;c.bind=function(){var e=this.shader;this.vbo.bind(),this.shader.bind(),e.attributes.coord.pointer(),e.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(e,t,n,r,i,o){var a=this.plot,c=this.shader,u=a.gl;s[0]=e,s[1]=t,l[0]=n,l[1]=r,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=i*a.pixelRatio,c.uniforms.color=o,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"gl-buffer":78,"gl-shader":132}],116:[function(e,t,n){"use strict";var r=e("glslify"),i=r(["precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n"]);t.exports={lineVert:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 start, end;\nuniform float width;\n\nvec2 perp(vec2 v) {\n return vec2(v.y, -v.x);\n}\n\nvec2 screen(vec2 v) {\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n vec2 delta = normalize(perp(start - end));\n vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\n gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\n}\n"]),lineFrag:i,textVert:r(["#define GLSLIFY 1\nattribute vec3 textCoordinate;\n\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\nuniform float angle;\n\nvoid main() {\n float dataOffset = textCoordinate.z;\n vec2 glyphOffset = textCoordinate.xy;\n mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\n glyphMatrix * glyphOffset * textScale + screenOffset;\n gl_Position = vec4(screenCoordinate, 0, 1);\n}\n"]),textFrag:i,gridVert:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale;\nuniform float lineWidth;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\n gl_Position = vec4(pos, 0, 1);\n}\n"]),gridFrag:i,boxVert:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 lo, hi;\n\nvec2 screen(vec2 v) {\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\n}\n"]),tickVert:r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n"])}},{glslify:231}],117:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl;return new l(e,r(t),i(t,s.textVert,s.textFrag))};var r=e("gl-buffer"),i=e("gl-shader"),o=e("text-cache"),a=e("binary-search-bounds"),s=e("./shaders");function l(e,t,n){this.plot=e,this.vbo=t,this.shader=n,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,h,d,f,p,g=l.prototype;g.drawTicks=(c=[0,0],u=[0,0],h=[0,0],function(e){var t=this.plot,n=this.shader,r=this.tickX[e],i=this.tickOffset[e],o=t.gl,s=t.viewBox,l=t.dataBox,d=t.screenBox,f=t.pixelRatio,p=t.tickEnable,g=t.tickPad,m=t.tickColor,v=t.tickAngle,y=t.labelEnable,b=t.labelPad,_=t.labelColor,x=t.labelAngle,w=this.labelOffset[e],A=this.labelCount[e],k=a.lt(r,l[e]),T=a.le(r,l[e+2]);c[0]=c[1]=0,c[e]=1,u[e]=(s[2+e]+s[e])/(d[2+e]-d[e])-1;var S=2/d[2+(1^e)]-d[1^e];u[1^e]=S*s[1^e]-1,p[e]&&(u[1^e]-=S*f*g[e],k<T&&i[T]>i[k]&&(n.uniforms.dataAxis=c,n.uniforms.screenOffset=u,n.uniforms.color=m[e],n.uniforms.angle=v[e],o.drawArrays(o.TRIANGLES,i[k],i[T]-i[k]))),y[e]&&A&&(u[1^e]-=S*f*b[e],n.uniforms.dataAxis=h,n.uniforms.screenOffset=u,n.uniforms.color=_[e],n.uniforms.angle=x[e],o.drawArrays(o.TRIANGLES,w,A)),u[1^e]=S*s[2+(1^e)]-1,p[e+2]&&(u[1^e]+=S*f*g[e+2],k<T&&i[T]>i[k]&&(n.uniforms.dataAxis=c,n.uniforms.screenOffset=u,n.uniforms.color=m[e+2],n.uniforms.angle=v[e+2],o.drawArrays(o.TRIANGLES,i[k],i[T]-i[k]))),y[e+2]&&A&&(u[1^e]+=S*f*b[e+2],n.uniforms.dataAxis=h,n.uniforms.screenOffset=u,n.uniforms.color=_[e+2],n.uniforms.angle=x[e+2],o.drawArrays(o.TRIANGLES,w,A))}),g.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var n=this.plot,r=this.shader,i=n.gl,o=n.screenBox,a=n.titleCenter,s=n.titleAngle,l=n.titleColor,c=n.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)t[u]=2*(a[u]*c-o[u])/(o[2+u]-o[u])-1;r.bind(),r.uniforms.dataAxis=e,r.uniforms.screenOffset=t,r.uniforms.angle=s,r.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(d=[0,0],f=[0,0],p=[0,0],function(){var e=this.plot,t=this.shader,n=e._tickBounds,r=e.dataBox,i=e.screenBox,o=e.viewBox;t.bind();for(var a=0;a<2;++a){var s=n[a],l=n[a+2]-s,c=.5*(r[a+2]+r[a]),u=r[a+2]-r[a],h=o[a],g=o[a+2]-h,m=i[a],v=i[a+2]-m;f[a]=2*l/u*g/v,d[a]=2*(s-c)/u*g/v}p[1]=2*e.pixelRatio/(i[3]-i[1]),p[0]=p[1]*(i[3]-i[1])/(i[2]-i[0]),t.uniforms.dataScale=f,t.uniforms.dataShift=d,t.uniforms.textScale=p,this.vbo.bind(),t.attributes.textCoordinate.pointer()}),g.update=function(e){var t,n,r,i,a,s=[],l=e.ticks,c=e.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],h=[-1/0],d=l[a];for(t=0;t<d.length;++t){var f=d[t],p=f.x,g=f.text,m=f.font||"sans-serif";i=f.fontSize||12;for(var v=1/(c[a+2]-c[a]),y=c[a],b=g.split("\n"),_=0;_<b.length;_++)for(r=o(m,b[_]).data,n=0;n<r.length;n+=2)s.push(r[n]*i,-r[n+1]*i-_*i*1.2,(p-y)*v);u.push(Math.floor(s.length/3)),h.push(p)}this.tickOffset[a]=u,this.tickX[a]=h}for(a=0;a<2;++a){for(this.labelOffset[a]=Math.floor(s.length/3),r=o(e.labelFont[a],e.labels[a],{textAlign:"center"}).data,i=e.labelSize[a],t=0;t<r.length;t+=2)s.push(r[t]*i,-r[t+1]*i,0);this.labelCount[a]=Math.floor(s.length/3)-this.labelOffset[a]}for(this.titleOffset=Math.floor(s.length/3),r=o(e.titleFont,e.title).data,i=e.titleSize,t=0;t<r.length;t+=2)s.push(r[t]*i,-r[t+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},g.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":116,"binary-search-bounds":31,"gl-buffer":78,"gl-shader":132,"text-cache":303}],118:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl,n=new l(t,r(t,[t.drawingBufferWidth,t.drawingBufferHeight]));return n.grid=i(n),n.text=o(n),n.line=a(n),n.box=s(n),n.update(e),n};var r=e("gl-select-static"),i=e("./lib/grid"),o=e("./lib/text"),a=e("./lib/line"),s=e("./lib/box");function l(e,t){this.gl=e,this.pickBuffer=t,this.screenBox=[0,0,e.drawingBufferWidth,e.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(e){for(var t=e.slice(),n=0;n<t.length;++n)t[n]=t[n].slice();return t}function h(e,t){return e.x-t.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var e=this.gl,t=this.screenBox,n=this.viewBox,r=this.dataBox,i=this.pixelRatio,o=this.grid,a=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,e.bindFramebuffer(e.FRAMEBUFFER,null),e.enable(e.SCISSOR_TEST),e.disable(e.DEPTH_TEST),e.depthFunc(e.LESS),e.depthMask(!1),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD,e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this.borderColor){e.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]);var c=this.borderColor;e.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}e.scissor(n[0],n[1],n[2]-n[0],n[3]-n[1]),e.viewport(n[0],n[1],n[2]-n[0],n[3]-n[1]);var u=this.backgroundColor;e.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),e.clear(e.COLOR_BUFFER_BIT),o.draw();var h=this.zeroLineEnable,d=this.zeroLineColor,f=this.zeroLineWidth;if(h[0]||h[1]){a.bind();for(var p=0;p<2;++p)if(h[p]&&r[p]<=0&&r[p+2]>=0){var g=t[p]-r[p]*(t[p+2]-t[p])/(r[p+2]-r[p]);0===p?a.drawLine(g,t[1],g,t[3],f[p],d[p]):a.drawLine(t[0],g,t[2],g,f[p],d[p])}}for(p=0;p<l.length;++p)l[p].draw();e.viewport(t[0],t[1],t[2]-t[0],t[3]-t[1]),e.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.grid.drawTickMarks(),a.bind();var m=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;for(m[1]&&a.drawLine(n[0],n[1]-.5*v[1]*i,n[0],n[3]+.5*v[3]*i,v[1],y[1]),m[0]&&a.drawLine(n[0]-.5*v[0]*i,n[1],n[2]+.5*v[2]*i,n[1],v[0],y[0]),m[3]&&a.drawLine(n[2],n[1]-.5*v[1]*i,n[2],n[3]+.5*v[3]*i,v[3],y[3]),m[2]&&a.drawLine(n[0]-.5*v[0]*i,n[3],n[2]+.5*v[2]*i,n[3],v[2],y[2]),s.bind(),p=0;p<2;++p)s.drawTicks(p);this.titleEnable&&s.drawTitle();var b=this.overlays;for(p=0;p<b.length;++p)b[p].draw();e.disable(e.SCISSOR_TEST),e.disable(e.BLEND),e.depthMask(!0)}},c.drawPick=function(){if(!this.static){var e=this.pickBuffer;this.gl,this._pickTimeout=null,e.begin();for(var t=1,n=this.objects,r=0;r<n.length;++r)t=n[r].drawPick(t);e.end()}},c.pick=function(e,t){if(!this.static){var n=this.pixelRatio,r=this.pickPixelRatio,i=this.viewBox,o=0|Math.round((e-i[0]/n)*r),a=0|Math.round((t-i[1]/n)*r),s=this.pickBuffer.query(o,a,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var h=c[u].pick(o,a,l);if(h)return h}return null}},c.setScreenBox=function(e){var t=this.screenBox,n=this.pixelRatio;t[0]=0|Math.round(e[0]*n),t[1]=0|Math.round(e[1]*n),t[2]=0|Math.round(e[2]*n),t[3]=0|Math.round(e[3]*n),this.setDirty()},c.setDataBox=function(e){var t=this.dataBox;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3])&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this.setDirty())},c.setViewBox=function(e){var t=this.pixelRatio,n=this.viewBox;n[0]=0|Math.round(e[0]*t),n[1]=0|Math.round(e[1]*t),n[2]=0|Math.round(e[2]*t),n[3]=0|Math.round(e[3]*t);var r=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((e[2]-e[0])*r),0|Math.round((e[3]-e[1])*r)],this.setDirty()},c.update=function(e){e=e||{};var t=this.gl;this.pixelRatio=e.pixelRatio||1;var n=this.pixelRatio;this.pickPixelRatio=Math.max(n,1),this.setScreenBox(e.screenBox||[0,0,t.drawingBufferWidth/n,t.drawingBufferHeight/n]),this.screenBox,this.setViewBox(e.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/n,.125*(this.screenBox[3]-this.screenBox[1])/n,.875*(this.screenBox[2]-this.screenBox[0])/n,.875*(this.screenBox[3]-this.screenBox[1])/n]);var r=this.viewBox,i=(r[2]-r[0])/(r[3]-r[1]);this.setDataBox(e.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==e.borderColor&&(e.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(e.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(e.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(e.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(e.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(e.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(e.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(e.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(e.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(e.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(e.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(e.titleCenter||[.5*(r[0]+r[2])/n,(r[3]+120)/n]).slice(),this.titleEnable=!("titleEnable"in e)||!!e.titleEnable,this.titleAngle=e.titleAngle||0,this.titleColor=(e.titleColor||[0,0,0,1]).slice(),this.labelPad=(e.labelPad||[15,15,15,15]).slice(),this.labelAngle=(e.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(e.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(e.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(e.tickPad||[15,15,15,15]).slice(),this.tickAngle=(e.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(e.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(e.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(e.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(e.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(e.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var o=e.ticks||[[],[]],a=this._tickBounds;a[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(var s=0;s<2;++s){var l=o[s].slice(0);0!==l.length&&(l.sort(h),a[s]=Math.min(a[s],l[0].x),a[s+2]=Math.max(a[s+2],l[l.length-1].x))}this.grid.update({bounds:a,ticks:o}),this.text.update({bounds:a,ticks:o,labels:e.labels||["x","y"],labelSize:e.labelSize||[12,12],labelFont:e.labelFont||["sans-serif","sans-serif"],title:e.title||"",titleSize:e.titleSize||18,titleFont:e.titleFont||"sans-serif"}),this.static=!!e.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var e=this.objects.length-1;e>=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},c.removeObject=function(e){for(var t=this.objects,n=0;n<t.length;++n)if(t[n]===e){t.splice(n,1),this.setDirty();break}},c.addOverlay=function(e){this.overlays.indexOf(e)<0&&(this.overlays.push(e),this.setOverlayDirty())},c.removeOverlay=function(e){for(var t=this.overlays,n=0;n<t.length;++n)if(t[n]===e){t.splice(n,1),this.setOverlayDirty();break}}},{"./lib/box":113,"./lib/grid":114,"./lib/line":115,"./lib/text":117,"gl-select-static":131}],119:[function(e,t,n){"use strict";t.exports=function(e,t){e=e||document.body;var n=[.01,1/0];"distanceLimits"in(t=t||{})&&(n[0]=t.distanceLimits[0],n[1]=t.distanceLimits[1]),"zoomMin"in t&&(n[0]=t.zoomMin),"zoomMax"in t&&(n[1]=t.zoomMax);var c=i({center:t.center||[0,0,0],up:t.up||[0,1,0],eye:t.eye||[0,0,10],mode:t.mode||"orbit",distanceLimits:n}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=0,d=e.clientWidth,f=e.clientHeight,p={keyBindingMode:"rotate",enableWheel:!0,view:c,element:e,delay:t.delay||16,rotateSpeed:t.rotateSpeed||1,zoomSpeed:t.zoomSpeed||1,translateSpeed:t.translateSpeed||1,flipX:!!t.flipX,flipY:!!t.flipY,modes:c.modes,_ortho:t._ortho||t.projection&&"orthographic"===t.projection.type||!1,tick:function(){var t=r(),n=this.delay,i=t-2*n;c.idle(t-n),c.recalcMatrix(i),c.flush(t-(100+2*n));for(var o=!0,a=c.computedMatrix,s=0;s<16;++s)o=o&&u[s]===a[s],u[s]=a[s];var l=e.clientWidth===d&&e.clientHeight===f;return d=e.clientWidth,f=e.clientHeight,o?!l:(h=Math.exp(c.computedRadius[0]),!0)},lookAt:function(e,t,n){c.lookAt(c.lastT(),e,t,n)},rotate:function(e,t,n){c.rotate(c.lastT(),e,t,n)},pan:function(e,t,n){c.pan(c.lastT(),e,t,n)},translate:function(e,t,n){c.translate(c.lastT(),e,t,n)}};return Object.defineProperties(p,{matrix:{get:function(){return c.computedMatrix},set:function(e){return c.setMatrix(c.lastT(),e),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(e){var t=c.computedUp.slice(),n=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(e),"turntable"===e){var o=r();c._active.lookAt(o,n,i,t),c._active.lookAt(o+500,n,i,[0,0,1]),c._active.flush(o)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(e){return c.lookAt(c.lastT(),null,e),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(e){return c.lookAt(c.lastT(),e),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(e){return c.lookAt(c.lastT(),null,null,e),c.computedUp},enumerable:!0},distance:{get:function(){return h},set:function(e){return c.setDistance(c.lastT(),e),e},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(n)},set:function(e){return c.setDistanceLimits(e),e},enumerable:!0}}),e.addEventListener("contextmenu",(function(e){return e.preventDefault(),!1})),p._lastX=-1,p._lastY=-1,p._lastMods={shift:!1,control:!1,alt:!1,meta:!1},p.enableMouseListeners=function(){function t(t,n,i,o){var a=p.keyBindingMode;if(!1!==a){var s="rotate"===a,l="pan"===a,u="zoom"===a,d=!!o.control,f=!!o.alt,g=!!o.shift,m=!!(1&t),v=!!(2&t),y=!!(4&t),b=1/e.clientHeight,_=b*(n-p._lastX),x=b*(i-p._lastY),w=p.flipX?1:-1,A=p.flipY?1:-1,k=Math.PI*p.rotateSpeed,T=r();if(-1!==p._lastX&&-1!==p._lastY&&((s&&m&&!d&&!f&&!g||m&&!d&&!f&&g)&&c.rotate(T,w*k*_,-A*k*x,0),(l&&m&&!d&&!f&&!g||v||m&&d&&!f&&!g)&&c.pan(T,-p.translateSpeed*_*h,p.translateSpeed*x*h,0),u&&m&&!d&&!f&&!g||y||m&&!d&&f&&!g)){var S=-p.zoomSpeed*x/window.innerHeight*(T-c.lastT())*100;c.pan(T,0,0,h*(Math.exp(S)-1))}return p._lastX=n,p._lastY=i,p._lastMods=o,!0}}p.mouseListener=o(e,t),e.addEventListener("touchstart",(function(n){var r=s(n.changedTouches[0],e);t(0,r[0],r[1],p._lastMods),t(1,r[0],r[1],p._lastMods)}),!!l&&{passive:!0}),e.addEventListener("touchmove",(function(n){var r=s(n.changedTouches[0],e);t(1,r[0],r[1],p._lastMods),n.preventDefault()}),!!l&&{passive:!1}),e.addEventListener("touchend",(function(e){t(0,p._lastX,p._lastY,p._lastMods)}),!!l&&{passive:!0}),p.wheelListener=a(e,(function(e,t){if(!1!==p.keyBindingMode&&p.enableWheel){var n=p.flipX?1:-1,i=p.flipY?1:-1,o=r();if(Math.abs(e)>Math.abs(t))c.rotate(o,0,0,-e*n*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*t/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,h*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var r=e("right-now"),i=e("3d-view"),o=e("mouse-change"),a=e("mouse-wheel"),s=e("mouse-event-offset"),l=e("has-passive-events")},{"3d-view":7,"has-passive-events":232,"mouse-change":247,"mouse-event-offset":248,"mouse-wheel":250,"right-now":278}],120:[function(e,t,n){var r=e("glslify"),i=e("gl-shader"),o=r(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),a=r(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(e){return i(e,o,a,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(e,t,n){"use strict";var r=e("./camera.js"),i=e("gl-axes3d"),o=e("gl-axes3d/properties"),a=e("gl-spikes3d"),s=e("gl-select-static"),l=e("gl-fbo"),c=e("a-big-triangle"),u=e("mouse-change"),h=e("gl-mat4/perspective"),d=e("gl-mat4/ortho"),f=e("./lib/shader"),p=e("is-mobile")({tablet:!0,featureDetect:!0});function g(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var n=Math.round(Math.pow(10,-t));return Math.ceil(e*n)/n}return t>0?(n=Math.round(Math.pow(10,t)),Math.ceil(e/n)*n):Math.ceil(e)}function v(e){return"boolean"!=typeof e||e}t.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var n=e.gl;if(n||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),n=function(e,t){var n=null;try{(n=e.getContext("webgl",t))||(n=e.getContext("experimental-webgl",t))}catch(e){return null}return n}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!n)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],b=new g,_=l(n,n.drawingBufferWidth,n.drawingBufferHeight,{preferFloat:!p}),x=f(n),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,A={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},k=e.axes||{},T=i(n,k);T.enable=!k.disable;var S=e.spikes||{},E=a(n,S),C=[],M=[],O=[],L=[],D=!0,I=!0,R={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},P=(I=!0,[n.drawingBufferWidth,n.drawingBufferHeight]),N=e.cameraObject||r(t,A),z={gl:n,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:b,camera:N,axes:T,axesPixels:null,spikes:E,bounds:y,objects:C,shape:P,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:v(e.autoResize),autoBounds:v(e.autoBounds),autoScale:!!e.autoScale,autoCenter:v(e.autoCenter),clipToBounds:v(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,I=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},F=[n.drawingBufferWidth/z.pixelRatio|0,n.drawingBufferHeight/z.pixelRatio|0];function B(){if(!z._stopped&&z.autoResize){var e=t.parentNode,n=1,r=1;e&&e!==document.body?(n=e.clientWidth,r=e.clientHeight):(n=window.innerWidth,r=window.innerHeight);var i=0|Math.ceil(n*z.pixelRatio),o=0|Math.ceil(r*z.pixelRatio);if(i!==t.width||o!==t.height){t.width=i,t.height=o;var a=t.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=n+"px",a.height=r+"px",D=!0}}}function j(){for(var e=C.length,t=L.length,r=0;r<t;++r)O[r]=0;e:for(r=0;r<e;++r){var i=C[r],o=i.pickSlots;if(o){for(var a=0;a<t;++a)if(O[a]+o<255){M[r]=a,i.setPickBase(O[a]+1),O[a]+=o;continue e}var l=s(n,P);M[r]=t,L.push(l),O.push(o),i.setPickBase(1),t+=1}else M[r]=-1}for(;t>0&&0===O[t-1];)O.pop(),L.pop().dispose()}function U(){if(z.contextLost)return!0;n.isContextLost()&&(z.contextLost=!0,z.mouseListener.enabled=!1,z.selection.object=null,z.oncontextloss&&z.oncontextloss())}z.autoResize&&B(),window.addEventListener("resize",B),z.update=function(e){z._stopped||(e=e||{},D=!0,I=!0)},z.add=function(e){z._stopped||(e.axes=T,C.push(e),M.push(-1),D=!0,I=!0,j())},z.remove=function(e){if(!z._stopped){var t=C.indexOf(e);t<0||(C.splice(t,1),M.pop(),D=!0,I=!0,j())}},z.dispose=function(){if(!z._stopped&&(z._stopped=!0,window.removeEventListener("resize",B),t.removeEventListener("webglcontextlost",U),z.mouseListener.enabled=!1,!z.contextLost)){T.dispose(),E.dispose();for(var e=0;e<C.length;++e)C[e].dispose();for(_.dispose(),e=0;e<L.length;++e)L[e].dispose();x.dispose(),n=null,T=null,E=null,C=[]}},z._mouseRotating=!1,z._prevButtons=0,z.enableMouseListeners=function(){z.mouseListener=u(t,(function(e,t,n){if(!z._stopped){var r=L.length,i=C.length,o=b.object;b.distance=1/0,b.mouse[0]=t,b.mouse[1]=n,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var a=!1;if(e&&z._prevButtons)z._mouseRotating=!0;else{z._mouseRotating&&(I=!0),z._mouseRotating=!1;for(var s=0;s<r;++s){var l=L[s].query(t,F[1]-n-1,z.pickRadius);if(l){if(l.distance>b.distance)continue;for(var c=0;c<i;++c){var u=C[c];if(M[c]===s){var h=u.pick(l);h&&(b.buttons=e,b.screen=l.coord,b.distance=l.distance,b.object=u,b.index=h.distance,b.dataPosition=h.position,b.dataCoordinate=h.dataCoordinate,b.data=h,a=!0)}}}}}o&&o!==b.object&&(o.highlight&&o.highlight(null),D=!0),b.object&&(b.object.highlight&&b.object.highlight(b.data),D=!0),(a=a||b.object!==o)&&z.onselect&&z.onselect(b),1&e&&!(1&z._prevButtons)&&z.onclick&&z.onclick(b),z._prevButtons=e}}))},t.addEventListener("webglcontextlost",U);var V=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],q=[V[0].slice(),V[1].slice()];function H(){if(!U()){B();var e=z.camera.tick();R.view=z.camera.matrix,D=D||e,I=I||e,T.pixelRatio=z.pixelRatio,E.pixelRatio=z.pixelRatio;var t=C.length,r=V[0],i=V[1];r[0]=r[1]=r[2]=1/0,i[0]=i[1]=i[2]=-1/0;for(var a=0;a<t;++a){(O=C[a]).pixelRatio=z.pixelRatio,O.axes=z.axes,D=D||!!O.dirty,I=I||!!O.dirty;var s=O.bounds;if(s)for(var l=s[0],u=s[1],f=0;f<3;++f)r[f]=Math.min(r[f],l[f]),i[f]=Math.max(i[f],u[f])}var p=z.bounds;if(z.autoBounds)for(f=0;f<3;++f){if(i[f]<r[f])r[f]=-1,i[f]=1;else{r[f]===i[f]&&(r[f]-=1,i[f]+=1);var g=.05*(i[f]-r[f]);r[f]=r[f]-g,i[f]=i[f]+g}p[0][f]=r[f],p[1][f]=i[f]}var v=!1;for(f=0;f<3;++f)v=v||q[0][f]!==p[0][f]||q[1][f]!==p[1][f],q[0][f]=p[0][f],q[1][f]=p[1][f];if(I=I||v,D=D||v){if(v){var y=[0,0,0];for(a=0;a<3;++a)y[a]=m((p[1][a]-p[0][a])/10);T.autoTicks?T.update({bounds:p,tickSpacing:y}):T.update({bounds:p})}var A=n.drawingBufferWidth,k=n.drawingBufferHeight;for(P[0]=A,P[1]=k,F[0]=0|Math.max(A/z.pixelRatio,1),F[1]=0|Math.max(k/z.pixelRatio,1),function(e,t){var n=e.bounds,r=e.cameraParams,i=r.projection,o=r.model,a=e.gl.drawingBufferWidth,s=e.gl.drawingBufferHeight,l=e.zNear,c=e.zFar,u=e.fovy,f=a/s;t?(d(i,-f,f,-1,1,l,c),r._ortho=!0):(h(i,u,f,l,c),r._ortho=!1);for(var p=0;p<16;++p)o[p]=0;o[15]=1;var g=0;for(p=0;p<3;++p)g=Math.max(g,n[1][p]-n[0][p]);for(p=0;p<3;++p)e.autoScale?o[5*p]=e.aspect[p]/(n[1][p]-n[0][p]):o[5*p]=1/g,e.autoCenter&&(o[12+p]=.5*-o[5*p]*(n[0][p]+n[1][p]))}(z,w),a=0;a<t;++a)(O=C[a]).axesBounds=p,z.clipToBounds&&(O.clipBounds=p);b.object&&(z.snapToData?E.position=b.dataCoordinate:E.position=b.dataPosition,E.bounds=p),I&&(I=!1,function(){if(!U()){n.colorMask(!0,!0,!0,!0),n.depthMask(!0),n.disable(n.BLEND),n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL);for(var e=C.length,t=L.length,r=0;r<t;++r){var i=L[r];i.shape=F,i.begin();for(var o=0;o<e;++o)if(M[o]===r){var a=C[o];a.drawPick&&(a.pixelRatio=1,a.drawPick(R))}i.end()}}}()),z.axesPixels=o(z.axes,R,A,k),z.onrender&&z.onrender(),n.bindFramebuffer(n.FRAMEBUFFER,null),n.viewport(0,0,A,k),z.clearRGBA(),n.depthMask(!0),n.colorMask(!0,!0,!0,!0),n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL),n.disable(n.BLEND),n.disable(n.CULL_FACE);var S=!1;for(T.enable&&(S=S||T.isTransparent(),T.draw(R)),E.axes=T,b.object&&E.draw(R),n.disable(n.CULL_FACE),a=0;a<t;++a)(O=C[a]).axes=T,O.pixelRatio=z.pixelRatio,O.isOpaque&&O.isOpaque()&&O.draw(R),O.isTransparent&&O.isTransparent()&&(S=!0);if(S){for(_.shape=P,_.bind(),n.clear(n.DEPTH_BUFFER_BIT),n.colorMask(!1,!1,!1,!1),n.depthMask(!0),n.depthFunc(n.LESS),T.enable&&T.isTransparent()&&T.drawTransparent(R),a=0;a<t;++a)(O=C[a]).isOpaque&&O.isOpaque()&&O.draw(R);for(n.enable(n.BLEND),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.colorMask(!0,!0,!0,!0),n.depthMask(!1),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),T.isTransparent()&&T.drawTransparent(R),a=0;a<t;++a){var O;(O=C[a]).isTransparent&&O.isTransparent()&&O.drawTransparent(R)}n.bindFramebuffer(n.FRAMEBUFFER,null),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.disable(n.DEPTH_TEST),x.bind(),_.color[0].bind(0),x.uniforms.accumBuffer=0,c(n),n.disable(n.BLEND)}for(D=!1,a=0;a<t;++a)C[a].dirty=!1}}}return z.enableMouseListeners(),function e(){z._stopped||z.contextLost||(H(),requestAnimationFrame(e))}(),z.redraw=function(){z._stopped||(D=!0,H())},z},createCamera:r}},{"./camera.js":119,"./lib/shader":120,"a-big-triangle":8,"gl-axes3d":70,"gl-axes3d/properties":77,"gl-fbo":86,"gl-mat4/ortho":101,"gl-mat4/perspective":102,"gl-select-static":131,"gl-spikes3d":141,"is-mobile":238,"mouse-change":247}],122:[function(e,t,n){var r=e("glslify");n.pointVertex=r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float d = dot(co.xy, vec2(a, b));\n highp float e = mod(d, 3.14);\n return fract(sin(e) * c);\n}\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n // if we don't jitter the point size a bit, overall point cloud\n // saturation 'jumps' on zooming, which is disturbing and confusing\n gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n if(pointCloud != 0.0) { // pointCloud is truthy\n // get the same square surface as circle would be\n gl_PointSize *= 0.886;\n }\n}"]),n.pointFragment=r(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\nuniform float pointCloud;\n\nvoid main() {\n float radius;\n vec4 baseColor;\n if(pointCloud != 0.0) { // pointCloud is truthy\n if(centerFraction == 1.0) {\n gl_FragColor = color;\n } else {\n gl_FragColor = mix(borderColor, color, centerFraction);\n }\n } else {\n radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),n.pickVertex=r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),n.pickFragment=r(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:231}],123:[function(e,t,n){"use strict";var r=e("gl-shader"),i=e("gl-buffer"),o=e("typedarray-pool"),a=e("./lib/shader");function s(e,t,n,r,i){this.plot=e,this.offsetBuffer=t,this.pickBuffer=n,this.shader=r,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(e,t){var n=e.gl,o=new s(e,i(n),i(n),r(n,a.pointVertex,a.pointFragment),r(n,a.pickVertex,a.pickFragment));return o.update(t),e.addObject(o),o};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(e){var t;function n(t,n){return t in e?e[t]:n}e=e||{},this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var r=e.positions.length>>>1,i=e.positions instanceof Float32Array,a=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=r,s=e.positions,l=i?s:o.mallocFloat32(s.length),c=a?e.idToIndex:o.mallocInt32(r);if(i||l.set(s),!a)for(l.set(s),t=0;t<r;t++)c[t]=t;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||o.free(l),a||o.free(c),this.pointCount=r,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(e){var t=void 0!==e,n=t?this.pickShader:this.shader,r=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return e;var o=i[2]-i[0],a=i[3]-i[1],s=function(e,t){var n,r=0,i=e.length>>>1;for(n=0;n<i;n++){var o=e[2*n],a=e[2*n+1];o>=t[0]&&o<=t[2]&&a>=t[1]&&a<=t[3]&&r++}return r}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/o,l[4]=2/a,l[6]=-2*i[0]/o-1,l[7]=-2*i[1]/a-1,this.offsetBuffer.bind(),n.bind(),n.attributes.position.pointer(),n.uniforms.matrix=l,n.uniforms.color=this.color,n.uniforms.borderColor=this.borderColor,n.uniforms.pointCloud=u<5,n.uniforms.pointSize=u,n.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),t&&(c[0]=255&e,c[1]=e>>8&255,c[2]=e>>16&255,c[3]=e>>24&255,this.pickBuffer.bind(),n.attributes.pickId.pointer(r.UNSIGNED_BYTE),n.uniforms.pickOffset=c,this.pickOffset=e);var h=r.getParameter(r.BLEND),d=r.getParameter(r.DITHER);return h&&!this.blend&&r.disable(r.BLEND),d&&r.disable(r.DITHER),r.drawArrays(r.POINTS,0,this.pointCount),h&&!this.blend&&r.enable(r.BLEND),d&&r.enable(r.DITHER),e+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(e,t,n){var r=this.pickOffset,i=this.pointCount;if(n<r||n>=r+i)return null;var o=n-r,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(e,t,n){t.exports=function(e,t,n,r){var i,o,a,s,l,c=t[0],u=t[1],h=t[2],d=t[3],f=n[0],p=n[1],g=n[2],m=n[3];return(o=c*f+u*p+h*g+d*m)<0&&(o=-o,f=-f,p=-p,g=-g,m=-m),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,l=Math.sin(r*i)/a):(s=1-r,l=r),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*g,e[3]=s*d+l*m,e}},{}],125:[function(e,t,n){"use strict";t.exports=function(e){return e||0===e?e.toString():""}},{}],126:[function(e,t,n){"use strict";var r=e("vectorize-text");t.exports=function(e,t,n){var o=i[t];if(o||(o=i[t]={}),e in o)return o[e];var a={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=r(e,a);a.triangles=!1;var l,c,u=r(e,a);if(n&&1!==n){for(l=0;l<s.positions.length;++l)for(c=0;c<s.positions[l].length;++c)s.positions[l][c]/=n;for(l=0;l<u.positions.length;++l)for(c=0;c<u.positions[l].length;++c)u.positions[l][c]/=n}var h=[[1/0,1/0],[-1/0,-1/0]],d=u.positions.length;for(l=0;l<d;++l){var f=u.positions[l];for(c=0;c<2;++c)h[0][c]=Math.min(h[0][c],f[c]),h[1][c]=Math.max(h[1][c],f[c])}return o[e]=[s,u,h]};var i={}},{"vectorize-text":311}],127:[function(e,t,n){var r=e("gl-shader"),i=e("glslify"),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:o,fragment:l,attributes:u},d={vertex:a,fragment:l,attributes:u},f={vertex:s,fragment:l,attributes:u},p={vertex:o,fragment:c,attributes:u},g={vertex:a,fragment:c,attributes:u},m={vertex:s,fragment:c,attributes:u};function v(e,t){var n=r(e,t),i=n.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,n}n.createPerspective=function(e){return v(e,h)},n.createOrtho=function(e){return v(e,d)},n.createProject=function(e){return v(e,f)},n.createPickPerspective=function(e){return v(e,p)},n.createPickOrtho=function(e){return v(e,g)},n.createPickProject=function(e){return v(e,m)}},{"gl-shader":132,glslify:231}],128:[function(e,t,n){"use strict";var r=e("is-string-blank"),i=e("gl-buffer"),o=e("gl-vao"),a=e("typedarray-pool"),s=e("gl-mat4/multiply"),l=e("./lib/shaders"),c=e("./lib/glyphs"),u=e("./lib/get-simple-string"),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];return e[0]=t[0]*n+t[4]*r+t[8]*i+t[12]*o,e[1]=t[1]*n+t[5]*r+t[9]*i+t[13]*o,e[2]=t[2]*n+t[6]*r+t[10]*i+t[14]*o,e[3]=t[3]*n+t[7]*r+t[11]*i+t[15]*o,e}function f(e,t,n,r){return d(r,r),d(r,r),d(r,r)}function p(e,t){this.index=e,this.dataCoordinate=this.position=t}function g(e){return!0===e||e>1?1:e}function m(e,t,n,r,i,o,a,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=n,this.projectShader=r,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new p(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(e){var t=e.gl,n=l.createPerspective(t),r=l.createOrtho(t),a=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=i(t),d=i(t),f=i(t),p=i(t),g=new m(t,n,r,a,h,d,f,p,o(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:d,size:4,type:t.FLOAT},{buffer:f,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),s,c,u);return g.update(e),g};var v=m.prototype;v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],b=[0,0,0],_=[0,0,0],x=[0,0,0,1],w=[0,0,0,1],A=h.slice(),k=[0,0,0],T=[[0,0,0],[0,0,0]];function S(e){return e[0]=e[1]=e[2]=0,e}function E(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function C(e,t,n,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[n]=r,e}function M(e,t,n,r){var i,o=t.axesProject,a=t.gl,l=e.uniforms,c=n.model||h,u=n.view||h,d=n.projection||h,p=t.axesBounds,g=function(e){for(var t=T,n=0;n<2;++n)for(var r=0;r<3;++r)t[n][r]=Math.max(Math.min(e[n][r],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],y[0]=2/a.drawingBufferWidth,y[1]=2/a.drawingBufferHeight,e.bind(),l.view=u,l.projection=d,l.screenSize=y,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=g,l.pickGroup=t.pickId/255,l.pixelRatio=r;for(var m=0;m<3;++m)if(o[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var v=A,M=0;M<16;++M)v[M]=0;for(M=0;M<4;++M)v[5*M]=1;v[5*m]=0,i[m]<0?v[12+m]=p[0][m]:v[12+m]=p[1][m],s(v,c,v),l.model=v;var O=(m+1)%3,L=(m+2)%3,D=S(b),I=S(_);D[O]=1,I[L]=1;var R=f(0,0,0,E(x,D)),P=f(0,0,0,E(w,I));if(Math.abs(R[1])>Math.abs(P[1])){var N=R;R=P,P=N,N=D,D=I,I=N;var z=O;O=L,L=z}R[0]<0&&(D[O]=-1),P[1]>0&&(I[L]=-1);var F=0,B=0;for(M=0;M<4;++M)F+=Math.pow(c[4*O+M],2),B+=Math.pow(c[4*L+M],2);D[O]/=Math.sqrt(F),I[L]/=Math.sqrt(B),l.axes[0]=D,l.axes[1]=I,l.fragClipBounds[0]=C(k,g[0],m,-1e8),l.fragClipBounds[1]=C(k,g[1],m,1e8),t.vao.bind(),t.vao.draw(a.TRIANGLES,t.vertexCount),t.lineWidth>0&&(a.lineWidth(t.lineWidth*r),t.vao.draw(a.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var O=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function L(e,t,n,r,i,o,a){var s=n.gl;if((o===n.projectHasAlpha||a)&&M(t,n,r,i),o===n.hasAlpha||a){e.bind();var l=e.uniforms;l.model=r.model||h,l.view=r.view||h,l.projection=r.projection||h,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=n.highlightId,l.highlightScale=n.highlightScale,l.fragClipBounds=O,l.clipBounds=n.axes.bounds,l.opacity=n.opacity,l.pickGroup=n.pickId/255,l.pixelRatio=i,n.vao.bind(),n.vao.draw(s.TRIANGLES,n.vertexCount),n.lineWidth>0&&(s.lineWidth(n.lineWidth*i),n.vao.draw(s.LINES,n.lineVertexCount,n.vertexCount)),n.vao.unbind()}}function D(e,t,n,i){var o;o=Array.isArray(e)?t<e.length?e[t]:void 0:e,o=u(o);var a=!0;r(o)&&(o="",a=!1);var s=c(o,n,i);return{mesh:s[0],lines:s[1],bounds:s[2],visible:a}}v.draw=function(e){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,e,this.pixelRatio,!1,!1)},v.drawTransparent=function(e){L(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,e,this.pixelRatio,!0,!1)},v.drawPick=function(e){L(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,e,1,!0,!0)},v.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[2]+(e.value[1]<<8)+(e.value[0]<<16);if(t>=this.pointCount||t<0)return null;var n=this.points[t],r=this._selectResult;r.index=t;for(var i=0;i<3;++i)r.position[i]=r.dataCoordinate[i]=n[i];return r},v.highlight=function(e){if(e){var t=e.index,n=255&t,r=t>>8&255,i=t>>16&255;this.highlightId=[n/255,r/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var n=+e.projectScale;this.projectScale=[n,n,n]}if(this.projectHasAlpha=!1,"projectOpacity"in e){Array.isArray(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(n=+e.projectOpacity,this.projectOpacity=[n,n,n]);for(var r=0;r<3;++r)this.projectOpacity[r]=g(this.projectOpacity[r]),this.projectOpacity[r]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=g(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=e.position,l=e.font||"normal",c=e.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],r=0;r<c.length;++r)i[r]=c[r][0],o[r]=c[r][1];var u=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0],d=e.glyph,f=e.color,p=e.size,m=e.angle,v=e.lineColor,y=-1,b=0,_=0,x=0;if(s.length){x=s.length;e:for(r=0;r<x;++r){for(var w=s[r],A=0;A<3;++A)if(isNaN(w[A])||!isFinite(w[A]))continue e;var k=(B=D(d,r,l,this.pixelRatio)).mesh,T=B.lines,S=B.bounds;b+=3*k.cells.length,_+=2*T.edges.length}}var E=b+_,C=a.mallocFloat(3*E),M=a.mallocFloat(4*E),O=a.mallocFloat(2*E),L=a.mallocUint32(E);if(E>0){var I=0,R=b,P=[0,0,0,1],N=[0,0,0,1],z=Array.isArray(f)&&Array.isArray(f[0]),F=Array.isArray(v)&&Array.isArray(v[0]);e:for(r=0;r<x;++r){for(y+=1,w=s[r],A=0;A<3;++A){if(isNaN(w[A])||!isFinite(w[A]))continue e;h[A]=Math.max(h[A],w[A]),u[A]=Math.min(u[A],w[A])}k=(B=D(d,r,l,this.pixelRatio)).mesh,T=B.lines,S=B.bounds;var B,j=B.visible;if(j)if(Array.isArray(f)){if(3===(U=z?r<f.length?f[r]:[0,0,0,0]:f).length){for(A=0;A<3;++A)P[A]=U[A];P[3]=1}else if(4===U.length){for(A=0;A<4;++A)P[A]=U[A];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else P[0]=P[1]=P[2]=0,P[3]=1;else P=[1,1,1,0];if(j)if(Array.isArray(v)){var U;if(3===(U=F?r<v.length?v[r]:[0,0,0,0]:v).length){for(A=0;A<3;++A)N[A]=U[A];N[A]=1}else if(4===U.length){for(A=0;A<4;++A)N[A]=U[A];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else N[0]=N[1]=N[2]=0,N[3]=1;else N=[1,1,1,0];var V=.5;j?Array.isArray(p)?V=r<p.length?+p[r]:12:p?V=+p:this.useOrtho&&(V=12):V=0;var q=0;Array.isArray(m)?q=r<m.length?+m[r]:0:m&&(q=+m);var H=Math.cos(q),$=Math.sin(q);for(w=s[r],A=0;A<3;++A)h[A]=Math.max(h[A],w[A]),u[A]=Math.min(u[A],w[A]);var W=i,G=o;W=0,Array.isArray(i)?W=r<i.length?i[r]:0:i&&(W=i),G=0,Array.isArray(o)?G=r<o.length?o[r]:0:o&&(G=o);var Y=[W*=W>0?1-S[0][0]:W<0?1+S[1][0]:1,G*=G>0?1-S[0][1]:G<0?1+S[1][1]:1],X=k.cells||[],Z=k.positions||[];for(A=0;A<X.length;++A)for(var K=X[A],J=0;J<3;++J){for(var Q=0;Q<3;++Q)C[3*I+Q]=w[Q];for(Q=0;Q<4;++Q)M[4*I+Q]=P[Q];L[I]=y;var ee=Z[K[J]];O[2*I]=V*(H*ee[0]-$*ee[1]+Y[0]),O[2*I+1]=V*($*ee[0]+H*ee[1]+Y[1]),I+=1}for(X=T.edges,Z=T.positions,A=0;A<X.length;++A)for(K=X[A],J=0;J<2;++J){for(Q=0;Q<3;++Q)C[3*R+Q]=w[Q];for(Q=0;Q<4;++Q)M[4*R+Q]=N[Q];L[R]=y,ee=Z[K[J]],O[2*R]=V*(H*ee[0]-$*ee[1]+Y[0]),O[2*R+1]=V*($*ee[0]+H*ee[1]+Y[1]),R+=1}}}this.bounds=[u,h],this.points=s,this.pointCount=s.length,this.vertexCount=b,this.lineVertexCount=_,this.pointBuffer.update(C),this.colorBuffer.update(M),this.glyphBuffer.update(O),this.idBuffer.update(L),a.free(C),a.free(M),a.free(O),a.free(L)},v.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{"./lib/get-simple-string":125,"./lib/glyphs":126,"./lib/shaders":127,"gl-buffer":78,"gl-mat4/multiply":100,"gl-vao":150,"is-string-blank":239,"typedarray-pool":308}],129:[function(e,t,n){"use strict";var r=e("glslify");n.boxVertex=r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n"]),n.boxFragment=r(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = color;\n}\n"])},{glslify:231}],130:[function(e,t,n){"use strict";var r=e("gl-shader"),i=e("gl-buffer"),o=e("./lib/shaders");function a(e,t,n){this.plot=e,this.boxBuffer=t,this.boxShader=n,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}t.exports=function(e,t){var n=e.gl,s=new a(e,i(n,[0,0,0,1,1,0,1,1]),r(n,o.boxVertex,o.boxFragment));return s.update(t),e.addOverlay(s),s};var s=a.prototype;s.draw=function(){if(this.enabled){var e=this.plot,t=this.selectBox,n=this.borderWidth,r=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),o=this.borderColor,a=e.box,s=e.screenBox,l=e.dataBox,c=e.viewBox,u=e.pixelRatio,h=(t[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],d=(t[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],f=(t[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],p=(t[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(h=Math.max(h,c[0]),d=Math.max(d,c[1]),f=Math.min(f,c[2]),p=Math.min(p,c[3]),!(f<h||p<d)){a.bind();var g=s[2]-s[0],m=s[3]-s[1];if(this.outerFill&&(a.drawBox(0,0,g,d,i),a.drawBox(0,d,h,p,i),a.drawBox(0,p,g,m,i),a.drawBox(f,d,g,p,i)),this.innerFill&&a.drawBox(h,d,f,p,r),n>0){var v=n*u;a.drawBox(h-v,d-v,f+v,d+v,o),a.drawBox(h-v,p-v,f+v,p+v,o),a.drawBox(h-v,d-v,h+v,p+v,o),a.drawBox(f-v,d-v,f+v,p+v,o)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":129,"gl-buffer":78,"gl-shader":132}],131:[function(e,t,n){"use strict";t.exports=function(e,t){var n=t[0],o=t[1];return new l(e,r(e,n,o,{}),i.mallocUint8(n*o*4))};var r=e("gl-fbo"),i=e("typedarray-pool"),o=e("ndarray"),a=e("bit-twiddle").nextPow2;function s(e,t,n,r,i){this.coord=[e,t],this.id=n,this.value=r,this.distance=i}function l(e,t,n){this.gl=e,this.fbo=t,this.buffer=n,this._readTimeout=null;var r=this;this._readCallback=function(){r.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,r.buffer),r._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],n=this.fbo.shape[1];if(n*t*4>this.buffer.length){i.free(this.buffer);for(var r=this.buffer=i.mallocUint8(a(n*t*4)),o=0;o<n*t*4;++o)r[o]=255}return e}}}),c.begin=function(){var e=this.gl;this.shape,e&&(this.fbo.bind(),e.clearColor(1,1,1,1),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT))},c.end=function(){var e=this.gl;e&&(e.bindFramebuffer(e.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},c.query=function(e,t,n){if(!this.gl)return null;var r=this.fbo.shape.slice();e|=0,t|=0,"number"!=typeof n&&(n=1);var i=0|Math.min(Math.max(e-n,0),r[0]),a=0|Math.min(Math.max(e+n,0),r[0]),l=0|Math.min(Math.max(t-n,0),r[1]),c=0|Math.min(Math.max(t+n,0),r[1]);if(a<=i||c<=l)return null;var u=[a-i,c-l],h=o(this.buffer,[u[0],u[1],4],[4,4*r[0],1],4*(i+r[0]*l)),d=function(e,t,n){for(var r=1e8,i=-1,o=-1,a=e.shape[0],s=e.shape[1],l=0;l<a;l++)for(var c=0;c<s;c++){var u=e.get(l,c,0),h=e.get(l,c,1),d=e.get(l,c,2),f=e.get(l,c,3);if(u<255||h<255||d<255||f<255){var p=t-l,g=n-c,m=p*p+g*g;m<r&&(r=m,i=l,o=c)}}return[i,o,r]}(h.hi(u[0],u[1],1),n,n),f=d[0],p=d[1];return f<0||Math.pow(this.radius,2)<d[2]?null:new s(f+i|0,p+l|0,h.get(f,p,0),[h.get(f,p,1),h.get(f,p,2),h.get(f,p,3)],Math.sqrt(d[2]))},c.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{"bit-twiddle":32,"gl-fbo":86,ndarray:259,"typedarray-pool":308}],132:[function(e,t,n){"use strict";var r=e("./lib/create-uniforms"),i=e("./lib/create-attributes"),o=e("./lib/reflect"),a=e("./lib/shader-cache"),s=e("./lib/runtime-reflect"),l=e("./lib/GLError");function c(e){this.gl=e,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function h(e,t){return e.name<t.name?-1:1}u.bind=function(){var e;this.program||this._relink();var t=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),n=this.gl.lastAttribCount;if(t>n)for(e=n;e<t;e++)this.gl.enableVertexAttribArray(e);else if(n>t)for(e=t;e<n;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=t,this.gl.useProgram(this.program)},u.dispose=function(){for(var e=this.gl.lastAttribCount,t=0;t<e;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(e,t,n,c){if(!t||1===arguments.length){var u=e;e=u.vertex,t=u.fragment,n=u.uniforms,c=u.attributes}var d=this,f=d.gl,p=d._vref;d._vref=a.shader(f,f.VERTEX_SHADER,e),p&&p.dispose(),d.vertShader=d._vref.shader;var g=this._fref;if(d._fref=a.shader(f,f.FRAGMENT_SHADER,t),g&&g.dispose(),d.fragShader=d._fref.shader,!n||!c){var m=f.createProgram();if(f.attachShader(m,d.fragShader),f.attachShader(m,d.vertShader),f.linkProgram(m),!f.getProgramParameter(m,f.LINK_STATUS)){var v=f.getProgramInfoLog(m);throw new l(v,"Error linking program:"+v)}n=n||s.uniforms(f,m),c=c||s.attributes(f,m),f.deleteProgram(m)}(c=c.slice()).sort(h);var y,b=[],_=[],x=[];for(y=0;y<c.length;++y){var w=c[y];if(w.type.indexOf("mat")>=0){for(var A=0|w.type.charAt(w.type.length-1),k=new Array(A),T=0;T<A;++T)k[T]=x.length,_.push(w.name+"["+T+"]"),"number"==typeof w.location?x.push(w.location+T):Array.isArray(w.location)&&w.location.length===A&&"number"==typeof w.location[T]?x.push(0|w.location[T]):x.push(-1);b.push({name:w.name,type:w.type,locations:k})}else b.push({name:w.name,type:w.type,locations:[x.length]}),_.push(w.name),"number"==typeof w.location?x.push(0|w.location):x.push(-1)}var S=0;for(y=0;y<x.length;++y)if(x[y]<0){for(;x.indexOf(S)>=0;)S+=1;x[y]=S}var E=new Array(n.length);function C(){d.program=a.program(f,d._vref,d._fref,_,x);for(var e=0;e<n.length;++e)E[e]=f.getUniformLocation(d.program,n[e].name)}C(),d._relink=C,d.types={uniforms:o(n),attributes:o(c)},d.attributes=i(f,d,b,x),Object.defineProperty(d,"uniforms",r(f,d,n,E))},t.exports=function(e,t,n,r,i){var o=new c(e);return o.update(t,n,r,i),o}},{"./lib/GLError":133,"./lib/create-attributes":134,"./lib/create-uniforms":135,"./lib/reflect":136,"./lib/runtime-reflect":137,"./lib/shader-cache":138}],133:[function(e,t,n){function r(e,t,n){this.shortMessage=t||"",this.longMessage=n||"",this.rawError=e||"",this.message="gl-shader: "+(t||e||"")+(n?"\n"+n:""),this.stack=(new Error).stack}r.prototype=new Error,r.prototype.name="GLError",r.prototype.constructor=r,t.exports=r},{}],134:[function(e,t,n){"use strict";t.exports=function(e,t,n,i){for(var o={},a=0,c=n.length;a<c;++a){var u=n[a],h=u.name,d=u.type,f=u.locations;switch(d){case"bool":case"int":case"float":s(e,t,f[0],i,1,o,h);break;default:if(d.indexOf("vec")>=0){if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new r("","Invalid data type for attribute "+h+": "+d);s(e,t,f[0],i,p,o,h)}else{if(!(d.indexOf("mat")>=0))throw new r("","Unknown data type for attribute "+h+": "+d);var p;if((p=d.charCodeAt(d.length-1)-48)<2||p>4)throw new r("","Invalid data type for attribute "+h+": "+d);l(e,t,f,i,p,o,h)}}}return o};var r=e("./GLError");function i(e,t,n,r,i,o){this._gl=e,this._wrapper=t,this._index=n,this._locations=r,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(e,t,n,r){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,e||o.FLOAT,!!t,n||0,r||0),o.enableVertexAttribArray(a)},o.set=function(e,t,n,r){return this._constFunc(this._locations[this._index],e,t,n,r)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var a=[function(e,t,n){return void 0===n.length?e.vertexAttrib1f(t,n):e.vertexAttrib1fv(t,n)},function(e,t,n,r){return void 0===n.length?e.vertexAttrib2f(t,n,r):e.vertexAttrib2fv(t,n)},function(e,t,n,r,i){return void 0===n.length?e.vertexAttrib3f(t,n,r,i):e.vertexAttrib3fv(t,n)},function(e,t,n,r,i,o){return void 0===n.length?e.vertexAttrib4f(t,n,r,i,o):e.vertexAttrib4fv(t,n)}];function s(e,t,n,r,o,s,l){var c=a[o],u=new i(e,t,n,r,o,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(r[n]),c(e,r[n],t),t},get:function(){return u},enumerable:!0})}function l(e,t,n,r,i,o,a){for(var l=new Array(i),c=new Array(i),u=0;u<i;++u)s(e,t,n[u],r,i,l,u),c[u]=l[u];Object.defineProperty(l,"location",{set:function(e){if(Array.isArray(e))for(var t=0;t<i;++t)c[t].location=e[t];else for(t=0;t<i;++t)c[t].location=e+t;return e},get:function(){for(var e=new Array(i),t=0;t<i;++t)e[t]=r[n[t]];return e},enumerable:!0}),l.pointer=function(t,o,a,s){t=t||e.FLOAT,o=!!o,a=a||i*i,s=s||0;for(var l=0;l<i;++l){var c=r[n[l]];e.vertexAttribPointer(c,i,t,o,a,s+l*i),e.enableVertexAttribArray(c)}};var h=new Array(i),d=e["vertexAttrib"+i+"fv"];Object.defineProperty(o,a,{set:function(t){for(var o=0;o<i;++o){var a=r[n[o]];if(e.disableVertexAttribArray(a),Array.isArray(t[0]))d.call(e,a,t[o]);else{for(var s=0;s<i;++s)h[s]=t[i*o+s];d.call(e,a,h)}}return t},get:function(){return l},enumerable:!0})}},{"./GLError":133}],135:[function(e,t,n){"use strict";var r=e("./reflect"),i=e("./GLError");function o(e){return function(){return e}}function a(e,t){for(var n=new Array(e),r=0;r<e;++r)n[r]=t;return n}t.exports=function(e,t,n,s){function l(t){return function(r){for(var o=c("",t),a=0;a<o.length;++a){var l=o[a],u=l[0],h=l[1];if(s[h]){var d=r;if("string"==typeof u&&(0===u.indexOf(".")||0===u.indexOf("["))){var f=u;if(0===u.indexOf(".")&&(f=u.slice(1)),f.indexOf("]")===f.length-1){var p=f.indexOf("["),g=f.slice(0,p),m=f.slice(p+1,f.length-1);d=g?r[g][m]:r[m]}else d=r[f]}var v,y=n[h].type;switch(y){case"bool":case"int":case"sampler2D":case"samplerCube":e.uniform1i(s[h],d);break;case"float":e.uniform1f(s[h],d);break;default:var b=y.indexOf("vec");if(!(0<=b&&b<=1&&y.length===4+b)){if(0===y.indexOf("mat")&&4===y.length){if((v=y.charCodeAt(y.length-1)-48)<2||v>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+v+"fv"](s[h],!1,d);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((v=y.charCodeAt(y.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+v+"iv"](s[h],d);break;case"v":e["uniform"+v+"fv"](s[h],d);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function c(e,t){if("object"!=typeof t)return[[e,t]];var n=[];for(var r in t){var i=t[r],o=e;parseInt(r)+""===r?o+="["+r+"]":o+="."+r,"object"==typeof i?n.push.apply(n,c(o,i)):n.push([o,i])}return n}function u(e,t,r){if("object"==typeof r){var c=h(r);Object.defineProperty(e,t,{get:o(c),set:l(r),enumerable:!0,configurable:!1})}else s[r]?Object.defineProperty(e,t,{get:(u=r,function(e,t,n){return e.getUniform(t.program,n[u])}),set:l(r),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((n=e.charCodeAt(e.length-1)-48)<2||n>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?a(n,!1):a(n,0)}if(0===e.indexOf("mat")&&4===e.length){var n;if((n=e.charCodeAt(e.length-1)-48)<2||n>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return a(n*n,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(n[r].type);var u}function h(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var n=0;n<e.length;++n)u(t,n,e[n])}else for(var r in t={},e)u(t,r,e[r]);return t}var d=r(n,!0);return{get:o(h(d)),set:l(d),enumerable:!0,configurable:!0}}},{"./GLError":133,"./reflect":136}],136:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n={},r=0;r<e.length;++r)for(var i=e[r].name.split("."),o=n,a=0;a<i.length;++a){var s=i[a].split("[");if(s.length>1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l<s.length;++l){var c=parseInt(s[l]);l<s.length-1||a<i.length-1?(c in o||(l<s.length-1?o[c]=[]:o[c]={}),o=o[c]):o[c]=t?r:e[r].type}}else a<i.length-1?(s[0]in o||(o[s[0]]={}),o=o[s[0]]):o[s[0]]=t?r:e[r].type}return n}},{}],137:[function(e,t,n){"use strict";n.uniforms=function(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),r=[],i=0;i<n;++i){var a=e.getActiveUniform(t,i);if(a){var s=o(e,a.type);if(a.size>1)for(var l=0;l<a.size;++l)r.push({name:a.name.replace("[0]","["+l+"]"),type:s});else r.push({name:a.name,type:s})}}return r},n.attributes=function(e,t){for(var n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),r=[],i=0;i<n;++i){var a=e.getActiveAttrib(t,i);a&&r.push({name:a.name,type:o(e,a.type)})}return r};var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},i=null;function o(e,t){if(!i){var n=Object.keys(r);i={};for(var o=0;o<n.length;++o){var a=n[o];i[e[a]]=r[a]}}return i[t]}},{}],138:[function(e,t,n){"use strict";n.shader=function(e,t,n){return u(e).getShaderReference(t,n)},n.program=function(e,t,n,r,i){return u(e).getProgram(t,n,r,i)};var r=e("./GLError"),i=e("gl-format-compiler-error"),o=new("undefined"==typeof WeakMap?e("weakmap-shim"):WeakMap),a=0;function s(e,t,n,r,i,o,a){this.id=e,this.src=t,this.type=n,this.shader=r,this.count=o,this.programs=[],this.cache=a}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,n=this.programs,r=0,i=n.length;r<i;++r){var o=e.programs[n[r]];o&&(delete e.programs[r],t.deleteProgram(o))}t.deleteShader(this.shader),delete e.shaders[this.type===t.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(e){var t=o.get(e);return t||(t=new l(e),o.set(e,t)),t}c.getShaderReference=function(e,t){var n=this.gl,o=this.shaders[e===n.FRAGMENT_SHADER|0],l=o[t];if(l&&n.isShader(l.shader))l.count+=1;else{var c=function(e,t,n){var o=e.createShader(t);if(e.shaderSource(o,n),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS)){var a=e.getShaderInfoLog(o);try{var s=i(a,n,t)}catch(e){throw console.warn("Failed to format compiler error: "+e),new r(a,"Error compiling shader:\n"+a)}throw new r(a,s.short,s.long)}return o}(n,e,t);l=o[t]=new s(a++,t,e,c,[],1,this)}return l},c.getProgram=function(e,t,n,i){var o=[e.id,t.id,n.join(":"),i.join(":")].join("@"),a=this.programs[o];return a&&this.gl.isProgram(a)||(this.programs[o]=a=function(e,t,n,i,o){var a=e.createProgram();e.attachShader(a,t),e.attachShader(a,n);for(var s=0;s<i.length;++s)e.bindAttribLocation(a,o[s],i[s]);if(e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var l=e.getProgramInfoLog(a);throw new r(l,"Error linking program: "+l)}return a}(this.gl,e.shader,t.shader,n,i),e.programs.push(o),t.programs.push(o)),a}},{"./GLError":133,"gl-format-compiler-error":87,"weakmap-shim":316}],139:[function(e,t,n){"use strict";function r(e){this.plot=e,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}t.exports=function(e,t){var n=new r(e);return n.update(t),e.addOverlay(n),n};var i=r.prototype;i.update=function(e){e=e||{},this.enable=(e.enable||[!0,!0,!1,!1]).slice(),this.width=(e.width||[1,1,1,1]).slice(),this.color=(e.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map((function(e){return e.slice()})),this.center=(e.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},i.draw=function(){var e=this.enable,t=this.width,n=this.color,r=this.center,i=this.plot,o=i.line,a=i.dataBox,s=i.viewBox;if(o.bind(),a[0]<=r[0]&&r[0]<=a[2]&&a[1]<=r[1]&&r[1]<=a[3]){var l=s[0]+(r[0]-a[0])/(a[2]-a[0])*(s[2]-s[0]),c=s[1]+(r[1]-a[1])/(a[3]-a[1])*(s[3]-s[1]);e[0]&&o.drawLine(l,c,s[0],c,t[0],n[0]),e[1]&&o.drawLine(l,c,l,s[1],t[1],n[1]),e[2]&&o.drawLine(l,c,s[2],c,t[2],n[2]),e[3]&&o.drawLine(l,c,l,s[3],t[3],n[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],140:[function(e,t,n){"use strict";var r=e("glslify"),i=e("gl-shader"),o=r(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n"]),a=r(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}"]);t.exports=function(e){return i(e,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":132,glslify:231}],141:[function(e,t,n){"use strict";var r=e("gl-buffer"),i=e("gl-vao"),o=e("./shaders/index");t.exports=function(e,t){var n=[];function a(e,t,r,i,o,a){var s=[e,t,r,0,0,0,1];s[i+3]=1,s[i]=o,n.push.apply(n,s),s[6]=-1,n.push.apply(n,s),s[i]=a,n.push.apply(n,s),n.push.apply(n,s),s[6]=1,n.push.apply(n,s),s[i]=o,n.push.apply(n,s)}a(0,0,0,0,0,1),a(0,0,0,1,0,1),a(0,0,0,2,0,1),a(1,0,0,1,-1,1),a(1,0,0,2,-1,1),a(0,1,0,0,-1,1),a(0,1,0,2,-1,1),a(0,0,1,0,-1,1),a(0,0,1,1,-1,1);var l=r(e,n),c=i(e,[{type:e.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:e.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:e.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=o(e);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var h=new s(e,l,c,u);return h.update(t),h};var a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,n,r){this.gl=e,this.buffer=t,this.vao=n,this.shader=r,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],h=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(e){},l.draw=function(e){var t=this.gl,n=this.vao,r=this.shader;n.bind(),r.bind();var i,o=e.model||a,s=e.view||a,l=e.projection||a;this.axes&&(i=this.axes.lastCubeProps.axis);for(var d=c,f=u,p=0;p<3;++p)i&&i[p]<0?(d[p]=this.bounds[0][p],f[p]=this.bounds[1][p]):(d[p]=this.bounds[1][p],f[p]=this.bounds[0][p]);for(h[0]=t.drawingBufferWidth,h[1]=t.drawingBufferHeight,r.uniforms.model=o,r.uniforms.view=s,r.uniforms.projection=l,r.uniforms.coordinates=[this.position,d,f],r.uniforms.colors=this.colors,r.uniforms.screenShape=h,p=0;p<3;++p)r.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(n.draw(t.TRIANGLES,6,6*p),this.drawSides[p]&&n.draw(t.TRIANGLES,12,18+12*p));n.unbind()},l.update=function(e){e&&("bounds"in e&&(this.bounds=e.bounds),"position"in e&&(this.position=e.position),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"colors"in e&&(this.colors=e.colors),"enabled"in e&&(this.enabled=e.enabled),"drawSides"in e&&(this.drawSides=e.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":140,"gl-buffer":78,"gl-vao":150}],142:[function(e,t,n){var r=e("glslify"),i=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),o=r(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),a=r(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=r(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);n.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},n.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(e,t,n){"use strict";var r=e("gl-vec3"),i=e("gl-vec4"),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(e,t,n,o){for(var a=0,s=0;s<e.length;s++)for(var l=e[s].velocities,c=0;c<l.length;c++)a=Math.max(a,r.length(l[c]));var u=e.map((function(e){return function(e,t,n,o){for(var a=e.points,s=e.velocities,l=e.divergences,c=[],u=[],h=[],d=[],f=[],p=[],g=0,m=0,v=i.create(),y=i.create(),b=0;b<a.length;b++){var _=a[b],x=s[b],w=l[b];0===t&&(w=.05*n),m=r.length(x)/o,v=i.create(),r.copy(v,x),v[3]=w;for(var A=0;A<8;A++)f[A]=[_[0],_[1],_[2],A];if(d.length>0)for(A=0;A<8;A++){var k=(A+1)%8;c.push(d[A],f[A],f[k],f[k],d[k],d[A]),h.push(y,v,v,v,y,y),p.push(g,m,m,m,g,g);var T=c.length;u.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var S=d;d=f,f=S;var E=y;y=v,v=E;var C=g;g=m,m=C}return{positions:c,cells:u,vectors:h,vertexIntensity:p}}(e,n,o,a)})),h=[],d=[],f=[],p=[];for(s=0;s<u.length;s++){var g=u[s],m=h.length;for(h=h.concat(g.positions),f=f.concat(g.vectors),p=p.concat(g.vertexIntensity),c=0;c<g.cells.length;c++){var v=g.cells[c],y=[];d.push(y);for(var b=0;b<v.length;b++)y.push(v[b]+m)}}return{positions:h,cells:d,vectors:f,vertexIntensity:p,colormap:t}},s=function(e,t){var n,r=e.length;for(n=0;n<r;n++){var i=e[n];if(i===t)return n;if(i>t)return n-1}return n},l=function(e,t,n){return e<t?t:e>n?n:e},c=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var n=e.length,r=1;r<n;r++){var i=Math.abs(e[r]-e[r-1]);i<t&&(t=i)}return t};t.exports=function(e,t){var n=e.startingPositions,i=e.maxLength||1e3,u=e.tubeSize||1,h=e.absoluteTubeSize,d=e.gridFill||"+x+y+z",f={};-1!==d.indexOf("-x")&&(f.reversedX=!0),-1!==d.indexOf("-y")&&(f.reversedY=!0),-1!==d.indexOf("-z")&&(f.reversedZ=!0),f.filled=o.indexOf(d.replace(/-/g,"").replace(/\+/g,""));var p=e.getVelocity||function(t){return function(e,t,n){var i=t.vectors,o=t.meshgrid,a=e[0],c=e[1],u=e[2],h=o[0].length,d=o[1].length,f=o[2].length,p=s(o[0],a),g=s(o[1],c),m=s(o[2],u),v=p+1,y=g+1,b=m+1;if(p=l(p,0,h-1),v=l(v,0,h-1),g=l(g,0,d-1),y=l(y,0,d-1),m=l(m,0,f-1),b=l(b,0,f-1),p<0||g<0||m<0||v>h-1||y>d-1||b>f-1)return r.create();var _,x,w,A,k,T,S=o[0][p],E=o[0][v],C=o[1][g],M=o[1][y],O=o[2][m],L=(a-S)/(E-S),D=(c-C)/(M-C),I=(u-O)/(o[2][b]-O);switch(isFinite(L)||(L=.5),isFinite(D)||(D=.5),isFinite(I)||(I=.5),n.reversedX&&(p=h-1-p,v=h-1-v),n.reversedY&&(g=d-1-g,y=d-1-y),n.reversedZ&&(m=f-1-m,b=f-1-b),n.filled){case 5:k=m,T=b,w=g*f,A=y*f,_=p*f*d,x=v*f*d;break;case 4:k=m,T=b,_=p*f,x=v*f,w=g*f*h,A=y*f*h;break;case 3:w=g,A=y,k=m*d,T=b*d,_=p*d*f,x=v*d*f;break;case 2:w=g,A=y,_=p*d,x=v*d,k=m*d*h,T=b*d*h;break;case 1:_=p,x=v,k=m*h,T=b*h,w=g*h*f,A=y*h*f;break;default:_=p,x=v,w=g*h,A=y*h,k=m*h*d,T=b*h*d}var R=i[_+w+k],P=i[_+w+T],N=i[_+A+k],z=i[_+A+T],F=i[x+w+k],B=i[x+w+T],j=i[x+A+k],U=i[x+A+T],V=r.create(),q=r.create(),H=r.create(),$=r.create();r.lerp(V,R,F,L),r.lerp(q,P,B,L),r.lerp(H,N,j,L),r.lerp($,z,U,L);var W=r.create(),G=r.create();r.lerp(W,V,H,D),r.lerp(G,q,$,D);var Y=r.create();return r.lerp(Y,W,G,I),Y}(t,e,f)},g=e.getDivergence||function(e,t){var n=r.create(),i=1e-4;r.add(n,e,[i,0,0]);var o=p(n);r.subtract(o,o,t),r.scale(o,o,1/i),r.add(n,e,[0,i,0]);var a=p(n);r.subtract(a,a,t),r.scale(a,a,1/i),r.add(n,e,[0,0,i]);var s=p(n);return r.subtract(s,s,t),r.scale(s,s,1/i),r.add(n,o,a),r.add(n,n,s),n},m=[],v=t[0][0],y=t[0][1],b=t[0][2],_=t[1][0],x=t[1][1],w=t[1][2],A=function(e){var t=e[0],n=e[1],r=e[2];return!(t<v||t>_||n<y||n>x||r<b||r>w)},k=10*r.distance(t[0],t[1])/i,T=k*k,S=1,E=0,C=n.length;C>1&&(S=function(e){for(var t=[],n=[],r=[],i={},o={},a={},s=e.length,l=0;l<s;l++){var u=e[l],h=u[0],d=u[1],f=u[2];i[h]||(t.push(h),i[h]=!0),o[d]||(n.push(d),o[d]=!0),a[f]||(r.push(f),a[f]=!0)}var p=c(t),g=c(n),m=c(r),v=Math.min(p,g,m);return isFinite(v)?v:1}(n));for(var M=0;M<C;M++){var O=r.create();r.copy(O,n[M]);var L=[O],D=[],I=p(O),R=O;D.push(I);var P=[],N=g(O,I),z=r.length(N);isFinite(z)&&z>E&&(E=z),P.push(z),m.push({points:L,velocities:D,divergences:P});for(var F=0;F<100*i&&L.length<i&&A(O);){F++;var B=r.clone(I),j=r.squaredLength(B);if(0===j)break;j>T&&r.scale(B,B,k/Math.sqrt(j)),r.add(B,B,O),I=p(B),r.squaredDistance(R,B)-T>-1e-4*T&&(L.push(B),R=B,D.push(I),N=g(B,I),z=r.length(N),isFinite(z)&&z>E&&(E=z),P.push(z)),O=B}}var U=a(m,e.colormap,E,S);return h?U.tubeScale=h:(0===E&&(E=1),U.tubeScale=.5*u*S/E),U};var u=e("./lib/shaders"),h=e("gl-cone3d").createMesh;t.exports.createTubeMesh=function(e,t){return h(e,t,{shaders:u,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(e,t,n){var r=e("gl-shader"),i=e("glslify"),o=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),a=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);n.createShader=function(e){var t=r(e,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},n.createPickShader=function(e){var t=r(e,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},n.createContourShader=function(e){var t=r(e,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},n.createPickContourShader=function(e){var t=r(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},{"gl-shader":132,glslify:231}],145:[function(e,t,n){"use strict";t.exports=function(e){var t=e.gl,n=y(t),r=_(t),s=b(t),l=x(t),c=i(t),u=o(t,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),h=i(t),d=o(t,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),f=i(t),p=o(t,[{buffer:f,size:2,type:t.FLOAT}]),g=a(t,1,256,t.RGBA,t.UNSIGNED_BYTE);g.minFilter=t.LINEAR,g.magFilter=t.LINEAR;var m=new S(t,[0,0],[[0,0,0],[0,0,0]],n,r,c,u,g,s,l,h,d,f,p,[0,0,0]),v={levels:[[],[],[]]};for(var w in e)v[w]=e[w];return v.colormap=v.colormap||"jet",m.update(v),m};var r=e("bit-twiddle"),i=e("gl-buffer"),o=e("gl-vao"),a=e("gl-texture2d"),s=e("typedarray-pool"),l=e("colormap"),c=e("ndarray-ops"),u=e("ndarray-pack"),h=e("ndarray"),d=e("surface-nets"),f=e("gl-mat4/multiply"),p=e("gl-mat4/invert"),g=e("binary-search-bounds"),m=e("ndarray-gradient"),v=e("./lib/shaders"),y=v.createShader,b=v.createContourShader,_=v.createPickShader,x=v.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],A=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function T(e,t,n,r,i){this.position=e,this.index=t,this.uv=n,this.level=r,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=k[e],n=(e+2)%3;t[(e+1)%3+0]=1,t[n+3]=1,t[e+6]=1}}();function S(e,t,n,r,i,o,a,l,c,u,d,f,p,g,m){this.gl=e,this.shape=t,this.bounds=n,this.objectOffset=m,this.intensityBounds=[],this._shader=r,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=d,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new T([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=S.prototype;E.genColormap=function(e,t){var n=!1,r=u([l({colormap:e,nshades:256,format:"rgba"}).map((function(e,r){var i=t?function(e,t){if(!t)return 1;if(!t.length)return 1;for(var n=0;n<t.length;++n){if(t.length<2)return 1;if(t[n][0]===e)return t[n][1];if(t[n][0]>e&&n>0){var r=(t[n][0]-e)/(t[n][0]-t[n-1][0]);return t[n][1]*(1-r)+r*t[n-1][1]}}return 1}(r/255,t):e[3];return i<1&&(n=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(r,255),this.hasAlphaScale=n,r},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(e){this.pickId=e};var C=[0,0,0],M={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(e,t){var n,r,i,o=t.axes&&t.axes.lastCubeProps.axis||C,a=t.showSurface,s=t.showContour;for(n=0;n<3;++n)for(a=a||t.surfaceProject[n],r=0;r<3;++r)s=s||t.contourProject[n][r];for(n=0;n<3;++n){var l=M.projections[n];for(r=0;r<16;++r)l[r]=0;for(r=0;r<4;++r)l[5*r]=1;l[5*n]=0,l[12+n]=t.axesBounds[+(o[n]>0)][n],f(l,e.model,l);var c=M.clipBounds[n];for(i=0;i<2;++i)for(r=0;r<3;++r)c[i][r]=e.clipBounds[i][r];c[0][n]=-1e8,c[1][n]=1e8}return M.showSurface=a,M.showContour=s,M}var L={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},D=w.slice(),I=[1,0,0,0,1,0,0,0,1];function R(e,t){e=e||{};var n=this.gl;n.disable(n.CULL_FACE),this._colorMap.bind(0);var r=L;r.model=e.model||w,r.view=e.view||w,r.projection=e.projection||w,r.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],r.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],r.objectOffset=this.objectOffset,r.contourColor=this.contourColor[0],r.inverseModel=p(r.inverseModel,r.model);for(var i=0;i<2;++i)for(var o=r.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);r.kambient=this.ambientLight,r.kdiffuse=this.diffuseLight,r.kspecular=this.specularLight,r.roughness=this.roughness,r.fresnel=this.fresnel,r.opacity=this.opacity,r.height=0,r.permutation=I,r.vertexColor=this.vertexColor;var s=D;for(f(s,r.view,r.model),f(s,r.projection,s),p(s,s),i=0;i<3;++i)r.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];r.lightPosition[i]=c/l}var u=O(r,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=r,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(n.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(n.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var h=this._contourShader;r.kambient=1,r.kdiffuse=0,r.kspecular=0,r.opacity=1,h.bind(),h.uniforms=r;var d=this._contourVAO;for(d.bind(),i=0;i<3;++i)for(h.uniforms.permutation=k[i],n.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a<this.contourLevels[i].length;++a)a===this.highlightLevel[i]?(h.uniforms.contourColor=this.highlightColor[i],h.uniforms.contourTint=this.highlightTint[i]):0!==a&&a-1!==this.highlightLevel[i]||(h.uniforms.contourColor=this.contourColor[i],h.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][a]&&(h.uniforms.height=this.contourLevels[i][a],d.draw(n.LINES,this._contourCounts[i][a],this._contourOffsets[i][a]));for(i=0;i<3;++i)for(h.uniforms.model=u.projections[i],h.uniforms.clipBounds=u.clipBounds[i],a=0;a<3;++a)if(this.contourProject[i][a]){h.uniforms.permutation=k[a],n.lineWidth(this.contourWidth[a]*this.pixelRatio);for(var g=0;g<this.contourLevels[a].length;++g)g===this.highlightLevel[a]?(h.uniforms.contourColor=this.highlightColor[a],h.uniforms.contourTint=this.highlightTint[a]):0!==g&&g-1!==this.highlightLevel[a]||(h.uniforms.contourColor=this.contourColor[a],h.uniforms.contourTint=this.contourTint[a]),this._contourCounts[a][g]&&(h.uniforms.height=this.contourLevels[a][g],d.draw(n.LINES,this._contourCounts[a][g],this._contourOffsets[a][g]))}for(d.unbind(),(d=this._dynamicVAO).bind(),i=0;i<3;++i)if(0!==this._dynamicCounts[i])for(h.uniforms.model=r.model,h.uniforms.clipBounds=r.clipBounds,h.uniforms.permutation=k[i],n.lineWidth(this.dynamicWidth[i]*this.pixelRatio),h.uniforms.contourColor=this.dynamicColor[i],h.uniforms.contourTint=this.dynamicTint[i],h.uniforms.height=this.dynamicLevel[i],d.draw(n.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),a=0;a<3;++a)this.contourProject[a][i]&&(h.uniforms.model=u.projections[a],h.uniforms.clipBounds=u.clipBounds[a],d.draw(n.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));d.unbind()}}E.draw=function(e){return R.call(this,e,!1)},E.drawTransparent=function(e){return R.call(this,e,!0)};var P={model:w,view:w,projection:w,inverseModel:w,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function N(e,t){return Array.isArray(e)?[t(e[0]),t(e[1]),t(e[2])]:[t(e),t(e),t(e)]}function z(e){return Array.isArray(e)?3===e.length?[e[0],e[1],e[2],1]:[e[0],e[1],e[2],e[3]]:[0,0,0,1]}function F(e){if(Array.isArray(e)){if(Array.isArray(e))return[z(e[0]),z(e[1]),z(e[2])];var t=z(e);return[t.slice(),t.slice(),t.slice()]}}E.drawPick=function(e){e=e||{};var t=this.gl;t.disable(t.CULL_FACE);var n=P;n.model=e.model||w,n.view=e.view||w,n.projection=e.projection||w,n.shape=this._field[2].shape,n.pickId=this.pickId/255,n.lowerBound=this.bounds[0],n.upperBound=this.bounds[1],n.objectOffset=this.objectOffset,n.permutation=I;for(var r=0;r<2;++r)for(var i=n.clipBounds[r],o=0;o<3;++o)i[o]=Math.min(Math.max(this.clipBounds[r][o],-1e8),1e8);var a=O(n,this);if(a.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=n,this._vao.bind(),this._vao.draw(t.TRIANGLES,this._vertexCount),r=0;r<3;++r)this.surfaceProject[r]&&(this._pickShader.uniforms.model=a.projections[r],this._pickShader.uniforms.clipBounds=a.clipBounds[r],this._vao.draw(t.TRIANGLES,this._vertexCount));this._vao.unbind()}if(a.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=n;var l=this._contourVAO;for(l.bind(),o=0;o<3;++o)for(t.lineWidth(this.contourWidth[o]*this.pixelRatio),s.uniforms.permutation=k[o],r=0;r<this.contourLevels[o].length;++r)this._contourCounts[o][r]&&(s.uniforms.height=this.contourLevels[o][r],l.draw(t.LINES,this._contourCounts[o][r],this._contourOffsets[o][r]));for(r=0;r<3;++r)for(s.uniforms.model=a.projections[r],s.uniforms.clipBounds=a.clipBounds[r],o=0;o<3;++o)if(this.contourProject[r][o]){s.uniforms.permutation=k[o],t.lineWidth(this.contourWidth[o]*this.pixelRatio);for(var c=0;c<this.contourLevels[o].length;++c)this._contourCounts[o][c]&&(s.uniforms.height=this.contourLevels[o][c],l.draw(t.LINES,this._contourCounts[o][c],this._contourOffsets[o][c]))}l.unbind()}},E.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=this._field[2].shape,n=this._pickResult,r=t[0]*(e.value[0]+(e.value[2]>>4)/16)/255,i=Math.floor(r),o=r-i,a=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=n.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?o:1-o,d=0;d<2;++d)for(var f=i+u,p=s+d,m=h*(d?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(f,p)*m;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=g.le(this.contourLevels[b],c[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]<this.contourLevels[b].length-1){var _=this.contourLevels[b][y[b]],x=this.contourLevels[b][y[b]+1];Math.abs(_-c[b])>Math.abs(x-c[b])&&(y[b]+=1)}for(n.index[0]=o<.5?i:i+1,n.index[1]=l<.5?s:s+1,n.uv[0]=r/t[0],n.uv[1]=a/t[1],v=0;v<3;++v)n.dataCoordinate[v]=this._field[v].get(n.index[0],n.index[1]);return n},E.padField=function(e,t){var n=t.shape.slice(),r=e.shape.slice();c.assign(e.lo(1,1).hi(n[0],n[1]),t),c.assign(e.lo(1).hi(n[0],1),t.hi(n[0],1)),c.assign(e.lo(1,r[1]-1).hi(n[0],1),t.lo(0,n[1]-1).hi(n[0],1)),c.assign(e.lo(0,1).hi(1,n[1]),t.hi(1)),c.assign(e.lo(r[0]-1,1).hi(1,n[1]),t.lo(n[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,r[1]-1,t.get(0,n[1]-1)),e.set(r[0]-1,0,t.get(n[0]-1,0)),e.set(r[0]-1,r[1]-1,t.get(n[0]-1,n[1]-1))},E.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=F(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=F(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,n=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var i=(t.shape[0]+2)*(t.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(r.nextPow2(i))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var f=u[a];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=h(f.data,o);p.stride[a]=f.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var g=[0,0];g[a]=1,this._field[a]=h(this._field[a].data,[o[0]+2,o[1]+2],g,0)}this._field[0].set(0,0,0);for(var v=0;v<o[0];++v)this._field[0].set(v+1,0,v);for(this._field[0].set(o[0]+1,0,o[0]-1),this._field[1].set(0,0,0),v=0;v<o[1];++v)this._field[1].set(0,v+1,v);this._field[1].set(0,o[1]+1,o[1]-1)}var y=this._field,b=h(s.mallocFloat(3*y[2].size*2),[3,o[0]+2,o[1]+2,2]);for(a=0;a<3;++a)m(b.pick(a),y[a],"mirror");var _=h(s.mallocFloat(3*y[2].size),[o[0]+2,o[1]+2,3]);for(a=0;a<o[0]+2;++a)for(v=0;v<o[1]+2;++v){var x=b.get(0,a,v,0),w=b.get(0,a,v,1),k=b.get(1,a,v,0),T=b.get(1,a,v,1),S=b.get(2,a,v,0),E=b.get(2,a,v,1),C=k*E-T*S,M=S*w-E*x,O=x*T-w*k,L=Math.sqrt(C*C+M*M+O*O);L<1e-8?(L=Math.max(Math.abs(C),Math.abs(M),Math.abs(O)))<1e-8?(O=1,M=C=0,L=1):L=1/L:L=1/Math.sqrt(L),_.set(a,v,0,C*L),_.set(a,v,1,M*L),_.set(a,v,2,O*L)}s.free(b.data);var D=[1/0,1/0,1/0],I=[-1/0,-1/0,-1/0],R=1/0,P=-1/0,z=(o[0]-1)*(o[1]-1)*6,B=s.mallocFloat(r.nextPow2(10*z)),j=0,U=0;for(a=0;a<o[0]-1;++a)e:for(v=0;v<o[1]-1;++v){for(var V=0;V<2;++V)for(var q=0;q<2;++q)for(var H=0;H<3;++H){var $=this._field[H].get(1+a+V,1+v+q);if(isNaN($)||!isFinite($))continue e}for(H=0;H<6;++H){var W=a+A[H][0],G=v+A[H][1],Y=this._field[0].get(W+1,G+1),X=this._field[1].get(W+1,G+1);$=this._field[2].get(W+1,G+1),C=_.get(W+1,G+1,0),M=_.get(W+1,G+1,1),O=_.get(W+1,G+1,2),e.intensity&&(Z=e.intensity.get(W,G));var Z=e.intensity?e.intensity.get(W,G):$+this.objectOffset[2];B[j++]=W,B[j++]=G,B[j++]=Y,B[j++]=X,B[j++]=$,B[j++]=0,B[j++]=Z,B[j++]=C,B[j++]=M,B[j++]=O,D[0]=Math.min(D[0],Y+this.objectOffset[0]),D[1]=Math.min(D[1],X+this.objectOffset[1]),D[2]=Math.min(D[2],$+this.objectOffset[2]),R=Math.min(R,Z),I[0]=Math.max(I[0],Y+this.objectOffset[0]),I[1]=Math.max(I[1],X+this.objectOffset[1]),I[2]=Math.max(I[2],$+this.objectOffset[2]),P=Math.max(P,Z),U+=1}}for(e.intensityBounds&&(R=+e.intensityBounds[0],P=+e.intensityBounds[1]),a=6;a<j;a+=10)B[a]=(B[a]-R)/(P-R);this._vertexCount=U,this._coordinateBuffer.update(B.subarray(0,j)),s.freeFloat(B),s.free(_.data),this.bounds=[D,I],this.intensity=e.intensity||this._field[2],this.intensityBounds[0]===R&&this.intensityBounds[1]===P||(n=!0),this.intensityBounds=[R,P]}if("levels"in e){var K=e.levels;for(K=Array.isArray(K[0])?K.slice():[[],[],K],a=0;a<3;++a)K[a]=K[a].slice(),K[a].sort((function(e,t){return e-t}));for(a=0;a<3;++a)for(v=0;v<K[a].length;++v)K[a][v]-=this.objectOffset[a];e:for(a=0;a<3;++a){if(K[a].length!==this.contourLevels[a].length){n=!0;break}for(v=0;v<K[a].length;++v)if(K[a][v]!==this.contourLevels[a][v]){n=!0;break e}}this.contourLevels=K}if(n){y=this._field,o=this.shape;for(var J=[],Q=0;Q<3;++Q){var ee=this.contourLevels[Q],te=[],ne=[],re=[0,0,0];for(a=0;a<ee.length;++a){var ie=d(this._field[Q],ee[a]);te.push(J.length/5|0),U=0;e:for(v=0;v<ie.cells.length;++v){var oe=ie.cells[v];for(H=0;H<2;++H){var ae=ie.positions[oe[H]],se=ae[0],le=0|Math.floor(se),ce=se-le,ue=ae[1],he=0|Math.floor(ue),de=ue-he,fe=!1;t:for(var pe=0;pe<3;++pe){re[pe]=0;var ge=(Q+pe+1)%3;for(V=0;V<2;++V){var me=V?ce:1-ce;for(W=0|Math.min(Math.max(le+V,0),o[0]),q=0;q<2;++q){var ve=q?de:1-de;if(G=0|Math.min(Math.max(he+q,0),o[1]),$=pe<2?this._field[ge].get(W,G):(this.intensity.get(W,G)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite($)||isNaN($)){fe=!0;break t}var ye=me*ve;re[pe]+=ye*$}}}if(fe){if(H>0){for(var be=0;be<5;++be)J.pop();U-=1}continue e}J.push(re[0],re[1],ae[0],ae[1],re[2]),U+=1}}ne.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=ne}var _e=s.mallocFloat(J.length);for(a=0;a<J.length;++a)_e[a]=J[a];this._contourBuffer.update(_e),s.freeFloat(_e)}},E.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var e=0;e<3;++e)s.freeFloat(this._field[e].data)},E.highlight=function(e){var t,n;if(!e)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(t=0;t<3;++t)this.enableHighlight[t]?this.highlightLevel[t]=e.level[t]:this.highlightLevel[t]=-1;for(n=this.snapToData?e.dataCoordinate:e.position,t=0;t<3;++t)n[t]-=this.objectOffset[t];if(this.enableDynamic[0]&&n[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&n[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&n[2]!==this.dynamicLevel[2]){for(var r=0,i=this.shape,o=s.mallocFloat(12*i[0]*i[1]),a=0;a<3;++a)if(this.enableDynamic[a]){this.dynamicLevel[a]=n[a];var l=(a+1)%3,c=(a+2)%3,u=this._field[a],h=this._field[l],f=this._field[c],p=d(u,n[a]),g=p.cells,m=p.positions;for(this._dynamicOffsets[a]=r,t=0;t<g.length;++t)for(var v=g[t],y=0;y<2;++y){var b=m[v[y]],_=+b[0],x=0|_,w=0|Math.min(x+1,i[0]),A=_-x,k=1-A,T=+b[1],S=0|T,E=0|Math.min(S+1,i[1]),C=T-S,M=1-C,O=k*M,L=k*C,D=A*M,I=A*C,R=O*h.get(x,S)+L*h.get(x,E)+D*h.get(w,S)+I*h.get(w,E),P=O*f.get(x,S)+L*f.get(x,E)+D*f.get(w,S)+I*f.get(w,E);if(isNaN(R)||isNaN(P)){y&&(r-=1);break}o[2*r+0]=R,o[2*r+1]=P,r+=1}this._dynamicCounts[a]=r-this._dynamicOffsets[a]}else this.dynamicLevel[a]=NaN,this._dynamicCounts[a]=0;this._dynamicBuffer.update(o.subarray(0,2*r)),s.freeFloat(o)}}},{"./lib/shaders":144,"binary-search-bounds":31,"bit-twiddle":32,colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-texture2d":146,"gl-vao":150,ndarray:259,"ndarray-gradient":252,"ndarray-ops":254,"ndarray-pack":255,"surface-nets":302,"typedarray-pool":308}],146:[function(e,t,n){"use strict";var r=e("ndarray"),i=e("ndarray-ops"),o=e("typedarray-pool");t.exports=function(e){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(a||c(e),"number"==typeof arguments[1])return v(e,arguments[1],arguments[2],arguments[3]||e.RGBA,arguments[4]||e.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(e,0|arguments[1][0],0|arguments[1][1],arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var t=arguments[1],n=u(t)?t:t.raw;if(n)return y(e,n,0|t.width,0|t.height,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(t.shape&&t.data&&t.stride)return b(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(e){a=[e.LINEAR,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_NEAREST],s=[e.NEAREST,e.LINEAR,e.NEAREST_MIPMAP_NEAREST,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_LINEAR],l=[e.REPEAT,e.CLAMP_TO_EDGE,e.MIRRORED_REPEAT]}function u(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var h=function(e,t){i.muls(e,t,255)};function d(e,t,n){var r=e.gl,i=r.getParameter(r.MAX_TEXTURE_SIZE);if(t<0||t>i||n<0||n>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,n],e.bind(),r.texImage2D(r.TEXTURE_2D,0,e.format,t,n,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,n,r,i,o){this.gl=e,this.handle=t,this.format=i,this.type=o,this._shape=[n,r],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(e){return a.wrapS=e}},{get:function(){return a._wrapT},set:function(e){return a.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(e){return a.width=e}},{get:function(){return a._shape[1]},set:function(e){return a.height=e}}]),this._shapeVector=l}var p=f.prototype;function g(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function v(e,t,n,r,i){var o=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>o||n<0||n>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(e);return e.texImage2D(e.TEXTURE_2D,0,r,t,n,0,r,i,null),new f(e,a,t,n,r,i)}function y(e,t,n,r,i,o){var a=m(e);return e.texImage2D(e.TEXTURE_2D,0,i,i,o,t),new f(e,a,n,r,i,o)}function b(e,t){var n=t.dtype,a=t.shape.slice(),s=e.getParameter(e.MAX_TEXTURE_SIZE);if(a[0]<0||a[0]>s||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=g(a,t.stride.slice()),c=0;"float32"===n?c=e.FLOAT:"float64"===n?(c=e.FLOAT,l=!1,n="float32"):"uint8"===n?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,n="uint8");var u,d,p=0;if(2===a.length)p=e.LUMINANCE,a=[a[0],a[1],1],t=r(t.data,a,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])p=e.ALPHA;else if(2===a[2])p=e.LUMINANCE_ALPHA;else if(3===a[2])p=e.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");p=e.RGBA}}c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var v=t.size;if(l)u=0===t.offset&&t.data.length===v?t.data:t.data.subarray(t.offset,t.offset+v);else{var y=[a[2],a[2]*a[0],1];d=o.malloc(v,n);var b=r(d,a,y,0);"float32"!==n&&"float64"!==n||c!==e.UNSIGNED_BYTE?i.assign(b,t):h(b,t),u=d.subarray(0,v)}var _=m(e);return e.texImage2D(e.TEXTURE_2D,0,p,a[0],a[1],0,p,c,u),l||o.free(d),new f(e,_,a[0],a[1],p,c)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var n=this.gl.getExtension("EXT_texture_filter_anisotropic");n&&this.gl.texParameterf(this.gl.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var n=this.gl;return this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this._wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),p.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},p.setPixels=function(e,t,n,a){var s=this.gl;this.bind(),Array.isArray(t)?(a=n,n=0|t[1],t=0|t[0]):(t=t||0,n=n||0),a=a||0;var l=u(e)?e:e.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,t,n,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>a||n+e.shape[0]>this._shape[0]>>>a||t<0||n<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,n,a,s,l,c,u){var d=u.dtype,f=u.shape.slice();if(f.length<2||f.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var p=0,m=0,v=g(f,u.stride.slice());if("float32"===d?p=e.FLOAT:"float64"===d?(p=e.FLOAT,v=!1,d="float32"):"uint8"===d?p=e.UNSIGNED_BYTE:(p=e.UNSIGNED_BYTE,v=!1,d="uint8"),2===f.length)m=e.LUMINANCE,f=[f[0],f[1],1],u=r(u.data,f,[u.stride[0],u.stride[1],1],u.offset);else{if(3!==f.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===f[2])m=e.ALPHA;else if(2===f[2])m=e.LUMINANCE_ALPHA;else if(3===f[2])m=e.RGB;else{if(4!==f[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");m=e.RGBA}f[2]}if(m!==e.LUMINANCE&&m!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(m=s),m!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=u.size,b=c.indexOf(a)<0;if(b&&c.push(a),p===l&&v)0===u.offset&&u.data.length===y?b?e.texImage2D(e.TEXTURE_2D,a,s,f[0],f[1],0,s,l,u.data):e.texSubImage2D(e.TEXTURE_2D,a,t,n,f[0],f[1],s,l,u.data):b?e.texImage2D(e.TEXTURE_2D,a,s,f[0],f[1],0,s,l,u.data.subarray(u.offset,u.offset+y)):e.texSubImage2D(e.TEXTURE_2D,a,t,n,f[0],f[1],s,l,u.data.subarray(u.offset,u.offset+y));else{var _;_=l===e.FLOAT?o.mallocFloat32(y):o.mallocUint8(y);var x=r(_,f,[f[2],f[2]*f[0],1]);p===e.FLOAT&&l===e.UNSIGNED_BYTE?h(x,u):i.assign(x,u),b?e.texImage2D(e.TEXTURE_2D,a,s,f[0],f[1],0,s,l,_.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,a,t,n,f[0],f[1],s,l,_.subarray(0,y)),l===e.FLOAT?o.freeFloat32(_):o.freeUint8(_)}}(s,t,n,a,this.format,this.type,this._mipLevels,e)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(e,t,n){"use strict";t.exports=function(e,t,n){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var r=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(n){if(n.length>r)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i<n.length;++i){var o=n[i];if(o.buffer){var a=o.buffer,s=o.size||4,l=o.type||e.FLOAT,c=!!o.normalized,u=o.stride||0,h=o.offset||0;a.bind(),e.enableVertexAttribArray(i),e.vertexAttribPointer(i,s,l,c,u,h)}else{if("number"==typeof o)e.vertexAttrib1f(i,o);else if(1===o.length)e.vertexAttrib1f(i,o[0]);else if(2===o.length)e.vertexAttrib2f(i,o[0],o[1]);else if(3===o.length)e.vertexAttrib3f(i,o[0],o[1],o[2]);else{if(4!==o.length)throw new Error("gl-vao: Invalid vertex attribute");e.vertexAttrib4f(i,o[0],o[1],o[2],o[3])}e.disableVertexAttribArray(i)}}for(;i<r;++i)e.disableVertexAttribArray(i)}else for(e.bindBuffer(e.ARRAY_BUFFER,null),i=0;i<r;++i)e.disableVertexAttribArray(i)}},{}],148:[function(e,t,n){"use strict";var r=e("./do-bind.js");function i(e){this.gl=e,this._elements=null,this._attributes=null,this._elementsType=e.UNSIGNED_SHORT}i.prototype.bind=function(){r(this.gl,this._elements,this._attributes)},i.prototype.update=function(e,t,n){this._elements=t,this._attributes=e,this._elementsType=n||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(e,t,n){n=n||0;var r=this.gl;this._elements?r.drawElements(e,t,this._elementsType,n):r.drawArrays(e,n,t)},t.exports=function(e){return new i(e)}},{"./do-bind.js":147}],149:[function(e,t,n){"use strict";var r=e("./do-bind.js");function i(e,t,n,r,i,o){this.location=e,this.dimension=t,this.a=n,this.b=r,this.c=i,this.d=o}function o(e,t,n){this.gl=e,this._ext=t,this.handle=n,this._attribs=[],this._useElements=!1,this._elementsType=e.UNSIGNED_SHORT}i.prototype.bind=function(e){switch(this.dimension){case 1:e.vertexAttrib1f(this.location,this.a);break;case 2:e.vertexAttrib2f(this.location,this.a,this.b);break;case 3:e.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:e.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var e=0;e<this._attribs.length;++e)this._attribs[e].bind(this.gl)},o.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},o.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},o.prototype.update=function(e,t,n){if(this.bind(),r(this.gl,t,e),this.unbind(),this._attribs.length=0,e)for(var o=0;o<e.length;++o){var a=e[o];"number"==typeof a?this._attribs.push(new i(o,1,a)):Array.isArray(a)&&this._attribs.push(new i(o,a.length,a[0],a[1],a[2],a[3]))}this._useElements=!!t,this._elementsType=n||this.gl.UNSIGNED_SHORT},o.prototype.draw=function(e,t,n){n=n||0;var r=this.gl;this._useElements?r.drawElements(e,t,this._elementsType,n):r.drawArrays(e,n,t)},t.exports=function(e,t){return new o(e,t,t.createVertexArrayOES())}},{"./do-bind.js":147}],150:[function(e,t,n){"use strict";var r=e("./lib/vao-native.js"),i=e("./lib/vao-emulated.js");function o(e){this.bindVertexArrayOES=e.bindVertexArray.bind(e),this.createVertexArrayOES=e.createVertexArray.bind(e),this.deleteVertexArrayOES=e.deleteVertexArray.bind(e)}t.exports=function(e,t,n,a){var s,l=e.createVertexArray?new o(e):e.getExtension("OES_vertex_array_object");return(s=l?r(e,l):i(e)).update(t,n,a),s}},{"./lib/vao-emulated.js":148,"./lib/vao-native.js":149}],151:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}},{}],152:[function(e,t,n){t.exports=function(e,t){var n=r(e[0],e[1],e[2]),a=r(t[0],t[1],t[2]);i(n,n),i(a,a);var s=o(n,a);return s>1?0:Math.acos(s)};var r=e("./fromValues"),i=e("./normalize"),o=e("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(e,t,n){t.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},{}],154:[function(e,t,n){t.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],155:[function(e,t,n){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],156:[function(e,t,n){t.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},{}],157:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}},{}],158:[function(e,t,n){t.exports=e("./distance")},{"./distance":159}],159:[function(e,t,n){t.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}},{}],160:[function(e,t,n){t.exports=e("./divide")},{"./divide":161}],161:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},{}],162:[function(e,t,n){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},{}],163:[function(e,t,n){t.exports=1e-6},{}],164:[function(e,t,n){t.exports=function(e,t){var n=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[2];return Math.abs(n-a)<=r*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-s)<=r*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=r*Math.max(1,Math.abs(o),Math.abs(l))};var r=e("./epsilon")},{"./epsilon":163}],165:[function(e,t,n){t.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},{}],166:[function(e,t,n){t.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},{}],167:[function(e,t,n){t.exports=function(e,t,n,i,o,a){var s,l;for(t||(t=3),n||(n=0),l=i?Math.min(i*t+n,e.length):e.length,s=n;s<l;s+=t)r[0]=e[s],r[1]=e[s+1],r[2]=e[s+2],o(r,r,a),e[s]=r[0],e[s+1]=r[1],e[s+2]=r[2];return e};var r=e("./create")()},{"./create":156}],168:[function(e,t,n){t.exports=function(e,t,n){var r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}},{}],169:[function(e,t,n){t.exports={EPSILON:e("./epsilon"),create:e("./create"),clone:e("./clone"),angle:e("./angle"),fromValues:e("./fromValues"),copy:e("./copy"),set:e("./set"),equals:e("./equals"),exactEquals:e("./exactEquals"),add:e("./add"),subtract:e("./subtract"),sub:e("./sub"),multiply:e("./multiply"),mul:e("./mul"),divide:e("./divide"),div:e("./div"),min:e("./min"),max:e("./max"),floor:e("./floor"),ceil:e("./ceil"),round:e("./round"),scale:e("./scale"),scaleAndAdd:e("./scaleAndAdd"),distance:e("./distance"),dist:e("./dist"),squaredDistance:e("./squaredDistance"),sqrDist:e("./sqrDist"),length:e("./length"),len:e("./len"),squaredLength:e("./squaredLength"),sqrLen:e("./sqrLen"),negate:e("./negate"),inverse:e("./inverse"),normalize:e("./normalize"),dot:e("./dot"),cross:e("./cross"),lerp:e("./lerp"),random:e("./random"),transformMat4:e("./transformMat4"),transformMat3:e("./transformMat3"),transformQuat:e("./transformQuat"),rotateX:e("./rotateX"),rotateY:e("./rotateY"),rotateZ:e("./rotateZ"),forEach:e("./forEach")}},{"./add":151,"./angle":152,"./ceil":153,"./clone":154,"./copy":155,"./create":156,"./cross":157,"./dist":158,"./distance":159,"./div":160,"./divide":161,"./dot":162,"./epsilon":163,"./equals":164,"./exactEquals":165,"./floor":166,"./forEach":167,"./fromValues":168,"./inverse":170,"./len":171,"./length":172,"./lerp":173,"./max":174,"./min":175,"./mul":176,"./multiply":177,"./negate":178,"./normalize":179,"./random":180,"./rotateX":181,"./rotateY":182,"./rotateZ":183,"./round":184,"./scale":185,"./scaleAndAdd":186,"./set":187,"./sqrDist":188,"./sqrLen":189,"./squaredDistance":190,"./squaredLength":191,"./sub":192,"./subtract":193,"./transformMat3":194,"./transformMat4":195,"./transformQuat":196}],170:[function(e,t,n){t.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},{}],171:[function(e,t,n){t.exports=e("./length")},{"./length":172}],172:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}},{}],173:[function(e,t,n){t.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}},{}],174:[function(e,t,n){t.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}},{}],175:[function(e,t,n){t.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}},{}],176:[function(e,t,n){t.exports=e("./multiply")},{"./multiply":177}],177:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}},{}],178:[function(e,t,n){t.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}},{}],179:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}},{}],180:[function(e,t,n){t.exports=function(e,t){t=t||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}},{}],181:[function(e,t,n){t.exports=function(e,t,n,r){var i=n[1],o=n[2],a=t[1]-i,s=t[2]-o,l=Math.sin(r),c=Math.cos(r);return e[0]=t[0],e[1]=i+a*c-s*l,e[2]=o+a*l+s*c,e}},{}],182:[function(e,t,n){t.exports=function(e,t,n,r){var i=n[0],o=n[2],a=t[0]-i,s=t[2]-o,l=Math.sin(r),c=Math.cos(r);return e[0]=i+s*l+a*c,e[1]=t[1],e[2]=o+s*c-a*l,e}},{}],183:[function(e,t,n){t.exports=function(e,t,n,r){var i=n[0],o=n[1],a=t[0]-i,s=t[1]-o,l=Math.sin(r),c=Math.cos(r);return e[0]=i+a*c-s*l,e[1]=o+a*l+s*c,e[2]=t[2],e}},{}],184:[function(e,t,n){t.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},{}],185:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}},{}],186:[function(e,t,n){t.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}},{}],187:[function(e,t,n){t.exports=function(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}},{}],188:[function(e,t,n){t.exports=e("./squaredDistance")},{"./squaredDistance":190}],189:[function(e,t,n){t.exports=e("./squaredLength")},{"./squaredLength":191}],190:[function(e,t,n){t.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}},{}],191:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}},{}],192:[function(e,t,n){t.exports=e("./subtract")},{"./subtract":193}],193:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},{}],194:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}},{}],195:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}},{}],196:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*o-l*i,h=c*i+l*r-a*o,d=c*o+a*i-s*r,f=-a*r-s*i-l*o;return e[0]=u*c+f*-a+h*-l-d*-s,e[1]=h*c+f*-s+d*-a-u*-l,e[2]=d*c+f*-l+u*-s-h*-a,e}},{}],197:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}},{}],198:[function(e,t,n){t.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],199:[function(e,t,n){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],200:[function(e,t,n){t.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},{}],201:[function(e,t,n){t.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},{}],202:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}},{}],203:[function(e,t,n){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},{}],204:[function(e,t,n){t.exports=function(e,t,n,r){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}},{}],205:[function(e,t,n){t.exports={create:e("./create"),clone:e("./clone"),fromValues:e("./fromValues"),copy:e("./copy"),set:e("./set"),add:e("./add"),subtract:e("./subtract"),multiply:e("./multiply"),divide:e("./divide"),min:e("./min"),max:e("./max"),scale:e("./scale"),scaleAndAdd:e("./scaleAndAdd"),distance:e("./distance"),squaredDistance:e("./squaredDistance"),length:e("./length"),squaredLength:e("./squaredLength"),negate:e("./negate"),inverse:e("./inverse"),normalize:e("./normalize"),dot:e("./dot"),lerp:e("./lerp"),random:e("./random"),transformMat4:e("./transformMat4"),transformQuat:e("./transformQuat")}},{"./add":197,"./clone":198,"./copy":199,"./create":200,"./distance":201,"./divide":202,"./dot":203,"./fromValues":204,"./inverse":206,"./length":207,"./lerp":208,"./max":209,"./min":210,"./multiply":211,"./negate":212,"./normalize":213,"./random":214,"./scale":215,"./scaleAndAdd":216,"./set":217,"./squaredDistance":218,"./squaredLength":219,"./subtract":220,"./transformMat4":221,"./transformQuat":222}],206:[function(e,t,n){t.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},{}],207:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}},{}],208:[function(e,t,n){t.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}},{}],209:[function(e,t,n){t.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}},{}],210:[function(e,t,n){t.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}},{}],211:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}},{}],212:[function(e,t,n){t.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},{}],213:[function(e,t,n){t.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a),e}},{}],214:[function(e,t,n){var r=e("./normalize"),i=e("./scale");t.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),r(e,e),i(e,e,t),e}},{"./normalize":213,"./scale":215}],215:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}},{}],216:[function(e,t,n){t.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}},{}],217:[function(e,t,n){t.exports=function(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}},{}],218:[function(e,t,n){t.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return n*n+r*r+i*i+o*o}},{}],219:[function(e,t,n){t.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}},{}],220:[function(e,t,n){t.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}},{}],221:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}},{}],222:[function(e,t,n){t.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*o-l*i,h=c*i+l*r-a*o,d=c*o+a*i-s*r,f=-a*r-s*i-l*o;return e[0]=u*c+f*-a+h*-l-d*-s,e[1]=h*c+f*-s+d*-a-u*-l,e[2]=d*c+f*-l+u*-s-h*-a,e[3]=t[3],e}},{}],223:[function(e,t,n){var r=e("glsl-tokenizer"),i=e("atob-lite");t.exports=function(e){for(var t=Array.isArray(e)?e:r(e),n=0;n<t.length;n++){var o=t[n];if("preprocessor"===o.type){var a=o.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(a&&a[2]){var s=a[1],l=a[2];return(s?i(l):l).trim()}}}}},{"atob-lite":13,"glsl-tokenizer":230}],224:[function(e,t,n){t.exports=function(e){var t,n,h,d=0,f=0,p=l,g=[],m=[],v=1,y=0,b=0,_=!1,x=!1,w="",A=o,k=r;"300 es"===(e=e||{}).version&&(A=s,k=a);var T={},S={};for(d=0;d<A.length;d++)T[A[d]]=!0;for(d=0;d<k.length;d++)S[k[d]]=!0;return function(e){return m=[],null!==e?function(e){var n;for(d=0,e.toString&&(e=e.toString()),w+=e.replace(/\r\n/g,"\n"),h=w.length;t=w[d],d<h;){switch(n=d,p){case 0:d=D();break;case 1:d=L();break;case 2:d=O();break;case 3:d=I();break;case 4:d=N();break;case 11:d=P();break;case 5:d=z();break;case c:d=F();break;case 9:d=M();break;case l:d=C()}n!==d&&("\n"===w[n]?(y=0,++v):++y)}return f+=d,w=w.slice(d),m}(e):(g.length&&E(g.join("")),p=10,E("(eof)"),m)};function E(e){e.length&&m.push({type:u[p],data:e,position:b,line:v,column:y})}function C(){return g=g.length?[]:g,"/"===n&&"*"===t?(b=f+d-1,p=0,n=t,d+1):"/"===n&&"/"===t?(b=f+d-1,p=1,n=t,d+1):"#"===t?(p=2,b=f+d,d):/\s/.test(t)?(p=9,b=f+d,d):(_=/\d/.test(t),x=/[^\w_]/.test(t),b=f+d,p=_?4:x?3:c,d)}function M(){return/[^\s]/g.test(t)?(E(g.join("")),p=l,d):(g.push(t),n=t,d+1)}function O(){return"\r"!==t&&"\n"!==t||"\\"===n?(g.push(t),n=t,d+1):(E(g.join("")),p=l,d)}function L(){return O()}function D(){return"/"===t&&"*"===n?(g.push(t),E(g.join("")),p=l,d+1):(g.push(t),n=t,d+1)}function I(){if("."===n&&/\d/.test(t))return p=5,d;if("/"===n&&"*"===t)return p=0,d;if("/"===n&&"/"===t)return p=1,d;if("."===t&&g.length){for(;R(g););return p=5,d}if(";"===t||")"===t||"("===t){if(g.length)for(;R(g););return E(t),p=l,d+1}var e=2===g.length&&"="!==t;if(/[\w_\d\s]/.test(t)||e){for(;R(g););return p=l,d}return g.push(t),n=t,d+1}function R(e){for(var t,n,r=0;;){if(t=i.indexOf(e.slice(0,e.length+r).join("")),n=i[t],-1===t){if(r--+e.length>0)continue;n=e.slice(0,1).join("")}return E(n),b+=n.length,(g=g.slice(n.length)).length}}function P(){return/[^a-fA-F0-9]/.test(t)?(E(g.join("")),p=l,d):(g.push(t),n=t,d+1)}function N(){return"."===t||/[eE]/.test(t)?(g.push(t),p=5,n=t,d+1):"x"===t&&1===g.length&&"0"===g[0]?(p=11,g.push(t),n=t,d+1):/[^\d]/.test(t)?(E(g.join("")),p=l,d):(g.push(t),n=t,d+1)}function z(){return"f"===t&&(g.push(t),n=t,d+=1),/[eE]/.test(t)?(g.push(t),n=t,d+1):("-"!==t&&"+"!==t||!/[eE]/.test(n))&&/[^\d]/.test(t)?(E(g.join("")),p=l,d):(g.push(t),n=t,d+1)}function F(){if(/[^\d\w_]/.test(t)){var e=g.join("");return p=S[e]?8:T[e]?7:6,E(g.join("")),p=l,d}return g.push(t),n=t,d+1}};var r=e("./lib/literals"),i=e("./lib/operators"),o=e("./lib/builtins"),a=e("./lib/literals-300es"),s=e("./lib/builtins-300es"),l=999,c=9999,u=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":226,"./lib/builtins-300es":225,"./lib/literals":228,"./lib/literals-300es":227,"./lib/operators":229}],225:[function(e,t,n){var r=e("./builtins");r=r.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),t.exports=r.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":226}],226:[function(e,t,n){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],227:[function(e,t,n){var r=e("./literals");t.exports=r.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":228}],228:[function(e,t,n){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],229:[function(e,t,n){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(e,t,n){var r=e("./index");t.exports=function(e,t){var n=r(t),i=[];return(i=i.concat(n(e))).concat(n(null))}},{"./index":224}],231:[function(e,t,n){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r<e.length-1;r++)n.push(e[r],t[r]||"");return n.push(e[r]),n.join("")}},{}],232:[function(e,t,n){"use strict";var r=e("is-browser");t.exports=r&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},{"is-browser":236}],233:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.length;if(0===n)throw new Error("Must have at least d+1 points");var i=e[0].length;if(n<=i)throw new Error("Must input at least d+1 points");var a=e.slice(0,i+1),s=r.apply(void 0,a);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var h=new o(l,new Array(i+1),!1),d=h.adjacent,f=new Array(i+2);for(u=0;u<=i;++u){for(var p=l.slice(),g=0;g<=i;++g)g===u&&(p[g]=-1);var m=p[0];p[0]=p[1],p[1]=m;var v=new o(p,new Array(i+1),!0);d[u]=v,f[u]=v}for(f[i+1]=h,u=0;u<=i;++u){p=d[u].vertices;var y=d[u].adjacent;for(g=0;g<=i;++g){var b=p[g];if(b<0)y[g]=h;else for(var _=0;_<=i;++_)d[_].vertices.indexOf(b)<0&&(y[g]=d[_])}}var x=new c(i,a,f),w=!!t;for(u=i+1;u<n;++u)x.insert(e[u],w);return x.boundary()};var r=e("robust-orientation"),i=e("simplicial-complex").compareCells;function o(e,t,n){this.vertices=e,this.adjacent=t,this.boundary=n,this.lastVisited=-1}function a(e,t,n){this.vertices=e,this.cell=t,this.index=n}function s(e,t){return i(e.vertices,t.vertices)}o.prototype.flip=function(){var e=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=e;var t=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=t};var l=[];function c(e,t,n){this.dimension=e,this.vertices=t,this.simplices=n,this.interior=n.filter((function(e){return!e.boundary})),this.tuple=new Array(e+1);for(var i=0;i<=e;++i)this.tuple[i]=this.vertices[i];var o,a=l[e];a||(a=l[e]=((o=r[e+1])||(o=r),function(e){return function(){var t=this.tuple;return e.apply(this,t)}}(o))),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(e,t){var n=this.dimension,r=this.vertices.length-1,i=this.tuple,o=this.vertices,a=[e];for(e.lastVisited=-r;a.length>0;)for(var s=(e=a.pop()).adjacent,l=0;l<=n;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-r)){for(var u=c.vertices,h=0;h<=n;++h){var d=u[h];i[h]=d<0?t:o[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-r,0===f&&a.push(c)}}return null},u.walk=function(e,t){var n=this.vertices.length-1,r=this.dimension,i=this.vertices,o=this.tuple,a=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=r;++u)o[u]=i[l[u]];for(s.lastVisited=n,u=0;u<=r;++u){var h=c[u];if(!(h.lastVisited>=n)){var d=o[u];o[u]=e;var f=this.orient();if(o[u]=d,f<0){s=h;continue e}h.boundary?h.lastVisited=-n:h.lastVisited=n}}return}return s},u.addPeaks=function(e,t){var n=this.vertices.length-1,r=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=n,t.vertices[t.vertices.indexOf(-1)]=n,t.boundary=!1,c.push(t);for(var d=[];h.length>0;){var f=(t=h.pop()).vertices,p=t.adjacent,g=f.indexOf(n);if(!(g<0))for(var m=0;m<=r;++m)if(m!==g){var v=p[m];if(v.boundary&&!(v.lastVisited>=n)){var y=v.vertices;if(v.lastVisited!==-n){for(var b=0,_=0;_<=r;++_)y[_]<0?(b=_,l[_]=e):l[_]=i[y[_]];if(this.orient()>0){y[b]=n,v.boundary=!1,c.push(v),h.push(v),v.lastVisited=n;continue}v.lastVisited=-n}var x=v.adjacent,w=f.slice(),A=p.slice(),k=new o(w,A,!0);u.push(k);var T=x.indexOf(t);if(!(T<0))for(x[T]=k,A[g]=v,w[m]=-1,A[m]=t,p[m]=k,k.flip(),_=0;_<=r;++_){var S=w[_];if(!(S<0||S===n)){for(var E=new Array(r-1),C=0,M=0;M<=r;++M){var O=w[M];O<0||M===_||(E[C++]=O)}d.push(new a(E,k,_))}}}}}for(d.sort(s),m=0;m+1<d.length;m+=2){var L=d[m],D=d[m+1],I=L.index,R=D.index;I<0||R<0||(L.cell.adjacent[L.index]=D.cell,D.cell.adjacent[D.index]=L.cell)}},u.insert=function(e,t){var n=this.vertices;n.push(e);var r=this.walk(e,t);if(r){for(var i=this.dimension,o=this.tuple,a=0;a<=i;++a){var s=r.vertices[a];o[a]=s<0?e:n[s]}var l=this.orient(o);l<0||(0!==l||(r=this.handleBoundaryDegeneracy(r,e)))&&this.addPeaks(e,r)}},u.boundary=function(){for(var e=this.dimension,t=[],n=this.simplices,r=n.length,i=0;i<r;++i){var o=n[i];if(o.boundary){for(var a=new Array(e),s=o.vertices,l=0,c=0,u=0;u<=e;++u)s[u]>=0?a[l++]=s[u]:c=1&u;if(c===(1&e)){var h=a[0];a[0]=a[1],a[1]=h}t.push(a)}}return t}},{"robust-orientation":284,"simplicial-complex":293}],234:[function(e,t,n){"use strict";var r=e("binary-search-bounds");function i(e,t,n,r,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+r.length}t.exports=function(e){return e&&0!==e.length?new v(m(e)):new v(null)};var o=i.prototype;function a(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var n=m(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function l(e,t){var n=e.intervals([]);n.push(t),s(e,n)}function c(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?0:(n.splice(r,1),s(e,n),1)}function u(e,t,n){for(var r=0;r<e.length&&e[r][0]<=t;++r){var i=n(e[r]);if(i)return i}}function h(e,t,n){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var i=n(e[r]);if(i)return i}}function d(e,t){for(var n=0;n<e.length;++n){var r=t(e[n]);if(r)return r}}function f(e,t){return e-t}function p(e,t){return e[0]-t[0]||e[1]-t[1]}function g(e,t){return e[1]-t[1]||e[0]-t[0]}function m(e){if(0===e.length)return null;for(var t=[],n=0;n<e.length;++n)t.push(e[n][0],e[n][1]);t.sort(f);var r=t[t.length>>1],o=[],a=[],s=[];for(n=0;n<e.length;++n){var l=e[n];l[1]<r?o.push(l):r<l[0]?a.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(p),u.sort(g),new i(r,m(o),m(a),c,u)}function v(e){this.root=e}o.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},o.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?l(this,e):this.left.insert(e):this.left=m([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=m([e]);else{var n=r.ge(this.leftPoints,e,p),i=r.ge(this.rightPoints,e,g);this.leftPoints.splice(n,0,e),this.rightPoints.splice(i,0,e)}},o.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,i=this.left;i.right;)n=i,i=i.right;if(n===this)i.right=this.right;else{var o=this.left,s=this.right;n.count-=i.count,n.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=r.ge(this.leftPoints,e,p);o<this.leftPoints.length&&this.leftPoints[o][0]===e[0];++o)if(this.leftPoints[o]===e)for(this.count-=1,this.leftPoints.splice(o,1),s=r.ge(this.rightPoints,e,g);s<this.rightPoints.length&&this.rightPoints[s][1]===e[1];++s)if(this.rightPoints[s]===e)return this.rightPoints.splice(s,1),1;return 0},o.queryPoint=function(e,t){return e<this.mid?this.left&&(n=this.left.queryPoint(e,t))?n:u(this.leftPoints,e,t):e>this.mid?this.right&&(n=this.right.queryPoint(e,t))?n:h(this.rightPoints,e,t):d(this.leftPoints,t);var n},o.queryInterval=function(e,t,n){var r;return e<this.mid&&this.left&&(r=this.left.queryInterval(e,t,n))||t>this.mid&&this.right&&(r=this.right.queryInterval(e,t,n))?r:t<this.mid?u(this.leftPoints,t,n):e>this.mid?h(this.rightPoints,e,n):d(this.leftPoints,n)};var y=v.prototype;y.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},y.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},y.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},y.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":31}],235:[function(e,t,n){"use strict";t.exports=function(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=n;return t}},{}],236:[function(e,t,n){t.exports=!0},{}],237:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],238:[function(e,t,n){"use strict";t.exports=o,t.exports.isMobile=o,t.exports.default=o;var r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function o(e){e||(e={});var t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;var n=e.tablet?i.test(t):r.test(t);return!n&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(n=!0),n}},{}],239:[function(e,t,n){"use strict";t.exports=function(e){for(var t,n=e.length,r=0;r<n;r++)if(((t=e.charCodeAt(r))<9||t>13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},{}],240:[function(e,t,n){t.exports=function(e,t,n){return e*(1-n)+t*n}},{}],241:[function(e,t,n){var r=e("./normalize"),i=e("gl-mat4/create"),o=e("gl-mat4/clone"),a=e("gl-mat4/determinant"),s=e("gl-mat4/invert"),l=e("gl-mat4/transpose"),c={length:e("gl-vec3/length"),normalize:e("gl-vec3/normalize"),dot:e("gl-vec3/dot"),cross:e("gl-vec3/cross")},u=i(),h=i(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function g(e,t,n,r,i){e[0]=t[0]*r+n[0]*i,e[1]=t[1]*r+n[1]*i,e[2]=t[2]*r+n[2]*i}t.exports=function(e,t,n,i,m,v){if(t||(t=[0,0,0]),n||(n=[0,0,0]),i||(i=[0,0,0]),m||(m=[0,0,0,1]),v||(v=[0,0,0,1]),!r(u,e))return!1;if(o(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(a(h)<1e-8))return!1;var y,b,_,x,w,A,k,T=u[3],S=u[7],E=u[11],C=u[12],M=u[13],O=u[14],L=u[15];if(0!==T||0!==S||0!==E){if(d[0]=T,d[1]=S,d[2]=E,d[3]=L,!s(h,h))return!1;l(h,h),y=m,_=h,x=(b=d)[0],w=b[1],A=b[2],k=b[3],y[0]=_[0]*x+_[4]*w+_[8]*A+_[12]*k,y[1]=_[1]*x+_[5]*w+_[9]*A+_[13]*k,y[2]=_[2]*x+_[6]*w+_[10]*A+_[14]*k,y[3]=_[3]*x+_[7]*w+_[11]*A+_[15]*k}else m[0]=m[1]=m[2]=0,m[3]=1;if(t[0]=C,t[1]=M,t[2]=O,function(e,t){e[0][0]=t[0],e[0][1]=t[1],e[0][2]=t[2],e[1][0]=t[4],e[1][1]=t[5],e[1][2]=t[6],e[2][0]=t[8],e[2][1]=t[9],e[2][2]=t[10]}(f,u),n[0]=c.length(f[0]),c.normalize(f[0],f[0]),i[0]=c.dot(f[0],f[1]),g(f[1],f[1],f[0],1,-i[0]),n[1]=c.length(f[1]),c.normalize(f[1],f[1]),i[0]/=n[1],i[1]=c.dot(f[0],f[2]),g(f[2],f[2],f[0],1,-i[1]),i[2]=c.dot(f[1],f[2]),g(f[2],f[2],f[1],1,-i[2]),n[2]=c.length(f[2]),c.normalize(f[2],f[2]),i[1]/=n[2],i[2]/=n[2],c.cross(p,f[1],f[2]),c.dot(f[0],p)<0)for(var D=0;D<3;D++)n[D]*=-1,f[D][0]*=-1,f[D][1]*=-1,f[D][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(v[0]=-v[0]),f[0][2]>f[2][0]&&(v[1]=-v[1]),f[1][0]>f[0][1]&&(v[2]=-v[2]),!0}},{"./normalize":242,"gl-mat4/clone":92,"gl-mat4/create":93,"gl-mat4/determinant":94,"gl-mat4/invert":98,"gl-mat4/transpose":109,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/length":172,"gl-vec3/normalize":179}],242:[function(e,t,n){t.exports=function(e,t){var n=t[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)e[i]=t[i]*r;return!0}},{}],243:[function(e,t,n){var r=e("gl-vec3/lerp"),i=e("mat4-recompose"),o=e("mat4-decompose"),a=e("gl-mat4/determinant"),s=e("quat-slerp"),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(e){return[e||0,e||0,e||0]}t.exports=function(e,t,n,h){if(0===a(t)||0===a(n))return!1;var d=o(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=o(n,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!d||!f||(r(u.translate,l.translate,c.translate,h),r(u.skew,l.skew,c.skew,h),r(u.scale,l.scale,c.scale,h),r(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(e,t,n){var r={identity:e("gl-mat4/identity"),translate:e("gl-mat4/translate"),multiply:e("gl-mat4/multiply"),create:e("gl-mat4/create"),scale:e("gl-mat4/scale"),fromRotationTranslation:e("gl-mat4/fromRotationTranslation")},i=(r.create(),r.create());t.exports=function(e,t,n,o,a,s){return r.identity(e),r.fromRotationTranslation(e,s,t),e[3]=a[0],e[7]=a[1],e[11]=a[2],e[15]=a[3],r.identity(i),0!==o[2]&&(i[9]=o[2],r.multiply(e,e,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],r.multiply(e,e,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],r.multiply(e,e,i)),r.scale(e,e,n),e}},{"gl-mat4/create":93,"gl-mat4/fromRotationTranslation":96,"gl-mat4/identity":97,"gl-mat4/multiply":100,"gl-mat4/scale":107,"gl-mat4/translate":108}],245:[function(e,t,n){"use strict";var r=e("binary-search-bounds"),i=e("mat4-interpolate"),o=e("gl-mat4/invert"),a=e("gl-mat4/rotateX"),s=e("gl-mat4/rotateY"),l=e("gl-mat4/rotateZ"),c=e("gl-mat4/lookAt"),u=e("gl-mat4/translate"),h=(e("gl-mat4/scale"),e("gl-vec3/normalize")),d=[0,0,0];function f(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(e){return new f((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(e){var t=this._time,n=r.le(t,e),a=this.computedMatrix;if(!(n<0)){var s=this._components;if(n===t.length-1)for(var l=16*n,c=0;c<16;++c)a[c]=s[l++];else{var u=t[n+1]-t[n],d=(l=16*n,this.prevMatrix),f=!0;for(c=0;c<16;++c)d[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(c=0;c<16;++c)a[c]=d[c];else i(a,d,p,(e-t[n])/u)}var g=this.computedUp;g[0]=a[1],g[1]=a[5],g[2]=a[9],h(g,g);var m=this.computedInverse;o(m,a);var v=this.computedEye,y=m[15];v[0]=m[12]/y,v[1]=m[13]/y,v[2]=m[14]/y;var b=this.computedCenter,_=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)b[c]=v[c]-a[2+4*c]*_}},p.idle=function(e){if(!(e<this.lastT())){for(var t=this._components,n=t.length-16,r=0;r<16;++r)t.push(t[n++]);this._time.push(e)}},p.flush=function(e){var t=r.gt(this._time,e)-2;t<0||(this._time.splice(0,t),this._components.splice(0,16*t))},p.lastT=function(){return this._time[this._time.length-1]},p.lookAt=function(e,t,n,r){this.recalcMatrix(e),t=t||this.computedEye,n=n||d,r=r||this.computedUp,this.setMatrix(e,c(this.computedMatrix,t,n,r));for(var i=0,o=0;o<3;++o)i+=Math.pow(n[o]-t[o],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},p.rotate=function(e,t,n,r){this.recalcMatrix(e);var i=this.computedInverse;t&&s(i,i,t),n&&a(i,i,n),r&&l(i,i,r),this.setMatrix(e,o(this.computedMatrix,i))};var g=[0,0,0];p.pan=function(e,t,n,r){g[0]=-(t||0),g[1]=-(n||0),g[2]=-(r||0),this.recalcMatrix(e);var i=this.computedInverse;u(i,i,g),this.setMatrix(e,o(i,i))},p.translate=function(e,t,n,r){g[0]=t||0,g[1]=n||0,g[2]=r||0,this.recalcMatrix(e);var i=this.computedMatrix;u(i,i,g),this.setMatrix(e,i)},p.setMatrix=function(e,t){if(!(e<this.lastT())){this._time.push(e);for(var n=0;n<16;++n)this._components.push(t[n])}},p.setDistance=function(e,t){this.computedRadius[0]=t},p.setDistanceLimits=function(e,t){var n=this._limits;n[0]=e,n[1]=t},p.getDistanceLimits=function(e){var t=this._limits;return e?(e[0]=t[0],e[1]=t[1],e):t}},{"binary-search-bounds":31,"gl-mat4/invert":98,"gl-mat4/lookAt":99,"gl-mat4/rotateX":104,"gl-mat4/rotateY":105,"gl-mat4/rotateZ":106,"gl-mat4/scale":107,"gl-mat4/translate":108,"gl-vec3/normalize":179,"mat4-interpolate":243}],246:[function(e,t,n){"use strict";t.exports=function(e){var t=e.length;if(t<3){for(var n=new Array(t),i=0;i<t;++i)n[i]=i;return 2===t&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]?[0]:n}var o=new Array(t);for(i=0;i<t;++i)o[i]=i;o.sort((function(t,n){return e[t][0]-e[n][0]||e[t][1]-e[n][1]}));var a=[o[0],o[1]],s=[o[0],o[1]];for(i=2;i<t;++i){for(var l=o[i],c=e[l],u=a.length;u>1&&r(e[a[u-2]],e[a[u-1]],c)<=0;)u-=1,a.pop();for(a.push(l),u=s.length;u>1&&r(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}n=new Array(s.length+a.length-2);for(var h=0,d=(i=0,a.length);i<d;++i)n[h++]=a[i];for(var f=s.length-2;f>0;--f)n[h++]=s[f];return n};var r=e("robust-orientation")[3]},{"robust-orientation":284}],247:[function(e,t,n){"use strict";t.exports=function(e,t){t||(t=e,e=window);var n=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=r.x(s),u=r.y(s);"buttons"in s&&(e=0|s.buttons),(e!==n||c!==i||u!==o||l(s))&&(n=0|e,i=c||0,o=u||0,t&&t(n,i,o,a))}function u(e){c(0,e)}function h(){(n||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,n=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function d(e){l(e)&&t&&t(n,i,o,a)}function f(e){0===r.buttons(e)?c(0,e):c(n,e)}function p(e){c(n|r.buttons(e),e)}function g(e){c(n&~r.buttons(e),e)}function m(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}m();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?m():s&&(s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var r=e("mouse-event")},{"mouse-event":249}],248:[function(e,t,n){var r={left:0,top:0};t.exports=function(e,t,n){t=t||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=e.clientX||0,a=e.clientY||0,s=(i=t)===window||i===document||i===document.body?r:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},{}],249:[function(e,t,n){"use strict";function r(e){return e.target||e.srcElement||window}n.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<<t-1}else if("button"in e){var t;if(1===(t=e.button))return 4;if(2===t)return 2;if(t>=0)return 1<<t}}return 0},n.element=r,n.x=function(e){if("object"==typeof e){if("offsetX"in e)return e.offsetX;var t=r(e).getBoundingClientRect();return e.clientX-t.left}return 0},n.y=function(e){if("object"==typeof e){if("offsetY"in e)return e.offsetY;var t=r(e).getBoundingClientRect();return e.clientY-t.top}return 0}},{}],250:[function(e,t,n){"use strict";var r=e("to-px");t.exports=function(e,t,n){"function"==typeof e&&(n=!!t,t=e,e=window);var i=r("ex",e),o=function(e){n&&e.preventDefault();var r=e.deltaX||0,o=e.deltaY||0,a=e.deltaZ||0,s=1;switch(e.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(o*=s,a*=s,(r*=s)||o||a)return t(r,o,a,e)};return e.addEventListener("wheel",o),o}},{"to-px":304}],251:[function(e,t,n){"use strict";var r=e("typedarray-pool");t.exports=function(e){function t(e){throw new Error("ndarray-extract-contour: "+e)}"object"!=typeof e&&t("Must specify arguments");var n=e.order;Array.isArray(n)||t("Must specify order");var o=e.arrayArguments||1;o<1&&t("Must have at least one array argument");var a=e.scalarArguments||0;a<0&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var s=e.getters||[],l=new Array(o),c=0;c<o;++c)s.indexOf(c)>=0?l[c]=!0:l[c]=!1;return function(e,t,n,o,a,s){var l=[s,a].join(",");return(0,i[l])(e,t,n,r.mallocUint32,r.freeUint32)}(e.vertex,e.cell,e.phase,0,n,l)};var i={"false,0,1":function(e,t,n,r,i){return function(o,a,s,l){var c,u=0|o.shape[0],h=0|o.shape[1],d=o.data,f=0|o.offset,p=0|o.stride[0],g=0|o.stride[1],m=f,v=0|-p,y=0,b=0|-g,_=0,x=-p-g|0,w=0,A=0|p,k=g-p*u|0,T=0,S=0,E=0,C=2*u|0,M=r(C),O=r(C),L=0,D=0,I=-1,R=-1,P=0,N=0|-u,z=0|u,F=0,B=-u-1|0,j=u-1|0,U=0,V=0,q=0;for(T=0;T<u;++T)M[L++]=n(d[m],a,s,l),m+=A;if(m+=k,h>0){if(S=1,M[L++]=n(d[m],a,s,l),m+=A,u>0)for(T=1,c=d[m],D=M[L]=n(c,a,s,l),P=M[L+I],F=M[L+N],U=M[L+B],D===P&&D===F&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,P,F,U,a,s,l),V=O[L]=E++),L+=1,m+=A,T=2;T<u;++T)c=d[m],D=M[L]=n(c,a,s,l),P=M[L+I],F=M[L+N],U=M[L+B],D===P&&D===F&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,P,F,U,a,s,l),V=O[L]=E++,U!==P&&t(O[L+I],V,w,y,U,P,a,s,l)),L+=1,m+=A;for(m+=k,L=0,q=I,I=R,R=q,q=N,N=z,z=q,q=B,B=j,j=q,S=2;S<h;++S){if(M[L++]=n(d[m],a,s,l),m+=A,u>0)for(T=1,c=d[m],D=M[L]=n(c,a,s,l),P=M[L+I],F=M[L+N],U=M[L+B],D===P&&D===F&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,P,F,U,a,s,l),V=O[L]=E++,U!==F&&t(O[L+N],V,_,w,F,U,a,s,l)),L+=1,m+=A,T=2;T<u;++T)c=d[m],D=M[L]=n(c,a,s,l),P=M[L+I],F=M[L+N],U=M[L+B],D===P&&D===F&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,P,F,U,a,s,l),V=O[L]=E++,U!==F&&t(O[L+N],V,_,w,F,U,a,s,l),U!==P&&t(O[L+I],V,w,y,U,P,a,s,l)),L+=1,m+=A;1&S&&(L=0),q=I,I=R,R=q,q=N,N=z,z=q,q=B,B=j,j=q,m+=k}}i(O),i(M)}},"false,1,0":function(e,t,n,r,i){return function(o,a,s,l){var c,u=0|o.shape[0],h=0|o.shape[1],d=o.data,f=0|o.offset,p=0|o.stride[0],g=0|o.stride[1],m=f,v=0|-p,y=0,b=0|-g,_=0,x=-p-g|0,w=0,A=0|g,k=p-g*h|0,T=0,S=0,E=0,C=2*h|0,M=r(C),O=r(C),L=0,D=0,I=-1,R=-1,P=0,N=0|-h,z=0|h,F=0,B=-h-1|0,j=h-1|0,U=0,V=0,q=0;for(S=0;S<h;++S)M[L++]=n(d[m],a,s,l),m+=A;if(m+=k,u>0){if(T=1,M[L++]=n(d[m],a,s,l),m+=A,h>0)for(S=1,c=d[m],D=M[L]=n(c,a,s,l),F=M[L+N],P=M[L+I],U=M[L+B],D===F&&D===P&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,F,P,U,a,s,l),V=O[L]=E++),L+=1,m+=A,S=2;S<h;++S)c=d[m],D=M[L]=n(c,a,s,l),F=M[L+N],P=M[L+I],U=M[L+B],D===F&&D===P&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,F,P,U,a,s,l),V=O[L]=E++,U!==P&&t(O[L+I],V,_,w,P,U,a,s,l)),L+=1,m+=A;for(m+=k,L=0,q=N,N=z,z=q,q=I,I=R,R=q,q=B,B=j,j=q,T=2;T<u;++T){if(M[L++]=n(d[m],a,s,l),m+=A,h>0)for(S=1,c=d[m],D=M[L]=n(c,a,s,l),F=M[L+N],P=M[L+I],U=M[L+B],D===F&&D===P&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,F,P,U,a,s,l),V=O[L]=E++,U!==F&&t(O[L+N],V,w,y,U,F,a,s,l)),L+=1,m+=A,S=2;S<h;++S)c=d[m],D=M[L]=n(c,a,s,l),F=M[L+N],P=M[L+I],U=M[L+B],D===F&&D===P&&D===U||(y=d[m+v],_=d[m+b],w=d[m+x],e(T,S,c,y,_,w,D,F,P,U,a,s,l),V=O[L]=E++,U!==P&&t(O[L+I],V,_,w,P,U,a,s,l),U!==F&&t(O[L+N],V,w,y,U,F,a,s,l)),L+=1,m+=A;1&T&&(L=0),q=N,N=z,z=q,q=I,I=R,R=q,q=B,B=j,j=q,m+=k}}i(O),i(M)}}}},{"typedarray-pool":308}],252:[function(e,t,n){"use strict";var r=e("dup"),i={zero:function(e,t,n,r){var i=e[0];r|=0;var o=0,a=n[0];for(o=0;o<i;++o)t[r]=0,r+=a},fdTemplate1:function(e,t,n,r,i,o,a){var s=e[0],l=n[0],c=-1*l,u=l;r|=0,a|=0;var h=0,d=l,f=o[0];for(h=0;h<s;++h)i[a]=.5*(t[r+c]-t[r+u]),r+=d,a+=f},fdTemplate2:function(e,t,n,r,i,o,a,s,l,c){var u=e[0],h=e[1],d=n[0],f=n[1],p=o[0],g=o[1],m=l[0],v=l[1],y=-1*d,b=d,_=-1*f,x=f;r|=0,a|=0,c|=0;var w=0,A=0,k=f,T=d-h*f,S=g,E=p-h*g,C=v,M=m-h*v;for(A=0;A<u;++A){for(w=0;w<h;++w)i[a]=.5*(t[r+y]-t[r+b]),s[c]=.5*(t[r+_]-t[r+x]),r+=k,a+=S,c+=C;r+=T,a+=E,c+=M}}},o={cdiff:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=i.dtype,u=i.order,h=[o,a.join(),s,l.join(),c,u.join()].join(),d=t[h];return d||(t[h]=d=e([o,a,s,l,c,u])),d(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i.data,i.stride,0|i.offset)}},zero:function(e){var t={};return function(n){var r=n.dtype,i=n.order,o=[r,i.join()].join(),a=t[o];return a||(t[o]=a=e([r,i])),a(n.shape.slice(0),n.data,n.stride,0|n.offset)}},fdTemplate1:function(e){var t={};return function(n,r){var i=n.dtype,o=n.order,a=r.dtype,s=r.order,l=[i,o.join(),a,s.join()].join(),c=t[l];return c||(t[l]=c=e([i,o,a,s])),c(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset)}},fdTemplate2:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=i.dtype,u=i.order,h=[o,a.join(),s,l.join(),c,u.join()].join(),d=t[h];return d||(t[h]=d=e([o,a,s,l,c,u])),d(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i.data,i.stride,0|i.offset)}}};function a(e){return(0,o[e.funcName])(s.bind(void 0,e))}function s(e){return i[e.funcName]}function l(e){return a({funcName:e.funcName})}var c={},u={},h=l({funcName:"cdiff"}),d=l({funcName:"zero"});function f(e){return e in c?c[e]:c[e]=l({funcName:"fdTemplate"+e})}function p(e,t,n,r){return function(e,i){var o=i.shape.slice();return o[0]>2&&o[1]>2&&r(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(n(i.pick(0,-1).lo(1).hi(o[1]-2),e.pick(0,-1,1).lo(1).hi(o[1]-2)),t(e.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(n(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),e.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),t(e.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(n(i.pick(-1,0).lo(1).hi(o[0]-2),e.pick(-1,0,0).lo(1).hi(o[0]-2)),t(e.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(n(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),e.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),t(e.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(o[0]-1,0,0,0),e.set(o[0]-1,0,1,0),e.set(0,o[1]-1,0,0),e.set(0,o[1]-1,1,0),e.set(o[0]-1,o[1]-1,0,0),e.set(o[0]-1,o[1]-1,1,0),e}}t.exports=function(e,t,n){return Array.isArray(n)||(n=r(t.dimension,"string"==typeof n?n:"clamp")),0===t.size?e:0===t.dimension?(e.set(0),e):function(e){var t=e.join();if(o=u[t])return o;for(var n=e.length,r=[h,d],i=1;i<=n;++i)r.push(f(i));var o=p.apply(void 0,r);return u[t]=o,o}(n)(e,t)}},{dup:65}],253:[function(e,t,n){"use strict";function r(e,t){var n=Math.floor(t),r=t-n,i=0<=n&&n<e.shape[0],o=0<=n+1&&n+1<e.shape[0];return(1-r)*(i?+e.get(n):0)+r*(o?+e.get(n+1):0)}function i(e,t,n){var r=Math.floor(t),i=t-r,o=0<=r&&r<e.shape[0],a=0<=r+1&&r+1<e.shape[0],s=Math.floor(n),l=n-s,c=0<=s&&s<e.shape[1],u=0<=s+1&&s+1<e.shape[1],h=o&&c?e.get(r,s):0,d=o&&u?e.get(r,s+1):0;return(1-l)*((1-i)*h+i*(a&&c?e.get(r+1,s):0))+l*((1-i)*d+i*(a&&u?e.get(r+1,s+1):0))}function o(e,t,n,r){var i=Math.floor(t),o=t-i,a=0<=i&&i<e.shape[0],s=0<=i+1&&i+1<e.shape[0],l=Math.floor(n),c=n-l,u=0<=l&&l<e.shape[1],h=0<=l+1&&l+1<e.shape[1],d=Math.floor(r),f=r-d,p=0<=d&&d<e.shape[2],g=0<=d+1&&d+1<e.shape[2],m=a&&u&&p?e.get(i,l,d):0,v=a&&h&&p?e.get(i,l+1,d):0,y=s&&u&&p?e.get(i+1,l,d):0,b=s&&h&&p?e.get(i+1,l+1,d):0,_=a&&u&&g?e.get(i,l,d+1):0,x=a&&h&&g?e.get(i,l+1,d+1):0;return(1-f)*((1-c)*((1-o)*m+o*y)+c*((1-o)*v+o*b))+f*((1-c)*((1-o)*_+o*(s&&u&&g?e.get(i+1,l,d+1):0))+c*((1-o)*x+o*(s&&h&&g?e.get(i+1,l+1,d+1):0)))}function a(e){var t,n,r=0|e.shape.length,i=new Array(r),o=new Array(r),a=new Array(r),s=new Array(r);for(t=0;t<r;++t)n=+arguments[t+1],i[t]=Math.floor(n),o[t]=n-i[t],a[t]=0<=i[t]&&i[t]<e.shape[t],s[t]=0<=i[t]+1&&i[t]+1<e.shape[t];var l,c,u,h=0;e:for(t=0;t<1<<r;++t){for(c=1,u=e.offset,l=0;l<r;++l)if(t&1<<l){if(!s[l])continue e;c*=o[l],u+=e.stride[l]*(i[l]+1)}else{if(!a[l])continue e;c*=1-o[l],u+=e.stride[l]*i[l]}h+=c*e.data[u]}return h}t.exports=function(e,t,n,s){switch(e.shape.length){case 0:return 0;case 1:return r(e,t);case 2:return i(e,t,n);case 3:return o(e,t,n,s);default:return a.apply(void 0,arguments)}},t.exports.d1=r,t.exports.d2=i,t.exports.d3=o},{}],254:[function(e,t,n){"use strict";var r={"float64,2,1,0":function(){return function(e,t,n,r,i){var o=e[0],a=e[1],s=e[2],l=n[0],c=n[1],u=n[2];r|=0;var h=0,d=0,f=0,p=u,g=c-s*u,m=l-a*c;for(f=0;f<o;++f){for(d=0;d<a;++d){for(h=0;h<s;++h)t[r]/=i,r+=p;r+=g}r+=m}}},"uint8,2,0,1,float64,2,1,0":function(){return function(e,t,n,r,i,o,a,s){for(var l=e[0],c=e[1],u=e[2],h=n[0],d=n[1],f=n[2],p=o[0],g=o[1],m=o[2],v=r|=0,y=a|=0,b=0|e[0];b>0;){b<64?(l=b,b=0):(l=64,b-=64);for(var _=0|e[1];_>0;){_<64?(c=_,_=0):(c=64,_-=64),r=v+b*h+_*d,a=y+b*p+_*g;var x=0,w=0,A=0,k=f,T=h-u*f,S=d-l*h,E=m,C=p-u*m,M=g-l*p;for(A=0;A<c;++A){for(w=0;w<l;++w){for(x=0;x<u;++x)t[r]=i[a]*s,r+=k,a+=E;r+=T,a+=C}r+=S,a+=M}}}}},"float32,1,0,float32,1,0":function(){return function(e,t,n,r,i,o,a){var s=e[0],l=e[1],c=n[0],u=n[1],h=o[0],d=o[1];r|=0,a|=0;var f=0,p=0,g=u,m=c-l*u,v=d,y=h-l*d;for(p=0;p<s;++p){for(f=0;f<l;++f)t[r]=i[a],r+=g,a+=v;r+=m,a+=y}}},"float32,1,0,float32,0,1":function(){return function(e,t,n,r,i,o,a){for(var s=e[0],l=e[1],c=n[0],u=n[1],h=o[0],d=o[1],f=r|=0,p=a|=0,g=0|e[1];g>0;){g<64?(l=g,g=0):(l=64,g-=64);for(var m=0|e[0];m>0;){m<64?(s=m,m=0):(s=64,m-=64),r=f+g*u+m*c,a=p+g*d+m*h;var v=0,y=0,b=u,_=c-l*u,x=d,w=h-l*d;for(y=0;y<s;++y){for(v=0;v<l;++v)t[r]=i[a],r+=b,a+=x;r+=_,a+=w}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(e,t,n,r,i,o,a){for(var s=e[0],l=e[1],c=e[2],u=n[0],h=n[1],d=n[2],f=o[0],p=o[1],g=o[2],m=r|=0,v=a|=0,y=0|e[2];y>0;){y<64?(c=y,y=0):(c=64,y-=64);for(var b=0|e[0];b>0;){b<64?(s=b,b=0):(s=64,b-=64);for(var _=0|e[1];_>0;){_<64?(l=_,_=0):(l=64,_-=64),r=m+y*d+b*u+_*h,a=v+y*g+b*f+_*p;var x=0,w=0,A=0,k=d,T=u-c*d,S=h-s*u,E=g,C=f-c*g,M=p-s*f;for(A=0;A<l;++A){for(w=0;w<s;++w){for(x=0;x<c;++x)t[r]=i[a],r+=k,a+=E;r+=T,a+=C}r+=S,a+=M}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(e,t,n,r,i,o,a){var s=e[0],l=e[1],c=e[2],u=n[0],h=n[1],d=n[2],f=o[0],p=o[1],g=o[2];r|=0,a|=0;var m=0,v=0,y=0,b=d,_=u-c*d,x=h-s*u,w=g,A=f-c*g,k=p-s*f;for(y=0;y<l;++y){for(v=0;v<s;++v){for(m=0;m<c;++m)t[r]=i[a],r+=b,a+=w;r+=_,a+=A}r+=x,a+=k}}}};var i=function(e,t){var n=t.join(",");return(0,r[n])()},o={mul:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=i.dtype,u=i.order,h=[o,a.join(),s,l.join(),c,u.join()].join(),d=t[h];return d||(t[h]=d=e([o,a,s,l,c,u])),d(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i.data,i.stride,0|i.offset)}},muls:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=[o,a.join(),s,l.join()].join(),u=t[c];return u||(t[c]=u=e([o,a,s,l])),u(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i)}},mulseq:function(e){var t={};return function(n,r){var i=n.dtype,o=n.order,a=[i,o.join()].join(),s=t[a];return s||(t[a]=s=e([i,o])),s(n.shape.slice(0),n.data,n.stride,0|n.offset,r)}},div:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=i.dtype,u=i.order,h=[o,a.join(),s,l.join(),c,u.join()].join(),d=t[h];return d||(t[h]=d=e([o,a,s,l,c,u])),d(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i.data,i.stride,0|i.offset)}},divs:function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=r.dtype,l=r.order,c=[o,a.join(),s,l.join()].join(),u=t[c];return u||(t[c]=u=e([o,a,s,l])),u(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset,i)}},divseq:function(e){var t={};return function(n,r){var i=n.dtype,o=n.order,a=[i,o.join()].join(),s=t[a];return s||(t[a]=s=e([i,o])),s(n.shape.slice(0),n.data,n.stride,0|n.offset,r)}},assign:function(e){var t={};return function(n,r){var i=n.dtype,o=n.order,a=r.dtype,s=r.order,l=[i,o.join(),a,s.join()].join(),c=t[l];return c||(t[l]=c=e([i,o,a,s])),c(n.shape.slice(0),n.data,n.stride,0|n.offset,r.data,r.stride,0|r.offset)}}};function a(e){return t={funcName:e.funcName},(0,o[t.funcName])(i.bind(void 0,t));var t}var s={mul:"*",div:"/"};!function(){for(var e in s)n[e]=a({funcName:e}),n[e+"s"]=a({funcName:e+"s"}),n[e+"seq"]=a({funcName:e+"seq"})}(),n.assign=a({funcName:"assign"})},{}],255:[function(e,t,n){"use strict";var r=e("ndarray"),i=e("./doConvert.js");t.exports=function(e,t){for(var n=[],o=e,a=1;Array.isArray(o);)n.push(o.length),a*=o.length,o=o[0];return 0===n.length?r():(t||(t=r(new Float64Array(a),n)),i(t,e),t)}},{"./doConvert.js":256,ndarray:259}],256:[function(e,t,n){"use strict";var r,i=function(){return function(e,t,n,r,i){var o=e[0],a=e[1],s=e[2],l=n[0],c=n[1],u=n[2],h=[0,0,0];r|=0;var d=0,f=0,p=0,g=u,m=c-s*u,v=l-a*c;for(p=0;p<o;++p){for(f=0;f<a;++f){for(d=0;d<s;++d){var y,b=i;for(y=0;y<h.length-1;++y)b=b[h[y]];t[r]=b[h[h.length-1]],r+=g,++h[2]}r+=m,h[2]-=s,++h[1]}r+=v,h[1]-=a,++h[0]}}};t.exports=(r={funcName:{funcName:"convert"}.funcName},function(e){var t={};return function(n,r){var i=n.dtype,o=n.order,a=[i,o.join()].join(),s=t[a];return s||(t[a]=s=e([i,o])),s(n.shape.slice(0),n.data,n.stride,0|n.offset,r)}}(i.bind(void 0,r)))},{}],257:[function(e,t,n){"use strict";var r=e("typedarray-pool");function i(e){return"uint32"===e?[r.mallocUint32,r.freeUint32]:null}var o={"uint32,1,0":function(e,t){return function(n,r,i,o,a,s,l,c,u,h,d){var f,p,g,m,v,y,b,_,x=n*a+o,w=e(c);for(f=n+1;f<=r;++f){for(p=f,g=x+=a,v=0,y=x,m=0;m<c;++m)w[v++]=i[y],y+=u;e:for(;p-- >n;){v=0,y=g-a;t:for(m=0;m<c;++m){if((b=i[y])<(_=w[v]))break e;if(b>_)break t;y+=h,v+=d}for(v=g,y=g-a,m=0;m<c;++m)i[v]=i[y],v+=u,y+=u;g-=a}for(v=g,y=0,m=0;m<c;++m)i[v]=w[y++],v+=u}t(w)}}};var a={"uint32,1,0":function(e,t,n){return function r(i,o,a,s,l,c,u,h,d,f,p){var g,m,v,y,b,_,x,w,A,k,T,S,E,C,M,O,L,D,I,R,P,N,z,F,B,j=(o-i+1)/6|0,U=i+j,V=o-j,q=i+o>>1,H=q-j,$=q+j,W=U,G=H,Y=q,X=$,Z=V,K=i+1,J=o-1,Q=!0,ee=0,te=0,ne=0,re=h,ie=t(re),oe=t(re);T=l*W,S=l*G,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=W,W=G,G=m;break e}if(ne<0)break e;B+=f}T=l*X,S=l*Z,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=X,X=Z,Z=m;break e}if(ne<0)break e;B+=f}T=l*W,S=l*Y,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=W,W=Y,Y=m;break e}if(ne<0)break e;B+=f}T=l*G,S=l*Y,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=G,G=Y,Y=m;break e}if(ne<0)break e;B+=f}T=l*W,S=l*X,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=W,W=X,X=m;break e}if(ne<0)break e;B+=f}T=l*Y,S=l*X,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=Y,Y=X,X=m;break e}if(ne<0)break e;B+=f}T=l*G,S=l*Z,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=G,G=Z,Z=m;break e}if(ne<0)break e;B+=f}T=l*G,S=l*Y,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=G,G=Y,Y=m;break e}if(ne<0)break e;B+=f}T=l*X,S=l*Z,B=s;e:for(k=0;k<h;++k){if(w=S+B,(ne=a[x=T+B]-a[w])>0){m=X,X=Z,Z=m;break e}if(ne<0)break e;B+=f}for(T=l*W,S=l*G,E=l*Y,C=l*X,M=l*Z,O=l*U,L=l*q,D=l*V,F=0,B=s,k=0;k<h;++k)x=T+B,w=S+B,A=E+B,I=C+B,R=M+B,P=O+B,N=L+B,z=D+B,ie[F]=a[w],oe[F]=a[I],Q=Q&&ie[F]===oe[F],v=a[x],y=a[A],b=a[R],a[P]=v,a[N]=y,a[z]=b,++F,B+=d;for(T=l*H,S=l*i,B=s,k=0;k<h;++k)w=S+B,a[x=T+B]=a[w],B+=d;for(T=l*$,S=l*o,B=s,k=0;k<h;++k)w=S+B,a[x=T+B]=a[w],B+=d;if(Q)for(_=K;_<=J;++_){for(x=s+_*l,F=0,k=0;k<h&&0==(ne=a[x]-ie[F]);++k)F+=p,x+=f;if(0!==ne)if(ne<0){if(_!==K)for(T=l*_,S=l*K,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;++K}else for(;;){for(x=s+J*l,F=0,k=0;k<h&&0==(ne=a[x]-ie[F]);++k)F+=p,x+=f;if(!(ne>0)){if(ne<0){for(T=l*_,S=l*K,E=l*J,B=s,k=0;k<h;++k)w=S+B,A=E+B,g=a[x=T+B],a[x]=a[w],a[w]=a[A],a[A]=g,B+=d;++K,--J;break}for(T=l*_,S=l*J,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;--J;break}J--}}else for(_=K;_<=J;++_){for(x=s+_*l,F=0,k=0;k<h&&0==(ee=a[x]-ie[F]);++k)F+=p,x+=f;if(ee<0){if(_!==K)for(T=l*_,S=l*K,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;++K}else{for(x=s+_*l,F=0,k=0;k<h&&0==(te=a[x]-oe[F]);++k)F+=p,x+=f;if(te>0)for(;;){for(x=s+J*l,F=0,k=0;k<h&&0==(ne=a[x]-oe[F]);++k)F+=p,x+=f;if(!(ne>0)){for(x=s+J*l,F=0,k=0;k<h&&0==(ne=a[x]-ie[F]);++k)F+=p,x+=f;if(ne<0){for(T=l*_,S=l*K,E=l*J,B=s,k=0;k<h;++k)w=S+B,A=E+B,g=a[x=T+B],a[x]=a[w],a[w]=a[A],a[A]=g,B+=d;++K,--J}else{for(T=l*_,S=l*J,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;--J}break}if(--J<_)break}}}for(T=l*i,S=l*(K-1),F=0,B=s,k=0;k<h;++k)w=S+B,a[x=T+B]=a[w],a[w]=ie[F],++F,B+=d;for(T=l*o,S=l*(J+1),F=0,B=s,k=0;k<h;++k)w=S+B,a[x=T+B]=a[w],a[w]=oe[F],++F,B+=d;if(K-2-i<=32?e(i,K-2,a,s,l,c,u,h,d,f,p):r(i,K-2,a,s,l,c,u,h,d,f,p),o-(J+2)<=32?e(J+2,o,a,s,l,c,u,h,d,f,p):r(J+2,o,a,s,l,c,u,h,d,f,p),Q)return n(ie),void n(oe);if(K<U&&J>V){e:for(;;){for(x=s+K*l,F=0,B=s,k=0;k<h;++k){if(a[x]!==ie[F])break e;++F,x+=d}++K}e:for(;;){for(x=s+J*l,F=0,B=s,k=0;k<h;++k){if(a[x]!==oe[F])break e;++F,x+=d}--J}for(_=K;_<=J;++_){for(x=s+_*l,F=0,k=0;k<h&&0==(ee=a[x]-ie[F]);++k)F+=p,x+=f;if(0===ee){if(_!==K)for(T=l*_,S=l*K,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;++K}else{for(x=s+_*l,F=0,k=0;k<h&&0==(te=a[x]-oe[F]);++k)F+=p,x+=f;if(0===te)for(;;){for(x=s+J*l,F=0,k=0;k<h&&0==(ne=a[x]-oe[F]);++k)F+=p,x+=f;if(0!==ne){for(x=s+J*l,F=0,k=0;k<h&&0==(ne=a[x]-ie[F]);++k)F+=p,x+=f;if(ne<0){for(T=l*_,S=l*K,E=l*J,B=s,k=0;k<h;++k)w=S+B,A=E+B,g=a[x=T+B],a[x]=a[w],a[w]=a[A],a[A]=g,B+=d;++K,--J}else{for(T=l*_,S=l*J,B=s,k=0;k<h;++k)w=S+B,g=a[x=T+B],a[x]=a[w],a[w]=g,B+=d;--J}break}if(--J<_)break}}}}n(ie),n(oe),J-K<=32?e(K,J,a,s,l,c,u,h,d,f,p):r(K,J,a,s,l,c,u,h,d,f,p)}}};var s={"uint32,1,0":function(e,t){return function(n){var r=n.data,i=0|n.offset,o=n.shape,a=n.stride,s=0|a[0],l=0|o[0],c=0|a[1],u=0|o[1],h=c,d=c;l<=32?e(0,l-1,r,i,s,c,l,u,h,d,1):t(0,l-1,r,i,s,c,l,u,h,d,1)}}};t.exports=function(e,t){var n=[t,e].join(","),r=s[n],l=function(e,t){var n=i(t),r=[t,e].join(","),a=o[r];return n?a(n[0],n[1]):a()}(e,t);return r(l,function(e,t,n){var r=i(t),o=[t,e].join(","),s=a[o];return e.length>1&&r?s(n,r[0],r[1]):s(n)}(e,t,l))}},{"typedarray-pool":308}],258:[function(e,t,n){"use strict";var r=e("./lib/compile_sort.js"),i={};t.exports=function(e){var t=e.order,n=e.dtype,o=[t,n].join(":"),a=i[o];return a||(i[o]=a=r(t,n)),a(e),e}},{"./lib/compile_sort.js":257}],259:[function(e,t,n){var r=e("is-buffer"),i="undefined"!=typeof Float64Array;function o(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,n=new Array(t.length);for(e=0;e<n.length;++e)n[e]=[Math.abs(t[e]),e];n.sort(o);var r=new Array(n.length);for(e=0;e<r.length;++e)r[e]=n[e][1];return r}var s={T:function(e){function t(e){this.data=e}var n=t.prototype;return n.dtype=e,n.index=function(){return-1},n.size=0,n.dimension=-1,n.shape=n.stride=n.order=[],n.lo=n.hi=n.transpose=n.step=function(){return new t(this.data)},n.get=n.set=function(){},n.pick=function(){return null},function(e){return new t(e)}},0:function(e,t){function n(e,t){this.data=e,this.offset=t}var r=n.prototype;return r.dtype=e,r.index=function(){return this.offset},r.dimension=0,r.size=1,r.shape=r.stride=r.order=[],r.lo=r.hi=r.transpose=r.step=function(){return new n(this.data,this.offset)},r.pick=function(){return t(this.data)},r.valueOf=r.get=function(){return"generic"===e?this.data.get(this.offset):this.data[this.offset]},r.set=function(t){return"generic"===e?this.data.set(this.offset,t):this.data[this.offset]=t},function(e,t,r,i){return new n(e,i)}},1:function(e,t,n){function r(e,t,n,r){this.data=e,this.shape=[t],this.stride=[n],this.offset=0|r}var i=r.prototype;return i.dtype=e,i.dimension=1,Object.defineProperty(i,"size",{get:function(){return this.shape[0]}}),i.order=[0],i.set=function(t,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t,n):this.data[this.offset+this.stride[0]*t]=n},i.get=function(t){return"generic"===e?this.data.get(this.offset+this.stride[0]*t):this.data[this.offset+this.stride[0]*t]},i.index=function(e){return this.offset+this.stride[0]*e},i.hi=function(e){return new r(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,this.stride[0],this.offset)},i.lo=function(e){var t=this.offset,n=0,i=this.shape[0],o=this.stride[0];return"number"==typeof e&&e>=0&&(t+=o*(n=0|e),i-=n),new r(this.data,i,o,t)},i.step=function(e){var t=this.shape[0],n=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"==typeof e&&((o=0|e)<0?(i+=n*(t-1),t=a(-t/o)):t=a(t/o),n*=o),new r(this.data,t,n,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,n=this.stride;return new r(this.data,t[e],n[e],this.offset)},i.pick=function(e){var n=[],r=[],i=this.offset;return"number"==typeof e&&e>=0?i=i+this.stride[0]*e|0:(n.push(this.shape[0]),r.push(this.stride[0])),(0,t[n.length+1])(this.data,n,r,i)},function(e,t,n,i){return new r(e,t[0],n[0],i)}},2:function(e,t,n){function r(e,t,n,r,i,o){this.data=e,this.shape=[t,n],this.stride=[r,i],this.offset=0|o}var i=r.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,n,r){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n,r):this.data[this.offset+this.stride[0]*t+this.stride[1]*n]=r},i.get=function(t,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*n]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new r(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var n=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(n+=s*(i=0|e),o-=i),"number"==typeof t&&t>=0&&(n+=l*(i=0|t),a-=i),new r(this.data,o,a,s,l,n)},i.step=function(e,t){var n=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=o*(n-1),n=c(-n/l)):n=c(n/l),o*=l),"number"==typeof t&&((l=0|t)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new r(this.data,n,i,o,a,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var n=this.shape,i=this.stride;return new r(this.data,n[e],n[t],i[e],i[t],this.offset)},i.pick=function(e,n){var r=[],i=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(r.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof n&&n>=0?o=o+this.stride[1]*n|0:(r.push(this.shape[1]),i.push(this.stride[1])),(0,t[r.length+1])(this.data,r,i,o)},function(e,t,n,i){return new r(e,t[0],t[1],n[0],n[1],i)}},3:function(e,t,n){function r(e,t,n,r,i,o,a,s){this.data=e,this.shape=[t,n,r],this.stride=[i,o,a],this.offset=0|s}var i=r.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),n=Math.abs(this.stride[2]);return e>t?t>n?[2,1,0]:e>n?[1,2,0]:[1,0,2]:e>n?[2,0,1]:n>t?[0,1,2]:[0,2,1]}}),i.set=function(t,n,r,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r]=i},i.get=function(t,n,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r]},i.index=function(e,t,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n},i.hi=function(e,t,n){return new r(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof n||n<0?this.shape[2]:0|n,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,n){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(i+=c*(o=0|e),a-=o),"number"==typeof t&&t>=0&&(i+=u*(o=0|t),s-=o),"number"==typeof n&&n>=0&&(i+=h*(o=0|n),l-=o),new r(this.data,a,s,l,c,u,h,i)},i.step=function(e,t,n){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(i-1),i=d(-i/h)):i=d(i/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(o-1),o=d(-o/h)):o=d(o/h),l*=h),"number"==typeof n&&((h=0|n)<0?(u+=c*(a-1),a=d(-a/h)):a=d(a/h),c*=h),new r(this.data,i,o,a,s,l,c,u)},i.transpose=function(e,t,n){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n;var i=this.shape,o=this.stride;return new r(this.data,i[e],i[t],i[n],o[e],o[t],o[n],this.offset)},i.pick=function(e,n,r){var i=[],o=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof n&&n>=0?a=a+this.stride[1]*n|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof r&&r>=0?a=a+this.stride[2]*r|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,t[i.length+1])(this.data,i,o,a)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],n[0],n[1],n[2],i)}},4:function(e,t,n){function r(e,t,n,r,i,o,a,s,l,c){this.data=e,this.shape=[t,n,r,i],this.stride=[o,a,s,l],this.offset=0|c}var i=r.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:n}),i.set=function(t,n,r,i,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i]=o},i.get=function(t,n,r,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i]},i.index=function(e,t,n,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n+this.stride[3]*r},i.hi=function(e,t,n,i){return new r(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof n||n<0?this.shape[2]:0|n,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,n,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof e&&e>=0&&(o+=h*(a=0|e),s-=a),"number"==typeof t&&t>=0&&(o+=d*(a=0|t),l-=a),"number"==typeof n&&n>=0&&(o+=f*(a=0|n),c-=a),"number"==typeof i&&i>=0&&(o+=p*(a=0|i),u-=a),new r(this.data,s,l,c,u,h,d,f,p,o)},i.step=function(e,t,n,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,g=Math.ceil;return"number"==typeof e&&((p=0|e)<0?(f+=c*(o-1),o=g(-o/p)):o=g(o/p),c*=p),"number"==typeof t&&((p=0|t)<0?(f+=u*(a-1),a=g(-a/p)):a=g(a/p),u*=p),"number"==typeof n&&((p=0|n)<0?(f+=h*(s-1),s=g(-s/p)):s=g(s/p),h*=p),"number"==typeof i&&((p=0|i)<0?(f+=d*(l-1),l=g(-l/p)):l=g(l/p),d*=p),new r(this.data,o,a,s,l,c,u,h,d,f)},i.transpose=function(e,t,n,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new r(this.data,o[e],o[t],o[n],o[i],a[e],a[t],a[n],a[i],this.offset)},i.pick=function(e,n,r,i){var o=[],a=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof n&&n>=0?s=s+this.stride[1]*n|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof r&&r>=0?s=s+this.stride[2]*r|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,t[o.length+1])(this.data,o,a,s)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],t[3],n[0],n[1],n[2],n[3],i)}},5:function(e,t,n){function r(e,t,n,r,i,o,a,s,l,c,u,h){this.data=e,this.shape=[t,n,r,i,o],this.stride=[a,s,l,c,u],this.offset=0|h}var i=r.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:n}),i.set=function(t,n,r,i,o,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(t,n,r,i,o){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*t+this.stride[1]*n+this.stride[2]*r+this.stride[3]*i+this.stride[4]*o]},i.index=function(e,t,n,r,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*n+this.stride[3]*r+this.stride[4]*i},i.hi=function(e,t,n,i,o){return new r(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof n||n<0?this.shape[2]:0|n,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,n,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],g=this.stride[2],m=this.stride[3],v=this.stride[4];return"number"==typeof e&&e>=0&&(a+=f*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(a+=p*(s=0|t),c-=s),"number"==typeof n&&n>=0&&(a+=g*(s=0|n),u-=s),"number"==typeof i&&i>=0&&(a+=m*(s=0|i),h-=s),"number"==typeof o&&o>=0&&(a+=v*(s=0|o),d-=s),new r(this.data,l,c,u,h,d,f,p,g,m,v,a)},i.step=function(e,t,n,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],g=this.stride[4],m=this.offset,v=0,y=Math.ceil;return"number"==typeof e&&((v=0|e)<0?(m+=h*(a-1),a=y(-a/v)):a=y(a/v),h*=v),"number"==typeof t&&((v=0|t)<0?(m+=d*(s-1),s=y(-s/v)):s=y(s/v),d*=v),"number"==typeof n&&((v=0|n)<0?(m+=f*(l-1),l=y(-l/v)):l=y(l/v),f*=v),"number"==typeof i&&((v=0|i)<0?(m+=p*(c-1),c=y(-c/v)):c=y(c/v),p*=v),"number"==typeof o&&((v=0|o)<0?(m+=g*(u-1),u=y(-u/v)):u=y(u/v),g*=v),new r(this.data,a,s,l,c,u,h,d,f,p,g,m)},i.transpose=function(e,t,n,i,o){e=void 0===e?0:0|e,t=void 0===t?1:0|t,n=void 0===n?2:0|n,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new r(this.data,a[e],a[t],a[n],a[i],a[o],s[e],s[t],s[n],s[i],s[o],this.offset)},i.pick=function(e,n,r,i,o){var a=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof n&&n>=0?l=l+this.stride[1]*n|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof r&&r>=0?l=l+this.stride[2]*r|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,t[a.length+1])(this.data,a,s,l)},function(e,t,n,i){return new r(e,t[0],t[1],t[2],t[3],t[4],n[0],n[1],n[2],n[3],n[4],i)}}};function l(e,t){var n=-1===t?"T":String(t),r=s[n];return-1===t?r(e):0===t?r(e,c[e][0]):r(e,c[e],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(e,t,n,o){if(void 0===e)return(0,c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var a=t.length;if(void 0===n){n=new Array(a);for(var s=a-1,u=1;s>=0;--s)n[s]=u,u*=t[s]}if(void 0===o)for(o=0,s=0;s<a;++s)n[s]<0&&(o-=(t[s]-1)*n[s]);for(var h=function(e){if(r(e))return"buffer";if(i)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(e)?"array":"generic"}(e),d=c[h];d.length<=a+1;)d.push(l(h,d.length-1));return(0,d[a+1])(e,t,n,o)}},{"is-buffer":237}],260:[function(e,t,n){"use strict";var r=e("double-bits"),i=Math.pow(2,-1074),o=-1>>>0;t.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var n=r.hi(e),a=r.lo(e);return t>e==e>0?a===o?(n+=1,a=0):a+=1:0===a?(a=o,n-=1):a-=1,r.pack(a,n)}},{"double-bits":64}],261:[function(e,t,n){n.vertexNormals=function(e,t,n){for(var r=t.length,i=new Array(r),o=void 0===n?1e-6:n,a=0;a<r;++a)i[a]=[0,0,0];for(a=0;a<e.length;++a)for(var s=e[a],l=0,c=s[s.length-1],u=s[0],h=0;h<s.length;++h){l=c,c=u,u=s[(h+1)%s.length];for(var d=t[l],f=t[c],p=t[u],g=new Array(3),m=0,v=new Array(3),y=0,b=0;b<3;++b)g[b]=d[b]-f[b],m+=g[b]*g[b],v[b]=p[b]-f[b],y+=v[b]*v[b];if(m*y>o){var _=i[c],x=1/Math.sqrt(m*y);for(b=0;b<3;++b){var w=(b+1)%3,A=(b+2)%3;_[b]+=x*(v[w]*g[A]-v[A]*g[w])}}}for(a=0;a<r;++a){_=i[a];var k=0;for(b=0;b<3;++b)k+=_[b]*_[b];if(k>o)for(x=1/Math.sqrt(k),b=0;b<3;++b)_[b]*=x;else for(b=0;b<3;++b)_[b]=0}return i},n.faceNormals=function(e,t,n){for(var r=e.length,i=new Array(r),o=void 0===n?1e-6:n,a=0;a<r;++a){for(var s=e[a],l=new Array(3),c=0;c<3;++c)l[c]=t[s[c]];var u=new Array(3),h=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],h[c]=l[2][c]-l[0][c];var d=new Array(3),f=0;for(c=0;c<3;++c){var p=(c+1)%3,g=(c+2)%3;d[c]=u[p]*h[g]-u[g]*h[p],f+=d[c]*d[c]}for(f=f>o?1/Math.sqrt(f):0,c=0;c<3;++c)d[c]*=f;i[a]=d}return i}},{}],262:[function(e,t,n){"use strict";t.exports=function(e,t,n,r,i,o,a,s,l,c){var u=t+o+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(a-l)/h,e[1]=.5*(s-r)/h,e[2]=.5*(n-o)/h,e[3]=.5*h}else{var d=Math.max(t,o,c);h=Math.sqrt(2*d-u+1),t>=d?(e[0]=.5*h,e[1]=.5*(i+n)/h,e[2]=.5*(s+r)/h,e[3]=.5*(a-l)/h):o>=d?(e[0]=.5*(n+i)/h,e[1]=.5*h,e[2]=.5*(l+a)/h,e[3]=.5*(s-r)/h):(e[0]=.5*(r+s)/h,e[1]=.5*(a+l)/h,e[2]=.5*h,e[3]=.5*(n-i)/h)}return e}},{}],263:[function(e,t,n){"use strict";t.exports=function(e){var t=(e=e||{}).center||[0,0,0],n=e.rotation||[0,0,0,1],r=e.radius||1;t=[].slice.call(t,0,3),u(n=[].slice.call(n,0,4),n);var i=new h(n,t,Math.log(r));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var r=e("filtered-vector"),i=e("gl-mat4/lookAt"),o=e("gl-mat4/fromQuat"),a=e("gl-mat4/invert"),s=e("./lib/quatFromFrame");function l(e,t,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(n,2))}function c(e,t,n,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(n,2)+Math.pow(r,2))}function u(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=c(n,r,i,o);a>1e-6?(e[0]=n/a,e[1]=r/a,e[2]=i/a,e[3]=o/a):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,n){this.radius=r([n]),this.center=r(t),this.rotation=r(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var n=this.computedMatrix;o(n,t);var r=this.computedCenter,i=this.computedEye,a=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=r[0]+s*n[2],i[1]=r[1]+s*n[6],i[2]=r[2]+s*n[10],a[0]=n[1],a[1]=n[5],a[2]=n[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=n[l+4*h]*i[h];n[12+l]=-c}},d.getMatrix=function(e,t){this.recalcMatrix(e);var n=this.computedMatrix;if(t){for(var r=0;r<16;++r)t[r]=n[r];return t}return n},d.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},d.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},d.pan=function(e,t,n,r){t=t||0,n=n||0,r=r||0,this.recalcMatrix(e);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=l(u-=o*f,h-=a*f,d-=s*f);u/=p,h/=p,d/=p;var g=i[2],m=i[6],v=i[10],y=g*o+m*a+v*s,b=g*u+m*h+v*d,_=l(g-=y*o+b*u,m-=y*a+b*h,v-=y*s+b*d);g/=_,m/=_,v/=_;var x=u*t+o*n,w=h*t+a*n,A=d*t+s*n;this.center.move(e,x,w,A);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+r),this.radius.set(e,Math.log(k))},d.rotate=function(e,t,n,r){this.recalcMatrix(e),t=t||0,n=n||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],u=i[1],h=i[5],d=i[9],f=i[2],p=i[6],g=i[10],m=t*o+n*u,v=t*a+n*h,y=t*s+n*d,b=-(p*y-g*v),_=-(g*m-f*y),x=-(f*v-p*m),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(_,2)-Math.pow(x,2))),A=c(b,_,x,w);A>1e-6?(b/=A,_/=A,x/=A,w/=A):(b=_=x=0,w=1);var k=this.computedRotation,T=k[0],S=k[1],E=k[2],C=k[3],M=T*w+C*b+S*x-E*_,O=S*w+C*_+E*b-T*x,L=E*w+C*x+T*_-S*b,D=C*w-T*b-S*_-E*x;if(r){b=f,_=p,x=g;var I=Math.sin(r)/l(b,_,x);b*=I,_*=I,x*=I,D=D*(w=Math.cos(t))-(M=M*w+D*b+O*x-L*_)*b-(O=O*w+D*_+L*b-M*x)*_-(L=L*w+D*x+M*_-O*b)*x}var R=c(M,O,L,D);R>1e-6?(M/=R,O/=R,L/=R,D/=R):(M=O=L=0,D=1),this.rotation.set(e,M,O,L,D)},d.lookAt=function(e,t,n,r){this.recalcMatrix(e),n=n||this.computedCenter,t=t||this.computedEye,r=r||this.computedUp;var o=this.computedMatrix;i(o,t,n,r);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),u(a,a),this.rotation.set(e,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(n[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,n[0],n[1],n[2])},d.translate=function(e,t,n,r){this.center.move(e,t||0,n||0,r||0)},d.setMatrix=function(e,t){var n=this.computedRotation;s(n,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(n,n),this.rotation.set(e,n[0],n[1],n[2],n[3]);var r=this.computedMatrix;a(r,t);var i=r[15];if(Math.abs(i)>1e-6){var o=r[12]/i,l=r[13]/i,c=r[14]/i;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,o-r[2]*h,l-r[6]*h,c-r[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},d.fromJSON=function(e){var t=this.lastT(),n=e.center;n&&this.center.set(t,n[0],n[1],n[2]);var r=e.rotation;r&&this.rotation.set(t,r[0],r[1],r[2],r[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(e,t,n){"use strict";var r=e("repeat-string");t.exports=function(e,t,n){return r(n=void 0!==n?n+"":" ",t)+e}},{"repeat-string":277}],265:[function(e,t,n){t.exports=function(e,t){t||(t=[0,""]),e=String(e);var n=parseFloat(e,10);return t[0]=n,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},{}],266:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=0|t.length,i=e.length,o=[new Array(n),new Array(n)],a=0;a<n;++a)o[0][a]=[],o[1][a]=[];for(a=0;a<i;++a){var s=e[a];o[0][s[0]].push(s),o[1][s[1]].push(s)}var l=[];for(a=0;a<n;++a)o[0][a].length+o[1][a].length===0&&l.push([a]);function c(e,t){var n=o[t][e[t]];n.splice(n.indexOf(e),1)}function u(e,n,i){for(var a,s,l,u=0;u<2;++u)if(o[u][n].length>0){a=o[u][n][0],l=u;break}s=a[1^l];for(var h=0;h<2;++h)for(var d=o[h][n],f=0;f<d.length;++f){var p=d[f],g=p[1^h];r(t[e],t[n],t[s],t[g])>0&&(a=p,s=g,l=h)}return i||a&&c(a,l),s}function h(e,n){var i=o[n][e][0],a=[e];c(i,n);for(var s=i[1^n];;){for(;s!==e;)a.push(s),s=u(a[a.length-2],s,!1);if(o[0][e].length+o[1][e].length===0)break;var l=a[a.length-1],h=e,d=a[1],f=u(l,h,!0);if(r(t[l],t[h],t[d],t[f])<0)break;a.push(e),s=u(l,h)}return a}function d(e,t){return t[1]===t[t.length-1]}for(a=0;a<n;++a)for(var f=0;f<2;++f){for(var p=[];o[f][a].length>0;){o[0][a].length;var g=h(a,f);d(0,g)?p.push.apply(p,g):(p.length>0&&l.push(p),p=g)}p.length>0&&l.push(p)}return l};var r=e("compare-angle")},{"compare-angle":54}],267:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=r(e,t.length),i=new Array(t.length),o=new Array(t.length),a=[],s=0;s<t.length;++s){var l=n[s].length;o[s]=l,i[s]=!0,l<=1&&a.push(s)}for(;a.length>0;){i[f=a.pop()]=!1;var c=n[f];for(s=0;s<c.length;++s){var u=c[s];0==--o[u]&&a.push(u)}}var h=new Array(t.length),d=[];for(s=0;s<t.length;++s)if(i[s]){var f=d.length;h[s]=f,d.push(t[s])}else h[s]=-1;var p=[];for(s=0;s<e.length;++s){var g=e[s];i[g[0]]&&i[g[1]]&&p.push([h[g[0]],h[g[1]]])}return[p,d]};var r=e("edges-to-adjacency-list")},{"edges-to-adjacency-list":66}],268:[function(e,t,n){"use strict";t.exports=function(e,t){e=(z=c(e,t))[0];for(var n=(t=z[1]).length,h=(e.length,r(e,t.length)),d=0;d<n;++d)if(h[d].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var f=i(e,t);var p=(f=f.filter((function(e){for(var n=e.length,r=[0],i=0;i<n;++i){var o=t[e[i]],l=t[e[(i+1)%n]],c=a(-o[0],o[1]),u=a(-o[0],l[1]),h=a(l[0],o[1]),d=a(l[0],l[1]);r=s(r,s(s(c,u),s(h,d)))}return r[r.length-1]>0}))).length,g=new Array(p),m=new Array(p);for(d=0;d<p;++d){g[d]=d;var v=new Array(p),y=f[d].map((function(e){return t[e]})),b=o([y]),_=0;e:for(var x=0;x<p;++x)if(v[x]=0,d!==x){for(var w=(q=f[x]).length,A=0;A<w;++A){var k=b(t[q[A]]);if(0!==k){k<0&&(v[x]=1,_+=1);continue e}}v[x]=1,_+=1}m[d]=[_,d,v]}for(m.sort((function(e,t){return t[0]-e[0]})),d=0;d<p;++d){var T=(v=m[d])[1],S=v[2];for(x=0;x<p;++x)S[x]&&(g[x]=T)}var E=function(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=[];return t}(p);for(d=0;d<p;++d)E[d].push(g[d]),E[g[d]].push(d);var C={},M=u(n,!1);for(d=0;d<p;++d)for(w=(q=f[d]).length,x=0;x<w;++x){var O=q[x],L=q[(x+1)%w],D=Math.min(O,L)+":"+Math.max(O,L);if(D in C){var I=C[D];E[I].push(d),E[d].push(I),M[O]=M[L]=!0}else C[D]=d}function R(e){for(var t=e.length,n=0;n<t;++n)if(!M[e[n]])return!1;return!0}var P=[],N=u(p,-1);for(d=0;d<p;++d)g[d]!==d||R(f[d])?N[d]=-1:(P.push(d),N[d]=0);for(var z=[];P.length>0;){var F=P.pop(),B=E[F];l(B,(function(e,t){return e-t}));var j,U=B.length,V=N[F];for(0===V&&(j=[q=f[F]]),d=0;d<U;++d){var q,H=B[d];N[H]>=0||(N[H]=1^V,P.push(H),0===V&&(R(q=f[H])||(q.reverse(),j.push(q))))}0===V&&z.push(j)}return z};var r=e("edges-to-adjacency-list"),i=e("planar-dual"),o=e("point-in-big-polygon"),a=e("two-product"),s=e("robust-sum"),l=e("uniq"),c=e("./lib/trim-leaves");function u(e,t){for(var n=new Array(e),r=0;r<e;++r)n[r]=t;return n}},{"./lib/trim-leaves":267,"edges-to-adjacency-list":66,"planar-dual":266,"point-in-big-polygon":269,"robust-sum":289,"two-product":306,uniq:310}],269:[function(e,t,n){t.exports=function(e){for(var t=e.length,n=[],o=[],s=0;s<t;++s)for(var u=e[s],h=u.length,d=h-1,f=0;f<h;d=f++){var p=u[d],g=u[f];p[0]===g[0]?o.push([p,g]):n.push([p,g])}if(0===n.length)return 0===o.length?c:(m=l(o),function(e){return m(e[0],e[1])?0:1});var m;var v=i(n),y=function(e,t){return function(n){var i=a.le(t,n[0]);if(i<0)return 1;var o=e[i];if(!o){if(!(i>0&&t[i]===n[0]))return 1;o=e[i-1]}for(var s=1;o;){var l=o.key,c=r(n,l[0],l[1]);if(l[0][0]<l[1][0])if(c<0)o=o.left;else{if(!(c>0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?y:function(e,t){return function(n){return e(n[0],n[1])?0:t(n)}}(l(o),y)};var r=e("robust-orientation")[3],i=e("slab-decomposition"),o=e("interval-tree-1d"),a=e("binary-search-bounds");function s(){return!0}function l(e){for(var t={},n=0;n<e.length;++n){var r=e[n],i=r[0][0],a=r[0][1],l=r[1][1],c=[Math.min(a,l),Math.max(a,l)];i in t?t[i].push(c):t[i]=[c]}var u={},h=Object.keys(t);for(n=0;n<h.length;++n){var d=t[h[n]];u[h[n]]=o(d)}return function(e){return function(t,n){var r=e[t];return!!r&&!!r.queryPoint(n,s)}}(u)}function c(e){return 1}},{"binary-search-bounds":31,"interval-tree-1d":234,"robust-orientation":284,"slab-decomposition":299}],270:[function(e,t,n){"use strict";var r=new Float64Array(4),i=new Float64Array(4),o=new Float64Array(4);t.exports=function(e,t,n,a,s){r.length<a.length&&(r=new Float64Array(a.length),i=new Float64Array(a.length),o=new Float64Array(a.length));for(var l=0;l<a.length;++l)r[l]=e[l]-a[l],i[l]=t[l]-e[l],o[l]=n[l]-e[l];var c=0,u=0,h=0,d=0,f=0,p=0;for(l=0;l<a.length;++l){var g=i[l],m=o[l],v=r[l];c+=g*g,u+=g*m,h+=m*m,d+=v*g,f+=v*m,p+=v*v}var y,b,_,x,w,A=Math.abs(c*h-u*u),k=u*f-h*d,T=u*d-c*f;if(k+T<=A)if(k<0)T<0&&d<0?(T=0,-d>=c?(k=1,y=c+2*d+p):y=d*(k=-d/c)+p):(k=0,f>=0?(T=0,y=p):-f>=h?(T=1,y=h+2*f+p):y=f*(T=-f/h)+p);else if(T<0)T=0,d>=0?(k=0,y=p):-d>=c?(k=1,y=c+2*d+p):y=d*(k=-d/c)+p;else{var S=1/A;y=(k*=S)*(c*k+u*(T*=S)+2*d)+T*(u*k+h*T+2*f)+p}else k<0?(_=h+f)>(b=u+d)?(x=_-b)>=(w=c-2*u+h)?(k=1,T=0,y=c+2*d+p):y=(k=x/w)*(c*k+u*(T=1-k)+2*d)+T*(u*k+h*T+2*f)+p:(k=0,_<=0?(T=1,y=h+2*f+p):f>=0?(T=0,y=p):y=f*(T=-f/h)+p):T<0?(_=c+d)>(b=u+f)?(x=_-b)>=(w=c-2*u+h)?(T=1,k=0,y=h+2*f+p):y=(k=1-(T=x/w))*(c*k+u*T+2*d)+T*(u*k+h*T+2*f)+p:(T=0,_<=0?(k=1,y=c+2*d+p):d>=0?(k=0,y=p):y=d*(k=-d/c)+p):(x=h+f-u-d)<=0?(k=0,T=1,y=h+2*f+p):x>=(w=c-2*u+h)?(k=1,T=0,y=c+2*d+p):y=(k=x/w)*(c*k+u*(T=1-k)+2*d)+T*(u*k+h*T+2*f)+p;var E=1-k-T;for(l=0;l<a.length;++l)s[l]=E*e[l]+k*t[l]+T*n[l];return y<0?0:y}},{}],271:[function(e,t,n){t.exports=e("gl-quat/slerp")},{"gl-quat/slerp":124}],272:[function(e,t,n){"use strict";var r=e("big-rat/add");t.exports=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i[o]=r(e[o],t[o]);return i}},{"big-rat/add":15}],273:[function(e,t,n){"use strict";t.exports=function(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=r(e[n]);return t};var r=e("big-rat")},{"big-rat":18}],274:[function(e,t,n){"use strict";var r=e("big-rat"),i=e("big-rat/mul");t.exports=function(e,t){for(var n=r(t),o=e.length,a=new Array(o),s=0;s<o;++s)a[s]=i(e[s],n);return a}},{"big-rat":18,"big-rat/mul":27}],275:[function(e,t,n){"use strict";var r=e("big-rat/sub");t.exports=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i[o]=r(e[o],t[o]);return i}},{"big-rat/sub":29}],276:[function(e,t,n){"use strict";var r=e("compare-cell"),i=e("compare-oriented-cell"),o=e("cell-orientation");t.exports=function(e){e.sort(i);for(var t=e.length,n=0,a=0;a<t;++a){var s=e[a],l=o(s);if(0!==l){if(n>0){var c=e[n-1];if(0===r(s,c)&&o(c)!==l){n-=1;continue}}e[n++]=s}}return e.length=n,e}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(e,t,n){"use strict";var r,i="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,i="";else if(i.length>=n)return i.substr(0,n);for(;n>i.length&&t>1;)1&t&&(i+=e),t>>=1,e+=e;return i=(i+=e).substr(0,n)}},{}],278:[function(e,t,r){(function(e){(function(){t.exports=e.performance&&e.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],279:[function(e,t,n){"use strict";t.exports=function(e){for(var t=e.length,n=e[e.length-1],r=t,i=t-2;i>=0;--i){var o=n;(l=(s=e[i])-((n=o+s)-o))&&(e[--r]=n,n=l)}var a=0;for(i=r;i<t;++i){var s,l;(l=(s=n)-((n=(o=e[i])+s)-o))&&(e[a++]=l)}return e[a++]=n,e.length=a,e}},{}],280:[function(e,t,n){"use strict";var r=e("two-product"),i=e("robust-sum"),o=e("robust-scale"),a=e("robust-compress");function s(e,t,n,r){return function(t){return r(e(n(t[0][0],t[1][1]),n(-t[0][1],t[1][0])))}}function l(e,t,n,r){return function(i){return r(e(t(e(n(i[1][1],i[2][2]),n(-i[1][2],i[2][1])),i[0][0]),e(t(e(n(i[1][0],i[2][2]),n(-i[1][2],i[2][0])),-i[0][1]),t(e(n(i[1][0],i[2][1]),n(-i[1][1],i[2][0])),i[0][2]))))}}function c(e){return(2===e?s:3===e?l:void 0)(i,o,r,a)}var u=[function(){return[0]},function(e){return[e[0][0]]}];function h(e,t,n,r,i,o){return function(a){switch(a.length){case 0:return e(a);case 1:return t(a);case 2:return n(a);case 3:return r(a)}var s=i[a.length];return s||(s=i[a.length]=o(a.length)),s(a)}}!function(){for(;u.length<4;)u.push(c(u.length));t.exports=h.apply(void 0,u.concat([u,c]));for(var e=0;e<u.length;++e)t.exports[e]=u[e]}()},{"robust-compress":279,"robust-scale":286,"robust-sum":289,"two-product":306}],281:[function(e,t,n){"use strict";var r=e("two-product"),i=e("robust-sum");t.exports=function(e,t){for(var n=r(e[0],t[0]),o=1;o<e.length;++o)n=i(n,r(e[o],t[o]));return n}},{"robust-sum":289,"two-product":306}],282:[function(e,t,n){"use strict";var r=e("two-product"),i=e("robust-sum"),o=e("robust-subtract"),a=e("robust-scale");function s(e){return(3===e?l:4===e?c:5===e?u:h)(i,o,r,a)}function l(e,t,n,r){return function(i,o,a){var s=n(i[0],i[0]),l=r(s,o[0]),c=r(s,a[0]),u=n(o[0],o[0]),h=r(u,i[0]),d=r(u,a[0]),f=n(a[0],a[0]),p=r(f,i[0]),g=r(f,o[0]),m=e(t(g,d),t(h,l)),v=t(p,c),y=t(m,v);return y[y.length-1]}}function c(e,t,n,r){return function(i,o,a,s){var l=e(n(i[0],i[0]),n(i[1],i[1])),c=r(l,o[0]),u=r(l,a[0]),h=r(l,s[0]),d=e(n(o[0],o[0]),n(o[1],o[1])),f=r(d,i[0]),p=r(d,a[0]),g=r(d,s[0]),m=e(n(a[0],a[0]),n(a[1],a[1])),v=r(m,i[0]),y=r(m,o[0]),b=r(m,s[0]),_=e(n(s[0],s[0]),n(s[1],s[1])),x=r(_,i[0]),w=r(_,o[0]),A=r(_,a[0]),k=e(e(r(t(A,b),o[1]),e(r(t(w,g),-a[1]),r(t(y,p),s[1]))),e(r(t(w,g),i[1]),e(r(t(x,h),-o[1]),r(t(f,c),s[1])))),T=e(e(r(t(A,b),i[1]),e(r(t(x,h),-a[1]),r(t(v,u),s[1]))),e(r(t(y,p),i[1]),e(r(t(v,u),-o[1]),r(t(f,c),a[1])))),S=t(k,T);return S[S.length-1]}}function u(e,t,n,r){return function(i,o,a,s,l){var c=e(n(i[0],i[0]),e(n(i[1],i[1]),n(i[2],i[2]))),u=r(c,o[0]),h=r(c,a[0]),d=r(c,s[0]),f=r(c,l[0]),p=e(n(o[0],o[0]),e(n(o[1],o[1]),n(o[2],o[2]))),g=r(p,i[0]),m=r(p,a[0]),v=r(p,s[0]),y=r(p,l[0]),b=e(n(a[0],a[0]),e(n(a[1],a[1]),n(a[2],a[2]))),_=r(b,i[0]),x=r(b,o[0]),w=r(b,s[0]),A=r(b,l[0]),k=e(n(s[0],s[0]),e(n(s[1],s[1]),n(s[2],s[2]))),T=r(k,i[0]),S=r(k,o[0]),E=r(k,a[0]),C=r(k,l[0]),M=e(n(l[0],l[0]),e(n(l[1],l[1]),n(l[2],l[2]))),O=r(M,i[0]),L=r(M,o[0]),D=r(M,a[0]),I=r(M,s[0]),R=e(e(e(r(e(r(t(I,C),a[1]),e(r(t(D,A),-s[1]),r(t(E,w),l[1]))),o[2]),e(r(e(r(t(I,C),o[1]),e(r(t(L,y),-s[1]),r(t(S,v),l[1]))),-a[2]),r(e(r(t(D,A),o[1]),e(r(t(L,y),-a[1]),r(t(x,m),l[1]))),s[2]))),e(r(e(r(t(E,w),o[1]),e(r(t(S,v),-a[1]),r(t(x,m),s[1]))),-l[2]),e(r(e(r(t(I,C),o[1]),e(r(t(L,y),-s[1]),r(t(S,v),l[1]))),i[2]),r(e(r(t(I,C),i[1]),e(r(t(O,f),-s[1]),r(t(T,d),l[1]))),-o[2])))),e(e(r(e(r(t(L,y),i[1]),e(r(t(O,f),-o[1]),r(t(g,u),l[1]))),s[2]),e(r(e(r(t(S,v),i[1]),e(r(t(T,d),-o[1]),r(t(g,u),s[1]))),-l[2]),r(e(r(t(E,w),o[1]),e(r(t(S,v),-a[1]),r(t(x,m),s[1]))),i[2]))),e(r(e(r(t(E,w),i[1]),e(r(t(T,d),-a[1]),r(t(_,h),s[1]))),-o[2]),e(r(e(r(t(S,v),i[1]),e(r(t(T,d),-o[1]),r(t(g,u),s[1]))),a[2]),r(e(r(t(x,m),i[1]),e(r(t(_,h),-o[1]),r(t(g,u),a[1]))),-s[2]))))),P=e(e(e(r(e(r(t(I,C),a[1]),e(r(t(D,A),-s[1]),r(t(E,w),l[1]))),i[2]),r(e(r(t(I,C),i[1]),e(r(t(O,f),-s[1]),r(t(T,d),l[1]))),-a[2])),e(r(e(r(t(D,A),i[1]),e(r(t(O,f),-a[1]),r(t(_,h),l[1]))),s[2]),r(e(r(t(E,w),i[1]),e(r(t(T,d),-a[1]),r(t(_,h),s[1]))),-l[2]))),e(e(r(e(r(t(D,A),o[1]),e(r(t(L,y),-a[1]),r(t(x,m),l[1]))),i[2]),r(e(r(t(D,A),i[1]),e(r(t(O,f),-a[1]),r(t(_,h),l[1]))),-o[2])),e(r(e(r(t(L,y),i[1]),e(r(t(O,f),-o[1]),r(t(g,u),l[1]))),a[2]),r(e(r(t(x,m),i[1]),e(r(t(_,h),-o[1]),r(t(g,u),a[1]))),-l[2])))),N=t(R,P);return N[N.length-1]}}function h(e,t,n,r){return function(i,o,a,s,l,c){var u=e(e(n(i[0],i[0]),n(i[1],i[1])),e(n(i[2],i[2]),n(i[3],i[3]))),h=r(u,o[0]),d=r(u,a[0]),f=r(u,s[0]),p=r(u,l[0]),g=r(u,c[0]),m=e(e(n(o[0],o[0]),n(o[1],o[1])),e(n(o[2],o[2]),n(o[3],o[3]))),v=r(m,i[0]),y=r(m,a[0]),b=r(m,s[0]),_=r(m,l[0]),x=r(m,c[0]),w=e(e(n(a[0],a[0]),n(a[1],a[1])),e(n(a[2],a[2]),n(a[3],a[3]))),A=r(w,i[0]),k=r(w,o[0]),T=r(w,s[0]),S=r(w,l[0]),E=r(w,c[0]),C=e(e(n(s[0],s[0]),n(s[1],s[1])),e(n(s[2],s[2]),n(s[3],s[3]))),M=r(C,i[0]),O=r(C,o[0]),L=r(C,a[0]),D=r(C,l[0]),I=r(C,c[0]),R=e(e(n(l[0],l[0]),n(l[1],l[1])),e(n(l[2],l[2]),n(l[3],l[3]))),P=r(R,i[0]),N=r(R,o[0]),z=r(R,a[0]),F=r(R,s[0]),B=r(R,c[0]),j=e(e(n(c[0],c[0]),n(c[1],c[1])),e(n(c[2],c[2]),n(c[3],c[3]))),U=r(j,i[0]),V=r(j,o[0]),q=r(j,a[0]),H=r(j,s[0]),$=r(j,l[0]),W=e(e(e(r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),a[2]),r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),-s[2])),e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),l[2]),r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),-c[2]))),o[3]),e(r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),o[2]),r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),-s[2])),e(r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),l[2]),r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),-c[2]))),-a[3]),r(e(e(r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),o[2]),r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),-a[2])),e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),l[2]),r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),-c[2]))),s[3]))),e(e(r(e(e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),o[2]),r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),-a[2])),e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),s[2]),r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),-c[2]))),-l[3]),r(e(e(r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),o[2]),r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),-a[2])),e(r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),s[2]),r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),-l[2]))),c[3])),e(r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),o[2]),r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),-s[2])),e(r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),l[2]),r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),-c[2]))),i[3]),r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-s[2])),e(r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),l[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-c[2]))),-o[3])))),e(e(e(r(e(e(r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),l[2]),r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),-c[2]))),s[3]),r(e(e(r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),i[2]),r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),s[2]),r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),-c[2]))),-l[3])),e(r(e(e(r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),i[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-o[2])),e(r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),s[2]),r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),-l[2]))),c[3]),r(e(e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),o[2]),r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),-a[2])),e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),s[2]),r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),-c[2]))),i[3]))),e(e(r(e(e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),i[2]),r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),-a[2])),e(r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),s[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-c[2]))),-o[3]),r(e(e(r(e(r(t(H,I),o[1]),e(r(t(V,x),-s[1]),r(t(O,b),c[1]))),i[2]),r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),s[2]),r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),-c[2]))),a[3])),e(r(e(e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),i[2]),r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-c[2]))),-s[3]),r(e(e(r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),i[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-o[2])),e(r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-s[2]))),c[3]))))),G=e(e(e(r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),a[2]),r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),-s[2])),e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),l[2]),r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),-c[2]))),i[3]),e(r(e(e(r(e(r(t($,B),s[1]),e(r(t(H,I),-l[1]),r(t(F,D),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-s[2])),e(r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),l[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-c[2]))),-a[3]),r(e(e(r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-a[2])),e(r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),l[2]),r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),-c[2]))),s[3]))),e(e(r(e(e(r(e(r(t(H,I),a[1]),e(r(t(q,E),-s[1]),r(t(L,T),c[1]))),i[2]),r(e(r(t(H,I),i[1]),e(r(t(U,g),-s[1]),r(t(M,f),c[1]))),-a[2])),e(r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),s[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-c[2]))),-l[3]),r(e(e(r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),i[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-a[2])),e(r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),s[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-l[2]))),c[3])),e(r(e(e(r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),o[2]),r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),-a[2])),e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),l[2]),r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),-c[2]))),i[3]),r(e(e(r(e(r(t($,B),a[1]),e(r(t(q,E),-l[1]),r(t(z,S),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-a[2])),e(r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),l[2]),r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),-c[2]))),-o[3])))),e(e(e(r(e(e(r(e(r(t($,B),o[1]),e(r(t(V,x),-l[1]),r(t(N,_),c[1]))),i[2]),r(e(r(t($,B),i[1]),e(r(t(U,g),-l[1]),r(t(P,p),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),l[2]),r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),-c[2]))),a[3]),r(e(e(r(e(r(t(q,E),o[1]),e(r(t(V,x),-a[1]),r(t(k,y),c[1]))),i[2]),r(e(r(t(q,E),i[1]),e(r(t(U,g),-a[1]),r(t(A,d),c[1]))),-o[2])),e(r(e(r(t(V,x),i[1]),e(r(t(U,g),-o[1]),r(t(v,h),c[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-c[2]))),-l[3])),e(r(e(e(r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),i[2]),r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),-o[2])),e(r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-l[2]))),c[3]),r(e(e(r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),o[2]),r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),-a[2])),e(r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),s[2]),r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),-l[2]))),i[3]))),e(e(r(e(e(r(e(r(t(F,D),a[1]),e(r(t(z,S),-s[1]),r(t(L,T),l[1]))),i[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-a[2])),e(r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),s[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-l[2]))),-o[3]),r(e(e(r(e(r(t(F,D),o[1]),e(r(t(N,_),-s[1]),r(t(O,b),l[1]))),i[2]),r(e(r(t(F,D),i[1]),e(r(t(P,p),-s[1]),r(t(M,f),l[1]))),-o[2])),e(r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),s[2]),r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),-l[2]))),a[3])),e(r(e(e(r(e(r(t(z,S),o[1]),e(r(t(N,_),-a[1]),r(t(k,y),l[1]))),i[2]),r(e(r(t(z,S),i[1]),e(r(t(P,p),-a[1]),r(t(A,d),l[1]))),-o[2])),e(r(e(r(t(N,_),i[1]),e(r(t(P,p),-o[1]),r(t(v,h),l[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-l[2]))),-s[3]),r(e(e(r(e(r(t(L,T),o[1]),e(r(t(O,b),-a[1]),r(t(k,y),s[1]))),i[2]),r(e(r(t(L,T),i[1]),e(r(t(M,f),-a[1]),r(t(A,d),s[1]))),-o[2])),e(r(e(r(t(O,b),i[1]),e(r(t(M,f),-o[1]),r(t(v,h),s[1]))),a[2]),r(e(r(t(k,y),i[1]),e(r(t(A,d),-o[1]),r(t(v,h),a[1]))),-s[2]))),l[3]))))),Y=t(W,G);return Y[Y.length-1]}}var d=[function(){return 0},function(){return 0},function(){return 0}];function f(e){var t=d[e.length];return t||(t=d[e.length]=s(e.length)),t.apply(void 0,e)}function p(e,t,n,r,i,o,a,s){return function(t,n,l,c,u,h){switch(arguments.length){case 0:case 1:return 0;case 2:return r(t,n);case 3:return i(t,n,l);case 4:return o(t,n,l,c);case 5:return a(t,n,l,c,u);case 6:return s(t,n,l,c,u,h)}for(var d=new Array(arguments.length),f=0;f<arguments.length;++f)d[f]=arguments[f];return e(d)}}!function(){for(;d.length<=6;)d.push(s(d.length));t.exports=p.apply(void 0,[f].concat(d));for(var e=0;e<=6;++e)t.exports[e]=d[e]}()},{"robust-scale":286,"robust-subtract":288,"robust-sum":289,"two-product":306}],283:[function(e,t,n){"use strict";var r=e("robust-determinant");function i(e){return(2===e?o:a)(e<3?r[e]:r)}function o(e){return function(t,n){return[e([[+n[0],+t[0][1]],[+n[1],+t[1][1]]]),e([[+t[0][0],+n[0]],[+t[1][0],+n[1]]]),e(t)]}}function a(e){return function(t,n){return[e([[+n[0],+t[0][1],+t[0][2]],[+n[1],+t[1][1],+t[1][2]],[+n[2],+t[2][1],+t[2][2]]]),e([[+t[0][0],+n[0],+t[0][2]],[+t[1][0],+n[1],+t[1][2]],[+t[2][0],+n[2],+t[2][2]]]),e([[+t[0][0],+t[0][1],+n[0]],[+t[1][0],+t[1][1],+n[1]],[+t[2][0],+t[2][1],+n[2]]]),e(t)]}}var s=[function(){return[[0]]},function(e,t){return[[t[0]],[e[0][0]]]}];function l(e,t,n,r,i,o){return function(a,s){switch(a.length){case 0:return e(a,s);case 1:return t(a,s);case 2:return n(a,s);case 3:return r(a,s)}var l=i[a.length];return l||(l=i[a.length]=o(a.length)),l(a,s)}}!function(){for(;s.length<=3;)s.push(i(s.length));t.exports=l.apply(void 0,s.concat([s,i]));for(var e=0;e<3;++e)t.exports[e]=s[e]}()},{"robust-determinant":280}],284:[function(e,t,n){"use strict";var r=e("two-product"),i=e("robust-sum"),o=e("robust-scale"),a=e("robust-subtract");function s(e,t,n,r){return function(n,i,o){var a=e(e(t(i[1],o[0]),t(-o[1],i[0])),e(t(n[1],i[0]),t(-i[1],n[0]))),s=e(t(n[1],o[0]),t(-o[1],n[0])),l=r(a,s);return l[l.length-1]}}function l(e,t,n,r){return function(i,o,a,s){var l=e(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),o[2]),e(n(e(t(o[1],s[0]),t(-s[1],o[0])),-a[2]),n(e(t(o[1],a[0]),t(-a[1],o[0])),s[2]))),e(n(e(t(o[1],s[0]),t(-s[1],o[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),s[2])))),c=e(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-a[2]),n(e(t(i[1],a[0]),t(-a[1],i[0])),s[2]))),e(n(e(t(o[1],a[0]),t(-a[1],o[0])),i[2]),e(n(e(t(i[1],a[0]),t(-a[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),a[2])))),u=r(l,c);return u[u.length-1]}}function c(e,t,n,r){return function(i,o,a,s,l){var c=e(e(e(n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),a[2]),e(n(e(t(a[1],l[0]),t(-l[1],a[0])),-s[2]),n(e(t(a[1],s[0]),t(-s[1],a[0])),l[2]))),o[3]),e(n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),o[2]),e(n(e(t(o[1],l[0]),t(-l[1],o[0])),-s[2]),n(e(t(o[1],s[0]),t(-s[1],o[0])),l[2]))),-a[3]),n(e(n(e(t(a[1],l[0]),t(-l[1],a[0])),o[2]),e(n(e(t(o[1],l[0]),t(-l[1],o[0])),-a[2]),n(e(t(o[1],a[0]),t(-a[1],o[0])),l[2]))),s[3]))),e(n(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),o[2]),e(n(e(t(o[1],s[0]),t(-s[1],o[0])),-a[2]),n(e(t(o[1],a[0]),t(-a[1],o[0])),s[2]))),-l[3]),e(n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),o[2]),e(n(e(t(o[1],l[0]),t(-l[1],o[0])),-s[2]),n(e(t(o[1],s[0]),t(-s[1],o[0])),l[2]))),i[3]),n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-s[2]),n(e(t(i[1],s[0]),t(-s[1],i[0])),l[2]))),-o[3])))),e(e(n(e(n(e(t(o[1],l[0]),t(-l[1],o[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),l[2]))),s[3]),e(n(e(n(e(t(o[1],s[0]),t(-s[1],o[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),s[2]))),-l[3]),n(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),o[2]),e(n(e(t(o[1],s[0]),t(-s[1],o[0])),-a[2]),n(e(t(o[1],a[0]),t(-a[1],o[0])),s[2]))),i[3]))),e(n(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-a[2]),n(e(t(i[1],a[0]),t(-a[1],i[0])),s[2]))),-o[3]),e(n(e(n(e(t(o[1],s[0]),t(-s[1],o[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),s[2]))),a[3]),n(e(n(e(t(o[1],a[0]),t(-a[1],o[0])),i[2]),e(n(e(t(i[1],a[0]),t(-a[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),a[2]))),-s[3]))))),u=e(e(e(n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),a[2]),e(n(e(t(a[1],l[0]),t(-l[1],a[0])),-s[2]),n(e(t(a[1],s[0]),t(-s[1],a[0])),l[2]))),i[3]),n(e(n(e(t(s[1],l[0]),t(-l[1],s[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-s[2]),n(e(t(i[1],s[0]),t(-s[1],i[0])),l[2]))),-a[3])),e(n(e(n(e(t(a[1],l[0]),t(-l[1],a[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-a[2]),n(e(t(i[1],a[0]),t(-a[1],i[0])),l[2]))),s[3]),n(e(n(e(t(a[1],s[0]),t(-s[1],a[0])),i[2]),e(n(e(t(i[1],s[0]),t(-s[1],i[0])),-a[2]),n(e(t(i[1],a[0]),t(-a[1],i[0])),s[2]))),-l[3]))),e(e(n(e(n(e(t(a[1],l[0]),t(-l[1],a[0])),o[2]),e(n(e(t(o[1],l[0]),t(-l[1],o[0])),-a[2]),n(e(t(o[1],a[0]),t(-a[1],o[0])),l[2]))),i[3]),n(e(n(e(t(a[1],l[0]),t(-l[1],a[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-a[2]),n(e(t(i[1],a[0]),t(-a[1],i[0])),l[2]))),-o[3])),e(n(e(n(e(t(o[1],l[0]),t(-l[1],o[0])),i[2]),e(n(e(t(i[1],l[0]),t(-l[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),l[2]))),a[3]),n(e(n(e(t(o[1],a[0]),t(-a[1],o[0])),i[2]),e(n(e(t(i[1],a[0]),t(-a[1],i[0])),-o[2]),n(e(t(i[1],o[0]),t(-o[1],i[0])),a[2]))),-l[3])))),h=r(c,u);return h[h.length-1]}}function u(e){return(3===e?s:4===e?l:c)(i,r,o,a)}var h=u(3),d=u(4),f=[function(){return 0},function(){return 0},function(e,t){return t[0]-e[0]},function(e,t,n){var r,i=(e[1]-n[1])*(t[0]-n[0]),o=(e[0]-n[0])*(t[1]-n[1]),a=i-o;if(i>0){if(o<=0)return a;r=i+o}else{if(!(i<0))return a;if(o>=0)return a;r=-(i+o)}var s=33306690738754716e-32*r;return a>=s||a<=-s?a:h(e,t,n)},function(e,t,n,r){var i=e[0]-r[0],o=t[0]-r[0],a=n[0]-r[0],s=e[1]-r[1],l=t[1]-r[1],c=n[1]-r[1],u=e[2]-r[2],h=t[2]-r[2],f=n[2]-r[2],p=o*c,g=a*l,m=a*s,v=i*c,y=i*l,b=o*s,_=u*(p-g)+h*(m-v)+f*(y-b),x=7771561172376103e-31*((Math.abs(p)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(h)+(Math.abs(y)+Math.abs(b))*Math.abs(f));return _>x||-_>x?_:d(e,t,n,r)}];function p(e){var t=f[e.length];return t||(t=f[e.length]=u(e.length)),t.apply(void 0,e)}function g(e,t,n,r,i,o,a){return function(t,n,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return r(t,n);case 3:return i(t,n,s);case 4:return o(t,n,s,l);case 5:return a(t,n,s,l,c)}for(var u=new Array(arguments.length),h=0;h<arguments.length;++h)u[h]=arguments[h];return e(u)}}!function(){for(;f.length<=5;)f.push(u(f.length));t.exports=g.apply(void 0,[p].concat(f));for(var e=0;e<=5;++e)t.exports[e]=f[e]}()},{"robust-scale":286,"robust-subtract":288,"robust-sum":289,"two-product":306}],285:[function(e,t,n){"use strict";var r=e("robust-sum"),i=e("robust-scale");t.exports=function(e,t){if(1===e.length)return i(t,e[0]);if(1===t.length)return i(e,t[0]);if(0===e.length||0===t.length)return[0];var n=[0];if(e.length<t.length)for(var o=0;o<e.length;++o)n=r(n,i(t,e[o]));else for(o=0;o<t.length;++o)n=r(n,i(e,t[o]));return n}},{"robust-scale":286,"robust-sum":289}],286:[function(e,t,n){"use strict";var r=e("two-product"),i=e("two-sum");t.exports=function(e,t){var n=e.length;if(1===n){var o=r(e[0],t);return o[0]?o:[o[1]]}var a=new Array(2*n),s=[.1,.1],l=[.1,.1],c=0;r(e[0],t,s),s[0]&&(a[c++]=s[0]);for(var u=1;u<n;++u){r(e[u],t,l);var h=s[1];i(h,l[0],s),s[0]&&(a[c++]=s[0]);var d=l[1],f=s[1],p=d+f,g=f-(p-d);s[1]=p,g&&(a[c++]=g)}return s[1]&&(a[c++]=s[1]),0===c&&(a[c++]=0),a.length=c,a}},{"two-product":306,"two-sum":307}],287:[function(e,t,n){"use strict";t.exports=function(e,t,n,i){var o=r(e,n,i),a=r(t,n,i);if(o>0&&a>0||o<0&&a<0)return!1;var s=r(n,e,t),l=r(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(e,t,n,r){for(var i=0;i<2;++i){var o=e[i],a=t[i],s=Math.min(o,a),l=Math.max(o,a),c=n[i],u=r[i],h=Math.min(c,u);if(Math.max(c,u)<s||l<h)return!1}return!0}(e,t,n,i))};var r=e("robust-orientation")[3]},{"robust-orientation":284}],288:[function(e,t,n){"use strict";t.exports=function(e,t){var n=0|e.length,r=0|t.length;if(1===n&&1===r)return function(e,t){var n=e+t,r=n-e,i=e-(n-r)+(t-r);return i?[i,n]:[n]}(e[0],-t[0]);var i,o,a=new Array(n+r),s=0,l=0,c=0,u=Math.abs,h=e[l],d=u(h),f=-t[c],p=u(f);d<p?(o=h,(l+=1)<n&&(d=u(h=e[l]))):(o=f,(c+=1)<r&&(p=u(f=-t[c]))),l<n&&d<p||c>=r?(i=h,(l+=1)<n&&(d=u(h=e[l]))):(i=f,(c+=1)<r&&(p=u(f=-t[c])));for(var g,m,v=i+o,y=v-i,b=o-y,_=b,x=v;l<n&&c<r;)d<p?(i=h,(l+=1)<n&&(d=u(h=e[l]))):(i=f,(c+=1)<r&&(p=u(f=-t[c]))),(b=(o=_)-(y=(v=i+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g;for(;l<n;)(b=(o=_)-(y=(v=(i=h)+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g,(l+=1)<n&&(h=e[l]);for(;c<r;)(b=(o=_)-(y=(v=(i=f)+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g,(c+=1)<r&&(f=-t[c]);return _&&(a[s++]=_),x&&(a[s++]=x),s||(a[s++]=0),a.length=s,a}},{}],289:[function(e,t,n){"use strict";t.exports=function(e,t){var n=0|e.length,r=0|t.length;if(1===n&&1===r)return function(e,t){var n=e+t,r=n-e,i=e-(n-r)+(t-r);return i?[i,n]:[n]}(e[0],t[0]);var i,o,a=new Array(n+r),s=0,l=0,c=0,u=Math.abs,h=e[l],d=u(h),f=t[c],p=u(f);d<p?(o=h,(l+=1)<n&&(d=u(h=e[l]))):(o=f,(c+=1)<r&&(p=u(f=t[c]))),l<n&&d<p||c>=r?(i=h,(l+=1)<n&&(d=u(h=e[l]))):(i=f,(c+=1)<r&&(p=u(f=t[c])));for(var g,m,v=i+o,y=v-i,b=o-y,_=b,x=v;l<n&&c<r;)d<p?(i=h,(l+=1)<n&&(d=u(h=e[l]))):(i=f,(c+=1)<r&&(p=u(f=t[c]))),(b=(o=_)-(y=(v=i+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g;for(;l<n;)(b=(o=_)-(y=(v=(i=h)+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g,(l+=1)<n&&(h=e[l]);for(;c<r;)(b=(o=_)-(y=(v=(i=f)+o)-i))&&(a[s++]=b),_=x-((g=x+v)-(m=g-x))+(v-m),x=g,(c+=1)<r&&(f=t[c]);return _&&(a[s++]=_),x&&(a[s++]=x),s||(a[s++]=0),a.length=s,a}},{}],290:[function(e,t,n){"use strict";t.exports=function(e){return i(r(e))};var r=e("boundary-cells"),i=e("reduce-simplicial-complex")},{"boundary-cells":34,"reduce-simplicial-complex":276}],291:[function(e,t,n){"use strict";t.exports=function(e,t,n,s){if(n=n||0,void 0===s&&(s=function(e){for(var t=e.length,n=0,r=0;r<t;++r)n=0|Math.max(n,e[r].length);return n-1}(e)),0===e.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(e,t){for(var n=e.length,r=i.mallocUint8(n),o=0;o<n;++o)r[o]=e[o]<t|0;return r}(t,+n),c=function(e,t){for(var n=e.length,a=t*(t+1)/2*n|0,s=i.mallocUint32(2*a),l=0,c=0;c<n;++c)for(var u=e[c],h=(t=u.length,0);h<t;++h)for(var d=0;d<h;++d){var f=u[d],p=u[h];s[l++]=0|Math.min(f,p),s[l++]=0|Math.max(f,p)}o(r(s,[l/2|0,2]));var g=2;for(c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[g++]=s[c],s[g++]=s[c+1]);return r(s,[g/2|0,2])}(e,s),u=function(e,t,n,o){for(var a=e.data,s=e.shape[0],l=i.mallocDouble(s),c=0,u=0;u<s;++u){var h=a[2*u],d=a[2*u+1];if(n[h]!==n[d]){var f=t[h],p=t[d];a[2*c]=h,a[2*c+1]=d,l[c++]=(p-o)/(p-f)}}return e.shape[0]=c,r(l,[c])}(c,t,l,+n),h=function(e,t){var n=i.mallocInt32(2*t),r=e.shape[0],o=e.data;n[0]=0;for(var a=0,s=0;s<r;++s){var l=o[2*s];if(l!==a){for(n[2*a+1]=s;++a<l;)n[2*a]=s,n[2*a+1]=s;n[2*a]=s}}for(n[2*a+1]=r;++a<t;)n[2*a]=n[2*a+1]=r;return n}(c,0|t.length),d=a(s)(e,c.data,h,l),f=function(e){for(var t=0|e.shape[0],n=e.data,r=new Array(t),i=0;i<t;++i)r[i]=[n[2*i],n[2*i+1]];return r}(c),p=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(h),{cells:d,vertexIds:f,vertexWeights:p}};var r=e("ndarray"),i=e("typedarray-pool"),o=e("ndarray-sort"),a=e("./lib/codegen")},{"./lib/codegen":292,ndarray:259,"ndarray-sort":258,"typedarray-pool":308}],292:[function(e,t,n){"use strict";t.exports=function(e){return r[e]()};var r=[function(){return function(e,t,n,r){for(var i=e.length,o=0;o<i;++o)e[o].length;return[]}},function(){function e(e,t,n,r){for(var i=0|Math.min(n,r),o=0|Math.max(n,r),a=e[2*i],s=e[2*i+1];a<s;){var l=a+s>>1,c=t[2*l+1];if(c===o)return l;o<c?s=l:a=l+1}return a}return function(t,n,r,i){for(var o=t.length,a=[],s=0;s<o;++s){var l=t[s];if(2===l.length){var c=(i[l[0]]<<0)+(i[l[1]]<<1);if(0===c||3===c)continue;switch(c){case 0:case 3:break;case 1:a.push([e(r,n,l[0],l[1])]);break;case 2:a.push([e(r,n,l[1],l[0])])}}}return a}},function(){function e(e,t,n,r){for(var i=0|Math.min(n,r),o=0|Math.max(n,r),a=e[2*i],s=e[2*i+1];a<s;){var l=a+s>>1,c=t[2*l+1];if(c===o)return l;o<c?s=l:a=l+1}return a}return function(t,n,r,i){for(var o=t.length,a=[],s=0;s<o;++s){var l=t[s],c=l.length;if(3===c){if(0==(u=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===u)continue;switch(u){case 0:case 7:break;case 1:a.push([e(r,n,l[0],l[2]),e(r,n,l[0],l[1])]);break;case 2:a.push([e(r,n,l[1],l[0]),e(r,n,l[1],l[2])]);break;case 3:a.push([e(r,n,l[0],l[2]),e(r,n,l[1],l[2])]);break;case 4:a.push([e(r,n,l[2],l[1]),e(r,n,l[2],l[0])]);break;case 5:a.push([e(r,n,l[2],l[1]),e(r,n,l[0],l[1])]);break;case 6:a.push([e(r,n,l[1],l[0]),e(r,n,l[2],l[0])])}}else if(2===c){var u;if(0==(u=(i[l[0]]<<0)+(i[l[1]]<<1))||3===u)continue;switch(u){case 0:case 3:break;case 1:a.push([e(r,n,l[0],l[1])]);break;case 2:a.push([e(r,n,l[1],l[0])])}}}return a}},function(){function e(e,t,n,r){for(var i=0|Math.min(n,r),o=0|Math.max(n,r),a=e[2*i],s=e[2*i+1];a<s;){var l=a+s>>1,c=t[2*l+1];if(c===o)return l;o<c?s=l:a=l+1}return a}return function(t,n,r,i){for(var o=t.length,a=[],s=0;s<o;++s){var l=t[s],c=l.length;if(4===c){if(0==(u=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2)+(i[l[3]]<<3))||15===u)continue;switch(u){case 0:case 15:break;case 1:a.push([e(r,n,l[0],l[1]),e(r,n,l[0],l[2]),e(r,n,l[0],l[3])]);break;case 2:a.push([e(r,n,l[1],l[2]),e(r,n,l[1],l[0]),e(r,n,l[1],l[3])]);break;case 3:a.push([e(r,n,l[1],l[2]),e(r,n,l[0],l[2]),e(r,n,l[0],l[3])],[e(r,n,l[1],l[3]),e(r,n,l[1],l[2]),e(r,n,l[0],l[3])]);break;case 4:a.push([e(r,n,l[2],l[0]),e(r,n,l[2],l[1]),e(r,n,l[2],l[3])]);break;case 5:a.push([e(r,n,l[0],l[1]),e(r,n,l[2],l[1]),e(r,n,l[0],l[3])],[e(r,n,l[2],l[1]),e(r,n,l[2],l[3]),e(r,n,l[0],l[3])]);break;case 6:a.push([e(r,n,l[2],l[0]),e(r,n,l[1],l[0]),e(r,n,l[1],l[3])],[e(r,n,l[2],l[3]),e(r,n,l[2],l[0]),e(r,n,l[1],l[3])]);break;case 7:a.push([e(r,n,l[0],l[3]),e(r,n,l[1],l[3]),e(r,n,l[2],l[3])]);break;case 8:a.push([e(r,n,l[3],l[1]),e(r,n,l[3],l[0]),e(r,n,l[3],l[2])]);break;case 9:a.push([e(r,n,l[3],l[1]),e(r,n,l[0],l[1]),e(r,n,l[0],l[2])],[e(r,n,l[3],l[2]),e(r,n,l[3],l[1]),e(r,n,l[0],l[2])]);break;case 10:a.push([e(r,n,l[1],l[0]),e(r,n,l[3],l[0]),e(r,n,l[1],l[2])],[e(r,n,l[3],l[0]),e(r,n,l[3],l[2]),e(r,n,l[1],l[2])]);break;case 11:a.push([e(r,n,l[1],l[2]),e(r,n,l[0],l[2]),e(r,n,l[3],l[2])]);break;case 12:a.push([e(r,n,l[3],l[0]),e(r,n,l[2],l[0]),e(r,n,l[2],l[1])],[e(r,n,l[3],l[1]),e(r,n,l[3],l[0]),e(r,n,l[2],l[1])]);break;case 13:a.push([e(r,n,l[0],l[1]),e(r,n,l[2],l[1]),e(r,n,l[3],l[1])]);break;case 14:a.push([e(r,n,l[2],l[0]),e(r,n,l[1],l[0]),e(r,n,l[3],l[0])])}}else if(3===c){if(0==(u=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===u)continue;switch(u){case 0:case 7:break;case 1:a.push([e(r,n,l[0],l[2]),e(r,n,l[0],l[1])]);break;case 2:a.push([e(r,n,l[1],l[0]),e(r,n,l[1],l[2])]);break;case 3:a.push([e(r,n,l[0],l[2]),e(r,n,l[1],l[2])]);break;case 4:a.push([e(r,n,l[2],l[1]),e(r,n,l[2],l[0])]);break;case 5:a.push([e(r,n,l[2],l[1]),e(r,n,l[0],l[1])]);break;case 6:a.push([e(r,n,l[1],l[0]),e(r,n,l[2],l[0])])}}else if(2===c){var u;if(0==(u=(i[l[0]]<<0)+(i[l[1]]<<1))||3===u)continue;switch(u){case 0:case 3:break;case 1:a.push([e(r,n,l[0],l[1])]);break;case 2:a.push([e(r,n,l[1],l[0])])}}}return a}}]},{}],293:[function(e,t,n){"use strict";var r=e("bit-twiddle"),i=e("union-find");function o(e,t){var n=e.length,r=e.length-t.length,i=Math.min;if(r)return r;switch(n){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var o=e[0]+e[1],a=t[0]+t[1];if(s=o+e[2]-(a+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],o)-i(c+t[2],a);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var d=0;d<n;++d)if(r=u[d]-h[d])return r;return 0}}function a(e,t){return o(e[0],t[0])}function s(e,t){if(t){for(var n=e.length,r=new Array(n),i=0;i<n;++i)r[i]=[e[i],t[i]];for(r.sort(a),i=0;i<n;++i)e[i]=r[i][0],t[i]=r[i][1];return e}return e.sort(o),e}function l(e){if(0===e.length)return[];for(var t=1,n=e.length,r=1;r<n;++r){var i=e[r];if(o(i,e[r-1])){if(r===t){t++;continue}e[t++]=i}}return e.length=t,e}function c(e,t){for(var n=0,r=e.length-1,i=-1;n<=r;){var a=n+r>>1,s=o(e[a],t);s<=0?(0===s&&(i=a),n=a+1):s>0&&(r=a-1)}return i}function u(e,t){for(var n=new Array(e.length),i=0,a=n.length;i<a;++i)n[i]=[];for(var s=[],l=(i=0,t.length);i<l;++i)for(var u=t[i],h=u.length,d=1,f=1<<h;d<f;++d){s.length=r.popCount(d);for(var p=0,g=0;g<h;++g)d&1<<g&&(s[p++]=u[g]);var m=c(e,s);if(!(m<0))for(;n[m++].push(i),!(m>=e.length||0!==o(e[m],s)););}return n}function h(e,t){if(t<0)return[];for(var n=[],i=(1<<t+1)-1,o=0;o<e.length;++o)for(var a=e[o],l=i;l<1<<a.length;l=r.nextCombination(l)){for(var c=new Array(t+1),u=0,h=0;h<a.length;++h)l&1<<h&&(c[u++]=a[h]);n.push(c)}return s(n)}n.dimension=function(e){for(var t=0,n=Math.max,r=0,i=e.length;r<i;++r)t=n(t,e[r].length);return t-1},n.countVertices=function(e){for(var t=-1,n=Math.max,r=0,i=e.length;r<i;++r)for(var o=e[r],a=0,s=o.length;a<s;++a)t=n(t,o[a]);return t+1},n.cloneCells=function(e){for(var t=new Array(e.length),n=0,r=e.length;n<r;++n)t[n]=e[n].slice(0);return t},n.compareCells=o,n.normalize=s,n.unique=l,n.findCell=c,n.incidence=u,n.dual=function(e,t){if(!t)return u(l(h(e,0)),e);for(var n=new Array(t),r=0;r<t;++r)n[r]=[];r=0;for(var i=e.length;r<i;++r)for(var o=e[r],a=0,s=o.length;a<s;++a)n[o[a]].push(r);return n},n.explode=function(e){for(var t=[],n=0,r=e.length;n<r;++n)for(var i=e[n],o=0|i.length,a=1,l=1<<o;a<l;++a){for(var c=[],u=0;u<o;++u)a>>>u&1&&c.push(i[u]);t.push(c)}return s(t)},n.skeleton=h,n.boundary=function(e){for(var t=[],n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){for(var l=new Array(i.length-1),c=0,u=0;c<a;++c)c!==o&&(l[u++]=i[c]);t.push(l)}return s(t)},n.connectedComponents=function(e,t){return t?function(e,t){for(var n=new i(t),r=0;r<e.length;++r)for(var o=e[r],a=0;a<o.length;++a)for(var s=a+1;s<o.length;++s)n.link(o[a],o[s]);var l=[],c=n.ranks;for(r=0;r<c.length;++r)c[r]=-1;for(r=0;r<e.length;++r){var u=n.find(e[r][0]);c[u]<0?(c[u]=l.length,l.push([e[r].slice(0)])):l[c[u]].push(e[r].slice(0))}return l}(e,t):function(e){for(var t=l(s(h(e,0))),n=new i(t.length),r=0;r<e.length;++r)for(var o=e[r],a=0;a<o.length;++a)for(var u=c(t,[o[a]]),d=a+1;d<o.length;++d)n.link(u,c(t,[o[d]]));var f=[],p=n.ranks;for(r=0;r<p.length;++r)p[r]=-1;for(r=0;r<e.length;++r){var g=n.find(c(t,[e[r][0]]));p[g]<0?(p[g]=f.length,f.push([e[r].slice(0)])):f[p[g]].push(e[r].slice(0))}return f}(e)}},{"bit-twiddle":32,"union-find":309}],294:[function(e,t,n){arguments[4][32][0].apply(n,arguments)},{dup:32}],295:[function(e,t,n){arguments[4][293][0].apply(n,arguments)},{"bit-twiddle":294,dup:293,"union-find":296}],296:[function(e,t,n){"use strict";function r(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t<e;++t)this.roots[t]=t,this.ranks[t]=0}t.exports=r,r.prototype.length=function(){return this.roots.length},r.prototype.makeSet=function(){var e=this.roots.length;return this.roots.push(e),this.ranks.push(0),e},r.prototype.find=function(e){for(var t=this.roots;t[e]!==e;){var n=t[e];t[e]=t[n],e=n}return e},r.prototype.link=function(e,t){var n=this.find(e),r=this.find(t);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},{}],297:[function(e,t,n){"use strict";t.exports=function(e,t,n){for(var o=t.length,a=e.length,s=new Array(o),l=new Array(o),c=new Array(o),u=new Array(o),h=0;h<o;++h)s[h]=l[h]=-1,c[h]=1/0,u[h]=!1;for(h=0;h<a;++h){var d=e[h];if(2!==d.length)throw new Error("Input must be a graph");var f=d[1],p=d[0];-1!==l[p]?l[p]=-2:l[p]=f,-1!==s[f]?s[f]=-2:s[f]=p}function g(e){if(u[e])return 1/0;var n,i,o,a=s[e],c=l[e];return a<0||c<0?1/0:(n=t[e],i=t[a],o=t[c],Math.abs(r(n,i,o))/Math.sqrt(Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)))}function m(e,t){var n=k[e],r=k[t];k[e]=r,k[t]=n,T[n]=t,T[r]=e}function v(e){return c[k[e]]}function y(e){return 1&e?e-1>>1:(e>>1)-1}function b(e){for(var t=v(e);;){var n=t,r=2*e+1,i=2*(e+1),o=e;if(r<S){var a=v(r);a<n&&(o=r,n=a)}if(i<S&&v(i)<n&&(o=i),o===e)return e;m(e,o),e=o}}function _(e){for(var t=v(e);e>0;){var n=y(e);if(!(n>=0&&t<v(n)))return e;m(e,n),e=n}}function x(){if(S>0){var e=k[0];return m(0,S-1),S-=1,b(0),e}return-1}function w(e,t){var n=k[e];return c[n]===t?e:(c[n]=-1/0,_(e),x(),c[n]=t,_((S+=1)-1))}function A(e){if(!u[e]){u[e]=!0;var t=s[e],n=l[e];s[n]>=0&&(s[n]=t),l[t]>=0&&(l[t]=n),T[t]>=0&&w(T[t],g(t)),T[n]>=0&&w(T[n],g(n))}}var k=[],T=new Array(o);for(h=0;h<o;++h)(c[h]=g(h))<1/0?(T[h]=k.length,k.push(h)):T[h]=-1;var S=k.length;for(h=S>>1;h>=0;--h)b(h);for(;;){var E=x();if(E<0||c[E]>n)break;A(E)}var C=[];for(h=0;h<o;++h)u[h]||(T[h]=C.length,C.push(t[h].slice()));function M(e,t){if(e[t]<0)return t;var n=t,r=t;do{var i=e[r];if(!u[r]||i<0||i===r)break;if(i=e[r=i],!u[r]||i<0||i===r)break;r=i,n=e[n]}while(n!==r);for(var o=t;o!==r;o=e[o])e[o]=r;return r}C.length;var O=[];return e.forEach((function(e){var t=M(s,e[0]),n=M(l,e[1]);if(t>=0&&n>=0&&t!==n){var r=T[t],i=T[n];r!==i&&O.push([r,i])}})),i.unique(i.normalize(O)),{positions:C,edges:O}};var r=e("robust-orientation"),i=e("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(e,t,n){"use strict";t.exports=function(e,t){var n,o,a,s;if(t[0][0]<t[1][0])n=t[0],o=t[1];else{if(!(t[0][0]>t[1][0]))return i(t,e);n=t[1],o=t[0]}if(e[0][0]<e[1][0])a=e[0],s=e[1];else{if(!(e[0][0]>e[1][0]))return-i(e,t);a=e[1],s=e[0]}var l=r(n,o,s),c=r(n,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=r(s,a,o),c=r(s,a,n),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var r=e("robust-orientation");function i(e,t){var n,i,o,a;if(t[0][0]<t[1][0])n=t[0],i=t[1];else{if(!(t[0][0]>t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return l<c?l-c:s>u?s-u:l-u}n=t[1],i=t[0]}e[0][1]<e[1][1]?(o=e[0],a=e[1]):(o=e[1],a=e[0]);var h=r(i,n,o);return h||(h=r(i,n,a))||a-i}},{"robust-orientation":284}],299:[function(e,t,n){"use strict";t.exports=function(e){for(var t=e.length,n=2*t,r=new Array(n),o=0;o<t;++o){var l=e[o],c=l[0][0]<l[1][0];r[2*o]=new h(l[0][0],l,c,o),r[2*o+1]=new h(l[1][0],l,!c,o)}r.sort((function(e,t){var n=e.x-t.x;return n||(n=e.create-t.create)||Math.min(e.segment[0][1],e.segment[1][1])-Math.min(t.segment[0][1],t.segment[1][1])}));var d=i(a),f=[],p=[],g=[];for(o=0;o<n;){for(var m=r[o].x,v=[];o<n;){var y=r[o];if(y.x!==m)break;o+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(v.push(new u(y.segment[0][1],y.index,!0,!0)),v.push(new u(y.segment[1][1],y.index,!1,!1))):(v.push(new u(y.segment[1][1],y.index,!0,!1)),v.push(new u(y.segment[0][1],y.index,!1,!0)))):d=y.create?d.insert(y.segment,y.index):d.remove(y.segment)}f.push(d.root),p.push(m),g.push(v)}return new s(f,p,g)};var r=e("binary-search-bounds"),i=e("functional-red-black-tree"),o=e("robust-orientation"),a=e("./lib/order-segments");function s(e,t,n){this.slabs=e,this.coordinates=t,this.horizontal=n}function l(e,t){return e.y-t}function c(e,t){for(var n=null;e;){var r,i,a=e.key;a[0][0]<a[1][0]?(r=a[0],i=a[1]):(r=a[1],i=a[0]);var s=o(r,i,t);if(s<0)e=e.left;else if(s>0)if(t[0]!==a[1][0])n=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==a[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return n}function u(e,t,n,r){this.y=e,this.index=t,this.start=n,this.closed=r}function h(e,t,n,r){this.x=e,this.segment=t,this.create=n,this.index=r}s.prototype.castUp=function(e){var t=r.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var n=c(this.slabs[t],e),i=-1;if(n&&(i=n.value),this.coordinates[t]===e[0]){var s=null;if(n&&(s=n.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?a(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var d=r.ge(h,e[1],l);if(d<h.length){var f=h[d];if(e[1]===f.y){if(f.closed)return f.index;for(;d<h.length-1&&h[d+1].y===e[1];)if((f=h[d+=1]).closed)return f.index;if(f.y===e[1]&&!f.start){if((d+=1)>=h.length)return i;f=h[d]}}if(f.start)if(s){var p=o(s[0],s[1],[e[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=f.index)}else i=f.index;else f.y!==e[1]&&(i=f.index)}}}return i}},{"./lib/order-segments":298,"binary-search-bounds":31,"functional-red-black-tree":69,"robust-orientation":284}],300:[function(e,t,n){"use strict";var r=e("robust-dot-product"),i=e("robust-sum");function o(e,t){var n=i(r(e,t),[t[t.length-1]]);return n[n.length-1]}function a(e,t,n,r){var i=-t/(r-t);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=e.length,s=new Array(a),l=0;l<a;++l)s[l]=i*e[l]+o*n[l];return s}t.exports=function(e,t){for(var n=[],r=[],i=o(e[e.length-1],t),s=e[e.length-1],l=e[0],c=0;c<e.length;++c,s=l){var u=o(l=e[c],t);if(i<0&&u>0||i>0&&u<0){var h=a(s,u,l,i);n.push(h),r.push(h.slice())}u<0?r.push(l.slice()):u>0?n.push(l.slice()):(n.push(l.slice()),r.push(l.slice())),i=u}return{positive:n,negative:r}},t.exports.positive=function(e,t){for(var n=[],r=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l<e.length;++l,i=s){var c=o(s=e[l],t);(r<0&&c>0||r>0&&c<0)&&n.push(a(i,c,s,r)),c>=0&&n.push(s.slice()),r=c}return n},t.exports.negative=function(e,t){for(var n=[],r=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l<e.length;++l,i=s){var c=o(s=e[l],t);(r<0&&c>0||r>0&&c<0)&&n.push(a(i,c,s,r)),c<=0&&n.push(s.slice()),r=c}return n}},{"robust-dot-product":281,"robust-sum":289}],301:[function(e,t,n){!function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(e){return i(a(e),arguments)}function r(e,n){return t.apply(null,[e].concat(n||[]))}function i(n,r){var i,o,a,s,l,c,u,h,d,f=1,p=n.length,g="";for(o=0;o<p;o++)if("string"==typeof n[o])g+=n[o];else if("object"==typeof n[o]){if((s=n[o]).keys)for(i=r[f],a=0;a<s.keys.length;a++){if(null==i)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));i=i[s.keys[a]]}else i=s.param_no?r[s.param_no]:r[f++];if(e.not_type.test(s.type)&&e.not_primitive.test(s.type)&&i instanceof Function&&(i=i()),e.numeric_arg.test(s.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(t("[sprintf] expecting number but found %T",i));switch(e.number.test(s.type)&&(h=i>=0),s.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case"e":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case"f":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case"g":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case"t":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?g+=i:(!e.number.test(s.type)||h&&!s.sign?d="":(d=h?"+":"-",i=i.toString().replace(e.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(d+i).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var o=Object.create(null);function a(t){if(o[t])return o[t];for(var n,r=t,i=[],a=0;r;){if(null!==(n=e.text.exec(r)))i.push(n[0]);else if(null!==(n=e.modulo.exec(r)))i.push("%");else{if(null===(n=e.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){a|=1;var s=[],l=n[2],c=[];if(null===(c=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=e.key_access.exec(l)))s.push(c[1]);else{if(null===(c=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}n[2]=s}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}r=r.substring(n[0].length)}return o[t]=i}void 0!==n&&(n.sprintf=t,n.vsprintf=r),"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=r)}()},{}],302:[function(e,t,n){"use strict";t.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var n=i(e,t),r=n.length,o=new Array(r),a=new Array(r),s=0;s<r;++s)o[s]=[n[s]],a[s]=[s];return{positions:o,cells:a}}(e,t);var n=e.order.join()+"-"+e.dtype,s=a[n];return t=+t||0,s||(s=a[n]=function(e,t){var n=e.length+"d",i=o[n];if(i)return i(r,e,t)}(e.order,e.dtype)),s(e,t)};var r=e("ndarray-extract-contour"),i=e("zero-crossings"),o={"2d":function(e,t,n){var r=e({order:t,scalarArguments:3,getters:"generic"===n?[0]:void 0,phase:function(e,t,n,r){return e>r|0},vertex:function(e,t,n,r,i,o,a,s,l,c,u,h,d){var f=(a<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(r+n-2*d)/(n-r),t-.25-.25*(i+n-2*d)/(n-i)]);break;case 2:u.push([e-.75-.25*(-r-n+2*d)/(r-n),t-.25-.25*(o+r-2*d)/(r-o)]);break;case 3:u.push([e-.5,t-.5-.5*(i+n+o+r-4*d)/(n-i+r-o)]);break;case 4:u.push([e-.25-.25*(o+i-2*d)/(i-o),t-.75-.25*(-i-n+2*d)/(i-n)]);break;case 5:u.push([e-.5-.5*(r+n+o+i-4*d)/(n-r+i-o),t-.5]);break;case 6:u.push([e-.5-.25*(-r-n+o+i)/(r-n+i-o),t-.5-.25*(-i-n+o+r)/(i-n+r-o)]);break;case 7:u.push([e-.75-.25*(o+i-2*d)/(i-o),t-.75-.25*(o+r-2*d)/(r-o)]);break;case 8:u.push([e-.75-.25*(-o-i+2*d)/(o-i),t-.75-.25*(-o-r+2*d)/(o-r)]);break;case 9:u.push([e-.5-.25*(r+n+-o-i)/(n-r+o-i),t-.5-.25*(i+n+-o-r)/(n-i+o-r)]);break;case 10:u.push([e-.5-.5*(-r-n-o-i+4*d)/(r-n+o-i),t-.5]);break;case 11:u.push([e-.25-.25*(-o-i+2*d)/(o-i),t-.75-.25*(i+n-2*d)/(n-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-n-o-r+4*d)/(i-n+o-r)]);break;case 13:u.push([e-.75-.25*(r+n-2*d)/(n-r),t-.25-.25*(-o-r+2*d)/(o-r)]);break;case 14:u.push([e-.25-.25*(-r-n+2*d)/(r-n),t-.25-.25*(-i-n+2*d)/(i-n)])}},cell:function(e,t,n,r,i,o,a,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var n=[],i=[];return r(e,n,i,t),{positions:n,cells:i}}}};var a={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(e,t,n){(function(n){(function(){"use strict";t.exports=function e(t,n,i){i=i||{};var a=o[t];a||(a=o[t]={" ":{data:new Float32Array(0),shape:.2}});var s=a[n];if(!s)if(n.length<=1||!/\d/.test(n))s=a[n]=function(e){for(var t=e.cells,n=e.positions,r=new Float32Array(6*t.length),i=0,o=0,a=0;a<t.length;++a)for(var s=t[a],l=0;l<3;++l){var c=n[s[l]];r[i++]=c[0],r[i++]=c[1]+1.4,o=Math.max(c[0],o)}return{data:r,shape:o}}(r(n,{triangles:!0,font:t,textAlign:i.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var l=n.split(/(\d|\s)/),c=new Array(l.length),u=0,h=0,d=0;d<l.length;++d)c[d]=e(t,l[d]),u+=c[d].data.length,h+=c[d].shape,d>0&&(h+=.02);var f=new Float32Array(u),p=0,g=-.5*h;for(d=0;d<c.length;++d){for(var m=c[d].data,v=0;v<m.length;v+=2)f[p++]=m[v]+g,f[p++]=m[v+1];g+=c[d].shape+.02}s=a[n]={data:f,shape:h}}return s};var r=e("vectorize-text"),i=window||n.global||{},o=i.__TEXT_CACHE||{};i.__TEXT_CACHE={}}).call(this)}).call(this,e("_process"))},{_process:5,"vectorize-text":311}],304:[function(e,t,n){"use strict";var r=e("parse-unit");t.exports=o;function i(e,t){var n=r(getComputedStyle(e).getPropertyValue(t));return n[0]*o(n[1],e)}function o(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),t!==window&&t!==document||(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=i(n,"font-size")/128;return t.removeChild(n),r}(e,t);case"em":return i(t,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}},{"parse-unit":265}],305:[function(e,t,n){"use strict";t.exports=function(e){var t=(e=e||{}).center||[0,0,0],n=e.up||[0,1,0],r=e.right||h(n),i=e.radius||1,o=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),n=[].slice.call(n,0,3),s(n,n),r=[].slice.call(r,0,3),s(r,r),"eye"in e){var f=e.eye,p=[f[0]-t[0],f[1]-t[1],f[2]-t[2]];a(r,p,n),c(r[0],r[1],r[2])<1e-6?r=h(n):s(r,r),i=c(p[0],p[1],p[2]);var g=l(n,p)/i,m=l(r,p)/i;u=Math.acos(g),o=Math.acos(m)}return i=Math.log(i),new d(e.zoomMin,e.zoomMax,t,n,r,i,o,u)};var r=e("filtered-vector"),i=e("gl-mat4/invert"),o=e("gl-mat4/rotate"),a=e("gl-vec3/cross"),s=e("gl-vec3/normalize"),l=e("gl-vec3/dot");function c(e,t,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(n,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),n=Math.abs(e[1]),r=Math.abs(e[2]),i=[0,0,0];t>Math.max(n,r)?i[2]=1:n>Math.max(t,r)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=e[l]*e[l],a+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=a/o*e[l];return s(i,i),i}function d(e,t,n,i,o,a,s,l){this.center=r(n),this.up=r(i),this.right=r(o),this.radius=r([a]),this.angle=r([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,n=this.computedRight,r=0,i=0,o=0;o<3;++o)i+=t[o]*n[o],r+=t[o]*t[o];var l=Math.sqrt(r),u=0;for(o=0;o<3;++o)n[o]-=t[o]*i/r,u+=n[o]*n[o],t[o]/=l;var h=Math.sqrt(u);for(o=0;o<3;++o)n[o]/=h;var d=this.computedToward;a(d,t,n),s(d,d);var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],g=this.computedAngle[1],m=Math.cos(p),v=Math.sin(p),y=Math.cos(g),b=Math.sin(g),_=this.computedCenter,x=m*y,w=v*y,A=b,k=-m*b,T=-v*b,S=y,E=this.computedEye,C=this.computedMatrix;for(o=0;o<3;++o){var M=x*n[o]+w*d[o]+A*t[o];C[4*o+1]=k*n[o]+T*d[o]+S*t[o],C[4*o+2]=M,C[4*o+3]=0}var O=C[1],L=C[5],D=C[9],I=C[2],R=C[6],P=C[10],N=L*P-D*R,z=D*I-O*P,F=O*R-L*I,B=c(N,z,F);for(N/=B,z/=B,F/=B,C[0]=N,C[4]=z,C[8]=F,o=0;o<3;++o)E[o]=_[o]+C[2+4*o]*f;for(o=0;o<3;++o){u=0;for(var j=0;j<3;++j)u+=C[o+4*j]*E[j];C[12+o]=-u}C[15]=1},f.getMatrix=function(e,t){this.recalcMatrix(e);var n=this.computedMatrix;if(t){for(var r=0;r<16;++r)t[r]=n[r];return t}return n};var p=[0,0,0];f.rotate=function(e,t,n,r){if(this.angle.move(e,t,n),r){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,r,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,a[0],a[1],a[2]),this.right.set(e,s[0],s[1],s[2])}},f.pan=function(e,t,n,r){t=t||0,n=n||0,r=r||0,this.recalcMatrix(e);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var u=i[0],h=i[4],d=i[8],f=u*o+h*a+d*s,p=c(u-=o*f,h-=a*f,d-=s*f),g=(u/=p)*t+o*n,m=(h/=p)*t+a*n,v=(d/=p)*t+s*n;this.center.move(e,g,m,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+r),this.radius.set(e,Math.log(y))},f.translate=function(e,t,n,r){this.center.move(e,t||0,n||0,r||0)},f.setMatrix=function(e,t,n,r){var o=1;"number"==typeof n&&(o=0|n),(o<0||o>3)&&(o=1);var a=(o+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[o],l=t[o+4],h=t[o+8];if(r){var d=Math.abs(s),f=Math.abs(l),p=Math.abs(h),g=Math.max(d,f,p);d===g?(s=s<0?-1:1,l=h=0):p===g?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var m=c(s,l,h);s/=m,l/=m,h/=m}var v,y,b=t[a],_=t[a+4],x=t[a+8],w=b*s+_*l+x*h,A=c(b-=s*w,_-=l*w,x-=h*w),k=l*(x/=A)-h*(_/=A),T=h*(b/=A)-s*x,S=s*_-l*b,E=c(k,T,S);if(k/=E,T/=E,S/=E,this.center.jump(e,H,$,W),this.radius.idle(e),this.up.jump(e,s,l,h),this.right.jump(e,b,_,x),2===o){var C=t[1],M=t[5],O=t[9],L=C*b+M*_+O*x,D=C*k+M*T+O*S;v=N<0?-Math.PI/2:Math.PI/2,y=Math.atan2(D,L)}else{var I=t[2],R=t[6],P=t[10],N=I*s+R*l+P*h,z=I*b+R*_+P*x,F=I*k+R*T+P*S;v=Math.asin(u(N)),y=Math.atan2(F,z)}this.angle.jump(e,y,v),this.recalcMatrix(e);var B=t[2],j=t[6],U=t[10],V=this.computedMatrix;i(V,t);var q=V[15],H=V[12]/q,$=V[13]/q,W=V[14]/q,G=Math.exp(this.computedRadius[0]);this.center.jump(e,H-B*G,$-j*G,W-U*G)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},f.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.lookAt=function(e,t,n,r){this.recalcMatrix(e),t=t||this.computedEye,n=n||this.computedCenter;var i=(r=r||this.computedUp)[0],o=r[1],a=r[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=t[0]-n[0],h=t[1]-n[1],d=t[2]-n[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,g=p[0],m=p[1],v=p[2],y=i*g+o*m+a*v,b=c(g-=y*i,m-=y*o,v-=y*a);if(!(b<.01&&(b=c(g=o*d-a*h,m=a*l-i*d,v=i*h-o*l))<1e-6)){g/=b,m/=b,v/=b,this.up.set(e,i,o,a),this.right.set(e,g,m,v),this.center.set(e,n[0],n[1],n[2]),this.radius.set(e,Math.log(f));var _=o*v-a*m,x=a*g-i*v,w=i*m-o*g,A=c(_,x,w),k=i*l+o*h+a*d,T=g*l+m*h+v*d,S=(_/=A)*l+(x/=A)*h+(w/=A)*d,E=Math.asin(u(k)),C=Math.atan2(S,T),M=this.angle._state,O=M[M.length-1],L=M[M.length-2];O%=2*Math.PI;var D=Math.abs(O+2*Math.PI-C),I=Math.abs(O-C),R=Math.abs(O-2*Math.PI-C);D<I&&(O+=2*Math.PI),R<I&&(O-=2*Math.PI),this.angle.jump(this.angle.lastT(),O,L),this.angle.set(e,C,E)}}}}},{"filtered-vector":68,"gl-mat4/invert":98,"gl-mat4/rotate":103,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/normalize":179}],306:[function(e,t,n){"use strict";t.exports=function(e,t,n){var i=e*t,o=r*e,a=o-(o-e),s=e-a,l=r*t,c=l-(l-t),u=t-c,h=s*u-(i-a*c-s*c-a*u);return n?(n[0]=h,n[1]=i,n):[h,i]};var r=+(Math.pow(2,27)+1)},{}],307:[function(e,t,n){"use strict";t.exports=function(e,t,n){var r=e+t,i=r-e,o=t-i,a=e-(r-i);return n?(n[0]=a+o,n[1]=r,n):[a+o,r]}},{}],308:[function(e,t,r){(function(t){(function(){"use strict";var n=e("bit-twiddle"),i=e("dup"),o=e("buffer").Buffer;t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=t.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function d(e){if(e){var t=e.length||e.byteLength,r=n.log2(t);u[r].push(e)}}function f(e){e=n.nextPow2(e);var t=n.log2(e),r=u[t];return r.length>0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function g(e){return new Uint16Array(f(2*e),0,e)}function m(e){return new Uint32Array(f(4*e),0,e)}function v(e){return new Int8Array(f(e),0,e)}function y(e){return new Int16Array(f(2*e),0,e)}function b(e){return new Int32Array(f(4*e),0,e)}function _(e){return new Float32Array(f(4*e),0,e)}function x(e){return new Float64Array(f(8*e),0,e)}function w(e){return a?new Uint8ClampedArray(f(e),0,e):p(e)}function A(e){return s?new BigUint64Array(f(8*e),0,e):null}function k(e){return l?new BigInt64Array(f(8*e),0,e):null}function T(e){return new DataView(f(e),0,e)}function S(e){e=n.nextPow2(e);var t=n.log2(e),r=h[t];return r.length>0?r.pop():new o(e)}r.free=function(e){if(o.isBuffer(e))h[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(e){d(e.buffer)},r.freeArrayBuffer=d,r.freeBuffer=function(e){h[n.log2(e.length)].push(e)},r.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return g(e);case"uint32":return m(e);case"int8":return v(e);case"int16":return y(e);case"int32":return b(e);case"float":case"float32":return _(e);case"double":case"float64":return x(e);case"uint8_clamped":return w(e);case"bigint64":return k(e);case"biguint64":return A(e);case"buffer":return S(e);case"data":case"dataview":return T(e);default:return null}return null},r.mallocArrayBuffer=f,r.mallocUint8=p,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=b,r.mallocFloat32=r.mallocFloat=_,r.mallocFloat64=r.mallocDouble=x,r.mallocUint8Clamped=w,r.mallocBigUint64=A,r.mallocBigInt64=k,r.mallocDataView=T,r.mallocBuffer=S,r.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(e,t,n){"use strict";function r(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t<e;++t)this.roots[t]=t,this.ranks[t]=0}t.exports=r;var i=r.prototype;Object.defineProperty(i,"length",{get:function(){return this.roots.length}}),i.makeSet=function(){var e=this.roots.length;return this.roots.push(e),this.ranks.push(0),e},i.find=function(e){for(var t=e,n=this.roots;n[e]!==e;)e=n[e];for(;n[t]!==e;){var r=n[t];n[t]=e,t=r}return e},i.link=function(e,t){var n=this.find(e),r=this.find(t);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},{}],310:[function(e,t,n){"use strict";t.exports=function(e,t,n){return 0===e.length?e:t?(n||e.sort(t),function(e,t){for(var n=1,r=e.length,i=e[0],o=e[0],a=1;a<r;++a)if(o=i,t(i=e[a],o)){if(a===n){n++;continue}e[n++]=i}return e.length=n,e}(e,t)):(n||e.sort(),function(e){for(var t=1,n=e.length,r=e[0],i=e[0],o=1;o<n;++o,i=r)if(i=r,(r=e[o])!==i){if(o===t){t++;continue}e[t++]=r}return e.length=t,e}(e))}},{}],311:[function(e,t,n){"use strict";t.exports=function(e,t){return"object"==typeof t&&null!==t||(t={}),r(e,t.canvas||i,t.context||o,t)};var r=e("./lib/vtext"),i=null,o=null;"undefined"!=typeof document&&((i=document.createElement("canvas")).width=8192,i.height=1024,o=i.getContext("2d"))},{"./lib/vtext":312}],312:[function(e,t,n){t.exports=function(e,t,n,r){var o=64,a=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return r&&(r.size&&r.size>0&&(o=r.size),r.lineSpacing&&r.lineSpacing>0&&(a=r.lineSpacing),r.styletags&&r.styletags.breaklines&&(s.breaklines=!!r.styletags.breaklines),r.styletags&&r.styletags.bolds&&(s.bolds=!!r.styletags.bolds),r.styletags&&r.styletags.italics&&(s.italics=!!r.styletags.italics),r.styletags&&r.styletags.subscripts&&(s.subscripts=!!r.styletags.subscripts),r.styletags&&r.styletags.superscripts&&(s.superscripts=!!r.styletags.superscripts)),n.font=[r.fontStyle,r.fontVariant,r.fontWeight,o+"px",r.font].filter((function(e){return e})).join(" "),n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",m(function(e,t,n,r,o,a){n=n.replace(/\n/g,""),n=!0===a.breaklines?n.replace(/\<br\>/g,"\n"):n.replace(/\<br\>/g," ");var s="",l=[];for(v=0;v<n.length;++v)l[v]=s;!0===a.bolds&&(l=f("b",c,n,l)),!0===a.italics&&(l=f("i",u,n,l)),!0===a.superscripts&&(l=f("sup","+1",n,l)),!0===a.subscripts&&(l=f("sub","-1",n,l));var p=[],g="";for(v=0;v<n.length;++v)null!==l[v]&&(g+=n[v],p.push(l[v]));var m,v,y,b,_,x=g.split("\n"),w=x.length,A=Math.round(o*r),k=r,T=2*r,S=0,E=w*A+T;e.height<E&&(e.height=E),t.fillStyle="#000",t.fillRect(0,0,e.width,e.height),t.fillStyle="#fff";var C=0,M="";function O(){if(""!==M){var e=t.measureText(M).width;t.fillText(M,k+y,T+b),y+=e}}function L(){return Math.round(_)+"px "}function D(e,n){var r=""+t.font;if(!0===a.subscripts){var i=e.indexOf(d),o=n.indexOf(d),s=i>-1?parseInt(e[1+i]):0,l=o>-1?parseInt(n[1+o]):0;s!==l&&(r=r.replace(L(),"?px "),_*=Math.pow(.75,l-s),r=r.replace("?px ",L())),b+=.25*A*(l-s)}if(!0===a.superscripts){var f=e.indexOf(h),p=n.indexOf(h),g=f>-1?parseInt(e[1+f]):0,m=p>-1?parseInt(n[1+p]):0;g!==m&&(r=r.replace(L(),"?px "),_*=Math.pow(.75,m-g),r=r.replace("?px ",L())),b-=.25*A*(m-g)}if(!0===a.bolds){var v=e.indexOf(c)>-1,y=n.indexOf(c)>-1;!v&&y&&(r=x?r.replace("italic ","italic bold "):"bold "+r),v&&!y&&(r=r.replace("bold ",""))}if(!0===a.italics){var x=e.indexOf(u)>-1,w=n.indexOf(u)>-1;!x&&w&&(r="italic "+r),x&&!w&&(r=r.replace("italic ",""))}t.font=r}for(m=0;m<w;++m){var I=x[m]+"\n";for(y=0,b=m*A,_=r,M="",v=0;v<I.length;++v){var R=v+C<p.length?p[v+C]:p[p.length-1];s===R?M+=I[v]:(O(),M=I[v],void 0!==R&&(D(s,R),s=R))}O(),C+=I.length;var P=0|Math.round(y+2*k);S<P&&(S=P)}var N=S,z=T+A*w;return i(t.getImageData(0,0,N,z).data,[z,N,4]).pick(-1,-1,0).transpose(1,0)}(t,n,e,o,a,s),r,o)},t.exports.processPixels=m;var r=e("surface-nets"),i=e("ndarray"),o=e("simplify-planar-graph"),a=e("clean-pslg"),s=e("cdt2d"),l=e("planar-graph-to-polyline"),c="b|",u="i|",h="+",d="-";function f(e,t,n,r){for(var i="<"+e+">",o="</"+e+">",a=i.length,s=o.length,l=t[0]===h||t[0]===d,c=0,u=-s;c>-1&&-1!==(c=n.indexOf(i,c))&&-1!==(u=n.indexOf(o,c+a))&&!(u<=c);){for(var f=c;f<u+s;++f)if(f<c+a||f>=u)r[f]=null,n=n.substr(0,f)+" "+n.substr(f+1);else if(null!==r[f]){var p=r[f].indexOf(t[0]);-1===p?r[f]+=t:l&&(r[f]=r[f].substr(0,p+1)+(1+parseInt(r[f][p+1]))+r[f].substr(p+2))}var g=c+a,m=n.substr(g,u-g).indexOf(i);c=-1!==m?m:u+s}return r}function p(e,t){var n=r(e,128);return t?o(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function g(e,t,n,r){var i=p(e,r),o=function(e,t,n){for(var r=t.textAlign||"start",i=t.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=e.length,l=0;l<s;++l)for(var c=e[l],u=0;u<2;++u)o[u]=0|Math.min(o[u],c[u]),a[u]=0|Math.max(a[u],c[u]);var h=0;switch(r){case"center":h=-.5*(o[0]+a[0]);break;case"right":case"end":h=-a[0];break;case"left":case"start":h=-o[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+r+"'")}var d=0;switch(i){case"hanging":case"top":d=-o[1];break;case"middle":d=-.5*(o[1]+a[1]);break;case"alphabetic":case"ideographic":d=-3*n;break;case"bottom":d=-a[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+i+"'")}var f=1/n;return"lineHeight"in t?f*=+t.lineHeight:"width"in t?f=t.width/(a[0]-o[0]):"height"in t&&(f=t.height/(a[1]-o[1])),e.map((function(e){return[f*(e[0]+h),f*(e[1]+d)]}))}(i.positions,t,n),c=i.edges,u="ccw"===t.orientation;if(a(o,c),t.polygons||t.polygon||t.polyline){for(var h=l(c,o),d=new Array(h.length),f=0;f<h.length;++f){for(var g=h[f],m=new Array(g.length),v=0;v<g.length;++v){for(var y=g[v],b=new Array(y.length),_=0;_<y.length;++_)b[_]=o[y[_]].slice();u&&b.reverse(),m[v]=b}d[f]=m}return d}return t.triangles||t.triangulate||t.triangle?{cells:s(o,c,{delaunay:!1,exterior:!1,interior:!0}),positions:o}:{edges:c,positions:o}}function m(e,t,n){try{return g(e,t,n,!0)}catch(e){}try{return g(e,t,n,!1)}catch(e){}return t.polygons||t.polyline||t.polygon?[]:t.triangles||t.triangulate||t.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:42,"clean-pslg":50,ndarray:259,"planar-graph-to-polyline":268,"simplify-planar-graph":297,"surface-nets":302}],313:[function(e,t,n){!function(){"use strict";if("undefined"==typeof ses||!ses.ok||ses.ok()){"undefined"!=typeof ses&&(ses.weakMapPermitHostObjects=m);var e=!1;if("function"==typeof WeakMap){var n=WeakMap;if("undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var r=new n,i=Object.freeze({});if(r.set(i,1),1===r.get(i))return void(t.exports=WeakMap);e=!0}}Object.prototype.hasOwnProperty;var o=Object.getOwnPropertyNames,a=Object.defineProperty,s=Object.isExtensible,l="weakmap:",c=l+"ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var u=new ArrayBuffer(25),h=new Uint8Array(u);crypto.getRandomValues(h),c=l+"rand:"+Array.prototype.map.call(h,(function(e){return(e%36).toString(36)})).join("")+"___"}if(a(Object,"getOwnPropertyNames",{value:function(e){return o(e).filter(v)}}),"getPropertyNames"in Object){var d=Object.getPropertyNames;a(Object,"getPropertyNames",{value:function(e){return d(e).filter(v)}})}!function(){var e=Object.freeze;a(Object,"freeze",{value:function(t){return y(t),e(t)}});var t=Object.seal;a(Object,"seal",{value:function(e){return y(e),t(e)}});var n=Object.preventExtensions;a(Object,"preventExtensions",{value:function(e){return y(e),n(e)}})}();var f=!1,p=0,g=function(){this instanceof g||_();var e=[],t=[],n=p++;return Object.create(g.prototype,{get___:{value:b((function(r,i){var o,a=y(r);return a?n in a?a[n]:i:(o=e.indexOf(r))>=0?t[o]:i}))},has___:{value:b((function(t){var r=y(t);return r?n in r:e.indexOf(t)>=0}))},set___:{value:b((function(r,i){var o,a=y(r);return a?a[n]=i:(o=e.indexOf(r))>=0?t[o]=i:(o=e.length,t[o]=i,e[o]=r),this}))},delete___:{value:b((function(r){var i,o,a=y(r);return a?n in a&&delete a[n]:!((i=e.indexOf(r))<0||(o=e.length-1,e[i]=void 0,t[i]=t[o],e[i]=e[o],e.length=o,t.length=o,0))}))}})};g.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof n?function(){function r(){this instanceof g||_();var t,r=new n,i=void 0,o=!1;return t=e?function(e,t){return r.set(e,t),r.has(e)||(i||(i=new g),i.set(e,t)),this}:function(e,t){if(o)try{r.set(e,t)}catch(n){i||(i=new g),i.set___(e,t)}else r.set(e,t);return this},Object.create(g.prototype,{get___:{value:b((function(e,t){return i?r.has(e)?r.get(e):i.get___(e,t):r.get(e,t)}))},has___:{value:b((function(e){return r.has(e)||!!i&&i.has___(e)}))},set___:{value:b(t)},delete___:{value:b((function(e){var t=!!r.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:b((function(e){if(e!==m)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=g.prototype,t.exports=r,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=g)}function m(e){e.permitHostObjects___&&e.permitHostObjects___(m)}function v(e){return!(e.substr(0,l.length)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return a(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(e){return}}}function b(e){return e.prototype=null,Object.freeze(e)}function _(){f||"undefined"==typeof console||(f=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],314:[function(e,t,n){var r=e("./hidden-store.js");t.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:r(t,e)}}},{"./hidden-store.js":315}],315:[function(e,t,n){t.exports=function(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n}},{}],316:[function(e,t,n){var r=e("./create-store.js");t.exports=function(){var e=r();return{get:function(t,n){var r=e(t);return r.hasOwnProperty("value")?r.value:n},set:function(t,n){return e(t).value=n,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},{"./create-store.js":314}],317:[function(e,t,n){"use strict";var r,i=function(){return function(e,t,n,r,i,o){var a=e[0],s=n[0],l=[0],c=s;r|=0;var u=0,h=s;for(u=0;u<a;++u){var d=t[r]-o,f=t[r+c]-o;d>=0!=f>=0&&i.push(l[0]+.5+.5*(d+f)/(d-f)),r+=h,++l[0]}}};t.exports=(r={funcName:{funcName:"zeroCrossings"}.funcName},function(e){var t={};return function(n,r,i){var o=n.dtype,a=n.order,s=[o,a.join()].join(),l=t[s];return l||(t[s]=l=e([o,a])),l(n.shape.slice(0),n.data,n.stride,0|n.offset,r,i)}}(i.bind(void 0,r)))},{}],318:[function(e,t,n){"use strict";t.exports=function(e,t){var n=[];return t=+t||0,r(e.hi(e.shape[0]-1),n,t),n};var r=e("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)}))}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[27])(27)},91928:(e,t,n)=>{"use strict";var r=n(59952),i=n(70358),o=Object.prototype.hasOwnProperty;function a(e){return e&&"EPROMISERETRY"===e.code&&o.call(e,"retried")}e.exports=function(e,t){var n,o;return"object"==typeof e&&"function"==typeof t&&(n=t,t=e,e=n),o=i.operation(t),new Promise((function(t,n){o.attempt((function(i){Promise.resolve().then((function(){return e((function(e){throw a(e)&&(e=e.retried),r("Retrying","EPROMISERETRY",{retried:e})}),i)})).then(t,(function(e){a(e)&&(e=e.retried,o.retry(e||new Error))||n(e)}))}))}))}},76402:(e,t,n)=>{"use strict";var r=n(5178);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at path_to_url");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},73715:(e,t,n)=>{e.exports=n(76402)()},5178:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(73116);const i=(0,n(63527).Z)((function(e,t){return(0,r.Z)(e.length,(function(){return e.apply(t,arguments)}))}))},93961:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(85010),i=n(52369);function o(){if(0===arguments.length)throw new Error("compose requires at least one argument");return r.Z.apply(this,(0,i.Z)(arguments))}},73116:(e,t,n)=>{"use strict";function r(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,s,l){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,s,l,c,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}n.d(t,{Z:()=>r})},18711:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(72434);function i(e,t){return function(){var n=arguments.length;if(0===n)return t();var i=arguments[n-1];return(0,r.Z)(i)||"function"!=typeof i[e]?t.apply(this,arguments):i[e].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},4685:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(11660);function i(e){return function t(n){return 0===arguments.length||(0,r.Z)(n)?t:e.apply(this,arguments)}}},63527:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4685),i=n(11660);function o(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return(0,i.Z)(n)?t:(0,r.Z)((function(t){return e(n,t)}));default:return(0,i.Z)(n)&&(0,i.Z)(o)?t:(0,i.Z)(n)?(0,r.Z)((function(t){return e(t,o)})):(0,i.Z)(o)?(0,r.Z)((function(t){return e(n,t)})):e(n,o)}}}},27001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4685),i=n(63527),o=n(11660);function a(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return(0,o.Z)(n)?t:(0,i.Z)((function(t,r){return e(n,t,r)}));case 2:return(0,o.Z)(n)&&(0,o.Z)(a)?t:(0,o.Z)(n)?(0,i.Z)((function(t,n){return e(t,a,n)})):(0,o.Z)(a)?(0,i.Z)((function(t,r){return e(n,t,r)})):(0,r.Z)((function(t){return e(n,a,t)}));default:return(0,o.Z)(n)&&(0,o.Z)(a)&&(0,o.Z)(s)?t:(0,o.Z)(n)&&(0,o.Z)(a)?(0,i.Z)((function(t,n){return e(t,n,s)})):(0,o.Z)(n)&&(0,o.Z)(s)?(0,i.Z)((function(t,n){return e(t,a,n)})):(0,o.Z)(a)&&(0,o.Z)(s)?(0,i.Z)((function(t,r){return e(n,t,r)})):(0,o.Z)(n)?(0,r.Z)((function(t){return e(t,a,s)})):(0,o.Z)(a)?(0,r.Z)((function(t){return e(n,t,s)})):(0,o.Z)(s)?(0,r.Z)((function(t){return e(n,a,t)})):e(n,a,s)}}}},72434:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},10864:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(4685),i=n(72434),o=n(15640);const a=(0,r.Z)((function(e){return!!(0,i.Z)(e)||!!e&&"object"==typeof e&&!(0,o.Z)(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}))},11660:(e,t,n)=>{"use strict";function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}n.d(t,{Z:()=>r})},15640:(e,t,n)=>{"use strict";function r(e){return"[object String]"===Object.prototype.toString.call(e)}n.d(t,{Z:()=>r})},66699:(e,t,n)=>{"use strict";function r(e,t){return function(){return t.call(this,e.apply(this,arguments))}}n.d(t,{Z:()=>r})},35259:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(10864),i=n(54176),o=n(64181);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r]((0,o.Z)(e["@@transducer/step"],e),t))}var l="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function c(e,t,n){if("function"==typeof e&&(e=(0,i.Z)(e)),(0,r.Z)(n))return function(e,t,n){for(var r=0,i=n.length;r<i;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[l])return a(e,t,n[l]());if("function"==typeof n.next)return a(e,t,n);if("function"==typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},54176:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function i(e){return new r(e)}},97983:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(63527).Z)((function(e,t){for(var n={},r=0;r<e.length;)e[r]in t&&(n[e[r]]=t[e[r]]),r+=1;return n}))},85010:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(73116),i=n(66699),o=n(73333),a=n(91367);function s(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return(0,r.Z)(arguments[0].length,(0,o.Z)(i.Z,arguments[0],(0,a.Z)(arguments)))}},73333:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(27001),i=n(35259);const o=(0,r.Z)(i.Z)},52369:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(4685),i=n(15640);const o=(0,r.Z)((function(e){return(0,i.Z)(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()}))},39380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(18711);const i=(0,n(27001).Z)((0,r.Z)("slice",(function(e,t,n){return Array.prototype.slice.call(n,e,t)})))},91367:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(18711),i=n(4685),o=n(39380);const a=(0,i.Z)((0,r.Z)("tail",(0,o.Z)(1,1/0)))},4670:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o,a=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.fk=void 0;var s,l=n(20362),c="undefined"==typeof navigator||!0===n.g.PREVENT_CODEMIRROR_RENDER;c||(s=n(30339));var u=function(){function e(){}return e.equals=function(e,t){var n=this,r=Object.keys,o=i(e),a=i(t);return e&&t&&"object"===o&&o===a?r(e).length===r(t).length&&r(e).every((function(r){return n.equals(e[r],t[r])})):e===t},e}(),h=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,n){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!u.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!u.equals(e.cursor,t.cursor)&&this.delegateCursor(n.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!u.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter((function(e){return/^on/.test(e)})).forEach((function(e){switch(e){case"onBlur":t.editor.on("blur",(function(e,n){t.props.onBlur(t.editor,n)}));break;case"onContextMenu":t.editor.on("contextmenu",(function(e,n){t.props.onContextMenu(t.editor,n)}));break;case"onCopy":t.editor.on("copy",(function(e,n){t.props.onCopy(t.editor,n)}));break;case"onCursor":t.editor.on("cursorActivity",(function(e){t.props.onCursor(t.editor,t.editor.getDoc().getCursor())}));break;case"onCursorActivity":t.editor.on("cursorActivity",(function(e){t.props.onCursorActivity(t.editor)}));break;case"onCut":t.editor.on("cut",(function(e,n){t.props.onCut(t.editor,n)}));break;case"onDblClick":t.editor.on("dblclick",(function(e,n){t.props.onDblClick(t.editor,n)}));break;case"onDragEnter":t.editor.on("dragenter",(function(e,n){t.props.onDragEnter(t.editor,n)}));break;case"onDragLeave":t.editor.on("dragleave",(function(e,n){t.props.onDragLeave(t.editor,n)}));break;case"onDragOver":t.editor.on("dragover",(function(e,n){t.props.onDragOver(t.editor,n)}));break;case"onDragStart":t.editor.on("dragstart",(function(e,n){t.props.onDragStart(t.editor,n)}));break;case"onDrop":t.editor.on("drop",(function(e,n){t.props.onDrop(t.editor,n)}));break;case"onFocus":t.editor.on("focus",(function(e,n){t.props.onFocus(t.editor,n)}));break;case"onGutterClick":t.editor.on("gutterClick",(function(e,n,r,i){t.props.onGutterClick(t.editor,n,r,i)}));break;case"onInputRead":t.editor.on("inputRead",(function(e,n){t.props.onInputRead(t.editor,n)}));break;case"onKeyDown":t.editor.on("keydown",(function(e,n){t.props.onKeyDown(t.editor,n)}));break;case"onKeyHandled":t.editor.on("keyHandled",(function(e,n,r){t.props.onKeyHandled(t.editor,n,r)}));break;case"onKeyPress":t.editor.on("keypress",(function(e,n){t.props.onKeyPress(t.editor,n)}));break;case"onKeyUp":t.editor.on("keyup",(function(e,n){t.props.onKeyUp(t.editor,n)}));break;case"onMouseDown":t.editor.on("mousedown",(function(e,n){t.props.onMouseDown(t.editor,n)}));break;case"onPaste":t.editor.on("paste",(function(e,n){t.props.onPaste(t.editor,n)}));break;case"onRenderLine":t.editor.on("renderLine",(function(e,n,r){t.props.onRenderLine(t.editor,n,r)}));break;case"onScroll":t.editor.on("scroll",(function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())}));break;case"onSelection":t.editor.on("beforeSelectionChange",(function(e,n){t.props.onSelection(t.editor,n)}));break;case"onTouchStart":t.editor.on("touchstart",(function(e,n){t.props.onTouchStart(t.editor,n)}));break;case"onUpdate":t.editor.on("update",(function(e){t.props.onUpdate(t.editor)}));break;case"onViewportChange":t.editor.on("viewportChange",(function(e,n,r){t.props.onViewportChange(t.editor,n,r)}))}}))},e}(),d=function(e){function t(t){var n=e.call(this,t)||this;return c||(n.applied=!1,n.appliedNext=!1,n.appliedUserDefined=!1,n.deferred=null,n.emulating=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1),n}return a(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},i=r({},s.defaults,this.editor.options,n);Object.keys(i).some((function(e){return t.editor.getOption(e)!==i[e]}))&&Object.keys(i).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==i[e]&&(t.editor.setOption(e,i[e]),t.mirror.setOption(e,i[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.getDoc(),n=t.lastLine(),r=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:n,ch:r}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(e){this.emulating=!0;var t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){var n=t.getCursor();t.setValue(e),t.setCursor(n)}this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){var t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentDidMount=function(){var e=this;c||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new h(this.editor,this.props),this.mirror=s((function(){}),this.props.options),this.editor.on("electricInput",(function(){e.mirror.setHistory(e.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(function(){e.mirror.setCursor(e.editor.getDoc().getCursor())})),this.editor.on("beforeChange",(function(t,n){if(!e.emulating){n.cancel(),e.deferred=n;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,n,e.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(!c){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){c||this.props.editorWillUnmount&&this.props.editorWillUnmount(s)},t.prototype.shouldComponentUpdate=function(e,t){return!c},t.prototype.render=function(){var e=this;if(c)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(l.Component);t.fk=d,function(e){function t(t){var n=e.call(this,t)||this;return c||(n.applied=!1,n.appliedUserDefined=!1,n.continueChange=!1,n.detached=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n.onBeforeChangeCb=function(){n.continueChange=!0}),n}a(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},i=r({},s.defaults,this.editor.options,n);if(Object.keys(i).some((function(e){return t.editor.getOption(e)!==i[e]}))&&Object.keys(i).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==i[e]&&t.editor.setOption(e,i[e])})),!this.hydrated){var o=this.editor.getDoc(),a=o.lastLine(),l=o.getLine(o.lastLine()).length;o.replaceRange(e.value||"",{line:0,ch:0},{line:a,ch:l})}this.hydrated=!0},t.prototype.componentDidMount=function(){var e=this;c||(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new h(this.editor,this.props),this.editor.on("beforeChange",(function(t,n){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,n,e.editor.getValue(),e.onBeforeChangeCb)})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,n,e.editor.getValue()):e.props.onChange(e.editor,n,e.editor.getValue()))})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(this.detached&&!1===this.props.detach&&(this.detached=!1,e.editorDidAttach&&e.editorDidAttach(this.editor)),this.detached||!0!==this.props.detach||(this.detached=!0,e.editorDidDetach&&e.editorDidDetach(this.editor)),!c&&!this.detached){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),e.autoCursor||void 0===e.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(e),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){c||this.props.editorWillUnmount&&this.props.editorWillUnmount(s)},t.prototype.shouldComponentUpdate=function(e,t){var n=!0;return c&&(n=!1),this.detached&&e.detach&&(n=!1),n},t.prototype.render=function(){var e=this;if(c)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})}}(l.Component)},67658:(e,t,n)=>{"use strict";var r=n(20362),i=n(23764),o=n(72884);function a(e){for(var t="path_to_url"+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var l=!1,c=null,u=!1,h=null,d={onError:function(e){l=!0,c=e}};function f(e,t,n,r,i,o,a,u,h){l=!1,c=null,s.apply(d,arguments)}var p=null,g=null,m=null;function v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=m(n),function(e,t,n,r,i,o,s,d,p){if(f.apply(this,arguments),l){if(!l)throw Error(a(198));var g=c;l=!1,c=null,u||(u=!0,h=g)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function _(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!w[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in w[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,l=r;if(A.hasOwnProperty(l))throw Error(a(99,l));A[l]=o;var c=o.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&x(c[i],s,l);i=!0}else o.registrationName?(x(o.registrationName,s,l),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function x(e,t,n){if(k[e])throw Error(a(100,e));k[e]=t,T[e]=t.eventTypes[n].dependencies}var w=[],A={},k={},T={};function S(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&_()}var E=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),C=null,M=null,O=null;function L(e){if(e=g(e)){if("function"!=typeof C)throw Error(a(280));var t=e.stateNode;t&&(t=p(t),C(e.stateNode,e.type,t))}}function D(e){M?O?O.push(e):O=[e]:M=e}function I(){if(M){var e=M,t=O;if(O=M=null,L(e),t)for(e=0;e<t.length;e++)L(t[e])}}function R(e,t){return e(t)}function P(e,t,n,r,i){return e(t,n,r,i)}function N(){}var z=R,F=!1,B=!1;function j(){null===M&&null===O||(N(),I())}function U(e,t,n){if(B)return e(t,n);B=!0;try{return z(e,t,n)}finally{B=!1,j()}}var V=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,q=Object.prototype.hasOwnProperty,H={},$={};function W(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){G[e]=new W(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];G[t]=new W(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){G[e]=new W(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){G[e]=new W(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){G[e]=new W(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){G[e]=new W(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){G[e]=new W(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){G[e]=new W(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){G[e]=new W(e,5,!1,e.toLowerCase(),null,!1)}));var Y=/[\-:]([a-z])/g;function X(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Y,X);G[t]=new W(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Y,X);G[t]=new W(t,1,!1,e,"path_to_url",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Y,X);G[t]=new W(t,1,!1,e,"path_to_url",!1)})),["tabIndex","crossOrigin"].forEach((function(e){G[e]=new W(e,1,!1,e.toLowerCase(),null,!1)})),G.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","path_to_url",!0),["src","href","action","formAction"].forEach((function(e){G[e]=new W(e,1,!1,e.toLowerCase(),null,!0)}));var Z=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function K(e,t,n,r){var i=G.hasOwnProperty(t)?G[t]:null;(null!==i?0===i.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!q.call($,e)||!q.call(H,e)&&(V.test(e)?$[e]=!0:(H[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Z.hasOwnProperty("ReactCurrentDispatcher")||(Z.ReactCurrentDispatcher={current:null}),Z.hasOwnProperty("ReactCurrentBatchConfig")||(Z.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Q="function"==typeof Symbol&&Symbol.for,ee=Q?Symbol.for("react.element"):60103,te=Q?Symbol.for("react.portal"):60106,ne=Q?Symbol.for("react.fragment"):60107,re=Q?Symbol.for("react.strict_mode"):60108,ie=Q?Symbol.for("react.profiler"):60114,oe=Q?Symbol.for("react.provider"):60109,ae=Q?Symbol.for("react.context"):60110,se=Q?Symbol.for("react.concurrent_mode"):60111,le=Q?Symbol.for("react.forward_ref"):60112,ce=Q?Symbol.for("react.suspense"):60113,ue=Q?Symbol.for("react.suspense_list"):60120,he=Q?Symbol.for("react.memo"):60115,de=Q?Symbol.for("react.lazy"):60116,fe=Q?Symbol.for("react.block"):60121,pe="function"==typeof Symbol&&Symbol.iterator;function ge(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=pe&&e[pe]||e["@@iterator"])?e:null}function me(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case he:return me(e.type);case fe:return me(e.render);case de:if(e=1===e._status?e._result:null)return me(e)}return null}function ve(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=me(e.type);n=null,r&&(n=me(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function _e(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function we(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ae(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ke(e,t){null!=(t=t.checked)&&K(e,"checked",t,!1)}function Te(e,t){ke(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ee(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ee(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ce(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Me(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Oe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function De(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Re(e){switch(e){case"svg":return"path_to_url";case"math":return"path_to_url";default:return"path_to_url"}}function Pe(e,t){return null==e||"path_to_url"===e?Re(t):"path_to_url"===e&&"foreignObject"===t?"path_to_url":e}var Ne,ze,Fe=(ze=function(e,t){if("path_to_url"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Ne=Ne||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ze(e,t)}))}:ze);function Be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function je(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ue={animationend:je("Animation","AnimationEnd"),animationiteration:je("Animation","AnimationIteration"),animationstart:je("Animation","AnimationStart"),transitionend:je("Transition","TransitionEnd")},Ve={},qe={};function He(e){if(Ve[e])return Ve[e];if(!Ue[e])return e;var t,n=Ue[e];for(t in n)if(n.hasOwnProperty(t)&&t in qe)return Ve[e]=n[t];return e}E&&(qe=document.createElement("div").style,"AnimationEvent"in window||(delete Ue.animationend.animation,delete Ue.animationiteration.animation,delete Ue.animationstart.animation),"TransitionEvent"in window||delete Ue.transitionend.transition);var $e=He("animationend"),We=He("animationiteration"),Ge=He("animationstart"),Ye=He("transitionend"),Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ze=new("function"==typeof WeakMap?WeakMap:Map);function Ke(e){var t=Ze.get(e);return void 0===t&&(t=new Map,Ze.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return et(i),e;if(o===r)return et(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function ot(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)v(e,t[r],n[r]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(it=nt(it,e)),e=it,it=null,e){if(rt(e,ot),it)throw Error(a(95));if(u)throw e=h,u=!1,h=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function lt(e){if(!E)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function ut(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ht(e,t,n,r){if(ct.length){var i=ct.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function dt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Mn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=st(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,l=0;l<w.length;l++){var c=w[l];c&&(c=c.extractEvents(r,t,o,i,a))&&(s=nt(s,c))}at(s)}}function ft(e,t,n){if(!n.has(e)){switch(e){case"scroll":Gt(t,"scroll",!0);break;case"focus":case"blur":Gt(t,"focus",!0),Gt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":lt(e)&&Gt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Xe.indexOf(e)&&Wt(e,t)}n.set(e,null)}}var pt,gt,mt,vt=!1,yt=[],bt=null,_t=null,xt=null,wt=new Map,At=new Map,kt=[],Tt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),St="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Et(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ct(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":_t=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":wt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function Mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=Et(t,n,r,i,o),null!==t&&null!==(t=On(t))&&gt(t),e):(e.eventSystemFlags|=r,e)}function Ot(e){var t=Mn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){mt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Lt(e){if(null!==e.blockedOn)return!1;var t=Kt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=On(t);return null!==n&&gt(n),e.blockedOn=t,!1}return!0}function Dt(e,t,n){Lt(e)&&n.delete(t)}function It(){for(vt=!1;0<yt.length;){var e=yt[0];if(null!==e.blockedOn){null!==(e=On(e.blockedOn))&&pt(e);break}var t=Kt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:yt.shift()}null!==bt&&Lt(bt)&&(bt=null),null!==_t&&Lt(_t)&&(_t=null),null!==xt&&Lt(xt)&&(xt=null),wt.forEach(Dt),At.forEach(Dt)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,vt||(vt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,It)))}function Pt(e){function t(t){return Rt(t,e)}if(0<yt.length){Rt(yt[0],e);for(var n=1;n<yt.length;n++){var r=yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Rt(bt,e),null!==_t&&Rt(_t,e),null!==xt&&Rt(xt,e),wt.forEach(t),At.forEach(t),n=0;n<kt.length;n++)(r=kt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<kt.length&&null===(n=kt[0]).blockedOn;)Ot(n),null===n.blockedOn&&kt.shift()}var Nt={},zt=new Map,Ft=new Map,Bt=["abort","abort",$e,"animationEnd",We,"animationIteration",Ge,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ye,"transitionEnd","waiting","waiting"];function jt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Ft.set(r,t),zt.set(r,o),Nt[i]=o}}jt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),jt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),jt(Bt,2);for(var Ut="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Vt=0;Vt<Ut.length;Vt++)Ft.set(Ut[Vt],0);var qt=o.unstable_UserBlockingPriority,Ht=o.unstable_runWithPriority,$t=!0;function Wt(e,t){Gt(t,e,!1)}function Gt(e,t,n){var r=Ft.get(t);switch(void 0===r?2:r){case 0:r=Yt.bind(null,t,1,e);break;case 1:r=Xt.bind(null,t,1,e);break;default:r=Zt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Yt(e,t,n,r){F||N();var i=Zt,o=F;F=!0;try{P(i,e,t,n,r)}finally{(F=o)||j()}}function Xt(e,t,n,r){Ht(qt,Zt.bind(null,e,t,n,r))}function Zt(e,t,n,r){if($t)if(0<yt.length&&-1<Tt.indexOf(e))e=Et(null,e,t,n,r),yt.push(e);else{var i=Kt(e,t,n,r);if(null===i)Ct(e,r);else if(-1<Tt.indexOf(e))e=Et(i,e,t,n,r),yt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return bt=Mt(bt,e,t,n,r,i),!0;case"dragenter":return _t=Mt(_t,e,t,n,r,i),!0;case"mouseover":return xt=Mt(xt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return wt.set(o,Mt(wt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,At.set(o,Mt(At.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){Ct(e,r),e=ht(e,r,null,t);try{U(dt,e)}finally{ut(e)}}}}function Kt(e,t,n,r){if(null!==(n=Mn(n=st(r)))){var i=Je(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=Qe(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=ht(e,r,n,t);try{U(dt,e)}finally{ut(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Jt).forEach((function(e){Qt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var an="path_to_url";function sn(e,t){var n=Ke(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=T[t];for(var r=0;r<t.length;r++)ft(t[r],e,n)}function ln(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hn(e,t){var n,r=un(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=un(r)}}function dn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gn="$?",mn="$!",vn=null,yn=null;function bn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function _n(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function An(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function kn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===mn||n===gn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Tn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+Tn,En="__reactEventHandlers$"+Tn,Cn="__reactContainere$"+Tn;function Mn(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cn]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=kn(e);null!==e;){if(n=e[Sn])return n;e=kn(e)}return t}n=(e=n).parentNode}return null}function On(e){return!(e=e[Sn]||e[Cn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ln(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Dn(e){return e[En]||null}function In(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=p(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function Pn(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Nn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=In(t);for(t=n.length;0<t--;)Pn(n[t],"captured",e);for(t=0;t<n.length;t++)Pn(n[t],"bubbled",e)}}function zn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Fn(e){e&&e.dispatchConfig.registrationName&&zn(e._targetInst,null,e)}function Bn(e){rt(e,Nn)}var jn=null,Un=null,Vn=null;function qn(){if(Vn)return Vn;var e,t,n=Un,r=n.length,i="value"in jn?jn.value:jn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Vn=i.slice(e,1<t?1-t:void 0)}function Hn(){return!0}function $n(){return!1}function Wn(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Hn:$n,this.isPropagationStopped=$n,this}function Gn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Yn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Xn(e){e.eventPool=[],e.getPooled=Gn,e.release=Yn}i(Wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){this.isPersistent=Hn},isPersistent:$n,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=$n,this._dispatchInstances=this._dispatchListeners=null}}),Wn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Wn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Xn(n),n},Xn(Wn);var Zn=Wn.extend({data:null}),Kn=Wn.extend({data:null}),Jn=[9,13,27,32],Qn=E&&"CompositionEvent"in window,er=null;E&&"documentMode"in document&&(er=document.documentMode);var tr=E&&"TextEvent"in window&&!er,nr=E&&(!Qn||er&&8<er&&11>=er),rr=String.fromCharCode(32),ir={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},or=!1;function ar(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function sr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var lr=!1,cr={eventTypes:ir,extractEvents:function(e,t,n,r){var i;if(Qn)e:{switch(e){case"compositionstart":var o=ir.compositionStart;break e;case"compositionend":o=ir.compositionEnd;break e;case"compositionupdate":o=ir.compositionUpdate;break e}o=void 0}else lr?ar(e,n)&&(o=ir.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=ir.compositionStart);return o?(nr&&"ko"!==n.locale&&(lr||o!==ir.compositionStart?o===ir.compositionEnd&&lr&&(i=qn()):(Un="value"in(jn=r)?jn.value:jn.textContent,lr=!0)),o=Zn.getPooled(o,t,n,r),(i||null!==(i=sr(n)))&&(o.data=i),Bn(o),i=o):i=null,(e=tr?function(e,t){switch(e){case"compositionend":return sr(t);case"keypress":return 32!==t.which?null:(or=!0,rr);case"textInput":return(e=t.data)===rr&&or?null:e;default:return null}}(e,n):function(e,t){if(lr)return"compositionend"===e||!Qn&&ar(e,t)?(e=qn(),Vn=Un=jn=null,lr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Kn.getPooled(ir.beforeInput,t,n,r)).data=e,Bn(t)):t=null,null===i?t:null===t?i:[i,t]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ur[e.type]:"textarea"===t}var dr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=Wn.getPooled(dr.change,e,t,n)).type="change",D(n),Bn(e),e}var pr=null,gr=null;function mr(e){at(e)}function vr(e){if(xe(Ln(e)))return e}function yr(e,t){if("change"===e)return t}var br=!1;function _r(){pr&&(pr.detachEvent("onpropertychange",xr),gr=pr=null)}function xr(e){if("value"===e.propertyName&&vr(gr))if(e=fr(gr,e,st(e)),F)at(e);else{F=!0;try{R(mr,e)}finally{F=!1,j()}}}function wr(e,t,n){"focus"===e?(_r(),gr=n,(pr=t).attachEvent("onpropertychange",xr)):"blur"===e&&_r()}function Ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return vr(gr)}function kr(e,t){if("click"===e)return vr(t)}function Tr(e,t){if("input"===e||"change"===e)return vr(t)}E&&(br=lt("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:dr,_isInputEventSupported:br,extractEvents:function(e,t,n,r){var i=t?Ln(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=yr;else if(hr(i))if(br)a=Tr;else{a=Ar;var s=wr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=kr);if(a&&(a=a(e,t)))return fr(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Ee(i,"number",i.value)}},Er=Wn.extend({view:null,detail:null}),Cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cr[e])&&!!t[e]}function Or(){return Mr}var Lr=0,Dr=0,Ir=!1,Rr=!1,Pr=Er.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Or,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Lr;return Lr=e.screenX,Ir?"mousemove"===e.type?e.screenX-t:0:(Ir=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Dr;return Dr=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Nr=Pr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),zr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Fr={eventTypes:zr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Mn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Pr,l=zr.mouseLeave,c=zr.mouseEnter,u="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Nr,l=zr.pointerLeave,c=zr.pointerEnter,u="pointer");if(e=null==a?o:Ln(a),o=null==t?o:Ln(t),(l=s.getPooled(l,a,n,r)).type=u+"leave",l.target=e,l.relatedTarget=o,(n=s.getPooled(c,t,n,r)).type=u+"enter",n.target=o,n.relatedTarget=e,u=t,(r=a)&&u)e:{for(c=u,a=0,e=s=r;e;e=In(e))a++;for(e=0,t=c;t;t=In(t))e++;for(;0<a-e;)s=In(s),a--;for(;0<e-a;)c=In(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=In(s),c=In(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=In(r);for(r=[];u&&u!==c&&(null===(a=u.alternate)||a!==c);)r.push(u),u=In(u);for(u=0;u<s.length;u++)zn(s[u],"bubbled",l);for(u=r.length;0<u--;)zn(r[u],"captured",n);return 0==(64&i)?[l]:[l,n]}},Br="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},jr=Object.prototype.hasOwnProperty;function Ur(e,t){if(Br(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!jr.call(t,n[r])||!Br(e[n[r]],t[n[r]]))return!1;return!0}var Vr=E&&"documentMode"in document&&11>=document.documentMode,qr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Hr=null,$r=null,Wr=null,Gr=!1;function Yr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Gr||null==Hr||Hr!==cn(n)?null:(n="selectionStart"in(n=Hr)&&pn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wr&&Ur(Wr,n)?null:(Wr=n,(e=Wn.getPooled(qr.select,$r,e,t)).type="select",e.target=Hr,Bn(e),e))}var Xr={eventTypes:qr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Ke(i),o=T.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?Ln(t):window,e){case"focus":(hr(i)||"true"===i.contentEditable)&&(Hr=i,$r=t,Wr=null);break;case"blur":Wr=$r=Hr=null;break;case"mousedown":Gr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Gr=!1,Yr(n,r);case"selectionchange":if(Vr)break;case"keydown":case"keyup":return Yr(n,r)}return null}},Zr=Wn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Kr=Wn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jr=Er.extend({relatedTarget:null});function Qr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var ei={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ti={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ni=Er.extend({key:function(e){if(e.key){var t=ei[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ti[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Or,charCode:function(e){return"keypress"===e.type?Qr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ri=Pr.extend({dataTransfer:null}),ii=Er.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Or}),oi=Wn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ai=Pr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),si={eventTypes:Nt,extractEvents:function(e,t,n,r){var i=zt.get(e);if(!i)return null;switch(e){case"keypress":if(0===Qr(n))return null;case"keydown":case"keyup":e=ni;break;case"blur":case"focus":e=Jr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ri;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ii;break;case $e:case We:case Ge:e=Zr;break;case Ye:e=oi;break;case"scroll":e=Er;break;case"wheel":e=ai;break;case"copy":case"cut":case"paste":e=Kr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Nr;break;default:e=Wn}return Bn(t=e.getPooled(i,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),p=Dn,g=On,m=Ln,S({SimpleEventPlugin:si,EnterLeaveEventPlugin:Fr,ChangeEventPlugin:Sr,SelectEventPlugin:Xr,BeforeInputEventPlugin:cr});var li=[],ci=-1;function ui(e){0>ci||(e.current=li[ci],li[ci]=null,ci--)}function hi(e,t){ci++,li[ci]=e.current,e.current=t}var di={},fi={current:di},pi={current:!1},gi=di;function mi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function vi(e){return null!=e.childContextTypes}function yi(){ui(pi),ui(fi)}function bi(e,t,n){if(fi.current!==di)throw Error(a(168));hi(fi,t),hi(pi,n)}function _i(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,me(t)||"Unknown",o));return i({},n,{},r)}function xi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,gi=fi.current,hi(fi,e),hi(pi,pi.current),!0}function wi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_i(e,t,gi),r.__reactInternalMemoizedMergedChildContext=e,ui(pi),ui(fi),hi(fi,e)):ui(pi),hi(pi,n)}var Ai=o.unstable_runWithPriority,ki=o.unstable_scheduleCallback,Ti=o.unstable_cancelCallback,Si=o.unstable_requestPaint,Ei=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,Mi=o.unstable_ImmediatePriority,Oi=o.unstable_UserBlockingPriority,Li=o.unstable_NormalPriority,Di=o.unstable_LowPriority,Ii=o.unstable_IdlePriority,Ri={},Pi=o.unstable_shouldYield,Ni=void 0!==Si?Si:function(){},zi=null,Fi=null,Bi=!1,ji=Ei(),Ui=1e4>ji?Ei:function(){return Ei()-ji};function Vi(){switch(Ci()){case Mi:return 99;case Oi:return 98;case Li:return 97;case Di:return 96;case Ii:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return Mi;case 98:return Oi;case 97:return Li;case 96:return Di;case 95:return Ii;default:throw Error(a(332))}}function Hi(e,t){return e=qi(e),Ai(e,t)}function $i(e,t,n){return e=qi(e),ki(e,t,n)}function Wi(e){return null===zi?(zi=[e],Fi=ki(Mi,Yi)):zi.push(e),Ri}function Gi(){if(null!==Fi){var e=Fi;Fi=null,Ti(e)}Yi()}function Yi(){if(!Bi&&null!==zi){Bi=!0;var e=0;try{var t=zi;Hi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zi=null}catch(t){throw null!==zi&&(zi=zi.slice(e+1)),ki(Mi,Gi),t}finally{Bi=!1}}}function Xi(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Zi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Ki={current:null},Ji=null,Qi=null,eo=null;function to(){eo=Qi=Ji=null}function no(e){var t=Ki.current;ui(Ki),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function io(e,t){Ji=e,eo=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Da=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Ji)throw Error(a(308));Qi=t,Ji.dependencies={expirationTime:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ao=!1;function so(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function co(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ho(e,t){var n=e.alternate;null!==n&&lo(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function fo(e,t,n,r){var o=e.updateQueue;ao=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var l=a.next;a.next=s.next,s.next=l}a=s,o.shared.pending=null,null!==(l=e.alternate)&&null!==(l=l.updateQueue)&&(l.baseQueue=s)}if(null!==a){l=a.next;var c=o.baseState,u=0,h=null,d=null,f=null;if(null!==l)for(var p=l;;){if((s=p.expirationTime)<r){var g={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null};null===f?(d=f=g,h=c):f=f.next=g,s>u&&(u=s)}else{null!==f&&(f=f.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null}),cl(s,p.suspenseConfig);e:{var m=e,v=p;switch(s=t,g=n,v.tag){case 1:if("function"==typeof(m=v.payload)){c=m.call(g,c,s);break e}c=m;break e;case 3:m.effectTag=-4097&m.effectTag|64;case 0:if(null==(s="function"==typeof(m=v.payload)?m.call(g,c,s):m))break e;c=i({},c,s);break e;case 2:ao=!0}}null!==p.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[p]:s.push(p))}if(null===(p=p.next)||p===l){if(null===(s=o.shared.pending))break;p=a.next=s.next,s.next=l,o.baseQueue=a=s,o.shared.pending=null}}null===f?h=c:f.next=d,o.baseState=h,o.baseQueue=f,ul(u),e.expirationTime=u,e.memoizedState=c}}function po(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(a(191,r));r.call(i)}}}var go=Z.ReactCurrentBatchConfig,mo=(new r.Component).refs;function vo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var yo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Zs(),i=go.suspense;(i=co(r=Ks(r,e,i),i)).payload=t,null!=n&&(i.callback=n),uo(e,i),Js(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Zs(),i=go.suspense;(i=co(r=Ks(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),uo(e,i),Js(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Zs(),r=go.suspense;(r=co(n=Ks(n,e,r),r)).tag=2,null!=t&&(r.callback=t),uo(e,r),Js(e,n)}};function bo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&Ur(n,r)&&Ur(i,o))}function _o(e,t,n){var r=!1,i=di,o=t.contextType;return"object"==typeof o&&null!==o?o=oo(o):(i=vi(t)?gi:fi.current,o=(r=null!=(r=t.contextTypes))?mi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function xo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yo.enqueueReplaceState(t,t.state,null)}function wo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=mo,so(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=oo(o):(o=vi(t)?gi:fi.current,i.context=mi(e,o)),fo(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(vo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&yo.enqueueReplaceState(i,i.state,null),fo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Ao=Array.isArray;function ko(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function To(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Ol(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Il(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=ko(e,t,n),r.return=e,r):((r=Ll(n.type,n.key,n.props,null,e.mode,r)).ref=ko(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Rl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=Dl(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Il(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Ll(t.type,t.key,t.props,null,e.mode,n)).ref=ko(e,null,t),n.return=e,n;case te:return(t=Rl(t,e.mode,n)).return=e,t}if(Ao(t)||ge(t))return(t=Dl(t,e.mode,n,null)).return=e,t;To(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null}if(Ao(n)||ge(n))return null!==i?null:h(e,t,n,r,null);To(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case te:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Ao(r)||ge(r))return h(t,e=e.get(n)||null,r,i,null);To(t,r)}return null}function g(i,a,s,l){for(var c=null,u=null,h=a,g=a=0,m=null;null!==h&&g<s.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var v=f(i,h,s[g],l);if(null===v){null===h&&(h=m);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,g),null===u?c=v:u.sibling=v,u=v,h=m}if(g===s.length)return n(i,h),c;if(null===h){for(;g<s.length;g++)null!==(h=d(i,s[g],l))&&(a=o(h,a,g),null===u?c=h:u.sibling=h,u=h);return c}for(h=r(i,h);g<s.length;g++)null!==(m=p(h,i,g,s[g],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?g:m.key),a=o(m,a,g),null===u?c=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(i,e)})),c}function m(i,s,l,c){var u=ge(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var h=u=null,g=s,m=s=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var b=f(i,g,y.value,c);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(i,g),s=o(b,s,m),null===h?u=b:h.sibling=b,h=b,g=v}if(y.done)return n(i,g),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=d(i,y.value,c))&&(s=o(y,s,m),null===h?u=y:h.sibling=y,h=y);return u}for(g=r(i,g);!y.done;m++,y=l.next())null!==(y=p(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=o(y,s,m),null===h?u=y:h.sibling=y,h=y);return e&&g.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"==typeof o&&null!==o&&o.type===ne&&null===o.key;c&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case ee:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===ne){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=ko(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===ne?((r=Dl(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Ll(o.type,o.key,o.props,null,e.mode,l)).ref=ko(e,r,o),l.return=e,e=l)}return s(e);case te:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Rl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Il(o,e.mode,l)).return=e,e=r),s(e);if(Ao(o))return g(e,r,o,l);if(ge(o))return m(e,r,o,l);if(u&&To(e,o),void 0===o&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Eo=So(!0),Co=So(!1),Mo={},Oo={current:Mo},Lo={current:Mo},Do={current:Mo};function Io(e){if(e===Mo)throw Error(a(174));return e}function Ro(e,t){switch(hi(Do,t),hi(Lo,e),hi(Oo,Mo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pe(null,"");break;default:t=Pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ui(Oo),hi(Oo,t)}function Po(){ui(Oo),ui(Lo),ui(Do)}function No(e){Io(Do.current);var t=Io(Oo.current),n=Pe(t,e.type);t!==n&&(hi(Lo,e),hi(Oo,n))}function zo(e){Lo.current===e&&(ui(Oo),ui(Lo))}var Fo={current:0};function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===gn||n.data===mn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function jo(e,t){return{responder:e,props:t}}var Uo=Z.ReactCurrentDispatcher,Vo=Z.ReactCurrentBatchConfig,qo=0,Ho=null,$o=null,Wo=null,Go=!1;function Yo(){throw Error(a(321))}function Xo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,i,o){if(qo=o,Ho=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Uo.current=null===e||null===e.memoizedState?ba:_a,e=n(r,i),t.expirationTime===qo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Wo=$o=null,t.updateQueue=null,Uo.current=xa,e=n(r,i)}while(t.expirationTime===qo)}if(Uo.current=ya,t=null!==$o&&null!==$o.next,qo=0,Wo=$o=Ho=null,Go=!1,t)throw Error(a(300));return e}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wo?Ho.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function Jo(){if(null===$o){var e=Ho.alternate;e=null!==e?e.memoizedState:null}else e=$o.next;var t=null===Wo?Ho.memoizedState:Wo.next;if(null!==t)Wo=t,$o=e;else{if(null===e)throw Error(a(310));e={memoizedState:($o=e).memoizedState,baseState:$o.baseState,baseQueue:$o.baseQueue,queue:$o.queue,next:null},null===Wo?Ho.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function Qo(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Jo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=$o,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.expirationTime;if(u<qo){var h={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=h,o=r):l=l.next=h,u>Ho.expirationTime&&(Ho.expirationTime=u,ul(u))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cl(u,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,Br(r,t.memoizedState)||(Da=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ta(e){var t=Jo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Br(o,t.memoizedState)||(Da=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function na(e){var t=Ko();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e}).dispatch=va.bind(null,Ho,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ho.updateQueue)?(t={lastEffect:null},Ho.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ia(){return Jo().memoizedState}function oa(e,t,n,r){var i=Ko();Ho.effectTag|=e,i.memoizedState=ra(1|t,n,void 0,void 0===r?null:r)}function aa(e,t,n,r){var i=Jo();r=void 0===r?null:r;var o=void 0;if(null!==$o){var a=$o.memoizedState;if(o=a.destroy,null!==r&&Xo(r,a.deps))return void ra(t,n,o,r)}Ho.effectTag|=e,i.memoizedState=ra(1|t,n,o,r)}function sa(e,t){return oa(516,4,e,t)}function la(e,t){return aa(516,4,e,t)}function ca(e,t){return aa(4,2,e,t)}function ua(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ha(e,t,n){return n=null!=n?n.concat([e]):null,aa(4,2,ua.bind(null,t,e),n)}function da(){}function fa(e,t){return Ko().memoizedState=[e,void 0===t?null:t],e}function pa(e,t){var n=Jo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ga(e,t){var n=Jo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Xo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ma(e,t,n){var r=Vi();Hi(98>r?98:r,(function(){e(!0)})),Hi(97<r?97:r,(function(){var r=Vo.suspense;Vo.suspense=void 0===t?null:t;try{e(!1),n()}finally{Vo.suspense=r}}))}function va(e,t,n){var r=Zs(),i=go.suspense;i={expirationTime:r=Ks(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Ho||null!==o&&o===Ho)Go=!0,i.expirationTime=qo,Ho.expirationTime=qo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Br(s,a))return}catch(e){}Js(e,r)}}var ya={readContext:oo,useCallback:Yo,useContext:Yo,useEffect:Yo,useImperativeHandle:Yo,useLayoutEffect:Yo,useMemo:Yo,useReducer:Yo,useRef:Yo,useState:Yo,useDebugValue:Yo,useResponder:Yo,useDeferredValue:Yo,useTransition:Yo},ba={readContext:oo,useCallback:fa,useContext:oo,useEffect:sa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,oa(4,2,ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oa(4,2,e,t)},useMemo:function(e,t){var n=Ko();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ko();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=va.bind(null,Ho,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ko().memoizedState=e},useState:na,useDebugValue:da,useResponder:jo,useDeferredValue:function(e,t){var n=na(e),r=n[0],i=n[1];return sa((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(!1),n=t[0];return t=t[1],[fa(ma.bind(null,t,e),[t,e]),n]}},_a={readContext:oo,useCallback:pa,useContext:oo,useEffect:la,useImperativeHandle:ha,useLayoutEffect:ca,useMemo:ga,useReducer:ea,useRef:ia,useState:function(){return ea(Qo)},useDebugValue:da,useResponder:jo,useDeferredValue:function(e,t){var n=ea(Qo),r=n[0],i=n[1];return la((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(Qo),n=t[0];return t=t[1],[pa(ma.bind(null,t,e),[t,e]),n]}},xa={readContext:oo,useCallback:pa,useContext:oo,useEffect:la,useImperativeHandle:ha,useLayoutEffect:ca,useMemo:ga,useReducer:ta,useRef:ia,useState:function(){return ta(Qo)},useDebugValue:da,useResponder:jo,useDeferredValue:function(e,t){var n=ta(Qo),r=n[0],i=n[1];return la((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{i(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ta(Qo),n=t[0];return t=t[1],[pa(ma.bind(null,t,e),[t,e]),n]}},wa=null,Aa=null,ka=!1;function Ta(e,t){var n=Cl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ea(e){if(ka){var t=Aa;if(t){var n=t;if(!Sa(e,t)){if(!(t=An(n.nextSibling))||!Sa(e,t))return e.effectTag=-1025&e.effectTag|2,ka=!1,void(wa=e);Ta(wa,n)}wa=e,Aa=An(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,ka=!1,wa=e}}function Ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function Ma(e){if(e!==wa)return!1;if(!ka)return Ca(e),ka=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!_n(t,e.memoizedProps))for(t=Aa;t;)Ta(e,t),t=An(t.nextSibling);if(Ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Aa=An(e.nextSibling);break e}t--}else"$"!==n&&n!==mn&&n!==gn||t++}e=e.nextSibling}Aa=null}}else Aa=wa?An(e.stateNode.nextSibling):null;return!0}function Oa(){Aa=wa=null,ka=!1}var La=Z.ReactCurrentOwner,Da=!1;function Ia(e,t,n,r){t.child=null===e?Co(t,null,n,r):Eo(t,e.child,n,r)}function Ra(e,t,n,r,i){n=n.render;var o=t.ref;return io(t,i),r=Zo(e,t,n,r,o,i),null===e||Da?(t.effectTag|=1,Ia(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Za(e,t,i))}function Pa(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Ml(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ll(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Na(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Ur)(i,r)&&e.ref===t.ref)?Za(e,t,o):(t.effectTag|=1,(e=Ol(a,r)).ref=t.ref,e.return=t,t.child=e)}function Na(e,t,n,r,i,o){return null!==e&&Ur(e.memoizedProps,r)&&e.ref===t.ref&&(Da=!1,i<o)?(t.expirationTime=e.expirationTime,Za(e,t,o)):Fa(e,t,n,r,o)}function za(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Fa(e,t,n,r,i){var o=vi(n)?gi:fi.current;return o=mi(t,o),io(t,i),n=Zo(e,t,n,r,o,i),null===e||Da?(t.effectTag|=1,Ia(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Za(e,t,i))}function Ba(e,t,n,r,i){if(vi(n)){var o=!0;xi(t)}else o=!1;if(io(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),_o(t,n,r),wo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;c="object"==typeof c&&null!==c?oo(c):mi(t,c=vi(n)?gi:fi.current);var u=n.getDerivedStateFromProps,h="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;h||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&xo(t,a,r,c),ao=!1;var d=t.memoizedState;a.state=d,fo(t,r,a,i),l=t.memoizedState,s!==r||d!==l||pi.current||ao?("function"==typeof u&&(vo(t,n,u,r),l=t.memoizedState),(s=ao||bo(t,n,s,r,d,l,c))?(h||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,lo(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Zi(t.type,s),l=a.context,c="object"==typeof(c=n.contextType)&&null!==c?oo(c):mi(t,c=vi(n)?gi:fi.current),(h="function"==typeof(u=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&xo(t,a,r,c),ao=!1,l=t.memoizedState,a.state=l,fo(t,r,a,i),d=t.memoizedState,s!==r||l!==d||pi.current||ao?("function"==typeof u&&(vo(t,n,u,r),d=t.memoizedState),(u=ao||bo(t,n,s,r,l,d,c))?(h||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=c,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return ja(e,t,n,r,o,i)}function ja(e,t,n,r,i,o){za(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&wi(t,n,!1),Za(e,t,o);r=t.stateNode,La.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Eo(t,e.child,null,o),t.child=Eo(t,null,s,o)):Ia(e,t,s,o),t.memoizedState=r.state,i&&wi(t,n,!0),t.child}function Ua(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Ro(e,t.containerInfo)}var Va,qa,Ha,$a={dehydrated:null,retryTime:0};function Wa(e,t,n){var r,i=t.mode,o=t.pendingProps,a=Fo.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),hi(Fo,1&a),null===e){if(void 0!==o.fallback&&Ea(t),s){if(s=o.fallback,(o=Dl(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Dl(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=$a,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Co(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Ol(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Ol(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=$a,t.child=n,i}return n=Eo(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Dl(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Dl(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=$a,t.child=o,n}return t.memoizedState=null,t.child=Eo(t,e,o.children,n)}function Ga(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ro(e.return,t)}function Ya(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Xa(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ia(e,t,r.children,n),0!=(2&(r=Fo.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ga(e,n);else if(19===e.tag)Ga(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(hi(Fo,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ya(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ya(t,!0,n,null,o,t.lastEffect);break;case"together":Ya(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Za(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&ul(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ol(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ol(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ka(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ja(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return vi(t.type)&&yi(),null;case 3:return Po(),ui(pi),ui(fi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ma(t)||(t.effectTag|=4),null;case 5:zo(t),n=Io(Do.current);var o=t.type;if(null!==e&&null!=t.stateNode)qa(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Io(Oo.current),Ma(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[Sn]=t,r[En]=s,o){case"iframe":case"object":case"embed":Wt("load",r);break;case"video":case"audio":for(e=0;e<Xe.length;e++)Wt(Xe[e],r);break;case"source":Wt("error",r);break;case"img":case"image":case"link":Wt("error",r),Wt("load",r);break;case"form":Wt("reset",r),Wt("submit",r);break;case"details":Wt("toggle",r);break;case"input":Ae(r,s),Wt("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Wt("invalid",r),sn(n,"onChange");break;case"textarea":Le(r,s),Wt("invalid",r),sn(n,"onChange")}for(var l in rn(o,s),e=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):k.hasOwnProperty(l)&&null!=c&&sn(n,l)}switch(o){case"input":_e(r),Se(r,s,!0);break;case"textarea":_e(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=ln)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Re(o)),e===an?"script"===o?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(o,{is:r.is}):(e=l.createElement(o),"select"===o&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,o),e[Sn]=t,e[En]=r,Va(e,t),t.stateNode=e,l=on(o,r),o){case"iframe":case"object":case"embed":Wt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Xe.length;c++)Wt(Xe[c],e);c=r;break;case"source":Wt("error",e),c=r;break;case"img":case"image":case"link":Wt("error",e),Wt("load",e),c=r;break;case"form":Wt("reset",e),Wt("submit",e),c=r;break;case"details":Wt("toggle",e),c=r;break;case"input":Ae(e,r),c=we(e,r),Wt("invalid",e),sn(n,"onChange");break;case"option":c=Ce(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=i({},r,{value:void 0}),Wt("invalid",e),sn(n,"onChange");break;case"textarea":Le(e,r),c=Oe(e,r),Wt("invalid",e),sn(n,"onChange");break;default:c=r}rn(o,c);var u=c;for(s in u)if(u.hasOwnProperty(s)){var h=u[s];"style"===s?tn(e,h):"dangerouslySetInnerHTML"===s?null!=(h=h?h.__html:void 0)&&Fe(e,h):"children"===s?"string"==typeof h?("textarea"!==o||""!==h)&&Be(e,h):"number"==typeof h&&Be(e,""+h):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(k.hasOwnProperty(s)?null!=h&&sn(n,s):null!=h&&K(e,s,h,l))}switch(o){case"input":_e(e),Se(e,r,!1);break;case"textarea":_e(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Me(e,!!r.multiple,n,!1):null!=r.defaultValue&&Me(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=ln)}bn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ha(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Io(Do.current),Io(Oo.current),Ma(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return ui(Fo),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Ma(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Fo.current)?Ls===ks&&(Ls=Ts):(Ls!==ks&&Ls!==Ts||(Ls=Ss),0!==Ns&&null!==Cs&&(zl(Cs,Os),Fl(Cs,Ns)))),(n||r)&&(t.effectTag|=4),null);case 4:return Po(),null;case 10:return no(t),null;case 19:if(ui(Fo),null===(r=t.memoizedState))return null;if(o=0!=(64&t.effectTag),null===(s=r.rendering)){if(o)Ka(r,!1);else if(Ls!==ks||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Bo(s))){for(t.effectTag|=64,Ka(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return hi(Fo,1&Fo.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=Bo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ka(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ui()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,Ka(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Ui()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ui(),n.sibling=null,t=Fo.current,hi(Fo,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Qa(e){switch(e.tag){case 1:vi(e.type)&&yi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Po(),ui(pi),ui(fi),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return zo(e),null;case 13:return ui(Fo),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ui(Fo),null;case 4:return Po(),null;case 10:return no(e),null;default:return null}}function es(e,t){return{value:e,source:t,stack:ve(t)}}Va=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,l,c=t.stateNode;switch(Io(Oo.current),e=null,n){case"input":a=we(c,a),r=we(c,r),e=[];break;case"option":a=Ce(c,a),r=Ce(c,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=Oe(c,a),r=Oe(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=ln)}for(s in rn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(l in c=a[s])c.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(k.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var u=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&u!==c&&(null!=u||null!=c))if("style"===s)if(c){for(l in c)!c.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&c[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(e||(e=[]),e.push(s,n)),n=u;else"dangerouslySetInnerHTML"===s?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(s,u)):"children"===s?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(s,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(k.hasOwnProperty(s)?(null!=u&&sn(o,s),e||c===u||(e=[])):(e=e||[]).push(s,u))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Ha=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var ts="function"==typeof WeakSet?WeakSet:Set;function ns(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ve(n)),null!==n&&me(n.type),t=t.value,null!==e&&1===e.tag&&me(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function rs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){wl(e,t)}else t.current=null}function is(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Zi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function os(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function as(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ss(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void as(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Zi(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&po(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}po(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&bn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Pt(n)))))}throw Error(a(163))}function ls(e,t,n){switch("function"==typeof Sl&&Sl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Hi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){wl(i,e)}}e=e.next}while(e!==r)}))}break;case 1:rs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){wl(e,t)}}(t,n);break;case 5:rs(t);break;case 4:ps(e,t,n)}}function cs(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&cs(t)}function us(e){return 5===e.tag||3===e.tag||4===e.tag}function hs(e){e:{for(var t=e.return;null!==t;){if(us(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Be(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?ds(e,n,t):fs(e,n,t)}function ds(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ln));else if(4!==r&&null!==(e=e.child))for(ds(e,t,n),e=e.sibling;null!==e;)ds(e,t,n),e=e.sibling}function fs(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(fs(e,t,n),e=e.sibling;null!==e;)fs(e,t,n),e=e.sibling}function ps(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var l=e,c=o,u=n,h=c;;)if(ls(l,h,u),null!==h.child&&4!==h.tag)h.child.return=h,h=h.child;else{if(h===c)break e;for(;null===h.sibling;){if(null===h.return||h.return===c)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}i?(l=r,c=o.stateNode,8===l.nodeType?l.parentNode.removeChild(c):l.removeChild(c)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(ls(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function gs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void os(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[En]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ke(n,r),on(e,i),t=on(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?tn(n,l):"dangerouslySetInnerHTML"===s?Fe(n,l):"children"===s?Be(n,l):K(n,s,l,t)}switch(e){case"input":Te(n,r);break;case"textarea":De(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Me(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Me(n,!!r.multiple,r.defaultValue,!0):Me(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Pt(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Fs=Ui()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=en("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ms(t);case 19:return void ms(t)}throw Error(a(163))}function ms(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ts),t.forEach((function(t){var r=kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var vs="function"==typeof WeakMap?WeakMap:Map;function ys(e,t,n){(n=co(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){js||(js=!0,Us=r),ns(e,t)},n}function bs(e,t,n){(n=co(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return ns(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Vs?Vs=new Set([this]):Vs.add(this),ns(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var _s,xs=Math.ceil,ws=Z.ReactCurrentDispatcher,As=Z.ReactCurrentOwner,ks=0,Ts=3,Ss=4,Es=0,Cs=null,Ms=null,Os=0,Ls=ks,Ds=null,Is=1073741823,Rs=1073741823,Ps=null,Ns=0,zs=!1,Fs=0,Bs=null,js=!1,Us=null,Vs=null,qs=!1,Hs=null,$s=90,Ws=null,Gs=0,Ys=null,Xs=0;function Zs(){return 0!=(48&Es)?1073741821-(Ui()/10|0):0!==Xs?Xs:Xs=1073741821-(Ui()/10|0)}function Ks(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vi();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Es))return Os;if(null!==n)e=Xi(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Xi(e,150,100);break;case 97:case 96:e=Xi(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Cs&&e===Os&&--e,e}function Js(e,t){if(50<Gs)throw Gs=0,Ys=null,Error(a(185));if(null!==(e=Qs(e,t))){var n=Vi();1073741823===t?0!=(8&Es)&&0==(48&Es)?rl(e):(tl(e),0===Es&&Gi()):tl(e),0==(4&Es)||98!==n&&99!==n||(null===Ws?Ws=new Map([[e,t]]):(void 0===(n=Ws.get(e))||n>t)&&Ws.set(e,t))}}function Qs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Cs===i&&(ul(t),Ls===Ss&&zl(i,Os)),Fl(i,t)),i}function el(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Nl(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function tl(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Wi(rl.bind(null,e));else{var t=el(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Zs();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Ri&&Ti(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Wi(rl.bind(null,e)):$i(r,nl.bind(null,e),{timeout:10*(1073741821-t)-Ui()}),e.callbackNode=t}}}function nl(e,t){if(Xs=0,t)return Bl(e,t=Zs()),tl(e),null;var n=el(e);if(0!==n){if(t=e.callbackNode,0!=(48&Es))throw Error(a(327));if(bl(),e===Cs&&n===Os||al(e,n),null!==Ms){var r=Es;Es|=16;for(var i=ll();;)try{dl();break}catch(t){sl(e,t)}if(to(),Es=r,ws.current=i,1===Ls)throw t=Ds,al(e,n),zl(e,n),tl(e),t;if(null===Ms)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ls,Cs=null,r){case ks:case 1:throw Error(a(345));case 2:Bl(e,2<n?2:n);break;case Ts:if(zl(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=gl(i)),1073741823===Is&&10<(i=Fs+500-Ui())){if(zs){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,al(e,n);break}}if(0!==(o=el(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=xn(ml.bind(null,e),i);break}ml(e);break;case Ss:if(zl(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=gl(i)),zs&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,al(e,n);break}if(0!==(i=el(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Rs?r=10*(1073741821-Rs)-Ui():1073741823===Is?r=0:(r=10*(1073741821-Is)-5e3,0>(r=(i=Ui())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xs(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=xn(ml.bind(null,e),r);break}ml(e);break;case 5:if(1073741823!==Is&&null!==Ps){o=Is;var s=Ps;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Ui()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){zl(e,n),e.timeoutHandle=xn(ml.bind(null,e),r);break}}ml(e);break;default:throw Error(a(329))}if(tl(e),e.callbackNode===t)return nl.bind(null,e)}}return null}function rl(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Es))throw Error(a(327));if(bl(),e===Cs&&t===Os||al(e,t),null!==Ms){var n=Es;Es|=16;for(var r=ll();;)try{hl();break}catch(t){sl(e,t)}if(to(),Es=n,ws.current=r,1===Ls)throw n=Ds,al(e,t),zl(e,t),tl(e),n;if(null!==Ms)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Cs=null,ml(e),tl(e)}return null}function il(e,t){var n=Es;Es|=1;try{return e(t)}finally{0===(Es=n)&&Gi()}}function ol(e,t){var n=Es;Es&=-2,Es|=8;try{return e(t)}finally{0===(Es=n)&&Gi()}}function al(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==Ms)for(n=Ms.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&yi();break;case 3:Po(),ui(pi),ui(fi);break;case 5:zo(r);break;case 4:Po();break;case 13:case 19:ui(Fo);break;case 10:no(r)}n=n.return}Cs=e,Ms=Ol(e.current,null),Os=t,Ls=ks,Ds=null,Rs=Is=1073741823,Ps=null,Ns=0,zs=!1}function sl(e,t){for(;;){try{if(to(),Uo.current=ya,Go)for(var n=Ho.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(qo=0,Wo=$o=Ho=null,Go=!1,null===Ms||null===Ms.return)return Ls=1,Ds=t,Ms=null;e:{var i=e,o=Ms.return,a=Ms,s=t;if(t=Os,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var u=0!=(1&Fo.current),h=o;do{var d;if(d=13===h.tag){var f=h.memoizedState;if(null!==f)d=null!==f.dehydrated;else{var p=h.memoizedProps;d=void 0!==p.fallback&&(!0!==p.unstable_avoidThisFallback||!u)}}if(d){var g=h.updateQueue;if(null===g){var m=new Set;m.add(l),h.updateQueue=m}else g.add(l);if(0==(2&h.mode)){if(h.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=co(1073741823,null);v.tag=2,uo(a,v)}a.expirationTime=1073741823;break e}s=void 0,a=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new vs,s=new Set,y.set(l,s)):void 0===(s=y.get(l))&&(s=new Set,y.set(l,s)),!s.has(a)){s.add(a);var b=Al.bind(null,i,l,a);l.then(b,b)}h.effectTag|=4096,h.expirationTime=t;break e}h=h.return}while(null!==h);s=Error((me(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ve(a))}5!==Ls&&(Ls=2),s=es(s,a),h=o;do{switch(h.tag){case 3:l=s,h.effectTag|=4096,h.expirationTime=t,ho(h,ys(h,l,t));break e;case 1:l=s;var _=h.type,x=h.stateNode;if(0==(64&h.effectTag)&&("function"==typeof _.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Vs||!Vs.has(x)))){h.effectTag|=4096,h.expirationTime=t,ho(h,bs(h,l,t));break e}}h=h.return}while(null!==h)}Ms=pl(Ms)}catch(e){t=e;continue}break}}function ll(){var e=ws.current;return ws.current=ya,null===e?ya:e}function cl(e,t){e<Is&&2<e&&(Is=e),null!==t&&e<Rs&&2<e&&(Rs=e,Ps=t)}function ul(e){e>Ns&&(Ns=e)}function hl(){for(;null!==Ms;)Ms=fl(Ms)}function dl(){for(;null!==Ms&&!Pi();)Ms=fl(Ms)}function fl(e){var t=_s(e.alternate,e,Os);return e.memoizedProps=e.pendingProps,null===t&&(t=pl(e)),As.current=null,t}function pl(e){Ms=e;do{var t=Ms.alternate;if(e=Ms.return,0==(2048&Ms.effectTag)){if(t=Ja(t,Ms,Os),1===Os||1!==Ms.childExpirationTime){for(var n=0,r=Ms.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Ms.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Ms.firstEffect),null!==Ms.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Ms.firstEffect),e.lastEffect=Ms.lastEffect),1<Ms.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Ms:e.firstEffect=Ms,e.lastEffect=Ms))}else{if(null!==(t=Qa(Ms)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Ms.sibling))return t;Ms=e}while(null!==Ms);return Ls===ks&&(Ls=5),null}function gl(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function ml(e){var t=Vi();return Hi(99,vl.bind(null,e,t)),null}function vl(e,t){do{bl()}while(null!==Hs);if(0!=(48&Es))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=gl(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Cs&&(Ms=Cs=null,Os=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Es;Es|=32,As.current=null,vn=$t;var s=fn();if(pn(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(l=(l=s.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(c&&0!==c.rangeCount){l=c.anchorNode;var u=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{l.nodeType,h.nodeType}catch(e){l=null;break e}var d=0,f=-1,p=-1,g=0,m=0,v=s,y=null;t:for(;;){for(var b;v!==l||0!==u&&3!==v.nodeType||(f=d+u),v!==h||0!==c&&3!==v.nodeType||(p=d+c),3===v.nodeType&&(d+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===s)break t;if(y===l&&++g===u&&(f=d),y===h&&++m===c&&(p=d),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}l=-1===f||-1===p?null:{start:f,end:p}}else l=null}l=l||{start:0,end:0}}else l=null;yn={activeElementDetached:null,focusedElem:s,selectionRange:l},$t=!1,Bs=i;do{try{yl()}catch(e){if(null===Bs)throw Error(a(330));wl(Bs,e),Bs=Bs.nextEffect}}while(null!==Bs);Bs=i;do{try{for(s=e,l=t;null!==Bs;){var _=Bs.effectTag;if(16&_&&Be(Bs.stateNode,""),128&_){var x=Bs.alternate;if(null!==x){var w=x.ref;null!==w&&("function"==typeof w?w(null):w.current=null)}}switch(1038&_){case 2:hs(Bs),Bs.effectTag&=-3;break;case 6:hs(Bs),Bs.effectTag&=-3,gs(Bs.alternate,Bs);break;case 1024:Bs.effectTag&=-1025;break;case 1028:Bs.effectTag&=-1025,gs(Bs.alternate,Bs);break;case 4:gs(Bs.alternate,Bs);break;case 8:ps(s,u=Bs,l),cs(u)}Bs=Bs.nextEffect}}catch(e){if(null===Bs)throw Error(a(330));wl(Bs,e),Bs=Bs.nextEffect}}while(null!==Bs);if(w=yn,x=fn(),_=w.focusedElem,l=w.selectionRange,x!==_&&_&&_.ownerDocument&&dn(_.ownerDocument.documentElement,_)){null!==l&&pn(_)&&(x=l.start,void 0===(w=l.end)&&(w=x),"selectionStart"in _?(_.selectionStart=x,_.selectionEnd=Math.min(w,_.value.length)):(w=(x=_.ownerDocument||document)&&x.defaultView||window).getSelection&&(w=w.getSelection(),u=_.textContent.length,s=Math.min(l.start,u),l=void 0===l.end?s:Math.min(l.end,u),!w.extend&&s>l&&(u=l,l=s,s=u),u=hn(_,s),h=hn(_,l),u&&h&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==h.node||w.focusOffset!==h.offset)&&((x=x.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),s>l?(w.addRange(x),w.extend(h.node,h.offset)):(x.setEnd(h.node,h.offset),w.addRange(x))))),x=[];for(w=_;w=w.parentNode;)1===w.nodeType&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_<x.length;_++)(w=x[_]).element.scrollLeft=w.left,w.element.scrollTop=w.top}$t=!!vn,yn=vn=null,e.current=n,Bs=i;do{try{for(_=e;null!==Bs;){var A=Bs.effectTag;if(36&A&&ss(_,Bs.alternate,Bs),128&A){x=void 0;var k=Bs.ref;if(null!==k){var T=Bs.stateNode;Bs.tag,x=T,"function"==typeof k?k(x):k.current=x}}Bs=Bs.nextEffect}}catch(e){if(null===Bs)throw Error(a(330));wl(Bs,e),Bs=Bs.nextEffect}}while(null!==Bs);Bs=null,Ni(),Es=o}else e.current=n;if(qs)qs=!1,Hs=e,$s=t;else for(Bs=i;null!==Bs;)t=Bs.nextEffect,Bs.nextEffect=null,Bs=t;if(0===(t=e.firstPendingTime)&&(Vs=null),1073741823===t?e===Ys?Gs++:(Gs=0,Ys=e):Gs=0,"function"==typeof Tl&&Tl(n.stateNode,r),tl(e),js)throw js=!1,e=Us,Us=null,e;return 0!=(8&Es)||Gi(),null}function yl(){for(;null!==Bs;){var e=Bs.effectTag;0!=(256&e)&&is(Bs.alternate,Bs),0==(512&e)||qs||(qs=!0,$i(97,(function(){return bl(),null}))),Bs=Bs.nextEffect}}function bl(){if(90!==$s){var e=97<$s?97:$s;return $s=90,Hi(e,_l)}}function _l(){if(null===Hs)return!1;var e=Hs;if(Hs=null,0!=(48&Es))throw Error(a(331));var t=Es;for(Es|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:os(5,n),as(5,n)}}catch(t){if(null===e)throw Error(a(330));wl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Es=t,Gi(),!0}function xl(e,t,n){uo(e,t=ys(e,t=es(n,t),1073741823)),null!==(e=Qs(e,1073741823))&&tl(e)}function wl(e,t){if(3===e.tag)xl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){xl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vs||!Vs.has(r))){uo(n,e=bs(n,e=es(t,e),1073741823)),null!==(n=Qs(n,1073741823))&&tl(n);break}}n=n.return}}function Al(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Cs===e&&Os===n?Ls===Ss||Ls===Ts&&1073741823===Is&&Ui()-Fs<500?al(e,Os):zs=!0:Nl(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,tl(e)))}function kl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Ks(t=Zs(),e,null)),null!==(e=Qs(e,t))&&tl(e)}_s=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||pi.current)Da=!0;else{if(r<n){switch(Da=!1,t.tag){case 3:Ua(t),Oa();break;case 5:if(No(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:vi(t.type)&&xi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,hi(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Wa(e,t,n):(hi(Fo,1&Fo.current),null!==(t=Za(e,t,n))?t.sibling:null);hi(Fo,1&Fo.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Xa(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),hi(Fo,Fo.current),!r)return null}return Za(e,t,n)}Da=!1}}else Da=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=mi(t,fi.current),io(t,n),i=Zo(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,vi(r)){var o=!0;xi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,so(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&vo(t,r,s,e),i.updater=yo,t.stateNode=i,i._reactInternalFiber=t,wo(t,r,e,n),t=ja(null,t,r,!0,o,n)}else t.tag=0,Ia(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ml(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===he)return 14}return 2}(i),e=Zi(i,e),o){case 0:t=Fa(null,t,i,e,n);break e;case 1:t=Ba(null,t,i,e,n);break e;case 11:t=Ra(null,t,i,e,n);break e;case 14:t=Pa(null,t,i,Zi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Fa(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 3:if(Ua(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,lo(e,t),fo(t,r,null,n),(r=t.memoizedState.element)===i)Oa(),t=Za(e,t,n);else{if((i=t.stateNode.hydrate)&&(Aa=An(t.stateNode.containerInfo.firstChild),wa=t,i=ka=!0),i)for(n=Co(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ia(e,t,r,n),Oa();t=t.child}return t;case 5:return No(t),null===e&&Ea(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,_n(r,i)?s=null:null!==o&&_n(r,o)&&(t.effectTag|=16),za(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ia(e,t,s,n),t=t.child),t;case 6:return null===e&&Ea(t),null;case 13:return Wa(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Eo(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ra(e,t,r,i=t.elementType===r?i:Zi(r,i),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(hi(Ki,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0==(o=Br(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!pi.current){t=Za(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=co(n,null)).tag=2,uo(l,u)),l.expirationTime<n&&(l.expirationTime=n),null!==(u=l.alternate)&&u.expirationTime<n&&(u.expirationTime=n),ro(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Ia(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,io(t,n),r=r(i=oo(i,o.unstable_observedBits)),t.effectTag|=1,Ia(e,t,r,n),t.child;case 14:return o=Zi(i=t.type,t.pendingProps),Pa(e,t,i,o=Zi(i.type,o),r,n);case 15:return Na(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Zi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,vi(r)?(e=!0,xi(t)):e=!1,io(t,n),_o(t,r,i),wo(t,r,i,n),ja(null,t,r,!0,e,n);case 19:return Xa(e,t,n)}throw Error(a(156,t.tag))};var Tl=null,Sl=null;function El(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Cl(e,t,n,r){return new El(e,t,n,r)}function Ml(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ol(e,t){var n=e.alternate;return null===n?((n=Cl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ml(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Dl(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=Cl(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case ce:return(e=Cl(13,n,t,i)).type=ce,e.elementType=ce,e.expirationTime=o,e;case ue:return(e=Cl(19,n,t,i)).elementType=ue,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case le:s=11;break e;case he:s=14;break e;case de:s=16,r=null;break e;case fe:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Cl(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Dl(e,t,n,r){return(e=Cl(7,e,r,t)).expirationTime=n,e}function Il(e,t,n){return(e=Cl(6,e,null,t)).expirationTime=n,e}function Rl(e,t,n){return(t=Cl(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pl(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Nl(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function zl(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Fl(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Bl(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function jl(e,t,n,r){var i=t.current,o=Zs(),s=go.suspense;o=Ks(o,i,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(vi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(vi(c)){n=_i(n,c,l);break e}}n=l}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),Js(i,o),o}function Ul(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function ql(e,t){Vl(e,t),(e=e.alternate)&&Vl(e,t)}function Hl(e,t,n){var r=new Pl(e,t,n=null!=n&&!0===n.hydrate),i=Cl(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,so(i),e[Cn]=r.current,n&&0!==t&&function(e,t){var n=Ke(t);Tt.forEach((function(e){ft(e,t,n)})),St.forEach((function(e){ft(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Wl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Ul(a);s.call(e)}}jl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Hl(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var l=i;i=function(){var e=Ul(a);l.call(e)}}ol((function(){jl(t,a,e,i)}))}return Ul(a)}function Gl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$l(t))throw Error(a(200));return Gl(e,t,null,n)}Hl.prototype.render=function(e){jl(e,this._internalRoot,null,null)},Hl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;jl(null,e,null,(function(){t[Cn]=null}))},pt=function(e){if(13===e.tag){var t=Xi(Zs(),150,100);Js(e,t),ql(e,t)}},gt=function(e){13===e.tag&&(Js(e,3),ql(e,3))},mt=function(e){if(13===e.tag){var t=Zs();Js(e,t=Ks(t,e,null)),ql(e,t)}},C=function(e,t,n){switch(t){case"input":if(Te(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Dn(r);if(!i)throw Error(a(90));xe(r),Te(r,i)}}}break;case"textarea":De(e,n);break;case"select":null!=(t=n.value)&&Me(e,!!n.multiple,t,!1)}},R=il,P=function(e,t,n,r,i){var o=Es;Es|=4;try{return Hi(98,e.bind(null,t,n,r,i))}finally{0===(Es=o)&&Gi()}},N=function(){0==(49&Es)&&(function(){if(null!==Ws){var e=Ws;Ws=null,e.forEach((function(e,t){Bl(t,e),tl(t)})),Gi()}}(),bl())},z=function(e,t){var n=Es;Es|=2;try{return e(t)}finally{0===(Es=n)&&Gi()}};var Xl={Events:[On,Ln,Dn,S,A,Bn,function(e){rt(e,Fn)},D,I,Zt,at,bl,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Tl=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Sl=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Mn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xl,t.createPortal=Yl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Es))throw Error(a(187));var n=Es;Es|=1;try{return Hi(99,e.bind(null,t))}finally{Es=n,Gi()}},t.hydrate=function(e,t,n){if(!$l(t))throw Error(a(200));return Wl(null,e,t,!0,n)},t.render=function(e,t,n){if(!$l(t))throw Error(a(200));return Wl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$l(e))throw Error(a(40));return!!e._reactRootContainer&&(ol((function(){Wl(null,null,e,!1,(function(){e._reactRootContainer=null,e[Cn]=null}))})),!0)},t.unstable_batchedUpdates=il,t.unstable_createPortal=function(e,t){return Yl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Wl(e,t,n,!1,r)},t.version="16.14.0"},37935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(67658)},29500:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case h:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case d:case m:case g:case l:return e;default:return t}}case i:return t}}}function w(e){return x(e)===h}t.AsyncMode=u,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return w(e)||x(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===d},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===s||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===_||e.$$typeof===v)},t.typeOf=x},45634:(e,t,n)=>{"use strict";e.exports=n(29500)},53899:(e,t,n)=>{"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\npath_to_url")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:()=>a}),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},3347:(e,t,n)=>{"use strict";var r=n(20362),i=n(754),o=n(45634);function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=t.renderers[e.type];e.position||(e.position={start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}});var c=e.position.start,u=[e.type,c.line,c.column,i].join("-");if(!o.isValidElementType(l))throw new Error("Renderer for type `".concat(e.type,"` not defined or is not renderable"));var h=s(e,u,t,l,n,i);return r.createElement(l,h,h.children||d()||void 0);function d(){return e.children&&e.children.map((function(n,r){return a(n,t,{node:e,props:h},r)}))}}function s(e,t,n,o,s,u){var h,d={key:t},f="string"==typeof o||o===r.Fragment;n.sourcePos&&e.position&&(d["data-sourcepos"]=[(h=e.position).start.line,":",h.start.column,"-",h.end.line,":",h.end.column].map(String).join("")),n.rawSourcePos&&!f&&(d.sourcePosition=e.position),n.includeNodeIndex&&s.node&&s.node.children&&!f&&(d.index=s.node.children.indexOf(e),d.parentChildCount=s.node.children.length);var p=null!==e.identifier&&void 0!==e.identifier?n.definitions[e.identifier.toUpperCase()]||{}:null;switch(e.type){case"root":l(d,{className:n.className});break;case"text":d.nodeKey=t,d.children=e.value;break;case"heading":d.level=e.depth;break;case"list":d.start=e.start,d.ordered=e.ordered,d.spread=e.spread,d.depth=e.depth;break;case"listItem":d.checked=e.checked,d.spread=e.spread,d.ordered=e.ordered,d.index=e.index,d.children=function(e,t){return(t&&t.node?function(e){for(var t=e.children,n=e.spread,r=-1;!n&&++r<t.length;)n=c(t[r]);return n}(t.node):c(e))?e.children:function(e){return e.children.reduce((function(e,t){return e.concat("paragraph"===t.type?t.children:[t])}),[])}(e)}(e,s).map((function(t,r){return a(t,n,{node:e,props:d},r)}));break;case"definition":l(d,{identifier:e.identifier,title:e.title,url:e.url});break;case"code":l(d,{language:e.lang&&e.lang.split(/\s/,1)[0]});break;case"inlineCode":d.children=e.value,d.inline=!0;break;case"link":l(d,{title:e.title||void 0,target:"function"==typeof n.linkTarget?n.linkTarget(e.url,e.children,e.title):n.linkTarget,href:n.transformLinkUri?n.transformLinkUri(e.url,e.children,e.title):e.url});break;case"image":l(d,{src:n.transformImageUri?n.transformImageUri(e.url,e.children,e.title,e.alt):e.url,alt:e.alt||"",title:e.title||void 0});break;case"linkReference":l(d,i(p,{href:n.transformLinkUri?n.transformLinkUri(p.href):p.href}));break;case"imageReference":l(d,{src:n.transformImageUri&&p.href?n.transformImageUri(p.href,e.children,p.title,e.alt):p.href,alt:e.alt||"",title:p.title||void 0});break;case"table":case"tableHead":case"tableBody":d.columnAlignment=e.align;break;case"tableRow":d.isHeader="tableHead"===s.node.type,d.columnAlignment=s.props.columnAlignment;break;case"tableCell":l(d,{isHeader:s.props.isHeader,align:s.props.columnAlignment[u]});break;case"virtualHtml":d.tag=e.tag;break;case"html":d.isBlock=e.position.start.line!==e.position.end.line,d.allowDangerousHtml=n.allowDangerousHtml,d.escapeHtml=n.escapeHtml,d.skipHtml=n.skipHtml;break;case"parsedHtml":var g;e.children&&(g=e.children.map((function(t,r){return a(t,n,{node:e,props:d},r)}))),d.allowDangerousHtml=n.allowDangerousHtml,d.escapeHtml=n.escapeHtml,d.skipHtml=n.skipHtml,d.element=e.element?function(e,t){var n=e.element;if(Array.isArray(n)){var i=r.Fragment||"div";return r.createElement(i,null,n)}if(n.props.children||t){var o=r.Children.toArray(n.props.children).concat(t);return r.cloneElement(n,null,o)}return r.cloneElement(n,null)}(e,g):null;break;default:l(d,i(e,{type:void 0,position:void 0,children:void 0}))}return!f&&e.value&&(d.value=e.value),f||(d.node=e),d}function l(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}function c(e){var t=e.spread;return null==t?e.children.length>1:t}e.exports=a},13444:(e,t,n)=>{"use strict";var r=n(94587);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r(e,"definition",(function(e){var n=e.identifier.toUpperCase();n in t||(t[n]={href:e.url,title:e.title})})),t}},7294:(e,t,n)=>{"use strict";var r=n(94587),i=[].splice;function o(e,t){return function(e){return r(e,n),e};function n(n,r,o){if(o&&!e(n,r,o)){var a=[r,1];return"unwrap"===t&&n.children&&(a=a.concat(n.children)),i.apply(o.children,a),r}}}t.ofType=function(e,t){return o((function(t,n,r){return!e.includes(t.type)}),t)},t.ifNotMatch=o},54147:(e,t,n)=>{"use strict";var r=n(94587),i="virtualHtml",o=/^<(area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\s*\/?>$/i,a=/^<(\/?)([a-z]+)\s*>$/;e.exports=function(e){var t,n;return r(e,"html",(function(e,r,s){n!==s&&(t=[],n=s);var l=function(e){var t=e.value.match(o);return!!t&&t[1]}(e);if(l)return s.children.splice(r,1,{type:i,tag:l,position:e.position}),!0;var c=function(e,t){var n=e.value.match(a);return!!n&&{tag:n[2],opening:!n[1],node:e}}(e);if(!c)return!0;var u=function(e,t){for(var n=e.length;n--;)if(e[n].tag===t)return e.splice(n,1)[0];return!1}(t,c.tag);return u?s.children.splice(r,0,function(e,t,n){var r=n.children.indexOf(e.node),o=n.children.indexOf(t.node),a=n.children.splice(r,o-r+1).slice(1,-1);return{type:i,children:a,tag:e.tag,position:{start:e.node.position.start,end:t.node.position.end,indent:[]}}}(c,u,s)):c.opening||t.push(c),!0}),!0),e}},55921:(e,t,n)=>{"use strict";var r=n(754),i=n(97641),o=n(97723),a=n(73715),s=n(89085),l=n(54147),c=n(7294),u=n(3347),h=n(33557),d=n(13444),f=n(54834),p=n(83564),g=n(77085),m=Object.keys(p),v=function(e){var t=e.source||e.children||"";if(e.allowedTypes&&e.disallowedTypes)throw new Error("Only one of `allowedTypes` and `disallowedTypes` should be defined");var n=r(p,e.renderers),a=i().use(o).use(e.plugins||[]),f=a.runSync(a.parse(t)),v=r(e,{renderers:n,definitions:d(f)});return function(e){var t=[h,s()],n=e.disallowedTypes;e.allowedTypes&&(n=m.filter((function(t){return"root"!==t&&-1===e.allowedTypes.indexOf(t)})));var r=e.unwrapDisallowed?"unwrap":"remove";n&&n.length>0&&t.push(c.ofType(n,r)),e.allowNode&&t.push(c.ifNotMatch(e.allowNode,r));var i=(e.allowDangerousHtml||!1===e.escapeHtml)&&!e.skipHtml,o=(e.astPlugins||[]).some((function(e){return e.identity===g.HtmlParser}));return i&&!o&&t.push(l),e.astPlugins&&(t=t.concat(e.astPlugins)),t.push(u),t}(e).forEach((function(e){f=e(f,v)})),f};v.defaultProps={transformLinkUri:f},v.propTypes={className:a.string,source:a.string,children:a.string,sourcePos:a.bool,rawSourcePos:a.bool,escapeHtml:a.bool,allowDangerousHtml:a.bool,skipHtml:a.bool,allowNode:a.func,allowedTypes:a.arrayOf(a.oneOf(m)),disallowedTypes:a.arrayOf(a.oneOf(m)),transformLinkUri:a.oneOfType([a.func,a.bool]),linkTarget:a.oneOfType([a.func,a.string]),transformImageUri:a.func,astPlugins:a.arrayOf(a.func),unwrapDisallowed:a.bool,renderers:a.object,plugins:a.array},v.types=m,v.renderers=p,v.uriTransformer=f,e.exports=v},83564:(e,t,n)=>{"use strict";var r=n(754),i=n(20362),o=parseInt((i.version||"16").slice(0,2),10)>=16,a=i.createElement;function s(e,t){return a(e,l(t),t.children)}function l(e){var t=e["data-sourcepos"];return t?{"data-sourcepos":t}:{}}e.exports={break:"br",paragraph:"p",emphasis:"em",strong:"strong",thematicBreak:"hr",blockquote:"blockquote",delete:"del",link:"a",image:"img",linkReference:"a",imageReference:"img",table:s.bind(null,"table"),tableHead:s.bind(null,"thead"),tableBody:s.bind(null,"tbody"),tableRow:s.bind(null,"tr"),tableCell:function(e){var t=e.align?{textAlign:e.align}:void 0,n=l(e);return a(e.isHeader?"th":"td",t?r({style:t},n):n,e.children)},root:function(e){var t=e.className,n=!t&&i.Fragment||"div";return a(n,t?{className:t}:null,e.children)},text:function(e){var t=e.children||"";return o?t:a("span",null,t)},list:function(e){var t=l(e);return null!==e.start&&1!==e.start&&void 0!==e.start&&(t.start=e.start.toString()),a(e.ordered?"ol":"ul",t,e.children)},listItem:function(e){var t=null;if(null!==e.checked&&void 0!==e.checked){var n=e.checked;t=a("input",{type:"checkbox",checked:n,readOnly:!0})}return a("li",l(e),t,e.children)},definition:function(){return null},heading:function(e){return a("h".concat(e.level),l(e),e.children)},inlineCode:function(e){return a("code",l(e),e.children)},code:function(e){var t=e.language&&"language-".concat(e.language),n=a("code",t?{className:t}:null,e.value);return a("pre",l(e),n)},html:function(e){if(e.skipHtml)return null;var t=e.allowDangerousHtml||!1===e.escapeHtml,n=e.isBlock?"div":"span";if(!t)return a(i.Fragment||n,null,e.value);var r={dangerouslySetInnerHTML:{__html:e.value}};return a(n,r)},virtualHtml:function(e){return a(e.tag,l(e),e.children)},parsedHtml:function(e){return e["data-sourcepos"]?i.cloneElement(e.element,{"data-sourcepos":e["data-sourcepos"]}):e.element}}},77085:(e,t)=>{"use strict";var n="__RMD_HTML_PARSER__";t.HtmlParser="undefined"==typeof Symbol?n:Symbol(n)},54834:e=>{"use strict";var t=["http","https","mailto","tel"];e.exports=function(e){var n=(e||"").trim(),r=n.charAt(0);if("#"===r||"/"===r)return n;var i=n.indexOf(":");if(-1===i)return n;for(var o=t.length,a=-1;++a<o;){var s=t[a];if(i===s.length&&n.slice(0,s.length).toLowerCase()===s)return n}return-1!==(a=n.indexOf("?"))&&i>a||-1!==(a=n.indexOf("#"))&&i>a?n:"javascript:void(0)"}},33557:(e,t,n)=>{"use strict";var r=n(94587);function i(e){var t=e.children;e.children=[{type:"tableHead",align:e.align,children:[t[0]],position:t[0].position}],t.length>1&&e.children.push({type:"tableBody",align:e.align,children:t.slice(1),position:{start:t[1].position.start,end:t[t.length-1].position.end}})}e.exports=function(e){return r(e,"table",i),e}},70291:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(20362),a=p(o),s=p(n(37935)),l=p(n(73715)),c=p(n(12941)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(58338)),h=n(58589),d=p(h),f=n(53899);function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var v=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",b=h.canUseDOM&&void 0!==s.default.createPortal,_=function(e){return document.createElement(e)},x=function(){return b?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function w(e){return e()}var A=function(e){function t(){var e,n,i;g(this,t);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return n=i=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.removePortal=function(){!b&&s.default.unmountComponentAtNode(i.node);var e=w(i.props.parentSelector);e&&e.contains(i.node)?e.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(e){i.portal=e},i.renderPortal=function(e){var n=x()(i,a.default.createElement(c.default,r({defaultStyles:t.defaultStyles},e)),i.node);i.portalRef(n)},m(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){h.canUseDOM&&(b||(this.node=_("div")),this.node.className=this.props.portalClassName,w(this.props.parentSelector).appendChild(this.node),!b&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:w(e.parentSelector),nextParent:w(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(h.canUseDOM){var r=this.props,i=r.isOpen,o=r.portalClassName;e.portalClassName!==o&&(this.node.className=o);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||i)&&!b&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(h.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return h.canUseDOM&&b?(!this.node&&b&&(this.node=_("div")),x()(a.default.createElement(c.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){u.setElement(e)}}]),t}(o.Component);A.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(d.default),l.default.instanceOf(h.SafeHTMLCollection),l.default.instanceOf(h.SafeNodeList),l.default.arrayOf(l.default.instanceOf(d.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},A.defaultProps={isOpen:!1,portalClassName:v,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},A.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,f.polyfill)(A),t.default=A},12941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(20362),s=m(n(73715)),l=g(n(71748)),c=m(n(12035)),u=g(n(58338)),h=g(n(36750)),d=n(58589),f=m(d),p=m(n(75051));function g(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}n(68533);var v={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&h.remove(document.body,o),i&&h.remove(document.getElementsByTagName("html")[0],i),r&&y>0&&0==(y-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),p.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&h.add(document.body,i),r&&h.add(document.getElementsByTagName("html")[0],r),n&&(y+=1,u.hide(t)),p.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,o=e.defaultStyles,a=e.children,s=n?{}:o.content,l=i?{}:o.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=r({id:t,ref:this.setContentRef,style:r({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),h=this.props.contentElement(u,a);return this.props.overlayElement(c,h)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},58338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(a).forEach((function(e){return e.removeAttribute("aria-hidden")}))),a=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&o.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return a=t||a},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=l(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.setAttribute("aria-hidden","true")}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=l(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.removeAttribute("aria-hidden")}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){a=null};var r,i=(r=n(54588))&&r.__esModule?r:{default:r},o=n(58589),a=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},68533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[o,a],t=0;t<e.length;t++){var n=e[t];n&&n.parentNode&&n.parentNode.removeChild(n)}o=a=null,s=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(s.length);for(var e=[o,a],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,i=(r=n(75051))&&r.__esModule?r:{default:r},o=void 0,a=void 0,s=[];function l(){0!==s.length&&s[s.length-1].focusContent()}i.default.subscribe((function(e,t){o||a||((o=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),o.style.position="absolute",o.style.opacity="0",o.setAttribute("tabindex","0"),o.addEventListener("focus",l),(a=o.cloneNode()).addEventListener("focus",l)),(s=t).length>0?(document.body.firstChild!==o&&document.body.insertBefore(o,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(o.parentElement&&o.parentElement.removeChild(o),a.parentElement&&a.parentElement.removeChild(a))}))},36750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)i(e,n[t]);var o=document.body;for(var a in r)i(o,r[a]);n={},r={}},t.log=function(){};var n={},r={};function i(e,t){e.classList.remove(t)}t.add=function(e,t){return i=e.classList,o="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),i.add(e)}));var i,o},t.remove=function(e,t){return i=e.classList,o="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&i.remove(e)}));var i,o}},71748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){o=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){o.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==o.length&&(t=o.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){o.length>0&&o.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var r,i=(r=n(47788))&&r.__esModule?r:{default:r},o=[],a=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!a)return;setTimeout((function(){a.contains(document.activeElement)||((0,i.default)(a)[0]||a).focus()}),0)}}},75051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(r.openInstances.length),r.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){r=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},r=new n;t.default=r},58589:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=((r=n(21722))&&r.__esModule?r:{default:r}).default,o=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM,t.default=o},12035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(n.length){var r=void 0,a=t.shiftKey,s=n[0],l=n[n.length-1],c=o();if(e===c){if(!a)return;r=l}if(l!==c||a||(r=s),s===c&&a&&(r=l),r)return t.preventDefault(),void r.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var h=n.indexOf(c);if(h>-1&&(h+=a?-1:1),void 0===(r=n[h]))return t.preventDefault(),void(r=a?l:s).focus();t.preventDefault(),r.focus()}}else t.preventDefault()};var r,i=(r=n(47788))&&r.__esModule?r:{default:r};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?o(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},47788:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n=/input|select|textarea|button|object/;function r(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var i=isNaN(t);return(i||t>=0)&&function(e,t){var i=e.nodeName.toLowerCase();return(n.test(i)&&!e.disabled||"a"===i&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),r(t))return!1;t=t.parentNode}return!0}(e)}(e,!i)}e.exports=t.default},2352:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(70291))&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},92259:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(m,t);var n,r,i,a,s=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(n);if(r){var i=d(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return u(this,e)});function m(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(t=s.call(this,e)).p=Promise.resolve(),t.resizeHandler=null,t.handlers={},t.syncWindowResize=t.syncWindowResize.bind(h(t)),t.syncEventHandlers=t.syncEventHandlers.bind(h(t)),t.attachUpdateEvents=t.attachUpdateEvents.bind(h(t)),t.getRef=t.getRef.bind(h(t)),t.handleUpdate=t.handleUpdate.bind(h(t)),t.figureCallback=t.figureCallback.bind(h(t)),t.updatePlotly=t.updatePlotly.bind(h(t)),t}return i=m,(a=[{key:"updatePlotly",value:function(t,n,r){var i=this;this.p=this.p.then((function(){if(!i.unmounting){if(!i.el)throw new Error("Missing element reference");return e.react(i.el,{data:i.props.data,layout:i.props.layout,config:i.props.config,frames:i.props.frames})}})).then((function(){i.unmounting||(i.syncWindowResize(t),i.syncEventHandlers(),i.figureCallback(n),r&&i.attachUpdateEvents())})).catch((function(e){i.props.onError&&i.props.onError(e)}))}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(e){this.unmounting=!1;var t=e.frames&&e.frames.length?e.frames.length:0,n=this.props.frames&&this.props.frames.length?this.props.frames.length:0,r=!(e.layout===this.props.layout&&e.data===this.props.data&&e.config===this.props.config&&n===t),i=void 0!==e.revision,o=e.revision!==this.props.revision;(r||i&&(!i||o))&&this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&g&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),e.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var e=this;this.el&&this.el.removeListener&&p.forEach((function(t){e.el.on(t,e.handleUpdate)}))}},{key:"removeUpdateEvents",value:function(){var e=this;this.el&&this.el.removeListener&&p.forEach((function(t){e.el.removeListener(t,e.handleUpdate)}))}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(e){if("function"==typeof e){var t=this.el;e({data:t.data,layout:t.layout,frames:this.el._transitionData?this.el._transitionData._frames:null},this.el)}}},{key:"syncWindowResize",value:function(t){var n=this;g&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return e.Plots.resize(n.el)},window.addEventListener("resize",this.resizeHandler),t&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(e){this.el=e,this.props.debug&&g&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var e=this;f.forEach((function(t){var n=e.props["on"+t],r=e.handlers[t],i=Boolean(r);n&&!i?e.addEventHandler(t,n):!n&&i?e.removeEventHandler(t):n&&i&&n!==r&&(e.removeEventHandler(t),e.addEventHandler(t,n))}))}},{key:"addEventHandler",value:function(e,t){this.handlers[e]=t,this.el.on(this.getPlotlyEventName(e),this.handlers[e])}},{key:"removeEventHandler",value:function(e){this.el.removeListener(this.getPlotlyEventName(e),this.handlers[e]),delete this.handlers[e]}},{key:"getPlotlyEventName",value:function(e){return"plotly_"+e.toLowerCase()}},{key:"render",value:function(){return o.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}])&&l(i.prototype,a),m}(o.Component);return t.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},f.forEach((function(e){t.propTypes["on"+e]=a.default.func})),t.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},t};var i,o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(20362)),a=(i=n(73715))&&i.__esModule?i:{default:i};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var f=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover"],p=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],g="undefined"!=typeof window},90492:(e,t,n)=>{"use strict";t.Z=void 0;var r=o(n(92259)),i=o(n(55716));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)(i.default);t.Z=a},42730:e=>{const t="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function o(e){return a("(?=",e,")")}function a(...e){return e.map((e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t})).join("")}e.exports=function(e){const s=t,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch()):t.ignoreMatch()}},c={$pattern:t,keyword:n,literal:r,built_in:i},u="\\.([0-9](_?[0-9])*)",h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${h})((${u})|\\.)?|(${u}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{begin:`\\b(${h})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},p={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},v={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,d,e.REGEXP_MODE];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(y)});const b=[].concat(v,f.contains),_=b.concat([{begin:/\(/,end:/\)/,keywords:c,contains:["self"].concat(b)}]),x={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:_};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:_},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,v,d,{begin:a(/[{,\n]\s*/,o(a(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,s+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:s+o("\\s*:"),relevance:0}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[v,e.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:_}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:"</>"},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:c,contains:["self",e.inherit(e.TITLE_MODE,{begin:s}),x],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[x,e.inherit(e.TITLE_MODE,{begin:s})]},{variants:[{begin:"\\."+s},{begin:"\\$"+s}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:s}),"self",x]},{begin:"(get|set)\\s+(?="+s+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:s}),{begin:/\(\)/},x]},{begin:/\$[(.]/}]}}},78274:e=>{e.exports=function(e){const t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},o={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})].concat(n),illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return r.push(o,a),n.forEach((function(e){r.push(e)})),{name:"JSON",contains:r,keywords:t,illegal:"\\S"}}},43770:e=>{e.exports=function(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a="[0-9](_?[0-9])*",s=`(\\b(${a}))?\\.(${a})|\\b(${a})\\.`,l={className:"number",relevance:0,variants:[{begin:`(\\b(${a})|(${s}))[eE][+-]?(${a})[jJ]?\\b`},{begin:`(${s})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${a})[jJ]\\b`}]},c={className:"comment",begin:(h=/# type:/,function(...e){return e.map((e=>function(e){return e?"string"==typeof e?e:e.source:null}(e))).join("")}("(?=",h,")")),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},u={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",n,l,o,e.HASH_COMMENT_MODE]}]};var h;return r.contains=[o,l,n],{name:"Python",aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,l,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},o,c,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,u,{begin:/->/,endsWithParent:!0,keywords:t}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[l,u,o]}]}}},73152:(e,t,n)=>{"use strict";n.d(t,{Ix:()=>M,Am:()=>U});var r=n(20362),i=n(99602),o=n(79125),a=n(37935);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function c(e){return"number"==typeof e&&!isNaN(e)}function u(e){return"boolean"==typeof e}function h(e){return"string"==typeof e}function d(e){return"function"==typeof e}function f(e){return h(e)||d(e)?e:null}function p(e){return 0===e||e}var g=!("undefined"==typeof window||!window.document||!window.document.createElement);function m(e){return(0,r.isValidElement)(e)||h(e)||d(e)||c(e)}var v={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},y={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default",DARK:"dark"};function b(e){var t,n,o=e.enter,a=e.exit,s=e.duration,c=void 0===s?750:s,u=e.appendPosition,h=void 0!==u&&u,d=e.collapse,f=void 0===d||d,p=e.collapseDuration,g=void 0===p?300:p;return Array.isArray(c)&&2===c.length?(t=c[0],n=c[1]):t=n=c,function(e){var s=e.children,c=e.position,u=e.preventExitTransition,d=e.done,p=l(e,["children","position","preventExitTransition","done"]),m=h?o+"--"+c:o,v=h?a+"--"+c:a,y=function e(){var t=p.nodeRef.current;t&&(t.removeEventListener("animationend",e),f?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout((function(){return t()}),n)}))}))}(t,d,g):d())};return(0,r.createElement)(i.ZP,Object.assign({},p,{timeout:u?f?g:50:{enter:t,exit:f?n+g:n+50},onEnter:function(){var e=p.nodeRef.current;e&&(e.classList.add(m),e.style.animationFillMode="forwards",e.style.animationDuration=t+"ms")},onEntered:function(){var e=p.nodeRef.current;e&&(e.classList.remove(m),e.style.removeProperty("animationFillMode"),e.style.removeProperty("animationDuration"))},onExit:u?y:function(){var e=p.nodeRef.current;e&&(e.classList.add(v),e.style.animationFillMode="forwards",e.style.animationDuration=n+"ms",e.addEventListener("animationend",y))},unmountOnExit:!0}),s)}}var _={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach((function(e){return clearTimeout(e)})),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}};function x(e,t){void 0===t&&(t=!1);var n=(0,r.useRef)(e);return(0,r.useEffect)((function(){t&&(n.current=e)})),n.current}function w(e,t){switch(t.type){case"ADD":return[].concat(e,[t.toastId]).filter((function(e){return e!==t.staleId}));case"REMOVE":return p(t.toastId)?e.filter((function(e){return e!==t.toastId})):[]}}function A(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function k(e){var t=e.closeToast,n=e.type,i=e.ariaLabel,o=void 0===i?"close":i;return(0,r.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},(0,r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function T(e){var t,n,i=e.delay,a=e.isRunning,l=e.closeToast,c=e.type,u=e.hide,h=e.className,f=e.style,p=e.controlledProgress,g=e.progress,m=e.rtl,v=e.isIn,y=s({},f,{animationDuration:i+"ms",animationPlayState:a?"running":"paused",opacity:u?0:1});p&&(y.transform="scaleX("+g+")");var b=["Toastify__progress-bar",p?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar--"+c,(t={},t["Toastify__progress-bar--rtl"]=m,t)],_=d(h)?h({rtl:m,type:c,defaultClassName:o.Z.apply(void 0,b)}):o.Z.apply(void 0,[].concat(b,[h])),x=((n={})[p&&g>=1?"onTransitionEnd":"onAnimationEnd"]=p&&g<1?null:function(){v&&l()},n);return(0,r.createElement)("div",Object.assign({className:_,style:y},x))}T.defaultProps={type:y.DEFAULT,hide:!1};var S=function(e){var t,n=function(e){var t=(0,r.useState)(!0),n=t[0],i=t[1],o=(0,r.useState)(!1),a=o[0],s=o[1],l=(0,r.useRef)(null),c=x({start:0,x:0,y:0,deltaX:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),u=x(e,!0),h=e.autoClose,f=e.pauseOnHover,p=e.closeToast,g=e.onClick,m=e.closeOnClick;function v(t){var n=l.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.start=c.x=A(t.nativeEvent),c.removalDistance=n.offsetWidth*(e.draggablePercent/100)}function y(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&c.x>=i&&c.x<=o&&c.y>=n&&c.y<=r?_():b()}}function b(){i(!0)}function _(){i(!1)}function w(e){e.preventDefault();var t=l.current;c.canDrag&&(n&&_(),c.x=A(e),c.deltaX=c.x-c.start,c.y=function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}(e),c.start!==c.x&&(c.canCloseOnClick=!1),t.style.transform="translateX("+c.deltaX+"px)",t.style.opacity=""+(1-Math.abs(c.deltaX/c.removalDistance)))}function k(){var t=l.current;if(c.canDrag){if(c.canDrag=!1,Math.abs(c.deltaX)>c.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translateX(0)",t.style.opacity="1"}}(0,r.useEffect)((function(){return d(e.onOpen)&&e.onOpen((0,r.isValidElement)(e.children)&&e.children.props),function(){d(u.onClose)&&u.onClose((0,r.isValidElement)(u.children)&&u.children.props)}}),[]),(0,r.useEffect)((function(){return e.draggable&&(document.addEventListener("mousemove",w),document.addEventListener("mouseup",k),document.addEventListener("touchmove",w),document.addEventListener("touchend",k)),function(){e.draggable&&(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",k))}}),[e.draggable]),(0,r.useEffect)((function(){return e.pauseOnFocusLoss&&(window.addEventListener("focus",b),window.addEventListener("blur",_)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",_))}}),[e.pauseOnFocusLoss]);var T={onMouseDown:v,onTouchStart:v,onMouseUp:y,onTouchEnd:y};return h&&f&&(T.onMouseEnter=_,T.onMouseLeave=b),m&&(T.onClick=function(e){g&&g(e),c.canCloseOnClick&&p()}),{playToast:b,pauseToast:_,isRunning:n,preventExitTransition:a,toastRef:l,eventHandlers:T}}(e),i=n.isRunning,a=n.preventExitTransition,s=n.toastRef,l=n.eventHandlers,c=e.closeButton,u=e.children,h=e.autoClose,f=e.onClick,p=e.type,g=e.hideProgressBar,m=e.closeToast,v=e.transition,y=e.position,b=e.className,_=e.style,w=e.bodyClassName,k=e.bodyStyle,S=e.progressClassName,E=e.progressStyle,C=e.updateId,M=e.role,O=e.progress,L=e.rtl,D=e.toastId,I=e.deleteToast,R=["Toastify__toast","Toastify__toast--"+p,(t={},t["Toastify__toast--rtl"]=L,t)],P=d(b)?b({rtl:L,position:y,type:p,defaultClassName:o.Z.apply(void 0,R)}):o.Z.apply(void 0,[].concat(R,[b])),N=!!O;return(0,r.createElement)(v,{in:e.in,appear:!0,done:I,position:y,preventExitTransition:a,nodeRef:s},(0,r.createElement)("div",Object.assign({id:D,onClick:f,className:P||void 0},l,{style:_,ref:s}),(0,r.createElement)("div",Object.assign({},e.in&&{role:M},{className:d(w)?w({type:p}):(0,o.Z)("Toastify__toast-body",w),style:k}),u),function(e){if(e){var t={closeToast:m,type:p};return d(e)?e(t):(0,r.isValidElement)(e)?(0,r.cloneElement)(e,t):void 0}}(c),(h||N)&&(0,r.createElement)(T,Object.assign({},C&&!N?{key:"pb-"+C}:{},{rtl:L,delay:h,isRunning:i,isIn:e.in,closeToast:m,hide:g,type:p,style:E,className:S,controlledProgress:N,progress:O}))))},E=b({enter:"Toastify__bounce-enter",exit:"Toastify__bounce-exit",appendPosition:!0}),C=function(e){var t=e.children,n=e.className,i=e.style,o=l(e,["children","className","style"]);return delete o.in,(0,r.createElement)("div",{className:n,style:i},r.Children.map(t,(function(e){return(0,r.cloneElement)(e,o)})))},M=function(e){var t=function(e){var t=(0,r.useReducer)((function(e){return e+1}),0)[1],n=(0,r.useReducer)(w,[]),i=n[0],o=n[1],a=(0,r.useRef)(null),s=x(0),g=x([]),v=x({}),y=x({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:b,getToast:function(e){return v[e]||null}});function b(e){return-1!==i.indexOf(e)}function A(e){var t=e.containerId,n=y.props,r=n.limit,i=n.enableMultiContainer;r&&(!t||y.containerId===t&&i)&&(s-=g.length,g=[])}function k(e){var t=g.length;if((s=p(e)?s-1:s-y.displayedToast)<0&&(s=0),t>0){var n=p(e)?1:y.props.limit;if(1===t||1===n)y.displayedToast++,T();else{var r=n>t?t:n;y.displayedToast=r;for(var i=0;i<r;i++)T()}}o({type:"REMOVE",toastId:e})}function T(){var e=g.shift(),t=e.toastContent,n=e.toastProps,r=e.staleId;setTimeout((function(){E(t,n,r)}),500)}function S(e,n){var i=n.delay,o=n.staleId,p=l(n,["delay","staleId"]);if(m(e)&&!function(e){var t=e.containerId,n=e.toastId,r=e.updateId;return!!(!a.current||y.props.enableMultiContainer&&t!==y.props.containerId||y.isToastActive(n)&&null==r)}(p)){var b=p.toastId,_=p.updateId,x=y.props,w=function(){return k(b)},A=!(0,y.isToastActive)(b);A&&s++;var T,S,C={toastId:b,updateId:_,key:p.key||y.toastKey++,type:p.type,closeToast:w,closeButton:p.closeButton,rtl:x.rtl,position:p.position||x.position,transition:p.transition||x.transition,className:f(p.className||x.toastClassName),bodyClassName:f(p.bodyClassName||x.bodyClassName),style:p.style||x.toastStyle,bodyStyle:p.bodyStyle||x.bodyStyle,onClick:p.onClick||x.onClick,pauseOnHover:u(p.pauseOnHover)?p.pauseOnHover:x.pauseOnHover,pauseOnFocusLoss:u(p.pauseOnFocusLoss)?p.pauseOnFocusLoss:x.pauseOnFocusLoss,draggable:u(p.draggable)?p.draggable:x.draggable,draggablePercent:c(p.draggablePercent)?p.draggablePercent:x.draggablePercent,closeOnClick:u(p.closeOnClick)?p.closeOnClick:x.closeOnClick,progressClassName:f(p.progressClassName||x.progressClassName),progressStyle:p.progressStyle||x.progressStyle,autoClose:(T=p.autoClose,S=x.autoClose,!1===T||c(T)&&T>0?T:S),hideProgressBar:u(p.hideProgressBar)?p.hideProgressBar:x.hideProgressBar,progress:p.progress,role:h(p.role)?p.role:x.role,deleteToast:function(){!function(e){delete v[e],t()}(b)}};d(p.onOpen)&&(C.onOpen=p.onOpen),d(p.onClose)&&(C.onClose=p.onClose);var M=x.closeButton;!1===p.closeButton||m(p.closeButton)?M=p.closeButton:!0===p.closeButton&&(M=!m(x.closeButton)||x.closeButton),C.closeButton=M;var O=e;(0,r.isValidElement)(e)&&!h(e.type)?O=(0,r.cloneElement)(e,{closeToast:w,toastProps:C}):d(e)&&(O=e({closeToast:w,toastProps:C})),x.limit&&x.limit>0&&s>x.limit&&A?g.push({toastContent:O,toastProps:C,staleId:o}):c(i)&&i>0?setTimeout((function(){E(O,C,o)}),i):E(O,C,o)}}function E(e,t,n){var r=t.toastId;v[r]={content:e,props:t},o({type:"ADD",toastId:r,staleId:n})}return(0,r.useEffect)((function(){return y.containerId=e.containerId,_.cancelEmit(3).on(0,S).on(1,(function(e){return a.current&&k(e)})).on(5,A).emit(2,y),function(){return _.emit(3,y)}}),[]),(0,r.useEffect)((function(){y.isToastActive=b,y.displayedToast=i.length,_.emit(4,i.length,e.containerId)}),[i]),(0,r.useEffect)((function(){y.props=e})),{getToastToRender:function(t){for(var n={},r=e.newestOnTop?Object.keys(v).reverse():Object.keys(v),i=0;i<r.length;i++){var o=v[r[i]],a=o.props.position;n[a]||(n[a]=[]),n[a].push(o)}return Object.keys(n).map((function(e){return t(e,n[e])}))},collection:v,containerRef:a,isToastActive:b}}(e),n=t.getToastToRender,i=t.containerRef,a=t.isToastActive,g=e.className,v=e.style,y=e.rtl,b=e.containerId;return(0,r.createElement)("div",{ref:i,className:"Toastify",id:b},n((function(e,t){var n,i,l={className:d(g)?g({position:e,rtl:y,defaultClassName:(0,o.Z)("Toastify__toast-container","Toastify__toast-container--"+e,(n={},n["Toastify__toast-container--rtl"]=y,n))}):(0,o.Z)("Toastify__toast-container","Toastify__toast-container--"+e,(i={},i["Toastify__toast-container--rtl"]=y,i),f(g)),style:0===t.length?s({},v,{pointerEvents:"none"}):s({},v)};return(0,r.createElement)(C,Object.assign({},l,{key:"container-"+e}),t.map((function(e){var t=e.content,n=e.props;return(0,r.createElement)(S,Object.assign({},n,{in:a(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?k:n.closeButton}),t)})))})))};M.defaultProps={position:v.TOP_RIGHT,transition:E,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:k,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,role:"alert"};var O,L,D,I=new Map,R=[],P=!1;function N(){return I.size>0}function z(){return(Math.random().toString(36)+Date.now().toString(36)).substr(2,10)}function F(e){return e&&(h(e.toastId)||c(e.toastId))?e.toastId:z()}function B(e,t){return N()?_.emit(0,e,t):(R.push({content:e,options:t}),P&&g&&(P=!1,L=document.createElement("div"),document.body.appendChild(L),(0,a.render)((0,r.createElement)(M,Object.assign({},D)),L))),t.toastId}function j(e,t){return s({},t,{type:t&&t.type||e,toastId:F(t)})}var U=function(e,t){return B(e,j(y.DEFAULT,t))};U.success=function(e,t){return B(e,j(y.SUCCESS,t))},U.info=function(e,t){return B(e,j(y.INFO,t))},U.error=function(e,t){return B(e,j(y.ERROR,t))},U.warning=function(e,t){return B(e,j(y.WARNING,t))},U.dark=function(e,t){return B(e,j(y.DARK,t))},U.warn=U.warning,U.dismiss=function(e){return N()&&_.emit(1,e)},U.clearWaitingQueue=function(e){return void 0===e&&(e={}),N()&&_.emit(5,e)},U.isActive=function(e){var t=!1;return I.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},U.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n,r=(n=t.containerId,N()?I.get(n||O):null);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=s({},r,t,{toastId:t.toastId||e,updateId:z()});o.toastId!==e&&(o.staleId=e);var a=void 0!==o.render?o.render:i;delete o.render,B(a,o)}}),0)},U.done=function(e){U.update(e,{progress:1})},U.onChange=function(e){return d(e)&&_.on(4,e),function(){d(e)&&_.off(4,e)}},U.configure=function(e){void 0===e&&(e={}),P=!0,D=e},U.POSITION=v,U.TYPE=y,_.on(2,(function(e){O=e.containerId||e,I.set(O,e),R.forEach((function(e){_.emit(0,e.content,e.options)})),R=[]})).on(3,(function(e){I.delete(e.containerId||e),0===I.size&&_.off(0).off(1).off(5),g&&L&&document.body.removeChild(L)}))},99602:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>m});var r=n(73289),i=n(48402),o=n(20362),a=n(37935),s=n(27759),l=n(19733),c="unmounted",u="exited",h="entering",d="entered",f="exiting",p=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=u,r.appearStatus=h):i=d:i=t.unmountOnExit||t.mountOnEnter?c:u,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===c?{status:u}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==d&&(t=h):n!==h&&n!==d||(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===h?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===u&&this.setState({status:c})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[a.findDOMNode(this),r],o=i[0],l=i[1],c=this.getTimeouts(),u=r?c.appear:c.enter;!e&&!n||s.Z.disabled?this.safeSetState({status:d},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,l),this.safeSetState({status:h},(function(){t.props.onEntering(o,l),t.onTransitionEnd(u,(function(){t.safeSetState({status:d},(function(){t.props.onEntered(o,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:a.findDOMNode(this);t&&!s.Z.disabled?(this.props.onExit(r),this.safeSetState({status:f},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:u},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:u},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===c)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(l.Z.Provider,{value:null},"function"==typeof n?n(e,i):o.cloneElement(o.Children.only(n),i))},t}(o.Component);function g(){}p.contextType=l.Z,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},p.UNMOUNTED=c,p.EXITED=u,p.ENTERING=h,p.ENTERED=d,p.EXITING=f;const m=p},19733:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(20362).createContext(null)},27759:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={disabled:!1}},16070:(e,t,n)=>{"use strict";n.d(t,{Z:()=>en});var r=n(20362),i=n(73715),o=n.n(i),a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),s=new Uint8Array(16);function l(){if(!a)throw new Error("crypto.getRandomValues() not supported. See path_to_url#getrandomvalues-not-supported");return a(s)}for(var c=[],u=0;u<256;++u)c[u]=(u+256).toString(16).substr(1);const h=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||l)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||function(e,t){var n=t||0,r=c;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}(i)};function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}var _="__react_tooltip_hide_event",x="__react_tooltip_rebuild_event",w="__react_tooltip_show_event",A=function(e,t){var n;"function"==typeof window.CustomEvent?n=new window.CustomEvent(e,{detail:t}):(n=document.createEvent("Event")).initEvent(e,!1,!0,t),window.dispatchEvent(n)},k=function(e,t){var n=this.state.show,r=this.props.id,i=this.isCapture(t.currentTarget),o=t.currentTarget.getAttribute("currentItem");i||t.stopPropagation(),n&&"true"===o?e||this.hideTooltip(t):(t.currentTarget.setAttribute("currentItem","true"),T(t.currentTarget,this.getTargetArray(r)),this.showTooltip(t))},T=function(e,t){for(var n=0;n<t.length;n++)e!==t[n]?t[n].setAttribute("currentItem","false"):t[n].setAttribute("currentItem","true")},S={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(e,t,n){this.id in e?e[this.id][t]=n:Object.defineProperty(e,this.id,{configurable:!0,value:p({},t,n)})},get:function(e,t){var n=e[this.id];if(void 0!==n)return n[t]}},E=function(e,t,n){var r=t.respectEffect,i=void 0!==r&&r,o=t.customEvent,a=void 0!==o&&o,s=this.props.id,l=n.target.getAttribute("data-tip")||null,c=n.target.getAttribute("data-for")||null,u=n.target;if(!this.isCustomEvent(u)||a){var h=null==s&&null==c||c===s;if(null!=l&&(!i||"float"===this.getEffect(u))&&h){var d=function(e){var t={};for(var n in e)"function"==typeof e[n]?t[n]=e[n].bind(e):t[n]=e[n];return t}(n);d.currentTarget=u,e(d)}}},C=function(e,t){var n={};return e.forEach((function(e){var r=e.getAttribute(t);r&&r.split(" ").forEach((function(e){return n[e]=!0}))})),n},M=function(){return document.getElementsByTagName("body")[0]};function O(e,t,n,r,i,o,a){for(var s=L(n),l=s.width,c=s.height,u=L(t),h=u.width,d=u.height,f=D(e,t,o),p=f.mouseX,g=f.mouseY,m=I(o,h,d,l,c),v=R(a),y=v.extraOffsetX,b=v.extraOffsetY,_=window.innerWidth,x=window.innerHeight,w=P(n),A=w.parentTop,k=w.parentLeft,T=function(e){var t=m[e].l;return p+t+y},S=function(e){var t=m[e].t;return g+t+b},E=function(e){return function(e){return T(e)<0}(e)||function(e){return function(e){var t=m[e].r;return p+t+y}(e)>_}(e)||function(e){return S(e)<0}(e)||function(e){return function(e){var t=m[e].b;return g+t+b}(e)>x}(e)},C=function(e){return!E(e)},M=["top","bottom","left","right"],O=[],N=0;N<4;N++){var z=M[N];C(z)&&O.push(z)}var F,B=!1,j=i!==r;return C(i)&&j?(B=!0,F=i):O.length>0&&E(i)&&E(r)&&(B=!0,F=O[0]),B?{isNewState:!0,newState:{place:F}}:{isNewState:!1,position:{left:parseInt(T(r)-k,10),top:parseInt(S(r)-A,10)}}}var L=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},D=function(e,t,n){var r=t.getBoundingClientRect(),i=r.top,o=r.left,a=L(t),s=a.width,l=a.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:o+s/2,mouseY:i+l/2}},I=function(e,t,n,r,i){var o,a,s,l;return"float"===e?(o={l:-r/2,r:r/2,t:-(i+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:i+3+2+12},l={l:-(r+3+2),r:-3,t:-i/2,b:i/2},a={l:3,r:r+3+2,t:-i/2,b:i/2}):"solid"===e&&(o={l:-r/2,r:r/2,t:-(n/2+i+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+i+2},l={l:-(r+t/2+2),r:-t/2,t:-i/2,b:i/2},a={l:t/2,r:r+t/2+2,t:-i/2,b:i/2}),{top:o,bottom:s,left:l,right:a}},R=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffsetX:t,extraOffsetY:n}},P=function(e){for(var t=e;t;){var n=window.getComputedStyle(t);if("none"!==n.getPropertyValue("transform")||"transform"===n.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function N(e,t,n,i){if(t)return t;if(null!=n)return n;if(null===n)return null;var o=/<br\s*\/?>/;return i&&"false"!==i&&o.test(e)?e.split(o).map((function(e,t){return r.createElement("span",{key:t,className:"multi-line"},e)})):e}function z(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}function F(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var B={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};var j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function U(e,t){return e(t={exports:{}},t.exports),t.exports}var V=function(e){return e&&e.Math==Math&&e},q=V("object"==typeof globalThis&&globalThis)||V("object"==typeof window&&window)||V("object"==typeof self&&self)||V("object"==typeof j&&j)||function(){return this}()||Function("return this")(),H=function(e){try{return!!e()}catch(e){return!0}},$=!H((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),W={}.propertyIsEnumerable,G=Object.getOwnPropertyDescriptor,Y={f:G&&!W.call({1:2},1)?function(e){var t=G(this,e);return!!t&&t.enumerable}:W},X=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Z={}.toString,K=function(e){return Z.call(e).slice(8,-1)},J="".split,Q=H((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==K(e)?J.call(e,""):Object(e)}:Object,ee=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},te=function(e){return Q(ee(e))},ne=function(e){return"object"==typeof e?null!==e:"function"==typeof e},re=function(e,t){if(!ne(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ne(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ne(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ne(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},ie=function(e){return Object(ee(e))},oe={}.hasOwnProperty,ae=function(e,t){return oe.call(ie(e),t)},se=q.document,le=ne(se)&&ne(se.createElement),ce=function(e){return le?se.createElement(e):{}},ue=!$&&!H((function(){return 7!=Object.defineProperty(ce("div"),"a",{get:function(){return 7}}).a})),he=Object.getOwnPropertyDescriptor,de={f:$?he:function(e,t){if(e=te(e),t=re(t,!0),ue)try{return he(e,t)}catch(e){}if(ae(e,t))return X(!Y.f.call(e,t),e[t])}},fe=function(e){if(!ne(e))throw TypeError(String(e)+" is not an object");return e},pe=Object.defineProperty,ge={f:$?pe:function(e,t,n){if(fe(e),t=re(t,!0),fe(n),ue)try{return pe(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},me=$?function(e,t,n){return ge.f(e,t,X(1,n))}:function(e,t,n){return e[t]=n,e},ve=function(e,t){try{me(q,e,t)}catch(n){q[e]=t}return t},ye="__core-js_shared__",be=q[ye]||ve(ye,{}),_e=Function.toString;"function"!=typeof be.inspectSource&&(be.inspectSource=function(e){return _e.call(e)});var xe,we,Ae,ke=be.inspectSource,Te=q.WeakMap,Se="function"==typeof Te&&/native code/.test(ke(Te)),Ee=U((function(e){(e.exports=function(e,t){return be[e]||(be[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:" 2021 Denis Pushkarev (zloirock.ru)"})})),Ce=0,Me=Math.random(),Oe=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ce+Me).toString(36)},Le=Ee("keys"),De=function(e){return Le[e]||(Le[e]=Oe(e))},Ie={},Re="Object already initialized",Pe=q.WeakMap;if(Se||be.state){var Ne=be.state||(be.state=new Pe),ze=Ne.get,Fe=Ne.has,Be=Ne.set;xe=function(e,t){if(Fe.call(Ne,e))throw new TypeError(Re);return t.facade=e,Be.call(Ne,e,t),t},we=function(e){return ze.call(Ne,e)||{}},Ae=function(e){return Fe.call(Ne,e)}}else{var je=De("state");Ie[je]=!0,xe=function(e,t){if(ae(e,je))throw new TypeError(Re);return t.facade=e,me(e,je,t),t},we=function(e){return ae(e,je)?e[je]:{}},Ae=function(e){return ae(e,je)}}var Ue,Ve,qe={set:xe,get:we,has:Ae,enforce:function(e){return Ae(e)?we(e):xe(e,{})},getterFor:function(e){return function(t){var n;if(!ne(t)||(n=we(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},He=U((function(e){var t=qe.get,n=qe.enforce,r=String(String).split("String");(e.exports=function(e,t,i,o){var a,s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||ae(i,"name")||me(i,"name",t),(a=n(i)).source||(a.source=r.join("string"==typeof t?t:""))),e!==q?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=i:me(e,t,i)):l?e[t]=i:ve(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||ke(this)}))})),$e=q,We=function(e){return"function"==typeof e?e:void 0},Ge=function(e,t){return arguments.length<2?We($e[e])||We(q[e]):$e[e]&&$e[e][t]||q[e]&&q[e][t]},Ye=Math.ceil,Xe=Math.floor,Ze=function(e){return isNaN(e=+e)?0:(e>0?Xe:Ye)(e)},Ke=Math.min,Je=function(e){return e>0?Ke(Ze(e),9007199254740991):0},Qe=Math.max,et=Math.min,tt=function(e){return function(t,n,r){var i,o=te(t),a=Je(o.length),s=function(e,t){var n=Ze(e);return n<0?Qe(n+t,0):et(n,t)}(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},nt=(tt(!0),tt(!1)),rt=function(e,t){var n,r=te(e),i=0,o=[];for(n in r)!ae(Ie,n)&&ae(r,n)&&o.push(n);for(;t.length>i;)ae(r,n=t[i++])&&(~nt(o,n)||o.push(n));return o},it=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ot=it.concat("length","prototype"),at={f:Object.getOwnPropertyNames||function(e){return rt(e,ot)}},st={f:Object.getOwnPropertySymbols},lt=Ge("Reflect","ownKeys")||function(e){var t=at.f(fe(e)),n=st.f;return n?t.concat(n(e)):t},ct=function(e,t){for(var n=lt(t),r=ge.f,i=de.f,o=0;o<n.length;o++){var a=n[o];ae(e,a)||r(e,a,i(t,a))}},ut=/#|\.prototype\./,ht=function(e,t){var n=ft[dt(e)];return n==gt||n!=pt&&("function"==typeof t?H(t):!!t)},dt=ht.normalize=function(e){return String(e).replace(ut,".").toLowerCase()},ft=ht.data={},pt=ht.NATIVE="N",gt=ht.POLYFILL="P",mt=ht,vt=de.f,yt=Array.isArray||function(e){return"Array"==K(e)},bt=Ge("navigator","userAgent")||"",_t=q.process,xt=_t&&_t.versions,wt=xt&&xt.v8;wt?Ve=(Ue=wt.split("."))[0]<4?1:Ue[0]+Ue[1]:bt&&(!(Ue=bt.match(/Edge\/(\d+)/))||Ue[1]>=74)&&(Ue=bt.match(/Chrome\/(\d+)/))&&(Ve=Ue[1]);var At,kt=Ve&&+Ve,Tt=!!Object.getOwnPropertySymbols&&!H((function(){return!String(Symbol())||!Symbol.sham&&kt&&kt<41})),St=Tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Et=Ee("wks"),Ct=q.Symbol,Mt=St?Ct:Ct&&Ct.withoutSetter||Oe,Ot=function(e){return ae(Et,e)&&(Tt||"string"==typeof Et[e])||(Tt&&ae(Ct,e)?Et[e]=Ct[e]:Et[e]=Mt("Symbol."+e)),Et[e]},Lt=Ot("species"),Dt=function(e,t){var n;return yt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!yt(n.prototype)?ne(n)&&null===(n=n[Lt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},It=[].push,Rt=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,c,u,h){for(var d,f,p=ie(l),g=Q(p),m=function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}(c,u,3),v=Je(g.length),y=0,b=h||Dt,_=t?b(l,v):n||a?b(l,0):void 0;v>y;y++)if((s||y in g)&&(f=m(d=g[y],y,p),e))if(t)_[y]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:It.call(_,d)}else switch(e){case 4:return!1;case 7:It.call(_,d)}return o?-1:r||i?i:_}},Pt={forEach:Rt(0),map:Rt(1),filter:Rt(2),some:Rt(3),every:Rt(4),find:Rt(5),findIndex:Rt(6),filterOut:Rt(7)},Nt=Object.keys||function(e){return rt(e,it)},zt=$?Object.defineProperties:function(e,t){fe(e);for(var n,r=Nt(t),i=r.length,o=0;i>o;)ge.f(e,n=r[o++],t[n]);return e},Ft=Ge("document","documentElement"),Bt=De("IE_PROTO"),jt=function(){},Ut=function(e){return"<script>"+e+"<\/script>"},Vt=function(){try{At=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Vt=At?function(e){e.write(Ut("")),e.close();var t=e.parentWindow.Object;return e=null,t}(At):((t=ce("iframe")).style.display="none",Ft.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ut("document.F=Object")),e.close(),e.F);for(var n=it.length;n--;)delete Vt.prototype[it[n]];return Vt()};Ie[Bt]=!0;var qt=Object.create||function(e,t){var n;return null!==e?(jt.prototype=fe(e),n=new jt,jt.prototype=null,n[Bt]=e):n=Vt(),void 0===t?n:zt(n,t)},Ht=Ot("unscopables"),$t=Array.prototype;null==$t[Ht]&&ge.f($t,Ht,{configurable:!0,value:qt(null)});var Wt,Gt,Yt,Xt=Pt.find,Zt="find",Kt=!0;Zt in[]&&Array(1).find((function(){Kt=!1})),function(e,t){var n,r,i,o,a,s=e.target,l=e.global,c=e.stat;if(n=l?q:c?q[s]||ve(s,{}):(q[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=vt(n,r))&&a.value:n[r],!mt(l?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;ct(o,i)}(e.sham||i&&i.sham)&&me(o,"sham",!0),He(n,r,o,e)}}({target:"Array",proto:!0,forced:Kt},{find:function(e){return Xt(this,e,arguments.length>1?arguments[1]:void 0)}}),$t[Ht].find=!0;var Jt,Qt=function(e){e.hide=function(e){A(_,{target:e})},e.rebuild=function(){A(x)},e.show=function(e){A(w,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.showTooltip({currentTarget:t&&e.detail.target},!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(Wt=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(_,this.globalHide),window.addEventListener(_,this.globalHide,!1),window.removeEventListener(x,this.globalRebuild),window.addEventListener(x,this.globalRebuild,!1),window.removeEventListener(w,this.globalShow),window.addEventListener(w,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(_,this.globalHide),window.removeEventListener(x,this.globalRebuild),window.removeEventListener(w,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(Wt=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,i=n.eventOff,o=e.getAttribute("data-event")||r,a=e.getAttribute("data-event-off")||i;o.split(" ").forEach((function(n){e.removeEventListener(n,S.get(e,n));var r=k.bind(t,a);S.set(e,n,r),e.addEventListener(n,r,!1)})),a&&a.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,i=n||e.getAttribute("data-event"),o=r||e.getAttribute("data-event-off");e.removeEventListener(i,S.get(e,n)),o&&e.removeEventListener(o,this.hideTooltip)}}(Wt=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(Wt=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(Wt=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,i=n.eventOff,o=n.possibleCustomEvents,a=n.possibleCustomEventsOff,s=M(),l=C(e,"data-event"),c=C(e,"data-event-off");null!=r&&(l[r]=!0),null!=i&&(c[i]=!0),o.split(" ").forEach((function(e){return l[e]=!0})),a.split(" ").forEach((function(e){return c[e]=!0})),this.unbindBodyListener(s);var u=this.bodyModeListeners={};for(var h in null==r&&(u.mouseover=E.bind(this,this.showTooltip,{}),u.mousemove=E.bind(this,this.updateTooltip,{respectEffect:!0}),u.mouseout=E.bind(this,this.hideTooltip,{})),l)u[h]=E.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||i;k.call(t,n,e)}),{customEvent:!0});for(var d in c)u[d]=E.bind(this,this.hideTooltip,{customEvent:!0});for(var f in u)s.addEventListener(f,u[f])},e.prototype.unbindBodyListener=function(e){e=e||M();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((Yt=Gt=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,y(t).call(this,e))).state={uuid:e.uuid||"t"+h(),place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,customColors:{},offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:z(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,e),f(t,null,[{key:"propTypes",get:function(){return{uuid:o().string,children:o().any,place:o().string,type:o().string,effect:o().string,offset:o().object,multiline:o().bool,border:o().bool,textColor:o().string,backgroundColor:o().string,borderColor:o().string,arrowColor:o().string,insecure:o().bool,class:o().string,className:o().string,id:o().string,html:o().bool,delayHide:o().number,delayUpdate:o().number,delayShow:o().number,event:o().string,eventOff:o().string,isCapture:o().bool,globalEventOff:o().string,getContent:o().any,afterShow:o().func,afterHide:o().func,overridePosition:o().func,disable:o().bool,scrollHide:o().bool,resizeHide:o().bool,wrapper:o().string,bodyMode:o().bool,possibleCustomEvents:o().string,possibleCustomEventsOff:o().string,clickable:o().bool}}}]),f(t,[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t),this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var e=this.tooltipRef;if(e){for(var t,n=e.parentNode;n.parentNode;)n=n.parentNode;switch(n.constructor.name){case"Document":case"HTMLDocument":case void 0:t=n.head;break;default:t=n}if(!t.querySelector("style[data-react-tooltip]")){var r=document.createElement("style");r.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',r.setAttribute("data-react-tooltip","true"),t.appendChild(r)}}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n=[];if(e){var r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t='[data-tip][data-for="'.concat(r,'"]')}else t="[data-tip]:not([data-for])";return F(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(F(e.shadowRoot.querySelectorAll(t)))})),n.concat(F(document.querySelectorAll(t)))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,i=t.isCapture,o=this.getTargetArray(n);o.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(o):o.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),t.addEventListener("focus",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n),t.addEventListener("blur",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,i)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),N(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(this.tooltipRef){if(t&&!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget})))return;var n=this.props,r=n.multiline,i=n.getContent,o=e.currentTarget.getAttribute("data-tip"),a=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,l=!0;e.currentTarget.getAttribute("data-scroll-hide")?l="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(l=this.props.scrollHide),e&&e.currentTarget&&e.currentTarget.setAttribute&&e.currentTarget.setAttribute("aria-describedby",this.state.uuid);var c=e.currentTarget.getAttribute("data-place")||this.props.place||"top",u=s?"solid":this.getEffect(e.currentTarget),h=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},d=O(e,e.currentTarget,this.tooltipRef,c,c,u,h);d.position&&this.props.overridePosition&&(d.position=this.props.overridePosition(d.position,e,e.currentTarget,this.tooltipRef,c,c,u,h));var f=d.isNewState?d.newState.place:c;this.clearTimer();var p=e.currentTarget,g=this.state.show?p.getAttribute("data-delay-update")||this.props.delayUpdate:0,m=this,v=function(){m.setState({originTooltip:o,isMultiline:a,desiredPlace:c,place:f,type:p.getAttribute("data-type")||m.props.type||"dark",customColors:{text:p.getAttribute("data-text-color")||m.props.textColor||null,background:p.getAttribute("data-background-color")||m.props.backgroundColor||null,border:p.getAttribute("data-border-color")||m.props.borderColor||null,arrow:p.getAttribute("data-arrow-color")||m.props.arrowColor||null},effect:u,offset:h,html:(p.getAttribute("data-html")?"true"===p.getAttribute("data-html"):m.props.html)||!1,delayShow:p.getAttribute("data-delay-show")||m.props.delayShow||0,delayHide:p.getAttribute("data-delay-hide")||m.props.delayHide||0,delayUpdate:p.getAttribute("data-delay-update")||m.props.delayUpdate||0,border:(p.getAttribute("data-border")?"true"===p.getAttribute("data-border"):m.props.border)||!1,extraClass:p.getAttribute("data-class")||m.props.class||m.props.className||"",disable:(p.getAttribute("data-tip-disable")?"true"===p.getAttribute("data-tip-disable"):m.props.disable)||!1,currentTarget:p},(function(){l&&m.addScrollListener(m.state.currentTarget),m.updateTooltip(e),i&&Array.isArray(i)&&(m.intervalUpdateContent=setInterval((function(){if(m.mount){var e=m.props.getContent,t=N(o,"",e[0](),a),n=m.isEmptyTip(t);m.setState({isEmptyTip:n}),m.updatePosition()}}),i[1]))}))};g?this.delayReshow=setTimeout(v,g):v()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,i=n.disable,o=this.props.afterShow,a=this.getTooltipContent(),s=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(a)&&!i){var l=this.state.show?0:parseInt(r,10),c=function(){if(Array.isArray(a)&&a.length>0||a){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:s,show:!0},(function(){t.updatePosition(),n&&o&&o(e)}))}};clearTimeout(this.delayShowLoop),l?this.delayShowLoop=setTimeout(c,l):c()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},i=this.state.disable,o=r.isScroll,a=o?0:this.state.delayHide,s=this.props.afterHide,l=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(l)&&!i){if(t){var c=this.getTargetArray(this.props.id),u=c.some((function(t){return t===e.currentTarget}));if(!u||!this.state.show)return}e&&e.currentTarget&&e.currentTarget.removeAttribute&&e.currentTarget.removeAttribute("aria-describedby");var h=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(n.state.currentTarget),t&&s&&s(e)})))};this.clearTimer(),a?this.delayHideLoop=setTimeout(h,parseInt(a,10)):h()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(e){var t=this.isCapture(e);window.removeEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,i=t.place,o=t.desiredPlace,a=t.effect,s=t.offset,l=this.tooltipRef,c=O(n,r,l,i,o,a,s);if(c.position&&this.props.overridePosition&&(c.position=this.props.overridePosition(c.position,n,r,l,i,o,a,s)),c.isNewState)return this.setState(c.newState,(function(){e.updatePosition()}));l.style.left=c.position.left+"px",l.style.top=c.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"hasCustomColors",value:function(){var e=this;return Boolean(Object.keys(this.state.customColors).find((function(t){return"border"!==t&&e.state.customColors[t]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var e=this,n=this.state,i=n.extraClass,o=n.html,a=n.ariaProps,s=n.disable,l=n.uuid,c=this.getTooltipContent(),u=this.isEmptyTip(c),h=function(e,t,n,r){return function(e,t){var n=t.text,r=t.background,i=t.border,o=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(n,";\n\t background: ").concat(r,";\n\t border: 1px solid ").concat(i,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(i,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(o,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(i,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(o,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(i,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(o,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(i,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(o,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,n){var r=e.text,i=e.background,o=e.border,a=e.arrow?e.arrow:e.background,s=function(e){return B[e]?v({},B[e]):void 0}(t);return r&&(s.text=r),i&&(s.background=i),n&&(s.border=o||("light"===t?"black":"white")),a&&(s.arrow=a),s}(t,n,r))}(this.state.uuid,this.state.customColors,this.state.type,this.state.border),d="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||s||u?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),f=this.props.wrapper;t.supportedWrappers.indexOf(f)<0&&(f=t.defaultProps.wrapper);var p=[d,i].filter(Boolean).join(" ");if(o){var m="".concat(c,'\n<style aria-hidden="true">').concat(h,"</style>");return r.createElement(f,g({className:"".concat(p),id:this.props.id||l,ref:function(t){return e.tooltipRef=t}},a,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:m}}))}return r.createElement(f,g({className:"".concat(p),id:this.props.id||l},a,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),r.createElement("style",{dangerouslySetInnerHTML:{__html:h},"aria-hidden":"true"}),c)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=z(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?v({},t,{ariaProps:r}):null}}]),t}(r.Component),p(Gt,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),p(Gt,"supportedWrappers",["div","span"]),p(Gt,"displayName","ReactTooltip"),(Jt=Wt=Yt).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.removedNodes.length;i++)if(r.removedNodes[i]===e.state.currentTarget)return void e.hideTooltip()}));n.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=n}},Wt=void(Jt.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||Wt))||Wt)||Wt)||Wt)||Wt)||Wt)||Wt;const en=Qt},97207:(e,t,n)=>{"use strict";var r=n(23764),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="path_to_url"+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function x(){}function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=_.prototype;var A=w.prototype=new x;A.constructor=w,r(A,_.prototype),A.isPureReactComponent=!0;var k={current:null},T=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!S.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var M=/\/+/g,O=[];function L(e,t,n,r){if(O.length){var i=O.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function I(e,t,n,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case o:case a:s=!0}}if(s)return n(r,e,""===t?"."+P(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=t+P(i=e[l],l);s+=I(i,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=m&&e[m]||e["@@iterator"])?c:null))for(e=c.call(e),l=0;!(i=e.next()).done;)s+=I(i=i.value,c=t+P(i,l++),n,r);else if("object"===i)throw n=""+e,Error(v(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function R(e,t,n){return null==e?0:I(e,"",t,n)}function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function N(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(M,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(M,"$&/")+"/"),R(e,z,t=L(t,o,r,i)),D(t)}var B={current:null};function j(){var e=B.current;if(null===e)throw Error(v(321));return e}var U={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,N,t=L(null,null,t,n)),D(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){if(!C(e))throw Error(v(143));return e}},t.Component=_,t.Fragment=s,t.Profiler=c,t.PureComponent=w,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)T.call(t,u)&&!S.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:g,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return j().useCallback(e,t)},t.useContext=function(e,t){return j().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return j().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return j().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return j().useLayoutEffect(e,t)},t.useMemo=function(e,t){return j().useMemo(e,t)},t.useReducer=function(e,t,n){return j().useReducer(e,t,n)},t.useRef=function(e){return j().useRef(e)},t.useState=function(e){return j().useState(e)},t.version="16.14.0"},20362:(e,t,n)=>{"use strict";e.exports=n(97207)},66250:(e,t,n)=>{"use strict";var r,i=n(83773),o=n(19997),a=n(43303);e.exports=function(e){var t=this.data();function n(e,n){t[e]?t[e].push(n):t[e]=[n]}!r&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(r=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),n("micromarkExtensions",i(e)),n("fromMarkdownExtensions",o),n("toMarkdownExtensions",a(e))}},97723:(e,t,n)=>{"use strict";e.exports=function(e){var t=this;this.Parser=function(n){return r(n,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var r=n(42101)},92873:e=>{"use strict";var t,n="";e.exports=function(e,r){if("string"!=typeof e)throw new TypeError("expected a string");if(1===r)return e;if(2===r)return e+e;var i=e.length*r;if(t!==e||void 0===t)t=e,n="";else if(n.length>=i)return n.substr(0,i);for(;i>n.length&&r>1;)1&r&&(n+=e),r>>=1,e+=e;return n=(n+=e).substr(0,i)}},70358:(e,t,n)=>{e.exports=n(29207)},29207:(e,t,n)=>{var r=n(10659);t.operation=function(e){var n=t.timeouts(e);return new r(n,{forever:e&&e.forever,unref:e&&e.unref})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort((function(e,t){return e-t})),r},t.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));return Math.min(r,t.maxTimeout)},t.wrap=function(e,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],e)"function"==typeof e[i]&&r.push(i);for(var o=0;o<r.length;o++){var a=r[o],s=e[a];e[a]=function(){var r=t.operation(n),i=Array.prototype.slice.call(arguments),o=i.pop();i.push((function(e){r.retry(e)||(e&&(arguments[0]=r.mainError()),o.apply(this,arguments))})),r.attempt((function(){s.apply(e,i)}))},e[a].options=n}}},10659:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._timeouts=e,this._options=t||{},this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;this._errors.push(e);var t=this._timeouts.shift();if(void 0===t){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift()}var n=this,r=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),this._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),t);return this._options.unref&&r.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],o=i.message,a=(e[o]||0)+1;e[o]=a,a>=n&&(t=i,n=a)}return t}},89670:(e,t,n)=>{!function(e){e.parser=function(e,t){return new i(e,t)},e.SAXParser=i,e.SAXStream=a,e.createStream=function(e,t){return new a(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(t,n){if(!(this instanceof i))return new i(t,n);var o=this;!function(e){for(var t=0,n=r.length;t<n;t++)e[r[t]]=""}(o),o.q=o.c="",o.bufferCheckPosition=e.MAX_BUFFER_LENGTH,o.opt=n||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!t,o.noscript=!(!t&&!o.opt.noscript),o.state=w.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(c)),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),k(o,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),i.prototype={end:function(){M(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return C(n,"Cannot write after close. Assign an onready handler.");if(null===t)return M(n);"object"==typeof t&&(t=t.toString());for(var i=0,o="";o=F(t,i++),n.c=o,o;)switch(n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++),n.state){case w.BEGIN:if(n.state=w.BEGIN_WHITESPACE,"\ufeff"===o)continue;z(n,o);continue;case w.BEGIN_WHITESPACE:z(n,o);continue;case w.TEXT:if(n.sawRoot&&!n.closedRoot){for(var a=i-1;o&&"<"!==o&&"&"!==o;)(o=F(t,i++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.textNode+=t.substring(a,i-1)}"<"!==o||n.sawRoot&&n.closedRoot&&!n.strict?(p(o)||n.sawRoot&&!n.closedRoot||O(n,"Text data outside of root node."),"&"===o?n.state=w.TEXT_ENTITY:n.textNode+=o):(n.state=w.OPEN_WAKA,n.startTagPosition=n.position);continue;case w.SCRIPT:"<"===o?n.state=w.SCRIPT_ENDING:n.script+=o;continue;case w.SCRIPT_ENDING:"/"===o?n.state=w.CLOSE_TAG:(n.script+="<"+o,n.state=w.SCRIPT);continue;case w.OPEN_WAKA:if("!"===o)n.state=w.SGML_DECL,n.sgmlDecl="";else if(p(o));else if(v(u,o))n.state=w.OPEN_TAG,n.tagName=o;else if("/"===o)n.state=w.CLOSE_TAG,n.tagName="";else if("?"===o)n.state=w.PROC_INST,n.procInstName=n.procInstBody="";else{if(O(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;o=new Array(s).join(" ")+o}n.textNode+="<"+o,n.state=w.TEXT}continue;case w.SGML_DECL:"[CDATA["===(n.sgmlDecl+o).toUpperCase()?(T(n,"onopencdata"),n.state=w.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+o==="--"?(n.state=w.COMMENT,n.comment="",n.sgmlDecl=""):"DOCTYPE"===(n.sgmlDecl+o).toUpperCase()?(n.state=w.DOCTYPE,(n.doctype||n.sawRoot)&&O(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===o?(T(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=w.TEXT):g(o)?(n.state=w.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case w.SGML_DECL_QUOTED:o===n.q&&(n.state=w.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case w.DOCTYPE:">"===o?(n.state=w.TEXT,T(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=w.DOCTYPE_DTD:g(o)&&(n.state=w.DOCTYPE_QUOTED,n.q=o));continue;case w.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:n.doctype+=o,"]"===o?n.state=w.DOCTYPE:g(o)&&(n.state=w.DOCTYPE_DTD_QUOTED,n.q=o);continue;case w.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=w.DOCTYPE_DTD,n.q="");continue;case w.COMMENT:"-"===o?n.state=w.COMMENT_ENDING:n.comment+=o;continue;case w.COMMENT_ENDING:"-"===o?(n.state=w.COMMENT_ENDED,n.comment=E(n.opt,n.comment),n.comment&&T(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=w.COMMENT);continue;case w.COMMENT_ENDED:">"!==o?(O(n,"Malformed comment"),n.comment+="--"+o,n.state=w.COMMENT):n.state=w.TEXT;continue;case w.CDATA:"]"===o?n.state=w.CDATA_ENDING:n.cdata+=o;continue;case w.CDATA_ENDING:"]"===o?n.state=w.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=w.CDATA);continue;case w.CDATA_ENDING_2:">"===o?(n.cdata&&T(n,"oncdata",n.cdata),T(n,"onclosecdata"),n.cdata="",n.state=w.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=w.CDATA);continue;case w.PROC_INST:"?"===o?n.state=w.PROC_INST_ENDING:p(o)?n.state=w.PROC_INST_BODY:n.procInstName+=o;continue;case w.PROC_INST_BODY:if(!n.procInstBody&&p(o))continue;"?"===o?n.state=w.PROC_INST_ENDING:n.procInstBody+=o;continue;case w.PROC_INST_ENDING:">"===o?(T(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=w.TEXT):(n.procInstBody+="?"+o,n.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:v(h,o)?n.tagName+=o:(L(n),">"===o?R(n):"/"===o?n.state=w.OPEN_TAG_SLASH:(p(o)||O(n,"Invalid character in tag name"),n.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:">"===o?(R(n,!0),P(n)):(O(n,"Forward-slash in opening tag not followed by >"),n.state=w.ATTRIB);continue;case w.ATTRIB:if(p(o))continue;">"===o?R(n):"/"===o?n.state=w.OPEN_TAG_SLASH:v(u,o)?(n.attribName=o,n.attribValue="",n.state=w.ATTRIB_NAME):O(n,"Invalid attribute name");continue;case w.ATTRIB_NAME:"="===o?n.state=w.ATTRIB_VALUE:">"===o?(O(n,"Attribute without value"),n.attribValue=n.attribName,I(n),R(n)):p(o)?n.state=w.ATTRIB_NAME_SAW_WHITE:v(h,o)?n.attribName+=o:O(n,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=w.ATTRIB_VALUE;else{if(p(o))continue;O(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",T(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?R(n):v(u,o)?(n.attribName=o,n.state=w.ATTRIB_NAME):(O(n,"Invalid attribute name"),n.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(p(o))continue;g(o)?(n.q=o,n.state=w.ATTRIB_VALUE_QUOTED):(O(n,"Unquoted attribute value"),n.state=w.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case w.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=w.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}I(n),n.q="",n.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:p(o)?n.state=w.ATTRIB:">"===o?R(n):"/"===o?n.state=w.OPEN_TAG_SLASH:v(u,o)?(O(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=w.ATTRIB_NAME):O(n,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!m(o)){"&"===o?n.state=w.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}I(n),">"===o?R(n):n.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(n.tagName)">"===o?P(n):v(h,o)?n.tagName+=o:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=w.SCRIPT):(p(o)||O(n,"Invalid tagname in closing tag"),n.state=w.CLOSE_TAG_SAW_WHITE);else{if(p(o))continue;y(u,o)?n.script?(n.script+="</"+o,n.state=w.SCRIPT):O(n,"Invalid tagname in closing tag."):n.tagName=o}continue;case w.CLOSE_TAG_SAW_WHITE:if(p(o))continue;">"===o?P(n):O(n,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var l,c;switch(n.state){case w.TEXT_ENTITY:l=w.TEXT,c="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:l=w.ATTRIB_VALUE_QUOTED,c="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:l=w.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===o?(n[c]+=N(n),n.entity="",n.state=l):v(n.entity.length?f:d,o)?n.entity+=o:(O(n,"Invalid character in entity name"),n[c]+="&"+n.entity+o,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),i=0,o=0,a=r.length;o<a;o++){var s=t[r[o]].length;if(s>n)switch(r[o]){case"textNode":S(t);break;case"cdata":T(t,"oncdata",t.cdata),t.cdata="";break;case"script":T(t,"onscript",t.script),t.script="";break;default:C(t,"Max buffer length exceeded: "+r[o])}i=Math.max(i,s)}var l=e.MAX_BUFFER_LENGTH-i;t.bufferCheckPosition=l+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;S(e=this),""!==e.cdata&&(T(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(T(e,"onscript",e.script),e.script="")}};try{t=n(12855).Stream}catch(e){t=function(){}}var o=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function a(e,n){if(!(this instanceof a))return new a(e,n);t.apply(this),this._parser=new i(e,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,o.forEach((function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t,t;r.on(e,t)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(t.prototype,{constructor:{value:a}}),a.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=n(12210).s;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},a.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},a.prototype.on=function(e,n){var r=this;return r._parser["on"+e]||-1===o.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),t.prototype.on.call(r,e,n)};var s="path_to_url",l="path_to_url",c={xml:s,xmlns:l},u=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function p(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function g(e){return'"'===e||"'"===e}function m(e){return">"===e||p(e)}function v(e,t){return e.test(t)}function y(e,t){return!v(e,t)}var b,_,x,w=0;for(var A in e.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[A]]=A;function k(e,t,n){e[t]&&e[t](n)}function T(e,t,n){e.textNode&&S(e),k(e,t,n)}function S(e){e.textNode=E(e.opt,e.textNode),e.textNode&&k(e,"ontext",e.textNode),e.textNode=""}function E(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function C(e,t){return S(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,k(e,"onerror",t),e}function M(e){return e.sawRoot&&!e.closedRoot&&O(e,"Unclosed root tag"),e.state!==w.BEGIN&&e.state!==w.BEGIN_WHITESPACE&&e.state!==w.TEXT&&C(e,"Unexpected end"),S(e),e.c="",e.closed=!0,k(e,"onend"),i.call(e,e.strict,e.opt),e}function O(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&C(e,t)}function L(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,T(e,"onopentagstart",n)}function D(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function I(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=D(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==s)O(e,"xml: prefix must be bound to "+s+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==l)O(e,"xmlns: prefix must be bound to "+l+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,T(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function R(e,t){if(e.opt.xmlns){var n=e.tag,r=D(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(O(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){T(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var o=0,a=e.attribList.length;o<a;o++){var s=e.attribList[o],l=s[0],c=s[1],u=D(l,!0),h=u.prefix,d=u.local,f=""===h?"":n.ns[h]||"",p={name:l,value:c,prefix:h,local:d,uri:f};h&&"xmlns"!==h&&!f&&(O(e,"Unbound namespace prefix: "+JSON.stringify(h)),p.uri=h),e.tag.attributes[l]=p,T(e,"onattribute",p)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),T(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=w.TEXT:e.state=w.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function P(e){if(!e.tagName)return O(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=w.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=w.SCRIPT);T(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)O(e,"Unexpected close tag");if(t<0)return O(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=w.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,T(e,"onclosetag",e.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var l=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==l.ns&&Object.keys(o.ns).forEach((function(t){var n=o.ns[t];T(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=w.TEXT}function N(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==n?(O(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function z(e,t){"<"===t?(e.state=w.OPEN_WAKA,e.startTagPosition=e.position):p(t)||(O(e,"Non-whitespace before first tag."),e.textNode=t,e.state=w.TEXT)}function F(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}w=e.STATE,String.fromCodePoint||(b=String.fromCharCode,_=Math.floor,x=function(){var e,t,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var a="";++i<o;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||_(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(i+1===o||r.length>n)&&(a+=b.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x)}(t)},76731:(e,t)=>{"use strict";var n,r,i,o,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,l=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var h=window.performance,d=window.Date,f=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. path_to_url"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. path_to_url")}if("object"==typeof h&&"function"==typeof h.now)t.unstable_now=function(){return h.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var v=!1,y=null,b=-1,_=5,x=0;o=function(){return t.unstable_now()>=x},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):_=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,A=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();x=e+_;try{y(!0,e)?A.postMessage(null):(v=!1,y=null)}catch(e){throw A.postMessage(null),e}}else v=!1},n=function(e){y=e,v||(v=!0,A.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},i=function(){p(b),b=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<E(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>E(a,n))void 0!==l&&0>E(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>E(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],M=[],O=1,L=null,D=3,I=!1,R=!1,P=!1;function N(e){for(var t=T(M);null!==t;){if(null===t.callback)S(M);else{if(!(t.startTime<=e))break;S(M),t.sortIndex=t.expirationTime,k(C,t)}t=T(M)}}function z(e){if(P=!1,N(e),!R)if(null!==T(C))R=!0,n(F);else{var t=T(M);null!==t&&r(z,t.startTime-e)}}function F(e,n){R=!1,P&&(P=!1,i()),I=!0;var a=D;try{for(N(n),L=T(C);null!==L&&(!(L.expirationTime>n)||e&&!o());){var s=L.callback;if(null!==s){L.callback=null,D=L.priorityLevel;var l=s(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?L.callback=l:L===T(C)&&S(C),N(n)}else S(C);L=T(C)}if(null!==L)var c=!0;else{var u=T(M);null!==u&&r(z,u.startTime-n),c=!1}return c}finally{L=null,D=a,I=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var j=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||I||(R=!0,n(F))},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_getFirstCallbackNode=function(){return T(C)},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var l=a.delay;l="number"==typeof l&&0<l?s+l:s,a="number"==typeof a.timeout?a.timeout:B(e)}else a=B(e),l=s;return e={id:O++,callback:o,priorityLevel:e,startTime:l,expirationTime:a=l+a,sortIndex:-1},l>s?(e.sortIndex=l,k(M,e),null===T(C)&&e===T(M)&&(P?i():P=!0,r(z,l-s))):(e.sortIndex=a,k(C,e),R||I||(R=!0,n(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=T(C);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<L.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}}},72884:(e,t,n)=>{"use strict";e.exports=n(76731)},48456:(e,t,n)=>{var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,l,c,u,h,d,f=1,p=e.length,g="";for(r=0;r<p;r++)if("string"==typeof e[r])g+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[f],a=0;a<s.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?t[s.param_no]:t[f++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(s.type)&&(h=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=n:(!i.number.test(s.type)||h&&!s.sign?d="":(d=h?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(d+n).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?d+n+l:"0"===c?d+l+n:l+d+n)}return g}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return l[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},12855:(e,t,n)=>{e.exports=i;var r=n(4889).EventEmitter;function i(){r.call(this)}n(12920)(i,r),i.Readable=n(94012),i.Writable=n(76408),i.Duplex=n(34381),i.Transform=n(29374),i.PassThrough=n(12308),i.finished=n(61197),i.pipeline=n(89263),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},72499:e=>{"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,s,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var c=("number"!=typeof l&&(l=0),l+".".length>(s=e).length||-1===s.indexOf(".",l)?"argument":"property");a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},34381:(e,t,n)=>{"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(94012),o=n(76408);n(12920)(c,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var l=a[s];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||process.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},12308:(e,t,n)=>{"use strict";e.exports=i;var r=n(29374);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(12920)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},94012:(e,t,n)=>{"use strict";var r;e.exports=k,k.ReadableState=A,n(4889).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},a=n(20493),s=n(89977).Buffer,l=n.g.Uint8Array||function(){},c=n(40964);i=c&&c.debuglog?c.debuglog("stream"):function(){};var u,h,d,f=n(50963),p=n(95589),g=n(57570).getHighWaterMark,m=n(72499).q,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(12920)(k,a);var x=p.errorOrDestroy,w=["error","close","destroy","pause","resume"];function A(e,t,i){r=r||n(34381),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=n(12210).s),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function k(e){if(r=r||n(34381),!(this instanceof k))return new k(e);var t=this instanceof r;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function T(e,t,n,r,o){i("readableAddChunk",t);var a,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,c);else if(o||(a=function(e,t){var n,r;return r=t,s.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t)),n}(c,t)),a)x(e,a);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)c.endEmitted?x(e,new _):S(e,c,t,!0);else if(c.ended)x(e,new y);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!n?(t=c.decoder.write(t),c.objectMode||0!==t.length?S(e,c,t,!1):L(e,c)):S(e,c,t,!1)}else r||(c.reading=!1,L(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function S(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&M(e)),L(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=p.destroy,k.prototype._undestroy=p.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),T(this,e,t,!1,n)},k.prototype.unshift=function(e){return T(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){u||(u=n(12210).s);var t=new u(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var E=1073741824;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function L(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){i("readable nexttick read 0"),e.read(0)}function P(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function j(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}k.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):M(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(n,t))),null===(r=e>0?z(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){x(this,new b("_read()"))},k.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?p:s;function s(){i("onend"),e.end()}r.endEmitted?process.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,a){i("onunpipe"),o===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",p),n.removeListener("data",u),c=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",l);var c=!1;function u(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==j(r.pipes,e))&&!c&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){i("onerror",t),p(),e.removeListener("error",h),0===o(e,"error")&&x(e,t)}function d(){e.removeListener("finish",f),p()}function f(){i("onfinish"),e.removeListener("close",d),p()}function p(){i("unpipe"),n.unpipe(e)}return n.on("data",u),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(n):e._events.error=[n,e._events.error]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",f),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=j(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},k.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?M(this):r.reading||process.nextTick(R,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(I,this),n},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(I,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(P,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<w.length;a++)e.on(w[a],this.emit.bind(this,w[a]));return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=n(78992)),h(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=z,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===d&&(d=n(91356)),d(k,e,t)})},29374:(e,t,n)=>{"use strict";e.exports=u;var r=n(72499).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(34381);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,n){d(e,t,n)}))}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}n(12920)(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new i("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},76408:(e,t,n)=>{"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=k,k.WritableState=A;var o,a={deprecate:n(98715)},s=n(20493),l=n(89977).Buffer,c=n.g.Uint8Array||function(){},u=n(95589),h=n(57570).getHighWaterMark,d=n(72499).q,f=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,b=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;function w(){}function A(e,t,o){i=i||n(34381),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,x(e,r)):(i(r),e._writableState.errorEmitted=!0,x(e,r),O(e,t))}(e,n,r,t,i);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?process.nextTick(S,e,n,o,i):S(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function k(e){var t=this instanceof(i=i||n(34381));if(!t&&!o.call(k,this))return new k(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function T(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)o[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;o.allBuffers=l,T(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,h=n.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final((function(n){t.pendingcb--,n&&x(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(12920)(k,s),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===k&&e&&e._writableState instanceof A}})):o=function(e){return e instanceof this},k.prototype.pipe=function(){x(this,new m)},k.prototype.write=function(e,t,n){var r,i=this._writableState,o=!1,a=!i.objectMode&&(r=e,l.isBuffer(r)||r instanceof c);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=w),i.ending?function(e,t){var n=new b;x(e,n),process.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i;return null===n?i=new y:"string"==typeof n||t.objectMode||(i=new f("chunk",["string","Buffer"],n)),!i||(x(e,i),process.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,s,r,i,o);return c}(this,i,a,e,t,n)),o},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=u.destroy,k.prototype._undestroy=u.undestroy,k.prototype._destroy=function(e,t){t(e)}},78992:(e,t,n)=>{"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(61197),a=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var n=e[d].read();null!==n&&(e[u]=null,e[a]=null,e[s]=null,t(f(n,!1)))}}function g(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[l]?n(e[l]):t(f(void 0,!0))}))}));var n,r=this[u];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[c]?n(f(void 0,!0)):t[h](n,r)}),r)}}(r,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(f(i,!1));n=new Promise(this[h])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),m);e.exports=function(e){var t,n=Object.create(v,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var r=n[d].read();r?(n[u]=null,n[a]=null,n[s]=null,e(f(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[u]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[u]=null,n[a]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[a];null!==r&&(n[u]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[c]=!0})),e.on("readable",g.bind(null,n)),n}},50963:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=n(89977).Buffer,s=n(69862).inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],n&&o(t.prototype,n),e}()},95589:e=>{"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(n,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(n,o),i(e)):process.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},61197:(e,t,n)=>{"use strict";var r=n(72499).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,a||o.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,h=!0,s||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return a&&!h?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},g=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",p),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",d),t.on("finish",u),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},91356:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},89263:(e,t,n)=>{"use strict";var r,i=n(72499).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(61197)),r(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,n){var o=n<t.length-1;return l(e,o,n>0,(function(e){r||(r=e),e&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return t.reduce(u)}},57570:(e,t,n)=>{"use strict";var r=n(72499).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},20493:(e,t,n)=>{e.exports=n(4889).EventEmitter},12210:(e,t,n)=>{"use strict";var r=n(63523).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,""}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},63523:(e,t,n)=>{var r=n(89977),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},8866:(e,t,n)=>{var r,i,o;o=function(){function e(e,t,n){var r,i=t.day[1];do{r=new Date(Date.UTC(n,t.month,Math.abs(i++)))}while(t.day[0]<7&&r.getUTCDay()!=t.day[0]);return(r={clock:t.clock,sort:r.getTime(),rule:t,save:6e4*t.save,offset:e.offset})[r.clock]=r.sort+6e4*t.time,r.posix?r.wallclock=r[r.clock]+(e.offset+t.saved):r.posix=r[r.clock]-(e.offset+t.saved),r}function t(t,n,r){var i,o,a,s,l,c,u,h=t[t.zone],d=[],f=new Date(r).getUTCFullYear(),p=1;for(i=1,o=h.length;i<o&&!(h[i][n]<=r);i++);if((a=h[i]).rules){for(c=t[a.rules],u=f+1;u>=f-p;--u)for(i=0,o=c.length;i<o;i++)c[i].from<=u&&u<=c[i].to?d.push(e(a,c[i],u)):c[i].to<u&&1==p&&(p=u-c[i].to);for(d.sort((function(e,t){return e.sort-t.sort})),i=0,o=d.length;i<o;i++)r>=d[i][n]&&d[i][d[i].clock]>a[d[i].clock]&&(s=d[i])}return s&&((l=/^(.*)\/(.*)$/.exec(a.format))?s.abbrev=l[s.save?2:1]:s.abbrev=a.format.replace(/%s/,s.rule.letter)),s||a}function n(e,n){return"UTC"==e.zone?n:(e.entry=t(e,"posix",n),n+e.entry.offset+e.entry.save)}function r(e,n){return"UTC"==e.zone?n:(e.entry=r=t(e,"wallclock",n),0<(i=n-r.wallclock)&&i<r.save?null:n-r.offset-r.save);var r,i}function i(e,t,i){var o,s=+(i[1]+1),c=i[2]*s,u=a.indexOf(i[3].toLowerCase());if(u>9)t+=c*l[u-10];else{if(o=new Date(n(e,t)),u<7)for(;c;)o.setUTCDate(o.getUTCDate()+s),o.getUTCDay()==u&&(c-=s);else 7==u?o.setUTCFullYear(o.getUTCFullYear()+c):8==u?o.setUTCMonth(o.getUTCMonth()+c):o.setUTCDate(o.getUTCDate()+c);null==(t=r(e,o.getTime()))&&(t=r(e,o.getTime()+864e5*s)-864e5*s)}return t}var o={clock:function(){return+new Date},zone:"UTC",entry:{abbrev:"UTC",offset:0,save:0},UTC:1,z:function(e,t,n,r){var i,o,a=this.entry.offset+this.entry.save,s=Math.abs(a/1e3),l=[],c=3600;for(i=0;i<3;i++)l.push(("0"+Math.floor(s/c)).slice(-2)),s%=c,c/=60;return"^"!=n||a?("^"==n&&(r=3),3==r?(o=(o=l.join(":")).replace(/:00$/,""),"^"!=n&&(o=o.replace(/:00$/,""))):r?(o=l.slice(0,r+1).join(":"),"^"==n&&(o=o.replace(/:00$/,""))):o=l.slice(0,2).join(""),o=(o=(a<0?"-":"+")+o).replace(/([-+])(0)/,{_:" $1","-":"$1"}[n]||"$1$2")):"Z"},"%":function(e){return"%"},n:function(e){return"\n"},t:function(e){return"\t"},U:function(e){return c(e,0)},W:function(e){return c(e,1)},V:function(e){return u(e)[0]},G:function(e){return u(e)[1]},g:function(e){return u(e)[1]%100},j:function(e){return Math.floor((e.getTime()-Date.UTC(e.getUTCFullYear(),0))/864e5)+1},s:function(e){return Math.floor(e.getTime()/1e3)},C:function(e){return Math.floor(e.getUTCFullYear()/100)},N:function(e){return e.getTime()%1e3*1e6},m:function(e){return e.getUTCMonth()+1},Y:function(e){return e.getUTCFullYear()},y:function(e){return e.getUTCFullYear()%100},H:function(e){return e.getUTCHours()},M:function(e){return e.getUTCMinutes()},S:function(e){return e.getUTCSeconds()},e:function(e){return e.getUTCDate()},d:function(e){return e.getUTCDate()},u:function(e){return e.getUTCDay()||7},w:function(e){return e.getUTCDay()},l:function(e){return e.getUTCHours()%12||12},I:function(e){return e.getUTCHours()%12||12},k:function(e){return e.getUTCHours()},Z:function(e){return this.entry.abbrev},a:function(e){return this[this.locale].day.abbrev[e.getUTCDay()]},A:function(e){return this[this.locale].day.full[e.getUTCDay()]},h:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},b:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},B:function(e){return this[this.locale].month.full[e.getUTCMonth()]},P:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)].toLowerCase()},p:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)]},R:function(e,t){return this.convert([t,"%H:%M"])},T:function(e,t){return this.convert([t,"%H:%M:%S"])},D:function(e,t){return this.convert([t,"%m/%d/%y"])},F:function(e,t){return this.convert([t,"%Y-%m-%d"])},x:function(e,t){return this.convert([t,this[this.locale].date])},r:function(e,t){return this.convert([t,this[this.locale].time12||"%I:%M:%S"])},X:function(e,t){return this.convert([t,this[this.locale].time24])},c:function(e,t){return this.convert([t,this[this.locale].dateTime])},convert:function(e){if(!e.length)return"1.0.23";var t,o,a,l,c,u=Object.create(this),h=[];for(t=0;t<e.length;t++)if(l=e[t],Array.isArray(l))t||isNaN(l[1])?l.splice.apply(e,[t--,1].concat(l)):c=l;else if(isNaN(l)){if("string"==(a=typeof l))~l.indexOf("%")?u.format=l:t||"*"!=l?!t&&(a=/^(\d{4})-(\d{2})-(\d{2})(?:[T\s](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|(([+-])(\d{2}(:\d{2}){0,2})))?)?$/.exec(l))?((c=[]).push.apply(c,a.slice(1,8)),a[9]?(c.push(a[10]+1),c.push.apply(c,a[11].split(/:/))):a[8]&&c.push(1)):/^\w{2,3}_\w{2}$/.test(l)?u.locale=l:(a=s.exec(l))?h.push(a):u.zone=l:c=l;else if("function"==a){if(a=l.call(u))return a}else if(/^\w{2,3}_\w{2}$/.test(l.name))u[l.name]=l;else if(l.zones){for(a in l.zones)u[a]=l.zones[a];for(a in l.rules)u[a]=l.rules[a]}}else t||(c=l);if(u[u.locale]||delete u.locale,u[u.zone]||delete u.zone,null!=c){if("*"==c)c=u.clock();else if(Array.isArray(c)){for(a=[],o=!c[7],t=0;t<11;t++)a[t]=+(c[t]||0);--a[1],c=Date.UTC.apply(Date.UTC,a)+-a[7]*(36e5*a[8]+6e4*a[9]+1e3*a[10])}else c=Math.floor(c);if(!isNaN(c)){if(o&&(c=r(u,c)),null==c)return c;for(t=0,o=h.length;t<o;t++)c=i(u,c,h[t]);return u.format?(a=new Date(n(u,c)),u.format.replace(/%([-0_^]?)(:{0,3})(\d*)(.)/g,(function(e,t,n,r,i){var o,s,l="0";if(o=u[i]){for(e=String(o.call(u,a,c,t,n.length)),"_"==(t||o.style)&&(l=" "),s="-"==t?0:o.pad||0;e.length<s;)e=l+e;for(s="-"==t?0:r||o.pad;e.length<s;)e=l+e;"N"==i&&s<e.length&&(e=e.slice(0,s)),"^"==t&&(e=e.toUpperCase())}return e}))):c}}return function(){return u.convert(arguments)}},locale:"en_US",en_US:{date:"%m/%d/%Y",time24:"%I:%M:%S %p",time12:"%I:%M:%S %p",dateTime:"%a %d %b %Y %I:%M:%S %p %Z",meridiem:["AM","PM"],month:{abbrev:"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec".split("|"),full:"January|February|March|April|May|June|July|August|September|October|November|December".split("|")},day:{abbrev:"Sun|Mon|Tue|Wed|Thu|Fri|Sat".split("|"),full:"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday".split("|")}}},a="Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond",s=new RegExp("^\\s*([+-])(\\d+)\\s+("+a+")s?\\s*$","i"),l=[36e5,6e4,1e3,1];function c(e,t){var n,r,i;return r=new Date(Date.UTC(e.getUTCFullYear(),0)),n=Math.floor((e.getTime()-r.getTime())/864e5),r.getUTCDay()==t?i=0:8==(i=7-r.getUTCDay()+t)&&(i=1),n>=i?Math.floor((n-i)/7)+1:0}function u(e){var t,n,r;return n=e.getUTCFullYear(),t=new Date(Date.UTC(n,0)).getUTCDay(),(r=c(e,1)+(t>1&&t<=4?1:0))?53!=r||4==t||3==t&&29==new Date(n,1,29).getDate()?[r,e.getUTCFullYear()]:[1,e.getUTCFullYear()+1]:(n=e.getUTCFullYear()-1,[r=4==(t=new Date(Date.UTC(n,0)).getUTCDay())||3==t&&29==new Date(n,1,29).getDate()?53:52,e.getUTCFullYear()-1])}return a=a.toLowerCase().split("|"),"delmHMSUWVgCIky".replace(/./g,(function(e){o[e].pad=2})),o.N.pad=9,o.j.pad=3,o.k.style="_",o.l.style="_",o.e.style="_",function(){return o.convert(arguments)}},e.exports?e.exports=o():void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)},91332:(e,t,n)=>{"use strict";var r=n(28175);e.exports=o,o.wrap=r;var i=[].slice;function o(){var e=[],t={run:function(){var t=-1,n=i.call(arguments,0,-1),o=arguments[arguments.length-1];if("function"!=typeof o)throw new Error("Expected function as last argument, not "+o);function a(s){var l=e[++t],c=i.call(arguments,0),u=c.slice(1),h=n.length,d=-1;if(s)o(s);else{for(;++d<h;)null!==u[d]&&void 0!==u[d]||(u[d]=n[d]);n=u,l?r(l,a).apply(null,n):o.apply(null,[null].concat(n))}}a.apply(null,[null].concat(n))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}},28175:e=>{"use strict";var t=[].slice;e.exports=function(e,n){var r;return function(){var n,a=t.call(arguments,0),s=e.length>a.length;s&&a.push(i);try{n=e.apply(null,a)}catch(e){if(s&&r)throw e;return i(e)}s||(n&&"function"==typeof n.then?n.then(o,i):n instanceof Error?i(n):o(n))};function i(){r||(r=!0,n.apply(null,arguments))}function o(e){i(null,e)}}},28001:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__extends:()=>i,__assign:()=>o,__rest:()=>a,__decorate:()=>s,__param:()=>l,__metadata:()=>c,__awaiter:()=>u,__generator:()=>h,__createBinding:()=>d,__exportStar:()=>f,__values:()=>p,__read:()=>g,__spread:()=>m,__spreadArrays:()=>v,__spreadArray:()=>y,__await:()=>b,__asyncGenerator:()=>_,__asyncDelegator:()=>x,__asyncValues:()=>w,__makeTemplateObject:()=>A,__importStar:()=>T,__importDefault:()=>S,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>C});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var d=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function f(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||d(t,e,n)}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function y(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&d(t,e,n);return k(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function E(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function C(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}},18686:(e,t,n)=>{"use strict";var r,i=n(93682),o=i.template;function a(e,t,n){return o(e,t,n)}a._=i,e.exports=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)},93682:e=>{"use strict";var t={},n=Array.prototype,r=Object.prototype,i=n.slice,o=r.toString,a=r.hasOwnProperty,s=n.forEach,l=Object.keys,c=Array.isArray,u=function(){},h=u.each=u.forEach=function(e,n,r){if(null!=e)if(s&&e.forEach===s)e.forEach(n,r);else if(e.length===+e.length){for(var i=0,o=e.length;i<o;i++)if(n.call(r,e[i],i,e)===t)return}else{var a=u.keys(e);for(i=0,o=a.length;i<o;i++)if(n.call(r,e[a[i]],a[i],e)===t)return}};u.keys=l||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)u.has(e,n)&&t.push(n);return t},u.defaults=function(e){return h(i.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e},u.isArray=c||function(e){return"[object Array]"===o.call(e)},u.has=function(e,t){if(!u.isArray(t))return null!=e&&a.call(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!a.call(e,i))return!1;e=e[i]}return!!n};var d={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}},f={escape:new RegExp("["+u.keys(d.escape).join("")+"]","g")};u.each(["escape"],(function(e){u[e]=function(t){return null==t?"":(""+t).replace(f[e],(function(t){return d[e][t]}))}})),u.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var p=/(.)^/,g={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},m=/\\|'|\r|\n|\t|\u2028|\u2029/g;u.template=function(e,t,n){var r;n=u.defaults({},n,u.templateSettings);var i=new RegExp([(n.escape||p).source,(n.interpolate||p).source,(n.evaluate||p).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(m,(function(e){return"\\"+g[e]})),n&&(a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(a+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(a+="';\n"+i+"\n__p+='"),o=s+t.length,t})),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(n.variable||"obj","_",a)}catch(e){throw e.source=a,e}if(t)return r(t,u);var s=function(e){return r.call(this,e,u)};return s.source="function("+(n.variable||"obj")+"){\n"+a+"}",s},e.exports=u},97641:(e,t,n)=>{"use strict";var r=n(588),i=n(14760),o=n(24674),a=n(83095),s=n(91332),l=n(28814);e.exports=function e(){var t,n=[],i=s(),y={},b=-1;return _.data=function(e,n){return"string"==typeof e?2===arguments.length?(g("data",t),y[e]=n,_):u.call(y,e)&&y[e]||null:e?(g("data",t),y=e,_):y},_.freeze=x,_.attachers=n,_.use=function(e){var r;if(g("use",t),null==e);else if("function"==typeof e)u.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l(e):i(e)}return r&&(y.settings=o(y.settings||{},r)),_;function i(e){l(e.plugins),e.settings&&(r=o(r||{},e.settings))}function s(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):i(e)}}function l(e){var t=-1;if(null==e);else{if("object"!=typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function u(e,t){var r=w(e);r?(a(r[1])&&a(t)&&(t=o(!0,r[1],t)),r[1]=t):n.push(c.call(arguments))}},_.parse=function(e){var t,n=l(e);return x(),f("parse",t=_.Parser),d(t,"parse")?new t(String(n),n).parse():t(String(n),n)},_.stringify=function(e,t){var n,r=l(t);return x(),p("stringify",n=_.Compiler),m(e),d(n,"compile")?new n(e,r).compile():n(e,r)},_.run=A,_.runSync=function(e,t){var n,i;return A(e,t,(function(e,t){i=!0,n=t,r(e)})),v("runSync","run",i),n},_.process=k,_.processSync=function(e){var t,n;return x(),f("processSync",_.Parser),p("processSync",_.Compiler),k(t=l(e),(function(e){n=!0,r(e)})),v("processSync","process",n),t},_;function _(){for(var t=e(),r=-1;++r<n.length;)t.use.apply(null,n[r]);return t.data(o(!0,{},y)),t}function x(){var e,r;if(t)return _;for(;++b<n.length;)!1!==(e=n[b])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(r=e[0].apply(_,e.slice(1)))&&i.use(r));return t=!0,b=1/0,_}function w(e){for(var t=-1;++t<n.length;)if(n[t][0]===e)return n[t]}function A(e,t,n){if(m(e),x(),n||"function"!=typeof t||(n=t,t=null),!n)return new Promise(r);function r(r,o){i.run(e,l(t),(function(t,i,a){i=i||e,t?o(t):r?r(i):n(null,i,a)}))}r(null,n)}function k(e,t){if(x(),f("process",_.Parser),p("process",_.Compiler),!t)return new Promise(n);function n(n,r){var i=l(e);h.run(_,{file:i},(function(e){e?r(e):n?n(i):t(null,i)}))}n(null,t)}}().freeze();var c=[].slice,u={}.hasOwnProperty,h=s().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,i){e?n(e):(t.tree=r,t.file=i,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||i(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}));function d(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function f(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function p(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function g(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function m(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function v(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}},83095:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},10603:e=>{"use strict";function t(){return!0}e.exports=function e(n){if(null==n)return t;if("string"==typeof n)return function(e){return function(t){return Boolean(t&&t.type===e)}}(n);if("object"==typeof n)return"length"in n?function(t){for(var n=[],r=-1;++r<t.length;)n[r]=e(t[r]);return function(){for(var e=-1;++e<n.length;)if(n[e].apply(this,arguments))return!0;return!1}}(n):function(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(n);if("function"==typeof n)return n;throw new Error("Expected function, string, or object as test")}},69565:e=>{"use strict";var t={}.hasOwnProperty;function n(e){return e&&"object"==typeof e||(e={}),i(e.line)+":"+i(e.column)}function r(e){return e&&"object"==typeof e||(e={}),n(e.start)+"-"+n(e.end)}function i(e){return e&&"number"==typeof e?e:1}e.exports=function(e){return e&&"object"==typeof e?t.call(e,"position")||t.call(e,"type")?r(e.position):t.call(e,"start")||t.call(e,"end")?r(e):t.call(e,"line")||t.call(e,"column")?n(e):"":""}},34543:e=>{"use strict";e.exports=function(e,t,n){var r=[];"function"==typeof t&&(n=t,t=null),function e(i){var o;return t&&i.type!==t||(o=n(i,r.concat())),i.children&&!1!==o?function(t,n){var i,o=t.length,a=-1;for(r.push(n);++a<o;)if((i=t[a])&&!1===e(i))return!1;return r.pop(),!0}(i.children,i):o}(e)}},94587:(e,t,n)=>{"use strict";e.exports=s;var r=n(64440),i=r.CONTINUE,o=r.SKIP,a=r.EXIT;function s(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],i=r?r.children.indexOf(e):null;return n(e,i,r)}),i)}s.CONTINUE=i,s.SKIP=o,s.EXIT=a},78109:e=>{e.exports=function(e){return e}},64440:(e,t,n)=>{"use strict";e.exports=s;var r=n(10603),i=n(78109),o="skip",a=!1;function s(e,t,n,s){var l,c;"function"==typeof t&&"function"!=typeof n&&(s=n,n=t,t=null),c=r(t),l=s?-1:1,function e(r,u,h){var d,f="object"==typeof r&&null!==r?r:{};return"string"==typeof f.type&&(d="string"==typeof f.tagName?f.tagName:"string"==typeof f.name?f.name:void 0,p.displayName="node ("+i(f.type+(d?"<"+d+">":""))+")"),p;function p(){var i,d,f=h.concat(r),p=[];if((!t||c(r,u,h[h.length-1]||null))&&(p=function(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[true,e]:[e]}(n(r,h)),p[0]===a))return p;if(r.children&&p[0]!==o)for(d=(s?r.children.length:-1)+l;d>-1&&d<r.children.length;){if((i=e(r.children[d],d,f)())[0]===a)return i;d="number"==typeof i[1]?i[1]:d+l}return p}}(e,null,[])()}s.CONTINUE=!0,s.SKIP=o,s.EXIT=a},47985:function(e,t,n){var r,i,o;o=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<e.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),t.push(i))}var o=t.join("/"),a=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=o():void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)},98715:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},23807:(e,t,n)=>{"use strict";var r;n.d(t,{Z:()=>u});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See path_to_url#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&a.test(e)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const u=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(r)}},35577:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>H7});var r={};n.r(r),n.d(r,{JsonPatchError:()=>D,_areEquals:()=>V,applyOperation:()=>z,applyPatch:()=>F,applyReducer:()=>B,deepClone:()=>I,getValueByPointer:()=>N,validate:()=>U,validator:()=>j});var i={};n.r(i),n.d(i,{compare:()=>Z,generate:()=>Y,observe:()=>G,unobserve:()=>W});var o={};n.r(o),n.d(o,{aggregate:()=>gc,bin:()=>mc,collect:()=>yc,compare:()=>bc,countpattern:()=>xc,cross:()=>wc,density:()=>Tc,dotbin:()=>Oc,expression:()=>Lc,extent:()=>Ic,facet:()=>Pc,field:()=>Nc,filter:()=>Fc,flatten:()=>Bc,fold:()=>jc,formula:()=>Uc,generate:()=>Vc,impute:()=>$c,joinaggregate:()=>Wc,kde:()=>Gc,key:()=>Yc,load:()=>Zc,lookup:()=>Jc,multiextent:()=>Qc,multivalues:()=>tu,params:()=>ru,pivot:()=>iu,prefacet:()=>ou,project:()=>au,proxy:()=>su,quantile:()=>lu,relay:()=>cu,sample:()=>uu,sequence:()=>hu,sieve:()=>du,subflow:()=>Rc,timeunit:()=>fu,tupleindex:()=>gu,values:()=>mu,window:()=>xu});var a={};n.r(a),n.d(a,{interpolate:()=>Hm,interpolateArray:()=>Nm,interpolateBasis:()=>km,interpolateBasisClosed:()=>Tm,interpolateCubehelix:()=>jv,interpolateCubehelixLong:()=>Uv,interpolateDate:()=>Fm,interpolateDiscrete:()=>$m,interpolateHcl:()=>Sv,interpolateHclLong:()=>Ev,interpolateHsl:()=>iv,interpolateHslLong:()=>ov,interpolateHue:()=>Wm,interpolateLab:()=>kv,interpolateNumber:()=>Bm,interpolateNumberArray:()=>Rm,interpolateObject:()=>jm,interpolateRgb:()=>Om,interpolateRgbBasis:()=>Dm,interpolateRgbBasisClosed:()=>Im,interpolateRound:()=>Gm,interpolateString:()=>qm,interpolateTransformCss:()=>Qm,interpolateTransformSvg:()=>ev,interpolateZoom:()=>nv,piecewise:()=>Vv,quantize:()=>qv});var s={};n.r(s),n.d(s,{bound:()=>ok,identifier:()=>lk,mark:()=>ck,overlap:()=>uk,render:()=>vk,viewlayout:()=>Fk});var l={};n.r(l),n.d(l,{axisticks:()=>tT,datajoin:()=>nT,encode:()=>iT,legendentries:()=>oT,linkpath:()=>uT,pie:()=>gT,scale:()=>yT,sortitems:()=>wT,stack:()=>ET});var c={};n.r(c),n.d(c,{contour:()=>UM,geojson:()=>HM,geopath:()=>$M,geopoint:()=>WM,geoshape:()=>GM,graticule:()=>YM,heatmap:()=>XM,isocontour:()=>LM,kde2d:()=>FM,projection:()=>KM});var u={};n.r(u),n.d(u,{force:()=>WO});var h={};n.r(h),n.d(h,{nest:()=>WL,pack:()=>JL,partition:()=>eD,stratify:()=>tD,tree:()=>iD,treelinks:()=>oD,treemap:()=>lD});var d={};n.r(d),n.d(d,{label:()=>OD});var f={};n.r(f),n.d(f,{loess:()=>DD,regression:()=>RD});var p={};n.r(p),n.d(p,{voronoi:()=>rI});var g={};n.r(g),n.d(g,{wordcloud:()=>vI});var m={};n.r(m),n.d(m,{crossfilter:()=>MI,resolvefilter:()=>OI});var v={};n.r(v),n.d(v,{Bounds:()=>t_,CanvasHandler:()=>Dw,CanvasRenderer:()=>zw,DATE:()=>pr,DAY:()=>gr,DAYOFYEAR:()=>mr,Dataflow:()=>Bs,Debug:()=>be,Error:()=>me,EventStream:()=>Ts,Gradient:()=>lb,GroupItem:()=>r_,HOURS:()=>vr,Handler:()=>pw,Info:()=>ye,Item:()=>n_,MILLISECONDS:()=>_r,MINUTES:()=>yr,MONTH:()=>dr,Marks:()=>Jx,MultiPulse:()=>Ps,None:()=>ge,Operator:()=>ws,Parameters:()=>bs,Pulse:()=>Ls,QUARTER:()=>hr,RenderType:()=>kA,Renderer:()=>mw,ResourceLoader:()=>i_,SECONDS:()=>br,SVGHandler:()=>Bw,SVGRenderer:()=>cA,SVGStringRenderer:()=>AA,Scenegraph:()=>aw,TIME_UNITS:()=>xr,Transform:()=>Us,View:()=>vB,WEEK:()=>fr,Warn:()=>ve,YEAR:()=>ur,accessor:()=>Q,accessorFields:()=>te,accessorName:()=>ee,array:()=>We,ascending:()=>Ze,bandwidthNRD:()=>nl,bin:()=>rl,bootstrapCI:()=>al,boundClip:()=>DA,boundContext:()=>T_,boundItem:()=>Qx,boundMark:()=>tw,boundStroke:()=>s_,changeset:()=>vs,clampRange:()=>Ge,codegenExpression:()=>jR,compare:()=>Xe,constant:()=>et,cumulativeLogNormal:()=>xl,cumulativeNormal:()=>gl,cumulativeUniform:()=>El,dayofyear:()=>Cr,debounce:()=>tt,defaultLocale:()=>Oa,definition:()=>qs,densityLogNormal:()=>_l,densityNormal:()=>pl,densityUniform:()=>Sl,domChild:()=>uw,domClear:()=>hw,domCreate:()=>lw,domFind:()=>cw,dotbin:()=>sl,error:()=>oe,expressionFunction:()=>rF,extend:()=>nt,extent:()=>rt,extentIndex:()=>it,falsy:()=>fe,fastmap:()=>lt,field:()=>se,flush:()=>ct,font:()=>Hx,fontFamily:()=>qx,fontSize:()=>Fx,format:()=>Qa,formatLocale:()=>wa,formats:()=>es,hasOwnProperty:()=>at,id:()=>le,identity:()=>ce,inferType:()=>Wa,inferTypes:()=>Ga,ingest:()=>hs,inherits:()=>ut,inrange:()=>ht,interpolate:()=>Iy,interpolateColors:()=>Oy,interpolateRange:()=>My,intersect:()=>EA,intersectBoxLine:()=>N_,intersectPath:()=>D_,intersectPoint:()=>I_,intersectRule:()=>P_,isArray:()=>xe,isBoolean:()=>dt,isDate:()=>ft,isFunction:()=>Ye,isIterable:()=>pt,isNumber:()=>gt,isObject:()=>we,isRegExp:()=>mt,isString:()=>vt,isTuple:()=>ls,key:()=>yt,lerp:()=>bt,lineHeight:()=>Bx,loader:()=>rs,locale:()=>Ma,logger:()=>_e,lruCache:()=>_t,markup:()=>nA,merge:()=>xt,mergeConfig:()=>ke,multiLineOffset:()=>Ux,one:()=>he,pad:()=>At,panLinear:()=>Pe,panLog:()=>Ne,panPow:()=>ze,panSymlog:()=>Fe,parse:()=>iq,parseExpression:()=>zR,parseSelector:()=>SB,pathCurves:()=>ub,pathEqual:()=>RA,pathParse:()=>fb,pathRectangle:()=>zb,pathRender:()=>kb,pathSymbols:()=>Cb,pathTrail:()=>Fb,peek:()=>Ee,point:()=>fw,projection:()=>BC,quantileLogNormal:()=>wl,quantileNormal:()=>ml,quantileUniform:()=>Cl,quantiles:()=>el,quantizeInterpolator:()=>Ly,quarter:()=>He,quartiles:()=>tl,random:()=>il,randomInteger:()=>cl,randomKDE:()=>yl,randomLCG:()=>ll,randomLogNormal:()=>Al,randomMixture:()=>kl,randomNormal:()=>vl,randomUniform:()=>Ml,read:()=>ns,regressionExp:()=>Nl,regressionLinear:()=>Rl,regressionLoess:()=>Ul,regressionLog:()=>Pl,regressionPoly:()=>Bl,regressionPow:()=>zl,regressionQuad:()=>Fl,renderModule:()=>SA,repeat:()=>wt,resetDefaultLocale:()=>La,resetSVGClipId:()=>Qb,resetSVGDefIds:()=>PA,responseType:()=>ts,runtimeContext:()=>fF,sampleCurve:()=>$l,sampleLogNormal:()=>bl,sampleNormal:()=>fl,sampleUniform:()=>Tl,scale:()=>by,sceneEqual:()=>IA,sceneFromJSON:()=>iw,scenePickVisit:()=>G_,sceneToJSON:()=>rw,sceneVisit:()=>W_,sceneZOrder:()=>$_,scheme:()=>zy,serializeXML:()=>rA,setRandom:()=>ol,span:()=>kt,splitAccessPath:()=>ae,stringValue:()=>Tt,textMetrics:()=>Dx,timeBin:()=>fi,timeFloor:()=>Hr,timeFormatLocale:()=>Ea,timeInterval:()=>Zr,timeOffset:()=>Qr,timeSequence:()=>ni,timeUnitSpecifier:()=>Tr,timeUnits:()=>Ar,toBoolean:()=>St,toDate:()=>Ct,toNumber:()=>Ce,toSet:()=>Ot,toString:()=>Mt,transform:()=>Hs,transforms:()=>Vs,truncate:()=>Lt,truthy:()=>de,tupleid:()=>cs,typeParsers:()=>qa,utcFloor:()=>Gr,utcInterval:()=>Kr,utcOffset:()=>ei,utcSequence:()=>ri,utcdayofyear:()=>Rr,utcquarter:()=>$e,utcweek:()=>Pr,version:()=>oq,visitArray:()=>Dt,week:()=>Mr,writeConfig:()=>Te,zero:()=>ue,zoomLinear:()=>je,zoomLog:()=>Ue,zoomPow:()=>Ve,zoomSymlog:()=>qe});var y={};n.r(y),n.d(y,{accessPathDepth:()=>sH,accessPathWithDatum:()=>tH,compile:()=>g5,contains:()=>Pq,deepEqual:()=>Eq,deleteNestedProperty:()=>Qq,duplicate:()=>Cq,entries:()=>Xq,every:()=>zq,fieldIntersection:()=>$q,flatAccessWithDatum:()=>nH,getFirstDefined:()=>lH,hasIntersection:()=>qq,hash:()=>Iq,internalField:()=>dH,isBoolean:()=>Zq,isEmpty:()=>Wq,isEqual:()=>Uq,isInternalField:()=>fH,isNullOrFalse:()=>Rq,isNumeric:()=>gH,keys:()=>Gq,logicalExpr:()=>Jq,mergeDeep:()=>Fq,never:()=>Mq,normalize:()=>eQ,normalizeAngle:()=>pH,omit:()=>Lq,pick:()=>Oq,prefixGenerator:()=>Hq,removePathFromField:()=>aH,replaceAll:()=>oH,replacePathInField:()=>iH,resetIdCounter:()=>hH,setEqual:()=>Vq,some:()=>Nq,stringify:()=>Dq,titleCase:()=>eH,unique:()=>jq,uniqueId:()=>uH,vals:()=>Yq,varName:()=>Kq,version:()=>m5});var b={};n.r(b),n.d(b,{dark:()=>b5,excel:()=>x5,fivethirtyeight:()=>S5,ggplot2:()=>C5,googlecharts:()=>X5,latimes:()=>R5,quartz:()=>z5,urbaninstitute:()=>$5,version:()=>Z5,vox:()=>B5});var _,x=(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},_(e,t)},function(e,t){function n(){this.constructor=e}_(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),w=Object.prototype.hasOwnProperty;function A(e,t){return w.call(e,t)}function k(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);for(var r in t=[],e)A(e,r)&&t.push(r);return t}function T(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function S(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function E(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function C(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function M(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(M(e[t]))return!0}else if("object"==typeof e){var r=k(e),i=r.length;for(t=0;t<i;t++)if(M(e[r[t]]))return!0}return!1}function O(e,t){var n=[e];for(var r in t){var i="object"==typeof t[r]?JSON.stringify(t[r],null,2):t[r];void 0!==i&&n.push(r+": "+i)}return n.join("\n")}var L=function(e){function t(t,n,r,i,o){var a=this.constructor,s=e.call(this,O(t,{name:n,index:r,operation:i,tree:o}))||this;return s.name=n,s.index=r,s.operation=i,s.tree=o,Object.setPrototypeOf(s,a.prototype),s.message=O(t,{name:n,index:r,operation:i,tree:o}),s}return x(t,e),t}(Error),D=L,I=T,R={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=N(n,this.path);r&&(r=T(r));var i=z(n,{op:"remove",path:this.from}).removed;return z(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=N(n,this.from);return z(n,{op:"add",path:this.path,value:T(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:V(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},P={add:function(e,t,n){return S(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:R.move,copy:R.copy,test:R.test,_get:R._get};function N(e,t){if(""==t)return e;var n={op:"_get",path:t};return z(e,n),n.value}function z(e,t,n,r,i,o){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===o&&(o=0),n&&("function"==typeof n?n(t,0,e,t.path):j(t,0)),""===t.path){var a={newDocument:e};if("add"===t.op)return a.newDocument=t.value,a;if("replace"===t.op)return a.newDocument=t.value,a.removed=e,a;if("move"===t.op||"copy"===t.op)return a.newDocument=N(e,t.from),"move"===t.op&&(a.removed=e),a;if("test"===t.op){if(a.test=V(e,t.value),!1===a.test)throw new D("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return a.newDocument=e,a}if("remove"===t.op)return a.removed=e,a.newDocument=null,a;if("_get"===t.op)return t.value=e,a;if(n)throw new D("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",o,t,e);return a}r||(e=T(e));var s=(t.path||"").split("/"),l=e,c=1,u=s.length,h=void 0,d=void 0,f=void 0;for(f="function"==typeof n?n:j;;){if((d=s[c])&&-1!=d.indexOf("~")&&(d=C(d)),i&&"__proto__"==d)throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===h&&(void 0===l[d]?h=s.slice(0,c).join("/"):c==u-1&&(h=t.path),void 0!==h&&f(t,0,e,h)),c++,Array.isArray(l)){if("-"===d)d=l.length;else{if(n&&!S(d))throw new D("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);S(d)&&(d=~~d)}if(c>=u){if(n&&"add"===t.op&&d>l.length)throw new D("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);if(!1===(a=P[t.op].call(t,l,d,e)).test)throw new D("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return a}}else if(c>=u){if(!1===(a=R[t.op].call(t,l,d,e)).test)throw new D("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return a}if(l=l[d],n&&c<u&&(!l||"object"!=typeof l))throw new D("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",o,t,e)}}function F(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),n&&!Array.isArray(t))throw new D("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=T(e));for(var o=new Array(t.length),a=0,s=t.length;a<s;a++)o[a]=z(e,t[a],n,!0,i,a),e=o[a].newDocument;return o.newDocument=e,o}function B(e,t,n){var r=z(e,t);if(!1===r.test)throw new D("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function j(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new D("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!R[e.op])throw new D("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n);if("string"!=typeof e.path)throw new D("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new D('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new D("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new D("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&M(e.value))throw new D("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,o=r.split("/").length;if(i!==o+1&&i!==o)throw new D("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new D("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=U([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new D("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function U(e,t,n){try{if(!Array.isArray(e))throw new D("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)F(T(t),T(e),n||!0);else{n=n||j;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof D)return e;throw e}}function V(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,i,o=Array.isArray(e),a=Array.isArray(t);if(o&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!V(e[n],t[n]))return!1;return!0}if(o!=a)return!1;var s=Object.keys(e);if((r=s.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!t.hasOwnProperty(s[n]))return!1;for(n=r;0!=n--;)if(!V(e[i=s[n]],t[i]))return!1;return!0}return e!=e&&t!=t}var q=new WeakMap,H=function(e){this.observers=new Map,this.obj=e},$=function(e,t){this.callback=e,this.observer=t};function W(e,t){t.unobserve()}function G(e,t){var n,r=function(e){return q.get(e)}(e);if(r){var i=function(e,t){return e.observers.get(t)}(r,t);n=i&&i.observer}else r=new H(e),q.set(e,r);if(n)return n;if(n={},r.value=T(e),t){n.callback=t,n.next=null;var o=function(){Y(n)},a=function(){clearTimeout(n.next),n.next=setTimeout(o)};"undefined"!=typeof window&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return n.patches=[],n.object=e,n.unobserve=function(){Y(n),clearTimeout(n.next),function(e,t){e.observers.delete(t.callback)}(r,n),"undefined"!=typeof window&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new $(t,n)),n}function Y(e,t){void 0===t&&(t=!1);var n=q.get(e.object);X(n.value,e.object,e.patches,"",t),e.patches.length&&F(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function X(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=k(t),a=k(e),s=!1,l=a.length-1;l>=0;l--){var c=e[h=a[l]];if(!A(t,h)||void 0===t[h]&&void 0!==c&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+E(h),value:T(c)}),n.push({op:"remove",path:r+"/"+E(h)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}));else{var u=t[h];"object"==typeof c&&null!=c&&"object"==typeof u&&null!=u&&Array.isArray(c)===Array.isArray(u)?X(c,u,n,r+"/"+E(h),i):c!==u&&(i&&n.push({op:"test",path:r+"/"+E(h),value:T(c)}),n.push({op:"replace",path:r+"/"+E(h),value:T(u)}))}}if(s||o.length!=a.length)for(l=0;l<o.length;l++){var h;A(e,h=o[l])||void 0===t[h]||n.push({op:"add",path:r+"/"+E(h),value:T(t[h])})}}}function Z(e,t,n){void 0===n&&(n=!1);var r=[];return X(e,t,r,"",n),r}Object.assign({},r,i,{JsonPatchError:L,deepClone:T,escapePathComponent:E,unescapePathComponent:C});var K=n(5132),J=n.n(K);function Q(e,t,n){return e.fields=t||[],e.fname=n,e}function ee(e){return null==e?null:e.fname}function te(e){return null==e?null:e.fields}function ne(e){return 1===e.length?re(e[0]):ie(e)}const re=e=>function(t){return t[e]},ie=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function oe(e){throw Error(e)}function ae(e){const t=[],n=e.length;let r,i,o,a=null,s=0,l="";function c(){t.push(l+e.substring(r,i)),l="",r=i+1}for(e+="",r=i=0;i<n;++i)if(o=e[i],"\\"===o)l+=e.substring(r,i),l+=e.substring(++i,++i),r=i;else if(o===a)c(),a=null,s=-1;else{if(a)continue;r===s&&'"'===o||r===s&&"'"===o?(r=i+1,a=o):"."!==o||s?"["===o?(i>r&&c(),s=r=i+1):"]"===o&&(s||oe("Access path missing open bracket: "+e),s>0&&c(),s=0,r=i+1):i>r?c():r=i+1}return s&&oe("Access path missing closing bracket: "+e),a&&oe("Access path missing closing quote: "+e),i>r&&(i++,c()),t}function se(e,t,n){const r=ae(e);return e=1===r.length?r[0]:e,Q((n&&n.get||ne)(r),[e],t||e)}const le=se("id"),ce=Q((e=>e),[],"identity"),ue=Q((()=>0),[],"zero"),he=Q((()=>1),[],"one"),de=Q((()=>!0),[],"true"),fe=Q((()=>!1),[],"false");function pe(e,t,n){const r=[t].concat([].slice.call(n));console[e].apply(console,r)}const ge=0,me=1,ve=2,ye=3,be=4;function _e(e,t,n=pe){let r=e||ge;return{level(e){return arguments.length?(r=+e,this):r},error(){return r>=me&&n(t||"error","ERROR",arguments),this},warn(){return r>=ve&&n(t||"warn","WARN",arguments),this},info(){return r>=ye&&n(t||"log","INFO",arguments),this},debug(){return r>=be&&n(t||"log","DEBUG",arguments),this}}}var xe=Array.isArray;function we(e){return e===Object(e)}const Ae=e=>"__proto__"!==e;function ke(...e){return e.reduce(((e,t)=>{for(const n in t)if("signals"===n)e.signals=Se(e.signals,t.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;Te(e,n,t[n],r)}return e}),{})}function Te(e,t,n,r){if(!Ae(t))return;let i,o;if(we(n)&&!xe(n))for(i in o=we(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[i])?Te(o,i,n[i]):Ae(i)&&(o[i]=n[i]);else e[t]=n}function Se(e,t){if(null==e)return t;const n={},r=[];function i(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(i),e.forEach(i),r}function Ee(e){return e[e.length-1]}function Ce(e){return null==e||""===e?null:+e}const Me=e=>t=>e*Math.exp(t),Oe=e=>t=>Math.log(e*t),Le=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),De=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Ie=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Re(e,t,n,r){const i=n(e[0]),o=n(Ee(e)),a=(o-i)*t;return[r(i-a),r(o-a)]}function Pe(e,t){return Re(e,t,Ce,ce)}function Ne(e,t){var n=Math.sign(e[0]);return Re(e,t,Oe(n),Me(n))}function ze(e,t,n){return Re(e,t,Ie(n),Ie(1/n))}function Fe(e,t,n){return Re(e,t,Le(n),De(n))}function Be(e,t,n,r,i){const o=r(e[0]),a=r(Ee(e)),s=null!=t?r(t):(o+a)/2;return[i(s+(o-s)*n),i(s+(a-s)*n)]}function je(e,t,n){return Be(e,t,n,Ce,ce)}function Ue(e,t,n){const r=Math.sign(e[0]);return Be(e,t,n,Oe(r),Me(r))}function Ve(e,t,n,r){return Be(e,t,n,Ie(r),Ie(1/r))}function qe(e,t,n,r){return Be(e,t,n,Le(r),De(r))}function He(e){return 1+~~(new Date(e).getMonth()/3)}function $e(e){return 1+~~(new Date(e).getUTCMonth()/3)}function We(e){return null!=e?xe(e)?e:[e]:[]}function Ge(e,t,n){let r,i=e[0],o=e[1];return o<i&&(r=o,o=i,i=r),r=o-i,r>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]}function Ye(e){return"function"==typeof e}function Xe(e,t,n){n=n||{},t=We(t)||[];const r=[],i=[],o={},a=n.comparator||Ke;return We(e).forEach(((e,a)=>{null!=e&&(r.push("descending"===t[a]?-1:1),i.push(e=Ye(e)?e:se(e,null,n)),(te(e)||[]).forEach((e=>o[e]=1)))})),0===i.length?null:Q(a(i,r),Object.keys(o))}const Ze=(e,t)=>(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),Ke=(e,t)=>1===e.length?Je(e[0],t[0]):Qe(e,t,e.length),Je=(e,t)=>function(n,r){return Ze(e(n),e(r))*t},Qe=(e,t,n)=>(t.push(0),function(r,i){let o,a=0,s=-1;for(;0===a&&++s<n;)o=e[s],a=Ze(o(r),o(i));return a*t[s]});function et(e){return Ye(e)?e:()=>e}function tt(e,t){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(t(r),n=null)),e)}}function nt(e){for(let t,n,r=1,i=arguments.length;r<i;++r)for(n in t=arguments[r],t)e[n]=t[n];return e}function rt(e,t){let n,r,i,o,a=0;if(e&&(n=e.length))if(null==t){for(r=e[a];a<n&&(null==r||r!=r);r=e[++a]);for(i=o=r;a<n;++a)r=e[a],null!=r&&(r<i&&(i=r),r>o&&(o=r))}else{for(r=t(e[a]);a<n&&(null==r||r!=r);r=t(e[++a]));for(i=o=r;a<n;++a)r=t(e[a]),null!=r&&(r<i&&(i=r),r>o&&(o=r))}return[i,o]}function it(e,t){const n=e.length;let r,i,o,a,s,l=-1;if(null==t){for(;++l<n;)if(i=e[l],null!=i&&i>=i){r=o=i;break}if(l===n)return[-1,-1];for(a=s=l;++l<n;)i=e[l],null!=i&&(r>i&&(r=i,a=l),o<i&&(o=i,s=l))}else{for(;++l<n;)if(i=t(e[l],l,e),null!=i&&i>=i){r=o=i;break}if(l===n)return[-1,-1];for(a=s=l;++l<n;)i=t(e[l],l,e),null!=i&&(r>i&&(r=i,a=l),o<i&&(o=i,s=l))}return[a,s]}const ot=Object.prototype.hasOwnProperty;function at(e,t){return ot.call(e,t)}const st={};function lt(e){let t,n={};function r(e){return at(n,e)&&n[e]!==st}const i={size:0,empty:0,object:n,has:r,get:e=>r(e)?n[e]:void 0,set(e,t){return r(e)||(++i.size,n[e]===st&&--i.empty),n[e]=t,this},delete(e){return r(e)&&(--i.size,++i.empty,n[e]=st),this},clear(){i.size=i.empty=0,i.object=n={}},test(e){return arguments.length?(t=e,i):t},clean(){const e={};let r=0;for(const i in n){const o=n[i];o===st||t&&t(o)||(e[i]=o,++r)}i.size=r,i.empty=0,i.object=n=e}};return e&&Object.keys(e).forEach((t=>{i.set(t,e[t])})),i}function ct(e,t,n,r,i,o){if(!n&&0!==n)return o;const a=+n;let s,l=e[0],c=Ee(e);c<l&&(s=l,l=c,c=s),s=Math.abs(t-l);const u=Math.abs(c-t);return s<u&&s<=a?r:u<=a?i:o}function ut(e,t,n){const r=e.prototype=Object.create(t.prototype);return Object.defineProperty(r,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),nt(r,n)}function ht(e,t,n,r){let i,o=t[0],a=t[t.length-1];return o>a&&(i=o,o=a,a=i),r=void 0===r||r,((n=void 0===n||n)?o<=e:o<e)&&(r?e<=a:e<a)}function dt(e){return"boolean"==typeof e}function ft(e){return"[object Date]"===Object.prototype.toString.call(e)}function pt(e){return e&&Ye(e[Symbol.iterator])}function gt(e){return"number"==typeof e}function mt(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function vt(e){return"string"==typeof e}function yt(e,t,n){e&&(e=t?We(e).map((e=>e.replace(/\\(.)/g,"$1"))):We(e));const r=e&&e.length,i=n&&n.get||ne,o=e=>i(t?[e]:ae(e));let a;if(r)if(1===r){const t=o(e[0]);a=function(e){return""+t(e)}}else{const t=e.map(o);a=function(e){let n=""+t[0](e),i=0;for(;++i<r;)n+="|"+t[i](e);return n}}else a=function(){return""};return Q(a,e,"key")}function bt(e,t){const n=e[0],r=Ee(e),i=+t;return i?1===i?r:n+i*(r-n):n}function _t(e){let t,n,r;e=+e||1e4;const i=()=>{t={},n={},r=0},o=(i,o)=>(++r>e&&(n=t,t={},r=1),t[i]=o);return i(),{clear:i,has:e=>at(t,e)||at(n,e),get:e=>at(t,e)?t[e]:at(n,e)?o(e,n[e]):void 0,set:(e,n)=>at(t,e)?t[e]=n:o(e,n)}}function xt(e,t,n,r){const i=t.length,o=n.length;if(!o)return t;if(!i)return n;const a=r||new t.constructor(i+o);let s=0,l=0,c=0;for(;s<i&&l<o;++c)a[c]=e(t[s],n[l])>0?n[l++]:t[s++];for(;s<i;++s,++c)a[c]=t[s];for(;l<o;++l,++c)a[c]=n[l];return a}function wt(e,t){let n="";for(;--t>=0;)n+=e;return n}function At(e,t,n,r){const i=n||" ",o=e+"",a=t-o.length;return a<=0?o:"left"===r?wt(i,a)+o:"center"===r?wt(i,~~(a/2))+o+wt(i,Math.ceil(a/2)):o+wt(i,a)}function kt(e){return e&&Ee(e)-e[0]||0}function Tt(e){return xe(e)?"["+e.map(Tt)+"]":we(e)||vt(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function St(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const Et=e=>gt(e)||ft(e)?e:Date.parse(e);function Ct(e,t){return t=t||Et,null==e||""===e?null:t(e)}function Mt(e){return null==e||""===e?null:e+""}function Ot(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}function Lt(e,t,n,r){const i=null!=r?r:"",o=e+"",a=o.length,s=Math.max(0,t-i.length);return a<=t?o:"left"===n?i+o.slice(a-s):"center"===n?o.slice(0,Math.ceil(s/2))+i+o.slice(a-~~(s/2)):o.slice(0,s)+i}function Dt(e,t,n){if(e)if(t){const r=e.length;for(let i=0;i<r;++i){const r=t(e[i]);r&&n(r,i,e)}}else e.forEach(n)}var It={},Rt={};function Pt(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function Nt(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function zt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function Ft(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],o=e.length,a=0,s=0,l=o<=0,c=!1;function u(){if(l)return Rt;if(c)return c=!1,It;var t,r,i=a;if(34===e.charCodeAt(i)){for(;a++<o&&34!==e.charCodeAt(a)||34===e.charCodeAt(++a););return(t=a)>=o?l=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(i+1,t-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=e.charCodeAt(t=a++)))c=!0;else if(13===r)c=!0,10===e.charCodeAt(a)&&++a;else if(r!==n)continue;return e.slice(i,t)}return l=!0,e.slice(i,o)}for(10===e.charCodeAt(o-1)&&--o,13===e.charCodeAt(o-1)&&--o;(r=u())!==Rt;){for(var h=[];r!==It&&r!==Rt;)h.push(r),r=u();t&&null==(h=t(h,s++))||i.push(h)}return i}function i(t,n){return t.map((function(t){return n.map((function(e){return a(t[e])})).join(e)}))}function o(t){return t.map(a).join(e)}function a(e){return null==e?"":e instanceof Date?function(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":function(e){return e<0?"-"+zt(-e,6):e>9999?"+"+zt(e,6):zt(e,4)}(e.getUTCFullYear())+"-"+zt(e.getUTCMonth()+1,2)+"-"+zt(e.getUTCDate(),2)+(i?"T"+zt(t,2)+":"+zt(n,2)+":"+zt(r,2)+"."+zt(i,3)+"Z":r?"T"+zt(t,2)+":"+zt(n,2)+":"+zt(r,2)+"Z":n||t?"T"+zt(t,2)+":"+zt(n,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,i,o=r(e,(function(e,r){if(n)return n(e,r-1);i=e,n=t?function(e,t){var n=Pt(e);return function(r,i){return t(n(r),i,e)}}(e,t):Pt(e)}));return o.columns=i||[],o},parseRows:r,format:function(t,n){return null==n&&(n=Nt(t)),[n.map(a).join(e)].concat(i(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=Nt(e)),i(e,t).join("\n")},formatRows:function(e){return e.map(o).join("\n")},formatRow:o,formatValue:a}}function Bt(e){return e}function jt(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return Ut(e,t)}))}:Ut(e,t)}function Ut(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,o=Vt(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function Vt(e,t){var n=function(e){if(null==e)return Bt;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(e,s){s||(t=n=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(t+=e[0])*r+o,u[1]=(n+=e[1])*i+a;l<c;)u[l]=e[l],++l;return u}}(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],o=0,a=i.length;o<a;++o)t.push(n(i[o],o));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,a)}function o(e){return n(e)}function a(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=a(e);t.length<4;)t.push(t[0]);return t}function l(e){return e.map(s)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=o(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(o);break;case"LineString":n=a(t.arcs);break;case"MultiLineString":n=t.arcs.map(a);break;case"Polygon":n=l(t.arcs);break;case"MultiPolygon":n=t.arcs.map(l);break;default:return null}return{type:r,coordinates:n}}(t)}function qt(e,t){var n={},r={},i={},o=[],a=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),o.push(i)}}return t.forEach((function(n,r){var i,o=e.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=t[++a],t[a]=n,t[r]=i)})),t.forEach((function(t){var n,o,a=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),s=a[0],l=a[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,o=r[l]){delete r[o.start];var c=o===n?n:n.concat(o);r[c.start=n.start]=i[c.end=o.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,o=i[s]){delete i[o.end];var u=o===n?n:o.concat(n);r[u.start=o.start]=i[u.end=n.end]=u}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||o.push([e])})),o}function Ht(e){return Vt(e,$t.apply(this,arguments))}function $t(e,t,n){var r,i,o;if(arguments.length>1)r=Wt(0,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:qt(e,r)}}function Wt(e,t,n){var r,i=[],o=[];function a(e){var t=e<0?~e:e;(o[t]||(o[t]=[])).push({i:e,g:r})}function s(e){e.forEach(a)}function l(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),o.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}var Gt,Yt=Math.sqrt(50),Xt=Math.sqrt(10),Zt=Math.sqrt(2),Kt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jt(e){if(!(t=Kt.exec(e)))throw new Error("invalid format: "+e);var t;return new Qt({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]})}function Qt(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function en(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function tn(e){return(e=en(Math.abs(e)))?e[1]:NaN}function nn(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],i=n[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")}Jt.prototype=Qt.prototype,Qt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const rn={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nn(100*e,t),r:nn,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Gt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+en(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function on(e){return e}var an,sn,ln,cn=Array.prototype.map,un=["y","z","a","f","p","n","","m","","k","M","G","T","P","E","Z","Y"];function hn(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?on:(t=cn.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?on:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(cn.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=Jt(e)).fill,n=e.align,h=e.sign,d=e.symbol,f=e.zero,p=e.width,g=e.comma,m=e.precision,v=e.trim,y=e.type;"n"===y?(g=!0,y="g"):rn[y]||(void 0===m&&(m=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===d?o:/[%p]/.test(y)?l:"",x=rn[y],w=/[defgprs%]/.test(y);function A(e){var i,o,l,d=b,A=_;if("c"===y)A=x(e)+A,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),m),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),d=(k?"("===h?h:c:"-"===h||"("===h?"":h)+d,A=("s"===y?un[8+Gt/3]:"")+A+(k&&"("===h?")":""),w)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){A=(46===l?a+e.slice(i+1):e.slice(i))+A,e=e.slice(0,i);break}}g&&!f&&(e=r(e,1/0));var T=d.length+e.length+A.length,S=T<p?new Array(p-T+1).join(t):"";switch(g&&f&&(e=r(S+e,S.length?p-A.length:1/0),S=""),n){case"<":e=d+e+A+S;break;case"=":e=d+S+e+A;break;case"^":e=S.slice(0,T=S.length>>1)+d+e+A+S.slice(T);break;default:e=S+d+e+A}return s(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),A.toString=function(){return e+""},A}return{format:h,formatPrefix:function(e,t){var n=h(((e=Jt(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(tn(t)/3))),i=Math.pow(10,-r),o=un[8+r/3];return function(e){return n(i*e)+o}}}}an=hn({thousands:",",grouping:[3],currency:["$",""]}),sn=an.format,ln=an.formatPrefix;var dn=new Date,fn=new Date;function pn(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return pn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return dn.setTime(+t),fn.setTime(+r),e(dn),e(fn),Math.floor(n(dn,fn))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}const gn=1e3,mn=6e4,vn=36e5,yn=864e5,bn=6048e5;var _n=pn((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mn)/yn),(e=>e.getDate()-1));const xn=_n;function wn(e){return pn((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*mn)/bn}))}_n.range;var An=wn(0),kn=wn(1),Tn=wn(2),Sn=wn(3),En=wn(4),Cn=wn(5),Mn=wn(6),On=(An.range,kn.range,Tn.range,Sn.range,En.range,Cn.range,Mn.range,pn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/yn}),(function(e){return e.getUTCDate()-1})));const Ln=On;function Dn(e){return pn((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/bn}))}On.range;var In=Dn(0),Rn=Dn(1),Pn=Dn(2),Nn=Dn(3),zn=Dn(4),Fn=Dn(5),Bn=Dn(6),jn=(In.range,Rn.range,Pn.range,Nn.range,zn.range,Fn.range,Bn.range,pn((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})));jn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const Un=jn;jn.range;var Vn=pn((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const qn=Vn;Vn.range;var Hn=pn((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn-e.getMinutes()*mn)}),(function(e,t){e.setTime(+e+t*vn)}),(function(e,t){return(t-e)/vn}),(function(e){return e.getHours()}));const $n=Hn;Hn.range;var Wn=pn((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn)}),(function(e,t){e.setTime(+e+t*mn)}),(function(e,t){return(t-e)/mn}),(function(e){return e.getMinutes()}));const Gn=Wn;Wn.range;var Yn=pn((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*gn)}),(function(e,t){return(t-e)/gn}),(function(e){return e.getUTCSeconds()}));const Xn=Yn;Yn.range;var Zn=pn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Zn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?pn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Zn:null};const Kn=Zn;Zn.range;var Jn=pn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Jn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?pn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const Qn=Jn;Jn.range;var er=pn((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const tr=er;er.range;var nr=pn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*vn)}),(function(e,t){return(t-e)/vn}),(function(e){return e.getUTCHours()}));const rr=nr;nr.range;var ir=pn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*mn)}),(function(e,t){return(t-e)/mn}),(function(e){return e.getUTCMinutes()}));const or=ir;ir.range;var ar=Math.sqrt(50),sr=Math.sqrt(10),lr=Math.sqrt(2);function cr(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ar?i*=10:o>=sr?i*=5:o>=lr&&(i*=2),t<e?-i:i}const ur="year",hr="quarter",dr="month",fr="week",pr="date",gr="day",mr="dayofyear",vr="hours",yr="minutes",br="seconds",_r="milliseconds",xr=[ur,hr,dr,fr,pr,gr,mr,vr,yr,br,_r],wr=xr.reduce(((e,t,n)=>(e[t]=1+n,e)),{});function Ar(e){const t=We(e).slice(),n={};return t.length||oe("Missing time unit."),t.forEach((e=>{at(wr,e)?n[e]=1:oe("Invalid time unit: ".concat(e,"."))})),(n[fr]||n[gr]?1:0)+(n[hr]||n[dr]||n[pr]?1:0)+(n[mr]?1:0)>1&&oe("Incompatible time units: ".concat(e)),t.sort(((e,t)=>wr[e]-wr[t])),t}const kr={[ur]:"%Y ",[hr]:"Q%q ",[dr]:"%b ",[pr]:"%d ",[fr]:"W%U ",[gr]:"%a ",[mr]:"%j ",[vr]:"%H:00",[yr]:"00:%M",[br]:":%S",[_r]:".%L",["".concat(ur,"-").concat(dr)]:"%Y-%m ",["".concat(ur,"-").concat(dr,"-").concat(pr)]:"%Y-%m-%d ",["".concat(vr,"-").concat(yr)]:"%H:%M"};function Tr(e,t){const n=nt({},kr,t),r=Ar(e),i=r.length;let o,a,s="",l=0;for(l=0;l<i;)for(o=r.length;o>l;--o)if(a=r.slice(l,o).join("-"),null!=n[a]){s+=n[a],l=o;break}return s.trim()}const Sr=new Date;function Er(e){return Sr.setFullYear(e),Sr.setMonth(0),Sr.setDate(1),Sr.setHours(0,0,0,0),Sr}function Cr(e){return Or(new Date(e))}function Mr(e){return Lr(new Date(e))}function Or(e){return xn.count(Er(e.getFullYear())-1,e)}function Lr(e){return An.count(Er(e.getFullYear())-1,e)}function Dr(e){return Er(e).getDay()}function Ir(e,t,n,r,i,o,a){if(0<=e&&e<100){const s=new Date(-1,t,n,r,i,o,a);return s.setFullYear(e),s}return new Date(e,t,n,r,i,o,a)}function Rr(e){return Nr(new Date(e))}function Pr(e){return zr(new Date(e))}function Nr(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Ln.count(t-1,e)}function zr(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return In.count(t-1,e)}function Fr(e){return Sr.setTime(Date.UTC(e,0,1)),Sr.getUTCDay()}function Br(e,t,n,r,i,o,a){if(0<=e&&e<100){const e=new Date(Date.UTC(-1,t,n,r,i,o,a));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(e,t,n,r,i,o,a))}function jr(e,t,n,r,i){const o=t||1,a=Ee(e),s=(e,t,i)=>function(e,t,n,r){const i=n<=1?e:r?(t,i)=>r+n*Math.floor((e(t,i)-r)/n):(t,r)=>n*Math.floor(e(t,r)/n);return t?(e,n)=>t(i(e,n),n):i}(n[i=i||e],r[i],e===a&&o,t),l=new Date,c=Ot(e),u=c[ur]?s(ur):et(2012),h=c[dr]?s(dr):c[hr]?s(hr):ue,d=c[fr]&&c[gr]?s(gr,1,fr+gr):c[fr]?s(fr,1):c[gr]?s(gr,1):c[pr]?s(pr,1):c[mr]?s(mr,1):he,f=c[vr]?s(vr):ue,p=c[yr]?s(yr):ue,g=c[br]?s(br):ue,m=c[_r]?s(_r):ue;return function(e){l.setTime(+e);const t=u(l);return i(t,h(l),d(l,t),f(l),p(l),g(l),m(l))}}function Ur(e,t,n){return t+7*e-(n+6)%7}const Vr={[ur]:e=>e.getFullYear(),[hr]:e=>Math.floor(e.getMonth()/3),[dr]:e=>e.getMonth(),[pr]:e=>e.getDate(),[vr]:e=>e.getHours(),[yr]:e=>e.getMinutes(),[br]:e=>e.getSeconds(),[_r]:e=>e.getMilliseconds(),[mr]:e=>Or(e),[fr]:e=>Lr(e),[fr+gr]:(e,t)=>Ur(Lr(e),e.getDay(),Dr(t)),[gr]:(e,t)=>Ur(1,e.getDay(),Dr(t))},qr={[hr]:e=>3*e,[fr]:(e,t)=>Ur(e,0,Dr(t))};function Hr(e,t){return jr(e,t||1,Vr,qr,Ir)}const $r={[ur]:e=>e.getUTCFullYear(),[hr]:e=>Math.floor(e.getUTCMonth()/3),[dr]:e=>e.getUTCMonth(),[pr]:e=>e.getUTCDate(),[vr]:e=>e.getUTCHours(),[yr]:e=>e.getUTCMinutes(),[br]:e=>e.getUTCSeconds(),[_r]:e=>e.getUTCMilliseconds(),[mr]:e=>Nr(e),[fr]:e=>zr(e),[gr]:(e,t)=>Ur(1,e.getUTCDay(),Fr(t)),[fr+gr]:(e,t)=>Ur(zr(e),e.getUTCDay(),Fr(t))},Wr={[hr]:e=>3*e,[fr]:(e,t)=>Ur(e,0,Fr(t))};function Gr(e,t){return jr(e,t||1,$r,Wr,Br)}const Yr={[ur]:Un,[hr]:qn.every(3),[dr]:qn,[fr]:An,[pr]:xn,[gr]:xn,[mr]:xn,[vr]:$n,[yr]:Gn,[br]:Xn,[_r]:Kn},Xr={[ur]:Qn,[hr]:tr.every(3),[dr]:tr,[fr]:In,[pr]:Ln,[gr]:Ln,[mr]:Ln,[vr]:rr,[yr]:or,[br]:Xn,[_r]:Kn};function Zr(e){return Yr[e]}function Kr(e){return Xr[e]}function Jr(e,t,n){return e?e.offset(t,n):void 0}function Qr(e,t,n){return Jr(Zr(e),t,n)}function ei(e,t,n){return Jr(Kr(e),t,n)}function ti(e,t,n,r){return e?e.range(t,n,r):void 0}function ni(e,t,n,r){return ti(Zr(e),t,n,r)}function ri(e,t,n,r){return ti(Kr(e),t,n,r)}const ii=31536e6,oi=[ur,dr,pr,vr,yr,br,_r],ai=oi.slice(0,-1),si=ai.slice(0,-1),li=si.slice(0,-1),ci=li.slice(0,-1),ui=[ur,dr],hi=[ur],di=[[ai,1,1e3],[ai,5,5e3],[ai,15,15e3],[ai,30,3e4],[si,1,6e4],[si,5,3e5],[si,15,9e5],[si,30,18e5],[li,1,36e5],[li,3,108e5],[li,6,216e5],[li,12,432e5],[ci,1,864e5],[[ur,fr],1,6048e5],[ui,1,2592e6],[ui,3,7776e6],[hi,1,ii]];function fi(e){const t=e.extent,n=e.maxbins||40,r=Math.abs(kt(t))/n;let i,o,a=function(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}((e=>e[2])).right(di,r);return a===di.length?(i=hi,o=cr(t[0]/ii,t[1]/ii,n)):a?(a=di[r/di[a-1][2]<di[a][2]/r?a-1:a],i=a[0],o=a[1]):(i=oi,o=Math.max(cr(t[0],t[1],n),1)),{units:i,step:o}}var pi=new Date,gi=new Date;function mi(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return mi((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return pi.setTime(+t),gi.setTime(+r),e(pi),e(gi),Math.floor(n(pi,gi))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var vi=864e5,yi=6048e5;function bi(e){return mi((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/yi}))}var _i=bi(0),xi=bi(1),wi=bi(2),Ai=bi(3),ki=bi(4),Ti=bi(5),Si=bi(6),Ei=(_i.range,xi.range,wi.range,Ai.range,ki.range,Ti.range,Si.range,mi((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/vi}),(function(e){return e.getUTCDate()-1})));const Ci=Ei;function Mi(e){return mi((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/yi}))}Ei.range;var Oi=Mi(0),Li=Mi(1),Di=Mi(2),Ii=Mi(3),Ri=Mi(4),Pi=Mi(5),Ni=Mi(6),zi=(Oi.range,Li.range,Di.range,Ii.range,Ri.range,Pi.range,Ni.range,mi((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/vi}),(function(e){return e.getDate()-1})));const Fi=zi;zi.range;var Bi=mi((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Bi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const ji=Bi;Bi.range;var Ui=mi((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Ui.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const Vi=Ui;function qi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Hi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function $i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Wi(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=io(i),u=oo(i),h=io(o),d=oo(o),f=io(a),p=oo(a),g=io(s),m=oo(s),v=io(l),y=oo(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Eo,e:Eo,f:Do,g:qo,G:$o,H:Co,I:Mo,j:Oo,L:Lo,m:Io,M:Ro,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:pa,s:ga,S:Po,u:No,U:zo,V:Bo,w:jo,W:Uo,x:null,X:null,y:Vo,Y:Ho,Z:Wo,"%":fa},_={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Go,e:Go,f:Jo,g:ca,G:ha,H:Yo,I:Xo,j:Zo,L:Ko,m:Qo,M:ea,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:pa,s:ga,S:ta,u:na,U:ra,V:oa,w:aa,W:sa,x:null,X:null,y:la,Y:ua,Z:da,"%":fa},x={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:vo,e:vo,f:Ao,g:fo,G:ho,H:bo,I:bo,j:yo,L:wo,m:mo,M:_o,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:go,Q:To,s:So,S:xo,u:so,U:lo,V:co,w:ao,W:uo,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:fo,Y:ho,Z:po,"%":ko};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ji[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function A(e,t){return function(n){var r,i,o=$i(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Hi($i(o.y,0,1))).getUTCDay(),r=i>4||0===i?xi.ceil(r):xi(r),r=Ci.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=qi($i(o.y,0,1))).getDay(),r=i>4||0===i?Li.ceil(r):Li(r),r=Fi.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Hi($i(o.y,0,1)).getUTCDay():qi($i(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Hi(o)):qi(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=x[i in Ji?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),_.x=w(n,_),_.X=w(r,_),_.c=w(t,_),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=A(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=A(e+="",!0);return t.toString=function(){return e},t}}}Ui.range;var Gi,Yi,Xi,Zi,Ki,Ji={"-":"",_:" ",0:"0"},Qi=/^\s*\d+/,eo=/^%/,to=/[\\^$*+?|[\]().{}]/g;function no(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function ro(e){return e.replace(to,"\\$&")}function io(e){return new RegExp("^(?:"+e.map(ro).join("|")+")","i")}function oo(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function ao(e,t,n){var r=Qi.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function so(e,t,n){var r=Qi.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function co(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function uo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ho(e,t,n){var r=Qi.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function fo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function po(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function go(e,t,n){var r=Qi.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function mo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function vo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yo(e,t,n){var r=Qi.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function bo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _o(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function xo(e,t,n){var r=Qi.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wo(e,t,n){var r=Qi.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ao(e,t,n){var r=Qi.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ko(e,t,n){var r=eo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function To(e,t,n){var r=Qi.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function So(e,t,n){var r=Qi.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Eo(e,t){return no(e.getDate(),t,2)}function Co(e,t){return no(e.getHours(),t,2)}function Mo(e,t){return no(e.getHours()%12||12,t,2)}function Oo(e,t){return no(1+Fi.count(ji(e),e),t,3)}function Lo(e,t){return no(e.getMilliseconds(),t,3)}function Do(e,t){return Lo(e,t)+"000"}function Io(e,t){return no(e.getMonth()+1,t,2)}function Ro(e,t){return no(e.getMinutes(),t,2)}function Po(e,t){return no(e.getSeconds(),t,2)}function No(e){var t=e.getDay();return 0===t?7:t}function zo(e,t){return no(Oi.count(ji(e)-1,e),t,2)}function Fo(e){var t=e.getDay();return t>=4||0===t?Ri(e):Ri.ceil(e)}function Bo(e,t){return e=Fo(e),no(Ri.count(ji(e),e)+(4===ji(e).getDay()),t,2)}function jo(e){return e.getDay()}function Uo(e,t){return no(Li.count(ji(e)-1,e),t,2)}function Vo(e,t){return no(e.getFullYear()%100,t,2)}function qo(e,t){return no((e=Fo(e)).getFullYear()%100,t,2)}function Ho(e,t){return no(e.getFullYear()%1e4,t,4)}function $o(e,t){var n=e.getDay();return no((e=n>=4||0===n?Ri(e):Ri.ceil(e)).getFullYear()%1e4,t,4)}function Wo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+no(t/60|0,"0",2)+no(t%60,"0",2)}function Go(e,t){return no(e.getUTCDate(),t,2)}function Yo(e,t){return no(e.getUTCHours(),t,2)}function Xo(e,t){return no(e.getUTCHours()%12||12,t,2)}function Zo(e,t){return no(1+Ci.count(Vi(e),e),t,3)}function Ko(e,t){return no(e.getUTCMilliseconds(),t,3)}function Jo(e,t){return Ko(e,t)+"000"}function Qo(e,t){return no(e.getUTCMonth()+1,t,2)}function ea(e,t){return no(e.getUTCMinutes(),t,2)}function ta(e,t){return no(e.getUTCSeconds(),t,2)}function na(e){var t=e.getUTCDay();return 0===t?7:t}function ra(e,t){return no(_i.count(Vi(e)-1,e),t,2)}function ia(e){var t=e.getUTCDay();return t>=4||0===t?ki(e):ki.ceil(e)}function oa(e,t){return e=ia(e),no(ki.count(Vi(e),e)+(4===Vi(e).getUTCDay()),t,2)}function aa(e){return e.getUTCDay()}function sa(e,t){return no(xi.count(Vi(e)-1,e),t,2)}function la(e,t){return no(e.getUTCFullYear()%100,t,2)}function ca(e,t){return no((e=ia(e)).getUTCFullYear()%100,t,2)}function ua(e,t){return no(e.getUTCFullYear()%1e4,t,4)}function ha(e,t){var n=e.getUTCDay();return no((e=n>=4||0===n?ki(e):ki.ceil(e)).getUTCFullYear()%1e4,t,4)}function da(){return"+0000"}function fa(){return"%"}function pa(e){return+e}function ga(e){return Math.floor(+e/1e3)}function ma(e){const t={};return n=>t[n]||(t[n]=e(n))}function va(e){const t=ma(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(e){const n=Jt(e||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return function(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let o=function(e,t){let n,r=e.lastIndexOf("e");if(r>0)return r;for(r=e.length;--r>t;)if(n=e.charCodeAt(r),n>=48&&n<=57)return r+1}(r,i);const a=o<r.length?r.slice(o):"";for(;--o>i;)if("0"!==r[o]){++o;break}return r.slice(0,o)+a}}(t(n),t(".1f")(1)[1])}return t(n)},formatSpan(e,r,i,o){o=Jt(null==o?",f":o);const a=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Yt?i*=10:o>=Xt?i*=5:o>=Zt&&(i*=2),t<e?-i:i}(e,r,i),s=Math.max(Math.abs(e),Math.abs(r));let l;if(null==o.precision)switch(o.type){case"s":return isNaN(l=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(tn(t)/3)))-tn(Math.abs(e)))}(a,s))||(o.precision=l),n(o,s);case"":case"e":case"g":case"p":case"r":isNaN(l=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,tn(t)-tn(e))+1}(a,s))||(o.precision=l-("e"===o.type));break;case"f":case"%":isNaN(l=function(e){return Math.max(0,-tn(Math.abs(e)))}(a))||(o.precision=l-2*("%"===o.type))}return t(o)}}}let ya,ba;function _a(){return ya=va({format:sn,formatPrefix:ln})}function xa(e){return va(hn(e))}function wa(e){return arguments.length?ya=xa(e):ya}function Aa(e,t,n){we(n=n||{})||oe("Invalid time multi-format specifier: ".concat(n));const r=t(br),i=t(yr),o=t(vr),a=t(pr),s=t(fr),l=t(dr),c=t(hr),u=t(ur),h=e(n[_r]||".%L"),d=e(n[br]||":%S"),f=e(n[yr]||"%I:%M"),p=e(n[vr]||"%I %p"),g=e(n[pr]||n[gr]||"%a %d"),m=e(n[fr]||"%b %d"),v=e(n[dr]||"%B"),y=e(n[hr]||"%B"),b=e(n[ur]||"%Y");return e=>(r(e)<e?h:i(e)<e?d:o(e)<e?f:a(e)<e?p:l(e)<e?s(e)<e?g:m:u(e)<e?c(e)<e?v:y:b)(e)}function ka(e){const t=ma(e.format),n=ma(e.utcFormat);return{timeFormat:e=>vt(e)?t(e):Aa(t,Zr,e),utcFormat:e=>vt(e)?n(e):Aa(n,Kr,e),timeParse:ma(e.parse),utcParse:ma(e.utcParse)}}function Ta(){return ba=ka({format:Yi,parse:Xi,utcFormat:Zi,utcParse:Ki})}function Sa(e){return ka(Wi(e))}function Ea(e){return arguments.length?ba=Sa(e):ba}Gi=Wi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Yi=Gi.format,Xi=Gi.parse,Zi=Gi.utcFormat,Ki=Gi.utcParse,_a(),Ta();const Ca=(e,t)=>nt({},e,t);function Ma(e,t){const n=e?xa(e):wa(),r=t?Sa(t):Ea();return Ca(n,r)}function Oa(e,t){const n=arguments.length;return n&&2!==n&&oe("defaultLocale expects either zero or two arguments."),n?Ca(wa(e),Ea(t)):Ca(wa(),Ea())}function La(){return _a(),Ta(),Oa()}const Da=/^(data:|([A-Za-z]+:)?\/\/)/,Ia=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Ra=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Pa="file://";async function Na(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function za(e,t){t=nt({},this.options,t);const n=this.fileAccess,r={href:null};let i,o,a;const s=Ia.test(e.replace(Ra,""));null!=e&&"string"==typeof e&&s||oe("Sanitize failure, invalid URI: "+Tt(e));const l=Da.test(e);return(a=t.baseURL)&&!l&&(e.startsWith("/")||a.endsWith("/")||(e="/"+e),e=a+e),o=(i=e.startsWith(Pa))||"file"===t.mode||"http"!==t.mode&&!l&&n,i?e=e.slice(Pa.length):e.startsWith("//")&&("file"===t.defaultProtocol?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!o}),r.href=e,t.target&&(r.target=t.target+""),t.rel&&(r.rel=t.rel+""),"image"===t.context&&t.crossOrigin&&(r.crossOrigin=t.crossOrigin+""),r}function Fa(e){return e?t=>new Promise(((n,r)=>{e.readFile(t,((e,t)=>{e?r(e):n(t)}))})):Ba}async function Ba(){oe("No file system access.")}function ja(e){return e?async function(t,n){const r=nt({},this.options.http,n),i=n&&n.response,o=await e(t,r);return o.ok?Ye(o[i])?o[i]():o.text():oe(o.status+""+o.statusText)}:Ua}async function Ua(){oe("No HTTP fetch method available.")}const Va=e=>!(Number.isNaN(+e)||e instanceof Date),qa={boolean:St,integer:Ce,number:Ce,date:Ct,string:Mt,unknown:ce},Ha=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>Va(e)&&Number.isInteger(+e),Va,e=>!Number.isNaN(Date.parse(e))],$a=["boolean","integer","number","date"];function Wa(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=Ha.length,i=Ha.map(((e,t)=>t+1));for(let a,s,l=0,c=0;l<n;++l)for(s=t?e[l][t]:e[l],a=0;a<r;++a)if(i[a]&&null!=(o=s)&&o==o&&!Ha[a](s)&&(i[a]=0,++c,c===Ha.length))return"string";var o;return $a[i.reduce(((e,t)=>0===e?t:e),0)-1]}function Ga(e,t){return t.reduce(((t,n)=>(t[n]=Wa(e,n),t)),{})}function Ya(e){const t=function(t,n){const r={delimiter:e};return Xa(t,n?nt(n,r):r)};return t.responseType="text",t}function Xa(e,t){return t.header&&(e=t.header.map(Tt).join(t.delimiter)+"\n"+e),Ft(t.delimiter).parse(e+"")}function Za(e,t){const n=t&&t.property?se(t.property):ce;return!we(e)||(r=e,"function"==typeof Buffer&&Ye(Buffer.isBuffer)&&Buffer.isBuffer(r))?n(JSON.parse(e)):function(e,t){return!xe(e)&&pt(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(n(e),t);var r}Xa.responseType="text",Za.responseType="json";const Ka={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function Ja(e,t){let n,r,i,o;return e=Za(e,t),t&&t.feature?(n=jt,i=t.feature):t&&t.mesh?(n=Ht,i=t.mesh,o=Ka[t.filter]):oe("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,o):oe("Invalid TopoJSON object: "+i),r&&r.features||[r]}Ja.responseType="json";const Qa={dsv:Xa,csv:Ya(","),tsv:Ya("\t"),json:Za,topojson:Ja};function es(e,t){return arguments.length>1?(Qa[e]=t,this):at(Qa,e)?Qa[e]:null}function ts(e){const t=es(e);return t&&t.responseType||"text"}function ns(e,t,n,r){const i=es((t=t||{}).type||"json");return i||oe("Unknown data format type: "+t.type),e=i(e,t),t.parse&&function(e,t,n,r){if(!e.length)return;const i=Ea();n=n||i.timeParse,r=r||i.utcParse;let o,a,s,l,c,u,h=e.columns||Object.keys(e[0]);"auto"===t&&(t=Ga(e,h)),h=Object.keys(t);const d=h.map((e=>{const i=t[e];let o,a;if(i&&(i.startsWith("date:")||i.startsWith("utc:")))return o=i.split(/:(.+)?/,2),a=o[1],("'"===a[0]&&"'"===a[a.length-1]||'"'===a[0]&&'"'===a[a.length-1])&&(a=a.slice(1,-1)),("utc"===o[0]?r:n)(a);if(!qa[i])throw Error("Illegal format pattern: "+e+":"+i);return qa[i]}));for(s=0,c=e.length,u=h.length;s<c;++s)for(o=e[s],l=0;l<u;++l)a=h[l],o[a]=d[l](o[a])}(e,t.parse,n,r),at(e,"columns")&&delete e.columns,e}const rs=function(e,t){return t=>({options:t||{},sanitize:za,load:Na,fileAccess:!1,file:Fa(null),http:ja(e)})}("undefined"!=typeof fetch&&fetch);function is(e){const t=e||ce,n=[],r={};return n.add=e=>{const i=t(e);return r[i]||(r[i]=1,n.push(e)),n},n.remove=e=>{const i=t(e);if(r[i]){r[i]=0;const t=n.indexOf(e);t>=0&&n.splice(t,1)}return n},n}async function os(e,t){try{await t(e)}catch(t){e.error(t)}}const as=Symbol("vega_id");let ss=1;function ls(e){return!(!e||!cs(e))}function cs(e){return e[as]}function us(e,t){return e[as]=t,e}function hs(e){const t=e===Object(e)?e:{data:e};return cs(t)?t:us(t,ss++)}function ds(e){return fs(e,hs({}))}function fs(e,t){for(const n in e)t[n]=e[n];return t}function ps(e,t){return us(t,cs(e))}function gs(e,t){return e?t?(n,r)=>e(n,r)||cs(t(n))-cs(t(r)):(t,n)=>e(t,n)||cs(t)-cs(n):null}function ms(e){return e&&e.constructor===vs}function vs(){const e=[],t=[],n=[],r=[],i=[];let o=null,a=!1;return{constructor:vs,insert(t){const n=We(t),r=n.length;for(let t=0;t<r;++t)e.push(n[t]);return this},remove(e){const n=Ye(e)?r:t,i=We(e),o=i.length;for(let e=0;e<o;++e)n.push(i[e]);return this},modify(e,t,r){const o={field:t,value:et(r)};return Ye(e)?(o.filter=e,i.push(o)):(o.tuple=e,n.push(o)),this},encode(e,t){return Ye(e)?i.push({filter:e,field:t}):n.push({tuple:e,field:t}),this},clean(e){return o=e,this},reflow(){return a=!0,this},pulse(s,l){const c={},u={};let h,d,f,p,g,m;for(h=0,d=l.length;h<d;++h)c[cs(l[h])]=1;for(h=0,d=t.length;h<d;++h)g=t[h],c[cs(g)]=-1;for(h=0,d=r.length;h<d;++h)p=r[h],l.forEach((e=>{p(e)&&(c[cs(e)]=-1)}));for(h=0,d=e.length;h<d;++h)g=e[h],m=cs(g),c[m]?c[m]=1:s.add.push(hs(e[h]));for(h=0,d=l.length;h<d;++h)g=l[h],c[cs(g)]<0&&s.rem.push(g);function v(e,t,n){n?e[t]=n(e):s.encode=t,a||(u[cs(e)]=e)}for(h=0,d=n.length;h<d;++h)f=n[h],g=f.tuple,p=f.field,m=c[cs(g)],m>0&&(v(g,p,f.value),s.modifies(p));for(h=0,d=i.length;h<d;++h)f=i[h],p=f.filter,l.forEach((e=>{p(e)&&c[cs(e)]>0&&v(e,f.field,f.value)})),s.modifies(f.field);if(a)s.mod=t.length||r.length?l.filter((e=>c[cs(e)]>0)):l.slice();else for(m in u)s.mod.push(u[m]);return(o||null==o&&(t.length||r.length))&&s.clean(!0),s}}}const ys="_:mod:_";function bs(){Object.defineProperty(this,ys,{writable:!0,value:{}})}bs.prototype={set(e,t,n,r){const i=this,o=i[e],a=i[ys];return null!=t&&t>=0?(o[t]!==n||r)&&(o[t]=n,a[t+":"+e]=-1,a[e]=-1):(o!==n||r)&&(i[e]=n,a[e]=xe(n)?1+n.length:-1),i},modified(e,t){const n=this[ys];if(!arguments.length){for(const e in n)if(n[e])return!0;return!1}if(xe(e)){for(let t=0;t<e.length;++t)if(n[e[t]])return!0;return!1}return null!=t&&t>=0?t+1<n[e]||!!n[t+":"+e]:!!n[e]},clear(){return this[ys]={},this}};let _s=0;const xs=new bs;function ws(e,t,n,r){this.id=++_s,this.value=e,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,t&&(this._update=t),n&&this.parameters(n,r)}function As(e){return function(t){const n=this.flags;return 0===arguments.length?!!(n&e):(this.flags=t?n|e:n&~e,this)}}ws.prototype={targets(){return this._targets||(this._targets=is(le))},set(e){return this.value!==e?(this.value=e,1):0},skip:As(1),modified:As(2),parameters(e,t,n){t=!1!==t;const r=this._argval=this._argval||new bs,i=this._argops=this._argops||[],o=[];let a,s,l,c;const u=(e,n,a)=>{a instanceof ws?(a!==this&&(t&&a.targets().add(this),o.push(a)),i.push({op:a,name:e,index:n})):r.set(e,n,a)};for(a in e)if(s=e[a],"pulse"===a)We(s).forEach((e=>{e instanceof ws?e!==this&&(e.targets().add(this),o.push(e)):oe("Pulse parameters must be operator instances.")})),this.source=s;else if(xe(s))for(r.set(a,-1,Array(l=s.length)),c=0;c<l;++c)u(a,c,s[c]);else u(a,-1,s);return this.marshall().clear(),n&&(i.initonly=!0),o},marshall(e){const t=this._argval||xs,n=this._argops;let r,i,o,a;if(n){const s=n.length;for(i=0;i<s;++i)r=n[i],o=r.op,a=o.modified()&&o.stamp===e,t.set(r.name,r.index,o.value,a);if(n.initonly){for(i=0;i<s;++i)r=n[i],r.op.targets().remove(this);this._argops=null,this._update=null}}return t},detach(){const e=this._argops;let t,n,r,i;if(e)for(t=0,n=e.length;t<n;++t)r=e[t],i=r.op,i._targets&&i._targets.remove(this);this.pulse=null,this.source=null},evaluate(e){const t=this._update;if(t){const n=this.marshall(e.stamp),r=t.call(this,n,e);if(n.clear(),r!==this.value)this.value=r;else if(!this.modified())return e.StopPropagation}},run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?(this.skip(!1),t=0):t=this.evaluate(e),this.pulse=t||e}};let ks=0;function Ts(e,t,n){this.id=++ks,this.value=null,n&&(this.receive=n),e&&(this._filter=e),t&&(this._apply=t)}function Ss(e,t,n){return new Ts(e,t,n)}Ts.prototype={_filter:de,_apply:ce,targets(){return this._targets||(this._targets=is(le))},consume(e){return arguments.length?(this._consume=!!e,this):!!this._consume},receive(e){if(this._filter(e)){const t=this.value=this._apply(e),n=this._targets,r=n?n.length:0;for(let e=0;e<r;++e)n[e].receive(t);this._consume&&(e.preventDefault(),e.stopPropagation())}},filter(e){const t=Ss(e);return this.targets().add(t),t},apply(e){const t=Ss(null,e);return this.targets().add(t),t},merge(){const e=Ss();this.targets().add(e);for(let t=0,n=arguments.length;t<n;++t)arguments[t].targets().add(e);return e},throttle(e){let t=-1;return this.filter((()=>{const n=Date.now();return n-t>e?(t=n,1):0}))},debounce(e){const t=Ss();return this.targets().add(Ss(null,null,tt(e,(e=>{const n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},between(e,t){let n=!1;return e.targets().add(Ss(null,null,(()=>n=!0))),t.targets().add(Ss(null,null,(()=>n=!1))),this.filter((()=>n))},detach(){this._filter=de,this._targets=null}};const Es={skip:!0};function Cs(e,t,n,r,i,o){const a=nt({},o,Es);let s,l;Ye(n)||(n=et(n)),void 0===r?s=t=>e.touch(n(t)):Ye(r)?(l=new ws(null,r,i,!1),s=t=>{l.evaluate(t);const r=n(t),i=l.value;ms(i)?e.pulse(r,i,o):e.update(r,i,a)}):s=t=>e.update(n(t),r,a),t.apply(s)}function Ms(e,t,n,r,i,o){if(void 0===r)t.targets().add(n);else{const a=o||{},s=new ws(null,function(e,t){return t=Ye(t)?t:et(t),e?function(n,r){const i=t(n,r);return e.skip()||(e.skip(i!==this.value).value=i),i}:t}(n,r),i,!1);s.modified(a.force),s.rank=t.rank,t.targets().add(s),n&&(s.skip(!0),s.value=n.value,s.targets().add(n),e.connect(n,[s]))}}const Os={};function Ls(e,t,n){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function Ds(e,t){const n=[];return Dt(e,t,(e=>n.push(e))),n}function Is(e,t){const n={};return e.visit(t,(e=>{n[cs(e)]=1})),e=>n[cs(e)]?null:e}function Rs(e,t){return e?(n,r)=>e(n,r)&&t(n,r):t}function Ps(e,t,n,r){const i=this,o=n.length;let a=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=r||null,this.pulses=n;for(let e=0;e<o;++e){const r=n[e];if(r.stamp===t){if(r.fields){const e=i.fields||(i.fields={});for(const t in r.fields)e[t]=1}r.changed(i.ADD)&&(a|=i.ADD),r.changed(i.REM)&&(a|=i.REM),r.changed(i.MOD)&&(a|=i.MOD)}}this.changes=a}function Ns(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}Ls.prototype={StopPropagation:Os,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(e){return new Ls(this.dataflow).init(this,e)},clone(){const e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},addAll(){let e=this;return!e.source||e.add===e.rem||!e.rem.length&&e.source.length===e.add.length||(e=new Ls(this.dataflow).init(this),e.add=e.source,e.rem=[]),e},init(e,t){const n=this;return n.stamp=e.stamp,n.encode=e.encode,!e.fields||64&t||(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},runAfter(e){this.dataflow.runAfter(e)},changed(e){const t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},reflow(e){if(e)return this.fork(7).reflow();const t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,Is(this,1))),this},clean(e){return arguments.length?(this.cleans=!!e,this):this.cleans},modifies(e){const t=this.fields||(this.fields={});return xe(e)?e.forEach((e=>t[e]=!0)):t[e]=!0,this},modified(e,t){const n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?xe(e)?e.some((e=>n[e])):n[e]:!!n)},filter(e,t){const n=this;return 1&e&&(n.addF=Rs(n.addF,t)),2&e&&(n.remF=Rs(n.remF,t)),4&e&&(n.modF=Rs(n.modF,t)),16&e&&(n.srcF=Rs(n.srcF,t)),n},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=Ds(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=Ds(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=Ds(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const n=this,r=t;if(16&e)return Dt(n.source,n.srcF,r),n;1&e&&Dt(n.add,n.addF,r),2&e&&Dt(n.rem,n.remF,r),4&e&&Dt(n.mod,n.modF,r);const i=n.source;if(8&e&&i){const e=n.add.length+n.mod.length;e===i.length||Dt(i,e?Is(n,5):n.srcF,r)}return n}},ut(Ps,Ls,{fork(e){const t=new Ls(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(e=>t.add.push(e))),e&t.REM&&this.visit(t.REM,(e=>t.rem.push(e))),e&t.MOD&&this.visit(t.MOD,(e=>t.mod.push(e)))),t},changed(e){return this.changes&e},modified(e){const t=this,n=t.fields;return n&&t.changes&t.MOD?xe(e)?e.some((e=>n[e])):n[e]:0},filter(){oe("MultiPulse does not support filtering.")},materialize(){oe("MultiPulse does not support materialization.")},visit(e,t){const n=this,r=n.pulses,i=r.length;let o=0;if(e&n.SOURCE)for(;o<i;++o)r[o].visit(e,t);else for(;o<i;++o)r[o].stamp===n.stamp&&r[o].visit(e,t);return n}});const zs={skip:!1,force:!1};function Fs(e,t,n,r){let i,o;const a=e[n];for(;n>t&&(o=n-1>>1,i=e[o],r(a,i)<0);)e[n]=i,n=o;return e[n]=a}function Bs(){this.logger(_e()),this.logLevel(me),this._clock=0,this._rank=0,this._locale=Oa();try{this._loader=rs()}catch(e){}this._touched=is(le),this._input={},this._pulse=null,this._heap=function(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:n=>(t.push(n),Fs(t,0,t.length-1,e)),pop:()=>{const n=t.pop();let r;return t.length?(r=t[0],t[0]=n,function(e,t,n){const r=t,i=e.length,o=e[t];let a,s=1+(t<<1);for(;s<i;)a=s+1,a<i&&n(e[s],e[a])>=0&&(s=a),e[t]=e[s],s=1+((t=s)<<1);e[t]=o,Fs(e,r,t,n)}(t,0,e)):r=n,r}}}(((e,t)=>e.qrank-t.qrank)),this._postrun=[]}function js(e){return function(){return this._log[e].apply(this,arguments)}}function Us(e,t){ws.call(this,e,null,t)}Bs.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:js("error"),warn:js("warn"),info:js("info"),debug:js("debug"),logLevel:js("level"),cleanThreshold:1e4,add:function(e,t,n,r){let i,o=1;return e instanceof ws?i=e:e&&e.prototype instanceof ws?i=new e:Ye(e)?i=new ws(null,e):(o=0,i=new ws(e,t)),this.rank(i),o&&(r=n,n=t),n&&this.connect(i,i.parameters(n,r)),this.touch(i),i},connect:function(e,t){const n=e.rank,r=t.length;for(let i=0;i<r;++i)if(n<t[i].rank)return void this.rerank(e)},rank:function(e){e.rank=++this._rank},rerank:function(e){const t=[e];let n,r,i;for(;t.length;)if(this.rank(n=t.pop()),r=n._targets)for(i=r.length;--i>=0;)t.push(n=r[i]),n===e&&oe("Cycle detected in dataflow graph.")},pulse:function(e,t,n){this.touch(e,n||zs);const r=new Ls(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._input[e.id]=t.pulse(r,i),this},touch:function(e,t){const n=t||zs;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},update:function(e,t,n){const r=n||zs;return(e.set(t)||r.force)&&this.touch(e,r),this},changeset:vs,ingest:function(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},parse:function(e,t){const n=this.locale();return ns(e,t,n.timeParse,n.utcParse)},preload:async function(e,t,n){const r=this,i=r._pending||function(e){let t;const n=new Promise((e=>t=e));return n.requests=0,n.done=()=>{0==--n.requests&&(e._pending=null,t(e))},e._pending=n}(r);i.requests+=1;const o=await r.request(t,n);return r.pulse(e,r.changeset().remove(de).insert(o.data||[])),i.done(),o},request:async function(e,t){const n=this;let r,i=0;try{r=await n.loader().load(e,{context:"dataflow",response:ts(t&&t.type)});try{r=n.parse(r,t)}catch(t){i=-2,n.warn("Data ingestion failed",e,t)}}catch(t){i=-1,n.warn("Loading failed",e,t)}return{data:r,status:i}},events:function(e,t,n,r){const i=this,o=Ss(n,r),a=function(e){e.dataflow=i;try{o.receive(e)}catch(e){i.error(e)}finally{i.run()}};let s;s="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):We(e);const l=s.length;for(let e=0;e<l;++e)s[e].addEventListener(t,a);return o},on:function(e,t,n,r,i){return(e instanceof ws?Ms:Cs)(this,e,t,n,r,i),this},evaluate:async function(e,t,n){const r=this,i=[];if(r._pulse)return Ns(r);if(r._pending&&await r._pending,t&&await os(r,t),!r._touched.length)return r.debug("Dataflow invoked, but nothing to do."),r;const o=++r._clock;r._pulse=new Ls(r,o,e),r._touched.forEach((e=>r._enqueue(e,!0))),r._touched=is(le);let a,s,l,c=0;try{for(;r._heap.size()>0;)a=r._heap.pop(),a.rank===a.qrank?(s=a.run(r._getPulse(a,e)),s.then?s=await s:s.async&&(i.push(s.async),s=Os),s!==Os&&a._targets&&a._targets.forEach((e=>r._enqueue(e))),++c):r._enqueue(a,!0)}catch(e){r._heap.clear(),l=e}if(r._input={},r._pulse=null,r.debug(`Pulse ${o}: ${c} operators`),l&&(r._postrun=[],r.error(l)),r._postrun.length){const e=r._postrun.sort(((e,t)=>t.priority-e.priority));r._postrun=[];for(let t=0;t<e.length;++t)await os(r,e[t].callback)}return n&&await os(r,n),i.length&&Promise.all(i).then((e=>r.runAsync(null,(()=>{e.forEach((e=>{try{e(r)}catch(e){r.error(e)}}))})))),r},run:function(e,t,n){return this._pulse?Ns(this):(this.evaluate(e,t,n),this)},runAsync:async function(e,t,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(e,t,n)).then(r,r),this._running},runAfter:function(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(e){this.error(e)}},_enqueue:function(e,t){const n=e.stamp<this._clock;n&&(e.stamp=this._clock),(n||t)&&(e.qrank=e.rank,this._heap.push(e))},_getPulse:function(e,t){const n=e.source,r=this._clock;return n&&xe(n)?new Ps(this,r,n.map((e=>e.pulse)),t):this._input[e.id]||function(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==Os&&(e.source=t.source),e)}(this._pulse,n&&n.pulse)}},ut(Us,ws,{run(e){if(e.stamp<this.stamp)return e.StopPropagation;let t;return this.skip()?this.skip(!1):t=this.evaluate(e),t=t||e,t.then?t=t.then((e=>this.pulse=e)):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},transform(){}});const Vs={};function qs(e){const t=Hs(e);return t&&t.Definition||null}function Hs(e){return e=e&&e.toLowerCase(),at(Vs,e)?Vs[e]:null}function $s(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ws(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Gs(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Ys(e,t,n=0,r=e.length-1,i=$s){for(;r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Ys(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(Xs(e,n,t),i(e[r],o)>0&&Xs(e,n,r);a<s;){for(Xs(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?Xs(e,n,s):(++s,Xs(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Xs(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Zs(e){return null===e?NaN:+e}function Ks(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return Gs(e);if(t>=1)return Ws(e);var r,i=(r-1)*t,o=Math.floor(i),a=Ws(Ys(e,o).subarray(0,o+1));return a+(Gs(e.subarray(o+1))-a)*(i-o)}}function Js(e,t){return Ks(e,.5,t)}function*Qs(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)r=t(r,++n,e),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function el(e,t,n){const r=Float64Array.from(Qs(e,n));return r.sort($s),t.map((e=>function(e,t,n=Zs){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}(r,e)))}function tl(e,t){return el(e,[.25,.5,.75],t)}function nl(e,t){const n=e.length,r=function(e,t){const n=function(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let a=-1;for(let s of e)null!=(s=t(s,++a,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}(e,t);return n?Math.sqrt(n):n}(e,t),i=tl(e,t),o=(i[2]-i[0])/1.34;return 1.06*(Math.min(r,o)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)}function rl(e){const t=e.maxbins||20,n=e.base||10,r=Math.log(n),i=e.divide||[5,2];let o,a,s,l,c,u,h=e.extent[0],d=e.extent[1];const f=e.span||d-h||Math.abs(h)||1;if(e.step)o=e.step;else if(e.steps){for(l=f/t,c=0,u=e.steps.length;c<u&&e.steps[c]<l;++c);o=e.steps[Math.max(0,c-1)]}else{for(a=Math.ceil(Math.log(t)/r),s=e.minstep||0,o=Math.max(s,Math.pow(n,Math.round(Math.log(f)/r)-a));Math.ceil(f/o)>t;)o*=n;for(c=0,u=i.length;c<u;++c)l=o/i[c],l>=s&&f/l<=t&&(o=l)}l=Math.log(o);const p=l>=0?0:1+~~(-l/r),g=Math.pow(n,-p-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(h/o+g)*o,h=h<l?l-o:l,d=Math.ceil(d/o)*o),{start:h,stop:d===h?h+o:d,step:o}}var il=Math.random;function ol(e){il=e}function al(e,t,n,r){if(!e.length)return[void 0,void 0];const i=Float64Array.from(Qs(e,r)),o=i.length,a=t;let s,l,c,u;for(c=0,u=Array(a);c<a;++c){for(s=0,l=0;l<o;++l)s+=i[~~(il()*o)];u[c]=s/o}return u.sort($s),[Ks(u,n/2),Ks(u,1-n/2)]}function sl(e,t,n,r){r=r||(e=>e);const i=e.length,o=new Float64Array(i);let a,s=0,l=1,c=r(e[0]),u=c,h=c+t;for(;l<i;++l){if(a=r(e[l]),a>=h){for(u=(c+u)/2;s<l;++s)o[s]=u;h=a+t,c=a}u=a}for(u=(c+u)/2;s<l;++s)o[s]=u;return n?function(e,t){const n=e.length;let r,i,o=0,a=1;for(;e[o]===e[a];)++a;for(;a<n;){for(r=a+1;e[a]===e[r];)++r;if(e[a]-e[a-1]<t){for(i=a+(o+r-a-a>>1);i<a;)e[i++]=e[a];for(;i>a;)e[i--]=e[o]}o=a,a=r}return e}(o,t+t/4):o}function ll(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function cl(e,t){let n,r,i;null==t&&(t=e,e=0);const o={min(e){return arguments.length?(n=e||0,i=r-n,o):n},max(e){return arguments.length?(r=e||0,i=r-n,o):r},sample:()=>n+Math.floor(i*il()),pdf:e=>e===Math.floor(e)&&e>=n&&e<r?1/i:0,cdf(e){const t=Math.floor(e);return t<n?0:t>=r?1:(t-n+1)/i},icdf:e=>e>=0&&e<=1?n-1+Math.floor(e*i):NaN};return o.min(e).max(t)}const ul=Math.sqrt(2*Math.PI),hl=Math.SQRT2;let dl=NaN;function fl(e,t){e=e||0,t=null==t?1:t;let n,r,i=0,o=0;if(dl==dl)i=dl,dl=NaN;else{do{i=2*il()-1,o=2*il()-1,n=i*i+o*o}while(0===n||n>1);r=Math.sqrt(-2*Math.log(n)/n),i*=r,dl=o*r}return e+i*t}function pl(e,t,n){const r=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*ul)}function gl(e,t,n){const r=(e-(t=t||0))/(n=null==n?1:n),i=Math.abs(r);let o;if(i>37)o=0;else{const e=Math.exp(-i*i/2);let t;i<7.07106781186547?(t=.0352624965998911*i+.700383064443688,t=t*i+6.37396220353165,t=t*i+33.912866078383,t=t*i+112.079291497871,t=t*i+221.213596169931,t=t*i+220.206867912376,o=e*t,t=.0883883476483184*i+1.75566716318264,t=t*i+16.064177579207,t=t*i+86.7807322029461,t=t*i+296.564248779674,t=t*i+637.333633378831,t=t*i+793.826512519948,t=t*i+440.413735824752,o/=t):(t=i+.65,t=i+4/t,t=i+3/t,t=i+2/t,t=i+1/t,o=e/t/2.506628274631)}return r>0?1-o:o}function ml(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*hl*function(e){let t,n=-Math.log((1-e)*(1+e));return n<6.25?(n-=3.125,t=-364441206401782e-35,t=t*n-16850591381820166e-35,t=128584807152564e-32+t*n,t=11157877678025181e-33+t*n,t=t*n-1333171662854621e-31,t=20972767875968562e-33+t*n,t=6637638134358324e-30+t*n,t=t*n-4054566272975207e-29,t=t*n-8151934197605472e-29,t=26335093153082323e-28+t*n,t=t*n-12975133253453532e-27,t=t*n-5415412054294628e-26,t=1.0512122733215323e-9+t*n,t=t*n-4.112633980346984e-9,t=t*n-2.9070369957882005e-8,t=4.2347877827932404e-7+t*n,t=t*n-13654692000834679e-22,t=t*n-13882523362786469e-21,t=.00018673420803405714+t*n,t=t*n-.000740702534166267,t=t*n-.006033670871430149,t=.24015818242558962+t*n,t=1.6536545626831027+t*n):n<16?(n=Math.sqrt(n)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*n,t=t*n-2.7517406297064545e-7,t=1.8239629214389228e-8+t*n,t=15027403968909828e-22+t*n,t=t*n-4013867526981546e-21,t=29234449089955446e-22+t*n,t=12475304481671779e-21+t*n,t=t*n-47318229009055734e-21,t=6828485145957318e-20+t*n,t=24031110387097894e-21+t*n,t=t*n-.0003550375203628475,t=.0009532893797373805+t*n,t=t*n-.0016882755560235047,t=.002491442096107851+t*n,t=t*n-.003751208507569241,t=.005370914553590064+t*n,t=1.0052589676941592+t*n,t=3.0838856104922208+t*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,t=-27109920616438573e-27,t=t*n-2.555641816996525e-10,t=1.5076572693500548e-9+t*n,t=t*n-3.789465440126737e-9,t=7.61570120807834e-9+t*n,t=t*n-1.496002662714924e-8,t=2.914795345090108e-8+t*n,t=t*n-6.771199775845234e-8,t=2.2900482228026655e-7+t*n,t=t*n-9.9298272942317e-7,t=4526062597223154e-21+t*n,t=t*n-1968177810553167e-20,t=7599527703001776e-20+t*n,t=t*n-.00021503011930044477,t=t*n-.00013871931833623122,t=1.0103004648645344+t*n,t=4.849906401408584+t*n):t=1/0,t*e}(2*e-1)}function vl(e,t){let n,r;const i={mean(e){return arguments.length?(n=e||0,i):n},stdev(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>fl(n,r),pdf:e=>pl(e,n,r),cdf:e=>gl(e,n,r),icdf:e=>ml(e,n,r)};return i.mean(e).stdev(t)}function yl(e,t){const n=vl();let r=0;const i={data(n){return arguments.length?(e=n,r=n?n.length:0,i.bandwidth(t)):e},bandwidth(n){return arguments.length?(!(t=n)&&e&&(t=nl(e)),i):t},sample:()=>e[~~(il()*r)]+t*n.sample(),pdf(i){let o=0,a=0;for(;a<r;++a)o+=n.pdf((i-e[a])/t);return o/t/r},cdf(i){let o=0,a=0;for(;a<r;++a)o+=n.cdf((i-e[a])/t);return o/r},icdf(){throw Error("KDE icdf not supported.")}};return i.data(e)}function bl(e,t){return e=e||0,t=null==t?1:t,Math.exp(e+fl()*t)}function _l(e,t,n){if(e<=0)return 0;t=t||0,n=null==n?1:n;const r=(Math.log(e)-t)/n;return Math.exp(-.5*r*r)/(n*ul*e)}function xl(e,t,n){return gl(Math.log(e),t,n)}function wl(e,t,n){return Math.exp(ml(e,t,n))}function Al(e,t){let n,r;const i={mean(e){return arguments.length?(n=e||0,i):n},stdev(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>bl(n,r),pdf:e=>_l(e,n,r),cdf:e=>xl(e,n,r),icdf:e=>wl(e,n,r)};return i.mean(e).stdev(t)}function kl(e,t){let n,r=0;const i={weights(e){return arguments.length?(n=function(e){const t=[];let n,i=0;for(n=0;n<r;++n)i+=t[n]=null==e[n]?1:+e[n];for(n=0;n<r;++n)t[n]/=i;return t}(t=e||[]),i):t},distributions(n){return arguments.length?(n?(r=n.length,e=n):(r=0,e=[]),i.weights(t)):e},sample(){const t=il();let i=e[r-1],o=n[0],a=0;for(;a<r-1;o+=n[++a])if(t<o){i=e[a];break}return i.sample()},pdf(t){let i=0,o=0;for(;o<r;++o)i+=n[o]*e[o].pdf(t);return i},cdf(t){let i=0,o=0;for(;o<r;++o)i+=n[o]*e[o].cdf(t);return i},icdf(){throw Error("Mixture icdf not supported.")}};return i.distributions(e).weights(t)}function Tl(e,t){return null==t&&(t=null==e?1:e,e=0),e+(t-e)*il()}function Sl(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=t&&e<=n?1/(n-t):0}function El(e,t,n){return null==n&&(n=null==t?1:t,t=0),e<t?0:e>n?1:(e-t)/(n-t)}function Cl(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}function Ml(e,t){let n,r;const i={min(e){return arguments.length?(n=e||0,i):n},max(e){return arguments.length?(r=null==e?1:e,i):r},sample:()=>Tl(n,r),pdf:e=>Sl(e,n,r),cdf:e=>El(e,n,r),icdf:e=>Cl(e,n,r)};return null==t&&(t=null==e?1:e,e=0),i.min(e).max(t)}function Ol(e,t,n,r){const i=r-e*e,o=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-o*e,o]}function Ll(e,t,n,r){e=e.filter((e=>{let r=t(e),i=n(e);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&e.sort(((e,n)=>t(e)-t(n)));const i=e.length,o=new Float64Array(i),a=new Float64Array(i);let s,l,c,u=0,h=0,d=0;for(c of e)o[u]=s=+t(c),a[u]=l=+n(c),++u,h+=(s-h)/u,d+=(l-d)/u;for(u=0;u<i;++u)o[u]-=h,a[u]-=d;return[o,a,h,d]}function Dl(e,t,n,r){let i,o,a=-1;for(const s of e)i=t(s),o=n(s),null!=i&&(i=+i)>=i&&null!=o&&(o=+o)>=o&&r(i,o,++a)}function Il(e,t,n,r,i){let o=0,a=0;return Dl(e,t,n,((e,t)=>{const n=t-i(e),s=t-r;o+=n*n,a+=s*s})),1-o/a}function Rl(e,t,n){let r=0,i=0,o=0,a=0,s=0;Dl(e,t,n,((e,t)=>{++s,r+=(e-r)/s,i+=(t-i)/s,o+=(e*t-o)/s,a+=(e*e-a)/s}));const l=Ol(r,i,o,a),c=e=>l[0]+l[1]*e;return{coef:l,predict:c,rSquared:Il(e,t,n,i,c)}}function Pl(e,t,n){let r=0,i=0,o=0,a=0,s=0;Dl(e,t,n,((e,t)=>{++s,e=Math.log(e),r+=(e-r)/s,i+=(t-i)/s,o+=(e*t-o)/s,a+=(e*e-a)/s}));const l=Ol(r,i,o,a),c=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:c,rSquared:Il(e,t,n,i,c)}}function Nl(e,t,n){const[r,i,o,a]=Ll(e,t,n);let s,l,c,u=0,h=0,d=0,f=0,p=0;Dl(e,t,n,((e,t)=>{s=r[p++],l=Math.log(t),c=s*t,u+=(t*l-u)/p,h+=(c-h)/p,d+=(c*l-d)/p,f+=(s*c-f)/p}));const[g,m]=Ol(h/a,u/a,d/a,f/a),v=e=>Math.exp(g+m*(e-o));return{coef:[Math.exp(g-m*o),m],predict:v,rSquared:Il(e,t,n,a,v)}}function zl(e,t,n){let r=0,i=0,o=0,a=0,s=0,l=0;Dl(e,t,n,((e,t)=>{const n=Math.log(e),c=Math.log(t);++l,r+=(n-r)/l,i+=(c-i)/l,o+=(n*c-o)/l,a+=(n*n-a)/l,s+=(t-s)/l}));const c=Ol(r,i,o,a),u=e=>c[0]*Math.pow(e,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:u,rSquared:Il(e,t,n,s,u)}}function Fl(e,t,n){const[r,i,o,a]=Ll(e,t,n),s=r.length;let l,c,u,h,d=0,f=0,p=0,g=0,m=0;for(l=0;l<s;)c=r[l],u=i[l++],h=c*c,d+=(h-d)/l,f+=(h*c-f)/l,p+=(h*h-p)/l,g+=(c*u-g)/l,m+=(h*u-m)/l;const v=p-d*d,y=d*v-f*f,b=(m*d-g*f)/y,_=(g*v-m*f)/y,x=-b*d,w=e=>b*(e-=o)*e+_*e+x+a;return{coef:[x-_*o+b*o*o+a,_-2*b*o,b],predict:w,rSquared:Il(e,t,n,a,w)}}function Bl(e,t,n,r){if(1===r)return Rl(e,t,n);if(2===r)return Fl(e,t,n);const[i,o,a,s]=Ll(e,t,n),l=i.length,c=[],u=[],h=r+1;let d,f,p,g,m;for(d=0;d<h;++d){for(p=0,g=0;p<l;++p)g+=Math.pow(i[p],d)*o[p];for(c.push(g),m=new Float64Array(h),f=0;f<h;++f){for(p=0,g=0;p<l;++p)g+=Math.pow(i[p],d+f);m[f]=g}u.push(m)}u.push(c);const v=function(e){const t=e.length-1,n=[];let r,i,o,a,s;for(r=0;r<t;++r){for(a=r,i=r+1;i<t;++i)Math.abs(e[r][i])>Math.abs(e[r][a])&&(a=i);for(o=r;o<t+1;++o)s=e[o][r],e[o][r]=e[o][a],e[o][a]=s;for(i=r+1;i<t;++i)for(o=t;o>=r;o--)e[o][i]-=e[o][r]*e[r][i]/e[r][r]}for(i=t-1;i>=0;--i){for(s=0,o=i+1;o<t;++o)s+=e[o][i]*n[o];n[i]=(e[t][i]-s)/e[i][i]}return n}(u),y=e=>{e-=a;let t=s+v[0]+v[1]*e+v[2]*e*e;for(d=3;d<h;++d)t+=v[d]*Math.pow(e,d);return t};return{coef:jl(h,v,-a,s),predict:y,rSquared:Il(e,t,n,s,y)}}function jl(e,t,n,r){const i=Array(e);let o,a,s,l;for(o=0;o<e;++o)i[o]=0;for(o=e-1;o>=0;--o)for(s=t[o],l=1,i[o]+=s,a=1;a<=o;++a)l*=(o+1-a)/a,i[o-a]+=s*Math.pow(n,a)*l;return i[0]+=r,i}function Ul(e,t,n,r){const[i,o,a,s]=Ll(e,t,n,!0),l=i.length,c=Math.max(2,~~(r*l)),u=new Float64Array(l),h=new Float64Array(l),d=new Float64Array(l).fill(1);for(let e=-1;++e<=2;){const t=[0,c-1];for(let e=0;e<l;++e){const n=i[e],r=t[0],a=t[1],s=n-i[r]>i[a]-n?r:a;let l=0,c=0,f=0,p=0,g=0;const m=1/Math.abs(i[s]-n||1);for(let e=r;e<=a;++e){const t=i[e],r=o[e],a=Vl(Math.abs(n-t)*m)*d[e],s=t*a;l+=a,c+=s,f+=r*a,p+=r*s,g+=t*s}const[v,y]=Ol(c/l,f/l,p/l,g/l);u[e]=v+y*n,h[e]=Math.abs(o[e]-u[e]),ql(i,e+1,t)}if(2===e)break;const n=Js(h);if(Math.abs(n)<1e-12)break;for(let e,t,r=0;r<l;++r)e=h[r]/(6*n),d[r]=e>=1?1e-12:(t=1-e*e)*t}return function(e,t,n,r){const i=e.length,o=[];let a,s=0,l=0,c=[];for(;s<i;++s)a=e[s]+n,c[0]===a?c[1]+=(t[s]-c[1])/++l:(l=0,c[1]+=r,c=[a,t[s]],o.push(c));return c[1]+=r,o}(i,u,a,s)}function Vl(e){return(e=1-e*e*e)*e*e}function ql(e,t,n){const r=e[t];let i=n[0],o=n[1]+1;if(!(o>=e.length))for(;t>i&&e[o]-r<=r-e[i];)n[0]=++i,n[1]=o,++o}const Hl=.5*Math.PI/180;function $l(e,t,n,r){n=n||25,r=Math.max(n,r||200);const i=t=>[t,e(t)],o=t[0],a=t[1],s=a-o,l=s/r,c=[i(o)],u=[];if(n===r){for(let e=1;e<r;++e)c.push(i(o+e/n*s));return c.push(i(a)),c}u.push(i(a));for(let e=n;--e>0;)u.push(i(o+e/n*s));let h=c[0],d=u[u.length-1];const f=1/s,p=function(e,t){let n=e,r=e;const i=t.length;for(let e=0;e<i;++e){const i=t[e][1];i<n&&(n=i),i>r&&(r=i)}return 1/(r-n)}(h[1],u);for(;d;){const e=i((h[0]+d[0])/2);e[0]-h[0]>=l&&Wl(h,e,d,f,p)>Hl?u.push(e):(h=d,c.push(d),u.pop()),d=u[u.length-1]}return c}function Wl(e,t,n,r,i){const o=Math.atan2(i*(n[1]-e[1]),r*(n[0]-e[0])),a=Math.atan2(i*(t[1]-e[1]),r*(t[0]-e[0]));return Math.abs(o-a)}function Gl(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Yl(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Xl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Zl(e,t,n=0,r=e.length-1,i=Xl){for(;r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Zl(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(Kl(e,n,t),i(e[r],o)>0&&Kl(e,n,r);a<s;){for(Kl(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?Kl(e,n,s):(++s,Kl(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Kl(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Jl(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return Yl(e);if(t>=1)return Gl(e);var r,i=(r-1)*t,o=Math.floor(i),a=Gl(Zl(e,o).subarray(0,o+1));return a+(Yl(e.subarray(o+1))-a)*(i-o)}}function Ql(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}function ec(e){return e&&e.length?1===e.length?e[0]:(t=e,e=>{const n=t.length;let r=1,i=String(t[0](e));for(;r<n;++r)i+="|"+t[r](e);return i}):function(){return""};var t}function tc(e,t,n){return n||e+(t?"_"+t:"")}const nc=()=>{},rc={init:nc,add:nc,rem:nc,idx:0},ic={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.sum,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t<e.min||void 0===e.min)&&(e.min=t)},rem:(e,t)=>{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,n)=>{t<e.min&&(e.argmin=n)},rem:(e,t)=>{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,n)=>{t>e.max&&(e.argmax=n)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3}},oc=Object.keys(ic);function ac(e,t){return ic[e](t)}function sc(e,t){return e.idx-t.idx}function lc(){this.valid=0,this.missing=0,this._ops.forEach((e=>e.init(this)))}function cc(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach((n=>n.add(this,e,t)))):++this.missing}function uc(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach((n=>n.rem(this,e,t)))):--this.missing}function hc(e){return this._out.forEach((t=>e[t.out]=t.value(this))),e}function dc(e,t){const n=t||ce,r=function(e){const t={};e.forEach((e=>t[e.name]=e));const n=e=>{e.req&&e.req.forEach((e=>{t[e]||n(t[e]=ic[e]())}))};return e.forEach(n),Object.values(t).sort(sc)}(e),i=e.slice().sort(sc);function o(e){this._ops=r,this._out=i,this.cell=e,this.init()}return o.prototype.init=lc,o.prototype.add=cc,o.prototype.rem=uc,o.prototype.set=hc,o.prototype.get=n,o.fields=e.map((e=>e.out)),o}function fc(e){this._key=e?se(e):cs,this.reset()}oc.forEach((e=>{ic[e]=function(e,t){return n=>nt({name:e,out:n||e},rc,t)}(e,ic[e])}));const pc=fc.prototype;function gc(e){Us.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function mc(e){Us.call(this,null,e)}function vc(e,t,n){const r=e;let i=t||[],o=n||[],a={},s=0;return{add:e=>o.push(e),remove:e=>a[r(e)]=++s,size:()=>i.length,data:(e,t)=>(s&&(i=i.filter((e=>!a[r(e)])),a={},s=0),t&&e&&i.sort(e),o.length&&(i=e?xt(e,i,o.sort(e)):i.concat(o),o=[]),i)}}function yc(e){Us.call(this,[],e)}function bc(e){ws.call(this,null,_c,e)}function _c(e){return this.value&&!e.modified()?this.value:Xe(e.fields,e.orders)}function xc(e){Us.call(this,null,e)}function wc(e){Us.call(this,null,e)}pc.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},pc.add=function(e){this._add.push(e)},pc.rem=function(e){this._rem.push(e)},pc.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,n=this._key,r=e.length,i=t.length,o=Array(r-i),a={};let s,l,c;for(s=0;s<i;++s)a[n(t[s])]=1;for(s=0,l=0;s<r;++s)a[n(c=e[s])]?a[n(c)]=0:o[l++]=c;return this._rem=[],this._add=o},pc.distinct=function(e){const t=this.values(),n={};let r,i=t.length,o=0;for(;--i>=0;)r=e(t[i])+"",at(n,r)||(n[r]=1,++o);return o},pc.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),n=it(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},pc.argmin=function(e){return this.extent(e)[0]||{}},pc.argmax=function(e){return this.extent(e)[1]||{}},pc.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},pc.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},pc.quartile=function(e){return this._get===e&&this._q||(this._q=tl(this.values(),e),this._get=e),this._q},pc.q1=function(e){return this.quartile(e)[0]},pc.q2=function(e){return this.quartile(e)[1]},pc.q3=function(e){return this.quartile(e)[2]},pc.ci=function(e){return this._get===e&&this._ci||(this._ci=al(this.values(),1e3,.05,e),this._get=e),this._ci},pc.ci0=function(e){return this.ci(e)[0]},pc.ci1=function(e){return this.ci(e)[1]},gc.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:oc},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},ut(gc,Us,{transform(e,t){const n=this,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.modified();return n.stamp=r.stamp,n.value&&(i||t.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(e):{},t.visit(t.SOURCE,(e=>n.add(e)))):(n.value=n.value||n.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),r.modifies(n._outputs),n._drop=!1!==e.drop,e.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),t.clean()&&n._drop&&r.clean(!0).runAfter((()=>this.clean())),n.changes(r)},cross(){const e=this,t=e.value,n=e._dnames,r=n.map((()=>({}))),i=n.length;function o(e){let t,o,a,s;for(t in e)for(a=e[t].tuple,o=0;o<i;++o)r[o][s=a[n[o]]]=s}o(e._prev),o(t),function o(a,s,l){const c=n[l],u=r[l++];for(const n in u){const r=a?a+"|"+n:n;s[c]=u[n],l<i?o(r,s,l):t[r]||e.cell(r,s)}}("",{},0)},init(e){const t=this._inputs=[],n=this._outputs=[],r={};function i(e){const n=We(te(e)),i=n.length;let o,a=0;for(;a<i;++a)r[o=n[a]]||(r[o]=1,t.push(o))}this._dims=We(e.groupby),this._dnames=this._dims.map((e=>{const t=ee(e);return i(e),n.push(t),t})),this.cellkey=e.key?e.key:ec(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const o=e.fields||[null],a=e.ops||["count"],s=e.as||[],l=o.length,c={};let u,h,d,f,p,g;for(l!==a.length&&oe("Unmatched number of fields and aggregate ops."),g=0;g<l;++g)u=o[g],h=a[g],null==u&&"count"!==h&&oe("Null aggregate field specified."),f=ee(u),p=tc(h,f,s[g]),n.push(p),"count"!==h?(d=c[f],d||(i(u),d=c[f]=[],d.field=u,this._measures.push(d)),"count"!==h&&(this._countOnly=!1),d.push(ac(h,p))):this._counts.push(p);return this._measures=this._measures.map((e=>dc(e,e.field))),{}},cellkey:ec(),cell(e,t){let n=this.value[e];return n?0===n.num&&this._drop&&n.stamp<this.stamp?(n.stamp=this.stamp,this._adds[this._alen++]=n):n.stamp<this.stamp&&(n.stamp=this.stamp,this._mods[this._mlen++]=n):(n=this.value[e]=this.newcell(e,t),this._adds[this._alen++]=n),n},newcell(e,t){const n={key:e,num:0,agg:null,tuple:this.newtuple(t,this._prev&&this._prev[e]),stamp:this.stamp,store:!1};if(!this._countOnly){const e=this._measures,t=e.length;n.agg=Array(t);for(let r=0;r<t;++r)n.agg[r]=new e[r](n)}return n.store&&(n.data=new fc),n},newtuple(e,t){const n=this._dnames,r=this._dims,i=r.length,o={};for(let t=0;t<i;++t)o[n[t]]=r[t](e);return t?ps(t.tuple,o):hs(o)},clean(){const e=this.value;for(const t in e)0===e[t].num&&delete e[t]},add(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num+=1,this._countOnly)return;n.store&&n.data.add(e);const r=n.agg;for(let t=0,n=r.length;t<n;++t)r[t].add(r[t].get(e),e)},rem(e){const t=this.cellkey(e),n=this.cell(t,e);if(n.num-=1,this._countOnly)return;n.store&&n.data.rem(e);const r=n.agg;for(let t=0,n=r.length;t<n;++t)r[t].rem(r[t].get(e),e)},celltuple(e){const t=e.tuple,n=this._counts;e.store&&e.data.values();for(let r=0,i=n.length;r<i;++r)t[n[r]]=e.num;if(!this._countOnly){const n=e.agg;for(let e=0,r=n.length;e<r;++e)n[e].set(t)}return t},changes(e){const t=this._adds,n=this._mods,r=this._prev,i=this._drop,o=e.add,a=e.rem,s=e.mod;let l,c,u,h;if(r)for(c in r)l=r[c],i&&!l.num||a.push(l.tuple);for(u=0,h=this._alen;u<h;++u)o.push(this.celltuple(t[u])),t[u]=null;for(u=0,h=this._mlen;u<h;++u)l=n[u],(0===l.num&&i?a:s).push(this.celltuple(l)),n[u]=null;return this._alen=this._mlen=0,this._prev=null,e}}),mc.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]},ut(mc,Us,{transform(e,t){const n=!1!==e.interval,r=this._bins(e),i=r.start,o=r.step,a=e.as||["bin0","bin1"],s=a[0],l=a[1];let c;return c=e.modified()?(t=t.reflow(!0)).SOURCE:t.modified(te(e.field))?t.ADD_MOD:t.ADD,t.visit(c,n?e=>{const t=r(e);e[s]=t,e[l]=null==t?null:i+o*(1+(t-i)/o)}:e=>e[s]=r(e)),t.modifies(n?a:s)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,n=rl(e),r=n.step;let i,o,a=n.start,s=a+Math.ceil((n.stop-a)/r)*r;null!=(i=e.anchor)&&(o=i-(a+r*Math.floor((i-a)/r)),a+=o,s+=o);const l=function(e){let n=Ce(t(e));return null==n?null:n<a?-1/0:n>s?1/0:(n=Math.max(a,Math.min(n,s-r)),a+r*Math.floor(1e-14+(n-a)/r))};return l.start=a,l.stop=n.stop,l.step=r,this.value=Q(l,te(t),e.name||"bin_"+ee(t))}}),yc.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},ut(yc,Us,{transform(e,t){const n=t.fork(t.ALL),r=vc(cs,this.value,n.materialize(n.ADD).add),i=e.sort,o=t.changed()||i&&(e.modified("sort")||t.modified(i.fields));return n.visit(n.REM,r.remove),this.modified(o),this.value=n.source=r.data(gs(i),o),t.source&&t.source.root&&(this.value.root=t.source.root),n}}),ut(bc,ws),xc.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},ut(xc,Us,{transform(e,t){const n=t=>n=>{for(var r,i=function(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(s(n),e.case,o)||[],l=0,c=i.length;l<c;++l)a.test(r=i[l])||t(r)},r=this._parameterCheck(e,t),i=this._counts,o=this._match,a=this._stop,s=e.field,l=e.as||["text","count"],c=n((e=>i[e]=1+(i[e]||0))),u=n((e=>i[e]-=1));return r?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,u)),this._finish(t,l)},_parameterCheck(e,t){let n=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(e,t){const n=this._counts,r=this._tuples||(this._tuples={}),i=t[0],o=t[1],a=e.fork(e.NO_SOURCE|e.NO_FIELDS);let s,l,c;for(s in n)l=r[s],c=n[s]||0,!l&&c?(r[s]=l=hs({}),l[i]=s,l[o]=c,a.add.push(l)):0===c?(l&&a.rem.push(l),n[s]=null,r[s]=null):l[o]!==c&&(l[o]=c,a.mod.push(l));return a.modifies(t)}}),wc.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},ut(wc,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.as||["a","b"],i=r[0],o=r[1],a=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let s=this.value;return a?(s&&(n.rem=s),s=t.materialize(t.SOURCE).source,n.add=this.value=function(e,t,n,r){for(var i,o,a=[],s={},l=e.length,c=0;c<l;++c)for(s[t]=o=e[c],i=0;i<l;++i)s[n]=e[i],r(s)&&(a.push(hs(s)),(s={})[t]=o);return a}(s,i,o,e.filter||de)):n.mod=s,n.source=this.value,n.modifies(r)}});const Ac={kde:yl,mixture:kl,normal:vl,lognormal:Al,uniform:Ml};function kc(e,t){const n=e.function;at(Ac,n)||oe("Unknown distribution function: "+n);const r=Ac[n]();for(const n in e)"field"===n?r.data((e.from||t()).map(e[n])):"distributions"===n?r[n](e[n].map((e=>kc(e,t)))):"function"==typeof r[n]&&r[n](e[n]);return r}function Tc(e){Us.call(this,null,e)}const Sc=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],Ec={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Sc},{name:"weights",type:"number",array:!0}]};function Cc(e,t){return e?e.map(((e,n)=>t[n]||ee(e))):null}function Mc(e,t,n){const r=[],i=e=>e(l);let o,a,s,l,c,u;if(null==t)r.push(e.map(n));else for(o={},a=0,s=e.length;a<s;++a)l=e[a],c=t.map(i),u=o[c],u||(o[c]=u=[],u.dims=c,r.push(u)),u.push(n(l));return r}function Oc(e){Us.call(this,null,e)}function Lc(e){ws.call(this,null,Dc,e),this.modified(!0)}function Dc(e){const t=e.expr;return this.value&&!e.modified("expr")?this.value:Q((n=>t(n,e)),te(t),ee(t))}function Ic(e){Us.call(this,[void 0,void 0],e)}function Rc(e,t){ws.call(this,e),this.parent=t,this.count=0}function Pc(e){Us.call(this,{},e),this._keys=lt();const t=this._targets=[];t.active=0,t.forEach=e=>{for(let n=0,r=t.active;n<r;++n)e(t[n],n,t)}}function Nc(e){ws.call(this,null,zc,e)}function zc(e){return this.value&&!e.modified()?this.value:xe(e.name)?We(e.name).map((e=>se(e))):se(e.name,e.as)}function Fc(e){Us.call(this,lt(),e)}function Bc(e){Us.call(this,[],e)}function jc(e){Us.call(this,[],e)}function Uc(e){Us.call(this,null,e)}function Vc(e){Us.call(this,[],e)}Tc.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Sc.concat(Ec)},{name:"as",type:"string",array:!0,default:["value","density"]}]},ut(Tc,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=kc(e.distribution,function(e){return()=>e.materialize(e.SOURCE).source}(t)),i=e.steps||e.minsteps||25,o=e.steps||e.maxsteps||200;let a=e.method||"pdf";"pdf"!==a&&"cdf"!==a&&oe("Invalid density method: "+a),e.extent||r.data||oe("Missing density extent parameter."),a=r[a];const s=e.as||["value","density"],l=$l(a,e.extent||rt(r.data()),i,o).map((e=>{const t={};return t[s[0]]=e[0],t[s[1]]=e[1],hs(t)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}}),Oc.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},ut(Oc,Us,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const n=t.materialize(t.SOURCE).source,r=Mc(t.source,e.groupby,ce),i=e.smooth||!1,o=e.field,a=e.step||((e,t)=>kt(rt(e,t))/30)(n,o),s=gs(((e,t)=>o(e)-o(t))),l=e.as||"bin",c=r.length;let u,h=1/0,d=-1/0,f=0;for(;f<c;++f){const e=r[f].sort(s);u=-1;for(const t of sl(e,a,i,o))t<h&&(h=t),t>d&&(d=t),e[++u][l]=t}return this.value={start:h,stop:d,step:a},t.reflow(!0).modifies(l)}}),ut(Lc,ws),Ic.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},ut(Ic,Us,{transform(e,t){const n=this.value,r=e.field,i=t.changed()||t.modified(r.fields)||e.modified("field");let o=n[0],a=n[1];if((i||null==o)&&(o=1/0,a=-1/0),t.visit(i?t.SOURCE:t.ADD,(e=>{const t=Ce(r(e));null!=t&&(t<o&&(o=t),t>a&&(a=t))})),!Number.isFinite(o)||!Number.isFinite(a)){let e=ee(r);e&&(e=` for field "${e}"`),t.dataflow.warn(`Infinite extent${e}: [${o}, ${a}]`),o=a=void 0}this.value=[o,a]}}),ut(Rc,ws,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),ut(Pc,Us,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,n,r){const i=this.value;let o,a,s=at(i,e)&&i[e];return s?s.value.stamp<n.stamp&&(s.init(n),this.activate(s)):(a=r||(a=this._group[e])&&a.tuple,o=n.dataflow,s=new Rc(n.fork(n.NO_SOURCE),this),o.add(s).connect(t(o,e,a)),i[e]=s,this.activate(s)),s},clean(){const e=this.value;let t=0;for(const n in e)if(0===e[n].count){const r=e[n].detachSubflow;r&&r(),delete e[n],++t}if(t){const e=this._targets.filter((e=>e&&e.count>0));this.initTargets(e)}},initTargets(e){const t=this._targets,n=t.length,r=e?e.length:0;let i=0;for(;i<r;++i)t[i]=e[i];for(;i<n&&null!=t[i];++i)t[i]=null;t.active=r},transform(e,t){const n=t.dataflow,r=e.key,i=e.subflow,o=this._keys,a=e.modified("key"),s=e=>this.subflow(e,i,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(e=>{const t=cs(e),n=o.get(t);void 0!==n&&(o.delete(t),s(n).rem(e))})),t.visit(t.ADD,(e=>{const t=r(e);o.set(cs(e),t),s(t).add(e)})),a||t.modified(r.fields)?t.visit(t.MOD,(e=>{const t=cs(e),n=o.get(t),i=r(e);n===i?s(i).mod(e):(o.set(t,i),s(n).rem(e),s(i).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(e=>{s(o.get(cs(e))).mod(e)})),a&&t.visit(t.REFLOW,(e=>{const t=cs(e),n=o.get(t),i=r(e);n!==i&&(o.set(t,i),s(n).rem(e),s(i).add(e))})),t.clean()?n.runAfter((()=>{this.clean(),o.clean()})):o.empty>n.cleanThreshold&&n.runAfter(o.clean),t}}),ut(Nc,ws),Fc.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},ut(Fc,Us,{transform(e,t){const n=t.dataflow,r=this.value,i=t.fork(),o=i.add,a=i.rem,s=i.mod,l=e.expr;let c=!0;function u(t){const n=cs(t),i=l(t,e),u=r.get(n);i&&u?(r.delete(n),o.push(t)):i||u?c&&i&&!u&&s.push(t):(r.set(n,1),a.push(t))}return t.visit(t.REM,(e=>{const t=cs(e);r.has(t)?r.delete(t):a.push(e)})),t.visit(t.ADD,(t=>{l(t,e)?o.push(t):r.set(cs(t),1)})),t.visit(t.MOD,u),e.modified()&&(c=!1,t.visit(t.REFLOW,u)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i}}),Bc.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},ut(Bc,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,i=Cc(r,e.as||[]),o=e.index||null,a=i.length;return n.rem=this.value,t.visit(t.SOURCE,(e=>{const t=r.map((t=>t(e))),s=t.reduce(((e,t)=>Math.max(e,t.length)),0);let l,c,u,h=0;for(;h<s;++h){for(c=ds(e),l=0;l<a;++l)c[i[l]]=null==(u=t[l][h])?null:u;o&&(c[o]=h),n.add.push(c)}})),this.value=n.source=n.add,o&&n.modifies(o),n.modifies(i)}}),jc.Definition={type:"Fold",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0,length:2,default:["key","value"]}]},ut(jc,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,i=r.map(ee),o=e.as||["key","value"],a=o[0],s=o[1],l=r.length;return n.rem=this.value,t.visit(t.SOURCE,(e=>{for(let t,o=0;o<l;++o)t=ds(e),t[a]=i[o],t[s]=r[o](e),n.add.push(t)})),this.value=n.source=n.add,n.modifies(o)}}),Uc.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]},ut(Uc,Us,{transform(e,t){const n=e.expr,r=e.as,i=e.modified(),o=e.initonly?t.ADD:i?t.SOURCE:t.modified(n.fields)||t.modified(r)?t.ADD_MOD:t.ADD;return i&&(t=t.materialize().reflow(!0)),e.initonly||t.modifies(r),t.visit(o,(t=>t[r]=n(t,e)))}}),ut(Vc,Us,{transform(e,t){const n=t.fork(t.ALL),r=e.generator;let i,o,a,s=this.value,l=e.size-s.length;if(l>0){for(i=[];--l>=0;)i.push(a=hs(r(e))),s.push(a);n.add=n.add.length?n.materialize(n.ADD).add.concat(i):i}else o=s.slice(0,-l),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(o):o,s=s.slice(-l);return n.source=this.value=s,n}});const qc={value:"value",median:function(e,t){return Jl(e,.5,t)},mean:function(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n},min:Yl,max:Gl},Hc=[];function $c(e){Us.call(this,[],e)}function Wc(e){gc.call(this,e)}function Gc(e){Us.call(this,null,e)}function Yc(e){ws.call(this,null,Xc,e)}function Xc(e){return this.value&&!e.modified()?this.value:yt(e.fields,e.flat)}function Zc(e){Us.call(this,[],e),this._pending=null}function Kc(e,t,n){n.forEach(hs);const r=t.fork(t.NO_FIELDS&t.NO_SOURCE);return r.rem=e.value,e.value=r.source=r.add=n,e._pending=null,r.rem.length&&r.clean(!0),r}function Jc(e){Us.call(this,{},e)}function Qc(e){ws.call(this,null,eu,e)}function eu(e){if(this.value&&!e.modified())return this.value;const t=e.extents,n=t.length;let r,i,o=1/0,a=-1/0;for(r=0;r<n;++r)i=t[r],i[0]<o&&(o=i[0]),i[1]>a&&(a=i[1]);return[o,a]}function tu(e){ws.call(this,null,nu,e)}function nu(e){return this.value&&!e.modified()?this.value:e.values.reduce(((e,t)=>e.concat(t)),[])}function ru(e){Us.call(this,null,e)}function iu(e){gc.call(this,e)}function ou(e){Pc.call(this,e)}function au(e){Us.call(this,null,e)}function su(e){Us.call(this,null,e)}function lu(e){Us.call(this,null,e)}function cu(e){Us.call(this,null,e)}function uu(e){Us.call(this,[],e),this.count=0}function hu(e){Us.call(this,null,e)}function du(e){Us.call(this,null,e),this.modified(!0)}function fu(e){Us.call(this,null,e)}$c.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},ut($c,Us,{transform(e,t){var n,r,i,o,a,s,l,c,u,h,d=t.fork(t.ALL),f=function(e){var t,n=e.method||qc.value;if(null!=qc[n])return n===qc.value?(t=void 0!==e.value?e.value:0,()=>t):qc[n];oe("Unrecognized imputation method: "+n)}(e),p=function(e){const t=e.field;return e=>e?t(e):NaN}(e),g=ee(e.field),m=ee(e.key),v=(e.groupby||[]).map(ee),y=function(e,t,n,r){var i,o,a,s,l,c,u,h,d=e=>e(h),f=[],p=r?r.slice():[],g={},m={};for(p.forEach(((e,t)=>g[e]=t+1)),s=0,u=e.length;s<u;++s)c=n(h=e[s]),l=g[c]||(g[c]=p.push(c)),(a=m[o=(i=t?t.map(d):Hc)+""])||(a=m[o]=[],f.push(a),a.values=i),a[l-1]=h;return f.domain=p,f}(t.source,e.groupby,e.key,e.keyvals),b=[],_=this.value,x=y.domain.length;for(a=0,c=y.length;a<c;++a)for(i=(n=y[a]).values,r=NaN,l=0;l<x;++l)if(null==n[l]){for(o=y.domain[l],h={_impute:!0},s=0,u=i.length;s<u;++s)h[v[s]]=i[s];h[m]=o,h[g]=Number.isNaN(r)?r=f(n,p):r,b.push(hs(h))}return b.length&&(d.add=d.materialize(d.ADD).add.concat(b)),_.length&&(d.rem=d.materialize(d.REM).rem.concat(_)),this.value=b,d}}),Wc.Definition={type:"JoinAggregate",metadata:{modifies:!0},params:[{name:"groupby",type:"field",array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"ops",type:"enum",array:!0,values:oc},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]},ut(Wc,gc,{transform(e,t){const n=this,r=e.modified();let i;return n.value&&(r||t.modified(n._inputs,!0))?(i=n.value=r?n.init(e):{},t.visit(t.SOURCE,(e=>n.add(e)))):(i=n.value=n.value||this.init(e),t.visit(t.REM,(e=>n.rem(e))),t.visit(t.ADD,(e=>n.add(e)))),n.changes(),t.visit(t.SOURCE,(e=>{nt(e,i[n.cellkey(e)].tuple)})),t.reflow(r).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let n,r;for(n=0,r=this._alen;n<r;++n)this.celltuple(e[n]),e[n]=null;for(n=0,r=this._mlen;n<r;++n)this.celltuple(t[n]),t[n]=null;this._alen=this._mlen=0}}),Gc.Definition={type:"KDE",metadata:{generates:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"cumulative",type:"boolean",default:!1},{name:"counts",type:"boolean",default:!1},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:!0,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:!0,default:["value","density"]}]},ut(Gc,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=t.materialize(t.SOURCE).source,i=Mc(r,e.groupby,e.field),o=(e.groupby||[]).map(ee),a=e.bandwidth,s=e.cumulative?"cdf":"pdf",l=e.as||["value","density"],c=[];let u=e.extent,h=e.steps||e.minsteps||25,d=e.steps||e.maxsteps||200;"pdf"!==s&&"cdf"!==s&&oe("Invalid density method: "+s),"shared"===e.resolve&&(u||(u=rt(r,e.field)),h=d=e.steps||d),i.forEach((t=>{const n=yl(t,a)[s],r=e.counts?t.length:1;$l(n,u||rt(t),h,d).forEach((e=>{const n={};for(let e=0;e<o.length;++e)n[o[e]]=t.dims[e];n[l[0]]=e[0],n[l[1]]=e[1]*r,c.push(hs(n))}))})),this.value&&(n.rem=this.value),this.value=n.add=n.source=c}return n}}),ut(Yc,ws),ut(Zc,Us,{transform(e,t){const n=t.dataflow;if(this._pending)return Kc(this,t,this._pending);if(function(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}(e))return t.StopPropagation;if(e.values)return Kc(this,t,n.parse(e.values,e.format));if(e.async){const t=n.request(e.url,e.format).then((e=>(this._pending=We(e.data),e=>e.touch(this))));return{async:t}}return n.request(e.url,e.format).then((e=>Kc(this,t,We(e.data))))}}),Jc.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},ut(Jc,Us,{transform(e,t){const n=e.fields,r=e.index,i=e.values,o=null==e.default?null:e.default,a=e.modified(),s=n.length;let l,c,u,h=a?t.SOURCE:t.ADD,d=t,f=e.as;return i?(c=i.length,s>1&&!f&&oe('Multi-field lookup requires explicit "as" parameter.'),f&&f.length!==s*c&&oe('The "as" parameter has too few output field names.'),f=f||i.map(ee),l=function(e){for(var t,a,l=0,u=0;l<s;++l)if(null==(a=r.get(n[l](e))))for(t=0;t<c;++t,++u)e[f[u]]=o;else for(t=0;t<c;++t,++u)e[f[u]]=i[t](a)}):(f||oe("Missing output field names."),l=function(e){for(var t,i=0;i<s;++i)t=r.get(n[i](e)),e[f[i]]=null==t?o:t}),a?d=t.reflow(!0):(u=n.some((e=>t.modified(e.fields))),h|=u?t.MOD:0),t.visit(h,l),d.modifies(f)}}),ut(Qc,ws),ut(tu,ws),ut(ru,Us,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),iu.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:oc,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},ut(iu,gc,{_transform:gc.prototype.transform,transform(e,t){return this._transform(function(e,t){const n=e.field,r=e.value,i=("count"===e.op?"__count__":e.op)||"sum",o=te(n).concat(te(r)),a=function(e,t,n){const r={},i=[];return n.visit(n.SOURCE,(t=>{const n=e(t);r[n]||(r[n]=1,i.push(n))})),i.sort(Ze),t?i.slice(0,t):i}(n,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:a.map((()=>i)),fields:a.map((e=>function(e,t,n,r){return Q((r=>t(r)===e?n(r):NaN),r,e+"")}(e,n,r,o))),as:a.map((e=>e+"")),modified:e.modified.bind(e)}}(e,t),t)}}),ut(ou,Pc,{transform(e,t){const n=e.subflow,r=e.field,i=e=>this.subflow(cs(e),n,t,e);return(e.modified("field")||r&&t.modified(te(r)))&&oe("PreFacet does not support field modification."),this.initTargets(),r?(t.visit(t.MOD,(e=>{const t=i(e);r(e).forEach((e=>t.mod(e)))})),t.visit(t.ADD,(e=>{const t=i(e);r(e).forEach((e=>t.add(hs(e))))})),t.visit(t.REM,(e=>{const t=i(e);r(e).forEach((e=>t.rem(e)))}))):(t.visit(t.MOD,(e=>i(e).mod(e))),t.visit(t.ADD,(e=>i(e).add(e))),t.visit(t.REM,(e=>i(e).rem(e)))),t.clean()&&t.runAfter((()=>this.clean())),t}}),au.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},ut(au,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.fields,i=Cc(e.fields,e.as||[]),o=r?(e,t)=>function(e,t,n,r){for(let i=0,o=n.length;i<o;++i)t[r[i]]=n[i](e);return t}(e,t,r,i):fs;let a;return this.value?a=this.value:(t=t.addAll(),a=this.value={}),t.visit(t.REM,(e=>{const t=cs(e);n.rem.push(a[t]),a[t]=null})),t.visit(t.ADD,(e=>{const t=o(e,hs({}));a[cs(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{n.mod.push(o(e,a[cs(e)]))})),n}}),ut(su,Us,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),lu.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},ut(lu,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;const i=Mc(t.materialize(t.SOURCE).source,e.groupby,e.field),o=(e.groupby||[]).map(ee),a=[],s=e.step||.01,l=e.probs||Ql(s/2,1-1e-14,s),c=l.length;return i.forEach((e=>{const t=el(e,l);for(let n=0;n<c;++n){const i={};for(let t=0;t<o.length;++t)i[o[t]]=e.dims[t];i[r[0]]=l[n],i[r[1]]=t[n],a.push(hs(i))}})),this.value&&(n.rem=this.value),this.value=n.add=n.source=a,n}}),ut(cu,Us,{transform(e,t){let n,r;return this.value?r=this.value:(n=t=t.addAll(),r=this.value={}),e.derive&&(n=t.fork(t.NO_SOURCE),t.visit(t.REM,(e=>{const t=cs(e);n.rem.push(r[t]),r[t]=null})),t.visit(t.ADD,(e=>{const t=ds(e);r[cs(e)]=t,n.add.push(t)})),t.visit(t.MOD,(e=>{const t=r[cs(e)];for(const r in e)t[r]=e[r],n.modifies(r);n.mod.push(t)}))),n}}),uu.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},ut(uu,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE),r=e.modified("size"),i=e.size,o=this.value.reduce(((e,t)=>(e[cs(t)]=1,e)),{});let a=this.value,s=this.count,l=0;function c(e){let t,r;a.length<i?a.push(e):(r=~~((s+1)*il()),r<a.length&&r>=l&&(t=a[r],o[cs(t)]&&n.rem.push(t),a[r]=e)),++s}if(t.rem.length&&(t.visit(t.REM,(e=>{const t=cs(e);o[t]&&(o[t]=-1,n.rem.push(e)),--s})),a=a.filter((e=>-1!==o[cs(e)]))),(t.rem.length||r)&&a.length<i&&t.source&&(l=s=a.length,t.visit(t.SOURCE,(e=>{o[cs(e)]||c(e)})),l=-1),r&&a.length>i){const e=a.length-i;for(let t=0;t<e;++t)o[cs(a[t])]=-1,n.rem.push(a[t]);a=a.slice(e)}return t.mod.length&&t.visit(t.MOD,(e=>{o[cs(e)]&&n.mod.push(e)})),t.add.length&&t.visit(t.ADD,c),(t.add.length||l<0)&&(n.add=a.filter((e=>!o[cs(e)]))),this.count=s,this.value=n.source=a,n}}),hu.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},ut(hu,Us,{transform(e,t){if(this.value&&!e.modified())return;const n=t.materialize().fork(t.MOD),r=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=Ql(e.start,e.stop,e.step||1).map((e=>{const t={};return t[r]=e,hs(t)})),n.add=t.add.concat(this.value),n}}),ut(du,Us,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const pu=["unit0","unit1"];function gu(e){Us.call(this,lt(),e)}function mu(e){Us.call(this,null,e)}fu.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:xr,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:pu}]},ut(fu,Us,{transform(e,t){const n=e.field,r=!1!==e.interval,i="utc"===e.timezone,o=this._floor(e,t),a=(i?Kr:Zr)(o.unit).offset,s=e.as||pu,l=s[0],c=s[1],u=o.step;let h=o.start||1/0,d=o.stop||-1/0,f=t.ADD;return(e.modified()||t.modified(te(n)))&&(f=(t=t.reflow(!0)).SOURCE,h=1/0,d=-1/0),t.visit(f,(e=>{const t=n(e);let i,s;null==t?(e[l]=null,r&&(e[c]=null)):(e[l]=i=s=o(t),r&&(e[c]=s=a(i,u)),i<h&&(h=i),s>d&&(d=s))})),o.start=h,o.stop=d,t.modifies(r?s:l)},_floor(e,t){const n="utc"===e.timezone,{units:r,step:i}=e.units?{units:e.units,step:e.step||1}:fi({extent:e.extent||rt(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),o=Ar(r),a=this.value||{},s=(n?Gr:Hr)(o,i);return s.unit=Ee(o),s.units=o,s.step=i,s.start=a.start,s.stop=a.stop,this.value=s}}),ut(gu,Us,{transform(e,t){const n=t.dataflow,r=e.field,i=this.value,o=e=>i.set(r(e),e);let a=!0;return e.modified("field")||t.modified(r.fields)?(i.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,(e=>i.delete(r(e)))),t.visit(t.ADD,o)):a=!1,this.modified(a),i.empty>n.cleanThreshold&&n.runAfter(i.clean),t.fork()}}),ut(mu,Us,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(gs(e.sort)):t.source).map(e.field))}});const vu={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){const e=vu.rank(),t=e.next;return{init:e.init,next:e=>(t(e)-1)/(e.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const n=t.data,r=t.compare;let i=t.index;if(e<i){for(;i+1<n.length&&!r(n[i],n[i+1]);)++i;e=i}return(1+e)/n.length}}},ntile:function(e,t){(t=+t)>0||oe("ntile num must be greater than zero.");const n=vu.cume_dist(),r=n.next;return{init:n.init,next:e=>Math.ceil(t*r(e))}},lag:function(e,t){return t=+t||1,{next:n=>{const r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:n=>{const r=n.index+t,i=n.data;return r<i.length?e(i[r]):null}}},first_value:function(e){return{next:t=>e(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||oe("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(t-1);return r<n.i1?e(n.data[r]):null}}},prev_value:function(e){let t;return{init:()=>t=null,next:n=>{const r=e(n.data[n.index]);return null!=r?t=r:t}}},next_value:function(e){let t,n;return{init:()=>(t=null,n=-1),next:r=>{const i=r.data;return r.index<=n?t:(n=function(e,t,n){for(let r=t.length;n<r;++n)if(null!=e(t[n]))return n;return-1}(e,i,r.index))<0?(n=i.length,t=null):t=e(i[n])}}}},yu=Object.keys(vu);function bu(e){const t=We(e.ops),n=We(e.fields),r=We(e.params),i=We(e.as),o=this.outputs=[],a=this.windows=[],s={},l={},c=[],u=[];let h=!0;function d(e){We(te(e)).forEach((e=>s[e]=1))}d(e.sort),t.forEach(((e,t)=>{const s=n[t],f=ee(s),p=tc(e,f,i[t]);if(d(s),o.push(p),at(vu,e))a.push(function(e,t,n,r){const i=vu[e](t,n);return{init:i.init||ue,update:function(e,t){t[r]=i.next(e)}}}(e,n[t],r[t],p));else{if(null==s&&"count"!==e&&oe("Null aggregate field specified."),"count"===e)return void c.push(p);h=!1;let t=l[f];t||(t=l[f]=[],t.field=s,u.push(t)),t.push(ac(e,p))}})),(c.length||u.length)&&(this.cell=function(e,t,n){e=e.map((e=>dc(e,e.field)));const r={num:0,agg:null,store:!1,count:t};if(!n)for(var i=e.length,o=r.agg=Array(i),a=0;a<i;++a)o[a]=new e[a](r);if(r.store)var s=r.data=new fc;return r.add=function(e){if(r.num+=1,!n){s&&s.add(e);for(let t=0;t<i;++t)o[t].add(o[t].get(e),e)}},r.rem=function(e){if(r.num-=1,!n){s&&s.rem(e);for(let t=0;t<i;++t)o[t].rem(o[t].get(e),e)}},r.set=function(e){let i,a;for(s&&s.values(),i=0,a=t.length;i<a;++i)e[t[i]]=r.num;if(!n)for(i=0,a=o.length;i<a;++i)o[i].set(e)},r.init=function(){r.num=0,s&&s.reset();for(let e=0;e<i;++e)o[e].init()},r}(u,c,h)),this.inputs=Object.keys(s)}const _u=bu.prototype;function xu(e){Us.call(this,{},e),this._mlen=0,this._mods=[]}function wu(e,t,n,r){const i=r.sort,o=i&&!r.ignorePeers,a=r.frame||[null,0],s=e.data(n),l=s.length,c=o?function(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>Xl(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}(i):null,u={i0:0,i1:0,p0:0,p1:0,index:0,data:s,compare:i||et(-1)};t.init();for(let e=0;e<l;++e)Au(u,a,e,l),o&&ku(u,c),t.update(u,s[e])}function Au(e,t,n,r){e.p0=e.i0,e.p1=e.i1,e.i0=null==t[0]?0:Math.max(0,n-Math.abs(t[0])),e.i1=null==t[1]?r:Math.min(r,n+Math.abs(t[1])+1),e.index=n}function ku(e,t){const n=e.i0,r=e.i1-1,i=e.compare,o=e.data,a=o.length-1;n>0&&!i(o[n],o[n-1])&&(e.i0=t.left(o,o[n])),r<a&&!i(o[r],o[r+1])&&(e.i1=t.right(o,o[r]))}function Tu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Su(e){this._context=e}function Eu(){}function Cu(e){this._context=e}function Mu(e){this._context=e}function Ou(e,t){this._basis=new Su(e),this._beta=t}_u.init=function(){this.windows.forEach((e=>e.init())),this.cell&&this.cell.init()},_u.update=function(e,t){const n=this.cell,r=this.windows,i=e.data,o=r&&r.length;let a;if(n){for(a=e.p0;a<e.i0;++a)n.rem(i[a]);for(a=e.p1;a<e.i1;++a)n.add(i[a]);n.set(t)}for(a=0;a<o;++a)r[a].update(e,t)},xu.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:yu.concat(oc)},{name:"params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"frame",type:"number",null:!0,array:!0,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:!1}]},ut(xu,Us,{transform(e,t){this.stamp=t.stamp;const n=e.modified(),r=gs(e.sort),i=ec(e.groupby),o=e=>this.group(i(e));let a=this.state;a&&!n||(a=this.state=new bu(e)),n||t.modified(a.inputs)?(this.value={},t.visit(t.SOURCE,(e=>o(e).add(e)))):(t.visit(t.REM,(e=>o(e).remove(e))),t.visit(t.ADD,(e=>o(e).add(e))));for(let t=0,n=this._mlen;t<n;++t)wu(this._mods[t],a,r,e);return this._mlen=0,this._mods=[],t.reflow(n).modifies(a.outputs)},group(e){let t=this.value[e];return t||(t=this.value[e]=vc(cs),t.stamp=-1),t.stamp<this.stamp&&(t.stamp=this.stamp,this._mods[this._mlen++]=t),t}}),Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Cu.prototype={areaStart:Eu,areaEnd:Eu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Tu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Mu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Tu(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ou.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Lu=function e(t){function n(e){return 1===t?new Su(e):new Ou(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function Du(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Iu(e,t){this._context=e,this._k=(1-t)/6}Iu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Du(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Du(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ru=function e(t){function n(e){return new Iu(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Pu(e,t){this._context=e,this._k=(1-t)/6}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Du(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Nu=function e(t){function n(e){return new Pu(e,t)}return n.tension=function(t){return e(+t)},n}(0);function zu(e,t){this._context=e,this._k=(1-t)/6}zu.prototype={areaStart:Eu,areaEnd:Eu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Du(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fu=function e(t){function n(e){return new zu(e,t)}return n.tension=function(t){return e(+t)},n}(0);var Bu=Math.abs,ju=Math.atan2,Uu=Math.cos,Vu=Math.max,qu=Math.min,Hu=Math.sin,$u=Math.sqrt,Wu=1e-12,Gu=Math.PI,Yu=Gu/2,Xu=2*Gu;function Zu(e){return e>1?0:e<-1?Gu:Math.acos(e)}function Ku(e){return e>=1?Yu:e<=-1?-Yu:Math.asin(e)}function Ju(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Wu){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Wu){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function Qu(e,t){this._context=e,this._alpha=t}Qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ju(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const eh=function e(t){function n(e){return t?new Qu(e,t):new Iu(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function th(e,t){this._context=e,this._alpha=t}th.prototype={areaStart:Eu,areaEnd:Eu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ju(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const nh=function e(t){function n(e){return t?new th(e,t):new zu(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function rh(e,t){this._context=e,this._alpha=t}rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ju(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ih=function e(t){function n(e){return t?new rh(e,t):new Pu(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function oh(e){this._context=e}function ah(e){return new oh(e)}function sh(e){this._context=e}function lh(e){return e<0?-1:1}function ch(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(lh(o)+lh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function uh(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hh(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function dh(e){this._context=e}function fh(e){this._context=new ph(e)}function ph(e){this._context=e}function gh(e){this._context=e}function mh(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function vh(e,t){this._context=e,this._t=t}oh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},sh.prototype={areaStart:Eu,areaEnd:Eu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:hh(this,this._t0,uh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,hh(this,uh(this,n=ch(this,e,t)),n);break;default:hh(this,this._t0,n=ch(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(fh.prototype=Object.create(dh.prototype)).point=function(e,t){dh.prototype.point.call(this,t,e)},ph.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=mh(e),i=mh(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},vh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const yh=Math.PI,bh=2*yh,_h=1e-6,xh=bh-_h;function wh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ah(){return new wh}wh.prototype=Ah.prototype={constructor:wh,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>_h)if(Math.abs(u*s-l*c)>_h&&i){var d=n-o,f=r-a,p=s*s+l*l,g=d*d+f*f,m=Math.sqrt(p),v=Math.sqrt(h),y=i*Math.tan((yh-Math.acos((p+h-g)/(2*m*v)))/2),b=y/v,_=y/m;Math.abs(b-1)>_h&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>c*f)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>_h||Math.abs(this._y1-c)>_h)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%bh+bh),h>xh?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>_h&&(this._+="A"+n+","+n+",0,"+ +(h>=yh)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const kh=Ah;function Th(e){return function(){return e}}function Sh(e){return e.innerRadius}function Eh(e){return e.outerRadius}function Ch(e){return e.startAngle}function Mh(e){return e.endAngle}function Oh(e){return e&&e.padAngle}function Lh(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,h=s-o,d=h*l-u*c;if(!(d*d<Wu))return[e+(d=(u*(t-o)-h*(e-i))/d)*l,t+d*c]}function Dh(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/$u(s*s+l*l),u=c*l,h=-c*s,d=e+u,f=t+h,p=n+u,g=r+h,m=(d+p)/2,v=(f+g)/2,y=p-d,b=g-f,_=y*y+b*b,x=i-o,w=d*g-p*f,A=(b<0?-1:1)*$u(Vu(0,x*x*_-w*w)),k=(w*b-y*A)/_,T=(-w*y-b*A)/_,S=(w*b+y*A)/_,E=(-w*y+b*A)/_,C=k-m,M=T-v,O=S-m,L=E-v;return C*C+M*M>O*O+L*L&&(k=S,T=E),{cx:k,cy:T,x01:-u,y01:-h,x11:k*(i/x-1),y11:T*(i/x-1)}}function Ih(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Rh(e){return e[0]}function Ph(e){return e[1]}function Nh(e,t){var n=Th(!0),r=null,i=ah,o=null;function a(a){var s,l,c,u=(a=Ih(a)).length,h=!1;for(null==r&&(o=i(c=kh())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?Rh:Th(e),t="function"==typeof t?t:void 0===t?Ph:Th(t),a.x=function(t){return arguments.length?(e="function"==typeof t?t:Th(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Th(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:Th(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}function zh(e,t,n){var r=null,i=Th(!0),o=null,a=ah,s=null;function l(l){var c,u,h,d,f,p=(l=Ih(l)).length,g=!1,m=new Array(p),v=new Array(p);for(null==o&&(s=a(f=kh())),c=0;c<=p;++c){if(!(c<p&&i(d=l[c],c,l))===g)if(g=!g)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=u;--h)s.point(m[h],v[h]);s.lineEnd(),s.areaEnd()}g&&(m[c]=+e(d,c,l),v[c]=+t(d,c,l),s.point(r?+r(d,c,l):m[c],n?+n(d,c,l):v[c]))}if(f)return s=null,f+""||null}function c(){return Nh().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Rh:Th(+e),t="function"==typeof t?t:Th(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Ph:Th(+n),l.x=function(t){return arguments.length?(e="function"==typeof t?t:Th(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:Th(+t),l):e},l.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Th(+e),l):r},l.y=function(e){return arguments.length?(t="function"==typeof e?e:Th(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:Th(+e),l):t},l.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Th(+e),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:Th(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}Array.prototype.slice;const Fh={draw:function(e,t){var n=Math.sqrt(t/Gu);e.moveTo(n,0),e.arc(0,0,n,0,Xu)}};Math.sqrt(1/3);Math.sin(Gu/10),Math.sin(7*Gu/10);function Bh(e,t){if("undefined"!=typeof document&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}Math.sin(Xu/10),Math.cos(Xu/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);const jh=()=>"undefined"!=typeof Image?Image:null;function Uh(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Vh(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>Uh(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}const qh=Vh(Uh),Hh=qh.right,$h=(qh.left,Vh((function(e){return null===e?NaN:+e})).center,Hh);function Wh(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Gh(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const Yh=Symbol("implicit");function Xh(){var e=new Map,t=[],n=[],r=Yh;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==Yh)return r;e.set(o,a=t.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Map;for(const r of n){const n=r+"";e.has(n)||e.set(n,t.push(r))}return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Xh(t,n).unknown(r)},Wh.apply(i,arguments),i}var Zh=Math.sqrt(50),Kh=Math.sqrt(10),Jh=Math.sqrt(2);function Qh(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=ed(e,t,n))||!isFinite(a))return[];if(a>0){let n=Math.round(e/a),r=Math.round(t/a);for(n*a<e&&++n,r*a>t&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(e*a),r=Math.round(t*a);for(n/a<e&&++n,r/a>t&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}function ed(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Zh?10:o>=Kh?5:o>=Jh?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Zh?10:o>=Kh?5:o>=Jh?2:1)}function td(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Zh?i*=10:o>=Kh?i*=5:o>=Jh&&(i*=2),t<e?-i:i}var nd,rd=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function id(e){if(!(t=rd.exec(e)))throw new Error("invalid format: "+e);var t;return new od({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]})}function od(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function ad(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function sd(e){return(e=ad(Math.abs(e)))?e[1]:NaN}function ld(e,t){var n=ad(e,t);if(!n)return e+"";var r=n[0],i=n[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")}id.prototype=od.prototype,od.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const cd={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return ld(100*e,t)},r:ld,s:function(e,t){var n=ad(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(nd=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ad(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ud(e){return e}var hd,dd,fd,pd=Array.prototype.map,gd=["y","z","a","f","p","n","","m","","k","M","G","T","P","E","Z","Y"];function md(e,t,n,r){var i,o=td(e,t,n);switch((r=id(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(sd(t)/3)))-sd(Math.abs(e)))}(o,a))||(r.precision=i),fd(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,sd(t)-sd(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-sd(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return dd(r)}function vd(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yd(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>vd(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}function bd(e){return null===e?NaN:+e}hd=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?ud:(t=pd.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?ud:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(pd.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=id(e)).fill,n=e.align,h=e.sign,d=e.symbol,f=e.zero,p=e.width,g=e.comma,m=e.precision,v=e.trim,y=e.type;"n"===y?(g=!0,y="g"):cd[y]||(void 0===m&&(m=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===d?o:/[%p]/.test(y)?l:"",x=cd[y],w=/[defgprs%]/.test(y);function A(e){var i,o,l,d=b,A=_;if("c"===y)A=x(e)+A,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),m),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),d=(k?"("===h?h:c:"-"===h||"("===h?"":h)+d,A=("s"===y?gd[8+nd/3]:"")+A+(k&&"("===h?")":""),w)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){A=(46===l?a+e.slice(i+1):e.slice(i))+A,e=e.slice(0,i);break}}g&&!f&&(e=r(e,1/0));var T=d.length+e.length+A.length,S=T<p?new Array(p-T+1).join(t):"";switch(g&&f&&(e=r(S+e,S.length?p-A.length:1/0),S=""),n){case"<":e=d+e+A+S;break;case"=":e=d+S+e+A;break;case"^":e=S.slice(0,T=S.length>>1)+d+e+A+S.slice(T);break;default:e=S+d+e+A}return s(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),A.toString=function(){return e+""},A}return{format:h,formatPrefix:function(e,t){var n=h(((e=id(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(sd(t)/3))),i=Math.pow(10,-r),o=gd[8+r/3];return function(e){return n(i*e)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),dd=hd.format,fd=hd.formatPrefix;const _d=yd(vd),xd=_d.right,wd=(_d.left,yd(bd).center,xd);function Ad(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Td(){}var Sd=.7,Ed=1/Sd,Cd="\\s*([+-]?\\d+)\\s*",Md="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Od="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ld=/^#([0-9a-f]{3,8})$/,Dd=new RegExp("^rgb\\("+[Cd,Cd,Cd]+"\\)$"),Id=new RegExp("^rgb\\("+[Od,Od,Od]+"\\)$"),Rd=new RegExp("^rgba\\("+[Cd,Cd,Cd,Md]+"\\)$"),Pd=new RegExp("^rgba\\("+[Od,Od,Od,Md]+"\\)$"),Nd=new RegExp("^hsl\\("+[Md,Od,Od]+"\\)$"),zd=new RegExp("^hsla\\("+[Md,Od,Od,Md]+"\\)$"),Fd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Bd(){return this.rgb().formatHex()}function jd(){return this.rgb().formatRgb()}function Ud(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ld.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Vd(t):3===n?new Wd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?qd(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?qd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Dd.exec(e))?new Wd(t[1],t[2],t[3],1):(t=Id.exec(e))?new Wd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Rd.exec(e))?qd(t[1],t[2],t[3],t[4]):(t=Pd.exec(e))?qd(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Nd.exec(e))?Zd(t[1],t[2]/100,t[3]/100,1):(t=zd.exec(e))?Zd(t[1],t[2]/100,t[3]/100,t[4]):Fd.hasOwnProperty(e)?Vd(Fd[e]):"transparent"===e?new Wd(NaN,NaN,NaN,0):null}function Vd(e){return new Wd(e>>16&255,e>>8&255,255&e,1)}function qd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Wd(e,t,n,r)}function Hd(e){return e instanceof Td||(e=Ud(e)),e?new Wd((e=e.rgb()).r,e.g,e.b,e.opacity):new Wd}function $d(e,t,n,r){return 1===arguments.length?Hd(e):new Wd(e,t,n,null==r?1:r)}function Wd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Gd(){return"#"+Xd(this.r)+Xd(this.g)+Xd(this.b)}function Yd(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Xd(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qd(e,t,n,r)}function Kd(e){if(e instanceof Qd)return new Qd(e.h,e.s,e.l,e.opacity);if(e instanceof Td||(e=Ud(e)),!e)return new Qd;if(e instanceof Qd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Qd(a,s,l,e.opacity)}function Jd(e,t,n,r){return 1===arguments.length?Kd(e):new Qd(e,t,n,null==r?1:r)}function Qd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ef(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function tf(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function nf(e){return function(){return e}}function rf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):nf(isNaN(e)?t:e)}Ad(Td,Ud,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Bd,formatHex:Bd,formatHsl:function(){return Kd(this).formatHsl()},formatRgb:jd,toString:jd}),Ad(Wd,$d,kd(Td,{brighter:function(e){return e=null==e?Ed:Math.pow(Ed,e),new Wd(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Sd:Math.pow(Sd,e),new Wd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Gd,formatHex:Gd,formatRgb:Yd,toString:Yd})),Ad(Qd,Jd,kd(Td,{brighter:function(e){return e=null==e?Ed:Math.pow(Ed,e),new Qd(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Sd:Math.pow(Sd,e),new Qd(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Wd(ef(e>=240?e-240:e+120,i,r),ef(e,i,r),ef(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const of=function e(t){var n=function(e){return 1==(e=+e)?rf:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):nf(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=$d(e)).r,(t=$d(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=rf(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function af(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=$d(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}function sf(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=gf(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function lf(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function cf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function uf(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=gf(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}af((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return tf((n-r/t)*t,a,i,o,s)}})),af((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return tf((n-r/t)*t,i,o,a,s)}}));var hf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,df=new RegExp(hf.source,"g");function ff(e,t){var n,r,i,o=hf.lastIndex=df.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=hf.exec(e))&&(r=df.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:cf(n,r)})),o=df.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function pf(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function gf(e,t){var n,r=typeof t;return null==t||"boolean"===r?nf(t):("number"===r?cf:"string"===r?(n=Ud(t))?(t=n,of):ff:t instanceof Ud?of:t instanceof Date?lf:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pf:Array.isArray(t)?sf:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?uf:cf)(e,t)}function mf(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function vf(e){return+e}var yf=[0,1];function bf(e){return e}function _f(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function xf(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=_f(i,r),o=n(a,o)):(r=_f(r,i),o=n(o,a)),function(e){return o(r(e))}}function wf(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=_f(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=wd(e,t,1,r)-1;return o[n](i[n](t))}}function Af(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kf(){var e,t,n,r,i,o,a=yf,s=yf,l=gf,c=bf;function u(){var e=Math.min(a.length,s.length);return c!==bf&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?wf:xf,i=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return h.invert=function(n){return c(t((o||(o=r(s,a.map(e),cf)))(n)))},h.domain=function(e){return arguments.length?(a=Array.from(e,vf),u()):a.slice()},h.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},h.rangeRound=function(e){return s=Array.from(e),l=mf,u()},h.clamp=function(e){return arguments.length?(c=!!e||bf,u()):c!==bf},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,r){return e=n,t=r,u()}}function Tf(){return kf()(bf,bf)}function Sf(e){var t=e.domain;return e.ticks=function(e){var n=t();return Qh(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return md(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=ed(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Ef(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Cf(e){return Math.log(e)}function Mf(e){return Math.exp(e)}function Of(e){return-Math.log(-e)}function Lf(e){return-Math.exp(-e)}function Df(e){return isFinite(e)?+("1e"+e):e<0?0:e}function If(e){return function(t){return-e(-t)}}function Rf(e){var t,n,r=e(Cf,Mf),i=r.domain,o=10;function a(){return t=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(o),n=function(e){return 10===e?Df:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(o),i()[0]<0?(t=If(t),n=If(n),e(Of,Lf)):e(Cf,Mf),r}return r.base=function(e){return arguments.length?(o=+e,a()):o},r.domain=function(e){return arguments.length?(i(e),a()):i()},r.ticks=function(e){var r,a=i(),s=a[0],l=a[a.length-1];(r=l<s)&&(d=s,s=l,l=d);var c,u,h,d=t(s),f=t(l),p=null==e?10:+e,g=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),s>0){for(;d<=f;++d)for(u=1,c=n(d);u<o;++u)if(!((h=c*u)<s)){if(h>l)break;g.push(h)}}else for(;d<=f;++d)for(u=o-1,c=n(d);u>=1;--u)if(!((h=c*u)<s)){if(h>l)break;g.push(h)}2*g.length<p&&(g=Qh(s,l,p))}else g=Qh(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(e,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=dd(i)),e===1/0)return i;null==e&&(e=10);var a=Math.max(1,o*e/r.ticks().length);return function(e){var r=e/n(Math.round(t(e)));return r*o<o-.5&&(r*=o),r<=a?i(e):""}},r.nice=function(){return i(Ef(i(),{floor:function(e){return n(Math.floor(t(e)))},ceil:function(e){return n(Math.ceil(t(e)))}}))},r}function Pf(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Nf(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zf(e){return e<0?-e*e:e*e}function Ff(e){var t=e(bf,bf),n=1;function r(){return 1===n?e(bf,bf):.5===n?e(Nf,zf):e(Pf(n),Pf(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Sf(t)}function Bf(){var e=Ff(kf());return e.copy=function(){return Af(e,Bf()).exponent(e.exponent())},Wh.apply(e,arguments),e}function jf(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Uf(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Vf(e){var t=1,n=e(jf(t),Uf(t));return n.constant=function(n){return arguments.length?e(jf(t=+n),Uf(t)):t},Sf(n)}const qf=1e3,Hf=6e4,$f=36e5,Wf=864e5,Gf=6048e5,Yf=31536e6;var Xf=new Date,Zf=new Date;function Kf(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Kf((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return Xf.setTime(+t),Zf.setTime(+r),e(Xf),e(Zf),Math.floor(n(Xf,Zf))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Jf=Kf((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Jf.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Kf((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Jf:null};const Qf=Jf;Jf.range;var ep=Kf((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*qf)}),(function(e,t){return(t-e)/qf}),(function(e){return e.getUTCSeconds()}));const tp=ep;ep.range;var np=Kf((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*qf)}),(function(e,t){e.setTime(+e+t*Hf)}),(function(e,t){return(t-e)/Hf}),(function(e){return e.getMinutes()}));const rp=np;np.range;var ip=Kf((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*qf-e.getMinutes()*Hf)}),(function(e,t){e.setTime(+e+t*$f)}),(function(e,t){return(t-e)/$f}),(function(e){return e.getHours()}));const op=ip;ip.range;var ap=Kf((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Wf),(e=>e.getDate()-1));const sp=ap;function lp(e){return Kf((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hf)/Gf}))}ap.range;var cp=lp(0),up=lp(1),hp=lp(2),dp=lp(3),fp=lp(4),pp=lp(5),gp=lp(6),mp=(cp.range,up.range,hp.range,dp.range,fp.range,pp.range,gp.range,Kf((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})));const vp=mp;mp.range;var yp=Kf((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));yp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Kf((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const bp=yp;yp.range;var _p=Kf((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Hf)}),(function(e,t){return(t-e)/Hf}),(function(e){return e.getUTCMinutes()}));const xp=_p;_p.range;var wp=Kf((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*$f)}),(function(e,t){return(t-e)/$f}),(function(e){return e.getUTCHours()}));const Ap=wp;wp.range;var kp=Kf((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Wf}),(function(e){return e.getUTCDate()-1}));const Tp=kp;function Sp(e){return Kf((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Gf}))}kp.range;var Ep=Sp(0),Cp=Sp(1),Mp=Sp(2),Op=Sp(3),Lp=Sp(4),Dp=Sp(5),Ip=Sp(6),Rp=(Ep.range,Cp.range,Mp.range,Op.range,Lp.range,Dp.range,Ip.range,Kf((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})));const Pp=Rp;Rp.range;var Np=Kf((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Np.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Kf((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const zp=Np;function Fp(e,t,n,r,i,o){const a=[[tp,1,qf],[tp,5,5e3],[tp,15,15e3],[tp,30,3e4],[o,1,Hf],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,$f],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Wf],[r,2,1728e5],[n,1,Gf],[t,1,2592e6],[t,3,7776e6],[e,1,Yf]];function s(t,n,r){const i=Math.abs(n-t)/r,o=yd((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(td(t/Yf,n/Yf,r));if(0===o)return Qf.every(Math.max(td(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}Np.range;const[Bp,jp]=Fp(zp,Pp,Ep,Tp,Ap,xp),[Up,Vp]=Fp(bp,vp,cp,sp,op,rp);function qp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Hp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function $p(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Wp,Gp,Yp,Xp={"-":"",_:" ",0:"0"},Zp=/^\s*\d+/,Kp=/^%/,Jp=/[\\^$*+?|[\]().{}]/g;function Qp(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function eg(e){return e.replace(Jp,"\\$&")}function tg(e){return new RegExp("^(?:"+e.map(eg).join("|")+")","i")}function ng(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function rg(e,t,n){var r=Zp.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ig(e,t,n){var r=Zp.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function og(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ag(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function sg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function lg(e,t,n){var r=Zp.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function cg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ug(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function hg(e,t,n){var r=Zp.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function dg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function fg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function pg(e,t,n){var r=Zp.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function gg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vg(e,t,n){var r=Zp.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yg(e,t,n){var r=Zp.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function bg(e,t,n){var r=Zp.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function _g(e,t,n){var r=Kp.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xg(e,t,n){var r=Zp.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function wg(e,t,n){var r=Zp.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ag(e,t){return Qp(e.getDate(),t,2)}function kg(e,t){return Qp(e.getHours(),t,2)}function Tg(e,t){return Qp(e.getHours()%12||12,t,2)}function Sg(e,t){return Qp(1+Fi.count(ji(e),e),t,3)}function Eg(e,t){return Qp(e.getMilliseconds(),t,3)}function Cg(e,t){return Eg(e,t)+"000"}function Mg(e,t){return Qp(e.getMonth()+1,t,2)}function Og(e,t){return Qp(e.getMinutes(),t,2)}function Lg(e,t){return Qp(e.getSeconds(),t,2)}function Dg(e){var t=e.getDay();return 0===t?7:t}function Ig(e,t){return Qp(Oi.count(ji(e)-1,e),t,2)}function Rg(e){var t=e.getDay();return t>=4||0===t?Ri(e):Ri.ceil(e)}function Pg(e,t){return e=Rg(e),Qp(Ri.count(ji(e),e)+(4===ji(e).getDay()),t,2)}function Ng(e){return e.getDay()}function zg(e,t){return Qp(Li.count(ji(e)-1,e),t,2)}function Fg(e,t){return Qp(e.getFullYear()%100,t,2)}function Bg(e,t){return Qp((e=Rg(e)).getFullYear()%100,t,2)}function jg(e,t){return Qp(e.getFullYear()%1e4,t,4)}function Ug(e,t){var n=e.getDay();return Qp((e=n>=4||0===n?Ri(e):Ri.ceil(e)).getFullYear()%1e4,t,4)}function Vg(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qp(t/60|0,"0",2)+Qp(t%60,"0",2)}function qg(e,t){return Qp(e.getUTCDate(),t,2)}function Hg(e,t){return Qp(e.getUTCHours(),t,2)}function $g(e,t){return Qp(e.getUTCHours()%12||12,t,2)}function Wg(e,t){return Qp(1+Ci.count(Vi(e),e),t,3)}function Gg(e,t){return Qp(e.getUTCMilliseconds(),t,3)}function Yg(e,t){return Gg(e,t)+"000"}function Xg(e,t){return Qp(e.getUTCMonth()+1,t,2)}function Zg(e,t){return Qp(e.getUTCMinutes(),t,2)}function Kg(e,t){return Qp(e.getUTCSeconds(),t,2)}function Jg(e){var t=e.getUTCDay();return 0===t?7:t}function Qg(e,t){return Qp(_i.count(Vi(e)-1,e),t,2)}function em(e){var t=e.getUTCDay();return t>=4||0===t?ki(e):ki.ceil(e)}function tm(e,t){return e=em(e),Qp(ki.count(Vi(e),e)+(4===Vi(e).getUTCDay()),t,2)}function nm(e){return e.getUTCDay()}function rm(e,t){return Qp(xi.count(Vi(e)-1,e),t,2)}function im(e,t){return Qp(e.getUTCFullYear()%100,t,2)}function om(e,t){return Qp((e=em(e)).getUTCFullYear()%100,t,2)}function am(e,t){return Qp(e.getUTCFullYear()%1e4,t,4)}function sm(e,t){var n=e.getUTCDay();return Qp((e=n>=4||0===n?ki(e):ki.ceil(e)).getUTCFullYear()%1e4,t,4)}function lm(){return"+0000"}function cm(){return"%"}function um(e){return+e}function hm(e){return Math.floor(+e/1e3)}function dm(e){return new Date(e)}function fm(e){return e instanceof Date?+e:+new Date(+e)}function pm(e,t,n,r,i,o,a,s,l,c){var u=Tf(),h=u.invert,d=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),_=c("%Y");function x(e){return(l(e)<e?f:s(e)<e?p:a(e)<e?g:o(e)<e?m:r(e)<e?i(e)<e?v:y:n(e)<e?b:_)(e)}return u.invert=function(e){return new Date(h(e))},u.domain=function(e){return arguments.length?d(Array.from(e,fm)):d().map(dm)},u.ticks=function(t){var n=d();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?x:c(t)},u.nice=function(e){var n=d();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?d(Ef(n,e)):u},u.copy=function(){return Af(u,pm(e,t,n,r,i,o,a,s,l,c))},u}function gm(){var e,t,n,r,i,o=0,a=1,s=bf,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(gf),c.rangeRound=u(mf),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function mm(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function vm(){var e=Sf(gm()(bf));return e.copy=function(){return mm(e,vm())},Gh.apply(e,arguments)}function ym(){var e=Ff(gm());return e.copy=function(){return mm(e,ym()).exponent(e.exponent())},Gh.apply(e,arguments)}function bm(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}function _m(){var e,t,n,r,i,o,a,s=0,l=.5,c=1,u=1,h=bf,d=!1;function f(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(u*e<u*t?r:i),h(d?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,h=bm(e,[n,r,i]),f):[h(0),h(.5),h(1)]}}return f.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),n=o(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,f):[s,l,c]},f.clamp=function(e){return arguments.length?(d=!!e,f):d},f.interpolator=function(e){return arguments.length?(h=e,f):h},f.range=p(gf),f.rangeRound=p(mf),f.unknown=function(e){return arguments.length?(a=e,f):a},function(a){return o=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),u=t<e?-1:1,f}}function xm(){var e=Ff(_m());return e.copy=function(){return mm(e,xm()).exponent(e.exponent())},Gh.apply(e,arguments)}function wm(e,t,n=bd){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function Am(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function km(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return Am((n-r/t)*t,a,i,o,s)}}function Tm(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Am((n-r/t)*t,i,o,a,s)}}Wp=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=tg(i),u=ng(i),h=tg(o),d=ng(o),f=tg(a),p=ng(a),g=tg(s),m=ng(s),v=tg(l),y=ng(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Ag,e:Ag,f:Cg,g:Bg,G:Ug,H:kg,I:Tg,j:Sg,L:Eg,m:Mg,M:Og,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:um,s:hm,S:Lg,u:Dg,U:Ig,V:Pg,w:Ng,W:zg,x:null,X:null,y:Fg,Y:jg,Z:Vg,"%":cm},_={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:qg,e:qg,f:Yg,g:om,G:sm,H:Hg,I:$g,j:Wg,L:Gg,m:Xg,M:Zg,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:um,s:hm,S:Kg,u:Jg,U:Qg,V:tm,w:nm,W:rm,x:null,X:null,y:im,Y:am,Z:lm,"%":cm},x={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=m[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:fg,e:fg,f:bg,g:cg,G:lg,H:gg,I:gg,j:pg,L:yg,m:dg,M:mg,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:hg,Q:xg,s:wg,S:vg,u:ig,U:og,V:ag,w:rg,W:sg,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:cg,Y:lg,Z:ug,"%":_g};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Xp[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function A(e,t){return function(n){var r,i,o=$p(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Hp($p(o.y,0,1))).getUTCDay(),r=i>4||0===i?xi.ceil(r):xi(r),r=Ci.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=qp($p(o.y,0,1))).getDay(),r=i>4||0===i?Li.ceil(r):Li(r),r=Fi.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Hp($p(o.y,0,1)).getUTCDay():qp($p(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Hp(o)):qp(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=x[i in Xp?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),_.x=w(n,_),_.X=w(r,_),_.c=w(t,_),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=A(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=A(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Gp=Wp.format,Wp.parse,Yp=Wp.utcFormat,Wp.utcParse;const Sm=e=>()=>e;function Em(e,t){return function(n){return e+n*t}}function Cm(e,t){var n=t-e;return n?Em(e,n>180||n<-180?n-360*Math.round(n/360):n):Sm(isNaN(e)?t:e)}function Mm(e,t){var n=t-e;return n?Em(e,n):Sm(isNaN(e)?t:e)}const Om=function e(t){var n=function(e){return 1==(e=+e)?Mm:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Sm(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=$d(e)).r,(t=$d(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Mm(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Lm(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=$d(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}var Dm=Lm(km),Im=Lm(Tm);function Rm(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Pm(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Nm(e,t){return(Pm(t)?Rm:zm)(e,t)}function zm(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Hm(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Fm(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Bm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jm(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Hm(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Um=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vm=new RegExp(Um.source,"g");function qm(e,t){var n,r,i,o=Um.lastIndex=Vm.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Um.exec(e))&&(r=Vm.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Bm(n,r)})),o=Vm.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Hm(e,t){var n,r=typeof t;return null==t||"boolean"===r?Sm(t):("number"===r?Bm:"string"===r?(n=Ud(t))?(t=n,Om):qm:t instanceof Ud?Om:t instanceof Date?Fm:Pm(t)?Rm:Array.isArray(t)?zm:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?jm:Bm)(e,t)}function $m(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Wm(e,t){var n=Cm(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}function Gm(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ym,Xm=180/Math.PI,Zm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Km(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Xm,skewX:Math.atan(l)*Xm,scaleX:a,scaleY:s}}function Jm(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Bm(e,i)},{i:l-2,x:Bm(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Bm(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Bm(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Bm(e,n)},{i:s-2,x:Bm(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var Qm=Jm((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zm:Km(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),ev=Jm((function(e){return null==e?Zm:(Ym||(Ym=document.createElementNS("path_to_url","g")),Ym.setAttribute("transform",e),(e=Ym.transform.baseVal.consolidate())?Km((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Zm)}),", ",")",")");function tv(e){return((e=Math.exp(e))+1/e)/2}const nv=function e(t,n,r){function i(e,i){var o,a,s=e[0],l=e[1],c=e[2],u=i[0],h=i[1],d=i[2],f=u-s,p=h-l,g=f*f+p*p;if(g<1e-12)a=Math.log(d/c)/t,o=function(e){return[s+e*f,l+e*p,c*Math.exp(t*e*a)]};else{var m=Math.sqrt(g),v=(d*d-c*c+r*g)/(2*c*n*m),y=(d*d-c*c-r*g)/(2*d*n*m),b=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(y*y+1)-y);a=(_-b)/t,o=function(e){var r=e*a,i=tv(b),o=c/(n*m)*(i*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+b)-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+o*f,l+o*p,c*i/tv(t*r+b)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);function rv(e){return function(t,n){var r=e((t=Jd(t)).h,(n=Jd(n)).h),i=Mm(t.s,n.s),o=Mm(t.l,n.l),a=Mm(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=o(e),t.opacity=a(e),t+""}}}const iv=rv(Cm);var ov=rv(Mm),av=Math.PI/180,sv=180/Math.PI,lv=.96422,cv=.82521,uv=4/29,hv=6/29,dv=3*hv*hv;function fv(e){if(e instanceof gv)return new gv(e.l,e.a,e.b,e.opacity);if(e instanceof wv)return Av(e);e instanceof Wd||(e=Hd(e));var t,n,r=bv(e.r),i=bv(e.g),o=bv(e.b),a=mv((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=mv((.4360747*r+.3850649*i+.1430804*o)/lv),n=mv((.0139322*r+.0971045*i+.7141733*o)/cv)),new gv(116*a-16,500*(t-a),200*(a-n),e.opacity)}function pv(e,t,n,r){return 1===arguments.length?fv(e):new gv(e,t,n,null==r?1:r)}function gv(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function mv(e){return e>.008856451679035631?Math.pow(e,1/3):e/dv+uv}function vv(e){return e>hv?e*e*e:dv*(e-uv)}function yv(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function bv(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _v(e){if(e instanceof wv)return new wv(e.h,e.c,e.l,e.opacity);if(e instanceof gv||(e=fv(e)),0===e.a&&0===e.b)return new wv(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*sv;return new wv(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xv(e,t,n,r){return 1===arguments.length?_v(e):new wv(e,t,n,null==r?1:r)}function wv(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Av(e){if(isNaN(e.h))return new gv(e.l,0,0,e.opacity);var t=e.h*av;return new gv(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function kv(e,t){var n=Mm((e=pv(e)).l,(t=pv(t)).l),r=Mm(e.a,t.a),i=Mm(e.b,t.b),o=Mm(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=o(t),e+""}}function Tv(e){return function(t,n){var r=e((t=xv(t)).h,(n=xv(n)).h),i=Mm(t.c,n.c),o=Mm(t.l,n.l),a=Mm(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=o(e),t.opacity=a(e),t+""}}}Ad(gv,pv,kd(Td,{brighter:function(e){return new gv(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new gv(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Wd(yv(3.1338561*(t=lv*vv(t))-1.6168667*(e=1*vv(e))-.4906146*(n=cv*vv(n))),yv(-.9787684*t+1.9161415*e+.033454*n),yv(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ad(wv,xv,kd(Td,{brighter:function(e){return new wv(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new wv(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Av(this).rgb()}}));const Sv=Tv(Cm);var Ev=Tv(Mm),Cv=-.14861,Mv=1.78277,Ov=-.29227,Lv=-.90649,Dv=1.97294,Iv=Dv*Lv,Rv=Dv*Mv,Pv=Mv*Ov-Lv*Cv;function Nv(e){if(e instanceof Fv)return new Fv(e.h,e.s,e.l,e.opacity);e instanceof Wd||(e=Hd(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Pv*r+Iv*t-Rv*n)/(Pv+Iv-Rv),o=r-i,a=(Dv*(n-i)-Ov*o)/Lv,s=Math.sqrt(a*a+o*o)/(Dv*i*(1-i)),l=s?Math.atan2(a,o)*sv-120:NaN;return new Fv(l<0?l+360:l,s,i,e.opacity)}function zv(e,t,n,r){return 1===arguments.length?Nv(e):new Fv(e,t,n,null==r?1:r)}function Fv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Bv(e){return function t(n){function r(t,r){var i=e((t=zv(t)).h,(r=zv(r)).h),o=Mm(t.s,r.s),a=Mm(t.l,r.l),s=Mm(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}Ad(Fv,zv,kd(Td,{brighter:function(e){return e=null==e?Ed:Math.pow(Ed,e),new Fv(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Sd:Math.pow(Sd,e),new Fv(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*av,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Wd(255*(t+n*(Cv*r+Mv*i)),255*(t+n*(Ov*r+Lv*i)),255*(t+n*(Dv*r)),this.opacity)}}));const jv=Bv(Cm);var Uv=Bv(Mm);function Vv(e,t){void 0===t&&(t=e,e=Hm);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}function qv(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function Hv(e,t,n){const r=e-t+2*n;return e?r>0?r:1:0}const $v="linear",Wv="log",Gv="pow",Yv="sqrt",Xv="symlog",Zv="time",Kv="utc",Jv="sequential",Qv="diverging",ey="quantile",ty="quantize",ny="threshold",ry="ordinal",iy="point",oy="band",ay="bin-ordinal",sy="continuous",ly="discrete",cy="discretizing",uy="interpolating",hy="temporal";function dy(){const e=Xh().unknown(void 0),t=e.domain,n=e.range;let r,i,o=[0,1],a=!1,s=0,l=0,c=.5;function u(){const e=t().length,u=o[1]<o[0],h=o[1-u],d=Hv(e,s,l);let f=o[u-0];r=(h-f)/(d||1),a&&(r=Math.floor(r)),f+=(h-f-r*(e-s))*c,i=r*(1-s),a&&(f=Math.round(f),i=Math.round(i));const p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(e).map((e=>f+r*e));return n(u?p.reverse():p)}return delete e.unknown,e.domain=function(e){return arguments.length?(t(e),u()):t()},e.range=function(e){return arguments.length?(o=[+e[0],+e[1]],u()):o.slice()},e.rangeRound=function(e){return o=[+e[0],+e[1]],a=!0,u()},e.bandwidth=function(){return i},e.step=function(){return r},e.round=function(e){return arguments.length?(a=!!e,u()):a},e.padding=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),s=l,u()):s},e.paddingInner=function(e){return arguments.length?(s=Math.max(0,Math.min(1,e)),u()):s},e.paddingOuter=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),u()):l},e.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},e.invertRange=function(e){if(null==e[0]||null==e[1])return;const r=o[1]<o[0],a=r?n().reverse():n(),s=a.length-1;let l,c,u,h=+e[0],d=+e[1];return h!=h||d!=d||(d<h&&(u=h,h=d,d=u),d<a[0]||h>o[1-r])?void 0:(l=Math.max(0,Hh(a,h)-1),c=h===d?l:Hh(a,d)-1,h-a[l]>i+1e-10&&++l,r&&(u=l,l=s-c,c=s-u),l>c?void 0:t().slice(l,c+1))},e.invert=function(t){const n=e.invertRange([t,t]);return n?n[0]:n},e.copy=function(){return dy().domain(t()).range(o).round(a).paddingInner(s).paddingOuter(l).align(c)},u()}function fy(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return fy(t())},e}var py=Array.prototype.map;function gy(e){return py.call(e,Ce)}const my=Array.prototype.slice,vy={};function yy(e,t,n){const r=function(){const n=t();return n.invertRange||(n.invertRange=n.invert?(r=n,function(e){let t,n=e[0],i=e[1];return i<n&&(t=n,n=i,i=t),[r.invert(n),r.invert(i)]}):n.invertExtent?function(e){return function(t){const n=e.range();let r,i,o,a,s=t[0],l=t[1],c=-1;for(l<s&&(i=s,s=l,l=i),o=0,a=n.length;o<a;++o)n[o]>=s&&n[o]<=l&&(c<0&&(c=o),r=o);if(!(c<0))return s=e.invertExtent(n[c]),l=e.invertExtent(n[r]),[void 0===s[0]?s[1]:s[0],void 0===l[1]?l[0]:l[1]]}}(n):void 0),n.type=e,n;var r};return r.metadata=Ot(We(n)),r}function by(e,t,n){return arguments.length>1?(vy[e]=yy(e,t,n),this):_y(e)?vy[e]:void 0}function _y(e){return at(vy,e)}function xy(e,t){const n=vy[e];return n&&n.metadata[t]}function wy(e){return xy(e,sy)}function Ay(e){return xy(e,ly)}function ky(e){return xy(e,cy)}function Ty(e){return xy(e,Wv)}function Sy(e){return xy(e,uy)}function Ey(e){return xy(e,ey)}by("identity",(function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,vf),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,vf):[0,1],Sf(r)})),by($v,(function e(){var t=Tf();return t.copy=function(){return Af(t,e())},Wh.apply(t,arguments),Sf(t)}),sy),by(Wv,(function e(){var t=Rf(kf()).domain([1,10]);return t.copy=function(){return Af(t,e()).base(t.base())},Wh.apply(t,arguments),t}),[sy,Wv]),by(Gv,Bf,sy),by(Yv,(function(){return Bf.apply(null,arguments).exponent(.5)}),sy),by(Xv,(function e(){var t=Vf(kf());return t.copy=function(){return Af(t,e()).constant(t.constant())},Wh.apply(t,arguments)}),sy),by(Zv,(function(){return Wh.apply(pm(Up,Vp,bp,vp,cp,sp,op,rp,tp,Gp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[sy,hy]),by(Kv,(function(){return Wh.apply(pm(Bp,jp,zp,Pp,Ep,Tp,Ap,xp,tp,Yp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[sy,hy]),by(Jv,vm,[sy,uy]),by("".concat(Jv,"-").concat($v),vm,[sy,uy]),by("".concat(Jv,"-").concat(Wv),(function e(){var t=Rf(gm()).domain([1,10]);return t.copy=function(){return mm(t,e()).base(t.base())},Gh.apply(t,arguments)}),[sy,uy,Wv]),by("".concat(Jv,"-").concat(Gv),ym,[sy,uy]),by("".concat(Jv,"-").concat(Yv),(function(){return ym.apply(null,arguments).exponent(.5)}),[sy,uy]),by("".concat(Jv,"-").concat(Xv),(function e(){var t=Vf(gm());return t.copy=function(){return mm(t,e()).constant(t.constant())},Gh.apply(t,arguments)}),[sy,uy]),by("".concat(Qv,"-").concat($v),(function e(){var t=Sf(_m()(bf));return t.copy=function(){return mm(t,e())},Gh.apply(t,arguments)}),[sy,uy]),by("".concat(Qv,"-").concat(Wv),(function e(){var t=Rf(_m()).domain([.1,1,10]);return t.copy=function(){return mm(t,e()).base(t.base())},Gh.apply(t,arguments)}),[sy,uy,Wv]),by("".concat(Qv,"-").concat(Gv),xm,[sy,uy]),by("".concat(Qv,"-").concat(Yv),(function(){return xm.apply(null,arguments).exponent(.5)}),[sy,uy]),by("".concat(Qv,"-").concat(Xv),(function e(){var t=Vf(_m());return t.copy=function(){return mm(t,e()).constant(t.constant())},Gh.apply(t,arguments)}),[sy,uy]),by(ey,(function e(){var t,n=[],r=[],i=[];function o(){var e=0,t=Math.max(1,r.length);for(i=new Array(t-1);++e<t;)i[e-1]=wm(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[wd(i,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:n[0],t<i.length?i[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(vd),o()},a.range=function(e){return arguments.length?(r=Array.from(e),o()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},Wh.apply(a,arguments)}),[cy,ey]),by(ty,(function e(){var t,n=0,r=1,i=1,o=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[wd(o,e,0,i)]:t}function l(){var e=-1;for(o=new Array(i);++e<i;)o[e]=((e+1)*r-(e-i)*n)/(i+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(i=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,o[0]]:t>=i?[o[i-1],r]:[o[t-1],o[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},Wh.apply(Sf(s),arguments)}),cy),by(ny,(function e(){var t,n=[.5],r=[0,1],i=1;function o(e){return null!=e&&e<=e?r[wd(n,e,0,i)]:t}return o.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(n).range(r).unknown(t)},Wh.apply(o,arguments)}),cy),by(ay,(function e(){let t=[],n=[];function r(e){return null==e||e!=e?void 0:n[($h(t,e)-1)%n.length]}return r.domain=function(e){return arguments.length?(t=gy(e),r):t.slice()},r.range=function(e){return arguments.length?(n=my.call(e),r):n.slice()},r.tickFormat=function(e,n){return md(t[0],Ee(t),null==e?10:e,n)},r.copy=function(){return e().domain(r.domain()).range(r.range())},r}),[ly,cy]),by(ry,Xh,ly),by(oy,dy,ly),by(iy,(function(){return fy(dy().paddingInner(1))}),ly);const Cy=["clamp","base","constant","exponent"];function My(e,t){const n=t[0],r=Ee(t)-n;return function(t){return e(n+t*r)}}function Oy(e,t,n){return Vv(Iy(t||"rgb",n),e)}function Ly(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function Dy(e,t,n){const r=n-t;let i,o,a;return r&&Number.isFinite(r)?(i=(o=e.type).indexOf("-"),o=i<0?o:o.slice(i+1),a=by(o)().domain([t,n]).range([0,1]),Cy.forEach((t=>e[t]?a[t](e[t]()):0)),a):et(.5)}function Iy(e,t){const n=a[function(e){return"interpolate"+e.toLowerCase().split("-").map((e=>e[0].toUpperCase()+e.slice(1))).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}function Ry(e){const t=e.length/6|0,n=new Array(t);for(let r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}function Py(e,t){for(const n in e)zy(n,t(e[n]))}const Ny={};function zy(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Ny[e]=t,this):Ny[e]}Py({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:your_sha256_hash4bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:your_sha256_hash52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:your_sha256_hash9bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:your_sha256_hash56ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:your_sha256_hash99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:your_sha256_hashc5ffed6f"},Ry),Py({blues:your_sha256_hash90",greens:your_sha256_hash29",greys:your_sha256_hash1e",oranges:your_sha256_hash03",purples:your_sha256_hash8c",reds:your_sha256_hash13",blueGreen:your_sha256_hash29",bluePurple:your_sha256_hash71",greenBlue:your_sha256_hasha1",orangeRed:your_sha256_hash03",purpleBlue:your_sha256_hash81",purpleBlueGreen:your_sha256_hash53",purpleRed:your_sha256_hash3a",redPurple:your_sha256_hash74",yellowGreen:your_sha256_hash34",yellowOrangeBrown:your_sha256_hash04",yellowOrangeRed:your_sha256_hash25",blueOrange:your_sha256_hash07",brownBlueGreen:your_sha256_hash47",purpleGreen:your_sha256_hash29",purpleOrange:your_sha256_hash07",redBlue:your_sha256_hash85",redGrey:your_sha256_hash34",yellowGreenBlue:your_sha256_hash85",redYellowBlue:your_sha256_hash95",redYellowGreen:your_sha256_hash37",pinkYellowGreen:your_sha256_hash19",spectral:your_sha256_hasha2",viridis:your_sha256_hashyour_sha256_hashbf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:your_sha256_hashyour_sha256_hash6f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:your_sha256_hashyour_sha256_hash771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:your_sha256_hashyour_sha256_hash834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash,rainbow:your_sha256_hashyour_sha256_hashdfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:your_sha256_hashyour_sha256_hash2afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash,browns:your_sha256_hash32",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:your_sha256_hash67",warmGreys:your_sha256_hash4e",goldGreen:your_sha256_hash36",goldOrange:your_sha256_hash26",goldRed:your_sha256_hash3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(e=>Oy(Ry(e))));const Fy="symbol",By=e=>xe(e)?e.map((e=>String(e))):String(e),jy=(e,t)=>e[1]-t[1],Uy=(e,t)=>t[1]-e[1];function Vy(e,t,n){let r;return gt(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor(kt(e.domain())/n||1)))),we(t)&&(r=t.step,t=t.interval),vt(t)&&(t=e.type===Zv?Zr(t):e.type==Kv?Kr(t):oe("Only time and utc scales accept interval strings."),r&&(t=t.every(r))),t}function qy(e,t,n){let r=e.range(),i=r[0],o=Ee(r),a=jy;if(i>o&&(r=o,o=i,i=r,a=Uy),i=Math.floor(i),o=Math.ceil(o),t=t.map((t=>[t,e(t)])).filter((e=>i<=e[1]&&e[1]<=o)).sort(a).map((e=>e[0])),n>0&&t.length>1){const e=[t[0],Ee(t)];for(;t.length>n&&t.length>=3;)t=t.filter(((e,t)=>!(t%2)));t.length<3&&(t=e)}return t}function Hy(e,t){return e.bins?qy(e,e.bins):e.ticks?e.ticks(t):e.domain()}function $y(e,t,n,r,i,o){const a=t.type;let s=By;if(a===Zv||i===Zv)s=e.timeFormat(r);else if(a===Kv||i===Kv)s=e.utcFormat(r);else if(Ty(a)){const i=e.formatFloat(r);if(o||t.bins)s=i;else{const e=Wy(t,n,!1);s=t=>e(t)?i(t):""}}else if(t.tickFormat){const i=t.domain();s=e.formatSpan(i[0],i[i.length-1],n,r)}else r&&(s=e.format(r));return s}function Wy(e,t,n){const r=Hy(e,t),i=e.base(),o=Math.log(i),a=Math.max(1,i*t/r.length),s=e=>{let t=e/Math.pow(i,Math.round(Math.log(e)/o));return t*i<i-.5&&(t*=i),t<=a};return n?r.filter(s):s}const Gy={[ey]:"quantiles",[ty]:"thresholds",[ny]:"domain"},Yy={[ey]:"quantiles",[ty]:"domain"};function Xy(e,t){return e.bins?function(e){const t=e.slice(0,-1);return t.max=Ee(e),t}(e.bins):e.type===Wv?Wy(e,t,!0):Gy[e.type]?function(e){const t=[-1/0].concat(e);return t.max=1/0,t}(e[Gy[e.type]]()):Hy(e,t)}function Zy(e,t,n,r,i,o,a){const s=Yy[t.type]&&o!==Zv&&o!==Kv?function(e,t,n){const r=t[Yy[t.type]](),i=r.length;let o,a=i>1?r[1]-r[0]:r[0];for(o=1;o<i;++o)a=Math.min(a,r[o]-r[o-1]);return e.formatSpan(0,a,30,n)}(e,t,i):$y(e,t,n,i,o,a);return r===Fy&&(e=>Gy[e.type]||e.bins)(t)?Ky(s):"discrete"===r?Qy(s):eb(s)}const Ky=e=>(t,n,r)=>{const i=Jy(r[n+1],Jy(r.max,1/0)),o=tb(t,e),a=tb(i,e);return o&&a?o+" "+a:a?"< "+a:" "+o},Jy=(e,t)=>null!=e?e:t,Qy=e=>(t,n)=>n?e(t):null,eb=e=>t=>e(t),tb=(e,t)=>Number.isFinite(e)?t(e):null;function nb(e,t,n){n=n||{};const r=Math.max(3,n.maxlen||7),i=function(e,t,n,r){const i=r||t.type;return vt(n)&&function(e){return xy(e,hy)}(i)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||i!==Zv?n||i!==Kv?Zy(e,t,5,null,n,r,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,n.format,n.formatType);if(ky(t.type)){const e=Xy(t).slice(1).map(i),n=e.length;return"".concat(n," boundar").concat(1===n?"y":"ies",": ").concat(e.join(", "))}if(Ay(t.type)){const e=t.domain(),n=e.length,o=n>r?e.slice(0,r-2).map(i).join(", ")+", ending with "+e.slice(-1).map(i):e.map(i).join(", ");return"".concat(n," value").concat(1===n?"":"s",": ").concat(o)}{const e=t.domain();return"values from ".concat(i(e[0])," to ").concat(i(Ee(e)))}}let rb=0;const ib="p_";function ob(e){return e&&e.gradient}function ab(e,t,n){const r=e.gradient;let i=e.id,o="radial"===r?ib:"";return i||(i=e.id="gradient_"+rb++,"radial"===r?(e.x1=sb(e.x1,.5),e.y1=sb(e.y1,.5),e.r1=sb(e.r1,0),e.x2=sb(e.x2,.5),e.y2=sb(e.y2,.5),e.r2=sb(e.r2,.5),o=ib):(e.x1=sb(e.x1,0),e.y1=sb(e.y1,0),e.x2=sb(e.x2,1),e.y2=sb(e.y2,0))),t[i]=e,"url("+(n||"")+"#"+o+i+")"}function sb(e,t){return null!=e?e:t}function lb(e,t){var n,r=[];return n={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:r,stop:function(e,t){return r.push({offset:e,color:t}),n}}}const cb={basis:{curve:function(e){return new Su(e)}},"basis-closed":{curve:function(e){return new Cu(e)}},"basis-open":{curve:function(e){return new Mu(e)}},bundle:{curve:Lu,tension:"beta",value:.85},cardinal:{curve:Ru,tension:"tension",value:0},"cardinal-open":{curve:Nu,tension:"tension",value:0},"cardinal-closed":{curve:Fu,tension:"tension",value:0},"catmull-rom":{curve:eh,tension:"alpha",value:.5},"catmull-rom-closed":{curve:nh,tension:"alpha",value:.5},"catmull-rom-open":{curve:ih,tension:"alpha",value:.5},linear:{curve:ah},"linear-closed":{curve:function(e){return new sh(e)}},monotone:{horizontal:function(e){return new fh(e)},vertical:function(e){return new dh(e)}},natural:{curve:function(e){return new gh(e)}},step:{curve:function(e){return new vh(e,.5)}},"step-after":{curve:function(e){return new vh(e,1)}},"step-before":{curve:function(e){return new vh(e,0)}}};function ub(e,t,n){var r=at(cb,e)&&cb[e],i=null;return r&&(i=r.curve||r[t||"vertical"],r.tension&&null!=n&&(i=i[r.tension](n))),i}const hb={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},db=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\.\d+)(\.\d)/g,/(\d)([-+])/g,/\s|,|###/];function fb(e){const t=[];let n,r,i,o,a,s,l,c,u,h;const d=e.slice().replace(db[0],"###$1").split(db[1]).slice(1);for(l=0,u=d.length;l<u;++l){for(n=d[l],r=n.slice(1).trim().replace(db[2],"$1###$2").replace(db[3],"$1###$2").split(db[4]),a=n.charAt(0),i=[a],c=0,h=r.length;c<h;++c)(o=+r[c])===o&&i.push(o);if(s=hb[a.toLowerCase()],i.length-1>s){const e=i.length;for(c=1,t.push([a].concat(i.slice(c,c+=s))),a="M"===a?"L":"m"===a?"l":a;c<e;c+=s)t.push([a].concat(i.slice(c,c+s)))}else t.push(i)}return t}const pb=Math.PI/180,gb=Math.PI/2,mb=2*Math.PI,vb=Math.sqrt(3)/2;var yb={},bb={},_b=[].join;function xb(e){const t=_b.call(e);if(bb[t])return bb[t];var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7];const u=c*a,h=-l*s,d=l*a,f=c*s,p=Math.cos(i),g=Math.sin(i),m=Math.cos(o),v=Math.sin(o),y=.5*(o-i),b=Math.sin(.5*y),_=8/3*b*b/Math.sin(y),x=n+p-_*g,w=r+g+_*p,A=n+m,k=r+v,T=A+_*v,S=k-_*m;return bb[t]=[u*x+h*w,d*x+f*w,u*T+h*S,d*T+f*S,u*A+h*k,d*A+f*k]}const wb=["l",0,0,0,0,0,0,0];function Ab(e,t,n){const r=wb[0]=e[0];if("a"===r||"A"===r)wb[1]=t*e[1],wb[2]=n*e[2],wb[3]=e[3],wb[4]=e[4],wb[5]=e[5],wb[6]=t*e[6],wb[7]=n*e[7];else if("h"===r||"H"===r)wb[1]=t*e[1];else if("v"===r||"V"===r)wb[1]=n*e[1];else for(var i=1,o=e.length;i<o;++i)wb[i]=(i%2==1?t:n)*e[i];return wb}function kb(e,t,n,r,i,o){var a,s,l,c,u,h=null,d=0,f=0,p=0,g=0;null==n&&(n=0),null==r&&(r=0),null==i&&(i=1),null==o&&(o=i),e.beginPath&&e.beginPath();for(var m=0,v=t.length;m<v;++m){switch(a=t[m],1===i&&1===o||(a=Ab(a,i,o)),a[0]){case"l":d+=a[1],f+=a[2],e.lineTo(d+n,f+r);break;case"L":d=a[1],f=a[2],e.lineTo(d+n,f+r);break;case"h":d+=a[1],e.lineTo(d+n,f+r);break;case"H":d=a[1],e.lineTo(d+n,f+r);break;case"v":f+=a[1],e.lineTo(d+n,f+r);break;case"V":f=a[1],e.lineTo(d+n,f+r);break;case"m":d+=a[1],f+=a[2],e.moveTo(d+n,f+r);break;case"M":d=a[1],f=a[2],e.moveTo(d+n,f+r);break;case"c":s=d+a[5],l=f+a[6],p=d+a[3],g=f+a[4],e.bezierCurveTo(d+a[1]+n,f+a[2]+r,p+n,g+r,s+n,l+r),d=s,f=l;break;case"C":d=a[5],f=a[6],p=a[3],g=a[4],e.bezierCurveTo(a[1]+n,a[2]+r,p+n,g+r,d+n,f+r);break;case"s":s=d+a[3],l=f+a[4],p=2*d-p,g=2*f-g,e.bezierCurveTo(p+n,g+r,d+a[1]+n,f+a[2]+r,s+n,l+r),p=d+a[1],g=f+a[2],d=s,f=l;break;case"S":s=a[3],l=a[4],p=2*d-p,g=2*f-g,e.bezierCurveTo(p+n,g+r,a[1]+n,a[2]+r,s+n,l+r),d=s,f=l,p=a[1],g=a[2];break;case"q":s=d+a[3],l=f+a[4],p=d+a[1],g=f+a[2],e.quadraticCurveTo(p+n,g+r,s+n,l+r),d=s,f=l;break;case"Q":s=a[3],l=a[4],e.quadraticCurveTo(a[1]+n,a[2]+r,s+n,l+r),d=s,f=l,p=a[1],g=a[2];break;case"t":s=d+a[1],l=f+a[2],null===h[0].match(/[QqTt]/)?(p=d,g=f):"t"===h[0]?(p=2*d-c,g=2*f-u):"q"===h[0]&&(p=2*d-p,g=2*f-g),c=p,u=g,e.quadraticCurveTo(p+n,g+r,s+n,l+r),f=l,p=(d=s)+a[1],g=f+a[2];break;case"T":s=a[1],l=a[2],p=2*d-p,g=2*f-g,e.quadraticCurveTo(p+n,g+r,s+n,l+r),d=s,f=l;break;case"a":Tb(e,d+n,f+r,[a[1],a[2],a[3],a[4],a[5],a[6]+d+n,a[7]+f+r]),d+=a[6],f+=a[7];break;case"A":Tb(e,d+n,f+r,[a[1],a[2],a[3],a[4],a[5],a[6]+n,a[7]+r]),d=a[6],f=a[7];break;case"z":case"Z":e.closePath()}h=a}}function Tb(e,t,n,r){const i=function(e,t,n,r,i,o,a,s,l){const c=_b.call(arguments);if(yb[c])return yb[c];const u=a*pb,h=Math.sin(u),d=Math.cos(u),f=d*(s-e)*.5+h*(l-t)*.5,p=d*(l-t)*.5-h*(s-e)*.5;let g=f*f/((n=Math.abs(n))*n)+p*p/((r=Math.abs(r))*r);g>1&&(g=Math.sqrt(g),n*=g,r*=g);const m=d/n,v=h/n,y=-h/r,b=d/r,_=m*s+v*l,x=y*s+b*l,w=m*e+v*t,A=y*e+b*t;let k=1/((w-_)*(w-_)+(A-x)*(A-x))-.25;k<0&&(k=0);let T=Math.sqrt(k);o==i&&(T=-T);const S=.5*(_+w)-T*(A-x),E=.5*(x+A)+T*(w-_),C=Math.atan2(x-E,_-S);let M=Math.atan2(A-E,w-S)-C;M<0&&1===o?M+=mb:M>0&&0===o&&(M-=mb);const O=Math.ceil(Math.abs(M/(gb+.001))),L=[];for(let e=0;e<O;++e){const t=C+e*M/O,i=C+(e+1)*M/O;L[e]=[S,E,t,i,n,r,h,d]}return yb[c]=L}(r[5],r[6],r[0],r[1],r[3],r[4],r[2],t,n);for(let t=0;t<i.length;++t){const n=xb(i[t]);e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}}const Sb=.5773502691896257,Eb={circle:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(n,0),e.arc(0,0,n,0,mb)}},cross:{draw:function(e,t){var n=Math.sqrt(t)/2,r=n/2.5;e.moveTo(-n,-r),e.lineTo(-n,r),e.lineTo(-r,r),e.lineTo(-r,n),e.lineTo(r,n),e.lineTo(r,r),e.lineTo(n,r),e.lineTo(n,-r),e.lineTo(r,-r),e.lineTo(r,-n),e.lineTo(-r,-n),e.lineTo(-r,-r),e.closePath()}},diamond:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.closePath()}},square:{draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},arrow:{draw:function(e,t){var n=Math.sqrt(t)/2,r=n/7,i=n/2.5,o=n/8;e.moveTo(-r,n),e.lineTo(r,n),e.lineTo(r,-o),e.lineTo(i,-o),e.lineTo(0,-n),e.lineTo(-i,-o),e.lineTo(-r,-o),e.closePath()}},wedge:{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n,i=r-n*Sb,o=n/4;e.moveTo(0,-r-i),e.lineTo(-o,r-i),e.lineTo(o,r-i),e.closePath()}},triangle:{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n,i=r-n*Sb;e.moveTo(0,-r-i),e.lineTo(-n,r-i),e.lineTo(n,r-i),e.closePath()}},"triangle-up":{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n;e.moveTo(0,-r),e.lineTo(-n,r),e.lineTo(n,r),e.closePath()}},"triangle-down":{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n;e.moveTo(0,r),e.lineTo(-n,-r),e.lineTo(n,-r),e.closePath()}},"triangle-right":{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n;e.moveTo(r,0),e.lineTo(-r,-n),e.lineTo(-r,n),e.closePath()}},"triangle-left":{draw:function(e,t){var n=Math.sqrt(t)/2,r=vb*n;e.moveTo(-r,0),e.lineTo(r,-n),e.lineTo(r,n),e.closePath()}},stroke:{draw:function(e,t){const n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(n,0)}}};function Cb(e){return at(Eb,e)?Eb[e]:function(e){if(!at(Mb,e)){const t=fb(e);Mb[e]={draw:function(e,n){kb(e,t,0,0,Math.sqrt(n)/2)}}}return Mb[e]}(e)}var Mb={};const Ob=.448084975506;function Lb(e){return e.x}function Db(e){return e.y}function Ib(e){return e.width}function Rb(e){return e.height}function Pb(e){return"function"==typeof e?e:()=>+e}function Nb(e,t,n){return Math.max(t,Math.min(e,n))}function zb(){var e=Lb,t=Db,n=Ib,r=Rb,i=Pb(0),o=i,a=i,s=i,l=null;function c(c,u,h){var d,f=null!=u?u:+e.call(this,c),p=null!=h?h:+t.call(this,c),g=+n.call(this,c),m=+r.call(this,c),v=Math.min(g,m)/2,y=Nb(+i.call(this,c),0,v),b=Nb(+o.call(this,c),0,v),_=Nb(+a.call(this,c),0,v),x=Nb(+s.call(this,c),0,v);if(l||(l=d=kh()),y<=0&&b<=0&&_<=0&&x<=0)l.rect(f,p,g,m);else{var w=f+g,A=p+m;l.moveTo(f+y,p),l.lineTo(w-b,p),l.bezierCurveTo(w-Ob*b,p,w,p+Ob*b,w,p+b),l.lineTo(w,A-x),l.bezierCurveTo(w,A-Ob*x,w-Ob*x,A,w-x,A),l.lineTo(f+_,A),l.bezierCurveTo(f+Ob*_,A,f,A-Ob*_,f,A-_),l.lineTo(f,p+y),l.bezierCurveTo(f,p+Ob*y,f+Ob*y,p,f+y,p),l.closePath()}if(d)return l=null,d+""||null}return c.x=function(t){return arguments.length?(e=Pb(t),c):e},c.y=function(e){return arguments.length?(t=Pb(e),c):t},c.width=function(e){return arguments.length?(n=Pb(e),c):n},c.height=function(e){return arguments.length?(r=Pb(e),c):r},c.cornerRadius=function(e,t,n,r){return arguments.length?(i=Pb(e),o=null!=t?Pb(t):i,s=null!=n?Pb(n):i,a=null!=r?Pb(r):o,c):i},c.context=function(e){return arguments.length?(l=null==e?null:e,c):l},c}function Fb(){var e,t,n,r,i,o,a,s,l=null;function c(e,t,n){const r=n/2;if(i){var c=a-t,u=e-o;if(c||u){var h=Math.sqrt(c*c+u*u),d=(c/=h)*s,f=(u/=h)*s,p=Math.atan2(u,c);l.moveTo(o-d,a-f),l.lineTo(e-c*r,t-u*r),l.arc(e,t,r,p-Math.PI,p),l.lineTo(o+d,a+f),l.arc(o,a,s,p,p+Math.PI)}else l.arc(e,t,r,0,mb);l.closePath()}else i=1;o=e,a=t,s=r}function u(o){var a,s,u,h=o.length,d=!1;for(null==l&&(l=u=kh()),a=0;a<=h;++a)!(a<h&&r(s=o[a],a,o))===d&&(d=!d)&&(i=0),d&&c(+e(s,a,o),+t(s,a,o),+n(s,a,o));if(u)return l=null,u+""||null}return u.x=function(t){return arguments.length?(e=t,u):e},u.y=function(e){return arguments.length?(t=e,u):t},u.size=function(e){return arguments.length?(n=e,u):n},u.defined=function(e){return arguments.length?(r=e,u):r},u.context=function(e){return arguments.length?(l=null==e?null:e,u):l},u}function Bb(e,t){return null!=e?e:t}const jb=e=>e.x||0,Ub=e=>e.y||0,Vb=e=>!(!1===e.defined),qb=function(){var e=Sh,t=Eh,n=Th(0),r=null,i=Ch,o=Mh,a=Oh,s=null;function l(){var l,c,u=+e.apply(this,arguments),h=+t.apply(this,arguments),d=i.apply(this,arguments)-Yu,f=o.apply(this,arguments)-Yu,p=Bu(f-d),g=f>d;if(s||(s=l=kh()),h<u&&(c=h,h=u,u=c),h>Wu)if(p>Xu-Wu)s.moveTo(h*Uu(d),h*Hu(d)),s.arc(0,0,h,d,f,!g),u>Wu&&(s.moveTo(u*Uu(f),u*Hu(f)),s.arc(0,0,u,f,d,g));else{var m,v,y=d,b=f,_=d,x=f,w=p,A=p,k=a.apply(this,arguments)/2,T=k>Wu&&(r?+r.apply(this,arguments):$u(u*u+h*h)),S=qu(Bu(h-u)/2,+n.apply(this,arguments)),E=S,C=S;if(T>Wu){var M=Ku(T/u*Hu(k)),O=Ku(T/h*Hu(k));(w-=2*M)>Wu?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(d+f)/2),(A-=2*O)>Wu?(y+=O*=g?1:-1,b-=O):(A=0,y=b=(d+f)/2)}var L=h*Uu(y),D=h*Hu(y),I=u*Uu(x),R=u*Hu(x);if(S>Wu){var P,N=h*Uu(b),z=h*Hu(b),F=u*Uu(_),B=u*Hu(_);if(p<Gu&&(P=Lh(L,D,F,B,N,z,I,R))){var j=L-P[0],U=D-P[1],V=N-P[0],q=z-P[1],H=1/Hu(Zu((j*V+U*q)/($u(j*j+U*U)*$u(V*V+q*q)))/2),$=$u(P[0]*P[0]+P[1]*P[1]);E=qu(S,(u-$)/(H-1)),C=qu(S,(h-$)/(H+1))}}A>Wu?C>Wu?(m=Dh(F,B,L,D,h,C,g),v=Dh(N,z,I,R,h,C,g),s.moveTo(m.cx+m.x01,m.cy+m.y01),C<S?s.arc(m.cx,m.cy,C,ju(m.y01,m.x01),ju(v.y01,v.x01),!g):(s.arc(m.cx,m.cy,C,ju(m.y01,m.x01),ju(m.y11,m.x11),!g),s.arc(0,0,h,ju(m.cy+m.y11,m.cx+m.x11),ju(v.cy+v.y11,v.cx+v.x11),!g),s.arc(v.cx,v.cy,C,ju(v.y11,v.x11),ju(v.y01,v.x01),!g))):(s.moveTo(L,D),s.arc(0,0,h,y,b,!g)):s.moveTo(L,D),u>Wu&&w>Wu?E>Wu?(m=Dh(I,R,N,z,u,-E,g),v=Dh(L,D,F,B,u,-E,g),s.lineTo(m.cx+m.x01,m.cy+m.y01),E<S?s.arc(m.cx,m.cy,E,ju(m.y01,m.x01),ju(v.y01,v.x01),!g):(s.arc(m.cx,m.cy,E,ju(m.y01,m.x01),ju(m.y11,m.x11),!g),s.arc(0,0,u,ju(m.cy+m.y11,m.cx+m.x11),ju(v.cy+v.y11,v.cx+v.x11),g),s.arc(v.cx,v.cy,E,ju(v.y11,v.x11),ju(v.y01,v.x01),!g))):s.arc(0,0,u,x,_,g):s.lineTo(I,R)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Gu/2;return[Uu(r)*n,Hu(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Th(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Th(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Th(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Th(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:Th(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:Th(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:Th(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}().startAngle((e=>e.startAngle||0)).endAngle((e=>e.endAngle||0)).padAngle((e=>e.padAngle||0)).innerRadius((e=>e.innerRadius||0)).outerRadius((e=>e.outerRadius||0)).cornerRadius((e=>e.cornerRadius||0)),Hb=zh().x(jb).y1(Ub).y0((e=>(e.y||0)+(e.height||0))).defined(Vb),$b=zh().y(Ub).x1(jb).x0((e=>(e.x||0)+(e.width||0))).defined(Vb),Wb=Nh().x(jb).y(Ub).defined(Vb),Gb=zb().x(jb).y(Ub).width((e=>e.width||0)).height((e=>e.height||0)).cornerRadius((e=>Bb(e.cornerRadiusTopLeft,e.cornerRadius)||0),(e=>Bb(e.cornerRadiusTopRight,e.cornerRadius)||0),(e=>Bb(e.cornerRadiusBottomRight,e.cornerRadius)||0),(e=>Bb(e.cornerRadiusBottomLeft,e.cornerRadius)||0)),Yb=function(e,t){var n=null;function r(){var r;if(n||(n=r=kh()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"==typeof e?e:Th(e||Fh),t="function"==typeof t?t:Th(void 0===t?64:+t),r.type=function(t){return arguments.length?(e="function"==typeof t?t:Th(t),r):e},r.size=function(e){return arguments.length?(t="function"==typeof e?e:Th(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r}().type((e=>Cb(e.shape||"circle"))).size((e=>Bb(e.size,64))),Xb=Fb().x(jb).y(Ub).defined(Vb).size((e=>e.size||1));function Zb(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function Kb(e,t,n,r){return Gb.context(e)(t,n,r)}var Jb=1;function Qb(){Jb=1}function e_(e,t,n){var r=t.clip,i=e._defs,o=t.clip_id||(t.clip_id="clip"+Jb++),a=i.clipping[o]||(i.clipping[o]={id:o});return Ye(r)?a.path=r(null):Zb(n)?a.path=Kb(null,n,0,0):(a.width=n.width||0,a.height=n.height||0),"url(#"+o+")"}function t_(e){this.clear(),e&&this.union(e)}function n_(e){this.mark=e,this.bounds=this.bounds||new t_}function r_(e){n_.call(this,e),this.items=this.items||[]}function i_(e){this._pending=0,this._loader=e||rs()}function o_(e){e._pending+=1}function a_(e){e._pending-=1}function s_(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const r=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(r+(n?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,r):0))}return e}t_.prototype={clone(){return new t_(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,n,r){return n<e?(this.x2=e,this.x1=n):(this.x1=e,this.x2=n),r<t?(this.y2=t,this.y1=r):(this.y1=t,this.y2=r),this},add(e,t){return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,n){const r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(e,t,n){var{x1:r,y1:i,x2:o,y2:a}=this,s=Math.cos(e),l=Math.sin(e),c=t-t*s+n*l,u=n-t*l-n*s;return[s*r-l*i+c,l*r+s*i+u,s*r-l*a+c,l*r+s*a+u,s*o-l*i+c,l*o+s*i+u,s*o-l*a+c,l*o+s*a+u]},union(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2<this.x2&&(this.x2=e.x2),e.y2<this.y2&&(this.y2=e.y2),this},encloses(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)},contains(e,t){return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},ut(r_,n_),i_.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return o_(t),t._loader.sanitize(e,{context:"href"}).then((e=>(a_(t),e))).catch((()=>(a_(t),null)))},loadImage(e){const t=this,n=jh();return o_(t),t._loader.sanitize(e,{context:"image"}).then((e=>{const r=e.href;if(!r||!n)throw{url:r};const i=new n,o=at(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=o&&(i.crossOrigin=o),i.onload=()=>a_(t),i.onerror=()=>a_(t),i.src=r,i})).catch((e=>(a_(t),{complete:!1,width:0,height:0,src:e&&e.url||""})))},ready(){const e=this;return new Promise((t=>{!function n(r){e.pending()?setTimeout((()=>{n(!0)}),10):t(r)}(!1)}))}};const l_=mb-1e-8;let c_,u_,h_,d_,f_,p_,g_,m_;const v_=(e,t)=>c_.add(e,t),y_=(e,t)=>v_(u_=e,h_=t),b_=e=>v_(e,c_.y1),__=e=>v_(c_.x1,e),x_=(e,t)=>f_*e+g_*t,w_=(e,t)=>p_*e+m_*t,A_=(e,t)=>v_(x_(e,t),w_(e,t)),k_=(e,t)=>y_(x_(e,t),w_(e,t));function T_(e,t){return c_=e,t?(d_=t*pb,f_=m_=Math.cos(d_),p_=Math.sin(d_),g_=-p_):(f_=m_=1,d_=p_=g_=0),S_}const S_={beginPath(){},closePath(){},moveTo:k_,lineTo:k_,rect(e,t,n,r){d_?(A_(e+n,t),A_(e+n,t+r),A_(e,t+r),k_(e,t)):(v_(e+n,t+r),y_(e,t))},quadraticCurveTo(e,t,n,r){const i=x_(e,t),o=w_(e,t),a=x_(n,r),s=w_(n,r);E_(u_,i,a,b_),E_(h_,o,s,__),y_(a,s)},bezierCurveTo(e,t,n,r,i,o){const a=x_(e,t),s=w_(e,t),l=x_(n,r),c=w_(n,r),u=x_(i,o),h=w_(i,o);C_(u_,a,l,u,b_),C_(h_,s,c,h,__),y_(u,h)},arc(e,t,n,r,i,o){if(r+=d_,i+=d_,u_=n*Math.cos(i)+e,h_=n*Math.sin(i)+t,Math.abs(i-r)>l_)v_(e-n,t-n),v_(e+n,t+n);else{const a=r=>v_(n*Math.cos(r)+e,n*Math.sin(r)+t);let s,l;if(a(r),a(i),i!==r)if((r%=mb)<0&&(r+=mb),(i%=mb)<0&&(i+=mb),i<r&&(o=!o,s=r,r=i,i=s),o)for(i-=mb,s=r-r%gb,l=0;l<4&&s>i;++l,s-=gb)a(s);else for(s=r-r%gb+gb,l=0;l<4&&s<i;++l,s+=gb)a(s)}}};function E_(e,t,n,r){const i=(e-t)/(e+n-2*t);0<i&&i<1&&r(e+(t-e)*i)}function C_(e,t,n,r,i){const o=r-e+3*t-3*n,a=e+n-2*t,s=e-t;let l,c=0,u=0;Math.abs(o)>1e-14?(l=a*a+s*o,l>=0&&(l=Math.sqrt(l),c=(-a+l)/o,u=(-a-l)/o)):c=.5*s/a,0<c&&c<1&&i(M_(c,e,t,n,r)),0<u&&u<1&&i(M_(u,e,t,n,r))}function M_(e,t,n,r,i){const o=1-e,a=o*o,s=e*e;return a*o*t+3*a*e*n+3*o*s*r+s*e*i}var O_=(O_=Bh(1,1))?O_.getContext("2d"):null;const L_=new t_;function D_(e){return function(t,n){if(!O_)return!0;e(O_,t),L_.clear().union(t.bounds).intersect(n).round();const{x1:r,y1:i,x2:o,y2:a}=L_;for(let e=i;e<=a;++e)for(let t=r;t<=o;++t)if(O_.isPointInPath(t,e))return!0;return!1}}function I_(e,t){return t.contains(e.x||0,e.y||0)}function R_(e,t){const n=e.x||0,r=e.y||0,i=e.width||0,o=e.height||0;return t.intersects(L_.set(n,r,n+i,r+o))}function P_(e,t){const n=e.x||0,r=e.y||0;return N_(t,n,r,null!=e.x2?e.x2:n,null!=e.y2?e.y2:r)}function N_(e,t,n,r,i){const{x1:o,y1:a,x2:s,y2:l}=e,c=r-t,u=i-n;let h,d,f,p,g=0,m=1;for(p=0;p<4;++p){if(0===p&&(h=-c,d=-(o-t)),1===p&&(h=c,d=s-t),2===p&&(h=-u,d=-(a-n)),3===p&&(h=u,d=l-n),Math.abs(h)<1e-10&&d<0)return!1;if(f=d/h,h<0){if(f>m)return!1;f>g&&(g=f)}else if(h>0){if(f<g)return!1;f<m&&(m=f)}}return!0}function z_(e,t){e.globalCompositeOperation=t.blend||"source-over"}function F_(e,t){return null==e?t:e}function B_(e,t){const n=t.length;for(let r=0;r<n;++r)e.addColorStop(t[r].offset,t[r].color);return e}function j_(e,t,n){return ob(n)?function(e,t,n){const r=n.width(),i=n.height();let o;if("radial"===t.gradient)o=e.createRadialGradient(n.x1+F_(t.x1,.5)*r,n.y1+F_(t.y1,.5)*i,Math.max(r,i)*F_(t.r1,0),n.x1+F_(t.x2,.5)*r,n.y1+F_(t.y2,.5)*i,Math.max(r,i)*F_(t.r2,.5));else{const a=F_(t.x1,0),s=F_(t.y1,0),l=F_(t.x2,1),c=F_(t.y2,0);if(a!==l&&s!==c&&r!==i){const n=Bh(Math.ceil(r),Math.ceil(i)),o=n.getContext("2d");return o.scale(r,i),o.fillStyle=B_(o.createLinearGradient(a,s,l,c),t.stops),o.fillRect(0,0,r,i),e.createPattern(n,"no-repeat")}o=e.createLinearGradient(n.x1+a*r,n.y1+s*i,n.x1+l*r,n.y1+c*i)}return B_(o,t.stops)}(e,n,t.bounds):n}function U_(e,t,n){return(n*=null==t.fillOpacity?1:t.fillOpacity)>0&&(e.globalAlpha=n,e.fillStyle=j_(e,t,t.fill),!0)}var V_=[];function q_(e,t,n){var r=null!=(r=t.strokeWidth)?r:1;return!(r<=0)&&(n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=j_(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||V_),e.lineDashOffset=t.strokeDashOffset||0),!0)}function H_(e,t){return e.zindex-t.zindex||e.index-t.index}function $_(e){if(!e.zdirty)return e.zitems;var t,n,r,i=e.items,o=[];for(n=0,r=i.length;n<r;++n)(t=i[n]).index=n,t.zindex&&o.push(t);return e.zdirty=!1,e.zitems=o.sort(H_)}function W_(e,t){var n,r,i=e.items;if(!i||!i.length)return;const o=$_(e);if(o&&o.length){for(n=0,r=i.length;n<r;++n)i[n].zindex||t(i[n]);i=o}for(n=0,r=i.length;n<r;++n)t(i[n])}function G_(e,t){var n,r,i=e.items;if(!i||!i.length)return null;const o=$_(e);for(o&&o.length&&(i=o),r=i.length;--r>=0;)if(n=t(i[r]))return n;if(i===o)for(r=(i=e.items).length;--r>=0;)if(!i[r].zindex&&(n=t(i[r])))return n;return null}function Y_(e){return function(t,n,r){W_(n,(n=>{r&&!r.intersects(n.bounds)||Z_(e,t,n,n)}))}}function X_(e){return function(t,n,r){!n.items.length||r&&!r.intersects(n.bounds)||Z_(e,t,n.items[0],n.items)}}function Z_(e,t,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(e(t,r)||(z_(t,n),n.fill&&U_(t,n,i)&&t.fill(),n.stroke&&q_(t,n,i)&&t.stroke()))}function K_(e){return e=e||de,function(t,n,r,i,o,a){return r*=t.pixelRatio,i*=t.pixelRatio,G_(n,(n=>{const s=n.bounds;if((!s||s.contains(o,a))&&s)return e(t,n,r,i,o,a)?n:void 0}))}}function J_(e,t){return function(n,r,i,o){var a,s,l=Array.isArray(r)?r[0]:r,c=null==t?l.fill:t,u=l.stroke&&n.isPointInStroke;return u&&(a=l.strokeWidth,s=l.strokeCap,n.lineWidth=null!=a?a:1,n.lineCap=null!=s?s:"butt"),!e(n,r)&&(c&&n.isPointInPath(i,o)||u&&n.isPointInStroke(i,o))}}function Q_(e){return K_(J_(e))}function ex(e,t){return"translate("+e+","+t+")"}function tx(e){return"rotate("+e+")"}function nx(e){return ex(e.x||0,e.y||0)}function rx(e,t,n){function r(e,n){var r=n.x||0,i=n.y||0,o=n.angle||0;e.translate(r,i),o&&e.rotate(o*=pb),e.beginPath(),t(e,n),o&&e.rotate(-o),e.translate(-r,-i)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",function(e){return ex(e.x||0,e.y||0)+(e.angle?" "+tx(e.angle):"")}(n)),e("d",t(null,n))},bound:function(e,n){return t(T_(e,n.angle),n),s_(e,n).translate(n.x||0,n.y||0)},draw:Y_(r),pick:Q_(r),isect:n||D_(r)}}var ix=rx("arc",(function(e,t){return qb.context(e)(t)}));function ox(e,t,n){function r(e,n){e.beginPath(),t(e,n)}const i=J_(r);return{type:e,tag:"path",nested:!0,attr:function(e,n){var r=n.mark.items;r.length&&e("d",t(null,r))},bound:function(e,n){var r=n.items;return 0===r.length?e:(t(T_(e),r),s_(e,r[0]))},draw:X_(r),pick:function(e,t,n,r,o,a){var s=t.items,l=t.bounds;return!s||!s.length||l&&!l.contains(o,a)?null:(n*=e.pixelRatio,r*=e.pixelRatio,i(e,s,n,r)?s[0]:null)},isect:I_,tip:n}}var ax=ox("area",(function(e,t){const n=t[0],r=n.interpolate||"linear";return("horizontal"===n.orient?$b:Hb).curve(ub(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i="horizontal"===e[0].orient?t[1]:t[0],o="horizontal"===e[0].orient?"y":"x",a=e.length,s=1/0;--a>=0;)!1!==e[a].defined&&(r=Math.abs(e[a][o]-i))<s&&(s=r,n=e[a]);return n}));function sx(e,t){e.beginPath(),Zb(t)?Kb(e,t,0,0):e.rect(0,0,t.width||0,t.height||0),e.clip()}function lx(e){const t=F_(e.strokeWidth,1);return null!=e.strokeOffset?e.strokeOffset:e.stroke&&t>.5&&t<1.5?.5-Math.abs(t-1):0}function cx(e,t){const n=lx(t);e("d",Kb(null,t,n,n))}function ux(e,t,n,r){const i=lx(t);e.beginPath(),Kb(e,t,(n||0)+i,(r||0)+i)}const hx=J_(ux),dx=J_(ux,!1),fx=J_(ux,!0);var px={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",nx(t))},bound:function(e,t){if(!t.clip&&t.items){const n=t.items,r=n.length;for(let t=0;t<r;++t)e.union(n[t].bounds)}return(t.clip||t.width||t.height)&&!t.noBound&&e.add(0,0).add(t.width||0,t.height||0),s_(e,t),e.translate(t.x||0,t.y||0)},draw:function(e,t,n){W_(t,(t=>{const r=t.x||0,i=t.y||0,o=t.strokeForeground,a=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&a&&(ux(e,t,r,i),z_(e,t),t.fill&&U_(e,t,a)&&e.fill(),t.stroke&&!o&&q_(e,t,a)&&e.stroke()),e.save(),e.translate(r,i),t.clip&&sx(e,t),n&&n.translate(-r,-i),W_(t,(t=>{this.draw(e,t,n)})),n&&n.translate(r,i),e.restore(),o&&t.stroke&&a&&(ux(e,t,r,i),z_(e,t),q_(e,t,a)&&e.stroke())}))},pick:function(e,t,n,r,i,o){if(t.bounds&&!t.bounds.contains(i,o)||!t.items)return null;const a=n*e.pixelRatio,s=r*e.pixelRatio;return G_(t,(l=>{let c,u,h;const d=l.bounds;if(d&&!d.contains(i,o))return;u=l.x||0,h=l.y||0;const f=u+(l.width||0),p=h+(l.height||0),g=l.clip;if(g&&(i<u||i>f||o<h||o>p))return;if(e.save(),e.translate(u,h),u=i-u,h=o-h,g&&Zb(l)&&!fx(e,l,a,s))return e.restore(),null;const m=l.strokeForeground,v=!1!==t.interactive;return v&&m&&l.stroke&&dx(e,l,a,s)?(e.restore(),l):(c=G_(l,(e=>function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,u,h)?this.pick(e,n,r,u,h):null)),!c&&v&&(l.fill||!m&&l.stroke)&&hx(e,l,a,s)&&(c=l),e.restore(),c||null)}))},isect:R_,content:function(e,t,n){e("clip-path",t.clip?e_(n,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),cx(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?cx(e,t):e("d","")}},gx={xmlns:"path_to_url","xmlns:xlink":"path_to_url",version:"1.1"};function mx(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((t=>{e.image=t,e.image.url=e.url}))),n}function vx(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function yx(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function bx(e,t){return"center"===e?t/2:"right"===e?t:0}function _x(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var xx={type:"image",tag:"image",nested:!1,attr:function(e,t,n){const r=mx(t,n),i=vx(t,r),o=yx(t,r),a=(t.x||0)-bx(t.align,i),s=(t.y||0)-_x(t.baseline,o);e("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",gx["xmlns:xlink"],"xlink:href"),e("transform",ex(a,s)),e("width",i),e("height",o),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){const n=t.image,r=vx(t,n),i=yx(t,n),o=(t.x||0)-bx(t.align,r),a=(t.y||0)-_x(t.baseline,i);return e.set(o,a,o+r,a+i)},draw:function(e,t,n){W_(t,(t=>{if(n&&!n.intersects(t.bounds))return;const r=mx(t,this);let i=vx(t,r),o=yx(t,r);if(0===i||0===o)return;let a,s,l,c,u=(t.x||0)-bx(t.align,i),h=(t.y||0)-_x(t.baseline,o);!1!==t.aspect&&(s=r.width/r.height,l=t.width/t.height,s==s&&l==l&&s!==l&&(l<s?(c=i/s,h+=(o-c)/2,o=c):(c=o*s,u+=(i-c)/2,i=c))),(r.complete||r.toDataURL)&&(z_(e,t),e.globalAlpha=null!=(a=t.opacity)?a:1,e.imageSmoothingEnabled=!1!==t.smooth,e.drawImage(r,u,h,i,o))}))},pick:K_(),isect:de,get:mx,xOffset:bx,yOffset:_x},wx=ox("line",(function(e,t){const n=t[0],r=n.interpolate||"linear";return Wb.curve(ub(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i=Math.pow(e[0].strokeWidth||1,2),o=e.length;--o>=0;)if(!1!==e[o].defined&&(n=e[o].x-t[0])*n+(r=e[o].y-t[1])*r<i)return e[o];return null}));function Ax(e,t){var n=t.path;if(null==n)return!0;var r=t.x||0,i=t.y||0,o=t.scaleX||1,a=t.scaleY||1,s=(t.angle||0)*pb,l=t.pathCache;l&&l.path===n||((t.pathCache=l=fb(n)).path=n),s&&e.rotate&&e.translate?(e.translate(r,i),e.rotate(s),kb(e,l,0,0,o,a),e.rotate(-s),e.translate(-r,-i)):kb(e,l,r,i,o,a)}var kx={type:"path",tag:"path",nested:!1,attr:function(e,t){var n=t.scaleX||1,r=t.scaleY||1;1===n&&1===r||e("vector-effect","non-scaling-stroke"),e("transform",function(e){return ex(e.x||0,e.y||0)+(e.angle?" "+tx(e.angle):"")+(e.scaleX||e.scaleY?" "+(t=e.scaleX||1,n=e.scaleY||1,"scale("+t+","+n+")"):"");var t,n}(t)),e("d",t.path)},bound:function(e,t){return Ax(T_(e,t.angle),t)?e.set(0,0,0,0):s_(e,t,!0)},draw:Y_(Ax),pick:Q_(Ax),isect:D_(Ax)};function Tx(e,t){e.beginPath(),Kb(e,t)}var Sx={type:"rect",tag:"path",nested:!1,attr:function(e,t){e("d",Kb(null,t))},bound:function(e,t){var n,r;return s_(e.set(n=t.x||0,r=t.y||0,n+t.width||0,r+t.height||0),t)},draw:Y_(Tx),pick:Q_(Tx),isect:R_};function Ex(e,t,n){var r,i,o,a;return!(!t.stroke||!q_(e,t,n)||(r=t.x||0,i=t.y||0,o=null!=t.x2?t.x2:r,a=null!=t.y2?t.y2:i,e.beginPath(),e.moveTo(r,i),e.lineTo(o,a),0))}var Cx={type:"rule",tag:"line",nested:!1,attr:function(e,t){e("transform",nx(t)),e("x2",null!=t.x2?t.x2-(t.x||0):0),e("y2",null!=t.y2?t.y2-(t.y||0):0)},bound:function(e,t){var n,r;return s_(e.set(n=t.x||0,r=t.y||0,null!=t.x2?t.x2:n,null!=t.y2?t.y2:r),t)},draw:function(e,t,n){W_(t,(t=>{if(!n||n.intersects(t.bounds)){var r=null==t.opacity?1:t.opacity;r&&Ex(e,t,r)&&(z_(e,t),e.stroke())}}))},pick:K_((function(e,t,n,r){return!!e.isPointInStroke&&Ex(e,t,1)&&e.isPointInStroke(n,r)})),isect:P_},Mx=rx("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Ox=rx("symbol",(function(e,t){return Yb.context(e)(t)}),I_);const Lx=_t();var Dx={height:Fx,measureWidth:Nx,estimateWidth:Rx,width:Rx,canvas:Ix};function Ix(e){Dx.width=e&&O_?Nx:Rx}function Rx(e,t){return Px(Vx(e,t),Fx(e))}function Px(e,t){return~~(.8*e.length*t)}function Nx(e,t){return Fx(e)<=0||!(t=Vx(e,t))?0:zx(t,Hx(e))}function zx(e,t){const n=`(${t}) ${e}`;let r=Lx.get(n);return void 0===r&&(O_.font=t,r=O_.measureText(e).width,Lx.set(n,r)),r}function Fx(e){return null!=e.fontSize?+e.fontSize||0:11}function Bx(e){return null!=e.lineHeight?e.lineHeight:Fx(e)+2}function jx(e){return t=e.lineBreak&&e.text&&!xe(e.text)?e.text.split(e.lineBreak):e.text,xe(t)?t.length>1?t:t[0]:t;var t}function Ux(e){const t=jx(e);return(xe(t)?t.length-1:0)*Bx(e)}function Vx(e,t){const n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,r=function(e){if(Dx.width===Nx){const t=Hx(e);return e=>zx(e,t)}{const t=Fx(e);return e=>Px(e,t)}}(e);if(r(t)<n)return t;var i,o=e.ellipsis||"",a="rtl"===e.dir,s=0,l=t.length;if(n-=r(o),a){for(;s<l;)i=s+l>>>1,r(t.slice(i))>n?s=i+1:l=i;return o+t.slice(s)}for(;s<l;)i=1+(s+l>>>1),r(t.slice(0,i))<n?s=i:l=i-1;return t.slice(0,s)+o}(e,n):n}function qx(e,t){var n=e.font;return(t&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function Hx(e,t){return(e.fontStyle?e.fontStyle+" ":"")+(e.fontVariant?e.fontVariant+" ":"")+(e.fontWeight?e.fontWeight+" ":"")+Fx(e)+"px "+qx(e,t)}function $x(e){var t=e.baseline,n=Fx(e);return Math.round("top"===t?.79*n:"middle"===t?.3*n:"bottom"===t?-.21*n:"line-top"===t?.29*n+.5*Bx(e):"line-bottom"===t?.29*n-.5*Bx(e):0)}Ix(!0);const Wx={left:"start",center:"middle",right:"end"},Gx=new t_;function Yx(e){var t,n=e.x||0,r=e.y||0,i=e.radius||0;return i&&(t=(e.theta||0)-gb,n+=i*Math.cos(t),r+=i*Math.sin(t)),Gx.x1=n,Gx.y1=r,Gx}function Xx(e,t,n){var r,i=Dx.height(t),o=t.align,a=Yx(t),s=a.x1,l=a.y1,c=t.dx||0,u=(t.dy||0)+$x(t)-Math.round(.8*i),h=jx(t);if(xe(h)?(i+=Bx(t)*(h.length-1),r=h.reduce(((e,n)=>Math.max(e,Dx.width(t,n))),0)):r=Dx.width(t,h),"center"===o?c-=r/2:"right"===o&&(c-=r),e.set(c+=s,u+=l,c+r,u+i),t.angle&&!n)e.rotate(t.angle*pb,s,l);else if(2===n)return e.rotatedPoints(t.angle*pb,s,l);return e}var Zx={type:"text",tag:"text",nested:!1,attr:function(e,t){var n,r=t.dx||0,i=(t.dy||0)+$x(t),o=Yx(t),a=o.x1,s=o.y1,l=t.angle||0;e("text-anchor",Wx[t.align]||"start"),l?(n=ex(a,s)+" "+tx(l),(r||i)&&(n+=" "+ex(r,i))):n=ex(a+r,s+i),e("transform",n)},bound:Xx,draw:function(e,t,n){W_(t,(t=>{var r,i,o,a,s,l,c,u=null==t.opacity?1:t.opacity;if(!(n&&!n.intersects(t.bounds)||0===u||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=Hx(t),e.textAlign=t.align||"left",i=(r=Yx(t)).x1,o=r.y1,t.angle&&(e.save(),e.translate(i,o),e.rotate(t.angle*pb),i=o=0),i+=t.dx||0,o+=(t.dy||0)+$x(t),l=jx(t),z_(e,t),xe(l))for(s=Bx(t),a=0;a<l.length;++a)c=Vx(t,l[a]),t.fill&&U_(e,t,u)&&e.fillText(c,i,o),t.stroke&&q_(e,t,u)&&e.strokeText(c,i,o),o+=s;else c=Vx(t,l),t.fill&&U_(e,t,u)&&e.fillText(c,i,o),t.stroke&&q_(e,t,u)&&e.strokeText(c,i,o);t.angle&&e.restore()}}))},pick:K_((function(e,t,n,r,i,o){if(t.fontSize<=0)return!1;if(!t.angle)return!0;var a=Yx(t),s=a.x1,l=a.y1,c=Xx(Gx,t,1),u=-t.angle*pb,h=Math.cos(u),d=Math.sin(u),f=h*i-d*o+(s-h*s+d*l),p=d*i+h*o+(l-d*s-h*l);return c.contains(f,p)})),isect:function(e,t){const n=Xx(Gx,e,2);return N_(t,n[0],n[1],n[2],n[3])||N_(t,n[0],n[1],n[4],n[5])||N_(t,n[4],n[5],n[6],n[7])||N_(t,n[2],n[3],n[6],n[7])}},Kx=ox("trail",(function(e,t){return Xb.context(e)(t)}),(function(e,t){for(var n,r,i=e.length;--i>=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(r=e[i].y-t[1])*r<(n=e[i].size||1)*n)return e[i];return null})),Jx={arc:ix,area:ax,group:px,image:xx,line:wx,path:kx,rect:Sx,rule:Cx,shape:Mx,symbol:Ox,text:Zx,trail:Kx};function Qx(e,t,n){var r=Jx[e.mark.marktype],i=t||r.bound;return r.nested&&(e=e.mark),i(e.bounds||(e.bounds=new t_),e,n)}var ew={mark:null};function tw(e,t,n){var r,i,o,a,s=Jx[e.marktype],l=s.bound,c=e.items,u=c&&c.length;if(s.nested)return u?o=c[0]:(ew.mark=e,o=ew),a=Qx(o,l,n),t&&t.union(a)||a;if(t=t||e.bounds&&e.bounds.clear()||new t_,u)for(r=0,i=c.length;r<i;++r)t.union(Qx(c[r],l,n));return e.bounds=t}const nw=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function rw(e,t){return JSON.stringify(e,nw,t)}function iw(e){return ow("string"==typeof e?JSON.parse(e):e)}function ow(e){var t,n,r,i=e.marktype,o=e.items;if(o)for(n=0,r=o.length;n<r;++n)t=i?"mark":"group",o[n][t]=e,o[n].zindex&&(o[n][t].zdirty=!0),"group"===(i||t)&&ow(o[n]);return i&&tw(e),e}function aw(e){arguments.length?this.root=iw(e):(this.root=sw({marktype:"group",name:"root",role:"frame"}),this.root.items=[new r_(this.root)])}function sw(e,t){const n={bounds:new t_,clip:!!e.clip,group:t,interactive:!1!==e.interactive,items:[],marktype:e.marktype,name:e.name||void 0,role:e.role||void 0,zindex:e.zindex||0};return null!=e.aria&&(n.aria=e.aria),e.description&&(n.description=e.description),n}function lw(e,t,n){return!e&&"undefined"!=typeof document&&document.createElement&&(e=document),e?n?e.createElementNS(n,t):e.createElement(t):null}function cw(e,t){t=t.toLowerCase();for(var n=e.childNodes,r=0,i=n.length;r<i;++r)if(n[r].tagName.toLowerCase()===t)return n[r]}function uw(e,t,n,r){var i,o=e.childNodes[t];return o&&o.tagName.toLowerCase()===n.toLowerCase()||(i=o||null,o=lw(e.ownerDocument,n,r),e.insertBefore(o,i)),o}function hw(e,t){for(var n=e.childNodes,r=n.length;r>t;)e.removeChild(n[--r]);return e}function dw(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function fw(e,t){const n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]}function pw(e,t){this._active=null,this._handlers={},this._loader=e||rs(),this._tooltip=t||gw}function gw(e,t,n,r){e.element().setAttribute("title",r||"")}function mw(e){this._el=null,this._bgcolor=null,this._loader=new i_(e)}aw.prototype={toJSON(e){return rw(this.root,e||0)},mark(e,t,n){const r=sw(e,t=t||this.root.items[0]);return t.items[n]=r,r.zindex&&(r.group.zdirty=!0),r}},pw.prototype={initialize(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,n){for(let r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1},handlers(e){const t=this._handlers,n=[];if(e)n.push(...t[this.eventName(e)]);else for(const e in t)n.push(...t[e]);return n},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,n){this._loader.sanitize(n,{context:"href"}).then((t=>{const n=new MouseEvent(e.type,e),r=lw(null,"a");for(const e in t)r.setAttribute(e,t[e]);r.dispatchEvent(n)})).catch((()=>{}))},handleTooltip(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,r){var i,o,a=e&&e.mark;if(a&&(i=Jx[a.marktype]).tip){for((o=fw(t,n))[0]-=r[0],o[1]-=r[1];e=e.mark.group;)o[0]-=e.x||0,o[1]-=e.y||0;e=i.tip(a.items,o)}return e}(t,e,this.canvas(),this._origin);const r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,o=i.width(),a=i.height();let s=i.x1+r[0]+n.left,l=i.y1+r[1]+n.top;for(;e.mark&&(e=e.mark.group);)s+=e.x||0,l+=e.y||0;return{x:s,y:l,width:o,height:a,left:s,top:l,right:s+o,bottom:l+a}}},mw.prototype={initialize(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this},dirty(){},render(e){const t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},_render(){},renderAsync(e){const t=this.render(e);return this._ready?this._ready.then((()=>t)):Promise.resolve(t)},_load(e,t){var n=this,r=n._loader[e](t);if(!n._ready){const e=n._call;n._ready=n._loader.ready().then((t=>{t&&e(),n._ready=null}))}return r},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const vw="dragenter",yw="dragleave",bw="dragover",_w="mousedown",xw="mousemove",ww="mouseout",Aw="mouseover",kw="click",Tw="mousewheel",Sw="touchstart",Ew="touchmove",Cw="touchend",Mw=xw,Ow=ww,Lw=kw;function Dw(e,t){pw.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}function Iw(e,t){(e=>e===Sw||e===Ew||e===Cw?[Sw,Ew,Cw]:[e])(t).forEach((t=>function(e,t){const n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?n=>e[t](n):n=>e.fire(t,n)))}(e,t)))}function Rw(e,t,n){return function(r){const i=this._active,o=this.pickEvent(r);o===i||(i&&i.exit||this.fire(n,r),this._active=o,this.fire(t,r)),this.fire(e,r)}}function Pw(e){return function(t){this.fire(e,t),this._active=null}}ut(Dw,pw,{initialize(e,t,n){return this._canvas=e&&cw(e,"canvas"),[kw,_w,xw,ww,yw].forEach((e=>Iw(this,e))),pw.prototype.initialize.call(this,e,t,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:["keydown","keypress","keyup",vw,yw,bw,_w,"mouseup",xw,ww,Aw,kw,"dblclick","wheel",Tw,Sw,Ew,Cw],DOMMouseScroll(e){this.fire(Tw,e)},mousemove:Rw(xw,Aw,ww),dragover:Rw(bw,vw,yw),mouseout:Pw(ww),dragleave:Pw(yw),mousedown(e){this._down=this._active,this.fire(_w,e)},click(e){this._down===this._active&&(this.fire(kw,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(Sw,e,!0)},touchmove(e){this.fire(Ew,e,!0)},touchend(e){this.fire(Cw,e,!0),this._touch=null},fire(e,t,n){const r=n?this._touch:this._active,i=this._handlers[e];if(t.vegaType=e,e===Lw&&r&&r.href?this.handleHref(t,r,r.href):e!==Mw&&e!==Ow||this.handleTooltip(t,r,e!==Ow),i)for(let e=0,n=i.length;e<n;++e)i[e].handler.call(this._obj,t,r)},on(e,t){const n=this.eventName(e),r=this._handlers;return this._handlerIndex(r[n],e,t)<0&&(Iw(this,e),(r[n]||(r[n]=[])).push({type:e,handler:t})),this},off(e,t){const n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&r.splice(i,1),this},pickEvent(e){const t=fw(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},pick(e,t,n,r,i){const o=this.context();return Jx[e.marktype].pick.call(this,o,e,t,n,r,i)}});var Nw="undefined"!=typeof window&&window.devicePixelRatio||1;function zw(e){mw.call(this,e),this._options={},this._redraw=!1,this._dirty=new t_,this._tempb=new t_}const Fw=mw.prototype;function Bw(e,t){pw.call(this,e,t);const n=this;n._hrefHandler=jw(n,((e,t)=>{t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=jw(n,((e,t)=>{n.handleTooltip(e,t,e.type!==Ow)}))}ut(zw,mw,{initialize(e,t,n,r,i,o){return this._options=o||{},this._canvas=this._options.externalContext?null:Bh(1,1,this._options.type),e&&this._canvas&&(hw(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),Fw.initialize.call(this,e,t,n,r,i)},resize(e,t,n,r){if(Fw.resize.call(this,e,t,n,r),this._canvas)!function(e,t,n,r,i,o){const a="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),l=a?Nw:i;e.width=t*l,e.height=n*l;for(const e in o)s[e]=o[e];a&&1!==l&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=l,s.setTransform(l,0,0,l,l*r[0],l*r[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const e=this._options.externalContext;e||oe("CanvasRenderer is missing a valid canvas or context"),e.scale(this._scale,this._scale),e.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let n=e.mark.group;for(;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)},_render(e){const t=this.context(),n=this._origin,r=this._width,i=this._height,o=this._dirty,a=((e,t,n)=>(new t_).set(0,0,t,n).translate(-e[0],-e[1]))(n,r,i);t.save();const s=this._redraw||o.empty()?(this._redraw=!1,a.expand(1)):function(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,a.intersect(o),n);return this.clear(-n[0],-n[1],r,i),this.draw(t,e,s),t.restore(),o.clear(),this},draw(e,t,n){const r=Jx[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),Ye(n)?(e.beginPath(),n(e),e.clip()):sx(e,t.group)}(e,t),r.draw.call(this,e,t,n),t.clip&&e.restore()},clear(e,t,n,r){const i=this._options,o=this.context();"pdf"===i.type||i.externalContext||o.clearRect(e,t,n,r),null!=this._bgcolor&&(o.fillStyle=this._bgcolor,o.fillRect(e,t,n,r))}});const jw=(e,t)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,t.call(e._obj,n,r)};ut(Bw,pw,{initialize(e,t,n){let r=this._svg;return r&&(r.removeEventListener(Lw,this._hrefHandler),r.removeEventListener(Mw,this._tooltipHandler),r.removeEventListener(Ow,this._tooltipHandler)),this._svg=r=e&&cw(e,"svg"),r&&(r.addEventListener(Lw,this._hrefHandler),r.addEventListener(Mw,this._tooltipHandler),r.addEventListener(Ow,this._tooltipHandler)),pw.prototype.initialize.call(this,e,t,n)},canvas(){return this._svg},on(e,t){const n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){const i={type:e,handler:t,listener:jw(this,t)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this},off(e,t){const n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}});const Uw="aria-hidden",Vw="aria-label",qw="role",Hw="aria-roledescription",$w="graphics-object",Ww="graphics-symbol",Gw=(e,t,n)=>({[qw]:e,[Hw]:t,[Vw]:n||void 0}),Yw=Ot(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Xw={axis:{desc:"axis",caption:function(e){const t=e.datum,n=e.orient,r=t.title?eA(e):null,i=e.context,o=i.scales[t.scale].value,a=i.dataflow.locale(),s=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(r?` titled '${r}'`:"")+` for a ${Ay(s)?"discrete":s} scale`+` with ${nb(a,o,e)}`}},legend:{desc:"legend",caption:function(e){const t=e.datum,n=t.title?eA(e):null,r=`${t.type||""} legend`.trim(),i=t.scales,o=Object.keys(i),a=e.context,s=a.scales[i[o[0]]].value,l=a.dataflow.locale();return((c=r).length?c[0].toUpperCase()+c.slice(1):c)+(n?` titled '${n}'`:"")+` for ${function(e){return(e=e.map((e=>e+("fill"===e||"stroke"===e?" color":"")))).length<2?e[0]:e.slice(0,-1).join(", ")+" and "+Ee(e)}(o)}`+` with ${nb(l,s,e)}`;var c}},"title-text":{desc:"title",caption:e=>`Title text '${Qw(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${Qw(e)}'`}},Zw={ariaRole:qw,ariaRoleDescription:Hw,description:Vw};function Kw(e,t){const n=!1===t.aria;if(e(Uw,n||void 0),n||null==t.description)for(const t in Zw)e(Zw[t],void 0);else{const n=t.mark.marktype;e(Vw,t.description),e(qw,t.ariaRole||("group"===n?$w:Ww)),e(Hw,t.ariaRoleDescription||`${n} mark`)}}function Jw(e){return!1===e.aria?{[Uw]:!0}:Yw[e.role]?null:Xw[e.role]?function(e,t){try{const n=e.items[0],r=t.caption||(()=>"");return Gw(t.role||Ww,t.desc,n.description||r(n))}catch(e){return null}}(e,Xw[e.role]):function(e){const t=e.marktype,n="group"===t||"text"===t||e.items.some((e=>null!=e.description&&!1!==e.aria));return Gw(n?$w:Ww,`${t} mark container`,e.description)}(e)}function Qw(e){return We(e.text).join(" ")}function eA(e){try{return We(Ee(e.items).items[0].text).join(" ")}catch(e){return null}}const tA=e=>(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function nA(){let e="",t="",n="";const r=[],i=()=>t=n="",o=(e,n)=>{var r;return null!=n&&(t+=` ${e}="${r=n,tA(r).replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")}"`),a},a={open(s,...l){(o=>{t&&(e+=`${t}>${n}`,i()),r.push(o)})(s),t="<"+s;for(const e of l)for(const t in e)o(t,e[t]);return a},close(){const o=r.pop();return e+=t?t+(n?`>${n}</${o}>`:"/>"):`</${o}>`,i(),a},attr:o,text:e=>(n+=tA(e),a),toString:()=>e};return a}const rA=e=>iA(nA(),e)+"";function iA(e,t){if(e.open(t.tagName),t.hasAttributes()){const n=t.attributes,r=n.length;for(let t=0;t<r;++t)e.attr(n[t].name,n[t].value)}if(t.hasChildNodes()){const n=t.childNodes,r=n.length;for(let t=0;t<r;t++){const r=n[t];3===r.nodeType?e.text(r.nodeValue):iA(e,r)}}return e.close()}const oA={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity",blend:"mix-blend-mode"},aA={fill:"none","stroke-miterlimit":10},sA="path_to_url",lA=gx.xmlns;function cA(e){mw.call(this,e),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}const uA=mw.prototype;function hA(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function dA(e,t,n){let r,i,o;if("radial"===t.gradient){let r=uw(e,n++,"pattern",lA);_A(r,{id:ib+t.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),r=uw(r,0,"rect",lA),_A(r,{width:1,height:1,fill:`url(${wA()}#${t.id})`}),_A(e=uw(e,n++,"radialGradient",lA),{id:t.id,fx:t.x1,fy:t.y1,fr:t.r1,cx:t.x2,cy:t.y2,r:t.r2})}else _A(e=uw(e,n++,"linearGradient",lA),{id:t.id,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2});for(r=0,i=t.stops.length;r<i;++r)o=uw(e,r,"stop",lA),o.setAttribute("offset",t.stops[r].offset),o.setAttribute("stop-color",t.stops[r].color);return hw(e,r),n}function fA(e,t,n){let r;return(e=uw(e,n,"clipPath",lA)).setAttribute("id",t.id),t.path?(r=uw(e,0,"path",lA),r.setAttribute("d",t.path)):(r=uw(e,0,"rect",lA),_A(r,{x:0,y:0,width:t.width,height:t.height})),hw(e,1),n+1}function pA(e,t,n,r,i){let o,a=e._svg;if(!a&&(o=t.ownerDocument,a=lw(o,r,lA),e._svg=a,e.mark&&(a.__data__=e,a.__values__={fill:"default"},"g"===r))){const t=lw(o,"path",lA);a.appendChild(t),t.__data__=e;const n=lw(o,"g",lA);a.appendChild(n),n.__data__=e;const r=lw(o,"path",lA);a.appendChild(r),r.__data__=e,r.__values__={fill:"default"}}return(a.ownerSVGElement!==i||function(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}(a,n))&&t.insertBefore(a,n?n.nextSibling:t.firstChild),a}ut(cA,mw,{initialize(e,t,n,r,i){return this._defs={},this._clearDefs(),e&&(this._svg=uw(e,0,"svg",lA),this._svg.setAttributeNS(sA,"xmlns",lA),this._svg.setAttributeNS(sA,"xmlns:xlink",gx["xmlns:xlink"]),this._svg.setAttribute("version",gx.version),this._svg.setAttribute("class","marks"),hw(e,1),this._root=uw(this._svg,0,"g",lA),_A(this._root,aA),hw(this._svg,1)),this.background(this._bgcolor),uA.initialize.call(this,e,t,n,r,i)},background(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),uA.background.apply(this,arguments)},resize(e,t,n,r){return uA.resize.call(this,e,t,n,r),this._svg&&(_A(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const e=this._svg,t=this._bgcolor;if(!e)return null;let n;t&&(e.removeAttribute("style"),n=uw(e,0,"rect",lA),_A(n,{width:this._width,height:this._height,fill:t}));const r=rA(e);return t&&(e.removeChild(n),this._svg.style.setProperty("background-color",t)),r},_render(e){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,e),hw(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},isDirty(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const e=this._dirty;if(!e.length||!this._dirtyID)return!0;const t=++this._dirtyID;let n,r,i,o,a,s,l;for(a=0,s=e.length;a<s;++a)n=e[a],r=n.mark,r.marktype!==i&&(i=r.marktype,o=Jx[i]),r.zdirty&&r.dirty!==t&&(this._dirtyAll=!1,hA(n,t),r.items.forEach((e=>{e.dirty=t}))),r.zdirty||(n.exit?(o.nested&&r.items.length?(l=r.items[0],l._svg&&this._update(o,l._svg,l)):n._svg&&(l=n._svg.parentNode,l&&l.removeChild(n._svg)),n._svg=null):(n=o.nested?r.items[0]:n,n._update!==t&&(n._svg&&n._svg.ownerSVGElement?this._update(o,n._svg,n):(this._dirtyAll=!1,hA(n,t)),n._update=t)));return!this._dirtyAll},mark(e,t,n){if(!this.isDirty(t))return t._svg;const r=this._svg,i=Jx[t.marktype],o=!1===t.interactive?"none":null,a="g"===i.tag;let s=null,l=0;const c=pA(t,e,n,"g",r);c.setAttribute("class",dw(t));const u=Jw(t);for(const e in u)xA(c,e,u[e]);a||xA(c,"pointer-events",o),xA(c,"clip-path",t.clip?e_(this,t,t.group):null);const h=e=>{const t=this.isDirty(e),n=pA(e,c,s,i.tag,r);t&&(this._update(i,n,e),a&&function(e,t,n){t=t.lastChild.previousSibling;let r,i=0;W_(n,(n=>{r=e.mark(t,n,r),++i})),hw(t,1+i)}(this,n,e)),s=n,++l};return i.nested?t.items.length&&h(t.items[0]):W_(t,h),hw(c,l),c},_update(e,t,n){gA=t,mA=t.__values__,Kw(yA,n),e.attr(yA,n,this);const r=vA[e.type];r&&r.call(this,e,t,n),gA&&this.style(gA,n)},style(e,t){if(null!=t)for(const n in oA){let r="font"===n?qx(t):t[n];if(r===mA[n])continue;const i=oA[n];null==r?e.removeAttribute(i):(ob(r)&&(r=ab(r,this._defs.gradient,wA())),e.setAttribute(i,r+"")),mA[n]=r}},defs(){const e=this._svg,t=this._defs;let n=t.el,r=0;for(const i in t.gradient)n||(t.el=n=uw(e,1,"defs",lA)),r=dA(n,t.gradient[i],r);for(const i in t.clipping)n||(t.el=n=uw(e,1,"defs",lA)),r=fA(n,t.clipping[i],r);n&&(0===r?(e.removeChild(n),t.el=null):hw(n,r))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});let gA=null,mA=null;const vA={group(e,t,n){const r=gA=t.childNodes[2];mA=r.__values__,e.foreground(yA,n,this),mA=t.__values__,gA=t.childNodes[1],e.content(yA,n,this);const i=gA=t.childNodes[0];e.background(yA,n,this);const o=!1===n.mark.interactive?"none":null;if(o!==mA.events&&(xA(r,"pointer-events",o),xA(i,"pointer-events",o),mA.events=o),n.strokeForeground&&n.stroke){const e=n.fill;xA(r,"display",null),this.style(i,n),xA(i,"stroke",null),e&&(n.fill=null),mA=r.__values__,this.style(r,n),e&&(n.fill=e),gA=null}else xA(r,"display","none")},image(e,t,n){!1===n.smooth?(bA(t,"image-rendering","optimizeSpeed"),bA(t,"image-rendering","pixelated")):bA(t,"image-rendering",null)},text(e,t,n){const r=jx(n);let i,o,a,s;xe(r)?(o=r.map((e=>Vx(n,e))),i=o.join("\n"),i!==mA.text&&(hw(t,0),a=t.ownerDocument,s=Bx(n),o.forEach(((e,r)=>{const i=lw(a,"tspan",lA);i.__data__=n,i.textContent=e,r&&(i.setAttribute("x",0),i.setAttribute("dy",s)),t.appendChild(i)})),mA.text=i)):(o=Vx(n,r),o!==mA.text&&(t.textContent=o,mA.text=o)),xA(t,"font-family",qx(n)),xA(t,"font-size",Fx(n)+"px"),xA(t,"font-style",n.fontStyle),xA(t,"font-variant",n.fontVariant),xA(t,"font-weight",n.fontWeight)}};function yA(e,t,n){t!==mA[e]&&(n?function(e,t,n,r){null!=n?e.setAttributeNS(r,t,n):e.removeAttributeNS(r,t)}(gA,e,t,n):xA(gA,e,t),mA[e]=t)}function bA(e,t,n){n!==mA[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),mA[t]=n)}function _A(e,t){for(const n in t)xA(e,n,t[n])}function xA(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function wA(){let e;return"undefined"==typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function AA(e){mw.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}ut(AA,mw,{svg(){return this._text},_render(e){const t=nA();t.open("svg",nt({},gx,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&"transparent"!==n&&"none"!==n&&t.open("rect",{width:this._width,height:this._height,fill:n}).close(),t.open("g",aA,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const n=Jx[t.marktype],r=n.tag,i=[Kw,n.attr];e.open("g",{class:dw(t),"clip-path":t.clip?e_(this,t,t.group):null},Jw(t),{"pointer-events":"g"!==r&&!1===t.interactive?"none":null});const o=o=>{const a=this.href(o);if(a&&e.open("a",a),e.open(r,this.attr(t,o,i,"g"!==r?r:null)),"text"===r){const t=jx(o);if(xe(t)){const n={x:0,dy:Bx(o)};for(let r=0;r<t.length;++r)e.open("tspan",r?n:null).text(Vx(o,t[r])).close()}else e.text(Vx(o,t))}else if("g"===r){const r=o.strokeForeground,i=o.fill,a=o.stroke;r&&a&&(o.stroke=null),e.open("path",this.attr(t,o,n.background,"bgrect")).close(),e.open("g",this.attr(t,o,n.content)),W_(o,(t=>this.mark(e,t))),e.close(),r&&a?(i&&(o.fill=null),o.stroke=a,e.open("path",this.attr(t,o,n.foreground,"bgrect")).close(),i&&(o.fill=i)):e.open("path",this.attr(t,o,n.foreground,"bgfore")).close()}e.close(),a&&e.close()};return n.nested?t.items&&t.items.length&&o(t.items[0]):W_(t,o),e.close()},href(e){const t=e.href;let n;if(t){if(n=this._hrefs&&this._hrefs[t])return n;this.sanitizeURL(t).then((e=>{e["xlink:href"]=e.href,e.href=null,(this._hrefs||(this._hrefs={}))[t]=e}))}return null},attr(e,t,n,r){const i={},o=(e,t,n,r)=>{i[r||e]=t};return Array.isArray(n)?n.forEach((e=>e(o,t,this))):n(o,t,this),r&&function(e,t,n,r,i){if(null==t)return e;if("bgrect"===r&&!1===n.interactive&&(e["pointer-events"]="none"),"bgfore"===r&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===r&&!1===t.smooth&&(e.style="image-rendering: optimizeSpeed; image-rendering: pixelated;"),"text"===r&&(e["font-family"]=qx(t),e["font-size"]=Fx(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const n in oA){let r=t[n];const o=oA[n];("transparent"!==r||"fill"!==o&&"stroke"!==o)&&null!=r&&(ob(r)&&(r=ab(r,i.gradient,"")),e[o]=r)}}(i,t,e,r,this._defs),i},defs(e){const t=this._defs.gradient,n=this._defs.clipping;if(0!==Object.keys(t).length+Object.keys(n).length){e.open("defs");for(const n in t){const r=t[n],i=r.stops;"radial"===r.gradient?(e.open("pattern",{id:ib+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+n+")"}).close(),e.close(),e.open("radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):e.open("linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let t=0;t<i.length;++t)e.open("stop",{offset:i[t].offset,"stop-color":i[t].color}).close();e.close()}for(const t in n){const r=n[t];e.open("clipPath",{id:t}),r.path?e.open("path",{d:r.path}).close():e.open("rect",{x:0,y:0,width:r.width,height:r.height}).close(),e.close()}e.close()}}});const kA={Canvas:"canvas",PNG:"png",SVG:"svg",None:"none"},TA={};function SA(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(TA[e]=t,this):TA[e]}function EA(e,t,n){const r=[],i=(new t_).union(t),o=e.marktype;return o?CA(e,i,n,r):"group"===o?MA(e,i,n,r):oe("Intersect scene must be mark node or group item.")}function CA(e,t,n,r){if(function(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){const i=e.items,o=e.marktype,a=i.length;let s=0;if("group"===o)for(;s<a;++s)MA(i[s],t,n,r);else for(const e=Jx[o].isect;s<a;++s){const n=i[s];OA(n,t,e)&&r.push(n)}}return r}function MA(e,t,n,r){n&&n(e.mark)&&OA(e,t,Jx.group.isect)&&r.push(e);const i=e.items,o=i&&i.length;if(o){const a=e.x||0,s=e.y||0;t.translate(-a,-s);for(let e=0;e<o;++e)CA(i[e],t,n,r);t.translate(a,s)}return r}function OA(e,t,n){const r=e.bounds;return t.encloses(r)||t.intersects(r)&&n(e,t)}TA.canvas=TA.png={renderer:zw,headless:zw,handler:Dw},TA.svg={renderer:cA,headless:AA,handler:Bw},TA.none={};const LA=new t_;function DA(e){const t=e.clip;if(Ye(t))t(T_(LA.clear()));else{if(!t)return;LA.set(0,0,e.group.width,e.group.height)}e.bounds.intersect(LA)}function IA(e,t,n){return e===t||("path"===n?RA(e,t):e instanceof Date&&t instanceof Date?+e==+t:gt(e)&&gt(t)?Math.abs(e-t)<=1e-9:e&&t&&(we(e)||we(t))?function(e,t){var n,r,i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(i.sort(),o.sort(),r=i.length-1;r>=0;r--)if(i[r]!=o[r])return!1;for(r=i.length-1;r>=0;r--)if(!IA(e[n=i[r]],t[n],n))return!1;return typeof e==typeof t}(e,t):e==t)}function RA(e,t){return IA(fb(e),fb(t))}function PA(){Qb(),rb=0}const NA="top",zA="left",FA="right",BA="bottom",jA="start",UA="middle",VA="end",qA="group",HA="axis",$A="title",WA="legend",GA="row-header",YA="row-footer",XA="row-title",ZA="column-header",KA="column-footer",JA="column-title",QA="none",ek="all",tk="each",nk="flush",rk="column",ik="row";function ok(e){Us.call(this,null,e)}function ak(e,t,n){return t(e.bounds.clear(),e,n)}ut(ok,Us,{transform(e,t){const n=t.dataflow,r=e.mark,i=r.marktype,o=Jx[i],a=o.bound;let s,l=r.bounds;if(o.nested)r.items.length&&n.dirty(r.items[0]),l=ak(r,a),r.items.forEach((e=>{e.bounds.clear().union(l)}));else if(i===qA||e.modified())switch(t.visit(t.MOD,(e=>n.dirty(e))),l.clear(),r.items.forEach((e=>l.union(ak(e,a)))),r.role){case HA:case WA:case $A:t.reflow()}else s=t.changed(t.REM),t.visit(t.ADD,(e=>{l.union(ak(e,a))})),t.visit(t.MOD,(e=>{s=s||l.alignsWith(e.bounds),n.dirty(e),l.union(ak(e,a))})),s&&(l.clear(),r.items.forEach((e=>l.union(e.bounds))));return DA(r),t.modifies("bounds")}});const sk=":vega_identifier:";function lk(e){Us.call(this,0,e)}function ck(e){Us.call(this,null,e)}function uk(e){Us.call(this,null,e)}lk.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},ut(lk,Us,{transform(e,t){const n=(i=t.dataflow)._signals[sk]||(i._signals[sk]=i.add(0)),r=e.as;var i;let o=n.value;return t.visit(t.ADD,(e=>e[r]=e[r]||++o)),n.set(this.value=o),t}}),ut(ck,Us,{transform(e,t){let n=this.value;n||(n=t.dataflow.scenegraph().mark(e.markdef,function(e){const t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index),n.group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);const r=n.marktype===qA?r_:n_;return t.visit(t.ADD,(e=>r.call(e,n))),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t}});const hk={parity:e=>e.filter(((e,t)=>t%2?e.opacity=0:1)),greedy:(e,t)=>{let n;return e.filter(((e,r)=>r&&dk(n.bounds,e.bounds,t)?e.opacity=0:(n=e,1)))}},dk=(e,t,n)=>n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),fk=(e,t)=>{for(var n,r=1,i=e.length,o=e[0].bounds;r<i;o=n,++r)if(dk(o,n=e[r].bounds,t))return!0},pk=e=>{const t=e.bounds;return t.width()>1&&t.height()>1},gk=e=>(e.forEach((e=>e.opacity=1)),e),mk=(e,t)=>e.reflow(t.modified()).modifies("opacity");function vk(e){Us.call(this,null,e)}ut(uk,Us,{transform(e,t){const n=hk[e.method]||hk.parity,r=e.separation||0;let i,o,a=t.materialize(t.SOURCE).source;if(!a||!a.length)return;if(!e.method)return e.modified("method")&&(gk(a),t=mk(t,e)),t;if(a=a.filter(pk),!a.length)return;if(e.sort&&(a=a.slice().sort(e.sort)),i=gk(a),t=mk(t,e),i.length>=3&&fk(i,r)){do{i=n(i,r)}while(i.length>=3&&fk(i,r));i.length<3&&!Ee(a).opacity&&(i.length>1&&(Ee(i).opacity=0),Ee(a).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(o=((e,t,n)=>{var r=e.range(),i=new t_;return t===NA||t===BA?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),e=>i.encloses(e.bounds)})(e.boundScale,e.boundOrient,+e.boundTolerance),a.forEach((e=>{o(e)||(e.opacity=0)})));const s=i[0].mark.bounds.clear();return a.forEach((e=>{e.opacity&&s.union(e.bounds)})),t}}),ut(vk,Us,{transform(e,t){const n=t.dataflow;if(t.visit(t.ALL,(e=>n.dirty(e))),t.fields&&t.fields.zindex){const e=t.source&&t.source[0];e&&(e.mark.zdirty=!0)}}});const yk=new t_;function bk(e,t,n){return e[t]===n?0:(e[t]=n,1)}function _k(e){var t=e.items[0].orient;return t===zA||t===FA}function xk(e,t,n,r){var i,o,a=t.items[0],s=a.datum,l=null!=a.translate?a.translate:.5,c=a.orient,u=function(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(s),h=a.range,d=a.offset,f=a.position,p=a.minExtent,g=a.maxExtent,m=s.title&&a.items[u[2]].items[0],v=a.titlePadding,y=a.bounds,b=m&&Ux(m),_=0,x=0;switch(yk.clear().union(y),y.clear(),(i=u[0])>-1&&y.union(a.items[i].bounds),(i=u[1])>-1&&y.union(a.items[i].bounds),c){case NA:_=f||0,x=-d,o=Math.max(p,Math.min(g,-y.y1)),y.add(0,-o).add(h,0),m&&wk(e,m,o,v,b,0,-1,y);break;case zA:_=-d,x=f||0,o=Math.max(p,Math.min(g,-y.x1)),y.add(-o,0).add(0,h),m&&wk(e,m,o,v,b,1,-1,y);break;case FA:_=n+d,x=f||0,o=Math.max(p,Math.min(g,y.x2)),y.add(0,0).add(o,h),m&&wk(e,m,o,v,b,1,1,y);break;case BA:_=f||0,x=r+d,o=Math.max(p,Math.min(g,y.y2)),y.add(0,0).add(h,o),m&&wk(e,m,o,v,0,0,1,y);break;default:_=a.x,x=a.y}return s_(y.translate(_,x),a),bk(a,"x",_+l)|bk(a,"y",x+l)&&(a.bounds=yk,e.dirty(a),a.bounds=y,e.dirty(a)),a.mark.bounds.clear().union(y)}function wk(e,t,n,r,i,o,a,s){const l=t.bounds;if(t.auto){const s=a*(n+i+r);let c=0,u=0;e.dirty(t),o?c=(t.x||0)-(t.x=s):u=(t.y||0)-(t.y=s),t.mark.bounds.clear().union(l.translate(-c,-u)),e.dirty(t)}s.union(l)}const Ak=(e,t)=>Math.floor(Math.min(e,t)),kk=(e,t)=>Math.ceil(Math.max(e,t));function Tk(e){return(new t_).set(0,0,e.width||0,e.height||0)}function Sk(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function Ek(e,t,n){const r=we(e)?e[t]:e;return null!=r?r:void 0!==n?n:0}function Ck(e){return e<0?Math.ceil(-e):0}function Mk(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p=!n.nodirty,g=n.bounds===nk?Tk:Sk,m=yk.set(0,0,0,0),v=Ek(n.align,rk),y=Ek(n.align,ik),b=Ek(n.padding,rk),_=Ek(n.padding,ik),x=n.columns||t.length,w=x<=0?1:Math.ceil(t.length/x),A=t.length,k=Array(A),T=Array(x),S=0,E=Array(A),C=Array(w),M=0,O=Array(A),L=Array(A),D=Array(A);for(i=0;i<x;++i)T[i]=0;for(i=0;i<w;++i)C[i]=0;for(i=0;i<A;++i)l=t[i],s=D[i]=g(l),l.x=l.x||0,O[i]=0,l.y=l.y||0,L[i]=0,o=i%x,a=~~(i/x),S=Math.max(S,c=Math.ceil(s.x2)),M=Math.max(M,u=Math.ceil(s.y2)),T[o]=Math.max(T[o],c),C[a]=Math.max(C[a],u),k[i]=b+Ck(s.x1),E[i]=_+Ck(s.y1),p&&e.dirty(t[i]);for(i=0;i<A;++i)i%x==0&&(k[i]=0),i<x&&(E[i]=0);if(v===tk)for(o=1;o<x;++o){for(f=0,i=o;i<A;i+=x)f<k[i]&&(f=k[i]);for(i=o;i<A;i+=x)k[i]=f+T[o-1]}else if(v===ek){for(f=0,i=0;i<A;++i)i%x&&f<k[i]&&(f=k[i]);for(i=0;i<A;++i)i%x&&(k[i]=f+S)}else for(v=!1,o=1;o<x;++o)for(i=o;i<A;i+=x)k[i]+=T[o-1];if(y===tk)for(a=1;a<w;++a){for(f=0,r=(i=a*x)+x;i<r;++i)f<E[i]&&(f=E[i]);for(i=a*x;i<r;++i)E[i]=f+C[a-1]}else if(y===ek){for(f=0,i=x;i<A;++i)f<E[i]&&(f=E[i]);for(i=x;i<A;++i)E[i]=f+M}else for(y=!1,a=1;a<w;++a)for(r=(i=a*x)+x;i<r;++i)E[i]+=C[a-1];for(h=0,i=0;i<A;++i)h=k[i]+(i%x?h:0),O[i]+=h-t[i].x;for(o=0;o<x;++o)for(d=0,i=o;i<A;i+=x)d+=E[i],L[i]+=d-t[i].y;if(v&&Ek(n.center,rk)&&w>1)for(i=0;i<A;++i)(h=(s=v===ek?S:T[i%x])-D[i].x2-t[i].x-O[i])>0&&(O[i]+=h/2);if(y&&Ek(n.center,ik)&&1!==x)for(i=0;i<A;++i)(d=(s=y===ek?M:C[~~(i/x)])-D[i].y2-t[i].y-L[i])>0&&(L[i]+=d/2);for(i=0;i<A;++i)m.union(D[i].translate(O[i],L[i]));switch(h=Ek(n.anchor,"x"),d=Ek(n.anchor,"y"),Ek(n.anchor,rk)){case VA:h-=m.width();break;case UA:h-=m.width()/2}switch(Ek(n.anchor,ik)){case VA:d-=m.height();break;case UA:d-=m.height()/2}for(h=Math.round(h),d=Math.round(d),m.clear(),i=0;i<A;++i)t[i].mark.bounds.clear();for(i=0;i<A;++i)(l=t[i]).x+=O[i]+=h,l.y+=L[i]+=d,m.union(l.mark.bounds.union(l.bounds.translate(O[i],L[i]))),p&&e.dirty(l);return m}function Ok(e,t){return"x1"===t?e.x||0:"y1"===t?e.y||0:"x2"===t?(e.x||0)+(e.width||0):"y2"===t?(e.y||0)+(e.height||0):void 0}function Lk(e,t){return e.bounds[t]}function Dk(e,t,n,r,i,o,a,s,l,c,u,h,d,f){var p,g,m,v,y,b,_,x,w,A=n.length,k=0,T=0;if(!A)return k;for(p=u;p<A;p+=h)n[p]&&(k=a(k,l(n[p],c)));if(!t.length)return k;for(t.length>i&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),k+=o,g=0,v=t.length;g<v;++g)e.dirty(t[g]),t[g].mark.bounds.clear();for(p=u,g=0,v=t.length;g<v;++g,p+=h){for(y=(b=t[g]).mark.bounds,m=p;m>=0&&null==(_=n[m]);m-=d);s?(x=null==f?_.x:Math.round(_.bounds.x1+f*_.bounds.width()),w=k):(x=k,w=null==f?_.y:Math.round(_.bounds.y1+f*_.bounds.height())),y.union(b.bounds.translate(x-(b.x||0),w-(b.y||0))),b.x=x,b.y=w,e.dirty(b),T=a(T,y[c])}return T}function Ik(e,t,n,r,i,o){if(t){e.dirty(t);var a=n,s=n;r?a=Math.round(i.x1+o*i.width()):s=Math.round(i.y1+o*i.height()),t.bounds.translate(a-(t.x||0),s-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=a,t.y=s,e.dirty(t)}}function Rk(e,t,n,r,i,o,a){const s=function(e,t){const n=e[t]||{};return(t,r)=>null!=n[t]?n[t]:null!=e[t]?e[t]:r}(n,t),l=function(e,t){let n=-1/0;return e.forEach((e=>{null!=e.offset&&(n=Math.max(n,e.offset))})),n>-1/0?n:t}(e,s("offset",0)),c=s("anchor",jA),u=c===VA?1:c===UA?.5:0,h={align:tk,bounds:s("bounds",nk),columns:"vertical"===s("direction")?1:e.length,padding:s("margin",8),center:s("center"),nodirty:!0};switch(t){case zA:h.anchor={x:Math.floor(r.x1)-l,column:VA,y:u*(a||r.height()+2*r.y1),row:c};break;case FA:h.anchor={x:Math.ceil(r.x2)+l,y:u*(a||r.height()+2*r.y1),row:c};break;case NA:h.anchor={y:Math.floor(i.y1)-l,row:VA,x:u*(o||i.width()+2*i.x1),column:c};break;case BA:h.anchor={y:Math.ceil(i.y2)+l,x:u*(o||i.width()+2*i.x1),column:c};break;case"top-left":h.anchor={x:l,y:l};break;case"top-right":h.anchor={x:o-l,y:l,column:VA};break;case"bottom-left":h.anchor={x:l,y:a-l,row:VA};break;case"bottom-right":h.anchor={x:o-l,y:a-l,column:VA,row:VA}}return h}function Pk(e,t){var n,r,i=t.items[0],o=i.datum,a=i.orient,s=i.bounds,l=i.x,c=i.y;return i._bounds?i._bounds.clear().union(s):i._bounds=s.clone(),s.clear(),function(e,t,n){var r=t.padding,i=r-n.x,o=r-n.y;if(t.datum.title){var a=t.items[1].items[0],s=a.anchor,l=t.titlePadding||0,c=r-a.x,u=r-a.y;switch(a.orient){case zA:i+=Math.ceil(a.bounds.width())+l;break;case FA:case BA:break;default:o+=a.bounds.height()+l}switch((i||o)&&zk(e,n,i,o),a.orient){case zA:u+=Nk(t,n,a,s,1,1);break;case FA:c+=Nk(t,n,a,VA,0,0)+l,u+=Nk(t,n,a,s,1,1);break;case BA:c+=Nk(t,n,a,s,0,0),u+=Nk(t,n,a,VA,-1,0,1)+l;break;default:c+=Nk(t,n,a,s,0,0)}(c||u)&&zk(e,a,c,u),(c=Math.round(a.bounds.x1-r))<0&&(zk(e,n,-c,0),zk(e,a,-c,0))}else(i||o)&&zk(e,n,i,o)}(e,i,i.items[0].items[0]),s=function(e,t){return e.items.forEach((e=>t.union(e.bounds))),t.x1=e.padding,t.y1=e.padding,t}(i,s),n=2*i.padding,r=2*i.padding,s.empty()||(n=Math.ceil(s.width()+n),r=Math.ceil(s.height()+r)),"symbol"===o.type&&function(e){const t=e.reduce(((e,t)=>(e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e)),{});e.forEach((e=>{e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(i.items[0].items[0].items[0].items),a!==QA&&(i.x=l=0,i.y=c=0),i.width=n,i.height=r,s_(s.set(l,c,l+n,c+r),i),i.mark.bounds.clear().union(s),i}function Nk(e,t,n,r,i,o,a){const s="symbol"!==e.datum.type,l=n.datum.vgrad,c=(!s||!o&&l||a?t:t.items[0]).bounds[i?"y2":"x2"]-e.padding,u=l&&o?c:0,h=l&&o?0:c,d=i<=0?0:Ux(n);return Math.round(r===jA?u:r===VA?h-d:.5*(c-d))}function zk(e,t,n,r){t.x+=n,t.y+=r,t.bounds.translate(n,r),t.mark.bounds.translate(n,r),e.dirty(t)}function Fk(e){Us.call(this,null,e)}function Bk(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}function jk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Uk(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}ut(Fk,Us,{transform(e,t){const n=t.dataflow;return e.mark.items.forEach((t=>{e.layout&&function(e,t,n){var r,i,o,a,s,l,c,u=function(e){var t,n,r=e.items,i=r.length,o=0;const a={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;o<i;++o)if(n=(t=r[o]).items,t.marktype===qA)switch(t.role){case HA:case WA:case $A:break;case GA:a.rowheaders.push(...n);break;case YA:a.rowfooters.push(...n);break;case ZA:a.colheaders.push(...n);break;case KA:a.colfooters.push(...n);break;case XA:a.rowtitle=n[0];break;case JA:a.coltitle=n[0];break;default:a.marks.push(...n)}return a}(t),h=u.marks,d=n.bounds===nk?Ok:Lk,f=n.offset,p=n.columns||h.length,g=p<=0?1:Math.ceil(h.length/p),m=g*p;const v=Mk(e,h,n);v.empty()&&v.set(0,0,0,0),u.rowheaders&&(l=Ek(n.headerBand,ik,null),r=Dk(e,u.rowheaders,h,0,g,-Ek(f,"rowHeader"),Ak,0,d,"x1",0,p,1,l)),u.colheaders&&(l=Ek(n.headerBand,rk,null),i=Dk(e,u.colheaders,h,0,p,-Ek(f,"columnHeader"),Ak,1,d,"y1",0,1,p,l)),u.rowfooters&&(l=Ek(n.footerBand,ik,null),o=Dk(e,u.rowfooters,h,0,g,Ek(f,"rowFooter"),kk,0,d,"x2",p-1,p,1,l)),u.colfooters&&(l=Ek(n.footerBand,rk,null),a=Dk(e,u.colfooters,h,0,p,Ek(f,"columnFooter"),kk,1,d,"y2",m-p,1,p,l)),u.rowtitle&&(s=Ek(n.titleAnchor,ik),c=Ek(f,"rowTitle"),c=s===VA?o+c:r-c,l=Ek(n.titleBand,ik,.5),Ik(e,u.rowtitle,c,0,v,l)),u.coltitle&&(s=Ek(n.titleAnchor,rk),c=Ek(f,"columnTitle"),c=s===VA?a+c:i-c,l=Ek(n.titleBand,rk,.5),Ik(e,u.coltitle,c,1,v,l))}(n,t,e.layout),function(e,t,n){var r,i,o,a,s,l=t.items,c=Math.max(0,t.width||0),u=Math.max(0,t.height||0),h=(new t_).set(0,0,c,u),d=h.clone(),f=h.clone(),p=[];for(a=0,s=l.length;a<s;++a)switch((i=l[a]).role){case HA:(_k(i)?d:f).union(xk(e,i,c,u));break;case $A:r=i;break;case WA:p.push(Pk(e,i));break;case"frame":case"scope":case GA:case YA:case XA:case ZA:case KA:case JA:d.union(i.bounds),f.union(i.bounds);break;default:h.union(i.bounds)}if(p.length){const t={};p.forEach((e=>{(o=e.orient||FA)!==QA&&(t[o]||(t[o]=[])).push(e)}));for(const r in t){const i=t[r];Mk(e,i,Rk(i,r,n.legends,d,f,c,u))}p.forEach((t=>{const r=t.bounds;if(r.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=r,e.dirty(t)),n.autosize&&"fit"===n.autosize.type)switch(t.orient){case zA:case FA:h.add(r.x1,0).add(r.x2,0);break;case NA:case BA:h.add(0,r.y1).add(0,r.y2)}else h.union(r)}))}h.union(d).union(f),r&&h.union(function(e,t,n,r,i){var o,a=t.items[0],s=a.frame,l=a.orient,c=a.anchor,u=a.offset,h=a.padding,d=a.items[0].items[0],f=a.items[1]&&a.items[1].items[0],p=l===zA||l===FA?r:n,g=0,m=0,v=0,y=0,b=0;if(s!==qA?l===zA?(g=i.y2,p=i.y1):l===FA?(g=i.y1,p=i.y2):(g=i.x1,p=i.x2):l===zA&&(g=r,p=0),o=c===jA?g:c===VA?p:(g+p)/2,f&&f.text){switch(l){case NA:case BA:b=d.bounds.height()+h;break;case zA:y=d.bounds.width()+h;break;case FA:y=-d.bounds.width()-h}yk.clear().union(f.bounds),yk.translate(y-(f.x||0),b-(f.y||0)),bk(f,"x",y)|bk(f,"y",b)&&(e.dirty(f),f.bounds.clear().union(yk),f.mark.bounds.clear().union(yk),e.dirty(f)),yk.clear().union(f.bounds)}else yk.clear();switch(yk.union(d.bounds),l){case NA:m=o,v=i.y1-yk.height()-u;break;case zA:m=i.x1-yk.width()-u,v=o;break;case FA:m=i.x2+yk.width()+u,v=o;break;case BA:m=o,v=i.y2+u;break;default:m=a.x,v=a.y}return bk(a,"x",m)|bk(a,"y",v)&&(yk.translate(m,v),e.dirty(a),a.bounds.clear().union(yk),t.bounds.clear().union(yk),e.dirty(a)),a.bounds}(e,r,c,u,h)),t.clip&&h.set(0,0,t.width||0,t.height||0),function(e,t,n,r){const i=r.autosize||{},o=i.type;if(e._autosize<1||!o)return;let a=e._width,s=e._height,l=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-n.x1)),u=Math.max(0,t.height||0),h=Math.max(0,Math.ceil(-n.y1));const d=Math.max(0,Math.ceil(n.x2-l)),f=Math.max(0,Math.ceil(n.y2-u));if("padding"===i.contains){const t=e.padding();a-=t.left+t.right,s-=t.top+t.bottom}o===QA?(c=0,h=0,l=a,u=s):"fit"===o?(l=Math.max(0,a-c-d),u=Math.max(0,s-h-f)):"fit-x"===o?(l=Math.max(0,a-c-d),s=u+h+f):"fit-y"===o?(a=l+c+d,u=Math.max(0,s-h-f)):"pad"===o&&(a=l+c+d,s=u+h+f),e._resizeView(a,s,l,u,[c,h],i.resize)}(e,t,h,n)}(n,t,e)})),function(e){return e&&"legend-entry"!==e.mark.role}(e.mark.group)?t.reflow():t}});const Vk=e=>()=>e;function qk(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Vk(isNaN(e)?t:e)}const Hk=function e(t){var n=function(e){return 1==(e=+e)?qk:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Vk(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=$d(e)).r,(t=$d(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=qk(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function $k(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=$d(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}function Wk(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=eT(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Gk(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Yk(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Xk(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=eT(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}$k((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return Uk((n-r/t)*t,a,i,o,s)}})),$k((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Uk((n-r/t)*t,i,o,a,s)}}));var Zk=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Kk=new RegExp(Zk.source,"g");function Jk(e,t){var n,r,i,o=Zk.lastIndex=Kk.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Zk.exec(e))&&(r=Kk.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Yk(n,r)})),o=Kk.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Qk(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function eT(e,t){var n,r=typeof t;return null==t||"boolean"===r?Vk(t):("number"===r?Yk:"string"===r?(n=Ud(t))?(t=n,Hk):Jk:t instanceof Ud?Hk:t instanceof Date?Gk:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Qk:Array.isArray(t)?Wk:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Xk:Yk)(e,t)}function tT(e){Us.call(this,null,e)}function nT(e){Us.call(this,null,e)}function rT(){return hs({})}function iT(e){Us.call(this,null,e)}function oT(e){Us.call(this,[],e)}ut(tT,Us,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=this.value,o=e.scale,a=Vy(o,null==e.count?e.values?e.values.length:10:e.count,e.minstep),s=e.format||$y(n,o,a,e.formatSpecifier,e.formatType,!!e.values),l=e.values?qy(o,e.values,a):Hy(o,a);return i&&(r.rem=i),i=l.map(((e,t)=>hs({index:t/(l.length-1||1),value:e,label:s(e)}))),e.extra&&i.length&&i.push(hs({index:-1,extra:{value:i[0].value},label:""})),r.source=i,r.add=i,this.value=i,r}}),ut(nT,Us,{transform(e,t){var n=t.dataflow,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.item||rT,o=e.key||cs,a=this.value;return xe(r.encode)&&(r.encode=null),a&&(e.modified("key")||t.modified(o))&&oe("DataJoin does not support modified key function or fields."),a||(t=t.addAll(),this.value=a=function(e){const t=lt().test((e=>e.exit));return t.lookup=n=>t.get(e(n)),t}(o)),t.visit(t.ADD,(e=>{const t=o(e);let n=a.get(t);n?n.exit?(a.empty--,r.add.push(n)):r.mod.push(n):(n=i(e),a.set(t,n),r.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(e=>{const t=o(e),n=a.get(t);n&&(n.datum=e,r.mod.push(n))})),t.visit(t.REM,(e=>{const t=o(e),n=a.get(t);e!==n.datum||n.exit||(r.rem.push(n),n.exit=!0,++a.empty)})),t.changed(t.ADD_MOD)&&r.modifies("datum"),(t.clean()||e.clean&&a.empty>n.cleanThreshold)&&n.runAfter(a.clean),r}}),ut(iT,Us,{transform(e,t){var n=t.fork(t.ADD_REM),r=e.mod||!1,i=e.encoders,o=t.encode;if(xe(o)){if(!n.changed()&&!o.every((e=>i[e])))return t.StopPropagation;o=o[0],n.encode=null}var a="enter"===o,s=i.update||fe,l=i.enter||fe,c=i.exit||fe,u=(o&&!a?i[o]:s)||fe;if(t.changed(t.ADD)&&(t.visit(t.ADD,(t=>{l(t,e),s(t,e)})),n.modifies(l.output),n.modifies(s.output),u!==fe&&u!==s&&(t.visit(t.ADD,(t=>{u(t,e)})),n.modifies(u.output))),t.changed(t.REM)&&c!==fe&&(t.visit(t.REM,(t=>{c(t,e)})),n.modifies(c.output)),a||u!==fe){const i=t.MOD|(e.modified()?t.REFLOW:0);a?(t.visit(i,(t=>{const i=l(t,e)||r;(u(t,e)||i)&&n.mod.push(t)})),n.mod.length&&n.modifies(l.output)):t.visit(i,(t=>{(u(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)}return n.changed()?n:t.StopPropagation}}),ut(oT,Us,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var n,r,i,o,a,s=t.dataflow.locale(),l=t.fork(t.NO_SOURCE|t.NO_FIELDS),c=this.value,u=e.type||Fy,h=e.scale,d=+e.limit,f=Vy(h,null==e.count?5:e.count,e.minstep),p=!!e.values||u===Fy,g=e.format||Zy(s,h,f,u,e.formatSpecifier,e.formatType,p),m=e.values||Xy(h,f);return c&&(l.rem=c),u===Fy?(d&&m.length>d?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),c=m.slice(0,d-1),a=!0):c=m,Ye(i=e.size)?(e.values||0!==h(c[0])||(c=c.slice(1)),o=c.reduce(((t,n)=>Math.max(t,i(n,e))),0)):i=et(o=i||8),c=c.map(((t,n)=>hs({index:n,label:g(t,n,c),value:t,offset:o,size:i(t,e)}))),a&&(a=m[c.length],c.push(hs({index:c.length,label:"".concat(m.length-c.length," entries"),value:a,offset:o,size:i(a,e)})))):"gradient"===u?(n=h.domain(),r=Dy(h,n[0],Ee(n)),m.length<3&&!e.values&&n[0]!==Ee(n)&&(m=[n[0],Ee(n)]),c=m.map(((e,t)=>hs({index:t,label:g(e,t,m),value:e,perc:r(e)})))):(i=m.length-1,r=function(e){const t=e.domain(),n=t.length-1;let r=+t[0],i=+Ee(t),o=i-r;if(e.type===ny){const e=n?o/n:.1;r-=e,i+=e,o=i-r}return e=>(e-r)/o}(h),c=m.map(((e,t)=>hs({index:t,label:g(e,t,m),value:e,perc:t?r(e):0,perc2:t===i?1:r(m[t+1])})))),l.source=c,l.add=c,this.value=c,l}});const aT=e=>e.source.x,sT=e=>e.source.y,lT=e=>e.target.x,cT=e=>e.target.y;function uT(e){Us.call(this,{},e)}uT.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},ut(uT,Us,{transform(e,t){var n=e.sourceX||aT,r=e.sourceY||sT,i=e.targetX||lT,o=e.targetY||cT,a=e.as||"path",s=e.orient||"vertical",l=e.shape||"line",c=pT.get(l+"-"+s)||pT.get(l);return c||oe("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(e=>{e[a]=c(n(e),r(e),i(e),o(e))})),t.reflow(e.modified()).modifies(a)}});const hT=(e,t,n,r)=>"M"+e+","+t+"L"+n+","+r,dT=(e,t,n,r)=>{var i=n-e,o=r-t,a=Math.sqrt(i*i+o*o)/2;return"M"+e+","+t+"A"+a+","+a+" "+180*Math.atan2(o,i)/Math.PI+" 0 1 "+n+","+r},fT=(e,t,n,r)=>{const i=n-e,o=r-t,a=.2*(i+o),s=.2*(o-i);return"M"+e+","+t+"C"+(e+a)+","+(t+s)+" "+(n+s)+","+(r-a)+" "+n+","+r},pT=lt({line:hT,"line-radial":(e,t,n,r)=>hT(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),arc:dT,"arc-radial":(e,t,n,r)=>dT(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),curve:fT,"curve-radial":(e,t,n,r)=>fT(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n)),"orthogonal-horizontal":(e,t,n,r)=>"M"+e+","+t+"V"+r+"H"+n,"orthogonal-vertical":(e,t,n,r)=>"M"+e+","+t+"H"+n+"V"+r,"orthogonal-radial":(e,t,n,r)=>{const i=Math.cos(e),o=Math.sin(e),a=Math.cos(n),s=Math.sin(n);return"M"+t*i+","+t*o+"A"+t+","+t+" 0 0,"+((Math.abs(n-e)>Math.PI?n<=e:n>e)?1:0)+" "+t*a+","+t*s+"L"+r*a+","+r*s},"diagonal-horizontal":(e,t,n,r)=>{const i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},"diagonal-vertical":(e,t,n,r)=>{const i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":(e,t,n,r)=>{const i=Math.cos(e),o=Math.sin(e),a=Math.cos(n),s=Math.sin(n),l=(t+r)/2;return"M"+t*i+","+t*o+"C"+l*i+","+l*o+" "+l*a+","+l*s+" "+r*a+","+r*s}});function gT(e){Us.call(this,null,e)}function mT(e){return wy(e)&&e!==Jv}gT.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},ut(gT,Us,{transform(e,t){var n,r,i,o=e.as||["startAngle","endAngle"],a=o[0],s=o[1],l=e.field||he,c=e.startAngle||0,u=null!=e.endAngle?e.endAngle:2*Math.PI,h=t.source,d=h.map(l),f=d.length,p=c,g=(u-c)/function(e,t){let n=0;for(let t of e)(t=+t)&&(n+=t);return n}(d),m=Bk(f);for(e.sort&&m.sort(((e,t)=>d[e]-d[t])),n=0;n<f;++n)i=d[m[n]],(r=h[m[n]])[a]=p,r[s]=p+=i*g;return this.value=d,t.reflow(e.modified()).modifies(o)}});const vT=Ot(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function yT(e){Us.call(this,null,e),this.modified(!0)}function bT(e,t,n){return Ty(e)&&Math.abs(t.reduce(((e,t)=>e+(t<0?-1:t>0?1:0)),0))!==t.length&&n.warn("Log scale domain includes zero: "+Tt(t)),t}function _T(e,t,n){return Ye(e)&&(t||n)?My(e,xT(t||[0,1],n)):e}function xT(e,t){return t?e.slice().reverse():e}function wT(e){Us.call(this,null,e)}ut(yT,Us,{transform(e,t){var n=t.dataflow,r=this.value,i=function(e){var t,n=e.type,r="";return n===Jv?"sequential-linear":(function(e){const t=e.type;return wy(t)&&t!==Zv&&t!==Kv&&(e.scheme||e.range&&e.range.length&&e.range.every(vt))}(e)&&(r=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?"sequential-":3===t?"diverging-":""),(r+n||$v).toLowerCase())}(e);for(i in r&&i===r.type||(this.value=r=by(i)()),e)if(!vT[i]){if("padding"===i&&mT(r.type))continue;Ye(r[i])?r[i](e[i]):n.warn("Unsupported scale property: "+i)}return function(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(null!=t.rangeStep)o=function(e,t,n){e!==oy&&e!==iy&&oe("Only band and point scales support rangeStep.");var r=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,i=e===iy?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Hv(n,i,r)]}(r,t,n);else if(t.scheme&&(o=function(e,t,n){var r,i=t.schemeExtent;return xe(t.scheme)?r=Oy(t.scheme,t.interpolate,t.interpolateGamma):(r=zy(t.scheme.toLowerCase()))||oe("Unrecognized scheme name: ".concat(t.scheme)),n=e===ny?n+1:e===ay?n-1:e===ey||e===ty?+t.schemeCount||5:n,Sy(e)?_T(r,i,t.reverse):Ye(r)?Ly(_T(r,i),n):e===ry?r:r.slice(0,n)}(r,t,n),Ye(o))){if(e.interpolator)return e.interpolator(o);oe("Scale type ".concat(r," does not support interpolating color schemes."))}if(o&&Sy(r))return e.interpolator(Oy(xT(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(Iy(t.interpolate,t.interpolateGamma)):Ye(e.round)?e.round(i):Ye(e.rangeRound)&&e.interpolate(i?jk:eT),o&&e.range(xT(o,t.reverse))}(r,e,function(e,t,n){let r=t.bins;if(r&&!xe(r)){const t=e.domain(),n=t[0],i=Ee(t),o=r.step;let a=null==r.start?n:r.start,s=null==r.stop?i:r.stop;o||oe("Scale bins parameter missing step property."),a<n&&(a=o*Math.ceil(n/o)),s>i&&(s=o*Math.floor(i/o)),r=Bk(a,s+o/2,o)}return r?e.bins=r:e.bins&&delete e.bins,e.type===ay&&(r?t.domain||t.domainRaw||(e.domain(r),n=r.length):e.bins=e.domain()),n}(r,e,function(e,t,n){const r=function(e,t,n){return t?(e.domain(bT(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(r>-1)return r;var i,o,a=t.domain,s=e.type,l=t.zero||void 0===t.zero&&function(e){const t=e.type;return!e.bins&&(t===$v||t===Gv||t===Yv)}(e);if(!a)return 0;if(mT(s)&&t.padding&&a[0]!==Ee(a)&&(a=function(e,t,n,r,i,o){var a=Math.abs(Ee(n)-n[0]),s=a/(a-2*r),l=e===Wv?Ue(t,null,s):e===Yv?Ve(t,null,s,.5):e===Gv?Ve(t,null,s,i||1):e===Xv?qe(t,null,s,o||1):je(t,null,s);return(t=t.slice())[0]=l[0],t[t.length-1]=l[1],t}(s,a,t.range,t.padding,t.exponent,t.constant)),(l||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(i=(a=a.slice()).length-1||1,l&&(a[0]>0&&(a[0]=0),a[i]<0&&(a[i]=0)),null!=t.domainMin&&(a[0]=t.domainMin),null!=t.domainMax&&(a[i]=t.domainMax),null!=t.domainMid)){const e=(o=t.domainMid)>a[i]?i+1:o<a[0]?0:i;e!==i&&n.warn("Scale domainMid exceeds domain min or max.",o),a.splice(e,0,o)}return e.domain(bT(s,a,n)),s===ry&&e.unknown(t.domainImplicit?Yh:void 0),t.nice&&e.nice&&e.nice(!0!==t.nice&&Vy(e,t.nice)||null),a.length}(r,e,n))),t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),ut(wT,Us,{transform(e,t){const n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(gs(e.sort)),this.modified(n),t}});const AT="zero",kT="center",TT="normalize",ST=["y0","y1"];function ET(e){Us.call(this,null,e)}function CT(e,t,n,r,i){for(var o,a=(t-e.sum)/2,s=e.length,l=0;l<s;++l)(o=e[l])[r]=a,o[i]=a+=Math.abs(n(o))}function MT(e,t,n,r,i){for(var o,a=1/e.sum,s=0,l=e.length,c=0,u=0;c<l;++c)(o=e[c])[r]=s,o[i]=s=a*(u+=Math.abs(n(o)))}function OT(e,t,n,r,i){for(var o,a,s=0,l=0,c=e.length,u=0;u<c;++u)(o=+n(a=e[u]))<0?(a[r]=l,a[i]=l+=o):(a[r]=s,a[i]=s+=o)}ET.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:AT,values:[AT,kT,TT]},{name:"as",type:"string",array:!0,length:2,default:ST}]},ut(ET,Us,{transform(e,t){var n,r,i,o,a=e.as||ST,s=a[0],l=a[1],c=gs(e.sort),u=e.field||he,h=e.offset===kT?CT:e.offset===TT?MT:OT;for(n=function(e,t,n,r){var i,o,a,s,l,c,u,h,d,f=[],p=e=>e(l);if(null==t)f.push(e.slice());else for(i={},o=0,a=e.length;o<a;++o)l=e[o],(u=i[c=t.map(p)])||(i[c]=u=[],f.push(u)),u.push(l);for(c=0,d=0,s=f.length;c<s;++c){for(o=0,h=0,a=(u=f[c]).length;o<a;++o)h+=Math.abs(r(u[o]));u.sum=h,h>d&&(d=h),n&&u.sort(n)}return f.max=d,f}(t.source,e.groupby,c,u),r=0,i=n.length,o=n.max;r<i;++r)h(n[r],o,u,s,l);return t.reflow(e.modified()).modifies(a)}});var LT=Math.sqrt(50),DT=Math.sqrt(10),IT=Math.sqrt(2);function RT(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}function PT(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}const NT=e=>e;function zT(e,t){e&&BT.hasOwnProperty(e.type)&&BT[e.type](e,t)}var FT={Feature:function(e,t){zT(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)zT(n[r].geometry,t)}},BT={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){jT(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jT(n[r],t,0)},Polygon:function(e,t){UT(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)UT(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)zT(n[r],t)}};function jT(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function UT(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)jT(e[n],t,1);t.polygonEnd()}function VT(e,t){e&&FT.hasOwnProperty(e.type)?FT[e.type](e,t):zT(e,t)}class qT{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}var HT=1e-6,$T=Math.PI,WT=$T/2,GT=$T/4,YT=2*$T,XT=180/$T,ZT=$T/180,KT=Math.abs,JT=Math.atan,QT=Math.atan2,eS=Math.cos,tS=(Math.ceil,Math.exp),nS=(Math.floor,Math.hypot,Math.log),rS=Math.pow,iS=Math.sin,oS=Math.sign||function(e){return e>0?1:e<0?-1:0},aS=Math.sqrt,sS=Math.tan;function lS(e){return e>1?0:e<-1?$T:Math.acos(e)}function cS(e){return e>1?WT:e<-1?-WT:Math.asin(e)}function uS(){}var hS,dS,fS,pS,gS=new qT,mS=new qT,vS={point:uS,lineStart:uS,lineEnd:uS,polygonStart:function(){vS.lineStart=yS,vS.lineEnd=xS},polygonEnd:function(){vS.lineStart=vS.lineEnd=vS.point=uS,gS.add(KT(mS)),mS=new qT},result:function(){var e=gS/2;return gS=new qT,e}};function yS(){vS.point=bS}function bS(e,t){vS.point=_S,hS=fS=e,dS=pS=t}function _S(e,t){mS.add(pS*e-fS*t),fS=e,pS=t}function xS(){_S(hS,dS)}const wS=vS;var AS=1/0,kS=AS,TS=-AS,SS=TS,ES={point:function(e,t){e<AS&&(AS=e),e>TS&&(TS=e),t<kS&&(kS=t),t>SS&&(SS=t)},lineStart:uS,lineEnd:uS,polygonStart:uS,polygonEnd:uS,result:function(){var e=[[AS,kS],[TS,SS]];return TS=SS=-(kS=AS=1/0),e}};const CS=ES;var MS,OS,LS,DS,IS=0,RS=0,PS=0,NS=0,zS=0,FS=0,BS=0,jS=0,US=0,VS={point:qS,lineStart:HS,lineEnd:GS,polygonStart:function(){VS.lineStart=YS,VS.lineEnd=XS},polygonEnd:function(){VS.point=qS,VS.lineStart=HS,VS.lineEnd=GS},result:function(){var e=US?[BS/US,jS/US]:FS?[NS/FS,zS/FS]:PS?[IS/PS,RS/PS]:[NaN,NaN];return IS=RS=PS=NS=zS=FS=BS=jS=US=0,e}};function qS(e,t){IS+=e,RS+=t,++PS}function HS(){VS.point=$S}function $S(e,t){VS.point=WS,qS(LS=e,DS=t)}function WS(e,t){var n=e-LS,r=t-DS,i=aS(n*n+r*r);NS+=i*(LS+e)/2,zS+=i*(DS+t)/2,FS+=i,qS(LS=e,DS=t)}function GS(){VS.point=qS}function YS(){VS.point=ZS}function XS(){KS(MS,OS)}function ZS(e,t){VS.point=KS,qS(MS=LS=e,OS=DS=t)}function KS(e,t){var n=e-LS,r=t-DS,i=aS(n*n+r*r);NS+=i*(LS+e)/2,zS+=i*(DS+t)/2,FS+=i,BS+=(i=DS*e-LS*t)*(LS+e),jS+=i*(DS+t),US+=3*i,qS(LS=e,DS=t)}const JS=VS;function QS(e){this._context=e}QS.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,YT)}},result:uS};var eE,tE,nE,rE,iE,oE=new qT,aE={point:uS,lineStart:function(){aE.point=sE},lineEnd:function(){eE&&lE(tE,nE),aE.point=uS},polygonStart:function(){eE=!0},polygonEnd:function(){eE=null},result:function(){var e=+oE;return oE=new qT,e}};function sE(e,t){aE.point=lE,tE=rE=e,nE=iE=t}function lE(e,t){rE-=e,iE-=t,oE.add(aS(rE*rE+iE*iE)),rE=e,iE=t}const cE=aE;function uE(){this._string=[]}function hE(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function dE(e,t){var n,r,i=4.5;function o(e){return e&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),VT(e,n(r))),r.result()}return o.area=function(e){return VT(e,n(wS)),wS.result()},o.measure=function(e){return VT(e,n(cE)),cE.result()},o.bounds=function(e){return VT(e,n(CS)),CS.result()},o.centroid=function(e){return VT(e,n(JS)),JS.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,NT):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new uE):new QS(t=e),"function"!=typeof i&&r.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"==typeof e?e:(r.pointRadius(+e),+e),o):i},o.projection(e).context(t)}function fE(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:uS,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function pE(e,t){return KT(e[0]-t[0])<HT&&KT(e[1]-t[1])<HT}function gE(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function mE(e,t,n,r,i){var o,a,s=[],l=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],a=e[t];if(pE(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<t;++o)i.point((r=e[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new gE(r,e,null,!0)),l.push(n.o=new gE(r,null,n,!1)),s.push(n=new gE(a,e,null,!1)),l.push(n.o=new gE(a,null,n,!0))}})),s.length){for(l.sort(t),vE(s),vE(l),o=0,a=l.length;o<a;++o)l[o].e=n=!n;for(var c,u,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,a=c.length;o<a;++o)i.point((u=c[o])[0],u[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(c=d.p.z,o=c.length-1;o>=0;--o)i.point((u=c[o])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function vE(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function yE(e){return[QT(e[1],e[0]),cS(e[2])]}function bE(e){var t=e[0],n=e[1],r=eS(n);return[r*eS(t),r*iS(t),iS(n)]}function _E(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function xE(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function wE(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function AE(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function kE(e){var t=aS(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function TE(e){return KT(e[0])<=$T?e[0]:oS(e[0])*((KT(e[0])+$T)%YT-$T)}function SE(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function EE(e,t,n,r){return function(i){var o,a,s,l=t(i),c=fE(),u=t(c),h=!1,d={point:f,lineStart:g,lineEnd:m,polygonStart:function(){d.point=v,d.lineStart=y,d.lineEnd=b,a=[],o=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=m,a=SE(a);var e=function(e,t){var n=TE(t),r=t[1],i=iS(r),o=[iS(n),-eS(n),0],a=0,s=0,l=new qT;1===i?r=WT+HT:-1===i&&(r=-WT-HT);for(var c=0,u=e.length;c<u;++c)if(d=(h=e[c]).length)for(var h,d,f=h[d-1],p=TE(f),g=f[1]/2+GT,m=iS(g),v=eS(g),y=0;y<d;++y,p=_,m=w,v=A,f=b){var b=h[y],_=TE(b),x=b[1]/2+GT,w=iS(x),A=eS(x),k=_-p,T=k>=0?1:-1,S=T*k,E=S>$T,C=m*w;if(l.add(QT(C*T*iS(S),v*A+C*eS(S))),a+=E?k+T*YT:k,E^p>=n^_>=n){var M=xE(bE(f),bE(b));kE(M);var O=xE(o,M);kE(O);var L=(E^k>=0?-1:1)*cS(O[2]);(r>L||r===L&&(M[0]||M[1]))&&(s+=E^k>=0?1:-1)}}return(a<-1e-6||a<HT&&l<-1e-12)^1&s}(o,r);a.length?(h||(i.polygonStart(),h=!0),mE(a,ME,e,n,i)):e&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(t,n){e(t,n)&&i.point(t,n)}function p(e,t){l.point(e,t)}function g(){d.point=p,l.lineStart()}function m(){d.point=f,l.lineEnd()}function v(e,t){s.push([e,t]),u.point(e,t)}function y(){u.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),u.lineEnd();var e,t,n,r,l=u.clean(),d=c.result(),f=d.length;if(s.pop(),o.push(s),s=null,f)if(1&l){if((t=(n=d[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else f>1&&2&l&&d.push(d.pop().concat(d.shift())),a.push(d.filter(CE))}return d}}function CE(e){return e.length>1}function ME(e,t){return((e=e.x)[0]<0?e[1]-WT-HT:WT-e[1])-((t=t.x)[0]<0?t[1]-WT-HT:WT-t[1])}uE.prototype={_radius:4.5,_circle:hE(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=hE(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};const OE=EE((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?$T:-$T,l=KT(o-n);KT(l-$T)<HT?(e.point(n,r=(r+a)/2>0?WT:-WT),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=$T&&(KT(n-i)<HT&&(n-=i*HT),KT(o-s)<HT&&(o-=s*HT),r=function(e,t,n,r){var i,o,a=iS(e-n);return KT(a)>HT?JT((iS(t)*(o=eS(r))*iS(n)-iS(r)*(i=eS(t))*iS(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*WT,r.point(-$T,i),r.point(0,i),r.point($T,i),r.point($T,0),r.point($T,-i),r.point(0,-i),r.point(-$T,-i),r.point(-$T,0),r.point(-$T,i);else if(KT(e[0]-t[0])>HT){var o=e[0]<t[0]?$T:-$T;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-$T,-WT]);function LE(e,t){(t=bE(t))[0]-=e,kE(t);var n=lS(-t[1]);return((-t[2]<0?-n:n)+YT-HT)%YT}function DE(e){var t=eS(e),n=6*ZT,r=t>0,i=KT(t)>HT;function o(e,n){return eS(e)*eS(n)>t}function a(e,n,r){var i=[1,0,0],o=xE(bE(e),bE(n)),a=_E(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var c=t*a/l,u=-t*s/l,h=xE(i,o),d=AE(i,c);wE(d,AE(o,u));var f=h,p=_E(d,f),g=_E(f,f),m=p*p-g*(_E(d,d)-1);if(!(m<0)){var v=aS(m),y=AE(f,(-p-v)/g);if(wE(y,d),y=yE(y),!r)return y;var b,_=e[0],x=n[0],w=e[1],A=n[1];x<_&&(b=_,_=x,x=b);var k=x-_,T=KT(k-$T)<HT;if(!T&&A<w&&(b=w,w=A,A=b),T||k<HT?T?w+A>0^y[1]<(KT(y[0]-_)<HT?w:A):w<=y[1]&&y[1]<=A:k>$T^(_<=y[0]&&y[0]<=x)){var S=AE(f,(-p+v)/g);return wE(S,d),[y,yE(S)]}}}function s(t,n){var i=r?e:$T-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return EE(o,(function(e){var t,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,d){var f,p=[h,d],g=o(h,d),m=r?g?0:s(h,d):g?s(h+(h<0?$T:-$T),d):0;if(!t&&(c=l=g)&&e.lineStart(),g!==l&&(!(f=a(t,p))||pE(t,f)||pE(p,f))&&(p[2]=1),g!==l)u=0,g?(e.lineStart(),f=a(p,t),e.point(f[0],f[1])):(f=a(t,p),e.point(f[0],f[1],2),e.lineEnd()),t=f;else if(i&&t&&r^g){var v;m&n||!(v=a(p,t,!0))||(u=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!g||t&&pE(t,p)||e.point(p[0],p[1]),t=p,l=g,n=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,r,i,o){!function(e,t,n,r,i,o){if(n){var a=eS(t),s=iS(t),l=r*n;null==i?(i=t+r*YT,o=t-l/2):(i=LE(a,i),o=LE(a,o),(r>0?i<o:i>o)&&(i+=r*YT));for(var c,u=i;r>0?u>o:u<o;u-=l)c=yE([a,-s*eS(u),-s*iS(u)]),e.point(c[0],c[1])}}(o,e,n,i,t,r)}),r?[0,-e]:[-$T,e-$T])}var IE=1e9,RE=-IE;function PE(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,s,c){var u=0,h=0;if(null==i||(u=a(i,s))!==(h=a(o,s))||l(i,o)<0^s>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+s+4)%4)!==h);else c.point(o[0],o[1])}function a(r,i){return KT(r[0]-e)<HT?i>0?0:3:KT(r[0]-n)<HT?i>0?2:1:KT(r[1]-t)<HT?i>0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var l,c,u,h,d,f,p,g,m,v,y,b=a,_=fE(),x={point:w,lineStart:function(){x.point=A,c&&c.push(u=[]),v=!0,m=!1,p=g=NaN},lineEnd:function(){l&&(A(h,d),f&&m&&_.rejoin(),l.push(_.result())),x.point=w,m&&b.lineEnd()},polygonStart:function(){b=_,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;n<i;++n)for(var o,a,s=c[n],l=1,u=s.length,h=s[0],d=h[0],f=h[1];l<u;++l)o=d,a=f,d=(h=s[l])[0],f=h[1],a<=r?f>r&&(d-o)*(r-a)>(f-a)*(e-o)&&++t:f<=r&&(d-o)*(r-a)<(f-a)*(e-o)&&--t;return t}(),n=y&&t,i=(l=SE(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&mE(l,s,t,o,a),a.polygonEnd()),b=a,l=c=u=null}};function w(e,t){i(e,t)&&b.point(e,t)}function A(o,a){var s=i(o,a);if(c&&u.push([o,a]),v)h=o,d=a,f=s,v=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&m)b.point(o,a);else{var l=[p=Math.max(RE,Math.min(IE,p)),g=Math.max(RE,Math.min(IE,g))],_=[o=Math.max(RE,Math.min(IE,o)),a=Math.max(RE,Math.min(IE,a))];!function(e,t,n,r,i,o){var a,s=e[0],l=e[1],c=0,u=1,h=t[0]-s,d=t[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<u&&(u=a)}else if(h>0){if(a>u)return;a>c&&(c=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<u&&(u=a)}if(a=r-l,d||!(a>0)){if(a/=d,d<0){if(a<c)return;a<u&&(u=a)}else if(d>0){if(a>u)return;a>c&&(c=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a<c)return;a<u&&(u=a)}return c>0&&(e[0]=s+c*h,e[1]=l+c*d),u<1&&(t[0]=s+u*h,t[1]=l+u*d),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(o,a),y=!1):(m||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),y=!1)}p=o,g=a,m=s}return x}}function NE(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function zE(e,t){return[KT(e)>$T?e+Math.round(-e/YT)*YT:e,t]}function FE(e,t,n){return(e%=YT)?t||n?NE(jE(e),UE(t,n)):jE(e):t||n?UE(t,n):zE}function BE(e){return function(t,n){return[(t+=e)>$T?t-YT:t<-$T?t+YT:t,n]}}function jE(e){var t=BE(e);return t.invert=BE(-e),t}function UE(e,t){var n=eS(e),r=iS(e),i=eS(t),o=iS(t);function a(e,t){var a=eS(t),s=eS(e)*a,l=iS(e)*a,c=iS(t),u=c*n+s*r;return[QT(l*i-u*o,s*n-c*r),cS(u*i+l*o)]}return a.invert=function(e,t){var a=eS(t),s=eS(e)*a,l=iS(e)*a,c=iS(t),u=c*i-l*o;return[QT(l*i+c*o,s*n+u*r),cS(u*n-s*r)]},a}function VE(e){return function(t){var n=new qE;for(var r in e)n[r]=e[r];return n.stream=t,n}}function qE(){}function HE(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),VT(n,e.stream(CS)),t(CS.result()),null!=r&&e.clipExtent(r),e}function $E(e,t,n){return HE(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])}),n)}function WE(e,t,n){return $E(e,[[0,0],t],n)}function GE(e,t,n){return HE(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}function YE(e,t,n){return HE(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}zE.invert=zE,qE.prototype={constructor:qE,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var XE=eS(30*ZT);function ZE(e,t){return+t?function(e,t){function n(r,i,o,a,s,l,c,u,h,d,f,p,g,m){var v=c-r,y=u-i,b=v*v+y*y;if(b>4*t&&g--){var _=a+d,x=s+f,w=l+p,A=aS(_*_+x*x+w*w),k=cS(w/=A),T=KT(KT(w)-1)<HT||KT(o-h)<HT?(o+h)/2:QT(x,_),S=e(T,k),E=S[0],C=S[1],M=E-r,O=C-i,L=y*M-v*O;(L*L/b>t||KT((v*M+y*O)/b-.5)>.3||a*d+s*f+l*p<XE)&&(n(r,i,o,a,s,l,E,C,T,_/=A,x/=A,w,g,m),m.point(E,C),n(E,C,T,_,x,w,c,u,h,d,f,p,g,m))}}return function(t){var r,i,o,a,s,l,c,u,h,d,f,p,g={point:m,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),g.lineStart=_},polygonEnd:function(){t.polygonEnd(),g.lineStart=v}};function m(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){u=NaN,g.point=y,t.lineStart()}function y(r,i){var o=bE([r,i]),a=e(r,i);n(u,h,c,d,f,p,u=a[0],h=a[1],c=r,d=o[0],f=o[1],p=o[2],16,t),t.point(u,h)}function b(){g.point=m,t.lineEnd()}function _(){v(),g.point=x,g.lineEnd=w}function x(e,t){y(r=e,t),i=u,o=h,a=d,s=f,l=p,g.point=y}function w(){n(u,h,c,d,f,p,i,o,r,a,s,l,16,t),g.lineEnd=b,b()}return g}}(e,t):function(e){return VE({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var KE=VE({point:function(e,t){this.stream.point(e*ZT,t*ZT)}});function JE(e,t,n,r,i,o){if(!o)return function(e,t,n,r,i){function o(o,a){return[t+e*(o*=r),n-e*(a*=i)]}return o.invert=function(o,a){return[(o-t)/e*r,(n-a)/e*i]},o}(e,t,n,r,i);var a=eS(o),s=iS(o),l=a*e,c=s*e,u=a/e,h=s/e,d=(s*n-a*t)/e,f=(s*t+a*n)/e;function p(e,o){return[l*(e*=r)-c*(o*=i)+t,n-c*e-l*o]}return p.invert=function(e,t){return[r*(u*e-h*t+d),i*(f-h*e-u*t)]},p}function QE(e){return eC((function(){return e}))()}function eC(e){var t,n,r,i,o,a,s,l,c,u,h=150,d=480,f=250,p=0,g=0,m=0,v=0,y=0,b=0,_=1,x=1,w=null,A=OE,k=null,T=NT,S=.5;function E(e){return l(e[0]*ZT,e[1]*ZT)}function C(e){return(e=l.invert(e[0],e[1]))&&[e[0]*XT,e[1]*XT]}function M(){var e=JE(h,0,0,_,x,b).apply(null,t(p,g)),r=JE(h,d-e[0],f-e[1],_,x,b);return n=FE(m,v,y),s=NE(t,r),l=NE(n,s),a=ZE(s,S),O()}function O(){return c=u=null,E}return E.stream=function(e){return c&&u===e?c:c=KE(function(e){return VE({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(A(a(T(u=e)))))},E.preclip=function(e){return arguments.length?(A=e,w=void 0,O()):A},E.postclip=function(e){return arguments.length?(T=e,k=r=i=o=null,O()):T},E.clipAngle=function(e){return arguments.length?(A=+e?DE(w=e*ZT):(w=null,OE),O()):w*XT},E.clipExtent=function(e){return arguments.length?(T=null==e?(k=r=i=o=null,NT):PE(k=+e[0][0],r=+e[0][1],i=+e[1][0],o=+e[1][1]),O()):null==k?null:[[k,r],[i,o]]},E.scale=function(e){return arguments.length?(h=+e,M()):h},E.translate=function(e){return arguments.length?(d=+e[0],f=+e[1],M()):[d,f]},E.center=function(e){return arguments.length?(p=e[0]%360*ZT,g=e[1]%360*ZT,M()):[p*XT,g*XT]},E.rotate=function(e){return arguments.length?(m=e[0]%360*ZT,v=e[1]%360*ZT,y=e.length>2?e[2]%360*ZT:0,M()):[m*XT,v*XT,y*XT]},E.angle=function(e){return arguments.length?(b=e%360*ZT,M()):b*XT},E.reflectX=function(e){return arguments.length?(_=e?-1:1,M()):_<0},E.reflectY=function(e){return arguments.length?(x=e?-1:1,M()):x<0},E.precision=function(e){return arguments.length?(a=ZE(s,S=e*e),O()):aS(S)},E.fitExtent=function(e,t){return $E(E,e,t)},E.fitSize=function(e,t){return WE(E,e,t)},E.fitWidth=function(e,t){return GE(E,e,t)},E.fitHeight=function(e,t){return YE(E,e,t)},function(){return t=e.apply(this,arguments),E.invert=t.invert&&C,M()}}function tC(e){var t=0,n=$T/3,r=eC(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*ZT,n=e[1]*ZT):[t*XT,n*XT]},i}function nC(e,t){var n=iS(e),r=(n+iS(t))/2;if(KT(r)<HT)return function(e){var t=eS(e);function n(e,n){return[e*t,iS(n)/t]}return n.invert=function(e,n){return[e/t,cS(n*t)]},n}(e);var i=1+n*(2*r-n),o=aS(i)/r;function a(e,t){var n=aS(i-2*r*iS(t))/r;return[n*iS(e*=r),o-n*eS(e)]}return a.invert=function(e,t){var n=o-t,a=QT(e,KT(n))*oS(n);return n*r<0&&(a-=$T*oS(e)*oS(n)),[a/r,cS((i-(e*e+n*n)*r*r)/(2*r))]},a}function rC(){return tC(nC).scale(155.424).center([0,33.6442])}function iC(){return rC().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function oC(e){return function(t,n){var r=eS(t),i=eS(n),o=e(r*i);return o===1/0?[2,0]:[o*i*iS(t),o*iS(n)]}}function aC(e){return function(t,n){var r=aS(t*t+n*n),i=e(r),o=iS(i),a=eS(i);return[QT(t*o,r*a),cS(r&&n*o/r)]}}var sC=oC((function(e){return aS(2/(1+e))}));sC.invert=aC((function(e){return 2*cS(e/2)}));var lC=oC((function(e){return(e=lS(e))&&e/iS(e)}));function cC(e,t){return[e,nS(sS((WT+t)/2))]}function uC(e){var t,n,r,i=QE(e),o=i.center,a=i.scale,s=i.translate,l=i.clipExtent,c=null;function u(){var o=$T*a(),s=i(function(e){function t(t){return(t=e(t[0]*ZT,t[1]*ZT))[0]*=XT,t[1]*=XT,t}return e=FE(e[0]*ZT,e[1]*ZT,e.length>2?e[2]*ZT:0),t.invert=function(t){return(t=e.invert(t[0]*ZT,t[1]*ZT))[0]*=XT,t[1]*=XT,t},t}(i.rotate()).invert([0,0]));return l(null==c?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:e===cC?[[Math.max(s[0]-o,c),t],[Math.min(s[0]+o,n),r]]:[[c,Math.max(s[1]-o,t)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(e){return arguments.length?(a(e),u()):a()},i.translate=function(e){return arguments.length?(s(e),u()):s()},i.center=function(e){return arguments.length?(o(e),u()):o()},i.clipExtent=function(e){return arguments.length?(null==e?c=t=n=r=null:(c=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),u()):null==c?null:[[c,t],[n,r]]},u()}function hC(e){return sS((WT+e)/2)}function dC(e,t){var n=eS(e),r=e===t?iS(e):nS(n/eS(t))/nS(hC(t)/hC(e)),i=n*rS(hC(e),r)/r;if(!r)return cC;function o(e,t){i>0?t<-WT+HT&&(t=-WT+HT):t>WT-HT&&(t=WT-HT);var n=i/rS(hC(t),r);return[n*iS(r*e),i-n*eS(r*e)]}return o.invert=function(e,t){var n=i-t,o=oS(r)*aS(e*e+n*n),a=QT(e,KT(n))*oS(n);return n*r<0&&(a-=$T*oS(e)*oS(n)),[a/r,2*JT(rS(i/o,1/r))-WT]},o}function fC(e,t){return[e,t]}function pC(e,t){var n=eS(e),r=e===t?iS(e):(n-eS(t))/(t-e),i=n/r+e;if(KT(r)<HT)return fC;function o(e,t){var n=i-t,o=r*e;return[n*iS(o),i-n*eS(o)]}return o.invert=function(e,t){var n=i-t,o=QT(e,KT(n))*oS(n);return n*r<0&&(o-=$T*oS(e)*oS(n)),[o/r,i-oS(r)*aS(e*e+n*n)]},o}lC.invert=aC((function(e){return e})),cC.invert=function(e,t){return[e,2*JT(tS(t))-WT]},fC.invert=fC;var gC=1.340264,mC=-.081106,vC=893e-6,yC=.003796,bC=aS(3)/2;function _C(e,t){var n=cS(bC*iS(t)),r=n*n,i=r*r*r;return[e*eS(n)/(bC*(gC+3*mC*r+i*(7*vC+9*yC*r))),n*(gC+mC*r+i*(vC+yC*r))]}function xC(e,t){var n=eS(t),r=eS(e)*n;return[n*iS(e)/r,iS(t)/r]}function wC(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function AC(e,t){return[eS(t)*iS(e),iS(t)]}function kC(e,t){var n=eS(t),r=1+eS(e)*n;return[n*iS(e)/r,iS(t)/r]}function TC(e,t){return[nS(sS((WT+t)/2)),-e]}_C.invert=function(e,t){for(var n,r=t,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(gC+mC*i+o*(vC+yC*i))-t)/(gC+3*mC*i+o*(7*vC+9*yC*i)))*r)*i*i,!(KT(n)<1e-12));++a);return[bC*e*(gC+3*mC*i+o*(7*vC+9*yC*i))/eS(r),cS(iS(r)/bC)]},xC.invert=aC(JT),wC.invert=function(e,t){var n,r=t,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-t)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(KT(n)>HT&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},AC.invert=aC(cS),kC.invert=aC((function(e){return 2*JT(e)})),TC.invert=function(e,t){return[-t,2*JT(tS(e))-WT]};var SC=Math.abs,EC=(Math.atan,Math.atan2,Math.ceil,Math.cos),CC=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),MC=(Math.tan,Math.PI),OC=MC/2,LC=(Math.SQRT1_2,IC(2));function DC(e){return e>1?OC:e<-1?-OC:Math.asin(e)}function IC(e){return e>0?Math.sqrt(e):0}function RC(e,t){var n,r=e*CC(t),i=30;do{t-=n=(t+CC(t)-r)/(1+EC(t))}while(SC(n)>1e-6&&--i>0);return t/2}IC(MC);var PC=function(e,t,n){function r(r,i){return[e*r*EC(i=RC(n,i)),t*CC(i)]}return r.invert=function(r,i){return i=DC(i/t),[r/(e*EC(i)),DC((2*i+CC(2*i))/n)]},r}(LC/OC,LC,MC);const NC=dE(),zC=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function FC(e,t){return function n(){const r=t();return r.type=e,r.path=dE().projection(r),r.copy=r.copy||function(){const e=n();return zC.forEach((t=>{r[t]&&e[t](r[t]())})),e.path.pointRadius(r.path.pointRadius()),e},r}}function BC(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(UC[e]=FC(e,t),this):UC[e]||null}function jC(e){return e&&e.path||NC}const UC={albers:iC,albersusa:function(){var e,t,n,r,i,o,a=iC(),s=rC().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rC().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){o=[e,t]}};function u(e){var t=e[0],a=e[1];return o=null,n.point(t,a),o||(r.point(t,a),o)||(i.point(t,a),o)}function h(){return e=t=null,u}return u.invert=function(e){var t=a.scale(),n=a.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:a).invert(e)},u.stream=function(n){return e&&t===n?e:(r=[a.stream(t=n),s.stream(n),l.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n<i;)r[n].point(e,t)},sphere:function(){for(var e=-1;++e<i;)r[e].sphere()},lineStart:function(){for(var e=-1;++e<i;)r[e].lineStart()},lineEnd:function(){for(var e=-1;++e<i;)r[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<i;)r[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<i;)r[e].polygonEnd()}});var r,i},u.precision=function(e){return arguments.length?(a.precision(e),s.precision(e),l.precision(e),h()):a.precision()},u.scale=function(e){return arguments.length?(a.scale(e),s.scale(.35*e),l.scale(e),u.translate(a.translate())):a.scale()},u.translate=function(e){if(!arguments.length)return a.translate();var t=a.scale(),o=+e[0],u=+e[1];return n=a.translate(e).clipExtent([[o-.455*t,u-.238*t],[o+.455*t,u+.238*t]]).stream(c),r=s.translate([o-.307*t,u+.201*t]).clipExtent([[o-.425*t+HT,u+.12*t+HT],[o-.214*t-HT,u+.234*t-HT]]).stream(c),i=l.translate([o-.205*t,u+.212*t]).clipExtent([[o-.214*t+HT,u+.166*t+HT],[o-.115*t-HT,u+.234*t-HT]]).stream(c),h()},u.fitExtent=function(e,t){return $E(u,e,t)},u.fitSize=function(e,t){return WE(u,e,t)},u.fitWidth=function(e,t){return GE(u,e,t)},u.fitHeight=function(e,t){return YE(u,e,t)},u.scale(1070)},azimuthalequalarea:function(){return QE(sC).scale(124.75).clipAngle(179.999)},azimuthalequidistant:function(){return QE(lC).scale(79.4188).clipAngle(179.999)},conicconformal:function(){return tC(dC).scale(109.5).parallels([30,30])},conicequalarea:rC,conicequidistant:function(){return tC(pC).scale(131.154).center([0,13.9389])},equalEarth:function(){return QE(_C).scale(177.158)},equirectangular:function(){return QE(fC).scale(152.63)},gnomonic:function(){return QE(xC).scale(144.049).clipAngle(60)},identity:function(){var e,t,n,r,i,o,a,s=1,l=0,c=0,u=1,h=1,d=0,f=null,p=1,g=1,m=VE({point:function(e,t){var n=b([e,t]);this.stream.point(n[0],n[1])}}),v=NT;function y(){return p=s*u,g=s*h,o=a=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(d){var o=i*e-r*t;r=r*e+i*t,i=o}return[r+l,i+c]}return b.invert=function(n){var r=n[0]-l,i=n[1]-c;if(d){var o=i*e+r*t;r=r*e-i*t,i=o}return[r/p,i/g]},b.stream=function(e){return o&&a===e?o:o=m(v(a=e))},b.postclip=function(e){return arguments.length?(v=e,f=n=r=i=null,y()):v},b.clipExtent=function(e){return arguments.length?(v=null==e?(f=n=r=i=null,NT):PE(f=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),y()):null==f?null:[[f,n],[r,i]]},b.scale=function(e){return arguments.length?(s=+e,y()):s},b.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],y()):[l,c]},b.angle=function(n){return arguments.length?(t=iS(d=n%360*ZT),e=eS(d),y()):d*XT},b.reflectX=function(e){return arguments.length?(u=e?-1:1,y()):u<0},b.reflectY=function(e){return arguments.length?(h=e?-1:1,y()):h<0},b.fitExtent=function(e,t){return $E(b,e,t)},b.fitSize=function(e,t){return WE(b,e,t)},b.fitWidth=function(e,t){return GE(b,e,t)},b.fitHeight=function(e,t){return YE(b,e,t)},b},mercator:function(){return uC(cC).scale(961/YT)},mollweide:function(){return QE(PC).scale(169.529)},naturalEarth1:function(){return QE(wC).scale(175.295)},orthographic:function(){return QE(AC).scale(249.5).clipAngle(90.000001)},stereographic:function(){return QE(kC).scale(250).clipAngle(142)},transversemercator:function(){var e=uC(TC),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}};for(const e in UC)BC(e,UC[e]);var VC=1e-6,qC=(Math.PI,Math.abs),HC=(Math.atan,Math.atan2,Math.cos,Math.ceil);function $C(e,t,n){var r=RT(e,t-VC,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function WC(e,t,n){var r=RT(e,t-VC,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function GC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function YC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function XC(){}Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin,Math.sign,Math.sqrt,Math.tan;var ZC=.7,KC=1/ZC,JC="\\s*([+-]?\\d+)\\s*",QC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",eM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tM=/^#([0-9a-f]{3,8})$/,nM=new RegExp("^rgb\\("+[JC,JC,JC]+"\\)$"),rM=new RegExp("^rgb\\("+[eM,eM,eM]+"\\)$"),iM=new RegExp("^rgba\\("+[JC,JC,JC,QC]+"\\)$"),oM=new RegExp("^rgba\\("+[eM,eM,eM,QC]+"\\)$"),aM=new RegExp("^hsl\\("+[QC,eM,eM]+"\\)$"),sM=new RegExp("^hsla\\("+[QC,eM,eM,QC]+"\\)$"),lM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function cM(){return this.rgb().formatHex()}function uM(){return this.rgb().formatRgb()}function hM(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tM.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?dM(t):3===n?new mM(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?fM(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?fM(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=nM.exec(e))?new mM(t[1],t[2],t[3],1):(t=rM.exec(e))?new mM(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=iM.exec(e))?fM(t[1],t[2],t[3],t[4]):(t=oM.exec(e))?fM(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=aM.exec(e))?_M(t[1],t[2]/100,t[3]/100,1):(t=sM.exec(e))?_M(t[1],t[2]/100,t[3]/100,t[4]):lM.hasOwnProperty(e)?dM(lM[e]):"transparent"===e?new mM(NaN,NaN,NaN,0):null}function dM(e){return new mM(e>>16&255,e>>8&255,255&e,1)}function fM(e,t,n,r){return r<=0&&(e=t=n=NaN),new mM(e,t,n,r)}function pM(e){return e instanceof XC||(e=hM(e)),e?new mM((e=e.rgb()).r,e.g,e.b,e.opacity):new mM}function gM(e,t,n,r){return 1===arguments.length?pM(e):new mM(e,t,n,null==r?1:r)}function mM(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function vM(){return"#"+bM(this.r)+bM(this.g)+bM(this.b)}function yM(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function bM(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function _M(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wM(e,t,n,r)}function xM(e){if(e instanceof wM)return new wM(e.h,e.s,e.l,e.opacity);if(e instanceof XC||(e=hM(e)),!e)return new wM;if(e instanceof wM)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new wM(a,s,l,e.opacity)}function wM(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function AM(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function kM(){}GC(XC,hM,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:cM,formatHex:cM,formatHsl:function(){return xM(this).formatHsl()},formatRgb:uM,toString:uM}),GC(mM,gM,YC(XC,{brighter:function(e){return e=null==e?KC:Math.pow(KC,e),new mM(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?ZC:Math.pow(ZC,e),new mM(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vM,formatHex:vM,formatRgb:yM,toString:yM})),GC(wM,(function(e,t,n,r){return 1===arguments.length?xM(e):new wM(e,t,n,null==r?1:r)}),YC(XC,{brighter:function(e){return e=null==e?KC:Math.pow(KC,e),new wM(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?ZC:Math.pow(ZC,e),new wM(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mM(AM(e>=240?e-240:e+120,i,r),AM(e,i,r),AM(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const TM=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function SM(){var e=1,t=1,n=a;function r(e,t){return t.map((t=>i(e,t)))}function i(r,i){var a=[],s=[];return function(n,r,i){var a,s,l,c,u,h,d=new Array,f=new Array;for(a=s=-1,c=n[0]>=r,TM[c<<1].forEach(p);++a<e-1;)l=c,c=n[a+1]>=r,TM[l|c<<1].forEach(p);for(TM[c<<0].forEach(p);++s<t-1;){for(a=-1,c=n[s*e+e]>=r,u=n[s*e]>=r,TM[c<<1|u<<2].forEach(p);++a<e-1;)l=c,c=n[s*e+e+a+1]>=r,h=u,u=n[s*e+a+1]>=r,TM[l|c<<1|u<<2|h<<3].forEach(p);TM[c|u<<3].forEach(p)}for(a=-1,u=n[s*e]>=r,TM[u<<2].forEach(p);++a<e-1;)h=u,u=n[s*e+a+1]>=r,TM[u<<2|h<<3].forEach(p);function p(e){var t,n,r=[e[0][0]+a,e[0][1]+s],l=[e[1][0]+a,e[1][1]+s],c=o(r),u=o(l);(t=f[c])?(n=d[u])?(delete f[t.end],delete d[n.start],t===n?(t.ring.push(l),i(t.ring)):d[t.start]=f[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete f[t.end],t.ring.push(l),f[t.end=u]=t):(t=d[u])?(n=f[c])?(delete d[t.start],delete f[n.end],t===n?(t.ring.push(l),i(t.ring)):d[n.start]=f[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete d[t.start],t.ring.unshift(r),d[t.start=c]=t):d[c]=f[u]={start:c,end:u,ring:[r,l]}}TM[u<<3].forEach(p)}(r,i,(e=>{n(e,r,i),function(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}(e)>0?a.push([e]):s.push(e)})),s.forEach((e=>{for(var t,n=0,r=a.length;n<r;++n)if(-1!==EM((t=a[n])[0],e))return void t.push(e)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(t){return 2*t[0]+t[1]*(e+1)*4}function a(n,r,i){n.forEach((n=>{var o,a=n[0],s=n[1],l=0|a,c=0|s,u=r[c*e+l];a>0&&a<e&&l===a&&(o=r[c*e+l-1],n[0]=a+(i-o)/(u-o)-.5),s>0&&s<t&&c===s&&(o=r[(c-1)*e+l],n[1]=s+(i-o)/(u-o)-.5)}))}return r.contour=i,r.size=function(n){if(!arguments.length)return[e,t];var i=Math.floor(n[0]),o=Math.floor(n[1]);return i>=0&&o>=0||oe("invalid size"),e=i,t=o,r},r.smooth=function(e){return arguments.length?(n=e?a:kM,r):n===a},r}function EM(e,t){for(var n,r=-1,i=t.length;++r<i;)if(n=CM(e,t[r]))return n;return 0}function CM(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],c=l[0],u=l[1],h=e[s],d=h[0],f=h[1];if(MM(l,h,t))return 0;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(i=-i)}return i}function MM(e,t,n){var r,i,o,a;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],o=n[r],a=t[r],i<=o&&o<=a||a<=o&&o<=i)}function OM(e,t,n){return function(r){var i=rt(r),o=n?Math.min(i[0],0):i[0],a=i[1],s=a-o,l=t?function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=LT?i*=10:o>=DT?i*=5:o>=IT&&(i*=2),t<e?-i:i}(o,a,e):s/(e+1);return RT(o+l,a,l)}}function LM(e){Us.call(this,null,e)}function DM(e,t,n,r,i){const o=e.x1||0,a=e.y1||0,s=t*n<0;function l(e){e.forEach(c)}function c(e){s&&e.reverse(),e.forEach(u)}function u(e){e[0]=(e[0]-o)*t+r,e[1]=(e[1]-a)*n+i}return function(e){return e.coordinates.forEach(l),e}}function IM(e,t,n){const r=e>=0?e:nl(t,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function RM(e){return Ye(e)?e:et(+e)}function PM(){var e=e=>e[0],t=e=>e[1],n=he,r=[-1,-1],i=960,o=500,a=2;function s(s,l){const c=IM(r[0],s,e)>>a,u=IM(r[1],s,t)>>a,h=c?c+2:0,d=u?u+2:0,f=2*h+(i>>a),p=2*d+(o>>a),g=new Float32Array(f*p),m=new Float32Array(f*p);let v=g;s.forEach((r=>{const i=h+(+e(r)>>a),o=d+(+t(r)>>a);i>=0&&i<f&&o>=0&&o<p&&(g[i+o*f]+=+n(r))})),c>0&&u>0?(NM(f,p,g,m,c),zM(f,p,m,g,u),NM(f,p,g,m,c),zM(f,p,m,g,u),NM(f,p,g,m,c),zM(f,p,m,g,u)):c>0?(NM(f,p,g,m,c),NM(f,p,m,g,c),NM(f,p,g,m,c),v=m):u>0&&(zM(f,p,g,m,u),zM(f,p,m,g,u),zM(f,p,g,m,u),v=m);const y=l?Math.pow(2,-2*a):1/function(e,t){let n=0;for(let t of e)(t=+t)&&(n+=t);return n}(v);for(let e=0,t=f*p;e<t;++e)v[e]*=y;return{values:v,scale:1<<a,width:f,height:p,x1:h,y1:d,x2:h+(i>>a),y2:d+(o>>a)}}return s.x=function(t){return arguments.length?(e=RM(t),s):e},s.y=function(e){return arguments.length?(t=RM(e),s):t},s.weight=function(e){return arguments.length?(n=RM(e),s):n},s.size=function(e){if(!arguments.length)return[i,o];var t=+e[0],n=+e[1];return t>=0&&n>=0||oe("invalid size"),i=t,o=n,s},s.cellSize=function(e){return arguments.length?((e=+e)>=1||oe("invalid cell size"),a=Math.floor(Math.log(e)/Math.LN2),s):1<<a},s.bandwidth=function(e){return arguments.length?(1===(e=We(e)).length&&(e=[+e[0],+e[0]]),2!==e.length&&oe("invalid bandwidth"),r=e,s):r},s}function NM(e,t,n,r,i){const o=1+(i<<1);for(let a=0;a<t;++a)for(let t=0,s=0;t<e+i;++t)t<e&&(s+=n[t+a*e]),t>=i&&(t>=o&&(s-=n[t-o+a*e]),r[t-i+a*e]=s/Math.min(t+1,e-1+o-t,o))}function zM(e,t,n,r,i){const o=1+(i<<1);for(let a=0;a<e;++a)for(let s=0,l=0;s<t+i;++s)s<t&&(l+=n[a+s*e]),s>=i&&(s>=o&&(l-=n[a+(s-o)*e]),r[a+(s-i)*e]=l/Math.min(s+1,t-1+o-s,o))}function FM(e){Us.call(this,null,e)}LM.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},ut(LM,Us,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=t.materialize(t.SOURCE).source,i=e.field||ce,o=SM().smooth(!1!==e.smooth),a=e.thresholds||function(e,t,n){const r=OM(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(e.map((e=>PT(t(e).values))))}(r,i,e),s=null===e.as?null:e.as||"contour",l=[];return r.forEach((t=>{const n=i(t),r=o.size([n.width,n.height])(n.values,xe(a)?a:a(n.values));!function(e,t,n,r){let i=r.scale||t.scale,o=r.translate||t.translate;if(Ye(i)&&(i=i(n,r)),Ye(o)&&(o=o(n,r)),(1===i||null==i)&&!o)return;const a=(gt(i)?i:i[0])||1,s=(gt(i)?i:i[1])||1,l=o&&o[0]||0,c=o&&o[1]||0;e.forEach(DM(t,a,s,l,c))}(r,n,t,e),r.forEach((e=>{l.push(fs(t,hs(null!=s?{[s]:e}:e)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=l,n}}),FM.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const BM=["x","y","weight","size","cellSize","bandwidth"];function jM(e,t){return BM.forEach((n=>null!=t[n]?e[n](t[n]):0)),e}function UM(e){Us.call(this,null,e)}ut(FM,Us,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=function(e,t){var n,r,i,o,a,s,l=[],c=e=>e(o);if(null==t)l.push(e);else for(n={},r=0,i=e.length;r<i;++r)o=e[r],(s=n[a=t.map(c)])||(n[a]=s=[],s.dims=a,l.push(s)),s.push(o);return l}(t.materialize(t.SOURCE).source,e.groupby),o=(e.groupby||[]).map(ee),a=jM(PM(),e),s=e.as||"grid";return n=i.map((t=>hs(function(e,t){for(let n=0;n<o.length;++n)e[o[n]]=t[n];return e}({[s]:a(t,e.counts)},t.dims)))),this.value&&(r.rem=this.value),this.value=r.source=r.add=n,r}}),UM.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0},{name:"smooth",type:"boolean",default:!0}]},ut(UM,Us,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,r,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=SM().smooth(!1!==e.smooth),a=e.values,s=e.thresholds||OM(e.count||10,e.nice,!!a),l=e.size;return a||(a=t.materialize(t.SOURCE).source,r=DM(n=jM(PM(),e)(a,!0),n.scale||1,n.scale||1,0,0),l=[n.width,n.height],a=n.values),s=xe(s)?s:s(a),a=o.size(l)(a,s),r&&a.forEach(r),this.value&&(i.rem=this.value),this.value=i.source=i.add=(a||[]).map(hs),i}});const VM="Feature",qM="FeatureCollection";function HM(e){Us.call(this,null,e)}function $M(e){Us.call(this,null,e)}function WM(e){Us.call(this,null,e)}function GM(e){Us.call(this,null,e)}function YM(e){Us.call(this,[],e),this.generator=function(){var e,t,n,r,i,o,a,s,l,c,u,h,d=10,f=d,p=90,g=360,m=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return RT(HC(r/p)*p,n,p).map(u).concat(RT(HC(s/g)*g,a,g).map(h)).concat(RT(HC(t/d)*d,e,d).filter((function(e){return qC(e%p)>VC})).map(l)).concat(RT(HC(o/f)*f,i,f).filter((function(e){return qC(e%g)>VC})).map(c))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(a).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),v.precision(m)):[[r,s],[n,a]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),v.precision(m)):[[t,o],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(p=+e[0],g=+e[1],v):[p,g]},v.stepMinor=function(e){return arguments.length?(d=+e[0],f=+e[1],v):[d,f]},v.precision=function(d){return arguments.length?(m=+d,l=$C(o,i,90),c=WC(t,e,m),u=$C(s,a,90),h=WC(r,n,m),v):m},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()}function XM(e){Us.call(this,null,e)}function ZM(e){if(!Ye(e))return!1;const t=Ot(te(e));return t.$x||t.$y||t.$value||t.$max}function KM(e){Us.call(this,null,e),this.modified(!0)}function JM(e,t,n){Ye(e[t])&&e[t](n)}function QM(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,c,u,h,d,f=e._root,p={data:r},g=e._x0,m=e._y0,v=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(m+y)/2))?m=a:y=a,i=f,!(f=f[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[h]=p:e._root=p,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(g+v)/2))?g=o:v=o,(u=n>=(a=(m+y)/2))?m=a:y=a}while((h=u<<1|c)==(d=(l>=a)<<1|s>=o));return i[d]=f,i[h]=p,e}function eO(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function tO(e){return e[0]}function nO(e){return e[1]}function rO(e,t,n){var r=new iO(null==t?tO:t,null==n?nO:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function iO(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function oO(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}HM.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},ut(HM,Us,{transform(e,t){var n,r=this._features,i=this._points,o=e.fields,a=o&&o[0],s=o&&o[1],l=e.geojson||!o&&ce,c=t.ADD;n=e.modified()||t.changed(t.REM)||t.modified(te(l))||a&&t.modified(te(a))||s&&t.modified(te(s)),this.value&&!n||(c=t.SOURCE,this._features=r=[],this._points=i=[]),l&&t.visit(c,(e=>r.push(l(e)))),a&&s&&(t.visit(c,(e=>{var t=a(e),n=s(e);null!=t&&null!=n&&(t=+t)===t&&(n=+n)===n&&i.push([t,n])})),r=r.concat({type:VM,geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:qM,features:r}}}),$M.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},ut($M,Us,{transform(e,t){var n=t.fork(t.ALL),r=this.value,i=e.field||ce,o=e.as||"path",a=n.SOURCE;!r||e.modified()?(this.value=r=jC(e.projection),n.materialize().reflow()):a=i===ce||t.modified(i.fields)?n.ADD_MOD:n.ADD;const s=function(e,t){const n=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),n}(r,e.pointRadius);return n.visit(a,(e=>e[o]=r(i(e)))),r.pointRadius(s),n.modifies(o)}}),WM.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},ut(WM,Us,{transform(e,t){var n,r=e.projection,i=e.fields[0],o=e.fields[1],a=e.as||["x","y"],s=a[0],l=a[1];function c(e){const t=r([i(e),o(e)]);t?(e[s]=t[0],e[l]=t[1]):(e[s]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(n=t.modified(i.fields)||t.modified(o.fields),t.visit(n?t.ADD_MOD:t.ADD,c)),t.modifies(a)}}),GM.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},ut(GM,Us,{transform(e,t){var n=t.fork(t.ALL),r=this.value,i=e.as||"shape",o=n.ADD;return r&&!e.modified()||(this.value=r=function(e,t,n){const r=null==n?n=>e(t(n)):r=>{var i=e.pointRadius(),o=e.pointRadius(n)(t(r));return e.pointRadius(i),o};return r.context=t=>(e.context(t),r),r}(jC(e.projection),e.field||se("datum"),e.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,(e=>e[i]=r)),n.modifies(i)}}),YM.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},ut(YM,Us,{transform(e,t){var n,r=this.value,i=this.generator;if(!r.length||e.modified())for(const t in e)Ye(i[t])&&i[t](e[t]);return n=i(),r.length?t.mod.push(ps(r[0],n)):t.add.push(hs(n)),r[0]=n,t}}),XM.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},ut(XM,Us,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,r="shared"===e.resolve,i=e.field||ce,o=function(e,t){let n;return Ye(e)?(n=n=>e(n,t),n.dep=ZM(e)):e?n=et(e):(n=e=>e.$value/e.$max||0,n.dep=!0),n}(e.opacity,e),a=function(e,t){let n;return Ye(e)?(n=n=>gM(e(n,t)),n.dep=ZM(e)):n=et(gM(e||"#888")),n}(e.color,e),s=e.as||"image",l={$x:0,$y:0,$value:0,$max:r?PT(n.map((e=>PT(i(e).values)))):0};return n.forEach((e=>{const t=i(e),n=nt({},e,l);r||(n.$max=PT(t.values||[])),e[s]=function(e,t,n,r){const i=e.width,o=e.height,a=e.x1||0,s=e.y1||0,l=e.x2||i,c=e.y2||o,u=e.values,h=u?e=>u[e]:ue,d=Bh(l-a,c-s),f=d.getContext("2d"),p=f.getImageData(0,0,l-a,c-s),g=p.data;for(let e=s,o=0;e<c;++e){t.$y=e-s;for(let s=a,c=e*i;s<l;++s,o+=4){t.$x=s-a,t.$value=h(s+c);const e=n(t);g[o+0]=e.r,g[o+1]=e.g,g[o+2]=e.b,g[o+3]=~~(255*r(t))}}return f.putImageData(p,0,0),d}(t,n,a.dep?a:et(a(n)),o.dep?o:et(o(n)))})),t.reflow(!0).modifies(s)}}),ut(KM,Us,{transform(e,t){let n=this.value;return!n||e.modified("type")?(this.value=n=function(e){const t=BC((e||"mercator").toLowerCase());return t||oe("Unrecognized projection type: "+e),t()}(e.type),zC.forEach((t=>{null!=e[t]&&JM(n,t,e[t])}))):zC.forEach((t=>{e.modified(t)&&JM(n,t,e[t])})),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function(e,t){const n=function(e){return 1===(e=We(e)).length?e[0]:{type:qM,features:e.reduce(((e,t)=>e.concat(function(e){return e.type===qM?e.features:We(e).filter((e=>null!=e)).map((e=>e.type===VM?e:{type:VM,geometry:e}))}(t))),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});var aO=rO.prototype=iO.prototype;function sO(e){return function(){return e}}function lO(e){return 1e-6*(e()-.5)}function cO(e){return e.x+e.vx}function uO(e){return e.y+e.vy}aO.copy=function(){var e,t,n=new iO(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=oO(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=oO(t));return n},aO.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return QM(this.cover(t,n),t,n,e)},aO.addAll=function(e){var t,n,r,i,o=e.length,a=new Array(o),s=new Array(o),l=1/0,c=1/0,u=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(a[n]=r,s[n]=i,r<l&&(l=r),r>u&&(u=r),i<c&&(c=i),i>h&&(h=i));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),n=0;n<o;++n)QM(this,a[n],s[n],e[n]);return this},aO.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n,c=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},aO.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},aO.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},aO.find=function(e,t,n){var r,i,o,a,s,l,c,u=this._x0,h=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new eO(g,u,h,d,f)),null==n?n=1/0:(u=e-n,h=t-n,d=e+n,f=t+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(i=l.x0)>d||(o=l.y0)>f||(a=l.x1)<u||(s=l.y1)<h))if(g.length){var m=(i+a)/2,v=(o+s)/2;p.push(new eO(g[3],m,v,a,s),new eO(g[2],i,v,m,s),new eO(g[1],m,o,a,v),new eO(g[0],i,o,m,v)),(c=(t>=v)<<1|e>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=l)}else{var y=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),_=y*y+b*b;if(_<n){var x=Math.sqrt(n=_);u=e-x,h=t-x,d=e+x,f=t+x,r=g.data}}return r},aO.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f=this._root,p=this._x0,g=this._y0,m=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((c=o>=(s=(p+m)/2))?p=s:m=s,(u=a>=(l=(g+v)/2))?g=l:v=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},aO.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},aO.root=function(){return this._root},aO.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},aO.visit=function(e){var t,n,r,i,o,a,s=[],l=this._root;for(l&&s.push(new eO(l,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(l=t.node,r=t.x0,i=t.y0,o=t.x1,a=t.y1)&&l.length){var c=(r+o)/2,u=(i+a)/2;(n=l[3])&&s.push(new eO(n,c,u,o,a)),(n=l[2])&&s.push(new eO(n,r,u,c,a)),(n=l[1])&&s.push(new eO(n,c,i,o,u)),(n=l[0])&&s.push(new eO(n,r,i,c,u))}return this},aO.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new eO(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.x1,c=t.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&n.push(new eO(o,a,s,u,h)),(o=i[1])&&n.push(new eO(o,u,s,l,h)),(o=i[2])&&n.push(new eO(o,a,h,u,c)),(o=i[3])&&n.push(new eO(o,u,h,l,c))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},aO.x=function(e){return arguments.length?(this._x=e,this):this._x},aO.y=function(e){return arguments.length?(this._y=e,this):this._y};var hO={value:function(){}};function dO(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new fO(r)}function fO(e){this._=e}function pO(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function gO(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function mO(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=hO,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}fO.prototype=dO.prototype={constructor:fO,on:function(e,t){var n,r=this._,i=pO(e+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=mO(r[n],e.name,t);else if(null==t)for(n in r)r[n]=mO(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=gO(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new fO(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const vO=dO;var yO,bO,_O=0,xO=0,wO=0,AO=0,kO=0,TO=0,SO="object"==typeof performance&&performance.now?performance:Date,EO="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function CO(){return kO||(EO(MO),kO=SO.now()+TO)}function MO(){kO=0}function OO(){this._call=this._time=this._next=null}function LO(e,t,n){var r=new OO;return r.restart(e,t,n),r}function DO(){kO=(AO=SO.now())+TO,_O=xO=0;try{!function(){CO(),++_O;for(var e,t=yO;t;)(e=kO-t._time)>=0&&t._call.call(null,e),t=t._next;--_O}()}finally{_O=0,function(){for(var e,t,n=yO,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:yO=t);bO=e,RO(r)}(),kO=0}}function IO(){var e=SO.now(),t=e-AO;t>1e3&&(TO-=t,AO=e)}function RO(e){_O||(xO&&(xO=clearTimeout(xO)),e-kO>24?(e<1/0&&(xO=setTimeout(DO,e-SO.now()-TO)),wO&&(wO=clearInterval(wO))):(wO||(AO=SO.now(),wO=setInterval(IO,1e3)),_O=1,EO(DO)))}OO.prototype=LO.prototype={constructor:OO,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?CO():+n)+(null==t?0:+t),this._next||bO===this||(bO?bO._next=this:yO=this,bO=this),this._call=e,this._time=n,RO()},stop:function(){this._call&&(this._call=null,this._time=1/0,RO())}};const PO=4294967296;function NO(e){return e.x}function zO(e){return e.y}var FO=Math.PI*(3-Math.sqrt(5));function BO(e){return e.index}function jO(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}const UO={center:function(e,t){var n,r=1;function i(){var i,o,a=n.length,s=0,l=0;for(i=0;i<a;++i)s+=(o=n[i]).x,l+=o.y;for(s=(s/a-e)*r,l=(l/a-t)*r,i=0;i<a;++i)(o=n[i]).x-=s,o.y-=l}return null==e&&(e=0),null==t&&(t=0),i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i},collide:function(e){var t,n,r,i=1,o=1;function a(){for(var e,a,l,c,u,h,d,f=t.length,p=0;p<o;++p)for(a=rO(t,cO,uO).visitAfter(s),e=0;e<f;++e)l=t[e],h=n[l.index],d=h*h,c=l.x+l.vx,u=l.y+l.vy,a.visit(g);function g(e,t,n,o,a){var s=e.data,f=e.r,p=h+f;if(!s)return t>c+p||o<c-p||n>u+p||a<u-p;if(s.index>l.index){var g=c-s.x-s.vx,m=u-s.y-s.vy,v=g*g+m*m;v<p*p&&(0===g&&(v+=(g=lO(r))*g),0===m&&(v+=(m=lO(r))*m),v=(p-(v=Math.sqrt(v)))/v*i,l.vx+=(g*=v)*(p=(f*=f)/(d+f)),l.vy+=(m*=v)*p,s.vx-=g*(p=1-p),s.vy-=m*p)}}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function l(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;r<o;++r)i=t[r],n[i.index]=+e(i,r,t)}}return"function"!=typeof e&&(e=sO(null==e?1:+e)),a.initialize=function(e,n){t=e,r=n,l()},a.iterations=function(e){return arguments.length?(o=+e,a):o},a.strength=function(e){return arguments.length?(i=+e,a):i},a.radius=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),l(),a):e},a},nbody:function(){var e,t,n,r,i,o=sO(-30),a=1,s=1/0,l=.81;function c(n){var i,o=e.length,a=rO(e,NO,zO).visitAfter(h);for(r=n,i=0;i<o;++i)t=e[i],a.visit(d)}function u(){if(e){var t,n,r=e.length;for(i=new Array(r),t=0;t<r;++t)n=e[t],i[n.index]=+o(n,t,e)}}function h(e){var t,n,r,o,a,s=0,l=0;if(e.length){for(r=o=a=0;a<4;++a)(t=e[a])&&(n=Math.abs(t.value))&&(s+=t.value,l+=n,r+=n*t.x,o+=n*t.y);e.x=r/l,e.y=o/l}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=i[t.data.index]}while(t=t.next)}e.value=s}function d(e,o,c,u){if(!e.value)return!0;var h=e.x-t.x,d=e.y-t.y,f=u-o,p=h*h+d*d;if(f*f/l<p)return p<s&&(0===h&&(p+=(h=lO(n))*h),0===d&&(p+=(d=lO(n))*d),p<a&&(p=Math.sqrt(a*p)),t.vx+=h*e.value*r/p,t.vy+=d*e.value*r/p),!0;if(!(e.length||p>=s)){(e.data!==t||e.next)&&(0===h&&(p+=(h=lO(n))*h),0===d&&(p+=(d=lO(n))*d),p<a&&(p=Math.sqrt(a*p)));do{e.data!==t&&(f=i[e.data.index]*r/p,t.vx+=h*f,t.vy+=d*f)}while(e=e.next)}}return c.initialize=function(t,r){e=t,n=r,u()},c.strength=function(e){return arguments.length?(o="function"==typeof e?e:sO(+e),u(),c):o},c.distanceMin=function(e){return arguments.length?(a=e*e,c):Math.sqrt(a)},c.distanceMax=function(e){return arguments.length?(s=e*e,c):Math.sqrt(s)},c.theta=function(e){return arguments.length?(l=e*e,c):Math.sqrt(l)},c},link:function(e){var t,n,r,i,o,a,s=BO,l=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},c=sO(30),u=1;function h(r){for(var i=0,s=e.length;i<u;++i)for(var l,c,h,d,f,p,g,m=0;m<s;++m)c=(l=e[m]).source,d=(h=l.target).x+h.vx-c.x-c.vx||lO(a),f=h.y+h.vy-c.y-c.vy||lO(a),d*=p=((p=Math.sqrt(d*d+f*f))-n[m])/p*r*t[m],f*=p,h.vx-=d*(g=o[m]),h.vy-=f*g,c.vx+=d*(g=1-g),c.vy+=f*g}function d(){if(r){var a,l,c=r.length,u=e.length,h=new Map(r.map(((e,t)=>[s(e,t,r),e])));for(a=0,i=new Array(c);a<u;++a)(l=e[a]).index=a,"object"!=typeof l.source&&(l.source=jO(h,l.source)),"object"!=typeof l.target&&(l.target=jO(h,l.target)),i[l.source.index]=(i[l.source.index]||0)+1,i[l.target.index]=(i[l.target.index]||0)+1;for(a=0,o=new Array(u);a<u;++a)l=e[a],o[a]=i[l.source.index]/(i[l.source.index]+i[l.target.index]);t=new Array(u),f(),n=new Array(u),p()}}function f(){if(r)for(var n=0,i=e.length;n<i;++n)t[n]=+l(e[n],n,e)}function p(){if(r)for(var t=0,i=e.length;t<i;++t)n[t]=+c(e[t],t,e)}return null==e&&(e=[]),h.initialize=function(e,t){r=e,a=t,d()},h.links=function(t){return arguments.length?(e=t,d(),h):e},h.id=function(e){return arguments.length?(s=e,h):s},h.iterations=function(e){return arguments.length?(u=+e,h):u},h.strength=function(e){return arguments.length?(l="function"==typeof e?e:sO(+e),f(),h):l},h.distance=function(e){return arguments.length?(c="function"==typeof e?e:sO(+e),p(),h):c},h},x:function(e){var t,n,r,i=sO(.1);function o(e){for(var i,o=0,a=t.length;o<a;++o)(i=t[o]).vx+=(r[o]-i.x)*n[o]*e}function a(){if(t){var o,a=t.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!=typeof e&&(e=sO(null==e?0:+e)),o.initialize=function(e){t=e,a()},o.strength=function(e){return arguments.length?(i="function"==typeof e?e:sO(+e),a(),o):i},o.x=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),a(),o):e},o},y:function(e){var t,n,r,i=sO(.1);function o(e){for(var i,o=0,a=t.length;o<a;++o)(i=t[o]).vy+=(r[o]-i.y)*n[o]*e}function a(){if(t){var o,a=t.length;for(n=new Array(a),r=new Array(a),o=0;o<a;++o)n[o]=isNaN(r[o]=+e(t[o],o,t))?0:+i(t[o],o,t)}}return"function"!=typeof e&&(e=sO(null==e?0:+e)),o.initialize=function(e){t=e,a()},o.strength=function(e){return arguments.length?(i="function"==typeof e?e:sO(+e),a(),o):i},o.y=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),a(),o):e},o}},VO="forces",qO=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],HO=["static","iterations"],$O=["x","y","vx","vy"];function WO(e){Us.call(this,null,e)}function GO(e,t,n,r){var i,o,a,s,l=We(t.forces);for(i=0,o=qO.length;i<o;++i)(a=qO[i])!==VO&&t.modified(a)&&e[a](t[a]);for(i=0,o=l.length;i<o;++i)s=VO+i,(a=n||t.modified(VO,i)?XO(l[i]):r&&YO(l[i],r)?e.force(s):null)&&e.force(s,a);for(o=e.numForces||0;i<o;++i)e.force(VO+i,null);return e.numForces=l.length,e}function YO(e,t){var n,r;for(n in e)if(Ye(r=e[n])&&t.modified(te(r)))return 1;return 0}function XO(e){var t,n;for(n in at(UO,e.force)||oe("Unrecognized force: "+e.force),t=UO[e.force](),e)Ye(t[n])&&ZO(t[n],e[n],e);return t}function ZO(e,t,n){e(Ye(t)?e=>t(e,n):t)}function KO(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function JO(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=eL)):void 0===t&&(t=QO);for(var n,r,i,o,a,s=new rL(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new rL(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(nL)}function QO(e){return e.children}function eL(e){return Array.isArray(e)?e[1]:null}function tL(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function nL(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function rL(e){this.data=e,this.depth=this.height=0,this.parent=null}function iL(e,t){var n,r;if(sL(t,e))return[t];for(n=0;n<e.length;++n)if(oL(t,e[n])&&sL(cL(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(oL(cL(e[n],e[r]),t)&&oL(cL(e[n],t),e[r])&&oL(cL(e[r],t),e[n])&&sL(uL(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function oL(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function aL(e,t){var n=e.r-t.r+1e-9*Math.max(e.r,t.r,1),r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function sL(e,t){for(var n=0;n<t.length;++n)if(!aL(e,t[n]))return!1;return!0}function lL(e){switch(e.length){case 1:return{x:(t=e[0]).x,y:t.y,r:t.r};case 2:return cL(e[0],e[1]);case 3:return uL(e[0],e[1],e[2])}var t}function cL(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,c=a-r,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(n+o+l/h*u)/2,y:(r+a+c/h*u)/2,r:(h+i+s)/2}}function uL(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=n.x,u=n.y,h=n.r,d=r-a,f=r-c,p=i-s,g=i-u,m=l-o,v=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+l*l,_=y-c*c-u*u+h*h,x=f*p-d*g,w=(p*_-g*b)/(2*x)-r,A=(g*m-p*v)/x,k=(f*b-d*_)/(2*x)-i,T=(d*v-f*m)/x,S=A*A+T*T-1,E=2*(o+w*A+k*T),C=w*w+k*k-o*o,M=-(S?(E+Math.sqrt(E*E-4*S*C))/(2*S):C/E);return{x:r+w+A*M,y:i+k+T*M,r:M}}function hL(e,t,n){var r,i,o,a,s=e.x-t.x,l=e.y-t.y,c=s*s+l*l;c?(i=t.r+n.r,i*=i,a=e.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*s-o*l,n.y=e.y-r*l+o*s):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-o*l,n.y=t.y+r*l+o*s)):(n.x=t.x+n.r,n.y=t.y)}function dL(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function fL(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function pL(e){this._=e,this.next=null,this.previous=null}function gL(e){if(!(i=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var t,n,r,i,o,a,s,l,c,u,h;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;hL(n,t,r=e[2]),t=new pL(t),n=new pL(n),r=new pL(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){hL(t._,n._,r=e[s]),r=new pL(r),l=n.next,c=t.previous,u=n._.r,h=t._.r;do{if(u<=h){if(dL(l._,r._)){n=l,t.next=n,n.previous=t,--s;continue e}u+=l._.r,l=l.next}else{if(dL(c._,r._)){(t=c).next=n,n.previous=t,--s;continue e}h+=c._.r,c=c.previous}}while(l!==c.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=fL(t);(r=r.next)!==n;)(a=fL(r))<o&&(t=r,o=a);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=function(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(Array.from(e))).length,o=[];r<i;)t=e[r],n&&aL(n,t)?++r:(n=lL(o=iL(o,t)),r=0);return n}(t),s=0;s<i;++s)(t=e[s]).x-=r.x,t.y-=r.y;return r.r}function mL(e){return null==e?null:vL(e)}function vL(e){if("function"!=typeof e)throw new Error;return e}function yL(){return 0}function bL(e){return function(){return e}}function _L(e){return Math.sqrt(e.value)}function xL(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function wL(e,t){return function(n){if(r=n.children){var r,i,o,a=r.length,s=e(n)*t||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=gL(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function AL(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function kL(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function TL(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}WO.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:$O}]},ut(WO,Us,{transform(e,t){var n,r,i=this.value,o=t.changed(t.ADD_REM),a=e.modified(qO),s=e.iterations||300;if(i?(o&&(t.modifies("index"),i.nodes(t.source)),(a||t.changed(t.MOD))&&GO(i,e,0,t)):(this.value=i=function(e,t){const n=function(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=LO(h),c=vO("tick","end"),u=function(){let e=1;return()=>(e=(1664525*e+1013904223)%PO)/PO}();function h(){d(),c.call("tick",t),n<r&&(l.stop(),c.call("end",t))}function d(r){var l,c,u=e.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(o-n)*i,s.forEach((function(e){e(n)})),l=0;l<u;++l)null==(c=e[l]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return t}function f(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=10*Math.sqrt(.5+n),o=n*FO;t.x=i*Math.cos(o),t.y=i*Math.sin(o)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function p(t){return t.initialize&&t.initialize(e,u),t}return null==e&&(e=[]),f(),t={tick:d,restart:function(){return l.restart(h),t},stop:function(){return l.stop(),t},nodes:function(n){return arguments.length?(e=n,f(),s.forEach(p),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(o=+e,t):o},velocityDecay:function(e){return arguments.length?(a=1-e,t):1-a},randomSource:function(e){return arguments.length?(u=e,s.forEach(p),t):u},force:function(e,n){return arguments.length>1?(null==n?s.delete(e):s.set(e,p(n)),t):s.get(e)},find:function(t,n,r){var i,o,a,s,l,c=0,u=e.length;for(null==r?r=1/0:r*=r,c=0;c<u;++c)(a=(i=t-(s=e[c]).x)*i+(o=n-s.y)*o)<r&&(l=s,r=a);return l},on:function(e,n){return arguments.length>1?(c.on(e,n),t):c.on(e)}}}(e),r=n.stop,i=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,i()),n.stop=()=>(o=!0,r()),GO(n,t,!0).on("end",(()=>o=!0))}(t.source,e),i.on("tick",(n=t.dataflow,r=this,()=>n.touch(r).run())),e.static||(o=!0,i.tick()),t.modifies("index")),a||o||e.modified(HO)||t.changed()&&e.restart)if(i.alpha(Math.max(i.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/s)),e.static)for(i.stop();--s>=0;)i.tick();else if(i.stopped()&&i.restart(),!o)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const n=t.dataflow;for(let e,t=this._argops,s=0,l=t.length;s<l;++s)if(e=t[s],e.name===VO&&"link"===e.op._argval.force)for(var r,i=e.op._argops,o=0,a=i.length;o<a;++o)if("links"===i[o].name&&(r=i[o].op.source)){n.pulse(r,n.changeset().reflow());break}return t.reflow(e.modified()).modifies($O)}}),rL.prototype=JO.prototype={constructor:rL,count:function(){return this.eachAfter(KO)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return JO(this).eachBefore(tL)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var SL={depth:-1},EL={};function CL(e){return e.id}function ML(e){return e.parentId}function OL(){var e=CL,t=ML;function n(n){var r,i,o,a,s,l,c,u=Array.from(n),h=u.length,d=new Map;for(i=0;i<h;++i)r=u[i],s=u[i]=new rL(r),null!=(l=e(r,i,n))&&(l+="")&&(c=s.id=l,d.set(c,d.has(c)?EL:s)),null!=(l=t(r,i,n))&&(l+="")&&(s.parent=l);for(i=0;i<h;++i)if(l=(s=u[i]).parent){if(!(a=d.get(l)))throw new Error("missing: "+l);if(a===EL)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=SL,o.eachBefore((function(e){e.depth=e.parent.depth+1,--h})).eachBefore(nL),o.parent=null,h>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=vL(t),n):e},n.parentId=function(e){return arguments.length?(t=vL(e),n):t},n}function LL(e,t){return e.parent===t.parent?1:2}function DL(e){var t=e.children;return t?t[0]:e.t}function IL(e){var t=e.children;return t?t[t.length-1]:e.t}function RL(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function PL(e,t,n){return e.a.parent===t.parent?e.a:n}function NL(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function zL(e,t){return e.parent===t.parent?1:2}function FL(e,t){return e+t.x}function BL(e,t){return Math.max(e,t.y)}function jL(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}NL.prototype=Object.create(rL.prototype);var UL=(1+Math.sqrt(5))/2;function VL(e,t,n,r,i,o){for(var a,s,l,c,u,h,d,f,p,g,m,v=[],y=t.children,b=0,_=0,x=y.length,w=t.value;b<x;){l=i-n,c=o-r;do{u=y[_++].value}while(!u&&_<x);for(h=d=u,m=u*u*(g=Math.max(c/l,l/c)/(w*e)),p=Math.max(d/m,m/h);_<x;++_){if(u+=s=y[_].value,s<h&&(h=s),s>d&&(d=s),m=u*u*g,(f=Math.max(d/m,m/h))>p){u-=s;break}p=f}v.push(a={value:u,dice:l<c,children:y.slice(b,_)}),a.dice?TL(a,n,r,i,w?r+=c*u/w:o):jL(a,n,r,w?n+=l*u/w:i,o),w-=u,b=_}return v}const qL=function e(t){function n(e,n,r,i,o){VL(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(UL),HL=function e(t){function n(e,n,r,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,s,l,c,u,h=-1,d=a.length,f=e.value;++h<d;){for(l=(s=a[h]).children,c=s.value=0,u=l.length;c<u;++c)s.value+=l[c].value;s.dice?TL(s,n,r,i,f?r+=(o-r)*s.value/f:o):jL(s,n,r,f?n+=(i-n)*s.value/f:i,o),f-=s.value}else e._squarify=a=VL(t,e,n,r,i,o),a.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(UL);function $L(e,t,n){const r={};return e.each((e=>{const i=e.data;n(i)&&(r[t(i)]=e)})),e.lookup=r,e}function WL(e){Us.call(this,null,e)}WL.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const GL=e=>e.values;function YL(){const e=[],t={entries:e=>r(n(e,0),0),key:n=>(e.push(n),t)};function n(t,r){if(r>=e.length)return t;const i=t.length,o=e[r++],a={},s={};let l,c,u,h=-1;for(;++h<i;)l=o(c=t[h])+"",(u=a[l])?u.push(c):a[l]=[c];for(l in a)s[l]=n(a[l],r);return s}function r(t,n){if(++n>e.length)return t;const i=[];for(const e in t)i.push({key:e,values:r(t[e],n)});return i}return t}function XL(e){Us.call(this,null,e)}ut(WL,Us,{transform(e,t){t.source||oe("Nest transform requires an upstream data source.");var n=e.generate,r=e.modified(),i=t.clone(),o=this.value;return(!o||r||t.changed())&&(o&&o.each((e=>{e.children&&ls(e.data)&&i.rem.push(e.data)})),this.value=o=JO({values:We(e.keys).reduce(((e,t)=>(e.key(t),e)),YL()).entries(i.source)},GL),n&&o.each((e=>{e.children&&(e=hs(e.data),i.add.push(e),i.source.push(e))})),$L(o,cs,cs)),i.source.root=o,i}});const ZL=(e,t)=>e.parent===t.parent?1:2;ut(XL,Us,{transform(e,t){t.source&&t.source.root||oe(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(e.method),r=this.fields,i=t.source.root,o=e.as||r;e.field?i.sum(e.field):i.count(),e.sort&&i.sort(gs(e.sort,(e=>e.data))),function(e,t,n){for(let r,i=0,o=t.length;i<o;++i)r=t[i],r in n&&e[r](n[r])}(n,this.params,e),n.separation&&n.separation(!1!==e.separation?ZL:he);try{this.value=n(i)}catch(e){oe(e)}return i.each((e=>function(e,t,n){const r=e.data,i=t.length-1;for(let o=0;o<i;++o)r[n[o]]=e[t[o]];r[n[i]]=e.children?e.children.length:0}(e,r,o))),t.reflow(e.modified()).modifies(o).modifies("leaf")}});const KL=["x","y","r","depth","children"];function JL(e){XL.call(this,e)}JL.Definition={type:"Pack",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:KL.length,default:KL}]},ut(JL,XL,{layout:function(){var e=null,t=1,n=1,r=yL;function i(i){return i.x=t/2,i.y=n/2,e?i.eachBefore(xL(e)).eachAfter(wL(r,.5)).eachBefore(AL(1)):i.eachBefore(xL(_L)).eachAfter(wL(yL,1)).eachAfter(wL(r,i.r/Math.min(t,n))).eachBefore(AL(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=mL(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:bL(+e),i):r},i},params:["radius","size","padding"],fields:KL});const QL=["x0","y0","x1","y1","depth","children"];function eD(e){XL.call(this,e)}function tD(e){Us.call(this,null,e)}eD.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:QL.length,default:QL}]},ut(eD,XL,{layout:function(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(function(e,t){return function(r){r.children&&TL(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a<i&&(i=a=(i+a)/2),s<o&&(o=s=(o+s)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=s}}(t,o)),r&&i.eachBefore(kL),i}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i},params:["size","round","padding"],fields:QL}),tD.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},ut(tD,Us,{transform(e,t){t.source||oe("Stratify transform requires an upstream data source.");let n=this.value;const r=e.modified(),i=t.fork(t.ALL).materialize(t.SOURCE),o=!n||r||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return i.source=i.source.slice(),o&&(n=i.source.length?$L(OL().id(e.key).parentId(e.parentKey)(i.source),e.key,de):$L(OL()([{}]),e.key,e.key)),i.source.root=this.value=n,i}});const nD={tidy:function(){var e=LL,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,o,a=new NL(e,0),s=[a];t=s.pop();)if(r=t._.children)for(t.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=t.children[i]=new NL(r[i],i)),n.parent=t;return(a.parent=new NL(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var c=i,u=i,h=i;i.eachBefore((function(e){e.x<c.x&&(c=e),e.x>u.x&&(u=e),e.depth>h.depth&&(h=e)}));var d=c===u?1:e(c,u)/2,f=d-c.x,p=t/(u.x+d+f),g=n/(h.depth||1);i.eachBefore((function(e){e.x=(e.x+f)*p,e.y=e.depth*g}))}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,l=o.parent.children[0],c=o.m,u=a.m,h=s.m,d=l.m;s=IL(s),o=DL(o),s&&o;)l=DL(l),(a=IL(a)).a=t,(i=s.z+h-o.z-c+e(s._,o._))>0&&(RL(PL(s,t,r),t,i),c+=i,u+=i),h+=s.m,c+=o.m,d+=l.m,u+=a.m;s&&!IL(a)&&(a.t=s,a.m+=h-u),o&&!DL(l)&&(l.t=o,l.m+=c-d,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i},cluster:function(){var e=zL,t=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(FL,0)/e.length}(n),t.y=function(e){return 1+e.reduce(BL,0)}(n)):(t.x=o?a+=e(t,o):0,t.y=0,o=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=s.x-e(s,l)/2,u=l.x+e(l,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}},rD=["x","y","depth","children"];function iD(e){XL.call(this,e)}function oD(e){Us.call(this,[],e)}iD.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:rD.length,default:rD}]},ut(iD,XL,{layout(e){const t=e||"tidy";if(at(nD,t))return nD[t]();oe("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:rD}),oD.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},ut(oD,Us,{transform(e,t){const n=this.value,r=t.source&&t.source.root,i=t.fork(t.NO_SOURCE),o={};return r||oe("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(i.rem=n,t.visit(t.SOURCE,(e=>o[cs(e)]=1)),r.each((e=>{const t=e.data,n=e.parent&&e.parent.data;n&&o[cs(t)]&&o[cs(n)]&&i.add.push(hs({source:n,target:t}))})),this.value=i.add):t.changed(t.MOD)&&(t.visit(t.MOD,(e=>o[cs(e)]=1)),n.forEach((e=>{(o[cs(e.source)]||o[cs(e.target)])&&i.mod.push(e)}))),i}});const aD={binary:function(e,t,n,r,i){var o,a,s=e.children,l=s.length,c=new Array(l+1);for(c[0]=a=o=0;o<l;++o)c[o+1]=a+=s[o].value;!function e(t,n,r,i,o,a,l){if(t>=n-1){var u=s[t];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=l)}for(var h=c[t],d=r/2+h,f=t+1,p=n-1;f<p;){var g=f+p>>>1;c[g]<d?f=g+1:p=g}d-c[f-1]<c[f]-d&&t+1<f&&--f;var m=c[f]-h,v=r-m;if(a-i>l-o){var y=r?(i*v+a*m)/r:a;e(t,f,m,i,o,y,l),e(f,n,v,y,o,a,l)}else{var b=r?(o*v+l*m)/r:l;e(t,f,m,i,o,a,b),e(f,n,v,i,b,a,l)}}(0,l,e.value,t,n,r,i)},dice:TL,slice:jL,slicedice:function(e,t,n,r,i){(1&e.depth?jL:TL)(e,t,n,r,i)},squarify:qL,resquarify:HL},sD=["x0","y0","x1","y1","depth","children"];function lD(e){XL.call(this,e)}function cD(e,t,n,r){const i=e.width,o=e.height,a=n||r,s=Bh(i,o).getContext("2d");t.forEach((e=>uD(s,e,a)));const l=new Uint32Array(s.getImageData(0,0,i,o).data.buffer),c=e.bitmap(),u=a&&e.bitmap();let h,d,f,p,g;for(d=0;d<o;++d)for(h=0;h<i;++h)g=4278190080&l[d*i+h],g&&(f=e(h),p=e(d),r||c.set(f,p),a&&268435456^g&&u.set(f,p));return[c,u]}function uD(e,t,n){if(!t.length)return;const r=t[0].mark.marktype;"group"===r?t.forEach((t=>{t.items.forEach((t=>uD(e,t.items,n)))})):Jx[r].draw(e,{items:n?t.map(hD):t})}function hD(e){const t=fs(e,{});return t.stroke&&(t.strokeOpacity=1),t.fill&&(t.fillOpacity=.0625,t.stroke="#000",t.strokeOpacity=1,t.strokeWidth=2),t}lD.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:sD.length,default:sD}]},ut(lD,XL,{layout(){const e=function(){var e=qL,t=!1,n=1,r=1,i=[0],o=yL,a=yL,s=yL,l=yL,c=yL;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(h),i=[0],t&&e.eachBefore(kL),e}function h(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,h=t.x1-n,d=t.y1-n;h<r&&(r=h=(r+h)/2),d<u&&(u=d=(u+d)/2),t.x0=r,t.y0=u,t.x1=h,t.y1=d,t.children&&(n=i[t.depth+1]=o(t)/2,r+=c(t)-n,u+=a(t)-n,(h-=s(t)-n)<r&&(r=h=(r+h)/2),(d-=l(t)-n)<u&&(u=d=(u+d)/2),e(t,r,u,h,d))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=vL(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(o="function"==typeof e?e:bL(+e),u):o},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(a="function"==typeof e?e:bL(+e),u):a},u.paddingRight=function(e){return arguments.length?(s="function"==typeof e?e:bL(+e),u):s},u.paddingBottom=function(e){return arguments.length?(l="function"==typeof e?e:bL(+e),u):l},u.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:bL(+e),u):c},u}();return e.ratio=t=>{const n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=t=>{at(aD,t)?e.tile(aD[t]):oe("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:sD});const dD=31,fD=new Uint32Array(33),pD=new Uint32Array(33);pD[0]=0,fD[0]=~pD[0];for(let e=1;e<=32;++e)pD[e]=pD[e-1]<<1|1,fD[e]=~pD[e];function gD(e,t,n,r,i,o){let a=n/2;return e-a<0||e+a>i||t-(a=r/2)<0||t+a>o}function mD(){return!1}function vD(e,t,n,r,i,o,a,s){const l=i*o/(2*r),c=e(t-l),u=e(t+l),h=e(n-(o/=2)),d=e(n+o);return a.outOfBounds(c,h,u,d)||a.getRange(c,h,u,d)||s&&s.getRange(c,h,u,d)}function yD(e,t,n,r,i,o,a,s){const l=i*o/(2*r);let c=e(t-l),u=e(t+l),h=e(n-(o/=2)),d=e(n+o);return c=c>0?c:0,h=h>0?h:0,u=u<e.width?u:e.width-1,d=d<e.height?d:e.height-1,a.getRange(c,h,u,d)||s&&s.getRange(c,h,u,d)}function bD(e){return e?[yD,mD]:[vD,gD]}const _D=[-1,-1,1,1],xD=[-1,1,-1,1],wD=["right","center","left"],AD=["bottom","middle","top"];function kD(e,t,n,r,i,o,a,s,l,c,u,h){return!(i.outOfBounds(e,n,t,r)||(h&&o?o.getRange(e,n,t,r)||!function(e,t,n,r,i){return i[0]<=e&&n<=i[2]&&i[3]<=t&&r<=i[5]}(a,l,s,c,u):i.getRange(e,n,t,r)))}const TD={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},SD={naive:function(e,t,n,r){const i=e.width,o=e.height;return function(e){const t=e.datum.datum.items[r].items,n=t.length,a=e.datum.fontSize,s=Dx.width(e.datum,e.datum.text);let l,c,u,h,d,f,p,g=0;for(let r=0;r<n;++r)l=t[r].x,u=t[r].y,c=void 0===t[r].x2?l:t[r].x2,h=void 0===t[r].y2?u:t[r].y2,d=(l+c)/2,f=(u+h)/2,p=Math.abs(c-l+h-u),p>=g&&(g=p,e.x=d,e.y=f);return d=s/2,f=a/2,l=e.x-d,c=e.x+d,u=e.y-f,h=e.y+f,e.align="center",l<0&&c<=i?e.align="left":0<=l&&i<c&&(e.align="right"),e.baseline="middle",u<0&&h<=o?e.baseline="top":0<=u&&o<h&&(e.baseline="bottom"),!0}},"reduced-search":function(e,t,n,r,i){const o=e.width,a=e.height,[s,l]=bD(i),c=t[0],u=t[1];function h(t,n,r,i,h){const d=e.invert(t),f=e.invert(n);let p,g=r,m=a;if(!l(d,f,i,h,o,a)&&!s(e,d,f,h,i,g,c,u)&&!s(e,d,f,h,i,h,c,null)){for(;m-g>=1;)p=(g+m)/2,s(e,d,f,h,i,p,c,u)?m=p:g=p;if(g>r)return[d,f,g,!0]}}return function(t){const i=t.datum.datum.items[r].items,u=i.length,d=t.datum.fontSize,f=Dx.width(t.datum,t.datum.text);let p,g,m,v,y,b,_,x,w,A,k,T,S,E,C,M,O,L=n?d:0,D=!1,I=!1,R=0;for(let r=0;r<u;++r){for(p=i[r].x,m=i[r].y,g=void 0===i[r].x2?p:i[r].x2,v=void 0===i[r].y2?m:i[r].y2,p>g&&(O=p,p=g,g=O),m>v&&(O=m,m=v,v=O),w=e(p),k=e(g),A=~~((w+k)/2),T=e(m),E=e(v),S=~~((T+E)/2),_=A;_>=w;--_)for(x=S;x>=T;--x)M=h(_,x,L,f,d),M&&([t.x,t.y,L,D]=M);for(_=A;_<=k;++_)for(x=S;x<=E;++x)M=h(_,x,L,f,d),M&&([t.x,t.y,L,D]=M);D||n||(C=Math.abs(g-p+v-m),y=(p+g)/2,b=(m+v)/2,C>=R&&!l(y,b,f,d,o,a)&&!s(e,y,b,d,f,d,c,null)&&(R=C,t.x=y,t.y=b,I=!0))}return!(!D&&!I||(y=f/2,b=d/2,c.setRange(e(t.x-y),e(t.y-b),e(t.x+y),e(t.y+b)),t.align="center",t.baseline="middle",0))}},floodfill:function(e,t,n,r,i){const o=e.width,a=e.height,[s,l]=bD(i),c=t[0],u=t[1],h=e.bitmap();return function(t){const i=t.datum.datum.items[r].items,d=i.length,f=t.datum.fontSize,p=Dx.width(t.datum,t.datum.text),g=[];let m,v,y,b,_,x,w,A,k,T,S,E,C=n?f:0,M=!1,O=!1,L=0;for(let r=0;r<d;++r){for(m=i[r].x,y=i[r].y,v=void 0===i[r].x2?m:i[r].x2,b=void 0===i[r].y2?y:i[r].y2,g.push([e((m+v)/2),e((y+b)/2)]);g.length;)if([w,A]=g.pop(),!(c.get(w,A)||u.get(w,A)||h.get(w,A))){h.set(w,A);for(let e=0;e<4;++e)_=w+_D[e],x=A+xD[e],h.outOfBounds(_,x,_,x)||g.push([_,x]);if(_=e.invert(w),x=e.invert(A),k=C,T=a,!l(_,x,p,f,o,a)&&!s(e,_,x,f,p,k,c,u)&&!s(e,_,x,f,p,f,c,null)){for(;T-k>=1;)S=(k+T)/2,s(e,_,x,f,p,S,c,u)?T=S:k=S;k>C&&(t.x=_,t.y=x,C=k,M=!0)}}M||n||(E=Math.abs(v-m+b-y),_=(m+v)/2,x=(y+b)/2,E>=L&&!l(_,x,p,f,o,a)&&!s(e,_,x,f,p,f,c,null)&&(L=E,t.x=_,t.y=x,O=!0))}return!(!M&&!O||(_=p/2,x=f/2,c.setRange(e(t.x-_),e(t.y-x),e(t.x+_),e(t.y+x)),t.align="center",t.baseline="middle",0))}}};function ED(e,t,n,r,i,o,a,s,l,c,u){if(!e.length)return e;const h=Math.max(r.length,i.length),d=function(e,t){const n=new Float64Array(t),r=e.length;for(let t=0;t<r;++t)n[t]=e[t]||0;for(let e=r;e<t;++e)n[e]=n[r-1];return n}(r,h),f=function(e,t){const n=new Int8Array(t),r=e.length;for(let t=0;t<r;++t)n[t]|=TD[e[t]];for(let e=r;e<t;++e)n[e]=n[r-1];return n}(i,h),p=(x=e[0].datum)&&x.mark&&x.mark.marktype,g="group"===p&&e[0].datum.items[l].marktype,m="area"===g,v=function(e,t,n,r){const i=e=>[e.x,e.x,e.x,e.y,e.y,e.y];return e?"line"===e||"area"===e?e=>i(e.datum):"line"===t?e=>{const t=e.datum.items[r].items;return i(t.length?t["start"===n?0:t.length-1]:{x:NaN,y:NaN})}:e=>{const t=e.datum.bounds;return[t.x1,(t.x1+t.x2)/2,t.x2,t.y1,(t.y1+t.y2)/2,t.y2]}:i}(p,g,s,l),y=null===c||c===1/0,b=function(e,t,n){const r=Math.max(1,Math.sqrt(e*t/1e6)),i=~~((e+2*n+r)/r),o=~~((t+2*n+r)/r),a=e=>~~((e+n)/r);return a.invert=e=>e*r-n,a.bitmap=()=>function(e,t){const n=new Uint32Array(~~((e*t+32)/32));function r(e,t){n[e]|=t}function i(e,t){n[e]&=t}return{array:n,get:(t,r)=>{const i=r*e+t;return n[i>>>5]&1<<(i&dD)},set:(t,n)=>{const i=n*e+t;r(i>>>5,1<<(i&dD))},clear:(t,n)=>{const r=n*e+t;i(r>>>5,~(1<<(r&dD)))},getRange:(t,r,i,o)=>{let a,s,l,c,u=o;for(;u>=r;--u)if(a=u*e+t,s=u*e+i,l=a>>>5,c=s>>>5,l===c){if(n[l]&fD[a&dD]&pD[1+(s&dD)])return!0}else{if(n[l]&fD[a&dD])return!0;if(n[c]&pD[1+(s&dD)])return!0;for(let e=l+1;e<c;++e)if(n[e])return!0}return!1},setRange:(t,n,i,o)=>{let a,s,l,c,u;for(;n<=o;++n)if(a=n*e+t,s=n*e+i,l=a>>>5,c=s>>>5,l===c)r(l,fD[a&dD]&pD[1+(s&dD)]);else for(r(l,fD[a&dD]),r(c,pD[1+(s&dD)]),u=l+1;u<c;++u)r(u,4294967295)},clearRange:(t,n,r,o)=>{let a,s,l,c,u;for(;n<=o;++n)if(a=n*e+t,s=n*e+r,l=a>>>5,c=s>>>5,l===c)i(l,pD[a&dD]|fD[1+(s&dD)]);else for(i(l,pD[a&dD]),i(c,fD[1+(s&dD)]),u=l+1;u<c;++u)i(u,0)},outOfBounds:(n,r,i,o)=>n<0||r<0||o>=t||i>=e}}(i,o),a.ratio=r,a.padding=n,a.width=e,a.height=t,a}(t[0],t[1],y?0:c),_=m&&"naive"===u;var x;const w=e.map((e=>({datum:e,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:v(e)})));let A;if(!_){n&&w.sort(((e,t)=>n(e.datum,t.datum)));let t=!1;for(let e=0;e<f.length&&!t;++e)t=5===f[e]||d[e]<0;p&&(a||m)&&(o=[e.map((e=>e.datum))].concat(o)),A=o.length?cD(b,o,t,m):function(e,t){const n=e.bitmap();return(t||[]).forEach((t=>n.set(e(t.boundary[0]),e(t.boundary[3])))),[n,void 0]}(b,a&&w)}const k=m?SD[u](b,A,a,l,y):function(e,t,n,r,i){const o=e.width,a=e.height,s=t[0],l=t[1],c=r.length;return function(t){const u=t.boundary,h=t.datum.fontSize;if(!i&&(u[2]<0||u[5]<0||u[0]>o||u[3]>a))return!1;let d,f,p,g,m,v,y,b,_,x,w,A,k,T,S,E=0;for(let o=0;o<c;++o){if(d=(3&n[o])-1,f=(n[o]>>>2&3)-1,p=0===d&&0===f||r[o]<0,g=d&&f?Math.SQRT1_2:1,m=r[o]<0?-1:1,v=u[1+d]+r[o]*d*g,w=u[4+f]+m*h*f/2+r[o]*f*g,b=w-h/2,_=w+h/2,A=e(v),T=e(b),S=e(_),i&&(A=A<0?0:A,T=T<0?0:T,S=S>=e.height?e.height-1:S),!E){if(!kD(A,A,T,S,s,l,v,v,b,_,u,p))continue;E=Dx.width(t.datum,t.datum.text)}if(x=v+m*E*d/2,v=x-E/2,y=x+E/2,A=e(v),k=e(y),i&&(A=A<0?0:A,k=k>=e.width?e.width-1:k),kD(A,k,T,S,s,l,v,y,b,_,u,p))return t.x=d?d*m<0?y:v:x,t.y=f?f*m<0?_:b:w,t.align=wD[d*m+1],t.baseline=AD[f*m+1],s.setRange(A,T,k,S),!0}return!1}}(b,A,f,d,y);return w.forEach((e=>e.opacity=+k(e))),w}const CD=["x","y","opacity","align","baseline"],MD=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function OD(e){Us.call(this,null,e)}function LD(e,t){var n,r,i,o,a,s,l=[],c=function(e){return e(o)};if(null==t)l.push(e);else for(n={},r=0,i=e.length;r<i;++r)o=e[r],(s=n[a=t.map(c)])||(n[a]=s=[],s.dims=a,l.push(s)),s.push(o);return l}function DD(e){Us.call(this,null,e)}OD.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:MD},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:CD.length,default:CD}]},ut(OD,Us,{transform(e,t){const n=e.modified();if(!(n||t.changed(t.ADD_REM)||function(n){const r=e.sort;return Ye(r)&&t.modified(r.fields)}()))return;e.size&&2===e.size.length||oe("Size parameter should be specified as a [width, height] array.");const r=e.as||CD;return ED(t.materialize(t.SOURCE).source||[],e.size,e.sort,We(null==e.offset?1:e.offset),We(e.anchor||MD),e.avoidMarks||[],!1!==e.avoidBaseMark,e.lineAnchor||"end",e.markIndex||0,void 0===e.padding?0:e.padding,e.method||"naive").forEach((e=>{const t=e.datum;t[r[0]]=e.x,t[r[1]]=e.y,t[r[2]]=e.opacity,t[r[3]]=e.align,t[r[4]]=e.baseline})),t.reflow(n).modifies(r)}}),DD.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},ut(DD,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=LD(t.materialize(t.SOURCE).source,e.groupby),i=(e.groupby||[]).map(ee),o=i.length,a=e.as||[ee(e.x),ee(e.y)],s=[];r.forEach((t=>{Ul(t,e.x,e.y,e.bandwidth||.3).forEach((e=>{const n={};for(let e=0;e<o;++e)n[i[e]]=t.dims[e];n[a[0]]=e[0],n[a[1]]=e[1],s.push(hs(n))}))})),this.value&&(n.rem=this.value),this.value=n.add=n.source=s}return n}});const ID={linear:Rl,log:Pl,exp:Nl,pow:zl,quad:Fl,poly:Bl};function RD(e){Us.call(this,null,e)}RD.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(ID)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]},ut(RD,Us,{transform(e,t){const n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const r=LD(t.materialize(t.SOURCE).source,e.groupby),i=(e.groupby||[]).map(ee),o=e.method||"linear",a=e.order||3,s=((e,t)=>"poly"===e?t:"quad"===e?2:1)(o,a),l=e.as||[ee(e.x),ee(e.y)],c=ID[o],u=[];let h=e.extent;at(ID,o)||oe("Invalid regression method: "+o),null!=h&&"log"===o&&h[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),h=null),r.forEach((n=>{if(n.length<=s)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const r=c(n,e.x,e.y,a);if(e.params)return void u.push(hs({keys:n.dims,coef:r.coef,rSquared:r.rSquared}));const d=h||rt(n,e.x),f=e=>{const t={};for(let e=0;e<i.length;++e)t[i[e]]=n.dims[e];t[l[0]]=e[0],t[l[1]]=e[1],u.push(hs(t))};"linear"===o?d.forEach((e=>f([e,r.predict(e)]))):$l(r.predict,d,25,200).forEach(f)})),this.value&&(n.rem=this.value),this.value=n.add=n.source=u}return n}});const PD=Math.pow(2,-52),ND=new Uint32Array(512);class zD{static from(e,t=$D,n=WD){const r=e.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=e[o];i[2*o]=t(r),i[2*o+1]=n(r)}return new zD(i)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=e.length>>1;let a=1/0,s=1/0,l=-1/0,c=-1/0;for(let t=0;t<o;t++){const n=e[2*t],r=e[2*t+1];n<a&&(a=n),r<s&&(s=r),n>l&&(l=n),r>c&&(c=r),this._ids[t]=t}const u=(a+l)/2,h=(s+c)/2;let d,f,p,g=1/0;for(let t=0;t<o;t++){const n=FD(u,h,e[2*t],e[2*t+1]);n<g&&(d=t,g=n)}const m=e[2*d],v=e[2*d+1];g=1/0;for(let t=0;t<o;t++){if(t===d)continue;const n=FD(m,v,e[2*t],e[2*t+1]);n<g&&n>0&&(f=t,g=n)}let y=e[2*f],b=e[2*f+1],_=1/0;for(let t=0;t<o;t++){if(t===d||t===f)continue;const n=VD(m,v,y,b,e[2*t],e[2*t+1]);n<_&&(p=t,_=n)}let x=e[2*p],w=e[2*p+1];if(_===1/0){for(let t=0;t<o;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];qD(this._ids,this._dists,0,o-1);const t=new Uint32Array(o);let n=0;for(let e=0,r=-1/0;e<o;e++){const i=this._ids[e];this._dists[i]>r&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(jD(m,v,y,b,x,w)){const e=f,t=y,n=b;f=p,y=x,b=w,p=e,x=t,w=n}const A=function(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,h=l*l+c*c,d=.5/(a*c-s*l);return{x:e+(c*u-s*h)*d,y:t+(a*h-l*u)*d}}(m,v,y,b,x,w);this._cx=A.x,this._cy=A.y;for(let t=0;t<o;t++)this._dists[t]=FD(e[2*t],e[2*t+1],A.x,A.y);qD(this._ids,this._dists,0,o-1),this._hullStart=d;let k=3;n[d]=t[p]=f,n[f]=t[d]=p,n[p]=t[f]=d,r[d]=0,r[f]=1,r[p]=2,i.fill(-1),i[this._hashKey(m,v)]=d,i[this._hashKey(y,b)]=f,i[this._hashKey(x,w)]=p,this.trianglesLen=0,this._addTriangle(d,f,p,-1,-1,-1);for(let o,a,s=0;s<this._ids.length;s++){const l=this._ids[s],c=e[2*l],u=e[2*l+1];if(s>0&&Math.abs(c-o)<=PD&&Math.abs(u-a)<=PD)continue;if(o=c,a=u,l===d||l===f||l===p)continue;let h=0;for(let e=0,t=this._hashKey(c,u);e<this._hashSize&&(h=i[(t+e)%this._hashSize],-1===h||h===n[h]);e++);h=t[h];let g,m=h;for(;g=n[m],!jD(c,u,e[2*m],e[2*m+1],e[2*g],e[2*g+1]);)if(m=g,m===h){m=-1;break}if(-1===m)continue;let v=this._addTriangle(m,l,n[m],-1,-1,r[m]);r[l]=this._legalize(v+2),r[m]=v,k++;let y=n[m];for(;g=n[y],jD(c,u,e[2*y],e[2*y+1],e[2*g],e[2*g+1]);)v=this._addTriangle(y,l,g,r[l],-1,r[y]),r[l]=this._legalize(v+2),n[y]=y,k--,y=g;if(m===h)for(;g=t[m],jD(c,u,e[2*g],e[2*g+1],e[2*m],e[2*m+1]);)v=this._addTriangle(g,l,m,-1,r[m],r[g]),this._legalize(v+2),r[g]=v,n[m]=m,k--,m=g;this._hullStart=t[l]=m,n[m]=t[y]=l,n[l]=y,i[this._hashKey(c,u)]=l,i[this._hashKey(e[2*m],e[2*m+1])]=m}this.hull=new Uint32Array(k);for(let e=0,t=this._hullStart;e<k;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const a=n[e],s=e-e%3;if(o=s+(e+2)%3,-1===a){if(0===i)break;e=ND[--i];continue}const l=a-a%3,c=s+(e+1)%3,u=l+(a+2)%3,h=t[o],d=t[e],f=t[c],p=t[u];if(UD(r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1])){t[e]=p,t[a]=h;const r=n[u];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(a,n[o]),this._link(o,u);const s=l+(a+1)%3;i<ND.length&&(ND[i++]=s)}else{if(0===i)break;e=ND[--i]}}return o}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,o){const a=this.trianglesLen;return this._triangles[a]=e,this._triangles[a+1]=t,this._triangles[a+2]=n,this._link(a,r),this._link(a+1,i),this._link(a+2,o),this.trianglesLen+=3,a}}function FD(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function BD(e,t,n,r,i,o){const a=(r-t)*(i-e),s=(n-e)*(o-t);return Math.abs(a-s)>=33306690738754716e-32*Math.abs(a+s)?a-s:0}function jD(e,t,n,r,i,o){return(BD(i,o,e,t,n,r)||BD(e,t,n,r,i,o)||BD(n,r,i,o,e,t))<0}function UD(e,t,n,r,i,o,a,s){const l=e-a,c=t-s,u=n-a,h=r-s,d=i-a,f=o-s,p=u*u+h*h,g=d*d+f*f;return l*(h*g-p*f)-c*(u*g-p*d)+(l*l+c*c)*(u*f-h*d)<0}function VD(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,h=l*l+c*c,d=.5/(a*c-s*l),f=(c*u-s*h)*d,p=(a*h-l*u)*d;return f*f+p*p}function qD(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=e[i],o=t[r];let a=i-1;for(;a>=n&&t[e[a]]>o;)e[a+1]=e[a--];e[a+1]=r}else{let i=n+1,o=r;HD(e,n+r>>1,i),t[e[n]]>t[e[r]]&&HD(e,n,r),t[e[i]]>t[e[r]]&&HD(e,i,r),t[e[n]]>t[e[i]]&&HD(e,n,i);const a=e[i],s=t[a];for(;;){do{i++}while(t[e[i]]<s);do{o--}while(t[e[o]]>s);if(o<i)break;HD(e,i,o)}e[n+1]=e[o],e[o]=a,r-i+1>=o-n?(qD(e,t,i,r),qD(e,t,n,o-1)):(qD(e,t,n,o-1),qD(e,t,i,r))}}function HD(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function $D(e){return e[0]}function WD(e){return e[1]}const GD=1e-6;class YD{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>GD||Math.abs(this._y1-i)>GD)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class XD{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class ZD{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let t,r,o=0,a=0,s=n.length;o<s;o+=3,a+=2){const s=2*n[o],l=2*n[o+1],c=2*n[o+2],u=e[s],h=e[s+1],d=e[l],f=e[l+1],p=e[c],g=e[c+1],m=d-u,v=f-h,y=p-u,b=g-h,_=m*m+v*v,x=y*y+b*b,w=2*(m*b-v*y);if(w)if(Math.abs(w)<1e-8)t=(u+p)/2,r=(h+g)/2;else{const e=1/w;t=u+(b*_-v*x)*e,r=h+(m*x-y*_)*e}else t=(u+p)/2-1e8*b,r=(h+g)/2+1e8*y;i[a]=t,i[a+1]=r}let o,a,s,l=t[t.length-1],c=4*l,u=e[2*l],h=e[2*l+1];r.fill(0);for(let n=0;n<t.length;++n)l=t[n],o=c,a=u,s=h,c=4*l,u=e[2*l],h=e[2*l+1],r[o+2]=r[c]=s-h,r[o+3]=r[c+1]=u-a}render(e){const t=null==e?e=new YD:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:o,vectors:a}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){const r=n[t];if(r<t)continue;const i=2*Math.floor(t/3),a=2*Math.floor(r/3),s=o[i],l=o[i+1],c=o[a],u=o[a+1];this._renderSegment(s,l,c,u,e)}let s,l=i[i.length-1];for(let t=0;t<i.length;++t){s=l,l=i[t];const n=2*Math.floor(r[l]/3),c=o[n],u=o[n+1],h=4*s,d=this._project(c,u,a[h+2],a[h+3]);d&&this._renderSegment(c,u,d[0],d[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new YD:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new YD:void 0,r=this._clip(e);if(null===r||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)r[e]===r[e-2]&&r[e+1]===r[e-1]||t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new XD;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let o;const a=this._regioncode(e,t),s=this._regioncode(n,r);0===a&&0===s?(i.moveTo(e,t),i.lineTo(n,r)):(o=this._clipSegment(e,t,n,r,a,s))&&(i.moveTo(o[0],o[1]),i.lineTo(o[2],o[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let r=0,i=t.length;r<i;r+=2)for(let o=0,a=e.length;o<a;o+=2)if(t[r]==e[o]&&t[r+1]==e[o+1]&&t[(r+2)%i]==e[(o+a-2)%a]&&t[(r+3)%i]==e[(o+a-1)%a]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,o=n[e];if(-1===o)return null;const a=[];let s=o;do{const n=Math.floor(s/3);if(a.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==o&&-1!==s);return a}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,r=4*e;return n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t)}_clipFinite(e,t){const n=t.length;let r,i,o,a,s,l=null,c=t[n-2],u=t[n-1],h=this._regioncode(c,u);for(let d=0;d<n;d+=2)if(r=c,i=u,c=t[d],u=t[d+1],o=h,h=this._regioncode(c,u),0===o&&0===h)a=s,s=0,l?l.push(c,u):l=[c,u];else{let t,n,d,f,p;if(0===o){if(null===(t=this._clipSegment(r,i,c,u,o,h)))continue;[n,d,f,p]=t}else{if(null===(t=this._clipSegment(c,u,r,i,h,o)))continue;[f,p,n,d]=t,a=s,s=this._edgecode(n,d),a&&s&&this._edge(e,a,s,l,l.length),l?l.push(n,d):l=[n,d]}a=s,s=this._edgecode(f,p),a&&s&&this._edge(e,a,s,l,l.length),l?l.push(f,p):l=[f,p]}if(l)a=s,s=this._edgecode(l[0],l[1]),a&&s&&this._edge(e,a,s,l,l.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return l}_clipSegment(e,t,n,r,i,o){for(;;){if(0===i&&0===o)return[e,t,n,r];if(i&o)return null;let a,s,l=i||o;8&l?(a=e+(n-e)*(this.ymax-t)/(r-t),s=this.ymax):4&l?(a=e+(n-e)*(this.ymin-t)/(r-t),s=this.ymin):2&l?(s=t+(r-t)*(this.xmax-e)/(n-e),a=this.xmax):(s=t+(r-t)*(this.xmin-e)/(n-e),a=this.xmin),i?(e=a,t=s,i=this._regioncode(e,t)):(n=a,r=s,o=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,o){let a,s=Array.from(t);if((a=this._project(s[0],s[1],n,r))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],i,o))&&s.push(a[0],a[1]),s=this._clipFinite(e,s))for(let t,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)t=i,i=this._edgecode(s[n],s[n+1]),t&&i&&(n=this._edge(e,t,i,s,n),r=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,r,i){for(;t!==n;){let n,o;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,o=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,o=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,o=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,o=this.ymin}r[i]===n&&r[i+1]===o||!this.contains(e,n,o)||(r.splice(i,0,n,o),i+=2)}if(r.length>4)for(let e=0;e<r.length;e+=2){const t=(e+2)%r.length,n=(e+4)%r.length;(r[e]===r[t]&&r[t]===r[n]||r[e+1]===r[t+1]&&r[t+1]===r[n+1])&&(r.splice(t,2),e-=2)}return i}_project(e,t,n,r){let i,o,a,s=1/0;if(r<0){if(t<=this.ymin)return null;(i=(this.ymin-t)/r)<s&&(a=this.ymin,o=e+(s=i)*n)}else if(r>0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)<s&&(a=this.ymax,o=e+(s=i)*n)}if(n>0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)<s&&(o=this.xmax,a=t+(s=i)*r)}else if(n<0){if(e<=this.xmin)return null;(i=(this.xmin-e)/n)<s&&(o=this.xmin,a=t+(s=i)*r)}return[o,a]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}}const KD=2*Math.PI,JD=Math.pow;function QD(e){return e[0]}function eI(e){return e[1]}function tI(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class nI{static from(e,t=QD,n=eI,r){return new nI("length"in e?function(e,t,n,r){const i=e.length,o=new Float64Array(2*i);for(let a=0;a<i;++a){const i=e[a];o[2*a]=t.call(r,i,a,e),o[2*a+1]=n.call(r,i,a,e)}return o}(e,t,n,r):Float64Array.from(function*(e,t,n,r){let i=0;for(const o of e)yield t.call(r,o,i,e),yield n.call(r,o,i,e),++i}(e,t,n,r)))}constructor(e){this._delaunator=new zD(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const r=2*t[e],i=2*t[e+1],o=2*t[e+2];if((n[o]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[o+1]-n[r+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){const n=tI(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new zD(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=i[e%3==2?e-2:e+1];-1!==n[e]&&-1!==o[t]||(o[t]=e)}for(let e=0,t=r.length;e<t;++e)a[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],this.triangles[1]=r[1],this.triangles[2]=r[1],o[r[0]]=1,2===r.length&&(o[r[1]]=0))}voronoi(e){return new ZD(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const t=a.indexOf(e);return t>0&&(yield a[t-1]),void(t<a.length-1&&(yield a[t+1]))}const s=t[e];if(-1===s)return;let l=s,c=-1;do{if(yield c=o[l],l=l%3==2?l-2:l+1,o[l]!==e)return;if(l=i[l],-1===l){const t=n[(r[e]+1)%n.length];return void(t!==c&&(yield t))}}while(l!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const r=n;let i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:s,points:l}=this;if(-1===r[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=JD(t-l[2*e],2)+JD(n-l[2*e+1],2);const h=r[e];let d=h;do{let r=s[d];const h=JD(t-l[2*r],2)+JD(n-l[2*r+1],2);if(h<u&&(u=h,c=r),d=d%3==2?d-2:d+1,s[d]!==e)break;if(d=a[d],-1===d){if(d=i[(o[e]+1)%i.length],d!==r&&JD(t-l[2*d],2)+JD(n-l[2*d+1],2)<u)return d;break}}while(d!==h);return c}render(e){const t=null==e?e=new YD:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,o=r.length;t<o;++t){const o=r[t];if(o<t)continue;const a=2*i[t],s=2*i[o];e.moveTo(n[a],n[a+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t=2){const n=null==e?e=new YD:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],o=r[n+1];e.moveTo(i+t,o),e.arc(i,o,t,0,KD)}return n&&n.value()}renderHull(e){const t=null==e?e=new YD:void 0,{hull:n,points:r}=this,i=2*n[0],o=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<o;++t){const i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new XD;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new YD:void 0,{points:r,triangles:i}=this,o=2*i[e*=3],a=2*i[e+1],s=2*i[e+2];return t.moveTo(r[o],r[o+1]),t.lineTo(r[a],r[a+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new XD;return this.renderTriangle(e,t),t.value()}}function rI(e){Us.call(this,null,e)}rI.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const iI=[-1e5,-1e5,1e5,1e5];function oI(e){const t=e[0][0],n=e[0][1];let r=e.length-1;for(;e[r][0]===t&&e[r][1]===n;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}ut(rI,Us,{transform(e,t){const n=e.as||"path",r=t.source;if(!r||!r.length)return t;let i=e.size;i=i?[0,0,i[0],i[1]]:(i=e.extent)?[i[0][0],i[0][1],i[1][0],i[1][1]]:iI;const o=this.value=nI.from(r,e.x,e.y).voronoi(i);for(let e=0,t=r.length;e<t;++e){const t=o.cellPolygon(e);r[e][n]=t?oI(t):null}return t.reflow(e.modified()).modifies(n)}});var aI=Math.PI/180,sI=2048;function lI(e,t,n,r){if(!t.sprite){var i=e.context,o=e.ratio;i.clearRect(0,0,2048/o,sI/o);var a,s,l,c,u,h=0,d=0,f=0,p=n.length;for(--r;++r<p;){if(t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/o)+"px "+t.font,a=i.measureText(t.text+"m").width*o,l=t.size<<1,t.rotate){var g=Math.sin(t.rotate*aI),m=Math.cos(t.rotate*aI),v=a*m,y=a*g,b=l*m,_=l*g;a=Math.max(Math.abs(v+_),Math.abs(v-_))+31>>5<<5,l=~~Math.max(Math.abs(y+b),Math.abs(y-b))}else a=a+31>>5<<5;if(l>f&&(f=l),h+a>=2048&&(h=0,d+=f,f=0),d+l>=sI)break;i.translate((h+(a>>1))/o,(d+(l>>1))/o),t.rotate&&i.rotate(t.rotate*aI),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=a,t.height=l,t.xoff=h,t.yoff=d,t.x1=a>>1,t.y1=l>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,h+=a}for(var x=i.getImageData(0,0,2048/o,sI/o).data,w=[];--r>=0;)if((t=n[r]).hasText){for(s=(a=t.width)>>5,l=t.y1-t.y0,c=0;c<l*s;c++)w[c]=0;if(null==(h=t.xoff))return;d=t.yoff;var A=0,k=-1;for(u=0;u<l;u++){for(c=0;c<a;c++){var T=s*u+(c>>5),S=x[2048*(d+u)+(h+c)<<2]?1<<31-c%32:0;w[T]|=S,A|=S}A?k=u:(t.y0++,l--,u--,d++)}t.y1=t.y0+k,t.sprite=w.slice(0,(t.y1-t.y0)*s)}}}function cI(e,t,n){n>>=5;for(var r,i=e.sprite,o=e.width>>5,a=e.x-(o<<4),s=127&a,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(a>>5),h=0;h<c;h++){r=0;for(var d=0;d<=o;d++)if((r<<l|(d<o?(r=i[h*o+d])>>>s:0))&t[u+d])return!0;u+=n}return!1}function uI(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function hI(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function dI(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function fI(e){return"function"==typeof e?e:function(){return e}}var pI={archimedean:dI,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}};const gI=["x","y","font","fontSize","fontStyle","fontWeight","angle"],mI=["text","font","rotate","fontSize","fontStyle","fontWeight"];function vI(e){Us.call(this,function(){var e,t,n,r,i,o,a,s=[256,256],l=dI,c=[],u=Math.random,h={};function d(e,t,n){for(var r,i,o,a=t.x,c=t.y,h=Math.sqrt(s[0]*s[0]+s[1]*s[1]),d=l(s),f=u()<.5?1:-1,p=-f;(r=d(p+=f))&&(i=~~r[0],o=~~r[1],!(Math.min(Math.abs(i),Math.abs(o))>=h));)if(t.x=a+i,t.y=c+o,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>s[0]||t.y+t.y1>s[1])&&(!n||!cI(t,e,s[0]))&&(!n||hI(t,n))){for(var g,m=t.sprite,v=t.width>>5,y=s[0]>>5,b=t.x-(v<<4),_=127&b,x=32-_,w=t.y1-t.y0,A=(t.y+t.y0)*y+(b>>5),k=0;k<w;k++){g=0;for(var T=0;T<=v;T++)e[A+T]|=g<<x|(T<v?(g=m[k*v+T])>>>_:0);A+=y}return t.sprite=null,!0}return!1}return h.layout=function(){for(var l=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=sI/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(Bh()),h=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((s[0]>>5)*s[1]),f=null,p=c.length,g=-1,m=[],v=c.map((s=>({text:e(s),font:t(s),style:r(s),weight:i(s),rotate:o(s),size:~~(n(s)+1e-14),padding:a(s),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:s}))).sort(((e,t)=>t.size-e.size));++g<p;){var y=v[g];y.x=s[0]*(u()+.5)>>1,y.y=s[1]*(u()+.5)>>1,lI(l,y,v,g),y.hasText&&d(h,y,f)&&(m.push(y),f?uI(f,y):f=[{x:y.x+y.x0,y:y.y+y.y0},{x:y.x+y.x1,y:y.y+y.y1}],y.x-=s[0]>>1,y.y-=s[1]>>1)}return m},h.words=function(e){return arguments.length?(c=e,h):c},h.size=function(e){return arguments.length?(s=[+e[0],+e[1]],h):s},h.font=function(e){return arguments.length?(t=fI(e),h):t},h.fontStyle=function(e){return arguments.length?(r=fI(e),h):r},h.fontWeight=function(e){return arguments.length?(i=fI(e),h):i},h.rotate=function(e){return arguments.length?(o=fI(e),h):o},h.text=function(t){return arguments.length?(e=fI(t),h):e},h.spiral=function(e){return arguments.length?(l=pI[e]||e,h):l},h.fontSize=function(e){return arguments.length?(n=fI(e),h):n},h.padding=function(e){return arguments.length?(a=fI(e),h):a},h.random=function(e){return arguments.length?(u=e,h):u},h}(),e)}function yI(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bI(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>yI(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}vI.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:gI}]},ut(vI,Us,{transform(e,t){!e.size||e.size[0]&&e.size[1]||oe("Wordcloud size dimensions must be non-zero.");const n=e.modified();if(!(n||t.changed(t.ADD_REM)||mI.some((function(n){const r=e[n];return Ye(r)&&t.modified(r.fields)}))))return;const r=t.materialize(t.SOURCE).source,i=this.value,o=e.as||gI;let a,s=e.fontSize||14;if(Ye(s)?a=e.fontSizeRange:s=et(s),a){const e=s,t=by("sqrt")().domain(rt(r,e)).range(a);s=n=>t(e(n))}r.forEach((e=>{e[o[0]]=NaN,e[o[1]]=NaN,e[o[3]]=0}));const l=i.words(r).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(s).random(il).layout(),c=i.size(),u=c[0]>>1,h=c[1]>>1,d=l.length;for(let e,t,n=0;n<d;++n)e=l[n],t=e.datum,t[o[0]]=e.x+u,t[o[1]]=e.y+h,t[o[2]]=e.font,t[o[3]]=e.size,t[o[4]]=e.style,t[o[5]]=e.weight,t[o[6]]=e.rotate;return t.reflow(n).modifies(o)}});const _I=bI(yI),xI=_I.right,wI=_I.left;bI((function(e){return null===e?NaN:+e})).center;const AI=e=>new Uint8Array(e),kI=e=>new Uint16Array(e),TI=e=>new Uint32Array(e);function SI(e,t,n){const r=(t<257?AI:t<65537?kI:TI)(e);return n&&r.set(n),r}function EI(e,t,n){const r=1<<t;return{one:r,zero:~r,range:n.slice(),bisect:e.bisect,index:e.index,size:e.size,onAdd(e,t){const n=this,i=n.bisect(n.range,e.value),o=e.index,a=i[0],s=i[1],l=o.length;let c;for(c=0;c<a;++c)t[o[c]]|=r;for(c=s;c<l;++c)t[o[c]]|=r;return n}}}function CI(){let e=TI(0),t=[],n=0;return{insert:function(r,i,o){if(!i.length)return[];const a=n,s=i.length,l=TI(s);let c,u,h,d=Array(s);for(h=0;h<s;++h)d[h]=r(i[h]),l[h]=h;if(d=function(e,t){return e.sort.call(t,((t,n)=>{const r=e[t],i=e[n];return r<i?-1:r>i?1:0})),function(e,t){return Array.from(t,(t=>e[t]))}(e,t)}(d,l),a)c=t,u=e,t=Array(a+s),e=TI(a+s),function(e,t,n,r,i,o,a,s,l){let c,u=0,h=0;for(c=0;u<r&&h<a;++c)t[u]<i[h]?(s[c]=t[u],l[c]=n[u++]):(s[c]=i[h],l[c]=o[h++]+e);for(;u<r;++u,++c)s[c]=t[u],l[c]=n[u];for(;h<a;++h,++c)s[c]=i[h],l[c]=o[h]+e}(o,c,u,a,d,l,s,t,e);else{if(o>0)for(h=0;h<s;++h)l[h]+=o;t=d,e=l}return n=a+s,{index:l,value:d}},remove:function(r,i){const o=n;let a,s,l;for(s=0;!i[e[s]]&&s<o;++s);for(l=s;s<o;++s)i[a=e[s]]||(e[l]=a,t[l]=t[s],++l);n=o-r},bisect:function(e,r){let i;return r?i=r.length:(r=t,i=n),[wI(r,e[0],0,i),xI(r,e[1],0,i)]},reindex:function(t){for(let r=0,i=n;r<i;++r)e[r]=t[e[r]]},index:()=>e,size:()=>n}}function MI(e){Us.call(this,function(){let e=8,t=[],n=TI(0),r=SI(0,e),i=SI(0,e);return{data:()=>t,seen:()=>n=function(e,t,n){return e.length>=t?e:((n=n||new e.constructor(t)).set(e),n)}(n,t.length),add(e){for(let n,r=0,i=t.length,o=e.length;r<o;++r)n=e[r],n._index=i++,t.push(n)},remove(e,n){const o=t.length,a=Array(o-e),s=t;let l,c,u;for(c=0;!n[c]&&c<o;++c)a[c]=t[c],s[c]=c;for(u=c;c<o;++c)l=t[c],n[c]?s[c]=-1:(s[c]=u,r[u]=r[c],i[u]=i[c],a[u]=l,l._index=u++),r[c]=0;return t=a,s},size:()=>t.length,curr:()=>r,prev:()=>i,reset:e=>i[e]=r[e],all:()=>e<257?255:e<65537?65535:4294967295,set(e,t){r[e]|=t},clear(e,t){r[e]&=~t},resize(t,n){(t>r.length||n>e)&&(e=Math.max(n,e),r=SI(t,e,r),i=SI(t,e))}}}(),e),this._indices=null,this._dims=null}function OI(e){Us.call(this,null,e)}MI.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},ut(MI,Us,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some((e=>t.modified(e.fields)))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const n=e.fields,r=e.query,i=this._indices={},o=this._dims=[],a=r.length;let s,l,c=0;for(;c<a;++c)s=n[c].fname,l=i[s]||(i[s]=CI()),o.push(EI(l,c,r[c]));return this.eval(e,t)},reinit(e,t){const n=t.materialize().fork(),r=e.fields,i=e.query,o=this._indices,a=this._dims,s=this.value,l=s.curr(),c=s.prev(),u=s.all(),h=n.rem=n.add,d=n.mod,f=i.length,p={};let g,m,v,y,b,_,x,w,A;if(c.set(l),t.rem.length&&(b=this.remove(e,t,n)),t.add.length&&s.add(t.add),t.mod.length)for(_={},y=t.mod,x=0,w=y.length;x<w;++x)_[y[x]._index]=1;for(x=0;x<f;++x)A=r[x],(!a[x]||e.modified("fields",x)||t.modified(A.fields))&&(v=A.fname,(g=p[v])||(o[v]=m=CI(),p[v]=g=m.insert(A,t.source,0)),a[x]=EI(m,x,i[x]).onAdd(g,l));for(x=0,w=s.data().length;x<w;++x)b[x]||(c[x]!==l[x]?h.push(x):_[x]&&l[x]!==u&&d.push(x));return s.mask=(1<<f)-1,n},eval(e,t){const n=t.materialize().fork(),r=this._dims.length;let i=0;return t.rem.length&&(this.remove(e,t,n),i|=(1<<r)-1),e.modified("query")&&!e.modified("fields")&&(i|=this.update(e,t,n)),t.add.length&&(this.insert(e,t,n),i|=(1<<r)-1),t.mod.length&&(this.modify(t,n),i|=(1<<r)-1),this.value.mask=i,n},insert(e,t,n){const r=t.add,i=this.value,o=this._dims,a=this._indices,s=e.fields,l={},c=n.add,u=i.size()+r.length,h=o.length;let d,f,p,g=i.size();i.resize(u,h),i.add(r);const m=i.curr(),v=i.prev(),y=i.all();for(d=0;d<h;++d)f=s[d].fname,p=l[f]||(l[f]=a[f].insert(s[d],r,g)),o[d].onAdd(p,m);for(;g<u;++g)v[g]=y,m[g]!==y&&c.push(g)},modify(e,t){const n=t.mod,r=this.value,i=r.curr(),o=r.all(),a=e.mod;let s,l,c;for(s=0,l=a.length;s<l;++s)c=a[s]._index,i[c]!==o&&n.push(c)},remove(e,t,n){const r=this._indices,i=this.value,o=i.curr(),a=i.prev(),s=i.all(),l={},c=n.rem,u=t.rem;let h,d,f,p;for(h=0,d=u.length;h<d;++h)f=u[h]._index,l[f]=1,a[f]=p=o[f],o[f]=s,p!==s&&c.push(f);for(f in r)r[f].remove(d,l);return this.reindex(t,d,l),l},reindex(e,t,n){const r=this._indices,i=this.value;e.runAfter((()=>{const e=i.remove(t,n);for(const t in r)r[t].reindex(e)}))},update(e,t,n){const r=this._dims,i=e.query,o=t.stamp,a=r.length;let s,l,c=0;for(n.filters=0,l=0;l<a;++l)e.modified("query",l)&&(s=l,++c);if(1===c)c=r[s].one,this.incrementOne(r[s],i[s],n.add,n.rem);else for(l=0,c=0;l<a;++l)e.modified("query",l)&&(c|=r[l].one,this.incrementAll(r[l],i[l],o,n.add),n.rem=n.add);return c},incrementAll(e,t,n,r){const i=this.value,o=i.seen(),a=i.curr(),s=i.prev(),l=e.index(),c=e.bisect(e.range),u=e.bisect(t),h=u[0],d=u[1],f=c[0],p=c[1],g=e.one;let m,v,y;if(h<f)for(m=h,v=Math.min(f,d);m<v;++m)y=l[m],o[y]!==n&&(s[y]=a[y],o[y]=n,r.push(y)),a[y]^=g;else if(h>f)for(m=f,v=Math.min(h,p);m<v;++m)y=l[m],o[y]!==n&&(s[y]=a[y],o[y]=n,r.push(y)),a[y]^=g;if(d>p)for(m=Math.max(h,p),v=d;m<v;++m)y=l[m],o[y]!==n&&(s[y]=a[y],o[y]=n,r.push(y)),a[y]^=g;else if(d<p)for(m=Math.max(f,d),v=p;m<v;++m)y=l[m],o[y]!==n&&(s[y]=a[y],o[y]=n,r.push(y)),a[y]^=g;e.range=t.slice()},incrementOne(e,t,n,r){const i=this.value.curr(),o=e.index(),a=e.bisect(e.range),s=e.bisect(t),l=s[0],c=s[1],u=a[0],h=a[1],d=e.one;let f,p,g;if(l<u)for(f=l,p=Math.min(u,c);f<p;++f)g=o[f],i[g]^=d,n.push(g);else if(l>u)for(f=u,p=Math.min(l,h);f<p;++f)g=o[f],i[g]^=d,r.push(g);if(c>h)for(f=Math.max(l,h),p=c;f<p;++f)g=o[f],i[g]^=d,n.push(g);else if(c<h)for(f=Math.max(u,c),p=h;f<p;++f)g=o[f],i[g]^=d,r.push(g);e.range=t.slice()}}),OI.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:!0,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:!0,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]},ut(OI,Us,{transform(e,t){const n=~(e.ignore||0),r=e.filter,i=r.mask;if(0==(i&n))return t.StopPropagation;const o=t.fork(t.ALL),a=r.data(),s=r.curr(),l=r.prev(),c=e=>s[e]&n?null:a[e];return o.filter(o.MOD,c),i&i-1?(o.filter(o.ADD,(e=>{const t=s[e]&n;return!t&&t^l[e]&n?a[e]:null})),o.filter(o.REM,(e=>{const t=s[e]&n;return!t||t^t^l[e]&n?null:a[e]}))):(o.filter(o.ADD,c),o.filter(o.REM,(e=>(s[e]&n)===i?a[e]:null))),o.filter(o.SOURCE,(e=>c(e._index)))}});var LI=Math.sqrt(50),DI=Math.sqrt(10),II=Math.sqrt(2);const RI="Literal",PI="CallExpression";function NI(e){this.type=e}var zI,FI,BI,jI,UI;NI.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=function(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case PI:return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];default:return[]}}(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1},(zI={})[1]="Boolean",zI[2]="<end>",zI[3]="Identifier",zI[4]="Keyword",zI[5]="Null",zI[6]="Numeric",zI[7]="Punctuator",zI[8]="String",zI[9]="RegularExpression";var VI="Identifier",qI="Unexpected token %0",HI="Invalid regular expression",$I="Invalid regular expression: missing /",WI="Octal literals are not allowed in strict mode.",GI="ILLEGAL",YI="Disabled.",XI=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),ZI=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function KI(e,t){if(!e)throw new Error("ASSERT: "+t)}function JI(e){return e>=48&&e<=57}function QI(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function eR(e){return"01234567".indexOf(e)>=0}function tR(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function nR(e){return 10===e||13===e||8232===e||8233===e}function rR(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&XI.test(String.fromCharCode(e))}function iR(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&ZI.test(String.fromCharCode(e))}const oR={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function aR(){for(;BI<jI;){const e=FI.charCodeAt(BI);if(!tR(e)&&!nR(e))break;++BI}}function sR(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t)BI<jI&&QI(FI[BI])?(r=FI[BI++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())):xR({},qI,GI);return String.fromCharCode(i)}function lR(){var e,t,n,r;for(t=0,"}"===(e=FI[BI])&&xR({},qI,GI);BI<jI&&QI(e=FI[BI++]);)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&xR({},qI,GI),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),r=56320+(t-65536&1023),String.fromCharCode(n,r))}function cR(){var e,t;for(e=FI.charCodeAt(BI++),t=String.fromCharCode(e),92===e&&(117!==FI.charCodeAt(BI)&&xR({},qI,GI),++BI,(e=sR("u"))&&"\\"!==e&&rR(e.charCodeAt(0))||xR({},qI,GI),t=e);BI<jI&&iR(e=FI.charCodeAt(BI));)++BI,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==FI.charCodeAt(BI)&&xR({},qI,GI),++BI,(e=sR("u"))&&"\\"!==e&&iR(e.charCodeAt(0))||xR({},qI,GI),t+=e);return t}function uR(){var e,t,n,r,i=BI,o=FI.charCodeAt(BI),a=FI[BI];switch(o){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++BI,{type:7,value:String.fromCharCode(o),start:i,end:BI};default:if(61===(e=FI.charCodeAt(BI+1)))switch(o){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return BI+=2,{type:7,value:String.fromCharCode(o)+String.fromCharCode(e),start:i,end:BI};case 33:case 61:return BI+=2,61===FI.charCodeAt(BI)&&++BI,{type:7,value:FI.slice(i,BI),start:i,end:BI}}}return">>>="===(r=FI.substr(BI,4))?{type:7,value:r,start:i,end:BI+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:7,value:n,start:i,end:BI+=3}:a===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(a)>=0||"=>"===t?{type:7,value:t,start:i,end:BI+=2}:("//"===t&&xR({},qI,GI),"<>=!+-*%&|^/".indexOf(a)>=0?{type:7,value:a,start:i,end:++BI}:void xR({},qI,GI))}function hR(){var e,t,n;if(KI(JI((n=FI[BI]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=BI,e="","."!==n){if(e=FI[BI++],n=FI[BI],"0"===e){if("x"===n||"X"===n)return++BI,function(e){let t="";for(;BI<jI&&QI(FI[BI]);)t+=FI[BI++];return 0===t.length&&xR({},qI,GI),rR(FI.charCodeAt(BI))&&xR({},qI,GI),{type:6,value:parseInt("0x"+t,16),start:e,end:BI}}(t);if(eR(n))return function(e){let t="0"+FI[BI++];for(;BI<jI&&eR(FI[BI]);)t+=FI[BI++];return(rR(FI.charCodeAt(BI))||JI(FI.charCodeAt(BI)))&&xR({},qI,GI),{type:6,value:parseInt(t,8),octal:!0,start:e,end:BI}}(t);n&&JI(n.charCodeAt(0))&&xR({},qI,GI)}for(;JI(FI.charCodeAt(BI));)e+=FI[BI++];n=FI[BI]}if("."===n){for(e+=FI[BI++];JI(FI.charCodeAt(BI));)e+=FI[BI++];n=FI[BI]}if("e"===n||"E"===n)if(e+=FI[BI++],"+"!==(n=FI[BI])&&"-"!==n||(e+=FI[BI++]),JI(FI.charCodeAt(BI)))for(;JI(FI.charCodeAt(BI));)e+=FI[BI++];else xR({},qI,GI);return rR(FI.charCodeAt(BI))&&xR({},qI,GI),{type:6,value:parseFloat(e),start:t,end:BI}}function dR(){if(aR(),BI>=jI)return{type:2,start:BI,end:BI};const e=FI.charCodeAt(BI);return rR(e)?function(){var e,t;return e=BI,t=92===FI.charCodeAt(BI)?cR():function(){var e,t;for(e=BI++;BI<jI;){if(92===(t=FI.charCodeAt(BI)))return BI=e,cR();if(!iR(t))break;++BI}return FI.slice(e,BI)}(),{type:1===t.length?3:oR.hasOwnProperty(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,value:t,start:e,end:BI}}():40===e||41===e||59===e?uR():39===e||34===e?function(){var e,t,n,r,i="",o=!1;for(KI("'"===(e=FI[BI])||'"'===e,"String literal must starts with a quote"),t=BI,++BI;BI<jI;){if((n=FI[BI++])===e){e="";break}if("\\"===n)if((n=FI[BI++])&&nR(n.charCodeAt(0)))"\r"===n&&"\n"===FI[BI]&&++BI;else switch(n){case"u":case"x":"{"===FI[BI]?(++BI,i+=lR()):i+=sR(n);break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;default:eR(n)?(0!==(r="01234567".indexOf(n))&&(o=!0),BI<jI&&eR(FI[BI])&&(o=!0,r=8*r+"01234567".indexOf(FI[BI++]),"0123".indexOf(n)>=0&&BI<jI&&eR(FI[BI])&&(r=8*r+"01234567".indexOf(FI[BI++]))),i+=String.fromCharCode(r)):i+=n}else{if(nR(n.charCodeAt(0)))break;i+=n}}return""!==e&&xR({},qI,GI),{type:8,value:i,octal:o,start:t,end:BI}}():46===e?JI(FI.charCodeAt(BI+1))?hR():uR():JI(e)?hR():uR()}function fR(){const e=UI;return BI=e.end,UI=dR(),BI=e.end,e}function pR(){const e=BI;UI=dR(),BI=e}function gR(e,t,n){const r=new NI("||"===e||"&&"===e?"LogicalExpression":"BinaryExpression");return r.operator=e,r.left=t,r.right=n,r}function mR(e,t){const n=new NI("CallExpression");return n.callee=e,n.arguments=t,n}function vR(e){const t=new NI(VI);return t.name=e,t}function yR(e){const t=new NI("Literal");return t.value=e.value,t.raw=FI.slice(e.start,e.end),e.regex&&("//"===t.raw&&(t.raw="/(?:)/"),t.regex=e.regex),t}function bR(e,t,n){const r=new NI("MemberExpression");return r.computed="["===e,r.object=t,r.property=n,r.computed||(n.member=!0),r}function _R(e,t,n){const r=new NI("Property");return r.key=t,r.value=n,r.kind=e,r}function xR(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,((e,t)=>(KI(t<r.length,"Message reference must be in range"),r[t])));throw(n=new Error(i)).index=BI,n.description=i,n}function wR(e){2===e.type&&xR(e,"Unexpected end of input"),6===e.type&&xR(e,"Unexpected number"),8===e.type&&xR(e,"Unexpected string"),3===e.type&&xR(e,"Unexpected identifier"),4===e.type&&xR(e,"Unexpected reserved word"),xR(e,qI,e.value)}function AR(e){const t=fR();7===t.type&&t.value===e||wR(t)}function kR(e){return 7===UI.type&&UI.value===e}function TR(e){return 4===UI.type&&UI.value===e}function SR(){BI=UI.start;const e=fR();return 8===e.type||6===e.type?(e.octal&&xR(e,WI),yR(e)):vR(e.value)}function ER(){var e,t,n;return BI=UI.start,3===(e=UI).type?(n=SR(),AR(":"),_R("init",n,PR())):2!==e.type&&7!==e.type?(t=SR(),AR(":"),_R("init",t,PR())):void wR(e)}const CR={if:1};function MR(){var e,t,n;if(kR("("))return function(){AR("(");const e=NR();return AR(")"),e}();if(kR("["))return function(){const e=[];for(BI=UI.start,AR("[");!kR("]");)kR(",")?(fR(),e.push(null)):(e.push(PR()),kR("]")||AR(","));return fR(),function(e){const t=new NI("ArrayExpression");return t.elements=e,t}(e)}();if(kR("{"))return function(){var e,t,n=[],r={},i=String;for(BI=UI.start,AR("{");!kR("}");)t="$"+((e=ER()).key.type===VI?e.key.name:i(e.key.value)),Object.prototype.hasOwnProperty.call(r,t)?xR({},"Duplicate data property in object literal not allowed in strict mode"):r[t]=!0,n.push(e),kR("}")||AR(",");return AR("}"),function(e){const t=new NI("ObjectExpression");return t.properties=e,t}(n)}();if(e=UI.type,BI=UI.start,3===e||CR[UI.value])n=vR(fR().value);else if(8===e||6===e)UI.octal&&xR(UI,WI),n=yR(fR());else{if(4===e)throw new Error(YI);1===e?((t=fR()).value="true"===t.value,n=yR(t)):5===e?((t=fR()).value=null,n=yR(t)):kR("/")||kR("/=")?(n=yR(function(){var e,t,n,r;return UI=null,aR(),e=BI,t=function(){var e,t,n,r;for(KI("/"===(e=FI[BI]),"Regular expression literal must start with a slash"),t=FI[BI++],n=!1,r=!1;BI<jI;)if(t+=e=FI[BI++],"\\"===e)nR((e=FI[BI++]).charCodeAt(0))&&xR({},$I),t+=e;else if(nR(e.charCodeAt(0)))xR({},$I);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||xR({},$I),{value:t.substr(1,t.length-2),literal:t}}(),n=function(){var e,t,n;for(t="",n="";BI<jI&&iR((e=FI[BI]).charCodeAt(0));)++BI,"\\"===e&&BI<jI?xR({},qI,GI):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&xR({},HI,n),{value:n,literal:t}}(),r=function(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";xR({},HI)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(e){xR({},HI)}try{return new RegExp(e,t)}catch(e){return null}}(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:BI}}()),pR()):wR(fR())}return n}function OR(){const e=[];if(AR("("),!kR(")"))for(;BI<jI&&(e.push(PR()),!kR(")"));)AR(",");return AR(")"),e}function LR(){AR("[");const e=NR();return AR("]"),e}function DR(){const e=function(){var e;for(e=MR();;)if(kR("."))e=bR(".",e,(AR("."),function(){BI=UI.start;const e=fR();return function(e){return 3===e.type||4===e.type||1===e.type||5===e.type}(e)||wR(e),vR(e.value)}()));else if(kR("("))e=mR(e,OR());else{if(!kR("["))break;e=bR("[",e,LR())}return e}();if(7===UI.type&&(kR("++")||kR("--")))throw new Error(YI);return e}function IR(){var e,t;if(7!==UI.type&&4!==UI.type)t=DR();else{if(kR("++")||kR("--"))throw new Error(YI);if(kR("+")||kR("-")||kR("~")||kR("!"))e=fR(),t=IR(),t=function(e,t){const n=new NI("UnaryExpression");return n.operator=e,n.argument=t,n.prefix=!0,n}(e.value,t);else{if(TR("delete")||TR("void")||TR("typeof"))throw new Error(YI);t=DR()}}return t}function RR(e){let t=0;if(7!==e.type&&4!==e.type)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function PR(){var e,t;return e=function(){var e,t,n,r,i,o,a,s,l,c;if(e=UI,l=IR(),0===(i=RR(r=UI)))return l;for(r.prec=i,fR(),t=[e,UI],o=[l,r,a=IR()];(i=RR(UI))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,l=o.pop(),t.pop(),n=gR(s,l,a),o.push(n);(r=fR()).prec=i,o.push(r),t.push(UI),n=IR(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)t.pop(),n=gR(o[c-1].value,o[c-2],n),c-=2;return n}(),kR("?")&&(fR(),t=PR(),AR(":"),e=function(e,t,n){const r=new NI("ConditionalExpression");return r.test=e,r.consequent=t,r.alternate=n,r}(e,t,PR())),e}function NR(){const e=PR();if(kR(","))throw new Error(YI);return e}function zR(e){BI=0,jI=(FI=e).length,UI=null,pR();const t=NR();if(2!==UI.type)throw new Error("Unexpect token after expression.");return t}var FR={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function BR(e){function t(t,n,r){return i=>function(t,n,r,i){let o=e(n[0]);return r&&(o=r+"("+o+")",0===r.lastIndexOf("new ",0)&&(o="("+o+")")),o+"."+t+(i<0?"":0===i?"()":"("+n.slice(1).map(e).join(",")+")")}(t,i,n,r)}const n="new Date",r="String",i="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&oe("Missing arguments to clamp function."),t.length>3&&oe("Too many arguments to clamp function.");const n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:t("getDate",n,0),day:t("getDay",n,0),year:t("getFullYear",n,0),month:t("getMonth",n,0),hours:t("getHours",n,0),minutes:t("getMinutes",n,0),seconds:t("getSeconds",n,0),milliseconds:t("getMilliseconds",n,0),time:t("getTime",n,0),timezoneoffset:t("getTimezoneOffset",n,0),utcdate:t("getUTCDate",n,0),utcday:t("getUTCDay",n,0),utcyear:t("getUTCFullYear",n,0),utcmonth:t("getUTCMonth",n,0),utchours:t("getUTCHours",n,0),utcminutes:t("getUTCMinutes",n,0),utcseconds:t("getUTCSeconds",n,0),utcmilliseconds:t("getUTCMilliseconds",n,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",r,0),lower:t("toLowerCase",r,0),substring:t("substring",r),split:t("split",r),trim:t("trim",r,0),regexp:i,test:t("test",i),if:function(t){t.length<3&&oe("Missing arguments to if function."),t.length>3&&oe("Too many arguments to if function.");const n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}function jR(e){const t=(e=e||{}).allowed?Ot(e.allowed):{},n=e.forbidden?Ot(e.forbidden):{},r=e.constants||FR,i=(e.functions||BR)(h),o=e.globalvar,a=e.fieldvar,s=Ye(o)?o:e=>`${o}["${e}"]`;let l={},c={},u=0;function h(e){if(vt(e))return e;const t=d[e.type];return null==t&&oe("Unsupported type: "+e.type),t(e)}const d={Literal:e=>e.raw,Identifier:e=>{const i=e.name;return u>0?i:at(n,i)?oe("Illegal identifier: "+i):at(r,i)?r[i]:at(t,i)?i:(l[i]=1,s(i))},MemberExpression:e=>{const t=!e.computed,n=h(e.object);t&&(u+=1);const r=h(e.property);return n===a&&(c[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(r)]=1),t&&(u-=1),n+(t?"."+r:"["+r+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&oe("Illegal callee type: "+e.callee.type);const t=e.callee.name,n=e.arguments,r=at(i,t)&&i[t];return r||oe("Unrecognized function: "+t),Ye(r)?r(n):r+"("+n.map(h).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(h).join(",")+"]",BinaryExpression:e=>"("+h(e.left)+" "+e.operator+" "+h(e.right)+")",UnaryExpression:e=>"("+e.operator+h(e.argument)+")",ConditionalExpression:e=>"("+h(e.test)+"?"+h(e.consequent)+":"+h(e.alternate)+")",LogicalExpression:e=>"("+h(e.left)+e.operator+h(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(h).join(",")+"}",Property:e=>{u+=1;const t=h(e.key);return u-=1,t+":"+h(e.value)}};function f(e){const t={code:h(e),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},t}return f.functions=i,f.constants=r,f}class UR{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}var VR=1e-6,qR=Math.PI,HR=qR/2,$R=qR/4,WR=2*qR,GR=180/qR,YR=qR/180,XR=Math.abs,ZR=(Math.atan,Math.atan2),KR=Math.cos,JR=(Math.ceil,Math.exp,Math.floor,Math.hypot),QR=(Math.log,Math.pow,Math.sin),eP=(Math.sign,Math.sqrt);function tP(e){return e>1?HR:e<-1?-HR:Math.asin(e)}function nP(){}function rP(e,t){e&&oP.hasOwnProperty(e.type)&&oP[e.type](e,t)}Math.tan;var iP={Feature:function(e,t){rP(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)rP(n[r].geometry,t)}},oP={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){aP(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)aP(n[r],t,0)},Polygon:function(e,t){sP(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)sP(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)rP(n[r],t)}};function aP(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function sP(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)aP(e[n],t,1);t.polygonEnd()}function lP(e,t){e&&iP.hasOwnProperty(e.type)?iP[e.type](e,t):rP(e,t)}var cP,uP,hP,dP,fP,pP,gP,mP,vP,yP,bP,_P,xP,wP,AP,kP,TP=new UR,SP=new UR,EP={point:nP,lineStart:nP,lineEnd:nP,polygonStart:function(){TP=new UR,EP.lineStart=CP,EP.lineEnd=MP},polygonEnd:function(){var e=+TP;SP.add(e<0?WR+e:e),this.lineStart=this.lineEnd=this.point=nP},sphere:function(){SP.add(WR)}};function CP(){EP.point=OP}function MP(){LP(cP,uP)}function OP(e,t){EP.point=LP,cP=e,uP=t,hP=e*=YR,dP=KR(t=(t*=YR)/2+$R),fP=QR(t)}function LP(e,t){var n=(e*=YR)-hP,r=n>=0?1:-1,i=r*n,o=KR(t=(t*=YR)/2+$R),a=QR(t),s=fP*a,l=dP*o+s*KR(i),c=s*r*QR(i);TP.add(ZR(c,l)),hP=e,dP=o,fP=a}function DP(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}var IP,RP,PP,NP,zP,FP,BP,jP,UP,VP,qP,HP,$P,WP,GP,YP,XP={point:ZP,lineStart:JP,lineEnd:QP,polygonStart:function(){XP.point=eN,XP.lineStart=tN,XP.lineEnd=nN,wP=new UR,EP.polygonStart()},polygonEnd:function(){EP.polygonEnd(),XP.point=ZP,XP.lineStart=JP,XP.lineEnd=QP,TP<0?(pP=-(mP=180),gP=-(vP=90)):wP>VR?vP=90:wP<-1e-6&&(gP=-90),kP[0]=pP,kP[1]=mP},sphere:function(){pP=-(mP=180),gP=-(vP=90)}};function ZP(e,t){AP.push(kP=[pP=e,mP=e]),t<gP&&(gP=t),t>vP&&(vP=t)}function KP(e,t){var n,r,i=function(e){var t=e[0],n=e[1],r=KR(n);return[r*KR(t),r*QR(t),QR(n)]}([e*YR,t*YR]);if(xP){var o=DP(xP,i),a=DP([o[1],-o[0],0],o);r=eP((n=a)[0]*n[0]+n[1]*n[1]+n[2]*n[2]),n[0]/=r,n[1]/=r,n[2]/=r,a=function(e){return[ZR(e[1],e[0]),tP(e[2])]}(a);var s,l=e-yP,c=l>0?1:-1,u=a[0]*GR*c,h=XR(l)>180;h^(c*yP<u&&u<c*e)?(s=a[1]*GR)>vP&&(vP=s):h^(c*yP<(u=(u+360)%360-180)&&u<c*e)?(s=-a[1]*GR)<gP&&(gP=s):(t<gP&&(gP=t),t>vP&&(vP=t)),h?e<yP?rN(pP,e)>rN(pP,mP)&&(mP=e):rN(e,mP)>rN(pP,mP)&&(pP=e):mP>=pP?(e<pP&&(pP=e),e>mP&&(mP=e)):e>yP?rN(pP,e)>rN(pP,mP)&&(mP=e):rN(e,mP)>rN(pP,mP)&&(pP=e)}else AP.push(kP=[pP=e,mP=e]);t<gP&&(gP=t),t>vP&&(vP=t),xP=i,yP=e}function JP(){XP.point=KP}function QP(){kP[0]=pP,kP[1]=mP,XP.point=ZP,xP=null}function eN(e,t){if(xP){var n=e-yP;wP.add(XR(n)>180?n+(n>0?360:-360):n)}else bP=e,_P=t;EP.point(e,t),KP(e,t)}function tN(){EP.lineStart()}function nN(){eN(bP,_P),EP.lineEnd(),XR(wP)>VR&&(pP=-(mP=180)),kP[0]=pP,kP[1]=mP,xP=null}function rN(e,t){return(t-=e)<0?t+360:t}function iN(e,t){return e[0]-t[0]}function oN(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var aN={sphere:nP,point:sN,lineStart:cN,lineEnd:dN,polygonStart:function(){aN.lineStart=fN,aN.lineEnd=pN},polygonEnd:function(){aN.lineStart=cN,aN.lineEnd=dN}};function sN(e,t){e*=YR;var n=KR(t*=YR);lN(n*KR(e),n*QR(e),QR(t))}function lN(e,t,n){++IP,PP+=(e-PP)/IP,NP+=(t-NP)/IP,zP+=(n-zP)/IP}function cN(){aN.point=uN}function uN(e,t){e*=YR;var n=KR(t*=YR);WP=n*KR(e),GP=n*QR(e),YP=QR(t),aN.point=hN,lN(WP,GP,YP)}function hN(e,t){e*=YR;var n=KR(t*=YR),r=n*KR(e),i=n*QR(e),o=QR(t),a=ZR(eP((a=GP*o-YP*i)*a+(a=YP*r-WP*o)*a+(a=WP*i-GP*r)*a),WP*r+GP*i+YP*o);RP+=a,FP+=a*(WP+(WP=r)),BP+=a*(GP+(GP=i)),jP+=a*(YP+(YP=o)),lN(WP,GP,YP)}function dN(){aN.point=sN}function fN(){aN.point=gN}function pN(){mN(HP,$P),aN.point=sN}function gN(e,t){HP=e,$P=t,e*=YR,t*=YR,aN.point=mN;var n=KR(t);WP=n*KR(e),GP=n*QR(e),YP=QR(t),lN(WP,GP,YP)}function mN(e,t){e*=YR;var n=KR(t*=YR),r=n*KR(e),i=n*QR(e),o=QR(t),a=GP*o-YP*i,s=YP*r-WP*o,l=WP*i-GP*r,c=JR(a,s,l),u=tP(c),h=c&&-u/c;UP.add(h*a),VP.add(h*s),qP.add(h*l),RP+=u,FP+=u*(WP+(WP=r)),BP+=u*(GP+(GP=i)),jP+=u*(YP+(YP=o)),lN(WP,GP,YP)}function vN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bN(){}var _N=.7,xN=1.4285714285714286,wN="\\s*([+-]?\\d+)\\s*",AN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",kN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TN=/^#([0-9a-f]{3,8})$/,SN=new RegExp("^rgb\\("+[wN,wN,wN]+"\\)$"),EN=new RegExp("^rgb\\("+[kN,kN,kN]+"\\)$"),CN=new RegExp("^rgba\\("+[wN,wN,wN,AN]+"\\)$"),MN=new RegExp("^rgba\\("+[kN,kN,kN,AN]+"\\)$"),ON=new RegExp("^hsl\\("+[AN,kN,kN]+"\\)$"),LN=new RegExp("^hsla\\("+[AN,kN,kN,AN]+"\\)$"),DN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function IN(){return this.rgb().formatHex()}function RN(){return this.rgb().formatRgb()}function PN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=TN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?NN(t):3===n?new jN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?zN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?zN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SN.exec(e))?new jN(t[1],t[2],t[3],1):(t=EN.exec(e))?new jN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=CN.exec(e))?zN(t[1],t[2],t[3],t[4]):(t=MN.exec(e))?zN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ON.exec(e))?HN(t[1],t[2]/100,t[3]/100,1):(t=LN.exec(e))?HN(t[1],t[2]/100,t[3]/100,t[4]):DN.hasOwnProperty(e)?NN(DN[e]):"transparent"===e?new jN(NaN,NaN,NaN,0):null}function NN(e){return new jN(e>>16&255,e>>8&255,255&e,1)}function zN(e,t,n,r){return r<=0&&(e=t=n=NaN),new jN(e,t,n,r)}function FN(e){return e instanceof bN||(e=PN(e)),e?new jN((e=e.rgb()).r,e.g,e.b,e.opacity):new jN}function BN(e,t,n,r){return 1===arguments.length?FN(e):new jN(e,t,n,null==r?1:r)}function jN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function UN(){return"#"+qN(this.r)+qN(this.g)+qN(this.b)}function VN(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function qN(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function HN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new GN(e,t,n,r)}function $N(e){if(e instanceof GN)return new GN(e.h,e.s,e.l,e.opacity);if(e instanceof bN||(e=PN(e)),!e)return new GN;if(e instanceof GN)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new GN(a,s,l,e.opacity)}function WN(e,t,n,r){return 1===arguments.length?$N(e):new GN(e,t,n,null==r?1:r)}function GN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function YN(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}vN(bN,PN,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:IN,formatHex:IN,formatHsl:function(){return $N(this).formatHsl()},formatRgb:RN,toString:RN}),vN(jN,BN,yN(bN,{brighter:function(e){return e=null==e?xN:Math.pow(xN,e),new jN(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?_N:Math.pow(_N,e),new jN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UN,formatHex:UN,formatRgb:VN,toString:VN})),vN(GN,WN,yN(bN,{brighter:function(e){return e=null==e?xN:Math.pow(xN,e),new GN(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?_N:Math.pow(_N,e),new GN(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new jN(YN(e>=240?e-240:e+120,i,r),YN(e,i,r),YN(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const XN=Math.PI/180,ZN=180/Math.PI,KN=.96422,JN=.82521,QN=4/29,ez=.12841854934601665;function tz(e){if(e instanceof rz)return new rz(e.l,e.a,e.b,e.opacity);if(e instanceof uz)return hz(e);e instanceof jN||(e=FN(e));var t,n,r=sz(e.r),i=sz(e.g),o=sz(e.b),a=iz((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=iz((.4360747*r+.3850649*i+.1430804*o)/KN),n=iz((.0139322*r+.0971045*i+.7141733*o)/JN)),new rz(116*a-16,500*(t-a),200*(a-n),e.opacity)}function nz(e,t,n,r){return 1===arguments.length?tz(e):new rz(e,t,n,null==r?1:r)}function rz(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function iz(e){return e>.008856451679035631?Math.pow(e,1/3):e/ez+QN}function oz(e){return e>.20689655172413793?e*e*e:ez*(e-QN)}function az(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function sz(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lz(e){if(e instanceof uz)return new uz(e.h,e.c,e.l,e.opacity);if(e instanceof rz||(e=tz(e)),0===e.a&&0===e.b)return new uz(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ZN;return new uz(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function cz(e,t,n,r){return 1===arguments.length?lz(e):new uz(e,t,n,null==r?1:r)}function uz(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function hz(e){if(isNaN(e.h))return new rz(e.l,0,0,e.opacity);var t=e.h*XN;return new rz(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}vN(rz,nz,yN(bN,{brighter:function(e){return new rz(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new rz(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new jN(az(3.1338561*(t=KN*oz(t))-1.6168667*(e=1*oz(e))-.4906146*(n=JN*oz(n))),az(-.9787684*t+1.9161415*e+.033454*n),az(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),vN(uz,cz,yN(bN,{brighter:function(e){return new uz(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new uz(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return hz(this).rgb()}}));const dz="intersect",fz="union",pz="index:unit";function gz(e,t){for(var n,r,i=t.fields,o=t.values,a=i.length,s=0;s<a;++s)if((r=i[s]).getter=se.getter||se(r.field),ft(n=r.getter(e))&&(n=Ce(n)),ft(o[s])&&(o[s]=Ce(o[s])),ft(o[s][0])&&(o[s]=o[s].map(Ce)),"E"===r.type){if(xe(o[s])?o[s].indexOf(n)<0:n!==o[s])return!1}else if("R"===r.type){if(!ht(n,o[s]))return!1}else if("R-RE"===r.type){if(!ht(n,o[s],!0,!1))return!1}else if("R-E"===r.type){if(!ht(n,o[s],!1,!1))return!1}else if("R-LE"===r.type&&!ht(n,o[s],!1,!0))return!1;return!0}const mz=se("_vgsid_"),vz=function(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){const o=r+i>>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}(mz),yz=vz.left,bz=vz.right;var _z={E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;n<r;++n)e.indexOf(t[n])<0&&e.push(t[n]);return e},E_intersect:function(e,t){return e.length?e.filter((e=>t.indexOf(e)>=0)):t},R_union:function(e,t){var n=Ce(t[0]),r=Ce(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]<r&&(e[1]=r),e):[n,r]},R_intersect:function(e,t){var n=Ce(t[0]),r=Ce(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?r<e[0]||e[1]<n?[]:(e[0]<n&&(e[0]=n),e[1]>r&&(e[1]=r),e):[n,r]}};function xz(e,t,n,r){t[0].type!==RI&&oe("First argument to selection functions must be a string literal.");const i=t[0].value,o=":"+i;(t.length>=2&&Ee(t).value)!==dz||at(r,"@unit")||(r["@unit"]=n.getData(i).indataRef(n,"unit")),at(r,o)||(r[o]=n.getData(i).tuplesRef())}function wz(e){const t=this.context.data[e];return t?t.values.value:[]}const Az=e=>function(t,n){return this.context.dataflow.locale()[e](n)(t)},kz=Az("format"),Tz=Az("timeFormat"),Sz=Az("utcFormat"),Ez=Az("timeParse"),Cz=Az("utcParse"),Mz=new Date(2e3,0,1);function Oz(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(Mz.setYear(2e3),Mz.setMonth(e),Mz.setDate(t),Tz.call(this,Mz,n)):""}function Lz(e,t,n,r){t[0].type!==RI&&oe("First argument to data functions must be a string literal.");const i=t[0].value,o=":"+i;if(!at(o,r))try{r[o]=n.getData(i).tuplesRef()}catch(e){}}function Dz(e,t,n,r){if(t[0].type===RI)Iz(n,r,t[0].value);else for(e in n.scales)Iz(n,r,e)}function Iz(e,t,n){const r="%"+n;if(!at(t,r))try{t[r]=e.scaleRef(n)}catch(e){}}function Rz(e,t){let n;return Ye(e)?e:vt(e)?(n=t.scales[e])&&n.value:void 0}function Pz(e,t){return function(n,r,i){if(n){const t=Rz(n,(i||this).context);return t&&t.path[e](r)}return t(r)}}const Nz=Pz("area",(function(e){return SP=new UR,lP(e,EP),2*SP})),zz=Pz("bounds",(function(e){var t,n,r,i,o,a,s;if(vP=mP=-(pP=gP=1/0),AP=[],lP(e,XP),n=AP.length){for(AP.sort(iN),t=1,o=[r=AP[0]];t<n;++t)oN(r,(i=AP[t])[0])||oN(r,i[1])?(rN(r[0],i[1])>rN(r[0],r[1])&&(r[1]=i[1]),rN(i[0],r[1])>rN(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=rN(r[1],i[0]))>a&&(a=s,pP=i[0],mP=r[1])}return AP=kP=null,pP===1/0||gP===1/0?[[NaN,NaN],[NaN,NaN]]:[[pP,gP],[mP,vP]]})),Fz=Pz("centroid",(function(e){IP=RP=PP=NP=zP=FP=BP=jP=0,UP=new UR,VP=new UR,qP=new UR,lP(e,aN);var t=+UP,n=+VP,r=+qP,i=JR(t,n,r);return i<1e-12&&(t=FP,n=BP,r=jP,RP<VR&&(t=PP,n=NP,r=zP),(i=JR(t,n,r))<1e-12)?[NaN,NaN]:[ZR(n,t)*GR,tP(r/i)*GR]}));function Bz(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(t){e.warn(t)}return n[n.length-1]}function jz(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Uz(e){const t=BN(e);return.2126*jz(t.r)+.7152*jz(t.g)+.0722*jz(t.b)}function Vz(e,t){return e===t||e!=e&&t!=t||(xe(e)?!(!xe(t)||e.length!==t.length)&&function(e,t){for(let n=0,r=e.length;n<r;++n)if(!Vz(e[n],t[n]))return!1;return!0}(e,t):!(!we(e)||!we(t))&&qz(e,t))}function qz(e,t){for(const n in e)if(!Vz(e[n],t[n]))return!1;return!0}function Hz(e){return t=>qz(e,t)}const $z={};function Wz(e){return xe(e)||ArrayBuffer.isView(e)?e:null}function Gz(e){return Wz(e)||(vt(e)?e:null)}const Yz=e=>e.data;function Xz(e,t){const n=wz.call(t,e);return n.root&&n.root.lookup||{}}const Zz=()=>"undefined"!=typeof window&&window||null,Kz={random:()=>il(),cumulativeNormal:gl,cumulativeLogNormal:xl,cumulativeUniform:El,densityNormal:pl,densityLogNormal:_l,densityUniform:Sl,quantileNormal:ml,quantileLogNormal:wl,quantileUniform:Cl,sampleNormal:fl,sampleLogNormal:bl,sampleUniform:Tl,isArray:xe,isBoolean:dt,isDate:ft,isDefined:e=>void 0!==e,isNumber:gt,isObject:we,isRegExp:mt,isString:vt,isTuple:ls,isValid:e=>null!=e&&e==e,toBoolean:St,toDate:Ct,toNumber:Ce,toString:Mt,indexof:function(e,...t){return Gz(e).indexOf(...t)},join:function(e,...t){return Wz(e).join(...t)},lastindexof:function(e,...t){return Gz(e).lastIndexOf(...t)},replace:function(e,t,n){return Ye(n)&&oe("Function argument passed to replace."),String(e).replace(t,n)},reverse:function(e){return Wz(e).slice().reverse()},slice:function(e,...t){return Gz(e).slice(...t)},flush:ct,lerp:bt,merge:function(){const e=[].slice.call(arguments);return e.unshift({}),nt(...e)},pad:At,peek:Ee,pluck:function(e,t){const n=$z[t]||($z[t]=se(t));return xe(e)?e.map(n):n(e)},span:kt,inrange:ht,truncate:Lt,rgb:BN,lab:nz,hcl:cz,hsl:WN,luminance:Uz,contrast:function(e,t){const n=Uz(e),r=Uz(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},sequence:function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o},format:kz,utcFormat:Sz,utcParse:Cz,utcOffset:ei,utcSequence:ri,timeFormat:Tz,timeParse:Ez,timeOffset:Qr,timeSequence:ni,timeUnitSpecifier:Tr,monthFormat:function(e){return Oz.call(this,e,1,"%B")},monthAbbrevFormat:function(e){return Oz.call(this,e,1,"%b")},dayFormat:function(e){return Oz.call(this,0,2+e,"%A")},dayAbbrevFormat:function(e){return Oz.call(this,0,2+e,"%a")},quarter:He,utcquarter:$e,week:Mr,utcweek:Pr,dayofyear:Cr,utcdayofyear:Rr,warn:function(){return Bz(this.context.dataflow,"warn",arguments)},info:function(){return Bz(this.context.dataflow,"info",arguments)},debug:function(){return Bz(this.context.dataflow,"debug",arguments)},extent:rt,inScope:function(e){const t=this.context.group;let n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n},intersect:function(e,t,n){if(!e)return[];const[r,i]=e,o=(new t_).set(r[0],r[1],i[0],i[1]);return EA(n||this.context.dataflow.scenegraph().root,o,function(e){let t=null;if(e){const n=We(e.marktype),r=We(e.markname);t=e=>(!n.length||n.some((t=>e.marktype===t)))&&(!r.length||r.some((t=>e.name===t)))}return t}(t))},clampRange:Ge,pinchDistance:function(e){const t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.sqrt(n*n+r*r)},pinchAngle:function(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function(){const e=Zz();return e?e.screen:{}},containerSize:function(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function(){const e=Zz();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function(e,t,n){return Hv(e||0,t||0,n||0)},setdata:function(e,t){const n=this.context.dataflow,r=this.context.data[e].input;return n.pulse(r,n.changeset().remove(de).insert(t)),1},pathShape:function(e){let t=null;return function(n){return n?kb(n,t=t||fb(e)):e}},panLinear:Pe,panLog:Ne,panPow:ze,panSymlog:Fe,zoomLinear:je,zoomLog:Ue,zoomPow:Ve,zoomSymlog:qe,encode:function(e,t,n){if(e){const n=this.context.dataflow,r=e.mark.source;n.pulse(r,n.changeset().encode(e,t))}return void 0!==n?n:e},modify:function(e,t,n,r,i,o){const a=this.context.dataflow,s=this.context.data[e],l=s.input,c=a.stamp();let u,h,d=s.changes;if(!1===a._trigger||!(l.value.length||t||r))return 0;if((!d||d.stamp<c)&&(s.changes=d=a.changeset(),d.stamp=c,a.runAfter((()=>{s.modified=!0,a.pulse(l,d).run()}),!0,1)),n&&(u=!0===n?de:xe(n)||ls(n)?n:Hz(n),d.remove(u)),t&&d.insert(t),r&&(u=Hz(r),l.value.some(u)?d.remove(u):d.insert(r)),i)for(h in o)d.modify(i,h,o[h]);return 1}},Jz=["view","item","group","xy","x","y"],Qz="this.",eF={},tF={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>`_[${Tt("$"+e)}]`,functions:function(e){const t=BR(e);Jz.forEach((e=>t[e]="event.vega."+e));for(const e in Kz)t[e]=Qz+e;return nt(t,function(e,t,n){t.__bandwidth=e=>e&&e.bandwidth?e.bandwidth():0,n._bandwidth=Dz,n._range=Dz,n._scale=Dz;const r=t=>"_["+(t.type===RI?Tt("%"+t.value):Tt("%")+"+"+e(t))+"]";return{_bandwidth:e=>`this.__bandwidth(${r(e[0])})`,_range:e=>`${r(e[0])}.range()`,_scale:t=>`${r(t[0])}(${e(t[1])})`}}(e,Kz,eF)),t},constants:FR,visitors:eF},nF=jR(tF);function rF(e,t,n){return 1===arguments.length?Kz[e]:(Kz[e]=t,n&&(eF[e]=n),nF&&(nF.functions[e]=Qz+e),this)}function iF(e,t){const n={};let r;try{r=zR(e=vt(e)?e:Tt(e)+"")}catch(t){oe("Expression parse error: "+e)}r.visit((e=>{if(e.type!==PI)return;const r=e.callee.name,i=tF.visitors[r];i&&i(r,e.arguments,t,n)}));const i=nF(r);return i.globals.forEach((e=>{const r="$"+e;!at(n,r)&&t.getSignal(e)&&(n[r]=t.signalRef(e))})),{$expr:nt({code:i.code},t.options.ast?{ast:r}:null),$fields:i.fields,$params:n}}rF("bandwidth",(function(e,t){const n=Rz(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0}),Dz),rF("copy",(function(e,t){const n=Rz(e,(t||this).context);return n?n.copy():void 0}),Dz),rF("domain",(function(e,t){const n=Rz(e,(t||this).context);return n?n.domain():[]}),Dz),rF("range",(function(e,t){const n=Rz(e,(t||this).context);return n&&n.range?n.range():[]}),Dz),rF("invert",(function(e,t,n){const r=Rz(e,(n||this).context);return r?xe(t)?(r.invertRange||r.invert)(t):(r.invert||r.invertExtent)(t):void 0}),Dz),rF("scale",(function(e,t,n){const r=Rz(e,(n||this).context);return r?r(t):void 0}),Dz),rF("gradient",(function(e,t,n,r,i){e=Rz(e,(i||this).context);const o=lb(t,n);let a=e.domain(),s=a[0],l=Ee(a),c=ce;return l-s?c=Dy(e,s,l):e=(e.interpolator?by("sequential")().interpolator(e.interpolator()):by("linear")().interpolate(e.interpolate()).range(e.range())).domain([s=0,l=1]),e.ticks&&(a=e.ticks(+r||15),s!==a[0]&&a.unshift(s),l!==Ee(a)&&a.push(l)),a.forEach((t=>o.stop(c(t),e(t)))),o}),Dz),rF("geoArea",Nz,Dz),rF("geoBounds",zz,Dz),rF("geoCentroid",Fz,Dz),rF("geoShape",(function(e,t,n){const r=Rz(e,(n||this).context);return function(e){return r?r.path.context(e)(t):""}}),Dz),rF("indata",(function(e,t,n){const r=this.context.data[e]["index:"+t],i=r?r.value.get(n):void 0;return i?i.count:i}),(function(e,t,n,r){t[0].type!==RI&&oe("First argument to indata must be a string literal."),t[1].type!==RI&&oe("Second argument to indata must be a string literal.");const i=t[0].value,o=t[1].value,a="@"+o;at(a,r)||(r[a]=n.getData(i).indataRef(n,o))})),rF("data",wz,Lz),rF("treePath",(function(e,t,n){const r=Xz(e,this),i=r[t],o=r[n];return i&&o?i.path(o).map(Yz):void 0}),Lz),rF("treeAncestors",(function(e,t){const n=Xz(e,this)[t];return n?n.ancestors().map(Yz):void 0}),Lz),rF("vlSelectionTest",(function(e,t,n){for(var r,i,o,a,s,l=this.context.data[e],c=l?l.values.value:[],u=l?l[pz]&&l[pz].value:void 0,h=n===dz,d=c.length,f=0;f<d;++f)if(r=c[f],u&&h){if(-1===(o=(i=i||{})[a=r.unit]||0))continue;if(s=gz(t,r),i[a]=s?-1:++o,s&&1===u.size)return!0;if(!s&&o===u.get(a).count)return!1}else if(h^(s=gz(t,r)))return s;return d&&h}),xz),rF("vlSelectionIdTest",(function(e,t,n){const r=this.context.data[e],i=r?r.values.value:[],o=r?r[pz]&&r[pz].value:void 0,a=n===dz,s=mz(t),l=yz(i,s);if(l===i.length)return!1;if(mz(i[l])!==s)return!1;if(o&&a){if(1===o.size)return!0;if(bz(i,s)-l<o.size)return!1}return!0}),xz),rF("vlSelectionResolve",(function(e,t,n,r){for(var i,o,a,s,l,c,u,h,d,f,p,g=this.context.data[e],m=g?g.values.value:[],v={},y={},b={},_=m.length,x=0;x<_;++x){for(s=(i=m[x]).unit,o=i.fields,a=i.values,f=0,p=o.length;f<p;++f)l=o[f],u=(c=v[l.field]||(v[l.field]={}))[s]||(c[s]=[]),b[l.field]=h=l.type.charAt(0),d=_z[h+"_union"],c[s]=d(u,We(a[f]));n&&(u=y[s]||(y[s]=[])).push(We(a).reduce(((e,t,n)=>(e[o[n].field]=t,e)),{}))}return t=t||fz,Object.keys(v).forEach((e=>{v[e]=Object.keys(v[e]).map((t=>v[e][t])).reduce(((n,r)=>void 0===n?r:_z[b[e]+"_"+t](n,r)))})),m=Object.keys(y),n&&m.length&&(v[r?"vlPoint":"vlMulti"]=t===fz?{or:m.reduce(((e,t)=>(e.push(...y[t]),e)),[])}:{and:m.map((e=>({or:y[e]})))}),v}),xz),rF("vlSelectionTuples",(function(e,t){return e.map((e=>nt({values:t.fields.map((t=>(t.getter||(t.getter=se(t.field)))(e.datum)))},t)))}));const oF=Ot(["rule"]),aF=Ot(["group","image","rect"]);function sF(e){return(e+"").toLowerCase()}function lF(e,t,n){";"!==n[n.length-1]&&(n="return("+n+");");const r=Function(...t.concat(n));return e&&e.functions?r.bind(e.functions):r}var cF={operator:(e,t)=>lF(e,["_"],t.code),parameter:(e,t)=>lF(e,["datum","_"],t.code),event:(e,t)=>lF(e,["event"],t.code),handler:(e,t)=>lF(e,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(t.code,";")),encode:(e,t)=>{const{marktype:n,channels:r}=t;let i="var o=item,datum=o.datum,m=0,$;";for(const e in r){const t="o["+Tt(e)+"]";i+="$=".concat(r[e].code,";if(").concat(t,"!==$)").concat(t,"=$,m=1;")}return i+=function(e,t){let n="";return oF[t]||(e.x2&&(e.x?(aF[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(aF[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(r,n),i+="return m;",lF(e,["item","_"],i)},codegen:{get(e){const t="[".concat(e.map(Tt).join("]["),"]"),n=Function("_","return _".concat(t,";"));return n.path=t,n},comparator(e,t){let n;const r=Function("a","b","var u, v; return "+e.map(((e,r)=>{const i=t[r];let o,a;return e.path?(o="a".concat(e.path),a="b".concat(e.path)):((n=n||{})["f"+r]=e,o="this.f".concat(r,"(a)"),a="this.f".concat(r,"(b)")),function(e,t,n,r){return"((u = ".concat(e,") < (v = ").concat(t,") || u == null) && v != null ? ").concat(n,"\n : (u > v || v == null) && u != null ? ").concat(r,"\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(n,"\n : v !== v && u === u ? ").concat(r," : ")}(o,a,-i,i)})).join("")+"0;");return n?r.bind(n):r}}};function uF(e,t,n){if(!e||!we(e))return e;for(let r,i=0,o=hF.length;i<o;++i)if(r=hF[i],at(e,r.key))return r.parse(e,t,n);return e}var hF=[{key:"$ref",parse:function(e,t){return t.get(e.$ref)||oe("Operator not defined: "+e.$ref)}},{key:"$key",parse:function(e,t){const n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=yt(e.$key,e.$flat,t.expr.codegen))}},{key:"$expr",parse:function(e,t,n){e.$params&&t.parseParameters(e.$params,n);const r="e:"+e.$expr.code+"_"+e.$name;return t.fn[r]||(t.fn[r]=Q(t.parameterExpression(e.$expr),e.$fields,e.$name))}},{key:"$field",parse:function(e,t){if(!e.$field)return null;const n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=se(e.$field,e.$name,t.expr.codegen))}},{key:"$encode",parse:function(e,t){const n=e.$encode,r={};for(const e in n){const i=n[e];r[e]=Q(t.encodeExpression(i.$expr),i.$fields),r[e].output=i.$output}return r}},{key:"$compare",parse:function(e,t){const n="c:"+e.$compare+"_"+e.$order,r=We(e.$compare).map((e=>e&&e.$tupleid?cs:e));return t.fn[n]||(t.fn[n]=Xe(r,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){const n=e.$subflow;return function(e,r,i){const o=t.fork().parse(n),a=o.get(n.operators[0].id),s=o.signals.parent;return s&&s.set(i),a.detachSubflow=()=>t.detach(o),a}}},{key:"$tupleid",parse:function(){return cs}}];const dF={skip:!0};function fF(e,t,n,r){return new pF(e,t,n,r)}function pF(e,t,n,r){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=r||cF,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function gF(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}pF.prototype=gF.prototype={fork(){const e=new gF(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter((t=>t!==e));const t=Object.keys(e.nodes);for(const n of t)e.nodes[n]._targets=null;for(const n of t)e.nodes[n].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const n=this,r=n.dataflow,i=e.value;if(n.set(e.id,t),"collect"===sF(e.type)&&i&&(i.$ingest?r.ingest(t,i.$ingest,i.$format):i.$request?r.preload(t,i.$request,i.$format):r.pulse(t,r.changeset().insert(i))),e.root&&(n.root=t),e.parent){let i=n.get(e.parent.$ref);i?(r.connect(i,[t]),t.targets().add(i)):(n.unresolved=n.unresolved||[]).push((()=>{i=n.get(e.parent.$ref),r.connect(i,[t]),t.targets().add(i)}))}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data)for(const r in e.data){const i=n.data[r]||(n.data[r]={});e.data[r].forEach((e=>i[e]=t))}},resolve(){return(this.unresolved||[]).forEach((e=>e())),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[sF(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,n,r,i){this.dataflow.on(t,n,r,i,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function(e){const t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach((e=>t.parseOperator(e))),n.forEach((e=>t.parseOperatorParameters(e))),(e.streams||[]).forEach((e=>t.parseStream(e))),(e.updates||[]).forEach((e=>t.parseUpdate(e))),t.resolve()},parseOperator:function(e){const t=this;"operator"!==sF(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function(e){const t=this;if(e.params){const n=t.get(e.id);n||oe("Invalid operator id: "+e.id),t.dataflow.connect(n,n.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};const n=this;for(const r in e){const i=e[r];t[r]=xe(i)?i.map((e=>uF(e,n,t))):uF(i,n,t)}return t},parseStream:function(e){var t,n=this,r=null!=e.filter?n.eventExpression(e.filter):void 0,i=null!=e.stream?n.get(e.stream):void 0;e.source?i=n.events(e.source,e.type,r):e.merge&&(i=(t=e.merge.map((e=>n.get(e))))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((e=>n.get(e))),i=i.between(t[0],t[1])),e.filter&&(i=i.filter(r)),null!=e.throttle&&(i=i.throttle(+e.throttle)),null!=e.debounce&&(i=i.debounce(+e.debounce)),null==i&&oe("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),n.stream(e,i)},parseUpdate:function(e){var t,n=this,r=we(r=e.source)?r.$ref:r,i=n.get(r),o=e.update,a=void 0;i||oe("Source not defined: "+e.source),t=e.target&&e.target.$expr?n.eventExpression(e.target.$expr):n.get(e.target),o&&o.$expr&&(o.$params&&(a=n.parseParameters(o.$params)),o=n.handlerExpression(o.$expr)),n.update(e,i,t,o,a)},getState:function(e){var t=this,n={};if(e.signals){var r=n.signals={};Object.keys(t.signals).forEach((n=>{const i=t.signals[n];e.signals(n,i)&&(r[n]=i.value)}))}if(e.data){var i=n.data={};Object.keys(t.data).forEach((n=>{const r=t.data[n];e.data(n,r)&&(i[n]=r.input.value)}))}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map((t=>t.getState(e)))),n},setState:function(e){var t=this,n=t.dataflow,r=e.data,i=e.signals;Object.keys(i||{}).forEach((e=>{n.update(t.signals[e],i[e],dF)})),Object.keys(r||{}).forEach((e=>{n.pulse(t.data[e].input,n.changeset().remove(de).insert(r[e]))})),(e.subcontext||[]).forEach(((e,n)=>{const r=t.subcontext[n];r&&r.setState(e)}))}};var mF,vF,yF=0,bF=0,_F=0,xF=0,wF=0,AF=0,kF="object"==typeof performance&&performance.now?performance:Date,TF="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function SF(){return wF||(TF(EF),wF=kF.now()+AF)}function EF(){wF=0}function CF(){this._call=this._time=this._next=null}function MF(){wF=(xF=kF.now())+AF,yF=bF=0;try{!function(){SF(),++yF;for(var e,t=mF;t;)(e=wF-t._time)>=0&&t._call.call(null,e),t=t._next;--yF}()}finally{yF=0,function(){for(var e,t,n=mF,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:mF=t);vF=e,LF(r)}(),wF=0}}function OF(){var e=kF.now(),t=e-xF;t>1e3&&(AF-=t,xF=e)}function LF(e){yF||(bF&&(bF=clearTimeout(bF)),e-wF>24?(e<1/0&&(bF=setTimeout(MF,e-kF.now()-AF)),_F&&(_F=clearInterval(_F))):(_F||(xF=kF.now(),_F=setInterval(OF,1e3)),yF=1,TF(MF)))}function DF(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}CF.prototype=function(e,t,n){var r=new CF;return r.restart(e,t,n),r}.prototype={constructor:CF,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?SF():+n)+(null==t?0:+t),this._next||vF===this||(vF?vF._next=this:mF=this,vF=this),this._call=e,this._time=n,LF()},stop:function(){this._call&&(this._call=null,this._time=1/0,LF())}};const IF="default";function RF(e,t){const n=e.globalCursor()?"undefined"!=typeof document&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function PF(e,t){var n=e._runtime.data;return at(n,t)||oe("Unrecognized data set: "+t),n[t]}function NF(e,t){ms(t)||oe("Second argument to changes must be a changeset.");const n=PF(this,e);return n.modified=!0,this.pulse(n.input,t)}function zF(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function FF(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function BF(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}const jF="view",UF={trap:!1};function VF(e,t,n,r){e._eventListeners.push({type:n,sources:We(t),handler:r})}function qF(e,t,n){const r=e._eventConfig&&e._eventConfig[t];return!(!1===r||we(r)&&!r[n])||(e.warn(`Blocked ${t} ${n} event listener.`),!1)}function HF(e){return e.item}function $F(e){return e.item.mark.source}function WF(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}function GF(e,t,n){const r=document.createElement(e);for(const e in t)r.setAttribute(e,t[e]);return null!=n&&(r.textContent=n),r}function YF(e,t,n,r){const i=n.event||"input",o=()=>e.update(t.value);r.signal(n.signal,t.value),t.addEventListener(i,o),VF(r,t,i,o),e.set=e=>{t.value=e,t.dispatchEvent(function(e){return"undefined"!=typeof Event?new Event(e):{type:e}}(i))}}function XF(e,t,n,r){const i=r.signal(n.signal),o=GF("div",{class:"vega-bind"}),a="radio"===n.input?o:o.appendChild(GF("label"));a.appendChild(GF("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(o);let s=ZF;switch(n.input){case"checkbox":s=KF;break;case"select":s=JF;break;case"radio":s=QF;break;case"range":s=eB}s(e,a,n,i)}function ZF(e,t,n,r){const i=GF("input");for(const e in n)"signal"!==e&&"element"!==e&&i.setAttribute("input"===e?"type":e,n[e]);i.setAttribute("name",n.signal),i.value=r,t.appendChild(i),i.addEventListener("input",(()=>e.update(i.value))),e.elements=[i],e.set=e=>i.value=e}function KF(e,t,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const o=GF("input",i);t.appendChild(o),o.addEventListener("change",(()=>e.update(o.checked))),e.elements=[o],e.set=e=>o.checked=!!e||null}function JF(e,t,n,r){const i=GF("select",{name:n.signal}),o=n.labels||[];n.options.forEach(((e,t)=>{const n={value:e};tB(e,r)&&(n.selected=!0),i.appendChild(GF("option",n,(o[t]||e)+""))})),t.appendChild(i),i.addEventListener("change",(()=>{e.update(n.options[i.selectedIndex])})),e.elements=[i],e.set=e=>{for(let t=0,r=n.options.length;t<r;++t)if(tB(n.options[t],e))return void(i.selectedIndex=t)}}function QF(e,t,n,r){const i=GF("span",{class:"vega-bind-radio"}),o=n.labels||[];t.appendChild(i),e.elements=n.options.map(((t,a)=>{const s={type:"radio",name:n.signal,value:t};tB(t,r)&&(s.checked=!0);const l=GF("input",s);l.addEventListener("change",(()=>e.update(t)));const c=GF("label",{},(o[a]||t)+"");return c.prepend(l),i.appendChild(c),l})),e.set=t=>{const n=e.elements,r=n.length;for(let e=0;e<r;++e)tB(n[e].value,t)&&(n[e].checked=!0)}}function eB(e,t,n,r){r=void 0!==r?r:(+n.max+ +n.min)/2;const i=null!=n.max?n.max:Math.max(100,+r)||100,o=n.min||Math.min(0,i,+r)||0,a=n.step||function(e,t,n){var r=Math.abs(t-e)/Math.max(0,100),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=LI?i*=10:o>=DI?i*=5:o>=II&&(i*=2),t<e?-i:i}(o,i),s=GF("input",{type:"range",name:n.signal,min:o,max:i,step:a});s.value=r;const l=GF("span",{},+r);t.appendChild(s),t.appendChild(l);const c=()=>{l.textContent=s.value,e.update(+s.value)};s.addEventListener("input",c),s.addEventListener("change",c),e.elements=[s],e.set=e=>{s.value=e,l.textContent=e}}function tB(e,t){return e===t||e+""==t+""}function nB(e,t,n,r,i,o){return(t=t||new r(e.loader())).initialize(n,zF(e),FF(e),BF(e),i,o).background(e.background())}function rB(e,t){return t?function(){try{t.apply(this,arguments)}catch(t){e.error(t)}}:null}function iB(e,t,n){if("string"==typeof t){if("undefined"==typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&n)try{t.innerHTML=""}catch(n){t=null,e.error(n)}return t}const oB=e=>+e||0;function aB(e){return we(e)?{top:oB(e.top),bottom:oB(e.bottom),left:oB(e.left),right:oB(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(oB(e))}async function sB(e,t,n,r){const i=SA(t),o=i&&i.headless;return o||oe("Unrecognized renderer type: "+t),await e.runAsync(),nB(e,null,null,o,n,r).renderAsync(e._scenegraph.root)}var lB="padding",cB={skip:!0};function uB(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===lB?r.left+r.right:0)}function hB(e,t){var n=e.autosize(),r=e.padding();return t-(n&&n.contains===lB?r.top+r.bottom:0)}function dB(e,t){return t.modified&&xe(t.input.value)&&e.indexOf("_:vega:_")}function fB(e,t){return!("parent"===e||t instanceof Vs.proxy)}function pB(e,t,n,r){const i=e.element();i&&i.setAttribute("title",function(e){return null==e?"":xe(e)?gB(e):we(e)&&!ft(e)?(t=e,Object.keys(t).map((e=>{const n=t[e];return e+": "+(xe(n)?gB(n):mB(n))})).join("\n")):e+"";var t}(r))}function gB(e){return"["+e.map(mB).join(", ")+"]"}function mB(e){return xe(e)?"[]":we(e)&&!ft(e)?"{}":e}function vB(e,t){const n=this;if(t=t||{},Bs.call(n),t.loader&&n.loader(t.loader),t.logger&&n.logger(t.logger),null!=t.logLevel&&n.logLevel(t.logLevel),t.locale||e.locale){const r=nt({},e.locale,t.locale);n.locale(Ma(r.number,r.time))}n._el=null,n._elBind=null,n._renderType=t.renderer||kA.Canvas,n._scenegraph=new aw;const r=n._scenegraph.root;n._renderer=null,n._tooltip=t.tooltip||pB,n._redraw=!0,n._handler=(new Dw).scene(r),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function(e){const t=nt({defaults:{}},e),n=(e,t)=>{t.forEach((t=>{xe(e[t])&&(e[t]=Ot(e[t]))}))};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const i=function(e,t,n){return fF(e,Vs,Kz,n).parse(t)}(n,e,t.expr);n._runtime=i,n._signals=i.signals,n._bind=(e.bindings||[]).map((e=>({state:null,param:nt({},e)}))),i.root&&i.root.set(r),r.source=i.data.root.input,n.pulse(i.data.root.input,n.changeset().insert(r.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=uB(n,n._width),n._viewHeight=hB(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function(e){var t=e._signals,n=t.width,r=t.height,i=t.padding;function o(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(t=>{e._width=t.size,e._viewWidth=uB(e,t.size),o()}),{size:n}),e._resizeHeight=e.add(null,(t=>{e._height=t.size,e._viewHeight=hB(e,t.size),o()}),{size:r});const a=e.add(null,o,{pad:i});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=r.rank+1,a.rank=i.rank+1}(n),function(e){e.add(null,(t=>(e._background=t.bg,e._resize=1,t.bg)),{bg:e._signals.background})}(n),function(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:IF,item:null}));e.on(e.events("view","mousemove"),t,((e,n)=>{const r=t.value,i=r?vt(r)?r:r.user:IF,o=n.item&&n.item.cursor||null;return r&&i===r.user&&o==r.item?r:{user:i,item:o}})),e.add(null,(function(t){let n=t.cursor,r=this.value;return vt(n)||(r=n.item,n=n.user),RF(e,n&&n!==IF?n:r||n),r}),{cursor:t})}(n),n.description(e.description),t.hover&&n.hover(),t.container&&n.initialize(t.container,t.bind)}function yB(e,t){return at(e._signals,t)?e._signals[t]:oe("Unrecognized signal name: "+Tt(t))}function bB(e,t){const n=(e._targets||[]).filter((e=>e._update&&e._update.handler===t));return n.length?n[0]:null}function _B(e,t,n,r){let i=bB(n,r);return i||(i=rB(e,(()=>r(t,n.value))),i.handler=r,e.on(n,null,i)),e}function xB(e,t,n){const r=bB(t,n);return r&&t._targets.remove(r),e}ut(vB,Bs,{async evaluate(e,t,n){if(await Bs.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,i=BF(r=this),o=zF(r),a=FF(r),r._renderer.background(r.background()),r._renderer.resize(o,a,i),r._handler.origin(i),r._resizeListeners.forEach((e=>{try{e(o,a)}catch(e){r.error(e)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(e){this.error(e)}var r,i,o,a;return n&&os(this,n),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&DF(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,n){const r=yB(this,e);return 1===arguments.length?r.value:this.update(r,t,n)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",aB(e)):aB(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(SA(e)||oe("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(Bs.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(yB(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(e,t,n,r,i,o){this.runAfter((a=>{let s=0;a._autosize=0,a.width()!==n&&(s=1,a.signal("width",n,cB),a._resizeWidth.skip(!0)),a.height()!==r&&(s=1,a.signal("height",r,cB),a._resizeHeight.skip(!0)),a._viewWidth!==e&&(a._resize=1,a._viewWidth=e),a._viewHeight!==t&&(a._resize=1,a._viewHeight=t),a._origin[0]===i[0]&&a._origin[1]===i[1]||(a._resize=1,a._origin=i),s&&a.run("enter"),o&&a.runAfter((e=>e.resize()))}),!1,1)},addEventListener(e,t,n){let r=t;return n&&!1===n.trap||(r=rB(this,t),r.raw=t),this._handler.on(e,r),this},removeEventListener(e,t){for(var n,r,i=this._handler.handlers(e),o=i.length;--o>=0;)if(r=i[o].type,n=i[o].handler,e===r&&(t===n||t===n.raw)){this._handler.off(r,n);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},addSignalListener(e,t){return _B(this,e,yB(this,e),t)},removeSignalListener(e,t){return xB(this,yB(this,e),t)},addDataListener(e,t){return _B(this,e,PF(this,e).values,t)},removeDataListener(e,t){return xB(this,PF(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=RF(this,null);this._globalCursor=!!e,t&&RF(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function(e,t){this._timers.push(function(e,t,n){var r=new CF,i=t;return null==t?(r.restart(e,t,n),r):(r._restart=r.restart,r.restart=function(e,t,n){t=+t,n=null==n?SF():+n,r._restart((function o(a){a+=i,r._restart(o,i+=t,n),e(a)}),t,n)},r.restart(e,t,n),r)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},events:function(e,t,n){var r,i=this,o=new Ts(n),a=function(n,r){i.runAsync(null,(()=>{e===jF&&function(e,t){var n=e._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[t]:i?!i[t]:e.preventDefault()))}(i,t)&&n.preventDefault(),o.receive(function(e,t,n){var r,i,o=e._renderer,a=o&&o.canvas();return a&&(i=BF(e),(r=fw(t.changedTouches?t.changedTouches[0]:t,a))[0]-=i[0],r[1]-=i[1]),t.dataflow=e,t.item=n,t.vega=function(e,t,n){const r=t?"group"===t.mark.marktype?t:t.mark.group:null;function i(e){var n,i=r;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){i=n;break}return i&&i.mark&&i.mark.interactive?i:{}}function o(e){if(!e)return n;vt(e)&&(e=i(e));const t=n.slice();for(;e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:et(e),item:et(t||{}),group:i,xy:o,x:e=>o(e)[0],y:e=>o(e)[1]}}(e,n,r),t}(i,n,r))}))};if("timer"===e)qF(i,"timer",t)&&i.timer(a,t);else if(e===jF)qF(i,"view",t)&&i.addEventListener(t,a,UF);else if("window"===e?qF(i,"window",t)&&"undefined"!=typeof window&&(r=[window]):"undefined"!=typeof document&&qF(i,"selector",t)&&(r=document.querySelectorAll(e)),r){for(var s=0,l=r.length;s<l;++s)r[s].addEventListener(t,a);VF(i,r,t,a)}else i.warn("Can not resolve event source: "+e);return o},finalize:function(){var e,t,n,r=this._tooltip,i=this._timers,o=this._eventListeners;for(e=i.length;--e>=0;)i[e].stop();for(e=o.length;--e>=0;)for(t=(n=o[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);return r&&r.call(this,this._handler,null,null,null),this},hover:function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",HF),$F,WF(e)),this.on(this.events("view","mouseout",HF),$F,WF(t)),this},data:function(e,t){return arguments.length<2?PF(this,e).values.value:NF.call(this,e,vs().remove(de).insert(t))},change:NF,insert:function(e,t){return NF.call(this,e,vs().insert(t))},remove:function(e,t){return NF.call(this,e,vs().remove(t))},scale:function(e){var t=this._runtime.scales;return at(t,e)||oe("Unrecognized scale or projection: "+e),t[e].value},initialize:function(e,t){const n=this,r=n._renderType,i=n._eventConfig.bind,o=SA(r);e=n._el=e?iB(n,e,!0):null,function(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),DF(t,e.description()))}(n),o||n.error("Unrecognized renderer type: "+r);const a=o.handler||Dw,s=e?o.renderer:o.headless;return n._renderer=s?nB(n,n._renderer,e,s):null,n._handler=function(e,t,n,r){const i=new r(e.loader(),rB(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,BF(e),e);return t&&t.handlers().forEach((e=>{i.on(e.type,e.handler)})),i}(n,n._handler,e,a),n._redraw=!0,e&&"none"!==i&&(t=t?n._elBind=iB(n,t,!0):e.appendChild(GF("form",{class:"vega-bindings"})),n._bind.forEach((e=>{e.param.element&&"container"!==i&&(e.element=iB(n,e.param.element,!!e.param.input))})),n._bind.forEach((e=>{!function(e,t,n){if(!t)return;const r=n.param;let i=n.state;i||(i=n.state={elements:null,active:!1,set:null,update:t=>{t!=e.signal(r.signal)&&e.runAsync(null,(()=>{i.source=!0,e.signal(r.signal,t)}))}},r.debounce&&(i.update=tt(r.debounce,i.update))),(null==r.input&&r.element?YF:XF)(i,t,r,e),i.active||(e.on(e._signals[r.signal],null,(()=>{i.source?i.source=!1:i.set(e.signal(r.signal))})),i.active=!0)}(n,e.element||t,e)}))),n},toImageURL:async function(e,t){e!==kA.Canvas&&e!==kA.SVG&&e!==kA.PNG&&oe("Unrecognized image type: "+e);const n=await sB(this,e,t);return e===kA.SVG?function(e,t){const n=new Blob([e],{type:"image/svg+xml"});return window.URL.createObjectURL(n)}(n.svg()):n.canvas().toDataURL("image/png")},toCanvas:async function(e,t){return(await sB(this,kA.Canvas,e,t)).canvas()},toSVG:async function(e){return(await sB(this,kA.SVG,e)).svg()},getState:function(e){return this._runtime.getState(e||{data:dB,signals:fB,recurse:!0})},setState:function(e){return this.runAsync(null,(t=>{t._trigger=!1,t._runtime.setState(e)}),(e=>{e._trigger=!0})),this}});const wB=/[[\]{}]/,AB={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let kB,TB;function SB(e,t,n){return kB=t||"view",TB=n||AB,CB(e.trim()).map(MB)}function EB(e,t,n,r,i){const o=e.length;let a,s=0;for(;t<o;++t){if(a=e[t],!s&&a===n)return t;i&&i.indexOf(a)>=0?--s:r&&r.indexOf(a)>=0&&++s}return t}function CB(e){const t=[],n=e.length;let r=0,i=0;for(;i<n;)i=EB(e,i,",","[{","]}"),t.push(e.substring(r,i).trim()),r=++i;if(0===t.length)throw"Empty event selector: "+e;return t}function MB(e){return"["===e[0]?function(e){const t=e.length;let n,r=1;if(r=EB(e,r,"]","[","]"),r===t)throw"Empty between selector: "+e;if(n=CB(e.substring(1,r)),2!==n.length)throw"Between selector must have two elements: "+e;if(">"!==(e=e.slice(r+1).trim())[0])throw"Expected '>' after between selector: "+e;n=n.map(MB);const i=MB(e.slice(1).trim());return i.between?{between:n,stream:i}:(i.between=n,i)}(e):function(e){const t={source:kB},n=[];let r,i,o=[0,0],a=0,s=0,l=e.length,c=0;if("}"===e[l-1]){if(c=e.lastIndexOf("{"),!(c>=0))throw"Unmatched right brace: "+e;try{o=function(e){const t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((t=>{const n=+t;if(n!=n)throw e;return n}))}(e.substring(c+1,l-1))}catch(t){throw"Invalid throttle specification: "+e}l=(e=e.slice(0,c).trim()).length,c=0}if(!l)throw e;if("@"===e[0]&&(a=++c),r=EB(e,c,":"),r<l&&(n.push(e.substring(s,r).trim()),s=c=++r),c=EB(e,c,"["),c===l)n.push(e.substring(s,l).trim());else if(n.push(e.substring(s,c).trim()),i=[],s=++c,s===l)throw"Unmatched left bracket: "+e;for(;c<l;){if(c=EB(e,c,"]"),c===l)throw"Unmatched left bracket: "+e;if(i.push(e.substring(s,c).trim()),c<l-1&&"["!==e[++c])throw"Expected left bracket: "+e;s=++c}if(!(l=n.length)||wB.test(n[l-1]))throw"Invalid event selector: "+e;var u;return l>1?(t.type=n[1],a?t.markname=n[0].slice(1):(u=n[0],TB[u]?t.marktype=n[0]:t.source=n[0])):t.type=n[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=i&&(t.filter=i),o[0]&&(t.throttle=o[0]),o[1]&&(t.debounce=o[1]),t}(e)}function OB(e){return we(e)?e:{type:e||"pad"}}const LB=e=>+e||0;function DB(e){return we(e)?e.signal?e:{top:LB(e.top),bottom:LB(e.bottom),left:LB(e.left),right:LB(e.right)}:{top:t=LB(e),bottom:t,left:t,right:t};var t}const IB=e=>we(e)&&!xe(e)?nt({},e):{value:e};function RB(e,t,n,r){return null!=n?(we(n)&&!xe(n)||xe(n)&&n.length&&we(n[0])?e.update[t]=n:e[r||"enter"][t]={value:n},1):0}function PB(e,t,n){for(const n in t)RB(e,n,t[n]);for(const t in n)RB(e,t,n[t],"update")}function NB(e,t,n){for(const r in t)n&&at(n,r)||(e[r]=nt(e[r]||{},t[r]));return e}function zB(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const FB="mark",BB="frame",jB="scope",UB="legend-label";function VB(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}const qB=e=>vt(e)?Tt(e):e.signal?`(${e.signal})`:GB(e);function HB(e){if(null!=e.gradient)return function(e){const t=[e.start,e.stop,e.count].map((e=>null==e?null:Tt(e)));for(;t.length&&null==Ee(t);)t.pop();return t.unshift(qB(e.gradient)),`gradient(${t.join(",")})`}(e);let t=e.signal?`(${e.signal})`:e.color?function(e){return e.c?$B("hcl",e.h,e.c,e.l):e.h||e.s?$B("hsl",e.h,e.s,e.l):e.l||e.a?$B("lab",e.l,e.a,e.b):e.r||e.g||e.b?$B("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?GB(e.field):void 0!==e.value?Tt(e.value):void 0;return null!=e.scale&&(t=function(e,t){const n=qB(e.scale);return null!=e.range?t=`lerp(_range(${n}), ${+e.range})`:(void 0!==t&&(t=`_scale(${n}, ${t})`),e.band&&(t=(t?t+"+":"")+`_bandwidth(${n})`+(1==+e.band?"":"*"+WB(e.band)),e.extra&&(t=`(datum.extra ? _scale(${n}, datum.extra.value) : ${t})`)),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t=`pow(${t},${WB(e.exponent)})`),null!=e.mult&&(t+=`*${WB(e.mult)}`),null!=e.offset&&(t+=`+${WB(e.offset)}`),e.round&&(t=`round(${t})`),t}const $B=(e,t,n,r)=>`(${e}(${[t,n,r].map(HB).join(",")})+'')`;function WB(e){return we(e)?"("+HB(e)+")":e}function GB(e){return YB(we(e)?e:{datum:e})}function YB(e){let t,n,r;if(e.signal)t="datum",r=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),t="item";n-- >0;)t+=".mark.group";e.parent?(r=e.parent,t+=".datum"):r=e.group}else e.datum?(t="datum",r=e.datum):oe("Invalid field reference: "+Tt(e));return e.signal||(r=vt(r)?ae(r).map(Tt).join("]["):YB(r)),t+"["+r+"]"}function XB(e,t,n,r,i,o){const a={};(o=o||{}).encoders={$encode:a},e=function(e,t,n,r,i){const o={},a={};let s,l,c,u;for(l in l="lineBreak","text"!==t||null==i[l]||zB(l,e)||VB(o,l,i[l]),("legend"==n||String(n).startsWith("axis"))&&(n=null),u=n===BB?i.group:n===FB?nt({},i.mark,i[t]):null,u)c=zB(l,e)||("fill"===l||"stroke"===l)&&(zB("fill",e)||zB("stroke",e)),c||VB(o,l,u[l]);for(l in We(r).forEach((t=>{const n=i.style&&i.style[t];for(const t in n)zB(t,e)||VB(o,t,n[t])})),e=nt({},e),o)u=o[l],u.signal?(s=s||{})[l]=u:a[l]=u;return e.enter=nt(a,e.enter),s&&(e.update=nt(s,e.update)),e}(e,t,n,r,i.config);for(const n in e)a[n]=ZB(e[n],t,o,i);return o}function ZB(e,t,n,r){const i={},o={};for(const t in e)null!=e[t]&&(i[t]=KB((a=e[t],xe(a)?function(e){let t="";return e.forEach((e=>{const n=HB(e);t+=e.test?`(${e.test})?${n}:`:n})),":"===Ee(t)&&(t+="null"),t}(a):HB(a)),r,n,o));var a;return{$expr:{marktype:t,channels:i},$fields:Object.keys(o),$output:Object.keys(e)}}function KB(e,t,n,r){const i=iF(e,t);return i.$fields.forEach((e=>r[e]=1)),nt(n,i.$params),i.$expr}const JB=["value","update","init","react","bind"];function QB(e,t){oe(e+' for "outer" push: '+Tt(t))}function ej(e,t){const n=e.name;if("outer"===e.push)t.signals[n]||QB("No prior signal definition",n),JB.forEach((t=>{void 0!==e[t]&&QB("Invalid property ",t)}));else{const r=t.addSignal(n,e.value);!1===e.react&&(r.react=!1),e.bind&&t.addBinding(n,e.bind)}}function tj(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function nj(e,t,n,r){return new tj(e,t,n,r)}function rj(e,t){return nj("operator",e,t)}function ij(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function oj(e,t){return t?{$field:e,$name:t}:{$field:e}}const aj=oj("key");function sj(e,t){return{$compare:e,$order:t}}function lj(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const cj="scope",uj="view";function hj(e){return e&&e.signal}function dj(e){if(hj(e))return!0;if(we(e))for(const t in e)if(dj(e[t]))return!0;return!1}function fj(e,t){return null!=e?e:t}function pj(e){return e&&e.signal||e}const gj="timer";function mj(e,t){return(e.merge?vj:e.stream?yj:e.type?bj:oe("Invalid stream specification: "+Tt(e)))(e,t)}function vj(e,t){const n=_j({merge:e.merge.map((e=>mj(e,t)))},e,t);return t.addStream(n).id}function yj(e,t){const n=_j({stream:mj(e.stream,t)},e,t);return t.addStream(n).id}function bj(e,t){let n;var r;e.type===gj?(n=t.event(gj,e.throttle),e={between:e.between,filter:e.filter}):n=t.event((r=e.source)===cj?uj:r||uj,e.type);const i=_j({stream:n},e,t);return 1===Object.keys(i).length?n:t.addStream(i).id}function _j(e,t,n){let r=t.between;return r&&(2!==r.length&&oe('Stream "between" parameter must have 2 entries: '+Tt(t)),e.between=[mj(r[0],n),mj(r[1],n)]),r=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&r.push(function(e,t,n){const r="event.item";return r+(e&&"*"!==e?"&&"+r+".mark.marktype==='"+e+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(t?"&&"+r+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===cj&&r.push("inScope(event.item)"),r.length&&(e.filter=iF("("+r.join(")&&(")+")",n).$expr),null!=(r=t.throttle)&&(e.throttle=+r),null!=(r=t.debounce)&&(e.debounce=+r),t.consume&&(e.consume=!0),e}const xj={code:"_.$value",ast:{type:"Identifier",value:"value"}};function wj(e){return{signal:"["+e.map((e=>e.scale?'scale("'+e.scale+'")':e.signal))+"]"}}const Aj=e=>(t,n,r)=>nj(e,n,t||void 0,r),kj=Aj("aggregate"),Tj=Aj("axisticks"),Sj=Aj("bound"),Ej=Aj("collect"),Cj=Aj("compare"),Mj=Aj("datajoin"),Oj=Aj("encode"),Lj=Aj("expression"),Dj=Aj("facet"),Ij=Aj("field"),Rj=Aj("key"),Pj=Aj("legendentries"),Nj=Aj("load"),zj=Aj("mark"),Fj=Aj("multiextent"),Bj=Aj("multivalues"),jj=Aj("overlap"),Uj=Aj("params"),Vj=Aj("prefacet"),qj=Aj("projection"),Hj=Aj("proxy"),$j=Aj("relay"),Wj=Aj("render"),Gj=Aj("scale"),Yj=Aj("sieve"),Xj=Aj("sortitems"),Zj=Aj("viewlayout"),Kj=Aj("values");let Jj=0;const Qj={min:"min",max:"max",count:"sum"};function eU(e,t){const n=t.getScale(e.name).params;let r;for(r in n.domain=iU(e.domain,e,t),null!=e.range&&(n.range=dU(e,t,n)),null!=e.interpolate&&function(e,t){t.interpolate=tU(e.type||e),null!=e.gamma&&(t.interpolateGamma=tU(e.gamma))}(e.interpolate,n),null!=e.nice&&(n.nice=function(e){return we(e)?{interval:tU(e.interval),step:tU(e.step)}:tU(e)}(e.nice)),null!=e.bins&&(n.bins=function(e,t){return e.signal||xe(e)?nU(e,t):t.objectProperty(e)}(e.bins,t)),e)at(n,r)||"name"===r||(n[r]=tU(e[r],t))}function tU(e,t){return we(e)?e.signal?t.signalRef(e.signal):oe("Unsupported object: "+Tt(e)):e}function nU(e,t){return e.signal?t.signalRef(e.signal):e.map((e=>tU(e,t)))}function rU(e){oe("Can not find data set: "+Tt(e))}function iU(e,t,n){if(e)return e.signal?n.signalRef(e.signal):(xe(e)?oU:e.fields?sU:aU)(e,t,n);null==t.domainMin&&null==t.domainMax||oe("No scale domain defined for domainMin/domainMax to override.")}function oU(e,t,n){return e.map((e=>tU(e,n)))}function aU(e,t,n){const r=n.getData(e.data);return r||rU(e.data),Ay(t.type)?r.valuesRef(n,e.field,cU(e.sort,!1)):Ey(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function sU(e,t,n){const r=e.data,i=e.fields.reduce(((e,t)=>(t=vt(t)?{data:r,field:t}:xe(t)||t.signal?function(e,t){const n="_:vega:_"+Jj++,r=Ej({});if(xe(e))r.value={$ingest:e};else if(e.signal){const i="setdata("+Tt(n)+","+e.signal+")";r.params.input=t.signalRef(i)}return t.addDataPipeline(n,[r,Yj({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e)),[]);return(Ay(t.type)?lU:Ey(t.type)?uU:hU)(e,n,i)}function lU(e,t,n){const r=cU(e.sort,!0);let i,o;const a=n.map((e=>{const n=t.getData(e.data);return n||rU(e.data),n.countsRef(t,e.field,r)})),s={groupby:aj,pulse:a};r&&(i=r.op||"count",o=r.field?lj(i,r.field):"count",s.ops=[Qj[i]],s.fields=[t.fieldRef(o)],s.as=[o]),i=t.add(kj(s));const l=t.add(Ej({pulse:ij(i)}));return o=t.add(Kj({field:aj,sort:t.sortRef(r),pulse:ij(l)})),ij(o)}function cU(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!Qj[e.op]&&oe("Multiple domain scales can not be sorted using "+e.op):oe("No field provided for sort aggregate op: "+e.op):we(e)?e.field="key":e={field:"key"}),e}function uU(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||rU(e.data),n.domainRef(t,e.field)}));return ij(t.add(Bj({values:r})))}function hU(e,t,n){const r=n.map((e=>{const n=t.getData(e.data);return n||rU(e.data),n.extentRef(t,e.field)}));return ij(t.add(Fj({extents:r})))}function dU(e,t,n){const r=t.config.range;let i=e.range;if(i.signal)return t.signalRef(i.signal);if(vt(i)){if(r&&at(r,i))return dU(e=nt({},e,{range:r[i]}),t,n);"width"===i?i=[0,{signal:"width"}]:"height"===i?i=Ay(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:oe("Unrecognized scale range value: "+Tt(i))}else{if(i.scheme)return n.scheme=xe(i.scheme)?nU(i.scheme,t):tU(i.scheme,t),i.extent&&(n.schemeExtent=nU(i.extent,t)),void(i.count&&(n.schemeCount=tU(i.count,t)));if(i.step)return void(n.rangeStep=tU(i.step,t));if(Ay(e.type)&&!xe(i))return iU(i,e,t);xe(i)||oe("Unsupported range type: "+Tt(i))}return i.map((e=>(xe(e)?nU:tU)(e,t)))}function fU(e,t,n){return xe(e)?e.map((e=>fU(e,t,n))):we(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:oe("Unsupported parameter object: "+Tt(e)):e}const pU="top",gU="left",mU="right",vU="bottom",yU="label",bU="perc",_U="value",xU="guide-label",wU="guide-title",AU="symbol",kU="gradient",TU="discrete",SU="size",EU=[SU,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],CU={name:1,style:1,interactive:1},MU={value:0},OU={value:1},LU="group",DU="rect",IU="rule",RU="text";function PU(e){return e.type=LU,e.interactive=e.interactive||!1,e}function NU(e,t){const n=(n,r)=>fj(e[n],fj(t[n],r));return n.isVertical=n=>"vertical"===fj(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection)),n.gradientLength=()=>fj(e.gradientLength,t.gradientLength||t.gradientWidth),n.gradientThickness=()=>fj(e.gradientThickness,t.gradientThickness||t.gradientHeight),n.entryColumns=()=>fj(e.columns,fj(t.columns,+n.isVertical(!0))),n}function zU(e,t){const n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function FU(e,t,n){return`item.anchor === 'start' ? ${e} : item.anchor === 'end' ? ${t} : ${n}`}const BU=FU(Tt(gU),Tt(mU),Tt("center"));function jU(e,t){return t?e?we(e)?Object.assign({},e,{offset:jU(e.offset,t)}):{value:e,offset:t}:t:e}function UU(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=NB(e.encode,t,CU)):e.interactive=!1,e}function VU(e,t,n,r){const i=NU(e,n),o=i.isVertical(),a=i.gradientThickness(),s=i.gradientLength();let l,c,u,h,d;o?(c=[0,1],u=[0,0],h=a,d=s):(c=[0,0],u=[1,0],h=s,d=a);const f={enter:l={opacity:MU,x:MU,y:MU,width:IB(h),height:IB(d)},update:nt({},l,{opacity:OU,fill:{gradient:t,start:c,stop:u}}),exit:{opacity:MU}};return PB(f,{stroke:i("gradientStrokeColor"),strokeWidth:i("gradientStrokeWidth")},{opacity:i("gradientOpacity")}),UU({type:DU,role:"legend-gradient",encode:f},r)}function qU(e,t,n,r,i){const o=NU(e,n),a=o.isVertical(),s=o.gradientThickness(),l=o.gradientLength();let c,u,h,d,f="";a?(c="y",h="y2",u="x",d="width",f="1-"):(c="x",h="x2",u="y",d="height");const p={opacity:MU,fill:{scale:t,field:_U}};p[c]={signal:f+"datum."+bU,mult:l},p[u]=MU,p[h]={signal:f+"datum.perc2",mult:l},p[d]=IB(s);const g={enter:p,update:nt({},p,{opacity:OU}),exit:{opacity:MU}};return PB(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),UU({type:DU,role:"legend-band",key:_U,from:i,encode:g},r)}function HU(e,t,n,r){const i=NU(e,t),o=i.isVertical(),a=IB(i.gradientThickness()),s=i.gradientLength();let l,c,u,h,d=i("labelOverlap"),f="";const p={enter:l={opacity:MU},update:c={opacity:OU,text:{field:yU}},exit:{opacity:MU}};return PB(p,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:fj(e.labelLimit,t.gradientLabelLimit)}),o?(l.align={value:"left"},l.baseline=c.baseline={signal:'datum.perc<=0?"bottom":datum.perc>=1?"top":"middle"'},u="y",h="x",f="1-"):(l.align=c.align={signal:'datum.perc<=0?"left":datum.perc>=1?"right":"center"'},l.baseline={value:"top"},u="x",h="y"),l[u]=c[u]={signal:f+"datum."+bU,mult:s},l[h]=c[h]=a,a.offset=fj(e.labelOffset,t.gradientLabelOffset)||0,d=d?{separation:i("labelSeparation"),method:d,order:"datum.index"}:void 0,UU({type:RU,role:UB,style:xU,key:_U,from:r,encode:p,overlap:d},n)}function $U(e,t,n,r,i){const o=NU(e,t),a=n.entries,s=!(!a||!a.interactive),l=a?a.name:void 0,c=o("clipHeight"),u=o("symbolOffset"),h={data:"value"},d=`(${i}) ? datum.offset : datum.size`,f=c?IB(c):{field:SU},p="datum.index",g=`max(1, ${i})`;let m,v,y,b,_;f.mult=.5,m={enter:v={opacity:MU,x:{signal:d,mult:.5,offset:u},y:f},update:y={opacity:OU,x:v.x,y:v.y},exit:{opacity:MU}};let x=null,w=null;e.fill||(x=t.symbolBaseFillColor,w=t.symbolBaseStrokeColor),PB(m,{fill:o("symbolFillColor",x),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",w),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")}),EU.forEach((t=>{e[t]&&(y[t]=v[t]={scale:e[t],field:_U})}));const A=UU({type:"symbol",role:"legend-symbol",key:_U,from:h,clip:!!c||void 0,encode:m},n.symbols),k=IB(u);k.offset=o("labelOffset"),m={enter:v={opacity:MU,x:{signal:d,offset:k},y:f},update:y={opacity:OU,text:{field:yU},x:v.x,y:v.y},exit:{opacity:MU}},PB(m,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const T=UU({type:RU,role:UB,style:xU,key:_U,from:h,encode:m},n.labels);return m={enter:{noBound:{value:!c},width:MU,height:c?IB(c):MU,opacity:MU},exit:{opacity:MU},update:y={opacity:OU,row:{signal:null},column:{signal:null}}},o.isVertical(!0)?(b=`ceil(item.mark.items.length / ${g})`,y.row.signal=`${p}%${b}`,y.column.signal=`floor(${p} / ${b})`,_={field:["row",p]}):(y.row.signal=`floor(${p} / ${g})`,y.column.signal=`${p} % ${g}`,_={field:p}),y.column.signal=`(${i})?${y.column.signal}:${p}`,PU({role:jB,from:r={facet:{data:r,name:"value",groupby:"index"}},encode:NB(m,a,CU),marks:[A,T],name:l,interactive:s,sort:_})}const WU='item.orient === "left"',GU='item.orient === "right"',YU=`(${WU} || ${GU})`,XU=`datum.vgrad && ${YU}`,ZU=FU('"top"','"bottom"','"middle"'),KU=`datum.vgrad && ${GU} ? (${FU('"right"','"left"','"center"')}) : (${YU} && !(datum.vgrad && ${WU})) ? "left" : ${BU}`,JU=`item._anchor || (${YU} ? "middle" : "start")`,QU=`${XU} ? (${WU} ? -90 : 90) : 0`,eV=`${YU} ? (datum.vgrad ? (${GU} ? "bottom" : "top") : ${ZU}) : "top"`;function tV(e,t){let n;return we(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+nV(e.path)+")":e.sphere&&(n="geoShape("+nV(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e}function nV(e){return we(e)&&e.signal?e.signal:Tt(e)}function rV(e){const t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")&&t.indexOf("title")?e.type===LU?jB:t||FB:t}function iV(e){return{marktype:e.type,name:e.name||void 0,role:e.role||rV(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function oV(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function aV(e,t){const n=qs(e.type);n||oe("Unrecognized transform type: "+Tt(e.type));const r=nj(n.type.toLowerCase(),null,sV(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(r)),r.metadata=n.metadata||{},r}function sV(e,t,n){const r={},i=e.params.length;for(let o=0;o<i;++o){const i=e.params[o];r[i.name]=lV(i,t,n)}return r}function lV(e,t,n){const r=e.type,i=t[e.name];return"index"===r?function(e,t,n){return vt(t.from)||oe('Lookup "from" parameter must be a string literal.'),n.getData(t.from).lookupRef(n,t.key)}(0,t,n):void 0!==i?"param"===r?function(e,t,n){const r=t[e.name];return e.array?(xe(r)||oe("Expected an array of sub-parameters. Instead: "+Tt(r)),r.map((t=>uV(e,t,n)))):uV(e,r,n)}(e,t,n):"projection"===r?n.projectionRef(t[e.name]):e.array&&!hj(i)?i.map((t=>cV(e,t,n))):cV(e,i,n):void(e.required&&oe("Missing required "+Tt(t.type)+" parameter: "+Tt(e.name)))}function cV(e,t,n){const r=e.type;if(hj(t))return pV(r)?oe("Expression references can not be signals."):gV(r)?n.fieldRef(t):mV(r)?n.compareRef(t):n.signalRef(t.signal);{const i=e.expr||gV(r);return i&&hV(t)?n.exprRef(t.expr,t.as):i&&dV(t)?oj(t.field,t.as):pV(r)?iF(t,n):fV(r)?ij(n.getData(t).values):gV(r)?oj(t):mV(r)?n.compareRef(t):t}}function uV(e,t,n){const r=e.params.length;let i;for(let n=0;n<r;++n){i=e.params[n];for(const e in i.key)if(i.key[e]!==t[e]){i=null;break}if(i)break}i||oe("Unsupported parameter: "+Tt(t));const o=nt(sV(i,t,n),i.key);return ij(n.add(Uj(o)))}const hV=e=>e&&e.expr,dV=e=>e&&e.field,fV=e=>"data"===e,pV=e=>"expr"===e,gV=e=>"field"===e,mV=e=>"compare"===e;function vV(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:ij(t.getData(e.data).output)}function yV(e,t,n,r,i){this.scope=e,this.input=t,this.output=n,this.values=r,this.aggregate=i,this.index={}}function bV(e){return vt(e)?e:null}function _V(e,t,n){const r=lj(n.op,n.field);let i;if(t.ops){for(let e=0,n=t.as.length;e<n;++e)if(t.as[e]===r)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((i=n.op.signal)?e.signalRef(i):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(r))}function xV(e,t,n,r,i,o,a){const s=t[n]||(t[n]={}),l=function(e){return we(e)?("descending"===e.order?"-":"+")+lj(e.op,e.field):""}(o);let c,u,h=bV(i);if(null!=h&&(e=t.scope,h+=l?"|"+l:"",c=s[h]),!c){const n=o?{field:aj,pulse:t.countsRef(e,i,o)}:{field:e.fieldRef(i),pulse:ij(t.output)};l&&(n.sort=e.sortRef(o)),u=e.add(nj(r,void 0,n)),a&&(t.index[i]=u),c=ij(u),null!=h&&(s[h]=c)}return c}function wV(e,t,n){const r=e.remove,i=e.insert,o=e.toggle,a=e.modify,s=e.values,l=t.add(rj()),c=iF("if("+e.trigger+',modify("'+n+'",'+[i,r,o,a,s].map((e=>null==e?"null":e)).join(",")+"),0)",t);l.update=c.$expr,l.params=c.$params}function AV(e,t){const n=rV(e),r=e.type===LU,i=e.from&&e.from.facet,o=e.overlap;let a,s,l,c,u,h,d,f=e.layout||n===jB||n===BB;const p=n===FB||f||i,g=function(e,t,n){let r,i,o,a,s;return e?(r=e.facet)&&(t||oe("Only group marks can be faceted."),null!=r.field?a=s=vV(r,n):(e.data?s=ij(n.getData(e.data).aggregate):(o=aV(nt({type:"aggregate",groupby:We(r.groupby)},r.aggregate),n),o.params.key=n.keyRef(r.groupby),o.params.pulse=vV(r,n),a=s=ij(n.add(o))),i=n.keyRef(r.groupby,!0))):a=ij(n.add(Ej(null,[{}]))),a||(a=vV(e,n)),{key:i,pulse:a,parent:s}}(e.from,r,t);s=t.add(Mj({key:g.key||(e.key?oj(e.key):void 0),pulse:g.pulse,clean:!r}));const m=ij(s);s=l=t.add(Ej({pulse:m})),s=t.add(zj({markdef:iV(e),interactive:oV(e.interactive,t),clip:tV(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:ij(s)}));const v=ij(s);s=c=t.add(Oj(XB(e.encode,e.type,n,e.style,t,{mod:!1,pulse:v}))),s.params.parent=t.encode(),e.transform&&e.transform.forEach((e=>{const n=aV(e,t),r=n.metadata;(r.generates||r.changes)&&oe("Mark transforms should not generate new data."),r.nomod||(c.params.mod=!0),n.params.pulse=ij(s),t.add(s=n)})),e.sort&&(s=t.add(Xj({sort:t.compareRef(e.sort),pulse:ij(s)})));const y=ij(s);(i||f)&&(f=t.add(Zj({layout:t.objectProperty(e.layout),legends:t.legends,mark:v,pulse:y})),h=ij(f));const b=t.add(Sj({mark:v,pulse:h||y}));d=ij(b),r&&(p&&(a=t.operators,a.pop(),f&&a.pop()),t.pushState(y,h||d,m),i?function(e,t,n){const r=e.from.facet,i=r.name,o=vV(r,t);let a;r.name||oe("Facet must have a name: "+Tt(r)),r.data||oe("Facet must reference a data set: "+Tt(r)),r.field?a=t.add(Vj({field:t.fieldRef(r.field),pulse:o})):r.groupby?a=t.add(Dj({key:t.keyRef(r.groupby),group:ij(t.proxy(n.parent)),pulse:o})):oe("Facet must specify groupby or field: "+Tt(r));const s=t.fork(),l=s.add(Ej()),c=s.add(Yj({pulse:ij(l)}));s.addData(i,new yV(s,l,l,c)),s.addSignal("parent",null),a.params.subflow={$subflow:s.parse(e).toRuntime()}}(e,t,g):p?function(e,t,n){const r=t.add(Vj({pulse:n.pulse})),i=t.fork();i.add(Yj()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(e).toRuntime()}}(e,t,g):t.parse(e),t.popState(),p&&(f&&a.push(f),a.push(b))),o&&(d=function(e,t,n){const r=e.method,i=e.bound,o=e.separation,a={separation:hj(o)?n.signalRef(o.signal):o,method:hj(r)?n.signalRef(r.signal):r,pulse:t};if(e.order&&(a.sort=n.compareRef({field:e.order})),i){const e=i.tolerance;a.boundTolerance=hj(e)?n.signalRef(e.signal):+e,a.boundScale=n.scaleRef(i.scale),a.boundOrient=i.orient}return ij(n.add(jj(a)))}(o,d,t));const _=t.add(Wj({pulse:d})),x=t.add(Yj({pulse:ij(_)},void 0,t.parent()));null!=e.name&&(u=e.name,t.addData(u,new yV(t,l,_,x)),e.on&&e.on.forEach((e=>{(e.insert||e.remove||e.toggle)&&oe("Marks only support modify triggers."),wV(e,t,u)})))}function kV(e,t,n){const r={enter:{},update:{}};return PB(r,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),r}function TV(e,t,n){return t[e]?`scale("${t[e]}",datum)`:zU(e,n[0].encode)}function SV(e,t){const n={enter:{},update:{}};return PB(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:BU},angle:{signal:'item.orient==="left"?-90:item.orient==="right"?90:0'},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),NB(n,t,CU)}function EV(e){const t=Ej({},e);return t.metadata={source:!0},t}function CV(e,t){return Nj({url:t.url?e.property(t.url):void 0,async:t.async?e.property(t.async):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}yV.fromEntries=function(e,t){const n=t.length,r=t[n-1],i=t[n-2];let o=t[0],a=null,s=1;for(o&&"load"===o.type&&(o=t[1]),e.add(t[0]);s<n;++s)t[s].params.pulse=ij(t[s-1]),e.add(t[s]),"aggregate"===t[s].type&&(a=t[s]);return new yV(e,o,i,r,a)},yV.prototype={countsRef(e,t,n){const r=this,i=r.counts||(r.counts={}),o=bV(t);let a,s,l;return null!=o&&(e=r.scope,a=i[o]),a?n&&n.field&&_V(e,a.agg.params,n):(l={groupby:e.fieldRef(t,"key"),pulse:ij(r.output)},n&&n.field&&_V(e,l,n),s=e.add(kj(l)),a=e.add(Ej({pulse:ij(s)})),a={agg:s,ref:ij(a)},null!=o&&(i[o]=a)),a.ref},tuplesRef(){return ij(this.values)},extentRef(e,t){return xV(e,this,"extent","extent",t,!1)},domainRef(e,t){return xV(e,this,"domain","values",t,!1)},valuesRef(e,t,n){return xV(e,this,"vals","values",t,n||!0)},lookupRef(e,t){return xV(e,this,"lookup","tupleindex",t,!1)},indataRef(e,t){return xV(e,this,"indata","tupleindex",t,!0,!0)}};const MV=e=>e===vU||e===pU,OV=(e,t,n)=>hj(e)?NV(e.signal,t,n):e===gU||e===pU?t:n,LV=(e,t,n)=>hj(e)?RV(e.signal,t,n):MV(e)?t:n,DV=(e,t,n)=>hj(e)?PV(e.signal,t,n):MV(e)?n:t,IV=(e,t,n)=>hj(e)?zV(e.signal,t,n):e===pU?{value:t}:{value:n},RV=(e,t,n)=>FV(`${e} === 'top' || ${e} === 'bottom'`,t,n),PV=(e,t,n)=>FV(`${e} !== 'top' && ${e} !== 'bottom'`,t,n),NV=(e,t,n)=>jV(`${e} === 'left' || ${e} === 'top'`,t,n),zV=(e,t,n)=>jV(`${e} === 'top'`,t,n),FV=(e,t,n)=>(t=null!=t?IB(t):t,n=null!=n?IB(n):n,BV(t)&&BV(n)?{signal:`${e} ? (${t=t?t.signal||Tt(t.value):null}) : (${n=n?n.signal||Tt(n.value):null})`}:[nt({test:e},t)].concat(n||[])),BV=e=>null==e||1===Object.keys(e).length,jV=(e,t,n)=>({signal:`${e} ? (${VV(t)}) : (${VV(n)})`}),UV=(e,t,n,r,i)=>({signal:(null!=r?`${e} === 'left' ? (${VV(r)}) : `:"")+(null!=n?`${e} === 'bottom' ? (${VV(n)}) : `:"")+(null!=i?`${e} === 'right' ? (${VV(i)}) : `:"")+(null!=t?`${e} === 'top' ? (${VV(t)}) : `:"")+"(null)"}),VV=e=>hj(e)?e.signal:null==e?null:Tt(e),qV=(e,t)=>{const n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function HV(e,t,n,r){let i;if(t&&at(t,e))return t[e];if(at(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":i="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":i=e[5].toLowerCase()+e.slice(6)}return r["guide-title"][i]}if(e.startsWith("label")){switch(e){case"labelColor":i="fill";break;case"labelFont":case"labelFontSize":i=e[5].toLowerCase()+e.slice(6)}return r["guide-label"][i]}return null}function $V(e){const t={};for(const n of e)if(n)for(const e in n)t[e]=1;return Object.keys(t)}function WV(e,t){return{scale:e.scale,range:t}}function GV(e,t,n,r,i){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+r+","+i+")"}}function YV(e,t,n,r,i,o){const a=NU(e,t),s=e.orient,l=e.scale,c=OV(s,-1,1),u=pj(a("labelFlush")),h=pj(a("labelFlushOffset")),d=a("labelAlign"),f=a("labelBaseline");let p,g=0===u||!!u;const m=IB(i);m.mult=c,m.offset=IB(a("labelPadding")||0),m.offset.mult=c;const v={scale:l,field:_U,band:.5,offset:jU(o.offset,a("labelOffset"))},y=LV(s,g?GV(l,u,'"left"','"right"','"center"'):{value:"center"},((e,t,n)=>hj(e)?((e,t,n)=>jV(`${e} === 'right'`,t,n))(e.signal,t,n):e===mU?{value:t}:{value:n})(s,"left","right")),b=LV(s,IV(s,"bottom","top"),g?GV(l,u,'"top"','"bottom"','"middle"'):{value:"middle"}),_=GV(l,u,`-(${h})`,h,0);g=g&&h;const x={opacity:MU,x:LV(s,v,m),y:DV(s,v,m)},w={enter:x,update:p={opacity:OU,text:{field:yU},x:x.x,y:x.y,align:y,baseline:b},exit:{opacity:MU,x:x.x,y:x.y}};PB(w,{dx:!d&&g?LV(s,_):null,dy:!f&&g?DV(s,_):null}),PB(w,{angle:a("labelAngle"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontWeight:a("labelFontWeight"),fontStyle:a("labelFontStyle"),limit:a("labelLimit"),lineHeight:a("labelLineHeight")},{align:d,baseline:f});const A=a("labelBound");let k=a("labelOverlap");return k=k||A?{separation:a("labelSeparation"),method:k,order:"datum.index",bound:A?{scale:l,orient:s,tolerance:A}:null}:void 0,p.align!==y&&(p.align=qV(p.align,y)),p.baseline!==b&&(p.baseline=qV(p.baseline,b)),UU({type:RU,role:"axis-label",style:xU,key:_U,from:r,encode:w,overlap:k},n)}function XV(e,t){const n=function(e,t){var n,r,i,o=t.config,a=o.style,s=o.axis,l="band"===t.scaleType(e.scale)&&o.axisBand,c=e.orient;if(hj(c)){const e=$V([o.axisX,o.axisY]),t=$V([o.axisTop,o.axisBottom,o.axisLeft,o.axisRight]);for(i of(n={},e))n[i]=LV(c,HV(i,o.axisX,s,a),HV(i,o.axisY,s,a));for(i of(r={},t))r[i]=UV(c.signal,HV(i,o.axisTop,s,a),HV(i,o.axisBottom,s,a),HV(i,o.axisLeft,s,a),HV(i,o.axisRight,s,a))}else n=c===pU||c===vU?o.axisX:o.axisY,r=o["axis"+c[0].toUpperCase()+c.slice(1)];return n||r||l?nt({},s,n,r,l):s}(e,t),r=e.encode||{},i=r.axis||{},o=i.name||void 0,a=i.interactive,s=i.style,l=NU(e,n),c=function(e){const t=e("tickBand");let n,r,i=e("tickOffset");return t?t.signal?(n={signal:`(${t.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${t.signal}) === 'extent'`},we(i)||(i={signal:`(${t.signal}) === 'extent' ? 0 : ${i}`})):"extent"===t?(n=1,r=!0,i=0):(n=.5,r=!1):(n=e("bandPosition"),r=e("tickExtra")),{extra:r,band:n,offset:i}}(l),u={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=e.title},h=ij(t.add(Ej({},[u]))),d=ij(t.add(Tj({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),f=[];let p;return u.grid&&f.push(function(e,t,n,r,i){const o=NU(e,t),a=e.orient,s=e.gridScale,l=OV(a,1,-1),c=function(e,t){if(1===t);else if(we(e)){let n=e=nt({},e);for(;null!=n.mult;){if(!we(n.mult))return n.mult=hj(t)?{signal:`(${n.mult}) * (${t.signal})`}:n.mult*t,e;n=n.mult=nt({},n.mult)}n.mult=t}else e=hj(t)?{signal:`(${t.signal}) * (${e||0})`}:t*(e||0);return e}(e.offset,l);let u,h,d;const f={enter:u={opacity:MU},update:d={opacity:OU},exit:h={opacity:MU}};PB(f,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:e.scale,field:_U,band:i.band,extra:i.extra,offset:i.offset,round:o("tickRound")},g=LV(a,{signal:"height"},{signal:"width"}),m=s?{scale:s,range:0,mult:l,offset:c}:{value:0,offset:c},v=s?{scale:s,range:1,mult:l,offset:c}:nt(g,{mult:l,offset:c});return u.x=d.x=LV(a,p,m),u.y=d.y=DV(a,p,m),u.x2=d.x2=DV(a,v),u.y2=d.y2=LV(a,v),h.x=LV(a,p),h.y=DV(a,p),UU({type:IU,role:"axis-grid",key:_U,from:r,encode:f},n)}(e,n,r.grid,d,c)),u.ticks&&(p=l("tickSize"),f.push(function(e,t,n,r,i,o){const a=NU(e,t),s=e.orient,l=OV(s,-1,1);let c,u,h;const d={enter:c={opacity:MU},update:h={opacity:OU},exit:u={opacity:MU}};PB(d,{stroke:a("tickColor"),strokeCap:a("tickCap"),strokeDash:a("tickDash"),strokeDashOffset:a("tickDashOffset"),strokeOpacity:a("tickOpacity"),strokeWidth:a("tickWidth")});const f=IB(i);f.mult=l;const p={scale:e.scale,field:_U,band:o.band,extra:o.extra,offset:o.offset,round:a("tickRound")};return h.y=c.y=LV(s,MU,p),h.y2=c.y2=LV(s,f),u.x=LV(s,p),h.x=c.x=DV(s,MU,p),h.x2=c.x2=DV(s,f),u.y=DV(s,p),UU({type:IU,role:"axis-tick",key:_U,from:r,encode:d},n)}(e,n,r.ticks,d,p,c))),u.labels&&(p=u.ticks?p:0,f.push(YV(e,n,r.labels,d,p,c))),u.domain&&f.push(function(e,t,n,r){const i=NU(e,t),o=e.orient;let a,s;const l={enter:a={opacity:MU},update:s={opacity:OU},exit:{opacity:MU}};PB(l,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const c=WV(e,0),u=WV(e,1);return a.x=s.x=LV(o,c,MU),a.x2=s.x2=LV(o,u),a.y=s.y=DV(o,c,MU),a.y2=s.y2=DV(o,u),UU({type:IU,role:"axis-domain",from:r,encode:l},n)}(e,n,r.domain,h)),u.title&&f.push(function(e,t,n,r){const i=NU(e,t),o=e.orient,a=OV(o,-1,1);let s,l;const c={enter:s={opacity:MU,anchor:IB(i("titleAnchor",null)),align:{signal:BU}},update:l=nt({},s,{opacity:OU,text:IB(e.title)}),exit:{opacity:MU}},u={signal:`lerp(range("${e.scale}"), ${FU(0,1,.5)})`};return l.x=LV(o,u),l.y=DV(o,u),s.angle=LV(o,MU,((e,t)=>hj(e)?{signal:`(${e.signal}) * 90`}:{value:90*e})(a)),s.baseline=LV(o,IV(o,vU,pU),{value:vU}),l.angle=s.angle,l.baseline=s.baseline,PB(c,{fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),angle:i("titleAngle"),baseline:i("titleBaseline")}),function(e,t,n,r){const i=(e,t)=>null!=e?(n.update[t]=qV(IB(e),n.update[t]),!1):!zB(t,r),o=i(e("titleX"),"x"),a=i(e("titleY"),"y");n.enter.auto=a===o?IB(a):LV(t,IB(a),IB(o))}(i,o,c,n),c.update.align=qV(c.update.align,s.align),c.update.angle=qV(c.update.angle,s.angle),c.update.baseline=qV(c.update.baseline,s.baseline),UU({type:RU,role:"axis-title",style:wU,from:r,encode:c},n)}(e,n,r.title,h)),AV(PU({role:"axis",from:h,encode:NB(ZV(l,e),i,CU),marks:f,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:o,interactive:a,style:s}),t)}function ZV(e,t){const n={enter:{},update:{}};return PB(n,{orient:e("orient"),offset:e("offset")||0,position:fj(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:`abs(span(range("${t.scale}")))`},translate:e("translate"),format:t.format,formatType:t.formatType}),n}function KV(e,t,n){const r=We(e.signals),i=We(e.scales);return n||r.forEach((e=>ej(e,t))),We(e.projections).forEach((e=>function(e,t){const n=t.config.projection||{},r={};for(const n in e)"name"!==n&&(r[n]=fU(e[n],n,t));for(const e in n)null==r[e]&&(r[e]=fU(n[e],e,t));t.addProjection(e.name,r)}(e,t))),i.forEach((e=>function(e,t){const n=e.type||"linear";_y(n)||oe("Unrecognized scale type: "+Tt(n)),t.addScale(e.name,{type:n,domain:void 0})}(e,t))),We(e.data).forEach((e=>function(e,t){const n=[];e.transform&&e.transform.forEach((e=>{n.push(aV(e,t))})),e.on&&e.on.forEach((n=>{wV(n,t,e.name)})),t.addDataPipeline(e.name,function(e,t,n){const r=[];let i,o,a,s,l,c=null,u=!1,h=!1;for(e.values?hj(e.values)||dj(e.format)?(r.push(CV(t,e)),r.push(c=EV())):r.push(c=EV({$ingest:e.values,$format:e.format})):e.url?dj(e.url)||dj(e.format)?(r.push(CV(t,e)),r.push(c=EV())):r.push(c=EV({$request:e.url,$format:e.format})):e.source&&(c=i=We(e.source).map((e=>ij(t.getData(e).output))),r.push(null)),o=0,a=n.length;o<a;++o)s=n[o],l=s.metadata,c||l.source||r.push(c=EV()),r.push(s),l.generates&&(h=!0),l.modifies&&!h&&(u=!0),l.source?c=s:l.changes&&(c=null);return i&&(a=i.length-1,r[0]=$j({derive:u,pulse:a?i:i[0]}),(u||a)&&r.splice(1,0,EV())),c||r.push(EV()),r.push(Yj({})),r}(e,t,n))}(e,t))),i.forEach((e=>eU(e,t))),(n||r).forEach((e=>function(e,t){const n=t.getSignal(e.name);let r=e.update;e.init&&(r?oe("Signals can not include both init and update expressions."):(r=e.init,n.initonly=!0)),r&&(r=iF(r,t),n.update=r.$expr,n.params=r.$params),e.on&&e.on.forEach((e=>function(e,t,n){const r=e.encode,i={target:n};let o=e.events,a=e.update,s=[];o||oe("Signal update missing events specification."),vt(o)&&(o=SB(o,t.isSubscope()?cj:uj)),o=We(o).filter((e=>e.signal||e.scale?(s.push(e),0):1)),s.length>1&&(s=[wj(s)]),o.length&&s.push(o.length>1?{merge:o}:o[0]),null!=r&&(a&&oe("Signal encode and update are mutually exclusive."),a="encode(item(),"+Tt(r)+")"),i.update=vt(a)?iF(a,t):null!=a.expr?iF(a.expr,t):null!=a.value?a.value:null!=a.signal?{$expr:xj,$params:{$value:t.signalRef(a.signal)}}:oe("Invalid signal update specification."),e.force&&(i.options={force:!0}),s.forEach((e=>t.addUpdate(nt(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):mj(e,t)}}(e,t),i))))}(e,t,n.id)))}(e,t))),We(e.axes).forEach((e=>XV(e,t))),We(e.marks).forEach((e=>AV(e,t))),We(e.legends).forEach((e=>function(e,t){const n=t.config.legend,r=e.encode||{},i=NU(e,n),o=r.legend||{},a=o.name||void 0,s=o.interactive,l=o.style,c={};let u,h,d,f=0;EU.forEach((t=>e[t]?(c[t]=e[t],f=f||e[t]):0)),f||oe("Missing valid scale for legend.");const p=function(e,t){let n=e.type||AU;return e.type||1!==function(e){return EU.reduce(((t,n)=>t+(e[n]?1:0)),0)}(e)||!e.fill&&!e.stroke||(n=wy(t)?kU:ky(t)?TU:AU),n!==kU?n:ky(t)?TU:kU}(e,t.scaleType(f)),g={title:null!=e.title,scales:c,type:p,vgrad:"symbol"!==p&&i.isVertical()},m=ij(t.add(Ej(null,[g]))),v=ij(t.add(Pj(h={type:p,scale:t.scaleRef(f),count:t.objectProperty(i("tickCount")),limit:t.property(i("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return p===kU?(d=[VU(e,f,n,r.gradient),HU(e,n,r.labels,v)],h.count=h.count||t.signalRef(`max(2,2*floor((${pj(i.gradientLength())})/100))`)):p===TU?d=[qU(e,f,n,r.gradient,v),HU(e,n,r.labels,v)]:(u=function(e,t){const n=NU(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,n),d=[$U(e,n,r,v,pj(u.columns))],h.size=function(e,t,n){const r=pj(TV("size",e,n)),i=pj(TV("strokeWidth",e,n)),o=pj(function(e,t,n){return zU("fontSize",e)||function(e,t,n){const r=t.config.style["guide-label"];return r&&r.fontSize}(0,t)}(n[1].encode,t));return iF(`max(ceil(sqrt(${r})+${i}),${o})`,t)}(e,t,d[0].marks)),d=[PU({role:"legend-entry",from:m,encode:{enter:{x:{value:0},y:{value:0}}},marks:d,layout:u,interactive:s})],g.title&&d.push(function(e,t,n,r){const i=NU(e,t),o={enter:{opacity:MU},update:{opacity:OU,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:MU}};return PB(o,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:JU},angle:{signal:QU},align:{signal:KU},baseline:{signal:eV},text:e.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),UU({type:RU,role:"legend-title",style:wU,from:r,encode:o},n)}(e,n,r.title,m)),AV(PU({role:"legend",from:m,encode:NB(kV(i,e,n),o,CU),marks:d,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:a,interactive:s,style:l}),t)}(e,t))),e.title&&function(e,t){const n=NU(e=vt(e)?{text:e}:e,t.config.title),r=e.encode||{},i=r.group||{},o=i.name||void 0,a=i.interactive,s=i.style,l=[],c=ij(t.add(Ej(null,[{}])));l.push(function(e,t,n,r){const i={value:0},o={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return PB(o,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),UU({type:RU,role:"title-text",style:"group-title",from:r,encode:o},n)}(e,n,function(e){const t=e.encode;return t&&t.title||nt({name:e.name,interactive:e.interactive,style:e.style},t)}(e),c)),e.subtitle&&l.push(function(e,t,n,r){const i={value:0},o={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return PB(o,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),UU({type:RU,role:"title-subtitle",style:"group-subtitle",from:r,encode:o},n)}(e,n,r.subtitle,c)),AV(PU({role:"title",from:c,encode:SV(n,i),marks:l,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:a,style:s}),t)}(e.title,t),t.parseLambdas(),t}function JV(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function QV(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function eq(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function tq(e){return(xe(e)?nq:rq)(e)}function nq(e){const t=e.length;let n="[";for(let r=0;r<t;++r){const t=e[r];n+=(r>0?",":"")+(we(t)?t.signal||tq(t):Tt(t))}return n+"]"}function rq(e){let t,n,r="{",i=0;for(t in e)n=e[t],r+=(++i>1?",":"")+Tt(t)+":"+(we(n)?n.signal||tq(n):Tt(n));return r+"}"}function iq(e,t,n){return we(e)||oe("Input Vega specification must be an object."),t=ke(function(){const e="sans-serif",t="#4c78a8",n="#000",r="#888",i="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:t},area:{fill:t},image:null,line:{stroke:t,strokeWidth:2},path:{stroke:t},rect:{fill:t},rule:{stroke:n},shape:{stroke:t},symbol:{fill:t,size:64},text:{fill:n,font:e,fontSize:11},trail:{fill:t,size:2},style:{"guide-label":{fill:n,font:e,fontSize:10},"guide-title":{fill:n,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:n,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:n,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:i}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:i,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:i,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),t,e.config),function(e,t){const n=t.config,r=ij(t.root=t.add(rj())),i=function(e,t){const n=n=>fj(e[n],t[n]),r=[JV("background",n("background")),JV("autosize",OB(n("autosize"))),JV("padding",DB(n("padding"))),JV("width",n("width")||0),JV("height",n("height")||0)],i=r.reduce(((e,t)=>(e[t.name]=t,e)),{}),o={};return We(e.signals).forEach((e=>{at(i,e.name)?e=nt(i[e.name],e):r.push(e),o[e.name]=e})),We(t.signals).forEach((e=>{at(o,e.name)||at(i,e.name)||r.push(e)})),r}(e,n);i.forEach((e=>ej(e,t))),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;const o=t.add(Ej()),a=t.add(Oj(XB((e=>NB({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e))(e.encode),LU,BB,e.style,t,{pulse:ij(o)}))),s=t.add(Zj({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:r,pulse:ij(a)}));t.operators.pop(),t.pushState(ij(a),ij(s),null),KV(e,t,i),t.operators.push(s);let l=t.add(Sj({mark:r,pulse:ij(s)}));return l=t.add(Wj({pulse:ij(l)})),l=t.add(Yj({pulse:ij(l)})),t.addData("root",new yV(t,o,o,l)),t}(e,new QV(t,n)).toRuntime()}QV.prototype=eq.prototype={parse(e){return KV(e,this)},fork(){return new eq(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((t=>{t.$ref=e.id})),e.refs=null),e},proxy(e){const t=e instanceof tj?ij(e):e;return this.add(Hj({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){let r,i;e&&(r=e.data||(e.data={}),i=r[t]||(r[t]=[]),i.push(n))}for(e in this.data){t=this.data[e],n(t.input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values");for(const r in t.index)n(t.index[r],e,"index:"+r)}return this},pushState(e,t,n){this._encode.push(ij(this.add(Yj({pulse:e})))),this._parent.push(t),this._lookup.push(n?ij(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return Ee(this._parent)},encode(){return Ee(this._encode)},lookup(){return Ee(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(vt(e))return oj(e,t);e.signal||oe("Unsupported field reference: "+Tt(e));const n=e.signal;let r=this.field[n];if(!r){const e={name:this.signalRef(n)};t&&(e.as=t),this.field[n]=r=ij(this.add(Ij(e)))}return r},compareRef(e){let t=!1;const n=e=>hj(e)?(t=!0,this.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(t=!0,this.exprRef(e.expr)):e,r=We(e.field).map(n),i=We(e.order).map(n);return t?ij(this.add(Cj({fields:r,orders:i}))):sj(r,i)},keyRef(e,t){let n=!1;const r=this.signals;return e=We(e).map((e=>hj(e)?(n=!0,ij(r[e.signal])):e)),n?ij(this.add(Rj({fields:e,flat:t}))):function(e,t){const n={$key:e};return t&&(n.$flat=!0),n}(e,t)},sortRef(e){if(!e)return e;const t=lj(e.op,e.field),n=e.order||"ascending";return n.signal?ij(this.add(Cj({fields:t,orders:this.signalRef(n.signal)}))):sj(t,n)},event(e,t){const n=e+":"+t;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},hasOwnSignal(e){return at(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&oe("Duplicate signal name: "+Tt(e));const n=t instanceof tj?t:this.add(rj(t));return this.signals[e]=n},getSignal(e){return this.signals[e]||oe("Unrecognized signal name: "+Tt(e)),this.signals[e]},signalRef(e){return this.signals[e]?ij(this.signals[e]):(at(this.lambdas,e)||(this.lambdas[e]=this.add(rj(null))),ij(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,n=e.length;t<n;++t){const n=e[t],r=iF(n,this),i=this.lambdas[n];i.params=r.$params,i.update=r.$expr}},property(e){return e&&e.signal?this.signalRef(e.signal):e},objectProperty(e){return e&&we(e)?this.signalRef(e.signal||tq(e)):e},exprRef(e,t){const n={expr:iF(e,this)};return t&&(n.expr.$name=t),ij(this.add(Lj(n)))},addBinding(e,t){this.bindings||oe("Nested signals do not support binding: "+Tt(e)),this.bindings.push(nt({signal:e},t))},addScaleProj(e,t){at(this.scales,e)&&oe("Duplicate scale or projection name: "+Tt(e)),this.scales[e]=this.add(t)},addScale(e,t){this.addScaleProj(e,Gj(t))},addProjection(e,t){this.addScaleProj(e,qj(t))},getScale(e){return this.scales[e]||oe("Unrecognized scale name: "+Tt(e)),this.scales[e]},scaleRef(e){return ij(this.getScale(e))},scaleType(e){return this.getScale(e).params.type},projectionRef(e){return this.scaleRef(e)},projectionType(e){return this.scaleType(e)},addData(e,t){return at(this.data,e)&&oe("Duplicate data set name: "+Tt(e)),this.data[e]=t},getData(e){return this.data[e]||oe("Undefined data set name: "+Tt(e)),this.data[e]},addDataPipeline(e,t){return at(this.data,e)&&oe("Duplicate data set name: "+Tt(e)),this.addData(e,yV.fromEntries(this,t))}};nt(Vs,o,s,l,c,u,d,h,f,p,g,m);const oq="5.21.0";var aq={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},sq={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},lq={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const cq=Array.prototype.slice,uq=(e,t,n)=>{const r=n?n(t[0]):t[0];return r[e].apply(r,cq.call(t,1))};var hq={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,r,i,o,a)=>new Date(e,t||0,null!=n?n:1,r||0,i||0,o||0,a||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return uq("join",arguments)},indexof:function(){return uq("indexOf",arguments)},lastindexof:function(){return uq("lastIndexOf",arguments)},slice:function(){return uq("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return uq("substring",arguments,String)},split:function(){return uq("split",arguments,String)},replace:function(){return uq("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const dq=["view","item","group","xy","x","y"],fq={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:aq[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,r=e(t.object);n&&(e.memberDepth+=1);const i=e(t.property);return n&&(e.memberDepth-=1),r[i]},CallExpression:(e,t)=>{const n=t.arguments;let r=t.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(n[0])?e(n[1]):e(n[2]):(e.fn[r]||hq[r]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>sq[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>lq[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce(((t,n)=>{e.memberDepth+=1;const r=e(n.key);return e.memberDepth-=1,t[r]=e(n.value),t}),{})};function pq(e,t,n,r,i,o){const a=e=>fq[e.type](a,e);return a.memberDepth=0,a.fn=Object.create(t),a.params=n,a.datum=r,a.event=i,a.item=o,dq.forEach((e=>a.fn[e]=(...t)=>i.vega[e](...t))),a(e)}var gq={operator(e,t){const n=t.ast,r=e.functions;return e=>pq(n,r,e)},parameter(e,t){const n=t.ast,r=e.functions;return(e,t)=>pq(n,r,t,e)},event(e,t){const n=t.ast,r=e.functions;return e=>pq(n,r,void 0,void 0,e)},handler(e,t){const n=t.ast,r=e.functions;return(e,t)=>{const i=t.item&&t.item.datum;return pq(n,r,e,i,t)}},encode(e,t){const{marktype:n,channels:r}=t,i=e.functions,o="group"===n||"image"===n||"rect"===n;return(e,t)=>{const a=e.datum;let s,l=0;for(const n in r)s=pq(r[n].ast,i,t,a,void 0,e),e[n]!==s&&(e[n]=s,l=1);return"rule"!==n&&function(e,t,n){let r;t.x2&&(t.x?(n&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(e,r,o),l}}};Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,r){return Array.isArray(r)?n.push.apply(n,e.call(r,t-1)):n.push(r),n}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(e){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var mq=n(44394),vq=n.n(mq),yq=n(43239),bq=n.n(yq),_q=n(33751),xq=n.n(_q);function wq(e){return!!e.or}function Aq(e){return!!e.and}function kq(e){return!!e.not}function Tq(e,t){if(kq(e))Tq(e.not,t);else if(Aq(e))for(const n of e.and)Tq(n,t);else if(wq(e))for(const n of e.or)Tq(n,t);else t(e)}function Sq(e,t){return kq(e)?{not:Sq(e.not,t)}:Aq(e)?{and:e.and.map((e=>Sq(e,t)))}:wq(e)?{or:e.or.map((e=>Sq(e,t)))}:t(e)}const Eq=bq(),Cq=vq();function Mq(e){throw new Error(e)}function Oq(e,t){const n={};for(const r of t)at(e,r)&&(n[r]=e[r]);return n}function Lq(e,t){const n=Object.assign({},e);for(const e of t)delete n[e];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>xq()(e))).join(",")})`};const Dq=xq();function Iq(e){if(gt(e))return e;const t=vt(e)?e:xq()(e);if(t.length<250)return t;let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n&=n;return n}function Rq(e){return!1===e||null===e}function Pq(e,t){return e.includes(t)}function Nq(e,t){let n=0;for(const[r,i]of e.entries())if(t(i,r,n++))return!0;return!1}function zq(e,t){let n=0;for(const[r,i]of e.entries())if(!t(i,r,n++))return!1;return!0}function Fq(e,...t){for(const n of t)Bq(e,null!=n?n:{});return e}function Bq(e,t){for(const n of Gq(t))Te(e,n,t[n],!0)}function jq(e,t){const n=[],r={};let i;for(const o of e)i=t(o),i in r||(r[i]=1,n.push(o));return n}function Uq(e,t){const n=Gq(e),r=Gq(t);if(n.length!==r.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function Vq(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function qq(e,t){for(const n of e)if(t.has(n))return!0;return!1}function Hq(e){const t=new Set;for(const n of e){const e=ae(n).map(((e,t)=>0===t?e:`[${e}]`)),r=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of r)t.add(e)}return t}function $q(e,t){return void 0===e||void 0===t||qq(Hq(e),Hq(t))}function Wq(e){return 0===Gq(e).length}const Gq=Object.keys,Yq=Object.values,Xq=Object.entries;function Zq(e){return!0===e||!1===e}function Kq(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function Jq(e,t){return kq(e)?`!(${Jq(e.not,t)})`:Aq(e)?`(${e.and.map((e=>Jq(e,t))).join(") && (")})`:wq(e)?`(${e.or.map((e=>Jq(e,t))).join(") || (")})`:t(e)}function Qq(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&Qq(e[n],t)&&delete e[n],Wq(e)}function eH(e){return e.charAt(0).toUpperCase()+e.substr(1)}function tH(e,t="datum"){const n=ae(e),r=[];for(let e=1;e<=n.length;e++){const i=`[${n.slice(0,e).map(Tt).join("][")}]`;r.push(`${t}${i}`)}return r.join(" && ")}function nH(e,t="datum"){return`${t}[${Tt(ae(e).join("."))}]`}function rH(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function iH(e){return`${ae(e).map(rH).join("\\.")}`}function oH(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function aH(e){return`${ae(e).join(".")}`}function sH(e){return e?ae(e).length:0}function lH(...e){for(const t of e)if(void 0!==t)return t}let cH=42;function uH(e){const t=++cH;return e?String(e)+t:t}function hH(){cH=42}function dH(e){return fH(e)?e:`__${e}`}function fH(e){return e.startsWith("__")}function pH(e){if(void 0!==e)return(e%360+360)%360}function gH(e){return!!gt(e)||!isNaN(e)&&!isNaN(parseFloat(e))}var mH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const vH="row",yH="column",bH="facet",_H="x",xH="y",wH="x2",AH="y2",kH="xOffset",TH="yOffset",SH="radius",EH="radius2",CH="theta",MH="theta2",OH="latitude",LH="longitude",DH="latitude2",IH="longitude2",RH="color",PH="fill",NH="stroke",zH="shape",FH="size",BH="angle",jH="opacity",UH="fillOpacity",VH="strokeOpacity",qH="strokeWidth",HH="strokeDash",$H="text",WH="order",GH="detail",YH="key",XH="tooltip",ZH="href",KH="url",JH="description",QH={theta:1,theta2:1,radius:1,radius2:1};function e$(e){return e in QH}const t$={longitude:1,longitude2:1,latitude:1,latitude2:1},n$=Gq(t$),r$=Object.assign(Object.assign(Object.assign(Object.assign({},{x:1,y:1,x2:1,y2:1}),QH),t$),{xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1});function i$(e){return e===RH||e===PH||e===NH}const o$={row:1,column:1,facet:1},a$=Gq(o$),s$=Object.assign(Object.assign({},r$),o$),l$=Gq(s$),{order:c$,detail:u$,tooltip:h$}=s$,d$=mH(s$,["order","detail","tooltip"]),{row:f$,column:p$,facet:g$}=d$,m$=mH(d$,["row","column","facet"]);function v$(e){return!!s$[e]}Gq(d$),Gq(m$);const y$=[wH,AH,DH,IH,MH,EH];function b$(e){return _$(e)!==e}function _$(e){switch(e){case wH:return _H;case AH:return xH;case DH:return OH;case IH:return LH;case MH:return CH;case EH:return SH}return e}function x$(e){if(e$(e))switch(e){case CH:return"startAngle";case MH:return"endAngle";case SH:return"outerRadius";case EH:return"innerRadius"}return e}function w$(e){switch(e){case _H:return wH;case xH:return AH;case OH:return DH;case LH:return IH;case CH:return MH;case SH:return EH}}function A$(e){switch(e){case _H:case wH:return"width";case xH:case AH:return"height"}}function k$(e){switch(e){case _H:return"xOffset";case xH:return"yOffset"}}function T$(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const S$=Gq(r$),{x:E$,y:C$,x2:M$,y2:O$,xOffset:L$,yOffset:D$,latitude:I$,longitude:R$,latitude2:P$,longitude2:N$,theta:z$,theta2:F$,radius:B$,radius2:j$}=r$,U$=mH(r$,["x","y","x2","y2","xOffset","yOffset","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),V$=Gq(U$),q$={x:1,y:1},H$=Gq(q$);function $$(e){return e in q$}const W$={theta:1,radius:1},G$=Gq(W$);function Y$(e){return"width"===e?_H:xH}const X$={xOffset:1,yOffset:1};function Z$(e){return e in X$}Gq(X$);const{text:K$,tooltip:J$,href:Q$,url:eW,description:tW,detail:nW,key:rW,order:iW}=U$,oW=mH(U$,["text","tooltip","href","url","description","detail","key","order"]),aW=Gq(oW),sW=Object.assign(Object.assign(Object.assign(Object.assign({},q$),W$),X$),oW),lW=Gq(sW);function cW(e){return!!sW[e]}const uW={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:hW}=uW,dW=mH(uW,["geoshape"]);function fW(e){switch(e){case _H:case xH:case CH:case SH:case kH:case TH:case FH:case BH:case qH:case jH:case UH:case VH:case wH:case AH:case MH:case EH:return;case bH:case vH:case yH:case zH:case HH:case $H:case XH:case ZH:case KH:case JH:return"discrete";case RH:case PH:case NH:return"flexible";case OH:case LH:case DH:case IH:case GH:case YH:case WH:return}}const pW={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},gW={count:1,min:1,max:1};function mW(e){return!!e&&!!e.argmin}function vW(e){return!!e&&!!e.argmax}function yW(e){return vt(e)&&!!pW[e]}const bW=new Set(["count","valid","missing","distinct"]);function _W(e){return vt(e)&&bW.has(e)}const xW=new Set(["count","sum","distinct","valid","missing"]),wW=new Set(["mean","average","median","q1","q3","min","max"]);function AW(e){return dt(e)&&(e=kZ(e,void 0)),"bin"+Gq(e).map((t=>EW(e[t])?Kq(`_${t}_${Xq(e[t])}`):Kq(`_${t}_${e[t]}`))).join("")}function kW(e){return!0===e||SW(e)&&!e.binned}function TW(e){return"binned"===e||SW(e)&&!0===e.binned}function SW(e){return we(e)}function EW(e){return null==e?void 0:e.param}function CW(e){switch(e){case vH:case yH:case FH:case RH:case PH:case NH:case qH:case jH:case UH:case VH:case zH:return 6;case HH:return 4;default:return 10}}function MW(e){return e&&!!e.expr}function OW(e){const t=Gq(e||{}),n={};for(const r of t)n[r]=UW(e[r]);return n}function LW(e){const{anchor:t,frame:n,offset:r,orient:i,angle:o,limit:a,color:s,subtitleColor:l,subtitleFont:c,subtitleFontSize:u,subtitleFontStyle:h,subtitleFontWeight:d,subtitleLineHeight:f,subtitlePadding:p}=e,g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["anchor","frame","offset","orient","angle","limit","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),m=Object.assign(Object.assign({},g),s?{fill:s}:{}),v=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t?{anchor:t}:{}),n?{frame:n}:{}),r?{offset:r}:{}),i?{orient:i}:{}),void 0!==o?{angle:o}:{}),void 0!==a?{limit:a}:{}),y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l?{subtitleColor:l}:{}),c?{subtitleFont:c}:{}),u?{subtitleFontSize:u}:{}),h?{subtitleFontStyle:h}:{}),d?{subtitleFontWeight:d}:{}),f?{subtitleLineHeight:f}:{}),p?{subtitlePadding:p}:{});return{titleMarkConfig:m,subtitleMarkConfig:Oq(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:v,subtitle:y}}function DW(e){return vt(e)||xe(e)&&vt(e[0])}function IW(e){return e&&!!e.signal}function RW(e){return!!e.step}function PW(e){return!xe(e)&&"field"in e&&"data"in e}const NW=Gq({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),zW={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},FW=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];var BW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function jW(e){const t=xe(e.condition)?e.condition.map(VW):VW(e.condition);return Object.assign(Object.assign({},UW(e)),{condition:t})}function UW(e){if(MW(e)){const{expr:t}=e,n=BW(e,["expr"]);return Object.assign({signal:t},n)}return e}function VW(e){if(MW(e)){const{expr:t}=e,n=BW(e,["expr"]);return Object.assign({signal:t},n)}return e}function qW(e){if(MW(e)){const{expr:t}=e,n=BW(e,["expr"]);return Object.assign({signal:t},n)}return IW(e)?e:void 0!==e?{value:e}:void 0}function HW(e){return IW(e)?e.signal:Tt(e)}function $W(e){return IW(e)?e.signal:Tt(e.value)}function WW(e){return IW(e)?e.signal:null==e?null:Tt(e)}function GW(e){var t;return[].concat(e.type,null!==(t=e.style)&&void 0!==t?t:[])}function YW(e,t,n,r={}){const{vgChannel:i,ignoreVgConfig:o}=r;return i&&void 0!==t[i]?t[i]:void 0!==t[e]?t[e]:!o||i&&i!==e?XW(e,t,n,r):void 0}function XW(e,t,n,{vgChannel:r}={}){return lH(r?ZW(e,t,n.style):void 0,ZW(e,t,n.style),r?n[t.type][r]:void 0,n[t.type][e],r?n.mark[r]:n.mark[e])}function ZW(e,t,n){return KW(e,GW(t),n)}function KW(e,t,n){let r;t=We(t);for(const i of t){const t=n[i];t&&void 0!==t[e]&&(r=t[e])}return r}function JW(e,t){return We(e).reduce(((e,n)=>{var r;return e.field.push(uZ(n,t)),e.order.push(null!==(r=n.sort)&&void 0!==r?r:"ascending"),e}),{field:[],order:[]})}function QW(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if(Eq(t,e))return;n.push(e)})),n}function eG(e,t){return Eq(e,t)||!t?e:e?[...We(e),...We(t)].join(", "):t}function tG(e,t){const n=e.value,r=t.value;if(null==n||null===r)return{explicit:e.explicit,value:null};if((DW(n)||IW(n))&&(DW(r)||IW(r)))return{explicit:e.explicit,value:eG(n,r)};if(DW(n)||IW(n))return{explicit:e.explicit,value:n};if(DW(r)||IW(r))return{explicit:e.explicit,value:r};if(!(DW(n)||IW(n)||DW(r)||IW(r)))return{explicit:e.explicit,value:QW(n,r)};throw new Error("It should never reach here")}function nG(e){return`Invalid specification ${Dq(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}function rG(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function iG(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function oG(e){return e?`Dropping "fit-${e}" because spec has discrete ${A$(e)}.`:'Dropping "fit" because spec has discrete size.'}function aG(e){return`Unknown field for ${e}. Cannot calculate view size.`}function sG(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function lG(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function cG(e){return`Selection not supported for ${e} yet.`}function uG(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function hG(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function dG(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function fG(e){return`${e}Offset dropped because ${e} is continuous`}function pG(e){return`There is no ${e} encoding. Replacing ${e}Offset encoding as ${e}.`}function gG(e){return`Invalid field type "${e}".`}function mG(e,t){const{fill:n,stroke:r}=t;return`Dropping color ${e} as the plot also has ${n&&r?"fill and stroke":n?"fill":"stroke"}.`}function vG(e,t){return`Dropping ${Dq(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function yG(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function bG(e){return`${e} encoding has no scale, so specified scale is ignored.`}function _G(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function xG(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function wG(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function AG(e){return`Using unaggregated domain with raw field has no effect (${Dq(e)}).`}function kG(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function TG(e){return`Unaggregated domain is currently unsupported for log scale (${Dq(e)}).`}function SG(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function EG(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const CG="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function MG(e,t){return`Invalid ${e}: ${Dq(t)}.`}function OG(e){return`1D error band does not support ${e}.`}function LG(e){return`Channel ${e} is required for "binned" bin.`}const DG=_e(ve);let IG=DG;function RG(...e){IG.warn(...e)}function PG(e){if(e&&we(e))for(const t of qG)if(t in e)return!0;return!1}new WeakMap;const NG=["january","february","march","april","may","june","july","august","september","october","november","december"],zG=NG.map((e=>e.substr(0,3))),FG=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],BG=FG.map((e=>e.substr(0,3)));function jG(e,t){const n=[];if(t&&void 0!==e.day&&Gq(e).length>1&&(RG(function(e){return`Dropping day from datetime ${Dq(e)} as day cannot be combined with other units.`}(e)),delete(e=Cq(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){const r=t?function(e){if(gH(e)&&(e=+e),gt(e))return e-1;{const t=e.toLowerCase(),n=NG.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),i=zG.indexOf(r);if(-1!==i)return i;throw new Error(MG("month",e))}}(e.month):e.month;n.push(r)}else if(void 0!==e.quarter){const r=t?function(e){if(gH(e)&&(e=+e),gt(e))return e>4&&RG(MG("quarter",e)),e-1;throw new Error(MG("quarter",e))}(e.quarter):e.quarter;n.push(gt(r)?3*r:`${r}*3`)}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){const r=t?function(e){if(gH(e)&&(e=+e),gt(e))return e%7;{const t=e.toLowerCase(),n=FG.indexOf(t);if(-1!==n)return n;const r=t.substr(0,3),i=BG.indexOf(r);if(-1!==i)return i;throw new Error(MG("day",e))}}(e.day):e.day;n.push(gt(r)?r+1:`${r}+1`)}else n.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const r=e[t];n.push(void 0===r?0:r)}return n}function UG(e){const t=jG(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const VG={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},qG=Gq(VG);function HG(e){return e.startsWith("utc")}const $G={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function WG(e){return qG.filter((t=>GG(e,t)))}function GG(e,t){const n=e.indexOf(t);return!(n<0||n>0&&"seconds"===t&&"i"===e.charAt(n-1)||e.length>n+3&&"day"===t&&"o"===e.charAt(n+3)||n>0&&"year"===t&&"f"===e.charAt(n-1))}function YG(e){if(!e)return;const t=WG(e);return`timeUnitSpecifier(${Dq(t)}, ${Dq($G)})`}function XG(e){if(!e)return;let t;return vt(e)?t={unit:e}:we(e)&&(t=Object.assign(Object.assign({},e),e.unit?{unit:e.unit}:{})),HG(t.unit)&&(t.utc=!0,t.unit=function(e){return e.substr(3)}(t.unit)),t}function ZG(e){return e&&!!e.field&&void 0!==e.equal}function KG(e){return e&&!!e.field&&void 0!==e.lt}function JG(e){return e&&!!e.field&&void 0!==e.lte}function QG(e){return e&&!!e.field&&void 0!==e.gt}function eY(e){return e&&!!e.field&&void 0!==e.gte}function tY(e){if(null==e?void 0:e.field){if(xe(e.range)&&2===e.range.length)return!0;if(IW(e.range))return!0}return!1}function nY(e){return e&&!!e.field&&(xe(e.oneOf)||xe(e.in))}function rY(e){return nY(e)||ZG(e)||tY(e)||KG(e)||QG(e)||JG(e)||eY(e)}function iY(e,t){return EZ(e,{timeUnit:t,wrapTime:!0})}function oY(e,t=!0){var n;const{field:r}=e,i=null===(n=XG(e.timeUnit))||void 0===n?void 0:n.unit,o=i?`time(${function(e,t,{end:n}={end:!1}){const r=tH(t),i=HG(e)?"utc":"";let o;const a={};for(const t of qG)GG(e,t)&&(a[t]="quarter"===(s=t)?`(${i}quarter(${r})-1)`:`${i}${s}(${r})`,o=t);var s;return n&&(a[o]+="+1"),function(e){const t=jG(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(a)}(i,r)})`:uZ(e,{expr:"datum"});if(ZG(e))return`${o}===${iY(e.equal,i)}`;if(KG(e))return`${o}<${iY(e.lt,i)}`;if(QG(e))return`${o}>${iY(e.gt,i)}`;if(JG(e))return`${o}<=${iY(e.lte,i)}`;if(eY(e))return`${o}>=${iY(e.gte,i)}`;if(nY(e))return`indexof([${function(e,t){return e.map((e=>iY(e,t)))}(e.oneOf,i).join(",")}], ${o}) !== -1`;if(function(e){return e&&!!e.field&&void 0!==e.valid}(e))return aY(o,e.valid);if(tY(e)){const{range:n}=e,r=IW(n)?{signal:`${n.signal}[0]`}:n[0],a=IW(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==r&&null!==a&&t)return"inrange("+o+", ["+iY(r,i)+", "+iY(a,i)+"])";const s=[];return null!==r&&s.push(`${o} >= ${iY(r,i)}`),null!==a&&s.push(`${o} <= ${iY(a,i)}`),s.length>0?s.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Dq(e)}`)}function aY(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function sY(e){var t;return rY(e)&&e.timeUnit?Object.assign(Object.assign({},e),{timeUnit:null===(t=XG(e.timeUnit))||void 0===t?void 0:t.unit}):e}const lY={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function cY(e){return"ordinal"===e||"nominal"===e}const uY=lY.quantitative,hY=lY.ordinal,dY=lY.temporal,fY=lY.nominal,pY=lY.geojson;Gq(lY);const gY="time",mY="utc",vY="point",yY="band",bY={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function _Y(e,t){const n=bY[e],r=bY[t];return n===r||"ordinal-position"===n&&"time"===r||"ordinal-position"===r&&"time"===n}Gq(bY);const xY={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function wY(e){return xY[e]}const AY=new Set(["linear","log","pow","sqrt","symlog"]),kY=new Set([...AY,"time","utc"]);function TY(e){return AY.has(e)}const SY=new Set(["quantile","quantize","threshold"]),EY=new Set([...kY,...SY,"sequential","identity"]),CY=new Set(["ordinal","bin-ordinal","point","band"]);function MY(e){return CY.has(e)}function OY(e){return EY.has(e)}function LY(e){return kY.has(e)}function DY(e){return SY.has(e)}function IY(e){return null==e?void 0:e.param}new Set(["time","utc"]);const RY={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:PY,domain:NY,range:zY,rangeMax:FY,rangeMin:BY,scheme:jY}=(Gq(RY),RY),UY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(RY,["type","domain","range","rangeMax","rangeMin","scheme"]),VY=Gq(UY);function qY(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return LY(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return LY(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"clamp":return LY(e);case"nice":return LY(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return OY(e)&&!Pq(["log","time","utc","threshold","quantile"],e)}}function HY(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return i$(e)?void 0:`Cannot use the scale property "${e}" with non-color channel.`;case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}const $Y={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},WY=$Y.arc,GY=$Y.area,YY=$Y.bar,XY=$Y.image,ZY=$Y.line,KY=$Y.point,JY=$Y.rect,QY=$Y.rule,eX=$Y.text,tX=$Y.tick,nX=$Y.trail,rX=$Y.circle,iX=$Y.square,oX=$Y.geoshape;function aX(e){return["line","area","trail"].includes(e)}function sX(e){return["rect","bar","image","arc"].includes(e)}const lX=new Set(Gq($Y));function cX(e){return e.type}const uX=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],hX=Gq({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),dX=Gq({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function fX(e){return e&&null!=e.band}const pX={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]};function gX(e){const{channel:t,channelDef:n,markDef:r,scale:i,config:o}=e,a=_X(e);return KX(n)&&!_W(n.aggregate)&&i&&LY(i.get("type"))?function({fieldDef:e,channel:t,markDef:n,ref:r,config:i}){return aX(n.type)?r:null===YW("invalid",n,i)?[mX(e,t),r]:r}({fieldDef:n,channel:t,markDef:r,ref:a,config:o}):a}function mX(e,t){const n=vX(e,!0),r="y"===_$(t)?{field:{group:"height"}}:{value:0};return Object.assign({test:n},r)}function vX(e,t=!0){return aY(vt(e)?e:uZ(e,{expr:"datum"}),!t)}function yX(e,t,n,r){const i={};if(t&&(i.scale=t),QX(e)){const{datum:t}=e;PG(t)?i.signal=UG(t):IW(t)?i.signal=t.signal:MW(t)?i.signal=t.expr:i.value=t}else i.field=uZ(e,n);if(r){const{offset:e,band:t}=r;e&&(i.offset=e),t&&(i.band=t)}return i}function bX({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:r,startSuffix:i,bandPosition:o=.5}){const a=0<o&&o<1?"datum":void 0,s=uZ(t,{expr:a,suffix:i}),l=void 0!==n?uZ(n,{expr:a}):uZ(t,{suffix:"end",expr:a}),c={};if(0===o||1===o){c.scale=e;const t=0===o?s:l;c.field=t}else{const t=IW(o)?`${o.signal} * ${s} + (1-${o.signal}) * ${l}`:`${o} * ${s} + ${1-o} * ${l}`;c.signal=`scale("${e}", ${t})`}return r&&(c.offset=r),c}function _X({channel:e,channelDef:t,channel2Def:n,markDef:r,config:i,scaleName:o,scale:a,stack:s,offset:l,defaultRef:c,bandPosition:u}){var h;if(t){if(nZ(t)){const c=null==a?void 0:a.get("type");if(rZ(t)){null!=u||(u=$X({fieldDef:t,fieldDef2:n,markDef:r,config:i}));const{bin:a,timeUnit:h,type:d}=t;if(kW(a)||u&&h&&d===dY)return(null==s?void 0:s.impute)?yX(t,o,{binSuffix:"mid"},{offset:l}):u&&!MY(c)?bX({scaleName:o,fieldOrDatumDef:t,bandPosition:u,offset:l}):yX(t,o,MZ(t,e)?{binSuffix:"range"}:{},{offset:l});if(TW(a)){if(KX(n))return bX({scaleName:o,fieldOrDatumDef:t,fieldOrDatumDef2:n,bandPosition:u,offset:l});RG(LG(e===_H?wH:AH))}}return yX(t,o,MY(c)?{binSuffix:"range"}:{},{offset:l,band:"band"===c?null!==(h=null!=u?u:t.bandPosition)&&void 0!==h?h:.5:void 0})}if(iZ(t)){const n=t.value,r=l?{offset:l}:{};return Object.assign(Object.assign({},xX(e,n)),r)}}return Ye(c)&&(c=c()),c?Object.assign(Object.assign({},c),l?{offset:l}:{}):c}function xX(e,t){return Pq(["x","x2"],e)&&"width"===t?{field:{group:"width"}}:Pq(["y","y2"],e)&&"height"===t?{field:{group:"height"}}:qW(t)}function wX(e){return e&&"number"!==e&&"time"!==e}function AX(e,t,n){return`${e}(${t}${n?`, ${Dq(n)}`:""})`}function kX({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:i,config:o}){var a,s;if(wX(n))return SX({fieldOrDatumDef:e,format:t,formatType:n,expr:r,config:o});const l=TX(e,r,i);if(SZ(e)){const n=function(e,t,n,r,i){return!t||n?`${i?"utc":"time"}Format(${e}, '${n=vt(n)?n:r}')`:function(e,t,n){if(!e)return;const r=YG(e);return`${n||HG(e)?"utc":"time"}Format(${t}, ${r})`}(t,e,i)}(l,KX(e)?null===(a=XG(e.timeUnit))||void 0===a?void 0:a.unit:void 0,t,o.timeFormat,oZ(e)&&(null===(s=e.scale)||void 0===s?void 0:s.type)===mY);return n?{signal:n}:void 0}return t=MX(JX(e),t,o),KX(e)&&kW(e.bin)?{signal:DX(l,uZ(e,{expr:r,binSuffix:"end"}),t,n,o)}:t||"quantitative"===JX(e)?{signal:`${OX(l,t)}`}:{signal:`isValid(${l}) ? ${l} : ""+${l}`}}function TX(e,t,n){return KX(e)?n?`${uZ(e,{expr:t,suffix:"end"})}-${uZ(e,{expr:t,suffix:"start"})}`:uZ(e,{expr:t}):function(e){const{datum:t}=e;return PG(t)?UG(t):`${Dq(t)}`}(e)}function SX({fieldOrDatumDef:e,format:t,formatType:n,expr:r,normalizeStack:i,config:o,field:a}){return null!=a||(a=TX(e,r,i)),KX(e)&&kW(e.bin)?{signal:DX(a,uZ(e,{expr:r,binSuffix:"end"}),t,n,o)}:{signal:AX(n,a,t)}}function EX(e,t,n,r,i,o){var a;if(!wX(r))return SZ(e)?function(e,t,n,r){return e||(t?{signal:YG(t)}:r?void 0:n.timeFormat)}(n,KX(e)?null===(a=XG(e.timeUnit))||void 0===a?void 0:a.unit:void 0,i,o):MX(t,n,i)}function CX(e,t,n){return e&&(IW(e)||"number"===e||"time"===e)?e:SZ(t)&&"time"!==n&&"utc"!==n?"time":void 0}function MX(e,t,n){return vt(t)?t:e===uY?n.numberFormat:void 0}function OX(e,t){return`format(${e}, "${t||""}")`}function LX(e,t,n,r){var i;return wX(n)?AX(n,e,t):OX(e,null!==(i=vt(t)?t:void 0)&&void 0!==i?i:r.numberFormat)}function DX(e,t,n,r,i){const o=LX(e,n,r,i),a=LX(t,n,r,i);return`${aY(e,!1)} ? "null" : ${o} + " " + ${a}`}const IX="min",RX={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function PX(e){return e in RX}function NX(e){return!!e&&!!e.encoding}function zX(e){return!(!e||"count"!==e.op&&!e.field)}function FX(e){return!!e&&xe(e)}function BX(e){return"row"in e||"column"in e}function jX(e){return!!e&&"header"in e}function UX(e){return"facet"in e}var VX=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function qX(e){const{field:t,timeUnit:n,bin:r,aggregate:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign({},n?{timeUnit:n}:{}),r?{bin:r}:{}),i?{aggregate:i}:{}),{field:t})}function HX(e){return"sort"in e}function $X({fieldDef:e,fieldDef2:t,markDef:n,config:r}){if(nZ(e)&&void 0!==e.bandPosition)return e.bandPosition;if(KX(e)){const{timeUnit:i,bin:o}=e;if(i&&!t)return sX(n.type)?0:XW("timeUnitBandPosition",n,r);if(kW(o))return.5}}function WX({channel:e,fieldDef:t,fieldDef2:n,markDef:r,config:i,scaleType:o,useVlSizeChannel:a}){var s,l,c;const u=A$(e),h=YW(a?"size":u,r,i,{vgChannel:u});if(void 0!==h)return h;if(KX(t)){const{timeUnit:e,bin:a}=t;if(e&&!n)return{band:XW("timeUnitBandSize",r,i)};if(kW(a)&&!MY(o))return{band:1}}return sX(r.type)?o?MY(o)?(null===(s=i[r.type])||void 0===s?void 0:s.discreteBandSize)||{band:1}:null===(l=i[r.type])||void 0===l?void 0:l.continuousBandSize:null===(c=i[r.type])||void 0===c?void 0:c.discreteBandSize:void 0}function GX(e,t,n,r){return!!(kW(e.bin)||e.timeUnit&&rZ(e)&&"temporal"===e.type)&&void 0!==$X({fieldDef:e,fieldDef2:t,markDef:n,config:r})}function YX(e){return e&&"condition"in e}function XX(e){const t=e&&e.condition;return!!t&&!xe(t)&&KX(t)}function ZX(e){const t=e&&e.condition;return!!t&&!xe(t)&&nZ(t)}function KX(e){return e&&(!!e.field||"count"===e.aggregate)}function JX(e){return e&&e.type}function QX(e){return e&&"datum"in e}function eZ(e){return rZ(e)&&!hZ(e)||tZ(e)}function tZ(e){return QX(e)&&gt(e.datum)}function nZ(e){return KX(e)||QX(e)}function rZ(e){return e&&("field"in e||"count"===e.aggregate)&&"type"in e}function iZ(e){return e&&"value"in e&&"value"in e}function oZ(e){return e&&("scale"in e||"sort"in e)}function aZ(e){return e&&("axis"in e||"stack"in e||"impute"in e)}function sZ(e){return e&&"legend"in e}function lZ(e){return e&&("format"in e||"formatType"in e)}function cZ(e){return Lq(e,["legend","axis","header","scale"])}function uZ(e,t={}){var n,r,i;let o=e.field;const a=t.prefix;let s=t.suffix,l="";if(function(e){return"count"===e.aggregate}(e))o=dH("count");else{let a;if(!t.nofn)if(function(e){return"op"in e}(e))a=e.op;else{const{bin:c,aggregate:u,timeUnit:h}=e;kW(c)?(a=AW(c),s=(null!==(n=t.binSuffix)&&void 0!==n?n:"")+(null!==(r=t.suffix)&&void 0!==r?r:"")):u?vW(u)?(l=`["${o}"]`,o=`argmax_${u.argmax}`):mW(u)?(l=`["${o}"]`,o=`argmin_${u.argmin}`):a=String(u):h&&(a=function(e){const t=XG(e),{utc:n}=t,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["utc"]);return r.unit?(n?"utc":"")+Gq(r).map((e=>Kq(`${"unit"===e?"":`_${e}_`}${r[e]}`))).join(""):(n?"utc":"")+"timeunit"+Gq(r).map((e=>Kq(`_${e}_${r[e]}`))).join("")}(h),s=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(null!==(i=t.suffix)&&void 0!==i?i:""))}a&&(o=o?`${a}_${o}`:a)}return s&&(o=`${o}_${s}`),a&&(o=`${a}_${o}`),t.forAs?aH(o):t.expr?nH(o,t.expr)+l:iH(o)+l}function hZ(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return KX(e)&&!!e.bin;case"temporal":return!1}throw new Error(gG(e.type))}const dZ=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:n,timeUnit:r,field:i}=e;if(vW(t))return`${i} for argmax(${t.argmax})`;if(mW(t))return`${i} for argmin(${t.argmin})`;const o=XG(r),a=t||(null==o?void 0:o.unit)||(null==o?void 0:o.maxbins)&&"timeunit"||kW(n)&&"bin";return a?`${a.toUpperCase()}(${i})`:i}(e);default:return function(e,t){var n;const{field:r,bin:i,timeUnit:o,aggregate:a}=e;if("count"===a)return t.countTitle;if(kW(i))return`${r} (binned)`;if(o){const e=null===(n=XG(o))||void 0===n?void 0:n.unit;if(e)return`${r} (${WG(e).join("-")})`}else if(a)return vW(a)?`${r} for max ${a.argmax}`:mW(a)?`${r} for min ${a.argmin}`:`${eH(a)} of ${r}`;return r}(e,t)}};let fZ=dZ;function pZ(e){fZ=e}function gZ(e,t,{allowDisabling:n,includeDefault:r=!0}){var i,o;const a=null===(i=mZ(e))||void 0===i?void 0:i.title;if(!KX(e))return null!=a?a:e.title;const s=e,l=r?vZ(s,t):void 0;return n?lH(a,s.title,l):null!==(o=null!=a?a:s.title)&&void 0!==o?o:l}function mZ(e){return aZ(e)&&e.axis?e.axis:sZ(e)&&e.legend?e.legend:jX(e)&&e.header?e.header:void 0}function vZ(e,t){return fZ(e,t)}function yZ(e){var t;if(lZ(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const n=null!==(t=mZ(e))&&void 0!==t?t:{},{format:r,formatType:i}=n;return{format:r,formatType:i}}}function bZ(e){return KX(e)?e:XX(e)?e.condition:void 0}function _Z(e){return nZ(e)?e:ZX(e)?e.condition:void 0}function xZ(e,t,n,r={}){return vt(e)||gt(e)||dt(e)?(RG(function(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Dq(n)}}.`}(t,vt(e)?"string":gt(e)?"number":"boolean",e)),{value:e}):nZ(e)?wZ(e,t,n,r):ZX(e)?Object.assign(Object.assign({},e),{condition:wZ(e.condition,t,n,r)}):e}function wZ(e,t,n,r){if(lZ(e)){const{format:i,formatType:o}=e,a=VX(e,["format","formatType"]);if(wX(o)&&!n.customFormatTypes)return RG(dG(t)),wZ(a,t,n,r)}else{const i=aZ(e)?"axis":sZ(e)?"legend":jX(e)?"header":null;if(i&&e[i]){const o=e[i],{format:a,formatType:s}=o,l=VX(o,["format","formatType"]);if(wX(s)&&!n.customFormatTypes)return RG(dG(t)),wZ(Object.assign(Object.assign({},e),{[i]:l}),t,n,r)}}return KX(e)?AZ(e,t,r):function(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=gt(n)?"quantitative":vt(n)?"nominal":PG(n)?"temporal":void 0,Object.assign(Object.assign({},e),{type:t})}(e)}function AZ(e,t,{compositeMark:n=!1}={}){const{aggregate:r,timeUnit:i,bin:o,field:a}=e,s=Object.assign({},e);if(n||!r||yW(r)||vW(r)||mW(r)||(RG(function(e){return`Invalid aggregation operator "${e}".`}(r)),delete s.aggregate),i&&(s.timeUnit=XG(i)),a&&(s.field=`${a}`),kW(o)&&(s.bin=kZ(o,t)),TW(o)&&!$$(t)&&RG(function(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),rZ(s)){const{type:e}=s,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case uY:return"quantitative";case"t":case dY:return"temporal";case"o":case hY:return"ordinal";case"n":case fY:return"nominal";case pY:return"geojson"}}(e);e!==t&&(s.type=t),"quantitative"!==e&&_W(r)&&(RG(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,r)),s.type="quantitative")}else if(!b$(t)){const e=function(e,t){var n;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(HX(e)&&xe(e.sort))return"ordinal";const{aggregate:r,bin:i,timeUnit:o}=e;if(o)return"temporal";if(i||r&&!vW(r)&&!mW(r))return"quantitative";if(oZ(e)&&(null===(n=e.scale)||void 0===n?void 0:n.type))switch(bY[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(s,t);s.type=e}if(rZ(s)){const{compatible:e,warning:n}=function(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case vH:case yH:case bH:return hZ(e)?TZ:{compatible:!1,warning:_G(t)};case _H:case xH:case kH:case TH:case RH:case PH:case NH:case $H:case GH:case YH:case XH:case ZH:case KH:case BH:case CH:case SH:case JH:return TZ;case LH:case IH:case OH:case DH:return n!==uY?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:TZ;case jH:case UH:case VH:case qH:case FH:case MH:case EH:case wH:case AH:return"nominal"!==n||e.sort?TZ:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case zH:case HH:return hZ(e)||function(e){var t;return oZ(e)&&DY(null===(t=e.scale)||void 0===t?void 0:t.type)}(e)?TZ:{compatible:!1,warning:xG(t)};case WH:return"nominal"!==e.type||"sort"in e?TZ:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(s,t)||{};!1===e&&RG(n)}if(HX(s)&&vt(s.sort)){const{sort:e}=s;if(PX(e))return Object.assign(Object.assign({},s),{sort:{encoding:e}});const t=e.substr(1);if("-"===e.charAt(0)&&PX(t))return Object.assign(Object.assign({},s),{sort:{encoding:t,order:"descending"}})}if(jX(s)){const{header:e}=s;if(e){const{orient:t}=e,n=VX(e,["orient"]);if(t)return Object.assign(Object.assign({},s),{header:Object.assign(Object.assign({},n),{labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t})})}}return s}function kZ(e,t){return dt(e)?{maxbins:CW(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:Object.assign(Object.assign({},e),{maxbins:CW(t)})}const TZ={compatible:!0};function SZ(e){const{formatType:t}=yZ(e);return"time"===t||!t&&function(e){return e&&("temporal"===e.type||KX(e)&&!!e.timeUnit)}(e)}function EZ(e,{timeUnit:t,type:n,wrapTime:r,undefinedIfExprNotRequired:i}){var o;const a=t&&(null===(o=XG(t))||void 0===o?void 0:o.unit);let s,l=a||"temporal"===n;return MW(e)?s=e.expr:IW(e)?s=e.signal:PG(e)?(l=!0,s=UG(e)):(vt(e)||gt(e))&&l&&(s=`datetime(${Dq(e)})`,function(e){return!!VG[e]}(a)&&(gt(e)&&e<1e4||vt(e)&&isNaN(Date.parse(e)))&&(s=UG({[a]:e}))),s?r&&l?`time(${s})`:s:i?void 0:Dq(e)}function CZ(e,t){const{type:n}=e;return t.map((t=>{const r=EZ(t,{timeUnit:KX(e)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==r?{signal:r}:t}))}function MZ(e,t){return kW(e.bin)?cW(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const OZ={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function LZ(e){return e&&e.condition}const DZ=["domain","grid","labels","ticks","title"],IZ={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},RZ={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},PZ=Object.assign(Object.assign({},RZ),{style:1,labelExpr:1,encoding:1});function NZ(e){return!!PZ[e]}Gq(PZ);const zZ=Gq({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function FZ(e){return"mark"in e}class BZ{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!FZ(e)&&function(e){return cX(e)?e.type:e}(e.mark)===this.name}}function jZ(e,t){const n=e&&e[t];return!!n&&(xe(n)?Nq(n,(e=>!!e.field)):KX(n)||XX(n))}function UZ(e,t){const n=e&&e[t];return!!n&&(xe(n)?Nq(n,(e=>!!e.field)):KX(n)||QX(n)||ZX(n))}function VZ(e,t){if($$(t)){const n=e[t];if((KX(n)||QX(n))&&cY(n.type))return UZ(e,k$(t))}return!1}function qZ(e){return Nq(l$,(t=>{if(jZ(e,t)){const n=e[t];if(xe(n))return Nq(n,(e=>!!e.aggregate));{const e=bZ(n);return e&&!!e.aggregate}}return!1}))}function HZ(e,t){const n=[],r=[],i=[],o=[],a={};return GZ(e,((s,l)=>{if(KX(s)){const{field:c,aggregate:u,bin:h,timeUnit:d}=s,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(s,["field","aggregate","bin","timeUnit"]);if(u||d||h){const e=mZ(s),p=null==e?void 0:e.title;let g=uZ(s,{forAs:!0});const m=Object.assign(Object.assign(Object.assign({},p?[]:{title:gZ(s,t,{allowDisabling:!0})}),f),{field:g});if(u){let e;if(vW(u)?(e="argmax",g=uZ({op:"argmax",field:u.argmax},{forAs:!0}),m.field=`${g}.${c}`):mW(u)?(e="argmin",g=uZ({op:"argmin",field:u.argmin},{forAs:!0}),m.field=`${g}.${c}`):"boxplot"!==u&&"errorbar"!==u&&"errorband"!==u&&(e=u),e){const t={op:e,as:g};c&&(t.field=c),o.push(t)}}else if(n.push(g),rZ(s)&&kW(h)){if(r.push({bin:h,field:c,as:g}),n.push(uZ(s,{binSuffix:"end"})),MZ(s,l)&&n.push(uZ(s,{binSuffix:"range"})),$$(l)){const e={field:`${g}_end`};a[`${l}2`]=e}m.bin="binned",b$(l)||(m.type=uY)}else if(d){i.push({timeUnit:d,field:c,as:g});const e=rZ(s)&&s.type!==dY&&"time";e&&(l===$H||l===XH?m.formatType=e:function(e){return!!U$[e]}(l)?m.legend=Object.assign({formatType:e},m.legend):$$(l)&&(m.axis=Object.assign({formatType:e},m.axis)))}a[l]=m}else n.push(c),a[l]=e[l]}else a[l]=e[l]})),{bins:r,timeUnits:i,aggregate:o,groupby:n,encoding:a}}function $Z(e,t,n){const r=function(e,t){return function(e){switch(e){case RH:case PH:case NH:case JH:case GH:case YH:case XH:case ZH:case WH:case jH:case UH:case VH:case qH:case bH:case vH:case yH:return uW;case _H:case xH:case kH:case TH:case OH:case LH:return dW;case wH:case AH:case DH:case IH:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case FH:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case HH:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case zH:return{point:"always",geoshape:"always"};case $H:return{text:"always"};case BH:return{point:"always",square:"always",text:"always"};case KH:return{image:"always"};case CH:case SH:return{text:"always",arc:"always"};case MH:case EH:return{arc:"always"}}}(e)[t]}(t,n);if(!r)return!1;if("binned"===r){const n=e[t===wH?_H:xH];return!!(KX(n)&&KX(e[t])&&TW(n.bin))}return!0}function WZ(e,t){const n={};for(const r of Gq(e)){const i=xZ(e[r],r,t,{compositeMark:!0});n[r]=i}return n}function GZ(e,t,n){if(e)for(const r of Gq(e)){const i=e[r];if(xe(i))for(const e of i)t.call(n,e,r);else t.call(n,i,r)}}function YZ(e,t){return Gq(t).reduce(((n,r)=>{switch(r){case _H:case xH:case ZH:case JH:case KH:case wH:case AH:case kH:case TH:case CH:case MH:case SH:case EH:case OH:case LH:case DH:case IH:case $H:case zH:case BH:case XH:return n;case WH:if("line"===e||"trail"===e)return n;case GH:case YH:{const e=t[r];if(xe(e)||KX(e))for(const t of We(e))t.aggregate||n.push(uZ(t,{}));return n}case FH:if("trail"===e)return n;case RH:case PH:case NH:case jH:case UH:case VH:case HH:case qH:{const e=bZ(t[r]);return e&&!e.aggregate&&n.push(uZ(e,{})),n}}}),[])}var XZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ZZ(e,t,n,r=!0){if("tooltip"in n)return{tooltip:n.tooltip};const i=e.map((({fieldPrefix:e,titlePrefix:n})=>{const i=r?` of ${KZ(t)}`:"";return{field:e+t.field,type:t.type,title:IW(n)?{signal:`${n}"${escape(i)}"`}:n+i}})),o=function(e){const t=[];for(const n of Gq(e))if(jZ(e,n)){const r=We(e[n]);for(const e of r)KX(e)?t.push(e):XX(e)&&t.push(e.condition)}return t}(n).map(cZ);return{tooltip:[...i,...jq(o,Iq)]}}function KZ(e){const{title:t,field:n}=e;return lH(t,n)}function JZ(e,t,n,r,i){const{scale:o,axis:a}=n;return({partName:s,mark:l,positionPrefix:c,endPositionPrefix:u,extraEncoding:h={}})=>{const d=KZ(n);return QZ(e,s,i,{mark:l,encoding:Object.assign(Object.assign(Object.assign({[t]:Object.assign(Object.assign(Object.assign({field:`${c}_${n.field}`,type:n.type},void 0!==d?{title:d}:{}),void 0!==o?{scale:o}:{}),void 0!==a?{axis:a}:{})},vt(u)?{[`${t}2`]:{field:`${u}_${n.field}`}}:{}),r),h)})}}function QZ(e,t,n,r){const{clip:i,color:o,opacity:a}=e,s=e.type;return e[t]||void 0===e[t]&&n[t]?[Object.assign(Object.assign({},r),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[t]),i?{clip:i}:{}),o?{color:o}:{}),a?{opacity:a}:{}),cX(r.mark)?r.mark:{type:r.mark}),{style:`${s}-${t}`}),dt(e[t])?{}:e[t])})]:[]}function eK(e,t,n){const{encoding:r}=e,i="vertical"===t?"y":"x",o=r[i],a=r[`${i}2`],s=r[`${i}Error`],l=r[`${i}Error2`];return{continuousAxisChannelDef:tK(o,n),continuousAxisChannelDef2:tK(a,n),continuousAxisChannelDefError:tK(s,n),continuousAxisChannelDefError2:tK(l,n),continuousAxis:i}}function tK(e,t){if(null==e?void 0:e.aggregate){const{aggregate:n}=e,r=XZ(e,["aggregate"]);return n!==t&&RG(function(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(n,t)),r}return e}function nK(e,t){const{mark:n,encoding:r}=e,{x:i,y:o}=r;if(cX(n)&&n.orient)return n.orient;if(eZ(i)){if(eZ(o)){const e=KX(i)&&i.aggregate,n=KX(o)&&o.aggregate;if(e||n!==t){if(n||e!==t){if(e===t&&n===t)throw new Error("Both x and y cannot have aggregate");return SZ(o)&&!SZ(i)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(eZ(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}var rK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const iK="boxplot",oK=new BZ(iK,sK);function aK(e){return gt(e)?"tukey":e}function sK(e,{config:t}){var n,r;e=Object.assign(Object.assign({},e),{encoding:WZ(e.encoding,t)});const{mark:i,encoding:o,params:a,projection:s}=e,l=rK(e,["mark","encoding","params","projection"]),c=cX(i)?i:{type:i};a&&RG(cG("boxplot"));const u=null!==(n=c.extent)&&void 0!==n?n:t.boxplot.extent,h=YW("size",c,t),d=aK(u),{bins:f,timeUnits:p,transform:g,continuousAxisChannelDef:m,continuousAxis:v,groupby:y,aggregate:b,encodingWithoutContinuousAxis:_,ticksOrient:x,boxOrient:w,customTooltipWithoutAggregatedField:A}=function(e,t,n){const r=nK(e,iK),{continuousAxisChannelDef:i,continuousAxis:o}=eK(e,r,iK),a=i.field,s=aK(t),l=[...lK(a),{op:"median",field:a,as:`mid_box_${a}`},{op:"min",field:a,as:("min-max"===s?"lower_whisker_":"min_")+a},{op:"max",field:a,as:("min-max"===s?"upper_whisker_":"max_")+a}],c="min-max"===s||"tukey"===s?[]:[{calculate:`datum["upper_box_${a}"] - datum["lower_box_${a}"]`,as:`iqr_${a}`},{calculate:`min(datum["upper_box_${a}"] + datum["iqr_${a}"] * ${t}, datum["max_${a}"])`,as:`upper_whisker_${a}`},{calculate:`max(datum["lower_box_${a}"] - datum["iqr_${a}"] * ${t}, datum["min_${a}"])`,as:`lower_whisker_${a}`}],u=e.encoding,h=o,d=(u[h],rK(u,["symbol"==typeof h?h:h+""])),{customTooltipWithoutAggregatedField:f,filteredEncoding:p}=function(e){const{tooltip:t}=e,n=XZ(e,["tooltip"]);if(!t)return{filteredEncoding:n};let r,i;if(xe(t)){for(const e of t)e.aggregate?(r||(r=[]),r.push(e)):(i||(i=[]),i.push(e));r&&(n.tooltip=r)}else t.aggregate?n.tooltip=t:i=t;return xe(i)&&1===i.length&&(i=i[0]),{customTooltipWithoutAggregatedField:i,filteredEncoding:n}}(d),{bins:g,timeUnits:m,aggregate:v,groupby:y,encoding:b}=HZ(p,n),_="vertical"===r?"horizontal":"vertical",x=r;return{bins:g,timeUnits:m,transform:[...g,...m,{aggregate:[...v,...l],groupby:y},...c],groupby:y,aggregate:v,continuousAxisChannelDef:i,continuousAxis:o,encodingWithoutContinuousAxis:b,ticksOrient:_,boxOrient:x,customTooltipWithoutAggregatedField:f}}(e,u,t),{color:k,size:T}=_,S=rK(_,["color","size"]),E=e=>JZ(c,v,m,e,t.boxplot),C=E(S),M=E(_),O=E(Object.assign(Object.assign({},S),T?{size:T}:{})),L=ZZ([{fieldPrefix:"min-max"===d?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===d?"lower_whisker_":"min_",titlePrefix:"Min"}],m,_),D={type:"tick",color:"black",opacity:1,orient:x,invalid:null,aria:!1},I="min-max"===d?L:ZZ([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],m,_),R=[...C({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:I}),...C({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:I}),...C({partName:"ticks",mark:D,positionPrefix:"lower_whisker",extraEncoding:I}),...C({partName:"ticks",mark:D,positionPrefix:"upper_whisker",extraEncoding:I})],P=[..."tukey"!==d?R:[],...M({partName:"box",mark:Object.assign(Object.assign({type:"bar"},h?{size:h}:{}),{orient:w,invalid:null,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:L}),...O({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},we(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{}),h?{size:h}:{}),{orient:x,aria:!1}),positionPrefix:"mid_box",extraEncoding:L})];if("min-max"===d)return Object.assign(Object.assign({},l),{transform:(null!==(r=l.transform)&&void 0!==r?r:[]).concat(g),layer:P});const N=`datum["lower_box_${m.field}"]`,z=`datum["upper_box_${m.field}"]`,F=`(${z} - ${N})`,B=`${N} - ${u} * ${F}`,j=`${z} + ${u} * ${F}`,U=`datum["${m.field}"]`,V={joinaggregate:lK(m.field),groupby:y},q={transform:[{filter:`(${B} <= ${U}) && (${U} <= ${j})`},{aggregate:[{op:"min",field:m.field,as:`lower_whisker_${m.field}`},{op:"max",field:m.field,as:`upper_whisker_${m.field}`},{op:"min",field:`lower_box_${m.field}`,as:`lower_box_${m.field}`},{op:"max",field:`upper_box_${m.field}`,as:`upper_box_${m.field}`},...b],groupby:y}],layer:R},{tooltip:H}=S,$=rK(S,["tooltip"]),{scale:W,axis:G}=m,Y=KZ(m),X=Lq(G,["title"]),Z=QZ(c,"outliers",t.boxplot,{transform:[{filter:`(${U} < ${B}) || (${U} > ${j})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[v]:Object.assign(Object.assign(Object.assign({field:m.field,type:m.type},void 0!==Y?{title:Y}:{}),void 0!==W?{scale:W}:{}),Wq(X)?{}:{axis:X})},$),k?{color:k}:{}),A?{tooltip:A}:{})})[0];let K;const J=[...f,...p,V];return Z?K={transform:J,layer:[Z,q]}:(K=q,K.transform.unshift(...J)),Object.assign(Object.assign({},l),{layer:[K,{transform:g,layer:P}]})}function lK(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}var cK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const uK="errorbar",hK=new BZ(uK,dK);function dK(e,{config:t}){e=Object.assign(Object.assign({},e),{encoding:WZ(e.encoding,t)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:o,ticksOrient:a,markDef:s,outerSpec:l,tooltipEncoding:c}=fK(e,uK,t);delete o.size;const u=JZ(s,i,r,o,t.errorbar),h=s.thickness,d=s.size,f=Object.assign(Object.assign({type:"tick",orient:a,aria:!1},void 0!==h?{thickness:h}:{}),void 0!==d?{size:d}:{}),p=[...u({partName:"ticks",mark:f,positionPrefix:"lower",extraEncoding:c}),...u({partName:"ticks",mark:f,positionPrefix:"upper",extraEncoding:c}),...u({partName:"rule",mark:Object.assign({type:"rule",ariaRoleDescription:"errorbar"},void 0!==h?{size:h}:{}),positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return Object.assign(Object.assign(Object.assign({},l),{transform:n}),p.length>1?{layer:p}:Object.assign({},p[0]))}function fK(e,t,n){var r;const{mark:i,encoding:o,params:a,projection:s}=e,l=cK(e,["mark","encoding","params","projection"]),c=cX(i)?i:{type:i};a&&RG(cG(t));const{orient:u,inputType:h}=function(e,t){const{encoding:n}=e;if(function(e){return(nZ(e.x)||nZ(e.y))&&!nZ(e.x2)&&!nZ(e.y2)&&!nZ(e.xError)&&!nZ(e.xError2)&&!nZ(e.yError)&&!nZ(e.yError2)}(n))return{orient:nK(e,t),inputType:"raw"};const r=function(e){return nZ(e.x2)||nZ(e.y2)}(n),i=function(e){return nZ(e.xError)||nZ(e.xError2)||nZ(e.yError)||nZ(e.yError2)}(n),o=n.x,a=n.y;if(r){if(i)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=n.x2,r=n.y2;if(nZ(e)&&nZ(r))throw new Error(`${t} cannot have both x2 and y2`);if(nZ(e)){if(eZ(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(nZ(r)){if(eZ(a))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=n.xError,r=n.xError2,i=n.yError,s=n.yError2;if(nZ(r)&&!nZ(e))throw new Error(`${t} cannot have xError2 without xError`);if(nZ(s)&&!nZ(i))throw new Error(`${t} cannot have yError2 without yError`);if(nZ(e)&&nZ(i))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(nZ(e)){if(eZ(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(nZ(i)){if(eZ(a))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:d,continuousAxisChannelDef2:f,continuousAxisChannelDefError:p,continuousAxisChannelDefError2:g,continuousAxis:m}=eK(e,u,t),{errorBarSpecificAggregate:v,postAggregateCalculates:y,tooltipSummary:b,tooltipTitleWithFieldName:_}=function(e,t,n,r,i,o,a,s){let l=[],c=[];const u=t.field;let h,d=!1;if("raw"===o){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":s.errorbar.center,n=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===n)&&RG(function(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}(t,n,a)),"stderr"===n||"stdev"===n)l=[{op:n,field:u,as:`extent_${u}`},{op:t,field:u,as:`center_${u}`}],c=[{calculate:`datum["center_${u}"] + datum["extent_${u}"]`,as:`upper_${u}`},{calculate:`datum["center_${u}"] - datum["extent_${u}"]`,as:`lower_${u}`}],h=[{fieldPrefix:"center_",titlePrefix:eH(t)},{fieldPrefix:"upper_",titlePrefix:pK(t,n,"+")},{fieldPrefix:"lower_",titlePrefix:pK(t,n,"-")}],d=!0;else{let e,t,r;"ci"===n?(e="mean",t="ci0",r="ci1"):(e="median",t="q1",r="q3"),l=[{op:t,field:u,as:`lower_${u}`},{op:r,field:u,as:`upper_${u}`},{op:e,field:u,as:`center_${u}`}],h=[{fieldPrefix:"upper_",titlePrefix:gZ({field:u,aggregate:r,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:gZ({field:u,aggregate:t,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:gZ({field:u,aggregate:e,type:"quantitative"},s,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&RG(function(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}(e.center,e.extent)),"aggregated-upper-lower"===o?(h=[],c=[{calculate:`datum["${n.field}"]`,as:`upper_${u}`},{calculate:`datum["${u}"]`,as:`lower_${u}`}]):"aggregated-error"===o&&(h=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`datum["${u}"] + datum["${r.field}"]`,as:`upper_${u}`}],i?c.push({calculate:`datum["${u}"] + datum["${i.field}"]`,as:`lower_${u}`}):c.push({calculate:`datum["${u}"] - datum["${r.field}"]`,as:`lower_${u}`}));for(const e of c)h.push({fieldPrefix:e.as.substring(0,6),titlePrefix:oH(oH(e.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:h,tooltipTitleWithFieldName:d}}(c,d,f,p,g,h,t,n),x=o,w=m,A=(x[w],"x"===m?"x2":"y2"),k=(x[A],"x"===m?"xError":"yError"),T=(x[k],"x"===m?"xError2":"yError2"),S=(x[T],cK(x,["symbol"==typeof w?w:w+"","symbol"==typeof A?A:A+"","symbol"==typeof k?k:k+"","symbol"==typeof T?T:T+""])),{bins:E,timeUnits:C,aggregate:M,groupby:O,encoding:L}=HZ(S,n),D=[...M,...v],I="raw"!==h?[]:O,R=ZZ(b,d,L,_);return{transform:[...null!==(r=l.transform)&&void 0!==r?r:[],...E,...C,...0===D.length?[]:[{aggregate:D,groupby:I}],...y],groupby:I,continuousAxisChannelDef:d,continuousAxis:m,encodingWithoutContinuousAxis:L,ticksOrient:"vertical"===u?"horizontal":"vertical",markDef:c,outerSpec:l,tooltipEncoding:R}}function pK(e,t,n){return`${eH(e)} ${n} ${t}`}const gK="errorband",mK=new BZ(gK,vK);function vK(e,{config:t}){e=Object.assign(Object.assign({},e),{encoding:WZ(e.encoding,t)});const{transform:n,continuousAxisChannelDef:r,continuousAxis:i,encodingWithoutContinuousAxis:o,markDef:a,outerSpec:s,tooltipEncoding:l}=fK(e,gK,t),c=a,u=JZ(c,i,r,o,t.errorband),h=void 0!==e.encoding.x&&void 0!==e.encoding.y;let d={type:h?"area":"rect"},f={type:h?"line":"rule"};const p=Object.assign(Object.assign({},c.interpolate?{interpolate:c.interpolate}:{}),c.tension&&c.interpolate?{tension:c.tension}:{});return h?(d=Object.assign(Object.assign(Object.assign({},d),p),{ariaRoleDescription:"errorband"}),f=Object.assign(Object.assign(Object.assign({},f),p),{aria:!1})):c.interpolate?RG(OG("interpolate")):c.tension&&RG(OG("tension")),Object.assign(Object.assign({},s),{transform:n,layer:[...u({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...u({partName:"borders",mark:f,positionPrefix:"lower",extraEncoding:l}),...u({partName:"borders",mark:f,positionPrefix:"upper",extraEncoding:l})]})}const yK={};function bK(e,t,n){const r=new BZ(e,t);yK[e]={normalizer:r,parts:n}}bK(iK,sK,["box","median","outliers","rule","ticks"]),bK(uK,dK,["ticks","rule"]),bK(gK,vK,["band","borders"]);const _K=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],xK={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},wK={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},AK=Gq(xK),kK=Gq(wK),TK=Gq({header:1,headerRow:1,headerColumn:1,headerFacet:1}),SK=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],EK={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},CK=(Gq(EK),"_vgsid_"),MK={point:{on:"click",fields:[CK],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function OK(e){return!(!e||"legend"!==e&&!e.legend)}function LK(e){return OK(e)&&we(e)}function DK(e){return!!e.select}var IK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function RK(e){const t=[];for(const n of e||[]){if(DK(n))continue;const{expr:e,bind:r}=n,i=IK(n,["expr","bind"]);if(r&&e){const n=Object.assign(Object.assign({},i),{bind:r,init:e});t.push(n)}else{const n=Object.assign(Object.assign(Object.assign({},i),e?{update:e}:{}),r?{bind:r}:{});t.push(n)}}return t}function PK(e){return"concat"in e}function NK(e){return"vconcat"in e}function zK(e){return"hconcat"in e}function FK({step:e,offsetIsDiscrete:t}){var n;return t?null!==(n=e.for)&&void 0!==n?n:"offset":"position"}function BK(e){return we(e)&&void 0!==e.step}function jK(e){return e.view||e.width||e.height}const UK=Gq({align:1,bounds:1,center:1,columns:1,spacing:1});function VK(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e["width"===t?"continuousWidth":"continuousHeight"]}function qK(e,t){const n=HK(e,t);return BK(n)?n.step:$K}function HK(e,t){var n;return lH(null!==(n=e[t])&&void 0!==n?n:e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const $K=20,WK={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:$K},mark:{color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},arc:{},area:{},bar:{binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},circle:{},geoshape:{},image:{},line:{},point:{},rect:{binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5},rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:MK,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},GK=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],YK={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},XK={blue:GK[0],orange:GK[1],red:GK[2],teal:GK[3],green:GK[4],yellow:GK[5],purple:GK[6],pink:GK[7],brown:GK[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function ZK(e){const t=Gq(e||{}),n={};for(const r of t){const t=e[r];n[r]=LZ(t)?jW(t):UW(t)}return n}const KK=[...dX,...zZ,...TK,"background","padding","legend","lineBreak","scale","style","title","view"];function JK(e={}){const{color:t,font:n,fontSize:r,selection:i}=e,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["color","font","fontSize","selection"]),a=ke({},Cq(WK),n?function(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(n):{},t?function(e={}){return{signals:[{name:"color",value:we(e)?Object.assign(Object.assign({},XK),e):XK}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}(t):{},r?function(e){return{signals:[{name:"fontSize",value:we(e)?Object.assign(Object.assign({},YK),e):YK}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}(r):{},o||{});i&&Te(a,"selection",i,!0);const s=Lq(a,KK);for(const e of["background","lineBreak","padding"])a[e]&&(s[e]=UW(a[e]));for(const e of dX)a[e]&&(s[e]=OW(a[e]));for(const e of zZ)a[e]&&(s[e]=ZK(a[e]));for(const e of TK)a[e]&&(s[e]=OW(a[e]));return a.legend&&(s.legend=OW(a.legend)),a.scale&&(s.scale=OW(a.scale)),a.style&&(s.style=function(e){const t=Gq(e),n={};for(const r of t)n[r]=ZK(e[r]);return n}(a.style)),a.title&&(s.title=OW(a.title)),a.view&&(s.view=OW(a.view)),s}const QK=new Set(["view",...lX]),eJ=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],tJ=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},{area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]});function nJ(e,t,n,r){const i=r?e[t][r]:e[t];"view"===t&&(n="cell");const o=Object.assign(Object.assign({},i),e.style[null!=n?n:t]);Wq(o)||(e.style[null!=n?n:t]=o),r||delete e[t]}function rJ(e){return"layer"in e}class iJ{map(e,t){return UX(e)?this.mapFacet(e,t):function(e){return"repeat"in e}(e)?this.mapRepeat(e,t):zK(e)?this.mapHConcat(e,t):NK(e)?this.mapVConcat(e,t):PK(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if(rJ(e))return this.mapLayer(e,t);if(FZ(e))return this.mapUnit(e,t);throw new Error(nG(e))}mapLayer(e,t){return Object.assign(Object.assign({},e),{layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))})}mapHConcat(e,t){return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map((e=>this.map(e,t)))})}mapVConcat(e,t){return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map((e=>this.map(e,t)))})}mapConcat(e,t){const{concat:n}=e,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["concat"]);return Object.assign(Object.assign({},r),{concat:n.map((e=>this.map(e,t)))})}mapFacet(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}mapRepeat(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}}const oJ={zero:1,center:1,normalize:1},aJ=new Set([WY,YY,GY,QY,KY,rX,iX,ZY,eX,tX]),sJ=new Set([YY,GY,WY]);function lJ(e){return KX(e)&&"quantitative"===JX(e)&&!e.bin}function cJ(e,t){var n,r;const i="x"===t?"y":"radius",o=e[t],a=e[i];if(KX(o)&&KX(a))if(lJ(o)&&lJ(a)){if(o.stack)return t;if(a.stack)return i;const e=KX(o)&&!!o.aggregate;if(e!==(KX(a)&&!!a.aggregate))return e?t:i;{const e=null===(n=o.scale)||void 0===n?void 0:n.type,s=null===(r=a.scale)||void 0===r?void 0:r.type;if(e&&"linear"!==e)return i;if(s&&"linear"!==s)return t}}else{if(lJ(o))return t;if(lJ(a))return i}else{if(lJ(o))return t;if(lJ(a))return i}}function uJ(e,t,n={}){var r,i;const o=cX(e)?e.type:e;if(!aJ.has(o))return null;const a=cJ(t,"x")||cJ(t,"theta");if(!a)return null;const s=t[a],l=KX(s)?uZ(s,{}):void 0,c=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(a),u=[],h=new Set;if(t[c]){const e=t[c],n=KX(e)?uZ(e,{}):void 0;n&&n!==l&&(u.push(c),h.add(n));const r="x"===c?"xOffset":"yOffset",i=t[r],o=KX(i)?uZ(i,{}):void 0;o&&o!==l&&(u.push(r),h.add(o))}const d=V$.reduce(((e,n)=>{if("tooltip"!==n&&jZ(t,n)){const r=t[n];for(const t of We(r)){const r=bZ(t);if(r.aggregate)continue;const i=uZ(r,{});i&&h.has(i)||e.push({channel:n,fieldDef:r})}}return e}),[]);let f;if(void 0!==s.stack?f=dt(s.stack)?s.stack?"zero":null:s.stack:sJ.has(o)&&(f="zero"),!f||!(f in oJ))return null;var p;if(qZ(t)&&0===d.length)return null;if((null===(r=null==s?void 0:s.scale)||void 0===r?void 0:r.type)&&"linear"!==(null===(i=null==s?void 0:s.scale)||void 0===i?void 0:i.type)){if(n.disallowNonLinearStack)return null;RG(function(e){return`Cannot stack non-linear scale (${e}).`}(s.scale.type))}return nZ(t[w$(a)])?(void 0!==s.stack&&RG(`Cannot stack "${p=a}" if there is already "${p}2".`),null):(KX(s)&&s.aggregate&&!xW.has(s.aggregate)&&RG(`Stacking is applied even though the aggregate function is non-summative ("${s.aggregate}").`),{groupbyChannels:u,groupbyFields:h,fieldChannel:a,impute:null!==s.impute&&aX(o),stackBy:d,offset:f})}var hJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function dJ(e){const{point:t,line:n}=e,r=hJ(e,["point","line"]);return Gq(r).length>1?r:r.type}function fJ(e){for(const t of["line","area","rule","trail"])e[t]&&(e=Object.assign(Object.assign({},e),{[t]:Lq(e[t],["point","line"])}));return e}function pJ(e,t={},n){return"transparent"===e.point?{opacity:0}:e.point?we(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?we(t.point)?t.point:{}:void 0}function gJ(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class mJ{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if(FZ(e)){const{mark:n,encoding:r}=e,i=cX(n)?n:{type:n};switch(i.type){case"line":case"rule":case"trail":return!!pJ(i,t[i.type],r);case"area":return!!pJ(i,t[i.type],r)||!!gJ(i,t[i.type])}}return!1}run(e,t,n){const{config:r}=t,{params:i,projection:o,mark:a,encoding:s}=e,l=hJ(e,["params","projection","mark","encoding"]),c=WZ(s,r),u=cX(a)?a:{type:a},h=pJ(u,r[u.type],c),d="area"===u.type&&gJ(u,r[u.type]),f=[Object.assign(Object.assign({},i?{params:i}:{}),{mark:dJ(Object.assign(Object.assign({},"area"===u.type&&void 0===u.opacity&&void 0===u.fillOpacity?{opacity:.7}:{}),u)),encoding:Lq(c,["shape"])})],p=uJ(u,c);let g=c;if(p){const{fieldChannel:e,offset:t}=p;g=Object.assign(Object.assign({},c),{[e]:Object.assign(Object.assign({},c[e]),t?{stack:t}:{})})}return d&&f.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"line"},Oq(u,["clip","interpolate","tension","tooltip"])),d),encoding:g})),h&&f.push(Object.assign(Object.assign({},o?{projection:o}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},Oq(u,["clip","tooltip"])),h),encoding:g})),n(Object.assign(Object.assign({},l),{layer:f}),Object.assign(Object.assign({},t),{config:fJ(r)}))}}function vJ(e,t){return t?BX(e)?AJ(e,t):_J(e,t):e}function yJ(e,t){return t?AJ(e,t):e}function bJ(e,t,n){const r=t[e];return function(e){return e&&!vt(e)&&"repeat"in e}(r)?r.repeat in n?Object.assign(Object.assign({},t),{[e]:n[r.repeat]}):void RG(function(e){return`Unknown repeated value "${e}".`}(r.repeat)):t}function _J(e,t){if(void 0!==(e=bJ("field",e,t))){if(null===e)return null;if(HX(e)&&zX(e.sort)){const n=bJ("field",e.sort,t);e=Object.assign(Object.assign({},e),n?{sort:n}:{})}return e}}function xJ(e,t){if(KX(e))return _J(e,t);{const n=bJ("datum",e,t);return n===e||n.type||(n.type="nominal"),n}}function wJ(e,t){if(!nZ(e)){if(ZX(e)){const n=xJ(e.condition,t);if(n)return Object.assign(Object.assign({},e),{condition:n});{const{condition:t}=e;return function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["condition"])}}return e}{const n=xJ(e,t);if(n)return n;if(YX(e))return{condition:e.condition}}}function AJ(e,t){const n={};for(const r in e)if(at(e,r)){const i=e[r];if(xe(i))n[r]=i.map((e=>wJ(e,t))).filter((e=>e));else{const e=wJ(i,t);void 0!==e&&(n[r]=e)}}return n}class kJ{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(FZ(e)){const{encoding:t,mark:n}=e;if("line"===n||cX(n)&&"line"===n.type)for(const e of y$){const n=t[_$(e)];if(t[e]&&(KX(n)&&!TW(n.bin)||QX(n)))return!0}}return!1}run(e,t,n){const{encoding:r,mark:i}=e;var o,a;return RG((o=!!r.x2,a=!!r.y2,`Line mark is for continuous lines and thus cannot be used with ${o&&a?"x2 and y2":o?"x2":"y2"}. We will use the rule mark (line segments) instead.`)),n(Object.assign(Object.assign({},e),{mark:we(i)?Object.assign(Object.assign({},i),{type:"rule"}):"rule"}),t)}}var TJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function SJ({parentEncoding:e,encoding:t={},layer:n}){let r={};if(e){const i=new Set([...Gq(e),...Gq(t)]);for(const o of i){const i=t[o],a=e[o];if(nZ(i)){const e=Object.assign(Object.assign({},a),i);r[o]=e}else ZX(i)?r[o]=Object.assign(Object.assign({},i),{condition:Object.assign(Object.assign({},a),i.condition)}):i||null===i?r[o]=i:(n||iZ(a)||IW(a)||nZ(a)||xe(a))&&(r[o]=a)}}else r=t;return!r||Wq(r)?void 0:r}function EJ(e){const{parentProjection:t,projection:n}=e;return t&&n&&RG(function(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Dq(t)} is overridden by a child projection ${Dq(n)}.`}({parentProjection:t,projection:n})),null!=n?n:t}function CJ(e){return"filter"in e}function MJ(e){return void 0!==(null==e?void 0:e.stop)}function OJ(e){return"lookup"in e}function LJ(e){return"pivot"in e}function DJ(e){return"density"in e}function IJ(e){return"quantile"in e}function RJ(e){return"regression"in e}function PJ(e){return"loess"in e}function NJ(e){return"sample"in e}function zJ(e){return"window"in e}function FJ(e){return"joinaggregate"in e}function BJ(e){return"flatten"in e}function jJ(e){return"calculate"in e}function UJ(e){return"bin"in e}function VJ(e){return"impute"in e}function qJ(e){return"timeUnit"in e}function HJ(e){return"aggregate"in e}function $J(e){return"stack"in e}function WJ(e){return"fold"in e}var GJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function YJ(e,t){const{transform:n}=e,r=GJ(e,["transform"]);if(n){const e=n.map((e=>{if(CJ(e))return{filter:KJ(e,t)};if(UJ(e)&&SW(e.bin))return Object.assign(Object.assign({},e),{bin:ZJ(e.bin)});if(OJ(e)){const t=e.from,{selection:n}=t,r=GJ(t,["selection"]);return n?Object.assign(Object.assign({},e),{from:Object.assign({param:n},r)}):e}return e}));return Object.assign(Object.assign({},r),{transform:e})}return e}function XJ(e,t){var n,r;const i=Cq(e);if(KX(i)&&SW(i.bin)&&(i.bin=ZJ(i.bin)),oZ(i)&&(null===(r=null===(n=i.scale)||void 0===n?void 0:n.domain)||void 0===r?void 0:r.selection)){const e=i.scale.domain,{selection:t}=e,n=GJ(e,["selection"]);i.scale.domain=Object.assign(Object.assign({},n),t?{param:t}:{})}if(YX(i))if(xe(i.condition))i.condition=i.condition.map((e=>{const{selection:n,param:r,test:i}=e,o=GJ(e,["selection","param","test"]);return r?e:Object.assign(Object.assign({},o),{test:KJ(e,t)})}));else{const e=XJ(i.condition,t),{selection:n,param:r,test:o}=e,a=GJ(e,["selection","param","test"]);i.condition=r?i.condition:Object.assign(Object.assign({},a),{test:KJ(i.condition,t)})}return i}function ZJ(e){const t=e.extent;if(null==t?void 0:t.selection){const{selection:n}=t,r=GJ(t,["selection"]);return Object.assign(Object.assign({},e),{extent:Object.assign(Object.assign({},r),{param:n})})}return e}function KJ(e,t){const n=e=>Sq(e,(e=>{var n,r,i;const o={param:e,empty:null===(n=t.emptySelections[e])||void 0===n||n};return null!==(r=(i=t.selectionPredicates)[e])&&void 0!==r||(i[e]=[]),t.selectionPredicates[e].push(o),o}));return e.selection?n(e.selection):Sq(e.test||e.filter,(e=>e.selection?n(e.selection):e))}class JJ extends iJ{map(e,t){var n;const r=null!==(n=t.selections)&&void 0!==n?n:[];if(e.params&&!FZ(e)){const t=[];for(const n of e.params)DK(n)?r.push(n):t.push(n);e.params=t}return t.selections=r,super.map(e,QJ(e,t))}mapUnit(e,t){var n;const r=t.selections;if(!r||!r.length)return e;const i=(null!==(n=t.path)&&void 0!==n?n:[]).concat(e.name),o=[];for(const t of r)if(t.views&&t.views.length)for(const n of t.views)(vt(n)&&(n===e.name||i.indexOf(n)>=0)||xe(n)&&n.map((e=>i.indexOf(e))).every(((e,t,n)=>-1!==e&&(0===t||e>n[t-1]))))&&o.push(t);else o.push(t);return o.length&&(e.params=o),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=JJ.prototype[e];JJ.prototype[e]=function(e,n){return t.call(this,e,QJ(e,n))}}function QJ(e,t){var n;return e.name?Object.assign(Object.assign({},t),{path:(null!==(n=t.path)&&void 0!==n?n:[]).concat(e.name)}):t}function eQ(e,t){void 0===t&&(t=JK(e.config));const n=function(e,t={}){const n={config:t};return rQ.map(tQ.map(nQ.map(e,n),n),n)}(e,t),{width:r,height:i}=e,o=function(e,t,n){let{width:r,height:i}=t;const o=FZ(e)||rJ(e),a={};o?"container"==r&&"container"==i?(a.type="fit",a.contains="padding"):"container"==r?(a.type="fit-x",a.contains="padding"):"container"==i&&(a.type="fit-y",a.contains="padding"):("container"==r&&(RG(rG("width")),r=void 0),"container"==i&&(RG(rG("height")),i=void 0));const s=Object.assign(Object.assign(Object.assign({type:"pad"},a),n?iQ(n.autosize):{}),iQ(e.autosize));if("fit"!==s.type||o||(RG('Autosize "fit" only works for single views and layered views.'),s.type="pad"),"container"==r&&"fit"!=s.type&&"fit-x"!=s.type&&RG(iG("width")),"container"==i&&"fit"!=s.type&&"fit-y"!=s.type&&RG(iG("height")),!Eq(s,{type:"pad"}))return s}(n,{width:r,height:i,autosize:e.autosize},t);return Object.assign(Object.assign({},n),o?{autosize:o}:{})}const tQ=new class extends iJ{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[oK,hK,mK,new mJ,new kJ]}map(e,t){if(FZ(e)){const n=jZ(e.encoding,vH),r=jZ(e.encoding,yH),i=jZ(e.encoding,bH);if(n||r||i)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:n,parentProjection:r}=t,i=yJ(e.encoding,t.repeater),o=Object.assign(Object.assign({},e),i?{encoding:i}:{});if(n||r)return this.mapUnitWithParentEncodingOrProjection(o,t);const a=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(o,t.config))return e.run(o,t,a);return o}mapRepeat(e,t){return function(e){return!xe(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:n,spec:r}=e,i=TJ(e,["repeat","spec"]),{row:o,column:a,layer:s}=n,{repeater:l={},repeaterPrefix:c=""}=t;return o||a?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),a?{column:a}:{}),spec:{repeat:{layer:s},spec:r}}),t):Object.assign(Object.assign({},i),{layer:s.map((e=>{const n=Object.assign(Object.assign({},l),{layer:e}),i=`${(r.name||"")+c}child__layer_${Kq(e)}`,o=this.mapLayerOrUnit(r,Object.assign(Object.assign({},t),{repeater:n,repeaterPrefix:i}));return o.name=i,o}))})}mapNonLayerRepeat(e,t){var n;const{repeat:r,spec:i,data:o}=e,a=TJ(e,["repeat","spec","data"]);!xe(r)&&e.columns&&(e=Lq(e,["columns"]),RG(uG("repeat")));const s=[],{repeater:l={},repeaterPrefix:c=""}=t,u=!xe(r)&&r.row||[l?l.row:null],h=!xe(r)&&r.column||[l?l.column:null],d=xe(r)&&r||[l?l.repeat:null];for(const e of d)for(const n of u)for(const o of h){const a={repeat:e,row:n,column:o,layer:l.layer},u=(i.name||"")+c+"child__"+(xe(r)?`${Kq(e)}`:(r.row?`row_${Kq(n)}`:"")+(r.column?`column_${Kq(o)}`:"")),h=this.map(i,Object.assign(Object.assign({},t),{repeater:a,repeaterPrefix:u}));h.name=u,s.push(Lq(h,["data"]))}const f=xe(r)?e.columns:r.column?r.column.length:1;return Object.assign(Object.assign({data:null!==(n=i.data)&&void 0!==n?n:o,align:"all"},a),{columns:f,concat:s})}mapFacet(e,t){const{facet:n}=e;return BX(n)&&e.columns&&(e=Lq(e,["columns"]),RG(uG("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:n,projection:r}=e,{parentEncoding:i,parentProjection:o,config:a}=t,s=EJ({parentProjection:o,projection:r}),l=SJ({parentEncoding:i,encoding:yJ(n,t.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),s?{projection:s}:{}),l?{encoding:l}:{}),{config:a})}mapFacetedUnit(e,t){const n=e.encoding,{row:r,column:i,facet:o}=n,a=TJ(n,["row","column","facet"]),{mark:s,width:l,projection:c,height:u,view:h,params:d,encoding:f}=e,p=TJ(e,["mark","width","projection","height","view","params","encoding"]),{facetMapping:g,layout:m}=this.getFacetMappingAndLayout({row:r,column:i,facet:o},t),v=yJ(a,t.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},p),m),{facet:g,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},l?{width:l}:{}),u?{height:u}:{}),h?{view:h}:{}),c?{projection:c}:{}),{mark:s,encoding:v}),d?{params:d}:{})}),t)}getFacetMappingAndLayout(e,t){var n;const{row:r,column:i,facet:o}=e;if(r||i){o&&RG(`Facet encoding dropped as ${(a=[...r?[vH]:[],...i?[yH]:[]]).join(" and ")} ${a.length>1?"are":"is"} also specified.`);const t={},s={};for(const r of[vH,yH]){const i=e[r];if(i){const{align:e,center:o,spacing:a,columns:l}=i,c=TJ(i,["align","center","spacing","columns"]);t[r]=c;for(const e of["align","center","spacing"])void 0!==i[e]&&(null!==(n=s[e])&&void 0!==n||(s[e]={}),s[e][r]=i[e])}}return{facetMapping:t,layout:s}}{const{align:e,center:n,spacing:r,columns:i}=o;return{facetMapping:vJ(TJ(o,["align","center","spacing","columns"]),t.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},e?{align:e}:{}),n?{center:n}:{}),r?{spacing:r}:{}),i?{columns:i}:{})}}var a}mapLayer(e,t){var{parentEncoding:n,parentProjection:r}=t,i=TJ(t,["parentEncoding","parentProjection"]);const{encoding:o,projection:a}=e,s=TJ(e,["encoding","projection"]),l=Object.assign(Object.assign({},i),{parentEncoding:SJ({parentEncoding:n,encoding:o,layer:!0}),parentProjection:EJ({parentProjection:r,projection:a})});return super.mapLayer(s,l)}},nQ=new class extends iJ{map(e,t){var n,r;return null!==(n=t.emptySelections)&&void 0!==n||(t.emptySelections={}),null!==(r=t.selectionPredicates)&&void 0!==r||(t.selectionPredicates={}),e=YJ(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=YJ(e,t)).encoding){const n={};for(const[r,i]of Xq(e.encoding))n[r]=XJ(i,t);e=Object.assign(Object.assign({},e),{encoding:n})}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const n=e,{selection:r}=n,i=GJ(n,["selection"]);return r?Object.assign(Object.assign({},i),{params:Xq(r).map((([e,n])=>{var r;const i=n,{init:o,bind:a,empty:s}=i,l=GJ(i,["init","bind","empty"]);"single"===l.type?(l.type="point",l.toggle=!1):"multi"===l.type&&(l.type="point"),t.emptySelections[e]="none"!==s;for(const n of Yq(null!==(r=t.selectionPredicates[e])&&void 0!==r?r:{}))n.empty="none"!==s;return{name:e,value:o,select:l,bind:a}}))}):e}},rQ=new JJ;function iQ(e){return vt(e)?{type:e}:null!=e?e:{}}const oQ=["background","padding"];function aQ(e,t){const n={};for(const t of oQ)e&&void 0!==e[t]&&(n[t]=UW(e[t]));return t&&(n.params=e.params),n}class sQ{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new sQ(Cq(this.explicit),Cq(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(e){return lH(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:t,explicit:n}){void 0!==t&&this.set(e,t,n)}set(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,{explicit:t,implicit:n}){void 0!==t[e]?this.set(e,t[e],!0):void 0!==n[e]&&this.set(e,n[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of Gq(e.combine())){const n=e.getWithExplicit(t);this.setWithExplicit(t,n)}}}function lQ(e){return{explicit:!0,value:e}}function cQ(e){return{explicit:!1,value:e}}function uQ(e){return(t,n,r,i)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:hQ(t,n,r,i)}}function hQ(e,t,n,r){return e.explicit&&t.explicit&&RG(function(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${Dq(n)} and ${Dq(r)}). Using ${Dq(n)}.`}(n,r,e.value,t.value)),e}function dQ(e,t,n,r,i=hQ){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:Eq(e.value,t.value)?e:i(e,t,n,r)}class fQ extends sQ{constructor(e={},t={},n=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=n}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function pQ(e){return"url"in e}function gQ(e){return"values"in e}function mQ(e){return"name"in e&&!pQ(e)&&!gQ(e)&&!vQ(e)}function vQ(e){return e&&(yQ(e)||bQ(e)||_Q(e))}function yQ(e){return"sequence"in e}function bQ(e){return"sphere"in e}function _Q(e){return"graticule"in e}var xQ;!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"}(xQ||(xQ={}));var wQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function AQ(e,t=!0,n=ce){if(xe(e)){const r=e.map((e=>AQ(e,t,n)));return t?`[${r.join(", ")}]`:r}return PG(e)?n(t?UG(e):function(e){const t=jG(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?n(Dq(e)):e}function kQ(e,t){var n;for(const r of Yq(null!==(n=e.component.selection)&&void 0!==n?n:{})){const n=r.name;let i=`${n}${P0}, ${"global"===r.resolve?"true":`{unit: ${B0(e)}}`}`;for(const n of F0)n.defined(r)&&(n.signals&&(t=n.signals(e,r,t)),n.modifyExpr&&(i=n.modifyExpr(e,r,i)));t.push({name:n+N0,on:[{events:{signal:r.name+P0},update:`modify(${Tt(r.name+R0)}, ${i})`}]})}return SQ(t)}function TQ(e,t){var n;for(const r of Yq(null!==(n=e.component.selection)&&void 0!==n?n:{}))for(const n of F0)n.defined(r)&&n.marks&&(t=n.marks(e,r,t));return t}function SQ(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}class EQ{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?RG("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=t,e.parent=this}}class CQ extends EQ{constructor(e,t,n,r){super(e,t),this.type=n,this.refCounts=r,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${uH()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}var MQ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};class OQ extends EQ{constructor(e,t){super(e),this.formula=t}clone(){return new OQ(null,Cq(this.formula))}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,t)=>{const{field:n,timeUnit:r}=t;if(r){const i=uZ(t,{forAs:!0});e[Iq({as:i,field:n,timeUnit:r})]={as:i,field:n,timeUnit:r}}return e}),{});return Wq(n)?null:new OQ(e,n)}static makeFromTransform(e,t){const n=Object.assign({},t),{timeUnit:r}=n,i=MQ(n,["timeUnit"]),o=XG(r),a=Object.assign(Object.assign({},i),{timeUnit:o});return new OQ(e,{[Iq(a)]:a})}merge(e){this.formula=Object.assign({},this.formula);for(const t in e.formula)this.formula[t]||(this.formula[t]=e.formula[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[n,r]of Xq(this.formula))e.has(r.as)||(t[n]=r);this.formula=t}producedFields(){return new Set(Yq(this.formula).map((e=>e.as)))}dependentFields(){return new Set(Yq(this.formula).map((e=>e.field)))}hash(){return`TimeUnit ${Iq(this.formula)}`}assemble(){const e=[];for(const t of Yq(this.formula)){const{field:n,as:r,timeUnit:i}=t,o=XG(i),{unit:a,utc:s}=o,l=MQ(o,["unit","utc"]);e.push(Object.assign(Object.assign(Object.assign(Object.assign({field:iH(n),type:"timeunit"},a?{units:WG(a)}:{}),s?{timezone:"utc"}:{}),l),{as:[r,`${r}_end`]}))}return e}}const LQ="_tuple_fields";class DQ{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const IQ={defined:()=>!0,parse:(e,t,n)=>{var r;const i=t.name,o=null!==(r=t.project)&&void 0!==r?r:t.project=new DQ,a={},s={},l=new Set,c=(e,t)=>{const n="visual"===t?e.channel:e.field;let r=Kq(`${i}_${n}`);for(let e=1;l.has(r);e++)r=Kq(`${i}_${n}_${e}`);return l.add(r),{[t]:r}},u=t.type,h=e.config.selection[u],d=void 0!==n.value?We(n.value):null;let{fields:f,encodings:p}=we(n.select)?n.select:{};if(!f&&!p&&d)for(const e of d)if(we(e))for(const t of Gq(e))m$[t]?(p||(p=[])).push(t):"interval"===u?(RG('Interval selections should be initialized using "x" and/or "y" keys.'),p=h.encodings):(f||(f=[])).push(t);f||p||(p=h.encodings,"fields"in h&&(f=h.fields));for(const t of null!=p?p:[]){const n=e.fieldDef(t);if(n){let r=n.field;if(n.aggregate){RG(lG(t,n.aggregate));continue}if(!r){RG(sG(t));continue}if(n.timeUnit){r=e.vgField(t);const i={timeUnit:n.timeUnit,as:r,field:n.field};s[Iq(i)]=i}if(!a[r]){let i="E";"interval"===u?OY(e.getScaleComponent(t).get("type"))&&(i="R"):n.bin&&(i="R-RE");const s={field:r,channel:t,type:i};s.signals=Object.assign(Object.assign({},c(s,"data")),c(s,"visual")),o.items.push(a[r]=s),o.hasField[r]=o.hasChannel[t]=a[r]}}else RG(sG(t))}for(const e of null!=f?f:[]){if(o.hasField[e])continue;const t={type:"E",field:e};t.signals=Object.assign({},c(t,"data")),o.items.push(t),o.hasField[e]=t}d&&(t.init=d.map((e=>o.items.map((t=>we(e)?void 0!==e[t.channel]?e[t.channel]:e[t.field]:e))))),Wq(s)||(o.timeUnit=new OQ(null,s))},signals:(e,t,n)=>{const r=t.name+LQ;return n.filter((e=>e.name===r)).length>0?n:n.concat({name:r,value:t.project.items.map((e=>{const{signals:t,hasLegend:n}=e,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["signals","hasLegend"]);return r.field=iH(r.field),r}))})}},RQ=IQ,PQ={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const r of t.project.items){const i=r.channel;if(!cW(i))continue;const o=e.getScaleComponent(i),a=o?o.get("type"):void 0;o&&OY(a)?(o.set("selectionExtent",{param:t.name,field:r.field},!0),n.push(r)):RG("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,t,n)=>{const r=t.scales.filter((e=>0===n.filter((t=>t.name===e.signals.data)).length));if(!e.parent||FQ(e)||0===r.length)return n;const i=n.filter((e=>e.name===t.name))[0];let o=i.update;if(o.indexOf(z0)>=0)i.update=`{${r.map((e=>`${Tt(iH(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of r){const t=`${Tt(iH(e.field))}: ${e.signals.data}`;o.includes(t)||(o=`${o.substring(0,o.length-1)}, ${t}}`)}i.update=o}return n.concat(r.map((e=>({name:e.signals.data}))))},signals:(e,t,n)=>{if(e.parent&&!FQ(e))for(const e of t.scales){const t=n.filter((t=>t.name===e.signals.data))[0];t.push="outer",delete t.value,delete t.update}return n}},NQ=PQ;function zQ(e,t){return`domain(${Tt(e.scaleName(t))})`}function FQ(e){var t;return e.parent&&_3(e.parent)&&(null!==(t=!e.parent.parent)&&void 0!==t?t:FQ(e.parent.parent))}const BQ="_brush",jQ="_scale_trigger",UQ={defined:e=>"interval"===e.type,signals:(e,t,n)=>{const r=t.name,i=r+LQ,o=NQ.defined(t),a=t.init?t.init[0]:null,s=[],l=[];if(t.translate&&!o){const e=`!event.item || event.item.mark.name !== ${Tt(r+BQ)}`;qQ(t,((t,n)=>{var r,i;const o=We(null!==(r=(i=n.between[0]).filter)&&void 0!==r?r:i.filter=[]);return o.includes(e)||o.push(e),t}))}t.project.items.forEach(((r,i)=>{const o=r.channel;if(o!==_H&&o!==xH)return void RG("Interval selections only support x and y encoding channels.");const c=a?a[i]:null,u=function(e,t,n,r){const i=n.channel,o=n.signals.visual,a=n.signals.data,s=NQ.defined(t),l=Tt(e.scaleName(i)),c=e.getScaleComponent(i),u=c?c.get("type"):void 0,h=e=>`scale(${l}, ${e})`,d=e.getSizeSignalRef(i===_H?"width":"height").signal,f=`${i}(unit)`,p=qQ(t,((e,t)=>[...e,{events:t.between[0],update:`[${f}, ${f}]`},{events:t,update:`[${o}[0], clamp(${f}, 0, ${d})]`}]));return p.push({events:{signal:t.name+jQ},update:OY(u)?`[${h(`${a}[0]`)}, ${h(`${a}[1]`)}]`:"[0, 0]"}),s?[{name:a,on:[]}]:[Object.assign(Object.assign({name:o},r?{init:AQ(r,!0,h)}:{value:[]}),{on:p}),Object.assign(Object.assign({name:a},r?{init:AQ(r)}:{}),{on:[{events:{signal:o},update:`${o}[0] === ${o}[1] ? null : invert(${l}, ${o})`}]})]}(e,t,r,c),h=r.signals.data,d=r.signals.visual,f=Tt(e.scaleName(o)),p=OY(e.getScaleComponent(o).get("type"))?"+":"";n.push(...u),s.push(h),l.push({scaleName:e.scaleName(o),expr:`(!isArray(${h}) || (${p}invert(${f}, ${d})[0] === ${p}${h}[0] && ${p}invert(${f}, ${d})[1] === ${p}${h}[1]))`})})),!o&&l.length&&n.push({name:r+jQ,value:{},on:[{events:l.map((e=>({scale:e.scaleName}))),update:`${l.map((e=>e.expr)).join(" && ")} ? ${r+jQ} : {}`}]});const c=`unit: ${B0(e)}, fields: ${i}, values`;return n.concat(Object.assign(Object.assign({name:r+P0},a?{init:`{${c}: ${AQ(a)}}`}:{}),s.length?{on:[{events:[{signal:s.join(" || ")}],update:`${s.join(" && ")} ? {${c}: [${s}]} : null`}]}:{}))},marks:(e,t,n)=>{const r=t.name,{x:i,y:o}=t.project.hasChannel,a=null==i?void 0:i.signals.visual,s=null==o?void 0:o.signals.visual,l=`data(${Tt(t.name+R0)})`;if(NQ.defined(t)||!i&&!o)return n;const c={x:void 0!==i?{signal:`${a}[0]`}:{value:0},y:void 0!==o?{signal:`${s}[0]`}:{value:0},x2:void 0!==i?{signal:`${a}[1]`}:{field:{group:"width"}},y2:void 0!==o?{signal:`${s}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of Gq(c))c[t]=[Object.assign({test:`${l}.length && ${l}[0].unit === ${B0(e)}`},c[t]),{value:0}];const u=t.mark,{fill:h,fillOpacity:d,cursor:f}=u,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(u,["fill","fillOpacity","cursor"]),g=Gq(p).reduce(((e,t)=>(e[t]=[{test:[void 0!==i&&`${a}[0] !== ${a}[1]`,void 0!==o&&`${s}[0] !== ${s}[1]`].filter((e=>e)).join(" && "),value:p[t]},{value:null}],e)),{});return[{name:`${r+BQ}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:h},fillOpacity:{value:d}},update:c}},...n,{name:r+BQ,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},f?{cursor:{value:f}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},c),g)}}]}},VQ=UQ;function qQ(e,t){return e.events.reduce(((e,n)=>n.between?t(e,n):(RG(`${n} is not an ordered event stream for interval selections.`),e)),[])}const HQ={defined:e=>"point"===e.type,signals:(e,t,n)=>{var r;const i=t.name,o=i+LQ,a=t.project,s="(item().isVoronoi ? datum.datum : datum)",l=a.items.map((t=>{const n=e.fieldDef(t.channel);return(null==n?void 0:n.bin)?`[${s}[${Tt(e.vgField(t.channel,{}))}], ${s}[${Tt(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${s}[${Tt(t.field)}]`})).join(", "),c=`unit: ${B0(e)}, fields: ${o}, values`,u=t.events,h=Yq(null!==(r=e.component.selection)&&void 0!==r?r:{}).reduce(((e,t)=>"interval"===t.type?e.concat(t.name+BQ):e),[]).map((e=>`indexof(item().mark.name, '${e}') < 0`)).join(" && "),d="datum && item().mark.marktype !== 'group'"+(h?` && ${h}`:"");return n.concat([{name:i+P0,on:u?[{events:u,update:`${d} ? {${c}: [${l}]} : null`,force:!0}]:[]}])}},$Q=HQ;function WQ(e,t,n,r){const i=YX(t)&&t.condition,o=r(t);if(i){const t=We(i).map((t=>{const n=r(t);if(function(e){return e.param}(t)){const{param:r,empty:i}=t,o=W0(e,{param:r,empty:i});return Object.assign({test:o},n)}{const r=Y0(e,t.test);return Object.assign({test:r},n)}}));return{[n]:[...t,...void 0!==o?[o]:[]]}}return void 0!==o?{[n]:o}:{}}function GQ(e,t="text"){const n=e.encoding[t];return WQ(e,n,t,(t=>YQ(t,e.config)))}function YQ(e,t,n="datum"){if(e){if(iZ(e))return qW(e.value);if(nZ(e)){const{format:r,formatType:i}=yZ(e);return kX({fieldOrDatumDef:e,format:r,formatType:i,expr:n,config:t})}}}function XQ(e,t={}){const{encoding:n,markDef:r,config:i,stack:o}=e,a=n.tooltip;if(xe(a))return{tooltip:KQ({tooltip:a},o,i,t)};{const s=t.reactiveGeom?"datum.datum":"datum";return WQ(e,a,"tooltip",(e=>{const a=YQ(e,i,s);if(a)return a;if(null===e)return;let l=YW("tooltip",r,i);return!0===l&&(l={content:"encoding"}),vt(l)?{value:l}:we(l)?IW(l)?l:"encoding"===l.content?KQ(n,o,i,t):{signal:s}:void 0}))}}function ZQ(e,t,n,{reactiveGeom:r}={}){const i={},o=r?"datum.datum":"datum",a=[];function s(r,s){const l=_$(s),c=rZ(r)?r:Object.assign(Object.assign({},r),{type:e[l].type}),u=We(c.title||vZ(c,n)).join(", ");let h;if($$(s)){const r="x"===s?"x2":"y2",a=bZ(e[r]);if(TW(c.bin)&&a){const e=uZ(c,{expr:o}),t=uZ(a,{expr:o}),{format:s,formatType:l}=yZ(c);h=DX(e,t,s,l,n),i[r]=!0}else if(t&&t.fieldChannel===s&&"normalize"===t.offset){const{format:e,formatType:t}=yZ(c);h=kX({fieldOrDatumDef:c,format:e,formatType:t,expr:o,config:n,normalizeStack:!0}).signal}}null!=h||(h=YQ(c,n,o).signal),a.push({channel:s,key:u,value:h})}GZ(e,((e,t)=>{KX(e)?s(e,t):XX(e)&&s(e.condition,t)}));const l={};for(const{channel:e,key:t,value:n}of a)i[e]||l[t]||(l[t]=n);return l}function KQ(e,t,n,{reactiveGeom:r}={}){const i=ZQ(e,t,n,{reactiveGeom:r}),o=Xq(i).map((([e,t])=>`"${e}": ${t}`));return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function JQ(e,t,n={}){const{markDef:r,encoding:i,config:o}=t,{vgChannel:a}=n;let{defaultRef:s,defaultValue:l}=n;void 0===s&&(null!=l||(l=YW(e,r,o,{vgChannel:a,ignoreVgConfig:!0})),void 0!==l&&(s=qW(l)));const c=i[e];return WQ(t,c,null!=a?a:e,(n=>_X({channel:e,channelDef:n,markDef:r,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:s})))}function QQ(e,t={filled:void 0}){var n,r,i,o;const{markDef:a,encoding:s,config:l}=e,{type:c}=a,u=null!==(n=t.filled)&&void 0!==n?n:YW("filled",a,l),h=Pq(["bar","point","circle","square","geoshape"],c)?"transparent":void 0,d=null!==(i=null!==(r=YW(!0===u?"color":void 0,a,l,{vgChannel:"fill"}))&&void 0!==r?r:l.mark[!0===u&&"color"])&&void 0!==i?i:h,f=null!==(o=YW(!1===u?"color":void 0,a,l,{vgChannel:"stroke"}))&&void 0!==o?o:l.mark[!1===u&&"color"],p=u?"fill":"stroke",g=Object.assign(Object.assign({},d?{fill:qW(d)}:{}),f?{stroke:qW(f)}:{});return a.color&&(u?a.fill:a.stroke)&&RG(mG("property",{fill:"fill"in a,stroke:"stroke"in a})),Object.assign(Object.assign(Object.assign(Object.assign({},g),JQ("color",e,{vgChannel:p,defaultValue:u?d:f})),JQ("fill",e,{defaultValue:s.fill?d:void 0})),JQ("stroke",e,{defaultValue:s.stroke?f:void 0}))}function e0({channel:e,markDef:t,encoding:n={},model:r,bandPosition:i}){const o=`${e}Offset`,a=t[o],s=n[o];if(("xOffset"===o||"yOffset"===o)&&s)return{offsetType:"encoding",offset:_X({channel:o,channelDef:s,markDef:t,config:null==r?void 0:r.config,scaleName:r.scaleName(o),scale:r.getScaleComponent(o),stack:null,defaultRef:qW(a),bandPosition:i})};const l=t[o];return l?{offsetType:"visual",offset:l}:{}}function t0(e,t,{defaultPos:n,vgChannel:r}){const{encoding:i,markDef:o,config:a,stack:s}=t,l=i[e],c=i[w$(e)],u=t.scaleName(e),h=t.getScaleComponent(e),{offset:d,offsetType:f}=e0({channel:e,markDef:o,encoding:i,model:t,bandPosition:.5}),p=n0({model:t,defaultPos:n,channel:e,scaleName:u,scale:h}),g=!l&&$$(e)&&(i.latitude||i.longitude)?{field:t.getName(e)}:function(e){const{channel:t,channelDef:n,scaleName:r,stack:i,offset:o,markDef:a}=e;if(nZ(n)&&i&&t===i.fieldChannel){if(KX(n)){let e=n.bandPosition;if(void 0!==e||"text"!==a.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return bX({scaleName:r,fieldOrDatumDef:n,startSuffix:"start",bandPosition:e,offset:o})}return yX(n,r,{suffix:"end"},{offset:o})}return gX(e)}({channel:e,channelDef:l,channel2Def:c,markDef:o,config:a,scaleName:u,scale:h,stack:s,offset:d,defaultRef:p,bandPosition:"encoding"===f?0:void 0});return g?{[r||e]:g}:void 0}function n0({model:e,defaultPos:t,channel:n,scaleName:r,scale:i}){const{markDef:o,config:a}=e;return()=>{const s=_$(n),l=x$(n),c=YW(n,o,a,{vgChannel:l});if(void 0!==c)return xX(n,c);switch(t){case"zeroOrMin":case"zeroOrMax":if(r){const e=i.get("type");if(Pq(["log",gY,mY],e));else if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}if("zeroOrMin"===t)return"y"===s?{field:{group:"height"}}:{value:0};switch(s){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const t=e[A$(n)];return Object.assign(Object.assign({},t),{mult:.5})}}}}const r0={left:"x",center:"xc",right:"x2"},i0={top:"y",middle:"yc",bottom:"y2"};function o0(e,t,n,r="middle"){if("radius"===e||"theta"===e)return x$(e);const i="x"===e?"align":"baseline",o=YW(i,t,n);let a;return IW(o)?(RG(function(e){return`The ${e} for range marks cannot be an expression`}(i)),a=void 0):a=o,"x"===e?r0[a||("top"===r?"left":"center")]:i0[a||r]}function a0(e,t,{defaultPos:n,defaultPos2:r,range:i}){return i?s0(e,t,{defaultPos:n,defaultPos2:r}):t0(e,t,{defaultPos:n})}function s0(e,t,{defaultPos:n,defaultPos2:r}){const{markDef:i,config:o}=t,a=w$(e),s=A$(e),l=function(e,t,n){const{encoding:r,mark:i,markDef:o,stack:a,config:s}=e,l=_$(n),c=A$(n),u=x$(n),h=r[l],d=e.scaleName(l),f=e.getScaleComponent(l),{offset:p}=e0(n in r||n in o?{channel:n,markDef:o,encoding:r,model:e}:{channel:l,markDef:o,encoding:r,model:e});if(!h&&("x2"===n||"y2"===n)&&(r.latitude||r.longitude)){const t=A$(n),r=e.markDef[t];return null!=r?{[t]:{value:r}}:{[u]:{field:e.getName(n)}}}const g=function({channel:e,channelDef:t,channel2Def:n,markDef:r,config:i,scaleName:o,scale:a,stack:s,offset:l,defaultRef:c}){return nZ(t)&&s&&e.charAt(0)===s.fieldChannel.charAt(0)?yX(t,o,{suffix:"start"},{offset:l}):gX({channel:e,channelDef:n,scaleName:o,scale:a,stack:s,markDef:r,config:i,offset:l,defaultRef:c})}({channel:n,channelDef:h,channel2Def:r[n],markDef:o,config:s,scaleName:d,scale:f,stack:a,offset:p,defaultRef:void 0});return void 0!==g?{[u]:g}:l0(n,o)||l0(n,{[n]:ZW(n,o,s.style),[c]:ZW(c,o,s.style)})||l0(n,s[i])||l0(n,s.mark)||{[u]:n0({model:e,defaultPos:t,channel:n,scaleName:d,scale:f})()}}(t,r,a),c=l[s]?o0(e,i,o):x$(e);return Object.assign(Object.assign({},t0(e,t,{defaultPos:n,vgChannel:c})),l)}function l0(e,t){const n=A$(e),r=x$(e);if(void 0!==t[r])return{[r]:xX(e,t[r])};if(void 0!==t[e])return{[r]:xX(e,t[e])};if(t[n]){const r=t[n];if(!fX(r))return{[n]:xX(e,r)};RG(function(e){return`Position range does not support relative band size for ${e}.`}(n))}}function c0(e,t){var n,r;const{config:i,encoding:o,markDef:a}=e,s=a.type,l=w$(t),c=A$(t),u=o[t],h=o[l],d=e.getScaleComponent(t),f=d?d.get("type"):void 0,p=a.orient,g=null!==(r=null!==(n=o[c])&&void 0!==n?n:o.size)&&void 0!==r?r:YW("size",a,i,{vgChannel:c}),m="bar"===s&&("x"===t?"vertical"===p:"horizontal"===p);return!KX(u)||!(kW(u.bin)||TW(u.bin)||u.timeUnit&&!h)||g&&!fX(g)||MY(f)?(nZ(u)&&MY(f)||m)&&!h?function(e,t,n){const{markDef:r,encoding:i,config:o,stack:a}=n,s=r.orient,l=n.scaleName(t),c=n.getScaleComponent(t),u=A$(t),h=w$(t),d=function(e){switch(e){case _H:return"xOffset";case xH:return"yOffset";case wH:return"x2Offset";case AH:return"y2Offset";case CH:return"thetaOffset";case SH:return"radiusOffset";case MH:return"theta2Offset";case EH:return"radius2Offset"}}(t),f=n.scaleName(d),p="horizontal"===s&&"y"===t||"vertical"===s&&"x"===t;let g;(i.size||r.size)&&(p?g=JQ("size",n,{vgChannel:u,defaultRef:qW(r.size)}):RG(function(e){return`Cannot apply size to non-oriented mark "${e}".`}(r.type)));const m=WX({channel:t,fieldDef:e,markDef:r,config:o,scaleType:null==c?void 0:c.get("type"),useVlSizeChannel:p});g=g||{[u]:u0(u,f||l,c,o,m)};const v=o0(t,r,o,"band"===(null==c?void 0:c.get("type"))&&"band"in g[u]?"top":"middle"),y="xc"===v||"yc"===v,{offset:b,offsetType:_}=e0({channel:t,markDef:r,encoding:i,model:n,bandPosition:y?.5:0}),x=gX({channel:t,channelDef:e,markDef:r,config:o,scaleName:l,scale:c,stack:a,offset:b,defaultRef:n0({model:n,defaultPos:"mid",channel:t,scaleName:l,scale:c}),bandPosition:y?"encoding"===_?0:.5:IW(m)?{signal:`(1-${m})/2`}:fX(m)?(1-m.band)/2:0});if(u)return Object.assign({[v]:x},g);{const e=x$(h),t=g[u],n=b?Object.assign(Object.assign({},t),{offset:b}):t;return{[v]:x,[e]:xe(x)?[x[0],Object.assign(Object.assign({},x[1]),{offset:n})]:Object.assign(Object.assign({},x),{offset:n})}}}(u,t,e):s0(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function({fieldDef:e,fieldDef2:t,channel:n,model:r}){var i,o,a;const{config:s,markDef:l,encoding:c}=r,u=r.getScaleComponent(n),h=r.scaleName(n),d=u?u.get("type"):void 0,f=u.get("reverse"),p=WX({channel:n,fieldDef:e,markDef:l,config:s,scaleType:d}),g=null===(i=r.component.axes[n])||void 0===i?void 0:i[0],m=null!==(o=null==g?void 0:g.get("translate"))&&void 0!==o?o:.5,v=$$(n)&&null!==(a=YW("binSpacing",l,s))&&void 0!==a?a:0,y=w$(n),b=x$(n),_=x$(y),{offset:x}=e0({channel:n,markDef:l,encoding:c,model:r,bandPosition:0}),w=IW(p)?{signal:`(1-${p.signal})/2`}:fX(p)?(1-p.band)/2:.5;if(kW(e.bin)||e.timeUnit)return{[_]:d0({fieldDef:e,scaleName:h,bandPosition:w,offset:h0(y,v,f,m,x)}),[b]:d0({fieldDef:e,scaleName:h,bandPosition:IW(w)?{signal:`1-${w.signal}`}:1-w,offset:h0(n,v,f,m,x)})};if(TW(e.bin)){const r=yX(e,h,{},{offset:h0(y,v,f,m,x)});if(KX(t))return{[_]:r,[b]:yX(t,h,{},{offset:h0(n,v,f,m,x)})};if(SW(e.bin)&&e.bin.step)return{[_]:r,[b]:{signal:`scale("${h}", ${uZ(e,{expr:"datum"})} + ${e.bin.step})`,offset:h0(n,v,f,m,x)}}}RG(LG(y))}({fieldDef:u,fieldDef2:h,channel:t,model:e})}function u0(e,t,n,r,i){if(fX(i)){if(!n)return{mult:i.band,field:{group:e}};{const e=n.get("type");if("band"===e)return{scale:t,band:i.band};1!==i.band&&(RG(function(e){return`Cannot use the relative band size with ${e} scale.`}(e)),i=void 0)}}else{if(IW(i))return i;if(i)return{value:i}}if(n){const e=n.get("range");if(RW(e)&&gt(e.step))return{value:e.step-2}}return{value:qK(r.view,e)-2}}function h0(e,t,n,r,i){if(e$(e))return 0;const o="x"===e||"y2"===e?-t/2:t/2;if(IW(n)||IW(i)||IW(r)){const e=WW(n),t=WW(i),a=WW(r);return{signal:(a?`${a} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${o})`:o)}}return i=i||0,r+(n?-i-o:+i+o)}function d0({fieldDef:e,scaleName:t,bandPosition:n,offset:r}){return bX({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:r})}const f0=new Set(["aria","width","height"]);function p0(e,t){const{fill:n,stroke:r}="include"===t.color?QQ(e):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},function(e,t){return NW.reduce(((n,r)=>(f0.has(r)||void 0===e[r]||"ignore"===t[r]||(n[r]=qW(e[r])),n)),{})}(e.markDef,t)),g0(e,"fill",n)),g0(e,"stroke",r)),JQ("opacity",e)),JQ("fillOpacity",e)),JQ("strokeOpacity",e)),JQ("strokeWidth",e)),JQ("strokeDash",e)),function(e){const{encoding:t,mark:n}=e,r=t.order;return!aX(n)&&iZ(r)?WQ(e,r,"zindex",(e=>qW(e.value))):{}}(e)),XQ(e)),GQ(e,"href")),function(e){const{markDef:t,config:n}=e,r=YW("aria",t,n);return!1===r?{}:Object.assign(Object.assign(Object.assign({},r?{aria:r}:{}),function(e){const{mark:t,markDef:n,config:r}=e;if(!1===r.aria)return{};const i=YW("ariaRoleDescription",n,r);return null!=i?{ariaRoleDescription:{value:i}}:t in zW?{}:{ariaRoleDescription:{value:t}}}(e)),function(e){const{encoding:t,markDef:n,config:r,stack:i}=e,o=t.description;if(o)return WQ(e,o,"description",(t=>YQ(t,e.config)));const a=YW("description",n,r);if(null!=a)return{description:qW(a)};if(!1===r.aria)return{};const s=ZQ(t,i,r);return Wq(s)?void 0:{description:{signal:Xq(s).map((([e,t],n)=>`"${n>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}(e))}(e))}function g0(e,t,n){const{config:r,mark:i,markDef:o}=e;if("hide"===YW("invalid",o,r)&&n&&!aX(i)){const r=function(e,{invalid:t=!1,channels:n}){const r=n.reduce(((t,n)=>{const r=e.getScaleComponent(n);if(r){const i=r.get("type"),o=e.vgField(n,{expr:"datum"});o&&OY(i)&&(t[o]=!0)}return t}),{}),i=Gq(r);if(i.length>0){const e=t?"||":"&&";return i.map((e=>vX(e,t))).join(` ${e} `)}}(e,{invalid:!0,channels:lW});if(r)return{[t]:[{test:r,value:null},...We(n)]}}return n?{[t]:n}:{}}function m0(e){const{config:t,markDef:n}=e;if(YW("invalid",n,t)){const t=function(e,{invalid:t=!1,channels:n}){const r=n.reduce(((t,n)=>{const r=e.getScaleComponent(n);if(r){const i=r.get("type"),o=e.vgField(n,{expr:"datum"});o&&OY(i)&&(t[o]=!0)}return t}),{}),i=Gq(r);if(i.length>0){const e=t?"||":"&&";return i.map((e=>vX(e,t))).join(` ${e} `)}}(e,{channels:H$});if(t)return{defined:{signal:t}}}return{}}function v0(e,t){if(void 0!==t)return{[e]:qW(t)}}const y0="voronoi",b0={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(y0)},marks:(e,t,n)=>{const{x:r,y:i}=t.project.hasChannel,o=e.mark;if(aX(o))return RG(`The "nearest" transform is not supported for ${o} marks.`),n;const a={name:e.getName(y0),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},XQ(e,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let s=0,l=!1;return n.forEach(((t,n)=>{var r;const i=null!==(r=t.name)&&void 0!==r?r:"";i===e.component.mark[0].name?s=n:i.indexOf(y0)>=0&&(l=!0)})),l||n.splice(s+1,0,a),n}},_0=b0,x0={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!OK(e.bind),parse:(e,t,n)=>U0(t,n),topLevelSignals:(e,t,n)=>{const r=t.name,i=t.project,o=t.bind,a=t.init&&t.init[0],s=_0.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.items.forEach(((e,i)=>{var l,c;const u=Kq(`${r}_${e.field}`);n.filter((e=>e.name===u)).length||n.unshift(Object.assign(Object.assign({name:u},a?{init:AQ(a[i])}:{value:null}),{on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${s}[${Tt(e.field)}] : null`}]:[],bind:null!==(c=null!==(l=o[e.field])&&void 0!==l?l:o[e.channel])&&void 0!==c?c:o}))})),n},signals:(e,t,n)=>{const r=t.name,i=t.project,o=n.filter((e=>e.name===r+P0))[0],a=r+LQ,s=i.items.map((e=>Kq(`${r}_${e.field}`))),l=s.map((e=>`${e} !== null`)).join(" && ");return s.length&&(o.update=`${l} ? {fields: ${a}, values: [${s.join(", ")}]} : null`),delete o.value,delete o.on,n}},w0=x0,A0="_toggle",k0={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+A0,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+P0,r=t.name+A0;return`${r} ? null : ${n}, `+("global"===t.resolve?`${r} ? null : true, `:`${r} ? null : {unit: ${B0(e)}}, `)+`${r} ? ${n} : null`}},T0={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=vt(t.clear)?SB(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(w0.defined(t))for(const e of t.project.items){const r=n.findIndex((n=>n.name===Kq(`${t.name}_${e.field}`)));-1!==r&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function r(e,r){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:r})}if("interval"===t.type)for(const e of t.project.items){const t=n.findIndex((t=>t.name===e.signals.visual));r(t,"[0, 0]"),-1===t&&r(n.findIndex((t=>t.name===e.signals.data)),"null")}else{let e=n.findIndex((e=>e.name===t.name+P0));r(e,"null"),k0.defined(t)&&(e=n.findIndex((e=>e.name===t.name+A0)),r(e,"false"))}return n}},S0={defined:e=>{const t="global"===e.resolve&&e.bind&&OK(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==CK;return t&&!n&&RG("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&n},parse:(e,t,n)=>{var r;const i=Cq(n);if(i.select=vt(i.select)?{type:i.select,toggle:t.toggle}:Object.assign(Object.assign({},i.select),{toggle:t.toggle}),U0(t,i),we(n.select)&&(n.select.on||n.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const n of t.events)n.filter=We(null!==(r=n.filter)&&void 0!==r?r:[]),n.filter.includes(e)||n.filter.push(e)}const o=LK(t.bind)?t.bind.legend:"click",a=vt(o)?SB(o,"view"):We(o);t.bind={legend:{merge:a}}},topLevelSignals:(e,t,n)=>{const r=t.name,i=LK(t.bind)&&t.bind.legend,o=e=>t=>{const n=Cq(t);return n.markname=e,n};for(const e of t.project.items){if(!e.hasLegend)continue;const a=`${Kq(e.field)}_legend`,s=`${r}_${a}`;if(0===n.filter((e=>e.name===s)).length){const e=i.merge.map(o(`${a}_symbols`)).concat(i.merge.map(o(`${a}_labels`))).concat(i.merge.map(o(`${a}_entries`)));n.unshift(Object.assign(Object.assign({name:s},t.init?{}:{value:null}),{on:[{events:e,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:`!event.item || !datum ? null : ${s}`,force:!0}]}))}}return n},signals:(e,t,n)=>{const r=t.name,i=t.project,o=n.find((e=>e.name===r+P0)),a=r+LQ,s=i.items.filter((e=>e.hasLegend)).map((e=>Kq(`${r}_${Kq(e.field)}_legend`))),l=`${s.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${a}, values: [${s.join(", ")}]} : null`;t.events&&s.length>0?o.on.push({events:s.map((e=>({signal:e}))),update:l}):s.length>0&&(o.update=l,delete o.value,delete o.on);const c=n.find((e=>e.name===r+A0)),u=LK(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:u})):c.on[0].events=u),n}},E0="_translate_anchor",C0="_translate_delta",M0={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,n)=>{const r=t.name,i=NQ.defined(t),o=r+E0,{x:a,y:s}=t.project.hasChannel;let l=SB(t.translate,"scope");return i||(l=l.map((e=>(e.between[0].markname=r+BQ,e)))),n.push({name:o,value:{},on:[{events:l.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==a?`, extent_x: ${i?zQ(e,_H):`slice(${a.signals.visual})`}`:"")+(void 0!==s?`, extent_y: ${i?zQ(e,xH):`slice(${s.signals.visual})`}`:"")+"}"}]},{name:r+C0,value:{},on:[{events:l,update:`{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`}]}),void 0!==a&&O0(e,t,a,"width",n),void 0!==s&&O0(e,t,s,"height",n),n}};function O0(e,t,n,r,i){var o,a;const s=t.name,l=s+E0,c=s+C0,u=n.channel,h=NQ.defined(t),d=i.filter((e=>e.name===n.signals[h?"data":"visual"]))[0],f=e.getSizeSignalRef(r).signal,p=e.getScaleComponent(u),g=p.get("type"),m=p.get("reverse"),v=`${l}.extent_${u}`,y=`${h?"log"===g?"panLog":"symlog"===g?"panSymlog":"pow"===g?"panPow":"panLinear":"panLinear"}(${v}, ${h?u===_H?m?"":"-":m?"-":"":""}${c}.${u} / ${h?`${f}`:`span(${v})`}${h?"pow"===g?`, ${null!==(o=p.get("exponent"))&&void 0!==o?o:1}`:"symlog"===g?`, ${null!==(a=p.get("constant"))&&void 0!==a?a:1}`:"":""})`;d.on.push({events:{signal:c},update:h?y:`clampRange(${y}, 0, ${f})`})}const L0="_zoom_delta",D0={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,n)=>{const r=t.name,i=NQ.defined(t),o=r+L0,{x:a,y:s}=t.project.hasChannel,l=Tt(e.scaleName(_H)),c=Tt(e.scaleName(xH));let u=SB(t.zoom,"scope");return i||(u=u.map((e=>(e.markname=r+BQ,e)))),n.push({name:r+"_zoom_anchor",on:[{events:u,update:i?"{"+[l?`x: invert(${l}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter((e=>!!e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:o,on:[{events:u,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==a&&I0(e,t,a,"width",n),void 0!==s&&I0(e,t,s,"height",n),n}};function I0(e,t,n,r,i){var o,a;const s=t.name,l=n.channel,c=NQ.defined(t),u=i.filter((e=>e.name===n.signals[c?"data":"visual"]))[0],h=e.getSizeSignalRef(r).signal,d=e.getScaleComponent(l),f=d.get("type"),p=c?zQ(e,l):u.name,g=s+L0,m=`${c?"log"===f?"zoomLog":"symlog"===f?"zoomSymlog":"pow"===f?"zoomPow":"zoomLinear":"zoomLinear"}(${p}, ${s}_zoom_anchor.${l}, ${g}${c?"pow"===f?`, ${null!==(o=d.get("exponent"))&&void 0!==o?o:1}`:"symlog"===f?`, ${null!==(a=d.get("constant"))&&void 0!==a?a:1}`:"":""})`;u.on.push({events:{signal:g},update:c?m:`clampRange(${m}, 0, ${h})`})}const R0="_store",P0="_tuple",N0="_modify",z0="vlSelectionResolve",F0=[$Q,VQ,RQ,k0,w0,NQ,S0,T0,M0,D0,_0];function B0(e,{escape:t}={escape:!0}){let n=t?Tt(e.name):e.name;const r=function(e){let t=e.parent;for(;t&&!y3(t);)t=t.parent;return t}(e);if(r){const{facet:e}=r;for(const t of a$)e[t]&&(n+=` + '__facet_${t}_' + (facet[${Tt(r.vgField(t))}])`)}return n}function j0(e){var t;return Yq(null!==(t=e.component.selection)&&void 0!==t?t:{}).reduce(((e,t)=>e||t.project.items.some((e=>e.field===CK))),!1)}function U0(e,t){!vt(t.select)&&t.select.on||delete e.events,!vt(t.select)&&t.select.clear||delete e.clear,!vt(t.select)&&t.select.toggle||delete e.toggle}function V0(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...V0(e.object)),t.push(...V0(e.property))),t)}function q0(e){return"MemberExpression"===e.object.type?q0(e.object):"datum"===e.object.name}function H0(e){const t=zR(e),n=new Set;return t.visit((e=>{"MemberExpression"===e.type&&q0(e)&&n.add(V0(e).slice(1).join("."))})),n}class $0 extends EQ{constructor(e,t,n){super(e),this.model=t,this.filter=n,this.expr=Y0(this.model,this.filter,this),this._dependentFields=H0(this.expr)}clone(){return new $0(null,this.model,Cq(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function W0(e,t,n,r="datum"){const i=vt(t)?t:t.param,o=Kq(i),a=Tt(o+R0);let s;try{s=e.getSelectionComponent(o,i)}catch(e){return`!!${o}`}if(s.project.timeUnit){const t=null!=n?n:e.component.data.raw,r=s.project.timeUnit.clone();t.parent?r.insertAsParentOf(t):t.parent=r}const l=`vlSelectionTest(${a}, ${r}${"global"===s.resolve?")":`, ${Tt(s.resolve)})`}`,c=`length(data(${a}))`;return!1===t.empty?`${c} && ${l}`:`!${c} || ${l}`}function G0(e,t,n){const r=Kq(t),i=n.encoding;let o,a=n.field;try{o=e.getSelectionComponent(r,t)}catch(e){return r}if(i||a){if(i&&!a){const e=o.project.items.filter((e=>e.channel===i));!e.length||e.length>1?(a=o.project.items[0].field,RG((e.length?"Multiple ":"No ")+`matching ${Tt(i)} encoding found for selection ${Tt(n.param)}. `+`Using "field": ${Tt(a)}.`)):a=e[0].field}}else a=o.project.items[0].field,o.project.items.length>1&&RG(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${Tt(a)}.`);return`${o.name}[${Tt(iH(a))}]`}function Y0(e,t,n){return Jq(t,(t=>vt(t)?t:function(e){return null==e?void 0:e.param}(t)?W0(e,t,n):oY(t)))}var X0=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Z0(e,t,n,r){var i,o,a,s,l;null!==(i=e.encode)&&void 0!==i||(e.encode={}),null!==(o=(s=e.encode)[t])&&void 0!==o||(s[t]={}),null!==(a=(l=e.encode[t]).update)&&void 0!==a||(l.update={}),e.encode[t].update[n]=r}function K0(e,t,n,r={header:!1}){var i,o;const a=e.combine(),{disable:s,orient:l,scale:c,labelExpr:u,title:h,zindex:d}=a,f=X0(a,["disable","orient","scale","labelExpr","title","zindex"]);if(!s){for(const e in f){const n=IZ[e],r=f[e];if(n&&n!==t&&"both"!==n)delete f[e];else if(LZ(r)){const{condition:t}=r,n=X0(r,["condition"]),i=We(t),o=OZ[e];if(o){const{vgProp:t,part:r}=o,a=[...i.map((e=>{const{test:t}=e,n=X0(e,["test"]);return Object.assign({test:Y0(null,t)},n)})),n];Z0(f,r,t,a),delete f[e]}else if(null===o){const t={signal:i.map((e=>{const{test:t}=e,n=X0(e,["test"]);return`${Y0(null,t)} ? ${$W(n)} : `})).join("")+$W(n)};f[e]=t}}else if(IW(r)){const t=OZ[e];if(t){const{vgProp:n,part:i}=t;Z0(f,i,n,r),delete f[e]}}Pq(["labelAlign","labelBaseline"],e)&&null===f[e]&&delete f[e]}if("grid"===t){if(!f.grid)return;if(f.encode){const{grid:e}=f.encode;f.encode=Object.assign({},e?{grid:e}:{}),Wq(f.encode)&&delete f.encode}return Object.assign(Object.assign({scale:c,orient:l},f),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:lH(d,0)})}{if(!r.header&&e.mainExtracted)return;if(void 0!==u){let e=u;(null===(o=null===(i=f.encode)||void 0===i?void 0:i.labels)||void 0===o?void 0:o.update)&&IW(f.encode.labels.update.text)&&(e=oH(u,"datum.label",f.encode.labels.update.text.signal)),Z0(f,"labels","text",{signal:e})}if(null===f.labelAlign&&delete f.labelAlign,f.encode){for(const t of DZ)e.hasAxisPart(t)||delete f.encode[t];Wq(f.encode)&&delete f.encode}const t=function(e,t){if(e)return xe(e)&&!DW(e)?e.map((e=>vZ(e,t))).join(", "):e}(h,n);return Object.assign(Object.assign(Object.assign(Object.assign({scale:c,orient:l,grid:!1},t?{title:t}:{}),f),!1===n.aria?{aria:!1}:{}),{zindex:lH(d,0)})}}}function J0(e){const{axes:t}=e.component,n=[];for(const r of H$)if(t[r])for(const i of t[r])if(!i.get("disable")&&!i.get("gridScale")){const t="x"===r?"height":"width",i=e.getSizeSignalRef(t).signal;t!==i&&n.push({name:t,update:i})}return n}function Q0(e,t,n,r){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===n?"bottom":"left",i=t["x"===n?"axisBottom":"axisLeft"]||{},o=t["x"===n?"axisTop":"axisRight"]||{},a=new Set([...Gq(i),...Gq(o)]),s={};for(const t of a.values())s[t]={signal:`${r.signal} === "${e}" ? ${WW(i[t])} : ${WW(o[t])}`};return s}return t[e]}))])}function e1(e,t){var n;const r=[{}];for(const i of e){let e=null===(n=t[i])||void 0===n?void 0:n.style;if(e){e=We(e);for(const n of e)r.push(t.style[n])}}return Object.assign.apply(null,r)}function t1(e,t,n,r={}){var i;const o=KW(e,n,t);if(void 0!==o)return{configFrom:"style",configValue:o};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==(null===(i=r[t])||void 0===i?void 0:i[e]))return{configFrom:t,configValue:r[t][e]};return{}}const n1={scale:({model:e,channel:t})=>e.scaleName(t),format:({fieldOrDatumDef:e,config:t,axis:n})=>{const{format:r,formatType:i}=n;return EX(e,e.type,r,i,t,!0)},formatType:({axis:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:r}=e;return CX(r,t,n)},grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>{var r;return null!==(r=t.grid)&&void 0!==r?r:function(e,t){return!MY(e)&&KX(t)&&!kW(null==t?void 0:t.bin)&&!TW(null==t?void 0:t.bin)}(n,e)},gridScale:({model:e,channel:t})=>function(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelAlign||o1(t,n,r),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:r})=>e.labelBaseline||i1(t,n,r),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>{var r;return null!==(r=e.labelFlush)&&void 0!==r?r:function(e,t){if("x"===t&&Pq(["quantitative","temporal"],e))return!0}(t.type,n)},labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>{var r;return null!==(r=e.labelOverlap)&&void 0!==r?r:function(e,t,n,r){if(n&&!we(r)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,n,KX(t)&&!!t.timeUnit,KX(t)?t.sort:void 0)},orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:r,scaleType:i})=>{var o;const a="x"===e?"width":"y"===e?"height":void 0,s=a?t.getSizeSignalRef(a):void 0;return null!==(o=n.tickCount)&&void 0!==o?o:function({fieldOrDatumDef:e,scaleType:t,size:n,values:r}){var i;if(!r&&!MY(t)&&"log"!==t){if(KX(e)){if(kW(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&Pq(["month","hours","day","quarter"],null===(i=XG(e.timeUnit))||void 0===i?void 0:i.unit))return}return{signal:`ceil(${n.signal}/40)`}}}({fieldOrDatumDef:r,scaleType:i,size:s,values:n.values})},title:({axis:e,model:t,channel:n})=>{if(void 0!==e.title)return e.title;const r=a1(t,n);if(void 0!==r)return r;const i=t.typedFieldDef(n),o="x"===n?"x2":"y2",a=t.fieldDef(o);return QW(i?[qX(i)]:[],KX(a)?[qX(a)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function(e,t){const n=e.values;return xe(n)?CZ(t,n):IW(n)?n:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>{var r;return null!==(r=e.zindex)&&void 0!==r?r:function(e,t){return"rect"===e&&hZ(t)?1:0}(n,t)}};function r1(e){return`(((${e.signal} % 360) + 360) % 360)`}function i1(e,t,n,r){if(void 0!==e){if("x"===n){if(IW(e)){const n=r1(e);return{signal:`(45 < ${n} && ${n} < 135) || (225 < ${n} && ${n} < 315) ? "middle" :(${n} <= 45 || 315 <= ${n}) === ${IW(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45<e&&e<135||225<e&&e<315)return"middle";if(IW(t)){const n=e<=45||315<=e?"===":"!==";return{signal:`${t.signal} ${n} "top" ? "bottom" : "top"`}}return(e<=45||315<=e)==("top"===t)?"bottom":"top"}if(IW(e)){const n=r1(e);return{signal:`${n} <= 45 || 315 <= ${n} || (135 <= ${n} && ${n} <= 225) ? ${r?'"middle"':"null"} : (45 <= ${n} && ${n} <= 135) === ${IW(t)?`(${t.signal} === "left")`:"left"===t} ? "top" : "bottom"`}}if(e<=45||315<=e||135<=e&&e<=225)return r?"middle":null;if(IW(t)){const n=45<=e&&e<=135?"===":"!==";return{signal:`${t.signal} ${n} "left" ? "top" : "bottom"`}}return(45<=e&&e<=135)==("left"===t)?"top":"bottom"}}function o1(e,t,n){if(void 0===e)return;const r="x"===n,i=r?0:90,o=r?"bottom":"left";if(IW(e)){const n=r1(e);return{signal:`(${i?`(${n} + 90)`:n} % 180 === 0) ? ${r?null:'"center"'} :(${i} < ${n} && ${n} < ${180+i}) === ${IW(t)?`(${t.signal} === "${o}")`:t===o} ? "left" : "right"`}}if((e+i)%180==0)return r?null:"center";if(IW(t)){const n=i<e&&e<180+i?"===":"!==";return{signal:`${t.signal} ${n} "${o}" ? "left" : "right"`}}return(i<e&&e<180+i)==(t===o)?"left":"right"}function a1(e,t){const n="x"===t?"x2":"y2",r=e.fieldDef(t),i=e.fieldDef(n),o=r?r.title:void 0,a=i?i.title:void 0;return o&&a?eG(o,a):o||a||(void 0!==o?o:void 0!==a?a:void 0)}class s1 extends EQ{constructor(e,t){super(e),this.transform=t,this._dependentFields=H0(this.transform.calculate)}clone(){return new s1(null,Cq(this.transform))}static parseAllForSortIndex(e,t){return t.forEachFieldDef(((t,n)=>{if(oZ(t)&&FX(t.sort)){const{field:r,timeUnit:i}=t,o=t.sort,a=o.map(((e,t)=>`${oY({field:r,timeUnit:i,equal:e})} ? ${t} : `)).join("")+o.length;e=new s1(e,{calculate:a,as:l1(t,n,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${Iq(this.transform)}`}}function l1(e,t,n){return uZ(e,Object.assign({prefix:t,suffix:"sort_index"},null!=n?n:{}))}function c1(e,t){return Pq(["top","bottom"],t)?"column":Pq(["left","right"],t)||"row"===e?"row":"column"}function u1(e,t,n,r){const i="row"===r?n.headerRow:"column"===r?n.headerColumn:n.headerFacet;return lH((t||{})[e],i[e],n.header[e])}function h1(e,t,n,r){const i={};for(const o of e){const e=u1(o,t||{},n,r);void 0!==e&&(i[o]=e)}return i}const d1=["row","column"],f1=["header","footer"];function p1(e,t){const n=e.component.layoutHeaders[t].title,r=e.config?e.config:void 0,i=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:a,titleOrient:s}=h1(["titleAnchor","titleAngle","titleOrient"],i.header,r,t),l=c1(t,s),c=pH(a);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:n},"row"===t?{orient:"left"}:{}),{style:"guide-title"}),m1(c,l)),g1(l,c,o)),A1(r,i,t,AK,xK))}}function g1(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const r=o1(t,"row"===e?"left":"top","row"===e?"y":"x");return r?{align:r}:{}}function m1(e,t){const n=i1(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function v1(e,t){const n=e.component.layoutHeaders[t],r=[];for(const i of f1)if(n[i])for(const o of n[i]){const a=_1(e,t,i,n,o);null!=a&&r.push(a)}return r}function y1(e,t){var n;const{sort:r}=e;return zX(r)?{field:uZ(r,{expr:"datum"}),order:null!==(n=r.order)&&void 0!==n?n:"ascending"}:xe(r)?{field:l1(e,t,{expr:"datum"}),order:"ascending"}:{field:uZ(e,{expr:"datum"}),order:null!=r?r:"ascending"}}function b1(e,t,n){const{format:r,formatType:i,labelAngle:o,labelAnchor:a,labelOrient:s,labelExpr:l}=h1(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=kX({fieldOrDatumDef:e,format:r,formatType:i,expr:"parent",config:n}).signal,u=c1(t,s);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:l?oH(oH(l,"datum.label",c),"datum.value",uZ(e,{expr:"parent"})):c}},"row"===t?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),m1(o,u)),g1(u,o,a)),A1(n,e,t,kK,wK))}function _1(e,t,n,r,i){if(i){let o=null;const{facetFieldDef:a}=r,s=e.config?e.config:void 0;if(a&&i.labels){const{labelOrient:e}=h1(["labelOrient"],a.header,s,t);("row"===t&&!Pq(["top","bottom"],e)||"column"===t&&!Pq(["left","right"],e))&&(o=b1(a,t,s))}const l=y3(e)&&!BX(e.facet),c=i.axes,u=(null==c?void 0:c.length)>0;if(o||u){const s="row"===t?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`},r.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:y1(a,t)}:{}),u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{}),o?{title:o}:{}),i.sizeSignal?{encode:{update:{[s]:i.sizeSignal}}}:{}),u?{axes:c}:{})}}return null}const x1={column:{start:0,end:1},row:{start:1,end:0}};function w1(e,t){return x1[t][e]}function A1(e,t,n,r,i){const o={};for(const a of r){if(!i[a])continue;const r=u1(a,null==t?void 0:t.header,e,n);void 0!==r&&(o[i[a]]=r)}return o}function k1(e){return[...T1(e,"width"),...T1(e,"height"),...T1(e,"childWidth"),...T1(e,"childHeight")]}function T1(e,t){const n="width"===t?"x":"y",r=e.component.layoutSize.get(t);if(!r||"merged"===r)return[];const i=e.getSizeSignalRef(t).signal;if("step"===r){const t=e.getScaleComponent(n);if(t){const r=t.get("type"),o=t.get("range");if(MY(r)&&RW(o)){const r=e.scaleName(n);return y3(e.parent)&&"independent"===e.parent.component.resolve.scale[n]?[S1(r,o)]:[S1(r,o),{name:i,update:E1(r,t,`domain('${r}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==r){const t=i.endsWith("width"),n=t?"containerSize()[0]":"containerSize()[1]",r=`isFinite(${n}) ? ${n} : ${VK(e.config.view,t?"width":"height")}`;return[{name:i,init:r,on:[{update:r,events:"window:resize"}]}]}return[{name:i,value:r}]}function S1(e,t){const n=`${e}_step`;return IW(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function E1(e,t,n){const r=t.get("type"),i=t.get("padding"),o=lH(t.get("paddingOuter"),i);let a=t.get("paddingInner");return a="band"===r?void 0!==a?a:i:1,`bandspace(${n}, ${WW(a)}, ${WW(o)}) * ${e}_step`}function C1(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function M1(e,t){return Gq(e).reduce(((n,r)=>{const i=e[r];return Object.assign(Object.assign({},n),WQ(t,i,r,(e=>qW(e.value))))}),{})}function O1(e,t){if(y3(t))return"theta"===e?"independent":"shared";if(_3(t))return"shared";if(b3(t))return $$(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function L1(e,t){const n=e.scale[t],r=$$(t)?"axis":"legend";return"independent"===n?("shared"===e[r][t]&&RG(function(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[r][t]||"shared"}const D1=Object.assign(Object.assign({},EK),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),I1=Gq(D1);class R1 extends sQ{}const P1={symbols:function(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i,legendType:o}){var a,s,l,c,u,h,d,f;if("symbol"!==o)return;const{markDef:p,encoding:g,config:m,mark:v}=n,y=p.filled&&"trail"!==v;let b=Object.assign(Object.assign({},function(e,t,n){for(const r of n){const n=XW(r,t.markDef,t.config);void 0!==n&&(e[r]=qW(n))}return e}({},n,uX)),QQ(n,{filled:y}));const _=null!==(a=i.get("symbolOpacity"))&&void 0!==a?a:m.legend.symbolOpacity,x=null!==(s=i.get("symbolFillColor"))&&void 0!==s?s:m.legend.symbolFillColor,w=null!==(l=i.get("symbolStrokeColor"))&&void 0!==l?l:m.legend.symbolStrokeColor,A=void 0===_?null!==(c=N1(g.opacity))&&void 0!==c?c:p.opacity:void 0;if(b.fill)if("fill"===r||y&&r===RH)delete b.fill;else if(b.fill.field)x?delete b.fill:(b.fill=qW(null!==(u=m.legend.symbolBaseFillColor)&&void 0!==u?u:"black"),b.fillOpacity=qW(null!=A?A:1));else if(xe(b.fill)){const e=null!==(f=null!==(d=z1(null!==(h=g.fill)&&void 0!==h?h:g.color))&&void 0!==d?d:p.fill)&&void 0!==f?f:y&&p.color;e&&(b.fill=qW(e))}if(b.stroke)if("stroke"===r||!y&&r===RH)delete b.stroke;else if(b.stroke.field||w)delete b.stroke;else if(xe(b.stroke)){const e=lH(z1(g.stroke||g.color),p.stroke,y?p.color:void 0);e&&(b.stroke={value:e})}if(r!==jH){const e=KX(t)&&B1(0,i,t);e?b.opacity=[Object.assign({test:e},qW(null!=A?A:1)),qW(m.legend.unselectedOpacity)]:A&&(b.opacity=qW(A))}return b=Object.assign(Object.assign({},b),e),Wq(b)?void 0:b},gradient:function(e,{model:t,legendType:n,legendCmpt:r}){var i;if("gradient"!==n)return;const{config:o,markDef:a,encoding:s}=t;let l={};const c=void 0===(null!==(i=r.get("gradientOpacity"))&&void 0!==i?i:o.legend.gradientOpacity)?N1(s.opacity)||a.opacity:void 0;return c&&(l.opacity=qW(c)),l=Object.assign(Object.assign({},l),e),Wq(l)?void 0:l},labels:function(e,{fieldOrDatumDef:t,model:n,channel:r,legendCmpt:i}){const o=n.legend(r)||{},a=n.config,s=KX(t)?B1(0,i,t):void 0,l=s?[{test:s,value:1},{value:a.legend.unselectedOpacity}]:void 0,{format:c,formatType:u}=o,h=wX(u)?SX({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:u,config:a}):void 0,d=Object.assign(Object.assign(Object.assign({},l?{opacity:l}:{}),h?{text:h}:{}),e);return Wq(d)?void 0:d},entries:function(e,{legendCmpt:t}){const n=t.get("selections");return(null==n?void 0:n.length)?Object.assign(Object.assign({},e),{fill:{value:"transparent"}}):e}};function N1(e){return F1(e,((e,t)=>Math.max(e,t.value)))}function z1(e){return F1(e,((e,t)=>lH(e,t.value)))}function F1(e,t){return function(e){const t=e&&e.condition;return!!t&&(xe(t)||iZ(t))}(e)?We(e.condition).reduce(t,e.value):iZ(e)?e.value:void 0}function B1(e,t,n){const r=t.get("selections");if(!(null==r?void 0:r.length))return;const i=Tt(n.field);return r.map((e=>`(!length(data(${Tt(Kq(e)+R0)})) || (${e}[${i}] && indexof(${e}[${i}], datum.value) >= 0))`)).join(" || ")}const j1={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:r,formatType:i}=t;return EX(e,e.type,r,i,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:r}=e;return CX(r,t,n)},gradientLength:e=>{var t,n;const{legend:r,legendConfig:i}=e;return null!==(n=null!==(t=r.gradientLength)&&void 0!==t?t:i.gradientLength)&&void 0!==n?n:function({legendConfig:e,model:t,direction:n,orient:r,scaleType:i}){const{gradientHorizontalMaxLength:o,gradientHorizontalMinLength:a,gradientVerticalMaxLength:s,gradientVerticalMinLength:l}=e;if(LY(i))return"horizontal"===n?"top"===r||"bottom"===r?V1(t,"width",a,o):a:V1(t,"height",l,s)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>{var r,i;return null!==(i=null!==(r=e.labelOverlap)&&void 0!==r?r:t.labelOverlap)&&void 0!==i?i:function(e){if(Pq(["quantile","threshold","log","symlog"],e))return"greedy"}(n)},symbolType:({legend:e,markDef:t,channel:n,encoding:r})=>{var i;return null!==(i=e.symbolType)&&void 0!==i?i:function(e,t,n,r){var i;if("shape"!==t){const e=null!==(i=z1(n))&&void 0!==i?i:r;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,n,r.shape,t.shape)},title:({fieldOrDatumDef:e,config:t})=>gZ(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(i$(n)&&LY(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function(e,t){const n=e.values;return xe(n)?CZ(t,n):IW(n)?n:void 0}(t,e)};function U1({legendConfig:e,legendType:t,orient:n,legend:r}){var i,o;return null!==(o=null!==(i=r.direction)&&void 0!==i?i:e[t?"gradientDirection":"symbolDirection"])&&void 0!==o?o:function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(n,t)}function V1(e,t,n,r){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${r})`}}function q1(e){const t=v3(e)?function(e){const{encoding:t}=e,n={};for(const r of[RH,...SK]){const i=_Z(t[r]);i&&e.getScaleComponent(r)&&(r===zH&&KX(i)&&i.type===pY||(n[r]=$1(e,r)))}return n}(e):function(e){const{legends:t,resolve:n}=e.component;for(const r of e.children){q1(r);for(const i of Gq(r.component.legends))n.legend[i]=L1(e.component.resolve,i),"shared"===n.legend[i]&&(t[i]=W1(t[i],r.component.legends[i]),t[i]||(n.legend[i]="independent",delete t[i]))}for(const r of Gq(t))for(const t of e.children)t.component.legends[r]&&"shared"===n.legend[r]&&delete t.component.legends[r];return t}(e);return e.component.legends=t,t}function H1(e,t,n,r){switch(t){case"disable":return void 0!==n;case"values":return!!(null==n?void 0:n.values);case"title":if("title"===t&&e===(null==r?void 0:r.title))return!0}return e===(n||{})[t]}function $1(e,t){var n,r,i;let o=e.legend(t);const{markDef:a,encoding:s,config:l}=e,c=l.legend,u=new R1({},function(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));!function(e,t,n){var r,i,o,a;const s=null===(r=e.fieldDef(t))||void 0===r?void 0:r.field;for(const r of Yq(null!==(i=e.component.selection)&&void 0!==i?i:{})){const e=null!==(o=r.project.hasField[s])&&void 0!==o?o:r.project.hasChannel[t];if(e&&S0.defined(r)){const t=null!==(a=n.get("selections"))&&void 0!==a?a:[];t.push(r.name),n.set("selections",t,!1),e.hasLegend=!0}}}(e,t,u);const h=void 0!==o?!o:c.disable;if(u.set("disable",h,void 0!==o),h)return u;o=o||{};const d=e.getScaleComponent(t).get("type"),f=_Z(s[t]),p=KX(f)?null===(n=XG(f.timeUnit))||void 0===n?void 0:n.unit:void 0,g=o.orient||l.legend.orient||"right",m=function(e){const{legend:t}=e;return lH(t.type,function({channel:e,timeUnit:t,scaleType:n}){if(i$(e)){if(Pq(["quarter","month","day"],t))return"symbol";if(LY(n))return"gradient"}return"symbol"}(e))}({legend:o,channel:t,timeUnit:p,scaleType:d}),v={legend:o,channel:t,model:e,markDef:a,encoding:s,fieldOrDatumDef:f,legendConfig:c,config:l,scaleType:d,orient:g,legendType:m,direction:U1({legend:o,legendType:m,orient:g,legendConfig:c})};for(const n of I1){if("gradient"===m&&n.startsWith("symbol")||"symbol"===m&&n.startsWith("gradient"))continue;const r=n in j1?j1[n](v):o[n];if(void 0!==r){const i=H1(r,n,o,e.fieldDef(t));(i||void 0===l.legend[n])&&u.set(n,r,i)}}const y=null!==(r=null==o?void 0:o.encoding)&&void 0!==r?r:{},b=u.get("selections"),_={},x={fieldOrDatumDef:f,model:e,channel:t,legendCmpt:u,legendType:m};for(const t of["labels","legend","title","symbols","gradient","entries"]){const n=M1(null!==(i=y[t])&&void 0!==i?i:{},e),r=t in P1?P1[t](n,x):n;void 0===r||Wq(r)||(_[t]=Object.assign(Object.assign(Object.assign({},(null==b?void 0:b.length)&&KX(f)?{name:`${Kq(f.field)}_legend_${t}`}:{}),(null==b?void 0:b.length)?{interactive:!!b}:{}),{update:r}))}return Wq(_)||u.set("encode",_,!!(null==o?void 0:o.encoding)),u}function W1(e,t){var n,r,i,o;if(!e)return t.clone();const a=e.getWithExplicit("orient"),s=t.getWithExplicit("orient");if(a.explicit&&s.explicit&&a.value!==s.value)return;let l=!1;for(const n of I1){const r=dQ(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",((e,t)=>{switch(n){case"symbolType":return r=e,"circle"===(i=t).value?i:r;case"title":return tG(e,t);case"type":return l=!0,cQ("symbol")}var r,i;return hQ(e,t,n,"legend")}));e.setWithExplicit(n,r)}return l&&((null===(r=null===(n=e.implicit)||void 0===n?void 0:n.encode)||void 0===r?void 0:r.gradient)&&Qq(e.implicit,["encode","gradient"]),(null===(o=null===(i=e.explicit)||void 0===i?void 0:i.encode)||void 0===o?void 0:o.gradient)&&Qq(e.explicit,["encode","gradient"])),e}function G1(e){const t=e.component.legends,n={};for(const r of Gq(t)){const i=e.getScaleComponent(r),o=Dq(i.get("domains"));if(n[o])for(const e of n[o])W1(e,t[r])||n[o].push(t[r]);else n[o]=[t[r].clone()]}const r=Yq(n).flat().map((t=>function(e,t){var n,r,i;const o=e.combine(),{disable:a,labelExpr:s,selections:l}=o,c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(o,["disable","labelExpr","selections"]);if(!a){if(!1===t.aria&&null==c.aria&&(c.aria=!1),null===(n=c.encode)||void 0===n?void 0:n.symbols){const e=c.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||c.stroke||(e.stroke={value:"transparent"});for(const t of SK)c[t]&&delete e[t]}if(c.title||delete c.title,void 0!==s){let e=s;(null===(i=null===(r=c.encode)||void 0===r?void 0:r.labels)||void 0===i?void 0:i.update)&&IW(c.encode.labels.update.text)&&(e=oH(s,"datum.label",c.encode.labels.update.text.signal)),function(e,t,n,r){var i,o,a,s,l;null!==(i=e.encode)&&void 0!==i||(e.encode={}),null!==(o=(s=e.encode)[t])&&void 0!==o||(s[t]={}),null!==(a=(l=e.encode[t]).update)&&void 0!==a||(l.update={}),e.encode[t].update.text=r}(c,"labels",0,{signal:e})}return c}}(t,e.config))).filter((e=>void 0!==e));return r}function Y1(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:r}=n;if(t.data){const i={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},o=t.data.reduce(((t,n)=>{const r=IW(n)?n.signal:`data('${e.lookupDataSource(n)}')`;return Pq(t,r)||t.push(r),t}),[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:r,size:i,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]}},n)]}return[Object.assign(Object.assign({name:r},{translate:{signal:"[width / 2, height / 2]"}}),n)]}const X1=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class Z1 extends sQ{constructor(e,t,n,r){super(Object.assign({},t),{name:e}),this.specifiedProjection=t,this.size=n,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function K1(e){e.component.projection=v3(e)?function(e){var t;if(e.hasProjection){const n=OW(e.specifiedProjection),r=!(n&&(null!=n.scale||null!=n.translate)),i=r?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,o=r?function(e){const t=[],{encoding:n}=e;for(const r of[[LH,OH],[IH,DH]])(_Z(n[r[0]])||_Z(n[r[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(zH)&&e.typedFieldDef(zH).type===pY&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(xQ.Main)),t}(e):void 0,a=new Z1(e.projectionName(!0),Object.assign(Object.assign({},null!==(t=OW(e.config.projection))&&void 0!==t?t:{}),null!=n?n:{}),i,o);return a.get("type")||a.set("type","equalEarth",!1),a}}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)K1(t);const n=zq(e.children,(e=>{const n=e.component.projection;if(n){if(t){const e=function(e,t){const n=zq(X1,(n=>!at(e.explicit,n)&&!at(t.explicit,n)||!!(at(e.explicit,n)&&at(t.explicit,n)&&Eq(e.get(n),t.get(n)))));if(Eq(e.size,t.size)){if(n)return e;if(Eq(e.explicit,{}))return t;if(Eq(t.explicit,{}))return e}return null}(t,n);return e&&(t=e),!!e}return t=n,!0}return!0}));if(t&&n){const n=e.projectionName(!0),r=new Z1(n,t.specifiedProjection,t.size,Cq(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&r.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),n),e.merged=!0)}return r}}(e)}function J1(e,t){return`${AW(e)}_${t}`}function Q1(e,t,n){var r;const i=J1(null!==(r=kZ(n,void 0))&&void 0!==r?r:{},t);return e.getName(`${i}_bins`)}function e2(e,t,n){let r,i;r=function(e){return"as"in e}(e)?vt(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[uZ(e,{forAs:!0}),uZ(e,{binSuffix:"end",forAs:!0})];const o=Object.assign({},kZ(t,void 0)),a=J1(o,e.field),{signal:s,extentSignal:l}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(n,a);if(EW(o.extent)){const e=o.extent;i=G0(n,e.param,e),delete o.extent}return{key:a,binComponent:Object.assign(Object.assign(Object.assign({bin:o,field:e.field,as:[r]},s?{signal:s}:{}),l?{extentSignal:l}:{}),i?{span:i}:{})}}class t2 extends EQ{constructor(e,t){super(e),this.bins=t}clone(){return new t2(null,Cq(this.bins))}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,r)=>{if(rZ(n)&&kW(n.bin)){const{key:i,binComponent:o}=e2(n,n.bin,t);e[i]=Object.assign(Object.assign(Object.assign({},o),e[i]),function(e,t,n,r){var i,o;if(MZ(t,n)){const a=v3(e)&&null!==(o=null!==(i=e.axis(n))&&void 0!==i?i:e.legend(n))&&void 0!==o?o:{},s=uZ(t,{expr:"datum"}),l=uZ(t,{expr:"datum",binSuffix:"end"});return{formulaAs:uZ(t,{binSuffix:"range",forAs:!0}),formula:DX(s,l,a.format,a.formatType,r)}}return{}}(t,n,r,t.config))}return e}),{});return Wq(n)?null:new t2(e,n)}static makeFromTransform(e,t,n){const{key:r,binComponent:i}=e2(t,t.bin,n);return new t2(e,{[r]:i})}merge(e,t){for(const n of Gq(e.bins))n in this.bins?(t(e.bins[n].signal,this.bins[n].signal),this.bins[n].as=jq([...this.bins[n].as,...e.bins[n].as],Iq)):this.bins[n]=e.bins[n];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set(Yq(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set(Yq(this.bins).map((e=>e.field)))}hash(){return`Bin ${Iq(this.bins)}`}assemble(){return Yq(this.bins).flatMap((e=>{const t=[],[n,...r]=e.as,i=e.bin,{extent:o}=i,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(i,["extent"]),s=Object.assign(Object.assign(Object.assign({type:"bin",field:iH(e.field),as:n,signal:e.signal},EW(o)?{extent:null}:{extent:o}),e.span?{span:{signal:`span(${e.span})`}}:{}),a);!o&&e.extentSignal&&(t.push({type:"extent",field:iH(e.field),signal:e.extentSignal}),s.extent={signal:e.extentSignal}),t.push(s);for(const e of r)for(let r=0;r<2;r++)t.push({type:"formula",expr:uZ({field:n[r]},{expr:"datum"}),as:e[r]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}class n2 extends EQ{constructor(e,t,n){super(e),this.dimensions=t,this.measures=n}clone(){return new n2(null,new Set(this.dimensions),Cq(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let n=!1;t.forEachFieldDef((e=>{e.aggregate&&(n=!0)}));const r={},i=new Set;return n?(t.forEachFieldDef(((e,n)=>{var o,a,s,l;const{aggregate:c,field:u}=e;if(c)if("count"===c)null!==(o=r["*"])&&void 0!==o||(r["*"]={}),r["*"].count=new Set([uZ(e,{forAs:!0})]);else{if(mW(c)||vW(c)){const e=mW(c)?"argmin":"argmax",t=c[e];null!==(a=r[t])&&void 0!==a||(r[t]={}),r[t][e]=new Set([uZ({op:e,field:t},{forAs:!0})])}else null!==(s=r[u])&&void 0!==s||(r[u]={}),r[u][c]=new Set([uZ(e,{forAs:!0})]);cW(n)&&"unaggregated"===t.scaleDomain(n)&&(null!==(l=r[u])&&void 0!==l||(r[u]={}),r[u].min=new Set([uZ({field:u,aggregate:"min"},{forAs:!0})]),r[u].max=new Set([uZ({field:u,aggregate:"max"},{forAs:!0})]))}else!function(e,t,n,r){var i;const o=v3(r)?r.encoding[w$(t)]:void 0;if(rZ(n)&&v3(r)&&GX(n,o,r.markDef,r.config))e.add(uZ(n,{})),e.add(uZ(n,{suffix:"end"})),n.bin&&MZ(n,t)&&e.add(uZ(n,{binSuffix:"range"}));else if(t in t$){const n=function(e){switch(e){case OH:return"y";case DH:return"y2";case LH:return"x";case IH:return"x2"}}(t);e.add(r.getName(n))}else e.add(uZ(n));oZ(n)&&function(e){return we(e)&&"field"in e}(null===(i=n.scale)||void 0===i?void 0:i.range)&&e.add(n.scale.range.field)}(i,n,e,t)})),i.size+Gq(r).length===0?null:new n2(e,i,r)):null}static makeFromTransform(e,t){var n,r,i;const o=new Set,a={};for(const e of t.aggregate){const{op:t,field:i,as:o}=e;t&&("count"===t?(null!==(n=a["*"])&&void 0!==n||(a["*"]={}),a["*"].count=new Set([o||uZ(e,{forAs:!0})])):(null!==(r=a[i])&&void 0!==r||(a[i]={}),a[i][t]=new Set([o||uZ(e,{forAs:!0})])))}for(const e of null!==(i=t.groupby)&&void 0!==i?i:[])o.add(e);return o.size+Gq(a).length===0?null:new n2(e,o,a)}merge(e){return Vq(this.dimensions,e.dimensions)?(function(e,t){var n;for(const r of Gq(t)){const i=t[r];for(const t of Gq(i))r in e?e[r][t]=new Set([...null!==(n=e[r][t])&&void 0!==n?n:[],...i[t]]):e[r]={[t]:i[t]}}}(this.measures,e.measures),!0):(function(...e){IG.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Gq(this.measures)])}producedFields(){const e=new Set;for(const t of Gq(this.measures))for(const n of Gq(this.measures[t])){const r=this.measures[t][n];0===r.size?e.add(`${n}_${t}`):r.forEach(e.add,e)}return e}hash(){return`Aggregate ${Iq({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],n=[];for(const r of Gq(this.measures))for(const i of Gq(this.measures[r]))for(const o of this.measures[r][i])n.push(o),e.push(i),t.push("*"===r?null:iH(r));return{type:"aggregate",groupby:[...this.dimensions].map(iH),ops:e,fields:t,as:n}}}class r2 extends EQ{constructor(e,t,n,r){super(e),this.model=t,this.name=n,this.data=r;for(const e of a$){const n=t.facet[e];if(n){const{bin:r,sort:i}=n;this[e]=Object.assign({name:t.getName(`${e}_domain`),fields:[uZ(n),...kW(r)?[uZ(n,{binSuffix:"end"})]:[]]},zX(i)?{sortField:i}:xe(i)?{sortIndexField:l1(n,e)}:{})}}this.childModel=t.child}hash(){let e="Facet";for(const t of a$)this[t]&&(e+=` ${t.charAt(0)}:${Iq(this[t])}`);return e}get fields(){var e;const t=[];for(const n of a$)(null===(e=this[n])||void 0===e?void 0:e.fields)&&t.push(...this[n].fields);return t}dependentFields(){const e=new Set(this.fields);for(const t of a$)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of H$){const n=this.childModel.component.scales[t];if(n&&!n.merged){const r=n.get("type"),i=n.get("range");if(MY(r)&&RW(i)){const n=G2(Y2(this.childModel,t));n?e[t]=n:RG(aG(t))}}}return e}assembleRowColumnHeaderData(e,t,n){const r={row:"y",column:"x",facet:void 0}[e],i=[],o=[],a=[];r&&n&&n[r]&&(t?(i.push(`distinct_${n[r]}`),o.push("max")):(i.push(n[r]),o.push("distinct")),a.push(`distinct_${n[r]}`));const{sortField:s,sortIndexField:l}=this[e];if(s){const{op:e=IX,field:t}=s;i.push(t),o.push(e),a.push(uZ(s,{forAs:!0}))}else l&&(i.push(l),o.push("max"),a.push(l));return{name:this[e].name,source:null!=t?t:this.data,transform:[Object.assign({type:"aggregate",groupby:this[e].fields},i.length?{fields:i,ops:o,as:a}:{})]}}assembleFacetHeaderData(e){var t,n;const{columns:r}=this.model.layout,{layoutHeaders:i}=this.model.component,o=[],a={};for(const e of d1){for(const r of f1){const o=null!==(t=i[e]&&i[e][r])&&void 0!==t?t:[];for(const t of o)if((null===(n=t.axes)||void 0===n?void 0:n.length)>0){a[e]=!0;break}}if(a[e]){const t=`length(data("${this.facet.name}"))`,n="row"===e?r?{signal:`ceil(${t} / ${r})`}:1:r?{signal:`min(${t}, ${r})`}:{signal:t};o.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:n}]})}}const{row:s,column:l}=a;return(s||l)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}assemble(){var e,t;const n=[];let r=null;const i=this.getChildIndependentFieldsWithStep(),{column:o,row:a,facet:s}=this;if(o&&a&&(i.x||i.y)){r=`cross_${this.column.name}_${this.row.name}`;const o=[].concat(null!==(e=i.x)&&void 0!==e?e:[],null!==(t=i.y)&&void 0!==t?t:[]),a=o.map((()=>"distinct"));n.push({name:r,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:o,ops:a}]})}for(const e of[yH,vH])this[e]&&n.push(this.assembleRowColumnHeaderData(e,r,i));if(s){const e=this.assembleFacetHeaderData(i);e&&n.push(...e)}return n}}function i2(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function o2(e){const t={};return Tq(e.filter,(e=>{var n;if(rY(e)){let r=null;ZG(e)?r=UW(e.equal):JG(e)?r=UW(e.lte):KG(e)?r=UW(e.lt):QG(e)?r=UW(e.gt):eY(e)?r=UW(e.gte):tY(e)?r=e.range[0]:nY(e)&&(r=(null!==(n=e.oneOf)&&void 0!==n?n:e.in)[0]),r&&(PG(r)?t[e.field]="date":gt(r)?t[e.field]="number":vt(r)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}class a2 extends EQ{constructor(e,t){super(e),this._parse=t}clone(){return new a2(null,Cq(this._parse))}hash(){return`Parse ${Iq(this._parse)}`}static makeExplicit(e,t,n){var r;let i={};const o=t.data;return!vQ(o)&&(null===(r=null==o?void 0:o.format)||void 0===r?void 0:r.parse)&&(i=o.format.parse),this.makeWithAncestors(e,i,{},n)}static makeWithAncestors(e,t,n,r){for(const e of Gq(n)){const t=r.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===n[e]||"derived"===t.value||"flatten"===n[e]?delete n[e]:RG(hG(e,n[e],t.value)))}for(const e of Gq(t)){const n=r.get(e);void 0!==n&&(n===t[e]?delete t[e]:RG(hG(e,t[e],n)))}const i=new sQ(t,n);r.copyAll(i);const o={};for(const e of Gq(i.combine())){const t=i.get(e);null!==t&&(o[e]=t)}return 0===Gq(o).length||r.parseNothing?null:new a2(e,o)}get parse(){return this._parse}merge(e){this._parse=Object.assign(Object.assign({},this._parse),e.parse),e.remove()}assembleFormatParse(){const e={};for(const t of Gq(this._parse)){const n=this._parse[t];1===sH(t)&&(e[t]=n)}return e}producedFields(){return new Set(Gq(this._parse))}dependentFields(){return new Set(Gq(this._parse))}assembleTransforms(e=!1){return Gq(this._parse).filter((t=>!e||sH(t)>1)).map((e=>{const t=function(e,t){const n=tH(e);return"number"===t?`toNumber(${n})`:"boolean"===t?`toBoolean(${n})`:"string"===t?`toString(${n})`:"date"===t?`toDate(${n})`:"flatten"===t?n:t.startsWith("date:")?`timeParse(${n},'${i2(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${n},'${i2(t.slice(4,t.length))}')`:(RG(`Unrecognized parse "${t}".`),null)}(e,this._parse[e]);return t?{type:"formula",expr:t,as:aH(e)}:null})).filter((e=>null!==e))}}class s2 extends EQ{clone(){return new s2(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([CK])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:CK}}}class l2 extends EQ{constructor(e,t){super(e),this.params=t}clone(){return new l2(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${Iq(this.params)}`}assemble(){return Object.assign({type:"graticule"},!0===this.params?{}:this.params)}}class c2 extends EQ{constructor(e,t){super(e),this.params=t}clone(){return new c2(null,this.params)}dependentFields(){return new Set}producedFields(){var e;return new Set([null!==(e=this.params.as)&&void 0!==e?e:"data"])}hash(){return`Hash ${Iq(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class u2 extends EQ{constructor(e){let t;if(super(null),null!=e||(e={name:"source"}),vQ(e)||(t=e.format?Object.assign({},Lq(e.format,["parse"])):{}),gQ(e))this._data={values:e.values};else if(pQ(e)){if(this._data={url:e.url},!t.type){let n=/(?:\.([^.]+))?$/.exec(e.url)[1];Pq(["json","csv","tsv","dsv","topojson"],n)||(n="json"),t.type=n}}else bQ(e)?this._data={values:[{type:"Sphere"}]}:(mQ(e)||vQ(e))&&(this._data={});this._generator=vQ(e),e.name&&(this._name=e.name),t&&!Wq(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var h2,d2=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};function f2(e){return e instanceof u2||e instanceof l2||e instanceof c2}class p2{constructor(){h2.set(this,void 0),d2(this,h2,!1,"f")}setModified(){d2(this,h2,!0,"f")}get modifiedFlag(){return function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}(this,h2,"f")}}h2=new WeakMap;class g2 extends p2{getNodeDepths(e,t,n){n.set(e,t);for(const r of e.children)this.getNodeDepths(r,t+1,n);return n}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class m2 extends p2{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}class v2 extends m2{mergeNodes(e,t){const n=t.shift();for(const r of t)e.removeChild(r),r.parent=n,r.remove()}run(e){const t=e.children.map((e=>e.hash())),n={};for(let r=0;r<t.length;r++)void 0===n[t[r]]?n[t[r]]=[e.children[r]]:n[t[r]].push(e.children[r]);for(const t of Gq(n))n[t].length>1&&(this.setModified(),this.mergeNodes(e,n[t]))}}class y2 extends m2{constructor(e){super(),this.requiresSelectionId=e&&j0(e)}run(e){e instanceof s2&&(this.requiresSelectionId&&(f2(e.parent)||e.parent instanceof n2||e.parent instanceof a2)||(this.setModified(),e.remove()))}}class b2 extends p2{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let n=new Set;e instanceof OQ&&(n=e.producedFields(),qq(n,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const r of e.children)this.run(r,new Set([...t,...n]))}}class _2 extends m2{constructor(){super()}run(e){e instanceof CQ&&!e.isRequired()&&(this.setModified(),e.remove())}}class x2 extends g2{run(e){if(!(f2(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof a2)if(e instanceof a2)this.setModified(),e.merge(t);else{if($q(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class w2 extends g2{run(e){const t=[...e.children],n=e.children.filter((e=>e instanceof a2));if(e.numChildren()>1&&n.length>=1){const r={},i=new Set;for(const e of n){const t=e.parse;for(const e of Gq(t))e in r?r[e]!==t[e]&&i.add(e):r[e]=t[e]}for(const e of i)delete r[e];if(!Wq(r)){this.setModified();const n=new a2(e,r);for(const i of t){if(i instanceof a2)for(const e of Gq(r))delete i.parse[e];e.removeChild(i),i.parent=n,i instanceof a2&&0===Gq(i.parse).length&&i.remove()}}}}}class A2 extends g2{run(e){e instanceof CQ||e.numChildren()>0||e instanceof r2||e instanceof u2||(this.setModified(),e.remove())}}class k2 extends g2{run(e){const t=e.children.filter((e=>e instanceof OQ)),n=t.pop();for(const e of t)this.setModified(),n.merge(e)}}class T2 extends g2{run(e){const t=e.children.filter((e=>e instanceof n2)),n={};for(const e of t){const t=Iq(e.groupBy);t in n||(n[t]=[]),n[t].push(e)}for(const t of Gq(n)){const r=n[t];if(r.length>1){const t=r.pop();for(const n of r)t.merge(n)&&(e.removeChild(n),n.parent=t,n.remove(),this.setModified())}}}}class S2 extends g2{constructor(e){super(),this.model=e}run(e){const t=!(f2(e)||e instanceof $0||e instanceof a2||e instanceof s2),n=[],r=[];for(const i of e.children)i instanceof t2&&(t&&!$q(e.producedFields(),i.dependentFields())?n.push(i):r.push(i));if(n.length>0){const t=n.pop();for(const e of n)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof t2?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(r.length>1){const e=r.pop();for(const t of r)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class E2 extends g2{run(e){const t=[...e.children];if(!Nq(t,(e=>e instanceof CQ))||e.numChildren()<=1)return;const n=[];let r;for(const i of t)if(i instanceof CQ){let t=i;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof CQ))break;t=e}n.push(...t.children),r?(e.removeChild(i),i.parent=r.parent,r.parent.removeChild(r),r.parent=t,this.setModified()):r=t}else n.push(i);if(n.length){this.setModified();for(const e of n)e.parent.removeChild(e),e.parent=r}}}class C2 extends EQ{constructor(e,t){super(e),this.transform=t}clone(){return new C2(null,Cq(this.transform))}addDimensions(e){this.transform.groupby=jq(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){var t;return null!==(t=e.as)&&void 0!==t?t:uZ(e)}hash(){return`JoinAggregateTransform ${Iq(this.transform)}`}assemble(){const e=[],t=[],n=[];for(const r of this.transform.joinaggregate)t.push(r.op),n.push(this.getDefaultName(r)),e.push(void 0===r.field?null:r.field);const r=this.transform.groupby;return Object.assign({type:"joinaggregate",as:n,ops:t,fields:e},void 0!==r?{groupby:r}:{})}}class M2 extends EQ{constructor(e,t){super(e),this._stack=t}clone(){return new M2(null,Cq(this._stack))}static makeFromTransform(e,t){const{stack:n,groupby:r,as:i,offset:o="zero"}=t,a=[],s=[];if(void 0!==t.sort)for(const e of t.sort)a.push(e.field),s.push(lH(e.order,"ascending"));const l={field:a,order:s};let c;return c=function(e){return xe(e)&&e.every((e=>vt(e)))&&e.length>1}(i)?i:vt(i)?[i,`${i}_end`]:[`${t.stack}_start`,`${t.stack}_end`],new M2(e,{dimensionFieldDefs:[],stackField:n,groupby:r,offset:o,sort:l,facetby:[],as:c})}static makeFromEncoding(e,t){const n=t.stack,{encoding:r}=t;if(!n)return null;const{groupbyChannels:i,fieldChannel:o,offset:a,impute:s}=n,l=i.map((e=>bZ(r[e]))).filter((e=>!!e)),c=function(e){return e.stack.stackBy.reduce(((e,t)=>{const n=uZ(t.fieldDef);return n&&e.push(n),e}),[])}(t),u=t.encoding.order;let h;return h=xe(u)||KX(u)?JW(u):c.reduce(((e,t)=>(e.field.push(t),e.order.push("y"===o?"descending":"ascending"),e)),{field:[],order:[]}),new M2(e,{dimensionFieldDefs:l,stackField:t.vgField(o),facetby:[],stackby:c,sort:h,offset:a,impute:s,as:[t.vgField(o,{suffix:"start",forAs:!0}),t.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${Iq(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:t,groupby:n}=this._stack;return e.length>0?e.map((e=>e.bin?t?[uZ(e,{binSuffix:"mid"})]:[uZ(e,{}),uZ(e,{binSuffix:"end"})]:[uZ(e)])).flat():null!=n?n:[]}assemble(){const e=[],{facetby:t,dimensionFieldDefs:n,stackField:r,stackby:i,sort:o,offset:a,impute:s,as:l}=this._stack;if(s)for(const o of n){const{bandPosition:n=.5,bin:a}=o;if(a){const t=uZ(o,{expr:"datum"}),r=uZ(o,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${n}*${t}+${1-n}*${r}`,as:uZ(o,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:r,groupby:[...i,...t],key:uZ(o,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:r,sort:o,as:l,offset:a}),e}}class O2 extends EQ{constructor(e,t){super(e),this.transform=t}clone(){return new O2(null,Cq(this.transform))}addDimensions(e){this.transform.groupby=jq(this.transform.groupby.concat(e),(e=>e))}dependentFields(){var e,t;const n=new Set;return(null!==(e=this.transform.groupby)&&void 0!==e?e:[]).forEach(n.add,n),(null!==(t=this.transform.sort)&&void 0!==t?t:[]).forEach((e=>n.add(e.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(n.add,n),n}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){var t;return null!==(t=e.as)&&void 0!==t?t:uZ(e)}hash(){return`WindowTransform ${Iq(this.transform)}`}assemble(){var e;const t=[],n=[],r=[],i=[];for(const e of this.transform.window)n.push(e.op),r.push(this.getDefaultName(e)),i.push(void 0===e.param?null:e.param),t.push(void 0===e.field?null:e.field);const o=this.transform.frame,a=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&n.every((e=>yW(e))))return Object.assign({type:"joinaggregate",as:r,ops:n,fields:t},void 0!==a?{groupby:a}:{});const s=[],l=[];if(void 0!==this.transform.sort)for(const t of this.transform.sort)s.push(t.field),l.push(null!==(e=t.order)&&void 0!==e?e:"ascending");const c={field:s,order:l},u=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:i,as:r,ops:n,fields:t,sort:c},void 0!==u?{ignorePeers:u}:{}),void 0!==a?{groupby:a}:{}),void 0!==o?{frame:o}:{})}}function L2(e){if(e instanceof r2)if(1!==e.numChildren()||e.children[0]instanceof CQ){const n=e.model.component.data.main;D2(n);const r=(t=e,function e(n){if(!(n instanceof r2)){const r=n.clone();if(r instanceof CQ){const e=I2+r.getSource();r.setSource(e),t.model.component.data.outputNodes[e]=r}else(r instanceof n2||r instanceof M2||r instanceof O2||r instanceof C2)&&r.addDimensions(t.fields);for(const t of n.children.flatMap(e))t.parent=r;return[r]}return n.children.flatMap(e)}),i=e.children.map(r).flat();for(const e of i)e.parent=n}else{const t=e.children[0];(t instanceof n2||t instanceof M2||t instanceof O2||t instanceof C2)&&t.addDimensions(e.fields),t.swapWithParent(),L2(e)}else e.children.map(L2);var t}function D2(e){if(e instanceof CQ&&e.type===xQ.Main&&1===e.numChildren()){const t=e.children[0];t instanceof r2||(t.swapWithParent(),D2(e))}}const I2="scale_";function R2(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!R2(t.children))return!1}return!0}function P2(e,t){let n=!1;for(const r of t)n=e.optimize(r)||n;return n}function N2(e,t,n){let r=e.sources,i=!1;return i=P2(new _2,r)||i,i=P2(new y2(t),r)||i,r=r.filter((e=>e.numChildren()>0)),i=P2(new A2,r)||i,r=r.filter((e=>e.numChildren()>0)),n||(i=P2(new x2,r)||i,i=P2(new S2(t),r)||i,i=P2(new b2,r)||i,i=P2(new w2,r)||i,i=P2(new T2,r)||i,i=P2(new k2,r)||i,i=P2(new v2,r)||i,i=P2(new E2,r)||i),e.sources=r,i}class z2{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new z2((()=>e(t)))}}function F2(e){v3(e)?function(e){const t=e.component.scales;for(const n of Gq(t)){const r=B2(e,n);if(t[n].setWithExplicit("domains",r),q2(e,n),e.component.data.isFaceted){let t=e;for(;!y3(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[n])for(const e of r.value)PW(e)&&(e.data=I2+e.data.replace(I2,""))}}}(e):function(e){for(const t of e.children)F2(t);const t=e.component.scales;for(const n of Gq(t)){let r,i=null;for(const t of e.children){const e=t.component.scales[n];if(e){r=void 0===r?e.getWithExplicit("domains"):dQ(r,e.getWithExplicit("domains"),"domains","scale",$2);const t=e.get("selectionExtent");i&&t&&i.param!==t.param&&RG("The same selection must be used to override scale domains in a layered view."),i=t}}t[n].setWithExplicit("domains",r),i&&t[n].set("selectionExtent",i,!0)}}(e)}function B2(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:r}=e,i=function(e,t,n,r){if("unaggregated"===e){const{valid:e,reason:r}=H2(t,n);if(!e)return void RG(r)}else if(void 0===e&&r.useUnaggregatedDomain){const{valid:e}=H2(t,n);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]=Object.assign(Object.assign({},e.specifiedScales[t]),{domain:i})),"x"===t&&_Z(r.x2)?_Z(r.x)?dQ(U2(n,i,e,"x"),U2(n,i,e,"x2"),"domain","scale",$2):U2(n,i,e,"x2"):"y"===t&&_Z(r.y2)?_Z(r.y)?dQ(U2(n,i,e,"y"),U2(n,i,e,"y2"),"domain","scale",$2):U2(n,i,e,"y2"):U2(n,i,e,t)}function j2(e,t,n){var r;const i=null===(r=XG(n))||void 0===r?void 0:r.unit;return"temporal"===t||i?function(e,t,n){return e.map((e=>({signal:`{data: ${EZ(e,{timeUnit:n,type:t})}}`})))}(e,t,i):[e]}function U2(e,t,n,r){const{encoding:i}=n,o=_Z(i[r]),{type:a}=o,s=o.timeUnit;if(function(e){return e&&e.unionWith}(t)){const i=U2(e,void 0,n,r),o=j2(t.unionWith,a,s);return lQ([...i.value,...o])}if(IW(t))return lQ([t]);if(t&&"unaggregated"!==t&&!IY(t))return lQ(j2(t,a,s));const l=n.stack;if(l&&r===l.fieldChannel){if("normalize"===l.offset)return cQ([[0,1]]);const e=n.requestDataName(xQ.Main);return cQ([{data:e,field:n.vgField(r,{suffix:"start"})},{data:e,field:n.vgField(r,{suffix:"end"})}])}const c=cW(r)&&KX(o)?function(e,t,n){if(!MY(n))return;const r=e.fieldDef(t),i=r.sort;if(FX(i))return{op:"min",field:l1(r,t),order:"ascending"};const{stack:o}=e,a=o?new Set([...o.groupbyFields,...o.stackBy.map((e=>e.fieldDef.field))]):void 0;if(zX(i))return V2(i,o&&!a.has(i.field));if(NX(i)){const{encoding:t,order:n}=i,r=e.fieldDef(t),{aggregate:s,field:l}=r,c=o&&!a.has(l);if(mW(s)||vW(s))return V2({field:uZ(r),order:n},c);if(yW(s)||!s)return V2({op:s,field:l,order:n},c)}else{if("descending"===i)return{op:"min",field:e.vgField(t),order:"descending"};if(Pq(["ascending",void 0],i))return!0}}(n,r,e):void 0;if(QX(o))return cQ(j2([o.datum],a,s));const u=o;if("unaggregated"===t){const e=n.requestDataName(xQ.Main),{field:t}=o;return cQ([{data:e,field:uZ({field:t,aggregate:"min"})},{data:e,field:uZ({field:t,aggregate:"max"})}])}if(kW(u.bin)){if(MY(e))return cQ("bin-ordinal"===e?[]:[{data:Zq(c)?n.requestDataName(xQ.Main):n.requestDataName(xQ.Raw),field:n.vgField(r,MZ(u,r)?{binSuffix:"range"}:{}),sort:!0!==c&&we(c)?c:{field:n.vgField(r,{}),op:"min"}}]);{const{bin:e}=u;if(kW(e)){const t=Q1(n,u.field,e);return cQ([new z2((()=>{const e=n.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return cQ([{data:n.requestDataName(xQ.Main),field:n.vgField(r,{})}])}}if(u.timeUnit&&Pq(["time","utc"],e)&&GX(u,v3(n)?n.encoding[w$(r)]:void 0,n.markDef,n.config)){const e=n.requestDataName(xQ.Main);return cQ([{data:e,field:n.vgField(r)},{data:e,field:n.vgField(r,{suffix:"end"})}])}return cQ(c?[{data:Zq(c)?n.requestDataName(xQ.Main):n.requestDataName(xQ.Raw),field:n.vgField(r),sort:c}]:[{data:n.requestDataName(xQ.Main),field:n.vgField(r)}])}function V2(e,t){const{op:n,field:r,order:i}=e;return Object.assign(Object.assign({op:null!=n?n:t?"sum":IX},r?{field:iH(r)}:{}),i?{order:i}:{})}function q2(e,t){var n;const r=e.component.scales[t],i=e.specifiedScales[t].domain,o=null===(n=e.fieldDef(t))||void 0===n?void 0:n.bin,a=IY(i)&&i,s=SW(o)&&EW(o.extent)&&o.extent;(a||s)&&r.set("selectionExtent",null!=a?a:s,!0)}function H2(e,t){const{aggregate:n,type:r}=e;return n?vt(n)&&!wW.has(n)?{valid:!1,reason:kG(n)}:"quantitative"===r&&"log"===t?{valid:!1,reason:TG(e)}:{valid:!0}:{valid:!1,reason:AG(e)}}function $2(e,t,n,r){return e.explicit&&t.explicit&&RG(function(e,t,n,r){return`Conflicting ${t.toString()} property "${e.toString()}" (${Dq(n)} and ${Dq(r)}). Using the union of the two domains.`}(n,r,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function W2(e){const t=jq(e.map((e=>{if(PW(e)){const{sort:t}=e;return function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["sort"])}return e})),Iq),n=jq(e.map((e=>{if(PW(e)){const t=e.sort;return void 0===t||Zq(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),Iq);if(0===t.length)return;if(1===t.length){const t=e[0];if(PW(t)&&n.length>0){let e=n[0];if(n.length>1)RG(CG),e=!0;else if(we(e)&&"field"in e){const n=e.field;t.field===n&&(e=!e.order||{order:e.order})}return Object.assign(Object.assign({},t),{sort:e})}return t}const r=jq(n.map((e=>Zq(e)||!("op"in e)||vt(e.op)&&e.op in gW?e:(RG(function(e){return`Dropping sort property ${Dq(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(e)),!0))),Iq);let i;1===r.length?i=r[0]:r.length>1&&(RG(CG),i=!0);const o=jq(e.map((e=>PW(e)?e.data:null)),(e=>e));return 1===o.length&&null!==o[0]?Object.assign({data:o[0],fields:t.map((e=>e.field))},i?{sort:i}:{}):Object.assign({fields:t},i?{sort:i}:{})}function G2(e){if(PW(e)&&vt(e.field))return e.field;if(function(e){return!xe(e)&&"fields"in e&&!("data"in e)}(e)){let t;for(const n of e.fields)if(PW(n)&&vt(n.field))if(t){if(t!==n.field)return RG("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=n.field;return RG("Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect."),t}if(function(e){return!xe(e)&&"fields"in e&&"data"in e}(e)){RG("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");const t=e.fields[0];return vt(t)?t:void 0}}function Y2(e,t){return W2(e.component.scales[t].get("domains").map((t=>(PW(t)&&(t.data=e.lookupDataSource(t.data)),t))))}function X2(e){return _3(e)||b3(e)?e.children.reduce(((e,t)=>e.concat(X2(t))),Z2(e)):Z2(e)}function Z2(e){return Gq(e.component.scales).reduce(((t,n)=>{const r=e.component.scales[n];if(r.merged)return t;const i=r.combine(),{name:o,type:a,selectionExtent:s,domains:l,range:c,reverse:u}=i,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(i,["name","type","selectionExtent","domains","range","reverse"]),d=function(e,t,n,r){if($$(n)){if(RW(e))return{step:{signal:`${t}_step`}}}else if(we(e)&&PW(e))return Object.assign(Object.assign({},e),{data:r.lookupDataSource(e.data)});return e}(i.range,o,n,e),f=Y2(e,n),p=s?function(e,t,n,r){const i=G0(e,t.param,t);return{signal:OY(n.get("type"))&&xe(r)&&r[0]>r[1]?`isValid(${i}) && reverse(${i})`:i}}(e,s,r,f):null;return t.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:o,type:a},f?{domain:f}:{}),p?{domainRaw:p}:{}),{range:d}),void 0!==u?{reverse:u}:{}),h)),t}),[])}class K2 extends sQ{constructor(e,t){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",t)}domainDefinitelyIncludesZero(){return!1!==this.get("zero")||Nq(this.get("domains"),(e=>xe(e)&&2===e.length&&e[0]<=0&&e[1]>=0))}}const J2=["range","scheme"];function Q2(e,t){const n=e.fieldDef(t);if(null==n?void 0:n.bin){const{bin:r,field:i}=n,o=A$(t),a=e.getName(o);if(we(r)&&r.binned&&void 0!==r.step)return new z2((()=>{const n=e.scaleName(t),i=`(domain("${n}")[1] - domain("${n}")[0]) / ${r.step}`;return`${e.getSignalName(a)} / (${i})`}));if(kW(r)){const t=Q1(e,i,r);return new z2((()=>{const n=e.getSignalName(t),r=`(${n}.stop - ${n}.start) / ${n}.step`;return`${e.getSignalName(a)} / (${r})`}))}}}function e3(e,t){const n=t.specifiedScales[e],{size:r}=t,i=t.getScaleComponent(e).get("type");for(const r of J2)if(void 0!==n[r]){const o=qY(i,r),a=HY(e,r);if(o)if(a)RG(a);else switch(r){case"range":{const r=n.range;if(xe(r)){if($$(e))return lQ(r.map((e=>{if("width"===e||"height"===e){const n=t.getName(e),r=t.getSignalName.bind(t);return z2.fromName(r,n)}return e})))}else if(we(r))return lQ({data:t.requestDataName(xQ.Main),field:r.field,sort:{op:"min",field:t.vgField(e)}});return lQ(r)}case"scheme":return lQ(t3(n[r]))}else RG(SG(i,r,e))}const o=e===_H||"xOffset"===e?"width":"height",a=r[o];if(BK(a))if($$(e))if(MY(i)){const n=n3(a,t,e);if(n)return lQ({step:n})}else RG(EG(o));else if(Z$(e)){const n=e===kH?"x":"y";if("band"===t.getScaleComponent(n).get("type")){const e=r3(a,i);if(e)return lQ(e)}}const{rangeMin:s,rangeMax:l}=n,c=function(e,t){const{size:n,config:r,mark:i,encoding:o}=t,a=t.getSignalName.bind(t),{type:s}=_Z(o[e]),l=t.getScaleComponent(e).get("type"),{domain:c,domainMid:u}=t.specifiedScales[e];switch(e){case _H:case xH:{if(Pq(["point","band"],l)){const i=i3(e,n,r.view);if(BK(i))return{step:n3(i,t,e)}}const i=A$(e),o=t.getName(i);return e===xH&&OY(l)?[z2.fromName(a,o),0]:[0,z2.fromName(a,o)]}case kH:case TH:return function(e,t,n){const r=e===kH?"x":"y",i=t.getScaleComponent(r).get("type"),o=t.scaleName(r);if("band"===i){const e=i3(r,t.size,t.config.view);if(BK(e)){const t=r3(e,n);if(t)return t}return[0,{signal:`bandwidth('${o}')`}]}return Mq(`Cannot use ${e} scale if ${r} scale is not discrete.`)}(e,t,l);case FH:{const o=o3(i,t.component.scales[e].get("zero"),r),a=function(e,t,n,r){const i={x:Q2(n,"x"),y:Q2(n,"y")};switch(e){case"bar":case"tick":{if(void 0!==r.scale.maxBandSize)return r.scale.maxBandSize;const e=s3(t,i,r.view);return gt(e)?e-1:new z2((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":{if(r.scale.maxSize)return r.scale.maxSize;const e=s3(t,i,r.view);return gt(e)?Math.pow(a3*e,2):new z2((()=>`pow(0.95 * ${e.signal}, 2)`))}}throw new Error(yG("size",e))}(i,n,t,r);return DY(l)?function(e,t,n){const r=()=>{const r=WW(t),i=WW(e),o=`(${r} - ${i}) / (${n} - 1)`;return`sequence(${i}, ${r} + ${o}, ${o})`};return IW(t)?new z2(r):{signal:r()}}(o,a,function(e,t,n,r){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&xe(n)?n.length+1:(RG(function(e){return`Domain for ${e} is required for threshold scale.`}(r)),3)}}(l,r,c,e)):[o,a]}case CH:return[0,2*Math.PI];case BH:return[0,360];case SH:return[0,new z2((()=>`min(${t.getSignalName("width")},${t.getSignalName("height")})/2`))];case qH:return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case HH:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case zH:return"symbol";case RH:case PH:case NH:return"ordinal"===l?"nominal"===s?"category":"ordinal":void 0!==u?"diverging":"rect"===i||"geoshape"===i?"heatmap":"ramp";case jH:case UH:case VH:return[r.scale.minOpacity,r.scale.maxOpacity]}}(e,t);return(void 0!==s||void 0!==l)&&qY(i,"rangeMin")&&xe(c)&&2===c.length?lQ([null!=s?s:c[0],null!=l?l:c[1]]):cQ(c)}function t3(e){return function(e){return!vt(e)&&!!e.name}(e)?Object.assign({scheme:e.name},Lq(e,["name"])):{scheme:e}}function n3(e,t,n){var r,i,o,a,s;const{encoding:l}=t,c=t.getScaleComponent(n),u=k$(n),h=l[u];if("offset"===FK({step:e,offsetIsDiscrete:nZ(h)&&cY(h.type)})&&UZ(l,u)){const n=t.getScaleComponent(u);let l=`domain('${t.scaleName(u)}').length`;"band"===n.get("type")&&(l=`bandspace(${l}, ${null!==(i=null!==(r=n.get("paddingInner"))&&void 0!==r?r:n.get("padding"))&&void 0!==i?i:0}, ${null!==(a=null!==(o=n.get("paddingOuter"))&&void 0!==o?o:n.get("padding"))&&void 0!==a?a:0})`);const h=null!==(s=c.get("paddingInner"))&&void 0!==s?s:c.get("padding");return{signal:`${e.step} * ${l} / (1-${HW(h)})`}}return e.step}function r3(e,t){if("offset"===FK({step:e,offsetIsDiscrete:MY(t)}))return{step:e.step}}function i3(e,t,n){const r=e===_H?"width":"height";return t[r]||HK(n,r)}function o3(e,t,n){if(t)return IW(t)?{signal:`${t.signal} ? 0 : ${o3(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(yG("size",e))}const a3=.95;function s3(e,t,n){const r=BK(e.width)?e.width.step:qK(n,"width"),i=BK(e.height)?e.height.step:qK(n,"height");return t.x||t.y?new z2((()=>`min(${[t.x?t.x.signal:r,t.y?t.y.signal:i].join(", ")})`)):Math.min(r,i)}function l3(e,t){v3(e)?function(e,t){const n=e.component.scales,{config:r,encoding:i,markDef:o,specifiedScales:a}=e;for(const s of Gq(n)){const l=a[s],c=n[s],u=e.getScaleComponent(s),h=_Z(i[s]),d=l[t],f=u.get("type"),p=u.get("padding"),g=u.get("paddingInner"),m=qY(f,t),v=HY(s,t);if(void 0!==d&&(m?v&&RG(v):RG(SG(f,t,s))),m&&void 0===v)if(void 0!==d){const e=h.timeUnit,n=h.type;switch(t){case"domainMax":case"domainMin":PG(l[t])||"temporal"===n||e?c.set(t,{signal:EZ(l[t],{type:n,timeUnit:e})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const n=t in c3?c3[t]({model:e,channel:s,fieldOrDatumDef:h,scaleType:f,scalePadding:p,scalePaddingInner:g,domain:l.domain,domainMin:l.domainMin,domainMax:l.domainMax,markDef:o,config:r,hasNestedOffsetScale:VZ(i,s)}):r.scale[t];void 0!==n&&c.set(t,n,!1)}}}(e,t):h3(e,t)}const c3={bins:({model:e,fieldOrDatumDef:t})=>KX(t)?function(e,t){const n=t.bin;if(kW(n)){const r=Q1(e,t.field,n);return new z2((()=>e.getSignalName(r)))}if(TW(n)&&SW(n)&&void 0!==n.step)return{step:n.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function(e,t){if(Pq([RH,PH,NH],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:r,domainMax:i,fieldOrDatumDef:o})=>function(e,t,n,r,i,o){var a;if(!((null===(a=bZ(o))||void 0===a?void 0:a.bin)||xe(n)||null!=i||null!=r||Pq([gY,mY],e)))return!!$$(t)||void 0}(e,t,n,r,i,o),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:r,config:i})=>function(e,t,n,r,i,o){if($$(e)){if(LY(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:t,orient:a}=i;if("bar"===t&&(!KX(r)||!r.bin&&!r.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return o.continuousBandSize}if(t===vY)return n.pointPadding}}(e,t,i.scale,n,r,i.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:r,config:i,hasNestedOffsetScale:o})=>function(e,t,n,r,i,o=!1){if(void 0===e){if($$(t)){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:r,bandWithNestedOffsetPaddingInner:a}=i;return o?a:lH(e,"bar"===n?t:r)}return Z$(t)&&r===yY?i.offsetBandPaddingInner:void 0}}(e,t,n.type,r,i.scale,o),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:r,config:i,hasNestedOffsetScale:o})=>function(e,t,n,r,i,o=!1){if(void 0===e)if($$(t)){const{bandPaddingOuter:e,bandWithNestedOffsetPaddingOuter:t}=i;if(o)return t;if(n===yY)return lH(e,IW(r)?{signal:`${r.signal}/2`}:r/2)}else if(Z$(t)){if(n===vY)return.5;if(n===yY)return i.offsetBandPaddingOuter}}(e,t,n,r,i.scale,o),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:r})=>function(e,t,n,r){return"x"===n&&void 0!==r.xReverse?OY(e)&&"descending"===t?IW(r.xReverse)?{signal:`!${r.xReverse.signal}`}:!r.xReverse:r.xReverse:!(!OY(e)||"descending"!==t)||void 0}(t,KX(e)?e.sort:void 0,n,r.scale),zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:r,scaleType:i})=>function(e,t,n,r,i){if(n&&"unaggregated"!==n&&OY(i)){if(xe(n)){const e=n[0],t=n[n.length-1];if(e<=0&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!DY(i))return!0;if((!KX(t)||!t.bin)&&Pq([...H$,...G$],e)){const{orient:t,type:n}=r;return!Pq(["bar","area","line","trail"],n)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e)}return!1}(e,t,n,r,i)};function u3(e){v3(e)?function(e){const t=e.component.scales;for(const n of lW){const r=t[n];if(!r)continue;const i=e3(n,e);r.setWithExplicit("range",i)}}(e):h3(e,"range")}function h3(e,t){const n=e.component.scales;for(const n of e.children)"range"===t?u3(n):l3(n,t);for(const r of Gq(n)){let i;for(const n of e.children){const e=n.component.scales[r];e&&(i=dQ(i,e.getWithExplicit(t),t,"scale",uQ(((e,n)=>"range"===t&&e.step&&n.step?e.step-n.step:0))))}n[r].setWithExplicit(t,i)}}function d3(e,t,n,r,i=!1){const o=function(e,t,n,r){var i;switch(t.type){case"nominal":case"ordinal":if(i$(e)||"discrete"===fW(e))return"shape"===e&&"ordinal"===t.type&&RG(wG(e,"ordinal")),"ordinal";if($$(e)||Z$(e)){if(Pq(["rect","bar","image","rule"],n.type))return"band";if(r)return"band"}else if("arc"===n.type&&e in W$)return"band";return fX(n[A$(e)])||aZ(t)&&(null===(i=t.axis)||void 0===i?void 0:i.tickBand)?"band":"point";case"temporal":return i$(e)?"time":"discrete"===fW(e)?(RG(wG(e,"temporal")),"ordinal"):KX(t)&&t.timeUnit&&XG(t.timeUnit).utc?"utc":"time";case"quantitative":return i$(e)?KX(t)&&kW(t.bin)?"bin-ordinal":"linear":"discrete"===fW(e)?(RG(wG(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(gG(t.type))}(t,n,r,i),{type:a}=e;return cW(t)?void 0!==a?function(e,t,n=!1){if(!cW(e))return!1;switch(e){case _H:case xH:case kH:case TH:case CH:case SH:return!!LY(t)||"band"===t||"point"===t&&!n;case FH:case qH:case jH:case UH:case VH:case BH:return LY(t)||DY(t)||Pq(["band","point","ordinal"],t);case RH:case PH:case NH:return"band"!==t;case HH:case zH:return"ordinal"===t||DY(t)}}(t,a)?KX(n)&&(s=a,l=n.type,!(Pq([hY,fY],l)?void 0===s||MY(s):l===dY?Pq([gY,mY,void 0],s):l!==uY||TY(s)||DY(s)||void 0===s))?(RG(function(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(a,o)),o):a:(RG(function(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}(t,a,o)),o):o:null;var s,l}function f3(e){v3(e)?e.component.scales=function(e){const{encoding:t,mark:n,markDef:r}=e,i={};for(const o of lW){const a=_Z(t[o]);if(a&&n===oX&&o===zH&&a.type===pY)continue;let s=a&&a.scale;if(!Z$(o)||VZ(t,T$(o))){if(a&&null!==s&&!1!==s){null!=s||(s={});const n=d3(s,o,a,r,VZ(t,o));i[o]=new K2(e.scaleName(`${o}`,!0),{value:n,explicit:s.type===n})}}else s&&RG(bG(o))}return i}(e):e.component.scales=function(e){var t,n;const r=e.component.scales={},i={},o=e.component.resolve;for(const r of e.children){f3(r);for(const a of Gq(r.component.scales))if(null!==(t=(n=o.scale)[a])&&void 0!==t||(n[a]=O1(a,e)),"shared"===o.scale[a]){const e=i[a],t=r.component.scales[a].getWithExplicit("type");e?_Y(e.value,t.value)?i[a]=dQ(e,t,"type","scale",p3):(o.scale[a]="independent",delete i[a]):i[a]=t}}for(const t of Gq(i)){const n=e.scaleName(t,!0),o=i[t];r[t]=new K2(n,o);for(const r of e.children){const e=r.component.scales[t];e&&(r.renameScale(e.get("name"),n),e.merged=!0)}}return r}(e)}const p3=uQ(((e,t)=>wY(e)-wY(t)));var g3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};class m3{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function v3(e){return"unit"===(null==e?void 0:e.type)}function y3(e){return"facet"===(null==e?void 0:e.type)}function b3(e){return"concat"===(null==e?void 0:e.type)}function _3(e){return"layer"===(null==e?void 0:e.type)}class x3{constructor(e,t,n,r,i,o,a){var s,l;this.type=t,this.parent=n,this.config=i,this.correctDataNames=e=>{var t,n,r;return(null===(t=e.from)||void 0===t?void 0:t.data)&&(e.from.data=this.lookupDataSource(e.from.data)),(null===(r=null===(n=e.from)||void 0===n?void 0:n.facet)||void 0===r?void 0:r.data)&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e},this.parent=n,this.config=i,this.view=OW(a),this.name=null!==(s=e.name)&&void 0!==s?s:r,this.title=DW(e.title)?{text:e.title}:e.title?OW(e.title):void 0,this.scaleNameMap=n?n.scaleNameMap:new m3,this.projectionNameMap=n?n.projectionNameMap:new m3,this.signalNameMap=n?n.signalNameMap:new m3,this.data=e.data,this.description=e.description,this.transforms=(null!==(l=e.transform)&&void 0!==l?l:[]).map((e=>CJ(e)?{filter:Sq(e.filter,sY)}:e)),this.layout="layer"===t||"unit"===t?{}:function(e,t,n){var r,i;const o=n[t],a={},{spacing:s,columns:l}=o;void 0!==s&&(a.spacing=s),void 0!==l&&(UX(e)&&!BX(e.facet)||PK(e))&&(a.columns=l),NK(e)&&(a.columns=1);for(const t of UK)if(void 0!==e[t])if("spacing"===t){const n=e[t];a[t]=gt(n)?n:{row:null!==(r=n.row)&&void 0!==r?r:s,column:null!==(i=n.column)&&void 0!==i?i:s}}else a[t]=e[t];return a}(e,t,i),this.component={data:{sources:n?n.component.data.sources:[],outputNodes:n?n.component.data.outputNodes:{},outputNodeRefCounts:n?n.component.data.outputNodeRefCounts:{},isFaceted:UX(e)||(null==n?void 0:n.component.data.isFaceted)&&void 0===e.data},layoutSize:new sQ,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?Cq(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function(e,{ignoreRange:t}={}){f3(e),F2(e);for(const t of VY)l3(e,t);t||u3(e)}(this)}parseProjection(){K1(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){q1(this)}assembleEncodeFromView(e){const{style:t}=e,n=g3(e,["style"]),r={};for(const e of Gq(n)){const t=n[e];void 0!==t&&(r[e]=qW(t))}return r}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=qW(this.description)),"unit"!==this.type&&"layer"!==this.type)?Wq(t)?void 0:t:Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},null!=t?t:{})}assembleLayout(){if(!this.layout)return;const e=this.layout,{spacing:t}=e,n=g3(e,["spacing"]),{component:r,config:i}=this,o=function(e,t){const n={};for(const r of a$){const i=e[r];if(null==i?void 0:i.facetFieldDef){const{titleAnchor:e,titleOrient:o}=h1(["titleAnchor","titleOrient"],i.facetFieldDef.header,t,r),a=c1(r,o),s=w1(e,a);void 0!==s&&(n[a]=s)}}return Wq(n)?void 0:n}(r.layoutHeaders,i);return Object.assign(Object.assign(Object.assign({padding:t},this.assembleDefaultLayout()),n),o?{titleBand:o}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const n of a$)e[n].title&&t.push(p1(this,n));for(const e of d1)t=t.concat(v1(this,e));return t}assembleAxes(){return function(e,t){const{x:n=[],y:r=[]}=e;return[...n.map((e=>K0(e,"grid",t))),...r.map((e=>K0(e,"grid",t))),...n.map((e=>K0(e,"main",t))),...r.map((e=>K0(e,"main",t)))].filter((e=>e))}(this.component.axes,this.config)}assembleLegends(){return G1(this)}assembleProjections(){return _3(e=this)||b3(e)?function(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),Y1(e))}(e):Y1(e);var e}assembleTitle(){var e,t,n;const r=null!==(e=this.title)&&void 0!==e?e:{},{encoding:i}=r,o=g3(r,["encoding"]),a=Object.assign(Object.assign(Object.assign({},LW(this.config.title).nonMarkTitleProperties),o),i?{encode:{update:i}}:{});if(a.text)return Pq(["unit","layer"],this.type)?Pq(["middle",void 0],a.anchor)&&(null!==(t=a.frame)&&void 0!==t||(a.frame="group")):null!==(n=a.anchor)&&void 0!==n||(a.anchor="start"),Wq(a)?void 0:a}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||y3(this.parent)?X2(this):[];r.length>0&&(t.scales=r);const i=this.assembleAxes();i.length>0&&(t.axes=i);const o=this.assembleLegends();return o.length>0&&(t.legends=o),t}getName(e){return Kq((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(xQ[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),n=this.component.data.outputNodeRefCounts;return n[t]=(n[t]||0)+1,t}getSizeSignalRef(e){if(y3(this.parent)){const t=Y$(C1(e)),n=this.component.scales[t];if(n&&!n.merged){const e=n.get("type"),r=n.get("range");if(MY(e)&&RW(r)){const e=n.get("name"),r=G2(Y2(this,t));return r?{signal:E1(e,n,uZ({aggregate:"distinct",field:r},{expr:"datum"}))}:(RG(aG(t)),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):v$(e)&&cW(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,t){let n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(function(e){return`Cannot find a selection named "${e}".`}(t));return n}hasAxisOrientSignalRef(){var e,t;return(null===(e=this.component.axes.x)||void 0===e?void 0:e.some((e=>e.hasOrientSignalRef())))||(null===(t=this.component.axes.y)||void 0===t?void 0:t.some((e=>e.hasOrientSignalRef())))}}class w3 extends x3{vgField(e,t={}){const n=this.fieldDef(e);if(n)return uZ(n,t)}reduceFieldDef(e,t){return function(e,t,n,r){return e?Gq(e).reduce(((n,i)=>{const o=e[i];return xe(o)?o.reduce(((e,n)=>t.call(r,e,n,i)),n):t.call(r,n,o,i)}),n):n}(this.getMapping(),((t,n,r)=>{const i=bZ(n);return i?e(t,i,r):t}),t)}forEachFieldDef(e,t){GZ(this.getMapping(),((t,n)=>{const r=bZ(t);r&&e(r,n)}),t)}}class A3 extends EQ{constructor(e,t){var n,r,i;super(e),this.transform=t,this.transform=Cq(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(r=o[0])&&void 0!==r?r:"value",null!==(i=o[1])&&void 0!==i?i:"density"]}clone(){return new A3(null,Cq(this.transform))}dependentFields(){var e;return new Set([this.transform.density,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${Iq(this.transform)}`}assemble(){const e=this.transform,{density:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["density"]);return Object.assign({type:"kde",field:t},n)}}class k3 extends EQ{constructor(e,t){super(e),this.filter=t}clone(){return new k3(null,Object.assign({},this.filter))}static make(e,t){const{config:n,mark:r,markDef:i}=t;if("filter"!==YW("invalid",i,n))return null;const o=t.reduceFieldDef(((e,n,i)=>{const o=cW(i)&&t.getScaleComponent(i);return o&&OY(o.get("type"))&&"count"!==n.aggregate&&!aX(r)&&(e[n.field]=n),e}),{});return Gq(o).length?new k3(e,o):null}dependentFields(){return new Set(Gq(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${Iq(this.filter)}`}assemble(){const e=Gq(this.filter).reduce(((e,t)=>{const n=this.filter[t],r=uZ(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push(`(isDate(${r}) || (isValid(${r}) && isFinite(+${r})))`):"quantitative"===n.type&&(e.push(`isValid(${r})`),e.push(`isFinite(+${r})`))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class T3 extends EQ{constructor(e,t){super(e),this.transform=t,this.transform=Cq(t);const{flatten:n,as:r=[]}=this.transform;this.transform.as=n.map(((e,t)=>{var n;return null!==(n=r[t])&&void 0!==n?n:e}))}clone(){return new T3(this.parent,Cq(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${Iq(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}class S3 extends EQ{constructor(e,t){var n,r,i;super(e),this.transform=t,this.transform=Cq(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(r=o[0])&&void 0!==r?r:"key",null!==(i=o[1])&&void 0!==i?i:"value"]}clone(){return new S3(null,Cq(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${Iq(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}class E3 extends EQ{constructor(e,t,n,r){super(e),this.fields=t,this.geojson=n,this.signal=r}clone(){return new E3(null,Cq(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let n=0;for(const r of[[LH,OH],[IH,DH]]){const i=r.map((e=>{const n=_Z(t.encoding[e]);return KX(n)?n.field:QX(n)?{expr:`${n.datum}`}:iZ(n)?{expr:`${n.value}`}:void 0}));(i[0]||i[1])&&(e=new E3(e,i,null,t.getName("geojson_"+n++)))}if(t.channelHasField(zH)){const r=t.typedFieldDef(zH);r.type===pY&&(e=new E3(e,null,r.field,t.getName("geojson_"+n++)))}return e}dependentFields(){var e;const t=(null!==(e=this.fields)&&void 0!==e?e:[]).filter(vt);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${Iq(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class C3 extends EQ{constructor(e,t,n,r){super(e),this.projection=t,this.fields=n,this.as=r}clone(){return new C3(null,this.projection,Cq(this.fields),Cq(this.as))}static parseAll(e,t){if(!t.projectionName())return e;for(const n of[[LH,OH],[IH,DH]]){const r=n.map((e=>{const n=_Z(t.encoding[e]);return KX(n)?n.field:QX(n)?{expr:`${n.datum}`}:iZ(n)?{expr:`${n.value}`}:void 0})),i=n[0]===IH?"2":"";(r[0]||r[1])&&(e=new C3(e,t.projectionName(),r,[t.getName(`x${i}`),t.getName(`y${i}`)]))}return e}dependentFields(){return new Set(this.fields.filter(vt))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${Iq(this.fields)} ${Iq(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class M3 extends EQ{constructor(e,t){super(e),this.transform=t}clone(){return new M3(null,Cq(this.transform))}dependentFields(){var e;return new Set([this.transform.impute,this.transform.key,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:n,step:r}=e;return{signal:`sequence(${[t,n,...r?[r]:[]].join(",")})`}}static makeFromTransform(e,t){return new M3(e,t)}static makeFromEncoding(e,t){const n=t.encoding,r=n.x,i=n.y;if(KX(r)&&KX(i)){const o=r.impute?r:i.impute?i:void 0;if(void 0===o)return;const a=r.impute?i:i.impute?r:void 0,{method:s,value:l,frame:c,keyvals:u}=o.impute,h=YZ(t.mark,n);return new M3(e,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:a.field},s?{method:s}:{}),void 0!==l?{value:l}:{}),c?{frame:c}:{}),void 0!==u?{keyvals:u}:{}),h.length?{groupby:h}:{}))}return null}hash(){return`Impute ${Iq(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:n,method:r,groupby:i,value:o,frame:a=[null,null]}=this.transform,s=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:e,key:t},n?{keyvals:MJ(n)?this.processSequence(n):n}:{}),{method:"value"}),i?{groupby:i}:{}),{value:r&&"value"!==r?null:o});return r&&"value"!==r?[s,Object.assign({type:"window",as:[`imputed_${e}_value`],ops:[r],fields:[e],frame:a,ignorePeers:!1},i?{groupby:i}:{}),{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]:[s]}}class O3 extends EQ{constructor(e,t){var n,r,i;super(e),this.transform=t,this.transform=Cq(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(r=o[0])&&void 0!==r?r:t.on,null!==(i=o[1])&&void 0!==i?i:t.loess]}clone(){return new O3(null,Cq(this.transform))}dependentFields(){var e;return new Set([this.transform.loess,this.transform.on,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${Iq(this.transform)}`}assemble(){const e=this.transform,{loess:t,on:n}=e,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["loess","on"]);return Object.assign({type:"loess",x:n,y:t},r)}}class L3 extends EQ{constructor(e,t,n){super(e),this.transform=t,this.secondary=n}clone(){return new L3(null,Cq(this.transform),this.secondary)}static make(e,t,n,r){const i=t.component.data.sources,{from:o}=n;let a=null;if(function(e){return"data"in e}(o)){let e=W3(o.data,i);e||(e=new u2(o.data),i.push(e));const n=t.getName(`lookup_${r}`);a=new CQ(e,n,xQ.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[n]=a}else if(function(e){return"param"in e}(o)){const e=o.param;let r;n=Object.assign({as:e},n);try{r=t.getSelectionComponent(Kq(e),e)}catch(t){throw new Error(function(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}(e))}if(a=r.materialized,!a)throw new Error(function(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}(e))}return new L3(e,n,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?We(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${Iq({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e=Object.assign({values:this.transform.from.fields},this.transform.as?{as:We(this.transform.as)}:{});else{let t=this.transform.as;vt(t)||(RG('If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.'),t="_lookup"),e={as:[t]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e),this.transform.default?{default:this.transform.default}:{})}}class D3 extends EQ{constructor(e,t){var n,r,i;super(e),this.transform=t,this.transform=Cq(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(r=o[0])&&void 0!==r?r:"prob",null!==(i=o[1])&&void 0!==i?i:"value"]}clone(){return new D3(null,Cq(this.transform))}dependentFields(){var e;return new Set([this.transform.quantile,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${Iq(this.transform)}`}assemble(){const e=this.transform,{quantile:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["quantile"]);return Object.assign({type:"quantile",field:t},n)}}class I3 extends EQ{constructor(e,t){var n,r,i;super(e),this.transform=t,this.transform=Cq(t);const o=null!==(n=this.transform.as)&&void 0!==n?n:[void 0,void 0];this.transform.as=[null!==(r=o[0])&&void 0!==r?r:t.on,null!==(i=o[1])&&void 0!==i?i:t.regression]}clone(){return new I3(null,Cq(this.transform))}dependentFields(){var e;return new Set([this.transform.regression,this.transform.on,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${Iq(this.transform)}`}assemble(){const e=this.transform,{regression:t,on:n}=e,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["regression","on"]);return Object.assign({type:"regression",x:n,y:t},r)}}class R3 extends EQ{constructor(e,t){super(e),this.transform=t}clone(){return new R3(null,Cq(this.transform))}addDimensions(e){var t;this.transform.groupby=jq((null!==(t=this.transform.groupby)&&void 0!==t?t:[]).concat(e),(e=>e))}producedFields(){}dependentFields(){var e;return new Set([this.transform.pivot,this.transform.value,...null!==(e=this.transform.groupby)&&void 0!==e?e:[]])}hash(){return`PivotTransform ${Iq(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:n,limit:r,op:i}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:e,value:t},void 0!==r?{limit:r}:{}),void 0!==i?{op:i}:{}),void 0!==n?{groupby:n}:{})}}class P3 extends EQ{constructor(e,t){super(e),this.transform=t}clone(){return new P3(null,Cq(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${Iq(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function N3(e){let t=0;return function n(r,i){var o;if(r instanceof u2&&!r.isGenerator&&!pQ(r.data)&&(e.push(i),i={name:null,source:i.name,transform:[]}),r instanceof a2&&(r.parent instanceof u2&&!i.source?(i.format=Object.assign(Object.assign({},null!==(o=i.format)&&void 0!==o?o:{}),{parse:r.assembleFormatParse()}),i.transform.push(...r.assembleTransforms(!0))):i.transform.push(...r.assembleTransforms())),r instanceof r2)return i.name||(i.name="data_"+t++),!i.source||i.transform.length>0?(e.push(i),r.data=i.name):r.data=i.source,void e.push(...r.assemble());switch((r instanceof l2||r instanceof c2||r instanceof k3||r instanceof $0||r instanceof s1||r instanceof C3||r instanceof n2||r instanceof L3||r instanceof O2||r instanceof C2||r instanceof S3||r instanceof T3||r instanceof A3||r instanceof O3||r instanceof D3||r instanceof I3||r instanceof s2||r instanceof P3||r instanceof R3)&&i.transform.push(r.assemble()),(r instanceof t2||r instanceof OQ||r instanceof M3||r instanceof M2||r instanceof E3)&&i.transform.push(...r.assemble()),r instanceof CQ&&(i.source&&0===i.transform.length?r.setSource(i.source):r.parent instanceof CQ?r.setSource(i.name):(i.name||(i.name="data_"+t++),r.setSource(i.name),1===r.numChildren()&&(e.push(i),i={name:null,source:i.name,transform:[]}))),r.numChildren()){case 0:r instanceof CQ&&(!i.source||i.transform.length>0)&&e.push(i);break;case 1:n(r.children[0],i);break;default:{i.name||(i.name="data_"+t++);let o=i.name;!i.source||i.transform.length>0?e.push(i):o=i.source;for(const e of r.children)n(e,{name:null,source:o,transform:[]});break}}}}function z3(e){return"top"===e||"left"===e||IW(e)?"header":"footer"}function F3(e,t){var n;const{facet:r,config:i,child:o,component:a}=e;if(e.channelHasField(t)){const s=r[t],l=u1("title",null,i,t);let c=gZ(s,i,{allowDisabling:!0,includeDefault:void 0===l||!!l});o.component.layoutHeaders[t].title&&(c=xe(c)?c.join(", "):c,c+=` / ${o.component.layoutHeaders[t].title}`,o.component.layoutHeaders[t].title=null);const u=u1("labelOrient",s.header,i,t),h=null!==s.header&&lH(null===(n=s.header)||void 0===n?void 0:n.labels,i.header.labels,!0),d=Pq(["bottom","right"],u)?"footer":"header";a.layoutHeaders[t]={title:null!==s.header?c:null,facetFieldDef:s,[d]:"facet"===t?[]:[B3(e,t,h)]}}}function B3(e,t,n){const r="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(r)?e.child.getSizeSignalRef(r):void 0,axes:[]}}function j3(e,t){var n;const{child:r}=e;if(r.component.axes[t]){const{layoutHeaders:i,resolve:o}=e.component;if(o.axis[t]=L1(o,t),"shared"===o.axis[t]){const o="x"===t?"column":"row",a=i[o];for(const i of r.component.axes[t]){const t=z3(i.get("orient"));null!==(n=a[t])&&void 0!==n||(a[t]=[B3(e,o,!1)]);const r=K0(i,"main",e.config,{header:!0});r&&a[t][0].axes.push(r),i.mainExtracted=!0}}}}function U3(e){for(const t of e.children)t.parseLayoutSize()}function V3(e,t){var n;const r=C1(t),i=Y$(r),o=e.component.resolve,a=e.component.layoutSize;let s;for(const t of e.children){const a=t.component.layoutSize.getWithExplicit(r),l=null!==(n=o.scale[i])&&void 0!==n?n:O1(i,e);if("independent"===l&&"step"===a.value){s=void 0;break}if(s){if("independent"===l&&s.value!==a.value){s=void 0;break}s=dQ(s,a,r,"")}else s=a}if(s){for(const n of e.children)e.renameSignal(n.getName(r),e.getName(t)),n.component.layoutSize.set(r,"merged",!1);a.setWithExplicit(t,s)}else a.setWithExplicit(t,{explicit:!1,value:void 0})}function q3(e,t){const n="width"===t?"x":"y",r=e.config,i=e.getScaleComponent(n);if(i){const e=i.get("type"),n=i.get("range");if(MY(e)){const e=HK(r.view,t);return RW(n)||BK(e)?"step":e}return VK(r.view,t)}if(e.hasProjection||"arc"===e.mark)return VK(r.view,t);{const e=HK(r.view,t);return BK(e)?e.step:e}}function H3(e,t,n){return uZ(t,Object.assign({suffix:`by_${uZ(e)}`},null!=n?n:{}))}class $3 extends w3{constructor(e,t,n,r){super(e,"facet",t,n,r,e.resolve),this.child=p5(e.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!BX(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=Gq(e),n={};for(const r of t){if(![vH,yH].includes(r)){RG(yG(r,"facet"));break}const t=e[r];if(void 0===t.field){RG(vG(t,r));break}n[r]=this.initFacetFieldDef(t,r)}return n}initFacetFieldDef(e,t){const n=AZ(e,t);return n.header?n.header=OW(n.header):null===n.header&&(n.header=null),n}channelHasField(e){return!!this.facet[e]}fieldDef(e){return this.facet[e]}parseData(){this.component.data=G3(this),this.child.parseData()}parseLayoutSize(){U3(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function(e){for(const t of a$)F3(e,t);j3(e,"x"),j3(e,"y")}(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){var e,t,n;const r={};for(const i of a$)for(const o of f1){const a=this.component.layoutHeaders[i],s=a[o],{facetFieldDef:l}=a;if(l){const t=u1("titleOrient",l.header,this.config,i);if(["right","bottom"].includes(t)){const n=c1(i,t);null!==(e=r.titleAnchor)&&void 0!==e||(r.titleAnchor={}),r.titleAnchor[n]="end"}}if(null==s?void 0:s[0]){const e="row"===i?"height":"width",s="header"===o?"headerBand":"footerBand";"facet"===i||this.child.component.layoutSize.get(e)||(null!==(t=r[s])&&void 0!==t||(r[s]={}),r[s][i]=.5),a.title&&(null!==(n=r.offset)&&void 0!==n||(r.offset={}),r.offset["row"===i?"rowTitle":"columnTitle"]=10)}}return r}assembleDefaultLayout(){const{column:e,row:t}=this.facet,n=e?this.columnDistinctSignal():t?1:void 0;let r="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(r="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),n?{columns:n}:{}),{bounds:"full",align:r})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof $3))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof $3?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:uZ(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(e)):super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],n=[];if(this.child instanceof $3){if(this.child.channelHasField("column")){const r=uZ(this.child.facet.column);e.push(r),t.push("distinct"),n.push(`distinct_${r}`)}}else for(const r of H$){const i=this.child.component.scales[r];if(i&&!i.merged){const o=i.get("type"),a=i.get("range");if(MY(o)&&RW(a)){const i=G2(Y2(this.child,r));i?(e.push(i),t.push("distinct"),n.push(`distinct_${i}`)):RG(aG(r))}}}return{fields:e,ops:t,as:n}}assembleFacet(){const{name:e,data:t}=this.component.data.facetRoot,{row:n,column:r}=this.facet,{fields:i,ops:o,as:a}=this.getCardinalityAggregateForChild(),s=[];for(const e of a$){const t=this.facet[e];if(t){s.push(uZ(t));const{bin:l,sort:c}=t;if(kW(l)&&s.push(uZ(t,{binSuffix:"end"})),zX(c)){const{field:e,op:s=IX}=c,l=H3(t,c);n&&r?(i.push(l),o.push("max"),a.push(l)):(i.push(e),o.push(s),a.push(l))}else if(xe(c)){const n=l1(t,e);i.push(n),o.push("max"),a.push(n)}}}const l=!!n&&!!r;return Object.assign({name:e,data:t,groupby:s},l||i.length>0?{aggregate:Object.assign(Object.assign({},l?{cross:l}:{}),i.length?{fields:i,ops:o,as:a}:{})}:{})}facetSortFields(e){const{facet:t}=this,n=t[e];return n?zX(n.sort)?[H3(n,n.sort,{expr:"datum"})]:xe(n.sort)?[l1(n,e,{expr:"datum"})]:[uZ(n,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,n=t[e];if(n){const{sort:e}=n;return[(zX(e)?e.order:!xe(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){var e;const{facet:t,config:n}=this;if(t.facet)return b1(t.facet,"facet",n);const r={row:["top","bottom"],column:["left","right"]};for(const i of d1)if(t[i]){const o=u1("labelOrient",null===(e=t[i])||void 0===e?void 0:e.header,n,i);if(r[i].includes(o))return b1(t[i],i,n)}}assembleMarks(){const{child:e}=this,t=function(e){const t=[],n=N3(t);for(const t of e.children)n(t,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),n=e.assembleGroupEncodeEntry(!1),r=this.assembleLabelTitle()||e.assembleTitle(),i=e.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},r?{title:r}:{}),i?{style:i}:{}),{from:{facet:this.assembleFacet()},sort:{field:a$.map((e=>this.facetSortFields(e))).flat(),order:a$.map((e=>this.facetSortOrder(e))).flat()}}),t.length>0?{data:t}:{}),n?{encode:{update:n}}:{}),e.assembleGroup(function(e,t){if(e.component.selection&&Gq(e.component.selection).length){const n=Tt(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:SB("mousemove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return SQ(t)}(this,[])))]}getMapping(){return this.facet}}function W3(e,t){var n,r,i,o;for(const a of t){const t=a.data;if(e.name&&a.hasName()&&e.name!==a.dataName)continue;const s=null===(n=e.format)||void 0===n?void 0:n.mesh,l=null===(r=t.format)||void 0===r?void 0:r.feature;if(s&&l)continue;const c=null===(i=e.format)||void 0===i?void 0:i.feature;if((c||l)&&c!==l)continue;const u=null===(o=t.format)||void 0===o?void 0:o.mesh;if(!s&&!u||s===u)if(gQ(e)&&gQ(t)){if(Eq(e.values,t.values))return a}else if(pQ(e)&&pQ(t)){if(e.url===t.url)return a}else if(mQ(e)&&e.name===a.dataName)return a}return null}function G3(e){var t,n,r,i,o,a,s,l,c,u;let h=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new u2({values:[]});return t.push(e),e}const n=W3(e.data,t);if(n)return vQ(e.data)||(n.data.format=Fq({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const n=new u2(e.data);return t.push(n),n}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:d,outputNodeRefCounts:f}=e.component.data,p=e.data,g=p&&(vQ(p)||pQ(p)||gQ(p))||!e.parent?new fQ:e.parent.component.data.ancestorParse.clone();vQ(p)?(yQ(p)?h=new c2(h,p.sequence):_Q(p)&&(h=new l2(h,p.graticule)),g.parseNothing=!0):null===(null===(t=null==p?void 0:p.format)||void 0===t?void 0:t.parse)&&(g.parseNothing=!0),h=null!==(n=a2.makeExplicit(h,e,g))&&void 0!==n?n:h,h=new s2(h);const m=e.parent&&_3(e.parent);(v3(e)||y3(e))&&m&&(h=null!==(r=t2.makeFromEncoding(h,e))&&void 0!==r?r:h),e.transforms.length>0&&(h=function(e,t,n){var r,i;let o=0;for(const a of t.transforms){let s,l;if(jJ(a))l=e=new s1(e,a),s="derived";else if(CJ(a)){const i=o2(a);l=e=null!==(r=a2.makeWithAncestors(e,{},i,n))&&void 0!==r?r:e,e=new $0(e,t,a.filter)}else if(UJ(a))l=e=t2.makeFromTransform(e,a,t),s="number";else if(qJ(a))s="date",void 0===n.getWithExplicit(a.field).value&&(e=new a2(e,{[a.field]:s}),n.set(a.field,s,!1)),l=e=OQ.makeFromTransform(e,a);else if(HJ(a))l=e=n2.makeFromTransform(e,a),s="number",j0(t)&&(e=new s2(e));else if(OJ(a))l=e=L3.make(e,t,a,o++),s="derived";else if(zJ(a))l=e=new O2(e,a),s="number";else if(FJ(a))l=e=new C2(e,a),s="number";else if($J(a))l=e=M2.makeFromTransform(e,a),s="derived";else if(WJ(a))l=e=new S3(e,a),s="derived";else if(BJ(a))l=e=new T3(e,a),s="derived";else if(LJ(a))l=e=new R3(e,a),s="derived";else if(NJ(a))e=new P3(e,a);else if(VJ(a))l=e=M3.makeFromTransform(e,a),s="derived";else if(DJ(a))l=e=new A3(e,a),s="derived";else if(IJ(a))l=e=new D3(e,a),s="derived";else if(RJ(a))l=e=new I3(e,a),s="derived";else{if(!PJ(a)){RG(`Ignoring an invalid transform: ${Dq(a)}.`);continue}l=e=new O3(e,a),s="derived"}if(l&&void 0!==s)for(const e of null!==(i=l.producedFields())&&void 0!==i?i:[])n.set(e,s,!1)}return e}(h,e,g));const v=function(e){const t={};if(v3(e)&&e.component.selection)for(const n of Gq(e.component.selection)){const r=e.component.selection[n];for(const e of r.project.items)!e.channel&&sH(e.field)>1&&(t[e.field]="flatten")}return t}(e),y=function(e){const t={};function n(e){var n;SZ(e)?t[e.field]="date":"quantitative"===e.type&&vt(n=e.aggregate)&&Pq(["min","max"],n)?t[e.field]="number":sH(e.field)>1?e.field in t||(t[e.field]="flatten"):oZ(e)&&zX(e.sort)&&sH(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((v3(e)||y3(e))&&e.forEachFieldDef(((t,r)=>{if(rZ(t))n(t);else{const i=_$(r),o=e.fieldDef(i);n(Object.assign(Object.assign({},t),{type:o.type}))}})),v3(e)){const{mark:n,markDef:r,encoding:i}=e;if(aX(n)&&!e.encoding.order){const e=i["horizontal"===r.orient?"y":"x"];KX(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}(e);h=null!==(i=a2.makeWithAncestors(h,{},Object.assign(Object.assign({},v),y),g))&&void 0!==i?i:h,v3(e)&&(h=E3.parseAll(h,e),h=C3.parseAll(h,e)),(v3(e)||y3(e))&&(m||(h=null!==(o=t2.makeFromEncoding(h,e))&&void 0!==o?o:h),h=null!==(a=OQ.makeFromEncoding(h,e))&&void 0!==a?a:h,h=s1.parseAllForSortIndex(h,e));const b=e.getDataName(xQ.Raw),_=new CQ(h,b,xQ.Raw,f);if(d[b]=_,h=_,v3(e)){const t=n2.makeFromEncoding(h,e);t&&(h=t,j0(e)&&(h=new s2(h))),h=null!==(s=M3.makeFromEncoding(h,e))&&void 0!==s?s:h,h=null!==(l=M2.makeFromEncoding(h,e))&&void 0!==l?l:h}v3(e)&&(h=null!==(c=k3.make(h,e))&&void 0!==c?c:h);const x=e.getDataName(xQ.Main),w=new CQ(h,x,xQ.Main,f);d[x]=w,h=w,v3(e)&&function(e,t){var n;for(const[r,i]of Xq(null!==(n=e.component.selection)&&void 0!==n?n:{})){const n=e.getName(`lookup_${r}`);e.component.data.outputNodes[n]=i.materialized=new CQ(new $0(t,e,{param:r}),n,xQ.Lookup,e.component.data.outputNodeRefCounts)}}(e,w);let A=null;if(y3(e)){const t=e.getName("facet");h=null!==(u=function(e,t){const{row:n,column:r}=t;if(n&&r){let t=null;for(const i of[n,r])if(zX(i.sort)){const{field:n,op:r=IX}=i.sort;e=t=new C2(e,{joinaggregate:[{op:r,field:n,as:H3(i,i.sort,{forAs:!0})}],groupby:[uZ(i)]})}return t}return null}(h,e.facet))&&void 0!==u?u:h,A=new r2(h,e,t,w.getSource()),d[t]=A}return Object.assign(Object.assign({},e.component.data),{outputNodes:d,outputNodeRefCounts:f,raw:_,main:w,facetRoot:A,ancestorParse:g})}class Y3 extends x3{constructor(e,t,n,r){var i,o,a,s;super(e,"concat",t,n,r,e.resolve),"shared"!==(null===(o=null===(i=e.resolve)||void 0===i?void 0:i.axis)||void 0===o?void 0:o.x)&&"shared"!==(null===(s=null===(a=e.resolve)||void 0===a?void 0:a.axis)||void 0===s?void 0:s.y)||RG("Axes cannot be shared in concatenated or repeated views yet (path_to_url"),this.children=this.getChildren(e).map(((e,t)=>p5(e,this,this.getName(`concat_${t}`),void 0,r)))}parseData(){this.component.data=G3(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Gq(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return NK(e)?e.vconcat:zK(e)?e.hconcat:e.concat}parseLayoutSize(){!function(e){U3(e);const t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";V3(e,t),V3(e,n)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=k1(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),n=e.assembleGroupStyle(),r=e.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:e.getName("group")},t?{title:t}:{}),n?{style:n}:{}),r?{encode:{update:r}}:{}),e.assembleGroup())}))}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return Object.assign(Object.assign({},null!=e?{columns:e}:{}),{bounds:"full",align:"each"})}}const X3=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},RZ),{labelExpr:1,encode:1}),Z3=Gq(X3);class K3 extends sQ{constructor(e={},t={},n=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=n}clone(){return new K3(Cq(this.explicit),Cq(this.implicit),this.mainExtracted)}hasAxisPart(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return IW(this.explicit.orient)}}const J3={bottom:"top",top:"bottom",left:"right",right:"left"};function Q3(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const n=e.length;for(let r=0;r<n;r++){const n=e[r],i=t[r];if(!!n!=!!i)return;if(n&&i){const t=n.getWithExplicit("orient"),o=i.getWithExplicit("orient");if(t.explicit&&o.explicit&&t.value!==o.value)return;e[r]=e5(n,i)}}}return e}function e5(e,t){for(const n of Z3){const r=dQ(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",((e,t)=>{switch(n){case"title":return tG(e,t);case"gridScale":return{explicit:e.explicit,value:lH(e.value,t.value)}}return hQ(e,t,n,"axis")}));e.setWithExplicit(n,r)}return e}function t5(e,t,n,r,i){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(IW(n.labelAngle)?n.labelAngle:pH(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===a1(r,i))return!0}return e===n[t]}const n5=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function r5(e,t){var n,r,i;let o=t.axis(e);const a=new K3,s=_Z(t.encoding[e]),{mark:l,config:c}=t,u=(null==o?void 0:o.orient)||(null===(n=c["x"===e?"axisX":"axisY"])||void 0===n?void 0:n.orient)||(null===(r=c.axis)||void 0===r?void 0:r.orient)||function(e){return"x"===e?"bottom":"left"}(e),h=t.getScaleComponent(e).get("type"),d=function(e,t,n,r){const i="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:TY(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],o="x"===e?"axisX":"axisY",a=IW(n)?"axisOrient":`axis${eH(n)}`,s=[...i,...i.map((e=>o+e.substr(4)))],l=["axis",a,o];return{vlOnlyAxisConfig:Q0(s,r,e,n),vgAxisConfig:Q0(l,r,e,n),axisConfigStyle:e1([...l,...s],r)}}(e,h,u,t.config),f=void 0!==o?!o:t1("disable",c.style,null==o?void 0:o.style,d).configValue;if(a.set("disable",f,void 0!==o),f)return a;o=o||{};const p=function(e,t,n,r,i){const o=null==t?void 0:t.labelAngle;if(void 0!==o)return IW(o)?o:pH(o);{const{configValue:o}=t1("labelAngle",r,null==t?void 0:t.style,i);return void 0!==o?pH(o):n!==_H||!Pq([fY,hY],e.type)||KX(e)&&e.timeUnit?void 0:270}}(s,o,e,c.style,d),g={fieldOrDatumDef:s,axis:o,channel:e,model:t,scaleType:h,orient:u,labelAngle:p,mark:l,config:c};for(const n of Z3){const r=n in n1?n1[n](g):NZ(n)?o[n]:void 0,i=void 0!==r,s=t5(r,n,o,t,e);if(i&&s)a.set(n,r,s);else{const{configValue:e,configFrom:t}=NZ(n)&&"values"!==n?t1(n,c.style,o.style,d):{},l=void 0!==e;i&&!l?a.set(n,r,s):("vgAxisConfig"!==t||n5.has(n)&&l||LZ(e)||IW(e))&&a.set(n,e,!1)}}const m=null!==(i=o.encoding)&&void 0!==i?i:{},v=DZ.reduce(((n,r)=>{var i;if(!a.hasAxisPart(r))return n;const o=M1(null!==(i=m[r])&&void 0!==i?i:{},t),s="labels"===r?function(e,t,n){var r;const{encoding:i,config:o}=e,a=null!==(r=_Z(i[t]))&&void 0!==r?r:_Z(i[w$(t)]),s=e.axis(t)||{},{format:l,formatType:c}=s;return wX(c)?Object.assign({text:SX({fieldOrDatumDef:a,field:"datum.value",format:l,formatType:c,config:o})},n):n}(t,e,o):o;return void 0===s||Wq(s)||(n[r]={update:s}),n}),{});return Wq(v)||a.set("encode",v,!!o.encoding||void 0!==o.labelAngle),a}function i5(e,t){const{config:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),t0("x",e,{defaultPos:"mid"})),t0("y",e,{defaultPos:"mid"})),JQ("size",e)),JQ("angle",e)),function(e,t,n){return n?{shape:{value:n}}:JQ("shape",e)}(e,0,t))}const o5={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),a0("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n})),a0("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n})),JQ("size",e,{vgChannel:"strokeWidth"})):{}}},a5={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,r=n.orient,i="horizontal"===r?"width":"height",o="horizontal"===r?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),t0("x",e,{defaultPos:"mid",vgChannel:"xc"})),t0("y",e,{defaultPos:"mid",vgChannel:"yc"})),JQ("size",e,{defaultValue:s5(e),vgChannel:i})),{[o]:qW(YW("thickness",n,t))})}};function s5(e){var t;const{config:n,markDef:r}=e,{orient:i}=r,o="horizontal"===i?"width":"height",a=e.getScaleComponent("horizontal"===i?"x":"y"),s=null!==(t=YW("size",r,n,{vgChannel:o}))&&void 0!==t?t:n.tick.bandSize;if(void 0!==s)return s;{const e=a?a.get("range"):void 0;return e&&RW(e)&&gt(e.step)?3*e.step/4:3*qK(n.view,o)/4}}const l5={arc:{vgMark:"arc",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),t0("x",e,{defaultPos:"mid"})),t0("y",e,{defaultPos:"mid"})),c0(e,"radius")),c0(e,"theta"))},area:{vgMark:"area",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),a0("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient})),a0("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient})),m0(e))},bar:{vgMark:"rect",encodeEntry:e=>Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),c0(e,"x")),c0(e,"y"))},circle:{vgMark:"symbol",encodeEntry:e=>i5(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[Object.assign({type:"geoshape",projection:e.projectionName()},n&&KX(n)&&n.type===pY?{field:uZ(n,{expr:"datum"})}:{})]}},image:{vgMark:"image",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),c0(e,"x")),c0(e,"y")),GQ(e,"url"))},line:{vgMark:"line",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),t0("x",e,{defaultPos:"mid"})),t0("y",e,{defaultPos:"mid"})),JQ("size",e,{vgChannel:"strokeWidth"})),m0(e))},point:{vgMark:"symbol",encodeEntry:e=>i5(e)},rect:{vgMark:"rect",encodeEntry:e=>Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),c0(e,"x")),c0(e,"y"))},rule:o5,square:{vgMark:"symbol",encodeEntry:e=>i5(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),t0("x",e,{defaultPos:"mid"})),t0("y",e,{defaultPos:"mid"})),GQ(e)),JQ("size",e,{vgChannel:"fontSize"})),JQ("angle",e)),v0("align",function(e,t,n){if(void 0===YW("align",e,n))return"center"}(e.markDef,0,t))),v0("baseline",function(e,t,n){if(void 0===YW("baseline",e,n))return"middle"}(e.markDef,0,t))),t0("radius",e,{defaultPos:null})),t0("theta",e,{defaultPos:null}))}},tick:a5,trail:{vgMark:"trail",encodeEntry:e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p0(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),t0("x",e,{defaultPos:"mid"})),t0("y",e,{defaultPos:"mid"})),JQ("size",e)),m0(e))}};const c5="faceted_path_",u5="stack_group_";function h5(e,t={fromPrefix:""}){const{mark:n,markDef:r,encoding:i,config:o}=e,a=lH(r.clip,function(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!(null==t?void 0:t.get("selectionExtent"))&&!(null==n?void 0:n.get("selectionExtent")))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),s=GW(r),l=i.key,c=function(e){var t;const{encoding:n,stack:r,mark:i,markDef:o,config:a}=e,s=n.order;if(!(!xe(s)&&iZ(s)&&Rq(s.value)||!s&&Rq(YW("order",o,a)))){if((xe(s)||KX(s))&&!r)return JW(s,{expr:"datum"});if(aX(i)){const r="horizontal"===o.orient?"y":"x",i=n[r];if(KX(i)){const n=i.sort;return xe(n)?{field:uZ(i,{prefix:r,suffix:"sort_index",expr:"datum"})}:zX(n)?{field:uZ({aggregate:qZ(e.encoding)?n.op:void 0,field:n.field},{expr:"datum"})}:NX(n)?{field:uZ(e.fieldDef(n.encoding),{expr:"datum"}),order:n.order}:null===n?void 0:{field:uZ(i,{binSuffix:(null===(t=e.stack)||void 0===t?void 0:t.impute)?"mid":void 0,expr:"datum"})}}}}}(e),u=function(e){if(!e.component.selection)return null;const t=Gq(e.component.selection).length;let n=t,r=e.parent;for(;r&&0===n;)n=Gq(r.component.selection).length,r=r.parent;return n?{interactive:t>0||!!e.encoding.tooltip}:null}(e),h=YW("aria",r,o),d=l5[n].postEncodingTransform?l5[n].postEncodingTransform(e):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("marks"),type:l5[n].vgMark},a?{clip:!0}:{}),s?{style:s}:{}),l?{key:l.field}:{}),c?{sort:c}:{}),u||{}),!1===h?{aria:h}:{}),{from:{data:t.fromPrefix+e.requestDataName(xQ.Main)},encode:{update:l5[n].encodeEntry(e)}}),d?{transform:d}:{})]}class d5 extends w3{constructor(e,t,n,r={},i){var o;super(e,"unit",t,n,i,void 0,jK(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const a=cX(e.mark)?Object.assign({},e.mark):{type:e.mark},s=a.type;void 0===a.filled&&(a.filled=function(e,t,{graticule:n}){if(n)return!1;const r=XW("filled",e,t),i=e.type;return lH(r,i!==KY&&i!==ZY&&i!==QY)}(a,i,{graticule:e.data&&_Q(e.data)}));const l=this.encoding=function(e,t,n,r){const i={};for(const t of Gq(e))v$(t)||RG(`${o=t}-encoding is dropped as ${o} is not a valid encoding channel.`);var o,a;for(let o of S$){if(!e[o])continue;const s=e[o];if(Z$(o)){const e=T$(o),t=i[e];if(KX(t)){if(("quantitative"===(a=t.type)||"temporal"===a)&&KX(s)){RG(fG(e));continue}}else o=e,RG(pG(e))}if("angle"!==o||"arc"!==t||e.theta||(RG("Arc marks uses theta channel rather than angle, replacing angle with theta."),o=CH),$Z(e,o,t)){if(o===FH&&"line"===t){const t=bZ(e[o]);if(null==t?void 0:t.aggregate){RG("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");continue}}if(o===RH&&(n?"fill"in e:"stroke"in e))RG(mG("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(o===GH||o===WH&&!xe(s)&&!iZ(s)||o===XH&&xe(s))s&&(i[o]=We(s).reduce(((e,t)=>(KX(t)?e.push(AZ(t,o)):RG(vG(t,o)),e)),[]));else{if(o===XH&&null===s)i[o]=null;else if(!(KX(s)||QX(s)||iZ(s)||YX(s)||IW(s))){RG(vG(s,o));continue}i[o]=xZ(s,o,r)}}else RG(yG(o,t))}return i}(e.encoding||{},s,a.filled,i);this.markDef=function(e,t,n){const r=OW(e),i=YW("orient",r,n);if(r.orient=function(e,t,n){switch(e){case KY:case rX:case iX:case eX:case JY:case XY:return}const{x:r,y:i,x2:o,y2:a}=t;switch(e){case YY:if(KX(r)&&(TW(r.bin)||KX(i)&&i.aggregate&&!r.aggregate))return"vertical";if(KX(i)&&(TW(i.bin)||KX(r)&&r.aggregate&&!i.aggregate))return"horizontal";if(a||o){if(n)return n;if(!o&&(KX(r)&&r.type===uY&&!kW(r.bin)||tZ(r)))return"horizontal";if(!a&&(KX(i)&&i.type===uY&&!kW(i.bin)||tZ(i)))return"vertical"}case QY:if(o&&(!KX(r)||!TW(r.bin))&&a&&(!KX(i)||!TW(i.bin)))return;case GY:if(a)return KX(i)&&TW(i.bin)?"horizontal":"vertical";if(o)return KX(r)&&TW(r.bin)?"vertical":"horizontal";if(e===QY){if(r&&!i)return"vertical";if(i&&!r)return"horizontal"}case ZY:case tX:{const t=eZ(r),o=eZ(i);if(n)return n;if(t&&!o)return"tick"!==e?"horizontal":"vertical";if(!t&&o)return"tick"!==e?"vertical":"horizontal";if(t&&o){const t=r,n=i,o=t.type===dY,a=n.type===dY;return o&&!a?"tick"!==e?"vertical":"horizontal":!o&&a?"tick"!==e?"horizontal":"vertical":!t.aggregate&&n.aggregate?"tick"!==e?"vertical":"horizontal":t.aggregate&&!n.aggregate&&"tick"!==e?"horizontal":"vertical"}return}}return"vertical"}(r.type,t,i),void 0!==i&&i!==r.orient&&RG(`Specified orient "${r.orient}" overridden with "${i}".`),"bar"===r.type&&r.orient){const e=YW("cornerRadiusEnd",r,n);if(void 0!==e){const n="horizontal"===r.orient&&t.x2||"vertical"===r.orient&&t.y2?["cornerRadius"]:pX[r.orient];for(const t of n)r[t]=e;void 0!==r.cornerRadiusEnd&&delete r.cornerRadiusEnd}}return void 0===YW("opacity",r,n)&&(r.opacity=function(e,t){if(Pq([KY,tX,rX,iX],e)&&!qZ(t))return.7}(r.type,t)),void 0===YW("cursor",r,n)&&(r.cursor=function(e,t,n){return t.href||e.href||YW("href",e,n)?"pointer":e.cursor}(r,t,n)),r}(a,l,i),this.size=function({encoding:e,size:t}){for(const n of H$){const r=A$(n);BK(t[r])&&eZ(e[n])&&(delete t[r],RG(EG(r)))}return t}({encoding:l,size:jK(e)?Object.assign(Object.assign(Object.assign({},r),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):r}),this.stack=uJ(s,l),this.specifiedScales=this.initScales(s,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=e.projection,this.selection=(null!==(o=e.params)&&void 0!==o?o:[]).filter((e=>DK(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===oX,n=e&&n$.some((t=>nZ(e[t])));return t||n}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return lW.reduce(((e,n)=>{var r;const i=_Z(t[n]);return i&&(e[n]=this.initScale(null!==(r=i.scale)&&void 0!==r?r:{})),e}),{})}initScale(e){const{domain:t,range:n}=e,r=OW(e);return xe(t)&&(r.domain=t.map(UW)),xe(n)&&(r.range=n.map(UW)),r}initAxes(e){return H$.reduce(((t,n)=>{const r=e[n];if(nZ(r)||n===_H&&nZ(e.x2)||n===xH&&nZ(e.y2)){const e=nZ(r)?r.axis:void 0;t[n]=e?this.initAxis(Object.assign({},e)):e}return t}),{})}initAxis(e){const t=Gq(e),n={};for(const r of t){const t=e[r];n[r]=LZ(t)?jW(t):UW(t)}return n}initLegends(e){return aW.reduce(((t,n)=>{const r=_Z(e[n]);if(r&&function(e){switch(e){case RH:case PH:case NH:case FH:case zH:case jH:case qH:case HH:return!0;case UH:case VH:case BH:return!1}}(n)){const e=r.legend;t[n]=e?OW(e):e}return t}),{})}parseData(){this.component.data=G3(this)}parseLayoutSize(){!function(e){const{size:t,component:n}=e;for(const r of H$){const i=A$(r);if(t[i]){const e=t[i];n.layoutSize.set(i,BK(e)?"step":e,!0)}else{const t=q3(e,i);n.layoutSize.set(i,t,!1)}}}(this)}parseSelections(){this.component.selection=function(e,t){var n;const r={},i=e.config.selection;if(!t||!t.length)return r;for(const o of t){const t=Kq(o.name),a=o.select,s=vt(a)?a:a.type,l=we(a)?Cq(a):{type:s},c=i[s];for(const e in c)"fields"!==e&&"encodings"!==e&&("mark"===e&&(l[e]=Object.assign(Object.assign({},c[e]),l[e])),void 0!==l[e]&&!0!==l[e]||(l[e]=null!==(n=c[e])&&void 0!==n?n:l[e]));const u=r[t]=Object.assign(Object.assign({},l),{name:t,type:s,init:o.value,bind:o.bind,events:vt(l.on)?SB(l.on,"scope"):We(Cq(l.on))});for(const t of F0)t.defined(u)&&t.parse&&t.parse(e,u,o)}return r}(this,this.selection)}parseMarkGroup(){this.component.mark=function(e){if(Pq([ZY,GY,nX],e.mark)){const t=YZ(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:c5+e.requestDataName(xQ.Main),data:e.requestDataName(xQ.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:h5(e,{fromPrefix:c5})}]}(e,t)}else if(e.mark===YY){const t=FW.some((t=>YW(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){var t;const[n]=h5(e,{fromPrefix:u5}),r=e.scaleName(e.stack.fieldChannel),i=(t={})=>e.vgField(e.stack.fieldChannel,t),o=(e,t)=>`${e}(${[i({prefix:"min",suffix:"start",expr:t}),i({prefix:"max",suffix:"start",expr:t}),i({prefix:"min",suffix:"end",expr:t}),i({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${r}',${e})`)).join(",")})`;let a,s;"x"===e.stack.fieldChannel?(a=Object.assign(Object.assign({},Oq(n.encode.update,["y","yc","y2","height",...FW])),{x:{signal:o("min","datum")},x2:{signal:o("max","datum")},clip:{value:!0}}),s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},n.encode.update=Object.assign(Object.assign({},Lq(n.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(a=Object.assign(Object.assign({},Oq(n.encode.update,["x","xc","x2","width"])),{y:{signal:o("min","datum")},y2:{signal:o("max","datum")},clip:{value:!0}}),s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},n.encode.update=Object.assign(Object.assign({},Lq(n.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const t of FW){const r=XW(t,e.markDef,e.config);n.encode.update[t]?(a[t]=n.encode.update[t],delete n.encode.update[t]):r&&(a[t]=qW(r)),r&&(n.encode.update[t]={value:0})}const l=[];if((null===(t=e.stack.groupbyChannels)||void 0===t?void 0:t.length)>0)for(const t of e.stack.groupbyChannels){const n=e.fieldDef(t),r=uZ(n);r&&l.push(r),((null==n?void 0:n.bin)||(null==n?void 0:n.timeUnit))&&l.push(uZ(n,{binSuffix:"end"}))}return a=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((t,r)=>{if(n.encode.update[r])return Object.assign(Object.assign({},t),{[r]:n.encode.update[r]});{const n=XW(r,e.markDef,e.config);return void 0!==n?Object.assign(Object.assign({},t),{[r]:qW(n)}):t}}),a),a.stroke&&(a.strokeForeground={value:!0},a.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(xQ.Main),name:u5+e.requestDataName(xQ.Main),groupby:l,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:a},marks:[{type:"group",encode:{update:s},marks:[n]}]}]}(e)}return h5(e)}(this)}parseAxesAndHeaders(){var e;this.component.axes=(e=this,H$.reduce(((t,n)=>(e.component.scales[n]&&(t[n]=[r5(n,e)]),t)),{}))}assembleSelectionTopLevelSignals(e){return function(e,t){var n;let r=!1;for(const i of Yq(null!==(n=e.component.selection)&&void 0!==n?n:{})){const n=i.name,o=Tt(n+R0);if(0===t.filter((e=>e.name===n)).length){const e="global"===i.resolve?"union":i.resolve,n="point"===i.type?", true, true)":")";t.push({name:i.name,update:`${z0}(${o}, ${Tt(e)}${n}`})}r=!0;for(const n of F0)n.defined(i)&&n.topLevelSignals&&(t=n.topLevelSignals(e,i,t))}if(r){0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]})}return SQ(t)}(this,e)}assembleSignals(){return[...J0(this),...kQ(this,[])]}assembleSelectionData(e){return function(e,t){var n;const r=[...t];for(const t of Yq(null!==(n=e.component.selection)&&void 0!==n?n:{})){const n={name:t.name+R0};if(t.init){const r=t.project.items.map((e=>{const{signals:t}=e;return wQ(e,["signals"])}));n.values=t.init.map((t=>({unit:B0(e,{escape:!1}),fields:r,values:AQ(t,!1)})))}r.filter((e=>e.name===t.name+R0)).length||r.push(n)}return r}(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return k1(this)}assembleMarks(){var e;let t=null!==(e=this.component.mark)&&void 0!==e?e:[];return this.parent&&_3(this.parent)||(t=TQ(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};return void 0!==e?e:this.encoding.x||this.encoding.y?"cell":void 0}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return jZ(this.encoding,e)}fieldDef(e){return bZ(this.encoding[e])}typedFieldDef(e){const t=this.fieldDef(e);return rZ(t)?t:null}}class f5 extends x3{constructor(e,t,n,r,i){super(e,"layer",t,n,i,e.resolve,e.view);const o=Object.assign(Object.assign(Object.assign({},r),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});this.children=e.layer.map(((e,t)=>{if(rJ(e))return new f5(e,this,this.getName(`layer_${t}`),o,i);if(FZ(e))return new d5(e,this,this.getName(`layer_${t}`),o,i);throw new Error(nG(e))}))}parseData(){this.component.data=G3(this);for(const e of this.children)e.parseData()}parseLayoutSize(){U3(this),V3(this,"width"),V3(this,"height")}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Gq(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){!function(e){var t;const{axes:n,resolve:r}=e.component,i={top:0,bottom:0,right:0,left:0};for(const t of e.children){t.parseAxesAndHeaders();for(const i of Gq(t.component.axes))r.axis[i]=L1(e.component.resolve,i),"shared"===r.axis[i]&&(n[i]=Q3(n[i],t.component.axes[i]),n[i]||(r.axis[i]="independent",delete n[i]))}for(const o of H$){for(const a of e.children)if(a.component.axes[o]){if("independent"===r.axis[o]){n[o]=(null!==(t=n[o])&&void 0!==t?t:[]).concat(a.component.axes[o]);for(const e of a.component.axes[o]){const{value:t,explicit:n}=e.getWithExplicit("orient");if(!IW(t)){if(i[t]>0&&!n){const n=J3[t];i[t]>i[n]&&e.set("orient",n,!1)}i[t]++}}}delete a.component.axes[o]}if("independent"===r.axis[o]&&n[o]&&n[o].length>1)for(const e of n[o])e.get("grid")&&!e.explicit.grid&&(e.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),J0(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),k1(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleGroupStyle(){const e=new Set;for(const t of this.children)for(const n of We(t.assembleGroupStyle()))e.add(n);const t=Array.from(e);return t.length>1?t:1===t.length?t[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return function(e,t){for(const n of e.children)v3(n)&&(t=TQ(n,t));return t}(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),G1(this))}}function p5(e,t,n,r,i){if(UX(e))return new $3(e,t,n,i);if(rJ(e))return new f5(e,t,n,r,i);if(FZ(e))return new d5(e,t,n,r,i);if(function(e){return NK(e)||zK(e)||PK(e)}(e))return new Y3(e,t,n,i);throw new Error(nG(e))}function g5(e,t={}){var n;t.logger&&(n=t.logger,IG=n),t.fieldTitle&&pZ(t.fieldTitle);try{const n=JK(ke(t.config,e.config)),r=eQ(e,n),i=p5(r,null,"",void 0,n);i.parse(),function(e,t){R2(e.sources);let n=0,r=0;for(let r=0;r<5&&N2(e,t,!0);r++)n++;e.sources.map(L2);for(let n=0;n<5&&N2(e,t,!1);n++)r++;R2(e.sources),5===Math.max(n,r)&&RG("Maximum optimization runs(5) reached.")}(i.component.data,i);const o=function(e,t,n={},r){const i=e.config?function(e){e=Cq(e);for(const t of eJ)delete e[t];if(e.axis)for(const t in e.axis)LZ(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of _K)delete e.legend[t];if(e.mark){for(const t of hX)delete e.mark[t];e.mark.tooltip&&we(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(RK(e.params)),delete e.params);for(const t of QK){for(const n of hX)delete e[t][n];const n=tJ[t];if(n)for(const r of n)delete e[t][r];nJ(e,t)}for(const t of Gq(yK))delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:r}=LW(e.title);Wq(t)||(e.style["group-title"]=Object.assign(Object.assign({},e.style["group-title"]),t)),Wq(n)||(e.style["group-subtitle"]=Object.assign(Object.assign({},e.style["group-subtitle"]),n)),Wq(r)?delete e.title:e.title=r}(e);for(const t in e)we(e[t])&&Wq(e[t])&&delete e[t];return Wq(e)?void 0:e}(e.config):void 0,o=[].concat(e.assembleSelectionData([]),function(e,t){var n,r;const i=[],o=N3(i);let a=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+a++);const e=t.assemble();o(t,e)}for(const e of i)0===e.transform.length&&delete e.transform;let s=0;for(const[e,t]of i.entries())0!==(null!==(n=t.transform)&&void 0!==n?n:[]).length||t.source||i.splice(s++,0,i.splice(e,1)[0]);for(const t of i)for(const n of null!==(r=t.transform)&&void 0!==r?r:[])"lookup"===n.type&&(n.from=e.outputNodes[n.from].getSource());for(const e of i)e.name in t&&(e.values=t[e.name]);return i}(e.component.data,n)),a=e.assembleProjections(),s=e.assembleTitle(),l=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let u=e.assembleLayoutSignals();u=u.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:h}=t,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"path_to_url"},e.description?{description:e.description}:{}),d),s?{title:s}:{}),l?{style:l}:{}),c?{encode:{update:c}}:{}),{data:o}),a.length>0?{projections:a}:{}),e.assembleGroup([...u,...e.assembleSelectionTopLevelSignals([]),...RK(h)])),i?{config:i}:{}),r?{usermeta:r}:{})}(i,function(e,t,n,r){const i=r.component.layoutSize.get("width"),o=r.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},r.hasAxisOrientSignalRef()&&(t.resize=!0)):vt(t)&&(t={type:t}),i&&o&&("fit"===(a=t.type)||"fit-x"===a||"fit-y"===a))if("step"===i&&"step"===o)RG(oG()),t.type="pad";else if("step"===i||"step"===o){const e="step"===i?"width":"height";RG(oG(Y$(e)));const n="width"===e?"height":"width";t.type=function(e){return e?`fit-${Y$(e)}`:"fit"}(n)}var a;return Object.assign(Object.assign(Object.assign({},1===Gq(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t}),aQ(n,!1)),aQ(e,!0))}(e,r.autosize,n,i),e.datasets,e.usermeta);return{spec:o,normalized:r}}finally{t.logger&&(IG=DG),t.fieldTitle&&pZ(dZ)}}const m5="5.2.0",v5=function(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}},y5="#fff",b5={background:"#333",title:{color:y5,subtitleColor:y5},style:{"guide-label":{fill:y5},"guide-title":{fill:y5}},axis:{domainColor:y5,gridColor:"#888",tickColor:y5}},_5="#4572a7",x5={background:"#fff",arc:{fill:_5},area:{fill:_5},line:{stroke:_5,strokeWidth:2},path:{stroke:_5},rect:{fill:_5},shape:{stroke:_5},symbol:{fill:_5,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},w5="#30a2da",A5="#cbcbcb",k5="#f0f0f0",T5="#333",S5={arc:{fill:w5},area:{fill:w5},axis:{domainColor:A5,grid:!0,gridColor:A5,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:A5,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:k5,group:{fill:k5},legend:{labelColor:T5,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:T5,titleFontSize:14,titlePadding:10},line:{stroke:w5,strokeWidth:2},path:{stroke:w5,strokeWidth:.5},rect:{fill:w5},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:w5},bar:{binSpacing:2,fill:w5,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},E5="#000",C5={group:{fill:"#e5e5e5"},arc:{fill:E5},area:{fill:E5},line:{stroke:E5},path:{stroke:E5},rect:{fill:E5},shape:{stroke:E5},symbol:{fill:E5,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},M5="Benton Gothic, sans-serif",O5="#82c6df",L5="Benton Gothic Bold, sans-serif",D5="normal",I5={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},R5={background:"#ffffff",title:{anchor:"start",color:"#000000",font:L5,fontSize:22,fontWeight:"normal"},arc:{fill:O5},area:{fill:O5},line:{stroke:O5,strokeWidth:2},path:{stroke:O5},rect:{fill:O5},shape:{stroke:O5},symbol:{fill:O5,size:30},axis:{labelFont:M5,labelFontSize:11.5,labelFontWeight:"normal",titleFont:L5,titleFontSize:13,titleFontWeight:D5},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:M5,labelFontSize:11.5,symbolType:"square",titleFont:L5,titleFontSize:13,titleFontWeight:D5},range:{category:I5["category-6"],diverging:I5["fireandice-6"],heatmap:I5["fire-7"],ordinal:I5["fire-7"],ramp:I5["fire-7"]}},P5="#ab5787",N5="#979797",z5={background:"#f9f9f9",arc:{fill:P5},area:{fill:P5},line:{stroke:P5},path:{stroke:P5},rect:{fill:P5},shape:{stroke:P5},symbol:{fill:P5,size:30},axis:{domainColor:N5,domainWidth:.5,gridWidth:.2,labelColor:N5,tickColor:N5,tickWidth:.2,titleColor:N5},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},F5="#3e5c69",B5={background:"#fff",arc:{fill:F5},area:{fill:F5},line:{stroke:F5},path:{stroke:F5},rect:{fill:F5},shape:{stroke:F5},symbol:{fill:F5},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},j5="#1696d2",U5="#000000",V5="Lato",q5="Lato",H5={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},$5={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:V5},axisX:{domain:!0,domainColor:U5,domainWidth:1,grid:!1,labelFontSize:12,labelFont:q5,labelAngle:0,tickColor:U5,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:V5},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:q5,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:V5,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:q5,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:V5,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:H5["six-groups-cat-1"],diverging:H5["diverging-colors"],heatmap:H5["diverging-colors"],ordinal:H5["six-groups-seq"],ramp:H5["shades-blue"]},area:{fill:j5},rect:{fill:j5},line:{color:j5,stroke:j5,strokeWidth:5},trail:{color:j5,stroke:j5,strokeWidth:0,size:1},path:{stroke:j5,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:j5,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:j5,stroke:null}},arc:{fill:j5},shape:{stroke:j5},symbol:{fill:j5,size:30}},W5="#3366CC",G5="#ccc",Y5="Arial, sans-serif",X5={arc:{fill:W5},area:{fill:W5},path:{stroke:W5},rect:{fill:W5},shape:{stroke:W5},symbol:{stroke:W5},circle:{fill:W5},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Y5,fontSize:12},"guide-title":{font:Y5,fontSize:12},"group-title":{font:Y5,fontSize:12}},title:{font:Y5,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:G5,tickColor:G5,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},Z5="2.10.0";function K5(e,t){return JSON.stringify(e,function(e){const t=[];return function(n,r){if("object"!=typeof r||null===r)return r;const i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}const J5="vg-tooltip-element",Q5={offsetX:10,offsetY:10,id:J5,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;")},maxDepth:2,formatTooltip:function(e,t,n){if(xe(e))return`[${e.map((e=>t(vt(e)?e:K5(e,n)))).join(", ")}]`;if(we(e)){let r="";const i=e,{title:o,image:a}=i,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(i,["title","image"]);o&&(r+=`<h2>${t(o)}</h2>`),a&&(r+=`<img src="${t(a)}">`);const l=Object.keys(s);if(l.length>0){r+="<table>";for(const e of l){let i=s[e];void 0!==i&&(we(i)&&(i=K5(i,n)),r+=`<tr><td class="key">${t(e)}:</td><td class="value">${t(i)}</td></tr>`)}r+="</table>"}return r||"{}"}return t(e)}};class e4{constructor(e){this.options=Object.assign(Object.assign({},Q5),e);const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n".toString().replace(J5,e)}(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){var i;if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(null!==(i=document.fullscreenElement)&&void 0!==i?i:document.body).appendChild(this.el)),null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:a}=function(e,t,n,r){let i=e.clientX+n;i+t.width>window.innerWidth&&(i=+e.clientX-n-t.width);let o=e.clientY+r;return o+t.height>window.innerHeight&&(o=+e.clientY-r-t.height),{x:i,y:o}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${a}px; left: ${o}px`)}}function t4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n4(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function r4(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){n4(o,r,i,a,s,"next",e)}function s(e){n4(o,r,i,a,s,"throw",e)}a(void 0)}))}}var i4,o4=Object.prototype,a4=o4.hasOwnProperty,s4="function"==typeof Symbol?Symbol:{},l4=s4.iterator||"@@iterator",c4=s4.asyncIterator||"@@asyncIterator",u4=s4.toStringTag||"@@toStringTag";function h4(e,t,n,r){var i=t&&t.prototype instanceof y4?t:y4,o=Object.create(i.prototype),a=new L4(r||[]);return o._invoke=function(e,t,n){var r=f4;return function(i,o){if(r===g4)throw new Error("Generator is already running");if(r===m4){if("throw"===i)throw o;return I4()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C4(a,n);if(s){if(s===v4)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f4)throw r=m4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=g4;var l=d4(e,t,n);if("normal"===l.type){if(r=n.done?m4:p4,l.arg===v4)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=m4,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function d4(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}var f4="suspendedStart",p4="suspendedYield",g4="executing",m4="completed",v4={};function y4(){}function b4(){}function _4(){}var x4={};x4[l4]=function(){return this};var w4=Object.getPrototypeOf,A4=w4&&w4(w4(D4([])));A4&&A4!==o4&&a4.call(A4,l4)&&(x4=A4);var k4=_4.prototype=y4.prototype=Object.create(x4);function T4(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S4(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b4||"GeneratorFunction"===(t.displayName||t.name))}function E4(e,t){function n(r,i,o,a){var s=d4(e[r],e,i);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&a4.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,a)}),(function(e){n("throw",e,o,a)})):t.resolve(c).then((function(e){l.value=e,o(l)}),(function(e){return n("throw",e,o,a)}))}a(s.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function C4(e,t){var n=e.iterator[t.method];if(n===i4){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=i4,C4(e,t),"throw"===t.method))return v4;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v4}var r=d4(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,v4;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=i4),t.delegate=null,v4):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v4)}function M4(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O4(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L4(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M4,this),this.reset(!0)}function D4(e){if(e){var t=e[l4];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a4.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=i4,t.done=!0,t};return r.next=r}}return{next:I4}}function I4(){return{value:i4,done:!0}}b4.prototype=k4.constructor=_4,_4.constructor=b4,_4[u4]=b4.displayName="GeneratorFunction",T4(E4.prototype),E4.prototype[c4]=function(){return this},T4(k4),k4[u4]="Generator",k4[l4]=function(){return this},k4.toString=function(){return"[object Generator]"},L4.prototype={constructor:L4,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=i4,this.done=!1,this.delegate=null,this.method="next",this.arg=i4,this.tryEntries.forEach(O4),!e)for(var t in this)"t"===t.charAt(0)&&a4.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=i4)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=i4),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=a4.call(i,"catchLoc"),s=a4.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a4.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v4):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v4},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O4(n),v4}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O4(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D4(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=i4),v4}};var R4={wrap:h4,isGeneratorFunction:S4,AsyncIterator:E4,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_4):(e.__proto__=_4,u4 in e||(e[u4]="GeneratorFunction")),e.prototype=Object.create(k4),e},awrap:function(e){return{__await:e}},async:function(e,t,n,r,i){void 0===i&&(i=Promise);var o=new E4(h4(e,t,n,r),i);return S4(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},keys:function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},values:D4},P4=N4;function N4(e){var t=this;if(t instanceof N4||(t=new N4),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function z4(e,t,n){var r=t===e.head?new j4(n,null,t,e):new j4(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function F4(e,t){e.tail=new j4(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function B4(e,t){e.head=new j4(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function j4(e,t,n,r){if(!(this instanceof j4))return new j4(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}N4.Node=j4,N4.create=N4,N4.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},N4.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},N4.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},N4.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)F4(this,arguments[e]);return this.length},N4.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)B4(this,arguments[e]);return this.length},N4.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},N4.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},N4.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},N4.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},N4.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},N4.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},N4.prototype.map=function(e,t){t=t||this;for(var n=new N4,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},N4.prototype.mapReverse=function(e,t){t=t||this;for(var n=new N4,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},N4.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},N4.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},N4.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},N4.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},N4.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new N4;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},N4.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new N4;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},N4.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var i=[];for(n=0;r&&n<t;n++)i.push(r.value),r=this.removeNode(r);for(null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev),n=0;n<(arguments.length<=2?0:arguments.length-2);n++)r=z4(this,r,n+2<2||arguments.length<=n+2?void 0:arguments[n+2]);return i},N4.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{N4.prototype[Symbol.iterator]=R4.mark((function e(){var t;return R4.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}catch(e){}var U4=P4,V4=Symbol("max"),q4=Symbol("length"),H4=Symbol("lengthCalculator"),$4=Symbol("allowStale"),W4=Symbol("maxAge"),G4=Symbol("dispose"),Y4=Symbol("noDisposeOnSet"),X4=Symbol("lruList"),Z4=Symbol("cache"),K4=Symbol("updateAgeOnGet"),J4=()=>1,Q4=(e,t,n)=>{var r=e[Z4].get(t);if(r){var i=r.value;if(e6(e,i)){if(n6(e,r),!e[$4])return}else n&&(e[K4]&&(r.value.now=Date.now()),e[X4].unshiftNode(r));return i.value}},e6=(e,t)=>{if(!t||!t.maxAge&&!e[W4])return!1;var n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[W4]&&n>e[W4]},t6=e=>{if(e[q4]>e[V4])for(var t=e[X4].tail;e[q4]>e[V4]&&null!==t;){var n=t.prev;n6(e,t),t=n}},n6=(e,t)=>{if(t){var n=t.value;e[G4]&&e[G4](n.key,n.value),e[q4]-=n.length,e[Z4].delete(n.key),e[X4].removeNode(t)}};class r6{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}var i6=(e,t,n,r)=>{var i=n.value;e6(e,i)&&(n6(e,n),e[$4]||(i=void 0)),i&&t.call(r,i.value,i.key,e)},o6=["includePrerelease","loose","rtl"],a6=e=>e?"object"!=typeof e?{loose:!0}:o6.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{},s6={exports:{}},l6={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},c6="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};!function(e,t){var n=l6.MAX_SAFE_COMPONENT_LENGTH,r=c6,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={},s=0,l=(e,t,n)=>{var l=s++;r(l,t),a[e]=l,o[l]=t,i[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION","(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")")),l("MAINVERSIONLOOSE","(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")")),l("PRERELEASEIDENTIFIER","(?:".concat(o[a.NUMERICIDENTIFIER],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),l("PRERELEASEIDENTIFIERLOOSE","(?:".concat(o[a.NUMERICIDENTIFIERLOOSE],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),l("PRERELEASE","(?:-(".concat(o[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIER],")*))")),l("PRERELEASELOOSE","(?:-?(".concat(o[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIERLOOSE],")*))")),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD","(?:\\+(".concat(o[a.BUILDIDENTIFIER],"(?:\\.").concat(o[a.BUILDIDENTIFIER],")*))")),l("FULLPLAIN","v?".concat(o[a.MAINVERSION]).concat(o[a.PRERELEASE],"?").concat(o[a.BUILD],"?")),l("FULL","^".concat(o[a.FULLPLAIN],"$")),l("LOOSEPLAIN","[v=\\s]*".concat(o[a.MAINVERSIONLOOSE]).concat(o[a.PRERELEASELOOSE],"?").concat(o[a.BUILD],"?")),l("LOOSE","^".concat(o[a.LOOSEPLAIN],"$")),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE","".concat(o[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),l("XRANGEIDENTIFIER","".concat(o[a.NUMERICIDENTIFIER],"|x|X|\\*")),l("XRANGEPLAIN","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:".concat(o[a.PRERELEASE],")?").concat(o[a.BUILD],"?")+")?)?"),l("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[a.PRERELEASELOOSE],")?").concat(o[a.BUILD],"?")+")?)?"),l("XRANGE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAIN],"$")),l("XRANGELOOSE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAINLOOSE],"$")),l("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),l("COERCERTL",o[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM","(\\s*)".concat(o[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",l("TILDE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAIN],"$")),l("TILDELOOSE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAINLOOSE],"$")),l("LONECARET","(?:\\^)"),l("CARETTRIM","(\\s*)".concat(o[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",l("CARET","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAIN],"$")),l("CARETLOOSE","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAINLOOSE],"$")),l("COMPARATORLOOSE","^".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],")$|^$")),l("COMPARATOR","^".concat(o[a.GTLT],"\\s*(").concat(o[a.FULLPLAIN],")$|^$")),l("COMPARATORTRIM","(\\s*)".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],"|").concat(o[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE","^\\s*(".concat(o[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAIN],")")+"\\s*$"),l("HYPHENRANGELOOSE","^\\s*(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s*$"),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(s6,s6.exports);var u6=/^[0-9]+$/,h6=(e,t)=>{var n=u6.test(e),r=u6.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},d6=c6,f6=l6.MAX_LENGTH,p6=l6.MAX_SAFE_INTEGER,g6=s6.exports.re,m6=s6.exports.t,v6=a6,y6=h6;class b6{constructor(e,t){if(t=v6(t),e instanceof b6){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: ".concat(e));if(e.length>f6)throw new TypeError("version is longer than ".concat(f6," characters"));d6("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;var n=e.trim().match(t.loose?g6[m6.LOOSE]:g6[m6.FULL]);if(!n)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>p6||this.major<0)throw new TypeError("Invalid major version");if(this.minor>p6||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>p6||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<p6)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}toString(){return this.version}compare(e){if(d6("SemVer.compare",this.version,this.options,e),!(e instanceof b6)){if("string"==typeof e&&e===this.version)return 0;e=new b6(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof b6||(e=new b6(e,this.options)),y6(this.major,e.major)||y6(this.minor,e.minor)||y6(this.patch,e.patch)}comparePre(e){if(e instanceof b6||(e=new b6(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],r=e.prerelease[t];if(d6("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return y6(n,r)}while(++t)}compareBuild(e){e instanceof b6||(e=new b6(e,this.options));var t=0;do{var n=this.build[t],r=e.build[t];if(d6("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return y6(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}var _6=b6,x6=_6,w6=(e,t,n)=>new x6(e,n).compare(new x6(t,n)),A6=w6,k6=w6,T6=w6,S6=w6,E6=w6,C6=w6,M6=(e,t,n)=>0===A6(e,t,n),O6=(e,t,n)=>0!==k6(e,t,n),L6=(e,t,n)=>T6(e,t,n)>0,D6=(e,t,n)=>S6(e,t,n)>=0,I6=(e,t,n)=>E6(e,t,n)<0,R6=(e,t,n)=>C6(e,t,n)<=0,P6=Symbol("SemVer ANY");class N6{static get ANY(){return P6}constructor(e,t){if(t=F6(t),e instanceof N6){if(e.loose===!!t.loose)return e;e=e.value}V6("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===P6?this.value="":this.value=this.operator+this.semver.version,V6("comp",this)}parse(e){var t=this.options.loose?B6[j6.COMPARATORLOOSE]:B6[j6.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new q6(n[2],this.options.loose):this.semver=P6}toString(){return this.value}test(e){if(V6("Comparator.test",e,this.options.loose),this.semver===P6||e===P6)return!0;if("string"==typeof e)try{e=new q6(e,this.options)}catch(e){return!1}return U6(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof N6))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new H6(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new H6(this.value,t).test(e.semver);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=U6(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=U6(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&o||a||s}}var z6=N6,F6=a6,B6=s6.exports.re,j6=s6.exports.t,U6=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return M6(e,n,r);case"!=":return O6(e,n,r);case">":return L6(e,n,r);case">=":return D6(e,n,r);case"<":return I6(e,n,r);case"<=":return R6(e,n,r);default:throw new TypeError("Invalid operator: ".concat(t))}},V6=c6,q6=_6,H6=Y6;function $6(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return W6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W6(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function W6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}class G6{constructor(e,t){if(t=Z6(t),e instanceof G6)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new G6(e.raw,t);if(e instanceof K6)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(e));if(this.set.length>1){var n=this.set[0];if(this.set=this.set.filter((e=>!o7(e[0]))),0===this.set.length)this.set=[n];else if(this.set.length>1){var r,i=$6(this.set);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(1===o.length&&a7(o[0])){this.set=[o];break}}}catch(e){i.e(e)}finally{i.f()}}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();var t=Object.keys(this.options).join(","),n="parseRange:".concat(t,":").concat(e),r=X6.get(n);if(r)return r;var i=this.options.loose,o=i?e7[t7.HYPHENRANGELOOSE]:e7[t7.HYPHENRANGE];e=e.replace(o,y7(this.options.includePrerelease)),J6("hyphen replace",e),e=e.replace(e7[t7.COMPARATORTRIM],n7),J6("comparator trim",e,e7[t7.COMPARATORTRIM]),e=(e=(e=e.replace(e7[t7.TILDETRIM],r7)).replace(e7[t7.CARETTRIM],i7)).split(/\s+/).join(" ");var a=i?e7[t7.COMPARATORLOOSE]:e7[t7.COMPARATOR],s=e.split(" ").map((e=>l7(e,this.options))).join(" ").split(/\s+/).map((e=>v7(e,this.options))).filter(this.options.loose?e=>!!e.match(a):()=>!0).map((e=>new K6(e,this.options)));s.length;var l,c=new Map,u=$6(s);try{for(u.s();!(l=u.n()).done;){var h=l.value;if(o7(h))return[h];c.set(h.value,h)}}catch(e){u.e(e)}finally{u.f()}c.size>1&&c.has("")&&c.delete("");var d=[...c.values()];return X6.set(n,d),d}intersects(e,t){if(!(e instanceof G6))throw new TypeError("a Range is required");return this.set.some((n=>s7(n,t)&&e.set.some((e=>s7(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new Q6(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(b7(this.set[t],e,this.options))return!0;return!1}}var Y6=G6,X6=new class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[V4]=e.max||1/0;var t=e.length||J4;if(this[H4]="function"!=typeof t?J4:t,this[$4]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[W4]=e.maxAge||0,this[G4]=e.dispose,this[Y4]=e.noDisposeOnSet||!1,this[K4]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[V4]=e||1/0,t6(this)}get max(){return this[V4]}set allowStale(e){this[$4]=!!e}get allowStale(){return this[$4]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[W4]=e,t6(this)}get maxAge(){return this[W4]}set lengthCalculator(e){"function"!=typeof e&&(e=J4),e!==this[H4]&&(this[H4]=e,this[q4]=0,this[X4].forEach((e=>{e.length=this[H4](e.value,e.key),this[q4]+=e.length}))),t6(this)}get lengthCalculator(){return this[H4]}get length(){return this[q4]}get itemCount(){return this[X4].length}rforEach(e,t){t=t||this;for(var n=this[X4].tail;null!==n;){var r=n.prev;i6(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(var n=this[X4].head;null!==n;){var r=n.next;i6(this,e,n,t),n=r}}keys(){return this[X4].toArray().map((e=>e.key))}values(){return this[X4].toArray().map((e=>e.value))}reset(){this[G4]&&this[X4]&&this[X4].length&&this[X4].forEach((e=>this[G4](e.key,e.value))),this[Z4]=new Map,this[X4]=new U4,this[q4]=0}dump(){return this[X4].map((e=>!e6(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[X4]}set(e,t,n){if((n=n||this[W4])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");var r=n?Date.now():0,i=this[H4](t,e);if(this[Z4].has(e)){if(i>this[V4])return n6(this,this[Z4].get(e)),!1;var o=this[Z4].get(e).value;return this[G4]&&(this[Y4]||this[G4](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[q4]+=i-o.length,o.length=i,this.get(e),t6(this),!0}var a=new r6(e,t,i,r,n);return a.length>this[V4]?(this[G4]&&this[G4](e,t),!1):(this[q4]+=a.length,this[X4].unshift(a),this[Z4].set(e,this[X4].head),t6(this),!0)}has(e){if(!this[Z4].has(e))return!1;var t=this[Z4].get(e).value;return!e6(this,t)}get(e){return Q4(this,e,!0)}peek(e){return Q4(this,e,!1)}pop(){var e=this[X4].tail;return e?(n6(this,e),e.value):null}del(e){n6(this,this[Z4].get(e))}load(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-t;o>0&&this.set(r.k,r.v,o)}}}prune(){this[Z4].forEach(((e,t)=>Q4(this,t,!1)))}}({max:1e3}),Z6=a6,K6=z6,J6=c6,Q6=_6,e7=s6.exports.re,t7=s6.exports.t,n7=s6.exports.comparatorTrimReplace,r7=s6.exports.tildeTrimReplace,i7=s6.exports.caretTrimReplace,o7=e=>"<0.0.0-0"===e.value,a7=e=>""===e.value,s7=(e,t)=>{for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},l7=(e,t)=>(J6("comp",e,t),e=d7(e,t),J6("caret",e),e=u7(e,t),J6("tildes",e),e=p7(e,t),J6("xrange",e),e=m7(e,t),J6("stars",e),e),c7=e=>!e||"x"===e.toLowerCase()||"*"===e,u7=(e,t)=>e.trim().split(/\s+/).map((e=>h7(e,t))).join(" "),h7=(e,t)=>{var n=t.loose?e7[t7.TILDELOOSE]:e7[t7.TILDE];return e.replace(n,((t,n,r,i,o)=>{var a;return J6("tilde",e,t,n,r,i,o),c7(n)?a="":c7(r)?a=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):c7(i)?a=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(J6("replaceTilde pr",o),a=">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):a=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),J6("tilde return",a),a}))},d7=(e,t)=>e.trim().split(/\s+/).map((e=>f7(e,t))).join(" "),f7=(e,t)=>{J6("caret",e,t);var n=t.loose?e7[t7.CARETLOOSE]:e7[t7.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,a)=>{var s;return J6("caret",e,t,n,i,o,a),c7(n)?s="":c7(i)?s=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):c7(o)?s="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):a?(J6("replaceCaret pr",a),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(a," <").concat(+n+1,".0.0-0")):(J6("no pr"),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o," <").concat(+n+1,".0.0-0")),J6("caret return",s),s}))},p7=(e,t)=>(J6("replaceXRanges",e,t),e.split(/\s+/).map((e=>g7(e,t))).join(" ")),g7=(e,t)=>{e=e.trim();var n=t.loose?e7[t7.XRANGELOOSE]:e7[t7.XRANGE];return e.replace(n,((n,r,i,o,a,s)=>{J6("xRange",e,n,r,i,o,a,s);var l=c7(i),c=l||c7(o),u=c||c7(a),h=u;return"="===r&&h&&(r=""),s=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(c&&(o=0),a=0,">"===r?(r=">=",c?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),"<"===r&&(s="-0"),n="".concat(r+i,".").concat(o,".").concat(a).concat(s)):c?n=">=".concat(i,".0.0").concat(s," <").concat(+i+1,".0.0-0"):u&&(n=">=".concat(i,".").concat(o,".0").concat(s," <").concat(i,".").concat(+o+1,".0-0")),J6("xRange return",n),n}))},m7=(e,t)=>(J6("replaceStars",e,t),e.trim().replace(e7[t7.STAR],"")),v7=(e,t)=>(J6("replaceGTE0",e,t),e.trim().replace(e7[t.includePrerelease?t7.GTE0PRE:t7.GTE0],"")),y7=e=>(t,n,r,i,o,a,s,l,c,u,h,d,f)=>(n=c7(r)?"":c7(i)?">=".concat(r,".0.0").concat(e?"-0":""):c7(o)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):a?">=".concat(n):">=".concat(n).concat(e?"-0":""),l=c7(c)?"":c7(u)?"<".concat(+c+1,".0.0-0"):c7(h)?"<".concat(c,".").concat(+u+1,".0-0"):d?"<=".concat(c,".").concat(u,".").concat(h,"-").concat(d):e?"<".concat(c,".").concat(u,".").concat(+h+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()),b7=(e,t,n)=>{for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(J6(e[i].semver),e[i].semver!==K6.ANY&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0},_7=Y6,x7=(e,t,n)=>{try{t=new _7(t,n)}catch(e){return!1}return t.test(e)};function w7(e,t,n){var r=e.open(t),i=new URL(t).origin,o=40;e.addEventListener("message",(function t(n){n.source===r&&(o=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){o<=0||(r.postMessage(n,i),setTimeout(e,250),o-=1)}),250)}var A7,k7='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function T7(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];S7(e,a)}return e}function S7(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Te(e,i,t[i],!0)}}function E7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C7(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E7(Object(n),!0).forEach((function(t){t4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E7(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e});var M7=v,O7=y,L7="undefined"!=typeof window?window:void 0;void 0===O7&&null!=L7&&null!==(A7=L7.vl)&&void 0!==A7&&A7.compile&&(O7=L7.vl);var D7={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},I7={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},R7={vega:"Vega","vega-lite":"Vega-Lite"},P7={vega:M7.version,"vega-lite":O7?O7.version:"not available"},N7={vega:e=>e,"vega-lite":(e,t)=>O7.compile(e,{config:t}).spec},z7='\n<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">\n <circle r="2" cy="8" cx="2"></circle>\n <circle r="2" cy="8" cx="8"></circle>\n <circle r="2" cy="8" cx="14"></circle>\n</svg>',F7="chart-wrapper";function B7(e){return"function"==typeof e}function j7(e,t,n,r){var i="<html><head>".concat(t,'</head><body><pre><code class="json">'),o="</code></pre>".concat(n,"</body></html>"),a=window.open("");a.document.write(i+e+o),a.document.title="".concat(R7[r]," JSON Source")}function U7(e,t){if(e.$schema){var n,r=v5(e.$schema);t&&t!==r.library&&console.warn("The given visualization spec is written in ".concat(R7[r.library],", but mode argument sets ").concat(null!==(n=R7[t])&&void 0!==n?n:t,"."));var i=r.library;return x7(P7[i],"^".concat(r.version.slice(1)))||console.warn("The input spec uses ".concat(R7[i]," ").concat(r.version,", but the current version of ").concat(R7[i]," is v").concat(P7[i],".")),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!=t?t:"vega"}function V7(e){return(t=e)&&"load"in t?e:M7.loader(e);var t}function q7(e){var t,n,r=null!==(t=null===(n=e.usermeta)||void 0===n?void 0:n.embedOptions)&&void 0!==t?t:{};return vt(r.defaultStyle)&&(r.defaultStyle=!1),r}function H7(e,t){return $7.apply(this,arguments)}function $7(){return $7=r4(R4.mark((function e(t,n){var r,i,o,a,s,l,c,u,h,d,f,p=arguments;return R4.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=p.length>2&&void 0!==p[2]?p[2]:{},!vt(n)){e.next=10;break}return s=V7(o.loader),e.t0=JSON,e.next=6,s.load(n);case 6:e.t1=e.sent,a=e.t0.parse.call(e.t0,e.t1),e.next=11;break;case 10:a=n;case 11:return l=q7(a),c=l.loader,s&&!c||(s=V7(null!==(u=o.loader)&&void 0!==u?u:c)),e.next=16,W7(l,s);case 16:return h=e.sent,e.next=19,W7(o,s);case 19:return d=e.sent,f=C7(C7({},T7(d,h)),{},{config:ke(null!==(r=d.config)&&void 0!==r?r:{},null!==(i=h.config)&&void 0!==i?i:{})}),e.next=23,X7(t,a,f,s);case 23:return e.abrupt("return",e.sent);case 24:case"end":return e.stop()}}),e)}))),$7.apply(this,arguments)}function W7(e,t){return G7.apply(this,arguments)}function G7(){return G7=r4(R4.mark((function e(t,n){var r,i,o;return R4.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!vt(t.config)){e.next=8;break}return e.t1=JSON,e.next=4,n.load(t.config);case 4:e.t2=e.sent,e.t0=e.t1.parse.call(e.t1,e.t2),e.next=9;break;case 8:e.t0=null!==(r=t.config)&&void 0!==r?r:{};case 9:if(i=e.t0,!vt(t.patch)){e.next=18;break}return e.t4=JSON,e.next=14,n.load(t.patch);case 14:e.t5=e.sent,e.t3=e.t4.parse.call(e.t4,e.t5),e.next=19;break;case 18:e.t3=t.patch;case 19:return o=e.t3,e.abrupt("return",C7(C7(C7({},t),o?{patch:o}:{}),i?{config:i}:{}));case 21:case"end":return e.stop()}}),e)}))),G7.apply(this,arguments)}function Y7(e){var t,n=e.getRootNode?e.getRootNode():document;return n instanceof ShadowRoot?{root:n,rootContainer:n}:{root:document,rootContainer:null!==(t=document.head)&&void 0!==t?t:document.body}}function X7(e,t){return Z7.apply(this,arguments)}function Z7(){return Z7=r4(R4.mark((function e(t,n){var r,i,o,a,s,l,c,u,h,d,f,p,g,m,v,y,_,x,w,A,k,T,S,E,C,M,O,L,D,I,R,P,N,z,B,j,U,V,q,H,$,W,G,Y,X,Z,K,Q,ee,te=arguments;return R4.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ee=function(){j&&document.removeEventListener("click",j),I.finalize()},u=te.length>2&&void 0!==te[2]?te[2]:{},h=te.length>3?te[3]:void 0,d=u.theme?ke(b[u.theme],null!==(r=u.config)&&void 0!==r?r:{}):u.config,f=dt(u.actions)?u.actions:T7({},D7,null!==(i=u.actions)&&void 0!==i?i:{}),p=C7(C7({},I7),u.i18n),g=null!==(o=u.renderer)&&void 0!==o?o:"canvas",m=null!==(a=u.logLevel)&&void 0!==a?a:M7.Warn,v=null!==(s=u.downloadFileName)&&void 0!==s?s:"visualization",y="string"==typeof t?document.querySelector(t):t){e.next=12;break}throw new Error("".concat(t," does not exist"));case 12:return!1!==u.defaultStyle&&(_="vega-embed-style",x=Y7(y),w=x.root,A=x.rootContainer,w.getElementById(_)||((k=document.createElement("style")).id=_,k.innerHTML=void 0===u.defaultStyle||!0===u.defaultStyle?k7.toString():u.defaultStyle,A.appendChild(k))),T=U7(n,u.mode),S=N7[T](n,d),"vega-lite"===T&&S.$schema&&(E=v5(S.$schema),x7(P7.vega,"^".concat(E.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(E.version,", but current version is v").concat(P7.vega,"."))),y.classList.add("vega-embed"),f&&y.classList.add("has-actions"),y.innerHTML="",C=y,f&&((M=document.createElement("div")).classList.add(F7),y.appendChild(M),C=M),(O=u.patch)&&(S=O instanceof Function?O(S):F(S,O,!0,!1).newDocument),u.formatLocale&&M7.formatLocale(u.formatLocale),u.timeFormatLocale&&M7.timeFormatLocale(u.timeFormatLocale),L=u.ast,D=M7.parse(S,"vega-lite"===T?{}:d,{ast:L}),(I=new(u.viewClass||M7.View)(D,C7({loader:h,logLevel:m,renderer:g},L?{expr:null!==(l=null!==(c=M7.expressionInterpreter)&&void 0!==c?c:u.expr)&&void 0!==l?l:gq}:{}))).addSignalListener("autosize",((e,t)=>{var n=t.type;"fit-x"==n?(C.classList.add("fit-x"),C.classList.remove("fit-y")):"fit-y"==n?(C.classList.remove("fit-x"),C.classList.add("fit-y")):"fit"==n?C.classList.add("fit-x","fit-y"):C.classList.remove("fit-x","fit-y")})),!1!==u.tooltip&&(R=B7(u.tooltip)?u.tooltip:new e4(!0===u.tooltip?{}:u.tooltip).call,I.tooltip(R)),void 0===(P=u.hover)&&(P="vega"===T),P&&(z=(N="boolean"==typeof P?{}:P).hoverSet,B=N.updateSet,I.hover(z,B)),u&&(null!=u.width&&I.width(u.width),null!=u.height&&I.height(u.height),null!=u.padding&&I.padding(u.padding)),e.next=36,I.initialize(C,u.bind).runAsync();case 36:if(!1!==f){if(U=y,!1!==u.defaultStyle&&((V=document.createElement("details")).title=p.CLICK_TO_VIEW_ACTIONS,y.append(V),U=V,(q=document.createElement("summary")).innerHTML=z7,V.append(q),j=e=>{V.contains(e.target)||V.removeAttribute("open")},document.addEventListener("click",j)),H=document.createElement("div"),U.append(H),H.classList.add("vega-actions"),!0===f||!1!==f.export)for($=function(){var e=G[W];if(!0===f||!0===f.export||f.export[e]){var t=p["".concat(e.toUpperCase(),"_ACTION")],n=document.createElement("a");n.text=t,n.href="#",n.target="_blank",n.download="".concat(v,".").concat(e),n.addEventListener("mousedown",function(){var t=r4(R4.mark((function t(n){var r;return R4.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.preventDefault(),t.next=3,I.toImageURL(e,u.scaleFactor);case 3:r=t.sent,this.href=r;case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()),H.append(n)}},W=0,G=["svg","png"];W<G.length;W++)$();!0!==f&&!1===f.source||((Y=document.createElement("a")).text=p.SOURCE_ACTION,Y.href="#",Y.addEventListener("click",(function(e){var t,r;j7(J()(n),null!==(t=u.sourceHeader)&&void 0!==t?t:"",null!==(r=u.sourceFooter)&&void 0!==r?r:"",T),e.preventDefault()})),H.append(Y)),"vega-lite"!==T||!0!==f&&!1===f.compiled||((X=document.createElement("a")).text=p.COMPILED_ACTION,X.href="#",X.addEventListener("click",(function(e){var t,n;j7(J()(S),null!==(t=u.sourceHeader)&&void 0!==t?t:"",null!==(n=u.sourceFooter)&&void 0!==n?n:"","vega"),e.preventDefault()})),H.append(X)),!0!==f&&!1===f.editor||(K=null!==(Z=u.editorUrl)&&void 0!==Z?Z:"path_to_url",(Q=document.createElement("a")).text=p.EDITOR_ACTION,Q.href="#",Q.addEventListener("click",(function(e){w7(window,K,{config:d,mode:T,renderer:g,spec:J()(n)}),e.preventDefault()})),H.append(Q))}return e.abrupt("return",{view:I,spec:n,vgSpec:S,finalize:ee,embedOptions:u});case 38:case"end":return e.stop()}}),e)}))),Z7.apply(this,arguments)}},65437:(e,t,n)=>{"use strict";var r=n(69565);function i(){}e.exports=a,i.prototype=Error.prototype,a.prototype=new i;var o=a.prototype;function a(e,t,n){var i,o,a;"string"==typeof t&&(n=t,t=null),i=function(e){var t,n=[null,null];return"string"==typeof e&&(-1===(t=e.indexOf(":"))?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1))),n}(n),o=r(t)||"1:1",a={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(a=t,t=t.start):a.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=o,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=a,this.source=i[0],this.ruleId=i[1]}o.file="",o.name="",o.reason="",o.message="",o.stack="",o.fatal=null,o.column=null,o.line=null},28814:(e,t,n)=>{"use strict";e.exports=n(22027)},74660:(e,t,n)=>{"use strict";var r=n(52550),i=n(22355),o=n(14760);e.exports=l;var a={}.hasOwnProperty,s=["history","path","basename","stem","extname","dirname"];function l(e){var t,n;if(e){if("string"==typeof e||o(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof l))return new l(e);for(this.data={},this.messages=[],this.history=[],this.cwd=i.cwd(),n=-1;++n<s.length;)t=s[n],a.call(e,t)&&(this[t]=e[t]);for(t in e)s.indexOf(t)<0&&(this[t]=e[t])}function c(e,t){if(e&&e.indexOf(r.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+r.sep+"`")}function u(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function h(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}l.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(l.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){u(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(l.prototype,"dirname",{get:function(){return"string"==typeof this.path?r.dirname(this.path):void 0},set:function(e){h(this.path,"dirname"),this.path=r.join(e||"",this.basename)}}),Object.defineProperty(l.prototype,"basename",{get:function(){return"string"==typeof this.path?r.basename(this.path):void 0},set:function(e){u(e,"basename"),c(e,"basename"),this.path=r.join(this.dirname||"",e)}}),Object.defineProperty(l.prototype,"extname",{get:function(){return"string"==typeof this.path?r.extname(this.path):void 0},set:function(e){if(c(e,"extname"),h(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=r.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(l.prototype,"stem",{get:function(){return"string"==typeof this.path?r.basename(this.path,this.extname):void 0},set:function(e){u(e,"stem"),c(e,"stem"),this.path=r.join(this.dirname||"",e+(this.extname||""))}})},22027:(e,t,n)=>{"use strict";var r=n(65437),i=n(74660);e.exports=i,i.prototype.message=function(e,t,n){var i=new r(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i},i.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},i.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},52550:(e,t)=>{"use strict";function n(e){var t,n;return r(e),t=47===e.charCodeAt(0),n=function(e,t){for(var n,r,i="",o=0,a=-1,s=0,l=-1;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=l,s=0;continue}}else if(i.length){i="",o=0,a=l,s=0;continue}t&&(i=i.length?i+"/..":"..",o=2)}else i.length?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t),n.length||t||(n="."),n.length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function r(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,i,o,a,s=0,l=-1;if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');if(r(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(o){s=n+1;break}}else l<0&&(o=!0,l=n+1);return l<0?"":e.slice(s,l)}if(t===e)return"";for(i=-1,a=t.length-1;n--;)if(47===e.charCodeAt(n)){if(o){s=n+1;break}}else i<0&&(o=!0,i=n+1),a>-1&&(e.charCodeAt(n)===t.charCodeAt(a--)?a<0&&(l=n):(a=-1,l=i));return s===l?l=i:l<0&&(l=e.length),e.slice(s,l)},t.dirname=function(e){var t,n,i;if(r(e),!e.length)return".";for(t=-1,i=e.length;--i;)if(47===e.charCodeAt(i)){if(n){t=i;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,i,o=-1,a=0,s=-1,l=0;for(r(e),i=e.length;i--;)if(47!==(n=e.charCodeAt(i)))s<0&&(t=!0,s=i+1),46===n?o<0?o=i:1!==l&&(l=1):o>-1&&(l=-1);else if(t){a=i+1;break}return o<0||s<0||0===l||1===l&&o===s-1&&o===a+1?"":e.slice(o,s)},t.join=function(){for(var e,t=-1;++t<arguments.length;)r(arguments[t]),arguments[t]&&(e=void 0===e?arguments[t]:e+"/"+arguments[t]);return void 0===e?".":n(e)},t.sep="/"},22355:(e,t)=>{"use strict";t.cwd=function(){return"/"}},54588:e=>{"use strict";e.exports=function(){}},55219:e=>{e.exports={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}}},60595:(e,t,n)=>{var r=n(20844),i=n(8598),o=n(99914),a=n(97058);e.exports={xml2js:r,xml2json:i,js2xml:o,json2xml:a}},99914:(e,t,n)=>{var r,i,o=n(74647),a=n(55219).isArray;function s(e,t,n){return(!n&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function l(e,t,n){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,i,r));var o,a,l,c,u=[];for(o in e)e.hasOwnProperty(o)&&null!==e[o]&&void 0!==e[o]&&(c=t.noQuotesForNativeAttributes&&"string"!=typeof e[o]?"":'"',a=(a=""+e[o]).replace(/"/g,"&quot;"),l="attributeNameFn"in t?t.attributeNameFn(o,a,i,r):o,u.push(t.spaces&&t.indentAttributes?s(t,n+1,!1):" "),u.push(l+"="+c+("attributeValueFn"in t?t.attributeValueFn(a,o,i,r):a)+c));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&u.push(s(t,n,!1)),u.join("")}function c(e,t,n){return r=e,i="xml",t.ignoreDeclaration?"":"<?xml"+l(e[t.attributesKey],t,n)+"?>"}function u(e,t,n){if(t.ignoreInstruction)return"";var o;for(o in e)if(e.hasOwnProperty(o))break;var a="instructionNameFn"in t?t.instructionNameFn(o,e[o],i,r):o;if("object"==typeof e[o])return r=e,i=a,"<?"+a+l(e[o][t.attributesKey],t,n)+"?>";var s=e[o]?e[o]:"";return"instructionFn"in t&&(s=t.instructionFn(s,o,i,r)),"<?"+a+(s?" "+s:"")+"?>"}function h(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,i,r):e)+"--\x3e"}function d(e,t){return t.ignoreCdata?"":"<![CDATA["+("cdataFn"in t?t.cdataFn(e,i,r):e.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function f(e,t){return t.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in t?t.doctypeFn(e,i,r):e)+">"}function p(e,t){return t.ignoreText?"":(e=(e=(e=""+e).replace(/&amp;/g,"&")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in t?t.textFn(e,i,r):e)}function g(e,t,n,o){return e.reduce((function(e,a){var c=s(t,n,o&&!e);switch(a.type){case"element":return e+c+function(e,t,n){r=e,i=e.name;var o=[],a="elementNameFn"in t?t.elementNameFn(e.name,e):e.name;o.push("<"+a),e[t.attributesKey]&&o.push(l(e[t.attributesKey],t,n));var s=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&"preserve"===e[t.attributesKey]["xml:space"];return s||(s="fullTagEmptyElementFn"in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement),s?(o.push(">"),e[t.elementsKey]&&e[t.elementsKey].length&&(o.push(g(e[t.elementsKey],t,n+1)),r=e,i=e.name),o.push(t.spaces&&function(e,t){var n;if(e.elements&&e.elements.length)for(n=0;n<e.elements.length;++n)switch(e.elements[n][t.typeKey]){case"text":if(t.indentText)return!0;break;case"cdata":if(t.indentCdata)return!0;break;case"instruction":if(t.indentInstruction)return!0;break;default:return!0}return!1}(e,t)?"\n"+Array(n+1).join(t.spaces):""),o.push("</"+a+">")):o.push("/>"),o.join("")}(a,t,n);case"comment":return e+c+h(a[t.commentKey],t);case"doctype":return e+c+f(a[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?c:"")+d(a[t.cdataKey],t);case"text":return e+(t.indentText?c:"")+p(a[t.textKey],t);case"instruction":var m={};return m[a[t.nameKey]]=a[t.attributesKey]?a:a[t.instructionKey],e+(t.indentInstruction?c:"")+u(m,t,n)}}),"")}function m(e,t,n){var r;for(r in e)if(e.hasOwnProperty(r))switch(r){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||n)return!0;break;case t.cdataKey:if(t.indentCdata||n)return!0;break;case t.instructionKey:if(t.indentInstruction||n)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function v(e,t,n,o,a){r=e,i=t;var c="elementNameFn"in n?n.elementNameFn(t,e):t;if(null==e||""===e)return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(t,e)||n.fullTagEmptyElement?"<"+c+"></"+c+">":"<"+c+"/>";var u=[];if(t){if(u.push("<"+c),"object"!=typeof e)return u.push(">"+p(e,n)+"</"+c+">"),u.join("");e[n.attributesKey]&&u.push(l(e[n.attributesKey],n,o));var h=m(e,n,!0)||e[n.attributesKey]&&"preserve"===e[n.attributesKey]["xml:space"];if(h||(h="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(t,e):n.fullTagEmptyElement),!h)return u.push("/>"),u.join("");u.push(">")}return u.push(y(e,n,o+1,!1)),r=e,i=t,t&&u.push((a?s(n,o,!1):"")+"</"+c+">"),u.join("")}function y(e,t,n,r){var i,o,l,g=[];for(o in e)if(e.hasOwnProperty(o))for(l=a(e[o])?e[o]:[e[o]],i=0;i<l.length;++i){switch(o){case t.declarationKey:g.push(c(l[i],t,n));break;case t.instructionKey:g.push((t.indentInstruction?s(t,n,r):"")+u(l[i],t,n));break;case t.attributesKey:case t.parentKey:break;case t.textKey:g.push((t.indentText?s(t,n,r):"")+p(l[i],t));break;case t.cdataKey:g.push((t.indentCdata?s(t,n,r):"")+d(l[i],t));break;case t.doctypeKey:g.push(s(t,n,r)+f(l[i],t));break;case t.commentKey:g.push(s(t,n,r)+h(l[i],t));break;default:g.push(s(t,n,r)+v(l[i],o,t,n,m(l[i],t)))}r=r&&!g.length}return g.join("")}e.exports=function(e,t){t=function(e){var t=o.copyOptions(e);return o.ensureFlagExists("ignoreDeclaration",t),o.ensureFlagExists("ignoreInstruction",t),o.ensureFlagExists("ignoreAttributes",t),o.ensureFlagExists("ignoreText",t),o.ensureFlagExists("ignoreComment",t),o.ensureFlagExists("ignoreCdata",t),o.ensureFlagExists("ignoreDoctype",t),o.ensureFlagExists("compact",t),o.ensureFlagExists("indentText",t),o.ensureFlagExists("indentCdata",t),o.ensureFlagExists("indentAttributes",t),o.ensureFlagExists("indentInstruction",t),o.ensureFlagExists("fullTagEmptyElement",t),o.ensureFlagExists("noQuotesForNativeAttributes",t),o.ensureSpacesExists(t),"number"==typeof t.spaces&&(t.spaces=Array(t.spaces+1).join(" ")),o.ensureKeyExists("declaration",t),o.ensureKeyExists("instruction",t),o.ensureKeyExists("attributes",t),o.ensureKeyExists("text",t),o.ensureKeyExists("comment",t),o.ensureKeyExists("cdata",t),o.ensureKeyExists("doctype",t),o.ensureKeyExists("type",t),o.ensureKeyExists("name",t),o.ensureKeyExists("elements",t),o.checkFnExists("doctype",t),o.checkFnExists("instruction",t),o.checkFnExists("cdata",t),o.checkFnExists("comment",t),o.checkFnExists("text",t),o.checkFnExists("instructionName",t),o.checkFnExists("elementName",t),o.checkFnExists("attributeName",t),o.checkFnExists("attributeValue",t),o.checkFnExists("attributes",t),o.checkFnExists("fullTagEmptyElement",t),t}(t);var n=[];return r=e,i="_root_",t.compact?n.push(y(e,t,0,!0)):(e[t.declarationKey]&&n.push(c(e[t.declarationKey],t,0)),e[t.elementsKey]&&e[t.elementsKey].length&&n.push(g(e[t.elementsKey],t,0,!n.length))),n.join("")}},97058:(e,t,n)=>{var r=n(99914);e.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var n=null;if("string"==typeof e)try{n=JSON.parse(e)}catch(e){throw new Error("The JSON structure is invalid")}else n=e;return r(n,t)}},74647:(e,t,n)=>{var r=n(55219).isArray;e.exports={copyOptions:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||r(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}},20844:(e,t,n)=>{var r,i,o=n(89670),a=n(74647),s=n(55219).isArray;function l(e){var t=Number(e);if(!isNaN(t))return t;var n=e.toLowerCase();return"true"===n||"false"!==n&&e}function c(e,t){var n;if(r.compact){if(!i[r[e+"Key"]]&&(s(r.alwaysArray)?-1!==r.alwaysArray.indexOf(r[e+"Key"]):r.alwaysArray)&&(i[r[e+"Key"]]=[]),i[r[e+"Key"]]&&!s(i[r[e+"Key"]])&&(i[r[e+"Key"]]=[i[r[e+"Key"]]]),e+"Fn"in r&&"string"==typeof t&&(t=r[e+"Fn"](t,i)),"instruction"===e&&("instructionFn"in r||"instructionNameFn"in r))for(n in t)if(t.hasOwnProperty(n))if("instructionFn"in r)t[n]=r.instructionFn(t[n],n,i);else{var o=t[n];delete t[n],t[r.instructionNameFn(n,o,i)]=o}s(i[r[e+"Key"]])?i[r[e+"Key"]].push(t):i[r[e+"Key"]]=t}else{i[r.elementsKey]||(i[r.elementsKey]=[]);var a={};if(a[r.typeKey]=e,"instruction"===e){for(n in t)if(t.hasOwnProperty(n))break;a[r.nameKey]="instructionNameFn"in r?r.instructionNameFn(n,t,i):n,r.instructionHasAttributes?(a[r.attributesKey]=t[n][r.attributesKey],"instructionFn"in r&&(a[r.attributesKey]=r.instructionFn(a[r.attributesKey],n,i))):("instructionFn"in r&&(t[n]=r.instructionFn(t[n],n,i)),a[r.instructionKey]=t[n])}else e+"Fn"in r&&(t=r[e+"Fn"](t,i)),a[r[e+"Key"]]=t;r.addParent&&(a[r.parentKey]=i),i[r.elementsKey].push(a)}}function u(e){var t;if("attributesFn"in r&&e&&(e=r.attributesFn(e,i)),(r.trim||"attributeValueFn"in r||"attributeNameFn"in r||r.nativeTypeAttributes)&&e)for(t in e)if(e.hasOwnProperty(t)&&(r.trim&&(e[t]=e[t].trim()),r.nativeTypeAttributes&&(e[t]=l(e[t])),"attributeValueFn"in r&&(e[t]=r.attributeValueFn(e[t],t,i)),"attributeNameFn"in r)){var n=e[t];delete e[t],e[r.attributeNameFn(t,e[t],i)]=n}return e}function h(e){var t={};if(e.body&&("xml"===e.name.toLowerCase()||r.instructionHasAttributes)){for(var n,o=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(n=o.exec(e.body));)t[n[1]]=n[2]||n[3]||n[4];t=u(t)}if("xml"===e.name.toLowerCase()){if(r.ignoreDeclaration)return;i[r.declarationKey]={},Object.keys(t).length&&(i[r.declarationKey][r.attributesKey]=t),r.addParent&&(i[r.declarationKey][r.parentKey]=i)}else{if(r.ignoreInstruction)return;r.trim&&(e.body=e.body.trim());var a={};r.instructionHasAttributes&&Object.keys(t).length?(a[e.name]={},a[e.name][r.attributesKey]=t):a[e.name]=e.body,c("instruction",a)}}function d(e,t){var n;if("object"==typeof e&&(t=e.attributes,e=e.name),t=u(t),"elementNameFn"in r&&(e=r.elementNameFn(e,i)),r.compact){var o;if(n={},!r.ignoreAttributes&&t&&Object.keys(t).length)for(o in n[r.attributesKey]={},t)t.hasOwnProperty(o)&&(n[r.attributesKey][o]=t[o]);!(e in i)&&(s(r.alwaysArray)?-1!==r.alwaysArray.indexOf(e):r.alwaysArray)&&(i[e]=[]),i[e]&&!s(i[e])&&(i[e]=[i[e]]),s(i[e])?i[e].push(n):i[e]=n}else i[r.elementsKey]||(i[r.elementsKey]=[]),(n={})[r.typeKey]="element",n[r.nameKey]=e,!r.ignoreAttributes&&t&&Object.keys(t).length&&(n[r.attributesKey]=t),r.alwaysChildren&&(n[r.elementsKey]=[]),i[r.elementsKey].push(n);n[r.parentKey]=i,i=n}function f(e){r.ignoreText||(e.trim()||r.captureSpacesBetweenElements)&&(r.trim&&(e=e.trim()),r.nativeType&&(e=l(e)),r.sanitize&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),c("text",e))}function p(e){r.ignoreComment||(r.trim&&(e=e.trim()),c("comment",e))}function g(e){var t=i[r.parentKey];r.addParent||delete i[r.parentKey],i=t}function m(e){r.ignoreCdata||(r.trim&&(e=e.trim()),c("cdata",e))}function v(e){r.ignoreDoctype||(e=e.replace(/^ /,""),r.trim&&(e=e.trim()),c("doctype",e))}function y(e){e.note=e}e.exports=function(e,t){var n=o.parser(!0,{}),s={};if(i=s,r=function(e){return r=a.copyOptions(e),a.ensureFlagExists("ignoreDeclaration",r),a.ensureFlagExists("ignoreInstruction",r),a.ensureFlagExists("ignoreAttributes",r),a.ensureFlagExists("ignoreText",r),a.ensureFlagExists("ignoreComment",r),a.ensureFlagExists("ignoreCdata",r),a.ensureFlagExists("ignoreDoctype",r),a.ensureFlagExists("compact",r),a.ensureFlagExists("alwaysChildren",r),a.ensureFlagExists("addParent",r),a.ensureFlagExists("trim",r),a.ensureFlagExists("nativeType",r),a.ensureFlagExists("nativeTypeAttributes",r),a.ensureFlagExists("sanitize",r),a.ensureFlagExists("instructionHasAttributes",r),a.ensureFlagExists("captureSpacesBetweenElements",r),a.ensureAlwaysArrayExists(r),a.ensureKeyExists("declaration",r),a.ensureKeyExists("instruction",r),a.ensureKeyExists("attributes",r),a.ensureKeyExists("text",r),a.ensureKeyExists("comment",r),a.ensureKeyExists("cdata",r),a.ensureKeyExists("doctype",r),a.ensureKeyExists("type",r),a.ensureKeyExists("name",r),a.ensureKeyExists("elements",r),a.ensureKeyExists("parent",r),a.checkFnExists("doctype",r),a.checkFnExists("instruction",r),a.checkFnExists("cdata",r),a.checkFnExists("comment",r),a.checkFnExists("text",r),a.checkFnExists("instructionName",r),a.checkFnExists("elementName",r),a.checkFnExists("attributeName",r),a.checkFnExists("attributeValue",r),a.checkFnExists("attributes",r),r}(t),n.opt={strictEntities:!0},n.onopentag=d,n.ontext=f,n.oncomment=p,n.onclosetag=g,n.onerror=y,n.oncdata=m,n.ondoctype=v,n.onprocessinginstruction=h,n.write(e).close(),s[r.elementsKey]){var l=s[r.elementsKey];delete s[r.elementsKey],s[r.elementsKey]=l,delete s.text}return s}},8598:(e,t,n)=>{var r=n(74647),i=n(20844);e.exports=function(e,t){var n,o,a;return n=function(e){var t=r.copyOptions(e);return r.ensureSpacesExists(t),t}(t),o=i(e,n),a="compact"in n&&n.compact?"_parent":"parent",("addParent"in n&&n.addParent?JSON.stringify(o,(function(e,t){return e===a?"_":t}),n.spaces):JSON.stringify(o,null,n.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},754:e=>{e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},16779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="/*\n * File: iframeResizer.contentWindow.js\n * Desc: Include this file in any page being loaded into an iframe\n * to force the iframe to resize to the content size.\n * Requires: iframeResizer.js on host page.\n * Doc: path_to_url * Author: David J. Bradshaw - dave@bradshaw.net\n *\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var autoResize = true,\n base = 10,\n bodyBackground = '',\n bodyMargin = 0,\n bodyMarginStr = '',\n bodyObserver = null,\n bodyPadding = '',\n calculateWidth = false,\n doubleEventList = { resize: 1, click: 1 },\n eventCancelTimer = 128,\n firstRun = true,\n height = 1,\n heightCalcModeDefault = 'bodyOffset',\n heightCalcMode = heightCalcModeDefault,\n initLock = true,\n initMsg = '',\n inPageLinks = {},\n interval = 32,\n intervalTimer = null,\n logging = false,\n mouseEvents = false,\n msgID = '[iFrameSizer]', // Must match host page msg ID\n msgIdLen = msgID.length,\n myID = '',\n resetRequiredMethods = {\n max: 1,\n min: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n },\n resizeFrom = 'child',\n sendPermit = true,\n target = window.parent,\n targetOriginDefault = '*',\n tolerance = 0,\n triggerLocked = false,\n triggerLockedTimer = null,\n throttledTimer = 16,\n width = 1,\n widthCalcModeDefault = 'scroll',\n widthCalcMode = widthCalcModeDefault,\n win = window,\n onMessage = function () {\n warn('onMessage function not defined')\n },\n onReady = function () {},\n onPageInfo = function () {},\n customCalcMethods = {\n height: function () {\n warn('Custom height calculation function not defined')\n return document.documentElement.offsetHeight\n },\n width: function () {\n warn('Custom width calculation function not defined')\n return document.body.scrollWidth\n }\n },\n eventHandlersByName = {},\n passiveSupported = false\n\n function noop() {}\n\n try {\n var options = Object.create(\n {},\n {\n passive: {\n get: function () {\n passiveSupported = true\n }\n }\n }\n )\n window.addEventListener('test', noop, options)\n window.removeEventListener('test', noop, options)\n } catch (error) {\n /* */\n }\n\n function addEventListener(el, evt, func, options) {\n el.addEventListener(evt, func, passiveSupported ? options || {} : false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1)\n }\n\n // Based on underscore.js\n function throttle(func) {\n var context,\n args,\n result,\n timeout = null,\n previous = 0,\n later = function () {\n previous = Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n }\n\n return function () {\n var now = Date.now()\n\n if (!previous) {\n previous = now\n }\n\n var remaining = throttledTimer - (now - previous)\n\n context = this\n args = arguments\n\n if (remaining <= 0 || remaining > throttledTimer) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n\n previous = now\n result = func.apply(context, args)\n\n if (!timeout) {\n // eslint-disable-next-line no-multi-assign\n context = args = null\n }\n } else if (!timeout) {\n timeout = setTimeout(later, remaining)\n }\n\n return result\n }\n }\n\n function formatLogMsg(msg) {\n return msgID + '[' + myID + '] ' + msg\n }\n\n function log(msg) {\n if (logging && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.log(formatLogMsg(msg))\n }\n }\n\n function warn(msg) {\n if ('object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console.warn(formatLogMsg(msg))\n }\n }\n\n function init() {\n readDataFromParent()\n log('Initialising iFrame (' + window.location.href + ')')\n readDataFromPage()\n setMargin()\n setBodyStyle('background', bodyBackground)\n setBodyStyle('padding', bodyPadding)\n injectClearFixIntoBodyElement()\n checkHeightMode()\n checkWidthMode()\n stopInfiniteResizingOfIFrame()\n setupPublicMethods()\n setupMouseEvents()\n startEventListeners()\n inPageLinks = setupInPageLinks()\n sendSize('init', 'Init message from host page')\n onReady()\n }\n\n function readDataFromParent() {\n function strBool(str) {\n return 'true' === str\n }\n\n var data = initMsg.substr(msgIdLen).split(':')\n\n myID = data[0]\n bodyMargin = undefined !== data[1] ? Number(data[1]) : bodyMargin // For V1 compatibility\n calculateWidth = undefined !== data[2] ? strBool(data[2]) : calculateWidth\n logging = undefined !== data[3] ? strBool(data[3]) : logging\n interval = undefined !== data[4] ? Number(data[4]) : interval\n autoResize = undefined !== data[6] ? strBool(data[6]) : autoResize\n bodyMarginStr = data[7]\n heightCalcMode = undefined !== data[8] ? data[8] : heightCalcMode\n bodyBackground = data[9]\n bodyPadding = data[10]\n tolerance = undefined !== data[11] ? Number(data[11]) : tolerance\n inPageLinks.enable = undefined !== data[12] ? strBool(data[12]) : false\n resizeFrom = undefined !== data[13] ? data[13] : resizeFrom\n widthCalcMode = undefined !== data[14] ? data[14] : widthCalcMode\n mouseEvents = undefined !== data[15] ? Boolean(data[15]) : mouseEvents\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function readDataFromPage() {\n function readData() {\n var data = window.iFrameResizer\n\n log('Reading data from page: ' + JSON.stringify(data))\n Object.keys(data).forEach(depricate, data)\n\n onMessage = 'onMessage' in data ? data.onMessage : onMessage\n onReady = 'onReady' in data ? data.onReady : onReady\n targetOriginDefault =\n 'targetOrigin' in data ? data.targetOrigin : targetOriginDefault\n heightCalcMode =\n 'heightCalculationMethod' in data\n ? data.heightCalculationMethod\n : heightCalcMode\n widthCalcMode =\n 'widthCalculationMethod' in data\n ? data.widthCalculationMethod\n : widthCalcMode\n }\n\n function setupCustomCalcMethods(calcMode, calcFunc) {\n if ('function' === typeof calcMode) {\n log('Setup custom ' + calcFunc + 'CalcMethod')\n customCalcMethods[calcFunc] = calcMode\n calcMode = 'custom'\n }\n\n return calcMode\n }\n\n if (\n 'iFrameResizer' in window &&\n Object === window.iFrameResizer.constructor\n ) {\n readData()\n heightCalcMode = setupCustomCalcMethods(heightCalcMode, 'height')\n widthCalcMode = setupCustomCalcMethods(widthCalcMode, 'width')\n }\n\n log('TargetOrigin for parent set to: ' + targetOriginDefault)\n }\n\n function chkCSS(attr, value) {\n if (-1 !== value.indexOf('-')) {\n warn('Negative CSS value ignored for ' + attr)\n value = ''\n }\n return value\n }\n\n function setBodyStyle(attr, value) {\n if (undefined !== value && '' !== value && 'null' !== value) {\n document.body.style[attr] = value\n log('Body ' + attr + ' set to \"' + value + '\"')\n }\n }\n\n function setMargin() {\n // If called via V1 script, convert bodyMargin from int to str\n if (undefined === bodyMarginStr) {\n bodyMarginStr = bodyMargin + 'px'\n }\n\n setBodyStyle('margin', chkCSS('margin', bodyMarginStr))\n }\n\n function stopInfiniteResizingOfIFrame() {\n document.documentElement.style.height = ''\n document.body.style.height = ''\n log('HTML & body height set to \"auto\"')\n }\n\n function manageTriggerEvent(options) {\n var listener = {\n add: function (eventName) {\n function handleEvent() {\n sendSize(options.eventName, options.eventType)\n }\n\n eventHandlersByName[eventName] = handleEvent\n\n addEventListener(window, eventName, handleEvent, { passive: true })\n },\n remove: function (eventName) {\n var handleEvent = eventHandlersByName[eventName]\n delete eventHandlersByName[eventName]\n\n removeEventListener(window, eventName, handleEvent)\n }\n }\n\n if (options.eventNames && Array.prototype.map) {\n options.eventName = options.eventNames[0]\n options.eventNames.map(listener[options.method])\n } else {\n listener[options.method](options.eventName)\n }\n\n log(\n capitalizeFirstLetter(options.method) +\n ' event listener: ' +\n options.eventType\n )\n }\n\n function manageEventListeners(method) {\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Start',\n eventNames: ['animationstart', 'webkitAnimationStart']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation Iteration',\n eventNames: ['animationiteration', 'webkitAnimationIteration']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Animation End',\n eventNames: ['animationend', 'webkitAnimationEnd']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Input',\n eventName: 'input'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Up',\n eventName: 'mouseup'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Mouse Down',\n eventName: 'mousedown'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Orientation Change',\n eventName: 'orientationchange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Print',\n eventName: ['afterprint', 'beforeprint']\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Ready State Change',\n eventName: 'readystatechange'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Start',\n eventName: 'touchstart'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch End',\n eventName: 'touchend'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Touch Cancel',\n eventName: 'touchcancel'\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Start',\n eventNames: [\n 'transitionstart',\n 'webkitTransitionStart',\n 'MSTransitionStart',\n 'oTransitionStart',\n 'otransitionstart'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition Iteration',\n eventNames: [\n 'transitioniteration',\n 'webkitTransitionIteration',\n 'MSTransitionIteration',\n 'oTransitionIteration',\n 'otransitioniteration'\n ]\n })\n manageTriggerEvent({\n method: method,\n eventType: 'Transition End',\n eventNames: [\n 'transitionend',\n 'webkitTransitionEnd',\n 'MSTransitionEnd',\n 'oTransitionEnd',\n 'otransitionend'\n ]\n })\n if ('child' === resizeFrom) {\n manageTriggerEvent({\n method: method,\n eventType: 'IFrame Resized',\n eventName: 'resize'\n })\n }\n }\n\n function checkCalcMode(calcMode, calcModeDefault, modes, type) {\n if (calcModeDefault !== calcMode) {\n if (!(calcMode in modes)) {\n warn(\n calcMode + ' is not a valid option for ' + type + 'CalculationMethod.'\n )\n calcMode = calcModeDefault\n }\n log(type + ' calculation method set to \"' + calcMode + '\"')\n }\n\n return calcMode\n }\n\n function checkHeightMode() {\n heightCalcMode = checkCalcMode(\n heightCalcMode,\n heightCalcModeDefault,\n getHeight,\n 'height'\n )\n }\n\n function checkWidthMode() {\n widthCalcMode = checkCalcMode(\n widthCalcMode,\n widthCalcModeDefault,\n getWidth,\n 'width'\n )\n }\n\n function startEventListeners() {\n if (true === autoResize) {\n manageEventListeners('add')\n setupMutationObserver()\n } else {\n log('Auto Resize disabled')\n }\n }\n\n // function stopMsgsToParent() {\n // log('Disable outgoing messages')\n // sendPermit = false\n // }\n\n // function removeMsgListener() {\n // log('Remove event listener: Message')\n // removeEventListener(window, 'message', receiver)\n // }\n\n function disconnectMutationObserver() {\n if (null !== bodyObserver) {\n /* istanbul ignore next */ // Not testable in PhantonJS\n bodyObserver.disconnect()\n }\n }\n\n function stopEventListeners() {\n manageEventListeners('remove')\n disconnectMutationObserver()\n clearInterval(intervalTimer)\n }\n\n // function teardown() {\n // stopMsgsToParent()\n // removeMsgListener()\n // if (true === autoResize) stopEventListeners()\n // }\n\n function injectClearFixIntoBodyElement() {\n var clearFix = document.createElement('div')\n clearFix.style.clear = 'both'\n // Guard against the following having been globally redefined in CSS.\n clearFix.style.display = 'block'\n clearFix.style.height = '0'\n document.body.appendChild(clearFix)\n }\n\n function setupInPageLinks() {\n function getPagePosition() {\n return {\n x:\n window.pageXOffset !== undefined\n ? window.pageXOffset\n : document.documentElement.scrollLeft,\n y:\n window.pageYOffset !== undefined\n ? window.pageYOffset\n : document.documentElement.scrollTop\n }\n }\n\n function getElementPosition(el) {\n var elPosition = el.getBoundingClientRect(),\n pagePosition = getPagePosition()\n\n return {\n x: parseInt(elPosition.left, 10) + parseInt(pagePosition.x, 10),\n y: parseInt(elPosition.top, 10) + parseInt(pagePosition.y, 10)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget(target) {\n var jumpPosition = getElementPosition(target)\n\n log(\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n sendMsg(jumpPosition.y, jumpPosition.x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n }\n\n var hash = location.split('#')[1] || location, // Remove # if present\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (undefined !== target) {\n jumpToTarget(target)\n } else {\n log(\n 'In page link (#' +\n hash +\n ') not found in iFrame, so sending to parent'\n )\n sendMsg(0, 0, 'inPageLink', '#' + hash)\n }\n }\n\n function checkLocationHash() {\n var hash = window.location.hash\n var href = window.location.href\n\n if ('' !== hash && '#' !== hash) {\n findTarget(href)\n }\n }\n\n function bindAnchors() {\n function setupLink(el) {\n function linkClicked(e) {\n e.preventDefault()\n\n /* jshint validthis:true */\n findTarget(this.getAttribute('href'))\n }\n\n if ('#' !== el.getAttribute('href')) {\n addEventListener(el, 'click', linkClicked)\n }\n }\n\n Array.prototype.forEach.call(\n document.querySelectorAll('a[href^=\"#\"]'),\n setupLink\n )\n }\n\n function bindLocationHash() {\n addEventListener(window, 'hashchange', checkLocationHash)\n }\n\n function initCheck() {\n // Check if page loaded with location hash after init resize\n setTimeout(checkLocationHash, eventCancelTimer)\n }\n\n function enableInPageLinks() {\n /* istanbul ignore else */ // Not testable in phantonJS\n if (Array.prototype.forEach && document.querySelectorAll) {\n log('Setting up location.hash handlers')\n bindAnchors()\n bindLocationHash()\n initCheck()\n } else {\n warn(\n 'In page linking not fully supported in this browser! (See README.md for IE8 workaround)'\n )\n }\n }\n\n if (inPageLinks.enable) {\n enableInPageLinks()\n } else {\n log('In page linking not enabled')\n }\n\n return {\n findTarget: findTarget\n }\n }\n\n function setupMouseEvents() {\n if (mouseEvents !== true) return\n\n function sendMouse(e) {\n sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX)\n }\n\n function addMouseListener(evt, name) {\n log('Add event listener: ' + name)\n addEventListener(window.document, evt, sendMouse)\n }\n\n addMouseListener('mouseenter', 'Mouse Enter')\n addMouseListener('mouseleave', 'Mouse Leave')\n }\n\n function setupPublicMethods() {\n log('Enable public methods')\n\n win.parentIFrame = {\n autoResize: function autoResizeF(resize) {\n if (true === resize && false === autoResize) {\n autoResize = true\n startEventListeners()\n } else if (false === resize && true === autoResize) {\n autoResize = false\n stopEventListeners()\n }\n sendMsg(0, 0, 'autoResize', JSON.stringify(autoResize))\n return autoResize\n },\n\n close: function closeF() {\n sendMsg(0, 0, 'close')\n // teardown()\n },\n\n getId: function getIdF() {\n return myID\n },\n\n getPageInfo: function getPageInfoF(callback) {\n if ('function' === typeof callback) {\n onPageInfo = callback\n sendMsg(0, 0, 'pageInfo')\n } else {\n onPageInfo = function () {}\n sendMsg(0, 0, 'pageInfoStop')\n }\n },\n\n moveToAnchor: function moveToAnchorF(hash) {\n inPageLinks.findTarget(hash)\n },\n\n reset: function resetF() {\n resetIFrame('parentIFrame.reset')\n },\n\n scrollTo: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollTo') // X&Y reversed at sendMsg uses height/width\n },\n\n scrollToOffset: function scrollToF(x, y) {\n sendMsg(y, x, 'scrollToOffset') // X&Y reversed at sendMsg uses height/width\n },\n\n sendMessage: function sendMessageF(msg, targetOrigin) {\n sendMsg(0, 0, 'message', JSON.stringify(msg), targetOrigin)\n },\n\n setHeightCalculationMethod: function setHeightCalculationMethodF(\n heightCalculationMethod\n ) {\n heightCalcMode = heightCalculationMethod\n checkHeightMode()\n },\n\n setWidthCalculationMethod: function setWidthCalculationMethodF(\n widthCalculationMethod\n ) {\n widthCalcMode = widthCalculationMethod\n checkWidthMode()\n },\n\n setTargetOrigin: function setTargetOriginF(targetOrigin) {\n log('Set targetOrigin: ' + targetOrigin)\n targetOriginDefault = targetOrigin\n },\n\n size: function sizeF(customHeight, customWidth) {\n var valString =\n '' + (customHeight || '') + (customWidth ? ',' + customWidth : '')\n sendSize(\n 'size',\n 'parentIFrame.size(' + valString + ')',\n customHeight,\n customWidth\n )\n }\n }\n }\n\n function initInterval() {\n if (0 !== interval) {\n log('setInterval: ' + interval + 'ms')\n intervalTimer = setInterval(function () {\n sendSize('interval', 'setInterval: ' + interval)\n }, Math.abs(interval))\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function setupBodyMutationObserver() {\n function addImageLoadListners(mutation) {\n function addImageLoadListener(element) {\n if (false === element.complete) {\n log('Attach listeners to ' + element.src)\n element.addEventListener('load', imageLoaded, false)\n element.addEventListener('error', imageError, false)\n elements.push(element)\n }\n }\n\n if (mutation.type === 'attributes' && mutation.attributeName === 'src') {\n addImageLoadListener(mutation.target)\n } else if (mutation.type === 'childList') {\n Array.prototype.forEach.call(\n mutation.target.querySelectorAll('img'),\n addImageLoadListener\n )\n }\n }\n\n function removeFromArray(element) {\n elements.splice(elements.indexOf(element), 1)\n }\n\n function removeImageLoadListener(element) {\n log('Remove listeners from ' + element.src)\n element.removeEventListener('load', imageLoaded, false)\n element.removeEventListener('error', imageError, false)\n removeFromArray(element)\n }\n\n function imageEventTriggered(event, type, typeDesc) {\n removeImageLoadListener(event.target)\n sendSize(type, typeDesc + ': ' + event.target.src)\n }\n\n function imageLoaded(event) {\n imageEventTriggered(event, 'imageLoad', 'Image loaded')\n }\n\n function imageError(event) {\n imageEventTriggered(event, 'imageLoadFailed', 'Image load failed')\n }\n\n function mutationObserved(mutations) {\n sendSize(\n 'mutationObserver',\n 'mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type\n )\n\n // Deal with WebKit / Blink asyncing image loading when tags are injected into the page\n mutations.forEach(addImageLoadListners)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n }\n\n observer = new MutationObserver(mutationObserved)\n\n log('Create body MutationObserver')\n observer.observe(target, config)\n\n return observer\n }\n\n var elements = [],\n MutationObserver =\n window.MutationObserver || window.WebKitMutationObserver,\n observer = createMutationObserver()\n\n return {\n disconnect: function () {\n if ('disconnect' in observer) {\n log('Disconnect body MutationObserver')\n observer.disconnect()\n elements.forEach(removeImageLoadListener)\n }\n }\n }\n }\n\n function setupMutationObserver() {\n var forceIntervalTimer = 0 > interval\n\n // Not testable in PhantomJS\n /* istanbul ignore if */ if (\n window.MutationObserver ||\n window.WebKitMutationObserver\n ) {\n if (forceIntervalTimer) {\n initInterval()\n } else {\n bodyObserver = setupBodyMutationObserver()\n }\n } else {\n log('MutationObserver not supported in this browser!')\n initInterval()\n }\n }\n\n // document.documentElement.offsetHeight is not reliable, so\n // we have to jump through hoops to get a better value.\n function getComputedStyle(prop, el) {\n var retVal = 0\n el = el || document.body // Not testable in phantonJS\n\n retVal = document.defaultView.getComputedStyle(el, null)\n retVal = null !== retVal ? retVal[prop] : 0\n\n return parseInt(retVal, base)\n }\n\n function chkEventThottle(timer) {\n if (timer > throttledTimer / 2) {\n throttledTimer = 2 * timer\n log('Event throttle increased to ' + throttledTimer + 'ms')\n }\n }\n\n // Idea from path_to_url function getMaxElement(side, elements) {\n var elementsLength = elements.length,\n elVal = 0,\n maxVal = 0,\n Side = capitalizeFirstLetter(side),\n timer = Date.now()\n\n for (var i = 0; i < elementsLength; i++) {\n elVal =\n elements[i].getBoundingClientRect()[side] +\n getComputedStyle('margin' + Side, elements[i])\n if (elVal > maxVal) {\n maxVal = elVal\n }\n }\n\n timer = Date.now() - timer\n\n log('Parsed ' + elementsLength + ' HTML elements')\n log('Element position calculated in ' + timer + 'ms')\n\n chkEventThottle(timer)\n\n return maxVal\n }\n\n function getAllMeasurements(dimensions) {\n return [\n dimensions.bodyOffset(),\n dimensions.bodyScroll(),\n dimensions.documentElementOffset(),\n dimensions.documentElementScroll()\n ]\n }\n\n function getTaggedElements(side, tag) {\n function noTaggedElementsFound() {\n warn('No tagged elements (' + tag + ') found on page')\n return document.querySelectorAll('body *')\n }\n\n var elements = document.querySelectorAll('[' + tag + ']')\n\n if (elements.length === 0) noTaggedElementsFound()\n\n return getMaxElement(side, elements)\n }\n\n function getAllElements() {\n return document.querySelectorAll('body *')\n }\n\n var getHeight = {\n bodyOffset: function getBodyOffsetHeight() {\n return (\n document.body.offsetHeight +\n getComputedStyle('marginTop') +\n getComputedStyle('marginBottom')\n )\n },\n\n offset: function () {\n return getHeight.bodyOffset() // Backwards compatability\n },\n\n bodyScroll: function getBodyScrollHeight() {\n return document.body.scrollHeight\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.height()\n },\n\n documentElementOffset: function getDEOffsetHeight() {\n return document.documentElement.offsetHeight\n },\n\n documentElementScroll: function getDEScrollHeight() {\n return document.documentElement.scrollHeight\n },\n\n max: function getMaxHeight() {\n return Math.max.apply(null, getAllMeasurements(getHeight))\n },\n\n min: function getMinHeight() {\n return Math.min.apply(null, getAllMeasurements(getHeight))\n },\n\n grow: function growHeight() {\n return getHeight.max() // Run max without the forced downsizing\n },\n\n lowestElement: function getBestHeight() {\n return Math.max(\n getHeight.bodyOffset() || getHeight.documentElementOffset(),\n getMaxElement('bottom', getAllElements())\n )\n },\n\n taggedElement: function getTaggedElementsHeight() {\n return getTaggedElements('bottom', 'data-iframe-height')\n }\n },\n getWidth = {\n bodyScroll: function getBodyScrollWidth() {\n return document.body.scrollWidth\n },\n\n bodyOffset: function getBodyOffsetWidth() {\n return document.body.offsetWidth\n },\n\n custom: function getCustomWidth() {\n return customCalcMethods.width()\n },\n\n documentElementScroll: function getDEScrollWidth() {\n return document.documentElement.scrollWidth\n },\n\n documentElementOffset: function getDEOffsetWidth() {\n return document.documentElement.offsetWidth\n },\n\n scroll: function getMaxWidth() {\n return Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll())\n },\n\n max: function getMaxWidth() {\n return Math.max.apply(null, getAllMeasurements(getWidth))\n },\n\n min: function getMinWidth() {\n return Math.min.apply(null, getAllMeasurements(getWidth))\n },\n\n rightMostElement: function rightMostElement() {\n return getMaxElement('right', getAllElements())\n },\n\n taggedElement: function getTaggedElementsWidth() {\n return getTaggedElements('right', 'data-iframe-width')\n }\n }\n\n function sizeIFrame(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n ) {\n function resizeIFrame() {\n height = currentHeight\n width = currentWidth\n\n sendMsg(height, width, triggerEvent)\n }\n\n function isSizeChangeDetected() {\n function checkTolarance(a, b) {\n var retVal = Math.abs(a - b) <= tolerance\n return !retVal\n }\n\n currentHeight =\n undefined !== customHeight ? customHeight : getHeight[heightCalcMode]()\n currentWidth =\n undefined !== customWidth ? customWidth : getWidth[widthCalcMode]()\n\n return (\n checkTolarance(height, currentHeight) ||\n (calculateWidth && checkTolarance(width, currentWidth))\n )\n }\n\n function isForceResizableEvent() {\n return !(triggerEvent in { init: 1, interval: 1, size: 1 })\n }\n\n function isForceResizableCalcMode() {\n return (\n heightCalcMode in resetRequiredMethods ||\n (calculateWidth && widthCalcMode in resetRequiredMethods)\n )\n }\n\n function logIgnored() {\n log('No change in size detected')\n }\n\n function checkDownSizing() {\n if (isForceResizableEvent() && isForceResizableCalcMode()) {\n resetIFrame(triggerEventDesc)\n } else if (!(triggerEvent in { interval: 1 })) {\n logIgnored()\n }\n }\n\n var currentHeight, currentWidth\n\n if (isSizeChangeDetected() || 'init' === triggerEvent) {\n lockTrigger()\n resizeIFrame()\n } else {\n checkDownSizing()\n }\n }\n\n var sizeIFrameThrottled = throttle(sizeIFrame)\n\n function sendSize(triggerEvent, triggerEventDesc, customHeight, customWidth) {\n function recordTrigger() {\n if (!(triggerEvent in { reset: 1, resetPage: 1, init: 1 })) {\n log('Trigger event: ' + triggerEventDesc)\n }\n }\n\n function isDoubleFiredEvent() {\n return triggerLocked && triggerEvent in doubleEventList\n }\n\n if (!isDoubleFiredEvent()) {\n recordTrigger()\n if (triggerEvent === 'init') {\n sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth)\n } else {\n sizeIFrameThrottled(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth\n )\n }\n } else {\n log('Trigger event cancelled: ' + triggerEvent)\n }\n }\n\n function lockTrigger() {\n if (!triggerLocked) {\n triggerLocked = true\n log('Trigger event lock on')\n }\n clearTimeout(triggerLockedTimer)\n triggerLockedTimer = setTimeout(function () {\n triggerLocked = false\n log('Trigger event lock off')\n log('--')\n }, eventCancelTimer)\n }\n\n function triggerReset(triggerEvent) {\n height = getHeight[heightCalcMode]()\n width = getWidth[widthCalcMode]()\n\n sendMsg(height, width, triggerEvent)\n }\n\n function resetIFrame(triggerEventDesc) {\n var hcm = heightCalcMode\n heightCalcMode = heightCalcModeDefault\n\n log('Reset trigger event: ' + triggerEventDesc)\n lockTrigger()\n triggerReset('reset')\n\n heightCalcMode = hcm\n }\n\n function sendMsg(height, width, triggerEvent, msg, targetOrigin) {\n function setTargetOrigin() {\n if (undefined === targetOrigin) {\n targetOrigin = targetOriginDefault\n } else {\n log('Message targetOrigin: ' + targetOrigin)\n }\n }\n\n function sendToParent() {\n var size = height + ':' + width,\n message =\n myID +\n ':' +\n size +\n ':' +\n triggerEvent +\n (undefined !== msg ? ':' + msg : '')\n\n log('Sending message to host page (' + message + ')')\n target.postMessage(msgID + message, targetOrigin)\n }\n\n if (true === sendPermit) {\n setTargetOrigin()\n sendToParent()\n }\n }\n\n function receiver(event) {\n var processRequestFromParent = {\n init: function initFromParent() {\n initMsg = event.data\n target = event.source\n\n init()\n firstRun = false\n setTimeout(function () {\n initLock = false\n }, eventCancelTimer)\n },\n\n reset: function resetFromParent() {\n if (!initLock) {\n log('Page size reset by host page')\n triggerReset('resetPage')\n } else {\n log('Page reset ignored by init')\n }\n },\n\n resize: function resizeFromParent() {\n sendSize('resizeParent', 'Parent window requested size check')\n },\n\n moveToAnchor: function moveToAnchorF() {\n inPageLinks.findTarget(getData())\n },\n inPageLink: function inPageLinkF() {\n this.moveToAnchor()\n }, // Backward compatability\n\n pageInfo: function pageInfoFromParent() {\n var msgBody = getData()\n log('PageInfoFromParent called from parent: ' + msgBody)\n onPageInfo(JSON.parse(msgBody))\n log(' --')\n },\n\n message: function messageFromParent() {\n var msgBody = getData()\n\n log('onMessage called from parent: ' + msgBody)\n // eslint-disable-next-line sonarjs/no-extra-arguments\n onMessage(JSON.parse(msgBody))\n log(' --')\n }\n }\n\n function isMessageForUs() {\n return msgID === ('' + event.data).substr(0, msgIdLen) // ''+ Protects against non-string messages\n }\n\n function getMessageType() {\n return event.data.split(']')[1].split(':')[0]\n }\n\n function getData() {\n return event.data.substr(event.data.indexOf(':') + 1)\n }\n\n function isMiddleTier() {\n return (\n (!(typeof module !== 'undefined' && module.exports) &&\n 'iFrameResize' in window) ||\n ('jQuery' in window && 'iFrameResize' in window.jQuery.prototype)\n )\n }\n\n function isInitMsg() {\n // Test if this message is from a child below us. This is an ugly test, however, updating\n // the message format would break backwards compatibity.\n return event.data.split(':')[2] in { true: 1, false: 1 }\n }\n\n function callFromParent() {\n var messageType = getMessageType()\n\n if (messageType in processRequestFromParent) {\n processRequestFromParent[messageType]()\n } else if (!isMiddleTier() && !isInitMsg()) {\n warn('Unexpected message (' + event.data + ')')\n }\n }\n\n function processMessage() {\n if (false === firstRun) {\n callFromParent()\n } else if (isInitMsg()) {\n processRequestFromParent.init()\n } else {\n log(\n 'Ignored message of type \"' +\n getMessageType() +\n '\". Received before initialization.'\n )\n }\n }\n\n if (isMessageForUs()) {\n processMessage()\n }\n }\n\n // Normally the parent kicks things off when it detects the iFrame has loaded.\n // If this script is async-loaded, then tell parent page to retry init.\n function chkLateLoaded() {\n if ('loading' !== document.readyState) {\n window.parent.postMessage('[iFrameResizerChild]Ready', '*')\n }\n }\n\n addEventListener(window, 'message', receiver)\n addEventListener(window, 'readystatechange', chkLateLoaded)\n chkLateLoaded()\n\n \n})()\n"},19226:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="/**\n * Taken from path_to_url#L147\n */\n\ntable {\n min-width: 100%;\n border-collapse: collapse;\n table-layout: auto;\n text-align: center;\n}\n\nthead {\n color: rgb(17, 24, 39); /* gray-900 */\n font-weight: 600;\n border-bottom: 1px solid rgb(209, 213, 219); /* gray-300 */\n}\n\nthead th {\n vertical-align: bottom;\n}\n\ntr {\n text-align: center !important;\n}\n\ntbody tr {\n border-bottom: 1px solid rgb(229, 231, 235); /* gray-200 */\n}\n\ntbody tr:last-child {\n border-bottom: 0;\n}\n\ntbody td {\n vertical-align: top;\n padding: 0.5rem 1.5rem;\n}\n"},71671:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="body {\n font-family: Inter var, system-ui, -apple-system, BlinkMacSystemFont,\n Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,\n Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;\n}\n\n.doc-root {\n overflow-x: auto;\n width: 100%;\n}\n"},69862:()=>{},40964:()=>{},64918:(e,t,n)=>{"use strict";t.iA_=t.ga8=t.DyG=t.Gcn=void 0;var r=n(46859);Object.defineProperty(t,"Gcn",{enumerable:!0,get:function(){return r.Precision}});n(56528);var i=n(70171);Object.defineProperty(t,"DyG",{enumerable:!0,get:function(){return i.Type}});n(76076);var o=n(40068);Object.defineProperty(t,"ga8",{enumerable:!0,get:function(){return o.DataType}});var a=n(10766);Object.defineProperty(t,"iA_",{enumerable:!0,get:function(){return a.Table}});n(75507),n(17903),n(89),n(30033),n(33986),n(40351),n(60786),n(890),n(13138),n(71005),n(42727),n(16741);const s=n(87698),l=n(3398),c=n(77192),u=n(70121),h=n(56616),d=n(41955);n(66626);const f=n(16480);Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s),l),c),u),h),d),{compareSchemas:f.compareSchemas,compareFields:f.compareFields,compareTypes:f.compareTypes});n(63620)},34285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariableWidthBuilder=t.FixedWidthBuilder=t.Builder=void 0;const r=n(28001),i=n(60119),o=n(70171),a=n(76076),s=n(65695),l=n(39949),c=n(40068);class u{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=c.strideForType(e),this._nulls=new l.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=s.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return function(e){const{queueingStrategy:t="count"}=e,{highWaterMark:n=("bytes"!==t?1e3:Math.pow(2,14))}=e,r="bytes"!==t?"length":"byteLength";return function*(t){let i=0;const o=u.new(e);for(const e of t)o.append(e)[r]>=n&&++i&&(yield o.toVector());(o.finish().length>0||0===i)&&(yield o.toVector())}}(e)}static throughAsyncIterable(e){return function(e){const{queueingStrategy:t="count"}=e,{highWaterMark:n=("bytes"!==t?1e3:Math.pow(2,14))}=e,i="bytes"!==t?"length":"byteLength";return function(t){return r.__asyncGenerator(this,arguments,(function*(){var o,a;let s=0;const l=u.new(e);try{for(var c,h=r.__asyncValues(t);!(c=yield r.__await(h.next())).done;){const e=c.value;l.append(e)[i]>=n&&++s&&(yield yield r.__await(l.toVector()))}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=h.return)&&(yield r.__await(a.call(h)))}finally{if(o)throw o.error}}(l.finish().length>0||0===s)&&(yield yield r.__await(l.toVector()))}))}}(e)}toVector(){return i.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce(((e,t)=>e+t.byteLength),e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce(((e,t)=>e+t.reservedByteLength),e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){const e=[],t=this._values,n=this._offsets,r=this._typeIds,{length:i,nullCount:s}=this;r?(e[o.BufferType.TYPE]=r.flush(i),n&&(e[o.BufferType.OFFSET]=n.flush(i))):n?(t&&(e[o.BufferType.DATA]=t.flush(n.last())),e[o.BufferType.OFFSET]=n.flush(i)):t&&(e[o.BufferType.DATA]=t.flush(i)),s>0&&(e[o.BufferType.VALIDITY]=this._nulls.flush(i));const l=a.Data.new(this.type,0,i,s,e,this.children.map((e=>e.flush())));return this.clear(),l}finish(){return this.finished=!0,this.children.forEach((e=>e.finish())),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach((e=>e.clear())),this}}t.Builder=u,u.prototype.length=1,u.prototype.stride=1,u.prototype.children=null,u.prototype.finished=!1,u.prototype.nullValues=null,u.prototype._isValid=()=>!0,t.FixedWidthBuilder=class extends u{constructor(e){super(e),this._values=new l.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){const n=this._values;return n.reserve(e-n.length+1),super.setValue(e,t)}},t.VariableWidthBuilder=class extends u{constructor(e){super(e),this._pendingLength=0,this._offsets=new l.OffsetsBufferBuilder}setValue(e,t){const n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.length),this._pendingLength+=t.length,n.set(e,t)}setValid(e,t){return!!super.setValid(e,t)||((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){const e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}}},97666:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryBuilder=void 0;const r=n(56616),i=n(39949),o=n(34285);class a extends o.VariableWidthBuilder{constructor(e){super(e),this._values=new i.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,r.toUint8Array(t))}_flushPending(e,t){const n=this._offsets,r=this._values.reserve(t).buffer;let i,o=0,a=0,s=0;for([o,i]of e)void 0===i?n.set(o,0):(a=i.length,r.set(i,s),n.set(o,a),s+=a)}}t.BinaryBuilder=a},98025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoolBuilder=void 0;const r=n(39949),i=n(34285);class o extends i.Builder{constructor(e){super(e),this._values=new r.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}}t.BoolBuilder=o},39949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WideBufferBuilder=t.OffsetsBufferBuilder=t.BitmapBufferBuilder=t.DataBufferBuilder=t.BufferBuilder=void 0;const r=n(56616),i=n(5992),o=(e,t)=>(e*t+63&-64||64)/t;class a{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;const t=this.stride,n=this.length*t,r=this.buffer.length;n>=r&&this._resize(o(0===r?1*n:2*n,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=o(e*this.stride,this.BYTES_PER_ELEMENT);const t=((e,t=0)=>e.length>=t?e.subarray(0,t):r.memcpy(new e.constructor(t),e,0))(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=r.memcpy(new this.ArrayType(e),this.buffer)}}t.BufferBuilder=a,a.prototype.offset=0;class s extends a{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}}t.DataBufferBuilder=s,t.BitmapBufferBuilder=class extends s{constructor(e=new Uint8Array(0)){super(e,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){const{buffer:n}=this.reserve(e-this.length+1),r=e>>3,i=e%8,o=n[r]>>i&1;return t?0===o&&(n[r]|=1<<i,++this.numValid):1===o&&(n[r]&=~(1<<i),--this.numValid),this}clear(){return this.numValid=0,super.clear()}},t.OffsetsBufferBuilder=class extends s{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){const n=this.length-1,r=this.reserve(e-n+1).buffer;return n<e++&&r.fill(r[n],n,e),r[e]=r[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}},t.WideBufferBuilder=class extends a{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?i.BigInt64Array:i.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){const t=super._resize(e),n=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return i.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,n)),t}}},86708:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.DateBuilder=i,t.DateDayBuilder=class extends i{},t.DateMillisecondBuilder=class extends i{}},64637:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.DecimalBuilder=i},29936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DictionaryBuilder=void 0;const r=n(40068),i=n(34285);class o extends i.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:n}){super({type:new r.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=i.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=i.Builder.new({type:this.type.dictionary,nullValues:null}),"function"==typeof n&&(this.valueToKey=n)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){const n=this.indices;return t=n.setValid(e,t),this.length=n.length,t}setValue(e,t){const n=this._keysToIndices,r=this.valueToKey(t);let i=n[r];return void 0===i&&(n[r]=i=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,i)}flush(){const e=this.type,t=this._dictionary,n=this.dictionary.toVector(),r=this.indices.flush().clone(e);return r.dictionary=t?t.concat(n):n,this.finished||(this._dictionaryOffset+=n.length),this._dictionary=r.dictionary,this.clear(),r}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return"string"==typeof e?e:`${e}`}}t.DictionaryBuilder=o},24086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeBinaryBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.FixedSizeBinaryBuilder=i},54720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeListBuilder=void 0;const r=n(34229),i=n(89),o=n(34285),a=n(40068);class s extends o.Builder{constructor(){super(...arguments),this._run=new r.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");const n=this.children.push(e);return this.type=new a.FixedSizeList(this.type.listSize,new i.Field(t,e.type,!0)),n}clear(){return this._run.clear(),super.clear()}}t.FixedSizeListBuilder=s},15814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=void 0;const r=n(70121),i=n(34285);class o extends i.FixedWidthBuilder{}t.FloatBuilder=o,t.Float16Builder=class extends o{setValue(e,t){this._values.set(e,r.float64ToUint16(t))}},t.Float32Builder=class extends o{setValue(e,t){this._values.set(e,t)}},t.Float64Builder=class extends o{setValue(e,t){this._values.set(e,t)}}},33986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenseUnionBuilder=t.SparseUnionBuilder=t.UnionBuilder=t.StructBuilder=t.MapBuilder=t.FixedSizeListBuilder=t.ListBuilder=t.BinaryBuilder=t.Utf8Builder=t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=t.Float64Builder=t.Float32Builder=t.Float16Builder=t.FloatBuilder=t.FixedSizeBinaryBuilder=t.DictionaryBuilder=t.DecimalBuilder=t.DateMillisecondBuilder=t.DateDayBuilder=t.DateBuilder=t.NullBuilder=t.BoolBuilder=t.Builder=void 0;var r=n(34285);Object.defineProperty(t,"Builder",{enumerable:!0,get:function(){return r.Builder}});var i=n(98025);Object.defineProperty(t,"BoolBuilder",{enumerable:!0,get:function(){return i.BoolBuilder}});var o=n(32907);Object.defineProperty(t,"NullBuilder",{enumerable:!0,get:function(){return o.NullBuilder}});var a=n(86708);Object.defineProperty(t,"DateBuilder",{enumerable:!0,get:function(){return a.DateBuilder}}),Object.defineProperty(t,"DateDayBuilder",{enumerable:!0,get:function(){return a.DateDayBuilder}}),Object.defineProperty(t,"DateMillisecondBuilder",{enumerable:!0,get:function(){return a.DateMillisecondBuilder}});var s=n(64637);Object.defineProperty(t,"DecimalBuilder",{enumerable:!0,get:function(){return s.DecimalBuilder}});var l=n(29936);Object.defineProperty(t,"DictionaryBuilder",{enumerable:!0,get:function(){return l.DictionaryBuilder}});var c=n(24086);Object.defineProperty(t,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return c.FixedSizeBinaryBuilder}});var u=n(15814);Object.defineProperty(t,"FloatBuilder",{enumerable:!0,get:function(){return u.FloatBuilder}}),Object.defineProperty(t,"Float16Builder",{enumerable:!0,get:function(){return u.Float16Builder}}),Object.defineProperty(t,"Float32Builder",{enumerable:!0,get:function(){return u.Float32Builder}}),Object.defineProperty(t,"Float64Builder",{enumerable:!0,get:function(){return u.Float64Builder}});var h=n(60719);Object.defineProperty(t,"IntBuilder",{enumerable:!0,get:function(){return h.IntBuilder}}),Object.defineProperty(t,"Int8Builder",{enumerable:!0,get:function(){return h.Int8Builder}}),Object.defineProperty(t,"Int16Builder",{enumerable:!0,get:function(){return h.Int16Builder}}),Object.defineProperty(t,"Int32Builder",{enumerable:!0,get:function(){return h.Int32Builder}}),Object.defineProperty(t,"Int64Builder",{enumerable:!0,get:function(){return h.Int64Builder}}),Object.defineProperty(t,"Uint8Builder",{enumerable:!0,get:function(){return h.Uint8Builder}}),Object.defineProperty(t,"Uint16Builder",{enumerable:!0,get:function(){return h.Uint16Builder}}),Object.defineProperty(t,"Uint32Builder",{enumerable:!0,get:function(){return h.Uint32Builder}}),Object.defineProperty(t,"Uint64Builder",{enumerable:!0,get:function(){return h.Uint64Builder}});var d=n(12888);Object.defineProperty(t,"TimeBuilder",{enumerable:!0,get:function(){return d.TimeBuilder}}),Object.defineProperty(t,"TimeSecondBuilder",{enumerable:!0,get:function(){return d.TimeSecondBuilder}}),Object.defineProperty(t,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return d.TimeMillisecondBuilder}}),Object.defineProperty(t,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return d.TimeMicrosecondBuilder}}),Object.defineProperty(t,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return d.TimeNanosecondBuilder}});var f=n(71709);Object.defineProperty(t,"TimestampBuilder",{enumerable:!0,get:function(){return f.TimestampBuilder}}),Object.defineProperty(t,"TimestampSecondBuilder",{enumerable:!0,get:function(){return f.TimestampSecondBuilder}}),Object.defineProperty(t,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return f.TimestampMillisecondBuilder}}),Object.defineProperty(t,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return f.TimestampMicrosecondBuilder}}),Object.defineProperty(t,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return f.TimestampNanosecondBuilder}});var p=n(14040);Object.defineProperty(t,"IntervalBuilder",{enumerable:!0,get:function(){return p.IntervalBuilder}}),Object.defineProperty(t,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return p.IntervalDayTimeBuilder}}),Object.defineProperty(t,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return p.IntervalYearMonthBuilder}});var g=n(58413);Object.defineProperty(t,"Utf8Builder",{enumerable:!0,get:function(){return g.Utf8Builder}});var m=n(97666);Object.defineProperty(t,"BinaryBuilder",{enumerable:!0,get:function(){return m.BinaryBuilder}});var v=n(37481);Object.defineProperty(t,"ListBuilder",{enumerable:!0,get:function(){return v.ListBuilder}});var y=n(54720);Object.defineProperty(t,"FixedSizeListBuilder",{enumerable:!0,get:function(){return y.FixedSizeListBuilder}});var b=n(9506);Object.defineProperty(t,"MapBuilder",{enumerable:!0,get:function(){return b.MapBuilder}});var _=n(9117);Object.defineProperty(t,"StructBuilder",{enumerable:!0,get:function(){return _.StructBuilder}});var x=n(49322);Object.defineProperty(t,"UnionBuilder",{enumerable:!0,get:function(){return x.UnionBuilder}}),Object.defineProperty(t,"SparseUnionBuilder",{enumerable:!0,get:function(){return x.SparseUnionBuilder}}),Object.defineProperty(t,"DenseUnionBuilder",{enumerable:!0,get:function(){return x.DenseUnionBuilder}});const w=n(70171),A=n(58413),k=n(34285),T=n(12149),S=n(20283);k.Builder.new=function e(t){const n=t.type,r=new(S.instance.getVisitFn(n)())(t);if(n.children&&n.children.length>0){const i=t.children||[],o={nullValues:t.nullValues},a=Array.isArray(i)?(e,t)=>i[t]||o:({name:e})=>i[e]||o;n.children.forEach(((t,n)=>{const{type:i}=t,o=a(t,n);r.children.push(e(Object.assign(Object.assign({},o),{type:i})))}))}return r},Object.keys(w.Type).map((e=>w.Type[e])).filter((e=>"number"==typeof e&&e!==w.Type.NONE)).forEach((e=>{S.instance.visit(e).prototype._setValue=T.instance.getVisitFn(e)})),A.Utf8Builder.prototype._setValue=T.instance.visitBinary},60719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64Builder=t.Uint32Builder=t.Uint16Builder=t.Uint8Builder=t.Int64Builder=t.Int32Builder=t.Int16Builder=t.Int8Builder=t.IntBuilder=void 0;const r=n(87698),i=n(39949),o=n(5992),a=n(34285);class s extends a.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}}t.IntBuilder=s,t.Int8Builder=class extends s{},t.Int16Builder=class extends s{},t.Int32Builder=class extends s{},t.Int64Builder=class extends s{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(l)),super(e),this._values=new i.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(l(e))}},t.Uint8Builder=class extends s{},t.Uint16Builder=class extends s{},t.Uint32Builder=class extends s{},t.Uint64Builder=class extends s{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(l)),super(e),this._values=new i.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(l(e))}};const l=(c={BigIntArray:o.BigInt64Array},e=>(ArrayBuffer.isView(e)&&(c.buffer=e.buffer,c.byteOffset=e.byteOffset,c.byteLength=e.byteLength,e=r.bignumToBigInt(c),c.buffer=null),e));var c},14040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalYearMonthBuilder=t.IntervalDayTimeBuilder=t.IntervalBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.IntervalBuilder=i,t.IntervalDayTimeBuilder=class extends i{},t.IntervalYearMonthBuilder=class extends i{}},37481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBuilder=void 0;const r=n(34229),i=n(89),o=n(40068),a=n(39949),s=n(34285);class l extends s.VariableWidthBuilder{constructor(e){super(e),this._run=new r.Run,this._offsets=new a.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new o.List(new i.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){const t=this._run,n=this._offsets,r=this._setValue;let i,o=0;for([o,i]of e)void 0===i?n.set(o,0):(n.set(o,i.length),r(this,o,t.bind(i)))}}t.ListBuilder=l},9506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MapBuilder=void 0;const r=n(89),i=n(40068),o=n(34285);class a extends o.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));const n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.size),this._pendingLength+=t.size,n.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new i.Map_(new r.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){const t=this._offsets,n=this._setValue;e.forEach(((e,r)=>{void 0===e?t.set(r,0):(t.set(r,e.size),n(this,r,e))}))}}t.MapBuilder=a},32907:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullBuilder=void 0;const r=n(34285);class i extends r.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}}t.NullBuilder=i},34229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Run=void 0;const r=n(60119);t.Run=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof r.Vector?e:(this._values=e,this)}}},9117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructBuilder=void 0;const r=n(89),i=n(34285),o=n(40068);class a extends i.Builder{addChild(e,t=`${this.numChildren}`){const n=this.children.push(e);return this.type=new o.Struct([...this.type.children,new r.Field(t,e.type,!0)]),n}}t.StructBuilder=a},12888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeNanosecondBuilder=t.TimeMicrosecondBuilder=t.TimeMillisecondBuilder=t.TimeSecondBuilder=t.TimeBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.TimeBuilder=i,t.TimeSecondBuilder=class extends i{},t.TimeMillisecondBuilder=class extends i{},t.TimeMicrosecondBuilder=class extends i{},t.TimeNanosecondBuilder=class extends i{}},71709:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampNanosecondBuilder=t.TimestampMicrosecondBuilder=t.TimestampMillisecondBuilder=t.TimestampSecondBuilder=t.TimestampBuilder=void 0;const r=n(34285);class i extends r.FixedWidthBuilder{}t.TimestampBuilder=i,t.TimestampSecondBuilder=class extends i{},t.TimestampMillisecondBuilder=class extends i{},t.TimestampMicrosecondBuilder=class extends i{},t.TimestampNanosecondBuilder=class extends i{}},49322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenseUnionBuilder=t.SparseUnionBuilder=t.UnionBuilder=void 0;const r=n(89),i=n(39949),o=n(34285),a=n(40068);class s extends o.Builder{constructor(e){super(e),this._typeIds=new i.DataBufferBuilder(new Int8Array(0),1),"function"==typeof e.valueToChildTypeId&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,n){return void 0===n&&(n=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,n),this}setValue(e,t,n){this._typeIds.set(e,n),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){const n=this.children.push(e),{type:{children:i,mode:o,typeIds:s}}=this,l=[...i,new r.Field(t,e.type)];return this.type=new a.Union(o,[...s,n],l),n}_valueToChildTypeId(e,t,n){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}}t.UnionBuilder=s,t.SparseUnionBuilder=class extends s{},t.DenseUnionBuilder=class extends s{constructor(e){super(e),this._offsets=new i.DataBufferBuilder(new Int32Array(0))}setValue(e,t,n){const r=this.type.typeIdToChildIndex[n];return this._offsets.set(e,this.getChildAt(r).length),super.setValue(e,t,n)}}},58413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8Builder=void 0;const r=n(75426),i=n(97666),o=n(39949),a=n(34285);class s extends a.VariableWidthBuilder{constructor(e){super(e),this._values=new o.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,r.encodeUtf8(t))}_flushPending(e,t){}}t.Utf8Builder=s,s.prototype._flushPending=i.BinaryBuilder.prototype._flushPending},65695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIsValidFunction=void 0;const r=n(85808),i=n(5992);t.createIsValidFunction=function(e){if(!e||e.length<=0)return function(e){return!0};let t="";const n=e.filter((e=>e==e));return n.length>0&&(t=`\n switch (x) {${n.map((e=>`\n case ${function(e){return"bigint"!=typeof e?r.valueToString(e):i.BigIntAvailable?`${r.valueToString(e)}n`:`"${r.valueToString(e)}"`}(e)}:`)).join("")}\n return false;\n }`),e.length!==n.length&&(t=`if (x !== x) return false;\n${t}`),new Function("x",`${t}\nreturn true;`)}},75507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Column=void 0;const r=n(89),i=n(60119),o=n(94717);class a extends o.Chunked{constructor(e,t=[],n){if(t=o.Chunked.flatten(...t),super(e.type,t,n),this._field=e,1===t.length&&!(this instanceof s))return new s(e,t[0],this._chunkOffsets)}static new(...e){let[t,n,...s]=e;"string"==typeof t||t instanceof r.Field||(n=t,t="");const l=o.Chunked.flatten(Array.isArray(n)?[...n,...s]:n instanceof i.Vector?[n,...s]:[i.Vector.new(n,...s)]);if("string"==typeof t){const e=l[0].data.type;t=new r.Field(t,e,!0)}else!t.nullable&&l.some((({nullCount:e})=>e>0))&&(t=t.clone({nullable:!0}));return new a(t,l)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new a(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;const t=this._children||(this._children=[]);let n,r,i;return(n=t[e])?n:(r=(this.type.children||[])[e])&&(i=this._chunks.map((t=>t.getChildAt(e))).filter((e=>null!=e)),i.length>0)?t[e]=new a(r,i):null}}t.Column=a;class s extends a{constructor(e,t,n){super(e,[t],n),this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}},16741:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilteredDataFrame=t.CountByResult=t.DataFrame=void 0;const r=n(10766),i=n(18053),o=n(89),a=n(66626),s=n(42727),l=n(40068);class c extends r.Table{filter(e){return new d(this.chunks,e)}scan(e,t){const n=this.chunks,r=n.length;for(let i=-1;++i<r;){const r=n[i];t&&t(r);for(let t=-1,n=r.length;++t<n;)e(t,r)}}scanReverse(e,t){const n=this.chunks;for(let r=n.length;--r>=0;){const i=n[r];t&&t(i);for(let t=i.length;--t>=0;)e(t,i)}}countBy(e){const t=this.chunks,n=t.length,r="string"==typeof e?new a.Col(e):e;r.bind(t[n-1]);const o=r.vector;if(!l.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");const s=Math.ceil(Math.log(o.length)/Math.log(256)),c=new(4==s?Uint32Array:s>=2?Uint16Array:Uint8Array)(o.dictionary.length);for(let e=-1;++e<n;){const n=t[e];r.bind(n);const i=r.vector.indices;for(let e=-1,t=n.length;++e<t;){const t=i.get(e);null!==t&&c[t]++}}return new u(o.dictionary,i.IntVector.from(c))}}t.DataFrame=c;class u extends r.Table{constructor(e,t){const n=new o.Schema([new o.Field("values",e.type),new o.Field("counts",t.type)]);super(new s.RecordBatch(n,t.length,[e,t]))}toJSON(){const e=this.getColumnAt(0),t=this.getColumnAt(1),n={};for(let r=-1;++r<this.length;)n[e.get(r)]=t.get(r);return n}}t.CountByResult=u;class h{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}}class d extends c{constructor(e,t){super(e),this._predicate=t}scan(e,t){const n=this._chunks,r=n.length;for(let i=-1;++i<r;){const r=n[i],o=this._predicate.bind(r);let a=!1;for(let n=-1,i=r.length;++n<i;)o(n,r)&&(t&&!a&&(t(r),a=!0),e(n,r))}}scanReverse(e,t){const n=this._chunks;for(let r=n.length;--r>=0;){const i=n[r],o=this._predicate.bind(i);let a=!1;for(let n=i.length;--n>=0;)o(n,i)&&(t&&!a&&(t(i),a=!0),e(n,i))}}count(){let e=0;const t=this._chunks,n=t.length;for(let r=-1;++r<n;){const n=t[r],i=this._predicate.bind(n);for(let t=-1,r=n.length;++t<r;)i(t,n)&&++e}return e}[Symbol.iterator](){return new h(this._chunks,this._predicate)}filter(e){return new d(this._chunks,this._predicate.and(e))}countBy(e){const t=this._chunks,n=t.length,r="string"==typeof e?new a.Col(e):e;r.bind(t[n-1]);const o=r.vector;if(!l.DataType.isDictionary(o.type))throw new Error("countBy currently only supports dictionary-encoded columns");const s=Math.ceil(Math.log(o.length)/Math.log(256)),c=new(4==s?Uint32Array:s>=2?Uint16Array:Uint8Array)(o.dictionary.length);for(let e=-1;++e<n;){const n=t[e],i=this._predicate.bind(n);r.bind(n);const o=r.vector.indices;for(let e=-1,t=n.length;++e<t;){const t=o.get(e);null!==t&&i(e,n)&&c[t]++}}return new u(o.dictionary,i.IntVector.from(c))}}t.FilteredDataFrame=d},66626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.custom=t.or=t.and=t.col=t.lit=t.CustomPredicate=t.Not=t.GTeq=t.LTeq=t.Equals=t.Or=t.And=t.CombinationPredicate=t.ComparisonPredicate=t.Predicate=t.Col=t.Literal=t.Value=void 0;const r=n(73250);class i{eq(e){return e instanceof i||(e=new o(e)),new d(this,e)}le(e){return e instanceof i||(e=new o(e)),new f(this,e)}ge(e){return e instanceof i||(e=new o(e)),new p(this,e)}lt(e){return new g(this.ge(e))}gt(e){return new g(this.le(e))}ne(e){return new g(this.eq(e))}}t.Value=i;class o extends i{constructor(e){super(),this.v=e}}t.Literal=o;class a extends i{constructor(e){super(),this.name=e}bind(e){if(!this.colidx){this.colidx=-1;const t=e.schema.fields;for(let e=-1;++e<t.length;)if(t[e].name===this.name){this.colidx=e;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}const t=this.vector=e.getChildAt(this.colidx);return e=>t.get(e)}}t.Col=a;class s{and(...e){return new u(this,...e)}or(...e){return new h(this,...e)}not(){return new g(this)}}t.Predicate=s;class l extends s{constructor(e,t){super(),this.left=e,this.right=t}bind(e){return this.left instanceof o?this.right instanceof o?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof o?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}}t.ComparisonPredicate=l;class c extends s{constructor(...e){super(),this.children=e}}t.CombinationPredicate=c,c.prototype.children=Object.freeze([]);class u extends c{constructor(...e){e=e.reduce(((e,t)=>e.concat(t instanceof u?t.children:t)),[]),super(...e)}bind(e){const t=this.children.map((t=>t.bind(e)));return(e,n)=>t.every((t=>t(e,n)))}}t.And=u;class h extends c{constructor(...e){e=e.reduce(((e,t)=>e.concat(t instanceof h?t.children:t)),[]),super(...e)}bind(e){const t=this.children.map((t=>t.bind(e)));return(e,n)=>t.some((t=>t(e,n)))}}t.Or=h;class d extends l{_bindLitLit(e,t,n){const r=t.v==n.v;return()=>r}_bindColCol(e,t,n){const r=t.bind(e),i=n.bind(e);return(e,t)=>r(e,t)==i(e,t)}_bindColLit(e,t,n){const i=t.bind(e);if(t.vector instanceof r.DictionaryVector){let e;const r=t.vector;return r.dictionary!==this.lastDictionary?(e=r.reverseLookup(n.v),this.lastDictionary=r.dictionary,this.lastKey=e):e=this.lastKey,-1===e?()=>!1:t=>r.getKey(t)===e}return(e,t)=>i(e,t)==n.v}_bindLitCol(e,t,n){return this._bindColLit(e,n,t)}}t.Equals=d;class f extends l{_bindLitLit(e,t,n){const r=t.v<=n.v;return()=>r}_bindColCol(e,t,n){const r=t.bind(e),i=n.bind(e);return(e,t)=>r(e,t)<=i(e,t)}_bindColLit(e,t,n){const r=t.bind(e);return(e,t)=>r(e,t)<=n.v}_bindLitCol(e,t,n){const r=n.bind(e);return(e,n)=>t.v<=r(e,n)}}t.LTeq=f;class p extends l{_bindLitLit(e,t,n){const r=t.v>=n.v;return()=>r}_bindColCol(e,t,n){const r=t.bind(e),i=n.bind(e);return(e,t)=>r(e,t)>=i(e,t)}_bindColLit(e,t,n){const r=t.bind(e);return(e,t)=>r(e,t)>=n.v}_bindLitCol(e,t,n){const r=n.bind(e);return(e,n)=>t.v>=r(e,n)}}t.GTeq=p;class g extends s{constructor(e){super(),this.child=e}bind(e){const t=this.child.bind(e);return(e,n)=>!t(e,n)}}t.Not=g;class m extends s{constructor(e,t){super(),this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}}t.CustomPredicate=m,t.lit=function(e){return new o(e)},t.col=function(e){return new a(e)},t.and=function(...e){return new u(...e)},t.or=function(...e){return new h(...e)},t.custom=function(e,t){return new m(e,t)}},76076:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Data=t.kUnknownNullCount=void 0;const r=n(77192),i=n(77192),o=n(70171),a=n(40068),s=n(56616);t.kUnknownNullCount=-1;class l{constructor(e,t,n,r,i,o,s){let c;this.type=e,this.dictionary=s,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(r||0,-1)),this.childData=(o||[]).map((e=>e instanceof l?e:e.data)),i instanceof l?(this.stride=i.stride,this.values=i.values,this.typeIds=i.typeIds,this.nullBitmap=i.nullBitmap,this.valueOffsets=i.valueOffsets):(this.stride=a.strideForType(e),i&&((c=i[0])&&(this.valueOffsets=c),(c=i[1])&&(this.values=c),(c=i[2])&&(this.nullBitmap=c),(c=i[3])&&(this.typeIds=c)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0;const{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.childData.reduce(((e,t)=>e+t.byteLength),e)}get nullCount(){let e,n=this._nullCount;return n<=t.kUnknownNullCount&&(e=this.nullBitmap)&&(this._nullCount=n=this.length-i.popcnt_bit_range(e,this.offset,this.offset+this.length)),n}clone(e,t=this.offset,n=this.length,r=this._nullCount,i=this,o=this.childData){return new l(e,t,n,r,i,o,this.dictionary)}slice(e,t){const{stride:n,typeId:r,childData:i}=this,o=+(0===this._nullCount)-1,a=16===r?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,o,s,!i.length||this.valueOffsets?i:this._sliceChildren(i,a*e,a*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===o.Type.Null)return this.clone(this.type,0,e,0);const{length:t,nullCount:n}=this,i=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);i[t>>3]=(1<<t-(-8&t))-1,n>0&&i.set(r.truncateBitmap(this.offset,t,this.nullBitmap),0);const a=this.buffers;return a[o.BufferType.VALIDITY]=i,this.clone(this.type,0,e,n+(e-t),a)}_sliceBuffers(e,t,n,r){let i;const{buffers:a}=this;return(i=a[o.BufferType.TYPE])&&(a[o.BufferType.TYPE]=i.subarray(e,e+t)),(i=a[o.BufferType.OFFSET])&&(a[o.BufferType.OFFSET]=i.subarray(e,e+t+1))||(i=a[o.BufferType.DATA])&&(a[o.BufferType.DATA]=6===r?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map((e=>e.slice(t,n)))}static new(e,t,n,r,i,a,s){switch(i instanceof l?i=i.buffers:i||(i=[]),e.typeId){case o.Type.Null:return l.Null(e,t,n);case o.Type.Int:return l.Int(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Dictionary:return l.Dictionary(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[],s);case o.Type.Float:return l.Float(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Bool:return l.Bool(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Decimal:return l.Decimal(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Date:return l.Date(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Time:return l.Time(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Timestamp:return l.Timestamp(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Interval:return l.Interval(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.FixedSizeBinary:return l.FixedSizeBinary(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.DATA]||[]);case o.Type.Binary:return l.Binary(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.OFFSET]||[],i[o.BufferType.DATA]||[]);case o.Type.Utf8:return l.Utf8(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.OFFSET]||[],i[o.BufferType.DATA]||[]);case o.Type.List:return l.List(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.OFFSET]||[],(a||[])[0]);case o.Type.FixedSizeList:return l.FixedSizeList(e,t,n,r||0,i[o.BufferType.VALIDITY],(a||[])[0]);case o.Type.Struct:return l.Struct(e,t,n,r||0,i[o.BufferType.VALIDITY],a||[]);case o.Type.Map:return l.Map(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.OFFSET]||[],(a||[])[0]);case o.Type.Union:return l.Union(e,t,n,r||0,i[o.BufferType.VALIDITY],i[o.BufferType.TYPE]||[],i[o.BufferType.OFFSET]||a,a)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,n){return new l(e,t,n,0)}static Int(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Dictionary(e,t,n,r,i,o,a){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.indices.ArrayType,o),s.toUint8Array(i)],[],a)}static Float(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Bool(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Decimal(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Date(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Time(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Timestamp(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Interval(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static FixedSizeBinary(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,s.toArrayBufferView(e.ArrayType,o),s.toUint8Array(i)])}static Binary(e,t,n,r,i,o,a){return new l(e,t,n,r,[s.toInt32Array(o),s.toUint8Array(a),s.toUint8Array(i)])}static Utf8(e,t,n,r,i,o,a){return new l(e,t,n,r,[s.toInt32Array(o),s.toUint8Array(a),s.toUint8Array(i)])}static List(e,t,n,r,i,o,a){return new l(e,t,n,r,[s.toInt32Array(o),void 0,s.toUint8Array(i)],a?[a]:[])}static FixedSizeList(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,void 0,s.toUint8Array(i)],o?[o]:[])}static Struct(e,t,n,r,i,o){return new l(e,t,n,r,[void 0,void 0,s.toUint8Array(i)],o)}static Map(e,t,n,r,i,o,a){return new l(e,t,n,r,[s.toInt32Array(o),void 0,s.toUint8Array(i)],a?[a]:[])}static Union(e,t,n,r,i,a,c,u){const h=[void 0,void 0,s.toUint8Array(i),s.toArrayBufferView(e.ArrayType,a)];return e.mode===o.UnionMode.Sparse?new l(e,t,n,r,h,c):(h[o.BufferType.OFFSET]=s.toInt32Array(c),new l(e,t,n,r,h,u))}}t.Data=l,l.prototype.childData=Object.freeze([])},70171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferType=t.Type=t.MessageHeader=t.MetadataVersion=t.IntervalUnit=t.UnionMode=t.Precision=t.TimeUnit=t.DateUnit=void 0;var r=n(46859);Object.defineProperty(t,"DateUnit",{enumerable:!0,get:function(){return r.DateUnit}}),Object.defineProperty(t,"TimeUnit",{enumerable:!0,get:function(){return r.TimeUnit}}),Object.defineProperty(t,"Precision",{enumerable:!0,get:function(){return r.Precision}}),Object.defineProperty(t,"UnionMode",{enumerable:!0,get:function(){return r.UnionMode}}),Object.defineProperty(t,"IntervalUnit",{enumerable:!0,get:function(){return r.IntervalUnit}}),Object.defineProperty(t,"MetadataVersion",{enumerable:!0,get:function(){return r.MetadataVersion}});var i,o,a=n(56528);Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return a.MessageHeader}}),(o=t.Type||(t.Type={}))[o.NONE=0]="NONE",o[o.Null=1]="Null",o[o.Int=2]="Int",o[o.Float=3]="Float",o[o.Binary=4]="Binary",o[o.Utf8=5]="Utf8",o[o.Bool=6]="Bool",o[o.Decimal=7]="Decimal",o[o.Date=8]="Date",o[o.Time=9]="Time",o[o.Timestamp=10]="Timestamp",o[o.Interval=11]="Interval",o[o.List=12]="List",o[o.Struct=13]="Struct",o[o.Union=14]="Union",o[o.FixedSizeBinary=15]="FixedSizeBinary",o[o.FixedSizeList=16]="FixedSizeList",o[o.Map=17]="Map",o[o.Dictionary=-1]="Dictionary",o[o.Int8=-2]="Int8",o[o.Int16=-3]="Int16",o[o.Int32=-4]="Int32",o[o.Int64=-5]="Int64",o[o.Uint8=-6]="Uint8",o[o.Uint16=-7]="Uint16",o[o.Uint32=-8]="Uint32",o[o.Uint64=-9]="Uint64",o[o.Float16=-10]="Float16",o[o.Float32=-11]="Float32",o[o.Float64=-12]="Float64",o[o.DateDay=-13]="DateDay",o[o.DateMillisecond=-14]="DateMillisecond",o[o.TimestampSecond=-15]="TimestampSecond",o[o.TimestampMillisecond=-16]="TimestampMillisecond",o[o.TimestampMicrosecond=-17]="TimestampMicrosecond",o[o.TimestampNanosecond=-18]="TimestampNanosecond",o[o.TimeSecond=-19]="TimeSecond",o[o.TimeMillisecond=-20]="TimeMillisecond",o[o.TimeMicrosecond=-21]="TimeMicrosecond",o[o.TimeNanosecond=-22]="TimeNanosecond",o[o.DenseUnion=-23]="DenseUnion",o[o.SparseUnion=-24]="SparseUnion",o[o.IntervalDayTime=-25]="IntervalDayTime",o[o.IntervalYearMonth=-26]="IntervalYearMonth",(i=t.BufferType||(t.BufferType={}))[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"},15508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=t.Footer=void 0;const r=n(52385),i=n(46859);class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new o).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):i.MetadataVersion.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new i.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new a).__init(this.bb.__vector(this.bb_pos+n)+24*e,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const n=this.bb.__offset(this.bb_pos,10);return n?(t||new a).__init(this.bb.__vector(this.bb_pos+n)+24*e,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new i.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,i.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,n,r,i,a){return o.startFooter(e),o.addVersion(e,t),o.addSchema(e,n),o.addDictionaries(e,r),o.addRecordBatches(e,i),o.addCustomMetadata(e,a),o.endFooter(e)}}t.Footer=o;class a{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,n,r){return e.prep(8,24),e.writeInt64(r),e.pad(4),e.writeInt32(n),e.writeInt64(t),e.offset()}}t.Block=a},56528:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.DictionaryBatch=t.RecordBatch=t.BodyCompression=t.FieldNode=t.MessageHeader=t.BodyCompressionMethod=t.CompressionType=void 0;const r=n(52385),i=n(46859);var o,a,s;!function(e){e[e.LZ4_FRAME=0]="LZ4_FRAME",e[e.ZSTD=1]="ZSTD"}(o=t.CompressionType||(t.CompressionType={})),function(e){e[e.BUFFER=0]="BUFFER"}(a=t.BodyCompressionMethod||(t.BodyCompressionMethod={})),function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(s=t.MessageHeader||(t.MessageHeader={}));class l{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}t.FieldNode=l;class c{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new c).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new c).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):o.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):a.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,o.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,a.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,n){return c.startBodyCompression(e),c.addCodec(e,t),c.addMethod(e,n),c.endBodyCompression(e)}}t.BodyCompression=c;class u{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new u).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new u).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new l).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new i.Buffer).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new c).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,n,r,i){return u.startRecordBatch(e),u.addLength(e,t),u.addNodes(e,n),u.addBuffers(e,r),u.addCompression(e,i),u.endRecordBatch(e)}}t.RecordBatch=u;class h{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new h).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new h).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new u).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,n,r){return h.startDictionaryBatch(e),h.addId(e,t),h.addData(e,n),h.addIsDelta(e,r),h.endDictionaryBatch(e)}}t.DictionaryBatch=h;class d{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new d).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new d).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):i.MetadataVersion.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):s.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new i.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,i.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,s.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,n,r,i,o){return d.startMessage(e),d.addVersion(e,t),d.addHeaderType(e,n),d.addHeader(e,r),d.addBodyLength(e,i),d.addCustomMetadata(e,o),d.endMessage(e)}}t.Message=d},46859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Schema=t.Buffer=t.Field=t.DictionaryEncoding=t.KeyValue=t.Duration=t.Interval=t.Timestamp=t.Time=t.Date=t.Decimal=t.Bool=t.FixedSizeBinary=t.LargeBinary=t.LargeUtf8=t.Binary=t.Utf8=t.FloatingPoint=t.Int=t.Union=t.Map=t.FixedSizeList=t.LargeList=t.List=t.Struct_=t.Null=t.Endianness=t.DictionaryKind=t.Type=t.IntervalUnit=t.TimeUnit=t.DateUnit=t.Precision=t.UnionMode=t.Feature=t.MetadataVersion=void 0;const r=n(52385);var i,o,a,s,l,c,u,h,d,f;(f=t.MetadataVersion||(t.MetadataVersion={}))[f.V1=0]="V1",f[f.V2=1]="V2",f[f.V3=2]="V3",f[f.V4=3]="V4",f[f.V5=4]="V5",(d=t.Feature||(t.Feature={}))[d.UNUSED=0]="UNUSED",d[d.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",d[d.COMPRESSED_BODY=2]="COMPRESSED_BODY",function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(i=t.UnionMode||(t.UnionMode={})),function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(o=t.Precision||(t.Precision={})),function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(a=t.DateUnit||(t.DateUnit={})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(s=t.TimeUnit||(t.TimeUnit={})),function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME"}(l=t.IntervalUnit||(t.IntervalUnit={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.FloatingPoint=3]="FloatingPoint",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct_=13]="Struct_",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.LargeList=21]="LargeList"}(c=t.Type||(t.Type={})),function(e){e[e.DenseArray=0]="DenseArray"}(u=t.DictionaryKind||(t.DictionaryKind={})),function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(h=t.Endianness||(t.Endianness={}));class p{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new p).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new p).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return p.startNull(e),p.endNull(e)}}t.Null=p;class g{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new g).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new g).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return g.startStruct_(e),g.endStruct_(e)}}t.Struct_=g;class m{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new m).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new m).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return m.startList(e),m.endList(e)}}t.List=m;class v{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new v).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new v).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return v.startLargeList(e),v.endLargeList(e)}}t.LargeList=v;class y{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new y).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new y).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return y.startFixedSizeList(e),y.addListSize(e,t),y.endFixedSizeList(e)}}t.FixedSizeList=y;class b{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new b).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new b).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return b.startMap(e),b.addKeysSorted(e,t),b.endMap(e)}}t.Map=b;class _{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new _).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new _).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):i.Sparse}typeIds(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+4*e):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,i.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,n){return _.startUnion(e),_.addMode(e,t),_.addTypeIds(e,n),_.endUnion(e)}}t.Union=_;class x{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new x).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new x).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,n){return x.startInt(e),x.addBitWidth(e,t),x.addIsSigned(e,n),x.endInt(e)}}t.Int=x;class w{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new w).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new w).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):o.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,o.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return w.startFloatingPoint(e),w.addPrecision(e,t),w.endFloatingPoint(e)}}t.FloatingPoint=w;class A{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new A).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new A).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return A.startUtf8(e),A.endUtf8(e)}}t.Utf8=A;class k{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new k).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new k).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return k.startBinary(e),k.endBinary(e)}}t.Binary=k;class T{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new T).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new T).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return T.startLargeUtf8(e),T.endLargeUtf8(e)}}t.LargeUtf8=T;class S{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new S).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new S).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return S.startLargeBinary(e),S.endLargeBinary(e)}}t.LargeBinary=S;class E{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new E).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new E).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return E.startFixedSizeBinary(e),E.addByteWidth(e,t),E.endFixedSizeBinary(e)}}t.FixedSizeBinary=E;class C{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new C).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new C).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return C.startBool(e),C.endBool(e)}}t.Bool=C;class M{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new M).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new M).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,n,r){return M.startDecimal(e),M.addPrecision(e,t),M.addScale(e,n),M.addBitWidth(e,r),M.endDecimal(e)}}t.Decimal=M;class O{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new O).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new O).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):a.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,a.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return O.startDate(e),O.addUnit(e,t),O.endDate(e)}}t.Date=O;class L{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new L).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new L).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):s.MILLISECOND}bitWidth(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,s.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,n){return L.startTime(e),L.addUnit(e,t),L.addBitWidth(e,n),L.endTime(e)}}t.Time=L;class D{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new D).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new D).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):s.SECOND}timezone(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,s.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,n){return D.startTimestamp(e),D.addUnit(e,t),D.addTimezone(e,n),D.endTimestamp(e)}}t.Timestamp=D;class I{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new I).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new I).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):l.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,l.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return I.startInterval(e),I.addUnit(e,t),I.endInterval(e)}}t.Interval=I;class R{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new R).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new R).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):s.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,s.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return R.startDuration(e),R.addUnit(e,t),R.endDuration(e)}}t.Duration=R;class P{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new P).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new P).__init(e.readInt32(e.position())+e.position(),e)}key(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,n){return P.startKeyValue(e),P.addKey(e,t),P.addValue(e,n),P.endKeyValue(e)}}t.KeyValue=P;class N{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new N).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new N).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new x).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}dictionaryKind(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):u.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,u.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,n,r,i){return N.startDictionaryEncoding(e),N.addId(e,t),N.addIndexType(e,n),N.addIsOrdered(e,r),N.addDictionaryKind(e,i),N.endDictionaryEncoding(e)}}t.DictionaryEncoding=N;class z{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new z).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new z).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):c.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new N).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const n=this.bb.__offset(this.bb_pos,14);return n?(t||new z).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,16);return n?(t||new P).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,c.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,n,r,i,o,a,s){return z.startField(e),z.addName(e,t),z.addNullable(e,n),z.addTypeType(e,r),z.addType(e,i),z.addDictionary(e,o),z.addChildren(e,a),z.addCustomMetadata(e,s),z.endField(e)}}t.Field=z,t.Buffer=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}};class F{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new F).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+r.flatbuffers.SIZE_PREFIX_LENGTH),(t||new F).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):h.Little}fields(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new z).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new P).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+8*e):this.bb.createLong(0,0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,h.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,n,r,i){return F.startSchema(e),F.addEndianness(e,t),F.addFields(e,n),F.addCustomMetadata(e,r),F.addFeatures(e,i),F.endSchema(e)}}t.Schema=F},89174:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(28001),i=n(56616);t.default={fromIterable:e=>o(function*(e){let t,n,r,o,a=!1,s=[],l=0;({cmd:r,size:o}=yield null);const c=i.toUint8ArrayIterator(e)[Symbol.iterator]();try{do{if(({done:t,value:n}=isNaN(o-l)?c.next(void 0):c.next(o-l)),!t&&n.byteLength>0&&(s.push(n),l+=n.byteLength),t||o<=l)do{({cmd:r,size:o}=yield"peek"===r?i.joinUint8Arrays(s,o)[0]:([n,s,l]=i.joinUint8Arrays(s,o),n))}while(o<l)}while(!t)}catch(e){(a=!0)&&"function"==typeof c.throw&&c.throw(e)}finally{!1===a&&"function"==typeof c.return&&c.return(null)}return null}(e)),fromAsyncIterable:e=>o(function(e){return r.__asyncGenerator(this,arguments,(function*(){let t,n,o,a,s=!1,l=[],c=0;({cmd:o,size:a}=yield yield r.__await(null));const u=i.toUint8ArrayAsyncIterator(e)[Symbol.asyncIterator]();try{do{if(({done:t,value:n}=isNaN(a-c)?yield r.__await(u.next(void 0)):yield r.__await(u.next(a-c))),!t&&n.byteLength>0&&(l.push(n),c+=n.byteLength),t||a<=c)do{({cmd:o,size:a}=yield yield r.__await("peek"===o?i.joinUint8Arrays(l,a)[0]:([n,l,c]=i.joinUint8Arrays(l,a),n)))}while(a<c)}while(!t)}catch(e){(s=!0)&&"function"==typeof u.throw&&(yield r.__await(u.throw(e)))}finally{!1===s&&"function"==typeof u.return&&(yield r.__await(u.return(new Uint8Array(0))))}return yield r.__await(null)}))}(e)),fromDOMStream:e=>o(function(e){return r.__asyncGenerator(this,arguments,(function*(){let t,n,o,s=!1,l=!1,c=[],u=0;({cmd:n,size:o}=yield yield r.__await(null));const h=new a(e);try{do{if(({done:s,value:t}=isNaN(o-u)?yield r.__await(h.read(void 0)):yield r.__await(h.read(o-u))),!s&&t.byteLength>0&&(c.push(i.toUint8Array(t)),u+=t.byteLength),s||o<=u)do{({cmd:n,size:o}=yield yield r.__await("peek"===n?i.joinUint8Arrays(c,o)[0]:([t,c,u]=i.joinUint8Arrays(c,o),t)))}while(o<u)}while(!s)}catch(e){(l=!0)&&(yield r.__await(h.cancel(e)))}finally{!1===l?yield r.__await(h.cancel()):e.locked&&h.releaseLock()}return yield r.__await(null)}))}(e)),fromNodeStream:e=>o(function(e){return r.__asyncGenerator(this,arguments,(function*(){const t=[];let n,o,a,s="error",c=!1,u=null,h=0,d=[];if(({cmd:n,size:o}=yield yield r.__await(null)),e.isTTY)return yield yield r.__await(new Uint8Array(0)),yield r.__await(null);try{t[0]=l(e,"end"),t[1]=l(e,"error");do{if(t[2]=l(e,"readable"),[s,u]=yield r.__await(Promise.race(t.map((e=>e[2])))),"error"===s)break;if((c="end"===s)||(isFinite(o-h)?(a=i.toUint8Array(e.read(o-h)),a.byteLength<o-h&&(a=i.toUint8Array(e.read(void 0)))):a=i.toUint8Array(e.read(void 0)),a.byteLength>0&&(d.push(a),h+=a.byteLength)),c||o<=h)do{({cmd:n,size:o}=yield yield r.__await("peek"===n?i.joinUint8Arrays(d,o)[0]:([a,d,h]=i.joinUint8Arrays(d,o),a)))}while(o<h)}while(!c)}finally{yield r.__await(function(t,n){return a=d=null,new Promise(((r,i)=>{for(const[n,r]of t)e.off(n,r);try{const t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{null!=n?i(n):r()}}))}(t,"error"===s?u:null))}return yield r.__await(null)}))}(e)),toDOMStream(e,t){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(e,t){throw new Error('"toNodeStream" not available in this environment')}};const o=e=>(e.next(),e);class a{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(e){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){const{reader:t,source:n}=this;t&&(yield t.cancel(e).catch((()=>{}))),n&&n.locked&&this.releaseLock()}))}read(e){return r.__awaiter(this,void 0,void 0,(function*(){if(0===e)return{done:null==this.reader,value:new Uint8Array(0)};const t=this.supportsBYOB&&"number"==typeof e?yield this.readFromBYOBReader(e):yield this.getDefaultReader().read();return!t.done&&(t.value=i.toUint8Array(t)),t}))}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch((()=>{}))),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch((()=>{}))),this.reader=this.byobReader}readFromBYOBReader(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield s(this.getBYOBReader(),new ArrayBuffer(e),0,e)}))}}function s(e,t,n,i){return r.__awaiter(this,void 0,void 0,(function*(){if(n>=i)return{done:!1,value:new Uint8Array(t,0,i)};const{done:r,value:o}=yield e.read(new Uint8Array(t,n,i-n));return(n+=o.byteLength)<i&&!r?yield s(e,o.buffer,n,i):{done:r,value:new Uint8Array(o.buffer,0,n)}}))}const l=(e,t)=>{const n=e=>r([t,e]);let r;return[t,n,new Promise((i=>(r=i)&&e.once(t,n)))]}},83221:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRandomAccessFile=t.RandomAccessFile=void 0;const r=n(28001),i=n(40351),o=n(56616);class a extends i.ByteStream{constructor(e,t){super(),this.position=0,this.buffer=o.toUint8Array(e),this.size=void 0===t?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){const{buffer:t,size:n,position:r}=this;return t&&r<n?("number"!=typeof e&&(e=1/0),this.position=Math.min(n,r+Math.min(n-r,e)),t.subarray(r,this.position)):null}readAt(e,t){const n=this.buffer,r=Math.min(this.size,e+t);return n?n.subarray(e,r):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}}t.RandomAccessFile=a;class s extends i.AsyncByteStream{constructor(e,t){super(),this.position=0,this._handle=e,"number"==typeof t?this.size=t:this._pending=(()=>r.__awaiter(this,void 0,void 0,(function*(){this.size=(yield e.stat()).size,delete this._pending})))()}readInt32(e){return r.__awaiter(this,void 0,void 0,(function*(){const{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}))}seek(e){return r.__awaiter(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size}))}read(e){return r.__awaiter(this,void 0,void 0,(function*(){this._pending&&(yield this._pending);const{_handle:t,size:n,position:r}=this;if(t&&r<n){"number"!=typeof e&&(e=1/0);let i=r,o=0,a=0;const s=Math.min(n,i+Math.min(n-i,e)),l=new Uint8Array(Math.max(0,(this.position=s)-i));for(;(i+=a)<s&&(o+=a)<l.byteLength;)({bytesRead:a}=yield t.read(l,o,l.byteLength-o,i));return l}return null}))}readAt(e,t){return r.__awaiter(this,void 0,void 0,(function*(){this._pending&&(yield this._pending);const{_handle:n,size:r}=this;if(n&&e+t<r){const i=Math.min(r,e+t),o=new Uint8Array(i-e);return(yield n.read(o,0,t,e)).buffer}return new Uint8Array(t)}))}close(){return r.__awaiter(this,void 0,void 0,(function*(){const e=this._handle;this._handle=null,e&&(yield e.close())}))}throw(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:e}}))}return(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:e}}))}}t.AsyncRandomAccessFile=s},12744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncQueue=t.ReadableInterop=t.ArrowJSON=t.ITERATOR_DONE=void 0;const r=n(28001),i=n(89174);t.ITERATOR_DONE=Object.freeze({done:!0,value:void 0}),t.ArrowJSON=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};class o{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}t.ReadableInterop=o;class a extends o{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((e=>this._closedPromiseResolve=e))}get closed(){return this._closedPromise}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){yield this.return(e)}))}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(t.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return i.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return i.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.abort(e),t.ITERATOR_DONE}))}return(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.close(),t.ITERATOR_DONE}))}read(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((e,t)=>{this.resolvers.push({resolve:e,reject:t})})):Promise.resolve(t.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}t.AsyncQueue=a},40351:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncByteStream=t.ByteStream=t.AsyncByteQueue=void 0;const r=n(28001),i=n(89174),o=n(75426),a=n(12744),s=n(56616),l=n(5992);class c extends a.AsyncQueue{write(e){if((e=s.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?o.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(o.decodeUtf8)}toUint8Array(e=!1){return e?s.joinUint8Arrays(this._values)[0]:(()=>r.__awaiter(this,void 0,void 0,(function*(){var e,t;const n=[];let i=0;try{for(var o,a=r.__asyncValues(this);!(o=yield a.next()).done;){const e=o.value;n.push(e),i+=e.byteLength}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&(yield t.call(a))}finally{if(e)throw e.error}}return s.joinUint8Arrays(n,i)[0]})))()}}t.AsyncByteQueue=c;class u{constructor(e){e&&(this.source=new d(i.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}t.ByteStream=u;class h{constructor(e){e instanceof h?this.source=e.source:e instanceof c?this.source=new f(i.default.fromAsyncIterable(e)):l.isReadableNodeStream(e)?this.source=new f(i.default.fromNodeStream(e)):l.isReadableDOMStream(e)?this.source=new f(i.default.fromDOMStream(e)):l.isFetchResponse(e)?this.source=new f(i.default.fromDOMStream(e.body)):l.isIterable(e)?this.source=new f(i.default.fromIterable(e)):(l.isPromise(e)||l.isAsyncIterable(e))&&(this.source=new f(i.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}t.AsyncByteStream=h;class d{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||a.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||a.ITERATOR_DONE)}}class f{constructor(e){this.source=e,this._closedPromise=new Promise((e=>this._closedPromiseResolve=e))}cancel(e){return r.__awaiter(this,void 0,void 0,(function*(){yield this.return(e)}))}get closed(){return this._closedPromise}read(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return r.__awaiter(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(e,t="read"){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.source.next({cmd:t,size:e})}))}throw(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this.source.throw&&(yield this.source.throw(e))||a.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}return(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this.source.return&&(yield this.source.return(e))||a.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}}},98661:(e,t,n)=>{"use strict";t.bl=void 0;const r=n(28001),i=n(33986);t.bl=function(e){return new o(e)};class o{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;const{readableStrategy:t,writableStrategy:n,queueingStrategy:o="count"}=e,l=r.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=i.Builder.new(l),this._getSize="bytes"!==o?a:s;const{highWaterMark:c=("bytes"===o?Math.pow(2,14):1e3)}=Object.assign({},t),{highWaterMark:u=("bytes"===o?Math.pow(2,14):1e3)}=Object.assign({},n);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:e=>{this._maybeFlush(this._builder,this._controller=e)},start:e=>{this._maybeFlush(this._builder,this._controller=e)}},{highWaterMark:c,size:"bytes"!==o?a:s}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:u,size:e=>this._writeValueAndReturnChunkSize(e)})}_writeValueAndReturnChunkSize(e){const t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){null!==t&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,null===t?e.close():e.enqueue(t)}}const a=e=>e.length,s=e=>e.byteLength},62045:(e,t,n)=>{"use strict";t.d=void 0;const r=n(28001),i=n(56616),o=n(5992);t.d=function(e,t){if(o.isAsyncIterable(e))return function(e,t){let n=null;const o="bytes"===(null==t?void 0:t.type)||!1,a=(null==t?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(t){return r.__awaiter(this,void 0,void 0,(function*(){yield s(t,n||(n=e[Symbol.asyncIterator]()))}))},pull(e){return r.__awaiter(this,void 0,void 0,(function*(){n?yield s(e,n):e.close()}))},cancel(){return r.__awaiter(this,void 0,void 0,(function*(){(null==n?void 0:n.return)&&(yield n.return()),n=null}))}}),Object.assign({highWaterMark:o?a:void 0},t));function s(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let n,r=null,a=e.desiredSize||null;for(;!(r=yield t.next(o?a:null)).done;)if(ArrayBuffer.isView(r.value)&&(n=i.toUint8Array(r.value))&&(null!=a&&o&&(a=a-n.byteLength+1),r.value=n),e.enqueue(r.value),null!=a&&--a<=0)return;e.close()}))}}(e,t);if(o.isIterable(e))return function(e,t){let n=null;const r="bytes"===(null==t?void 0:t.type)||!1,o=(null==t?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(t){a(t,n||(n=e[Symbol.iterator]()))},pull(e){n?a(e,n):e.close()},cancel(){(null==n?void 0:n.return)&&n.return(),n=null}}),Object.assign({highWaterMark:r?o:void 0},t));function a(e,t){let n,o=null,a=e.desiredSize||null;for(;!(o=t.next(r?a:null)).done;)if(ArrayBuffer.isView(o.value)&&(n=i.toUint8Array(o.value))&&(null!=a&&r&&(a=a-n.byteLength+1),o.value=n),e.enqueue(o.value),null!=a&&--a<=0)return;e.close()}}(e,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}},90150:(e,t,n)=>{"use strict";t.q=void 0;const r=n(28001),i=n(40351),o=n(60786);t.q=function(e,t){const n=new i.AsyncByteQueue;let a=null;const s=new ReadableStream({cancel(){return r.__awaiter(this,void 0,void 0,(function*(){yield n.close()}))},start(e){return r.__awaiter(this,void 0,void 0,(function*(){yield l(e,a||(a=yield function(){return r.__awaiter(this,void 0,void 0,(function*(){return yield(yield o.RecordBatchReader.from(n)).open(t)}))}()))}))},pull(e){return r.__awaiter(this,void 0,void 0,(function*(){a?yield l(e,a):e.close()}))}});return{writable:new WritableStream(n,Object.assign({highWaterMark:Math.pow(2,14)},e)),readable:s};function l(e,t){return r.__awaiter(this,void 0,void 0,(function*(){let n=e.desiredSize,r=null;for(;!(r=yield t.next()).done;)if(e.enqueue(r.value),null!=n&&--n<=0)return;e.close()}))}}},5388:(e,t,n)=>{"use strict";t.k=void 0;const r=n(28001),i=n(40351);t.k=function(e,t){const n=new this(e),o=new i.AsyncByteStream(n),a=new ReadableStream({type:"bytes",cancel(){return r.__awaiter(this,void 0,void 0,(function*(){yield o.cancel()}))},pull(e){return r.__awaiter(this,void 0,void 0,(function*(){yield s(e)}))},start(e){return r.__awaiter(this,void 0,void 0,(function*(){yield s(e)}))}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(n,e),readable:a};function s(e){return r.__awaiter(this,void 0,void 0,(function*(){let t=null,n=e.desiredSize;for(;t=yield o.read(n||null);)if(e.enqueue(t),null!=n&&(n-=t.byteLength)<=0)return;e.close()}))}}},13138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.magicX2AndPadding=t.magicAndPadding=t.magicLength=t.checkForMagicArrowString=t.MAGIC=t.MAGIC_STR=t.PADDING=t.JSONMessageReader=t.AsyncMessageReader=t.MessageReader=void 0;const r=n(28001),i=n(70171);var o=n(52385).flatbuffers.ByteBuffer;const a=n(71005),s=n(5992),l=n(83221),c=n(56616),u=n(40351),h=n(12744),d=e=>`Expected ${i.MessageHeader[e]} Message in stream, but was null or length 0.`,f=e=>`Header pointer of flatbuffer-encoded ${i.MessageHeader[e]} Message is null or length 0.`,p=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,g=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;class m{constructor(e){this.source=e instanceof u.ByteStream?e:new u.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?h.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=c.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(g(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){const t=i.MessageHeader.Schema,n=this.readMessage(t),r=null==n?void 0:n.header();if(e&&!r)throw new Error(f(t));return r}readMetadataLength(){const e=this.source.read(t.PADDING),n=e&&new o(e),r=(null==n?void 0:n.readInt32(0))||0;return{done:0===r,value:r}}readMetadata(e){const t=this.source.read(e);if(!t)return h.ITERATOR_DONE;if(t.byteLength<e)throw new Error(p(e,t.byteLength));return{done:!1,value:a.Message.decode(t)}}}t.MessageReader=m;class v{constructor(e,t){this.source=e instanceof u.AsyncByteStream?e:s.isFileHandle(e)?new l.AsyncRandomAccessFile(e,t):new u.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return r.__awaiter(this,void 0,void 0,(function*(){let e;return(e=yield this.readMetadataLength()).done||-1===e.value&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?h.ITERATOR_DONE:e}))}throw(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.source.throw(e)}))}return(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.source.return(e)}))}readMessage(e){return r.__awaiter(this,void 0,void 0,(function*(){let t;if((t=yield this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}))}readMessageBody(e){return r.__awaiter(this,void 0,void 0,(function*(){if(e<=0)return new Uint8Array(0);const t=c.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(g(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}))}readSchema(e=!1){return r.__awaiter(this,void 0,void 0,(function*(){const t=i.MessageHeader.Schema,n=yield this.readMessage(t),r=null==n?void 0:n.header();if(e&&!r)throw new Error(f(t));return r}))}readMetadataLength(){return r.__awaiter(this,void 0,void 0,(function*(){const e=yield this.source.read(t.PADDING),n=e&&new o(e),r=(null==n?void 0:n.readInt32(0))||0;return{done:0===r,value:r}}))}readMetadata(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield this.source.read(e);if(!t)return h.ITERATOR_DONE;if(t.byteLength<e)throw new Error(p(e,t.byteLength));return{done:!1,value:a.Message.decode(t)}}))}}t.AsyncMessageReader=v,t.JSONMessageReader=class extends m{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof h.ArrowJSON?e:new h.ArrowJSON(e)}next(){const{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:a.Message.fromJSON(e.schema,i.MessageHeader.Schema)};if(this._dictionaryIndex<e.dictionaries.length){const t=e.dictionaries[this._dictionaryIndex++];return this._body=t.data.columns,{done:!1,value:a.Message.fromJSON(t,i.MessageHeader.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const t=e.batches[this._batchIndex++];return this._body=t.columns,{done:!1,value:a.Message.fromJSON(t,i.MessageHeader.RecordBatch)}}return this._body=[],h.ITERATOR_DONE}readMessageBody(e){return function e(t){return(t||[]).reduce(((t,n)=>[...t,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE&&[n.TYPE]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...e(n.children)]),[])}(this._body)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(d(e));return t.value}readSchema(){const e=i.MessageHeader.Schema,t=this.readMessage(e),n=null==t?void 0:t.header();if(!t||!n)throw new Error(f(e));return n}},t.PADDING=4,t.MAGIC_STR="ARROW1",t.MAGIC=new Uint8Array(t.MAGIC_STR.length);for(let e=0;e<t.MAGIC_STR.length;e+=1)t.MAGIC[e]=t.MAGIC_STR.charCodeAt(e);t.checkForMagicArrowString=function(e,n=0){for(let r=-1,i=t.MAGIC.length;++r<i;)if(t.MAGIC[r]!==e[n+r])return!1;return!0},t.magicLength=t.MAGIC.length,t.magicAndPadding=t.magicLength+t.PADDING,t.magicX2AndPadding=2*t.magicLength+t.PADDING},20497:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBlock=t.Footer=void 0;const r=n(15508),i=n(52385);var o=i.flatbuffers.Long,a=i.flatbuffers.Builder,s=i.flatbuffers.ByteBuffer;const l=n(89),c=n(70171),u=n(56616);class h{constructor(e,t=c.MetadataVersion.V4,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}static decode(e){e=new s(u.toUint8Array(e));const t=r.Footer.getRootAsFooter(e),n=l.Schema.decode(t.schema());return new d(n,t)}static encode(e){const t=new a,n=l.Schema.encode(t,e.schema);r.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach((e=>f.encode(t,e)));const i=t.endVector();r.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach((e=>f.encode(t,e)));const o=t.endVector();return r.Footer.startFooter(t),r.Footer.addSchema(t,n),r.Footer.addVersion(t,c.MetadataVersion.V4),r.Footer.addRecordBatches(t,i),r.Footer.addDictionaries(t,o),r.Footer.finishFooterBuffer(t,r.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t<n;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,n=this.numDictionaries;++t<n;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}}t.Footer=h;class d extends h{constructor(e,t){super(e,t.version()),this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){const t=this._footer.recordBatches(e);if(t)return f.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){const t=this._footer.dictionaries(e);if(t)return f.decode(t)}return null}}class f{constructor(e,t,n){this.metaDataLength=e,this.offset="number"==typeof n?n:n.low,this.bodyLength="number"==typeof t?t:t.low}static decode(e){return new f(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){const{metaDataLength:n}=t,i=new o(t.offset,0),a=new o(t.bodyLength,0);return r.Block.createBlock(e,i,n,a)}}t.FileBlock=f},53701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fieldFromJSON=t.dictionaryBatchFromJSON=t.recordBatchFromJSON=t.schemaFromJSON=void 0;const r=n(89),i=n(40068),o=n(71005),a=n(70171);function s(e){return new o.RecordBatch(e.count,c(e.columns),u(e.columns))}function l(e,t){return(e.children||[]).filter(Boolean).map((e=>r.Field.fromJSON(e,t)))}function c(e){return(e||[]).reduce(((e,t)=>{return[...e,new o.FieldNode(t.count,(n=t.VALIDITY,(n||[]).reduce(((e,t)=>e+ +(0===t)),0))),...c(t.children)];var n}),[])}function u(e,t=[]){for(let n=-1,r=(e||[]).length;++n<r;){const r=e[n];r.VALIDITY&&t.push(new o.BufferRegion(t.length,r.VALIDITY.length)),r.TYPE&&t.push(new o.BufferRegion(t.length,r.TYPE.length)),r.OFFSET&&t.push(new o.BufferRegion(t.length,r.OFFSET.length)),r.DATA&&t.push(new o.BufferRegion(t.length,r.DATA.length)),t=u(r.children,t)}return t}function h(e){return new Map(Object.entries(e||{}))}function d(e){return new i.Int(e.isSigned,e.bitWidth)}function f(e,t){const n=e.type.name;switch(n){case"NONE":case"null":return new i.Null;case"binary":return new i.Binary;case"utf8":return new i.Utf8;case"bool":return new i.Bool;case"list":return new i.List((t||[])[0]);case"struct":case"struct_":return new i.Struct(t||[])}switch(n){case"int":{const t=e.type;return new i.Int(t.isSigned,t.bitWidth)}case"floatingpoint":{const t=e.type;return new i.Float(a.Precision[t.precision])}case"decimal":{const t=e.type;return new i.Decimal(t.scale,t.precision)}case"date":{const t=e.type;return new i.Date_(a.DateUnit[t.unit])}case"time":{const t=e.type;return new i.Time(a.TimeUnit[t.unit],t.bitWidth)}case"timestamp":{const t=e.type;return new i.Timestamp(a.TimeUnit[t.unit],t.timezone)}case"interval":{const t=e.type;return new i.Interval(a.IntervalUnit[t.unit])}case"union":{const n=e.type;return new i.Union(a.UnionMode[n.mode],n.typeIds||[],t||[])}case"fixedsizebinary":{const t=e.type;return new i.FixedSizeBinary(t.byteWidth)}case"fixedsizelist":{const n=e.type;return new i.FixedSizeList(n.listSize,(t||[])[0])}case"map":{const n=e.type;return new i.Map_((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}t.schemaFromJSON=function(e,t=new Map){return new r.Schema(function(e,t){return(e.fields||[]).filter(Boolean).map((e=>r.Field.fromJSON(e,t)))}(e,t),h(e.customMetadata),t)},t.recordBatchFromJSON=s,t.dictionaryBatchFromJSON=function(e){return new o.DictionaryBatch(s(e.data),e.id,e.isDelta)},t.fieldFromJSON=function(e,t){let n,o,a,s,c,u;return t&&(s=e.dictionary)?t.has(n=s.id)?(o=(o=s.indexType)?d(o):new i.Int32,u=new i.Dictionary(t.get(n),o,n,s.isOrdered),a=new r.Field(e.name,u,e.nullable,h(e.customMetadata))):(o=(o=s.indexType)?d(o):new i.Int32,t.set(n,c=f(e,l(e,t))),u=new i.Dictionary(c,o,n,s.isOrdered),a=new r.Field(e.name,u,e.nullable,h(e.customMetadata))):(c=f(e,l(e,t)),a=new r.Field(e.name,c,e.nullable,h(e.customMetadata))),a||null}},71005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldNode=t.BufferRegion=t.DictionaryBatch=t.RecordBatch=t.Message=void 0;const r=n(52385),i=n(46859),o=n(56528),a=n(89),s=n(56616),l=n(70171),c=n(13811),u=n(53701);var h=r.flatbuffers.Long,d=r.flatbuffers.Builder,f=r.flatbuffers.ByteBuffer;const p=n(40068);class g{constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array(0),r&&(this._createHeader=()=>r),this._bodyLength="number"==typeof e?e:e.low}static fromJSON(e,t){const n=new g(0,l.MetadataVersion.V4,t);return n._createHeader=function(e,t){return()=>{switch(t){case l.MessageHeader.Schema:return a.Schema.fromJSON(e);case l.MessageHeader.RecordBatch:return m.fromJSON(e);case l.MessageHeader.DictionaryBatch:return v.fromJSON(e)}throw new Error(`Unrecognized Message type: { name: ${l.MessageHeader[t]}, type: ${t} }`)}}(e,t),n}static decode(e){e=new f(s.toUint8Array(e));const t=o.Message.getRootAsMessage(e),n=t.bodyLength(),r=t.version(),c=t.headerType(),u=new g(n,r,c);return u._createHeader=function(e,t){return()=>{switch(t){case l.MessageHeader.Schema:return a.Schema.decode(e.header(new i.Schema));case l.MessageHeader.RecordBatch:return m.decode(e.header(new o.RecordBatch),e.version());case l.MessageHeader.DictionaryBatch:return v.decode(e.header(new o.DictionaryBatch),e.version())}throw new Error(`Unrecognized Message type: { name: ${l.MessageHeader[t]}, type: ${t} }`)}}(t,c),u}static encode(e){const t=new d;let n=-1;return e.isSchema()?n=a.Schema.encode(t,e.header()):e.isRecordBatch()?n=m.encode(t,e.header()):e.isDictionaryBatch()&&(n=v.encode(t,e.header())),o.Message.startMessage(t),o.Message.addVersion(t,l.MetadataVersion.V4),o.Message.addHeader(t,n),o.Message.addHeaderType(t,e.headerType),o.Message.addBodyLength(t,new h(e.bodyLength,0)),o.Message.finishMessageBuffer(t,o.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof a.Schema)return new g(0,l.MetadataVersion.V4,l.MessageHeader.Schema,e);if(e instanceof m)return new g(t,l.MetadataVersion.V4,l.MessageHeader.RecordBatch,e);if(e instanceof v)return new g(t,l.MetadataVersion.V4,l.MessageHeader.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===l.MessageHeader.Schema}isRecordBatch(){return this.headerType===l.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===l.MessageHeader.DictionaryBatch}}t.Message=g;class m{constructor(e,t,n){this._nodes=t,this._buffers=n,this._length="number"==typeof e?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}}t.RecordBatch=m;class v{constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id="number"==typeof t?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}}t.DictionaryBatch=v;class y{constructor(e,t){this.offset="number"==typeof e?e:e.low,this.length="number"==typeof t?t:t.low}}t.BufferRegion=y;class b{constructor(e,t){this.length="number"==typeof e?e:e.low,this.nullCount="number"==typeof t?t:t.low}}function _(e,t){const n=[];for(let r,i=-1,o=-1,s=e.childrenLength();++i<s;)(r=e.children(i))&&(n[++o]=a.Field.decode(r,t));return n}function x(e){const t=new Map;if(e)for(let n,r,i=-1,o=0|e.customMetadataLength();++i<o;)(n=e.customMetadata(i))&&null!=(r=n.key())&&t.set(r,n.value());return t}function w(e){return new p.Int(e.isSigned(),e.bitWidth())}function A(e,t){const n=e.typeType();switch(n){case i.Type.NONE:case i.Type.Null:return new p.Null;case i.Type.Binary:return new p.Binary;case i.Type.Utf8:return new p.Utf8;case i.Type.Bool:return new p.Bool;case i.Type.List:return new p.List((t||[])[0]);case i.Type.Struct_:return new p.Struct(t||[])}switch(n){case i.Type.Int:{const t=e.type(new i.Int);return new p.Int(t.isSigned(),t.bitWidth())}case i.Type.FloatingPoint:{const t=e.type(new i.FloatingPoint);return new p.Float(t.precision())}case i.Type.Decimal:{const t=e.type(new i.Decimal);return new p.Decimal(t.scale(),t.precision())}case i.Type.Date:{const t=e.type(new i.Date);return new p.Date_(t.unit())}case i.Type.Time:{const t=e.type(new i.Time);return new p.Time(t.unit(),t.bitWidth())}case i.Type.Timestamp:{const t=e.type(new i.Timestamp);return new p.Timestamp(t.unit(),t.timezone())}case i.Type.Interval:{const t=e.type(new i.Interval);return new p.Interval(t.unit())}case i.Type.Union:{const n=e.type(new i.Union);return new p.Union(n.mode(),n.typeIdsArray()||[],t||[])}case i.Type.FixedSizeBinary:{const t=e.type(new i.FixedSizeBinary);return new p.FixedSizeBinary(t.byteWidth())}case i.Type.FixedSizeList:{const n=e.type(new i.FixedSizeList);return new p.FixedSizeList(n.listSize(),(t||[])[0])}case i.Type.Map:{const n=e.type(new i.Map);return new p.Map_((t||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${i.Type[n]}" (${n})`)}t.FieldNode=b,a.Field.encode=function(e,t){let n=-1,r=-1,o=-1;const s=t.type;let l=t.typeId;p.DataType.isDictionary(s)?(l=s.dictionary.typeId,o=c.instance.visit(s,e),r=c.instance.visit(s.dictionary,e)):r=c.instance.visit(s,e);const u=(s.children||[]).map((t=>a.Field.encode(e,t))),h=i.Field.createChildrenVector(e,u),d=t.metadata&&t.metadata.size>0?i.Field.createCustomMetadataVector(e,[...t.metadata].map((([t,n])=>{const r=e.createString(`${t}`),o=e.createString(`${n}`);return i.KeyValue.startKeyValue(e),i.KeyValue.addKey(e,r),i.KeyValue.addValue(e,o),i.KeyValue.endKeyValue(e)}))):-1;return t.name&&(n=e.createString(t.name)),i.Field.startField(e),i.Field.addType(e,r),i.Field.addTypeType(e,l),i.Field.addChildren(e,h),i.Field.addNullable(e,!!t.nullable),-1!==n&&i.Field.addName(e,n),-1!==o&&i.Field.addDictionary(e,o),-1!==d&&i.Field.addCustomMetadata(e,d),i.Field.endField(e)},a.Field.decode=function(e,t){let n,r,i,o,s,l;return t&&(l=e.dictionary())?t.has(n=l.id().low)?(o=(o=l.indexType())?w(o):new p.Int32,s=new p.Dictionary(t.get(n),o,n,l.isOrdered()),r=new a.Field(e.name(),s,e.nullable(),x(e))):(o=(o=l.indexType())?w(o):new p.Int32,t.set(n,i=A(e,_(e,t))),s=new p.Dictionary(i,o,n,l.isOrdered()),r=new a.Field(e.name(),s,e.nullable(),x(e))):(i=A(e,_(e,t)),r=new a.Field(e.name(),i,e.nullable(),x(e))),r||null},a.Field.fromJSON=u.fieldFromJSON,a.Schema.encode=function(e,t){const n=t.fields.map((t=>a.Field.encode(e,t)));i.Schema.startFieldsVector(e,n.length);const r=i.Schema.createFieldsVector(e,n),o=t.metadata&&t.metadata.size>0?i.Schema.createCustomMetadataVector(e,[...t.metadata].map((([t,n])=>{const r=e.createString(`${t}`),o=e.createString(`${n}`);return i.KeyValue.startKeyValue(e),i.KeyValue.addKey(e,r),i.KeyValue.addValue(e,o),i.KeyValue.endKeyValue(e)}))):-1;return i.Schema.startSchema(e),i.Schema.addFields(e,r),i.Schema.addEndianness(e,k?i.Endianness.Little:i.Endianness.Big),-1!==o&&i.Schema.addCustomMetadata(e,o),i.Schema.endSchema(e)},a.Schema.decode=function(e,t=new Map){const n=function(e,t){const n=[];for(let r,i=-1,o=-1,s=e.fieldsLength();++i<s;)(r=e.fields(i))&&(n[++o]=a.Field.decode(r,t));return n}(e,t);return new a.Schema(n,x(e),t)},a.Schema.fromJSON=u.schemaFromJSON,m.encode=function(e,t){const n=t.nodes||[],r=t.buffers||[];o.RecordBatch.startNodesVector(e,n.length),n.slice().reverse().forEach((t=>b.encode(e,t)));const i=e.endVector();o.RecordBatch.startBuffersVector(e,r.length),r.slice().reverse().forEach((t=>y.encode(e,t)));const a=e.endVector();return o.RecordBatch.startRecordBatch(e),o.RecordBatch.addLength(e,new h(t.length,0)),o.RecordBatch.addNodes(e,i),o.RecordBatch.addBuffers(e,a),o.RecordBatch.endRecordBatch(e)},m.decode=function(e,t=l.MetadataVersion.V4){return new m(e.length(),function(e){const t=[];for(let n,r=-1,i=-1,o=e.nodesLength();++r<o;)(n=e.nodes(r))&&(t[++i]=b.decode(n));return t}(e),function(e,t){const n=[];for(let r,i=-1,o=-1,a=e.buffersLength();++i<a;)(r=e.buffers(i))&&(t<l.MetadataVersion.V4&&(r.bb_pos+=8*(i+1)),n[++o]=y.decode(r));return n}(e,t))},m.fromJSON=u.recordBatchFromJSON,v.encode=function(e,t){const n=m.encode(e,t.data);return o.DictionaryBatch.startDictionaryBatch(e),o.DictionaryBatch.addId(e,new h(t.id,0)),o.DictionaryBatch.addIsDelta(e,t.isDelta),o.DictionaryBatch.addData(e,n),o.DictionaryBatch.endDictionaryBatch(e)},v.decode=function(e,t=l.MetadataVersion.V4){return new v(m.decode(e.data(),t),e.id(),e.isDelta())},v.fromJSON=u.dictionaryBatchFromJSON,b.encode=function(e,t){return o.FieldNode.createFieldNode(e,new h(t.length,0),new h(t.nullCount,0))},b.decode=function(e){return new b(e.length(),e.nullCount())},y.encode=function(e,t){return i.Buffer.createBuffer(e,new h(t.offset,0),new h(t.length,0))},y.decode=function(e){return new y(e.offset(),e.length())};const k=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()},60786:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecordBatchFileReader=t.RecordBatchFileReader=t.AsyncRecordBatchStreamReader=t.RecordBatchStreamReader=t.RecordBatchReader=void 0;const r=n(28001),i=n(60119),o=n(70171),a=n(20497),s=n(89174),l=n(40351),c=n(83221),u=n(67143),h=n(42727),d=n(12744),f=n(13138),p=n(5992);class g extends d.ReadableInterop{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return p.isPromise(t)?t.then((()=>this)):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return s.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return s.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof g?e:p.isArrowJSON(e)?function(e){return new m(new T(e))}(e):p.isFileHandle(e)?function(e){return r.__awaiter(this,void 0,void 0,(function*(){const{size:t}=yield e.stat(),n=new c.AsyncRandomAccessFile(e,t);return t>=f.magicX2AndPadding&&f.checkForMagicArrowString(yield n.readAt(0,f.magicLength+7&-8))?new b(new k(n)):new v(new w(n))}))}(e):p.isPromise(e)?(()=>r.__awaiter(this,void 0,void 0,(function*(){return yield g.from(yield e)})))():p.isFetchResponse(e)||p.isReadableDOMStream(e)||p.isReadableNodeStream(e)||p.isAsyncIterable(e)?function(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=yield e.peek(f.magicLength+7&-8);return t&&t.byteLength>=4?f.checkForMagicArrowString(t)?new y(new A(yield e.read())):new v(new w(e)):new v(new w(function(){return r.__asyncGenerator(this,arguments,(function*(){}))}()))}))}(new l.AsyncByteStream(e)):function(e){const t=e.peek(f.magicLength+7&-8);return t&&t.byteLength>=4?f.checkForMagicArrowString(t)?new y(new A(e.read())):new m(new x(e)):new m(new x(function*(){}()))}(new l.ByteStream(e))}static readAll(e){return e instanceof g?e.isSync()?E(e):C(e):p.isArrowJSON(e)||ArrayBuffer.isView(e)||p.isIterable(e)||p.isIteratorResult(e)?E(e):C(e)}}t.RecordBatchReader=g;class m extends g{constructor(e){super(e),this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return r.__asyncGenerator(this,arguments,(function*(){yield r.__await(yield*r.__asyncDelegator(r.__asyncValues(this[Symbol.iterator]())))}))}}t.RecordBatchStreamReader=m;class v extends g{constructor(e){super(e),this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}t.AsyncRecordBatchStreamReader=v;class y extends m{constructor(e){super(e),this._impl=e}}t.RecordBatchFileReader=y;class b extends v{constructor(e){super(e),this._impl=e}}t.AsyncRecordBatchFileReader=b;class _{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new h.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){const{id:n,isDelta:r,data:o}=e,{dictionaries:a,schema:s}=this,l=a.get(n);if(r||!l){const e=s.dictionaries.get(n);return l&&r?l.concat(i.Vector.new(this._loadVectors(o,t,[e])[0])):i.Vector.new(this._loadVectors(o,t,[e])[0])}return l}_loadVectors(e,t,n){return new u.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}class x extends _{constructor(e,t){super(t),this._reader=p.isArrowJSON(e)?new f.JSONMessageReader(this._handle=e):new f.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=S(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):d.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):d.ITERATOR_DONE}next(){if(this.closed)return d.ITERATOR_DONE;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new h._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class w extends _{constructor(e,t){super(t),this._reader=new f.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return r.__awaiter(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(e){return r.__awaiter(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=S(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(e){return r.__awaiter(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):d.ITERATOR_DONE}))}return(e){return r.__awaiter(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):d.ITERATOR_DONE}))}next(){return r.__awaiter(this,void 0,void 0,(function*(){if(this.closed)return d.ITERATOR_DONE;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new h._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this._reader.readMessage(e)}))}}class A extends x{constructor(e,t){super(e instanceof c.RandomAccessFile?e:new c.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();const t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){const e=this._reader.readMessage(o.MessageHeader.RecordBatch);if(null==e?void 0:e.isRecordBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}_readDictionaryBatch(e){const t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){const e=this._reader.readMessage(o.MessageHeader.DictionaryBatch);if(null==e?void 0:e.isDictionaryBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){const{_handle:e}=this,t=e.size-f.magicAndPadding,n=e.readInt32(t),r=e.readAt(t-n,n);return a.Footer.decode(r)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}}class k extends w{constructor(e,...t){const n="number"!=typeof t[0]?t.shift():void 0,r=t[0]instanceof Map?t.shift():void 0;super(e instanceof c.AsyncRandomAccessFile?e:new c.AsyncRandomAccessFile(e,n),r)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){const t=Object.create(null,{open:{get:()=>super.open}});return r.__awaiter(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)}))}readRecordBatch(e){return r.__awaiter(this,void 0,void 0,(function*(){if(this.closed)return null;this._footer||(yield this.open());const t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){const e=yield this._reader.readMessage(o.MessageHeader.RecordBatch);if(null==e?void 0:e.isRecordBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}))}_readDictionaryBatch(e){return r.__awaiter(this,void 0,void 0,(function*(){const t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){const e=yield this._reader.readMessage(o.MessageHeader.DictionaryBatch);if(null==e?void 0:e.isDictionaryBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}))}_readFooter(){return r.__awaiter(this,void 0,void 0,(function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-f.magicAndPadding,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return a.Footer.decode(r)}))}_readNextMessageAndValidate(e){return r.__awaiter(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null}))}}class T extends x{constructor(e,t){super(e,t)}_loadVectors(e,t,n){return new u.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}function S(e,t){return t&&"boolean"==typeof t.autoDestroy?t.autoDestroy:e.autoDestroy}function*E(e){const t=g.from(e);try{if(!t.open({autoDestroy:!1}).closed)do{yield t}while(!t.reset().open().closed)}finally{t.cancel()}}function C(e){return r.__asyncGenerator(this,arguments,(function*(){const t=yield r.__await(g.from(e));try{if(!(yield r.__await(t.open({autoDestroy:!1}))).closed)do{yield yield r.__await(t)}while(!(yield r.__await(t.reset().open())).closed)}finally{yield r.__await(t.cancel())}}))}},890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecordBatchJSONWriter=t.RecordBatchFileWriter=t.RecordBatchStreamWriter=t.RecordBatchWriter=void 0;const r=n(28001),i=n(10766),o=n(13138),a=n(75507),s=n(40068),l=n(89),c=n(71005),u=n(71005),h=n(20497),d=n(70171),f=n(16480),p=n(40351),g=n(37038),m=n(6715),v=n(18088),y=n(56616),b=n(42727),_=n(12744),x=n(5992);class w extends _.ReadableInterop{constructor(e){super(),this._position=0,this._started=!1,this._sink=new p.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,x.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy="boolean"!=typeof e.autoDestroy||e.autoDestroy,this._writeLegacyIpcFormat="boolean"==typeof e.writeLegacyIpcFormat&&e.writeLegacyIpcFormat}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return x.isPromise(e)?e.then((e=>this.writeAll(e))):x.isAsyncIterable(e)?E(this,e):S(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof p.AsyncByteQueue?this._sink=e:(this._sink=new p.AsyncByteQueue,e&&x.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&x.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,t&&f.compareSchemas(t,this._schema)||(null===t?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null==e)return this.finish()&&void 0;if(e instanceof i.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof b.RecordBatch&&!(t=e.schema))return this.finish()&&void 0;if(t&&!f.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof b.RecordBatch?e instanceof b._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof i.Table?this.writeAll(e.chunks):x.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){const n=t-1,r=c.Message.encode(e),i=r.byteLength,o=this._writeLegacyIpcFormat?4:8,a=i+o+n&~n,s=a-i-o;return e.headerType===d.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new h.FileBlock(a,e.bodyLength,this._position)):e.headerType===d.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new h.FileBlock(a,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){const t=y.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(c.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(o.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=g.VectorAssembler.assemble(e),o=new u.RecordBatch(e.length,n,r),a=c.Message.from(o,t);return this._writeDictionaries(e)._writeMessage(a)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));const{byteLength:r,nodes:i,bufferRegions:o,buffers:a}=g.VectorAssembler.assemble(e),s=new u.RecordBatch(e.length,i,o),l=new u.DictionaryBatch(s,t,n),h=c.Message.from(l,r);return this._writeMessage(h)._writeBodyBuffers(a)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,o=e.length;++i<o;)(t=e[i])&&(n=t.byteLength)>0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){for(let[t,n]of e.dictionaries){let e=this._dictionaryDeltaOffsets.get(t)||0;if(0===e||(n=n.slice(e)).length>0){const r="chunks"in n?n.chunks:[n];for(const n of r)this._writeDictionaryBatch(n,t,e>0),e+=n.length}}return this}}t.RecordBatchWriter=w;class A extends w{static writeAll(e,t){const n=new A(t);return x.isPromise(e)?e.then((e=>n.writeAll(e))):x.isAsyncIterable(e)?E(n,e):S(n,e)}}t.RecordBatchStreamWriter=A;class k extends w{static writeAll(e){const t=new k;return x.isPromise(e)?e.then((e=>t.writeAll(e))):x.isAsyncIterable(e)?E(t,e):S(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const t=h.Footer.encode(new h.Footer(e,d.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}t.RecordBatchFileWriter=k;class T extends w{constructor(){super(),this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return(new T).writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{\n "schema": ${JSON.stringify({fields:e.fields.map(C)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,n=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(0===this._dictionaryBlocks.length?" ":",\n "),this._write(`${function(e,t,n=!1){const r=new l.Field(`${t}`,e.type,e.nullCount>0),i=v.JSONVectorAssembler.assemble(new a.Column(r,[e]));return JSON.stringify({id:t,isDelta:n,data:{count:e.length,columns:i}},null,2)}(e,t,n)}`),this._dictionaryBlocks.push(new h.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(',\n "dictionaries": [\n');for(const e of this._dictionaries)super._writeDictionaries(e);this._write("\n ]")}if(this._recordBatches.length>0){for(let t=-1,n=this._recordBatches.length;++t<n;)this._write(0===t?',\n "batches": [\n ':",\n "),this._write(`${e=this._recordBatches[t],JSON.stringify({count:e.length,columns:v.JSONVectorAssembler.assemble(e)},null,2)}`),this._recordBatchBlocks.push(new h.FileBlock(0,0,0));this._write("\n ]")}var e;return this._schema&&this._write("\n}"),this._dictionaries=[],this._recordBatches=[],super.close()}}function S(e,t){let n=t;t instanceof i.Table&&(n=t.chunks,e.reset(void 0,t.schema));for(const t of n)e.write(t);return e.finish()}function E(e,t){var n,i,o,a;return r.__awaiter(this,void 0,void 0,(function*(){try{for(n=r.__asyncValues(t);!(i=yield n.next()).done;){const t=i.value;e.write(t)}}catch(e){o={error:e}}finally{try{i&&!i.done&&(a=n.return)&&(yield a.call(n))}finally{if(o)throw o.error}}return e.finish()}))}function C({name:e,type:t,nullable:n}){const r=new m.JSONTypeAssembler;return{name:e,nullable:n,type:r.visit(t),children:(t.children||[]).map(C),dictionary:s.DataType.isDictionary(t)?{id:t.id,isOrdered:t.isOrdered,indexType:r.visit(t.indices)}:void 0}}t.RecordBatchJSONWriter=T},42727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._InternalEmptyPlaceholderRecordBatch=t.RecordBatch=void 0;const r=n(76076),i=n(10766),o=n(60119),a=n(17903),s=n(89),l=n(5992),c=n(94717),u=n(63620),h=n(40068),d=n(86716),f=n(30033);class p extends f.StructVector{constructor(...e){let t;const n=e[0];let i;if(e[1]instanceof r.Data)[,t,i]=e;else{const i=n.fields,[,o,a]=e;t=r.Data.Struct(new h.Struct(i),0,o,0,null,a)}super(t,i),this._schema=n}static from(e){return l.isIterable(e.values),i.Table.from(e)}static new(...e){const[t,n]=u.selectFieldArgs(e),r=n.filter((e=>e instanceof o.Vector));return new p(...d.ensureSameLengthData(new s.Schema(t),r.map((e=>e.data))))}clone(e,t=this._children){return new p(this._schema,e,t)}concat(...e){const t=this._schema,n=c.Chunked.flatten(this,...e);return new i.Table(t,n.map((({data:e})=>new p(t,e))))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=g.collect(this))}select(...e){const t=this._schema.fields.reduce(((e,t,n)=>e.set(t.name,n)),new Map);return this.selectAt(...e.map((e=>t.get(e))).filter((e=>e>-1)))}selectAt(...e){const t=this._schema.selectAt(...e),n=e.map((e=>this.data.childData[e])).filter(Boolean);return new p(t,this.length,n)}}t.RecordBatch=p,t._InternalEmptyPlaceholderRecordBatch=class extends p{constructor(e){super(e,0,e.fields.map((e=>r.Data.new(e.type,0,0,0))))}};class g extends a.Visitor{constructor(){super(...arguments),this.dictionaries=new Map}static collect(e){return(new g).visit(e.data,new h.Struct(e.schema.fields)).dictionaries}visit(e,t){return h.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach(((e,n)=>this.visit(e,t.children[n].type))),this)}visitDictionary(e,t){const n=e.dictionary;return n&&n.length>0&&this.dictionaries.set(t.id,n),this}}},89:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=t.Schema=void 0;const r=n(40068);class i{constructor(e=[],t,n){this.fields=e||[],this.metadata=t||new Map,n||(n=s(e)),this.dictionaries=n}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map(((e,t)=>`${t}: ${e}`)).join(", ")} }>`}select(...e){const t=e.reduce(((e,t)=>(e[t]=!0)&&e),Object.create(null));return new i(this.fields.filter((e=>t[e.name])),this.metadata)}selectAt(...e){return new i(e.map((e=>this.fields[e])).filter(Boolean),this.metadata)}assign(...e){const t=e[0]instanceof i?e[0]:Array.isArray(e[0])?new i(e[0]):new i(e),n=[...this.fields],r=a(a(new Map,this.metadata),t.metadata),o=t.fields.filter((e=>{const t=n.findIndex((t=>t.name===e.name));return!~t||(n[t]=e.clone({metadata:a(a(new Map,n[t].metadata),e.metadata)}))&&!1})),l=s(o,new Map);return new i([...n,...o],r,new Map([...this.dictionaries,...l]))}}t.Schema=i;class o{constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}static new(...e){let[t,n,r,i]=e;return e[0]&&"object"==typeof e[0]&&(({name:t}=e[0]),void 0===n&&(n=e[0].type),void 0===r&&(r=e[0].nullable),void 0===i&&(i=e[0].metadata)),new o(`${t}`,n,r,i)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,n,r,i]=e;return e[0]&&"object"==typeof e[0]?({name:t=this.name,type:n=this.type,nullable:r=this.nullable,metadata:i=this.metadata}=e[0]):[t=this.name,n=this.type,r=this.nullable,i=this.metadata]=e,o.new(t,n,r,i)}}function a(e,t){return new Map([...e||new Map,...t||new Map])}function s(e,t=new Map){for(let n=-1,i=e.length;++n<i;){const i=e[n].type;if(r.DataType.isDictionary(i))if(t.has(i.id)){if(t.get(i.id)!==i.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else t.set(i.id,i.dictionary);i.children&&i.children.length>0&&s(i.children,t)}return t}t.Field=o,i.prototype.fields=null,i.prototype.metadata=null,i.prototype.dictionaries=null,o.prototype.type=null,o.prototype.name=null,o.prototype.nullable=null,o.prototype.metadata=null},10766:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Table=void 0;const r=n(28001),i=n(75507),o=n(60786),a=n(890),s=n(42727),l=n(89),c=n(40068),u=n(63620),h=n(5992),d=n(86716),f=n(30033);class p extends f.Chunked{constructor(...e){var t;let n=null;e[0]instanceof l.Schema&&(n=e[0]);const r=e[0]instanceof p?e[0].chunks:u.selectArgs(s.RecordBatch,e);if(!n&&!(n=null===(t=r[0])||void 0===t?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");r[0]||(r[0]=new s._InternalEmptyPlaceholderRecordBatch(n)),super(new c.Struct(n.fields),r),this._schema=n,this._chunks=r}static empty(e=new l.Schema([])){return new p(e,[])}static from(e){if(!e)return p.empty();if("object"==typeof e){const t=h.isIterable(e.values)?function(e){const{type:t}=e;return t instanceof c.Struct?p.fromStruct(f.StructVector.from(e)):null}(e):h.isAsyncIterable(e.values)?function(e){const{type:t}=e;return t instanceof c.Struct?f.StructVector.from(e).then((e=>p.fromStruct(e))):null}(e):null;if(null!==t)return t}let t=o.RecordBatchReader.from(e);return h.isPromise(t)?(()=>r.__awaiter(this,void 0,void 0,(function*(){return yield p.from(yield t)})))():t.isSync()&&(t=t.open())?t.schema?new p(t.schema,[...t]):p.empty():(e=>r.__awaiter(this,void 0,void 0,(function*(){var t,n;const i=yield e,o=i.schema,a=[];if(o){try{for(var s,l=r.__asyncValues(i);!(s=yield l.next()).done;){const e=s.value;a.push(e)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=l.return)&&(yield n.call(l))}finally{if(t)throw t.error}}return new p(o,a)}return p.empty()})))(t.open())}static fromAsync(e){return r.__awaiter(this,void 0,void 0,(function*(){return yield p.from(e)}))}static fromStruct(e){return p.new(e.data.childData,e.type.children)}static new(...e){return new p(...d.distributeColumnsIntoRecordBatches(u.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new p(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex((t=>t.name===e))}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,n;const r=this._schema.fields,o=this._children||(this._children=[]);if(n=o[e])return n;if(t=r[e]){const n=this._chunks.map((t=>t.getChildAt(e))).filter((e=>null!=e));if(n.length>0)return o[e]=new i.Column(t,n)}return null}serialize(e="binary",t=!0){return(t?a.RecordBatchStreamWriter:a.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){const t=this._schema.fields.reduce(((e,t,n)=>e.set(t.name,n)),new Map);return this.selectAt(...e.map((e=>t.get(e))).filter((e=>e>-1)))}selectAt(...e){const t=this._schema.selectAt(...e);return new p(t,this._chunks.map((({length:n,data:{childData:r}})=>new s.RecordBatch(t,n,e.map((e=>r[e])).filter(Boolean)))))}assign(e){const t=this._schema.fields,[n,r]=e.schema.fields.reduce(((e,n,r)=>{const[i,o]=e,a=t.findIndex((e=>e.name===n.name));return~a?o[a]=r:i.push(r),e}),[[],[]]),i=this._schema.assign(e.schema),o=[...t.map(((t,n,i,o=r[n])=>void 0===o?this.getColumnAt(n):e.getColumnAt(o))),...n.map((t=>e.getColumnAt(t)))].filter(Boolean);return new p(...d.distributeVectorsIntoRecordBatches(i,o))}}t.Table=p},40068:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.strideForType=t.Dictionary=t.Map_=t.FixedSizeList=t.FixedSizeBinary=t.SparseUnion=t.DenseUnion=t.Union=t.Struct=t.List=t.IntervalYearMonth=t.IntervalDayTime=t.Interval=t.TimestampNanosecond=t.TimestampMicrosecond=t.TimestampMillisecond=t.TimestampSecond=t.Timestamp=t.TimeNanosecond=t.TimeMicrosecond=t.TimeMillisecond=t.TimeSecond=t.Time=t.DateMillisecond=t.DateDay=t.Date_=t.Decimal=t.Bool=t.Utf8=t.Binary=t.Float64=t.Float32=t.Float16=t.Float=t.Uint64=t.Uint32=t.Uint16=t.Uint8=t.Int64=t.Int32=t.Int16=t.Int8=t.Int=t.Null=t.DataType=void 0;const r=n(70171);class i{static isNull(e){return(null==e?void 0:e.typeId)===r.Type.Null}static isInt(e){return(null==e?void 0:e.typeId)===r.Type.Int}static isFloat(e){return(null==e?void 0:e.typeId)===r.Type.Float}static isBinary(e){return(null==e?void 0:e.typeId)===r.Type.Binary}static isUtf8(e){return(null==e?void 0:e.typeId)===r.Type.Utf8}static isBool(e){return(null==e?void 0:e.typeId)===r.Type.Bool}static isDecimal(e){return(null==e?void 0:e.typeId)===r.Type.Decimal}static isDate(e){return(null==e?void 0:e.typeId)===r.Type.Date}static isTime(e){return(null==e?void 0:e.typeId)===r.Type.Time}static isTimestamp(e){return(null==e?void 0:e.typeId)===r.Type.Timestamp}static isInterval(e){return(null==e?void 0:e.typeId)===r.Type.Interval}static isList(e){return(null==e?void 0:e.typeId)===r.Type.List}static isStruct(e){return(null==e?void 0:e.typeId)===r.Type.Struct}static isUnion(e){return(null==e?void 0:e.typeId)===r.Type.Union}static isFixedSizeBinary(e){return(null==e?void 0:e.typeId)===r.Type.FixedSizeBinary}static isFixedSizeList(e){return(null==e?void 0:e.typeId)===r.Type.FixedSizeList}static isMap(e){return(null==e?void 0:e.typeId)===r.Type.Map}static isDictionary(e){return(null==e?void 0:e.typeId)===r.Type.Dictionary}get typeId(){return r.Type.NONE}}var o;t.DataType=i,i[Symbol.toStringTag]=((o=i.prototype).children=null,o.ArrayType=Array,o[Symbol.toStringTag]="DataType");class a extends i{toString(){return"Null"}get typeId(){return r.Type.Null}}t.Null=a,a[Symbol.toStringTag]=(e=>e[Symbol.toStringTag]="Null")(a.prototype);class s extends i{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return r.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}t.Int=s,s[Symbol.toStringTag]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(s.prototype);class l extends s{constructor(){super(!0,8)}}t.Int8=l;class c extends s{constructor(){super(!0,16)}}t.Int16=c;class u extends s{constructor(){super(!0,32)}}t.Int32=u;class h extends s{constructor(){super(!0,64)}}t.Int64=h;class d extends s{constructor(){super(!1,8)}}t.Uint8=d;class f extends s{constructor(){super(!1,16)}}t.Uint16=f;class p extends s{constructor(){super(!1,32)}}t.Uint32=p;class g extends s{constructor(){super(!1,64)}}t.Uint64=g,Object.defineProperty(l.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(c.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(u.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(h.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(d.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(f.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(p.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(g.prototype,"ArrayType",{value:Uint32Array});class m extends i{constructor(e){super(),this.precision=e}get typeId(){return r.Type.Float}get ArrayType(){switch(this.precision){case r.Precision.HALF:return Uint16Array;case r.Precision.SINGLE:return Float32Array;case r.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}t.Float=m,m[Symbol.toStringTag]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(m.prototype);class v extends m{constructor(){super(r.Precision.HALF)}}t.Float16=v;class y extends m{constructor(){super(r.Precision.SINGLE)}}t.Float32=y;class b extends m{constructor(){super(r.Precision.DOUBLE)}}t.Float64=b,Object.defineProperty(v.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(y.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(b.prototype,"ArrayType",{value:Float64Array});class _ extends i{constructor(){super()}get typeId(){return r.Type.Binary}toString(){return"Binary"}}t.Binary=_,_[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(_.prototype);class x extends i{constructor(){super()}get typeId(){return r.Type.Utf8}toString(){return"Utf8"}}t.Utf8=x,x[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(x.prototype);class w extends i{constructor(){super()}get typeId(){return r.Type.Bool}toString(){return"Bool"}}t.Bool=w,w[Symbol.toStringTag]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(w.prototype);class A extends i{constructor(e,t){super(),this.scale=e,this.precision=t}get typeId(){return r.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}t.Decimal=A,A[Symbol.toStringTag]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(A.prototype);class k extends i{constructor(e){super(),this.unit=e}get typeId(){return r.Type.Date}toString(){return`Date${32*(this.unit+1)}<${r.DateUnit[this.unit]}>`}}t.Date_=k,k[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"))(k.prototype),t.DateDay=class extends k{constructor(){super(r.DateUnit.DAY)}},t.DateMillisecond=class extends k{constructor(){super(r.DateUnit.MILLISECOND)}};class T extends i{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return r.Type.Time}toString(){return`Time${this.bitWidth}<${r.TimeUnit[this.unit]}>`}}t.Time=T,T[Symbol.toStringTag]=(e=>(e.unit=null,e.bitWidth=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Time"))(T.prototype),t.TimeSecond=class extends T{constructor(){super(r.TimeUnit.SECOND,32)}},t.TimeMillisecond=class extends T{constructor(){super(r.TimeUnit.MILLISECOND,32)}},t.TimeMicrosecond=class extends T{constructor(){super(r.TimeUnit.MICROSECOND,64)}},t.TimeNanosecond=class extends T{constructor(){super(r.TimeUnit.NANOSECOND,64)}};class S extends i{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return r.Type.Timestamp}toString(){return`Timestamp<${r.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}t.Timestamp=S,S[Symbol.toStringTag]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"))(S.prototype),t.TimestampSecond=class extends S{constructor(e){super(r.TimeUnit.SECOND,e)}},t.TimestampMillisecond=class extends S{constructor(e){super(r.TimeUnit.MILLISECOND,e)}},t.TimestampMicrosecond=class extends S{constructor(e){super(r.TimeUnit.MICROSECOND,e)}},t.TimestampNanosecond=class extends S{constructor(e){super(r.TimeUnit.NANOSECOND,e)}};class E extends i{constructor(e){super(),this.unit=e}get typeId(){return r.Type.Interval}toString(){return`Interval<${r.IntervalUnit[this.unit]}>`}}t.Interval=E,E[Symbol.toStringTag]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(E.prototype),t.IntervalDayTime=class extends E{constructor(){super(r.IntervalUnit.DAY_TIME)}},t.IntervalYearMonth=class extends E{constructor(){super(r.IntervalUnit.YEAR_MONTH)}};class C extends i{constructor(e){super(),this.children=[e]}get typeId(){return r.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}t.List=C,C[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(C.prototype);class M extends i{constructor(e){super(),this.children=e}get typeId(){return r.Type.Struct}toString(){return`Struct<{${this.children.map((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}t.Struct=M,M[Symbol.toStringTag]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(M.prototype);class O extends i{constructor(e,t,n){super(),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce(((e,t,n)=>(e[t]=n)&&e||e),Object.create(null))}get typeId(){return r.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((e=>`${e.type}`)).join(" | ")}>`}}t.Union=O,O[Symbol.toStringTag]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(O.prototype),t.DenseUnion=class extends O{constructor(e,t){super(r.UnionMode.Dense,e,t)}},t.SparseUnion=class extends O{constructor(e,t){super(r.UnionMode.Sparse,e,t)}};class L extends i{constructor(e){super(),this.byteWidth=e}get typeId(){return r.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}t.FixedSizeBinary=L,L[Symbol.toStringTag]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(L.prototype);class D extends i{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return r.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}t.FixedSizeList=D,D[Symbol.toStringTag]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(D.prototype);class I extends i{constructor(e,t=!1){super(),this.children=[e],this.keysSorted=t}get typeId(){return r.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}t.Map_=I,I[Symbol.toStringTag]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(I.prototype);const R=(P=-1,()=>++P);var P;class N extends i{constructor(e,t,n,r){super(),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=null==n?R():"number"==typeof n?n:n.low}get typeId(){return r.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}t.Dictionary=N,N[Symbol.toStringTag]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(N.prototype),t.strideForType=function(e){const t=e;switch(e.typeId){case r.Type.Decimal:return 4;case r.Type.Timestamp:return 2;case r.Type.Date:case r.Type.Interval:return 1+t.unit;case r.Type.Int:case r.Type.Time:return+(t.bitWidth>32)+1;case r.Type.FixedSizeList:return t.listSize;case r.Type.FixedSizeBinary:return t.byteWidth;default:return 1}}},63620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectColumnChildrenArgs=t.selectVectorChildrenArgs=t.selectChunkArgs=t.selectFieldArgs=t.selectColumnArgs=t.selectArgs=t.arrayTypeToDataType=t.isTypedArray=void 0;const r=n(76076),i=n(89),o=n(75507),a=n(60119),s=n(40068),l=n(94717),c=Array.isArray;function u(e){return ArrayBuffer.isView(e)&&"BYTES_PER_ELEMENT"in e}function h(e){switch(e){case Int8Array:return s.Int8;case Int16Array:return s.Int16;case Int32Array:return s.Int32;case BigInt64Array:return s.Int64;case Uint8Array:return s.Uint8;case Uint16Array:return s.Uint16;case Uint32Array:return s.Uint32;case BigUint64Array:return s.Uint64;case Float32Array:return s.Float32;case Float64Array:return s.Float64;default:return null}}function d(e,t,n,r){let i,o=r,a=-1;const s=t.length;for(;++a<s;)c(i=t[a])?o=d(e,i,n,o).length:i instanceof e&&(n[o++]=i);return n}function f(e,t,n,r){let i,o=r,a=-1;const s=t.length;for(;++a<s;)c(i=t[a])?o=f(e,i,n,o).length:i instanceof l.Chunked?o=f(e,i.chunks,n,o).length:i instanceof e&&(n[o++]=i);return n}function p(e,t,n,r){let i,o=r,s=-1;const l=t.length;for(;++s<l;)c(i=t[s])?o=p(e,i,n,o).length:i instanceof e?o=d(a.Vector,i.schema.fields.map(((e,t)=>i.getChildAt(t))),n,o).length:i instanceof a.Vector&&(n[o++]=i);return n}function g(e,t,n,r){let i,a=r,s=-1;const l=t.length;for(;++s<l;)c(i=t[s])?a=g(e,i,n,a).length:i instanceof e?a=d(o.Column,i.schema.fields.map(((e,t)=>o.Column.new(e,i.getChildAt(t)))),n,a).length:i instanceof o.Column&&(n[a++]=i);return n}t.isTypedArray=u,t.arrayTypeToDataType=h,t.selectArgs=(e,t)=>d(e,t,[],0),t.selectColumnArgs=e=>{const[t,n]=v(e,[[],[]]);return n.map(((e,n)=>e instanceof o.Column?o.Column.new(e.field.clone(t[n]),e):e instanceof a.Vector?o.Column.new(t[n],e):u(e)?o.Column.new(t[n],function(e){const t=h(e.constructor);if(!t)throw new TypeError("Unrecognized Array input");const n=new t,i=r.Data.new(n,0,e.length,0,[void 0,e]);return a.Vector.new(i)}(e)):o.Column.new(t[n],[])))},t.selectFieldArgs=e=>v(e,[[],[]]),t.selectChunkArgs=(e,t)=>f(e,t,[],0),t.selectVectorChildrenArgs=(e,t)=>p(e,t,[],0),t.selectColumnChildrenArgs=(e,t)=>g(e,t,[],0);const m=(e,[t,n],r)=>(e[0][r]=t,e[1][r]=n,e);function v(e,t){let n,l;switch(l=e.length){case 0:return t;case 1:if(n=t[0],!e[0])return t;if(c(e[0]))return v(e[0],t);e[0]instanceof r.Data||e[0]instanceof a.Vector||u(e[0])||e[0]instanceof s.DataType||([n,e]=Object.entries(e[0]).reduce(m,t));break;default:c(n=e[l-1])?e=c(e[0])?e[0]:e.slice(0,l-1):(e=c(e[0])?e[0]:e,n=[])}let h=-1,d=-1,f=-1;const p=e.length;let g,y;const[b,_]=t;for(;++f<p;)y=e[f],y instanceof o.Column&&(_[++d]=y)?b[++h]=y.field.clone(n[f],y.type,!0):(({[f]:g=f}=n),y instanceof s.DataType&&(_[++d]=y)?b[++h]=i.Field.new(g,y,!0):(null==y?void 0:y.type)&&(_[++d]=y)&&(y instanceof r.Data&&(_[d]=y=a.Vector.new(y)),b[++h]=i.Field.new(g,y.type,!0)));return t}},77192:(e,t)=>{"use strict";function n(e,t,n,r){return 0!=(n&1<<r)}function r(e,t,n,r){return(n&1<<r)>>r}function i(e){const t=[];let n=0,r=0,i=0;for(const o of e)o&&(i|=1<<r),8==++r&&(t[n++]=i,i=r=0);(0===n||r>0)&&(t[n++]=i);const o=new Uint8Array(t.length+7&-8);return o.set(t),o}Object.defineProperty(t,"__esModule",{value:!0}),t.popcnt_uint32=t.popcnt_array=t.popcnt_bit_range=t.BitIterator=t.packBools=t.truncateBitmap=t.setBool=t.getBit=t.getBool=void 0,t.getBool=n,t.getBit=r,t.setBool=function(e,t,n){return n?!!(e[t>>3]|=1<<t%8)||!0:!(e[t>>3]&=~(1<<t%8))&&!1},t.truncateBitmap=function(e,t,r){const a=r.byteLength+7&-8;if(e>0||r.byteLength<a){const s=new Uint8Array(a);return s.set(e%8==0?r.subarray(e>>3):i(new o(r,e,t,null,n)).subarray(0,a)),s}return r},t.packBools=i;class o{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function a(e,t,n){let r=0,i=0|t;const o=new DataView(e.buffer,e.byteOffset,e.byteLength),a=void 0===n?e.byteLength:i+n;for(;a-i>=4;)r+=s(o.getUint32(i)),i+=4;for(;a-i>=2;)r+=s(o.getUint16(i)),i+=2;for(;a-i>=1;)r+=s(o.getUint8(i)),i+=1;return r}function s(e){let t=0|e;return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24}t.BitIterator=o,t.popcnt_bit_range=function e(t,n,i){if(i-n<=0)return 0;if(i-n<8){let e=0;for(const a of new o(t,n,i-n,t,r))e+=a;return e}const s=i>>3<<3,l=n+(n%8==0?0:8-n%8);return e(t,n,l)+e(t,s,i)+a(t,l>>3,s-l>>3)},t.popcnt_array=a,t.popcnt_uint32=s},87698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BN=t.bignumToBigInt=t.bignumToString=t.isArrowBigNumSymbol=void 0;const r=n(56616),i=n(5992);function o(e,...t){return 0===t.length?Object.setPrototypeOf(r.toArrayBufferView(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}function a(...e){return o.apply(this,e)}function s(...e){return o.apply(this,e)}function l(...e){return o.apply(this,e)}function c(e){const{buffer:t,byteOffset:n,length:r,signed:i}=e,o=new Int32Array(t,n,r);let a=0,s=0;const l=o.length;let c,u;for(;s<l;)u=o[s++],c=o[s++],i||(c>>>=0),a+=(u>>>0)+c*Math.pow(s,32);return a}function u(e){let t="";const n=new Uint32Array(2);let r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);const i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer);let o=-1;const a=r.length-1;do{for(n[0]=r[o=0];o<a;)r[o++]=n[1]=n[0]/10,n[0]=(n[0]-10*n[1]<<16)+r[o];r[o]=n[1]=n[0]/10,n[0]=n[0]-10*n[1],t=`${n[0]}${t}`}while(i[0]||i[1]||i[2]||i[3]);return t||"0"}t.isArrowBigNumSymbol=Symbol.for("isArrowBigNum"),o.prototype[t.isArrowBigNumSymbol]=!0,o.prototype.toJSON=function(){return`"${t.bignumToString(this)}"`},o.prototype.valueOf=function(){return c(this)},o.prototype.toString=function(){return t.bignumToString(this)},o.prototype[Symbol.toPrimitive]=function(e="default"){switch(e){case"number":return c(this);case"string":return t.bignumToString(this);case"default":return t.bignumToBigInt(this)}return t.bignumToString(this)},Object.setPrototypeOf(a.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(s.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(l.prototype,Object.create(Uint32Array.prototype)),Object.assign(a.prototype,o.prototype,{constructor:a,signed:!0,TypedArray:Int32Array,BigIntArray:i.BigInt64Array}),Object.assign(s.prototype,o.prototype,{constructor:s,signed:!1,TypedArray:Uint32Array,BigIntArray:i.BigUint64Array}),Object.assign(l.prototype,o.prototype,{constructor:l,signed:!0,TypedArray:Uint32Array,BigIntArray:i.BigUint64Array}),i.BigIntAvailable?(t.bignumToBigInt=e=>8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:u(e),t.bignumToString=e=>8===e.byteLength?`${new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}`:u(e)):(t.bignumToString=u,t.bignumToBigInt=t.bignumToString);class h{static new(e,t){switch(t){case!0:return new a(e);case!1:return new s(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case i.BigInt64Array:return new a(e)}return 16===e.byteLength?new l(e):new s(e)}static signed(e){return new a(e)}static unsigned(e){return new s(e)}static decimal(e){return new l(e)}constructor(e,t){return h.new(e,t)}}t.BN=h},56616:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareArrayLike=t.rebaseValueOffsets=t.toUint8ClampedArrayAsyncIterator=t.toFloat64ArrayAsyncIterator=t.toFloat32ArrayAsyncIterator=t.toUint32ArrayAsyncIterator=t.toUint16ArrayAsyncIterator=t.toUint8ArrayAsyncIterator=t.toInt32ArrayAsyncIterator=t.toInt16ArrayAsyncIterator=t.toInt8ArrayAsyncIterator=t.toArrayBufferViewAsyncIterator=t.toUint8ClampedArrayIterator=t.toFloat64ArrayIterator=t.toFloat32ArrayIterator=t.toUint32ArrayIterator=t.toUint16ArrayIterator=t.toUint8ArrayIterator=t.toInt32ArrayIterator=t.toInt16ArrayIterator=t.toInt8ArrayIterator=t.toArrayBufferViewIterator=t.toUint8ClampedArray=t.toFloat64Array=t.toFloat32Array=t.toBigUint64Array=t.toUint32Array=t.toUint16Array=t.toUint8Array=t.toBigInt64Array=t.toInt32Array=t.toInt16Array=t.toInt8Array=t.toArrayBufferView=t.joinUint8Arrays=t.memcpy=void 0;const r=n(28001),i=n(52385),o=n(75426);var a=i.flatbuffers.ByteBuffer;const s=n(5992),l="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function c(e,t,n=0,r=t.byteLength){const i=e.byteLength,o=new Uint8Array(e.buffer,e.byteOffset,i),a=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return o.set(a,n),e}function u(e,t){let n=s.isIteratorResult(t)?t.value:t;return n instanceof e?e===Uint8Array?new e(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=o.encodeUtf8(n)),n instanceof ArrayBuffer||n instanceof l?new e(n):n instanceof a?u(e,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new e(0):new e(n.buffer,n.byteOffset,n.byteLength/e.BYTES_PER_ELEMENT):e.from(n)):new e(0)}t.memcpy=c,t.joinUint8Arrays=function(e,t){const n=function(e){const t=e[0]?[e[0]]:[];let n,r,i,o;for(let a,s,l=0,c=0,u=e.length;++l<u;)a=t[c],s=e[l],!a||!s||a.buffer!==s.buffer||s.byteOffset<a.byteOffset?s&&(t[++c]=s):(({byteOffset:n,byteLength:i}=a),({byteOffset:r,byteLength:o}=s),n+i<r||r+o<n?s&&(t[++c]=s):t[c]=new Uint8Array(a.buffer,n,r-n+o));return t}(e),r=n.reduce(((e,t)=>e+t.byteLength),0);let i,o,a,s=0,l=-1;const u=Math.min(t||1/0,r);for(let e=n.length;++l<e;){if(i=n[l],o=i.subarray(0,Math.min(i.length,u-s)),u<=s+o.length){o.length<i.length?n[l]=i.subarray(o.length):o.length===i.length&&l++,a?c(a,o,s):a=o;break}c(a||(a=new Uint8Array(u)),o,s),s+=o.length}return[a||new Uint8Array(0),n.slice(l),r-(a?a.byteLength:0)]},t.toArrayBufferView=u,t.toInt8Array=e=>u(Int8Array,e),t.toInt16Array=e=>u(Int16Array,e),t.toInt32Array=e=>u(Int32Array,e),t.toBigInt64Array=e=>u(s.BigInt64Array,e),t.toUint8Array=e=>u(Uint8Array,e),t.toUint16Array=e=>u(Uint16Array,e),t.toUint32Array=e=>u(Uint32Array,e),t.toBigUint64Array=e=>u(s.BigUint64Array,e),t.toFloat32Array=e=>u(Float32Array,e),t.toFloat64Array=e=>u(Float64Array,e),t.toUint8ClampedArray=e=>u(Uint8ClampedArray,e);const h=e=>(e.next(),e);function*d(e,t){const n=function*(e){yield e},r="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof l?n(t):s.isIterable(t)?t:n(t);return yield*h(function*(t){let n=null;do{n=t.next(yield u(e,n))}while(!n.done)}(r[Symbol.iterator]())),new e}function f(e,t){return r.__asyncGenerator(this,arguments,(function*(){if(s.isPromise(t))return yield r.__await(yield r.__await(yield*r.__asyncDelegator(r.__asyncValues(f(e,yield r.__await(t))))));const n=function(e){return r.__asyncGenerator(this,arguments,(function*(){yield yield r.__await(yield r.__await(e))}))},i="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof l?n(t):s.isIterable(t)?function(e){return r.__asyncGenerator(this,arguments,(function*(){yield r.__await(yield*r.__asyncDelegator(r.__asyncValues(h(function*(e){let t=null;do{t=e.next(yield null==t?void 0:t.value)}while(!t.done)}(e[Symbol.iterator]())))))}))}(t):s.isAsyncIterable(t)?t:n(t);return yield r.__await(yield*r.__asyncDelegator(r.__asyncValues(h(function(t){return r.__asyncGenerator(this,arguments,(function*(){let n=null;do{n=yield r.__await(t.next(yield yield r.__await(u(e,n))))}while(!n.done)}))}(i[Symbol.asyncIterator]()))))),yield r.__await(new e)}))}t.toArrayBufferViewIterator=d,t.toInt8ArrayIterator=e=>d(Int8Array,e),t.toInt16ArrayIterator=e=>d(Int16Array,e),t.toInt32ArrayIterator=e=>d(Int32Array,e),t.toUint8ArrayIterator=e=>d(Uint8Array,e),t.toUint16ArrayIterator=e=>d(Uint16Array,e),t.toUint32ArrayIterator=e=>d(Uint32Array,e),t.toFloat32ArrayIterator=e=>d(Float32Array,e),t.toFloat64ArrayIterator=e=>d(Float64Array,e),t.toUint8ClampedArrayIterator=e=>d(Uint8ClampedArray,e),t.toArrayBufferViewAsyncIterator=f,t.toInt8ArrayAsyncIterator=e=>f(Int8Array,e),t.toInt16ArrayAsyncIterator=e=>f(Int16Array,e),t.toInt32ArrayAsyncIterator=e=>f(Int32Array,e),t.toUint8ArrayAsyncIterator=e=>f(Uint8Array,e),t.toUint16ArrayAsyncIterator=e=>f(Uint16Array,e),t.toUint32ArrayAsyncIterator=e=>f(Uint32Array,e),t.toFloat32ArrayAsyncIterator=e=>f(Float32Array,e),t.toFloat64ArrayAsyncIterator=e=>f(Float64Array,e),t.toUint8ClampedArrayAsyncIterator=e=>f(Uint8ClampedArray,e),t.rebaseValueOffsets=function(e,t,n){if(0!==e){n=n.slice(0,t+1);for(let r=-1;++r<=t;)n[r]+=e}return n},t.compareArrayLike=function(e,t){let n=0;const r=e.length;if(r!==t.length)return!1;if(r>0)do{if(e[n]!==t[n])return!1}while(++n<r);return!0}},5992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableNodeStream=t.isWritableNodeStream=t.isReadableDOMStream=t.isWritableDOMStream=t.isFetchResponse=t.isFSReadStream=t.isFileHandle=t.isUnderlyingSink=t.isIteratorResult=t.isArrayLike=t.isArrowJSON=t.isAsyncIterable=t.isIterable=t.isObservable=t.isPromise=t.isObject=t.BigUint64ArrayAvailable=t.BigUint64Array=t.BigInt64ArrayAvailable=t.BigInt64Array=t.BigIntAvailable=t.BigInt=void 0;const r=n(12744),[i,o]=(()=>{const e=()=>{throw new Error("BigInt is not available in this environment")};function t(){throw e()}return t.asIntN=()=>{throw e()},t.asUintN=()=>{throw e()},"undefined"!=typeof BigInt?[BigInt,!0]:[t,!1]})();t.BigInt=i,t.BigIntAvailable=o;const[a,s]=(()=>{const e=()=>{throw new Error("BigInt64Array is not available in this environment")};return"undefined"!=typeof BigInt64Array?[BigInt64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})();t.BigInt64Array=a,t.BigInt64ArrayAvailable=s;const[l,c]=(()=>{const e=()=>{throw new Error("BigUint64Array is not available in this environment")};return"undefined"!=typeof BigUint64Array?[BigUint64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})();t.BigUint64Array=l,t.BigUint64ArrayAvailable=c;const u=e=>"number"==typeof e,h=e=>"boolean"==typeof e,d=e=>"function"==typeof e;t.isObject=e=>null!=e&&Object(e)===e,t.isPromise=e=>t.isObject(e)&&d(e.then),t.isObservable=e=>t.isObject(e)&&d(e.subscribe),t.isIterable=e=>t.isObject(e)&&d(e[Symbol.iterator]),t.isAsyncIterable=e=>t.isObject(e)&&d(e[Symbol.asyncIterator]),t.isArrowJSON=e=>t.isObject(e)&&t.isObject(e.schema),t.isArrayLike=e=>t.isObject(e)&&u(e.length),t.isIteratorResult=e=>t.isObject(e)&&"done"in e&&"value"in e,t.isUnderlyingSink=e=>t.isObject(e)&&d(e.abort)&&d(e.close)&&d(e.start)&&d(e.write),t.isFileHandle=e=>t.isObject(e)&&d(e.stat)&&u(e.fd),t.isFSReadStream=e=>t.isReadableNodeStream(e)&&u(e.bytesRead),t.isFetchResponse=e=>t.isObject(e)&&t.isReadableDOMStream(e.body),t.isWritableDOMStream=e=>t.isObject(e)&&d(e.abort)&&d(e.getWriter)&&!(e instanceof r.ReadableInterop),t.isReadableDOMStream=e=>t.isObject(e)&&d(e.cancel)&&d(e.getReader)&&!(e instanceof r.ReadableInterop),t.isWritableNodeStream=e=>t.isObject(e)&&d(e.end)&&d(e.write)&&h(e.writable)&&!(e instanceof r.ReadableInterop),t.isReadableNodeStream=e=>t.isObject(e)&&d(e.read)&&d(e.pipe)&&h(e.readable)&&!(e instanceof r.ReadableInterop)},44696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partial2=t.partial1=t.partial0=void 0,t.partial0=function(e){return function(){return e(this)}},t.partial1=function(e){return function(t){return e(this,t)}},t.partial2=function(e){return function(t,n){return e(this,t,n)}}},3398:(e,t)=>{"use strict";function n(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}Object.defineProperty(t,"__esModule",{value:!0}),t.Int128=t.Int64=t.Uint64=t.BaseInt64=void 0;const r=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class i{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const t=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]);let r=t[3]*n[3];this.buffer[0]=65535&r;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0<r?65536:0,this.buffer[1]+=i>>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${n(this.buffer[1])} ${n(this.buffer[0])}`}}t.BaseInt64=i;class o extends i{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return o.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return o.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const n=e.length,i=new o(t);for(let t=0;t<n;){const a=8<n-t?8:n-t,s=new o(new Uint32Array([parseInt(e.substr(t,a),10),0])),l=new o(new Uint32Array([r[a],0]));i.times(l),i.plus(s),t+=a}return i}static convertArray(e){const t=new Uint32Array(2*e.length);for(let n=-1,r=e.length;++n<r;)o.from(e[n],new Uint32Array(t.buffer,t.byteOffset+2*n*4,2));return t}static multiply(e,t){return new o(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new o(new Uint32Array(e.buffer)).plus(t)}}t.Uint64=o;class a extends i{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){const t=this.buffer[1]<<0,n=e.buffer[1]<<0;return t<n||t===n&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return a.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return a.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const n=e.startsWith("-"),i=e.length,o=new a(t);for(let t=n?1:0;t<i;){const n=8<i-t?8:i-t,s=new a(new Uint32Array([parseInt(e.substr(t,n),10),0])),l=new a(new Uint32Array([r[n],0]));o.times(l),o.plus(s),t+=n}return n?o.negate():o}static convertArray(e){const t=new Uint32Array(2*e.length);for(let n=-1,r=e.length;++n<r;)a.from(e[n],new Uint32Array(t.buffer,t.byteOffset+2*n*4,2));return t}static multiply(e,t){return new a(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new a(new Uint32Array(e.buffer)).plus(t)}}t.Int64=a;class s{constructor(e){this.buffer=e}high(){return new a(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new a(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(e){const t=new o(new Uint32Array([this.buffer[3],0])),n=new o(new Uint32Array([this.buffer[2],0])),r=new o(new Uint32Array([this.buffer[1],0])),i=new o(new Uint32Array([this.buffer[0],0])),a=new o(new Uint32Array([e.buffer[3],0])),s=new o(new Uint32Array([e.buffer[2],0])),l=new o(new Uint32Array([e.buffer[1],0])),c=new o(new Uint32Array([e.buffer[0],0]));let u=o.multiply(i,c);this.buffer[0]=u.low();const h=new o(new Uint32Array([u.high(),0]));return u=o.multiply(r,c),h.plus(u),u=o.multiply(i,l),h.plus(u),this.buffer[1]=h.low(),this.buffer[3]=h.lessThan(u)?1:0,this.buffer[2]=h.high(),new o(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(o.multiply(n,c)).plus(o.multiply(r,l)).plus(o.multiply(i,s)),this.buffer[3]+=o.multiply(t,c).plus(o.multiply(n,l)).plus(o.multiply(r,s)).plus(o.multiply(i,a)).low(),this}plus(e){const t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${n(this.buffer[3])} ${n(this.buffer[2])} ${n(this.buffer[1])} ${n(this.buffer[0])}`}static multiply(e,t){return new s(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new s(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return s.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return s.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const n=e.startsWith("-"),i=e.length,o=new s(t);for(let t=n?1:0;t<i;){const n=8<i-t?8:i-t,a=new s(new Uint32Array([parseInt(e.substr(t,n),10),0,0,0])),l=new s(new Uint32Array([r[n],0,0,0]));o.times(l),o.plus(a),t+=n}return n?o.negate():o}static convertArray(e){const t=new Uint32Array(4*e.length);for(let n=-1,r=e.length;++n<r;)s.from(e[n],new Uint32Array(t.buffer,t.byteOffset+16*n,4));return t}}t.Int128=s},70121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.float64ToUint16=t.uint16ToFloat64=void 0;const n=new Float64Array(1),r=new Uint32Array(n.buffer);t.uint16ToFloat64=function(e){const t=(31744&e)>>10,n=(1023&e)/1024,r=Math.pow(-1,(32768&e)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,t-15)*(1+n)},t.float64ToUint16=function(e){if(e!=e)return 32256;n[0]=e;const t=(2147483648&r[1])>>16&65535;let i=2146435072&r[1],o=0;return i>=1089470464?r[0]>0?i=31744:(i=(2080374784&i)>>16,o=(1048575&r[1])>>10):i<=1056964608?(o=1048576+(1048575&r[1]),o=1048576+(o<<(i>>20)-998)>>21,i=0):(i=i-1056964608>>10,o=512+(1048575&r[1])>>10),t|i|65535&o}},85808:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.valueToString=void 0,t.valueToString=function(e){if(null===e)return"null";if(void 0===e)return"undefined";switch(typeof e){case"number":case"bigint":return`${e}`;case"string":return`"${e}"`}return"function"==typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e)}},86716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distributeVectorsIntoRecordBatches=t.distributeColumnsIntoRecordBatches=t.ensureSameLengthData=void 0;const r=n(76076),i=n(89),o=n(94717),a=n(42727),s=new Uint8Array(0),l=e=>[s,s,new Uint8Array(e),s];function c(e,t){return function(e,t){const n=[...e.fields],r=[],o={numBatches:t.reduce(((e,t)=>Math.max(e,t.length)),0)};let s=0,l=0,c=-1;const h=t.length;let d,f=[];for(;o.numBatches-- >0;){for(l=Number.POSITIVE_INFINITY,c=-1;++c<h;)f[c]=d=t[c].shift(),l=Math.min(l,d?d.length:l);isFinite(l)&&(f=u(n,l,f,t,o),l>0&&(r[s++]=[l,f.slice()]))}return[e=new i.Schema(n,e.metadata),r.map((t=>new a.RecordBatch(e,...t)))]}(e,t.map((e=>e instanceof o.Chunked?e.chunks.map((e=>e.data)):[e.data])))}function u(e,t,n,i,o){let a,s,c=0,u=-1;const h=i.length,d=(t+63&-64)>>3;for(;++u<h;)(a=n[u])&&(c=a.length)>=t?c===t?n[u]=a:(n[u]=a.slice(0,t),a=a.slice(t,c-t),o.numBatches=Math.max(o.numBatches,i[u].unshift(a))):((s=e[u]).nullable||(e[u]=s.clone({nullable:!0})),n[u]=a?a._changeLengthAndBackfillNullBitmap(t):r.Data.new(s.type,0,t,t,l(d)));return n}t.ensureSameLengthData=function(e,t,n=t.reduce(((e,t)=>Math.max(e,t.length)),0)){let o,a,s=-1;const c=t.length,u=[...e.fields],h=[],d=(n+63&-64)>>3;for(;++s<c;)(o=t[s])&&o.length===n?h[s]=o:((a=u[s]).nullable||(u[s]=u[s].clone({nullable:!0})),h[s]=o?o._changeLengthAndBackfillNullBitmap(n):r.Data.new(a.type,0,n,n,l(d)));return[new i.Schema(u),n,h]},t.distributeColumnsIntoRecordBatches=function(e){return c(new i.Schema(e.map((({field:e})=>e))),e)},t.distributeVectorsIntoRecordBatches=c},75426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeUtf8=t.decodeUtf8=void 0;const n=new TextDecoder("utf-8");t.decodeUtf8=e=>n.decode(e);const r=new TextEncoder;t.encodeUtf8=e=>r.encode(e)},41955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createElementComparator=t.clampRange=t.clampIndex=void 0;const r=n(60119),i=n(51655),o=n(56616),a=n(5992);let s;t.clampIndex=function(e,t,n){const r=e.length,i=t>-1?t:r+t%r;return n?n(e,i):i},t.clampRange=function(e,t,n,r){const{length:i=0}=e;let o="number"!=typeof t?0:t,a="number"!=typeof n?i:n;return o<0&&(o=(o%i+i)%i),a<0&&(a=(a%i+i)%i),a<o&&(s=o,o=a,a=s),a>i&&(a=i),r?r(e,o,a):[o,a]};const l=a.BigIntAvailable?a.BigInt(0):0,c=e=>e!=e;function u(e,t){return n=>{if(!n||"object"!=typeof n)return!1;switch(n.constructor){case Array:return function(e,t){const n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t[r]))return!1;return!0}(e,n);case Map:case i.MapRow:case i.StructRow:return h(e,n,n.keys());case Object:case void 0:return h(e,n,t||Object.keys(n))}return n instanceof r.Vector&&function(e,t){const n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t.get(r)))return!1;return!0}(e,n)}}function h(e,t,n){const r=n[Symbol.iterator](),i=t instanceof Map?t.keys():Object.keys(t)[Symbol.iterator](),o=t instanceof Map?t.values():Object.values(t)[Symbol.iterator]();let a=0;const s=e.length;let l=o.next(),c=r.next(),u=i.next();for(;a<s&&!c.done&&!u.done&&!l.done&&c.value===u.value&&e[a](l.value);++a,c=r.next(),u=i.next(),l=o.next());return!!(a===s&&c.done&&u.done&&l.done)||(r.return&&r.return(),i.return&&i.return(),o.return&&o.return(),!1)}t.createElementComparator=function e(t){const n=typeof t;if("object"!==n||null===t)return c(t)?c:"bigint"!==n?e=>e===t:e=>l+e===t;if(t instanceof Date){const e=t.valueOf();return t=>t instanceof Date&&t.valueOf()===e}return ArrayBuffer.isView(t)?e=>!!e&&o.compareArrayLike(t,e):t instanceof Map?function(t){let n=-1;const r=[];return t.forEach((t=>r[++n]=e(t))),u(r)}(t):Array.isArray(t)?function(t){const n=[];for(let r=-1,i=t.length;++r<i;)n[r]=e(t[r]);return u(n)}(t):t instanceof r.Vector?function(t){const n=[];for(let r=-1,i=t.length;++r<i;)n[r]=e(t.get(r));return u(n)}(t):function(t){const n=Object.keys(t);if(0===n.length)return()=>!1;const r=[];for(let i=-1,o=n.length;++i<o;)r[i]=e(t[n[i]]);return u(r,n)}(t)}},60119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vector=t.AbstractVector=void 0;class n{}t.AbstractVector=n,t.Vector=n,n.prototype.data=null},10259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseVector=void 0;const r=n(70171),i=n(94717),o=n(41955),a=n(60119);class s extends a.AbstractVector{constructor(e,t){super(),this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${r.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return a.Vector.new(e,t)}concat(...e){return i.Chunked.concat(this,...e)}slice(e,t){return o.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){const t=this.offset+e;return 0!=(this.nullBitmap[t>>3]&1<<t%8)}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=a.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,n){return e.clone(e.data.slice(t,n-t),null)}_bindDataAccessors(e){}}t.BaseVector=s,s.prototype[Symbol.isConcatSpreadable]=!0},27373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryVector=void 0;const r=n(60119),i=n(10259),o=n(40068);class a extends i.BaseVector{asUtf8(){return r.Vector.new(this.data.clone(new o.Utf8))}}t.BinaryVector=a},44483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BoolVector=void 0;const r=n(40068),i=n(10259),o=n(30033);class a extends i.BaseVector{static from(e){return o.vectorFromValuesWithType((()=>new r.Bool),e)}}t.BoolVector=a},94717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chunked=void 0;const r=n(41955),i=n(40068),o=n(63620),a=n(60119);class s{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}}class l extends a.AbstractVector{constructor(e,t=[],n=function(e){const t=new Uint32Array((e||[]).length+1);let n=t[0]=0;const r=t.length;for(let i=0;++i<r;)t[i]=n+=e[i-1].length;return t}(t)){super(),this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=n,this._length=n[n.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return o.selectChunkArgs(a.Vector,e)}static concat(...e){const t=l.flatten(...e);return new l(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce(((e,t)=>e+t.byteLength),0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce(((e,{nullCount:t})=>e+t),0)),e}get indices(){if(i.DataType.isDictionary(this._type)){if(!this._indices){const e=this._chunks;this._indices=1===e.length?e[0].indices:l.concat(...e.map((e=>e.indices)))}return this._indices}return null}get dictionary(){return i.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new s(this._chunks)}clone(e=this._chunks){return new l(this._type,e)}concat(...e){return this.clone(l.flatten(this,...e))}slice(e,t){return r.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;const t=this._children||(this._children=[]);let n,r,i;return(n=t[e])?n:(r=(this._type.children||[])[e])&&(i=this._chunks.map((t=>t.getChildAt(e))).filter((e=>null!=e)),i.length>0)?t[e]=new l(r.type,i):null}search(e,t){const n=e,r=this._chunkOffsets;let i=r.length-1;if(n<0)return null;if(n>=r[i])return null;if(i<=1)return t?t(this,0,n):[0,n];let o=0,a=0,s=0;do{if(o+1===i)return t?t(this,o,n-a):[o,n-a];s=o+(i-o)/2|0,n>=r[s]?o=s:i=s}while(n<r[i]&&n>=(a=r[o]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,(({chunks:e},n,r)=>e[n].set(r,t)))}indexOf(e,t){return t&&"number"==typeof t?this.search(t,((t,n,r)=>this.indexOfInternal(t,n,r,e))):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){const{chunks:e}=this,t=e.length;let n=this._type.ArrayType;if(t<=0)return new n(0);if(t<=1)return e[0].toArray();let r=0;const i=new Array(t);for(let n=-1;++n<t;)r+=(i[n]=e[n].toArray()).length;n!==i[0].constructor&&(n=i[0].constructor);const o=new n(r),a=n===Array?u:c;for(let e=-1,n=0;++e<t;)n=a(i[e],o,n);return o}getInternal({_chunks:e},t,n){return e[t].get(n)}isValidInternal({_chunks:e},t,n){return e[t].isValid(n)}indexOfInternal({_chunks:e},t,n,r){let i=t-1;const o=e.length;let a=n,s=0,l=-1;for(;++i<o;){if(~(l=e[i].indexOf(r,a)))return s+l;a=0,s+=e[i].length}return-1}_sliceInternal(e,t,n){const r=[],{chunks:i,_chunkOffsets:o}=e;for(let e=-1,a=i.length;++e<a;){const a=i[e],s=a.length,l=o[e];if(l>=n)break;if(t>=l+s)continue;if(l>=t&&l+s<=n){r.push(a);continue}const c=Math.max(0,t-l),u=Math.min(n-l,s);r.push(a.slice(c,u))}return e.clone(r)}}t.Chunked=l;const c=(e,t,n)=>(t.set(e,n),n+e.length),u=(e,t,n)=>{let r=n;for(let n=-1,i=e.length;++n<i;)t[r++]=e[n];return r}},52554:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateMillisecondVector=t.DateDayVector=t.DateVector=void 0;const r=n(70171),i=n(10259),o=n(30033),a=n(40068);class s extends i.BaseVector{static from(...e){return 2===e.length?o.vectorFromValuesWithType((()=>e[1]===r.DateUnit.DAY?new a.DateDay:new a.DateMillisecond),e[0]):o.vectorFromValuesWithType((()=>new a.DateMillisecond),e[0])}}t.DateVector=s,t.DateDayVector=class extends s{},t.DateMillisecondVector=class extends s{}},84865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.DecimalVector=i},73250:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DictionaryVector=void 0;const r=n(76076),i=n(60119),o=n(10259),a=n(30033),s=n(40068);class l extends o.BaseVector{constructor(e){super(e),this.indices=i.Vector.new(e.clone(this.type.indices))}static from(...e){if(3===e.length){const[t,n,o]=e,a=new s.Dictionary(t.type,n,null,null);return i.Vector.new(r.Data.Dictionary(a,0,o.length,0,null,o,t))}return a.vectorFromValuesWithType((()=>e[0].type),e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}}t.DictionaryVector=l,l.prototype.indices=null},20491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeBinaryVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.FixedSizeBinaryVector=i},15235:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedSizeListVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.FixedSizeListVector=i},78653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=void 0;const r=n(76076),i=n(60119),o=n(10259),a=n(30033),s=n(40068);class l extends o.BaseVector{static from(e){let t=p(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){const n=f(e.constructor)||t;if(null===t&&(t=n),t&&t===n){const n=new t,o=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!d(t,e.constructor))return i.Vector.new(r.Data.Float(n,0,o,0,null,e))}}if(t)return a.vectorFromValuesWithType((()=>new t),e);if(e instanceof DataView||e instanceof ArrayBuffer)throw new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`);throw new TypeError("Unrecognized FloatVector input")}}t.FloatVector=l;class c extends l{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}}t.Float16Vector=c;class u extends l{}t.Float32Vector=u;class h extends l{}t.Float64Vector=h;const d=(e,t)=>e===s.Float16&&t!==Uint16Array,f=e=>{switch(e){case Uint16Array:return s.Float16;case Float32Array:return s.Float32;case Float64Array:return s.Float64;default:return null}},p=e=>{switch(e){case c:return s.Float16;case u:return s.Float32;case h:return s.Float64;default:return null}}},30033:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vectorFromValuesWithType=t.StructRow=t.MapRow=t.Utf8Vector=t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=t.StructVector=t.NullVector=t.MapVector=t.ListVector=t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=t.Float64Vector=t.Float32Vector=t.Float16Vector=t.FloatVector=t.FixedSizeListVector=t.FixedSizeBinaryVector=t.DictionaryVector=t.DecimalVector=t.DateMillisecondVector=t.DateDayVector=t.DateVector=t.Chunked=t.BoolVector=t.BinaryVector=t.BaseVector=t.Vector=void 0;const r=n(28001);var i=n(60119);Object.defineProperty(t,"Vector",{enumerable:!0,get:function(){return i.Vector}});var o=n(10259);Object.defineProperty(t,"BaseVector",{enumerable:!0,get:function(){return o.BaseVector}});var a=n(27373);Object.defineProperty(t,"BinaryVector",{enumerable:!0,get:function(){return a.BinaryVector}});var s=n(44483);Object.defineProperty(t,"BoolVector",{enumerable:!0,get:function(){return s.BoolVector}});var l=n(94717);Object.defineProperty(t,"Chunked",{enumerable:!0,get:function(){return l.Chunked}});var c=n(52554);Object.defineProperty(t,"DateVector",{enumerable:!0,get:function(){return c.DateVector}}),Object.defineProperty(t,"DateDayVector",{enumerable:!0,get:function(){return c.DateDayVector}}),Object.defineProperty(t,"DateMillisecondVector",{enumerable:!0,get:function(){return c.DateMillisecondVector}});var u=n(84865);Object.defineProperty(t,"DecimalVector",{enumerable:!0,get:function(){return u.DecimalVector}});var h=n(73250);Object.defineProperty(t,"DictionaryVector",{enumerable:!0,get:function(){return h.DictionaryVector}});var d=n(20491);Object.defineProperty(t,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return d.FixedSizeBinaryVector}});var f=n(15235);Object.defineProperty(t,"FixedSizeListVector",{enumerable:!0,get:function(){return f.FixedSizeListVector}});var p=n(78653);Object.defineProperty(t,"FloatVector",{enumerable:!0,get:function(){return p.FloatVector}}),Object.defineProperty(t,"Float16Vector",{enumerable:!0,get:function(){return p.Float16Vector}}),Object.defineProperty(t,"Float32Vector",{enumerable:!0,get:function(){return p.Float32Vector}}),Object.defineProperty(t,"Float64Vector",{enumerable:!0,get:function(){return p.Float64Vector}});var g=n(26852);Object.defineProperty(t,"IntervalVector",{enumerable:!0,get:function(){return g.IntervalVector}}),Object.defineProperty(t,"IntervalDayTimeVector",{enumerable:!0,get:function(){return g.IntervalDayTimeVector}}),Object.defineProperty(t,"IntervalYearMonthVector",{enumerable:!0,get:function(){return g.IntervalYearMonthVector}});var m=n(18053);Object.defineProperty(t,"IntVector",{enumerable:!0,get:function(){return m.IntVector}}),Object.defineProperty(t,"Int8Vector",{enumerable:!0,get:function(){return m.Int8Vector}}),Object.defineProperty(t,"Int16Vector",{enumerable:!0,get:function(){return m.Int16Vector}}),Object.defineProperty(t,"Int32Vector",{enumerable:!0,get:function(){return m.Int32Vector}}),Object.defineProperty(t,"Int64Vector",{enumerable:!0,get:function(){return m.Int64Vector}}),Object.defineProperty(t,"Uint8Vector",{enumerable:!0,get:function(){return m.Uint8Vector}}),Object.defineProperty(t,"Uint16Vector",{enumerable:!0,get:function(){return m.Uint16Vector}}),Object.defineProperty(t,"Uint32Vector",{enumerable:!0,get:function(){return m.Uint32Vector}}),Object.defineProperty(t,"Uint64Vector",{enumerable:!0,get:function(){return m.Uint64Vector}});var v=n(508);Object.defineProperty(t,"ListVector",{enumerable:!0,get:function(){return v.ListVector}});var y=n(77197);Object.defineProperty(t,"MapVector",{enumerable:!0,get:function(){return y.MapVector}});var b=n(96626);Object.defineProperty(t,"NullVector",{enumerable:!0,get:function(){return b.NullVector}});var _=n(66808);Object.defineProperty(t,"StructVector",{enumerable:!0,get:function(){return _.StructVector}});var x=n(84333);Object.defineProperty(t,"TimestampVector",{enumerable:!0,get:function(){return x.TimestampVector}}),Object.defineProperty(t,"TimestampSecondVector",{enumerable:!0,get:function(){return x.TimestampSecondVector}}),Object.defineProperty(t,"TimestampMillisecondVector",{enumerable:!0,get:function(){return x.TimestampMillisecondVector}}),Object.defineProperty(t,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return x.TimestampMicrosecondVector}}),Object.defineProperty(t,"TimestampNanosecondVector",{enumerable:!0,get:function(){return x.TimestampNanosecondVector}});var w=n(54498);Object.defineProperty(t,"TimeVector",{enumerable:!0,get:function(){return w.TimeVector}}),Object.defineProperty(t,"TimeSecondVector",{enumerable:!0,get:function(){return w.TimeSecondVector}}),Object.defineProperty(t,"TimeMillisecondVector",{enumerable:!0,get:function(){return w.TimeMillisecondVector}}),Object.defineProperty(t,"TimeMicrosecondVector",{enumerable:!0,get:function(){return w.TimeMicrosecondVector}}),Object.defineProperty(t,"TimeNanosecondVector",{enumerable:!0,get:function(){return w.TimeNanosecondVector}});var A=n(19135);Object.defineProperty(t,"UnionVector",{enumerable:!0,get:function(){return A.UnionVector}}),Object.defineProperty(t,"DenseUnionVector",{enumerable:!0,get:function(){return A.DenseUnionVector}}),Object.defineProperty(t,"SparseUnionVector",{enumerable:!0,get:function(){return A.SparseUnionVector}});var k=n(28192);Object.defineProperty(t,"Utf8Vector",{enumerable:!0,get:function(){return k.Utf8Vector}});var T=n(51655);Object.defineProperty(t,"MapRow",{enumerable:!0,get:function(){return T.MapRow}}),Object.defineProperty(t,"StructRow",{enumerable:!0,get:function(){return T.StructRow}});const S=n(44696),E=n(70171),C=n(60119),M=n(94717),O=n(10259),L=n(77192),D=n(5992),I=n(34285),R=n(89544),P=n(12149),N=n(25107),z=n(34625),F=n(39408),B=n(49547),j=n(29950);C.Vector.new=function(e,...t){return new(j.instance.getVisitFn(e)())(e,...t)},C.Vector.from=function(e){const t=Object.assign({nullValues:[null,void 0]},e),{values:n=[]}=t,i=r.__rest(t,["values"]);if(D.isIterable(n)){const e=[...I.Builder.throughIterable(i)(n)];return 1===e.length?e[0]:M.Chunked.concat(e)}return(e=>r.__awaiter(this,void 0,void 0,(function*(){var t,o;const a=I.Builder.throughAsyncIterable(i);try{for(var s,l=r.__asyncValues(a(n));!(s=yield l.next()).done;){const t=s.value;e.push(t)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(o=l.return)&&(yield o.call(l))}finally{if(t)throw t.error}}return 1===e.length?e[0]:M.Chunked.concat(e)})))([])},t.vectorFromValuesWithType=function(e,t){if(D.isIterable(t))return C.Vector.from({nullValues:[null,void 0],type:e(),values:t});if(D.isAsyncIterable(t))return C.Vector.from({nullValues:[null,void 0],type:e(),values:t});const{values:n=[],type:r=e(),nullValues:i=[null,void 0]}=Object.assign({},t);return D.isIterable(n),C.Vector.from(Object.assign(Object.assign({nullValues:i},t),{type:r}))},O.BaseVector.prototype.get=function(e){return R.instance.visit(this,e)},O.BaseVector.prototype.set=function(e,t){return P.instance.visit(this,e,t)},O.BaseVector.prototype.indexOf=function(e,t){return N.instance.visit(this,e,t)},O.BaseVector.prototype.toArray=function(){return z.instance.visit(this)},O.BaseVector.prototype.getByteWidth=function(){return B.instance.visit(this.type)},O.BaseVector.prototype[Symbol.iterator]=function(){return F.instance.visit(this)},O.BaseVector.prototype._bindDataAccessors=function(){const e=this.nullBitmap;e&&e.byteLength>0&&(this.get=function(e){return function(t){return this.isValid(t)?e.call(this,t):null}}(this.get),this.set=function(e){return function(t,n){L.setBool(this.nullBitmap,this.offset+t,!(null==n))&&e.call(this,t,n)}}(this.set))},Object.keys(E.Type).map((e=>E.Type[e])).filter((e=>"number"==typeof e)).filter((e=>e!==E.Type.NONE)).forEach((e=>{const t=j.instance.visit(e);var n;t.prototype.get=S.partial1(R.instance.getVisitFn(e)),t.prototype.set=S.partial2(P.instance.getVisitFn(e)),t.prototype.indexOf=S.partial2(N.instance.getVisitFn(e)),t.prototype.toArray=S.partial0(z.instance.getVisitFn(e)),t.prototype.getByteWidth=(n=B.instance.getVisitFn(e),function(){return n(this.type)}),t.prototype[Symbol.iterator]=S.partial0(F.instance.getVisitFn(e))}))},18053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64Vector=t.Uint32Vector=t.Uint16Vector=t.Uint8Vector=t.Int64Vector=t.Int32Vector=t.Int16Vector=t.Int8Vector=t.IntVector=void 0;const r=n(76076),i=n(60119),o=n(10259),a=n(30033),s=n(5992),l=n(56616),c=n(40068);class u extends o.BaseVector{static from(...e){const[t,n=!1]=e;let o=x(this,n);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){const e=_(t.constructor,n)||o;if(null===o&&(o=e),o&&o===e){const e=new o;let n=t.byteLength/e.ArrayType.BYTES_PER_ELEMENT;return b(o,t.constructor)&&(n*=.5),i.Vector.new(r.Data.Int(e,0,n,0,null,t))}}if(o)return a.vectorFromValuesWithType((()=>new o),t);if(t instanceof DataView||t instanceof ArrayBuffer)throw new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`);throw new TypeError("Unrecognized IntVector input")}}t.IntVector=u;class h extends u{}t.Int8Vector=h;class d extends u{}t.Int16Vector=d;class f extends u{}t.Int32Vector=f;class p extends u{toBigInt64Array(){return l.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}}t.Int64Vector=p;class g extends u{}t.Uint8Vector=g;class m extends u{}t.Uint16Vector=m;class v extends u{}t.Uint32Vector=v;class y extends u{toBigUint64Array(){return l.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}}t.Uint64Vector=y;const b=(e,t)=>!(e!==c.Int64&&e!==c.Uint64||t!==Int32Array&&t!==Uint32Array),_=(e,t)=>{switch(e){case Int8Array:return c.Int8;case Int16Array:return c.Int16;case Int32Array:return t?c.Int64:c.Int32;case s.BigInt64Array:return c.Int64;case Uint8Array:return c.Uint8;case Uint16Array:return c.Uint16;case Uint32Array:return t?c.Uint64:c.Uint32;case s.BigUint64Array:return c.Uint64;default:return null}},x=(e,t)=>{switch(e){case h:return c.Int8;case d:return c.Int16;case f:return t?c.Int64:c.Int32;case p:return c.Int64;case g:return c.Uint8;case m:return c.Uint16;case v:return t?c.Uint64:c.Uint32;case y:return c.Uint64;default:return null}}},26852:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalYearMonthVector=t.IntervalDayTimeVector=t.IntervalVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.IntervalVector=i,t.IntervalDayTimeVector=class extends i{},t.IntervalYearMonthVector=class extends i{}},508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.ListVector=i},77197:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MapVector=void 0;const r=n(51655),i=n(60119),o=n(10259),a=n(40068);class s extends o.BaseVector{asList(){const e=this.type.children[0];return i.Vector.new(this.data.clone(new a.List(e)))}bind(e){const t=this.getChildAt(0),{[e]:n,[e+1]:i}=this.valueOffsets;return new r.MapRow(t.slice(n,i))}}t.MapVector=s},96626:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.NullVector=i},51655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructRow=t.MapRow=void 0;const r=n(85808),i=Symbol.for("parent"),o=Symbol.for("rowIndex"),a=Symbol.for("keyToIdx"),s=Symbol.for("idxToVal"),l=Symbol.for("nodejs.util.inspect.custom");class c{constructor(e,t){this[i]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return void 0!==this.get(e)}get(e){let t;if(null!=e){const n=this[a]||(this[a]=new Map);let r=n.get(e);if(void 0!==r){const e=this[s]||(this[s]=new Array(this.size));void 0!==(t=e[r])||(e[r]=t=this.getValue(r))}else if((r=this.getIndex(e))>-1){n.set(e,r);const i=this[s]||(this[s]=new Array(this.size));void 0!==(t=i[r])||(i[r]=t=this.getValue(r))}}return t}set(e,t){if(null!=e){const n=this[a]||(this[a]=new Map);let r=n.get(e);void 0===r&&n.set(e,r=this.getIndex(e)),r>-1&&((this[s]||(this[s]=new Array(this.size)))[r]=this.setValue(r,t))}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){const e=this.keys(),t=this.values(),n=this[a]||(this[a]=new Map),r=this[s]||(this[s]=new Array(this.size));for(let i,o,a,s,l=0;!(a=e.next()).done&&!(s=t.next()).done;++l)i=a.value,o=s.value,r[l]=o,n.has(i)||n.set(i,l),yield[i,o]}forEach(e,t){const n=this.keys(),r=this.values(),i=void 0===t?e:(n,r,i)=>e.call(t,n,r,i),o=this[a]||(this[a]=new Map),l=this[s]||(this[s]=new Array(this.size));for(let e,t,a,s,c=0;!(a=n.next()).done&&!(s=r.next()).done;++c)e=a.value,t=s.value,l[c]=t,o.has(e)||o.set(e,c),i(t,e,this)}toArray(){return[...this.values()]}toJSON(){const e={};return this.forEach(((t,n)=>e[n]=t)),e}inspect(){return this.toString()}[l](){return this.toString()}toString(){const e=[];return this.forEach(((t,n)=>{n=r.valueToString(n),t=r.valueToString(t),e.push(`${n}: ${t}`)})),`{ ${e.join(", ")} }`}}var u;c[Symbol.toStringTag]=(u=c.prototype,Object.defineProperties(u,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[i]:{writable:!0,enumerable:!1,configurable:!1,value:null},[o]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),u[Symbol.toStringTag]="Row"),t.MapRow=class extends c{constructor(e){return super(e,e.length),d(this)}keys(){return this[i].getChildAt(0)[Symbol.iterator]()}values(){return this[i].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[i].getChildAt(0).get(e)}getIndex(e){return this[i].getChildAt(0).indexOf(e)}getValue(e){return this[i].getChildAt(1).get(e)}setValue(e,t){this[i].getChildAt(1).set(e,t)}},t.StructRow=class extends c{constructor(e){return super(e,e.type.children.length),h(this)}*keys(){for(const e of this[i].type.children)yield e.name}*values(){for(const e of this[i].type.children)yield this[e.name]}getKey(e){return this[i].type.children[e].name}getIndex(e){return this[i].type.children.findIndex((t=>t.name===e))}getValue(e){return this[i].getChildAt(e).get(this[o])}setValue(e,t){return this[i].getChildAt(e).set(this[o],t)}},Object.setPrototypeOf(c.prototype,Map.prototype);const h=(()=>{const e={enumerable:!0,configurable:!1,get:null,set:null};return t=>{let n=-1;const r=t[a]||(t[a]=new Map),i=e=>function(){return this.get(e)},o=e=>function(t){return this.set(e,t)};for(const a of t.keys())r.set(a,++n),e.get=i(a),e.set=o(a),Object.prototype.hasOwnProperty.call(t,a)||(e.enumerable=!0,Object.defineProperty(t,a,e)),Object.prototype.hasOwnProperty.call(t,n)||(e.enumerable=!1,Object.defineProperty(t,n,e));return e.get=e.set=null,t}})(),d=(()=>{if("undefined"==typeof Proxy)return h;const e=c.prototype.has,t=c.prototype.get,n=c.prototype.set,r=c.prototype.getKey,u={isExtensible:()=>!1,deleteProperty:()=>!1,preventExtensions:()=>!0,ownKeys:e=>[...e.keys()].map((e=>`${e}`)),has(e,t){switch(t){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case i:case o:case s:case a:case l:return!0}return"number"!=typeof t||e.has(t)||(t=e.getKey(t)),e.has(t)},get(n,c,u){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case i:case o:case s:case a:case l:return Reflect.get(n,c,u)}return"number"!=typeof c||e.call(u,c)||(c=r.call(u,c)),t.call(u,c)},set(t,l,c,u){switch(l){case i:case o:case s:case a:return Reflect.set(t,l,c,u);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return"number"!=typeof l||e.call(u,l)||(l=r.call(u,l)),!!e.call(u,l)&&!!n.call(u,l,c)}};return e=>new Proxy(e,u)})()},66808:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructVector=void 0;const r=n(51655),i=n(10259),o=Symbol.for("rowIndex");class a extends i.BaseVector{bind(e){const t=this._row||(this._row=new r.StructRow(this)),n=Object.create(t);return n[o]=e,n}}t.StructVector=a},54498:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeNanosecondVector=t.TimeMicrosecondVector=t.TimeMillisecondVector=t.TimeSecondVector=t.TimeVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.TimeVector=i,t.TimeSecondVector=class extends i{},t.TimeMillisecondVector=class extends i{},t.TimeMicrosecondVector=class extends i{},t.TimeNanosecondVector=class extends i{}},84333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampNanosecondVector=t.TimestampMicrosecondVector=t.TimestampMillisecondVector=t.TimestampSecondVector=t.TimestampVector=void 0;const r=n(10259);class i extends r.BaseVector{}t.TimestampVector=i,t.TimestampSecondVector=class extends i{},t.TimestampMillisecondVector=class extends i{},t.TimestampMicrosecondVector=class extends i{},t.TimestampNanosecondVector=class extends i{}},19135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparseUnionVector=t.DenseUnionVector=t.UnionVector=void 0;const r=n(10259);class i extends r.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}}t.UnionVector=i,t.DenseUnionVector=class extends i{get valueOffsets(){return this.data.valueOffsets}},t.SparseUnionVector=class extends i{}},28192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8Vector=void 0;const r=n(60119),i=n(10259),o=n(40068),a=n(30033);class s extends i.BaseVector{static from(e){return a.vectorFromValuesWithType((()=>new o.Utf8),e)}asBinary(){return r.Vector.new(this.data.clone(new o.Binary))}}t.Utf8Vector=s},17903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Visitor=void 0;const r=n(76076),i=n(60119),o=n(70171),a=n(40068);class s{visitMany(e,...t){return e.map(((e,n)=>this.visit(e,...t.map((e=>e[n])))))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return function(e,t,n=!0){let s=null,c=o.Type.NONE;switch(t instanceof r.Data||t instanceof i.Vector?c=l(t.type):t instanceof a.DataType?c=l(t):"number"!=typeof(c=t)&&(c=o.Type[t]),c){case o.Type.Null:s=e.visitNull;break;case o.Type.Bool:s=e.visitBool;break;case o.Type.Int:s=e.visitInt;break;case o.Type.Int8:s=e.visitInt8||e.visitInt;break;case o.Type.Int16:s=e.visitInt16||e.visitInt;break;case o.Type.Int32:s=e.visitInt32||e.visitInt;break;case o.Type.Int64:s=e.visitInt64||e.visitInt;break;case o.Type.Uint8:s=e.visitUint8||e.visitInt;break;case o.Type.Uint16:s=e.visitUint16||e.visitInt;break;case o.Type.Uint32:s=e.visitUint32||e.visitInt;break;case o.Type.Uint64:s=e.visitUint64||e.visitInt;break;case o.Type.Float:s=e.visitFloat;break;case o.Type.Float16:s=e.visitFloat16||e.visitFloat;break;case o.Type.Float32:s=e.visitFloat32||e.visitFloat;break;case o.Type.Float64:s=e.visitFloat64||e.visitFloat;break;case o.Type.Utf8:s=e.visitUtf8;break;case o.Type.Binary:s=e.visitBinary;break;case o.Type.FixedSizeBinary:s=e.visitFixedSizeBinary;break;case o.Type.Date:s=e.visitDate;break;case o.Type.DateDay:s=e.visitDateDay||e.visitDate;break;case o.Type.DateMillisecond:s=e.visitDateMillisecond||e.visitDate;break;case o.Type.Timestamp:s=e.visitTimestamp;break;case o.Type.TimestampSecond:s=e.visitTimestampSecond||e.visitTimestamp;break;case o.Type.TimestampMillisecond:s=e.visitTimestampMillisecond||e.visitTimestamp;break;case o.Type.TimestampMicrosecond:s=e.visitTimestampMicrosecond||e.visitTimestamp;break;case o.Type.TimestampNanosecond:s=e.visitTimestampNanosecond||e.visitTimestamp;break;case o.Type.Time:s=e.visitTime;break;case o.Type.TimeSecond:s=e.visitTimeSecond||e.visitTime;break;case o.Type.TimeMillisecond:s=e.visitTimeMillisecond||e.visitTime;break;case o.Type.TimeMicrosecond:s=e.visitTimeMicrosecond||e.visitTime;break;case o.Type.TimeNanosecond:s=e.visitTimeNanosecond||e.visitTime;break;case o.Type.Decimal:s=e.visitDecimal;break;case o.Type.List:s=e.visitList;break;case o.Type.Struct:s=e.visitStruct;break;case o.Type.Union:s=e.visitUnion;break;case o.Type.DenseUnion:s=e.visitDenseUnion||e.visitUnion;break;case o.Type.SparseUnion:s=e.visitSparseUnion||e.visitUnion;break;case o.Type.Dictionary:s=e.visitDictionary;break;case o.Type.Interval:s=e.visitInterval;break;case o.Type.IntervalDayTime:s=e.visitIntervalDayTime||e.visitInterval;break;case o.Type.IntervalYearMonth:s=e.visitIntervalYearMonth||e.visitInterval;break;case o.Type.FixedSizeList:s=e.visitFixedSizeList;break;case o.Type.Map:s=e.visitMap}if("function"==typeof s)return s;if(!n)return()=>null;throw new Error(`Unrecognized type '${o.Type[c]}'`)}(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function l(e){switch(e.typeId){case o.Type.Null:return o.Type.Null;case o.Type.Int:{const{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?o.Type.Int8:o.Type.Uint8;case 16:return n?o.Type.Int16:o.Type.Uint16;case 32:return n?o.Type.Int32:o.Type.Uint32;case 64:return n?o.Type.Int64:o.Type.Uint64}return o.Type.Int}case o.Type.Float:switch(e.precision){case o.Precision.HALF:return o.Type.Float16;case o.Precision.SINGLE:return o.Type.Float32;case o.Precision.DOUBLE:return o.Type.Float64}return o.Type.Float;case o.Type.Binary:return o.Type.Binary;case o.Type.Utf8:return o.Type.Utf8;case o.Type.Bool:return o.Type.Bool;case o.Type.Decimal:return o.Type.Decimal;case o.Type.Time:switch(e.unit){case o.TimeUnit.SECOND:return o.Type.TimeSecond;case o.TimeUnit.MILLISECOND:return o.Type.TimeMillisecond;case o.TimeUnit.MICROSECOND:return o.Type.TimeMicrosecond;case o.TimeUnit.NANOSECOND:return o.Type.TimeNanosecond}return o.Type.Time;case o.Type.Timestamp:switch(e.unit){case o.TimeUnit.SECOND:return o.Type.TimestampSecond;case o.TimeUnit.MILLISECOND:return o.Type.TimestampMillisecond;case o.TimeUnit.MICROSECOND:return o.Type.TimestampMicrosecond;case o.TimeUnit.NANOSECOND:return o.Type.TimestampNanosecond}return o.Type.Timestamp;case o.Type.Date:switch(e.unit){case o.DateUnit.DAY:return o.Type.DateDay;case o.DateUnit.MILLISECOND:return o.Type.DateMillisecond}return o.Type.Date;case o.Type.Interval:switch(e.unit){case o.IntervalUnit.DAY_TIME:return o.Type.IntervalDayTime;case o.IntervalUnit.YEAR_MONTH:return o.Type.IntervalYearMonth}return o.Type.Interval;case o.Type.Map:return o.Type.Map;case o.Type.List:return o.Type.List;case o.Type.Struct:return o.Type.Struct;case o.Type.Union:switch(e.mode){case o.UnionMode.Dense:return o.Type.DenseUnion;case o.UnionMode.Sparse:return o.Type.SparseUnion}return o.Type.Union;case o.Type.FixedSizeBinary:return o.Type.FixedSizeBinary;case o.Type.FixedSizeList:return o.Type.FixedSizeList;case o.Type.Dictionary:return o.Type.Dictionary}throw new Error(`Unrecognized type '${o.Type[e.typeId]}'`)}t.Visitor=s,s.prototype.visitInt8=null,s.prototype.visitInt16=null,s.prototype.visitInt32=null,s.prototype.visitInt64=null,s.prototype.visitUint8=null,s.prototype.visitUint16=null,s.prototype.visitUint32=null,s.prototype.visitUint64=null,s.prototype.visitFloat16=null,s.prototype.visitFloat32=null,s.prototype.visitFloat64=null,s.prototype.visitDateDay=null,s.prototype.visitDateMillisecond=null,s.prototype.visitTimestampSecond=null,s.prototype.visitTimestampMillisecond=null,s.prototype.visitTimestampMicrosecond=null,s.prototype.visitTimestampNanosecond=null,s.prototype.visitTimeSecond=null,s.prototype.visitTimeMillisecond=null,s.prototype.visitTimeMicrosecond=null,s.prototype.visitTimeNanosecond=null,s.prototype.visitDenseUnion=null,s.prototype.visitSparseUnion=null,s.prototype.visitIntervalDayTime=null,s.prototype.visitIntervalYearMonth=null},20283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetBuilderCtor=void 0;const r=n(17903),i=n(97666),o=n(98025),a=n(86708),s=n(64637),l=n(29936),c=n(24086),u=n(54720),h=n(15814),d=n(14040),f=n(60719),p=n(37481),g=n(9506),m=n(32907),v=n(9117),y=n(71709),b=n(12888),_=n(49322),x=n(58413);class w extends r.Visitor{visitNull(){return m.NullBuilder}visitBool(){return o.BoolBuilder}visitInt(){return f.IntBuilder}visitInt8(){return f.Int8Builder}visitInt16(){return f.Int16Builder}visitInt32(){return f.Int32Builder}visitInt64(){return f.Int64Builder}visitUint8(){return f.Uint8Builder}visitUint16(){return f.Uint16Builder}visitUint32(){return f.Uint32Builder}visitUint64(){return f.Uint64Builder}visitFloat(){return h.FloatBuilder}visitFloat16(){return h.Float16Builder}visitFloat32(){return h.Float32Builder}visitFloat64(){return h.Float64Builder}visitUtf8(){return x.Utf8Builder}visitBinary(){return i.BinaryBuilder}visitFixedSizeBinary(){return c.FixedSizeBinaryBuilder}visitDate(){return a.DateBuilder}visitDateDay(){return a.DateDayBuilder}visitDateMillisecond(){return a.DateMillisecondBuilder}visitTimestamp(){return y.TimestampBuilder}visitTimestampSecond(){return y.TimestampSecondBuilder}visitTimestampMillisecond(){return y.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return y.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return y.TimestampNanosecondBuilder}visitTime(){return b.TimeBuilder}visitTimeSecond(){return b.TimeSecondBuilder}visitTimeMillisecond(){return b.TimeMillisecondBuilder}visitTimeMicrosecond(){return b.TimeMicrosecondBuilder}visitTimeNanosecond(){return b.TimeNanosecondBuilder}visitDecimal(){return s.DecimalBuilder}visitList(){return p.ListBuilder}visitStruct(){return v.StructBuilder}visitUnion(){return _.UnionBuilder}visitDenseUnion(){return _.DenseUnionBuilder}visitSparseUnion(){return _.SparseUnionBuilder}visitDictionary(){return l.DictionaryBuilder}visitInterval(){return d.IntervalBuilder}visitIntervalDayTime(){return d.IntervalDayTimeBuilder}visitIntervalYearMonth(){return d.IntervalYearMonthBuilder}visitFixedSizeList(){return u.FixedSizeListBuilder}visitMap(){return g.MapBuilder}}t.GetBuilderCtor=w,t.instance=new w},49547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ByteWidthVisitor=void 0;const r=n(17903),i=n(70171),o=(e,t)=>e+t,a=e=>`Cannot compute the byte width of variable-width column ${e}`;class s extends r.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(a(e))}visitUtf8(e){throw new Error(a(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return 4*(e.unit+1)}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===i.TimeUnit.SECOND?4:8}visitInterval(e){return 4*(e.unit+1)}visitList(e){throw new Error(a(e))}visitStruct(e){return this.visitFields(e.children).reduce(o,0)}visitUnion(e){return this.visitFields(e.children).reduce(o,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(o,0)}visitMap(e){return this.visitFields(e.children).reduce(o,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map((e=>this.visit(e.type)))}visitSchema(e){return this.visitFields(e.fields).reduce(o,0)}}t.ByteWidthVisitor=s,t.instance=new s},89544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetVisitor=void 0;const r=n(87698),i=n(17903),o=n(75426),a=n(70121),s=n(70171);class l extends i.Visitor{}t.GetVisitor=l;const c=(e,t)=>4294967296*e[t+1]+(e[t]>>>0),u=e=>new Date(e),h=(e,t,n)=>{const{[n]:r,[n+1]:i}=t;return null!=r&&null!=i?e.subarray(r,i):null},d=({values:e},t)=>((e,t)=>u(((e,t)=>864e5*e[t])(e,t)))(e,t),f=({values:e},t)=>((e,t)=>u(c(e,t)))(e,2*t),p=({stride:e,values:t},n)=>t[e*n],g=({stride:e,values:t},n)=>a.uint16ToFloat64(t[e*n]),m=({stride:e,values:t,type:n},i)=>r.BN.new(t.subarray(e*i,e*(i+1)),n.isSigned),v=({values:e},t)=>1e3*c(e,2*t),y=({values:e},t)=>c(e,2*t),b=({values:e},t)=>((e,t)=>e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3)(e,2*t),_=({values:e},t)=>((e,t)=>e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6)(e,2*t),x=({values:e,stride:t},n)=>e[t*n],w=({values:e,stride:t},n)=>e[t*n],A=({values:e},t)=>r.BN.signed(e.subarray(2*t,2*(t+1))),k=({values:e},t)=>r.BN.signed(e.subarray(2*t,2*(t+1))),T=(e,t)=>{const n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(e.valueOffsets[t]):null},S=(e,t)=>{const n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(t):null},E=({values:e},t)=>e.subarray(2*t,2*(t+1)),C=({values:e},t)=>{const n=e[t],r=new Int32Array(2);return r[0]=n/12|0,r[1]=n%12|0,r};l.prototype.visitNull=(e,t)=>null,l.prototype.visitBool=({offset:e,values:t},n)=>{const r=e+n;return 0!=(t[r>>3]&1<<r%8)},l.prototype.visitInt=(e,t)=>e.type.bitWidth<64?p(e,t):m(e,t),l.prototype.visitInt8=p,l.prototype.visitInt16=p,l.prototype.visitInt32=p,l.prototype.visitInt64=m,l.prototype.visitUint8=p,l.prototype.visitUint16=p,l.prototype.visitUint32=p,l.prototype.visitUint64=m,l.prototype.visitFloat=(e,t)=>e.type.precision!==s.Precision.HALF?p(e,t):g(e,t),l.prototype.visitFloat16=g,l.prototype.visitFloat32=p,l.prototype.visitFloat64=p,l.prototype.visitUtf8=({values:e,valueOffsets:t},n)=>{const r=h(e,t,n);return null!==r?o.decodeUtf8(r):null},l.prototype.visitBinary=({values:e,valueOffsets:t},n)=>h(e,t,n),l.prototype.visitFixedSizeBinary=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),l.prototype.visitDate=(e,t)=>e.type.unit===s.DateUnit.DAY?d(e,t):f(e,t),l.prototype.visitDateDay=d,l.prototype.visitDateMillisecond=f,l.prototype.visitTimestamp=(e,t)=>{switch(e.type.unit){case s.TimeUnit.SECOND:return v(e,t);case s.TimeUnit.MILLISECOND:return y(e,t);case s.TimeUnit.MICROSECOND:return b(e,t);case s.TimeUnit.NANOSECOND:return _(e,t)}},l.prototype.visitTimestampSecond=v,l.prototype.visitTimestampMillisecond=y,l.prototype.visitTimestampMicrosecond=b,l.prototype.visitTimestampNanosecond=_,l.prototype.visitTime=(e,t)=>{switch(e.type.unit){case s.TimeUnit.SECOND:return x(e,t);case s.TimeUnit.MILLISECOND:return w(e,t);case s.TimeUnit.MICROSECOND:return A(e,t);case s.TimeUnit.NANOSECOND:return k(e,t)}},l.prototype.visitTimeSecond=x,l.prototype.visitTimeMillisecond=w,l.prototype.visitTimeMicrosecond=A,l.prototype.visitTimeNanosecond=k,l.prototype.visitDecimal=({values:e},t)=>r.BN.decimal(e.subarray(4*t,4*(t+1))),l.prototype.visitList=(e,t)=>{const n=e.getChildAt(0),{valueOffsets:r,stride:i}=e;return n.slice(r[t*i],r[t*i+1])},l.prototype.visitStruct=(e,t)=>e.bind(t),l.prototype.visitUnion=(e,t)=>e.type.mode===s.UnionMode.Dense?T(e,t):S(e,t),l.prototype.visitDenseUnion=T,l.prototype.visitSparseUnion=S,l.prototype.visitDictionary=(e,t)=>e.getValue(e.getKey(t)),l.prototype.visitInterval=(e,t)=>e.type.unit===s.IntervalUnit.DAY_TIME?E(e,t):C(e,t),l.prototype.visitIntervalDayTime=E,l.prototype.visitIntervalYearMonth=C,l.prototype.visitFixedSizeList=(e,t)=>{const n=e.getChildAt(0),{stride:r}=e;return n.slice(t*r,(t+1)*r)},l.prototype.visitMap=(e,t)=>e.bind(t),t.instance=new l},25107:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.IndexOfVisitor=void 0;const r=n(17903),i=n(77192),o=n(41955);class a extends r.Visitor{}function s(e,t,n){if(void 0===t)return-1;if(null===t)return function(e,t){const{nullBitmap:n}=e.data;if(!n||e.nullCount<=0)return-1;let r=0;for(const o of new i.BitIterator(n,e.data.offset+(t||0),e.length,n,i.getBool)){if(!o)return r;++r}return-1}(e,n);const r=o.createElementComparator(t);for(let t=(n||0)-1,i=e.length;++t<i;)if(r(e.get(t)))return t;return-1}function l(e,t,n){const r=o.createElementComparator(t);for(let t=(n||0)-1,i=e.length;++t<i;)if(r(e.get(t)))return t;return-1}t.IndexOfVisitor=a,a.prototype.visitNull=function(e,t){return null===t&&e.length>0?0:-1},a.prototype.visitBool=s,a.prototype.visitInt=s,a.prototype.visitInt8=s,a.prototype.visitInt16=s,a.prototype.visitInt32=s,a.prototype.visitInt64=s,a.prototype.visitUint8=s,a.prototype.visitUint16=s,a.prototype.visitUint32=s,a.prototype.visitUint64=s,a.prototype.visitFloat=s,a.prototype.visitFloat16=s,a.prototype.visitFloat32=s,a.prototype.visitFloat64=s,a.prototype.visitUtf8=s,a.prototype.visitBinary=s,a.prototype.visitFixedSizeBinary=s,a.prototype.visitDate=s,a.prototype.visitDateDay=s,a.prototype.visitDateMillisecond=s,a.prototype.visitTimestamp=s,a.prototype.visitTimestampSecond=s,a.prototype.visitTimestampMillisecond=s,a.prototype.visitTimestampMicrosecond=s,a.prototype.visitTimestampNanosecond=s,a.prototype.visitTime=s,a.prototype.visitTimeSecond=s,a.prototype.visitTimeMillisecond=s,a.prototype.visitTimeMicrosecond=s,a.prototype.visitTimeNanosecond=s,a.prototype.visitDecimal=s,a.prototype.visitList=s,a.prototype.visitStruct=s,a.prototype.visitUnion=s,a.prototype.visitDenseUnion=l,a.prototype.visitSparseUnion=l,a.prototype.visitDictionary=s,a.prototype.visitInterval=s,a.prototype.visitIntervalDayTime=s,a.prototype.visitIntervalYearMonth=s,a.prototype.visitFixedSizeList=s,a.prototype.visitMap=s,t.instance=new a},39408:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.IteratorVisitor=void 0;const r=n(70171),i=n(17903),o=n(77192),a=n(89544);class s extends i.Visitor{}t.IteratorVisitor=s;class l{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}function c(e){if(e.nullCount>0)return function(e){const t=a.instance.getVisitFn(e);return new o.BitIterator(e.data.nullBitmap,e.data.offset,e.length,e,((e,n,r,i)=>0!=(r&1<<i)?t(e,n):null))}(e);const{type:t,typeId:n,length:i}=e;return 1===e.stride&&(n===r.Type.Timestamp||n===r.Type.Int&&64!==t.bitWidth||n===r.Type.Time&&64!==t.bitWidth||n===r.Type.Float&&t.precision>0)?e.data.values.subarray(0,i)[Symbol.iterator]():new l(e,a.instance.getVisitFn(e))}s.prototype.visitNull=c,s.prototype.visitBool=c,s.prototype.visitInt=c,s.prototype.visitInt8=c,s.prototype.visitInt16=c,s.prototype.visitInt32=c,s.prototype.visitInt64=c,s.prototype.visitUint8=c,s.prototype.visitUint16=c,s.prototype.visitUint32=c,s.prototype.visitUint64=c,s.prototype.visitFloat=c,s.prototype.visitFloat16=c,s.prototype.visitFloat32=c,s.prototype.visitFloat64=c,s.prototype.visitUtf8=c,s.prototype.visitBinary=c,s.prototype.visitFixedSizeBinary=c,s.prototype.visitDate=c,s.prototype.visitDateDay=c,s.prototype.visitDateMillisecond=c,s.prototype.visitTimestamp=c,s.prototype.visitTimestampSecond=c,s.prototype.visitTimestampMillisecond=c,s.prototype.visitTimestampMicrosecond=c,s.prototype.visitTimestampNanosecond=c,s.prototype.visitTime=c,s.prototype.visitTimeSecond=c,s.prototype.visitTimeMillisecond=c,s.prototype.visitTimeMicrosecond=c,s.prototype.visitTimeNanosecond=c,s.prototype.visitDecimal=c,s.prototype.visitList=c,s.prototype.visitStruct=c,s.prototype.visitUnion=c,s.prototype.visitDenseUnion=c,s.prototype.visitSparseUnion=c,s.prototype.visitDictionary=c,s.prototype.visitInterval=c,s.prototype.visitIntervalDayTime=c,s.prototype.visitIntervalYearMonth=c,s.prototype.visitFixedSizeList=c,s.prototype.visitMap=c,t.instance=new s},6715:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONTypeAssembler=void 0;const r=n(17903),i=n(46859),o=n(70171);class a extends r.Visitor{visit(e){return null==e?void 0:super.visit(e)}visitNull({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:n}){return{name:i.Type[e].toLowerCase(),bitWidth:t,isSigned:n}}visitFloat({typeId:e,precision:t}){return{name:i.Type[e].toLowerCase(),precision:o.Precision[t]}}visitBinary({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:n}){return{name:i.Type[e].toLowerCase(),scale:t,precision:n}}visitDate({typeId:e,unit:t}){return{name:i.Type[e].toLowerCase(),unit:o.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:n}){return{name:i.Type[e].toLowerCase(),unit:o.TimeUnit[t],bitWidth:n}}visitTimestamp({typeId:e,timezone:t,unit:n}){return{name:i.Type[e].toLowerCase(),unit:o.TimeUnit[n],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:i.Type[e].toLowerCase(),unit:o.IntervalUnit[t]}}visitList({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:i.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:n}){return{name:i.Type[e].toLowerCase(),mode:o.UnionMode[t],typeIds:[...n]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:i.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:i.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:i.Type[e].toLowerCase(),keysSorted:t}}}t.JSONTypeAssembler=a},18088:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONVectorAssembler=void 0;const r=n(87698),i=n(75507),o=n(60119),a=n(17903),s=n(70171),l=n(42727),c=n(70171),u=n(77192),h=n(63620),d=n(40068);class f extends a.Visitor{static assemble(...e){return(new f).visitMany(h.selectColumnChildrenArgs(l.RecordBatch,e))}visit(e){const{data:t,name:n,length:r}=e,{offset:i,nullCount:a,nullBitmap:l}=t,c=d.DataType.isDictionary(e.type)?e.type.indices:e.type,h=Object.assign([],t.buffers,{[s.BufferType.VALIDITY]:void 0});return Object.assign({name:n,count:r,VALIDITY:d.DataType.isNull(c)?void 0:a<=0?Array.from({length:r},(()=>1)):[...new u.BitIterator(l,i,r,null,u.getBit)]},super.visit(o.Vector.new(t.clone(c,i,r,0,h))))}visitNull(){return{}}visitBool({values:e,offset:t,length:n}){return{DATA:[...new u.BitIterator(e,t,n,null,u.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...g(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...p(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...p(e)]}}visitDate(e){return{DATA:e.type.unit===c.DateUnit.DAY?[...e.values]:[...g(e.values,2)]}}visitTimestamp(e){return{DATA:[...g(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<c.TimeUnit.MICROSECOND?[...e.values]:[...g(e.values,2)]}}visitDecimal(e){return{DATA:[...g(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map(((t,n)=>this.visit(new i.Column(t,[e.getChildAt(n)]))))}}visitStruct(e){return{children:e.type.children.map(((t,n)=>this.visit(new i.Column(t,[e.getChildAt(n)]))))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===c.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map(((t,n)=>this.visit(new i.Column(t,[e.getChildAt(n)]))))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map(((t,n)=>this.visit(new i.Column(t,[e.getChildAt(n)]))))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map(((t,n)=>this.visit(new i.Column(t,[e.getChildAt(n)]))))}}}function*p(e){for(const t of e)yield t.reduce(((e,t)=>`${e}${("0"+(255&t).toString(16)).slice(-2)}`),"").toUpperCase()}function*g(e,t){for(let n=-1,i=e.length/t;++n<i;)yield`${r.BN.new(e.subarray((n+0)*t,(n+1)*t),!1)}`}t.JSONVectorAssembler=f},12149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.SetVisitor=void 0;const r=n(60119),i=n(17903),o=n(75426),a=n(70121),s=n(56616),l=n(70171);class c extends i.Visitor{}t.SetVisitor=c;const u=(e,t,n)=>{e[t]=n%4294967296|0,e[t+1]=n/4294967296|0},h=(e,t,n,r)=>{const{[n]:i,[n+1]:o}=t;null!=i&&null!=o&&e.set(r.subarray(0,o-i),i)},d=({values:e},t,n)=>{((e,t,n)=>{e[t]=n/864e5|0})(e,t,n.valueOf())},f=({values:e},t,n)=>{u(e,2*t,n.valueOf())},p=({stride:e,values:t},n,r)=>{t[e*n]=r},g=({stride:e,values:t},n,r)=>{t[e*n]=a.float64ToUint16(r)},m=(e,t,n)=>{switch(typeof n){case"bigint":e.values64[t]=n;break;case"number":e.values[t*e.stride]=n;break;default:{const r=n,{stride:i,ArrayType:o}=e,a=s.toArrayBufferView(o,r);e.values.set(a.subarray(0,i),i*t)}}},v=({values:e},t,n)=>u(e,2*t,n/1e3),y=({values:e},t,n)=>u(e,2*t,n),b=({values:e},t,n)=>((e,t,n)=>{e[t]=1e3*n%4294967296|0,e[t+1]=1e3*n/4294967296|0})(e,2*t,n),_=({values:e},t,n)=>((e,t,n)=>{e[t]=1e6*n%4294967296|0,e[t+1]=1e6*n/4294967296|0})(e,2*t,n),x=({values:e,stride:t},n,r)=>{e[t*n]=r},w=({values:e,stride:t},n,r)=>{e[t*n]=r},A=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},k=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},T=(e,t,n)=>{const r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(e.valueOffsets[t],n)},S=(e,t,n)=>{const r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(t,n)},E=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},C=({values:e},t,n)=>{e[t]=12*n[0]+n[1]%12};c.prototype.visitBool=({offset:e,values:t},n,r)=>{const i=e+n;r?t[i>>3]|=1<<i%8:t[i>>3]&=~(1<<i%8)},c.prototype.visitInt=(e,t,n)=>{e.type.bitWidth<64?p(e,t,n):m(e,t,n)},c.prototype.visitInt8=p,c.prototype.visitInt16=p,c.prototype.visitInt32=p,c.prototype.visitInt64=m,c.prototype.visitUint8=p,c.prototype.visitUint16=p,c.prototype.visitUint32=p,c.prototype.visitUint64=m,c.prototype.visitFloat=(e,t,n)=>{e.type.precision!==l.Precision.HALF?p(e,t,n):g(e,t,n)},c.prototype.visitFloat16=g,c.prototype.visitFloat32=p,c.prototype.visitFloat64=p,c.prototype.visitUtf8=({values:e,valueOffsets:t},n,r)=>{h(e,t,n,o.encodeUtf8(r))},c.prototype.visitBinary=({values:e,valueOffsets:t},n,r)=>h(e,t,n,r),c.prototype.visitFixedSizeBinary=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},c.prototype.visitDate=(e,t,n)=>{e.type.unit===l.DateUnit.DAY?d(e,t,n):f(e,t,n)},c.prototype.visitDateDay=d,c.prototype.visitDateMillisecond=f,c.prototype.visitTimestamp=(e,t,n)=>{switch(e.type.unit){case l.TimeUnit.SECOND:return v(e,t,n);case l.TimeUnit.MILLISECOND:return y(e,t,n);case l.TimeUnit.MICROSECOND:return b(e,t,n);case l.TimeUnit.NANOSECOND:return _(e,t,n)}},c.prototype.visitTimestampSecond=v,c.prototype.visitTimestampMillisecond=y,c.prototype.visitTimestampMicrosecond=b,c.prototype.visitTimestampNanosecond=_,c.prototype.visitTime=(e,t,n)=>{switch(e.type.unit){case l.TimeUnit.SECOND:return x(e,t,n);case l.TimeUnit.MILLISECOND:return w(e,t,n);case l.TimeUnit.MICROSECOND:return A(e,t,n);case l.TimeUnit.NANOSECOND:return k(e,t,n)}},c.prototype.visitTimeSecond=x,c.prototype.visitTimeMillisecond=w,c.prototype.visitTimeMicrosecond=A,c.prototype.visitTimeNanosecond=k,c.prototype.visitDecimal=({values:e},t,n)=>{e.set(n.subarray(0,4),4*t)},c.prototype.visitList=(e,t,n)=>{const r=e.getChildAt(0),i=e.valueOffsets;for(let e=-1,o=i[t],a=i[t+1];o<a;)r.set(o++,n.get(++e))},c.prototype.visitStruct=(e,t,n)=>{const i=n instanceof Map?(o=t,a=n,(e,t,n)=>null==e?void 0:e.set(o,a.get(t.name))):n instanceof r.Vector?((e,t)=>(n,r,i)=>null==n?void 0:n.set(e,t.get(i)))(t,n):Array.isArray(n)?((e,t)=>(n,r,i)=>null==n?void 0:n.set(e,t[i]))(t,n):((e,t)=>(n,r,i)=>null==n?void 0:n.set(e,t[r.name]))(t,n);var o,a;e.type.children.forEach(((t,n)=>i(e.getChildAt(n),t,n)))},c.prototype.visitUnion=(e,t,n)=>{e.type.mode===l.UnionMode.Dense?T(e,t,n):S(e,t,n)},c.prototype.visitDenseUnion=T,c.prototype.visitSparseUnion=S,c.prototype.visitDictionary=(e,t,n)=>{const r=e.getKey(t);null!==r&&e.setValue(r,n)},c.prototype.visitInterval=(e,t,n)=>{e.type.unit===l.IntervalUnit.DAY_TIME?E(e,t,n):C(e,t,n)},c.prototype.visitIntervalDayTime=E,c.prototype.visitIntervalYearMonth=C,c.prototype.visitFixedSizeList=(e,t,n)=>{const r=e.getChildAt(0),{stride:i}=e;for(let e=-1,o=t*i;++e<i;)r.set(o+e,n.get(e))},c.prototype.visitMap=(e,t,n)=>{const r=e.getChildAt(0),i=e.valueOffsets,o=n instanceof Map?[...n]:Object.entries(n);for(let e=-1,n=i[t],a=i[t+1];n<a;)r.set(n++,o[++e])},t.instance=new c},34625:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.ToArrayVisitor=void 0;const r=n(70171),i=n(17903),o=n(39408);class a extends i.Visitor{}function s(e){const{type:t,length:n,stride:i}=e;switch(t.typeId){case r.Type.Int:case r.Type.Float:case r.Type.Decimal:case r.Type.Time:case r.Type.Timestamp:return e.data.values.subarray(0,n*i)}return[...o.instance.visit(e)]}t.ToArrayVisitor=a,a.prototype.visitNull=s,a.prototype.visitBool=s,a.prototype.visitInt=s,a.prototype.visitInt8=s,a.prototype.visitInt16=s,a.prototype.visitInt32=s,a.prototype.visitInt64=s,a.prototype.visitUint8=s,a.prototype.visitUint16=s,a.prototype.visitUint32=s,a.prototype.visitUint64=s,a.prototype.visitFloat=s,a.prototype.visitFloat16=s,a.prototype.visitFloat32=s,a.prototype.visitFloat64=s,a.prototype.visitUtf8=s,a.prototype.visitBinary=s,a.prototype.visitFixedSizeBinary=s,a.prototype.visitDate=s,a.prototype.visitDateDay=s,a.prototype.visitDateMillisecond=s,a.prototype.visitTimestamp=s,a.prototype.visitTimestampSecond=s,a.prototype.visitTimestampMillisecond=s,a.prototype.visitTimestampMicrosecond=s,a.prototype.visitTimestampNanosecond=s,a.prototype.visitTime=s,a.prototype.visitTimeSecond=s,a.prototype.visitTimeMillisecond=s,a.prototype.visitTimeMicrosecond=s,a.prototype.visitTimeNanosecond=s,a.prototype.visitDecimal=s,a.prototype.visitList=s,a.prototype.visitStruct=s,a.prototype.visitUnion=s,a.prototype.visitDenseUnion=s,a.prototype.visitSparseUnion=s,a.prototype.visitDictionary=s,a.prototype.visitInterval=s,a.prototype.visitIntervalDayTime=s,a.prototype.visitIntervalYearMonth=s,a.prototype.visitFixedSizeList=s,a.prototype.visitMap=s,t.instance=new a},13811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.TypeAssembler=void 0;var r=n(52385).flatbuffers.Long;const i=n(17903),o=n(46859);class a extends i.Visitor{visit(e,t){return null==e||null==t?void 0:super.visit(e,t)}visitNull(e,t){return o.Null.startNull(t),o.Null.endNull(t)}visitInt(e,t){return o.Int.startInt(t),o.Int.addBitWidth(t,e.bitWidth),o.Int.addIsSigned(t,e.isSigned),o.Int.endInt(t)}visitFloat(e,t){return o.FloatingPoint.startFloatingPoint(t),o.FloatingPoint.addPrecision(t,e.precision),o.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return o.Binary.startBinary(t),o.Binary.endBinary(t)}visitBool(e,t){return o.Bool.startBool(t),o.Bool.endBool(t)}visitUtf8(e,t){return o.Utf8.startUtf8(t),o.Utf8.endUtf8(t)}visitDecimal(e,t){return o.Decimal.startDecimal(t),o.Decimal.addScale(t,e.scale),o.Decimal.addPrecision(t,e.precision),o.Decimal.endDecimal(t)}visitDate(e,t){return o.Date.startDate(t),o.Date.addUnit(t,e.unit),o.Date.endDate(t)}visitTime(e,t){return o.Time.startTime(t),o.Time.addUnit(t,e.unit),o.Time.addBitWidth(t,e.bitWidth),o.Time.endTime(t)}visitTimestamp(e,t){const n=e.timezone&&t.createString(e.timezone)||void 0;return o.Timestamp.startTimestamp(t),o.Timestamp.addUnit(t,e.unit),void 0!==n&&o.Timestamp.addTimezone(t,n),o.Timestamp.endTimestamp(t)}visitInterval(e,t){return o.Interval.startInterval(t),o.Interval.addUnit(t,e.unit),o.Interval.endInterval(t)}visitList(e,t){return o.List.startList(t),o.List.endList(t)}visitStruct(e,t){return o.Struct_.startStruct_(t),o.Struct_.endStruct_(t)}visitUnion(e,t){o.Union.startTypeIdsVector(t,e.typeIds.length);const n=o.Union.createTypeIdsVector(t,e.typeIds);return o.Union.startUnion(t),o.Union.addMode(t,e.mode),o.Union.addTypeIds(t,n),o.Union.endUnion(t)}visitDictionary(e,t){const n=this.visit(e.indices,t);return o.DictionaryEncoding.startDictionaryEncoding(t),o.DictionaryEncoding.addId(t,new r(e.id,0)),o.DictionaryEncoding.addIsOrdered(t,e.isOrdered),void 0!==n&&o.DictionaryEncoding.addIndexType(t,n),o.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return o.FixedSizeBinary.startFixedSizeBinary(t),o.FixedSizeBinary.addByteWidth(t,e.byteWidth),o.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return o.FixedSizeList.startFixedSizeList(t),o.FixedSizeList.addListSize(t,e.listSize),o.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return o.Map.startMap(t),o.Map.addKeysSorted(t,e.keysSorted),o.Map.endMap(t)}}t.TypeAssembler=a,t.instance=new a},16480:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareTypes=t.compareFields=t.compareSchemas=t.instance=t.TypeComparator=void 0;const r=n(17903);class i extends r.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>this.compareFields(e,t[n])))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function o(e,t){return t instanceof e.constructor}function a(e,t){return e===t||o(e,t)}function s(e,t){return e===t||o(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function l(e,t){return e===t||o(e,t)&&e.precision===t.precision}function c(e,t){return e===t||o(e,t)&&e.unit===t.unit}function u(e,t){return e===t||o(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function h(e,t){return e===t||o(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function d(e,n){return e===n||o(e,n)&&e.mode===n.mode&&e.typeIds.every(((e,t)=>e===n.typeIds[t]))&&t.instance.compareManyFields(e.children,n.children)}function f(e,t){return e===t||o(e,t)&&e.unit===t.unit}t.TypeComparator=i,i.prototype.visitNull=a,i.prototype.visitBool=a,i.prototype.visitInt=s,i.prototype.visitInt8=s,i.prototype.visitInt16=s,i.prototype.visitInt32=s,i.prototype.visitInt64=s,i.prototype.visitUint8=s,i.prototype.visitUint16=s,i.prototype.visitUint32=s,i.prototype.visitUint64=s,i.prototype.visitFloat=l,i.prototype.visitFloat16=l,i.prototype.visitFloat32=l,i.prototype.visitFloat64=l,i.prototype.visitUtf8=a,i.prototype.visitBinary=a,i.prototype.visitFixedSizeBinary=function(e,t){return e===t||o(e,t)&&e.byteWidth===t.byteWidth},i.prototype.visitDate=c,i.prototype.visitDateDay=c,i.prototype.visitDateMillisecond=c,i.prototype.visitTimestamp=u,i.prototype.visitTimestampSecond=u,i.prototype.visitTimestampMillisecond=u,i.prototype.visitTimestampMicrosecond=u,i.prototype.visitTimestampNanosecond=u,i.prototype.visitTime=h,i.prototype.visitTimeSecond=h,i.prototype.visitTimeMillisecond=h,i.prototype.visitTimeMicrosecond=h,i.prototype.visitTimeNanosecond=h,i.prototype.visitDecimal=a,i.prototype.visitList=function(e,n){return e===n||o(e,n)&&e.children.length===n.children.length&&t.instance.compareManyFields(e.children,n.children)},i.prototype.visitStruct=function(e,n){return e===n||o(e,n)&&e.children.length===n.children.length&&t.instance.compareManyFields(e.children,n.children)},i.prototype.visitUnion=d,i.prototype.visitDenseUnion=d,i.prototype.visitSparseUnion=d,i.prototype.visitDictionary=function(e,n){return e===n||o(e,n)&&e.id===n.id&&e.isOrdered===n.isOrdered&&t.instance.visit(e.indices,n.indices)&&t.instance.visit(e.dictionary,n.dictionary)},i.prototype.visitInterval=f,i.prototype.visitIntervalDayTime=f,i.prototype.visitIntervalYearMonth=f,i.prototype.visitFixedSizeList=function(e,n){return e===n||o(e,n)&&e.listSize===n.listSize&&e.children.length===n.children.length&&t.instance.compareManyFields(e.children,n.children)},i.prototype.visitMap=function(e,n){return e===n||o(e,n)&&e.keysSorted===n.keysSorted&&e.children.length===n.children.length&&t.instance.compareManyFields(e.children,n.children)},t.instance=new i,t.compareSchemas=function(e,n){return t.instance.compareSchemas(e,n)},t.compareFields=function(e,n){return t.instance.compareFields(e,n)},t.compareTypes=function(e,n){return t.instance.visit(e,n)}},37038:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorAssembler=void 0;const r=n(17903),i=n(70171),o=n(42727),a=n(56616),s=n(77192),l=n(63620),c=n(71005),u=n(40068);class h extends r.Visitor{constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){const t=new h,n=l.selectVectorChildrenArgs(o.RecordBatch,e),[r=t]=t.visitMany(n);return r}visit(e){if(!u.DataType.isDictionary(e.type)){const{data:t,length:n,nullCount:r}=e;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");u.DataType.isNull(e.type)||d.call(this,r<=0?new Uint8Array(0):s.truncateBitmap(t.offset,n,t.nullBitmap)),this.nodes.push(new c.FieldNode(n,r))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function d(e){const t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new c.BufferRegion(this._byteLength,t)),this._byteLength+=t,this}function f(e){return d.call(this,e.values.subarray(0,e.length*e.stride))}function p(e){const{length:t,values:n,valueOffsets:r}=e,i=r[0],o=r[t],s=Math.min(o-i,n.byteLength-i);return d.call(this,a.rebaseValueOffsets(-r[0],t,r)),d.call(this,n.subarray(i,i+s)),this}function g(e){const{length:t,valueOffsets:n}=e;return n&&d.call(this,a.rebaseValueOffsets(n[0],t,n)),this.visit(e.getChildAt(0))}function m(e){return this.visitMany(e.type.children.map(((t,n)=>e.getChildAt(n))).filter(Boolean))[0]}t.VectorAssembler=h,h.prototype.visitBool=function(e){let t;return e.nullCount>=e.length?d.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?d.call(this,s.truncateBitmap(e.offset,e.length,t)):d.call(this,s.packBools(e))},h.prototype.visitInt=f,h.prototype.visitFloat=f,h.prototype.visitUtf8=p,h.prototype.visitBinary=p,h.prototype.visitFixedSizeBinary=f,h.prototype.visitDate=f,h.prototype.visitTimestamp=f,h.prototype.visitTime=f,h.prototype.visitDecimal=f,h.prototype.visitList=g,h.prototype.visitStruct=m,h.prototype.visitUnion=function(e){const{type:t,length:n,typeIds:r,valueOffsets:o}=e;if(d.call(this,r),t.mode===i.UnionMode.Sparse)return m.call(this,e);if(t.mode===i.UnionMode.Dense){if(e.offset<=0)return d.call(this,o),m.call(this,e);{const i=r.reduce(((e,t)=>Math.max(e,t)),r[0]),s=new Int32Array(i+1),l=new Int32Array(i+1).fill(-1),c=new Int32Array(n),u=a.rebaseValueOffsets(-o[0],n,o);for(let e,t,i=-1;++i<n;)-1===(t=l[e=r[i]])&&(t=l[e]=u[e]),c[i]=u[i]-t,++s[e];d.call(this,c);for(let r,i=-1,o=t.children.length;++i<o;)if(r=e.getChildAt(i)){const e=t.typeIds[i],o=Math.min(n,s[e]);this.visit(r.slice(l[e],o))}}}return this},h.prototype.visitInterval=f,h.prototype.visitFixedSizeList=g,h.prototype.visitMap=g},29950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instance=t.GetVectorConstructor=void 0;const r=n(17903),i=n(27373),o=n(44483),a=n(52554),s=n(84865),l=n(73250),c=n(20491),u=n(15235),h=n(78653),d=n(26852),f=n(18053),p=n(508),g=n(77197),m=n(96626),v=n(66808),y=n(84333),b=n(54498),_=n(19135),x=n(28192);class w extends r.Visitor{visitNull(){return m.NullVector}visitBool(){return o.BoolVector}visitInt(){return f.IntVector}visitInt8(){return f.Int8Vector}visitInt16(){return f.Int16Vector}visitInt32(){return f.Int32Vector}visitInt64(){return f.Int64Vector}visitUint8(){return f.Uint8Vector}visitUint16(){return f.Uint16Vector}visitUint32(){return f.Uint32Vector}visitUint64(){return f.Uint64Vector}visitFloat(){return h.FloatVector}visitFloat16(){return h.Float16Vector}visitFloat32(){return h.Float32Vector}visitFloat64(){return h.Float64Vector}visitUtf8(){return x.Utf8Vector}visitBinary(){return i.BinaryVector}visitFixedSizeBinary(){return c.FixedSizeBinaryVector}visitDate(){return a.DateVector}visitDateDay(){return a.DateDayVector}visitDateMillisecond(){return a.DateMillisecondVector}visitTimestamp(){return y.TimestampVector}visitTimestampSecond(){return y.TimestampSecondVector}visitTimestampMillisecond(){return y.TimestampMillisecondVector}visitTimestampMicrosecond(){return y.TimestampMicrosecondVector}visitTimestampNanosecond(){return y.TimestampNanosecondVector}visitTime(){return b.TimeVector}visitTimeSecond(){return b.TimeSecondVector}visitTimeMillisecond(){return b.TimeMillisecondVector}visitTimeMicrosecond(){return b.TimeMicrosecondVector}visitTimeNanosecond(){return b.TimeNanosecondVector}visitDecimal(){return s.DecimalVector}visitList(){return p.ListVector}visitStruct(){return v.StructVector}visitUnion(){return _.UnionVector}visitDenseUnion(){return _.DenseUnionVector}visitSparseUnion(){return _.SparseUnionVector}visitDictionary(){return l.DictionaryVector}visitInterval(){return d.IntervalVector}visitIntervalDayTime(){return d.IntervalDayTimeVector}visitIntervalYearMonth(){return d.IntervalYearMonthVector}visitFixedSizeList(){return u.FixedSizeListVector}visitMap(){return g.MapVector}}t.GetVectorConstructor=w,t.instance=new w},67143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONVectorLoader=t.VectorLoader=void 0;const r=n(76076),i=n(89),o=n(40068),a=n(17903),s=n(77192),l=n(75426),c=n(3398),u=n(70171),h=n(56616);class d extends a.Visitor{constructor(e,t,n,r){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=n,this.dictionaries=r}visit(e){return super.visit(e instanceof i.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return r.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Bool(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitInt(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Int(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitFloat(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Float(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitUtf8(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Utf8(e,0,t,n,this.readNullBitmap(e,n),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Binary(e,0,t,n,this.readNullBitmap(e,n),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.FixedSizeBinary(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitDate(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Date(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitTimestamp(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Timestamp(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitTime(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Time(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitDecimal(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Decimal(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitList(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.List(e,0,t,n,this.readNullBitmap(e,n),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Struct(e,0,t,n,this.readNullBitmap(e,n),this.visitMany(e.children))}visitUnion(e){return e.mode===u.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Union(e,0,t,n,this.readNullBitmap(e,n),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Union(e,0,t,n,this.readNullBitmap(e,n),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Dictionary(e,0,t,n,this.readNullBitmap(e,n),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Interval(e,0,t,n,this.readNullBitmap(e,n),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.FixedSizeList(e,0,t,n,this.readNullBitmap(e,n),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:n}=this.nextFieldNode()){return r.Data.Map(e,0,t,n,this.readNullBitmap(e,n),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,n=this.nextBufferRange()){return t>0&&this.readData(e,n)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}}t.VectorLoader=d,t.JSONVectorLoader=class extends d{constructor(e,t,n,r){super(new Uint8Array(0),t,n,r),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array(0):s.packBools(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return h.toArrayBufferView(Uint8Array,h.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return h.toArrayBufferView(Uint8Array,h.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:n}=this;return o.DataType.isTimestamp(e)||(o.DataType.isInt(e)||o.DataType.isTime(e))&&64===e.bitWidth||o.DataType.isDate(e)&&e.unit===u.DateUnit.MILLISECOND?h.toArrayBufferView(Uint8Array,c.Int64.convertArray(n[t])):o.DataType.isDecimal(e)?h.toArrayBufferView(Uint8Array,c.Int128.convertArray(n[t])):o.DataType.isBinary(e)||o.DataType.isFixedSizeBinary(e)?function(e){const t=e.join(""),n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e>>1]=parseInt(t.substr(e,2),16);return n}(n[t]):o.DataType.isBool(e)?s.packBools(n[t]):o.DataType.isUtf8(e)?l.encodeUtf8(n[t].join("")):h.toArrayBufferView(Uint8Array,h.toArrayBufferView(e.ArrayType,n[t].map((e=>+e))))}}},97015:function(e){e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t=e,n={},r=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r<i.length;r+=1){var o=i[r];n["[object "+o+"]"]=o.toLowerCase()}var a=function(e){return n[Object.prototype.toString.call(e)]||"object"},s=a,l=a,c=Math.PI,u={clip_rgb:function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var n=0;n<=3;n++)n<3?((e[n]<0||e[n]>255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):3===n&&(e[n]=t(e[n],0,1));return e},limit:e,type:a,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==s(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==l(e[t])?e[t].toLowerCase():null},PI:c,TWOPI:2*c,PITHIRD:c/3,DEG2RAD:c/180,RAD2DEG:180/c},h={format:{},autodetect:[]},d=u.last,f=u.clip_rgb,p=u.type,g=h,m=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=d(e),i=!1;if(!r){i=!0,g.sorted||(g.autodetect=g.autodetect.sort((function(e,t){return t.p-e.p})),g.sorted=!0);for(var o=0,a=g.autodetect;o<a.length;o+=1){var s=a[o];if(r=s.test.apply(s,e))break}}if(!g.format[r])throw new Error("unknown format: "+e);var l=g.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=f(l),3===n._rgb.length&&n._rgb.push(1)};m.prototype.toString=function(){return"function"==p(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var v=m,y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(y.Color,[null].concat(e)))};y.Color=v,y.version="2.4.2";var b=y,_=u.unpack,x=Math.max,w=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=_(e,"rgb"),r=n[0],i=n[1],o=n[2],a=1-x(r/=255,x(i/=255,o/=255)),s=a<1?1/(1-a):0;return[(1-r-a)*s,(1-i-a)*s,(1-o-a)*s,a]},A=u.unpack,k=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=A(e,"cmyk"))[0],r=e[1],i=e[2],o=e[3],a=e.length>4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},T=b,S=v,E=h,C=u.unpack,M=u.type,O=w;S.prototype.cmyk=function(){return O(this._rgb)},T.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(S,[null].concat(e,["cmyk"])))},E.format.cmyk=k,E.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=C(e,"cmyk"),"array"===M(e)&&4===e.length)return"cmyk"}});var L=u.unpack,D=u.last,I=function(e){return Math.round(100*e)/100},R=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=L(e,"hsla"),r=D(e)||"lsa";return n[0]=I(n[0]||0),n[1]=I(100*n[1])+"%",n[2]=I(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},P=u.unpack,N=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=P(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,s=Math.min(n,r,i),l=Math.max(n,r,i),c=(l+s)/2;return l===s?(o=0,a=Number.NaN):o=c<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?a=(r-i)/(l-s):r==l?a=2+(i-n)/(l-s):i==l&&(a=4+(n-r)/(l-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,c,e[3]]:[a,o,c]},z=u.unpack,F=u.last,B=R,j=N,U=Math.round,V=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=z(e,"rgba"),r=F(e)||"rgb";return"hsl"==r.substr(0,3)?B(j(n),r):(n[0]=U(n[0]),n[1]=U(n[1]),n[2]=U(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},q=u.unpack,H=Math.round,$=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=q(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)r=i=o=255*l;else{var c=[0,0,0],u=[0,0,0],h=l<.5?l*(1+s):l+s-l*s,d=2*l-h,f=a/360;c[0]=f+1/3,c[1]=f,c[2]=f-1/3;for(var p=0;p<3;p++)c[p]<0&&(c[p]+=1),c[p]>1&&(c[p]-=1),6*c[p]<1?u[p]=d+6*(h-d)*c[p]:2*c[p]<1?u[p]=h:3*c[p]<2?u[p]=d+(h-d)*(2/3-c[p])*6:u[p]=d;r=(e=[H(255*u[0]),H(255*u[1]),H(255*u[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},W=$,G=h,Y=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,X=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,K=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,J=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),G.format.named)try{return G.format.named(e)}catch(e){}if(t=e.match(Y)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(X)){for(var i=t.slice(1,5),o=0;o<4;o++)i[o]=+i[o];return i}if(t=e.match(Z)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=ee(2.55*a[s]);return a[3]=1,a}if(t=e.match(K)){for(var l=t.slice(1,5),c=0;c<3;c++)l[c]=ee(2.55*l[c]);return l[3]=+l[3],l}if(t=e.match(J)){var u=t.slice(1,4);u[1]*=.01,u[2]*=.01;var h=W(u);return h[3]=1,h}if(t=e.match(Q)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=W(d);return f[3]=+t[4],f}};te.test=function(e){return Y.test(e)||X.test(e)||Z.test(e)||K.test(e)||J.test(e)||Q.test(e)};var ne=b,re=v,ie=h,oe=u.type,ae=V,se=te;re.prototype.css=function(e){return ae(this._rgb,e)},ne.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(re,[null].concat(e,["css"])))},ie.format.css=se,ie.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===oe(e)&&se.test(e))return"css"}});var le=v,ce=b,ue=u.unpack;h.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ue(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},ce.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(le,[null].concat(e,["gl"])))},le.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var he=u.unpack,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=he(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Math.min(i,o,a),l=Math.max(i,o,a),c=l-s,u=100*c/255,h=s/(255-c)*100;return 0===c?n=Number.NaN:(i===l&&(n=(o-a)/c),o===l&&(n=2+(a-i)/c),a===l&&(n=4+(i-o)/c),(n*=60)<0&&(n+=360)),[n,u,h]},fe=u.unpack,pe=Math.floor,ge=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,c,u,h=(a=fe(a,"hcg"))[0],d=a[1],f=a[2];f*=255;var p=255*d;if(0===d)l=c=u=f;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var g=pe(h/=60),m=h-g,v=f*(1-d),y=v+p*(1-m),b=v+p*m,_=v+p;switch(g){case 0:l=(e=[_,b,v])[0],c=e[1],u=e[2];break;case 1:l=(t=[y,_,v])[0],c=t[1],u=t[2];break;case 2:l=(n=[v,_,b])[0],c=n[1],u=n[2];break;case 3:l=(r=[v,y,_])[0],c=r[1],u=r[2];break;case 4:l=(i=[b,v,_])[0],c=i[1],u=i[2];break;case 5:l=(o=[_,v,y])[0],c=o[1],u=o[2]}}return[l,c,u,a.length>3?a[3]:1]},me=u.unpack,ve=u.type,ye=b,be=v,_e=h,xe=de;be.prototype.hcg=function(){return xe(this._rgb)},ye.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(be,[null].concat(e,["hcg"])))},_e.format.hcg=ge,_e.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=me(e,"hcg"),"array"===ve(e)&&3===e.length)return"hcg"}});var we=u.unpack,Ae=u.last,ke=Math.round,Te=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=we(e,"rgba"),r=n[0],i=n[1],o=n[2],a=n[3],s=Ae(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var l="000000"+((r=ke(r))<<16|(i=ke(i))<<8|(o=ke(o))).toString(16);l=l.substr(l.length-6);var c="0"+ke(255*a).toString(16);switch(c=c.substr(c.length-2),s.toLowerCase()){case"rgba":return"#"+l+c;case"argb":return"#"+c+l;default:return"#"+l}},Se=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ee=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ce=function(e){if(e.match(Se)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Ee)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},Me=b,Oe=v,Le=u.type,De=h,Ie=Te;Oe.prototype.hex=function(e){return Ie(this._rgb,e)},Me.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Oe,[null].concat(e,["hex"])))},De.format.hex=Ce,De.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===Le(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var Re=u.unpack,Pe=u.TWOPI,Ne=Math.min,ze=Math.sqrt,Fe=Math.acos,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=Re(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Ne(i/=255,o/=255,a/=255),l=(i+o+a)/3,c=l>0?1-s/l:0;return 0===c?n=NaN:(n=(i-o+(i-a))/2,n/=ze((i-o)*(i-o)+(i-a)*(o-a)),n=Fe(n),a>o&&(n=Pe-n),n/=Pe),[360*n,c,l]},je=u.unpack,Ue=u.limit,Ve=u.TWOPI,qe=u.PITHIRD,He=Math.cos,$e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=je(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?r=1-((i=(1-a)/3)+(n=(1+a*He(Ve*o)/He(qe-Ve*o))/3)):o<2/3?i=1-((n=(1-a)/3)+(r=(1+a*He(Ve*(o-=1/3))/He(qe-Ve*o))/3)):n=1-((r=(1-a)/3)+(i=(1+a*He(Ve*(o-=2/3))/He(qe-Ve*o))/3)),[255*(n=Ue(s*n*3)),255*(r=Ue(s*r*3)),255*(i=Ue(s*i*3)),e.length>3?e[3]:1]},We=u.unpack,Ge=u.type,Ye=b,Xe=v,Ze=h,Ke=Be;Xe.prototype.hsi=function(){return Ke(this._rgb)},Ye.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Xe,[null].concat(e,["hsi"])))},Ze.format.hsi=$e,Ze.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=We(e,"hsi"),"array"===Ge(e)&&3===e.length)return"hsi"}});var Je=u.unpack,Qe=u.type,et=b,tt=v,nt=h,rt=N;tt.prototype.hsl=function(){return rt(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},nt.format.hsl=$,nt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Je(e,"hsl"),"array"===Qe(e)&&3===e.length)return"hsl"}});var it=u.unpack,ot=Math.min,at=Math.max,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=it(e,"rgb"))[0],a=e[1],s=e[2],l=ot(o,a,s),c=at(o,a,s),u=c-l;return i=c/255,0===c?(n=Number.NaN,r=0):(r=u/c,o===c&&(n=(a-s)/u),a===c&&(n=2+(s-o)/u),s===c&&(n=4+(o-a)/u),(n*=60)<0&&(n+=360)),[n,r,i]},lt=u.unpack,ct=Math.floor,ut=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,c,u,h=(a=lt(a,"hsv"))[0],d=a[1],f=a[2];if(f*=255,0===d)l=c=u=f;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=ct(h/=60),g=h-p,m=f*(1-d),v=f*(1-d*g),y=f*(1-d*(1-g));switch(p){case 0:l=(e=[f,y,m])[0],c=e[1],u=e[2];break;case 1:l=(t=[v,f,m])[0],c=t[1],u=t[2];break;case 2:l=(n=[m,f,y])[0],c=n[1],u=n[2];break;case 3:l=(r=[m,v,f])[0],c=r[1],u=r[2];break;case 4:l=(i=[y,m,f])[0],c=i[1],u=i[2];break;case 5:l=(o=[f,m,v])[0],c=o[1],u=o[2]}}return[l,c,u,a.length>3?a[3]:1]},ht=u.unpack,dt=u.type,ft=b,pt=v,gt=h,mt=st;pt.prototype.hsv=function(){return mt(this._rgb)},ft.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pt,[null].concat(e,["hsv"])))},gt.format.hsv=ut,gt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ht(e,"hsv"),"array"===dt(e)&&3===e.length)return"hsv"}});var vt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},yt=vt,bt=u.unpack,_t=Math.pow,xt=function(e){return(e/=255)<=.04045?e/12.92:_t((e+.055)/1.055,2.4)},wt=function(e){return e>yt.t3?_t(e,1/3):e/yt.t2+yt.t0},At=function(e,t,n){return e=xt(e),t=xt(t),n=xt(n),[wt((.4124564*e+.3575761*t+.1804375*n)/yt.Xn),wt((.2126729*e+.7151522*t+.072175*n)/yt.Yn),wt((.0193339*e+.119192*t+.9503041*n)/yt.Zn)]},kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=bt(e,"rgb"),r=n[0],i=n[1],o=n[2],a=At(r,i,o),s=a[0],l=a[1],c=116*l-16;return[c<0?0:c,500*(s-l),200*(l-a[2])]},Tt=vt,St=u.unpack,Et=Math.pow,Ct=function(e){return 255*(e<=.00304?12.92*e:1.055*Et(e,1/2.4)-.055)},Mt=function(e){return e>Tt.t1?e*e*e:Tt.t2*(e-Tt.t0)},Ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=St(e,"lab"))[0],a=e[1],s=e[2];return r=(o+16)/116,n=isNaN(a)?r:r+a/500,i=isNaN(s)?r:r-s/200,r=Tt.Yn*Mt(r),n=Tt.Xn*Mt(n),i=Tt.Zn*Mt(i),[Ct(3.2404542*n-1.5371385*r-.4985314*i),Ct(-.969266*n+1.8760108*r+.041556*i),Ct(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Lt=u.unpack,Dt=u.type,It=b,Rt=v,Pt=h,Nt=kt;Rt.prototype.lab=function(){return Nt(this._rgb)},It.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Rt,[null].concat(e,["lab"])))},Pt.format.lab=Ot,Pt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Lt(e,"lab"),"array"===Dt(e)&&3===e.length)return"lab"}});var zt=u.unpack,Ft=u.RAD2DEG,Bt=Math.sqrt,jt=Math.atan2,Ut=Math.round,Vt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=zt(e,"lab"),r=n[0],i=n[1],o=n[2],a=Bt(i*i+o*o),s=(jt(o,i)*Ft+360)%360;return 0===Ut(1e4*a)&&(s=Number.NaN),[r,a,s]},qt=u.unpack,Ht=kt,$t=Vt,Wt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=qt(e,"rgb"),r=n[0],i=n[1],o=n[2],a=Ht(r,i,o),s=a[0],l=a[1],c=a[2];return $t(s,l,c)},Gt=u.unpack,Yt=u.DEG2RAD,Xt=Math.sin,Zt=Math.cos,Kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Gt(e,"lch"),r=n[0],i=n[1],o=n[2];return isNaN(o)&&(o=0),[r,Zt(o*=Yt)*i,Xt(o)*i]},Jt=u.unpack,Qt=Kt,en=Ot,tn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Jt(e,"lch"))[0],r=e[1],i=e[2],o=Qt(n,r,i),a=o[0],s=o[1],l=o[2],c=en(a,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},nn=u.unpack,rn=tn,on=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=nn(e,"hcl").reverse();return rn.apply(void 0,n)},an=u.unpack,sn=u.type,ln=b,cn=v,un=h,hn=Wt;cn.prototype.lch=function(){return hn(this._rgb)},cn.prototype.hcl=function(){return hn(this._rgb).reverse()},ln.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cn,[null].concat(e,["lch"])))},ln.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cn,[null].concat(e,["hcl"])))},un.format.lch=tn,un.format.hcl=on,["lch","hcl"].forEach((function(e){return un.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=an(t,e),"array"===sn(t)&&3===t.length)return e}})}));var dn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},fn=h,pn=u.type,gn=dn,mn=Ce,vn=Te;v.prototype.name=function(){for(var e=vn(this._rgb,"rgb"),t=0,n=Object.keys(gn);t<n.length;t+=1){var r=n[t];if(gn[r]===e)return r.toLowerCase()}return e},fn.format.named=function(e){if(e=e.toLowerCase(),gn[e])return mn(gn[e]);throw new Error("unknown color name: "+e)},fn.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===pn(e)&&gn[e.toLowerCase()])return"named"}});var yn=u.unpack,bn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yn(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},_n=u.type,xn=function(e){if("number"==_n(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},wn=b,An=v,kn=h,Tn=u.type,Sn=bn;An.prototype.num=function(){return Sn(this._rgb)},wn.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(An,[null].concat(e,["num"])))},kn.format.num=xn,kn.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Tn(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var En=b,Cn=v,Mn=h,On=u.unpack,Ln=u.type,Dn=Math.round;Cn.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Dn)},Cn.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:Dn(t):t}))},En.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Cn,[null].concat(e,["rgb"])))},Mn.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=On(e,"rgba");return void 0===n[3]&&(n[3]=1),n},Mn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=On(e,"rgba"),"array"===Ln(e)&&(3===e.length||4===e.length&&"number"==Ln(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var In=Math.log,Rn=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=i<6?0:-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*In(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*In(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*In(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*In(n),r=255),[t,n,r,1]},Pn=Rn,Nn=u.unpack,zn=Math.round,Fn=b,Bn=v,jn=h,Un=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Nn(e,"rgb"),i=r[0],o=r[2],a=1e3,s=4e4,l=.4;s-a>l;){var c=Pn(n=.5*(s+a));c[2]/c[0]>=o/i?s=n:a=n}return zn(n)};Bn.prototype.temp=Bn.prototype.kelvin=Bn.prototype.temperature=function(){return Un(this._rgb)},Fn.temp=Fn.kelvin=Fn.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Bn,[null].concat(e,["temp"])))},jn.format.temp=jn.format.kelvin=jn.format.temperature=Rn;var Vn=u.unpack,qn=Math.cbrt,Hn=Math.pow,$n=Math.sign,Wn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Vn(e,"rgb"),r=n[0],i=n[1],o=n[2],a=[Gn(r/255),Gn(i/255),Gn(o/255)],s=a[0],l=a[1],c=a[2],u=qn(.4122214708*s+.5363325363*l+.0514459929*c),h=qn(.2119034982*s+.6806995451*l+.1073969566*c),d=qn(.0883024619*s+.2817188376*l+.6299787005*c);return[.2104542553*u+.793617785*h-.0040720468*d,1.9779984951*u-2.428592205*h+.4505937099*d,.0259040371*u+.7827717662*h-.808675766*d]};function Gn(e){var t=Math.abs(e);return t<.04045?e/12.92:($n(e)||1)*Hn((t+.055)/1.055,2.4)}var Yn=u.unpack,Xn=Math.pow,Zn=Math.sign,Kn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Yn(e,"lab"))[0],r=e[1],i=e[2],o=Xn(n+.3963377774*r+.2158037573*i,3),a=Xn(n-.1055613458*r-.0638541728*i,3),s=Xn(n-.0894841775*r-1.291485548*i,3);return[255*Jn(4.0767416621*o-3.3077115913*a+.2309699292*s),255*Jn(-1.2684380046*o+2.6097574011*a-.3413193965*s),255*Jn(-.0041960863*o-.7034186147*a+1.707614701*s),e.length>3?e[3]:1]};function Jn(e){var t=Math.abs(e);return t>.0031308?(Zn(e)||1)*(1.055*Xn(t,1/2.4)-.055):12.92*e}var Qn=u.unpack,er=u.type,tr=b,nr=v,rr=h,ir=Wn;nr.prototype.oklab=function(){return ir(this._rgb)},tr.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(nr,[null].concat(e,["oklab"])))},rr.format.oklab=Kn,rr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qn(e,"oklab"),"array"===er(e)&&3===e.length)return"oklab"}});var or=u.unpack,ar=Wn,sr=Vt,lr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=or(e,"rgb"),r=n[0],i=n[1],o=n[2],a=ar(r,i,o),s=a[0],l=a[1],c=a[2];return sr(s,l,c)},cr=u.unpack,ur=Kt,hr=Kn,dr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=cr(e,"lch"))[0],r=e[1],i=e[2],o=ur(n,r,i),a=o[0],s=o[1],l=o[2],c=hr(a,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},fr=u.unpack,pr=u.type,gr=b,mr=v,vr=h,yr=lr;mr.prototype.oklch=function(){return yr(this._rgb)},gr.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(mr,[null].concat(e,["oklch"])))},vr.format.oklch=dr,vr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=fr(e,"oklch"),"array"===pr(e)&&3===e.length)return"oklch"}});var br=v,_r=u.type;br.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===_r(e)?t?(this._rgb[3]=e,this):new br([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var xr=v,wr=vt;xr.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=wr.Kn*e,new xr(t,"lab").alpha(this.alpha(),!0)},xr.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},xr.prototype.darker=xr.prototype.darken,xr.prototype.brighter=xr.prototype.brighten,v.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var o=n.indexOf(r)-("ok"===n.substr(0,2)?2:0);if(o>-1)return i[o];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Ar=v,kr=u.type,Tr=Math.pow;Ar.prototype.luminance=function(e){if(void 0!==e&&"number"===kr(e)){if(0===e)return new Ar([0,0,0,this._rgb[3]],"rgb");if(1===e)return new Ar([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var o=t.interpolate(i,.5,"rgb"),a=o.luminance();return Math.abs(e-a)<1e-7||!n--?o:a>e?r(t,o):r(o,i)},i=(t>e?r(new Ar([0,0,0]),this):r(this,new Ar([255,255,255]))).rgb();return new Ar(i.concat([this._rgb[3]]))}return Sr.apply(void 0,this._rgb.slice(0,3))};var Sr=function(e,t,n){return.2126*(e=Er(e))+.7152*(t=Er(t))+.0722*Er(n)},Er=function(e){return(e/=255)<=.03928?e/12.92:Tr((e+.055)/1.055,2.4)},Cr={},Mr=v,Or=u.type,Lr=Cr,Dr=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=r[0]||"lrgb";if(Lr[o]||r.length||(o=Object.keys(Lr)[0]),!Lr[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Or(e)&&(e=new Mr(e)),"object"!==Or(t)&&(t=new Mr(t)),Lr[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))},Ir=v,Rr=Dr;Ir.prototype.mix=Ir.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Rr.apply(void 0,[this,e,t].concat(n))};var Pr=v;Pr.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new Pr([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};var Nr=v,zr=vt;Nr.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=zr.Kn*e,t[1]<0&&(t[1]=0),new Nr(t,"lch").alpha(this.alpha(),!0)},Nr.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Fr=v,Br=u.type;Fr.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],o=r[1],a=this[i]();if(o){var s=i.indexOf(o)-("ok"===i.substr(0,2)?2:0);if(s>-1){if("string"==Br(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==Br(t))throw new Error("unsupported value for Color.set");a[s]=t}var l=new Fr(a,i);return n?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+o+" in mode "+i)}return a};var jr=v;Cr.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new jr(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Ur=v,Vr=Math.sqrt,qr=Math.pow;Cr.lrgb=function(e,t,n){var r=e._rgb,i=r[0],o=r[1],a=r[2],s=t._rgb,l=s[0],c=s[1],u=s[2];return new Ur(Vr(qr(i,2)*(1-n)+qr(l,2)*n),Vr(qr(o,2)*(1-n)+qr(c,2)*n),Vr(qr(a,2)*(1-n)+qr(u,2)*n),"rgb")};var Hr=v;Cr.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new Hr(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var $r=v,Wr=function(e,t,n,r){var i,o,a,s,l,c,u,h,d,f,p,g,m;return"hsl"===r?(a=e.hsl(),s=t.hsl()):"hsv"===r?(a=e.hsv(),s=t.hsv()):"hcg"===r?(a=e.hcg(),s=t.hcg()):"hsi"===r?(a=e.hsi(),s=t.hsi()):"lch"===r||"hcl"===r?(r="hcl",a=e.hcl(),s=t.hcl()):"oklch"===r&&(a=e.oklch().reverse(),s=t.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(l=(i=a)[0],u=i[1],d=i[2],c=(o=s)[0],h=o[1],f=o[2]),isNaN(l)||isNaN(c)?isNaN(l)?isNaN(c)?g=Number.NaN:(g=c,1!=d&&0!=d||"hsv"==r||(p=h)):(g=l,1!=f&&0!=f||"hsv"==r||(p=u)):g=l+n*(c>l&&c-l>180?c-(l+360):c<l&&l-c>180?c+360-l:c-l),void 0===p&&(p=u+n*(h-u)),m=d+n*(f-d),new $r("oklch"===r?[m,p,g]:[g,p,m],r)},Gr=Wr,Yr=function(e,t,n){return Gr(e,t,n,"lch")};Cr.lch=Yr,Cr.hcl=Yr;var Xr=v;Cr.num=function(e,t,n){var r=e.num(),i=t.num();return new Xr(r+n*(i-r),"num")};var Zr=Wr;Cr.hcg=function(e,t,n){return Zr(e,t,n,"hcg")};var Kr=Wr;Cr.hsi=function(e,t,n){return Kr(e,t,n,"hsi")};var Jr=Wr;Cr.hsl=function(e,t,n){return Jr(e,t,n,"hsl")};var Qr=Wr;Cr.hsv=function(e,t,n){return Qr(e,t,n,"hsv")};var ei=v;Cr.oklab=function(e,t,n){var r=e.oklab(),i=t.oklab();return new ei(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"oklab")};var ti=Wr;Cr.oklch=function(e,t,n){return ti(e,t,n,"oklch")};var ni=v,ri=u.clip_rgb,ii=Math.pow,oi=Math.sqrt,ai=Math.PI,si=Math.cos,li=Math.sin,ci=Math.atan2,ui=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i<e.length;i++){var o=e[i],a=t[i]/n,s=o._rgb;r[0]+=ii(s[0],2)*a,r[1]+=ii(s[1],2)*a,r[2]+=ii(s[2],2)*a,r[3]+=s[3]*a}return r[0]=oi(r[0]),r[1]=oi(r[1]),r[2]=oi(r[2]),r[3]>.9999999&&(r[3]=1),new ni(ri(r))},hi=b,di=u.type,fi=Math.pow,pi=function(e){var t="rgb",n=hi("#ccc"),r=0,i=[0,1],o=[],a=[0,0],s=!1,l=[],c=!1,u=0,h=1,d=!1,f={},p=!0,g=1,m=function(e){if((e=e||["#fff","#000"])&&"string"===di(e)&&hi.brewer&&hi.brewer[e.toLowerCase()]&&(e=hi.brewer[e.toLowerCase()]),"array"===di(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=hi(e[t]);o.length=0;for(var n=0;n<e.length;n++)o.push(n/(e.length-1))}return _(),l=e},v=function(e){return e},y=function(e){return e},b=function(e,r){var i,c;if(null==r&&(r=!1),isNaN(e)||null===e)return n;c=r?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,n=0;n<t&&e>=s[n];)n++;return n-1}return 0}(e)/(s.length-2):h!==u?(e-u)/(h-u):1,c=y(c),r||(c=v(c)),1!==g&&(c=fi(c,g)),c=a[0]+c*(1-a[0]-a[1]),c=Math.min(1,Math.max(0,c));var d=Math.floor(1e4*c);if(p&&f[d])i=f[d];else{if("array"===di(l))for(var m=0;m<o.length;m++){var b=o[m];if(c<=b){i=l[m];break}if(c>=b&&m===o.length-1){i=l[m];break}if(c>b&&c<o[m+1]){c=(c-b)/(o[m+1]-b),i=hi.interpolate(l[m],l[m+1],c,t);break}}else"function"===di(l)&&(i=l(c));p&&(f[d]=i)}return i},_=function(){return f={}};m(e);var x=function(e){var t=hi(b(e));return c&&t[c]?t[c]():t};return x.classes=function(e){if(null!=e){if("array"===di(e))s=e,i=[e[0],e[e.length-1]];else{var t=hi.analyze(i);s=0===e?[t.min,t.max]:hi.limits(t,"e",e)}return x}return s},x.domain=function(e){if(!arguments.length)return i;u=e[0],h=e[e.length-1],o=[];var t=l.length;if(e.length===t&&u!==h)for(var n=0,r=Array.from(e);n<r.length;n+=1){var a=r[n];o.push((a-u)/(h-u))}else{for(var s=0;s<t;s++)o.push(s/(t-1));if(e.length>2){var c=e.map((function(t,n){return n/(e.length-1)})),d=e.map((function(e){return(e-u)/(h-u)}));d.every((function(e,t){return c[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var n=(e-d[t])/(d[t+1]-d[t]);return c[t]+n*(c[t+1]-c[t])})}}return i=[u,h],x},x.mode=function(e){return arguments.length?(t=e,_(),x):t},x.range=function(e,t){return m(e),x},x.out=function(e){return c=e,x},x.spread=function(e){return arguments.length?(r=e,x):r},x.correctLightness=function(e){return null==e&&(e=!0),d=e,_(),v=d?function(e){for(var t=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=t>n,i=b(e,!0).lab()[0],o=t+(n-t)*e,a=i-o,s=0,l=1,c=20;Math.abs(a)>.01&&c-- >0;)r&&(a*=-1),a<0?(s=e,e+=.5*(l-e)):(l=e,e+=.5*(s-e)),a=(i=b(e,!0).lab()[0])-o;return e}:function(e){return e},x},x.padding=function(e){return null!=e?("number"===di(e)&&(e=[e,e]),a=e,x):a},x.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=l.slice(0);else if(1===t)r=[x(.5)];else if(t>1){var o=i[0],a=i[1]-o;r=gi(0,t,!1).map((function(e){return x(o+e/(t-1)*a)}))}else{e=[];var c=[];if(s&&s.length>2)for(var u=1,h=s.length,d=1<=h;d?u<h:u>h;d?u++:u--)c.push(.5*(s[u-1]+s[u]));else c=i;r=c.map((function(e){return x(e)}))}return hi[n]&&(r=r.map((function(e){return e[n]()}))),r},x.cache=function(e){return null!=e?(p=e,x):p},x.gamma=function(e){return null!=e?(g=e,x):g},x.nodata=function(e){return null!=e?(n=hi(e),x):n},x};function gi(e,t,n){for(var r=[],i=e<t,o=n?i?t+1:t-1:t,a=e;i?a<o:a>o;i?a++:a--)r.push(a);return r}var mi=v,vi=pi,yi=b,bi=function(e,t,n){if(!bi[n])throw new Error("unknown blend mode "+n);return bi[n](e,t)},_i=function(e){return function(t,n){var r=yi(n).rgb(),i=yi(t).rgb();return yi.rgb(e(r,i))}},xi=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};bi.normal=_i(xi((function(e){return e}))),bi.multiply=_i(xi((function(e,t){return e*t/255}))),bi.screen=_i(xi((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),bi.overlay=_i(xi((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),bi.darken=_i(xi((function(e,t){return e>t?t:e}))),bi.lighten=_i(xi((function(e,t){return e>t?e:t}))),bi.dodge=_i(xi((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),bi.burn=_i(xi((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var wi=bi,Ai=u.type,ki=u.clip_rgb,Ti=u.TWOPI,Si=Math.pow,Ei=Math.sin,Ci=Math.cos,Mi=b,Oi=v,Li=Math.floor,Di=Math.random,Ii=a,Ri=Math.log,Pi=Math.pow,Ni=Math.floor,zi=Math.abs,Fi=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Ii(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Ii(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Bi(n,e,t)},n},Bi=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==Ii(e)&&(e=Fi(e));var r=e.min,i=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var a=[];if("c"===t.substr(0,1)&&(a.push(r),a.push(i)),"e"===t.substr(0,1)){a.push(r);for(var s=1;s<n;s++)a.push(r+s/n*(i-r));a.push(i)}else if("l"===t.substr(0,1)){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*Ri(r),c=Math.LOG10E*Ri(i);a.push(r);for(var u=1;u<n;u++)a.push(Pi(10,l+u/n*(c-l)));a.push(i)}else if("q"===t.substr(0,1)){a.push(r);for(var h=1;h<n;h++){var d=(o.length-1)*h/n,f=Ni(d);if(f===d)a.push(o[f]);else{var p=d-f;a.push(o[f]*(1-p)+o[f+1]*p)}}a.push(i)}else if("k"===t.substr(0,1)){var g,m=o.length,v=new Array(m),y=new Array(n),b=!0,_=0,x=null;(x=[]).push(r);for(var w=1;w<n;w++)x.push(r+w/n*(i-r));for(x.push(i);b;){for(var A=0;A<n;A++)y[A]=0;for(var k=0;k<m;k++)for(var T=o[k],S=Number.MAX_VALUE,E=void 0,C=0;C<n;C++){var M=zi(x[C]-T);M<S&&(S=M,E=C),y[E]++,v[k]=E}for(var O=new Array(n),L=0;L<n;L++)O[L]=null;for(var D=0;D<m;D++)null===O[g=v[D]]?O[g]=o[D]:O[g]+=o[D];for(var I=0;I<n;I++)O[I]*=1/y[I];b=!1;for(var R=0;R<n;R++)if(O[R]!==x[R]){b=!0;break}x=O,++_>200&&(b=!1)}for(var P={},N=0;N<n;N++)P[N]=[];for(var z=0;z<m;z++)P[g=v[z]].push(o[z]);for(var F=[],B=0;B<n;B++)F.push(P[B][0]),F.push(P[B][P[B].length-1]);F=F.sort((function(e,t){return e-t})),a.push(F[0]);for(var j=1;j<F.length;j+=2){var U=F[j];isNaN(U)||-1!==a.indexOf(U)||a.push(U)}}return a},ji={analyze:Fi,limits:Bi},Ui=v,Vi=v,qi=Math.sqrt,Hi=Math.pow,$i=Math.min,Wi=Math.max,Gi=Math.atan2,Yi=Math.abs,Xi=Math.cos,Zi=Math.sin,Ki=Math.exp,Ji=Math.PI,Qi=v,eo=v,to=b,no=pi,ro={cool:function(){return no([to.hsl(180,1,.9),to.hsl(250,.7,.4)])},hot:function(){return no(["#000","#f00","#ff0","#fff"]).mode("rgb")}},io={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},oo=0,ao=Object.keys(io);oo<ao.length;oo+=1){var so=ao[oo];io[so.toLowerCase()]=io[so]}var lo=io,co=b;return co.average=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new ni(e)})),"lrgb"===t)return ui(e,n);for(var o=e.shift(),a=o.get(t),s=[],l=0,c=0,u=0;u<a.length;u++)if(a[u]=(a[u]||0)*n[0],s.push(isNaN(a[u])?0:n[0]),"h"===t.charAt(u)&&!isNaN(a[u])){var h=a[u]/180*ai;l+=si(h)*n[0],c+=li(h)*n[0]}var d=o.alpha()*n[0];e.forEach((function(e,r){var i=e.get(t);d+=e.alpha()*n[r+1];for(var o=0;o<a.length;o++)if(!isNaN(i[o]))if(s[o]+=n[r+1],"h"===t.charAt(o)){var u=i[o]/180*ai;l+=si(u)*n[r+1],c+=li(u)*n[r+1]}else a[o]+=i[o]*n[r+1]}));for(var f=0;f<a.length;f++)if("h"===t.charAt(f)){for(var p=ci(c/s[f],l/s[f])/ai*180;p<0;)p+=360;for(;p>=360;)p-=360;a[f]=p}else a[f]=a[f]/s[f];return d/=r,new ni(a,t).alpha(d>.99999?1:d,!0)},co.bezier=function(e){var t=function(e){var t,n,r,i,o,a,s;if(2===(e=e.map((function(e){return new mi(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],a=t[1],i=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(a[t]-o[t])}));return new mi(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),o=n[0],a=n[1],s=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new mi(t,"lab")};else if(4===e.length){var l;r=e.map((function(e){return e.lab()})),o=r[0],a=r[1],s=r[2],l=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*l[t]}));return new mi(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var c,u,h;c=e.map((function(e){return e.lab()})),h=e.length-1,u=function(e){for(var t=[1,1],n=1;n<e;n++){for(var r=[1],i=1;i<=t.length;i++)r[i]=(t[i]||0)+t[i-1];t=r}return t}(h),i=function(e){var t=1-e,n=[0,1,2].map((function(n){return c.reduce((function(r,i,o){return r+u[o]*Math.pow(t,h-o)*Math.pow(e,o)*i[n]}),0)}));return new mi(n,"lab")}}return i}(e);return t.scale=function(){return vi(t)},t},co.blend=wi,co.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var o,a=0;"array"===Ai(i)?o=i[1]-i[0]:(o=0,i=[i,i]);var s=function(s){var l=Ti*((e+120)/360+t*s),c=Si(i[0]+o*s,r),u=(0!==a?n[0]+s*a:n)*c*(1-c)/2,h=Ci(l),d=Ei(l);return Mi(ki([255*(c+u*(-.14861*h+1.78277*d)),255*(c+u*(-.29227*h-.90649*d)),255*(c+u*(1.97294*h)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?r:(r=e,s)},s.hue=function(e){return null==e?n:("array"===Ai(n=e)?0==(a=n[1]-n[0])&&(n=n[1]):a=0,s)},s.lightness=function(e){return null==e?i:("array"===Ai(e)?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=function(){return Mi.scale(s)},s.hue(n),s},co.mix=co.interpolate=Dr,co.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(Li(16*Di()));return new Oi(e,"hex")},co.scale=pi,co.analyze=ji.analyze,co.contrast=function(e,t){e=new Ui(e),t=new Ui(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},co.deltaE=function(e,t,n,r,i){void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1);var o=function(e){return 360*e/(2*Ji)},a=function(e){return 2*Ji*e/360};e=new Vi(e),t=new Vi(t);var s=Array.from(e.lab()),l=s[0],c=s[1],u=s[2],h=Array.from(t.lab()),d=h[0],f=h[1],p=h[2],g=(l+d)/2,m=(qi(Hi(c,2)+Hi(u,2))+qi(Hi(f,2)+Hi(p,2)))/2,v=.5*(1-qi(Hi(m,7)/(Hi(m,7)+Hi(25,7)))),y=c*(1+v),b=f*(1+v),_=qi(Hi(y,2)+Hi(u,2)),x=qi(Hi(b,2)+Hi(p,2)),w=(_+x)/2,A=o(Gi(u,y)),k=o(Gi(p,b)),T=A>=0?A:A+360,S=k>=0?k:k+360,E=Yi(T-S)>180?(T+S+360)/2:(T+S)/2,C=1-.17*Xi(a(E-30))+.24*Xi(a(2*E))+.32*Xi(a(3*E+6))-.2*Xi(a(4*E-63)),M=S-T;M=Yi(M)<=180?M:S<=T?M+360:M-360,M=2*qi(_*x)*Zi(a(M)/2);var O=d-l,L=x-_,D=1+.015*Hi(g-50,2)/qi(20+Hi(g-50,2)),I=1+.045*w,R=1+.015*w*C,P=30*Ki(-Hi((E-275)/25,2)),N=-2*qi(Hi(w,7)/(Hi(w,7)+Hi(25,7)))*Zi(2*a(P)),z=qi(Hi(O/(n*D),2)+Hi(L/(r*I),2)+Hi(M/(i*R),2)+N*(L/(r*I))*(M/(i*R)));return Wi(0,$i(100,z))},co.distance=function(e,t,n){void 0===n&&(n="lab"),e=new Qi(e),t=new Qi(t);var r=e.get(n),i=t.get(n),o=0;for(var a in r){var s=(r[a]||0)-(i[a]||0);o+=s*s}return Math.sqrt(o)},co.limits=ji.limits,co.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(eo,[null].concat(e))),!0}catch(e){return!1}},co.scales=ro,co.colors=dn,co.brewer=lo,co}()},5132:e=>{"use strict";var t=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,n){var r,i,o;return n=n||{},r=JSON.stringify([1],void 0,void 0===n.indent?2:n.indent).slice(2,-3),i=""===r?1/0:void 0===n.maxLength?80:n.maxLength,o=n.replacer,function e(n,a,s){var l,c,u,h,d,f,p,g,m,v,y,b;if(n&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===(y=JSON.stringify(n,o)))return y;if(p=i-a.length-s,y.length<=p&&(m=y.replace(t,(function(e,t){return t||e+" "}))).length<=p)return m;if(null!=o&&(n=JSON.parse(y),o=void 0),"object"==typeof n&&null!==n){if(g=a+r,u=[],c=0,Array.isArray(n))for(v="[",l="]",p=n.length;c<p;c++)u.push(e(n[c],g,c===p-1?0:1)||"null");else for(v="{",l="}",p=(f=Object.keys(n)).length;c<p;c++)h=f[c],d=JSON.stringify(h)+": ",void 0!==(b=e(n[h],g,d.length+(c===p-1?0:1)))&&u.push(d+b);if(u.length>0)return[v,r+u.join(",\n"+g),l].join("\n"+a)}return y}(e,"",0)}},48402:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(68451);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.Z)(e,t)}},73289:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},68451:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:()=>r})},17674:(e,t,n)=>{"use strict";n.d(t,{Gc:()=>h.Gcn,Dy:()=>h.DyG,g:()=>h.ga8,iA:()=>h.iA_});var r=n(89174),i=n(33986),o=n(60786),a=n(890),s=n(62045),l=n(98661),c=n(90150),u=n(5388),h=n(64918);r.toDOMStream=s.d,i.Builder.throughDOM=l.bl,o.RecordBatchReader.throughDOM=c.q,o.RecordBatchFileReader.throughDOM=c.q,o.RecordBatchStreamReader.throughDOM=c.q,a.RecordBatchWriter.throughDOM=u.k,a.RecordBatchFileWriter.throughDOM=u.k,a.RecordBatchStreamWriter.throughDOM=u.k},52385:(e,t,n)=>{"use strict";n.r(t),n.d(t,{flatbuffers:()=>r});var r={};r.Offset,r.Table,r.SIZEOF_SHORT=2,r.SIZEOF_INT=4,r.FILE_IDENTIFIER_LENGTH=4,r.SIZE_PREFIX_LENGTH=4,r.Encoding={UTF8_BYTES:1,UTF16_STRING:2},r.int32=new Int32Array(2),r.float32=new Float32Array(r.int32.buffer),r.float64=new Float64Array(r.int32.buffer),r.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0],r.Long=function(e,t){this.low=0|e,this.high=0|t},r.Long.create=function(e,t){return 0==e&&0==t?r.Long.ZERO:new r.Long(e,t)},r.Long.prototype.toFloat64=function(){return(this.low>>>0)+4294967296*this.high},r.Long.prototype.equals=function(e){return this.low==e.low&&this.high==e.high},r.Long.ZERO=new r.Long(0,0),r.Builder=function(e){if(e)t=e;else var t=1024;this.bb=r.ByteBuffer.allocate(t),this.space=t,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},r.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},r.Builder.prototype.forceDefaults=function(e){this.force_defaults=e},r.Builder.prototype.dataBuffer=function(){return this.bb},r.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},r.Builder.prototype.prep=function(e,t){e>this.minalign&&(this.minalign=e);for(var n=1+~(this.bb.capacity()-this.space+t)&e-1;this.space<n+e+t;){var i=this.bb.capacity();this.bb=r.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(n)},r.Builder.prototype.pad=function(e){for(var t=0;t<e;t++)this.bb.writeInt8(--this.space,0)},r.Builder.prototype.writeInt8=function(e){this.bb.writeInt8(this.space-=1,e)},r.Builder.prototype.writeInt16=function(e){this.bb.writeInt16(this.space-=2,e)},r.Builder.prototype.writeInt32=function(e){this.bb.writeInt32(this.space-=4,e)},r.Builder.prototype.writeInt64=function(e){this.bb.writeInt64(this.space-=8,e)},r.Builder.prototype.writeFloat32=function(e){this.bb.writeFloat32(this.space-=4,e)},r.Builder.prototype.writeFloat64=function(e){this.bb.writeFloat64(this.space-=8,e)},r.Builder.prototype.addInt8=function(e){this.prep(1,0),this.writeInt8(e)},r.Builder.prototype.addInt16=function(e){this.prep(2,0),this.writeInt16(e)},r.Builder.prototype.addInt32=function(e){this.prep(4,0),this.writeInt32(e)},r.Builder.prototype.addInt64=function(e){this.prep(8,0),this.writeInt64(e)},r.Builder.prototype.addFloat32=function(e){this.prep(4,0),this.writeFloat32(e)},r.Builder.prototype.addFloat64=function(e){this.prep(8,0),this.writeFloat64(e)},r.Builder.prototype.addFieldInt8=function(e,t,n){(this.force_defaults||t!=n)&&(this.addInt8(t),this.slot(e))},r.Builder.prototype.addFieldInt16=function(e,t,n){(this.force_defaults||t!=n)&&(this.addInt16(t),this.slot(e))},r.Builder.prototype.addFieldInt32=function(e,t,n){(this.force_defaults||t!=n)&&(this.addInt32(t),this.slot(e))},r.Builder.prototype.addFieldInt64=function(e,t,n){!this.force_defaults&&t.equals(n)||(this.addInt64(t),this.slot(e))},r.Builder.prototype.addFieldFloat32=function(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat32(t),this.slot(e))},r.Builder.prototype.addFieldFloat64=function(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat64(t),this.slot(e))},r.Builder.prototype.addFieldOffset=function(e,t,n){(this.force_defaults||t!=n)&&(this.addOffset(t),this.slot(e))},r.Builder.prototype.addFieldStruct=function(e,t,n){t!=n&&(this.nested(t),this.slot(e))},r.Builder.prototype.nested=function(e){if(e!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")},r.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")},r.Builder.prototype.slot=function(e){this.vtable[e]=this.offset()},r.Builder.prototype.offset=function(){return this.bb.capacity()-this.space},r.Builder.growByteBuffer=function(e){var t=e.capacity();if(3221225472&t)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var n=t<<1,i=r.ByteBuffer.allocate(n);return i.setPosition(n-t),i.bytes().set(e.bytes(),n-t),i},r.Builder.prototype.addOffset=function(e){this.prep(r.SIZEOF_INT,0),this.writeInt32(this.offset()-e+r.SIZEOF_INT)},r.Builder.prototype.startObject=function(e){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=e;for(var t=0;t<e;t++)this.vtable[t]=0;this.isNested=!0,this.object_start=this.offset()},r.Builder.prototype.endObject=function(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var e=this.offset(),t=this.vtable_in_use-1;t>=0&&0==this.vtable[t];t--);for(var n=t+1;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);var i=(n+2)*r.SIZEOF_SHORT;this.addInt16(i);var o=0,a=this.space;e:for(t=0;t<this.vtables.length;t++){var s=this.bb.capacity()-this.vtables[t];if(i==this.bb.readInt16(s)){for(var l=r.SIZEOF_SHORT;l<i;l+=r.SIZEOF_SHORT)if(this.bb.readInt16(a+l)!=this.bb.readInt16(s+l))continue e;o=this.vtables[t];break}}return o?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,o-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e},r.Builder.prototype.finish=function(e,t,n){var i=n?r.SIZE_PREFIX_LENGTH:0;if(t){var o=t;if(this.prep(this.minalign,r.SIZEOF_INT+r.FILE_IDENTIFIER_LENGTH+i),o.length!=r.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+r.FILE_IDENTIFIER_LENGTH);for(var a=r.FILE_IDENTIFIER_LENGTH-1;a>=0;a--)this.writeInt8(o.charCodeAt(a))}this.prep(this.minalign,r.SIZEOF_INT+i),this.addOffset(e),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)},r.Builder.prototype.finishSizePrefixed=function(e,t){this.finish(e,t,!0)},r.Builder.prototype.requiredField=function(e,t){var n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(0==this.bb.readInt16(r+t))throw new Error("FlatBuffers: field "+t+" must be set")},r.Builder.prototype.startVector=function(e,t,n){this.notNested(),this.vector_num_elems=t,this.prep(r.SIZEOF_INT,e*t),this.prep(n,e*t)},r.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},r.Builder.prototype.createString=function(e){if(e instanceof Uint8Array)var t=e;else{t=[];for(var n=0;n<e.length;){var r,i=e.charCodeAt(n++);(r=i<55296||i>=56320?i:(i<<10)+e.charCodeAt(n++)+-56613888)<128?t.push(r):(r<2048?t.push(r>>6&31|192):(r<65536?t.push(r>>12&15|224):t.push(r>>18&7|240,r>>12&63|128),t.push(r>>6&63|128)),t.push(63&r|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length),n=0;for(var o=this.space,a=this.bb.bytes();n<t.length;n++)a[o++]=t[n];return this.endVector()},r.Builder.prototype.createLong=function(e,t){return r.Long.create(e,t)},r.ByteBuffer=function(e){this.bytes_=e,this.position_=0},r.ByteBuffer.allocate=function(e){return new r.ByteBuffer(new Uint8Array(e))},r.ByteBuffer.prototype.clear=function(){this.position_=0},r.ByteBuffer.prototype.bytes=function(){return this.bytes_},r.ByteBuffer.prototype.position=function(){return this.position_},r.ByteBuffer.prototype.setPosition=function(e){this.position_=e},r.ByteBuffer.prototype.capacity=function(){return this.bytes_.length},r.ByteBuffer.prototype.readInt8=function(e){return this.readUint8(e)<<24>>24},r.ByteBuffer.prototype.readUint8=function(e){return this.bytes_[e]},r.ByteBuffer.prototype.readInt16=function(e){return this.readUint16(e)<<16>>16},r.ByteBuffer.prototype.readUint16=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8},r.ByteBuffer.prototype.readInt32=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24},r.ByteBuffer.prototype.readUint32=function(e){return this.readInt32(e)>>>0},r.ByteBuffer.prototype.readInt64=function(e){return new r.Long(this.readInt32(e),this.readInt32(e+4))},r.ByteBuffer.prototype.readUint64=function(e){return new r.Long(this.readUint32(e),this.readUint32(e+4))},r.ByteBuffer.prototype.readFloat32=function(e){return r.int32[0]=this.readInt32(e),r.float32[0]},r.ByteBuffer.prototype.readFloat64=function(e){return r.int32[r.isLittleEndian?0:1]=this.readInt32(e),r.int32[r.isLittleEndian?1:0]=this.readInt32(e+4),r.float64[0]},r.ByteBuffer.prototype.writeInt8=function(e,t){this.bytes_[e]=t},r.ByteBuffer.prototype.writeUint8=function(e,t){this.bytes_[e]=t},r.ByteBuffer.prototype.writeInt16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},r.ByteBuffer.prototype.writeUint16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},r.ByteBuffer.prototype.writeInt32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},r.ByteBuffer.prototype.writeUint32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},r.ByteBuffer.prototype.writeInt64=function(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)},r.ByteBuffer.prototype.writeUint64=function(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)},r.ByteBuffer.prototype.writeFloat32=function(e,t){r.float32[0]=t,this.writeInt32(e,r.int32[0])},r.ByteBuffer.prototype.writeFloat64=function(e,t){r.float64[0]=t,this.writeInt32(e,r.int32[r.isLittleEndian?0:1]),this.writeInt32(e+4,r.int32[r.isLittleEndian?1:0])},r.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+r.SIZEOF_INT+r.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var e="",t=0;t<r.FILE_IDENTIFIER_LENGTH;t++)e+=String.fromCharCode(this.readInt8(this.position_+r.SIZEOF_INT+t));return e},r.ByteBuffer.prototype.__offset=function(e,t){var n=e-this.readInt32(e);return t<this.readInt16(n)?this.readInt16(n+t):0},r.ByteBuffer.prototype.__union=function(e,t){return e.bb_pos=t+this.readInt32(t),e.bb=this,e},r.ByteBuffer.prototype.__string=function(e,t){e+=this.readInt32(e);var n=this.readInt32(e),i="",o=0;if(e+=r.SIZEOF_INT,t===r.Encoding.UTF8_BYTES)return this.bytes_.subarray(e,e+n);for(;o<n;){var a,s=this.readUint8(e+o++);if(s<192)a=s;else{var l=this.readUint8(e+o++);if(s<224)a=(31&s)<<6|63&l;else{var c=this.readUint8(e+o++);a=s<240?(15&s)<<12|(63&l)<<6|63&c:(7&s)<<18|(63&l)<<12|(63&c)<<6|63&this.readUint8(e+o++)}}a<65536?i+=String.fromCharCode(a):(a-=65536,i+=String.fromCharCode(55296+(a>>10),56320+(1023&a)))}return i},r.ByteBuffer.prototype.__indirect=function(e){return e+this.readInt32(e)},r.ByteBuffer.prototype.__vector=function(e){return e+this.readInt32(e)+r.SIZEOF_INT},r.ByteBuffer.prototype.__vector_len=function(e){return this.readInt32(e+this.readInt32(e))},r.ByteBuffer.prototype.__has_identifier=function(e){if(e.length!=r.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+r.FILE_IDENTIFIER_LENGTH);for(var t=0;t<r.FILE_IDENTIFIER_LENGTH;t++)if(e.charCodeAt(t)!=this.readInt8(this.position_+r.SIZEOF_INT+t))return!1;return!0},r.ByteBuffer.prototype.createLong=function(e,t){return r.Long.create(e,t)}},88593:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"path_to_url"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"path_to_url"},"homepage":"path_to_url","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"_resolved":"path_to_url","_integrity":"sha512-your_sha512_hash==","_from":"axios@0.21.4"}')}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);__webpack_require__.r(n);var r={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var i=2&t&&e;"object"==typeof i&&!~leafPrototypes.indexOf(i);i=getProto(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,__webpack_require__.d(n,r),n},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>qs});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{React:()=>n,ReactDOM:()=>i});var t=__webpack_require__(20362),n=__webpack_require__.t(t,2),r=__webpack_require__(37935),i=__webpack_require__.t(r,2),o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==o&&o,a="URLSearchParams"in o,s="Symbol"in o&&"iterator"in Symbol,l="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in o,u="ArrayBuffer"in o;if(u)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(e){return e&&h.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function g(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return s&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function v(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function b(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function _(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:l&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u&&l&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(e)||d(e))?this._bodyArrayBuffer=_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l&&(this.blob=function(){var e=v(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(b)}),this.text=function(){var e,t,n,r=v(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=y(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=f(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[f(e)]},m.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},m.prototype.set=function(e,t){this.map[f(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),g(e)},m.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),g(e)},m.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),g(e)},s&&(m.prototype[Symbol.iterator]=m.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(e,t){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(t=t||{}).body;if(e instanceof A){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new m(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),w.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},x.call(A.prototype),x.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})};var E=o.DOMException;try{new E}catch(e){(E=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function C(e,t){return new Promise((function(n,r){var i=new A(e,t);if(i.signal&&i.signal.aborted)return r(new E("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new T(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new E("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&o.location.href?o.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(l?a.responseType="blob":u&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof m?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,p(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}C.polyfill=!0,o.fetch||(o.fetch=C,o.Headers=m,o.Request=A,o.Response=T),__webpack_require__(8773),__webpack_require__(67772),__webpack_require__(67686);var M,O=__webpack_require__(5144),L=__webpack_require__(82445);function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let I=(M=class{get pageLayout(){return this.pages.layout||(this.pages.children.length>5?"side":"top")}constructor(e,t){D(this,"pages",void 0),D(this,"rootStore",void 0),this.rootStore=e,this.pages=t}},R=M.prototype,P="pageLayout",N=[L.Fl],z=Object.getOwnPropertyDescriptor(M.prototype,"pageLayout"),F=M.prototype,B={},Object.keys(z).forEach((function(e){B[e]=z[e]})),B.enumerable=!!B.enumerable,B.configurable=!!B.configurable,("value"in B||B.initializer)&&(B.writable=!0),B=N.slice().reverse().reduce((function(e,t){return t(R,P,e)||e}),B),F&&void 0!==B.initializer&&(B.value=B.initializer?B.initializer.call(F):void 0,B.initializer=void 0),void 0===B.initializer&&(Object.defineProperty(R,P,B),B=null),M);var R,P,N,z,F,B,j;!function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(j||(j={}));var U,V,q,H=function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter((function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?n===j.CLASS_TO_CLASS||n===j.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||n===j.CLASS_TO_PLAIN)}))},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find((function(e){return e.options&&e.options.name===t}))},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?"none":n?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter((function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===j.CLASS_TO_CLASS||t===j.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===j.CLASS_TO_PLAIN)})).map((function(e){return e.propertyName}))},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter((function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===j.CLASS_TO_CLASS||t===j.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===j.CLASS_TO_PLAIN)})).map((function(e){return e.propertyName}))},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n,r=e.get(t);r&&(n=Array.from(r.values()).filter((function(e){return void 0!==e.propertyName})));for(var i=[],o=0,a=this.getAncestors(t);o<a.length;o++){var s=a[o],l=e.get(s);if(l){var c=Array.from(l.values()).filter((function(e){return void 0!==e.propertyName}));i.push.apply(i,c)}}return i.concat(n||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var o=0,a=this.getAncestors(t);o<a.length;o++){var s=a[o],l=e.get(s);if(l){var c=l.get(n);if(c)return c}}},e.prototype.findMetadatas=function(e,t,n){var r,i=e.get(t);i&&(r=i.get(n));for(var o=[],a=0,s=this.getAncestors(t);a<s.length;a++){var l=s[a],c=e.get(l);c&&c.has(n)&&o.push.apply(o,c.get(n))}return o.slice().reverse().concat((r||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);void 0!==n.prototype;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}(),$=new H;function W(e){return void 0===e&&(e={}),function(t,n){$.addExcludeMetadata({target:t instanceof Function?t:t.constructor,propertyName:n,options:e})}}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Y=(U=W(),V=class{constructor(){!function(e,t,n,r){n&&Object.defineProperty(e,"blockError",{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}(this,0,q,this),G(this,"refId",void 0),G(this,"caption",void 0),G(this,"captionType","Figure"),G(this,"label",void 0),G(this,"count",void 0)}},q=function(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),void 0===(o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o)).initializer&&(Object.defineProperty(e,t,o),o=null),o}(V.prototype,"blockError",[L.LO,U],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V);class X extends Y{}const Z={};Z.url=window.dpLocal?null:window.location.origin.concat("/");const K=Z;var J=__webpack_require__(42471),Q=__webpack_require__.n(J),ee=__webpack_require__(66423),te=__webpack_require__(91928),ne=__webpack_require__.n(te);const re=(e,t)=>ne()(((n,r)=>e().catch((e=>t(n,r,e)))),{retries:1e3,minTimeout:200,maxTimeout:5e3,factor:3}),ie=new ee.L(1),oe=(e,t,n)=>{throw n.response&&401===n.response.status&&t<2&&e(n),n};class ae{constructor(e={baseEndpoint:"api/"}){var t,n;n=void 0,(t="apiClient")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n,this.apiClient=Q().create({baseURL:K.url+e.baseEndpoint,headers:{Accept:"application/json, text/html","Content-Type":"application/json"},validateStatus:e=>e>=200&&e<300||412===e,withCredentials:!0}),this.apiClient.interceptors.response.use((e=>e),(e=>Promise.reject(e)))}get(e,t,n=oe){return re((()=>this.apiClient.get(e,t)),n).then((e=>e.data))}delete(e,t=oe){return re((()=>this.apiClient.delete(e)),t).then((e=>e.data))}post(e,t,n,r=oe){return re((()=>this.apiClient.post(e,t,n)),r).then((e=>e.data))}postReturnWholeResponse(e,t,n=oe){return re((()=>this.apiClient.post(e,t)),n)}patch(e,t=oe){return re((()=>this.apiClient.patch(e.url,e)),t).then((e=>e.data))}put(e,t=oe){return re((()=>this.apiClient.put(e.url,e)),t).then((e=>e.data))}blockingGet(e,t){return ie.acquire().then((n=>this.get(e,t).finally(n)))}}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}new ae,new ae({baseEndpoint:""});class le{static UrlToRelative(e){return new URL(e).pathname.replace("/api","")}}se(le,"Blocks","/blocks/"),se(le,"Assets","/assets/"),se(le,"User","/user/"),K.url;var ce=__webpack_require__(86149),ue=__webpack_require__.n(ce),he=__webpack_require__(47985),de=__webpack_require__.n(he),fe=__webpack_require__(73152);const pe="prepare_toast",ge=e=>Q().get(e).then((e=>e.data)),me=e=>window.atob(e.split("base64,")[1]),ve=(e,t)=>e.elements?e.elements.find((e=>e.name===t)):null,ye=e=>{if(!e.elements||!e.elements.length)throw new Error("Can't get inner text of a node without elements");const t=e.elements[0];return t.text||t.cdata||""},be=e=>"true"===e.value;class _e{constructor(e){var t,n;n=void 0,(t="imports")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n,this.imports=e.imports}async importAsync(e,t){return(await t)[e]}async importDefaultAsync(e){return this.importAsync("default",e)}get apiResponseToArrow(){const{arrowUtils:e}=this.imports;return this.importAsync("apiResponseToArrow",e)}get DatasetViewBlock(){const{DatasetViewBlock:e}=this.imports;return this.importDefaultAsync(e)}get PlotlyViewBlock(){const{PlotlyViewBlock:e}=this.imports;return this.importDefaultAsync(e)}get VegaViewBlock(){const{VegaViewBlock:e}=this.imports;return this.importDefaultAsync(e)}get FileViewBlock(){const{FileViewBlock:e}=this.imports;return this.importDefaultAsync(e)}get BokehViewBlock(){const{BokehViewBlock:e}=this.imports;return this.importDefaultAsync(e)}}function xe(e,t){return void 0===t&&(t={}),function(n,r){$.addTransformMetadata({target:n.constructor,propertyName:r,transformFn:e,options:t})}}var we,Ae,ke,Te,Se,Ee;function Ce(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let Le=(we=W(),Ae=class extends Y{constructor(e){super(),Me(this,"src",void 0),Me(this,"type",void 0),Ce(this,"imports",ke,this),Me(this,"getComponent",void 0),Me(this,"getComponentProps",(()=>({block:this}))),this.imports=new _e(e)}async fetchAssetData(){return window.dpLocal?this.fetchLocalAssetData():this.fetchRemoteAssetData()}fetchLocalAssetData(){return me(this.src)}async fetchRemoteAssetData(){return await ge(this.src)}},ke=Oe(Ae.prototype,"imports",[we],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ae),De=(Te=xe(be),Ee=Oe((Se=class extends Le{constructor(...e){super(...e),Me(this,"captionType","Plot"),Ce(this,"responsive",Ee,this)}}).prototype,"responsive",[Te],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Se);const Ie=e=>{const[n,r]=(0,t.useState)(),i=(0,t.useContext)(O.yX),{singleBlockEmbed:o}=i.store.reportStore;return(0,t.useEffect)((()=>{e.fetchData().then((e=>{r(e)})).catch((()=>{fe.Am.error("Couldn't load iframe asset")}))}),[e.block.refId]),t.createElement("div",{style:{height:"35rem"},"data-cy":"block-iframe",className:"flex justify-center w-full "+(o?"h-iframe":"")},t.createElement("iframe",{className:"w-full "+(o?"h-iframe":""),style:{border:"none !important"},srcDoc:n,sandbox:e.sandbox},"Iframe not supported"))};function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ie.defaultProps={sandbox:"allow-scripts"};class Pe extends De{constructor(...e){super(...e),Re(this,"getComponent",(async()=>Ie)),Re(this,"getComponentProps",(()=>({fetchData:this.fetchAssetData.bind(this),block:this})))}}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ze extends Le{constructor(...e){super(...e),Ne(this,"getComponent",(async()=>Ie)),Ne(this,"getComponentProps",(()=>({fetchData:this.fetchAssetData.bind(this),block:this})))}async fetchAssetData(){const e=await super.fetchAssetData();return window.atob(e)}}var Fe=__webpack_require__(73715),Be=__webpack_require__.n(Fe),je="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{};function Ue(e,t){return e(t={exports:{}},t.exports),t.exports}var Ve=Ue((function(e){!function(t){var n=function(e,t,r){if(!l(t)||u(t)||h(t)||d(t)||s(t))return t;var i,o=0,a=0;if(c(t))for(i=[],a=t.length;o<a;o++)i.push(n(e,t[o],r));else for(var f in i={},t)Object.prototype.hasOwnProperty.call(t,f)&&(i[e(f,r)]=n(e,t[f],r));return i},r=function(e){return f(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},i=function(e){var t=r(e);return t.substr(0,1).toUpperCase()+t.substr(1)},o=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},a=Object.prototype.toString,s=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},c=function(e){return"[object Array]"==a.call(e)},u=function(e){return"[object Date]"==a.call(e)},h=function(e){return"[object RegExp]"==a.call(e)},d=function(e){return"[object Boolean]"==a.call(e)},f=function(e){return(e-=0)==e},p=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}},g={camelize:r,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(e,t){return n(p(r,t),e)},decamelizeKeys:function(e,t){return n(p(o,t),e,t)},pascalizeKeys:function(e,t){return n(p(i,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g}(je)})).decamelize,qe=Ue((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t})),He=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},$e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},We=(0,t.createContext)(null);function Ge(e){var t=e.root,n=e.children;return(0,r.createPortal)(n,t)}function Ye(e){var n=(0,t.forwardRef)((function(n,r){var i,o,a=n.mode,s=n.delegatesFocus,l=n.styleSheets,c=n.ssr,u=n.children,h=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,["mode","delegatesFocus","styleSheets","ssr","children"]),d=(o=(0,t.useRef)((i=r)&&i.current),(0,t.useEffect)((function(){i&&(i.current=o.current)}),[i]),o),f=(0,t.useState)(null),p=$e(f,2),g=p[0],m=p[1],v="node_".concat(a).concat(s);return(0,t.useEffect)((function(){if(d.current)try{if("function"==typeof r&&r(d.current),c){var e=d.current.shadowRoot;return void m(e)}var t=d.current.attachShadow({mode:a,delegatesFocus:s});l.length>0&&(t.adoptedStyleSheets=l),m(t)}catch(e){!function(e){var t=e.error,n=e.styleSheets,r=e.root;if("NotSupportedError"!==t.name)throw t;n.length>0&&(r.adoptedStyleSheets=n)}({error:e,styleSheets:l,root:g})}}),[r,d,l]),t.createElement(t.Fragment,null,t.createElement(e.tag,qe({key:v,ref:d},h),(g||c)&&t.createElement(We.Provider,{value:g},c?t.createElement("template",{shadowroot:"open"},e.render({root:g,ssr:c,children:u})):t.createElement(Ge,{root:g},e.render({root:g,ssr:c,children:u})))))}));return n.propTypes={mode:Be().oneOf(["open","closed"]),delegatesFocus:Be().bool,styleSheets:Be().arrayOf(Be().instanceOf(__webpack_require__.g.CSSStyleSheet)),ssr:Be().bool,children:Be().node},n.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},n}Ge.propTypes={root:Be().object.isRequired,children:Be().node},Ge.defaultProps={children:null};var Xe=new Map,Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,r){var i=Ve(r,{separator:"-"}),o="".concat(t,"-").concat(i);return Xe.has(o)||Xe.set(o,Ye({tag:i,render:n})),Xe.get(o)}})}();const Ke=Ze,Je=__webpack_require__(19226).Z,Qe=e=>{const[n,r]=(0,t.useState)(),[i,o]=(0,t.useState)(null),a=(0,t.useContext)(O.yX),{singleBlockEmbed:s}=a.store.reportStore;return(0,t.useEffect)((()=>{e.fetchData().then((e=>{r(e)})).catch((()=>{fe.Am.error("Couldn't load asset")}))}),[e.block.refId]),n?t.createElement("div",{className:"w-full "+(s?"h-full":""),"data-cy":"block-shadow"},t.createElement(Ke.div,null,t.createElement("style",null,Je),t.createElement("div",{ref:e=>{if(o(e),null!==e){const t=e.querySelector(".dataframe");t&&t.removeAttribute("border")}},dangerouslySetInnerHTML:{__html:n}}))):null};function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class tt extends Le{constructor(...e){super(...e),et(this,"captionType","Table"),et(this,"getComponent",(async()=>Qe)),et(this,"getComponentProps",(()=>({fetchData:this.fetchAssetData.bind(this),block:this})))}fetchLocalAssetData(){return(e=>{const t=me(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)})(this.src)}}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class rt extends De{constructor(...e){super(...e),nt(this,"getComponent",(async()=>await this.imports.VegaViewBlock)),nt(this,"getComponentProps",(()=>({block:this,fetchData:this.fetchAssetData.bind(this)})))}}function it(e){return void 0===e&&(e={}),function(t,n){$.addExposeMetadata({target:t instanceof Function?t:t.constructor,propertyName:n,options:e})}}var ot,at,st;function lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ct=(ot=it({name:"cas_ref"}),at=class extends Le{constructor(...e){super(...e),lt(this,"rows",void 0),lt(this,"columns",void 0),lt(this,"size",void 0),lt(this,"captionType","Table"),function(e,t,n,r){n&&Object.defineProperty(e,"casRef",{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}(this,0,st,this),lt(this,"_revogridExportPlugin",void 0),lt(this,"getComponent",(async()=>await this.imports.DatasetViewBlock)),lt(this,"getComponentProps",(()=>({block:this,hideTitle:!1}))),lt(this,"streamContents",(async()=>{const e=await this.imports.apiResponseToArrow,t=await this.fetchDataset({responseType:"arraybuffer"});return await e(t)})),lt(this,"downloadLocal",(async()=>{try{(await this.getExportPlugin()).exportFile({filename:`dp-export-${this.refId}`})}catch(e){console.error("An error occurred while exporting dataset: ",e)}})),lt(this,"downloadRemote",(async e=>{const t=((e,t)=>{const n=new URL(e,K.url),r=n.searchParams;return r.append(t.k,t.v),n.search=r.toString(),`${n.pathname}?${n.searchParams.toString()}`})(this.exportUrl,{k:"export_format",v:e}),n="CSV"===e?"text/csv":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";await(async(e,t)=>{fe.Am.info("Preparing file for download",{toastId:pe});try{const n=await fetch(de()(window.location.origin,e));if(n){const e=await n.blob(),r=(e=>{const t='filename="',n=e.headers.get("Content-Disposition");return n&&n.includes(t)?n.split(t)[1].split('"')[0]:"dp-export.csv"})(n);ue()(e,r,t)}else fe.Am.error("No url provided")}finally{fe.Am.dismiss(pe)}})(t,n)}))}get cells(){return this.rows*this.columns}get autoLoad(){return this.cells<5e5}get sanddanceUrl(){return this.buildExtensionUrl("sanddance")}get exportUrl(){return this.buildExtensionUrl("export")}async getCsvText(){let e="";try{e=(await this.getExportPlugin()).exportString()}catch(e){console.error("An error occurred while copying text to clipboard: ",e)}return e}async getExportPlugin(){if(this._revogridExportPlugin)return this._revogridExportPlugin;const e=document.getElementById(`grid-${this.refId}`);if(!e)throw"Grid element not found";{const t=await e.getPlugins();for(let e of t)if(e.exportFile&&e.exportString)return this._revogridExportPlugin=e,this._revogridExportPlugin}}fetchDataset(e){return Q().get(this.src,e).then((e=>e.data))}buildExtensionUrl(e){const{reportStore:{url:t}}=ti;return new URL(`extensions/${e}/${this.casRef}`,t).toString()}},st=function(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),void 0===(o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o)).initializer&&(Object.defineProperty(e,t,o),o=null),o}(at.prototype,"casRef",[ot],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),at);var ut=__webpack_require__(63259);function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class dt extends Le{constructor(...e){super(...e),ht(this,"filename",void 0),ht(this,"getComponent",(async()=>await this.imports.FileViewBlock)),ht(this,"getComponentProps",(()=>({block:this,displayHeader:!1,developerMode:!1}))),ht(this,"downloadFile",(()=>(0,ut.saveAs)(this.src,this.filename)))}}const ft=e=>{const n=e,[r,i]=(0,t.useState)(),o=(0,t.useContext)(O.yX),{singleBlockEmbed:a}=o.store.reportStore;return(0,t.useEffect)((()=>{n.fetchData().then((e=>{i(e)}))}),[n.block.refId]),t.createElement("img",{src:r,"data-cy":"block-svg",loading:"lazy",className:`mx-auto p-1 ${(()=>{const e=[];return n.block.responsive?(e.push("w-full"),a&&e.push("h-full")):(e.push("max-w-none"),a&&e.push("absolute top-0 left-0")),e.join(" ")})()}`})};function pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class gt extends De{constructor(...e){super(...e),pt(this,"getComponent",(async()=>ft)),pt(this,"getComponentProps",(()=>({block:this,fetchData:this.fetchAssetData.bind(this)})))}async fetchRemoteAssetData(){return this.src}async fetchLocalAssetData(){return this.src}}const mt=e=>{const n=(0,t.useMemo)((()=>e.block.type.startsWith("video")?t.createElement("video",{controls:!0,src:e.block.src,width:"800"}):e.block.type.startsWith("audio")?t.createElement("audio",{controls:!0,src:e.block.src,className:"w-full"}):e.block.type.startsWith("image")?t.createElement("img",{src:e.block.src,loading:"lazy",className:"mx-auto"}):t.createElement("div",null,"Media type not supported")),[e.block]);return t.createElement("div",{className:"w-full flex items-center justify-center","data-cy":"block-media"},n)};class vt extends Le{constructor(...e){var t,n;super(...e),n=async()=>mt,(t="getComponent")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n}}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class bt extends De{constructor(...e){super(...e),yt(this,"getComponent",(async()=>await this.imports.PlotlyViewBlock)),yt(this,"getComponentProps",(()=>({block:this,fetchData:this.fetchAssetData.bind(this)})))}async fetchRemoteAssetData(){const e=await ge(this.src);return JSON.parse(e)}fetchLocalAssetData(){return JSON.parse(JSON.parse(me(this.src)))}}function _t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class xt extends De{constructor(...e){super(...e),_t(this,"getComponent",(async()=>await this.imports.BokehViewBlock)),_t(this,"getComponentProps",(()=>({fetchData:this.fetchAssetData.bind(this),block:this})))}fetchLocalAssetData(){const e=super.fetchLocalAssetData();return JSON.parse(e)}}const wt=e=>{const n=e,[r,i]=(0,t.useState)();return(0,t.useEffect)((()=>{n.fetchData().then((e=>{i(e)}))}),[]),t.createElement("img",{src:r,loading:"lazy",className:"mx-auto","data-cy":"block-image"})};function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class kt extends Le{constructor(...e){super(...e),At(this,"captionType","Plot"),At(this,"getComponent",(async()=>wt)),At(this,"getComponentProps",(()=>({fetchData:this.fetchAssetData.bind(this)})))}async fetchRemoteAssetData(){return this.src}async fetchLocalAssetData(){return this.src}}function Tt(){return Tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}function St(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Et,Ct,Mt=(Et=function(e){!function(t){if("undefined"!=typeof window){var n=0,r=!1,i=!1,o="message".length,a="[iFrameSizer]",s=a.length,l=null,c=window.requestAnimationFrame,u={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},h={},d=null,f={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},p={};window.jQuery&&function(e){e.fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){P(n,e)})).end()}):_("","Unable to bind to jQuery, it is not fully loaded.")}(window.jQuery),e.exports=B(),window.iFrameResize=window.iFrameResize||B()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function m(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return h[e]?h[e].log:r}function b(e,t){w("log",e,t,y(e))}function _(e,t){w("info",e,t,y(e))}function x(e,t){w("warn",e,t,!0)}function w(e,t,n,r){!0===r&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}(t),n)}function A(e){function t(){n("Height"),n("Width"),D((function(){L(F),C(B),g("onResized",F)}),F,"init")}function n(e){var t=Number(h[B]["max"+e]),n=Number(h[B]["min"+e]),r=e.toLowerCase(),i=Number(F[r]);b(B,"Checking "+r+" is in range "+n+"-"+t),i<n&&(i=n,b(B,"Set "+r+" to min value")),i>t&&(i=t,b(B,"Set "+r+" to max value")),F[r]=""+i}function r(e){return z.substr(z.indexOf(":")+o+e)}function i(e,t){var n,r;n=function(){var n,r;I("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),r=F.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:r.height,iframeWidth:r.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(r.top-n.top,10),offsetLeft:parseInt(r.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},p[r=t]||(p[r]=setTimeout((function(){p[r]=null,n()}),32))}function c(e){var t=e.getBoundingClientRect();return E(B),{x:Math.floor(Number(t.left)+Number(l.x)),y:Math.floor(Number(t.top)+Number(l.y))}}function u(e){var t=e?c(F.iframe):{x:0,y:0},n={x:Number(F.width)+t.x,y:Number(F.height)+t.y};b(B,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):x(B,"Unable to scroll to requested position, window.parentIFrame not found"):(l=n,d(),b(B,"--"))}function d(){!1!==g("onScroll",l)?C(B):M()}function f(e){g(e,{iframe:F.iframe,screenX:F.width,screenY:F.height,type:F.type})}function g(e,t){return k(B,e,t)}var y,w,A,T,P,N,z=e.data,F={},B=null;"[iFrameResizerChild]Ready"===z?function(){for(var e in h)I("iFrame requested init",R(e),h[e].iframe,e)}():a===(""+z).substr(0,s)&&z.substr(s).split(":")[0]in h?(T=(A=z.substr(s).split(":"))[1]?parseInt(A[1],10):0,P=h[A[0]]&&h[A[0]].iframe,N=getComputedStyle(P),F={iframe:P,id:A[0],height:T+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(N)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(N),width:A[2],type:A[3]},B=F.id,h[B]&&(h[B].loaded=!0),(w=F.type in{true:1,false:1,undefined:1})&&b(B,"Ignoring init message from meta parent page"),!w&&function(e){var t=!0;return h[e]||(t=!1,x(F.type+" No settings for "+e+". Message was: "+z)),t}(B)&&(b(B,"Received: "+z),y=!0,null===F.iframe&&(x(B,"IFrame ("+F.id+") not found"),y=!1),y&&function(){var t,n=e.origin,r=h[B]&&h[B].checkOrigin;if(r&&""+n!="null"&&!(r.constructor===Array?function(){var e=0,t=!1;for(b(B,"Checking connection is from allowed list of origins: "+r);e<r.length;e++)if(r[e]===n){t=!0;break}return t}():(t=h[B]&&h[B].remoteHost,b(B,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+F.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(h[B]&&h[B].firstRun&&h[B]&&(h[B].firstRun=!1),F.type){case"close":S(F.iframe);break;case"message":e=r(6),b(B,"onMessage passed: {iframe: "+F.iframe.id+", message: "+e+"}"),g("onMessage",{iframe:F.iframe,message:JSON.parse(e)}),b(B,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":h[B].autoResize=JSON.parse(r(9));break;case"scrollTo":u(!1);break;case"scrollToOffset":u(!0);break;case"pageInfo":i(h[B]&&h[B].iframe,B),function(){function e(e,r){function o(){h[n]?i(h[n].iframe,n):t()}["scroll","resize"].forEach((function(t){b(n,e+t+" listener for sendPageInfo"),r(window,t,o)}))}function t(){e("Remove ",v)}var n=B;e("Add ",m),h[n]&&(h[n].stopPageInfo=t)}();break;case"pageInfoStop":h[B]&&h[B].stopPageInfo&&(h[B].stopPageInfo(),delete h[B].stopPageInfo);break;case"inPageLink":!function(e){var t,n=e.split("#")[1]||"",r=decodeURIComponent(n),i=document.getElementById(r)||document.getElementsByName(r)[0];i?(t=c(i),b(B,"Moving to in page link (#"+n+") at x: "+t.x+" y: "+t.y),l={x:t.x,y:t.y},d(),b(B,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):b(B,"In page link #"+n+" not found and window.parentIFrame not found"):b(B,"In page link #"+n+" not found")}(r(9));break;case"reset":O(F);break;case"init":t(),g("onInit",F.iframe);break;default:t()}var e}())):_(B,"Ignored: "+z)}function k(e,t,n){var r=null,i=null;if(h[e]){if("function"!=typeof(r=h[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=r(n)}return i}function T(e){var t=e.id;delete h[t]}function S(e){var t=e.id;if(!1!==k(t,"onClose",t)){b(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}k(t,"onClosed",t),b(t,"--"),T(e)}else b(t,"Close iframe cancelled by onClose event")}function E(e){null===l&&b(e,"Get page position: "+(l={x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}).x+","+l.y)}function C(e){null!==l&&(window.scrollTo(l.x,l.y),b(e,"Set page position: "+l.x+","+l.y),M())}function M(){l=null}function O(e){b(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),E(e.id),D((function(){L(e),I("reset","reset",e.iframe,e.id)}),e,"reset")}function L(e){function t(t){i||"0"!==e[t]||(i=!0,b(r,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(h).forEach((function(e){!function(e){function t(t){return"0px"===(h[e]&&h[e].iframe.style[t])}h[e]&&null!==h[e].iframe.offsetParent&&(t("height")||t("width"))&&I("Visibility change","resize",h[e].iframe,e)}(e)}))}function t(t){b("window","Mutation observed: "+t[0].target+" "+t[0].type),N(e,16)}var n=g();n&&function(){var e=document.querySelector("body");new n(t).observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}()}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",b(e.id,"IFrame ("+r+") "+t+" set to "+e[t]+"px")):b("undefined","messageData id not set")}(n),t(n)}var r=e.iframe.id;h[r]&&(h[r].sizeHeight&&n("height"),h[r].sizeWidth&&n("width"))}function D(e,t,n){n!==t.type&&c&&!window.jasmine?(b(t.id,"Requesting animation frame"),c(e)):e()}function I(e,t,n,r,i){var o=!1;r=r||n.id,h[r]&&(n&&"contentWindow"in n&&null!==n.contentWindow?function(){var i=h[r]&&h[r].targetOrigin;b(r,"["+e+"] Sending msg to iframe["+r+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(a+t,i)}():x(r,"["+e+"] IFrame("+r+") not found"),i&&h[r]&&h[r].warningTimeout&&(h[r].msgTimeout=setTimeout((function(){!h[r]||h[r].loaded||o||(o=!0,x(r,"IFrame has not responded within "+h[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),h[r].warningTimeout)))}function R(e){return e+":"+h[e].bodyMarginV1+":"+h[e].sizeWidth+":"+h[e].log+":"+h[e].interval+":"+h[e].enablePublicMethods+":"+h[e].autoResize+":"+h[e].bodyMargin+":"+h[e].heightCalculationMethod+":"+h[e].bodyBackground+":"+h[e].bodyPadding+":"+h[e].tolerance+":"+h[e].inPageLinks+":"+h[e].resizeFrom+":"+h[e].widthCalculationMethod}function P(e,i){function o(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],x(a,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a=function(t){var o;return""===t&&(e.id=(o=i&&i.id||f.id+n++,null!==document.getElementById(o)&&(o+=n++),t=o),r=(i||{}).log,b(t,"Added missing iframe ID: "+t+" ("+e.src+")")),t}(e.id);a in h&&"iFrameResizer"in e?x(a,"Ignored iFrame, already setup."):(function(t){var n;t=t||{},h[a]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(o,t),function(e){for(var t in f)Object.prototype.hasOwnProperty.call(f,t)&&(h[a][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:f[t])}(t),h[a]&&(h[a].targetOrigin=!0===h[a].checkOrigin?""===(n=h[a].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(i),function(){switch(b(a,"IFrame scrolling "+(h[a]&&h[a].scrolling?"enabled":"disabled")+" for "+a),e.style.overflow=!1===(h[a]&&h[a].scrolling)?"hidden":"auto",h[a]&&h[a].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=h[a]?h[a].scrolling:"no"}}(),function(){function t(t){1/0!==h[a][t]&&0!==h[a][t]&&(e.style[t]=h[a][t]+"px",b(a,"Set "+t+" = "+h[a][t]+"px"))}function n(e){if(h[a]["min"+e]>h[a]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(h[a]&&h[a].bodyMargin)&&"0"!==(h[a]&&h[a].bodyMargin)||(h[a].bodyMarginV1=h[a].bodyMargin,h[a].bodyMargin=h[a].bodyMargin+"px"),function(n){var r=g();r&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&S(e)}))}))})).observe(e.parentNode,{childList:!0})}(r),m(e,"load",(function(){var r,i;I("iFrame.onload",n,e,t,!0),r=h[a]&&h[a].firstRun,i=h[a]&&h[a].heightCalculationMethod in u,!r&&i&&O({iframe:e,height:0,width:0,type:"init"})})),I("init",n,e,t,!0)}(R(a)),h[a]&&(h[a].iframe.iFrameResizer={close:S.bind(null,h[a].iframe),removeListeners:T.bind(null,h[a].iframe),resize:I.bind(null,"Window resize","resize",h[a].iframe),moveToAnchor:function(e){I("Move to anchor","moveToAnchor:"+e,h[a].iframe,a)},sendMessage:function(e){I("Send Message","message:"+(e=JSON.stringify(e)),h[a].iframe,a)}}))}function N(e,t){null===d&&(d=setTimeout((function(){d=null,e()}),t))}function z(){"hidden"!==document.visibilityState&&(b("document","Trigger event: Visiblity change"),N((function(){F("Tab Visable","resize")}),16))}function F(e,t){Object.keys(h).forEach((function(n){(function(e){return h[e]&&"parent"===h[e].resizeFrom&&h[e].autoResize&&!h[e].firstRun})(n)&&I(e,t,h[n].iframe,n)}))}function B(){function e(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),P(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!c;e+=1)c=window[t[e]+"RequestAnimationFrame"];c?c=c.bind(window):b("setup","RequestAnimationFrame not supported")}(),m(window,"message",A),m(window,"resize",(function(){b("window","Trigger event: resize"),N((function(){F("Window resize","resize")}),16)})),m(document,"visibilitychange",z),m(document,"-webkit-visibilitychange",z),function(r,i){switch(n=[],function(e){e&&e.enablePublicMethods&&x("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(r),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),e.bind(t,r));break;case"object":e(r,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return n}}}()},Et(Ct={exports:{}}),Ct.exports),Ot=function(){},Lt=function(e){var n=e.title,r=e.forwardRef,i=St(e,["title","forwardRef"]),o=function(e){return e.autoResize,e.bodyBackground,e.bodyMargin,e.bodyPadding,e.checkOrigin,e.inPageLinks,e.heightCalculationMethod,e.interval,e.log,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.resizeFrom,e.scrolling,e.sizeHeight,e.sizeWidth,e.warningTimeout,e.tolerance,e.widthCalculationMethod,e.onClosed,e.onInit,e.onMessage,e.onMouseEnter,e.onMouseLeave,e.onResized,St(e,["autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","inPageLinks","heightCalculationMethod","interval","log","maxHeight","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClosed","onInit","onMessage","onMouseEnter","onMouseLeave","onResized"])}(i),a=(0,t.useRef)(null),s=function(){return Ot(!a.current,"[iframeSizerReact]["+(a&&a.current&&a.current.id)+"] Close event ignored, to remove the iframe update your React component"),!a.current};return(0,t.useEffect)((function(){var e=a.current;return Mt(Tt({},i,{onClose:s}),e),function(){return e.iFrameResizer&&e.iFrameResizer.removeListeners()}}),[]),(0,t.useImperativeHandle)(r,(function(){return{resize:function(){return a.current.iFrameResizer.resize()},moveToAnchor:function(e){return a.current.iFrameResizer.moveToAnchor(e)},sendMessage:function(e,t){a.current.iFrameResizer.sendMessage(e,t)}}})),t.createElement("iframe",Tt({title:n},o,{ref:a}))};Lt.defaultProps={title:"iframe"},Lt.propTypes={title:Be().string};const Dt=Lt,It=__webpack_require__(16779).Z,Rt=e=>{return e.block.isIFrame?t.createElement("div",{dangerouslySetInnerHTML:{__html:e.block.html},className:"flex justify-center items-center"}):t.createElement(Dt,{srcDoc:(n=e.block.html,`<!DOCTYPE html>\n <body>\n <script>${It}<\/script>\n ${n}\n </body>\n `),className:"flex justify-center items-center",checkOrigin:!1,"data-cy":"block-embed"});var n};var Pt,Nt,zt,Ft,Bt;function jt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vt(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let qt=(Pt=it({name:"provider_name"}),Nt=W(),Ft=Vt((zt=class extends X{constructor(...e){super(...e),Ut(this,"html",void 0),Ut(this,"title",void 0),jt(this,"providerName",Ft,this),jt(this,"_isIFrame",Bt,this)}get isIFrame(){if(void 0===this._isIFrame){const e=(new DOMParser).parseFromString(this.html,"text/html").documentElement.querySelector("body");this._isIFrame=!!e&&1===e.childElementCount&&"iframe"===e.children[0].tagName.toLowerCase()}return this._isIFrame}renderView(){return t.createElement(Rt,{block:this})}}).prototype,"providerName",[Pt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Bt=Vt(zt.prototype,"_isIFrame",[Nt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zt);const Ht=e=>{const{block:n}=e;return t.createElement("div",{"data-cy":"block-bignumber",className:"bg-white overflow-hidden border border-gray-300 rounded-lg w-full"},t.createElement("div",{className:"px-4 py-5 sm:p-6"},t.createElement("dl",null,t.createElement("dt",{className:"text-sm leading-5 font-medium text-gray-500 truncate"},n.heading),t.createElement("dd",{className:"mt-1 text-3xl leading-9 font-semibold text-gray-900"},n.value))))},$t=e=>{const{block:n}=e,r=n.isPositiveIntent?"green":"red";return t.createElement("div",{"data-cy":"block-bignumber",className:"rounded-lg bg-white overflow-hidden border border-gray-300 w-96 md:grid-cols-3 w-full"},t.createElement("div",{className:"px-4 py-5 sm:p-6"},t.createElement("dl",null,t.createElement("dt",{className:"text-base leading-6 font-normal text-gray-900"},n.heading),t.createElement("dd",{className:"mt-1 flex justify-between items-baseline md:block lg:flex"},t.createElement("div",{className:"flex items-baseline text-2xl leading-8 font-semibold text-dp-accent"},n.value,n.prevValue&&t.createElement("span",{className:"ml-2 text-sm leading-5 font-medium text-gray-500"},"from ",n.prevValue)),n.change&&t.createElement("div",{className:`inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium leading-5 bg-${r}-100 text-${r}-800 md:mt-2 lg:mt-0`},t.createElement("i",{className:"mr-1 fa fa-arrow-"+(n.isUpwardChange?"up":"down")}),n.change)))))};var Wt,Gt,Yt,Xt,Zt,Kt,Jt,Qt,en;function tn(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rn(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let on=(Wt=it({name:"prev_value"}),Gt=it({name:"is_positive_intent"}),Yt=xe(be),Xt=it({name:"is_upward_change"}),Zt=xe(be),Jt=rn((Kt=class extends X{constructor(...e){super(...e),nn(this,"heading",void 0),nn(this,"value",void 0),tn(this,"prevValue",Jt,this),nn(this,"change",void 0),tn(this,"isPositiveIntent",Qt,this),tn(this,"isUpwardChange",en,this)}renderView(){return this.prevValue||this.change?t.createElement($t,{block:this}):t.createElement(Ht,{block:this})}}).prototype,"prevValue",[Wt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qt=rn(Kt.prototype,"isPositiveIntent",[Gt,Yt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),en=rn(Kt.prototype,"isUpwardChange",[Xt,Zt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Kt);var an=__webpack_require__(55921),sn=__webpack_require__.n(an),ln=__webpack_require__(73289);function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function un(e){return function(e){if(Array.isArray(e))return cn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){hn(e,t,n[t])}))}return e}function fn(){return fn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fn.apply(this,arguments)}var pn={};function gn(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return pn[r]||(pn[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),pn[r]}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=gn(r);return i.reduce((function(e,t){return dn({},e,n[t])}),t)}function vn(e){return e.join(" ")}function yn(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,a=e.useInlineStyles,s=e.key,l=n.properties,c=n.type,u=n.tagName,h=n.value;if("text"===c)return h;if(u){var d,f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return yn({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,a);if(a){var p=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],m=l.className&&g.concat(l.className.filter((function(e){return!p.includes(e)})));d=dn({},l,{className:vn(m)||void 0,style:mn(l.className,Object.assign({},l.style,o),r)})}else d=dn({},l,{className:vn(l.className)});var v=f(n.children);return t.createElement(u,fn({key:s},d),v)}}var bn=/\n/g;function _n(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,a=e.numberStyle,s=void 0===a?{}:a,l=e.startingLineNumber;return t.createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.startingLineNumber,r=e.style;return e.lines.map((function(e,i){var o=i+n;return t.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))}))}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function xn(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function wn(e,t,n){var r;return dn({},{display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},"function"==typeof e?e(t):e)}function An(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,h=e.wrapLongLines,d="function"==typeof s?s(n):s;if(d.className=c,n&&o){var f=wn(r,n,i);t.unshift(xn(n,f))}return h&u&&(d.style=dn({},d.style,{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function kn(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var i=e[r];if("text"===i.type)n.push(An({children:[i],className:un(new Set(t))}));else if(i.children){var o=t.concat(i.properties.className);n=n.concat(kn(i.children,o))}}return n}function Tn(e,t,n,r,i,o,a,s,l){var c,u=kn(e.value),h=[],d=-1,f=0;function p(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return An({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function g(e,t){if(r&&t&&i){var n=wn(s,t,a);e.unshift(xn(t,n))}return e}function m(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):g(e,n)}for(var v=function(){var e=u[f],t=e.children[0].value;if(t.match(bn)){var n=t.split("\n");n.forEach((function(t,i){var a=r&&h.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===i){var l=m(u.slice(d+1,f).concat(An({children:[s],className:e.properties.className})),a);h.push(l)}else if(i===n.length-1)if(u[f+1]&&u[f+1].children&&u[f+1].children[0]){var c=An({children:[{type:"text",value:"".concat(t)}],className:e.properties.className});u.splice(f+1,0,c)}else{var p=m([s],a,e.properties.className);h.push(p)}else{var g=m([s],a,e.properties.className);h.push(g)}})),d=f}f++};f<u.length;)v();if(d!==u.length-1){var y=u.slice(d+1,u.length);if(y&&y.length){var b=m(y,r&&h.length+o);h.push(b)}}return t?h:(c=[]).concat.apply(c,h)}function Sn(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return yn({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function En(e){return e&&void 0!==e.highlightAuto}var Cn,Mn,On=__webpack_require__(87576),Ln=(Cn=On,Mn={},function(e){var n=e.language,r=e.children,i=e.style,o=void 0===i?Mn:i,a=e.customStyle,s=void 0===a?{}:a,l=e.codeTagProps,c=void 0===l?{className:n?"language-".concat(n):void 0,style:dn({},o['code[class*="language-"]'],o['code[class*="language-'.concat(n,'"]')])}:l,u=e.useInlineStyles,h=void 0===u||u,d=e.showLineNumbers,f=void 0!==d&&d,p=e.showInlineLineNumbers,g=void 0===p||p,m=e.startingLineNumber,v=void 0===m?1:m,y=e.lineNumberContainerStyle,b=e.lineNumberStyle,_=void 0===b?{}:b,x=e.wrapLines,w=e.wrapLongLines,A=void 0!==w&&w,k=e.lineProps,T=void 0===k?{}:k,S=e.renderer,E=e.PreTag,C=void 0===E?"pre":E,M=e.CodeTag,O=void 0===M?"code":M,L=e.code,D=void 0===L?Array.isArray(r)?r[0]:r:L,I=e.astGenerator,R=function(e,t){if(null==e)return{};var n,r,i=(0,ln.Z)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"]);I=I||Cn;var P=f?t.createElement(_n,{containerStyle:y,codeStyle:c.style||{},numberStyle:_,startingLineNumber:v,codeString:D}):null,N=o.hljs||o['pre[class*="language-"]']||{backgroundColor:"#fff"},z=En(I)?"hljs":"prismjs",F=h?Object.assign({},R,{style:Object.assign({},N,s)}):Object.assign({},R,{className:R.className?"".concat(z," ").concat(R.className):z,style:Object.assign({},s)});if(!I)return t.createElement(C,F,P,t.createElement(O,c,D));(void 0===x&&S||A)&&(x=!0),S=S||Sn;var B=[{type:"text",value:D}],j=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(En(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:I,language:n,code:D,defaultCodeValue:B});null===j.language&&(j.value=B);var U=Tn(j,x,T,f,g,v,j.value.length+v,_,A);return c.style=dn({},c.style,A?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),t.createElement(C,F,t.createElement(O,c,!g&&P,S({rows:U,stylesheet:o,useInlineStyles:h})))});Ln.registerLanguage=On.registerLanguage;const Dn=Ln,In={hljs:{display:"block",overflowX:"auto",padding:"0.5em",color:"#abb2bf",background:"#282c34"},"hljs-comment":{color:"#5c6370",fontStyle:"italic"},"hljs-quote":{color:"#5c6370",fontStyle:"italic"},"hljs-doctag":{color:"#c678dd"},"hljs-keyword":{color:"#c678dd"},"hljs-formula":{color:"#c678dd"},"hljs-section":{color:"#e06c75"},"hljs-name":{color:"#e06c75"},"hljs-selector-tag":{color:"#e06c75"},"hljs-deletion":{color:"#e06c75"},"hljs-subst":{color:"#e06c75"},"hljs-literal":{color:"#56b6c2"},"hljs-string":{color:"#98c379"},"hljs-regexp":{color:"#98c379"},"hljs-addition":{color:"#98c379"},"hljs-attribute":{color:"#98c379"},"hljs-meta-string":{color:"#98c379"},"hljs-built_in":{color:"#e6c07b"},"hljs-class .hljs-title":{color:"#e6c07b"},"hljs-attr":{color:"#d19a66"},"hljs-variable":{color:"#d19a66"},"hljs-template-variable":{color:"#d19a66"},"hljs-type":{color:"#d19a66"},"hljs-selector-class":{color:"#d19a66"},"hljs-selector-attr":{color:"#d19a66"},"hljs-selector-pseudo":{color:"#d19a66"},"hljs-number":{color:"#d19a66"},"hljs-symbol":{color:"#61aeee"},"hljs-bullet":{color:"#61aeee"},"hljs-link":{color:"#61aeee",textDecoration:"underline"},"hljs-meta":{color:"#61aeee"},"hljs-selector-id":{color:"#61aeee"},"hljs-title":{color:"#61aeee"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};var Rn=__webpack_require__(42730);const Pn=__webpack_require__.n(Rn)();var Nn=__webpack_require__(43770);const zn=__webpack_require__.n(Nn)();var Fn=__webpack_require__(78274);const Bn=__webpack_require__.n(Fn)();Dn.registerLanguage("javascript",Pn),Dn.registerLanguage("json",Bn),Dn.registerLanguage("python",zn);const jn=e=>t.createElement(Dn,{language:e.language,style:In},e.value);jn.defaultProps={language:null};const Un=jn;var Vn=__webpack_require__(66250),qn=__webpack_require__.n(Vn);const Hn=e=>e.href?t.createElement("a",{href:e.$ref},e.children):t.createElement(t.Fragment,null,"[",e.children,"]"),$n=e=>{const n=(0,t.useContext)(O.yX),{isLightProse:r}=n.store.reportStore;return t.createElement("div",{"data-cy":"block-markdown",className:"w-full overflow-y-hidden"},t.createElement(sn(),{className:`prose font-dp-prose ${r?"prose-dark":""} mx-auto max-w-full`,renderers:{code:Un,linkReference:Hn},plugins:[qn()],"data-cy":"block-text"},e.block.content))};class Wn extends X{constructor(...e){var t,n;super(...e),n=void 0,(t="content")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[t]=n}renderView(){return t.createElement($n,{block:this})}}var Gn=__webpack_require__(98036),Yn=__webpack_require__.n(Gn);function Xn(){return(Xn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Zn=(0,t.memo)((function(e){var n=e.children,r=e.math,i=e.block,o=e.errorColor,a=e.renderError,s=e.settings,l=e.as,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(e,["children","math","block","errorColor","renderError","settings","as"]),u=l||(i?"div":"span"),h=null!=n?n:r,d=(0,t.useState)({innerHtml:""}),f=d[0],p=d[1];return(0,t.useEffect)((function(){try{var e=Yn().renderToString(h,Xn({displayMode:!!i,errorColor:o,throwOnError:!!a},s));p({innerHtml:e})}catch(e){if(!(e instanceof Yn().ParseError||e instanceof TypeError))throw e;p(a?{errorElement:a(e)}:{innerHtml:e.message})}}),[i,h,o,a,s]),"errorElement"in f?f.errorElement:t.createElement(u,Object.assign({},c,{dangerouslySetInnerHTML:{__html:f.innerHtml}}))}));const Kn=Zn,Jn=e=>t.createElement("div",{"data-cy":"block-formula",className:"w-full overflow-y-hidden bg-white"},t.createElement(Kn,{math:e.block.content,block:!0}));function Qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class er extends X{constructor(...e){super(...e),Qn(this,"content",void 0),Qn(this,"captionType","Formula")}renderView(){return t.createElement(Jn,{block:this})}}const tr=__webpack_require__(16779).Z,nr=__webpack_require__(71671).Z,rr=e=>{return t.createElement(Dt,{srcDoc:(n=e.block.html,`\n <!DOCTYPE html>\n <body>\n <style>${nr}</style>\n <script>${tr}<\/script>\n <div class="doc-root">${n}</div>\n </body>\n </html>\n `),className:"w-full",checkOrigin:!1,sandbox:e.sandbox,"data-cy":"block-user-iframe"});var n};class ir extends X{constructor(...e){var t,n;super(...e),n=void 0,(t="html")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this.html=n}renderView(){const{isOrg:e}=ti.reportStore,n=e?void 0:"allow-scripts";return t.createElement(rr,{block:this,sandbox:n})}}const or={hljs:{display:"block",overflowX:"auto",padding:"0.5em",color:"#000",background:"#f8f8ff"},"hljs-comment":{color:"#408080",fontStyle:"italic"},"hljs-quote":{color:"#408080",fontStyle:"italic"},"hljs-keyword":{color:"#954121"},"hljs-selector-tag":{color:"#954121"},"hljs-literal":{color:"#954121"},"hljs-subst":{color:"#954121"},"hljs-number":{color:"#40a070"},"hljs-string":{color:"#219161"},"hljs-doctag":{color:"#219161"},"hljs-selector-id":{color:"#19469d"},"hljs-selector-class":{color:"#19469d"},"hljs-section":{color:"#19469d"},"hljs-type":{color:"#19469d"},"hljs-params":{color:"#00f"},"hljs-title":{color:"#458",fontWeight:"bold"},"hljs-tag":{color:"#000080",fontWeight:"normal"},"hljs-name":{color:"#000080",fontWeight:"normal"},"hljs-attribute":{color:"#000080",fontWeight:"normal"},"hljs-variable":{color:"#008080"},"hljs-template-variable":{color:"#008080"},"hljs-regexp":{color:"#b68"},"hljs-link":{color:"#b68"},"hljs-symbol":{color:"#990073"},"hljs-bullet":{color:"#990073"},"hljs-built_in":{color:"#0086b3"},"hljs-builtin-name":{color:"#0086b3"},"hljs-meta":{color:"#999",fontWeight:"bold"},"hljs-deletion":{background:"#fdd"},"hljs-addition":{background:"#dfd"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};var ar=__webpack_require__(54894);Dn.registerLanguage("javascript",Pn),Dn.registerLanguage("python",zn);const sr=e=>{const n=(0,t.useRef)(null),r=(0,t.useContext)(O.yX),{singleBlockEmbed:i}=r.store.reportStore,o=e.block.code.trim();return(0,t.useLayoutEffect)((()=>{if(!n.current)return;const e=new ar.E(n.current,{text:o});return()=>e.destroy()})),t.createElement("div",{className:"relative w-full "+(i?"h-iframe":"")},t.createElement("button",{className:"absolute top-2 right-2 text-gray-700",ref:n},t.createElement("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},t.createElement("title",null,"Copy"),t.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),t.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))),t.createElement(Dn,{language:e.block.language,style:or,codeTagProps:{style:{fontSize:"inherit"}},customStyle:{width:"100%",fontSize:"14px"},showLineNumbers:!0,lineNumberStyle:{color:"#9CA3AF"},className:i?"h-iframe":"","data-cy":"block-code"},o))};function lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class cr extends X{constructor(...e){super(...e),lr(this,"captionType","Code Snippet"),lr(this,"code",void 0),lr(this,"language",void 0)}renderView(){return t.createElement(sr,{block:this})}}class ur extends X{constructor(...e){var t,n;super(...e),n=void 0,(t="name")in this?Object.defineProperty(this,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):this.name=n}renderView(){return t.createElement("div",{className:"w-full h-full flex items-center justify-center text-gray-300 font-semibold border border-gray-200 pointer-events-none"},t.createElement("div",null,"Empty block (",this.name,")"))}}var hr=__webpack_require__(60595),dr=__webpack_require__.n(hr);const fr=e=>"Group"===e.name,pr=e=>"string"==typeof e?e:e.attributes&&e.attributes.type?e.attributes.type:"",gr=e=>"Text"===e.name,mr=e=>"Formula"===e.name,vr=e=>"BigNumber"===e.name,yr=e=>"Media"===e.name,br=e=>"HTML"===e.name,_r=e=>"Code"===e.name,xr=e=>"Embed"===e.name,wr=e=>"Empty"===e.name,Ar=e=>pr(e).includes("application/vnd.vegalite"),kr=e=>pr(e).includes("application/vnd.apache.arrow+binary"),Tr=e=>"application/vnd.datapane.table+html"===pr(e),Sr=e=>"application/vnd.folium+html"===pr(e),Er=e=>"application/vnd.folium+base64"===pr(e),Cr=e=>"application/vnd.bokeh.show+json"===pr(e),Mr=e=>pr(e).includes("image")&&!pr(e).includes("image/svg"),Or=e=>"application/vnd.plotly.v1+json"===pr(e),Lr=e=>pr(e).includes("image/svg");var Dr=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,n,r,i,o){var a=this;if(void 0===o&&(o=0),Array.isArray(t)||t instanceof Set){var s=r&&this.transformationType===j.PLAIN_TO_CLASS?function(e){var t=new e;return t instanceof Set||"push"in t?t:[]}(r):[];return t.forEach((function(t,r){var i=e?e[r]:void 0;if(a.options.enableCircularCheck&&a.isCircular(t))a.transformationType===j.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t));else{var l=void 0;if("function"!=typeof n&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(a.transformationType===j.PLAIN_TO_CLASS){l=n.options.discriminator.subTypes.find((function(e){return e.name===t[n.options.discriminator.property]}));var c={newObject:s,object:t,property:void 0},u=n.typeFunction(c);l=void 0===l?u:l.value,n.options.keepDiscriminatorProperty||delete t[n.options.discriminator.property]}a.transformationType===j.CLASS_TO_CLASS&&(l=t.constructor),a.transformationType===j.CLASS_TO_PLAIN&&(t[n.options.discriminator.property]=n.options.discriminator.subTypes.find((function(e){return e.value===t.constructor})).name)}else l=n;var h=a.transform(i,t,l,void 0,t instanceof Map,o+1);s instanceof Set?s.add(h):s.push(h)}})),s}if(n!==String||i){if(n!==Number||i){if(n!==Boolean||i){if((n===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):null==t?t:new Date(t);if(("undefined"!=typeof globalThis?globalThis:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0).Buffer&&(n===Buffer||t instanceof Buffer)&&!i)return null==t?t:Buffer.from(t);if("object"==typeof t&&null!==t){n||t.constructor===Object||(n=t.constructor),!n&&e&&(n=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var l=this.getKeys(n,t,i),c=e||{};e||this.transformationType!==j.PLAIN_TO_CLASS&&this.transformationType!==j.CLASS_TO_CLASS||(c=i?new Map:n?new n:{});for(var u=function(r){if("__proto__"===r||"constructor"===r)return"continue";var a=r,s=r,l=r;if(!h.options.ignoreDecorators&&n)if(h.transformationType===j.PLAIN_TO_CLASS)(u=$.findExposeMetadataByCustomName(n,r))&&(l=u.propertyName,s=u.propertyName);else if(h.transformationType===j.CLASS_TO_PLAIN||h.transformationType===j.CLASS_TO_CLASS){var u;(u=$.findExposeMetadata(n,r))&&u.options&&u.options.name&&(s=u.options.name)}var d=void 0;d=t instanceof Map?t.get(a):t[a]instanceof Function?t[a]():t[a];var f=void 0,p=d instanceof Map;if(n&&i)f=n;else if(n){var g=$.findTypeMetadata(n,l);if(g){var m={newObject:c,object:t,property:l},v=g.typeFunction?g.typeFunction(m):g.reflectedType;g.options&&g.options.discriminator&&g.options.discriminator.property&&g.options.discriminator.subTypes?t[a]instanceof Array?f=g:(h.transformationType===j.PLAIN_TO_CLASS&&(f=void 0===(f=g.options.discriminator.subTypes.find((function(e){if(d&&g.options.discriminator.property in d)return e.name===d[g.options.discriminator.property]})))?v:f.value,g.options.keepDiscriminatorProperty||d&&g.options.discriminator.property in d&&delete d[g.options.discriminator.property]),h.transformationType===j.CLASS_TO_CLASS&&(f=d.constructor),h.transformationType===j.CLASS_TO_PLAIN&&(d[g.options.discriminator.property]=g.options.discriminator.subTypes.find((function(e){return e.value===d.constructor})).name)):f=v,p=p||g.reflectedType===Map}else if(h.options.targetMaps)h.options.targetMaps.filter((function(e){return e.target===n&&!!e.properties[l]})).forEach((function(e){return f=e.properties[l]}));else if(h.options.enableImplicitConversion&&h.transformationType===j.PLAIN_TO_CLASS){var y=Reflect.getMetadata("design:type",n.prototype,l);y&&(f=y)}}var b=Array.isArray(t[a])?h.getReflectedType(n,l):void 0,_=e?e[a]:void 0;if(c.constructor.prototype){var x=Object.getOwnPropertyDescriptor(c.constructor.prototype,s);if((h.transformationType===j.PLAIN_TO_CLASS||h.transformationType===j.CLASS_TO_CLASS)&&(x&&!x.set||c[s]instanceof Function))return"continue"}if(h.options.enableCircularCheck&&h.isCircular(d))h.transformationType===j.CLASS_TO_CLASS&&(A=d,A=h.applyCustomTransformations(A,n,r,t,h.transformationType),c instanceof Map?c.set(s,A):c[s]=A);else{var w=h.transformationType===j.PLAIN_TO_CLASS?s:r,A=void 0;h.transformationType===j.CLASS_TO_PLAIN?(A=t[w],A=h.applyCustomTransformations(A,n,w,t,h.transformationType),A=t[w]===A?d:A,A=h.transform(_,A,f,b,p,o+1)):void 0===d&&h.options.exposeDefaultValues?A=c[s]:(A=h.transform(_,d,f,b,p,o+1),A=h.applyCustomTransformations(A,n,w,t,h.transformationType)),c instanceof Map?c.set(s,A):c[s]=A}},h=this,d=0,f=l;d<f.length;d++)u(f[d]);return this.options.enableCircularCheck&&this.recursionStack.delete(t),c}return t}return null==t?t:Boolean(t)}return null==t?t:Number(t)}return null==t?t:String(t)},e.prototype.applyCustomTransformations=function(e,t,n,r,i){var o=this,a=$.findTransformMetadatas(t,n,this.transformationType);return void 0!==this.options.version&&(a=a.filter((function(e){return!e.options||o.checkVersion(e.options.since,e.options.until)}))),(a=this.options.groups&&this.options.groups.length?a.filter((function(e){return!e.options||o.checkGroups(e.options.groups)})):a.filter((function(e){return!e.options||!e.options.groups||!e.options.groups.length}))).forEach((function(t){e=t.transformFn({value:e,key:n,obj:r,type:i})})),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var n=$.findTypeMetadata(e,t);return n?n.reflectedType:void 0}},e.prototype.getKeys=function(e,t,n){var r=this,i=$.getStrategy(e);"none"===i&&(i=this.options.strategy||"exposeAll");var o=[];if(("exposeAll"===i||n)&&(o=t instanceof Map?Array.from(t.keys()):Object.keys(t)),n)return o;if(!this.options.ignoreDecorators&&e){var a=$.getExposedProperties(e,this.transformationType);this.transformationType===j.PLAIN_TO_CLASS&&(a=a.map((function(t){var n=$.findExposeMetadata(e,t);return n&&n.options&&n.options.name?n.options.name:t}))),o=this.options.excludeExtraneousValues?a:o.concat(a);var s=$.getExcludedProperties(e,this.transformationType);s.length>0&&(o=o.filter((function(e){return!s.includes(e)}))),void 0!==this.options.version&&(o=o.filter((function(t){var n=$.findExposeMetadata(e,t);return!n||!n.options||r.checkVersion(n.options.since,n.options.until)}))),o=this.options.groups&&this.options.groups.length?o.filter((function(t){var n=$.findExposeMetadata(e,t);return!n||!n.options||r.checkGroups(n.options.groups)})):o.filter((function(t){var n=$.findExposeMetadata(e,t);return!(n&&n.options&&n.options.groups&&n.options.groups.length)}))}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(o=o.filter((function(e){return r.options.excludePrefixes.every((function(t){return e.substr(0,t.length)!==t}))}))),o.filter((function(e,t,n){return n.indexOf(e)===t}))},e.prototype.checkVersion=function(e,t){var n=!0;return n&&e&&(n=this.options.version>=e),n&&t&&(n=this.options.version<t),n},e.prototype.checkGroups=function(e){return!e||this.options.groups.some((function(t){return e.includes(t)}))},e}(),Ir=function(){function e(){}return e.prototype.classToPlain=function(e,t){return new Dr(j.CLASS_TO_PLAIN,t||{}).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,n){return new Dr(j.CLASS_TO_PLAIN,n||{}).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToClass=function(e,t,n){return new Dr(j.PLAIN_TO_CLASS,n||{}).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,n){return new Dr(j.PLAIN_TO_CLASS,n||{}).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.classToClass=function(e,t){return new Dr(j.CLASS_TO_CLASS,t||{}).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,n){return new Dr(j.CLASS_TO_CLASS,n||{}).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.classToPlain(e,t))},e.prototype.deserialize=function(e,t,n){var r=JSON.parse(t);return this.plainToClass(e,r,n)},e.prototype.deserializeArray=function(e,t,n){var r=JSON.parse(t);return this.plainToClass(e,r,n)},e}(),Rr=new Ir;function Pr(e,t,n){return Rr.plainToClass(e,t,n)}var Nr=__webpack_require__(31859),zr=__webpack_require__.n(Nr),Fr=__webpack_require__(23807);function Br(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const jr=e=>!0,Ur=e=>e.attributes||{},Vr=e=>{const t=ye(e);return Pr(Wn,{content:t,refId:zr()(e),...Ur(e)})},qr=(e,t)=>n=>{const r=ye(n);return Pr(er,{content:r,refId:zr()(n),count:e,caption:t,...Ur(n)})},Hr=(e,t)=>n=>{const r=ye(n);return Pr(cr,{code:r,refId:zr()(n),...Ur(n),count:e,caption:t})},$r=e=>{const t=ye(e);return Pr(qt,{html:t,refId:zr()(e),...Ur(e)})},Wr=e=>Pr(on,{refId:zr()(e),...Ur(e)}),Gr=e=>{const t=ye(e);return Pr(ir,{html:t,refId:zr()(e),...Ur(e)})},Yr=e=>Pr(ur,{refId:zr()(e),...Ur(e)});class Xr{constructor(){Br(this,"counts",void 0),Br(this,"deserialize",(e=>{const t=Ur(e),n=[];return e.elements&&e.elements.forEach((e=>{n.push({label:Ur(e).label,children:this.deserializePage(e)})})),{width:t.width,layout:t.layout,children:n}})),Br(this,"deserializePage",(e=>(e.elements&&(e.elements.length>1||"Group"!==e.elements[0].name)&&(e.elements=[{name:"Group",type:"element",attributes:{columns:"1"},elements:e.elements}]),this.deserializeChildren(e)))),Br(this,"deserializeGroup",(e=>{const t=Ur(e);return{children:this.deserializeChildren(e),columns:+t.columns,label:t.label,name:"Group"}})),Br(this,"deserializeToggle",(e=>{const t=Ur(e);return{children:this.deserializeChildren(e),label:t.label,name:"Toggle"}})),Br(this,"deserializeSelect",(e=>{const t=Ur(e);return{children:this.deserializeChildren(e),type:t.type,label:t.label,name:"Select"}})),Br(this,"deserializeBlock",(e=>{const t=this.updateFigureCount(e.name),n=Ur(e).caption,r=e=>r=>{return i=new e(ti),o={refId:"Plot"===r.name?Fr.Z():zr()(r),...Ur(r),count:t,caption:n},Rr.plainToClassFromExist(i,o,undefined);var i,o},i=[{test:gr,factory:Vr},{test:mr,factory:qr(t,n)},{test:vr,factory:Wr},{test:br,factory:Gr},{test:_r,factory:Hr(t,n)},{test:xr,factory:$r},{test:wr,factory:Yr},{test:yr,factory:r(vt)},{test:kr,factory:r(ct)},{test:Ar,factory:r(rt)},{test:Or,factory:r(bt)},{test:Tr,factory:r(tt)},{test:Sr,factory:r(Pe)},{test:Er,factory:r(ze)},{test:Mr,factory:r(kt)},{test:Lr,factory:r(gt)},{test:Cr,factory:r(xt)},{test:jr,factory:r(dt)}],{factory:o}=i.find((t=>t.test(e)));return o(e)})),this.counts={tables:0,plots:0,formulas:0,codeBlocks:0}}updateFigureCount(e){let t=0;return"Plot"===e?t=++this.counts.plots:["Table","DataTable"].includes(e)?t=++this.counts.tables:"Formula"===e?t=++this.counts.formulas:"Code"===e&&(t=++this.counts.codeBlocks),t}deserializeChildren(e){const t=[];return e.elements&&e.elements.forEach((e=>{"Group"===e.name?t.push(this.deserializeGroup(e)):"Select"===e.name?t.push(this.deserializeSelect(e)):"Toggle"===e.name?t.push(this.deserializeToggle(e)):t.push(this.deserializeBlock(e))})),t}}var Zr,Kr;function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Qr=(Zr=class{constructor(){!function(e,t,n,r){n&&Object.defineProperty(e,"userObject",{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}(this,0,Kr,this),Jr(this,"isLightProse",void 0),Jr(this,"singleBlockEmbed",void 0),Jr(this,"url",void 0),Jr(this,"isOrg",void 0)}load(e,t,n,r,i,o){const a=this.xmlToJson(e);return o&&(a.width=o),this.userObject=new I(ti,a),this.url=n,this.isOrg=r,this.isLightProse=i,this.setEmbedOptions(a.children,t),this.userObject}setEmbedOptions(e,t){const n=e=>fr(e)&&1===e.children.length?n(e.children[0]):!fr(e);this.singleBlockEmbed="EMBED"===t&&1===e.length&&1===e[0].children.length&&n(e[0].children[0]),this.singleBlockEmbed&&(document.body.style.overflow="hidden")}xmlToJson(e){const t=dr().xml2js(e,{compact:!1}),n=ve(t,"Report");return(new Xr).deserialize(ve(n,"Pages"))}},Kr=function(e,t,n,r,i){var o={};return Object.keys(r).forEach((function(e){o[e]=r[e]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),void 0===(o=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),o)).initializer&&(Object.defineProperty(e,t,o),o=null),o}(Zr.prototype,"userObject",[L.LO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zr);function ei(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ti=new class{constructor(){ei(this,"reportStore",void 0),ei(this,"imports",void 0),this.reportStore=new Qr}};function ni(...e){return e.filter(Boolean).join(" ")}const ri=e=>t.createElement(t.Fragment,null,t.createElement("select",{id:"tabs",name:"tabs",className:"flex-initial block w-full focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 rounded-md",onChange:t=>e.setPageNumber(+t.target.value),"data-cy":"pages-tabs"},e.labels.map(((e,n)=>t.createElement("option",{key:n,value:n},e))))),ii=e=>t.createElement(t.Fragment,null,t.createElement("div",{className:"border-b border-gray-200"},t.createElement("nav",{className:"-mb-px flex justify-items-stretch","aria-label":"Tabs"},e.labels.map(((n,r)=>t.createElement("a",{role:"button",key:r,onClick:()=>e.setPageNumber(r),"data-cy":`page-${r}`,className:"flex-1 p-2 text-center border-b-2 font-medium text-sm "+(r===e.pageNumber?"text-dp-accent border-dp-accent":"border-transparent text-dp-light-gray hover:text-dp-dark-gray hover:border-gray-300")},n)))))),oi=e=>t.createElement("nav",{className:"min-h-screen space-y-1 flex-fixed p-4 pl-0","aria-label":"Sidebar"},e.labels.map(((n,r)=>t.createElement("a",{key:r,onClick:()=>e.setPageNumber(r),"data-cy":`page-${r}`,className:ni(r===e.pageNumber?"text-dp-accent bg-dp-accent-light":"text-dp-light-gray hover:text-dp-dark-gray hover:border-gray-300","flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer"),"aria-current":r===e.pageNumber?"page":void 0},t.createElement("span",null,n))))),ai=e=>{const n=()=>{document.body.scrollTop=document.documentElement.scrollTop=0;const e=document.getElementById("base-content");e&&(e.scrollTop=0)},r=t=>{e.setPageNumber(t),n()};return e.numPages>1?t.createElement("nav",{className:"flex-initial border-t h-12 border-gray-200 px-4 flex items-center justify-between sm:px-0 mt-4"},t.createElement("div",{className:"-mt-px h-12 w-0 flex-1 flex"},t.createElement("a",{onClick:()=>{0!==e.pageNumber&&r(e.pageNumber-1)},className:(0===e.pageNumber?"cursor-default opacity-40":"cursor-pointer hover:text-dp-dark-gray hover:border-gray-300")+" border-t-2 h-12 border-transparent pl-2 pr-1 inline-flex items-center text-sm font-medium text-dp-light-gray"},t.createElement("svg",{className:"mr-3 h-5 w-5 text-dp-light-gray",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},t.createElement("path",{fillRule:"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"})),t.createElement("div",null,"Previous"))),t.createElement("div",{className:"hidden md:-mt-px md:flex text-sm text-dp-light-gray cursor-pointer",onClick:n},"Back to Top"),t.createElement("div",{className:"-mt-px h-12 w-0 flex-1 flex justify-end items-center"},t.createElement("a",{onClick:()=>{e.pageNumber!==e.numPages-1&&r(e.pageNumber+1)},className:(e.pageNumber===e.numPages-1?"cursor-default opacity-40":"cursor-pointer hover:text-dp-dark-gray hover:border-gray-300")+" border-t-2 h-12 border-transparent pr-2 pl-1 inline-flex items-center text-sm font-medium text-dp-light-gray"},t.createElement("div",null,"Next"),t.createElement("svg",{className:"ml-3 h-5 w-5 text-dp-light-gray",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},t.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))))):null},si=(0,O.Pi)((e=>{const n=(0,t.useContext)(O.yX),[r,i]=(0,t.useState)(0),{singleBlockEmbed:o,userObject:a}=n.store.reportStore,s=(0,t.useMemo)((()=>e.pages.map(((e,t)=>((e,t)=>e||`Page ${t}`)(e.label,t+1)))),[e.pages]);return a?t.createElement("div",{className:"w-full flex justify-start"},t.createElement("div",{className:"flex flex-col flex-auto w-full"},s.length>1&&t.createElement("div",{className:"sm:hidden p-2"},t.createElement(ri,{labels:s,pageNumber:r,setPageNumber:i})),s.length>1&&"top"===a.pageLayout?t.createElement("div",{className:"hidden sm:block w-full mb-6"},t.createElement(ii,{labels:s,pageNumber:r,setPageNumber:i})):null,t.createElement("div",{className:"w-full flex justify-center flex-auto"},t.createElement("div",{className:`${(e=>{if(o)return"";switch(e){case"medium":return"max-w-screen-xl";case"narrow":return"max-w-3xl";case"full":return"max-w-full"}})(e.width)} w-full`},t.createElement("div",{className:"sm:flex block"},s.length>1&&"side"===a.pageLayout?t.createElement("div",{className:"hidden sm:block w-1/6 bg-gray-100 px-4"},t.createElement(oi,{labels:s,pageNumber:r,setPageNumber:i})):null,t.createElement("div",{className:"flex-1 flex flex-col"},t.createElement("div",{className:`flex-grow ${!o&&"px-4"}`},e.pages[r].children.map(((e,n)=>t.createElement(Ni,{key:Ri(e,n),tree:e})))),t.createElement(ai,{pageNumber:r,setPageNumber:i,numPages:e.pages.length}))))))):null}));function li(){return li=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},li.apply(this,arguments)}function ci(e){const t=[];return e.forEach(((e,n)=>{if("groupId"in e){const r=li({},e),i=t.findIndex((e=>"groupId"in e&&e.groupId===r.groupId));r.index=n,i>-1?t[i].items.push(r):t.push({items:[r],groupId:e.groupId,type:"group",name:e.groupName})}else t.push(e)})),t}function ui(e){return e?Array.isArray(e)?[...e]:[e]:[]}function hi(e){return null!==e&&"object"==typeof e&&"value"in e&&"name"in e}function di(e,t){if(hi(e))return e;let n=e;if(null===n&&t.length){let e=0,r=t[0];for(;r&&r.disabled;)t.length<e&&(r=!1),e+=1,r=t[e];r&&(n=r.value)}return t.find((e=>e.value==n))}function fi(e,t,n,r){if(!r){return di(e,n)||t}const i=ui(t),o=ui(e).map((e=>di(e,n))).filter((e=>null!=e));return i.length?o.length?(o.forEach((e=>{const t=i.findIndex((t=>t.value==e.value));t>=0?i.splice(t,1):i.push(e)})),i):i:o}function pi(e){return Array.isArray(e)?e.map((e=>hi(e)&&e.name)).join(", "):hi(e)?e.name:""}function gi(){return gi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gi.apply(this,arguments)}function mi(e){return e.map(((e,t)=>{if("group"===e.type){const n=`${e.name.replace(/\s+/g,"-").toLowerCase()}-${t}`;return e.items.map((t=>gi({},t,{groupId:n,groupName:e.name})))}return gi({},e,{index:t})})).flat()}function vi(e,n,{debounceTime:r,filterOptions:i,getOptions:o}){const[a,s]=(0,t.useState)(!1),[l,c]=(0,t.useState)((()=>mi(n))),u=(0,t.useMemo)((()=>{const e=i||(e=>()=>e);return o?function(t,r){let i;return(...t)=>{clearTimeout(i),i=setTimeout((()=>{i=null,(t=>{const r=o(t,n);s(!0),Promise.resolve(r).then((n=>{c(mi(e(n)(t)))})).finally((()=>s(!1)))})(...t)}),r)}}(0,r):t=>c(mi(e(n)(t)))}),[i,n,o,r]);return(0,t.useEffect)((()=>c(n)),[n]),(0,t.useEffect)((()=>u(e)),[u,e]),{options:l,setOptions:c,fetching:a}}function yi(e){return e&&hi(e)?e.value:null}function bi(e){return Array.isArray(e)?e.map((e=>yi(e))).filter((e=>null!==e)):yi(e)}function _i(e,{key:t,options:n}){const r=n.length-1;let i="ArrowDown"===t?e+1:e-1;i<0?i=r:i>r&&(i=0);const o=n[i];return o&&o.disabled?_i(i,{key:t,options:n}):i}function xi(){return xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xi.apply(this,arguments)}function wi(){return wi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wi.apply(this,arguments)}const Ai=e=>t=>t.length?e.filter((e=>`${e.value}`.toLowerCase().includes(t.toLowerCase()))):e,ki=e=>t.createElement("div",{className:"relative rounded-md shadow-sm"},t.createElement("input",wi({},e.valueProps,{type:"text",className:"focus:ring-dp-accent focus:border-dp-accent block w-full pr-10 sm:text-sm border-gray-300 rounded-md",value:e.snapshot.focus?e.snapshot.search:e.snapshot.displayValue})),t.createElement("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none cursor-pointer"},t.createElement("svg",{className:"h-5 w-5 text-gray-400",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},t.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})))),Ti=e=>{const n=e.snapshot.option.value===e.option.value;return t.createElement("li",{className:"cursor-default select-none",id:"listbox-option-0",role:"option"},t.createElement("button",wi({},e.optionProps,{value:e.option.value,className:"text-gray-900 hover:text-dp-accent-text hover:bg-dp-accent bg-transparent border-0 whitespace-normal relative py-2 pl-8 pr-4 w-full"}),t.createElement("span",{className:(n?"font-semibold":"font-normal")+" text-left block pointer-events-none"},e.option.value),n&&t.createElement("span",{className:"absolute inset-y-0 left-0 flex items-center pl-1.5 pointer-events-none"},t.createElement("svg",{className:"h-5 w-5",xmlns:"path_to_url",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},t.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})))))},Si=e=>{const[n,r,i]=function({value:e=null,options:n=[],search:r=!1,multiple:i=!1,disabled:o=!1,closeOnSelect:a=!0,getOptions:s=null,filterOptions:l=null,onChange:c=(()=>{}),onFocus:u=(()=>{}),onBlur:h=(()=>{}),debounce:d=0}){const f=(0,t.useRef)(null),[p,g]=(0,t.useState)(null),[m,v]=(0,t.useState)(""),[y,b]=(0,t.useState)(!1),{options:_,fetching:x}=vi(m,n,{getOptions:s,filterOptions:l,debounceTime:d}),w=(0,t.useCallback)((e=>{const t=fi(e,p,Array.isArray(p)?[...p,..._]:_,i);g(t),c(bi(t),t),a&&f.current.blur()}),[a,i,c,p,_]),[A,k]=function(e,n,r,i){const[o,a]=(0,t.useReducer)(_i,-1),s=(0,t.useCallback)((e=>{const{key:t}=e;["ArrowDown","ArrowUp"].includes(t)&&(e.preventDefault(),a({key:t,options:n}))}),[n]),l=(0,t.useCallback)((e=>{if("Enter"===e.key){e.preventDefault();const t=n[o];t&&r(t.value)}}),[n,o,r]),c=(0,t.useCallback)((e=>{"Escape"===e.key&&(e.preventDefault(),i.current.blur())}),[i]);return[o,{onKeyPress:l,onKeyDown:s,onKeyUp:c}]}(0,_,w,f),T=(0,t.useMemo)((()=>({options:ci(_),option:p,displayValue:pi(p),value:bi(p),search:m,fetching:x,focus:y,highlighted:A,disabled:o})),[o,x,y,A,m,p,_]),S=(0,t.useCallback)((e=>{e.preventDefault(),w(e.currentTarget.value)}),[w]),E=(0,t.useCallback)((e=>{b(!0),u(e)}),[u]),C=(0,t.useCallback)((e=>{b(!1),v(""),h(e)}),[h]),M=(0,t.useMemo)((()=>xi({tabIndex:"0",readOnly:!r},k,{onFocus:E,onBlur:C,onChange:r?({target:e})=>v(e.value):null,disabled:o,ref:f})),[r,k,E,C,o]),O=(0,t.useMemo)((()=>({tabIndex:"-1",onMouseDown:S})),[S]);return(0,t.useEffect)((()=>{g(fi(e,null,_,i))}),[e,i,_]),[T,M,O,g]}({options:e.options,value:e.value,search:!0,filterOptions:Ai,onChange:(t,n)=>e.setTabNumber(n.id)});return t.createElement("div",{className:"relative"},t.createElement(ki,{valueProps:r,snapshot:n}),n.focus&&t.createElement("ul",{className:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",tabIndex:-1,role:"listbox","aria-labelledby":"listbox-label","aria-activedescendant":"listbox-option-3"},n.options.map(((e,r)=>t.createElement(Ti,{key:r,optionProps:i,snapshot:n,option:e})))))},Ei=e=>{const n=(0,t.useMemo)((()=>e.labels.map(((e,t)=>({name:e,value:e,index:t,id:t})))),[e.labels]);return t.createElement(Si,{options:n,value:`${n[0].value}`,setTabNumber:e.setTabNumber})},Ci=e=>{const[n,r]=(0,t.useState)(0),i=e.select.children.map(((e,t)=>e.label||`Section ${t+1}`)),o=(()=>{const{type:t,children:n}=e.select;return t||(n.length<5?"tabs":"dropdown")})();return t.createElement("div",{className:"w-full","data-cy":"section-tabs"},t.createElement("div",{className:("tabs"===o?"sm:hidden":"")+" w-full mb-2"},e.select.children.length<10?t.createElement("select",{id:"tabs",name:"tabs",className:"block mb-1 w-auto focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 rounded-md",onChange:e=>r(+e.target.value),value:n},i.map(((e,n)=>t.createElement("option",{key:n,value:n},e)))):t.createElement(Ei,{labels:i,setTabNumber:r})),t.createElement("div",{className:"hidden "+("tabs"===o?"sm:block":"")},t.createElement("nav",{className:"flex space-x-4 mb-2"},e.select.children.map(((e,o)=>t.createElement("a",{role:"button",key:o,"data-cy":`tab-${o}`,className:"px-3 py-2 font-medium text-sm rounded-md "+(n===o?"text-dp-accent bg-dp-accent-light":"text-dp-light-gray hover:text-dp-dark-gray"),onClick:()=>r(o)},i[o]))))),t.createElement("div",null,t.createElement(Ni,{tree:e.select.children[n]})))};var Mi=__webpack_require__(77705);const Oi=e=>t.createElement("div",{className:`${!e.isOpen&&"hidden"}`},e.children),Li=e=>{const[n,r]=(0,t.useState)(!0);return t.createElement("div",{className:"w-full bg-gray-100 p-2 rounded-md "+(n?"":"max-h-16"),"data-cy":"section-toggle"},t.createElement("div",{className:"cursor-pointer px-2 w-full font-semibold flex items-center justify-start",onClick:()=>r(!n)},t.createElement("div",{className:"flex-1"},e.toggle.label||"Toggle Section"),t.createElement("div",{className:"flex-initial ml-auto"},t.createElement("i",{className:"opacity-50 fa fa-"+(n?"chevron-up":"chevron-down")}))),t.createElement(Oi,{isOpen:n},t.createElement("div",{className:"w-full pt-2"},e.toggle.children.map(((e,n)=>t.createElement(Ni,{key:n,tree:e}))))))},Di=(0,O.Pi)((e=>{const[n,r]=(0,t.useState)({Component:null,props:null});(0,t.useEffect)((()=>{e.block.getComponent().then((t=>r({Component:t,props:e.block.getComponentProps()})))}),[e.block]);const{Component:i,props:o}=n;return i?t.createElement(i,o):null}));function Ii(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ri=(e,t)=>e.refId?`${e.refId}-${t}`:`${e.name}-${t}`,Pi=e=>{const n=(0,t.useContext)(O.yX),{singleBlockEmbed:r}=n.store.reportStore;return t.createElement("div",{className:`w-full relative flex flex-col justify-center items-center overflow-x-auto\n ${r?"h-iframe":"p-1 h-full"}\n `},e.block.src?t.createElement(Di,{block:e.block}):e.block.renderView(),e.block.caption&&t.createElement("div",{className:"text-sm text-dp-light-gray italic text-justify"},t.createElement("b",null,e.block.captionType," ",e.block.count)," ",e.block.caption))},Ni=e=>{if(fr(e.tree)){const{columns:i}=e.tree,o={...(n={gridTemplateColumns:`repeat(${i}, minmax(0, 1fr))`},r=i,r>0?n:{})};return t.createElement("div",{className:"sm:grid sm:gap-4 py-4 "+(i?"":"grid-flow-col grid-cols-fit"),style:o},e.tree.children.map(((e,n)=>t.createElement(Ni,{key:Ri(e,n),tree:e}))))}return(e=>"Select"===e.name)(e.tree)?t.createElement(Ci,{select:e.tree}):(e=>"Toggle"===e.name)(e.tree)?t.createElement(Li,{toggle:e.tree}):t.createElement(Pi,{block:e.tree});var n,r};class zi extends t.Component{constructor(...e){super(...e),Ii(this,"context",void 0)}render(){const{reportStore:e}=this.context.store,n=e.userObject,r=this.props,{reportStore:{singleBlockEmbed:i,isOrg:o}}=this.context.store,a=r.embedded&&!i,s=o?"pb-10":"pb-6";return n?t.createElement("div",{className:`flex flex-col justify-end bg-dp-background ${a?s:""}`},t.createElement(si,{pages:n.pages.children,width:n.pages.width})):t.createElement(Mi.T,null)}}Ii(zi,"contextType",O.yX);class Fi extends t.Component{render(){const{viewMode:e}=this.props;return t.createElement("div",{className:"max-w-full h-full bg-dp-background",id:"app-container","data-cy":"report-component"},t.createElement(zi,{embedded:"EMBED"===e}))}}var Bi,ji,Ui;Ui={blockIds:void 0},(ji="defaultProps")in(Bi=Fi)?Object.defineProperty(Bi,ji,{value:Ui,enumerable:!0,configurable:!0,writable:!0}):Bi[ji]=Ui;var Vi=__webpack_require__(97015),qi=__webpack_require__.n(Vi);const Hi=(0,O.Pi)((e=>{const[n,r]=(0,t.useState)(null),i=(0,t.useContext)(O.yX),{reportStore:o}=i.store,a=(0,t.useCallback)((t=>{r(t),null!==t&&(e=>{const t=e?"rgb(209, 213, 219)":"rgb(107, 114, 128)",n=e?"rgb(107, 114, 128)":"rgb(55, 65, 81)",r=getComputedStyle(document.body).getPropertyValue("--dp-accent-color").trim().replace(/["']/g,""),i=document.documentElement;try{const e=qi()(r);i.style.setProperty("--dp-accent-secondary-color",e.alpha(.14).hex()),i.style.setProperty("--dp-accent-text",e.get("lab.l")<70?"white":"black"),i.style.setProperty("--dp-light-gray",t),i.style.setProperty("--dp-dark-gray",n)}catch(e){console.error("An error occurred while setting a theme property",e)}})(e.isLightProse)}),[]);return(0,t.useEffect)((()=>{o.load(e.report,e.mode,e.url,e.isOrg,e.isLightProse,e.reportWidth)}),[o,e.report,e.mode,e.url,e.reportWidth,e.isOrg]),t.createElement(t.Fragment,null,!o.singleBlockEmbed&&t.createElement("div",{dangerouslySetInnerHTML:{__html:e.htmlHeader},ref:a}),o.userObject?t.createElement(Fi,{isOwner:e.isOwner,viewMode:e.mode}):t.createElement("div",null,"Loading..."))}));function $i(e){return $i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(e)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yi(e,t,n){return t&&Gi(e.prototype,t),n&&Gi(e,n),e}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zi(Object(n),!0).forEach((function(t){Xi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ji(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eo(e,t)}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qi(e)}function eo(e,t){return eo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},eo(e,t)}function to(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function no(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qi(e);if(t){var i=Qi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return to(this,n)}}function ro(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||io(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function io(e,t){if(e){if("string"==typeof e)return oo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oo(e,t):void 0}}function oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ao(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=io(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var so=String.fromCharCode,lo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",uo={};function ho(e,t){if(!uo[e]){uo[e]={};for(var n=0;n<e.length;n++)uo[e][e.charAt(n)]=n}return uo[e][t]}var fo={compressToBase64:function(e){if(null==e)return"";var t=fo._compress(e,6,(function(e){return lo.charAt(e)}));switch(t.length%4){default:case 0:return t;case 1:return t+"===";case 2:return t+"==";case 3:return t+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:fo._decompress(e.length,32,(function(t){return ho(lo,e.charAt(t))}))},compressToUTF16:function(e){return null==e?"":fo._compress(e,15,(function(e){return so(e+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:fo._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=fo.compress(e),n=new Uint8Array(2*t.length),r=0,i=t.length;r<i;r++){var o=t.charCodeAt(r);n[2*r]=o>>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return fo.decompress(e);for(var t=new Array(e.length/2),n=0,r=t.length;n<r;n++)t[n]=256*e[2*n]+e[2*n+1];var i=[];return t.forEach((function(e){i.push(so(e))})),fo.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":fo._compress(e,6,(function(e){return co.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),fo._decompress(e.length,32,(function(t){return ho(co,e.charAt(t))})))},compress:function(e){return fo._compress(e,16,(function(e){return so(e)}))},_compress:function(e,t,n){if(null==e)return"";var r,i,o,a={},s={},l="",c="",u="",h=2,d=3,f=2,p=[],g=0,m=0;for(o=0;o<e.length;o+=1)if(l=e.charAt(o),Object.prototype.hasOwnProperty.call(a,l)||(a[l]=d++,s[l]=!0),c=u+l,Object.prototype.hasOwnProperty.call(a,c))u=c;else{if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(r=0;r<f;r++)g<<=1,m==t-1?(m=0,p.push(n(g)),g=0):m++;for(i=u.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1}else{for(i=1,r=0;r<f;r++)g=g<<1|i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i=0;for(i=u.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1}0==--h&&(h=Math.pow(2,f),f++),delete s[u]}else for(i=a[u],r=0;r<f;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1;0==--h&&(h=Math.pow(2,f),f++),a[c]=d++,u=String(l)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(r=0;r<f;r++)g<<=1,m==t-1?(m=0,p.push(n(g)),g=0):m++;for(i=u.charCodeAt(0),r=0;r<8;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1}else{for(i=1,r=0;r<f;r++)g=g<<1|i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i=0;for(i=u.charCodeAt(0),r=0;r<16;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1}0==--h&&(h=Math.pow(2,f),f++),delete s[u]}else for(i=a[u],r=0;r<f;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1;0==--h&&(h=Math.pow(2,f),f++)}for(i=2,r=0;r<f;r++)g=g<<1|1&i,m==t-1?(m=0,p.push(n(g)),g=0):m++,i>>=1;for(;;){if(g<<=1,m==t-1){p.push(n(g));break}m++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:fo._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(e,t,n){var r,i,o,a,s,l,c,u=[],h=4,d=4,f=3,p="",g=[],m={val:n(0),position:t,index:1};for(r=0;r<3;r+=1)u[r]=r;for(o=0,s=Math.pow(2,2),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;switch(o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;c=so(o);break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;c=so(o);break;case 2:return""}for(u[3]=c,i=c,g.push(c);;){if(m.index>e)return"";for(o=0,s=Math.pow(2,f),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;switch(c=o){case 0:for(o=0,s=Math.pow(2,8),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;u[d++]=so(o),c=d-1,h--;break;case 1:for(o=0,s=Math.pow(2,16),l=1;l!=s;)a=m.val&m.position,m.position>>=1,0==m.position&&(m.position=t,m.val=n(m.index++)),o|=(a>0?1:0)*l,l<<=1;u[d++]=so(o),c=d-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,f),f++),u[c])p=u[c];else{if(c!==d)return null;p=i+i.charAt(0)}g.push(p),u[d++]=i+p.charAt(0),i=p,0==--h&&(h=Math.pow(2,f),f++)}}},po={DEBUG:!1,LIB_VERSION:"1.17.8"},go=Array.prototype,mo=Function.prototype,vo=Object.prototype,yo=go.slice,bo=vo.toString,_o=vo.hasOwnProperty,xo="undefined"!=typeof window?window:{},wo=xo.navigator||{userAgent:""},Ao=xo.document||{},ko=wo.userAgent,To=mo.bind,So=go.forEach,Eo=go.indexOf,Co=Array.isArray,Mo={},Oo={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},Lo=function(){if(po.DEBUG&&!Oo.isUndefined(window.console)&&window.console)try{window.console.log.apply(window.console,arguments)}catch(e){Oo.each(arguments,(function(e){window.console.log(e)}))}},Do=function(){if(po.DEBUG&&!Oo.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments));try{window.console.error.apply(window.console,e)}catch(t){Oo.each(e,(function(e){window.console.error(e)}))}}},Io=function(){if(!Oo.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments));try{window.console.error.apply(window.console,e)}catch(t){Oo.each(e,(function(e){window.console.error(e)}))}}};Oo.bind=function(e,t){var n,r;if(To&&e.bind===To)return To.apply(e,yo.call(arguments,1));if(!Oo.isFunction(e))throw new TypeError;return n=yo.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(yo.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,n.concat(yo.call(arguments)));return Object(a)===a?a:o},r},Oo.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=Oo.bind(e[t],e))},Oo.each=function(e,t,n){if(null!=e)if(So&&e.forEach===So)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===Mo)return}else for(var o in e)if(_o.call(e,o)&&t.call(n,e[o],o,e)===Mo)return},Oo.extend=function(e){return Oo.each(yo.call(arguments,1),(function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])})),e},Oo.isArray=Co||function(e){return"[object Array]"===bo.call(e)},Oo.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},Oo.include=function(e,t){var n=!1;return null===e?n:Eo&&e.indexOf===Eo?-1!=e.indexOf(t):(Oo.each(e,(function(e){if(n||(n=e===t))return Mo})),n)},Oo.includes=function(e,t){return-1!==e.indexOf(t)},Oo.isObject=function(e){return e===Object(e)&&!Oo.isArray(e)},Oo.isEmptyObject=function(e){if(Oo.isObject(e)){for(var t in e)if(_o.call(e,t))return!1;return!0}return!1},Oo.isUndefined=function(e){return void 0===e},Oo.isString=function(e){return"[object String]"==bo.call(e)},Oo.isDate=function(e){return"[object Date]"==bo.call(e)},Oo.isNumber=function(e){return"[object Number]"==bo.call(e)},Oo.encodeDates=function(e){return Oo.each(e,(function(t,n){Oo.isDate(t)?e[n]=Oo.formatDate(t):Oo.isObject(t)&&(e[n]=Oo.encodeDates(t))})),e},Oo.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Oo.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},Oo.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){Io("Implementation error. Please turn on debug and contact support@posthog.com."),po.DEBUG&&Io(e)}}},Oo.safewrap_class=function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=Oo.safewrap(e.prototype[t[n]])},Oo.safewrap_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=Oo.safewrap(e[t]))},Oo.strip_empty_properties=function(e){var t={};return Oo.each(e,(function(e,n){Oo.isString(e)&&e.length>0&&(t[n]=e)})),t};var Ro="undefined"!=typeof Symbol?Symbol("__deepCircularCopyInProgress__"):"__deepCircularCopyInProgress__";function Po(e,t,n){return e!==Object(e)?t?t(e,n):e:e[Ro]?void 0:(e[Ro]=!0,Oo.isArray(e)?(r=[],Oo.each(e,(function(e){r.push(Po(e,t))}))):(r={},Oo.each(e,(function(e,n){n!==Ro&&(r[n]=Po(e,t,n))}))),delete e[Ro],r);var r}var No,zo=["$performance_raw"];function Fo(e){switch($i(e.className)){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function Bo(e){var t="";return Ho(e)&&!$o(e)&&e.childNodes&&e.childNodes.length&&Oo.each(e.childNodes,(function(e){Vo(e)&&e.textContent&&(t+=Oo.trim(e.textContent).split(/(\s+)/).filter(Wo).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))})),Oo.trim(t)}function jo(e){return e&&1===e.nodeType}function Uo(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Vo(e){return e&&3===e.nodeType}Oo.copyAndTruncateStrings=function(e,t){return Po(e,(function(e,n){return n&&zo.indexOf(n)>-1||"string"==typeof e&&null!==t&&(e=e.slice(0,t)),e}))},Oo.base64Encode=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,c="",u=[];if(!e)return e;e=Oo.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},Oo.utf8Encode=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},Oo.UUID=(No=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(window.screen.height*window.screen.width).toString(16);return No()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=ko,r=[],i=0;function o(e,t){var n,i=0;for(n=0;n<t.length;n++)i|=r[n]<<8*n;return e^i}for(e=0;e<n.length;e++)t=n.charCodeAt(e),r.unshift(255&t),r.length>=4&&(i=o(i,r),r=[]);return r.length>0&&(i=o(i,r)),i.toString(16)}()+"-"+e+"-"+No()}),Oo.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(e)},Oo.HTTPBuildQuery=function(e,t){var n,r,i=[];return Oo.isUndefined(t)&&(t="&"),Oo.each(e,(function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n})),i.join(t)},Oo.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(e){Do("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},Oo.getHashParam=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},Oo.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var a="on"+n,s=t[a];t[a]=function(t,n,r){return function(i){if(i=i||e(window.event)){var o,a,s=!0;return Oo.isFunction(r)&&(o=r(i)),a=n.call(t,i),!1!==o&&!1!==a||(s=!1),s}}}(t,r,s)}else Do("No valid element provided to register_event")}}(),Oo.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term gclid".split(" "),t="",n={};return Oo.each(e,(function(e){(t=Oo.getQueryParam(Ao.URL,e)).length&&(n[e]=t)})),n},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=Oo.info.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var i=Oo.getQueryParam(e,n);i.length&&(r.ph_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||Oo.includes(e," OPR/")?Oo.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":Oo.includes(e,"IEMobile")||Oo.includes(e,"WPDesktop")?"Internet Explorer Mobile":Oo.includes(e,"SamsungBrowser/")?"Samsung Internet":Oo.includes(e,"Edge")||Oo.includes(e,"Edg/")?"Microsoft Edge":Oo.includes(e,"FBIOS")?"Facebook Mobile":Oo.includes(e,"Chrome")?"Chrome":Oo.includes(e,"CriOS")?"Chrome iOS":Oo.includes(e,"UCWEB")||Oo.includes(e,"UCBrowser")?"UC Browser":Oo.includes(e,"FxiOS")?"Firefox iOS":Oo.includes(t,"Apple")?Oo.includes(e,"Mobile")?"Mobile Safari":"Safari":Oo.includes(e,"Android")?"Android Mobile":Oo.includes(e,"Konqueror")?"Konqueror":Oo.includes(e,"Firefox")?"Firefox":Oo.includes(e,"MSIE")||Oo.includes(e,"Trident/")?"Internet Explorer":Oo.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[Oo.info.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var e=ko;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return"iPad"===t||"Android Tablet"===t?"Tablet":t?"Mobile":"Desktop"},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return Oo.extend(Oo.strip_empty_properties({$os:Oo.info.os(),$browser:Oo.info.browser(ko,wo.vendor,window.opera),$device:Oo.info.device(ko),$device_type:Oo.info.deviceType(ko)}),{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$browser_version:Oo.info.browserVersion(ko,wo.vendor,window.opera),$screen_height:window.screen.height,$screen_width:window.screen.width,$viewport_height:window.innerHeight,$viewport_width:window.innerWidth,$lib:"web",$lib_version:po.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Oo.timestamp()/1e3})},people_properties:function(){return Oo.extend(Oo.strip_empty_properties({$os:Oo.info.os(),$browser:Oo.info.browser(ko,wo.vendor,window.opera)}),{$browser_version:Oo.info.browserVersion(ko,wo.vendor,window.opera)})}},Oo.isObject=Oo.isObject,Oo.isBlockedUA=Oo.isBlockedUA,Oo.isEmptyObject=Oo.isEmptyObject,Oo.info=Oo.info,Oo.info.device=Oo.info.device,Oo.info.browser=Oo.info.browser,Oo.info.browserVersion=Oo.info.browserVersion,Oo.info.properties=Oo.info.properties;var qo=["a","button","form","input","select","textarea","label"];function Ho(e){for(var t=e;t.parentNode&&!Uo(t,"body");t=t.parentNode){var n=Fo(t).split(" ");if(Oo.includes(n,"ph-sensitive")||Oo.includes(n,"ph-no-capture"))return!1}if(Oo.includes(Fo(e).split(" "),"ph-include"))return!0;var r=e.type||"";if("string"==typeof r)switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return"string"!=typeof i||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function $o(e){return!!(Uo(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Uo(e,"select")||Uo(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function Wo(e){if(null===e||Oo.isUndefined(e))return!1;if("string"==typeof e){if(e=Oo.trim(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function Go(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var r=document.getElementsByTagName("script");r.length>0?r[0].parentNode.insertBefore(n,r[0]):document.body.appendChild(n)}var Yo=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.get_config("rageclick");Wi(this,e),this.clicks=[],this.instance=t,this.enabled=n}return Yi(e,[{key:"click",value:function(e,t,n){if(this.enabled){var r=this.clicks[this.clicks.length-1];r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3?(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length&&this.instance.capture("$rageclick")):this.clicks=[{x:e,y:t,timestamp:n}]}}}]),e}(),Xo={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!jo(e));return e},_getPropertiesFromElement:function(e,t,n){var r=e.tagName.toLowerCase(),i={tag_name:r};qo.indexOf(r)>-1&&!n&&(i.$el_text=Bo(e));var o=Fo(e);o.length>0&&(i.classes=o.split(" ").filter((function(e){return""!==e}))),Oo.each(e.attributes,(function(n){var r;$o(e)&&-1===["name","id","class"].indexOf(n.name)||!t&&Wo(n.value)&&("string"!=typeof(r=n.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))&&(i["attr__"+n.name]=n.value)}));for(var a=1,s=1,l=e;l=this._previousElementSibling(l);)a++,l.tagName===e.tagName&&s++;return i.nth_child=a,i.nth_of_type=s,i},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return Oo.each(document.querySelectorAll(e.css_selector),(function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),Wo(n)&&t.push(n)})),t.join(", ")},_getCustomProperties:function(e){var t={};return Oo.each(this._customProperties,(function(n){Oo.each(n.event_selectors,(function(r){var i=document.querySelectorAll(r);Oo.each(i,(function(r){Oo.includes(e,r)&&Ho(r)&&(t[n.name]=this._extractCustomPropertyValue(n))}),this)}),this)}),this),t},_getEventTarget:function(e){return void 0===e.target?e.srcElement:e.target.shadowRoot?e.composedPath()[0]:e.target},_captureEvent:function(e,t){var n=this._getEventTarget(e);if(Vo(n)&&(n=n.parentNode),"click"===e.type&&this.rageclicks.click(e.clientX,e.clientY,(new Date).getTime()),function(e,t){if(!e||Uo(e,"html")||!jo(e))return!1;for(var n=!1,r=[e],i=!0,o=e;o.parentNode&&!Uo(o,"body");)if(11!==o.parentNode.nodeType){if(!(i=o.parentNode))break;if(qo.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{var a=window.getComputedStyle(i);a&&"pointer"===a.getPropertyValue("cursor")&&(n=!0)}r.push(i),o=i}else r.push(o.parentNode.host),o=o.parentNode.host;var s=window.getComputedStyle(e);if(s&&"pointer"===s.getPropertyValue("cursor")&&"click"===t.type)return!0;var l=e.tagName.toLowerCase();switch(l){case"html":return!1;case"form":return"submit"===t.type;case"input":case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return n?"click"===t.type:"click"===t.type&&(qo.indexOf(l)>-1||"true"===e.getAttribute("contenteditable"))}}(n,e)){for(var r=[n],i=n;i.parentNode&&!Uo(i,"body");)11!==i.parentNode.nodeType?(r.push(i.parentNode),i=i.parentNode):(r.push(i.parentNode.host),i=i.parentNode.host);var o,a=[],s=!1;if(Oo.each(r,(function(e){var n=Ho(e);"a"===e.tagName.toLowerCase()&&(o=e.getAttribute("href"),o=n&&Wo(o)&&o);var r=Fo(e).split(" ");Oo.includes(r,"ph-no-capture")&&(s=!0),a.push(this._getPropertiesFromElement(e,t.get_config("mask_all_element_attributes"),t.get_config("mask_all_text")))}),this),t.get_config("mask_all_text")||(a[0].$el_text=Bo(n)),o&&(a[0].attr__href=o),s)return!1;var l=Oo.extend(this._getDefaultProperties(e.type),{$elements:a},this._getCustomProperties(r));return t.capture("$autocapture",l),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=Oo.bind((function(t){t=t||window.event,this._captureEvent(t,e)}),this);Oo.register_event(document,"submit",t,!1,!0),Oo.register_event(document,"change",t,!1,!0),Oo.register_event(document,"click",t,!1,!0)},_customProperties:{},init:function(e){this.rageclicks=new Yo(e)},afterDecideResponse:function(e,t){var n=t.get_config("token");this._initializedTokens.indexOf(n)>-1?console.log('autocapture already initialized for token "'+n+'"'):(this._initializedTokens.push(n),e&&e.config&&!0===e.config.enable_collect_everything&&t.get_config("autocapture")?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture_enabled=!1)},enabledForProject:function(e,t,n){t=Oo.isUndefined(t)?10:t,n=Oo.isUndefined(n)?10:n;for(var r=0,i=0;i<e.length;i++)r+=e.charCodeAt(i);return r%t<n},isBrowserSupported:function(){return Oo.isFunction(document.querySelectorAll)}};Oo.bind_instance_methods(Xo),Oo.safewrap_instance_methods(Xo);var Zo=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,Ko={get:function(e){try{for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null},parse:function(e){var t;try{t=JSON.parse(Ko.get(e))||{}}catch(e){}return t},set:function(e,t,n,r,i){try{var o="",a="",s="";if(r){var l=document.location.hostname.match(Zo),c=l?l[0]:"";o=c?"; domain=."+c:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toGMTString()}i&&(s="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+a+"; path=/"+o+s;return document.cookie=h,h}catch(e){return}},remove:function(e,t){try{Ko.set(e,"",-1,t)}catch(e){return}}},Jo=null,Qo={is_supported:function(){if(null!==Jo)return Jo;var e=!0;if(window)try{var t="__mplssupport__";Qo.set(t,"xyz"),'"xyz"'!==Qo.get(t)&&(e=!1),Qo.remove(t)}catch(t){e=!1}else e=!1;return e||Do("localStorage unsupported; falling back to cookie store"),Jo=e,e},error:function(e){Do("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){Qo.error(e)}return null},parse:function(e){try{return JSON.parse(Qo.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(e){Qo.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){Qo.error(e)}}},ea=Ki(Ki({},Qo),{},{parse:function(e){try{var t={};try{(t=Ko.parse(e)||{}).distinct_id&&Ko.set(e,{distinct_id:t.distinct_id})}catch(e){}var n=Oo.extend(t,JSON.parse(Qo.get(e)||"{}"));return Qo.set(e,n),n}catch(e){}return null},set:function(e,t){try{Qo.set(e,t),t.distinct_id&&Ko.set(e,{distinct_id:t.distinct_id})}catch(e){Qo.error(e)}},remove:function(e){try{window.localStorage.removeItem(e),Ko.remove(e)}catch(e){Qo.error(e)}}}),ta={},na={is_supported:function(){return!0},error:function(e){Do("memoryStorage error: "+e)},parse:function(e){return ta[e]||null},set:function(e,t){ta[e]=t},remove:function(e){delete ta[e]}},ra={sessionStorageSupported:null,is_supported:function(){if(null!==ra.sessionStorageSupported)return ra.sessionStorageSupported;if(ra.sessionStorageSupported=!0,window)try{var e="__support__";ra.set(e,"xyz"),'"xyz"'!==ra.get(e)&&(ra.sessionStorageSupported=!1),ra.remove(e)}catch(e){ra.sessionStorageSupported=!1}else ra.sessionStorageSupported=!1;return ra.sessionStorageSupported},error:function(e){Config.DEBUG&&Do("sessionStorage error: ",e)},get:function(e){try{return window.sessionStorage.getItem(e)}catch(e){ra.error(e)}return null},parse:function(e){try{return JSON.parse(ra.get(e))||null}catch(e){}return null},set:function(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){ra.error(e)}},remove:function(e){try{window.sessionStorage.removeItem(e)}catch(e){ra.error(e)}}};function ia(e,t){fa(!0,e,t)}function oa(e,t){fa(!1,e,t)}function aa(e,t){return"1"===da(e,t)}function sa(e,t){return!!function(e){if(e&&e.respectDnt){var t=e&&e.window||xo,n=t.navigator||{},r=!1;return Oo.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],(function(e){Oo.includes([!0,1,"1","yes"],e)&&(r=!0)})),r}return!1}(t)||"0"===da(e,t)}function la(e,t){return pa(e,(function(e){return this._get_config(e)}),t)}function ca(e,t){ua(t=t||{}).remove(ha(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function ua(e){return"localStorage"===(e=e||{}).persistenceType?Qo:"localStorage+cookie"===e.persistenceType?ea:Ko}function ha(e,t){return((t=t||{}).persistencePrefix||"__ph_opt_in_out_")+e}function da(e,t){return ua(t).get(ha(e,t))}function fa(e,t,n){Oo.isString(t)&&t.length?(ua(n=n||{}).set(ha(t,n),e?1:0,Oo.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties,{send_immediately:!0})):console.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function pa(e,t,n){return function(){var r=!1;try{var i=t.call(this,"token"),o=t.call(this,"respect_dnt"),a=t.call(this,"opt_out_capturing_persistence_type"),s=t.call(this,"opt_out_capturing_cookie_prefix"),l=t.call(this,"window");i&&(r=sa(i,{respectDnt:o,persistenceType:a,persistencePrefix:s,window:l}))}catch(e){n||console.error("Unexpected error when checking capturing opt-out status: "+e)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var ga={set_action:function(e,t){return this.apiActionParser("$set",e,t)},set_once_action:function(e,t){return this.apiActionParser("$set_once",e,t)},apiActionParser:function(e,t,n){var r={},i={};return Oo.isObject(t)?Oo.each(t,(function(e,t){this._is_reserved_property(t)||(i[t]=e)}),this):i[t]=n,r[e]=i,r}},ma=function(){};Oo.extend(ma.prototype,ga),ma.prototype._init=function(e){this._posthog=e},ma.prototype.set=la((function(e,t,n){var r=this.set_action(e,t);return Oo.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._posthog.persistence.update_referrer_info(document.referrer),r.$set=Oo.extend({},Oo.info.people_properties(),this._posthog.persistence.get_referrer_info(),r.$set),this._send_request(r,n)})),ma.prototype.set_once=la((function(e,t,n){var r=this.set_once_action(e,t);return Oo.isObject(e)&&(n=t),this._send_request(r,n)})),ma.prototype.toString=function(){return this._posthog.toString()+".people"},ma.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._posthog.get_distinct_id();var n=this._posthog.get_property("$device_id"),r=this._posthog.get_property("$user_id"),i=this._posthog.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=Oo.encodeDates(e),a=Oo.copyAndTruncateStrings(o,this._get_config("properties_string_max_length")),s=JSON.stringify(o),l=Oo.base64Encode(s);return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:l},{},this._posthog._prepare_callback(t,a)),a},ma.prototype._get_config=function(e){return this._posthog.get_config(e)},ma.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},ma.prototype.set=ma.prototype.set,ma.prototype.set_once=ma.prototype.set_once,ma.prototype.toString=ma.prototype.toString;var va=function(){function e(t){Wi(this,e),this.instance=t,this._override_warning=!1,this.flagCallReported={},this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Yi(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property("$enabled_feature_flags"),t=this.instance.get_property("$override_feature_flags");if(!t)return e||{};for(var n=Oo.extend({},e),r=Object.keys(t),i=0;i<r.length;i++)!1===t[r[i]]?delete n[r[i]]:n[r[i]]=t[r[i]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout((function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())}),5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;this.setReloadingPaused(!0);var t=this.instance.get_config("token"),n=JSON.stringify({token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}),r=Oo.base64Encode(n);this.instance._send_request(this.instance.get_config("api_host")+"/decide/?v=2",{data:r},{method:"POST"},this.instance._prepare_callback((function(t){e.receivedFeatureFlags(t),e.setReloadingPaused(!1),e._startReloadTimer()})))}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var n=this.getFlagVariants()[e];return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"receivedFeatureFlags",value:function(e){!function(e,t){var n=e.featureFlags;if(n)if(Array.isArray(n)){var r={};if(n)for(var i=0;i<n.length;i++)r[n[i]]=!0;t&&t.register({$active_feature_flags:n,$enabled_feature_flags:r})}else t&&t.register({$active_feature_flags:Object.keys(n||{}),$enabled_feature_flags:n||{}});else t&&(t.unregister("$active_feature_flags"),t.unregister("$enabled_feature_flags"))}(e,this.instance.persistence);var t=this.getFlags(),n=this.getFlagVariants();this.featureFlagEventHandlers.forEach((function(e){return e(t,n)}))}},{key:"override",value:function(e){if(this._override_warning=!1,!1===e)this.instance.persistence.unregister("$override_feature_flags");else if(Array.isArray(e)){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;this.instance.persistence.register({$override_feature_flags:t})}else this.instance.persistence.register({$override_feature_flags:e})}},{key:"onFeatureFlags",value:function(e){this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit&&e(this.getFlags(),this.getFlagVariants())}}]),e}(),ya="$people_distinct_id",ba="__alias",_a="$session_recording_enabled_server_side",xa="$sesid",wa="$enabled_feature_flags",Aa=["__mps","__mpso","__mpus","__mpa","__mpap","__mpr","__mpu",ya,ba,"__cmpns","__timers",_a,xa,wa],ka=function(e){var t="";e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+t+"_posthog";var n=e.persistence;"cookie"!==n&&-1===n.indexOf("localStorage")&&"memory"!==n&&(Io("Unknown persistence type "+n+"; falling back to cookie"),n=e.persistence="cookie"),"localStorage"===n&&Qo.is_supported()?this.storage=Qo:"localStorage+cookie"===n&&ea.is_supported()?this.storage=ea:this.storage="memory"===n?na:Ko,this.load(),this.update_config(e),this.save()};ka.prototype.properties=function(){var e={};return Oo.each(this.props,(function(t,n){if(n===wa&&"object"===$i(t))for(var r=Object.keys(t),i=0;i<r.length;i++)e["$feature/".concat(r[i])]=t[r[i]];else Oo.include(Aa,n)||(e[n]=t)})),e},ka.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Oo.extend({},e))}},ka.prototype.save=function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)},ka.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},ka.prototype.clear=function(){this.remove(),this.props={}},ka.prototype.register_once=function(e,t,n){return!!Oo.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,Oo.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},ka.prototype.register=function(e,t){return!!Oo.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,Oo.extend(this.props,e),this.save(),!0)},ka.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},ka.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register(Oo.info.campaignParams()),this.campaign_params_saved=!0)},ka.prototype.update_search_keyword=function(e){this.register(Oo.info.searchInfo(e))},ka.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:Oo.info.referringDomain(e)||"$direct"},""),this.register({$referrer:e||this.props.$referrer||"$direct",$referring_domain:Oo.info.referringDomain(e)||this.props.$referring_domain||"$direct"})},ka.prototype.get_referrer_info=function(){return Oo.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},ka.prototype.safe_merge=function(e){return Oo.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},ka.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},ka.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},ka.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},ka.prototype.get_cross_subdomain=function(){return this.cross_subdomain},ka.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},ka.prototype.set_event_timer=function(e,t){var n=this.props.__timers||{};n[e]=t,this.props.__timers=n,this.save()},ka.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return Oo.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var Ta=2,Sa=4,Ea=function(){function e(t){Wi(this,e),this.instance=t,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint="/e/",this.stopRrweb=null,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return Yi(e,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=null,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var e=!!this.instance.get_property(_a),t=!this.instance.get_config("disable_session_recording");return e&&t}},{key:"afterDecideResponse",value:function(e){var t,n;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register(Xi({},_a,!!e.sessionRecording)),null!==(t=e.sessionRecording)&&void 0!==t&&t.endpoint&&(this.endpoint=null===(n=e.sessionRecording)||void 0===n?void 0:n.endpoint),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var e=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach((function(t){return e._captureSnapshot(t)}))),this._startCapture()}},{key:"_startCapture",value:function(){void 0!==Object.assign&&(this.captureStarted||this.instance.get_config("disable_session_recording")||(this.captureStarted=!0,Go(this.instance.get_config("api_host")+"/static/recorder.js?v="+po.LIB_VERSION,Oo.bind(this._onScriptLoaded,this))))}},{key:"_updateWindowAndSessionIds",value:function(e){var t=this.instance.sessionManager.getSessionAndWindowId(e.timestamp||(new Date).getTime(),e),n=t.windowId,r=t.sessionId;this.windowId===n&&this.sessionId===r||-1!==[Ta,Sa].indexOf(e.type)||window.rrweb.record.takeFullSnapshot(),this.windowId=n,this.sessionId=r}},{key:"_onScriptLoaded",value:function(){for(var e=this,t={blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!1,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1},n=this.instance.get_config("session_recording"),r=0,i=Object.entries(n||{});r<i.length;r++){var o=ro(i[r],2),a=o[0],s=o[1];a in t&&(t[a]=s)}this.stopRrweb=window.rrweb.record(Ki({emit:function(t){t=function(e){if(e&&"object"===$i(e)){var t=JSON.stringify(e);if(t.length>5e6){var n,r=ao(t.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(r.s();!(n=r.n()).done;){var i=n.value;t="image/"===i[1].toLocaleLowerCase().slice(0,6)?t.replace(i[0],"data:image/svg+xml;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashaCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+your_sha256_hashdmc+Cg=="):t.replace(i[0],"")}}catch(e){r.e(e)}finally{r.f()}}return JSON.parse(t)}return e}(t),e._updateWindowAndSessionIds(t);var n={$snapshot_data:t,$session_id:e.sessionId,$window_id:e.windowId};e.instance._captureMetrics.incr("rrweb-record"),e.instance._captureMetrics.incr("rrweb-record-".concat(t.type)),e.emit?e._captureSnapshot(n):e.snapshots.push(n)}},t)),this.instance._addCaptureHook((function(e){"$pageview"===e&&window.rrweb.record.addCustomEvent("$pageview",{href:window.location.href})}))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this.endpoint,_forceCompression:!0,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===Ta}})}}]),e}(),Ca=function(){function e(t){Wi(this,e),this.instance=t,this.instance.decideEndpointWasHit=!1}return Yi(e,[{key:"call",value:function(){var e=this,t=JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}),n=Oo.base64Encode(t);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=2"),{data:n,verbose:!0},{method:"POST"},(function(t){return e.parseDecideResponse(t)}))}},{key:"parseDecideResponse",value:function(e){var t=this;if(0!==(null==e?void 0:e.status)){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){t.parseDecideResponse(e)}),500);if(this.instance.toolbar.afterDecideResponse(e),this.instance.sessionRecording.afterDecideResponse(e),Xo.afterDecideResponse(e,this.instance),this.instance.featureFlags.receivedFeatureFlags(e),e.supportedCompression){var n,r={},i=ao(e.supportedCompression);try{for(i.s();!(n=i.n()).done;)r[n.value]=!0}catch(e){i.e(e)}finally{i.f()}this.instance.compression=r}else this.instance.compression={}}else console.error("Failed to fetch feature flags from PostHog.")}}]),e}(),Ma=function(){function e(t){Wi(this,e),this.instance=t}return Yi(e,[{key:"afterDecideResponse",value:function(e){var t=e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&t.toolbarVersion&&0===t.toolbarVersion.indexOf("toolbar")&&this._loadEditor(Ki(Ki({},t),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.history;try{if(!t){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch(e){return!1}t=window.localStorage}var r,i=Oo.getHashParam(e.hash,"__posthog")||Oo.getHashParam(e.hash,"state"),o=i?JSON.parse(decodeURIComponent(i)):null,a=o&&("mpeditor"===o.action||"ph_authorize"===o.action);return a?(r=o)&&Object.keys(r).length>0&&(t.setItem("_postHogEditorParams",JSON.stringify(r)),o.desiredHash?e.hash=o.desiredHash:n?n.replaceState("",document.title,e.pathname+e.search):e.hash=""):delete(r=JSON.parse(t.getItem("_postHogEditorParams")||"{}")).userIntent,r.apiURL=this.instance.get_config("api_host"),!(!r.token||this.instance.get_config("token")!==r.token||(this._loadEditor(r),0))}catch(e){return!1}}},{key:"_loadEditor",value:function(e){var t=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var n=e.jsURL||e.apiURL||this.instance.get_config("api_host"),r=n+(n.endsWith("/")?"":"/")+"static/toolbar.js?_ts="+(new Date).getTime(),i="path_to_url"!==this.instance.get_config("api_host")&&this.instance.get_config("advanced_disable_toolbar_metrics");return e=Ki(Ki({},e),i?{instrument:!1}:{}),Go(r,(function(){window.ph_load_editor(e,t.instance)})),Oo.register_event(window,"turbolinks:load",(function(){window._postHogToolbarLoaded=!1,t._loadEditor(e)})),!0}return!1}}]),e}(),Oa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;Wi(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=function(){},this._pollInterval=t}return Yi(e,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"enqueue",value:function(){}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return(new Date).getTime()}}]),e}(),La=function(e){Ji(n,e);var t=no(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;return Wi(this,n),(i=t.call(this,o)).handlePollRequest=r,i.captureMetrics=e,i}return Yi(n,[{key:"enqueue",value:function(e,t,n){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:e,data:t,options:n}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){if(e._event_queue.length>0){var t=e.formatQueue(),n=function(n){var r=t[n],i=r.url,o=r.data,a=r.options;Oo.each(o,(function(t,n){o[n].offset=Math.abs(o[n].timestamp-e.getTime()),delete o[n].timestamp})),e.handlePollRequest(i,o,a),e.captureMetrics.incr("batch-requests"),e.captureMetrics.incr("batch-requests-".concat(i.slice(i.length-2))),e.captureMetrics.incr("batch-handle",o.length),e.captureMetrics.incr("batch-handle-".concat(i.slice(i.length-2)),o.length)};for(var r in t)n(r);e._event_queue.length=0,e._empty_queue_count=0}else e._empty_queue_count++;e._empty_queue_count>4&&(e.isPolling=!1,e._empty_queue_count=0),e.isPolling&&e.poll()}),this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var e=this.formatQueue();for(var t in e){var n=e[t],r=n.url,i=n.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(r.slice(r.length-2))),this.captureMetrics.incr("batch-unload",i.length),this.captureMetrics.incr("batch-unload-".concat(r.slice(r.length-2)),i.length)}}},{key:"unload",value:function(){clearTimeout(this._poller);var e=this._event_queue.length>0?this.formatQueue():{};for(var t in this._event_queue.length=0,e){var n=e[t],r=n.url,i=n.data,o=n.options;this.handlePollRequest(r,i,Ki(Ki({},o),{},{transport:"sendbeacon"}))}}},{key:"formatQueue",value:function(){var e={};return Oo.each(this._event_queue,(function(t){var n=t.url,r=t.data,i=t.options,o=(i?i._batchKey:null)||n;void 0===e[o]&&(e[o]={data:[],url:n,options:i}),i&&e[o].options&&e[o].options._metrics&&!e[o].options._metrics.rrweb_full_snapshot&&(e[o].options._metrics.rrweb_full_snapshot=i._metrics.rrweb_full_snapshot),e[o].data.push(r)})),e}}]),n}(Oa),Da=function(){function e(t){Wi(this,e),this.enabled=t,this.metrics={}}return Yi(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}}]),e}(),Ia=Uint8Array,Ra=Uint16Array,Pa=Uint32Array,Na=new Ia([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),za=new Ia([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Fa=new Ia([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ba=function(e,t){for(var n=new Ra(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Pa(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},ja=Ba(Na,2),Ua=ja[0],Va=ja[1];Ua[28]=258,Va[258]=28;for(var qa=Ba(za,0)[1],Ha=new Ra(32768),$a=0;$a<32768;++$a){var Wa=(43690&$a)>>>1|(21845&$a)<<1;Wa=(61680&(Wa=(52428&Wa)>>>2|(13107&Wa)<<2))>>>4|(3855&Wa)<<4,Ha[$a]=((65280&Wa)>>>8|(255&Wa)<<8)>>>1}var Ga=function(e,t,n){for(var r=e.length,i=0,o=new Ra(t);i<r;++i)++o[e[i]-1];var a,s=new Ra(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(n){a=new Ra(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=s[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[Ha[h]>>>l]=c}else for(a=new Ra(r),i=0;i<r;++i)a[i]=Ha[s[e[i]-1]++]>>>15-e[i];return a},Ya=new Ia(288);for($a=0;$a<144;++$a)Ya[$a]=8;for($a=144;$a<256;++$a)Ya[$a]=9;for($a=256;$a<280;++$a)Ya[$a]=7;for($a=280;$a<288;++$a)Ya[$a]=8;var Xa=new Ia(32);for($a=0;$a<32;++$a)Xa[$a]=5;var Za=Ga(Ya,9,0),Ka=Ga(Xa,5,0),Ja=function(e){return(e/8>>0)+(7&e&&1)},Qa=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Ra?Ra:e instanceof Pa?Pa:Ia)(n-t);return r.set(e.subarray(t,n)),r},es=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},ts=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},ns=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new Ia(0),0];if(1==i){var a=new Ia(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],l=n[1],c=0,u=1,h=2;for(n[0]={s:-1,f:s.f+l.f,l:s,r:l};u!=i-1;)s=n[n[c].f<n[h].f?c++:h++],l=n[c!=u&&n[c].f<n[h].f?c++:h++],n[u++]={s:-1,f:s.f+l.f,l:s,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var f=new Ra(d+1),p=rs(n[u-1],f,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=v-(1<<p-f[y]),f[y]=t}for(g>>>=m;g>0;){var b=o[r].s;f[b]<t?g-=1<<t-f[b]++-1:++r}for(;r>=0&&g;--r){var _=o[r].s;f[_]==t&&(--f[_],++g)}p=t}return[new Ia(f),p]},rs=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},is=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ra(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]},os=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},as=function(e,t,n){var r=n.length,i=Ja(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},ss=function(e,t,n,r,i,o,a,s,l,c,u){es(t,u++,n),++i[256];for(var h=ns(i,15),d=h[0],f=h[1],p=ns(o,15),g=p[0],m=p[1],v=is(d),y=v[0],b=v[1],_=is(g),x=_[0],w=_[1],A=new Ra(19),k=0;k<y.length;++k)A[31&y[k]]++;for(k=0;k<x.length;++k)A[31&x[k]]++;for(var T=ns(A,7),S=T[0],E=T[1],C=19;C>4&&!S[Fa[C-1]];--C);var M,O,L,D,I=c+5<<3,R=os(i,Ya)+os(o,Xa)+a,P=os(i,d)+os(o,g)+a+14+3*C+os(A,S)+(2*A[16]+3*A[17]+7*A[18]);if(I<=R&&I<=P)return as(t,u,e.subarray(l,l+c));if(es(t,u,1+(P<R)),u+=2,P<R){M=Ga(d,f,0),O=d,L=Ga(g,m,0),D=g;var N=Ga(S,E,0);for(es(t,u,b-257),es(t,u+5,w-1),es(t,u+10,C-4),u+=14,k=0;k<C;++k)es(t,u+3*k,S[Fa[k]]);u+=3*C;for(var z=[y,x],F=0;F<2;++F){var B=z[F];for(k=0;k<B.length;++k){var j=31&B[k];es(t,u,N[j]),u+=S[j],j>15&&(es(t,u,B[k]>>>5&127),u+=B[k]>>>12)}}}else M=Za,O=Ya,L=Ka,D=Xa;for(k=0;k<s;++k)if(r[k]>255){j=r[k]>>>18&31,ts(t,u,M[j+257]),u+=O[j+257],j>7&&(es(t,u,r[k]>>>23&31),u+=Na[j]);var U=31&r[k];ts(t,u,L[U]),u+=D[U],U>3&&(ts(t,u,r[k]>>>5&8191),u+=za[U])}else ts(t,u,M[r[k]]),u+=O[r[k]];return ts(t,u,M[256]),u+O[256]},ls=new Pa([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),cs=new Ia(0),us=function(){for(var e=new Pa(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),hs=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function ds(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=us[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,o,a,s,l,c,u=(o=e,a=t,s=10+((i=t).filename&&i.filename.length+1||0),l=8,function(e,t,n,r,i,o){var a=e.length,s=new Ia(r+a+5*(1+Math.floor(a/7e3))+i),l=s.subarray(r,s.length-i),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var h=u+65535;h<a?c=as(l,c,e.subarray(u,h)):(l[u]=o,c=as(l,c,e.subarray(u,a)))}else{for(var d=ls[t-1],f=d>>>13,p=8191&d,g=(1<<n)-1,m=new Ra(32768),v=new Ra(g+1),y=Math.ceil(n/3),b=2*y,_=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&g},x=new Pa(25e3),w=new Ra(288),A=new Ra(32),k=0,T=0,S=(u=0,0),E=0,C=0;u<a;++u){var M=_(u),O=32767&u,L=v[M];if(m[O]=L,v[M]=O,E<=u){var D=a-u;if((k>7e3||S>24576)&&D>423){c=ss(e,l,0,x,w,A,T,S,C,u-C,c),S=k=T=0,C=u;for(var I=0;I<286;++I)w[I]=0;for(I=0;I<30;++I)A[I]=0}var R=2,P=0,N=p,z=O-L&32767;if(D>2&&M==_(u-z))for(var F=Math.min(f,D)-1,B=Math.min(32767,u),j=Math.min(258,D);z<=B&&--N&&O!=L;){if(e[u+R]==e[u+R-z]){for(var U=0;U<j&&e[u+U]==e[u+U-z];++U);if(U>R){if(R=U,P=z,U>F)break;var V=Math.min(z,U-2),q=0;for(I=0;I<V;++I){var H=u-z+I+32768&32767,$=H-m[H]+32768&32767;$>q&&(q=$,L=H)}}}z+=(O=L)-(L=m[O])+32768&32767}if(P){x[S++]=268435456|Va[R]<<18|qa[P];var W=31&Va[R],G=31&qa[P];T+=Na[W]+za[G],++w[257+W],++A[G],E=u+R,++k}else x[S++]=e[u],++w[e[u]]}}c=ss(e,l,o,x,w,A,T,S,C,u-C,c),o||(c=as(l,c,cs))}return Qa(s,0,r+Ja(c)+i)}(o,null==a.level?6:a.level,null==a.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(o.length)))):12+a.mem,s,l,!c)),h=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&hs(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(u,t),hs(u,h-8,n.d()),hs(u,h-4,r),u}function fs(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Ia(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},a=0;a<n;++a){if(i+5>r.length){var s=new Ia(i+8+(n-a<<1));s.set(r),r=s}var l=e.charCodeAt(a);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return Qa(r,0,i)}var ps,gs,ms=function e(t,n){if(n.blob&&t.buffer)return new Blob([t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return"POST"!==n.method?null:(i=Array.isArray(t)||(o=t,"[object Uint8Array]"===Object.prototype.toString.call(o))?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),t.compression&&(i+="&compression="+t.compression),i);var i,o},vs=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,o=e.captureMetrics,a=e.callback,s=e.retriesPerformedSoFar,l=e.retryQueue,c=e.onXHRError,u=new XMLHttpRequest;u.open(i.method,t,!0);var h=ms(n,i);o.incr("_send_request"),o.incr("_send_request_inflight"),Oo.each(r,(function(e,t){u.setRequestHeader(t,e)})),"POST"!==i.method||i.blob||u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.withCredentials=!0,u.onreadystatechange=function(){if(4===u.readyState)if(o.incr("xhr-response"),o.incr("xhr-response-".concat(u.status)),o.decr("_send_request_inflight"),200===u.status){if(a){var e;try{e=JSON.parse(u.responseText)}catch(e){return void Do(e)}a(e)}}else"function"==typeof c&&c(u),[401,403,404,500].indexOf(u.status)<0&&l.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(s||0)+1,callback:a}),a&&(i.verbose?a({status:0,error}):a(0))},u.send(h)},ys=function(e){Ji(n,e);var t=no(n);function n(e,r){var i;return Wi(this,n),(i=t.call(this)).captureMetrics=e,i.isPolling=!1,i.queue=[],i.areWeOnline=!0,i.onXHRError=r,"onLine"in window.navigator&&(i.areWeOnline=window.navigator.onLine,window.addEventListener("online",(function(){i._handleWeAreNowOnline()})),window.addEventListener("offline",(function(){i.areWeOnline=!1}))),i}return Yi(n,[{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var n=3e3*Math.pow(2,t),r=new Date(Date.now()+n);console.warn("Enqueued failed request for retry in ".concat(n)),this.queue.push({retryAt:r,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var e=this;clearTimeout(this._poller),this._poller=setTimeout((function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()}),this._pollInterval)}},{key:"flush",value:function(){var e=new Date(Date.now()),t=this.queue.filter((function(t){return t.retryAt<e}));if(t.length>0){this.queue=this.queue.filter((function(t){return t.retryAt>=e}));var n,r=ao(t);try{for(r.s();!(n=r.n()).done;){var i=n.value.requestData;this._executeXhrRequest(i)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"unload",value:function(){clearTimeout(this._poller);var e,t=ao(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestData,r=n.url,i=n.data,o=n.options;try{window.navigator.sendBeacon(r,ms(i,Ki(Ki({},o),{},{sendBeacon:!0})))}catch(e){this.get_config("debug")&&console.error(e)}}}catch(e){t.e(e)}finally{t.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(e){var t=e.url,n=e.data,r=e.options,i=e.headers,o=e.callback,a=e.retriesPerformedSoFar;vs({url:t,data:n||{},options:r||{},headers:i||{},retriesPerformedSoFar:a||0,callback:o,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}(Oa),bs=18e5,_s=function(){function e(t,n){Wi(this,e),this.persistence=n,t.persistence_name?this.window_id_storage_key="ph_"+t.persistence_name+"_window_id":this.window_id_storage_key="ph_"+t.token+"_window_id"}return Yi(e,[{key:"_setWindowId",value:function(e){e!==this.windowId&&(this.windowId=e,!this.persistence.disabled&&ra.is_supported()&&ra.set(this.window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this.windowId?this.windowId:!this.persistence.disabled&&ra.is_supported()?ra.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t){e===this.sessionId&&t===this.timestamp||(this.timestamp=t,this.sessionId=e,this.persistence.register(Xi({},xa,[t,e])))}},{key:"_getSessionId",value:function(){return this.sessionId&&this.timestamp?[this.timestamp,this.sessionId]:this.persistence.props.$sesid||[0,null]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null)}},{key:"getSessionAndWindowId",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(n&&3===n.type&&3===(null===(e=n.data)||void 0===e?void 0:e.source));t=t||(new Date).getTime();var i=this._getSessionId(),o=ro(i,2),a=o[0],s=o[1],l=this._getWindowId();!s||r&&Math.abs(t-a)>bs?(s=Oo.UUID(),l=Oo.UUID()):l||(l=Oo.UUID());var c=0===a||r?t:a;return this._setWindowId(l),this._setSessionId(s,c),{sessionId:s,windowId:l}}}]),e}();function xs(e){try{return(t=JSON.parse(JSON.stringify(xo.performance.getEntriesByType(e)))).forEach((function(e,n){for(var r in e)i=e[r],Number(i)===i&&i%1!=0&&e[r].toString().match(/^\d+\.\d{4,}$/)&&(t[n][r]=Number(e[r].toFixed(3))),["serverTiming","workerTiming"].includes(r)&&0===e[r].length&&delete t[n][r],"entryType"===r&&"resource"===e[r]&&delete t[n][r],"nextHopProtocol"===r&&delete t[n][r],0===e[r]&&delete t[n][r];var i})),function(e){if(0===e.length)return[];var t=Object.keys(e[0]);return[t,e.map((function(e){return t.map((function(t){return e[t]}))}))]}(t)}catch(t){return po.DEBUG&&console.warn("not able to capture performance data ("+e+") - "+t),[]}var t}var ws=function(){},As={},ks="posthog",Ts=xo.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ss=!Ts&&-1===ko.indexOf("MSIE")&&-1===ko.indexOf("Mozilla"),Es=function(){},Cs=function(e,t,n){var r,i=n===ks?gs:gs[n];if(i&&0===ps)r=i;else{if(i&&!Oo.isArray(i))return void Do("You have already initialized "+n);r=new Es}return r._init(e,t,n),r.people=new ma,r.people._init(r),r.featureFlags=new va(r),r.feature_flags=r.featureFlags,r.toolbar=new Ma(r),r.toolbar.maybeLoadEditor(),r.sessionRecording=new Ea(r),r.sessionRecording.startRecordingIfEnabled(),r.__autocapture_enabled=r.get_config("autocapture"),r.get_config("autocapture")&&(Xo.enabledForProject(r.get_config("token"),100,100)?Xo.isBrowserSupported()?Xo.init(r):(r.__autocapture_enabled=!1,Lo("Disabling Automatic Event Collection because this browser is not supported")):(r.__autocapture_enabled=!1,Lo("Not in active bucket: disabling Automatic Event Collection."))),po.DEBUG=po.DEBUG||r.get_config("debug"),!Oo.isUndefined(i)&&Oo.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};Es.prototype.init=function(e,t,n){if(Oo.isUndefined(n))Do("You must name your new library: init(token, config, name)");else{if(n!==ks){var r=Cs(e,t,n);return gs[n]=r,r._loaded(),r}Do("You must initialize the main posthog object right after you include the PostHog js snippet")}},Es.prototype._init=function(e,t,n){this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(Oo.extend({},{api_host:"path_to_url",api_method:"POST",api_transport:"XHR",autocapture:!0,rageclick:!1,cross_subdomain_cookie:-1===Ao.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:"https:"===xo.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!1,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){var t="Bad HTTP status: "+e.status+" "+e.statusText;Do(t)},_onCapture:function(){},_capture_metrics:!1,_capture_performance:!1},t,{name:n,token:e,callback_fn:(n===ks?n:"posthog."+n)+"._jsc"})),this._jsc=function(){},this._captureMetrics=new Da(this.get_config("_capture_metrics")),this._requestQueue=new La(this._captureMetrics,Oo.bind(this._handle_queued_event,this)),this._retryQueue=new ys(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new ka(this.config),this.sessionManager=new _s(this.config,this.persistence),this._gdpr_init();var r=Oo.UUID();this.get_distinct_id()||this.register_once({distinct_id:r,$device_id:r},""),xo.addEventListener&&xo.addEventListener("unload",this._handle_unload.bind(this))},Es.prototype._loaded=function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){Do("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new Ca(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)},Es.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()},Es.prototype._dom_loaded=function(){this.has_opted_out_capturing()||Oo.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__request_queue,this._start_queue_if_opted_in()},Es.prototype._prepare_callback=function(e,t){if(Oo.isUndefined(e))return null;if(Ts)return function(n){e(n,t)};var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},Es.prototype._handle_unload=function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.capture("$pageleave",null,{transport:"sendbeacon"})},Es.prototype._handle_queued_event=function(e,t,n){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,n||As,ws)},Es.prototype.__compress_and_send_json_request=function(e,t,n,r){var i,o=function(e,t,n){return"lz64"===e?[{data:fo.compressToBase64(t),compression:"lz64"},n]:"gzip-js"===e?[ds(fs(t),{mtime:0}),Ki(Ki({},n),{},{blob:!0,urlQueryArgs:{compression:"gzip-js"}})]:[{data:Oo.base64Encode(t)},n]}((i=this.compression)["gzip-js"]?"gzip-js":i.lz64?"lz64":"base64",t,n),a=ro(o,2),s=a[0],l=a[1];this._send_request(e,s,l,r)},Es.prototype._send_request=function(e,t,n,r){if(Ss)this.__request_queue.push(arguments);else{var i={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};n=Oo.extend(i,n||{}),Ts||(n.method="GET");var o=xo.navigator.sendBeacon&&"sendbeacon"===n.transport.toLowerCase(),a=n.urlQueryArgs||{};a.ip=this.get_config("ip")?1:0,a._=(new Date).getTime().toString();var s=e.indexOf("?")>-1?"&":"?";if(e+=s+Oo.HTTPBuildQuery(a),Oo.isObject(t)&&this.get_config("img")){var l=Ao.createElement("img");l.src=e,Ao.body.appendChild(l)}else if(o)try{xo.navigator.sendBeacon(e,ms(t,Ki(Ki({},n),{},{sendBeacon:!0})))}catch(e){this.get_config("debug")&&Do(e)}else if(Ts)try{vs({url:e,data:t,headers:this.get_config("xhr_headers"),options:n,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(e){Do(e)}else{var c=Ao.createElement("script");c.type="text/javascript",c.async=!0,c.defer=!0,c.src=e;var u=Ao.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u)}}},Es.prototype._execute_array=function(e){var t,n=[],r=[],i=[];Oo.each(e,(function(e){e&&(t=e[0],Oo.isArray(t)?i.push(e):"function"==typeof e?e.call(this):Oo.isArray(e)&&"alias"===t?n.push(e):Oo.isArray(e)&&-1!==t.indexOf("capture")&&"function"==typeof this[t]?i.push(e):r.push(e))}),this);var o=function(e,t){Oo.each(e,(function(e){if(Oo.isArray(e[0])){var n=t;Oo.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};o(n,this),o(r,this),o(i,this)},Es.prototype.push=function(e){this._execute_array([e])},Es.prototype.capture=pa((function(e,t,n){if(this.__loaded){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(n=n||As).transport;if(r&&(n.transport=r),Oo.isUndefined(e)||"string"!=typeof e)Do("No event name provided to posthog.capture");else if(!Oo.isBlockedUA(ko)){var i=this.persistence.remove_event_timer(e);this.persistence.update_search_keyword(Ao.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(Ao.referrer);var o={event:e,properties:this._calculate_event_properties(e,t,i)};"$identify"===e&&n.$set&&(o.$set=n.$set),o=Oo.copyAndTruncateStrings(o,n._noTruncate?null:this.get_config("properties_string_max_length")),this.get_config("debug")&&Lo("PostHog.js send",o);var a=JSON.stringify(o),s=this.get_config("api_host")+(n.endpoint||"/e/"),l=n!==As;return!this.get_config("request_batching")||l&&!n._batchKey||n.send_instantly?this.__compress_and_send_json_request(s,a,n):(o.timestamp=new Date,this._requestQueue.enqueue(s,o,n)),this._invokeCaptureHooks(e,o),o}}}),(function(e){return this.get_config(e)}),undefined),Es.prototype._addCaptureHook=function(e){this.__captureHooks.push(e)},Es.prototype._invokeCaptureHooks=function(e,t){this.config._onCapture(e,t),Oo.each(this.__captureHooks,(function(t){return t(e)}))},Es.prototype._calculate_event_properties=function(e,t,n){var r=t||{};if(r.token=this.get_config("token"),"$snapshot"===e){var i=this.persistence.properties();return r.distinct_id=i.distinct_id,r}if(!Oo.isUndefined(n)){var o=(new Date).getTime()-n;r.$duration=parseFloat((o/1e3).toFixed(3))}if(this.sessionManager){var a=this.sessionManager.getSessionAndWindowId(),s=a.sessionId,l=a.windowId;r.$session_id=s,r.$window_id=l}r=Oo.extend({},Oo.info.properties(),this.persistence.properties(),r),"$pageview"===e&&this.get_config("_capture_performance")&&(r=Oo.extend(r,function(){var e,t,n={navigation:xs("navigation"),paint:xs("paint"),resource:xs("resource")},r={},i=(t=(e=n).navigation&&e.navigation[0]&&e.navigation[0].indexOf("duration"),e.navigation[1]&&e.navigation[1][0][t]);return i&&(r.$performance_page_loaded=i),r.$performance_raw=JSON.stringify(n),r}()));var c=this.get_config("property_blacklist");Oo.isArray(c)?Oo.each(c,(function(e){delete r[e]})):Do("Invalid value for property_blacklist config: "+c);var u=this.get_config("sanitize_properties");return u&&(r=u(r,e)),r},Es.prototype.register=function(e,t){this.persistence.register(e,t)},Es.prototype.register_once=function(e,t,n){this.persistence.register_once(e,t,n)},Es.prototype.unregister=function(e){this.persistence.unregister(e)},Es.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},Es.prototype.getFeatureFlag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.featureFlags.getFeatureFlag(e,t)},Es.prototype.isFeatureEnabled=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.featureFlags.isFeatureEnabled(e,t)},Es.prototype.reloadFeatureFlags=function(){return this.featureFlags.reloadFeatureFlags()},Es.prototype.onFeatureFlags=function(e){this.featureFlags.onFeatureFlags(e)},Es.prototype.identify=function(e,t,n){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property(ba)&&(this.unregister(ba),this.register({distinct_id:e})),e===r||this.get_property("$device_id")&&r!==this.get_property("$device_id")?(t&&this.people.set(t),n&&this.people.set_once(n)):this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{}},{$set_once:n||{}}),e!==r&&this.reloadFeatureFlags()}else Do("Unique user id has not been set in posthog.identify")},Es.prototype.group=function(e,t,n){if(e&&t){this._captureMetrics.incr("group");var r=this.getGroups();this.register({$groups:Ki(Ki({},r),{},Xi({},e,t))}),n&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),r[e]!==t&&this.reloadFeatureFlags()}else Do("posthog.group requires a group type and group key")},Es.prototype.reset=function(e){var t=this.get_property("$device_id");this.persistence.clear();var n=Oo.UUID();this.register_once({distinct_id:n,$device_id:e?n:t},"")},Es.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Es.prototype.getGroups=function(){return this.get_property("$groups")||{}},Es.prototype.alias=function(e,t){if(e===this.get_property(ya))return Io("Attempting to create alias for existing People user - aborting."),-2;var n=this;return Oo.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(ba,e),this.capture("$create_alias",{alias:e,distinct_id:t},(function(){n.identify(e)}))):(Do("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},Es.prototype.set_config=function(e){var t=Ki({},this.config);Oo.isObject(e)&&(Oo.extend(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),Qo.is_supported()&&"true"===Qo.get("ph_debug")&&(this.config.debug=!0),po.DEBUG=po.DEBUG||this.get_config("debug"),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))},Es.prototype.startSessionRecording=function(){this.set_config({disable_session_recording:!1})},Es.prototype.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},Es.prototype.sessionRecordingStarted=function(){return this.sessionRecording.started()},Es.prototype.get_config=function(e){return this.config[e]},Es.prototype.get_property=function(e){return this.persistence.props[e]},Es.prototype.toString=function(){var e=this.get_config("name");return e!==ks&&(e="posthog."+e),e},Es.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&Qo.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!Ko.get("ph_optout")||(Ko.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Es.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)},Es.prototype._gdpr_call_func=function(e,t){return t=Oo.extend({capture:Oo.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t),Qo.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})},Es.prototype.opt_in_capturing=function(e){e=Oo.extend({enable_persistence:!0},e),this._gdpr_call_func(ia,e),this._gdpr_update_persistence(e)},Es.prototype.opt_out_capturing=function(e){e=Oo.extend({clear_persistence:!0},e),this._gdpr_call_func(oa,e),this._gdpr_update_persistence(e)},Es.prototype.has_opted_in_capturing=function(e){return this._gdpr_call_func(aa,e)},Es.prototype.has_opted_out_capturing=function(e){return this._gdpr_call_func(sa,e)},Es.prototype.clear_opt_in_out_capturing=function(e){e=Oo.extend({enable_persistence:!0},e),this._gdpr_call_func(ca,e),this._gdpr_update_persistence(e)},Es.prototype.sentry_integration=function(e,t,n,r){this.name="posthog-js",this.setupOnce=function(i){i((function(i){if("error"!==i.level||!e.__loaded)return i;i.tags||(i.tags={}),i.tags["PostHog URL"]=e.config.api_host+"/person/"+e.get_distinct_id();var o={$sentry_event_id:i.event_id,$sentry_exception:i.exception};return t&&n&&(o.$sentry_url=(r||"path_to_url")+t+"/issues/?project="+n+"&query="+i.event_id),e.capture("$exception",o),i}))}},Es.prototype.debug=function(e){!1===e?(xo.console.log("You've disabled debug mode."),localStorage&&localStorage.setItem("ph_debug",void 0),this.set_config({debug:!1})):(xo.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))},Es.prototype.decodeLZ64=fo.decompressFromBase64,Es.prototype.init=Es.prototype.init,Es.prototype.reset=Es.prototype.reset,Es.prototype.capture=Es.prototype.capture,Es.prototype.register=Es.prototype.register,Es.prototype.register_once=Es.prototype.register_once,Es.prototype.unregister=Es.prototype.unregister,Es.prototype.identify=Es.prototype.identify,Es.prototype.getGroups=Es.prototype.getGroups,Es.prototype.group=Es.prototype.group,Es.prototype.alias=Es.prototype.alias,Es.prototype.set_config=Es.prototype.set_config,Es.prototype.get_config=Es.prototype.get_config,Es.prototype.get_property=Es.prototype.get_property,Es.prototype.get_distinct_id=Es.prototype.get_distinct_id,Es.prototype.toString=Es.prototype.toString,Es.prototype.opt_out_captureing=Es.prototype.opt_out_captureing,Es.prototype.opt_in_captureing=Es.prototype.opt_in_captureing,Es.prototype.has_opted_out_captureing=Es.prototype.has_opted_out_captureing,Es.prototype.has_opted_in_captureing=Es.prototype.has_opted_in_captureing,Es.prototype.clear_opt_in_out_captureing=Es.prototype.clear_opt_in_out_captureing,Es.prototype.opt_out_capturing=Es.prototype.opt_out_capturing,Es.prototype.opt_in_capturing=Es.prototype.opt_in_capturing,Es.prototype.has_opted_out_capturing=Es.prototype.has_opted_out_capturing,Es.prototype.has_opted_in_capturing=Es.prototype.has_opted_in_capturing,Es.prototype.clear_opt_in_out_capturing=Es.prototype.clear_opt_in_out_capturing,Es.prototype.getFeatureFlag=Es.prototype.getFeatureFlag,Es.prototype.isFeatureEnabled=Es.prototype.isFeatureEnabled,Es.prototype.reloadFeatureFlags=Es.prototype.reloadFeatureFlags,Es.prototype.onFeatureFlags=Es.prototype.onFeatureFlags,Es.prototype.decodeLZ64=Es.prototype.decodeLZ64,Es.prototype.SentryIntegration=Es.prototype.sentry_integration,Es.prototype.debug=Es.prototype.debug,Es.prototype.LIB_VERSION=po.LIB_VERSION,Es.prototype.startSessionRecording=Es.prototype.startSessionRecording,Es.prototype.stopSessionRecording=Es.prototype.stopSessionRecording,Es.prototype.sessionRecordingStarted=Es.prototype.sessionRecordingStarted,ka.prototype.properties=ka.prototype.properties,ka.prototype.update_search_keyword=ka.prototype.update_search_keyword,ka.prototype.update_referrer_info=ka.prototype.update_referrer_info,ka.prototype.get_cross_subdomain=ka.prototype.get_cross_subdomain,ka.prototype.clear=ka.prototype.clear,Oo.safewrap_class(Es,["identify"]);var Ms={};ps=0,(gs=new Es).init=function(e,t,n){if(n)return gs[n]||(gs[n]=Ms[n]=Cs(e,t,n),gs[n]._loaded()),gs[n];var r=gs;Ms.posthog?r=Ms.posthog:e&&((r=Cs(e,t,ks))._loaded(),Ms.posthog=r),gs=r,1===ps&&(xo.posthog=gs),Oo.each(Ms,(function(e,t){t!==ks&&(gs[t]=e)})),gs._=Oo},gs.init(),function(){function e(){e.done||(e.done=!0,Ss=!1,Oo.each(Ms,(function(e){e._dom_loaded()})))}if(Ao.addEventListener)"complete"===Ao.readyState?e():Ao.addEventListener("DOMContentLoaded",e,!1);else if(Ao.attachEvent){Ao.attachEvent("onreadystatechange",e);var t=!1;try{t=null===xo.frameElement}catch(e){}Ao.documentElement.doScroll&&t&&function t(){try{Ao.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}Oo.register_event(xo,"load",e,!0)}();var Os,Ls=__webpack_require__(58636),Ds=__webpack_require__.n(Ls);const Is=de()(null!==(Os=K.url)&&void 0!==Os?Os:"path_to_url","dp-kpis/"),Rs=(new(Ds()),async()=>{if(window.hasPosthog){let e=0;for(console.log(`PH loop - ${e}`);!window.posthog;){if(e++,console.log(`PH loop - ${e}`),e>=10){console.log("PH not initialised in time, skipping");break}await new Promise((e=>setTimeout(e,2e3)))}return window.posthog}return null}),Ps=async(e,t,n=!0)=>{try{const r={event:e,properties:t};n&&(r.unique_id=await(async()=>{await Rs();const e=localStorage.getItem("ph_datapane_store");if(!e)throw"Couldn't access device ID";return JSON.parse(e).distinct_id})()),window.navigator.sendBeacon(Is,JSON.stringify(r))}catch(e){console.error("An event error occurred",e)}};var Ns=__webpack_require__(77175),zs=__webpack_require__.n(Ns),Fs=__webpack_require__(16070);class Bs extends t.Component{constructor(e){super(e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"store",void 0),this.store=ti}componentDidMount(){window.dpLocal?this.trackLocalView():this.trackView()}componentWillUnmount(){this.store.reportStore.userObject=void 0}render(){const e=this.props,n=this.getReportXML(e.report),r=e.htmlHeader||e.report.output_style_header,i=void 0!==e.isLightProse?e.isLightProse:e.report.output_is_light_prose;return t.createElement(O.zt,{store:this.store},n&&t.createElement(Hi,{report:n,url:e.report.web_url,isOwner:e.isOwner,isOrg:e.isOrg,reportWidth:e.report.width,htmlHeader:r,isLightProse:i,mode:e.mode}),t.createElement(fe.Ix,{position:"bottom-right",hideProgressBar:!0,pauseOnHover:!0}),t.createElement(Fs.Z,{place:"top",id:"explorer-msg"}))}getReportXML(e){return window.dpLocal?zs().decode(e.document):e.document}trackView(){if(this.props.disableTrackViews)return;const e=this.props,{web_url:t,id:n}=e.report;var r;r={id:n,web_url:t,published:e.report.published,author_username:e.report.username,num_blocks:e.report.num_blocks,is_embed:window.location.href.includes("/embed/")},Ps("REPORT_VIEW",{object_id:r.id}),(async(e,t)=>{const n=await Rs();if(n)try{n.capture(e,t)}catch{console.log("Could not send Report View event to PostHog")}})("Report View",r)}trackLocalView(){window.dpLocalViewEvent&&Ps("CLI_REPORT_VIEW",{author_id:window.dpAuthorId,report_id:window.dpReportId},!1)}}const js=Bs;ti.imports=__webpack_require__(81397);const{React:Us,ReactDOM:Vs}=e,qs={React:Us,ReactDOM:Vs,ReportComponent:js}})(),(DPLIB=void 0===DPLIB?{}:DPLIB)["local-report-base"]=__webpack_exports__.default})(); </script> </head> <body> <div id="report-root" class="w-full pb-12"></div> <script> const report = { document: `&lt;Report version=&#34;1&#34;&gt;&lt;Meta&gt;&lt;Author&gt;Anonymous&lt;/Author&gt;&lt;CreatedOn&gt;2022-07-04T06:43:19Z&lt;/CreatedOn&gt;&lt;Title&gt;optimization_history&lt;/Title&gt;&lt;Description&gt;&lt;![CDATA[Description]]&gt;&lt;/Description&gt;&lt;/Meta&gt;&lt;Internal/&gt;&lt;Pages&gt;&lt;Page&gt;&lt;Plot type=&#34;application/vnd.plotly.v1+json&#34; size=&#34;8574&#34; uploaded_filename=&#34;dp-tmp-qw08uwnc.pl.json&#34; responsive=&#34;true&#34; scale=&#34;1.0&#34; src=&#34;data:application/vnd.plotly.v1+json;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashdGVcIixcInplcm9saW5ld2lkdGhcIjoyfX19fX0i&#34;/&gt;&lt;/Page&gt;&lt;/Pages&gt;&lt;/Report&gt;`, width: "medium" }; const htmlHeader = `<style type="text/css">:root { --dp-accent-color: #4E46E5; --dp-bg-color: #FFF; --dp-text-align: justify; --dp-font-family: Inter var, ui-sans-serif, system-ui; }</style>`; const { React, ReactDOM, ReportComponent } = DPLIB["local-report-base"]; const ReportFactory = React.createElement.bind(null, ReportComponent); ReactDOM.render( ReportFactory({ report, htmlHeader, isLightProse: false }), document.querySelector("#report-root") ); </script> <div style="position: fixed; bottom: 0; width: 100%; z-index: 3;"> <nav class="bg-gray-200 border-t border-gray-300"> <div class="relative flex items-center justify-between h-12"> <div class="flex-shrink pl-4 flex items-center"> <span class="ml-2 text-gray-700 text-sm text-truncate pr-2"> <span class="font-semibold">optimization_history</span> created on <script>document.write(new Date("2022-07-04T06:43:19Z").toLocaleString());</script> </span> </div> <div class="inline-flex flex-shrink-0"/> <div class="flex-shrink pr-4 flex items-center"> <a href="path_to_url" target="_blank" class="flex-shrink-0"> <img class="block h-7 w-auto" src="data:image/png;base64,your_sha256_hashyour_sha256_hashyour_sha256_hashuQAYuQAZuQAaugAAr/sAsf0As/7/fwD/gQD/ggD/fwD/gwDyour_sha512_hash/kAsv0Asf0AsfwAr+8Asv0Asv0Ar/your_sha512_hashr+8wzxCf33CPIFDfUM9wMO+vYBC/jyApHiKEAAAvN0lEQVR4AezdRxrbOBKA0WIOIglaHud0/1tOa+VVZ7JNqd47Alb/your_sha256_hashyour_sha256_hashyour_sha256_hashAAAAQFW/vOahCgCA3zRtHl3fD48WGgMAED+pTP1c35oAAMRPsgYaliYAAPGTyrTWTsIAIGH8KKAAAFLFD91wGwMAED8CCAAQPy+sr7cAADLFD2VOtgEEAOKHda8iEwAQP3RLFZkAgPih28fIBADED+semQCA+KHMW2QCAOKHaRkjEwAQP8xNZAIA4ocp1/QzAIgfylBFJgAgflibyAQAxA/9HpkAgPhh2gMAED/yBwAQP1cnfwBA/CB/AED8IH8AQPww3SITABA/9E1kAgDih7mKTABA/FCP8aoAQPxg8hkAxA/9FgBApvhhGAMAED+uvQMArxo/your_sha256_hashZIof6gAAxI+5ZwDgVeOHcgsAQPw4+gIAXjV+6McAABLFD9MWAECm+GEPACBT/DAHACB+DP4AAK8aP3RbAACJ4ofSBABw5fjB2DMAiB+your_sha512_hash+5J6oc397/sbQCA+PmjAurL9euH+//+sncBAOLnj23LWtRPmvgBAPHzsNW9+kkQPwAgfn4a97monwTxAwDi56fbOf2jfsQPAOJH/6gf8QOA+LmIfVU/5xM/AIifC6mWSf2cT/wAIH4upJnb001jIH4AED9XUdXFL6fnEz8AiJ8L2bvz6wfxA4D4uZCmb0+1BuIHAPFzKc3anmkOxA8A4udaqrk9UR2IHwDEz8VsfXuePTIRPwCIH7M/WyB+ABA/l9NM7UlKFYgfAMTP9SzFhXfxA4D4yWQcXHgXPwCInwOYfB4C8QOA+LmkvbjyJX4AED+ZjLMf3sUPAOLHvS8/vIsfAMSPwWdDz+Lnqt7e37979+HjpwD4ZcSPzZ8lziZ+uN8/vfv88eMXywVcgfgx+dPEKcQPbyour_sha512_hash/Z2mKD97Fj/gBED+ZVF2q137Ej/gBED/MqT75Ej/iB0D8sLeHugXiR/wAiJ9L24r77uJH/your_sha256_hash2_hash/4gdA/Bh63uNJiB/xAyB+uKXayour_sha512_hashyour_sha512_hash7/4Gzp2z1u7+KFprroEf+/PZJFrrFD8MO/YCV6V/your_sha512_hashOtDWH13tbTH9/HEX7FTIWzZP1a8Mba6qUdX4ofvfH1/QMQxH/UpeDtufDjFh8Svl7J0Sl+7sgsPjR8vcazYwkOj4Yv1YJsOlifC75eWvcKl8hGn0P4+ewVNr9YEJpZtoKvJP74Uvzoja8vQBX/Ubfu7hz4cfva8I7KZhU/t+RibnhHbVvgxFUf8IifDvRX1bRGc2WplrxbEFbtgY/A40vxoze+Pp7ozF56jrYqHT9Lbnhyour_sha512_hash/jGRd0adta8E4sfE1dEmg2LeGOhAzcUBTGn6ba5ETyour_sha512_hash/onxYx8eoK72TPiJ5aGRyour_sha512_hash++your_sha512_hash+VhR8bCCa4iLMZSQoWOFP86Jrn7yA25xMOLDsh+LEBRxZ+tV3b5fDDsGOrGPxUAjuwX1hdxpG1KAM/oeP3yfNXYjim+Pmj+NE1z+KXPJsNR7cZDvzQn01+MegN18MPw47djBD8WPhFMZHbgZ8+/VqVhh835Aa+hZm5gKSFCt0pfrS3l1zybHzC8aWdGz80A6lmnx4/your_sha512_hash+35089EPcJaSoVfmoXgp89EQiPuD3hhFKEzhQ/2o/LveW5BqRrM2z48UhXqdfHD8tpulkB+Mnwc7XMQTRNtiFde98eHogfS333qFQgruMnxjCXpfjRPl7sLc8eSSuVBz+2TRxB4VXxw3Ca3vnxE/rmMzpqy9lvpqxGGn48js4z3JakK+3AkuJHp36+AWcMI46dHj8cZ5Pt1PhhsHLPvEthwU+ZqIfVAGVLQuKK48XPPmHRcDD8J2H+35ziR3t/oVf97HOOtdn4qW3SZl0fPwyn6dK/Ywe5Df4rV5C2ZM+9hhZThaPMgB/f8Uwe+your_sha512_hash/kVf91IaTSnUSfg7SzdVPfQ78mDxvx/your_sha512_hash+fCT4MgmpCxzA5X/lT+KHyour_sha512_hash/EeeWr4kf/h0b+PETcWL53A8QJQcAgBz4cdNOaMXwnoRVP/z40T6e/r5XxtklMwE/G87OA0C8Pn4izi4z4icAANQT34aoieFKyoQfO2/ZcDGsS51VP/z40X6c/b5XxvkVCvzwb5YF8JfHz47zi4z44fBDMYT2oW/lwk+ceJMv8N6YVP3w40f7fu77Xhk5ytT4ychQMtfED/+OrbAz4ScBmHbeS1FNyNDOhB8/8yZfZrWP6ocfP9rbU7/nMCNPCy1+MrIULo+fjCwV8Ez4QYDAfyk6l30wOcuCnzx1gzcC+zC2Kn60O/tw5u97ZWQqLZT4ychU3K6Nn4hMeTb8VH/egXhNyFPgwU+Yu8GR3z6cU1mKH+3Teb/vtSFbjRA/your_sha512_hash/8JUMw+c6YVfxo9/XuEfy8B7YsniMvYrMUPzUpfmaW+W+nKH6oH/your_sha512_hash/GDlW5XF723Fj/bpjC953vAseYbxruKHyour_sha512_hash/ixyTFD0er8Muq4gcd9BZPjznFj/blEfz8AIZWvCR+CpKk+FlR8cPSLnzBj+InXOuJk+QUP9odvTnbop8FL4kfjyQpfnZU/JzoWuSS4kf+svRwAcwpfrR351r0Y9Il8eOQJMWPSYofrorwy6rip3E+jpdC8P/abu3u/7U1tKmvOlT8aD/OtehnwzPlOc75KfxHSfEz+KbXXTtW8YOedy1JCf9eU/z8tp3nplfYooVf5Kxf2yTMKX60D6da9OPwVPmp5/yQvbXw37PW5/LMyour_sha512_hash/3MuFQ3k8756+7hd9lfXhW/DR8tOBf2LF7UPy8VJg+r1u2xfz+qprTJfAzcDbLz111WXYHt7TkJGTqR/HzN3/b219d+nmvjyzf9CKYc7VxC3z48fhQKS/wSiauz4ifHR8rL+aBHav4wUg6r9txaa1bOi1+UvDRGjiqdt8Cw9RP6z9PVbg5E9uFp34UPxd43usD28QPwZyr3RoLfhw+UohwU2Zvg6/Rw2Una3V8iYbgNC0UPyVs3tv/aPE+h8ZwW+UhRzbv4KaW9Yz4WfcKv6ruYe6qH499JW/gvmK59tSP4oe/your_sha256_hash5PLJ8BOieVHfZd4aYZMm0OcotitP/Sh++Hv7AH7ewswaPlC29APDrlO/m0CfI9ueCD8mTdyx4ZT4STmaVxafzlvzHLC3YOG+your_sha512_hash+8W4T7q+Ek+MmO9qQV6AcUzUJ3tVz3XT+KH/6+9+/your_sha512_hash/Hz6RyvOawzB/K2zMJPp7M2A70t6fr46WfCaqA3m3jwQ78Gw/hEPfXjsKtSoTcXpOMnLRM4l2kHFCnCg+your_sha512_hash/aCLh7Ok+OHvzSlWPBvsqjgGIhx5ou/kFMMDyTPhJ06dRzjazoCf1cHEVTK5//Amn1VYkmD87ABTiBrh5tLcM9VRvOiSZ8UPfx/PsOJ5nz8y9BPw0wZcTjraL4+fMveW11EUj5+0TP7ROKpjLVV4tJqk4ifZWfpe6X7cxTCMZCqcJcUPf5/O8I5njhd+LokaPwuPfQDixfFTL7pjPcESWtrbKuj7D2/your_sha512_hash+XGRbIzSmWzD8Da8XvjTvFz8UU/f8CcNg77AJhCih/DZhyour_sha512_hashC+eOjVLxkxaWjQvwWobPPgA1MeCHkg0r3leiOQdXrlfcbnCWFD/8fRX/uNfSbx9G/fjhL3bLMLB8Xfzk/o0akJeJn1SZaOeG/zuTg3FVYfhJdfIpa6H4w+9srzppcJYUP/x9Ef+419Z/ZmLUjx/9YrcCQyuXxU/imUg4WiXiJ1Wuia1t+P6qMLIoCz92tuY2gh/1Cnyf6nOKH8XPhP3+EabUGL/u6xIVfmL/dPiQTLoofhYmFxyZJhA/C5sVWv9dL+5ZBQb8eHg4TzCmMgynqs6N2uEsKX74k/64V2W9PVSp8LNyf7RvuSh+MheVj6o8/ERGK9T+n+GcWYUmBz+BYU7XDCfvAsA39bPCWVL88Peuf8dyour_sha512_hash+aHDnibgeGZdkX8VPaLKUCRhZ/Cer+0Db2pvcD4Nin4iRxnrG30gKICQe56L3lW/PD3tn/Hf4EJdaOD910gfugJ1wJByxXx4xlveh1ZUfhJjnfr6kCrrkCQaTLwE6ZC4SgM/otnIGm9wKIfxc+FdvxboM+yjXKPLAV+Cv85HyBcED+hf3vGlSXhZ4fBbQOPhJ3TcUdRBn4cz89v8A/PAUlxOL4UP4qfD7Kfdff8UyR5PH4MooATSr0gflh/LkdOEH4C90xJGbfu3wNNQQJ+MtPPrw69jZuBJnO9N/0ofvj7Lho/QcC0eBqOn4XgtNhRvhx+LO/P5cjLwU9lv19qRq0mSQZosgLwkwzTu6bi0AfdK/uFwMBJUvzw9757x38H+pKAKZJ9OH423q06cpfDj5exY02Sgp/MPyJZRs09eqAq8OPHcyour_sha512_hashiHQSmyour_sha512_hash/o7e+your_sha512_hash+ICyour_sha512_hashg3jBU/o31ggLImAT9OhO38kJuDESjLvPjZGTdnGfen3jxdsh73UvwofqiTsiYgD8VP4B+8H2UZ+GHYmhVI2wTgJ8iw3ToECAYos7z4cYwzun64uXmzip9bU/y8k4sfy/2KiSM7FD+N/17e0XIp/AQxMwlQBeAnyrBdG7FFK9CWOPFTYHBuHH5WPFmL4kfxQ/+in/eS8NOAsjYSP3hHQNyl8JM6BttUNX78GCG2GzFRF4G2zImfnfPXFzoGFJLzip9bU/x8kosfL+b+0DbwCKyCBrywXgk/HYNtsjI7flbob8qS2iDIqgsnfirnYR3gxZA3xY/ih7C318DPAgSRvLDVdowJydovhB8rYYXY0cKOnyhlNLA8DqgGxBlG/CTWM2fr2C+SC0Ce4kfx807Sk+4GSEvj8LNLWr1XnxQ/CxBn2PHjpIwG/OOTChmoC3z4WXn/PPBSVvGj+Lkufn7I/your_sha256_hashCeIeiTEMuOnyvndPKzDAvQlLvwk5ok52zyour_sha512_hashQkbvR0+your_sha512_hash+JH8aP4GZKyour_sha512_hashyour_sha512_hash/7xQ/your_sha512_hash/FD3VO8aP4UfwofhQyour_sha512_hash+KnKH4UP4qfa77hWV9yuOkbnqyour_sha512_hash+FH8KH4UP9+48MPAhJUDPw7oS5fBT5F1giys+AmCfjf2BK/xAq/your_sha256_hash/fAfOilr8VhU/HdshsATkKX4UP9+BuCDnaraNu/J4UQdyeEr8IJC3MuMnAGkNby48fl1d+GdAFT/nKAB5ih/Fz3sgLstZ4lBY8IMVqMPr4CeKeiQkMeMHxa9oQkkvMc2Kn1+G81P8KH4UP17M2NDgOPxEFLTi2V4IP1bSOwArcuNnAcL2AfsaJd2mbIqfa+your_sha256_hasha512_hashyour_sha512_hash/your_sha512_hash+AuWEHz5HiRyour_sha512_hash/VswjsbsI/DQRZt6HLH5LhmUQoPgJDIeU8BQ/ih8gr4r4mpFJY/FTxXygMl0LPwZRyCR9o8cP4your_sha512_hash+FD/vgL4gYOrHpNH4KUJO+u1q+AlCbqQEIfhBz77iB8uom4MRqPKoyour_sha512_hashvmxo+4I4qYoWiXw4+VsWODGPxgZtyour_sha512_hashzVtT/FwJP59hQoH7Y4479uRHzrkkJ+ScH6hwZXle2ogVKGqS8NMM62pnLAO3yTM86qX4MQzjCdEpfhQ/f8CEduaBrksU+Ml4V6uQc36gugdl2V5cRJBHYvyw/njKyCPBIv8ooKLiZyour_sha512_hashi55//pbd/HIYfmFJjXeG5IQl+your_sha512_hash+Y9uKHQXh19NNmOzdWKypyour_sha512_hashyour_sha512_hashp+se7DPjJjOtXFxiWKSgSP1gMz/GQx99+zbM/1KH4gSLi/VkQQUKKH8XPG5iTQx791ISEyour_sha512_hash+M7FYeUEZ+/FBtZEw0X5VveHdxsn0UPwb59WMKwZyS4kfxw/uwF8E5Ki0w8VzfgR9oXBdps+Ik/HiWTxcUNv1knImfuWbwVK8Y2pFLPxGPFD/Df9oeBlebkDdIK34UP38B00rzX+3mEYnx45meWTYFuwuEd6Aiv5Xp7cOKH8wGOjMBuzJE3w3Oc38nih/L/UXdXcz3MxQ/ip8vMC2PPa0G6M/1/fhx2FNks08HfizLexwN9rSL37EeH65Z6GpJiGRGWWcd3P2L7hQ/UJDzpQQuyPl6mOJH8fMHTMvNPdXDkvDRPNXi2I1zJVOg/LutvI/your_sha512_hash/NQMeEp8INpv/vKk4h/Ln1sTBH6qwXvSvEDbcz5t6PYJL1FUfGj+HkHE3PYWYvQea6nxw+0/stX/+TxVPwEnkdEAvbl6ecRGPFz1OKsw8HSrq9bzRgZKH7IJujaMp4+zPpR/Ch+PsHMMvYWbOehRo+your_sha512_hash/7CAjdm9oaD8jQn/your_sha256_hashFeu0Jnbkrzvhyl+FD/fYGqZfqRbc8Jh+Y4TFCV/bMABBfIHr1J87e+zwuvFeTvWZUR+/HSUXvSPiQ8fDWXO0MbOuaut+IFGMPx8ZaQj8Oupih/FD8zN4WOt0cBL1a3hyDzdfP9RrnPp04EfKIOkapbc7nh3DDR8oNXCrdkVkR8/3QW//IJ6NW6FCggEQ5sSR0wlKH4ohxTN3zmkiKvQb8crfhQ/72FyfsCZ3v7uSMsNB+dnbFS5aUbLjbuZF+a8TGXd6wvX4kh5nj4A5ujvknLj5ygE7/1i/7XF+y0U4k0iGNqk28YB8SGpKn4gPHayqnBb9nV78+lH8aP4eQuTMwkHVLJfrIMja/ctJCTIT9qo8Mpluu4Fjxjws2BvJYTNryG0vvcBNTwiOle7fcXOGPDDUJ1yV/uobRZeyiwP38ZT/FR8rJZjfUXBiw94JFI/ih/Fzx8wuwXPlKd/your_sha256_hashxwvbbh38Wc7uyour_sha512_hash+TcFAphLD5/yiEe9XDpx/Fj+LnPczPpQvix+KZCiLm69aOKfq5KX52uLOG4lP88E+/c+tH8aP4eQsM7RfED6yXxA//your_sha512_hashW67wWL4kfUTa8LYFXxAxafWT+KH8XPe+BpuSB+IFwaP1BweEn0XILiJ1z24Fb8wPbM+lH8KH6your_sha512_hash+LnI7Bl0vXwA/nS+your_sha512_hash//Mt+GjF+It8VlneiMDDg59yD8BUZa4qf0yI1VZiQ4kfx8wGeUz+JCj9gka/sifEDBUeXzjBRGDw/fuQvdhYzB5oWxc95b9SvQJ/iRyour_sha512_hashyour_sha512_hashDDg5x3wl3kOsECAH+azSe3CD/+Nr0X6jrUAlQs/TN6LJ17TtwFAUfycUj8ZpqT4Ufx8AQFFhhl9Avywn012mIIf2DhPeJnrcT8u/FiOLU72xE80FACAoPg5o342mJPiR/HzBp5RP8t9ZxRyour_sha512_hashIGa+O3TX00si5U2xc99LQm5axUmpfhRyour_sha512_hash+IDJfo/ms052M8Te4gNVVgxw/EU1+your_sha512_hash/zMw88PkFRtc58mILgccI15i4PJ+IHI+pCHCbPtA54TPxATw2Ne4/your_sha512_hash/MzEzyeQlm3TTo4AgQQ/DOtTsgEG/EBtrO8Ttm0uBXZe/IArp152YcLch4WM4oflHNxRW0BT/MzFz2cQl/HzbiuvFPhhWPCwA7DgB0xgfbmZyVNXv1hm/your_sha512_hashyour_sha512_hash/n4eQNSi+P5s7ryour_sha512_hashJGhM1vop0Hk4AeMTzi6YGFaLtPTTfEjlz+61ocfP4qfzyC6WMgPM1L80J9MggPgwA/BHHnKVdKOrfCrEht+OvjDQB8u/rQIv2pT/Ai++VUiXLN/+pfuFD+z8PMRpGczHX368SOFP8ECMOCH4iy5RniwJRCuHjkKbPih5E+2MD2XJ0wgeMXP47mccHwpV2BL8aP4eQvyM3ujnFwN81/4b1di+vRfo5nOkms0gqSMIQKIxwyour_sha512_hashjmpOj46/your_sha256_hashdrNLc3QwOPvQjk2bg5fyTPgh+SElAVchtzXCG3ZW8SPMPykvBrhT/Ch+vsGZcjE3vKuyVZCbiTnxj9ZJcnELr+kge2vgSAgs1wX647ucLT2AaNty9ondshvQJp+zGvYX9goCUvwoft4DQ9RX1aOWowPx2a3wy4coZ71fQ/j5chXC6v1iDRBXfWGYBuEby7uYC2L/jBtzbl/your_sha256_hash+Robdc8BXClnqRcjeDqCWJ0NV6/ipHZVV1vlY8aP4+your_sha256_hashyY5t/i1vKK3LTrQuDt+ajmU3xI1BL9bB7wpfhQ/8idyour_sha512_hashHRcV62DMf1/du3wRmEYgMGom6oQqCDsP+your_sha512_hash/MCWxIyour_sha512_hash+OmJn08A8QOIn6L4OQL0xA8gfsTPCNATP4D4ET+vGaAnfgDxI37uAD3xA4gf8fMIUBQ/gPgRP0eAnvgBxI/4GQG2jB9Ayour_sha512_hashiJH0D8iJ9ngJ74AcSP+HnN9ADxA4gf8XOmB4gfQPyIn5EeIH4A8SN+HukB4gcQP+JnHekB4gcQP+LnTg8QP4D4ET/P9ADxA4gf8XOlB4gfQPyIn3WkB4gfQPyInzM9QPwA4kf8jPQA8QOIH/HzSQ8QP4D4ET/XTA0QP4D4ET/rmx4gfgDxI37O9ADxA4gf8fNLDxA/gPgRP+/0APEDiB/x80gPEDyour_sha512_hashyour_sha512_hashEDiB9A/IgfQPwA4kf8AOIHED9fJ36ARw+/2fN8ABA/4gcAEDyour_sha512_hash/NwPAgCInzLxMwwAIH7qxM95AIAy8SN+RncBygDEj/i5GQRoASB+xI/tPgAgfsSPJ68CABA/4seTFwCIH/FzOw5QBiB+xM/9XYAyAPEjfi4CNAgQP+LHtQ8AiB/xMwnQIED8iB/XPgAgfsTPRYAyAPEjfq7uArQHED/ix24fABA/4mc4CFAFIH7Ez/1lgPYA4kf8ePECAPEjfiaDAADip0r83EwDAIifKvFzdRkAQPxUiZ/RLACA+KkSP6PzAADip0r8SB8AED+your_sha512_hash+IHABA/4gcAED/iBwAQPz9ovggAIH6KxM9ytQ4AIH5KxM9mu9sHABA/JeLn0K/TJABA/HwcPl3aBQCIn7c2W+EDAAWIn9cOx8Up7QMAxM982+seAKhA/BxeZU+XtgEA4mf+Knr6rt3qAQDEz+your_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAvAUC614+rQna2AAAAAElFTkSuQmCC" alt="logo" title="Built in Python with Datapane"> </a> </div> </div> </nav> </div> </body> </html> ```
```smalltalk /* This file is part of the iText (R) project. Authors: Apryse Software. This program is offered under a commercial and under the AGPL license. For commercial licensing, contact us at path_to_url For AGPL licensing, see below. AGPL licensing: This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the along with this program. If not, see <path_to_url */ using System; using System.Collections.Generic; using iText.Kernel.Geom; using iText.StyledXmlParser.Css.Pseudo; using iText.StyledXmlParser.Node; using iText.Test; namespace iText.StyledXmlParser.Css.Page { [NUnit.Framework.Category("UnitTest")] public class PageMarginBoxContextNodeTest : ExtendedITextTest { [NUnit.Framework.Test] public virtual void DefaultBehaviourTest() { String marginBoxName = "someName"; PageMarginBoxContextNode pageMarginBoxContextNode = new PageMarginBoxContextNode(new PageContextNode(), marginBoxName ); NUnit.Framework.Assert.AreEqual(marginBoxName, pageMarginBoxContextNode.GetMarginBoxName()); NUnit.Framework.Assert.AreEqual(PageMarginBoxContextNode.PAGE_MARGIN_BOX_TAG, pageMarginBoxContextNode.Name ()); NUnit.Framework.Assert.Catch(typeof(NotSupportedException), () => pageMarginBoxContextNode.GetLang()); NUnit.Framework.Assert.IsNull(pageMarginBoxContextNode.GetAdditionalHtmlStyles()); NUnit.Framework.Assert.Catch(typeof(NotSupportedException), () => pageMarginBoxContextNode.AddAdditionalHtmlStyles (new Dictionary<String, String>())); IAttributes attributes = pageMarginBoxContextNode.GetAttributes(); NUnit.Framework.Assert.IsNotNull(attributes); NUnit.Framework.Assert.AreEqual(0, attributes.Size()); String someKey = "someKey"; String someValue = "someValue"; NUnit.Framework.Assert.Catch(typeof(NotSupportedException), () => attributes.SetAttribute(someKey, someValue )); NUnit.Framework.Assert.IsNull(attributes.GetAttribute(someKey)); NUnit.Framework.Assert.IsNull(pageMarginBoxContextNode.GetAttribute(someKey)); NUnit.Framework.Assert.IsNull(pageMarginBoxContextNode.GetContainingBlockForMarginBox()); Rectangle someRectangle = new Rectangle(100, 100); pageMarginBoxContextNode.SetContainingBlockForMarginBox(someRectangle); NUnit.Framework.Assert.AreEqual(someRectangle, pageMarginBoxContextNode.GetContainingBlockForMarginBox()); NUnit.Framework.Assert.IsNull(pageMarginBoxContextNode.GetPageMarginBoxRectangle()); Rectangle someRectangle2 = new Rectangle(200, 200); pageMarginBoxContextNode.SetPageMarginBoxRectangle(someRectangle2); NUnit.Framework.Assert.AreEqual(someRectangle2, pageMarginBoxContextNode.GetPageMarginBoxRectangle()); } [NUnit.Framework.Test] public virtual void ParentNotPageTest() { // Create some invalid node PageContextNode pageContextNode = new PageContextNode(); CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(pageContextNode, "test"); // Pass this mode to the constructor Exception e = NUnit.Framework.Assert.Catch(typeof(ArgumentException), () => new PageMarginBoxContextNode(pseudoElementNode , "test")); NUnit.Framework.Assert.AreEqual("Page-margin-box context node shall have a page context node as parent.", e.Message); } } } ```
```ruby require "action_view/context" require "action_view/helpers" module Trestle class Form class Renderer include ::ActionView::Context include ::ActionView::Helpers::CaptureHelper # Include hook helpers directly so that they are evaluated in the context of the renderer instead of the template. include Hook::Helpers # Whitelisted helpers will concatenate their result to the output buffer when called. WHITELISTED_HELPERS = [:row, :col, :render, :tab, :table, :divider, :h1, :h2, :h3, :h4, :h5, :h6, :card, :panel, :well, :turbo_frame_tag] # Raw block helpers will pass their block argument directly to the method without wrapping it in a new output buffer. RAW_BLOCK_HELPERS = [:table, :toolbar] # The #select and #display methods are defined on Kernel. Undefine them so # that they can be delegated to the form builder or template by method_missing. undef_method :select, :display # These methods defined in ActionView::Helpers::CaptureHelper should be called directly on the existing template object. delegate :content_for, :content_for?, :provide, to: :@template delegate :concat, to: :output_buffer def initialize(template, form=nil) @template = template @form = form || @template.form end def render_form(*args, &block) capture { instance_exec(*args, &block).to_s } end def fields_for(*args, &block) result = @form.fields_for(*args) do |f| renderer = self.class.new(@template, f) renderer.render_form(f, &block) end concat(result) end def method_missing(name, *args, &block) target = @form.respond_to?(name) ? @form : @template if block_given? && !RAW_BLOCK_HELPERS.include?(name) result = target.send(name, *args) do |*blockargs| render_form(*blockargs, &block) end else result = target.send(name, *args, &block) end if target == @form || WHITELISTED_HELPERS.include?(name) concat(result) else result end end ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true) def respond_to_missing?(name, include_all=false) @form.respond_to?(name, include_all) || @template.respond_to?(name, include_all) || super end end end end ```
```javascript // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const common = require('../common'); const net = require('net'); process.once('beforeExit', common.mustCall(tryImmediate)); function tryImmediate() { setImmediate(common.mustCall(() => { process.once('beforeExit', common.mustCall(tryTimer)); })); } function tryTimer() { setTimeout(common.mustCall(() => { process.once('beforeExit', common.mustCall(tryListen)); }), 1); } function tryListen() { net.createServer() .listen(0) .on('listening', common.mustCall(function() { this.close(); process.once('beforeExit', common.mustCall(tryRepeatedTimer)); })); } // Test that a function invoked from the beforeExit handler can use a timer // to keep the event loop open, which can use another timer to keep the event // loop open, etc. function tryRepeatedTimer() { const N = 5; let n = 0; const repeatedTimer = common.mustCall(function() { if (++n < N) setTimeout(repeatedTimer, 1); }, N); setTimeout(repeatedTimer, 1); } ```
```smalltalk The source code in this file is covered under a dual-license scenario: - RCL: for OPC Foundation Corporate Members in good-standing - GPL V2: everybody else This source code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ using System; using System.Collections.Generic; using System.Text; namespace Opc.Ua { partial class ExclusiveLimitStateMachineState { #region Initialization /// <summary> /// Initializes the object as a collection of counters which change value on read. /// </summary> protected override void OnAfterCreate(ISystemContext context, NodeState node) { base.OnAfterCreate(context, node); UpdateStateVariable(context, Objects.ExclusiveLimitStateMachineType_High, CurrentState); UpdateTransitionVariable(context, 0, LastTransition); } #endregion #region Overridden Members /// <summary> /// The table of states belonging to the state machine. /// </summary> protected override ElementInfo[] StateTable { get { return s_StateTable; } } /// <summary> /// A table of valid states. /// </summary> private ElementInfo[] s_StateTable = new ElementInfo[] { new ElementInfo(Objects.ExclusiveLimitStateMachineType_HighHigh, BrowseNames.HighHigh, 1), new ElementInfo(Objects.ExclusiveLimitStateMachineType_High, BrowseNames.High, 2), new ElementInfo(Objects.ExclusiveLimitStateMachineType_Low, BrowseNames.Low, 3), new ElementInfo(Objects.ExclusiveLimitStateMachineType_LowLow, BrowseNames.LowLow, 4) }; /// <summary> /// The table of transitions belonging to the state machine. /// </summary> protected override ElementInfo[] TransitionTable { get { return s_TransitionTable; } } /// <summary> /// A table of valid transitions. /// </summary> private ElementInfo[] s_TransitionTable = new ElementInfo[] { new ElementInfo(Objects.ExclusiveLimitStateMachineType_HighHighToHigh, BrowseNames.HighHighToHigh, 1), new ElementInfo(Objects.ExclusiveLimitStateMachineType_HighToHighHigh, BrowseNames.HighToHighHigh, 2), new ElementInfo(Objects.ExclusiveLimitStateMachineType_LowLowToLow, BrowseNames.LowLowToLow, 3), new ElementInfo(Objects.ExclusiveLimitStateMachineType_LowToLowLow, BrowseNames.LowToLowLow, 4) }; /// <summary> /// The mapping between transitions and their from and to states. /// </summary> protected override uint[,] TransitionMappings { get { return s_TransitionMappings; } } /// <summary> /// A table of the to and from states for the transitions. /// </summary> private uint[,] s_TransitionMappings = new uint[,] { { Objects.ExclusiveLimitStateMachineType_HighHighToHigh, Objects.ExclusiveLimitStateMachineType_HighHigh, Objects.ExclusiveLimitStateMachineType_High, 0 }, { Objects.ExclusiveLimitStateMachineType_HighToHighHigh, Objects.ExclusiveLimitStateMachineType_High, Objects.ExclusiveLimitStateMachineType_HighHigh, 0 }, { Objects.ExclusiveLimitStateMachineType_LowLowToLow, Objects.ExclusiveLimitStateMachineType_LowLow, Objects.ExclusiveLimitStateMachineType_Low, 0 }, { Objects.ExclusiveLimitStateMachineType_LowToLowLow, Objects.ExclusiveLimitStateMachineType_Low, Objects.ExclusiveLimitStateMachineType_LowLow, 0 } }; #endregion } } ```
Psyche was an online peer-reviewed academic journal covering studies on consciousness and its relation to the brain from perspectives provided by the disciplines of cognitive science, philosophy, psychology, physics, neuroscience, artificial intelligence, and anthropology. It was established in 1993. In 2008 it became the official journal of the Association for the Scientific Study of Consciousness. Psyche is no longer accepting articles, but the archive remains accessible. External links Psyche website and archive of issues 1994–2010 Official website of the ASSC Biannual journals Cognitive science journals Works about consciousness English-language journals Publications disestablished in 2010 Academic journals established in 1994
```swift // // WebCodeBuilder+createGetTextAction.swift (Detox) // Created by Asaf Korem (Wix.com) on 2024. // /// Extends `WebCodeBuilder` with the ability to create a web get text action JS code. extension WebCodeBuilder { /// Creates a JS code that gets the text of an given element. func createGetTextAction(selector: String) -> String { return """ ((element) => { if (!element) { throw new Error('Element not found'); } return element.textContent.length > 0 ? element.textContent : element.value; })(\(selector)); """ } } ```
Uffelte is a village in the Dutch province of Drenthe. It is a part of the municipality of Westerveld, and lies about 15 km west of Hoogeveen. Uffelte was first mentioned as Ulfo in 1040 when Emperor Henry III donated estates from a certain Uffo and his brothers, located in Uffelte, Wittelte and Peelo, to Bishop Bernold of Utrecht.Wittelte Uffelte is an esdorp on a sandy ridge. The village has two large communal pastures and a village square. The villages of Uffelte and Darp decided to build a joint church halfway between the two villages. The church was built in 1310, and the village of Havelte developed around the church. Uffelte received its own church in 1910, when the Dutch Reformed church was built. Uffelte was home to 651 people in 1840. Gallery References Populated places in Drenthe Westerveld
```javascript const electron = require("electron"); const ipc = electron.ipcRenderer; const $ = window.jQuery = require('../jquery-2.2.3.min.js'); ipc.on("set-about-data", (event, data) => { $("#version-inky").text("Inky version: "+data.inkyVersion); $("#version-ink").text("ink version: "+data.inkVersion); $("#version-inkjs").text("inkjs version: "+data.inkjsVersion); }); function updateTheme(event, newTheme) { let themes = ["dark", "contrast", "focus"]; themes = themes.filter(e => e !== newTheme); if (newTheme && newTheme.toLowerCase() !== 'main') { $(".body").addClass(newTheme); } for (const theme of themes) { $(".body").removeClass(theme); } } updateTheme(null, window.localStorage.getItem("theme")); ipc.on("change-theme", updateTheme); ```
Chirayinkeezhu railway station (Code:CRY) is a NSG 5 D category railway station in Thiruvananthapuram District, Kerala, and falls under the Thiruvananthapuram railway division of the Southern Railway zone, Indian Railways. It is the 7th most revenue generating and 6th busiest railway station in Trivandrum district. The station is situated in the Chirayinkeezhu panchayat of Trivandrum. Details of annual passenger earnings from Chirayinkeezhu railway station Service Some of the major trains having halt at the station. Passenger Trains References Railway stations in India opened in 1904 Railway stations in Thiruvananthapuram district Thiruvananthapuram railway division
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; // MODULES // var bench = require( '@stdlib/bench' ); var pow = require( '@stdlib/math/base/special/pow' ); var isUint16Array = require( '@stdlib/assert/is-uint16array' ); var pkg = require( './../package.json' ).name; var Uint16Array = require( './../lib' ); // FUNCTIONS // /** * Creates a benchmark function. * * @private * @param {PositiveInteger} len - array length * @returns {Function} benchmark function */ function createBenchmark( len ) { var arr = new Uint16Array( len ); return benchmark; /** * Benchmark function. * * @private * @param {Benchmark} b - benchmark instance */ function benchmark( b ) { var out; var i; b.tic(); for ( i = 0; i < b.iterations; i++ ) { out = arr.subarray(); if ( typeof out !== 'object' ) { b.fail( 'should return an object' ); } } b.toc(); if ( !isUint16Array( out ) ) { b.fail( 'should return a Uint16Array' ); } b.pass( 'benchmark finished' ); b.end(); } } // MAIN // /** * Main execution sequence. * * @private */ function main() { var len; var min; var max; var f; var i; min = 1; // 10^min max = 6; // 10^max for ( i = min; i <= max; i++ ) { len = pow( 10, i ); f = createBenchmark( len ); bench( pkg+':subarray:len='+len, f ); } } main(); ```
```go package profile import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic/registry" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" calico "github.com/projectcalico/api/pkg/apis/projectcalico/v3" "github.com/projectcalico/calico/apiserver/pkg/registry/projectcalico/server" ) // rest implements a RESTStorage for API services against etcd type REST struct { *genericregistry.Store shortNames []string } func (r *REST) ShortNames() []string { return r.shortNames } func (r *REST) Categories() []string { return []string{""} } // EmptyObject returns an empty instance func EmptyObject() runtime.Object { return &calico.Profile{} } // NewList returns a new shell of a binding list func NewList() runtime.Object { return &calico.ProfileList{} } // NewREST returns a RESTStorage object that will work against API services. func NewREST(scheme *runtime.Scheme, opts server.Options) (*REST, error) { strategy := NewStrategy(scheme) prefix := "/" + opts.ResourcePrefix() // We adapt the store's keyFunc so that we can use it with the StorageDecorator // without making any assumptions about where objects are stored in etcd keyFunc := func(obj runtime.Object) (string, error) { accessor, err := meta.Accessor(obj) if err != nil { return "", err } return registry.NoNamespaceKeyFunc( genericapirequest.NewContext(), prefix, accessor.GetName(), ) } storageInterface, dFunc, err := opts.GetStorage( prefix, keyFunc, strategy, func() runtime.Object { return &calico.Profile{} }, func() runtime.Object { return &calico.ProfileList{} }, GetAttrs, nil, nil, ) if err != nil { return nil, err } store := &genericregistry.Store{ NewFunc: func() runtime.Object { return &calico.Profile{} }, NewListFunc: func() runtime.Object { return &calico.ProfileList{} }, KeyRootFunc: opts.KeyRootFunc(false), KeyFunc: opts.KeyFunc(false), ObjectNameFunc: func(obj runtime.Object) (string, error) { return obj.(*calico.Profile).Name, nil }, PredicateFunc: MatchProfile, DefaultQualifiedResource: calico.Resource("profiles"), CreateStrategy: strategy, UpdateStrategy: strategy, DeleteStrategy: strategy, EnableGarbageCollection: true, Storage: storageInterface, DestroyFunc: dFunc, } return &REST{store, opts.ShortNames}, nil } ```
```ruby # Reference: path_to_url class Macvim < Formula desc "GUI for vim, made for macOS" homepage "path_to_url" url "path_to_url" version "9.1.0" sha256 your_sha256_hash license "Vim" head "path_to_url", branch: "master" # The stable Git tags use a `release-123` format and it's necessary to check # the GitHub release description to identify the Vim version from the # "Updated to Vim 1.2.3456" text. livecheck do url :stable regex(/Updated\s+to\s+Vim\s+v?(\d+(?:\.\d+)+)/i) strategy :github_latest do |json, regex| match = json["body"]&.match(regex) next if match.blank? match[1] end end bottle do sha256 cellar: :any, arm64_sonoma: your_sha256_hash sha256 cellar: :any, arm64_ventura: your_sha256_hash sha256 cellar: :any, arm64_monterey: your_sha256_hash sha256 cellar: :any, sonoma: your_sha256_hash sha256 cellar: :any, ventura: your_sha256_hash sha256 cellar: :any, monterey: your_sha256_hash end depends_on "gettext" => :build depends_on "libsodium" => :build depends_on xcode: :build depends_on "cscope" depends_on "lua" depends_on :macos depends_on "python@3.12" depends_on "ruby" conflicts_with "ex-vi", because: "both install `vi` and `view` binaries" conflicts_with "vim", because: "both install vi* binaries" def install # Avoid issues finding Ruby headers ENV.delete("SDKROOT") # MacVim doesn't have or require any Python package, so unset PYTHONPATH ENV.delete("PYTHONPATH") # We don't want the deployment target to include the minor version on Big Sur and newer. # path_to_url ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # make sure that CC is set to "clang" ENV.clang system "./configure", "--with-features=huge", "--enable-multibyte", "--enable-perlinterp", "--enable-rubyinterp", "--enable-tclinterp", "--enable-terminal", "--with-tlib=ncurses", "--with-compiledby=Homebrew", "--with-local-dir=#{HOMEBREW_PREFIX}", "--enable-cscope", "--enable-luainterp", "--with-lua-prefix=#{Formula["lua"].opt_prefix}", "--enable-luainterp", "--enable-python3interp", "--disable-sparkle", "--with-macarchs=#{Hardware::CPU.arch}" system "make" prefix.install "src/MacVim/build/Release/MacVim.app" bin.install_symlink prefix/"MacVim.app/Contents/bin/mvim" # Create MacVim vimdiff, view, ex equivalents executables = %w[mvimdiff mview mvimex gvim gvimdiff gview gvimex] executables += %w[vi vim vimdiff view vimex] executables.each { |e| bin.install_symlink "mvim" => e } end test do output = shell_output("#{bin}/mvim --version") assert_match "+ruby", output assert_match "+gettext", output assert_match "+sodium", output # Simple test to check if MacVim was linked to Homebrew's Python 3 py3_exec_prefix = shell_output(Formula["python@3.12"].opt_libexec/"bin/python-config --exec-prefix") assert_match py3_exec_prefix.chomp, output (testpath/"commands.vim").write <<~EOS :python3 import vim; vim.current.buffer[0] = 'hello python3' :wq EOS system bin/"mvim", "-v", "-T", "dumb", "-s", "commands.vim", "test.txt" assert_equal "hello python3", (testpath/"test.txt").read.chomp end end ```
```objective-c #ifndef DLIB_fHOG_Hh_ #define DLIB_fHOG_Hh_ #include "fhog_abstract.h" #include "../matrix.h" #include "../array2d.h" #include "../array.h" #include "../geometry.h" #include "assign_image.h" #include "draw.h" #include "interpolation.h" #include "../simd.h" namespace dlib { // your_sha256_hash------------------------ namespace impl_fhog { template <typename image_type, typename T> inline typename dlib::enable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient ( const int r, const int c, const image_type& img, matrix<T,2,1>& grad, T& len ) { matrix<T, 2, 1> grad2, grad3; // get the red gradient grad(0) = (int)img[r][c+1].red-(int)img[r][c-1].red; grad(1) = (int)img[r+1][c].red-(int)img[r-1][c].red; len = length_squared(grad); // get the green gradient grad2(0) = (int)img[r][c+1].green-(int)img[r][c-1].green; grad2(1) = (int)img[r+1][c].green-(int)img[r-1][c].green; T v2 = length_squared(grad2); // get the blue gradient grad3(0) = (int)img[r][c+1].blue-(int)img[r][c-1].blue; grad3(1) = (int)img[r+1][c].blue-(int)img[r-1][c].blue; T v3 = length_squared(grad3); // pick color with strongest gradient if (v2 > len) { len = v2; grad = grad2; } if (v3 > len) { len = v3; grad = grad3; } } template <typename image_type> inline typename dlib::enable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient ( const int r, const int c, const image_type& img, simd4f& grad_x, simd4f& grad_y, simd4f& len ) { simd4i rleft((int)img[r][c-1].red, (int)img[r][c].red, (int)img[r][c+1].red, (int)img[r][c+2].red); simd4i rright((int)img[r][c+1].red, (int)img[r][c+2].red, (int)img[r][c+3].red, (int)img[r][c+4].red); simd4i rtop((int)img[r-1][c].red, (int)img[r-1][c+1].red, (int)img[r-1][c+2].red, (int)img[r-1][c+3].red); simd4i rbottom((int)img[r+1][c].red, (int)img[r+1][c+1].red, (int)img[r+1][c+2].red, (int)img[r+1][c+3].red); simd4i gleft((int)img[r][c-1].green, (int)img[r][c].green, (int)img[r][c+1].green, (int)img[r][c+2].green); simd4i gright((int)img[r][c+1].green, (int)img[r][c+2].green, (int)img[r][c+3].green, (int)img[r][c+4].green); simd4i gtop((int)img[r-1][c].green, (int)img[r-1][c+1].green, (int)img[r-1][c+2].green, (int)img[r-1][c+3].green); simd4i gbottom((int)img[r+1][c].green, (int)img[r+1][c+1].green, (int)img[r+1][c+2].green, (int)img[r+1][c+3].green); simd4i bleft((int)img[r][c-1].blue, (int)img[r][c].blue, (int)img[r][c+1].blue, (int)img[r][c+2].blue); simd4i bright((int)img[r][c+1].blue, (int)img[r][c+2].blue, (int)img[r][c+3].blue, (int)img[r][c+4].blue); simd4i btop((int)img[r-1][c].blue, (int)img[r-1][c+1].blue, (int)img[r-1][c+2].blue, (int)img[r-1][c+3].blue); simd4i bbottom((int)img[r+1][c].blue, (int)img[r+1][c+1].blue, (int)img[r+1][c+2].blue, (int)img[r+1][c+3].blue); simd4i grad_x_red = rright-rleft; simd4i grad_y_red = rbottom-rtop; simd4i grad_x_green = gright-gleft; simd4i grad_y_green = gbottom-gtop; simd4i grad_x_blue = bright-bleft; simd4i grad_y_blue = bbottom-btop; simd4i rlen = grad_x_red*grad_x_red + grad_y_red*grad_y_red; simd4i glen = grad_x_green*grad_x_green + grad_y_green*grad_y_green; simd4i blen = grad_x_blue*grad_x_blue + grad_y_blue*grad_y_blue; simd4i cmp = rlen>glen; simd4i tgrad_x = select(cmp,grad_x_red,grad_x_green); simd4i tgrad_y = select(cmp,grad_y_red,grad_y_green); simd4i tlen = select(cmp,rlen,glen); cmp = tlen>blen; grad_x = select(cmp,tgrad_x,grad_x_blue); grad_y = select(cmp,tgrad_y,grad_y_blue); len = select(cmp,tlen,blen); } // your_sha256_hash-------------------- template <typename image_type> inline typename dlib::enable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient( const int r, const int c, const image_type& img, simd8f& grad_x, simd8f& grad_y, simd8f& len ) { simd8i rleft((int)img[r][c - 1].red, (int)img[r][c].red, (int)img[r][c + 1].red, (int)img[r][c + 2].red, (int)img[r][c + 3].red, (int)img[r][c + 4].red, (int)img[r][c + 5].red, (int)img[r][c + 6].red); simd8i rright((int)img[r][c + 1].red, (int)img[r][c + 2].red, (int)img[r][c + 3].red, (int)img[r][c + 4].red, (int)img[r][c + 5].red, (int)img[r][c + 6].red, (int)img[r][c + 7].red, (int)img[r][c + 8].red); simd8i rtop((int)img[r - 1][c].red, (int)img[r - 1][c + 1].red, (int)img[r - 1][c + 2].red, (int)img[r - 1][c + 3].red, (int)img[r - 1][c + 4].red, (int)img[r - 1][c + 5].red, (int)img[r - 1][c + 6].red, (int)img[r - 1][c + 7].red); simd8i rbottom((int)img[r + 1][c].red, (int)img[r + 1][c + 1].red, (int)img[r + 1][c + 2].red, (int)img[r + 1][c + 3].red, (int)img[r + 1][c + 4].red, (int)img[r + 1][c + 5].red, (int)img[r + 1][c + 6].red, (int)img[r + 1][c + 7].red); simd8i gleft((int)img[r][c - 1].green, (int)img[r][c].green, (int)img[r][c + 1].green, (int)img[r][c + 2].green, (int)img[r][c + 3].green, (int)img[r][c + 4].green, (int)img[r][c + 5].green, (int)img[r][c + 6].green); simd8i gright((int)img[r][c + 1].green, (int)img[r][c + 2].green, (int)img[r][c + 3].green, (int)img[r][c + 4].green, (int)img[r][c + 5].green, (int)img[r][c + 6].green, (int)img[r][c + 7].green, (int)img[r][c + 8].green); simd8i gtop((int)img[r - 1][c].green, (int)img[r - 1][c + 1].green, (int)img[r - 1][c + 2].green, (int)img[r - 1][c + 3].green, (int)img[r - 1][c + 4].green, (int)img[r - 1][c + 5].green, (int)img[r - 1][c + 6].green, (int)img[r - 1][c + 7].green); simd8i gbottom((int)img[r + 1][c].green, (int)img[r + 1][c + 1].green, (int)img[r + 1][c + 2].green, (int)img[r + 1][c + 3].green, (int)img[r + 1][c + 4].green, (int)img[r + 1][c + 5].green, (int)img[r + 1][c + 6].green, (int)img[r + 1][c + 7].green); simd8i bleft((int)img[r][c - 1].blue, (int)img[r][c].blue, (int)img[r][c + 1].blue, (int)img[r][c + 2].blue, (int)img[r][c + 3].blue, (int)img[r][c + 4].blue, (int)img[r][c + 5].blue, (int)img[r][c + 6].blue); simd8i bright((int)img[r][c + 1].blue, (int)img[r][c + 2].blue, (int)img[r][c + 3].blue, (int)img[r][c + 4].blue, (int)img[r][c + 5].blue, (int)img[r][c + 6].blue, (int)img[r][c + 7].blue, (int)img[r][c + 8].blue); simd8i btop((int)img[r - 1][c].blue, (int)img[r - 1][c + 1].blue, (int)img[r - 1][c + 2].blue, (int)img[r - 1][c + 3].blue, (int)img[r - 1][c + 4].blue, (int)img[r - 1][c + 5].blue, (int)img[r - 1][c + 6].blue, (int)img[r - 1][c + 7].blue); simd8i bbottom((int)img[r + 1][c].blue, (int)img[r + 1][c + 1].blue, (int)img[r + 1][c + 2].blue, (int)img[r + 1][c + 3].blue, (int)img[r + 1][c + 4].blue, (int)img[r + 1][c + 5].blue, (int)img[r + 1][c + 6].blue, (int)img[r + 1][c + 7].blue); simd8i grad_x_red = rright - rleft; simd8i grad_y_red = rbottom - rtop; simd8i grad_x_green = gright - gleft; simd8i grad_y_green = gbottom - gtop; simd8i grad_x_blue = bright - bleft; simd8i grad_y_blue = bbottom - btop; simd8i rlen = grad_x_red*grad_x_red + grad_y_red*grad_y_red; simd8i glen = grad_x_green*grad_x_green + grad_y_green*grad_y_green; simd8i blen = grad_x_blue*grad_x_blue + grad_y_blue*grad_y_blue; simd8i cmp = rlen > glen; simd8i tgrad_x = select(cmp, grad_x_red, grad_x_green); simd8i tgrad_y = select(cmp, grad_y_red, grad_y_green); simd8i tlen = select(cmp, rlen, glen); cmp = tlen > blen; grad_x = select(cmp, tgrad_x, grad_x_blue); grad_y = select(cmp, tgrad_y, grad_y_blue); len = select(cmp, tlen, blen); } // your_sha256_hash-------------------- template <typename image_type, typename T> inline typename dlib::disable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient ( const int r, const int c, const image_type& img, matrix<T, 2, 1>& grad, T& len ) { grad(0) = (int)get_pixel_intensity(img[r][c+1])-(int)get_pixel_intensity(img[r][c-1]); grad(1) = (int)get_pixel_intensity(img[r+1][c])-(int)get_pixel_intensity(img[r-1][c]); len = length_squared(grad); } template <typename image_type> inline typename dlib::disable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient ( int r, int c, const image_type& img, simd4f& grad_x, simd4f& grad_y, simd4f& len ) { simd4i left((int)get_pixel_intensity(img[r][c-1]), (int)get_pixel_intensity(img[r][c]), (int)get_pixel_intensity(img[r][c+1]), (int)get_pixel_intensity(img[r][c+2])); simd4i right((int)get_pixel_intensity(img[r][c+1]), (int)get_pixel_intensity(img[r][c+2]), (int)get_pixel_intensity(img[r][c+3]), (int)get_pixel_intensity(img[r][c+4])); simd4i top((int)get_pixel_intensity(img[r-1][c]), (int)get_pixel_intensity(img[r-1][c+1]), (int)get_pixel_intensity(img[r-1][c+2]), (int)get_pixel_intensity(img[r-1][c+3])); simd4i bottom((int)get_pixel_intensity(img[r+1][c]), (int)get_pixel_intensity(img[r+1][c+1]), (int)get_pixel_intensity(img[r+1][c+2]), (int)get_pixel_intensity(img[r+1][c+3])); grad_x = right-left; grad_y = bottom-top; len = (grad_x*grad_x + grad_y*grad_y); } // your_sha256_hash-------------------- template <typename image_type> inline typename dlib::disable_if_c<pixel_traits<typename image_type::pixel_type>::rgb>::type get_gradient( int r, int c, const image_type& img, simd8f& grad_x, simd8f& grad_y, simd8f& len ) { simd8i left((int)get_pixel_intensity(img[r][c - 1]), (int)get_pixel_intensity(img[r][c]), (int)get_pixel_intensity(img[r][c + 1]), (int)get_pixel_intensity(img[r][c + 2]), (int)get_pixel_intensity(img[r][c + 3]), (int)get_pixel_intensity(img[r][c + 4]), (int)get_pixel_intensity(img[r][c + 5]), (int)get_pixel_intensity(img[r][c + 6])); simd8i right((int)get_pixel_intensity(img[r][c + 1]), (int)get_pixel_intensity(img[r][c + 2]), (int)get_pixel_intensity(img[r][c + 3]), (int)get_pixel_intensity(img[r][c + 4]), (int)get_pixel_intensity(img[r][c + 5]), (int)get_pixel_intensity(img[r][c + 6]), (int)get_pixel_intensity(img[r][c + 7]), (int)get_pixel_intensity(img[r][c + 8])); simd8i top((int)get_pixel_intensity(img[r - 1][c]), (int)get_pixel_intensity(img[r - 1][c + 1]), (int)get_pixel_intensity(img[r - 1][c + 2]), (int)get_pixel_intensity(img[r - 1][c + 3]), (int)get_pixel_intensity(img[r - 1][c + 4]), (int)get_pixel_intensity(img[r - 1][c + 5]), (int)get_pixel_intensity(img[r - 1][c + 6]), (int)get_pixel_intensity(img[r - 1][c + 7])); simd8i bottom((int)get_pixel_intensity(img[r + 1][c]), (int)get_pixel_intensity(img[r + 1][c + 1]), (int)get_pixel_intensity(img[r + 1][c + 2]), (int)get_pixel_intensity(img[r + 1][c + 3]), (int)get_pixel_intensity(img[r + 1][c + 4]), (int)get_pixel_intensity(img[r + 1][c + 5]), (int)get_pixel_intensity(img[r + 1][c + 6]), (int)get_pixel_intensity(img[r + 1][c + 7])); grad_x = right - left; grad_y = bottom - top; len = (grad_x*grad_x + grad_y*grad_y); } // your_sha256_hash-------------------- template <typename T, typename mm1, typename mm2> inline void set_hog ( dlib::array<array2d<T,mm1>,mm2>& hog, int o, int x, int y, const float& value ) { hog[o][y][x] = value; } template <typename T, typename mm1, typename mm2> void init_hog ( dlib::array<array2d<T,mm1>,mm2>& hog, int hog_nr, int hog_nc, int filter_rows_padding, int filter_cols_padding ) { const int num_hog_bands = 27+4; hog.resize(num_hog_bands); for (int i = 0; i < num_hog_bands; ++i) { hog[i].set_size(hog_nr+filter_rows_padding-1, hog_nc+filter_cols_padding-1); rectangle rect = get_rect(hog[i]); rect.top() += (filter_rows_padding-1)/2; rect.left() += (filter_cols_padding-1)/2; rect.right() -= filter_cols_padding/2; rect.bottom() -= filter_rows_padding/2; zero_border_pixels(hog[i],rect); } } template <typename T, typename mm1, typename mm2> void init_hog_zero_everything ( dlib::array<array2d<T,mm1>,mm2>& hog, int hog_nr, int hog_nc, int filter_rows_padding, int filter_cols_padding ) { const int num_hog_bands = 27+4; hog.resize(num_hog_bands); for (int i = 0; i < num_hog_bands; ++i) { hog[i].set_size(hog_nr+filter_rows_padding-1, hog_nc+filter_cols_padding-1); assign_all_pixels(hog[i], 0); } } // your_sha256_hash-------------------- template <typename T, typename mm> inline void set_hog ( array2d<matrix<T,31,1>,mm>& hog, int o, int x, int y, const float& value ) { hog[y][x](o) = value; } template <typename T, typename mm> void init_hog ( array2d<matrix<T,31,1>,mm>& hog, int hog_nr, int hog_nc, int filter_rows_padding, int filter_cols_padding ) { hog.set_size(hog_nr+filter_rows_padding-1, hog_nc+filter_cols_padding-1); // now zero out the border region rectangle rect = get_rect(hog); rect.top() += (filter_rows_padding-1)/2; rect.left() += (filter_cols_padding-1)/2; rect.right() -= filter_cols_padding/2; rect.bottom() -= filter_rows_padding/2; border_enumerator be(get_rect(hog),rect); while (be.move_next()) { const point p = be.element(); set_all_elements(hog[p.y()][p.x()], 0); } } template <typename T, typename mm> void init_hog_zero_everything ( array2d<matrix<T,31,1>,mm>& hog, int hog_nr, int hog_nc, int filter_rows_padding, int filter_cols_padding ) { hog.set_size(hog_nr+filter_rows_padding-1, hog_nc+filter_cols_padding-1); for (long r = 0; r < hog.nr(); ++r) { for (long c = 0; c < hog.nc(); ++c) { set_all_elements(hog[r][c], 0); } } } // your_sha256_hash-------------------- template < typename image_type, typename out_type > void impl_extract_fhog_features_cell_size_1( const image_type& img_, out_type& hog, int filter_rows_padding, int filter_cols_padding ) { const_image_view<image_type> img(img_); // make sure requires clause is not broken DLIB_ASSERT( filter_rows_padding > 0 && filter_cols_padding > 0 , "\t void extract_fhog_features()" << "\n\t Invalid inputs were given to this function. " << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); /* This function is an optimized version of impl_extract_fhog_features() for the case where cell_size == 1. */ // unit vectors used to compute gradient orientation matrix<float,2,1> directions[9]; directions[0] = 1.0000, 0.0000; directions[1] = 0.9397, 0.3420; directions[2] = 0.7660, 0.6428; directions[3] = 0.500, 0.8660; directions[4] = 0.1736, 0.9848; directions[5] = -0.1736, 0.9848; directions[6] = -0.5000, 0.8660; directions[7] = -0.7660, 0.6428; directions[8] = -0.9397, 0.3420; if (img.nr() <= 2 || img.nc() <= 2) { hog.clear(); return; } array2d<unsigned char> angle(img.nr(), img.nc()); array2d<float> norm(img.nr(), img.nc()); zero_border_pixels(norm,1,1); // memory for HOG features const long hog_nr = img.nr()-2; const long hog_nc = img.nc()-2; const int padding_rows_offset = (filter_rows_padding-1)/2; const int padding_cols_offset = (filter_cols_padding-1)/2; init_hog_zero_everything(hog, hog_nr, hog_nc, filter_rows_padding, filter_cols_padding); const int visible_nr = img.nr()-1; const int visible_nc = img.nc()-1; // First populate the gradient histograms for (int y = 1; y < visible_nr; y++) { int x; for (x = 1; x < visible_nc - 7; x += 8) { // v will be the length of the gradient vectors. simd8f grad_x, grad_y, v; get_gradient(y, x, img, grad_x, grad_y, v); float _vv[8]; v.store(_vv); // Now snap the gradient to one of 18 orientations simd8f best_dot = 0; simd8f best_o = 0; for (int o = 0; o < 9; o++) { simd8f dot = grad_x*directions[o](0) + grad_y*directions[o](1); simd8f_bool cmp = dot>best_dot; best_dot = select(cmp, dot, best_dot); dot *= -1; best_o = select(cmp, o, best_o); cmp = dot > best_dot; best_dot = select(cmp, dot, best_dot); best_o = select(cmp, o + 9, best_o); } int32 _best_o[8]; simd8i(best_o).store(_best_o); norm[y][x + 0] = _vv[0]; norm[y][x + 1] = _vv[1]; norm[y][x + 2] = _vv[2]; norm[y][x + 3] = _vv[3]; norm[y][x + 4] = _vv[4]; norm[y][x + 5] = _vv[5]; norm[y][x + 6] = _vv[6]; norm[y][x + 7] = _vv[7]; angle[y][x + 0] = _best_o[0]; angle[y][x + 1] = _best_o[1]; angle[y][x + 2] = _best_o[2]; angle[y][x + 3] = _best_o[3]; angle[y][x + 4] = _best_o[4]; angle[y][x + 5] = _best_o[5]; angle[y][x + 6] = _best_o[6]; angle[y][x + 7] = _best_o[7]; } // Now process the right columns that don't fit into simd registers. for (; x < visible_nc; x++) { matrix<float,2,1> grad; float v; get_gradient(y,x,img,grad,v); // snap to one of 18 orientations float best_dot = 0; int best_o = 0; for (int o = 0; o < 9; o++) { const float dot = dlib::dot(directions[o], grad); if (dot > best_dot) { best_dot = dot; best_o = o; } else if (-dot > best_dot) { best_dot = -dot; best_o = o+9; } } norm[y][x] = v; angle[y][x] = best_o; } } const float eps = 0.0001; // compute features for (int y = 0; y < hog_nr; y++) { const int yy = y+padding_rows_offset; for (int x = 0; x < hog_nc; x++) { const simd4f z1(norm[y+1][x+1], norm[y][x+1], norm[y+1][x], norm[y][x]); const simd4f z2(norm[y+1][x+2], norm[y][x+2], norm[y+1][x+1], norm[y][x+1]); const simd4f z3(norm[y+2][x+1], norm[y+1][x+1], norm[y+2][x], norm[y+1][x]); const simd4f z4(norm[y+2][x+2], norm[y+1][x+2], norm[y+2][x+1], norm[y+1][x+1]); const simd4f temp0 = std::sqrt(norm[y+1][x+1]); const simd4f nn = 0.2*sqrt(z1+z2+z3+z4+eps); const simd4f n = 0.1/nn; simd4f t = 0; const int xx = x+padding_cols_offset; simd4f h0 = min(temp0,nn)*n; const float vv = sum(h0); set_hog(hog,angle[y+1][x+1],xx,yy, vv); t += h0; t *= 2*0.2357; // contrast-insensitive features set_hog(hog,angle[y+1][x+1]%9+18,xx,yy, vv); float temp[4]; t.store(temp); // texture features set_hog(hog,27,xx,yy, temp[0]); set_hog(hog,28,xx,yy, temp[1]); set_hog(hog,29,xx,yy, temp[2]); set_hog(hog,30,xx,yy, temp[3]); } } } // your_sha256_hash-------------------- template < typename image_type, typename out_type > void impl_extract_fhog_features( const image_type& img_, out_type& hog, int cell_size, int filter_rows_padding, int filter_cols_padding ) { const_image_view<image_type> img(img_); // make sure requires clause is not broken DLIB_ASSERT( cell_size > 0 && filter_rows_padding > 0 && filter_cols_padding > 0 , "\t void extract_fhog_features()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_size: " << cell_size << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); /* This function implements the HOG feature extraction method described in the paper: P. Felzenszwalb, R. Girshick, D. McAllester, D. Ramanan Object Detection with Discriminatively Trained Part Based Models IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 32, No. 9, Sep. 2010 Moreover, this function is derived from the HOG feature extraction code from the features.cc file in the voc-releaseX code (see path_to_url~rbg/latent/) which is has the following license (note that the code has been modified to work with grayscale and color as well as planar and interlaced input and output formats): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ if (cell_size == 1) { impl_extract_fhog_features_cell_size_1(img_,hog,filter_rows_padding,filter_cols_padding); return; } // unit vectors used to compute gradient orientation matrix<float,2,1> directions[9]; directions[0] = 1.0000, 0.0000; directions[1] = 0.9397, 0.3420; directions[2] = 0.7660, 0.6428; directions[3] = 0.500, 0.8660; directions[4] = 0.1736, 0.9848; directions[5] = -0.1736, 0.9848; directions[6] = -0.5000, 0.8660; directions[7] = -0.7660, 0.6428; directions[8] = -0.9397, 0.3420; // First we allocate memory for caching orientation histograms & their norms. const int cells_nr = (int)((float)img.nr()/(float)cell_size + 0.5); const int cells_nc = (int)((float)img.nc()/(float)cell_size + 0.5); if (cells_nr == 0 || cells_nc == 0) { hog.clear(); return; } // We give hist extra padding around the edges (1 cell all the way around the // edge) so we can avoid needing to do boundary checks when indexing into it // later on. So some statements assign to the boundary but those values are // never used. array2d<matrix<float,18,1> > hist(cells_nr+2, cells_nc+2); for (long r = 0; r < hist.nr(); ++r) { for (long c = 0; c < hist.nc(); ++c) { hist[r][c] = 0; } } array2d<float> norm(cells_nr, cells_nc); assign_all_pixels(norm, 0); // memory for HOG features const int hog_nr = std::max(cells_nr-2, 0); const int hog_nc = std::max(cells_nc-2, 0); if (hog_nr == 0 || hog_nc == 0) { hog.clear(); return; } const int padding_rows_offset = (filter_rows_padding-1)/2; const int padding_cols_offset = (filter_cols_padding-1)/2; init_hog(hog, hog_nr, hog_nc, filter_rows_padding, filter_cols_padding); const int visible_nr = std::min((long)cells_nr*cell_size,img.nr())-1; const int visible_nc = std::min((long)cells_nc*cell_size,img.nc())-1; // First populate the gradient histograms for (int y = 1; y < visible_nr; y++) { const float yp = ((float)y+0.5)/(float)cell_size - 0.5; const int iyp = (int)std::floor(yp); const float vy0 = yp - iyp; const float vy1 = 1.0 - vy0; int x; for (x = 1; x < visible_nc - 7; x += 8) { simd8f xx(x, x + 1, x + 2, x + 3, x + 4, x + 5, x + 6, x + 7); // v will be the length of the gradient vectors. simd8f grad_x, grad_y, v; get_gradient(y, x, img, grad_x, grad_y, v); // We will use bilinear interpolation to add into the histogram bins. // So first we precompute the values needed to determine how much each // pixel votes into each bin. simd8f xp = (xx + 0.5) / (float)cell_size + 0.5; simd8i ixp = simd8i(xp); simd8f vx0 = xp - ixp; simd8f vx1 = 1.0f - vx0; v = sqrt(v); // Now snap the gradient to one of 18 orientations simd8f best_dot = 0; simd8f best_o = 0; for (int o = 0; o < 9; o++) { simd8f dot = grad_x*directions[o](0) + grad_y*directions[o](1); simd8f_bool cmp = dot>best_dot; best_dot = select(cmp, dot, best_dot); dot *= -1; best_o = select(cmp, o, best_o); cmp = dot > best_dot; best_dot = select(cmp, dot, best_dot); best_o = select(cmp, o + 9, best_o); } // Add the gradient magnitude, v, to 4 histograms around pixel using // bilinear interpolation. vx1 *= v; vx0 *= v; // The amounts for each bin simd8f v11 = vy1*vx1; simd8f v01 = vy0*vx1; simd8f v10 = vy1*vx0; simd8f v00 = vy0*vx0; int32 _best_o[8]; simd8i(best_o).store(_best_o); int32 _ixp[8]; ixp.store(_ixp); float _v11[8]; v11.store(_v11); float _v01[8]; v01.store(_v01); float _v10[8]; v10.store(_v10); float _v00[8]; v00.store(_v00); hist[iyp + 1][_ixp[0]](_best_o[0]) += _v11[0]; hist[iyp + 1 + 1][_ixp[0]](_best_o[0]) += _v01[0]; hist[iyp + 1][_ixp[0] + 1](_best_o[0]) += _v10[0]; hist[iyp + 1 + 1][_ixp[0] + 1](_best_o[0]) += _v00[0]; hist[iyp + 1][_ixp[1]](_best_o[1]) += _v11[1]; hist[iyp + 1 + 1][_ixp[1]](_best_o[1]) += _v01[1]; hist[iyp + 1][_ixp[1] + 1](_best_o[1]) += _v10[1]; hist[iyp + 1 + 1][_ixp[1] + 1](_best_o[1]) += _v00[1]; hist[iyp + 1][_ixp[2]](_best_o[2]) += _v11[2]; hist[iyp + 1 + 1][_ixp[2]](_best_o[2]) += _v01[2]; hist[iyp + 1][_ixp[2] + 1](_best_o[2]) += _v10[2]; hist[iyp + 1 + 1][_ixp[2] + 1](_best_o[2]) += _v00[2]; hist[iyp + 1][_ixp[3]](_best_o[3]) += _v11[3]; hist[iyp + 1 + 1][_ixp[3]](_best_o[3]) += _v01[3]; hist[iyp + 1][_ixp[3] + 1](_best_o[3]) += _v10[3]; hist[iyp + 1 + 1][_ixp[3] + 1](_best_o[3]) += _v00[3]; hist[iyp + 1][_ixp[4]](_best_o[4]) += _v11[4]; hist[iyp + 1 + 1][_ixp[4]](_best_o[4]) += _v01[4]; hist[iyp + 1][_ixp[4] + 1](_best_o[4]) += _v10[4]; hist[iyp + 1 + 1][_ixp[4] + 1](_best_o[4]) += _v00[4]; hist[iyp + 1][_ixp[5]](_best_o[5]) += _v11[5]; hist[iyp + 1 + 1][_ixp[5]](_best_o[5]) += _v01[5]; hist[iyp + 1][_ixp[5] + 1](_best_o[5]) += _v10[5]; hist[iyp + 1 + 1][_ixp[5] + 1](_best_o[5]) += _v00[5]; hist[iyp + 1][_ixp[6]](_best_o[6]) += _v11[6]; hist[iyp + 1 + 1][_ixp[6]](_best_o[6]) += _v01[6]; hist[iyp + 1][_ixp[6] + 1](_best_o[6]) += _v10[6]; hist[iyp + 1 + 1][_ixp[6] + 1](_best_o[6]) += _v00[6]; hist[iyp + 1][_ixp[7]](_best_o[7]) += _v11[7]; hist[iyp + 1 + 1][_ixp[7]](_best_o[7]) += _v01[7]; hist[iyp + 1][_ixp[7] + 1](_best_o[7]) += _v10[7]; hist[iyp + 1 + 1][_ixp[7] + 1](_best_o[7]) += _v00[7]; } // Now process the right columns that don't fit into simd registers. for (; x < visible_nc; x++) { matrix<float, 2, 1> grad; float v; get_gradient(y,x,img,grad,v); // snap to one of 18 orientations float best_dot = 0; int best_o = 0; for (int o = 0; o < 9; o++) { const float dot = dlib::dot(directions[o], grad); if (dot > best_dot) { best_dot = dot; best_o = o; } else if (-dot > best_dot) { best_dot = -dot; best_o = o+9; } } v = std::sqrt(v); // add to 4 histograms around pixel using bilinear interpolation const float xp = ((double)x + 0.5) / (double)cell_size - 0.5; const int ixp = (int)std::floor(xp); const float vx0 = xp - ixp; const float vx1 = 1.0 - vx0; hist[iyp+1][ixp+1](best_o) += vy1*vx1*v; hist[iyp+1+1][ixp+1](best_o) += vy0*vx1*v; hist[iyp+1][ixp+1+1](best_o) += vy1*vx0*v; hist[iyp+1+1][ixp+1+1](best_o) += vy0*vx0*v; } } // compute energy in each block by summing over orientations for (int r = 0; r < cells_nr; ++r) { for (int c = 0; c < cells_nc; ++c) { for (int o = 0; o < 9; o++) { norm[r][c] += (hist[r+1][c+1](o) + hist[r+1][c+1](o+9)) * (hist[r+1][c+1](o) + hist[r+1][c+1](o+9)); } } } const float eps = 0.0001; // compute features for (int y = 0; y < hog_nr; y++) { const int yy = y+padding_rows_offset; for (int x = 0; x < hog_nc; x++) { const simd4f z1(norm[y+1][x+1], norm[y][x+1], norm[y+1][x], norm[y][x]); const simd4f z2(norm[y+1][x+2], norm[y][x+2], norm[y+1][x+1], norm[y][x+1]); const simd4f z3(norm[y+2][x+1], norm[y+1][x+1], norm[y+2][x], norm[y+1][x]); const simd4f z4(norm[y+2][x+2], norm[y+1][x+2], norm[y+2][x+1], norm[y+1][x+1]); const simd4f nn = 0.2*sqrt(z1+z2+z3+z4+eps); const simd4f n = 0.1/nn; simd4f t = 0; const int xx = x+padding_cols_offset; // contrast-sensitive features for (int o = 0; o < 18; o+=3) { simd4f temp0(hist[y+1+1][x+1+1](o)); simd4f temp1(hist[y+1+1][x+1+1](o+1)); simd4f temp2(hist[y+1+1][x+1+1](o+2)); simd4f h0 = min(temp0,nn)*n; simd4f h1 = min(temp1,nn)*n; simd4f h2 = min(temp2,nn)*n; set_hog(hog,o,xx,yy, sum(h0)); set_hog(hog,o+1,xx,yy, sum(h1)); set_hog(hog,o+2,xx,yy, sum(h2)); t += h0+h1+h2; } t *= 2*0.2357; // contrast-insensitive features for (int o = 0; o < 9; o+=3) { simd4f temp0 = hist[y+1+1][x+1+1](o) + hist[y+1+1][x+1+1](o+9); simd4f temp1 = hist[y+1+1][x+1+1](o+1) + hist[y+1+1][x+1+1](o+9+1); simd4f temp2 = hist[y+1+1][x+1+1](o+2) + hist[y+1+1][x+1+1](o+9+2); simd4f h0 = min(temp0,nn)*n; simd4f h1 = min(temp1,nn)*n; simd4f h2 = min(temp2,nn)*n; set_hog(hog,o+18,xx,yy, sum(h0)); set_hog(hog,o+18+1,xx,yy, sum(h1)); set_hog(hog,o+18+2,xx,yy, sum(h2)); } float temp[4]; t.store(temp); // texture features set_hog(hog,27,xx,yy, temp[0]); set_hog(hog,28,xx,yy, temp[1]); set_hog(hog,29,xx,yy, temp[2]); set_hog(hog,30,xx,yy, temp[3]); } } } // your_sha256_hash-------------------- inline void create_fhog_bar_images ( dlib::array<matrix<float> >& mbars, const long w ) { const long bdims = 9; // Make the oriented lines we use to draw on each HOG cell. mbars.resize(bdims); dlib::array<array2d<unsigned char> > bars(bdims); array2d<unsigned char> temp(w,w); for (unsigned long i = 0; i < bars.size(); ++i) { assign_all_pixels(temp, 0); draw_line(temp, point(w/2,0), point(w/2,w-1), 255); rotate_image(temp, bars[i], i*-pi/bars.size()); mbars[i] = subm(matrix_cast<float>(mat(bars[i])), centered_rect(get_rect(bars[i]),w,w) ); } } } // end namespace impl_fhog // your_sha256_hash------------------------ // your_sha256_hash------------------------ // your_sha256_hash------------------------ // your_sha256_hash------------------------ template < typename image_type, typename T, typename mm1, typename mm2 > void extract_fhog_features( const image_type& img, dlib::array<array2d<T,mm1>,mm2>& hog, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { impl_fhog::impl_extract_fhog_features(img, hog, cell_size, filter_rows_padding, filter_cols_padding); // If the image is too small then the above function outputs an empty feature map. // But to make things very uniform in usage we require the output to still have the // 31 planes (but they are just empty). if (hog.size() == 0) hog.resize(31); } template < typename image_type, typename T, typename mm > void extract_fhog_features( const image_type& img, array2d<matrix<T,31,1>,mm>& hog, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { impl_fhog::impl_extract_fhog_features(img, hog, cell_size, filter_rows_padding, filter_cols_padding); } // your_sha256_hash------------------------ template < typename image_type, typename T > void extract_fhog_features( const image_type& img, matrix<T,0,1>& feats, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { dlib::array<array2d<T> > hog; extract_fhog_features(img, hog, cell_size, filter_rows_padding, filter_cols_padding); feats.set_size(hog.size()*hog[0].size()); for (unsigned long i = 0; i < hog.size(); ++i) { const long size = hog[i].size(); set_rowm(feats, range(i*size, (i+1)*size-1)) = reshape_to_column_vector(mat(hog[i])); } } // your_sha256_hash------------------------ template < typename image_type > matrix<double,0,1> extract_fhog_features( const image_type& img, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { matrix<double, 0, 1> feats; extract_fhog_features(img, feats, cell_size, filter_rows_padding, filter_cols_padding); return feats; } // your_sha256_hash------------------------ // your_sha256_hash------------------------ inline point image_to_fhog ( point p, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_size > 0 && filter_rows_padding > 0 && filter_cols_padding > 0 , "\t point image_to_fhog()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_size: " << cell_size << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); // There is a one pixel border around the image. p -= point(1,1); // There is also a 1 "cell" border around the HOG image formation. return p/cell_size - point(1,1) + point((filter_cols_padding-1)/2,(filter_rows_padding-1)/2); } // your_sha256_hash------------------------ inline rectangle image_to_fhog ( const rectangle& rect, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_size > 0 && filter_rows_padding > 0 && filter_cols_padding > 0 , "\t rectangle image_to_fhog()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_size: " << cell_size << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); return rectangle(image_to_fhog(rect.tl_corner(),cell_size,filter_rows_padding,filter_cols_padding), image_to_fhog(rect.br_corner(),cell_size,filter_rows_padding,filter_cols_padding)); } // your_sha256_hash------------------------ inline point fhog_to_image ( point p, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_size > 0 && filter_rows_padding > 0 && filter_cols_padding > 0 , "\t point fhog_to_image()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_size: " << cell_size << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); // Convert to image space and then set to the center of the cell. point offset; p = (p+point(1,1)-point((filter_cols_padding-1)/2,(filter_rows_padding-1)/2))*cell_size + point(1,1); if (p.x() >= 0 && p.y() >= 0) offset = point(cell_size/2,cell_size/2); if (p.x() < 0 && p.y() >= 0) offset = point(-cell_size/2,cell_size/2); if (p.x() >= 0 && p.y() < 0) offset = point(cell_size/2,-cell_size/2); if (p.x() < 0 && p.y() < 0) offset = point(-cell_size/2,-cell_size/2); return p + offset; } // your_sha256_hash------------------------ inline rectangle fhog_to_image ( const rectangle& rect, int cell_size = 8, int filter_rows_padding = 1, int filter_cols_padding = 1 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_size > 0 && filter_rows_padding > 0 && filter_cols_padding > 0 , "\t rectangle fhog_to_image()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_size: " << cell_size << "\n\t filter_rows_padding: " << filter_rows_padding << "\n\t filter_cols_padding: " << filter_cols_padding ); return rectangle(fhog_to_image(rect.tl_corner(),cell_size,filter_rows_padding,filter_cols_padding), fhog_to_image(rect.br_corner(),cell_size,filter_rows_padding,filter_cols_padding)); } // your_sha256_hash------------------------ // your_sha256_hash------------------------ template < typename T, typename mm1, typename mm2 > matrix<unsigned char> draw_fhog( const dlib::array<array2d<T,mm1>,mm2>& hog, const long cell_draw_size = 15, const float min_response_threshold = 0.0 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_draw_size > 0 && hog.size()==31, "\t matrix<unsigned char> draw_fhog()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_draw_size: " << cell_draw_size << "\n\t hog.size(): " << hog.size() ); dlib::array<matrix<float> > mbars; impl_fhog::create_fhog_bar_images(mbars,cell_draw_size); // now draw the bars onto the HOG cells matrix<float> himg(hog[0].nr()*cell_draw_size, hog[0].nc()*cell_draw_size); himg = 0; for (unsigned long d = 0; d < mbars.size(); ++d) { for (long r = 0; r < himg.nr(); r+=cell_draw_size) { for (long c = 0; c < himg.nc(); c+=cell_draw_size) { const float val = hog[d][r/cell_draw_size][c/cell_draw_size] + hog[d+mbars.size()][r/cell_draw_size][c/cell_draw_size] + hog[d+mbars.size()*2][r/cell_draw_size][c/cell_draw_size]; if (val > min_response_threshold) { set_subm(himg, r, c, cell_draw_size, cell_draw_size) += val*mbars[d%mbars.size()]; } } } } const float thresh = mean(himg) + 4 * stddev(himg); if (thresh != 0) return matrix_cast<unsigned char>(upperbound(round(himg*255/thresh),255)); else return matrix_cast<unsigned char>(himg); } // your_sha256_hash------------------------ template < typename T > matrix<unsigned char> draw_fhog ( const std::vector<matrix<T> >& hog, const long cell_draw_size = 15, const float min_response_threshold = 0.0 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_draw_size > 0 && hog.size()==31, "\t matrix<unsigned char> draw_fhog()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_draw_size: " << cell_draw_size << "\n\t hog.size(): " << hog.size() ); // Just convert the input into the right object and then call the above draw_fhog() // function on it. dlib::array<array2d<T> > temp(hog.size()); for (unsigned long i = 0; i < temp.size(); ++i) { temp[i].set_size(hog[i].nr(), hog[i].nc()); for (long r = 0; r < hog[i].nr(); ++r) { for (long c = 0; c < hog[i].nc(); ++c) { temp[i][r][c] = hog[i](r,c); } } } return draw_fhog(temp,cell_draw_size, min_response_threshold); } // your_sha256_hash------------------------ template < typename T, typename mm > matrix<unsigned char> draw_fhog( const array2d<matrix<T,31,1>,mm>& hog, const long cell_draw_size = 15, const float min_response_threshold = 0.0 ) { // make sure requires clause is not broken DLIB_ASSERT( cell_draw_size > 0, "\t matrix<unsigned char> draw_fhog()" << "\n\t Invalid inputs were given to this function. " << "\n\t cell_draw_size: " << cell_draw_size ); dlib::array<matrix<float> > mbars; impl_fhog::create_fhog_bar_images(mbars,cell_draw_size); // now draw the bars onto the HOG cells matrix<float> himg(hog.nr()*cell_draw_size, hog.nc()*cell_draw_size); himg = 0; for (unsigned long d = 0; d < mbars.size(); ++d) { for (long r = 0; r < himg.nr(); r+=cell_draw_size) { for (long c = 0; c < himg.nc(); c+=cell_draw_size) { const float val = hog[r/cell_draw_size][c/cell_draw_size](d) + hog[r/cell_draw_size][c/cell_draw_size](d+mbars.size()) + hog[r/cell_draw_size][c/cell_draw_size](d+mbars.size()*2); if (val > min_response_threshold) { set_subm(himg, r, c, cell_draw_size, cell_draw_size) += val*mbars[d%mbars.size()]; } } } } const float thresh = mean(himg) + 4 * stddev(himg); if (thresh != 0) return matrix_cast<unsigned char>(upperbound(round(himg*255/thresh),255)); else return matrix_cast<unsigned char>(himg); } // your_sha256_hash------------------------ } #endif // DLIB_fHOG_Hh_ ```
```xml export { avatarVariables as avatarLabelVariables } from './avatarVariables'; ```
```ruby # frozen_string_literal: true module Decidim module Admin # A command with all the business logic when a user unreports a resource. class UnreportResource < Decidim::Command # Public: Initializes the command. # # reportable - A Decidim::Reportable # current_user - the user performing the action def initialize(reportable, current_user) @reportable = reportable @current_user = current_user end # Executes the command. Broadcasts these events: # # - :ok when everything is valid, together with the resource. # - :invalid if the resource is not reported # # Returns nothing. def call return broadcast(:invalid) unless @reportable.reported? unreport! broadcast(:ok, @reportable) end private def unreport! Decidim.traceability.perform_action!( "unreport", @reportable.moderation, @current_user, extra: { reportable_type: @reportable.class.name } ) do @reportable.moderation.destroy! end end end end end ```
Anthony Neely (born May 20, 1986) is an American-Taiwanese singer and actor. His father is of Euro-American descent and his mother is Taiwanese. In 2009, Neely participated in popular singing competition One Million Star (Season 5) as a PK (Player Kill) challenger. His performances created sensations after receiving full marks of 25 points on three occasions, and also being the first in the reality show's history to score a record 33 out of 25 points. Early years Neely double-majored in psychology and theatre studies at the University of California, San Diego (UCSD). He is bilingual in English and Mandarin Chinese. Neely grew up in the San Francisco Bay Area in a small suburb, Millbrae, California. He graduated from Burlingame High School in 2004. Career Neely performed Hsiao Huang-chi's "You Are My Eyes" (你是我的眼) during his first performance in One Million Star. He said that he did not really understand the meaning behind the lyrics of the song, but was touched by the melody and performed it according to his own feelings. One of the judges of the competition, Phil Chang, was greatly touched by the performance, and praised Neely's rendition for "having a different style from the original singer." Among his many performances during the singing competition, one stood out: an acoustic version of Damien Rice’s "The Blower's Daughter". Host Matilda Tao then announced to the judges that if the given five points were not enough, they could raise up one hand to represent one point or stand up to represent ten points. Judge Kay Huang stood up, while judges Phil Chang and Roger raised both hands and one hand respectively, giving Neely a total of 33 marks out of the original 25 points any contestant can get. Personal life Neely's mother was born in Taiwan, while his maternal grandparents are from Liaoning, China. In September 2014, Neely revealed that he had married in 2010 and that his wife, Vivi Lee, had given birth to a daughter the year after. The news was revealed in a YouTube video titled "Anthony Neely's True Confession", which was uploaded to his personal YouTube profile on his daughter's third birthday. He officially divorced from his wife in March 2018, over a year after he admitted to infidelity. Discography Studio albums Lesson One (2010) Wake Up (2012) Friends (2013) Singles Theatre References External links 1986 births Living people American male actors of Chinese descent American male actors of Taiwanese descent American musicians of Chinese descent American musicians of Taiwanese descent People from Millbrae, California One Million Star contestants Taiwanese male singer-songwriters Taiwanese singer-songwriters 21st-century Taiwanese male singers 21st-century Taiwanese male actors Taiwanese male film actors Taiwanese male television actors Taiwanese male stage actors Taiwanese people of American descent American male film actors American male television actors American male stage actors 21st-century American male actors 21st-century American musicians 21st-century American male singers 21st-century American singer-songwriters American male singer-songwriters Singer-songwriters from California
```java package razerdp.demo.model.common; import android.view.View; import razerdp.demo.model.DemoCommonUsageInfo; import razerdp.demo.ui.ActivityLauncher; import razerdp.demo.ui.SizeLimitActivity; import razerdp.demo.utils.UIHelper; /** * Created by on 2021/8/6. */ public class WidthAndHeightLimitInfo extends DemoCommonUsageInfo { public WidthAndHeightLimitInfo() { title = ""; name = "PopupWidthHeightLimit"; javaUrl = "path_to_url"; resUrl = "path_to_url"; } @Override public void toShow(View v) { ActivityLauncher.start(v.getContext(), SizeLimitActivity.class); } @Override public void toOption(View v) { UIHelper.toast(""); } } ```
Crematogaster bruchi is a species of ant in tribe Crematogastrini. It was described by Forel in 1912. References bruchi Insects described in 1912
Spilimbergo (; or ) is a (municipality) with a population of 11,961 in the Regional decentralization entity of Pordenone, Friuli-Venezia Giulia, northeast Italy. It is located on the right side of the Tagliamento river. The town is notable as the home of the Mosaic School of Friuli (), which was founded in 1922 and has students from all over the world. History Spilimbergo's history begins around the 11th century, when the Spengenberg counts arrived from Carinthia and settled down in the area, acting as the vassals of the bishop of Aquileia. The name of the town derives from the castrum de Spengenberg (castle of the Spengenberg). However, human settlement had already been present for a long time. In the frazione of Gradisca, various remains of a castelliere have been discovered, and they are speculated to date back to the Roman era. Here there existed a road that crossed the Tagliamento river and stretched from Sacile to Germany. In the centuries following the settlement of the Spengenberg, Spilimbergo developed both as a military stronghold and as the centre of a commercial network. Thanks to the arrival of many "foreigners", such as Lombard, Tuscan, and Jewish people, there had been a considerable demographic and urban growth. Following the instructions by count Walterpertoldo II, in 1284 the construction of the Duomo Arcipretale di Santa Maria Maggiore began, which is considered one of the finest romanesque-gothic monuments from the Friuli region. Other important buildings from the same period are il palazzo del Daziario (the palace of the Tolls), la casa del Capitano (the house of the Captain), and la Loggia (where the town hall is currently located). In 1326, thanks to the counts Bregonia and Bartolomeo, Spilimbergo's jurisdiction obtained its own legislative body, the Statute of the Land of Spilimbergo (Statuto della Terra di Spilimbergo). In 1420 the town passed onto the Republic of Venice, following the same fate as the Patria del Friuli. The War of the League of Cambrai struck the region particularly, turning it into the centre of the conflict between the pro-imperial (Strumieri) and the pro-venetian factions (Zamberlani). Despite everything, Spilimbergo in the following years carried on with its period of economic prosperity, which had an impact on its cultural plane too. During this period the castle was rebuilt in the style of the Renaissance, and various works of art were created by renowned artists such as Giovanni Antonio Pilacorte, il Pordenone, Pomponio Amalteo, Gasparo Narvesa, and Irene di Spilimbergo. In the literary field Gian Domenico Cancianini, Eusebio Stella, and Bernardino Partenio stood out, with the latter being the founder of an academy for the study of the Latin, Greek and Hebrew languages. The contribution by some active bourgeois families — like the Balzaro, the Monaco, the Stella, the Cisternini, the Fannio, and the Santorini — is also noteworthy. Main sights City walls and towers Cathedral (13th century) Castle, attested in 1120 but destroyed by a fire in 1511 People Giovanni Battista Cavedalis Irene di Spilimbergo Matteo Spilimbergo See also Spilimbergo (surname) References External links Spilimbergo old postcards Scuola Mosaicisti del Friuli - Mosaic School Cities and towns in Friuli-Venezia Giulia
```java package com.yahoo.config.model.application.provider; import com.yahoo.config.model.api.ConfigDefinitionRepo; import com.yahoo.io.IOUtils; import java.util.logging.Level; import com.yahoo.vespa.config.ConfigDefinitionKey; import com.yahoo.vespa.config.buildergen.ConfigDefinition; import com.yahoo.vespa.config.util.ConfigUtils; import com.yahoo.vespa.defaults.Defaults; import java.io.File; import java.io.IOException; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; /** * A global pool of all config definitions that this server knows about. These objects can be shared * by all tenants, as they are not modified. * * @author Ulf Lilleengen */ public class StaticConfigDefinitionRepo implements ConfigDefinitionRepo { private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(StaticConfigDefinitionRepo.class.getName()); private final Map<ConfigDefinitionKey, ConfigDefinition> configDefinitions = new LinkedHashMap<>(); private static final String DEFAULT_SERVER_DEF_DIR = Defaults.getDefaults().underVespaHome("share/vespa/configdefinitions"); public StaticConfigDefinitionRepo() { this(new File(DEFAULT_SERVER_DEF_DIR)); } public StaticConfigDefinitionRepo(File definitionDir) { initialize(definitionDir); } private void initialize(File definitionDir) { if ( ! definitionDir.exists()) return; for (File def : definitionDir.listFiles((dir, name) -> name.matches(".*\\.def"))) addConfigDefinition(def); } private void addConfigDefinition(File def) { try { ConfigDefinitionKey key = ConfigUtils.createConfigDefinitionKeyFromDefFile(def); addConfigDefinition(key, def); } catch (IOException e) { log.log(Level.WARNING, "Exception adding config definition " + def, e); } } private void addConfigDefinition(ConfigDefinitionKey key, File defFile) throws IOException { String payload = IOUtils.readFile(defFile); configDefinitions.put(key, new ConfigDefinition(key.getName(), payload.split("[\\r\\n]+"))); } @Override public Map<ConfigDefinitionKey, ConfigDefinition> getConfigDefinitions() { return Collections.unmodifiableMap(configDefinitions); } @Override public ConfigDefinition get(ConfigDefinitionKey key) { return configDefinitions.get(key); } } ```
Glister may refer to: Glister (Forgotten Realms), a fictional city in the Forgotten Realms Glister, a 2008 novel by John Burnside
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Aiplatform; class GoogleCloudAiplatformV1FeatureViewIndexConfigBruteForceConfig extends \Google\Model { } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudAiplatformV1FeatureViewIndexConfigBruteForceConfig::class, your_sha256_hashxConfigBruteForceConfig'); ```
In medicine, glycoprotein IIb/IIIa inhibitors, also GpIIb/IIIa inhibitors, is a class of antiplatelet agents. Several GpIIb/IIIa inhibitors exist: abciximab (abcixifiban) (ReoPro) eptifibatide (Integrilin) tirofiban (Aggrastat) roxifiban orbofiban Use Glycoprotein IIb/IIIa inhibitors are frequently used during percutaneous coronary intervention (angioplasty with or without intracoronary stent placement). They work by preventing platelet aggregation and thrombus formation. They do so by inhibition of the GpIIb/IIIa receptor on the surface of the platelets. They may also be used to treat acute coronary syndromes, without percutaneous coronary intervention, depending on TIMI risk. They should be given intravenously. The oral form is associated with increased mortality and hence should not be given. In integrin nomenclature glycoprotein IIb/IIIa is called αIIbβ3. History Their development arose from the understanding of Glanzmann's thrombasthenia, a condition in which the GpIIb/IIIa receptor is deficient or dysfunctional. References
In dentistry, inlays and onlays are used to fill cavities, and then cemented in place in the tooth. This is an alternative to a direct restoration, made out of composite, amalgam or glass ionomer, that is built up within the mouth.Inlays and onlays are used in molars or premolars, when the tooth has experienced too much damage to support a basic filling, but not so much damage that a crown is necessary. The key comparison between them is the amount and part of the tooth that they cover. An inlay will incorporate the pits and fissures of a tooth, mainly encompassing the chewing surface between the cusps. An onlay will involve one or more cusps being covered. If all cusps and the entire surface of the tooth is covered this is then known as a crown. Historically inlays and onlays will have been made from gold and this material is still commonly used today. Alternative materials such as porcelain were first described being used for inlays back in 1857. Due to its tooth like colour, porcelain provides better aesthetic value for the patient. In more recent years, inlays and onlays have increasingly been made out of ceramic materials. In 1985, the first ceramic inlay created by a chair-side CAD-CAM device was used for a patient. More recently, in 2000, the CEREC 3 was introduced. This allows for inlays and onlays to be created and fitted all within one appointment. Furthermore, no impression taking is needed due to the 3D scanning capabilities of the machine. Inlays Sometimes, a tooth is planned to be restored with an intracoronal restoration, but the decay or fracture is so extensive that a direct restoration, such as amalgam or composite, would compromise the structural integrity of the restored tooth or provide substandard opposition to occlusal (i.e., biting) forces. In such situations, an indirect gold or porcelain inlay restoration may be indicated. Comparison of inlays and direct fillings When an inlay is used, the tooth-to-restoration margin may be finished and polished to a very fine line of contact to minimize recurrent decay. Opposed to this, direct composite filling pastes shrink a few percent in volume during hardening. This can lead to shrinkage stress and rarely to marginal gaps and failure. Although improvements of the composite resins could be achieved in the last years, solid inlays do exclude this problem. Another advantage of inlays over direct fillings is that there is almost no limitations in the choice of material. While inlays might be ten times the price of direct restorations, it is often expected that inlays are superior in terms of resistance to occlusal forces, protection against recurrent decay, precision of fabrication, marginal integrity, proper contouring for gingival (tissue) health, and ease of cleansing offers. However, this might be only the case for gold. While short-term studies come to inconsistent conclusions, a respectable number of long-term studies detect no significantly lower failure rates of ceramic or composite inlays compared to composite direct fillings. Another study detected an increased survival time of composite resin inlays but it was rated to not necessarily justify their bigger effort and price. Inlay types, main uses of inlays Inlays and Onlays are similar as they are a type of indirect restoration. However, the difference is that Inlays are indirect restorations which do not have cuspal coverage and are within the body of the tooth.(1) Onlays are indirect restorations that cover both body and cusps of teeth. Inlay Indications: Extensively restored or weakened teeth Repeated fracture or failure of previous direct restoration Restorations within body of tooth which do not require cuspal coverage Difficulty achieving good contour, contact point or occlusion using direct restorations Advantages of Inlays Inlays are a type of indirect restoration (filling) that is used to restore extensively damaged or decayed teeth. When compared to conventional (direct) fillings, inlays have several advantages: Inlays are extremely strong and durable: well-made gold inlays, in particular, have exceptional longevity with proper care Inlays can give the restored tooth a natural, aesthetic appearance: ceramic inlays allow an excellent shade match that makes the restoration almost indistinguishable from the surrounding natural tooth Ceramic inlays have better physical properties than traditional resin composite fillings for posterior teeth Inlays may allow the dentist to achieve better contours, contact points, and occlusion than direct fillings because they are custom-made for the patient in a laboratory Resin inlays have less microleakage (diffusion of bacteria/oral fluids between the tooth and the filling material) and less post-operative sensitivity than direct resin composite fillings Disadvantages of Inlays Inlays are a hugely popular restorative technique, used in cases to preserve tooth substance and provide a greater strength than restorations. Inlays are most commonly constructed in composite resin and ceramic materials. Both types have varying properties, however the general downsides to inlays include: Higher cost compared to a restoration, due to the need for a dental laboratory Lengthier process as two appointment required i.e. increased chair time for patient Over time, they can present complications such as marginal leakage and staining by foods Tricky to ensure the absence of undercuts in the tooth preparation stage & highly technique sensitive Composite or ceramic inlays have a lower strength than materials such as a gold Risk of loss of vitality with tooth removal Last longer than restorations but may need replacement Ceramics can be brittle Repair of inlay is difficult Onlays When decay or fracture incorporate areas of a tooth that make amalgam or composite restorations inadequate, such as cuspal fracture or remaining tooth structure that undermines perimeter walls of a tooth, an onlay might be indicated. Similar to an inlay, an onlay is an indirect restoration which incorporates a cusp or cusps by covering or onlaying the missing cusps. All of the benefits of an inlay are present in the onlay restoration. The onlay allows for conservation of tooth structure when the only alternative is to totally eliminate cusps and perimeter walls for restoration with a crown. Just as inlays, onlays are fabricated outside of the mouth and are typically made out of gold or porcelain. Gold restorations have been around for many years and have an excellent track record. In recent years, newer types of porcelains have been developed that seem to rival the longevity of gold. If the onlay or inlay is made in a dental laboratory, a temporary is fabricated while the restoration is custom-made for the patient. A return visit is then required to fit the final prosthesis. Inlays and onlays may also be fabricated out of porcelain and delivered the same day utilizing techniques and technologies relating to CAD/CAM dentistry. A systemic review found that the most common cause of onlay failure is ceramic fracture, followed by ceramic de-bonding from the tooth structure, and the occurrence of secondary caries which is seen as a discolouration at the margins of the restoration. High failure rates were associated with teeth that had previous root canal treatment, and with patients who exhibit para-functional habits such as bruxism, or teeth clenching. Indications Inlays/onlays are indicated when teeth are weakened and extensively restored. There are no obvious contrast between the two. Inlays are usually indicated when there has been repeated breach in the integrity of a direct filling as metal inlays are more superior in strength. It is also indicated when placement of direct restoration may be challenging to achieve satisfactory parameters (shape, margin, occlusion). They are usually reserved for larger cavities as tooth conservation is paramount in current practice and small cavities can be restored with direct composites instead. Onlays are indicated when there is a need to protect weakened tooth structure without additional removal of tooth tissue unlike a crown, e.g. restoring teeth after root canal treatment to give cuspal coverage. It can also be used if there is minimal contour of remaining coronal tooth tissue with little retention. Contraindications Poor Oral Hygiene Contraindications to providing Onlays and Inlays include plaque and active caries. It is important to ensure adequate oral hygiene before providing any indirect restoration as failure to manage the caries risk of an individual may result in recurrent caries. Caries risk is defined as "a prediction as to whether a patient is likely to develop new caries in the future". The restoration itself does not alter the risk, which allows subsequent caries to develop around the indirect restoration placed. This may be caused by plaque retentive features of the restoration, or if the restoration is poorly bonded to the tooth. However, in the main the subsequent caries around a restoration is because the caries risk has not been reduced. Reducing the patients risk of further disease prior to treatment provides predictable results and helps prevent further restorative procedures.1 Parafunctional habits and heavy occlusal forces Inlays and Onlays are contraindicated in patients with parafunctional habits and heavy occlusal forces. A Parafunctional habit refers to abnormal functioning of oral structures and associated muscles, for example patients who clench or grind their teeth. Occlusal forces are greater on molars when compared to premolars. Evidence (Fuzzi and Rapelli) has shown greater failure of Onlays and Inlays in molars than premolars over an 11.5 year period. The most common cause for failure was porcelain fracture. To ensure longevity it is beneficial to avoid heavy occlusal forces. If a cuspal coverage onlay is required porcelain should be used as cuspal coverage with composite is contraindicated. Patients under 16. Indirect restorations are contraindicated in patients under 16 as the pulp chamber is still large and wide dentinal tubules increase the stress on the pulp. When preparing a cavity to retain an indirect restoration there is a risk of damage to the nerve supply of a vital tooth. The tooth has not fully erupted and continued active and passive eruption can cause unfavourable margins when the tooth is fully through as the patient is still undergoing skeletal development. Young children may be unable to cope with invasive dental treatment and long procedures, therefore it is advantageous to wait until they are fully cooperative. Unable to tolerate impression taking Patients need to be able to cope with dental impressions as these are required for the fabrication of the indirect restoration. Development of digital impression systems including Lava Chairside oral scanner by 3M, Sirona's CEREC and Cadent iTero System could help patients receive treatment if the contraindication is being unable to withstand conventional impressions. Digital impressions enable production of highly accurate models whilst eliminating patient discomfort. However, these systems are not widely available in dental practices, as of 2018. Alternatives If a tooth has extensive caries or tooth surface loss which would provide difficulty bonding an inlay or onlay then it might be more appropriate to consider a full coverage extra coronal restoration. This can protect remaining tooth structure. Direct restorations, for example composite may be beneficial when restorations are small. Inlays require elimination of undercuts, therefore direct restorations may preserve tooth structure whilst also avoiding unwanted laboratory costs. Preparation for inlays and onlays            The preparation of inlays and onlays mainly follows the same basic concepts of indirect restorations. The aim of tooth preparation is to preserve more tooth tissue compared to a crown preparation, while giving an adequate amount of protection to the tooth. The preparation of opposing cavity walls should be cut in a way to avoid undercuts in order to gain optimum retention from the cavity shape for the indirect restoration. For inlay and onlay preparations that are going to be completed with all-ceramic then these cavity shapes can be slightly over-tapered as most of the retention is gained from the cement lute. However, for indirect restorations using gold then the preparation shape must have parallel walls as most of the retention is gained from the cavity shape.            The process of preparation and cementation of an inlay or onlay is usually carried out over two appointments, with the preparation being carried out during the first appointment and cementation at the second. After the tooth has been prepared at the first visit a putty and wash impression should be taken of the prepared tooth to be sent to the laboratory for fabrication of the indirect restoration. Also, a provisional restoration is made using material such as ProTemp, to protect the tooth from sensitivity, loss of vitality, bacterial contamination, to prevent over-eruption of the prepared tooth and also maintains dental aesthetics for the time being. For tooth preparation, firstly start with occlusal reduction which depending on the restorative material being used can range from 0.5mm-2mm. The best instrument to use for this is a high-speed diamond fissure bur and the reduction should follow the inclination of the cusps and grooves as this will allow the preservation of more tooth tissue. A functional occlusal bevel should be created on the occlusal loading cusp of molar teeth by holding the bur at a 45o angle to the occlusal surface. This is the buccal cusp for mandibular teeth and the palatal cusp for maxillary teeth. A high-speed tapered diamond bur has the most convenient shape to prepare the buccal, lingual and proximal reduction of the tooth. In the majority of clinical situations an inlay preparation is being made from a tooth that already has a Class II restoration and is being prepared to protect the tooth. The restoration is firstly removed and then the cavity can be converted by ensuring any undercuts are eliminated from the preparation. There are two ways this can be done, either by blocking the undercuts out with an adhesive restorative material or by removing tooth tissue to create the divergent cavity needed. Fabrication methods There are a few methods of fabricating inlays and onlays, depending on the restorative material used. Indirect restorative technique The first common step is always to take an impression of the tooth preparation – either by scanning it using an intraoral scanner or by taking a conventional impression using polyvinyl siloxane. The details of the fabrication methods are as follows: CAD-CAM CAD-CAM (aka Computer Aided Design-Computer Aided Manufacture) is a fabrication method which aids the production of dental restorations e.g. crowns, bridges, inlays and onlays. It is possible for these indirect restorations to be provided in one visit. This works by first taking an intra-oral scan to produce a 3D virtual impression. The 3D image is then sent to the chosen software programme, available software programmes include CEREC Acquisition Center system (Sirona Dental Systems, Charlotte, N.C.) or the E4D Dentist system (D4D Technologies, Richardson, Texas). It is possible for the 3D image to originate from conventional casts which have been poured up in stone/plaster. The model is scanned and the 3D image is uploaded onto the software. Next, the restoration can be designed, by the software programme, on the virtual casts. Once confirmed, the milling process can begin. The milling process uses pre-fabricated blocks of restorative material, e.g. lithium disilicate or composite reinforced ceramic, to produce the end product. Finally, the restoration is sintered/glazed chair side. Lost wax technique There are two ways in which wax can be used to produce cast metal/ceramic indirect restorations, these are known, firstly, as the indirect wax technique using Type 1 inlay wax and, secondly, the direct wax technique using Type 2 inlay wax. For technique 1, a wax pattern is designed on the die from the cast impressions and for technique 2 the wax is packed into the tooth preparation in the mouth and adapted the shape of the cavity. Inlay wax is chosen due to its brittleness – it breaks upon removal from undercut of a cavity, either on the die or in the mouth. In this case, this is a beneficial character as it helps us to identify the presence of an undercut which then can be removed. Once the wax pattern is constructed the fabrication of this into the final restoration can begin, a method known as the Lost Wax Technique is used. The wax is embedded into an investment material with a sprue former – this forms a passage for molten metal to be poured through into the cylinder. The investment material must produce enough expansion to compensate for shrinkage of the metal on solidification and should be slightly porous to allow for dissipation of released gases. The container, or casting cylinder, is then placed in a furnace to burn out the wax and what is left is a hollow shape ready for molten metal to be poured into. The metal can be melted using either gas and compressed air, gas and oxygen or electric arc. Casting methods include the use of steam pressure or a centrifugal system. Gold is an example of a material that can be used to produce inlays/onlays. Once cast a layer of oxides are present on the surface, these can be removed by placing the restoration in an ultrasonic bath for 10 minutes. This removes the oxides along with any remnants of investment material. Possible faults at casting: Subsurface nodules – poor investment causing air bubbles which become filled with molten metal Ridges – moving casting cylinder before investment sets Fins – heated too quickly Roughness – overheating causing investment to disintegrate Foreign bodies Distorted casting – faulty impressions or casts, failure to invest wax once immediately removed from the die or insufficient heating of mould Porosity – presence of voids due to uncompensated alloy contraction and absorption of mould gases Slip casting technique This method is only applicable to sintered alumina core porcelain. Firstly, a sub-structure made of alumina powder and modelling fluid is built on the special die. w The die is then sintered by firing with the sub-structure, causing the fluid to be absorbed by the die and the alumina powder become more tightly packed. Following sintering, the outer surface of the sub-structure is painted with lanthanum aluminosilicate glass powder. The sub-structure is porous and therefore allows infiltration of the glass powder when fired again. Further strengthening of the material can be done by applying zirconium oxide. Direct restorative technique By using this technique, an impression of the tooth preparation is not required. Instead, the tooth preparation is coated with a layer of separating material such as glycerin first. Then, a composite restoration is built up directly on the preparation, allowing it to take the shape of the cavity. The restoration is then light-cured in the tooth before being removed from the tooth to be further light-cured. Prior to cementation of the restoration onto the prepared the tooth, the layer of separating materials needs to be removed to ensure effective bonding between the tooth and the restoration. This technique is only applicable when composite is used as the restorative material. Inlays and onlays made from ceramic or metal alloy require laboratory work and therefore can only be fabricated using indirect restorative techniques as mentioned in the previous section. Survival rates A study done by Rippe et al. has shown that ceramic inlays produced by the different methods, via indirect restorative techniques aforementioned, have similar longevity. Materials ] Gold The use of gold as a restorative material for the production of inlays and onlays is fading due to the increase in usage of more aesthetically pleasing tooth coloured materials. Gold has many advantages as a restorative material, including high strength and ductility, making it ideal to withstand the masticatory forces put upon the teeth. It is strong, ductile, can be cast accurately and not abrasive to opposing dentition. This property allows gold to be used in thinner cross sections, meaning less tooth tissue needs to be removed during tooth preparation compared to other restorative materials, to achieve the same strength. The tooth preparation needs near parallel wall and an absence of undercut, hence less occlusal and axial reduction. When the patient is not concerned with aesthetics, such as in posterior teeth, gold can provide the properties needed. Ceramic Ceramic materials began being used in restorative dentistry in the 1900s. Ceramic offers a more aesthetically pleasing restoration colour than previous gold and amalgam restorations. It is aesthetic and has high wear resistance. However, ceramic used as a restorative material without metal reinforcement have reduced strength and are more prone to failure. This is because conventional ceramics have a higher fracture risk and fractures can propagate easily under cyclical loading causing marginal ridge or bulk fracture. To compensate for this, ceramic is placed in a thicker cross-section of at least 2mm for stress bearing areas. This reduces flexure under loading and prevents crack formation. Ceramic can also be abrasive to opposing tooth surfaces upon mastication. More tapered walls are needed in tooth preparation. Undercuts can be eliminated by further tooth preparation or be blocked out with an adhesive tooth - coloured material. Composite Resin composite is widely used in dentistry as a direct and indirect restorative material. It comes in different compositions, variable in content and size of filler particles. Composite inlays and onlays offer great aesthetics, as a combination of different shades and opacities can be used in a layering technique, equalling or surpassing the aesthetically pleasing all-ceramic restoration. It can be easily repaired or modified as composite can bond to existing material. Using composite as a direct restoration can have a relatively high polymerisation shrinkage, but this can be avoided by using a laboratory indirect composite restoration. Due to the more in-depth curing method, using heat, pressure or strong light, this can have a lower polymerisation shrinkage. Lab made composite has reduction in polymerisation shrinkage as there is higher degree of curing in lab as compared to chair-side curing. However, fewer reactive resin groups are available to bond to the resin luting cement indicating lower accuracy in fitting compared to the other materials. However, using this indirect laboratory method demands more skill and time, and is more destructive as tooth preparation is needed prior to taking an impression. Compared to ceramic and gold inlays and onlays, composite can provide similar advantages, but a comparison of the longevity of composite is unknown. Metal-ceramic Metal-ceramic inlays were developed to see if the aesthetic advantages of an all-ceramic inlay restoration could be replicated, whilst improving the strength and stability of the restoration. A study showed that the fracture resistance of all-ceramic inlays was greater than that of these metal-ceramic inlays. It went on further to find that it was the taper of the inlay preparation that affected the fracture resistance more so than the choice of restoration material. Cementation Inlays and onlays are cemented in the mouth using adhesive resin luting cements. These materials are placed in the inlay/ onlay and placed onto the prepared tooth. Once the onlay/ inlay is seated, the viscosity of the adhesive resin luting cement decreases. This makes placing the inlay/onlay easier and reduces the chances of breakage. Luting cements can have a low modulus or a high modulus. Low modulus luting cements are more flexible and withstand more force without failing. If a high modulus cement is used to cement an inlay or onlay, the restoration will not be able to transfer stresses properly into the cavity walls. With a low modulus; the cement will absorb deformations under loading and limit the pressure transmitted to surrounding tooth structures. Composite inlays are cured by polymerisation shrinkage.  Usually the composite will have been 'super cured', which means cured using temperature, pressure or light. This makes the inlay sturdier and improves wear. However, the disadvantage of super curing is that it leaves less reactive resin groups to bond to the cement and therefore the strength of bond will be less. Preparation of inlays are with close to parallel walls and a key on the occlusal surface- this is sometimes sufficient for retention purposes so adhesive resin luting cements may not be needed. Ceramic inlays can also be cured with chemically cured resin composite or dual cured resin composite. According to a 10-year evaluation of ceramic inlays cemented with both chemically cured resin composite and dual cured resin composite; the inlays cemented with chemically cured survived longer after cementation. After 10 years the survival of the chemically cured inlays were 100% and of the dual cured were 77%. Bonding agents can be applied to dentine before cementation of inlays and onlays. This is something that is very useful as dentine contains a lot of mineral, which makes binding more problematic. A bonding agent that is applied straight after the preparation has been finished will give rise to greater dentine bond strengths. If the bonding agent is applied just before cementing the inlay/onlay or if no bonding agents are applied; the dentine bond strengths will be noticeably lower. In conclusion; the type of luting agent and properties have an impact on how long ceramic/inlays will stay cemented in the mouth. See also References Restorative dentistry
Alexander Hepple (28 August 1904 – 16 November 1983) was a trade unionist, politician, anti-apartheid activist and author and was the last leader of the original South African Labour Party. Hepple was born in La Rochelle, a suburb of Johannesburg to Thomas and Alice Hepple, founding members of the South African Labour Party in 1908. His father immigrated to South Africa from Sunderland in the north-east of England and was a shop steward of the Amalgamated Society of Engineers and a leader during its strike action in 1913. Alex Hepple was a democratic socialist and anti-fascist who was an activist from an early age. He was elected to the Transvaal Province's provincial council in 1943 as a Labour Party MLA and then as a Labour Member of Parliament in the House of Assembly of South Africa in the 1948 and 1953 general elections. Hepple was leader of the South African Labour Party from 1953 to 1958 and moved it towards liberal policies on race in opposition to the apartheid National Party government. He also founded and chaired the anti-apartheid Treason Trial Defence Fund from 1956 to 1961 and chaired the South African Defence and Aid Fund from 1960 to 1964. However, the white working class electorate that had supported the Labour Party by and large rejected Hepple's policies and repudiated the Labour Party in the 1958 elections in which the Labour Party lost all five of its seats, including Hepple's. The Labour Party was dissolved soon after the election. He continued and expanded his activism after losing his parliamentary seat. In 1962, he and his wife, Josephine, re-established the newspaper, Forward only to see it closed by government censorship in 1964. The Hepples then moved to England where they founded the International Defence and Aid Fund's Information Service, an organization that reported on repression and detentions by the apartheid government. In 1967, Hepple wrote Verwoerd, a biography of South African Prime Minister Hendrik Verwoerd who was considered the architect of apartheid. He also wrote South Africa: a political and economic history in 1966 as well as articles and pamphlets on South African politics. Hepple died in 1983 in exile in Canterbury, England and was celebrated by the African National Congress whose secretary-general Alfred Nzo, wrote that Hepple "was known and loved by the oppressed people of South Africa for his opposition to the draconian apartheid policies of the South African regime." His son, Bob Hepple, was a South African and British academic and lawyer who was "Nelson Mandela’s legal advisor through his 1962 trial". "Hepple was also one of the original Rivonia Trial accused". Bob Hepple was "knighted in 2004." "He was awarded the South African Order of Luthuli (Gold) in 2014". References 1904 births 1983 deaths South African people of English descent Labour Party (South Africa) politicians Members of the House of Assembly (South Africa) South African activists H South African expatriates in the United Kingdom
```c #if defined(__i386__) && defined(__FreeBSD__) #include <ieeefp.h> #endif double d (unsigned long long k) { double x; x = (double) k; return x; } float s (unsigned long long k) { float x; x = (float) k; return x; } main () { unsigned long long int k; double x; #if defined(__i386__) && defined(__FreeBSD__) /* This test case assumes extended-precision, but FreeBSD defaults to double-precision. Make it so. */ fpsetprec (FP_PE); #endif if (sizeof (double) >= 8) { k = 0x8693ba6d7d220401ULL; x = d (k); k = (unsigned long long) x; if (k != 0x8693ba6d7d220800ULL) abort (); } k = 0x8234508000000001ULL; x = s (k); k = (unsigned long long) x; if (k != 0x8234510000000000ULL) abort (); exit (0); } ```
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <style name="Base.V24.Theme.Material3.Light" parent="Base.V14.Theme.Material3.Light"> <item name="android:contextPopupMenuStyle">@style/Widget.Material3.PopupMenu.ContextMenu</item> </style> <style name="Base.V24.Theme.Material3.Dark" parent="Base.V14.Theme.Material3.Dark"> <item name="android:contextPopupMenuStyle">@style/Widget.Material3.PopupMenu.ContextMenu</item> </style> <style name="Base.Theme.Material3.Light" parent="Base.V24.Theme.Material3.Light"/> <style name="Base.Theme.Material3.Dark" parent="Base.V24.Theme.Material3.Dark"/> </resources> ```
```javascript // Spectrum Colorpicker // Simplified Chinese (zh-cn) localization // path_to_url (function ( $ ) { var localization = $.spectrum.localization["zh-cn"] = { cancelText: "", chooseText: "", clearText: "" }; $.extend($.fn.spectrum.defaults, localization); })( jQuery ); ```
```html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>flat_static_buffer_base::const_buffers_type</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Beast"> <link rel="up" href="../boost__beast__flat_static_buffer_base.html" title="flat_static_buffer_base"> <link rel="prev" href="commit.html" title="flat_static_buffer_base::commit"> <link rel="next" href="consume.html" title="flat_static_buffer_base::consume"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="path_to_url">People</a></td> <td align="center"><a href="path_to_url">FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="commit.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__flat_static_buffer_base.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="consume.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type"></a><a class="link" href="const_buffers_type.html" title="flat_static_buffer_base::const_buffers_type">flat_static_buffer_base::const_buffers_type</a> </h5></div></div></div> <p> <a class="indexterm" name="idp94323216"></a> The type used to represent the input sequence as a list of buffers. </p> <h6> <a name="beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.h0"></a> <span class="phrase"><a name="beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.synopsis"></a></span><a class="link" href="const_buffers_type.html#beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="keyword">using</span> <span class="identifier">const_buffers_type</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">mutable_buffer</span><span class="special">;</span> </pre> <h6> <a name="beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.h1"></a> <span class="phrase"><a name="beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.description"></a></span><a class="link" href="const_buffers_type.html#beast.ref.boost__beast__flat_static_buffer_base.const_buffers_type.description">Description</a> </h6> <p> This buffer sequence is guaranteed to have length 1. </p> </div> <table xmlns:rev="path_to_url~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> file LICENSE_1_0.txt or copy at <a href="path_to_url" target="_top">path_to_url </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="commit.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__flat_static_buffer_base.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="consume.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html> ```
Scotland in the Late Middle Ages, between the deaths of Alexander III in 1286 and James IV in 1513, established its independence from England under figures including William Wallace in the late 13th century and Robert Bruce in the 14th century. In the 15th century under the Stewart Dynasty, despite a turbulent political history, the Crown gained greater political control at the expense of independent lords and regained most of its lost territory to approximately the modern borders of the country. However, the Auld Alliance with France led to the heavy defeat of a Scottish army at the Battle of Flodden in 1513 and the death of the king James IV, which would be followed by a long minority and a period of political instability. The economy of Scotland developed slowly in this period and a population of perhaps a little under a million by the middle of the 14th century began to decline after the arrival of the Black Death, falling to perhaps half a million by the beginning of the 16th century. Different social systems and cultures developed in the lowland and highland regions of the country as Gaelic remained the most common language north of the Tay and Middle Scots dominated in the south, where it became the language of the ruling elite, government and a new national literature. There were significant changes in religion which saw mendicant friars and new devotions expand, particularly in the developing burghs. By the end of the period Scotland had adopted many of the major tenets of the European Renaissance in art, architecture and literature and produced a developed educational system. This period has been seen as one in which a clear national identity emerged in Scotland, as well as significant distinctions between different regions of the country which would be particularly significant in the period of the Reformation. Political history Wars of Independence 1286–1371 John The death of king Alexander III in 1286, and the subsequent death of his granddaughter and heir Margaret (called "the Maid of Norway") in 1290, left 14 rivals for succession. To prevent civil war the Scottish magnates asked Edward I of England to arbitrate. He extracted legal recognition that the realm of Scotland was held as a feudal dependency to the throne of England before choosing John Balliol, the man with the strongest claim, who became king as John I (30 November 1292). Robert Bruce of Annandale, the next strongest claimant, accepted this outcome with reluctance. Over the next few years Edward I used the concessions he had gained to systematically undermine both the authority of King John and the independence of Scotland. In 1295 John, on the urgings of his chief councillors, entered into an alliance with France, the beginning of the Auld Alliance. In 1296 Edward invaded Scotland, deposing King John. The following year William Wallace and Andrew Murrey raised forces to resist the occupation and under their joint leadership an English army was defeated at the Battle of Stirling Bridge. Murrey died of wounds after the battle and for a short time Wallace ruled Scotland in the name of John Balliol as Guardian of the realm. Edward came north in person and defeated Wallace at the Battle of Falkirk. Wallace escaped but probably resigned as Guardian of Scotland. In 1305 he fell into the hands of the English, who executed him for treason despite the fact that he owed no allegiance to England. Robert I Rivals John Comyn and Robert the Bruce, grandson of the claimant Robert Bruce of Annandale, were appointed as joint guardians in Wallace's place. On 10 February 1306, Bruce participated in the murder of Comyn, at Greyfriars Kirk in Dumfries. Less than seven weeks later, on 25 March Bruce was crowned as king Robert I at Scone. However, Edward's forces overran the country after defeating Bruce's small army at the Battle of Methven. Despite the excommunication of Bruce and his followers by Pope Clement V, his support grew; and by 1314, with the help of leading nobles such as Sir James Douglas and the Earl of Moray, only the castles at Bothwell and Stirling remained under English control. Edward I had died in 1307 and his heir Edward II moved an army north to break the siege of Stirling Castle and reassert control. They were defeated by forces under Robert I at the Battle of Bannockburn in 1314, securing de facto independence. In 1320 the Declaration of Arbroath, a remonstrance to the Pope from the nobles of Scotland, helped to convince Pope John XXII to overturn the earlier excommunication and nullify the various acts of submission by Scottish kings to English ones so that Scotland's sovereignty could be recognised by the major European dynasties. The Declaration has also been seen as one of the most important documents in the development of a Scottish national identity. Robert's brother Edward Bruce carried out a series of campaigns against English forces in Ireland and was declared High King. The campaigns in Ireland, although ultimately unsuccessful, opened the prospect of what has been characterised as "Pan-Gaelic Greater Scotia" under the Bruce dynasty. Robert's forces carried out a series of raids of Northern England, defeating an English army in 1327 at the Battle of Stanhope Park. Robert's victories contributed to the deposition of Edward II and Robert was able to take advantage of the minority of his son Edward III to secure the Treaty of Edinburgh–Northampton, signed in May 1328, which recognised Scotland as an independent kingdom, and Bruce as its king. David II Robert I died in 1329, leaving his five-year-old son to reign as David II. During his minority, the country was ruled by a series of governors, two of whom died as a result of a renewed invasion by English forces from 1332. This was on the pretext of restoring Edward Balliol, son of John Balliol, to the Scottish throne, thus starting the Second War of Independence. Despite victories at Dupplin Moor (1332) and Halidon Hill (1333), in the face of tough Scottish resistance led by Sir Andrew Murray, the son of Wallace's comrade in arms, successive attempts to secure Balliol on the throne failed. Edward III lost interest in the fate of his protege after the outbreak of the Hundred Years' War with France. In 1341 David was able to return from temporary exile in France. In 1346 under the terms of the Auld Alliance, he invaded England in the interests of France, but was defeated and taken prisoner at the Battle of Neville's Cross on 17 October 1346 and would remain in England as a prisoner for 11 years. His cousin Robert Stewart ruled as guardian in his absence. Balliol finally resigned his claim to the throne to Edward in 1356, before retiring to Yorkshire, where he died in 1364. Without swearing allegiance to Edward III, David was released for a ransom of 100,000 marks in 1357, but he was unable to pay, resulting in secret negotiations with the English and attempts to secure succession to the Scottish throne for an English king. Major issues were his marriages and the failure to produce an heir. His first wife, Joan, the sister of Edward III, left him for England sometime after his return and she died without children in 1362. His planned second marriage to Margaret, the widow of the knight Sir John Logie, resulted in a factional division that alienated nobles including Robert Steward. Eventually the king backed the queen's opponents and attempted to divorce her. She fled to the continent and appealed to the Pope for support. Before he could marry again David died, apparently unexpectedly, bringing the Bruce dynasty to an end. The Stewarts 1371–1513 Robert II, Robert III and James I After the unexpected death of the childless David II, Robert Stewart, the first of the Stewart (later Stuart) monarchs, came to the throne in 1371. Despite his relatively venerable age of 55, his son, John, Earl of Carrick, grew impatient and assumed the reins of government as Lord Lieutenant. A border incursion into England led to the victory at Otterburn in 1388, but at the cost of the life of John's ally James Douglas, 2nd Earl of Douglas. This, along with Carrick having suffered a debilitating horse kick, led to a shift in power to his brother Robert Stewart, Earl of Fife, who now was appointed as Lieutenant in his place. When Robert II died in 1390 John took the regnal name Robert III, to avoid awkward questions over the exact status of the first King John, but power rested with his brother Robert, now Duke of Albany. After the suspicious death of his elder son, David, Duke of Rothesay in 1402, Robert, fearful for the safety of his younger son, James (the future James I), sent him to France in 1406. However, the English captured him en route and he spent the next 18 years as a prisoner held for ransom. As a result, after the death of Robert III later that year, regents ruled Scotland: first Albany and after his death in 1420 his son Murdoch, during whose term of office the country suffered considerable unrest. When the Scots finally began the ransom payments in 1424, James, aged 32, returned with his English bride, Joan Beaufort, determined to assert this authority. He revoked grants from customs and of lands made during his captivity, undermining the position of those who had gained in his absence, particularly the Albany Stewarts. James had Murdoch and two of his sons tried and then executed with further enforcement of his authority by more arrests and forfeiture of lands. In 1436 he attempted to regain one of the major border fortresses still in English hands at Roxburgh, but the siege ended in a humiliating defeat. He was murdered by discontented council member Robert Graham and his co-conspirators near the Blackfriars church, Perth in 1437. James II The assassination left the king's seven-year-old son to reign as James II. After the execution of a number of suspected conspirators, leadership fell to Archibald Douglas, 5th Earl of Douglas, as lieutenant-general of the realm. After his death in 1439, power was shared uneasily between the Douglas family, William, 1st Lord Crichton, Lord Chancellor of Scotland and Sir Alexander Livingston of Callendar. A conspiracy to break the power of the Douglas family led to the "Black Dinner" at Edinburgh Castle in 1440, which saw the judicial murder of the young William Douglas, 6th Earl of Douglas and his brother by Livingstone and Crichton. The main beneficiary was the victims' great uncle James Douglas, Earl of Avondale who became the 7th Earl of Douglas and emerged as the main power in the government. In 1449 James II was declared to have reached his majority, but the Douglases consolidated their position and the king began a long struggle for power, leading to the murder of the 8th Earl of Douglas at Stirling Castle on 22 February 1452. This opened an intermittent civil war as James attempted to seize Douglas lands, punctuated by a series of humiliating reversals. Gradually James managed to win over the allies of the Douglases with offers of lands, titles and offices and the Douglases' forces were finally defeated at the Battle of Arkinholm on 12 May 1455. Once independent, James II proved to be an active and interventionist king. He travelled the country dispensing justice and some of the unpopular policies of the following reign, such as the sale of pardons, may have originated in this period. Ambitious plans to take Orkney, Shetland and the Isle of Man came to nothing. His attempt to take Roxburgh from the English in 1460 succeeded, but at the cost of his life as he was killed by an exploding artillery piece. James III James II's son, aged nine or ten, became king as James III, and his widow Mary of Guelders acted as regent until her own death three years later. The Boyd family, led by Robert, Lord Boyd, emerged as the leading force in the government, making themselves unpopular through self-aggrandisement, with Lord Robert's son Thomas being made Earl of Arran and marrying the king's sister, Mary. While Robert and Thomas were out of the country in 1469 the king asserted his control, executing members of the Boyd family. His foreign policy included a rapprochement with England, with his eldest son, the future James IV, being betrothed to Cecily of York, the daughter of Edward IV of England, a change of policy that was immensely unpopular at home. During the 1470s conflict developed between the king and his brothers, Alexander, Duke of Albany and John, Earl of Mar. Mar died suspiciously in 1480 and his estates were forfeited and possibly given to a royal favourite, Robert Cochrane. Albany fled to France in 1479, accused of treason. By this point the alliance with England was failing and from 1480 there was intermittent war, followed by a full-scale invasion of Scotland two years later, led by the Duke of Gloucester, the future Richard III, and accompanied by Albany. James was imprisoned by his own subjects in Edinburgh Castle, and Albany was established as lieutenant-general. Having taken Berwick-upon-Tweed the English retreated and Albany's government began to collapse forcing him to flee. Despite conspiracies and more attempts at invasion, James was able to regain power. However, the king managed to alienate the barons, refusing to travel for the implementation of justice, preferring to be resident in Edinburgh, he debased the coinage, probably creating a financial crisis, he continued to pursue an English alliance and dismissed key supporters, including his Chancellor Colin Campbell, 1st Earl of Argyll, becoming estranged from his wife, Margaret of Denmark, and his son James. Matters came to a head in 1488 when he faced an army raised by the disaffected nobles, and many former councillors, acting in the name of the prince as James IV. He was defeated at the Battle of Sauchieburn and killed. James IV James IV was 15 when he came to the throne, but soon proved a capable and independent-minded ruler, whose reign is often considered to have seen a flowering of Scottish culture under the influence of the European Renaissance. He took a direct interest in the administration of justice and frequently moved his court in legal circuits of justice ayres. He defeated a major Northern rebellion, mainly of supporters of the murdered James III. It began in Dunbarton in 1489, led by the Earl of Lennox and Lord Lyle and spreading through the North. James is credited with finally bringing the Lordship of the Isles under control. He forced through the forfeiture of the lands of the last lord John MacDonald in 1493, backing Alexander Gordon, 3rd Earl of Huntly's power in the region and launching a series of naval campaigns and sieges that resulted in the capture or exile of his rivals by 1507. For a time he supported Perkin Warbeck, the pretender to the English throne, and carried out a brief invasion of England on his behalf in 1496. However, he then established good diplomatic relations with England, and in 1502 signed the Treaty of Perpetual Peace, marrying Henry VII's daughter, Margaret Tudor, thus laying the foundation for the 17th century Union of the Crowns. Animosity with Henry VIII of England helped prompt the renewal of the Auld Alliance in 1512. When the Pope organised a Holy League, which included England, against the French in 1511, James was caught between incompatible diplomatic policies. He tried to suggest an unrealistic European Crusade to Constantinople, but after border skirmishing, when the French were attacked by the English he declared war on England and was excommunicated by the Pope. He sent his navy and gunners to support the French and in 1513 led a major army of perhaps 34,000 over the border. After using his formidable artillery train to take Norham Castle he marched south, where the invasion was stopped decisively on 9 September 1513 at the Battle of Flodden. The King, many of his nobles, and a large number of ordinary troops were killed, commemorated by the song "The Floo'ers o' the Forest". Once again Scotland's government lay in the hands of regents in the name of the infant James V. Geography The defining factor in the geography of Scotland is the distinction between the Highlands and Islands in the north and west and the lowlands in the south and east. The highlands are further divided into the Northwest Highlands and the Grampian Mountains by the fault line of the Great Glen. The lowlands are divided into the fertile belt of the Central Lowlands and the higher terrain of the Southern Uplands, which included the Cheviot hills, over which the border with England came to run by the end of the period. The Central Lowland belt averages about 50 miles in width and, because it contains most of the good quality agricultural land and has easier communications, could support most of the urbanisation and elements of conventional medieval government. However, the Southern Uplands, and particularly the Highlands were economically less productive and much more difficult to govern. This provided Scotland with a form of protection, as minor English incursions had to cross the difficult southern uplands and the two major attempts at conquest by the English, under Edward I and then Edward III, were unable to penetrate the highlands, from which area potential resistance could reconquer the lowlands. However, it also made those areas problematic to govern for Scottish kings and much of the political history of the era after the wars of independence circulated around attempts to resolve problems of entrenched localism in these regions. It was in the later medieval era that the borders of Scotland reached approximately their modern extent. The Isle of Man fell under English control in the 14th century, despite several attempts to restore Scottish authority. The English were able to annexe a large slice of the lowlands under Edward III, but these losses were gradually regained, particularly while England was preoccupied with the Wars of the Roses (1455–85). In 1468 the last great acquisition of Scottish territory occurred when James III married Margaret of Denmark, receiving the Orkney Islands and the Shetland Islands in payment of her dowry. However, in 1482 Berwick, a border fortress and the largest port in medieval Scotland, fell to the English once again, for what was to be the final change of hands. Demography Because medieval Scotland lacked the intrusive government and growing bureaucracy that can be found in contemporaneous England, there is very little evidence on which to base reliable estimates of population before the early 18th century. On the basis that it had roughly a sixth of the farmable land of England, it has been suggested that the population would have been of a similar proportion, probably a little less than a million at its height before the Black Death reached the country in 1349. Although there is no reliable documentation on the impact of the plague, there are many anecdotal references to abandoned land in the following decades. If the pattern followed that in England, then the population may have fallen to as low as half a million by the end of the 15th century. Compared with the situation after the redistribution of population in the later clearances and the industrial revolution, these numbers would have been relatively evenly spread over the kingdom, with roughly half living north of the Tay. Perhaps ten per cent of the population lived in one of fifty burghs that existed at the beginning of the period, mainly in the east and south. It has been suggested that they would have had a mean population of about 2,000, but many would be much smaller than 1,000 and the largest, Edinburgh, probably had a population of over 10,000 by the end of the era. Economy Agriculture Scotland is roughly half the size of England and Wales, but has only between a fifth and a sixth of the amount of the arable or good pastoral land, making marginal pastoral farming and, with its extensive coastline, fishing, the key factors in the medieval economy. With difficult terrain, poor roads and methods of transport there was little trade between different areas of the country and most settlements depended on what was produced locally, often with very little in reserve in bad years. Most farming was based on the lowland farmtoun or highland baile, settlements of a handful of families that jointly farmed an area notionally suitable for two or three plough teams, allocated in run rigs to tenant farmers. They usually ran downhill so that they included both wet and dry land, helping to offset some of the problems of extreme weather conditions. This land was divided into the infield, which was in continuous arable cultivation, and the outfield which was rotated between arable and grass. Most ploughing was done with a heavy wooden plough with an iron coulter, pulled by oxen, who were more effective and cheaper to feed than horses. Obligations to the local lord usually included supplying oxen for ploughing the lord's land on an annual basis and the much-resented obligation to grind corn at the lord's mill. The rural economy appears to have boomed in the 13th century and in the immediate aftermath of the Black Death was still buoyant, but by the 1360s there was a severe falling off of incomes, which can be seen in clerical benefices, of between a third and half compared with the beginning of the era. This was followed by a slow recovery in the 15th century. Burghs Most of the burghs were on the east coast, and among them were the largest and wealthiest, including Aberdeen, Perth and Edinburgh, whose growth was facilitated by trade with the continent. Although in the southwest Glasgow was beginning to develop and Ayr and Kirkcudbright had occasional links with Spain and France, sea trade with Ireland was much less profitable. In addition to the major royal burghs this era saw the proliferation of lesser baronial and ecclesiastical burghs, with 51 being created between 1450 and 1516. Most of these were much smaller than their royal counterparts; excluded from international trade, they mainly acted as local markets and centres of craftsmanship. In general burghs probably carried out far more local trading with their hinterlands, relying on them for food and raw materials. The wool trade was a major export at the beginning of the period, but the introduction of sheep-scab was a serious blow to the trade and it began to decline as an export from the early 15th century and despite a levelling off, there was another drop in exports as the markets collapsed in the early-16th century Low Countries. Unlike in England, this did not prompt the Scots to turn to large scale cloth production and only poor quality rough cloths seem to have been significant. Crafts, industry and trade There were relatively few developed crafts in Scotland in this period, although by the later 15th century there were the beginnings of a native iron casting industry, which led to the production of cannon, and of the silver and goldsmithing for which the country would later be known. As a result, the most important exports were unprocessed raw materials, including wool, hides, salt, fish, animals and coal, while Scotland remained frequently short of wood, iron and, in years of bad harvests, grain. Exports of hides and particularly salmon, where the Scots held a decisive advantage in quality over their rivals, appear to have held up much better than wool, despite the general economic downturn in Europe in the aftermath of the plague. The growing desire among the court, lords, upper clergy and wealthier merchants for luxury goods that largely had to be imported led to a chronic shortage of bullion. This, and perennial problems in royal finance, led to several debasements of the coinage, with the amount of silver in a penny being cut to almost a fifth between the late 14th century and the late 15th century. The heavily debased "black money" introduced in 1480 had to be withdrawn two years later and may have helped fuel a financial and political crisis. Society Kinship and clans The fundamental social bond in late medieval Scottish society was that of kinship. Descent was agnatic, with members of a group sharing a (sometimes fictional) common ancestor, in the south often reflected in a common surname. Unlike in England, where kinship was predominately cognatic (derived through both males and females), women retained their original surname at marriage and marriages were intended to create friendship between kin groups, rather than a new bond of kinship. As a result, a shared surname has been seen as a "test of kinship", proving large bodies of kin who could call on each other's support and this could help intensify the idea of the feud, which was usually carried out as a form of revenge for a kinsman and for which a large body of kin could be counted on to support rival sides, although conflict between members of kin groups also occurred. The combination of agnatic kinship and a feudal system of obligation has been seen as creating the highland clan system, evident in records from the 13th century. Surnames were rare in the highlands until the 17th and 18th centuries and in the Middle Ages all members of a clan did not share a name and most ordinary members were usually not related to its head. The head of a clan in the beginning of the era was often the strongest male in the main sept or branch of the clan, but later, as primogeniture began to dominate, was usually the eldest son of the last chief. The leading families of a clan formed the fine, often seen as equivalent to lowland gentlemen, providing council in peace and leadership in war, and below them were the daoine usisle (in Gaelic) or tacksmen (in Scots), who managed the clan lands and collected the rents. In the isles and along the adjacent western seaboard there were also buannachann, who acted as a military elite, defending the clan lands from raids or taking part in attacks on clan enemies. Most of the followers of the clan were tenants, who supplied labour to the clan heads and sometimes act as soldiers. In the early modern era they would take the clan name as their surname, turning the clan into a massive, if often fictive, kin group. Social structure In the late medieval era the terminology used to describe the different ranks of Scottish social structure was increasingly dominated by the Scots language and as a result began to parallel the terminology used in England. This consciousness over status was reflected in military and (from 1430) sumptuary legislation, which set out the types of weapons and armour that should be maintained, and clothes that could be worn, by various ranks. Below the king were a small number of dukes (usually descended from very close relatives of the king) and earls, who formed the senior nobility. Below them were the barons, and, from the 1440s, fulfilling the same role were the lords of Parliament, the lowest level of the nobility with the rank-given right to attend the Estates. There were perhaps 40 to 60 of these in Scotland throughout the period. Members of these noble ranks, perhaps particularly those that had performed military or administrative service to the Crown, might also be eligible for the status of knighthood. Below these were the lairds, roughly equivalent to the English gentlemen. Most were in some sense in the service of the major nobility, either in terms of land or military obligations, roughly half sharing with them their name and a distant and often uncertain form of kinship. Serfdom died out in Scotland in the 14th century, although through the system of courts baron landlords still exerted considerable control over their tenants. Below the lords and lairds were a variety of groups, often ill-defined. These included yeomen, sometimes called "bonnet lairds", often owning substantial land, and below them the husbandmen, lesser landholders and free tenants that made up the majority of the working population. Society in the burghs was headed by wealthier merchants, who often held local office as a burgess, alderman, bailies or as a member of the council. A small number of these successful merchants were dubbed knights for their service by the king by the end of the era, although this seems to have been an exceptional form of civic knighthood that did not put them on a par with landed knights. Below them were craftsmen and workers that made up the majority of the urban population. Social conflict Historians have noted considerable political conflict in the burghs between the great merchants and craftsmen throughout the period. Merchants attempted to prevent lower crafts and gilds from infringing on their trade, monopolies and political power. Craftsmen attempted to emphasise their importance and to break into disputed areas of economic activity, setting prices and standards of workmanship. In the 15th century a series of statutes cemented the political position of the merchants, with limitations on the ability of residents to influence the composition of burgh councils and many of the functions of regulation taken on by the bailies. In rural society historians have noted a lack of evidence of widespread unrest similar to that evidenced the Jacquerie of 1358 in France and the Peasants' Revolt of 1381 in England, possibly because there was relatively little of the type of change in agriculture, like the enclosure of common land, that could create widespread resentment before the modern era. Instead a major factor was the willingness of tenants to support their betters in any conflict in which they were involved, for which landlords reciprocated with charity and support. Highland and border society acquired a reputation for lawless activity, particularly the feud. However, more recent interpretations have pointed to the feud as a means of preventing and speedily resolving disputes by forcing arbitration, compensation and resolution. Government The Crown The Crown was at the centre of government in late medieval Scotland. The unification of the kingdom, the spread of Anglo-Norman custom, the development of a European trading economy and Robert I's success in achieving independence from England, all did much to build up the prestige of the institution. However, its authority within the kingdom was not unchallenged, not least from the many semi-independent lordships and it endured a series of crises, particularly frequent minorities and resulting regencies. All of this, in addition to the relative poverty of the kingdom and the lack of a system of regular taxation, helped to limit the scale of central administration and government. Much more than the English monarchy, the Scottish court remained a largely itinerant institution, with the king moving between royal castles, particularly Perth and Stirling, but also holding judicial sessions throughout the kingdom, with Edinburgh only beginning to emerge as the capital in the reign of James III at the cost of considerable unpopularity. Like most western European monarchies, the Scottish Crown in the 15th century adopted the example of the Burgundian court, through formality and elegance putting itself at the centre of culture and political life, defined with display, ritual and pageantry, reflected in elaborate new palaces and patronage of the arts. Privy Council After the Crown the most important government institution was the Privy Council, composed of the king's closest advisers, but which, unlike in England, retained legislative and judicial powers. It was relatively small, with normally less than 10 members in a meeting, some of whom were nominated by Parliament, particularly during the many minorities of the era, as a means of limiting the power of a regent. The council was a virtually full-time institution by the late 15th century, and surviving records from the period indicate it was critical in the working of royal justice. Nominally members of the council were some of the great magnates of the realm, but they rarely attended meetings. Most of the active members of the council for most of the period were career administrators and lawyers, almost exclusively university-educated clergy, the most successful of which moved on to occupy the major ecclesiastical positions in the realm as bishops and, towards the end of the period, archbishops. By the end of the 15th century this group was being joined by increasing numbers of literate laymen, often secular lawyers, of which the most successful gained preferment in the judicial system and grants of lands and lordships. From the reign of James III onwards the clerically dominated post of Lord Chancellor was increasingly taken by leading laymen. Parliament The next most important body in the process of government was parliament, which had evolved by the late 13th century from the King's Council of Bishops and Earls into a 'colloquium' with a political and judicial role. By the early 14th century, the attendance of knights and freeholders had become important, and probably from 1326 burgh commissioners joined them to form the Three Estates, meeting in a variety of major towns throughout the kingdom. It acquired significant powers over particular issues, including consent for taxation, but it also had a strong influence over justice, foreign policy, war, and other legislation, whether political, ecclesiastical, social or economic. From the early 1450s, a great deal of the legislative business of the Scottish Parliament was usually carried out by a parliamentary committee known as the 'Lords of the Articles', chosen by the three estates to draft legislation which was then presented to the full assembly to be confirmed. Parliamentary business was also carried out by 'sister' institutions, before c. 1500 by General Council and thereafter by the Convention of Estates. These could carry out much business also dealt with by Parliament—taxation, legislation and policy-making—but lacked the ultimate authority of a full parliament. In the 15th-century parliament was being called on an almost annual basis, more often than its English counterpart, and was willing to offer occasional resistance or criticism to the policies of the Crown, particular in the unpopular reign of James III. However, from about 1494, after his success against the Stewarts and Douglases and over rebels in 1482 and 1488, James IV managed to largely dispense with the institution and it might have declined, like many other systems of Estates in continental Europe, had it not been for his death in 1513 and another long minority. Local government At a local level, government combined traditional kinship-based lordships with a relatively small system of royal offices. Until the 15th century the ancient pattern of major lordships survived largely intact, with the addition of two new "scattered earldoms" of Douglas and Crawford, thanks to royal patronage after the Wars of Independence, mainly in the borders and south-west. The dominant kindred were the Stewarts, who came to control many of the earldoms. Their acquisition of the Crown, and a series of internal conflicts and confiscations, meant that by around the 1460s the monarchy had transformed its position within the realm, gaining control of most of the "provincial" earldoms and lordships. Rather than running semi-independent lordships, the major magnates now had scattered estates and occasional regions of major influence. In the lowlands the Crown was now able to administer government through a system of sheriffdoms and other appointed officers, rather than semi-independent lordships. In the highlands James II created two new provincial earldoms for his favourites: Argyll for the Campbells and Huntly for the Gordons, which acted as a bulwark against the vast Lordship of the Isles built up by the Macdonalds. James IV largely resolved the Macdonald problem by annexing the estates and titles of John Macdonald II to the Crown in 1493 after discovering his plans for an alliance with the English. Warfare Armies Scottish armies of the late medieval era depended on a combination of familial, communal and feudal forms of service. "Scottish service" (servitum Scoticanum), also known as "common service" (communis exertcitus), a levy of all able-bodied freemen aged between 16 and 60, provided the bulk of armed forces, with (according to decrees) 8 days warning. Feudal obligations, by which knights held castles and estates in exchange for service, provided troops on a 40-day basis. By the second half of the 14th century money contracts of bonds or bands of manrent, similar to English indentures of the same period, were being used to retain more professional troops, particularly men-at-arms and archers. In practice forms of service tended to blur and overlap and several major Scottish lords brought contingents from their kindred. These systems produced relatively large numbers of poorly armoured infantry, often armed with 12–14 foot spears. They often formed the large close order defensive formations of shiltrons, able to counter mounted knights as they did at Bannockburn, but vulnerable to arrows (and later artillery fire) and relatively immobile, as they proved at Halidon Hill. There were attempts to replace spears with longer pikes of 15½ to 18½ feet in the later 15th century, in emulation of successes over mounted troops in the Netherlands and Switzerland, but this does not appear to have been successful until the eve of the Flodden campaign in early 16th century. There were smaller numbers of archers and men-at-arms, which were often outnumbered when facing the English on the battlefield. Archers became much sought after as mercenaries in French armies of the 15th century to help counter the English superiority in this arm, becoming a major element of the French royal guards as the Garde Écossaise. Scottish men-at-arms often dismounted to fight beside the infantry, with perhaps a small mounted reserve, and it has been suggested that these tactics were copied and refined by the English, leading to their successes in the Hundred Years' War. Artillery The Stewarts attempted to follow France and England in building up an artillery train. The abortive siege of Roxborugh in 1436 under James I was probably the first conflict in which the Scots made serious use of artillery. James II had a royal gunner and received gifts of artillery from the continent, including two giant bombards made for Philip the Good, Duke of Burgundy, one of which, Mons Meg, still survives. Although these were probably already outdated on the continent, they represented impressive military technology when they reached Scotland. James II enthusiasm for artillery cost him his life, and James III also experienced ill-fortune when artillery sent from Sigismund, Archduke of Austria, sank in a storm en route to Scotland in 1481. James IV brought in experts from France, Germany and the Netherlands and established a foundry in 1511. Edinburgh Castle had a house of artillery where visitors could see cannon cast for what became a formidable train, allowing him to send cannon to France and Ireland and to quickly subdue Norham Castle in the Flodden campaign. However, 18 heavy artillery pieces had to be drawn by 400 oxen and slowed the advancing army, proving ineffective against the longer range and smaller calibre English guns at the Battle of Flodden. Navy After the establishment of Scottish independence, Robert I turned his attention to building up a Scottish naval capacity. This was largely focused on the west coast, with the Exchequer Rolls of 1326 recording the feudal duties of his vassals in that region to aid him with their vessels and crews. Towards the end of his reign he supervised the building of at least one royal man-of-war near his palace at Cardross on the River Clyde. In the late 14th century naval warfare with England was conducted largely by hired Scots, Flemish and French merchantmen and privateers. James I took a greater interest in naval power. After his return to Scotland in 1424 he established a shipbuilding yard at Leith, a house for marine stores, and a workshop. King's ships, one of which accompanied him on his expedition to the Islands in 1429, were built and equipped there to be used for trade as well as war, and the office of Lord High Admiral was probably founded in this period. In his struggles with his nobles in 1488 James III received assistance from his two warships the Flower and the King's Carvel also known as the Yellow Carvel. James IV put the enterprise on a new footing, founding a new harbour at Newhaven in May 1504, and two years later ordered the construction of a dockyard at the Pools of Airth. The upper reaches of the Forth were protected by new fortifications on Inchgarvie. The king acquired a total of 38 ships for the Royal Scottish Navy, including the Margaret, and the carrack Michael or Great Michael. The latter, built at great expense at Newhaven and launched in 1511, was in length, weighed 1,000 tons, had 24 cannon, and was, at that time, the largest ship in Europe. Scottish ships had some success against privateers, accompanied the king in his expeditions in the islands and intervened in conflicts in Scandinavia and the Baltic. In the Flodden campaign the fleet consisted of 16 large and 10 smaller craft. After a raid on Carrickfergus in Ireland, it joined up with the French and had little impact on the war. After the disaster at Flodden the Great Michael, and perhaps other ships, were sold to the French and the king's ships disappeared from royal records after 1516. Religion The Church Since gaining its independence from English ecclesiastical organisation in 1192, the Catholic Church in Scotland had been a "special daughter of the see of Rome", enjoying a direct relationship with the Papacy. Lacking archbishoprics, it was in practice run by special councils made up of all the bishops, with the bishop of St Andrews emerging as the most important player, until in 1472 St Andrews became the first archbishopric, to be followed by Glasgow in 1492. Late medieval religion had its political aspects, with Robert I carrying the brecbennoch (or Monymusk reliquary), said to contain the remains of St. Columba, into battle at Bannockburn and James IV using his pilgrimages to Tain and Whithorn to help bring Ross and Galloway under royal authority. There were also further attempts to differentiate Scottish liturgical practice from that in England, with a printing press established under royal patent in 1507 to replace the English Sarum Use for services. As elsewhere in Europe, the collapse of papal authority in the Papal Schism allowed the Scottish Crown to gain effective control of major ecclesiastical appointments within the kingdom, a position recognised by the Papacy in 1487. This led to the placement of clients and relatives of the king in key positions, including James IV's illegitimate son Alexander, who was nominated as Archbishop of St. Andrews at the age of 11, intensifying royal influence and also opening the Church to accusations of venality and nepotism. Despite this, relationships between the Scottish crown and the Papacy were generally good, with James IV receiving tokens of papal favour. Popular practice Traditional Protestant historiography tended to stress the corruption and unpopularity of the late medieval Scottish church, but more recent research has indicated the ways in which it met the spiritual needs of different social groups. Historians have discerned a decline of monasticism in this period, with many religious houses keeping smaller numbers of monks, and those remaining often abandoning communal living for a more individual and secular lifestyle. New monastic endowments from the nobility also declined in the 15th century. In contrast, the burghs saw the flourishing of mendicant orders of friars in the later 15th century, who placed an emphasis on preaching and ministering to the population. The order of Observant Friars were organised as a Scottish province from 1467 and the older Franciscans and Dominicans were recognised as separate provinces in the 1480s. In most burghs, in contrast to English towns where churches tended to proliferate, there was usually only one parish church, but as the doctrine of Purgatory gained in importance in the period, the number of chapelries, priests and masses for the dead within them grew rapidly. The number of altars to saints also grew dramatically, with St. Mary's in Dundee having perhaps 48 and St Giles' in Edinburgh over 50, as did the number of saints celebrated in Scotland, with about 90 being added to the missal used in St Nicholas church in Aberdeen. New cults of devotion connected with Jesus and the Virgin Mary also began to reach Scotland in the 15th century, including The Five Wounds, The Holy Blood and The Holy Name of Jesus and new feasts including The Presentation, The Visitation and Mary of the Snows. In the early 14th century the Papacy managed to minimise the problem of clerical pluralism, but with relatively poor livings and a shortage of clergy, particularly after the Black Death, in the 15th century the number of clerics holding two or more livings rapidly increased. This meant that parish clergy were largely drawn from the lower and less educated ranks of the profession, leading to frequent complaints about their standards of education or ability, although there is little clear evidence that this was actually declining. Heresy, in the form of Lollardry, began to reach Scotland from England and Bohemia in the early 15th century, but despite evidence of a number of burnings of heretics and some apparent support for its anti-sacramental elements, it probably remained a relatively small movement. Culture Education In medieval Scotland education was dominated by the Church and largely aimed at the training and education of clerics. In the later medieval period there was a general increase in the numbers of educational institutions as well as increasing use by the laity. These included private tuition in the families of lords and wealthy burghers, song schools attached to most major churches and an increasing number of grammar schools, particularly in the expanding burghs. These were almost exclusively aimed at boys, but by the end of the 15th century Edinburgh also had schools for girls. The growing emphasis on education cumulated with the passing of the Education Act 1496, which decreed that all sons of barons and freeholders of substance should attend grammar schools. All this resulted in an increase in literacy, but which was largely concentrated among a male and wealthy elite, with perhaps 60 per cent of the nobility being literate by the end of the period. Until the 15th century those who wished to attend university had to travel to England or the continent, but this situation was transformed by the founding of the University of St Andrews in 1413, the University of Glasgow in 1451 and the University of Aberdeen in 1495. Initially these institutions were designed for the training of clerics, but they would increasingly be used by laymen who would begin to challenge the clerical monopoly of administrative posts in the government and law. Scottish scholars continued to visit the continent for their second degrees and this international contact helped bring the new ideas of humanism back into Scottish intellectual life. Art and architecture Scotland is known for its dramatically placed castles, many of which date from the late medieval era. In contrast to England, where the wealthy began to move towards more comfortable grand houses, these continued to be built into the modern period, developing into the style of Scottish Baronial architecture in the 19th century, popular amongst the minor aristocracy and merchant class. This building type, often built with defence in mind in the form of the tower house, was characterised by corbelled turrets and crow-stepped gables marked the first uniquely Scottish mode of building. Ceilings of these houses were decorated with vividly coloured painting on boards and beams, using emblematic motifs from European pattern books or the artist's interpretation of trailing grotesque patterns. The grandest buildings of this type were the royal palaces in this style at Linlithgow, Holyrood, Falkland and the remodelled Stirling Castle, all of which have elements of continental European architecture, particularly from France and the Low Countries, adapted to Scottish idioms and materials (particularly stone and harl). More modest buildings with continental influences can be seen in the late 15th century western tower of St Mary's parish church, Dundee, and tollbooths like the one at Dunbar. Parish church architecture in Scotland was often much less elaborate than in England, with many churches remaining simple oblongs, without transepts and aisles, and often without towers. In the highlands they were often even simpler, many built of rubble masonry and sometimes indistinguishable from the outside from houses or farm buildings. However, there were some churches built in a grander continental style. French master-mason John Morrow was employed at the building of Glasgow Cathedral and the rebuilding of Melrose Abbey, both considered fine examples of Gothic architecture. The interiors of churches were often more elaborate before the Reformation, with highly decorated sacrament houses, like the ones surviving at Deskford and Kinkell. The carvings at Rosslyn Chapel, created in the mid-15th century, elaborately depicting the progression of the seven deadly sins, are considered some of the finest in the Gothic style. Late medieval Scottish churches also often contained elaborate burial monuments, like the Douglas tombs in the town of Douglas. There is relatively little information about native Scottish artists during the late Middle Ages. As in England, the monarchy may have had model portraits used for copies and reproductions, but the versions that survive are generally crude by continental standards. Much more impressive are the works or artists imported from the continent, particularly the Netherlands, generally considered the centre of painting in the Northern Renaissance. The products of these connections included the delicate hanging lamp in St. John's Kirk in Perth; the tabernacles and images of St Catherine and St John brought to Dunkeld, and vestments and hangings in Holyrood; Hugo van Der Goes's altarpiece for the Trinity College Church in Edinburgh, commissioned by James III, the work after which the Flemish Master of James IV of Scotland is named, and the illustrated Flemish Bening Book of Hours, given by James IV to Margaret Tudor. Language and literature It was in this period that the Scots language became the dominant language of the state and the social elite, while also becoming linked with Scottish national identity and making inroads into the highland zone at the expense of Gaelic. Middle Scots, often called "English" in this period, was derived largely from Old English, with the addition of elements from Gaelic and French. Although resembling the language spoken in northern England, it became a distinct dialect from the late 14th century onwards. It was the dominant language of the lowlands and borders, brought there largely by Anglo-Saxon settlers from the 5th century, but began to be adopted by the ruling elite as they gradually abandoned French in the late medieval era. By the 15th century it was the language of government, with acts of parliament, council records, and treasurer's accounts almost all using it from the reign of James I onwards. As a result, Gaelic, once dominant north of the Tay, began a steady decline. Gaelic was the language of the bardic tradition, which provided a mechanism for the transference of oral culture from generation to generation. Members of bardic schools were trained in the complex rules and forms of Gaelic poetry. In a non-literate society, they were the repositories of knowledge, including not just stories and songs, but also genealogies and medicine. They were found in many of the courts of the great lords, down to the chiefdoms of the highlands at the beginning of the period. The bardic tradition was not completely isolated from trends elsewhere, including love poetry influenced by continental developments and medical manuscripts from Padua, Salerno and Montpellier translated from Latin. The Gaelic oral tradition also began to manifest itself in written form, with the great compilation of Gaelic poetry, the Book of the Dean of Lismore produced by James and Duncan MacGregor at the beginning of the 16th century, probably designed for use in the courts of the greater chiefs. However, by the 15th-century lowland writers were beginning to treat Gaelic as a second class, rustic and even amusing language, helping to frame attitudes towards the highlands and to create a cultural gulf with the lowlands. It was Scots that emerged as the language of national literature in Scotland. The first surviving major text is John Barbour's Brus (1375), composed under the patronage of Robert II and telling the story in epic poetry of Robert I's actions before the English invasion until the end of the war of independence. The work was extremely popular among the Scots-speaking aristocracy and Barbour is referred to as the father of Scots poetry, holding a similar place to his contemporary Chaucer in England. In the early 15th century these were followed by Andrew of Wyntoun's verse Orygynale Cronykil of Scotland and Blind Harry's The Wallace, which blended historical romance with the verse chronicle. They were probably influenced by Scots versions of popular French romances that were also produced in the period, including The Buik of Alexander, Launcelot o the Laik and The Porteous of Noblenes by Gibert Hay. Much Middle Scots literature was produced by makars, poets with links to the royal court. These included James I who wrote The Kingis Quair. Many of the makars had university education and so were also connected with the Kirk. However, Dunbar's Lament for the Makaris (c. 1505) provides evidence of a wider tradition of secular writing outside of Court and Kirk now largely lost. Before the advent of printing in Scotland, writers such as Robert Henryson, William Dunbar, Walter Kennedy and Gavin Douglas have been seen as leading a golden age in Scottish poetry. In the late 15th century, Scots prose also began to develop as a genre. Although there are earlier fragments of original Scots prose, such as the Auchinleck Chronicle, the first complete surviving works include John Ireland's The Meroure of Wyssdome (1490). There were also prose translations of French books of chivalry that survive from the 1450s, including The Book of the Law of Armys and the Order of Knychthode and the treatise Secreta Secetorum, an Arabic work believed to be Aristotle's advice to Alexander the Great. The landmark work in the reign of James IV was Gavin Douglas's version of Virgil's Aeneid, the Eneados, which was the first complete translation of a major classical text in an Anglian language, finished in 1513, but overshadowed by the disaster at Flodden. Music Bards, who acted as musicians, but also as poets, storytellers, historians, genealogists and lawyers, relying on an oral tradition that stretched back generations, were found in Scotland as well as Wales and Ireland. Often accompanying themselves on the harp, they can also be seen in records of the Scottish courts throughout the medieval period. Scottish church music from the later Middle Ages was increasingly influenced by continental developments, with figures like 13th-century musical theorist Simon Tailler studying in Paris before returning to Scotland, where he introduced several reforms in church music. Scottish collections of music like the 13th-century 'Wolfenbüttel 677', which is associated with St Andrews, contain mostly French compositions, but with some distinctive local styles. The captivity of James I in England from 1406 to 1423, where he earned a reputation as a poet and composer, may have led him to take English and continental styles and musicians back to the Scottish court on his release. In the late 15th century a series of Scottish musicians trained in the Netherlands before returning home, including John Broune, Thomas Inglis and John Fety, the last of whom became master of the song school in Aberdeen and then Edinburgh, introducing the new five-fingered organ playing technique. In 1501 James IV refounded the Chapel Royal within Stirling Castle, with a new and enlarged choir, and it became the focus of Scottish liturgical music. Burgundian and English influences were probably reinforced when Henry VII's daughter Margaret Tudor married James IV in 1503. National identity The late Middle Ages has often been seen as the era in which Scottish national identity was initially forged, in opposition to English attempts to annexe the country and as a result of social and cultural changes. English invasions and interference in Scotland have been judged to have created a sense of national unity and a hatred towards England which dominated Scottish foreign policy well into the 15th century, making it extremely difficult for Scottish kings like James III and James IV to pursue policies of peace towards their southern neighbour. In particular the Declaration of Arbroath asserted the ancient distinctiveness of Scotland in the face of English aggression, arguing that it was the role of the king to defend the independence of the community of Scotland. This document has been seen as the first "nationalist theory of sovereignty". The adoption of Middle Scots by the aristocracy has been seen as building a shared sense of national solidarity and culture between rulers and ruled, although the fact that north of the Tay Gaelic still dominated may have helped widen the cultural divide between highlands and lowlands. The national literature of Scotland created in the late medieval period employed legend and history in the service of the Crown and nationalism, helping to foster a sense of national identity at least within its elite audience. The epic poetic history of the Brus and Wallace helped outline a narrative of united struggle against the English enemy. Arthurian literature differed from the conventional version of the legend by treating Arthur as a villain and Mordred, the son of the king of the Picts, as a hero. The origin myth of the Scots, systematised by John of Fordun (c. 1320-c. 1384), traced their beginnings from the Greek prince Gathelus and his Egyptian wife Scota, allowing them to argue superiority over the English, who claimed their descent from the Trojans, who had been defeated by the Greeks. It was in this period that the national flag emerged as a common symbol. The image of St. Andrew, martyred while bound to an X-shaped cross, first appeared in the Kingdom of Scotland during the reign of William I and was again depicted on seals used during the late 13th century; including on one particular example used by the Guardians of Scotland, dated 1286. Use of a simplified symbol associated with Saint Andrew, the saltire, has its origins in the late 14th century; the Parliament of Scotland decreed in 1385 that Scottish soldiers should wear a white Saint Andrew's Cross on their person, both in front and behind, for the purpose of identification. Use of a blue background for the Saint Andrew's Cross is said to date from at least the 15th century. The earliest reference to the Saint Andrew's Cross as a flag is to be found in the Vienna Book of Hours, circa 1503. See also Dioceses of Scotland in the High and Later Middle Ages Notes
Dundy County is a county in the U.S. state of Nebraska. As of the 2020 United States Census, the population was 1,654. Its county seat is Benkelman. In the Nebraska license plate system, Dundy County is represented by the prefix 76 (it had the seventy-sixth-largest number of vehicles registered in the county when the license plate system was established in 1922). History Dundy County was formed in 1873 and attached to neighboring Hitchcock County. It was named after Judge Elmer Scipio Dundy. The county government was organized in 1884. Geography Dundy County lies at the lower SW corner of Nebraska. Its west boundary line abuts the east line of the state of Colorado, and its south boundary line abuts the north boundary line of the state of Kansas. According to the US Census Bureau, the county has an area of , of which is land and (0.1%) is water. Major highways U.S. Highway 34 Nebraska Highway 27 Nebraska Highway 61 Adjacent counties Hitchcock County – east Rawlins County, Kansas – southeast Cheyenne County, Kansas – south Yuma County, Colorado – west Chase County – north Hayes County – northeast Protected areas Rock Creek State Recreation Area Demographics As of the 2000 United States Census, there were 2,292 people, 961 households, and 637 families in the county. The population density was . There were 1,196 housing units at an average density of . The racial makeup of the county was 96.95% White, 0.04% Black or African American, 0.79% Native American, 0.48% Asian, 0.04% Pacific Islander, 0.87% from other races, and 0.83% from two or more races. 3.23% of the population were Hispanic or Latino of any race. 41.9% were of German, 13.2% American, 13.2% English and 6.3% Irish ancestry. There were 961 households, out of which 27.80% had children under the age of 18 living with them, 59.90% were married couples living together, 3.90% had a female householder with no husband present, and 33.70% were non-families. 30.90% of all households were made up of individuals, and 17.60% had someone living alone who was 65 years of age or older. The average household size was 2.29 and the average family size was 2.87. The county population contained 23.30% under the age of 18, 5.70% from 18 to 24, 23.50% from 25 to 44, 25.10% from 45 to 64, and 22.40% who were 65 years of age or older. The median age was 44 years. For every 100 females there were 96.90 males. For every 100 females age 18 and over, there were 93.40 males. The median income for a household in the county was $27,010, and the median income for a family was $35,862. Males had a median income of $22,415 versus $18,583 for females. The per capita income for the county was $15,786. About 11.00% of families and 13.60% of the population were below the poverty line, including 16.10% of those under age 18 and 15.00% of those age 65 or over. Communities City Benkelman (county seat) Village Haigler Census-designated places Max Parks Other unincorporated communities Lamont Max Parks Sanborn Former community Ough Politics Dundy County voters are reliably Republican. In only three national elections since 1900 has the county selected the Democratic Party candidate (as of 2020). See also National Register of Historic Places listings in Dundy County, Nebraska References External links Nebraska counties 1884 establishments in Nebraska
```javascript import React from 'react'; import SvgIcon from '../../SvgIcon'; const EditorFormatTextdirectionRToL = (props) => ( <SvgIcon {...props}> <path d="M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z"/> </SvgIcon> ); EditorFormatTextdirectionRToL.displayName = 'EditorFormatTextdirectionRToL'; EditorFormatTextdirectionRToL.muiName = 'SvgIcon'; export default EditorFormatTextdirectionRToL; ```
```php <?php /** * FecShop file. * * @link path_to_url * @license path_to_url */ namespace fecshop\app\console\modules\Product\controllers; use Yii; use yii\console\Controller; /** * @author Terry Zhao <2358269014@qq.com> * @since 1.0 */ class MysqldatatomongoController extends Controller { public $numPerPage = 10; public function init() { parent::init(); Yii::$service->product->changeToMysqlStorage(); } /** * 1. * fecshopmongodb * mysql * mongodbmysqlmongodbjoinjoinmongodb * mongodb * mongodbmysql * 2. * 2.1mysql product_flat_qty mongodb product_flatqty */ public function actionSync($pageNum = 1) { $filter = [ 'numPerPage' => $this->numPerPage, 'pageNum' => $pageNum, 'orderBy' => ['id' => SORT_ASC], 'asArray' => false, ]; $data = Yii::$service->product->coll($filter); $coll = $data['coll']; // $productPrimaryKey = Yii::$service->product->getPrimaryKey(); foreach ($coll as $k=>$product) { $product_id = $product[$productPrimaryKey]; $categoryIds = Yii::$service->product->getCategoryIdsByProductId($product_id); $coll[$k]['category'] = is_array($categoryIds) ? $categoryIds : []; } // mongodb storage Yii::$service->product->changeToMongoStorage(); foreach ($coll as $product) { $arr = []; foreach ($product as $k => $v) { if ($k != 'attr_group_info') { $arr[$k] = $v; } else if ($k == 'attr_group_info' && is_array($v)) { foreach ($v as $attr_group_key => $attr_group_val) { $arr[$attr_group_key] = $attr_group_val; } } } $arr['category'] = $product['category']; Yii::$service->product->sync($arr); } } // public function actionSynccount() { $count = Yii::$service->product->collCount(); echo $count ; } // public function actionSyncpagenum() { $count = Yii::$service->product->collCount(); echo ceil($count / $this->numPerPage); } } ```
The La Union Paower (stylized as La Union PAOwer) is a professional basketball team based in La Union which plays in the Philippine National Basketball League (NBL). History Backed by team owner and La Union Provincial Board Member Paolo Ortega, the La Union Paower made its debut in the National Basketball League (NBL) in the 2020 season. La Union lost the 2020 finals to the Pampanga Delta. It reached the final again in the 2021 season, but failed to win over Delta once again for the title. References Sports in La Union National Basketball League (Philippines) teams
Yenibaşlar () is a village in the Bingöl District, Bingöl Province, Turkey. The village is populated by Kurds and had a population of 1,384 in 2021. References Villages in Bingöl District Kurdish settlements in Bingöl Province
```c /*********************************************************************/ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* 1. Redistributions of source code must retain the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer. */ /* */ /* 2. Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials */ /* provided with the distribution. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */ /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */ /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */ /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */ /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */ /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */ /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */ /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */ /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */ /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* */ /* The views and conclusions contained in the software and */ /* documentation are those of the authors and should not be */ /* interpreted as representing official policies, either expressed */ /* or implied, of The University of Texas at Austin. */ /*********************************************************************/ #include <stdio.h> #include "common.h" int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLONG posY, FLOAT *b){ BLASLONG i, js; BLASLONG X; FLOAT data01, data02, data03, data04, data05, data06, data07, data08; FLOAT data09, data10, data11, data12, data13, data14, data15, data16; FLOAT *ao1, *ao2, *ao3, *ao4; js = (n >> 2); if (js > 0){ do { X = posX; if (posX <= posY) { ao1 = a + posX + (posY + 0) * lda; ao2 = a + posX + (posY + 1) * lda; ao3 = a + posX + (posY + 2) * lda; ao4 = a + posX + (posY + 3) * lda; } else { ao1 = a + posY + (posX + 0) * lda; ao2 = a + posY + (posX + 1) * lda; ao3 = a + posY + (posX + 2) * lda; ao4 = a + posY + (posX + 3) * lda; } i = (m >> 2); if (i > 0) { do { if (X < posY) { data01 = *(ao1 + 0); data02 = *(ao1 + 1); data03 = *(ao1 + 2); data04 = *(ao1 + 3); data05 = *(ao2 + 0); data06 = *(ao2 + 1); data07 = *(ao2 + 2); data08 = *(ao2 + 3); data09 = *(ao3 + 0); data10 = *(ao3 + 1); data11 = *(ao3 + 2); data12 = *(ao3 + 3); data13 = *(ao4 + 0); data14 = *(ao4 + 1); data15 = *(ao4 + 2); data16 = *(ao4 + 3); b[ 0] = data01; b[ 1] = data05; b[ 2] = data09; b[ 3] = data13; b[ 4] = data02; b[ 5] = data06; b[ 6] = data10; b[ 7] = data14; b[ 8] = data03; b[ 9] = data07; b[10] = data11; b[11] = data15; b[12] = data04; b[13] = data08; b[14] = data12; b[15] = data16; ao1 += 4; ao2 += 4; ao3 += 4; ao4 += 4; b += 16; } else if (X > posY) { ao1 += 4 * lda; ao2 += 4 * lda; ao3 += 4 * lda; ao4 += 4 * lda; b += 16; } else { #ifdef UNIT data05 = *(ao2 + 0); data09 = *(ao3 + 0); data10 = *(ao3 + 1); data13 = *(ao4 + 0); data14 = *(ao4 + 1); data15 = *(ao4 + 2); b[ 0] = ONE; b[ 1] = data05; b[ 2] = data09; b[ 3] = data13; b[ 4] = ZERO; b[ 5] = ONE; b[ 6] = data10; b[ 7] = data14; b[ 8] = ZERO; b[ 9] = ZERO; b[10] = ONE; b[11] = data15; b[12] = ZERO; b[13] = ZERO; b[14] = ZERO; b[15] = ONE; #else data01 = *(ao1 + 0); data05 = *(ao2 + 0); data06 = *(ao2 + 1); data09 = *(ao3 + 0); data10 = *(ao3 + 1); data11 = *(ao3 + 2); data13 = *(ao4 + 0); data14 = *(ao4 + 1); data15 = *(ao4 + 2); data16 = *(ao4 + 3); b[ 0] = data01; b[ 1] = data05; b[ 2] = data09; b[ 3] = data13; b[ 4] = ZERO; b[ 5] = data06; b[ 6] = data10; b[ 7] = data14; b[ 8] = ZERO; b[ 9] = ZERO; b[10] = data11; b[11] = data15; b[12] = ZERO; b[13] = ZERO; b[14] = ZERO; b[15] = data16; #endif ao1 += 4; ao2 += 4; ao3 += 4; ao4 += 4; b += 16; } X += 4; i --; } while (i > 0); } i = (m & 3); if (i) { if (X < posY) { if (m & 2) { data01 = *(ao1 + 0); data02 = *(ao1 + 1); data03 = *(ao2 + 0); data04 = *(ao2 + 1); data05 = *(ao3 + 0); data06 = *(ao3 + 1); data07 = *(ao4 + 0); data08 = *(ao4 + 1); b[ 0] = data01; b[ 1] = data03; b[ 2] = data05; b[ 3] = data07; b[ 4] = data02; b[ 5] = data04; b[ 6] = data06; b[ 7] = data08; ao1 += 2; ao2 += 2; ao3 += 2; ao4 += 2; b += 8; } if (m & 1) { data01 = *(ao1 + 0); data03 = *(ao2 + 0); data05 = *(ao3 + 0); data07 = *(ao4 + 0); b[ 0] = data01; b[ 1] = data03; b[ 2] = data05; b[ 3] = data07; ao1 += 1; ao2 += 1; ao3 += 1; ao4 += 1; b += 4; } } else if (X > posY) { if (m & 2) { ao1 += 2 * lda; ao2 += 2 * lda; b += 8; } if (m & 1) { ao1 += lda; b += 4; } } else { #ifdef UNIT data05 = *(ao2 + 0); data09 = *(ao3 + 0); data13 = *(ao4 + 0); if (i >= 2) { data10 = *(ao3 + 1); data14 = *(ao4 + 1); } if (i >= 3) { data15 = *(ao4 + 2); } b[ 0] = ONE; b[ 1] = data05; b[ 2] = data09; b[ 3] = data13; b += 4; if(i >= 2) { b[ 0] = ZERO; b[ 1] = ONE; b[ 2] = data10; b[ 3] = data14; b += 4; } if (i >= 3) { b[ 0] = ZERO; b[ 1] = ZERO; b[ 2] = ONE; b[ 3] = data15; b += 4; } #else data01 = *(ao1 + 0); data05 = *(ao2 + 0); data09 = *(ao3 + 0); data13 = *(ao4 + 0); if (i >= 2) { data06 = *(ao2 + 1); data10 = *(ao3 + 1); data14 = *(ao4 + 1); } if (i >= 3) { data11 = *(ao3 + 2); data15 = *(ao4 + 2); } b[ 0] = data01; b[ 1] = data05; b[ 2] = data09; b[ 3] = data13; b += 4; if(i >= 2) { b[ 0] = ZERO; b[ 1] = data06; b[ 2] = data10; b[ 3] = data14; b += 4; } if (i >= 3) { b[ 0] = ZERO; b[ 1] = ZERO; b[ 2] = data11; b[ 3] = data15; b += 4; } #endif } } posY += 4; js --; } while (js > 0); } /* End of main loop */ if (n & 2){ X = posX; if (posX <= posY) { ao1 = a + posX + (posY + 0) * lda; ao2 = a + posX + (posY + 1) * lda; } else { ao1 = a + posY + (posX + 0) * lda; ao2 = a + posY + (posX + 1) * lda; } i = (m >> 1); if (i > 0) { do { if (X < posY) { data01 = *(ao1 + 0); data02 = *(ao1 + 1); data05 = *(ao2 + 0); data06 = *(ao2 + 1); b[ 0] = data01; b[ 1] = data05; b[ 2] = data02; b[ 3] = data06; ao1 += 2; ao2 += 2; b += 4; } else if (X > posY) { ao1 += 2 * lda; ao2 += 2 * lda; b += 4; } else { #ifdef UNIT data05 = *(ao2 + 0); b[ 0] = ONE; b[ 1] = data05; b[ 2] = ZERO; b[ 3] = ONE; #else data01 = *(ao1 + 0); data05 = *(ao2 + 0); data06 = *(ao2 + 1); b[ 0] = data01; b[ 1] = data05; b[ 2] = ZERO; b[ 3] = data06; #endif ao1 += 2 * lda; ao2 += 2 * lda; b += 4; } X += 2; i --; } while (i > 0); } i = (m & 1); if (i) { if (X < posY) { data01 = *(ao1 + 0); data05 = *(ao2 + 0); b[ 0] = data01; b[ 1] = data05; ao1 += 1; ao2 += 1; b += 2; } else if (X > posY) { ao1 += lda; ao2 += lda; b += 2; } else { #ifdef UNIT data05 = *(ao2 + 0); b[ 0] = ONE; b[ 1] = data05; #else data01 = *(ao1 + 0); data05 = *(ao2 + 0); b[ 0] = data01; b[ 1] = data05; #endif ao1 += lda; ao2 += lda; b += 2; } } posY += 2; } if (n & 1){ X = posX; if (posX <= posY) { ao1 = a + posX + (posY + 0) * lda; } else { ao1 = a + posY + (posX + 0) * lda; } i = m; if (m > 0) { do { if (X < posY) { data01 = *(ao1 + 0); b[ 0] = data01; ao1 += 1; b += 1; } else if (X > posY) { ao1 += lda; b += 1; } else { #ifdef UNIT b[ 0] = ONE; #else data01 = *(ao1 + 0); b[ 0] = data01; #endif ao1 += lda; b += 1; } X += 1; i --; } while (i > 0); } } return 0; } ```
```javascript "use strict"; const CSSStyleDeclaration = require("cssstyle").CSSStyleDeclaration; const notImplemented = require("./not-implemented"); const History = require("./history"); const VirtualConsole = require("../virtual-console"); const define = require("../utils").define; const inherits = require("../utils").inheritFrom; const EventTarget = require("../living/generated/EventTarget"); const namedPropertiesWindow = require("../living/named-properties-window"); const cssom = require("cssom"); const postMessage = require("../living/post-message"); const DOMException = require("../web-idl/DOMException"); const btoa = require("abab").btoa; const atob = require("abab").atob; const idlUtils = require("../living/generated/utils"); const internalConstants = require("../living/helpers/internal-constants"); const createFileReader = require("../living/file-reader"); const createXMLHttpRequest = require("../living/xmlhttprequest"); // NB: the require() must be after assigning `module.export` because this require() is circular module.exports = Window; const dom = require("../living"); const cssSelectorSplitRE = /((?:[^,"']|"[^"]*"|'[^']*')+)/; const defaultStyleSheet = cssom.parse(require("./default-stylesheet")); dom.Window = Window; // NOTE: per path_to_url#Global, all properties on the Window object must be own-properties. // That is why we assign everything inside of the constructor, instead of using a shared prototype. // You can verify this in e.g. Firefox or Internet Explorer, which do a good job with Web IDL compliance. function Window(options) { EventTarget.setup(this); const window = this; ///// INTERFACES FROM THE DOM // TODO: consider a mode of some sort where these are not shared between all DOM instances // It'd be very memory-expensive in most cases, though. define(window, dom); ///// PRIVATE DATA PROPERTIES // vm initialization is defered until script processing is activated (in level1/core) this._globalProxy = this; this.__timers = []; // List options explicitly to be clear which are passed through this._document = new dom.HTMLDocument({ parsingMode: options.parsingMode, contentType: options.contentType, cookieJar: options.cookieJar, parser: options.parser, url: options.url, referrer: options.referrer, cookie: options.cookie, deferClose: options.deferClose, resourceLoader: options.resourceLoader, concurrentNodeIterators: options.concurrentNodeIterators, pool: options.pool, agentOptions: options.agentOptions, userAgent: options.userAgent, defaultView: this._globalProxy, global: this }); // Set up the window as if it's a top level window. // If it's not, then references will be corrected by frame/iframe code. this._parent = this._top = this._globalProxy; // This implements window.frames.length, since window.frames returns a // self reference to the window object. This value is incremented in the // HTMLFrameElement init function (see: level2/html.js). this._length = 0; if (options.virtualConsole) { if (options.virtualConsole instanceof VirtualConsole) { this._virtualConsole = options.virtualConsole; } else { throw new TypeError( "options.virtualConsole must be a VirtualConsole (from createVirtualConsole)"); } } else { this._virtualConsole = new VirtualConsole(); } ///// GETTERS define(this, { get length() { return window._length; }, get window() { return window._globalProxy; }, get frames() { return window._globalProxy; }, get self() { return window._globalProxy; }, get parent() { return window._parent; }, get top() { return window._top; }, get document() { return window._document; }, get location() { return window._document._location; } }); namedPropertiesWindow.initializeWindow(this, dom.HTMLCollection); ///// METHODS for [ImplicitThis] hack // See path_to_url this.addEventListener = this.addEventListener.bind(this); this.removeEventListener = this.removeEventListener.bind(this); this.dispatchEvent = this.dispatchEvent.bind(this); ///// METHODS this.setTimeout = function (fn, ms) { return startTimer(window, setTimeout, clearTimeout, fn, ms); }; this.setInterval = function (fn, ms) { return startTimer(window, setInterval, clearInterval, fn, ms); }; this.clearInterval = stopTimer.bind(this, window); this.clearTimeout = stopTimer.bind(this, window); this.__stopAllTimers = stopAllTimers.bind(this, window); this.Image = function (width, height) { const element = window._document.createElement("img"); element.width = width; element.height = height; return element; }; function wrapConsoleMethod(method) { return function () { const args = Array.prototype.slice.call(arguments); window._virtualConsole.emit.apply(window._virtualConsole, [method].concat(args)); }; } this.postMessage = postMessage; this.atob = function (str) { const result = atob(str); if (result === null) { throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "The string to be decoded contains invalid characters."); } return result; }; this.btoa = function (str) { const result = btoa(str); if (result === null) { throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "The string to be encoded contains invalid characters."); } return result; }; this.FileReader = createFileReader(this); this.XMLHttpRequest = createXMLHttpRequest(this); // TODO: necessary for Blob and FileReader due to different-globals weirdness; investigate how to avoid this. this.ArrayBuffer = ArrayBuffer; this.Int8Array = Int8Array; this.Uint8Array = Uint8Array; this.Uint8ClampedArray = Uint8ClampedArray; this.Int16Array = Int16Array; this.Uint16Array = Uint16Array; this.Int32Array = Int32Array; this.Uint32Array = Uint32Array; this.Float32Array = Float32Array; this.Float64Array = Float64Array; this.stop = function () { if (this._document[internalConstants.requestManager]) { this._document[internalConstants.requestManager].close(); } }; this.close = function () { // Recursively close child frame windows, then ourselves. const currentWindow = this; (function windowCleaner(windowToClean) { for (let i = 0; i < windowToClean.length; i++) { windowCleaner(windowToClean[i]); } // We"re already in our own window.close(). if (windowToClean !== currentWindow) { windowToClean.close(); } }(this)); // Clear out all listeners. Any in-flight or upcoming events should not get delivered. idlUtils.implForWrapper(this)._eventListeners = Object.create(null); if (this._document) { if (this._document.body) { this._document.body.innerHTML = ""; } if (this._document.close) { // It's especially important to clear out the listeners here because document.close() causes a "load" event to // fire. this._document._listeners = Object.create(null); this._document.close(); } const doc = this._document; delete this._document; // Stops the connections after document deletion because the listeners will not be triggered once document deleted if (doc[internalConstants.requestManager]) { doc[internalConstants.requestManager].close(); } } stopAllTimers(currentWindow); }; this.getComputedStyle = function (node) { const s = node.style; const cs = new CSSStyleDeclaration(); const forEach = Array.prototype.forEach; function setPropertiesFromRule(rule) { if (!rule.selectorText) { return; } const selectors = rule.selectorText.split(cssSelectorSplitRE); let matched = false; for (const selectorText of selectors) { if (selectorText !== "" && selectorText !== "," && !matched && matchesDontThrow(node, selectorText)) { matched = true; forEach.call(rule.style, property => { cs.setProperty(property, rule.style.getPropertyValue(property), rule.style.getPropertyPriority(property)); }); } } } function readStylesFromStyleSheet(sheet) { forEach.call(sheet.cssRules, rule => { if (rule.media) { if (Array.prototype.indexOf.call(rule.media, "screen") !== -1) { forEach.call(rule.cssRules, setPropertiesFromRule); } } else { setPropertiesFromRule(rule); } }); } readStylesFromStyleSheet(defaultStyleSheet); forEach.call(node.ownerDocument.styleSheets, readStylesFromStyleSheet); forEach.call(s, property => { cs.setProperty(property, s.getPropertyValue(property), s.getPropertyPriority(property)); }); return cs; }; ///// PUBLIC DATA PROPERTIES (TODO: should be getters) this.history = new History(this); this.console = { assert: wrapConsoleMethod("assert"), clear: wrapConsoleMethod("clear"), count: wrapConsoleMethod("count"), debug: wrapConsoleMethod("debug"), error: wrapConsoleMethod("error"), group: wrapConsoleMethod("group"), groupCollapse: wrapConsoleMethod("groupCollapse"), groupEnd: wrapConsoleMethod("groupEnd"), info: wrapConsoleMethod("info"), log: wrapConsoleMethod("log"), table: wrapConsoleMethod("table"), time: wrapConsoleMethod("time"), timeEnd: wrapConsoleMethod("timeEnd"), trace: wrapConsoleMethod("trace"), warn: wrapConsoleMethod("warn") }; function notImplementedMethod(name) { return function () { notImplemented(name, window); }; } define(this, { navigator: { get userAgent() { return options.userAgent; }, get appName() { return "Node.js jsDom"; }, get platform() { return process.platform; }, get appVersion() { return process.version; }, noUI: true, get cookieEnabled() { return true; } }, name: "nodejs", innerWidth: 1024, innerHeight: 768, outerWidth: 1024, outerHeight: 768, pageXOffset: 0, pageYOffset: 0, screenX: 0, screenY: 0, screenLeft: 0, screenTop: 0, scrollX: 0, scrollY: 0, scrollTop: 0, scrollLeft: 0, screen: { width: 0, height: 0 }, alert: notImplementedMethod("window.alert"), blur: notImplementedMethod("window.blur"), confirm: notImplementedMethod("window.confirm"), createPopup: notImplementedMethod("window.createPopup"), focus: notImplementedMethod("window.focus"), moveBy: notImplementedMethod("window.moveBy"), moveTo: notImplementedMethod("window.moveTo"), open: notImplementedMethod("window.open"), print: notImplementedMethod("window.print"), prompt: notImplementedMethod("window.prompt"), resizeBy: notImplementedMethod("window.resizeBy"), resizeTo: notImplementedMethod("window.resizeTo"), scroll: notImplementedMethod("window.scroll"), scrollBy: notImplementedMethod("window.scrollBy"), scrollTo: notImplementedMethod("window.scrollTo"), toString: () => { return "[object Window]"; } }); ///// INITIALIZATION process.nextTick(() => { if (!window.document) { return; // window might've been closed already } if (window.document.readyState === "complete") { const ev = window.document.createEvent("HTMLEvents"); ev.initEvent("load", false, false); window.dispatchEvent(ev); } else { window.document.addEventListener("load", () => { const ev = window.document.createEvent("HTMLEvents"); ev.initEvent("load", false, false); window.dispatchEvent(ev); }); } }); } inherits(EventTarget.interface, Window, EventTarget.interface.prototype); function matchesDontThrow(el, selector) { try { return el.matches(selector); } catch (e) { return false; } } function startTimer(window, startFn, stopFn, callback, ms) { const res = startFn(callback, ms); window.__timers.push([res, stopFn]); return res; } function stopTimer(window, id) { if (typeof id === "undefined") { return; } for (const i in window.__timers) { if (window.__timers[i][0] === id) { window.__timers[i][1].call(window, id); window.__timers.splice(i, 1); break; } } } function stopAllTimers(window) { for (const t of window.__timers) { t[1].call(window, t[0]); } window.__timers = []; } ```
Iron Storm can refer to: Iron Storm (1995 video game), a turn-based strategy game in the Daisenryaku series published by Working Designs Iron Storm (2002 video game), a first-person shooter developed by Wanadoo Edition Iron Storm (album) See also Ion Storm, an American video game developer
```php <?php declare(strict_types=1); namespace Shlinkio\Shlink\Rest\Middleware; use Fig\Http\Message\RequestMethodInterface; use JsonException; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\RequestHandlerInterface; use Shlinkio\Shlink\Core\Exception\MalformedBodyException; use function Shlinkio\Shlink\Core\ArrayUtils\contains; use function Shlinkio\Shlink\Json\json_decode; class BodyParserMiddleware implements MiddlewareInterface, RequestMethodInterface { public function process(Request $request, RequestHandlerInterface $handler): Response { $method = $request->getMethod(); $currentParams = $request->getParsedBody(); // In requests that do not allow body or if the body has already been parsed, continue to next middleware if ( ! empty($currentParams) || contains($method, [ self::METHOD_GET, self::METHOD_HEAD, self::METHOD_OPTIONS, ]) ) { return $handler->handle($request); } return $handler->handle($this->parseFromJson($request)); } private function parseFromJson(Request $request): Request { $rawBody = $request->getBody()->__toString(); if (empty($rawBody)) { return $request; } try { $parsedJson = json_decode($rawBody); return $request->withParsedBody($parsedJson); } catch (JsonException $e) { throw MalformedBodyException::forInvalidJson($e); } } } ```
```c /* * * in the file LICENSE in the source distribution or at * path_to_url */ #include <stdio.h> #include <errno.h> #include "bio_local.h" #include "internal/cryptlib.h" #include "internal/safe_math.h" #if !defined(OPENSSL_NO_DGRAM) && !defined(OPENSSL_NO_SOCK) OSSL_SAFE_MATH_UNSIGNED(size_t, size_t) /* =========================================================================== * Byte-wise ring buffer which supports pushing and popping blocks of multiple * bytes at a time. */ struct ring_buf { unsigned char *start; /* start of buffer */ size_t len; /* size of buffer allocation in bytes */ size_t count; /* number of bytes currently pushed */ /* * These index into start. Where idx[0] == idx[1], the buffer is full * (if count is nonzero) and empty otherwise. */ size_t idx[2]; /* 0: head, 1: tail */ }; static int ring_buf_init(struct ring_buf *r, size_t nbytes) { r->start = OPENSSL_malloc(nbytes); if (r->start == NULL) return 0; r->len = nbytes; r->idx[0] = r->idx[1] = r->count = 0; return 1; } static void ring_buf_destroy(struct ring_buf *r) { OPENSSL_free(r->start); r->start = NULL; r->len = 0; r->count = 0; } /* * Get a pointer to the next place to write data to be pushed to the ring buffer * (idx=0), or the next data to be popped from the ring buffer (idx=1). The * pointer is written to *buf and the maximum number of bytes which can be * read/written are written to *len. After writing data to the buffer, call * ring_buf_push/pop() with the number of bytes actually read/written, which * must not exceed the returned length. */ static void ring_buf_head_tail(struct ring_buf *r, int idx, uint8_t **buf, size_t *len) { size_t max_len = r->len - r->idx[idx]; if (idx == 0 && max_len > r->len - r->count) max_len = r->len - r->count; if (idx == 1 && max_len > r->count) max_len = r->count; *buf = (uint8_t *)r->start + r->idx[idx]; *len = max_len; } #define ring_buf_head(r, buf, len) ring_buf_head_tail((r), 0, (buf), (len)) #define ring_buf_tail(r, buf, len) ring_buf_head_tail((r), 1, (buf), (len)) /* * Commit bytes to the ring buffer previously filled after a call to * ring_buf_head(). */ static void ring_buf_push_pop(struct ring_buf *r, int idx, size_t num_bytes) { size_t new_idx; /* A single push/pop op cannot wrap around, though it can reach the end. * If the caller adheres to the convention of using the length returned * by ring_buf_head/tail(), this cannot happen. */ if (!ossl_assert(num_bytes <= r->len - r->idx[idx])) return; /* * Must not overfill the buffer, or pop more than is in the buffer either. */ if (!ossl_assert(idx != 0 ? num_bytes <= r->count : num_bytes + r->count <= r->len)) return; /* Update the index. */ new_idx = r->idx[idx] + num_bytes; if (new_idx == r->len) new_idx = 0; r->idx[idx] = new_idx; if (idx != 0) r->count -= num_bytes; else r->count += num_bytes; } #define ring_buf_push(r, num_bytes) ring_buf_push_pop((r), 0, (num_bytes)) #define ring_buf_pop(r, num_bytes) ring_buf_push_pop((r), 1, (num_bytes)) static void ring_buf_clear(struct ring_buf *r) { r->idx[0] = r->idx[1] = r->count = 0; } static int ring_buf_resize(struct ring_buf *r, size_t nbytes) { unsigned char *new_start; if (r->start == NULL) return ring_buf_init(r, nbytes); if (nbytes == r->len) return 1; if (r->count > 0 && nbytes < r->len) /* fail shrinking the ring buffer when there is any data in it */ return 0; new_start = OPENSSL_realloc(r->start, nbytes); if (new_start == NULL) return 0; /* Moving tail if it is after (or equal to) head */ if (r->count > 0) { if (r->idx[0] <= r->idx[1]) { size_t offset = nbytes - r->len; memmove(new_start + r->idx[1] + offset, new_start + r->idx[1], r->len - r->idx[1]); r->idx[1] += offset; } } else { /* just reset the head/tail because it might be pointing outside */ r->idx[0] = r->idx[1] = 0; } r->start = new_start; r->len = nbytes; return 1; } /* =========================================================================== * BIO_s_dgram_pair is documented in BIO_s_dgram_pair(3). * * INTERNAL DATA STRUCTURE * * This is managed internally by using a bytewise ring buffer which supports * pushing and popping spans of multiple bytes at once. The ring buffer stores * internal packets which look like this: * * struct dgram_hdr hdr; * uint8_t data[]; * * The header contains the length of the data and metadata such as * source/destination addresses. * * The datagram pair BIO is designed to support both traditional * BIO_read/BIO_write (likely to be used by applications) as well as * BIO_recvmmsg/BIO_sendmmsg. */ struct bio_dgram_pair_st; static int dgram_pair_write(BIO *bio, const char *buf, int sz_); static int dgram_pair_read(BIO *bio, char *buf, int sz_); static int dgram_mem_read(BIO *bio, char *buf, int sz_); static long dgram_pair_ctrl(BIO *bio, int cmd, long num, void *ptr); static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr); static int dgram_pair_init(BIO *bio); static int dgram_mem_init(BIO *bio); static int dgram_pair_free(BIO *bio); static int dgram_pair_sendmmsg(BIO *b, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *num_processed); static int dgram_pair_recvmmsg(BIO *b, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *num_processed); static int dgram_pair_ctrl_destroy_bio_pair(BIO *bio1); static size_t dgram_pair_read_inner(struct bio_dgram_pair_st *b, uint8_t *buf, size_t sz); #define BIO_MSG_N(array, n) (*(BIO_MSG *)((char *)(array) + (n)*stride)) static const BIO_METHOD dgram_pair_method = { BIO_TYPE_DGRAM_PAIR, "BIO dgram pair", bwrite_conv, dgram_pair_write, bread_conv, dgram_pair_read, NULL, /* dgram_pair_puts */ NULL, /* dgram_pair_gets */ dgram_pair_ctrl, dgram_pair_init, dgram_pair_free, NULL, /* dgram_pair_callback_ctrl */ dgram_pair_sendmmsg, dgram_pair_recvmmsg, }; static const BIO_METHOD dgram_mem_method = { BIO_TYPE_DGRAM_MEM, "BIO dgram mem", bwrite_conv, dgram_pair_write, bread_conv, dgram_mem_read, NULL, /* dgram_pair_puts */ NULL, /* dgram_pair_gets */ dgram_mem_ctrl, dgram_mem_init, dgram_pair_free, NULL, /* dgram_pair_callback_ctrl */ dgram_pair_sendmmsg, dgram_pair_recvmmsg, }; const BIO_METHOD *BIO_s_dgram_pair(void) { return &dgram_pair_method; } const BIO_METHOD *BIO_s_dgram_mem(void) { return &dgram_mem_method; } struct dgram_hdr { size_t len; /* payload length in bytes, not including this struct */ BIO_ADDR src_addr, dst_addr; /* family == 0: not present */ }; struct bio_dgram_pair_st { /* The other half of the BIO pair. NULL for dgram_mem. */ BIO *peer; /* Writes are directed to our own ringbuf and reads to our peer. */ struct ring_buf rbuf; /* Requested size of rbuf buffer in bytes once we initialize. */ size_t req_buf_len; /* Largest possible datagram size */ size_t mtu; /* Capability flags. */ uint32_t cap; /* * This lock protects updates to our rbuf. Since writes are directed to our * own rbuf, this means we use this lock for writes and our peer's lock for * reads. */ CRYPTO_RWLOCK *lock; unsigned int no_trunc : 1; /* Reads fail if they would truncate */ unsigned int local_addr_enable : 1; /* Can use BIO_MSG->local? */ unsigned int role : 1; /* Determines lock order */ unsigned int grows_on_write : 1; /* Set for BIO_s_dgram_mem only */ }; #define MIN_BUF_LEN (1024) #define is_dgram_pair(b) (b->peer != NULL) static int dgram_pair_init(BIO *bio) { struct bio_dgram_pair_st *b = OPENSSL_zalloc(sizeof(*b)); if (b == NULL) return 0; b->mtu = 1472; /* conservative default MTU */ /* default buffer size */ b->req_buf_len = 9 * (sizeof(struct dgram_hdr) + b->mtu); b->lock = CRYPTO_THREAD_lock_new(); if (b->lock == NULL) { OPENSSL_free(b); return 0; } bio->ptr = b; return 1; } static int dgram_mem_init(BIO *bio) { struct bio_dgram_pair_st *b; if (!dgram_pair_init(bio)) return 0; b = bio->ptr; if (ring_buf_init(&b->rbuf, b->req_buf_len) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_BIO_LIB); return 0; } b->grows_on_write = 1; bio->init = 1; return 1; } static int dgram_pair_free(BIO *bio) { struct bio_dgram_pair_st *b; if (bio == NULL) return 0; b = bio->ptr; if (!ossl_assert(b != NULL)) return 0; /* We are being freed. Disconnect any peer and destroy buffers. */ dgram_pair_ctrl_destroy_bio_pair(bio); CRYPTO_THREAD_lock_free(b->lock); OPENSSL_free(b); return 1; } /* BIO_make_bio_pair (BIO_C_MAKE_BIO_PAIR) */ static int dgram_pair_ctrl_make_bio_pair(BIO *bio1, BIO *bio2) { struct bio_dgram_pair_st *b1, *b2; /* peer must be non-NULL. */ if (bio1 == NULL || bio2 == NULL) { ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT); return 0; } /* Ensure the BIO we have been passed is actually a dgram pair BIO. */ if (bio1->method != &dgram_pair_method || bio2->method != &dgram_pair_method) { ERR_raise_data(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT, "both BIOs must be BIO_dgram_pair"); return 0; } b1 = bio1->ptr; b2 = bio2->ptr; if (!ossl_assert(b1 != NULL && b2 != NULL)) { ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED); return 0; } /* * This ctrl cannot be used to associate a BIO pair half which is already * associated. */ if (b1->peer != NULL || b2->peer != NULL) { ERR_raise_data(ERR_LIB_BIO, BIO_R_IN_USE, "cannot associate a BIO_dgram_pair which is already in use"); return 0; } if (!ossl_assert(b1->req_buf_len >= MIN_BUF_LEN && b2->req_buf_len >= MIN_BUF_LEN)) { ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED); return 0; } if (b1->rbuf.len != b1->req_buf_len) if (ring_buf_init(&b1->rbuf, b1->req_buf_len) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_BIO_LIB); return 0; } if (b2->rbuf.len != b2->req_buf_len) if (ring_buf_init(&b2->rbuf, b2->req_buf_len) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_BIO_LIB); ring_buf_destroy(&b1->rbuf); return 0; } b1->peer = bio2; b2->peer = bio1; b1->role = 0; b2->role = 1; bio1->init = 1; bio2->init = 1; return 1; } /* BIO_destroy_bio_pair (BIO_C_DESTROY_BIO_PAIR) */ static int dgram_pair_ctrl_destroy_bio_pair(BIO *bio1) { BIO *bio2; struct bio_dgram_pair_st *b1 = bio1->ptr, *b2; ring_buf_destroy(&b1->rbuf); bio1->init = 0; /* Early return if we don't have a peer. */ if (b1->peer == NULL) return 1; bio2 = b1->peer; b2 = bio2->ptr; /* Invariant. */ if (!ossl_assert(b2->peer == bio1)) return 0; /* Free buffers. */ ring_buf_destroy(&b2->rbuf); bio2->init = 0; b1->peer = NULL; b2->peer = NULL; return 1; } /* BIO_eof (BIO_CTRL_EOF) */ static int dgram_pair_ctrl_eof(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr, *peerb; if (!ossl_assert(b != NULL)) return -1; /* If we aren't initialized, we can never read anything */ if (!bio->init) return 1; if (!is_dgram_pair(b)) return 0; peerb = b->peer->ptr; if (!ossl_assert(peerb != NULL)) return -1; /* * Since we are emulating datagram semantics, never indicate EOF so long as * we have a peer. */ return 0; } /* BIO_set_write_buf_size (BIO_C_SET_WRITE_BUF_SIZE) */ static int dgram_pair_ctrl_set_write_buf_size(BIO *bio, size_t len) { struct bio_dgram_pair_st *b = bio->ptr; /* Changing buffer sizes is not permitted while a peer is connected. */ if (b->peer != NULL) { ERR_raise(ERR_LIB_BIO, BIO_R_IN_USE); return 0; } /* Enforce minimum size. */ if (len < MIN_BUF_LEN) len = MIN_BUF_LEN; if (b->rbuf.start != NULL) { if (!ring_buf_resize(&b->rbuf, len)) return 0; } b->req_buf_len = len; b->grows_on_write = 0; return 1; } /* BIO_reset (BIO_CTRL_RESET) */ static int dgram_pair_ctrl_reset(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr; ring_buf_clear(&b->rbuf); return 1; } /* BIO_pending (BIO_CTRL_PENDING) (Threadsafe) */ static size_t dgram_pair_ctrl_pending(BIO *bio) { size_t saved_idx, saved_count; struct bio_dgram_pair_st *b = bio->ptr, *readb; struct dgram_hdr hdr; size_t l; /* Safe to check; init may not change during this call */ if (!bio->init) return 0; if (is_dgram_pair(b)) readb = b->peer->ptr; else readb = b; if (CRYPTO_THREAD_write_lock(readb->lock) == 0) return 0; saved_idx = readb->rbuf.idx[1]; saved_count = readb->rbuf.count; l = dgram_pair_read_inner(readb, (uint8_t *)&hdr, sizeof(hdr)); readb->rbuf.idx[1] = saved_idx; readb->rbuf.count = saved_count; CRYPTO_THREAD_unlock(readb->lock); if (!ossl_assert(l == 0 || l == sizeof(hdr))) return 0; return l > 0 ? hdr.len : 0; } /* BIO_get_write_guarantee (BIO_C_GET_WRITE_GUARANTEE) (Threadsafe) */ static size_t dgram_pair_ctrl_get_write_guarantee(BIO *bio) { size_t l; struct bio_dgram_pair_st *b = bio->ptr; if (CRYPTO_THREAD_read_lock(b->lock) == 0) return 0; l = b->rbuf.len - b->rbuf.count; if (l >= sizeof(struct dgram_hdr)) l -= sizeof(struct dgram_hdr); /* * If the amount of buffer space would not be enough to accommodate the * worst-case size of a datagram, report no space available. */ if (l < b->mtu) l = 0; CRYPTO_THREAD_unlock(b->lock); return l; } /* BIO_dgram_get_local_addr_cap (BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP) */ static int dgram_pair_ctrl_get_local_addr_cap(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr, *readb; if (!bio->init) return 0; if (is_dgram_pair(b)) readb = b->peer->ptr; else readb = b; return (~readb->cap & (BIO_DGRAM_CAP_HANDLES_SRC_ADDR | BIO_DGRAM_CAP_PROVIDES_DST_ADDR)) == 0; } /* BIO_dgram_get_effective_caps (BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS) */ static int dgram_pair_ctrl_get_effective_caps(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr, *peerb; if (b->peer == NULL) return 0; peerb = b->peer->ptr; return peerb->cap; } /* BIO_dgram_get_caps (BIO_CTRL_DGRAM_GET_CAPS) */ static uint32_t dgram_pair_ctrl_get_caps(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr; return b->cap; } /* BIO_dgram_set_caps (BIO_CTRL_DGRAM_SET_CAPS) */ static int dgram_pair_ctrl_set_caps(BIO *bio, uint32_t caps) { struct bio_dgram_pair_st *b = bio->ptr; b->cap = caps; return 1; } /* BIO_dgram_get_local_addr_enable (BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE) */ static int dgram_pair_ctrl_get_local_addr_enable(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr; return b->local_addr_enable; } /* BIO_dgram_set_local_addr_enable (BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE) */ static int dgram_pair_ctrl_set_local_addr_enable(BIO *bio, int enable) { struct bio_dgram_pair_st *b = bio->ptr; if (dgram_pair_ctrl_get_local_addr_cap(bio) == 0) return 0; b->local_addr_enable = (enable != 0 ? 1 : 0); return 1; } /* BIO_dgram_get_mtu (BIO_CTRL_DGRAM_GET_MTU) */ static int dgram_pair_ctrl_get_mtu(BIO *bio) { struct bio_dgram_pair_st *b = bio->ptr; return b->mtu; } /* BIO_dgram_set_mtu (BIO_CTRL_DGRAM_SET_MTU) */ static int dgram_pair_ctrl_set_mtu(BIO *bio, size_t mtu) { struct bio_dgram_pair_st *b = bio->ptr, *peerb; b->mtu = mtu; if (b->peer != NULL) { peerb = b->peer->ptr; peerb->mtu = mtu; } return 1; } /* Partially threadsafe (some commands) */ static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr) { long ret = 1; struct bio_dgram_pair_st *b = bio->ptr; if (!ossl_assert(b != NULL)) return 0; switch (cmd) { /* * BIO_set_write_buf_size: Set the size of the ring buffer used for storing * datagrams. No more writes can be performed once the buffer is filled up, * until reads are performed. This cannot be used after a peer is connected. */ case BIO_C_SET_WRITE_BUF_SIZE: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_set_write_buf_size(bio, (size_t)num); break; /* * BIO_get_write_buf_size: Get ring buffer size. */ case BIO_C_GET_WRITE_BUF_SIZE: /* Non-threadsafe */ ret = (long)b->req_buf_len; break; /* * BIO_reset: Clear all data which was written to this side of the pair. */ case BIO_CTRL_RESET: /* Non-threadsafe */ dgram_pair_ctrl_reset(bio); break; /* * BIO_get_write_guarantee: Any BIO_write providing a buffer less than or * equal to this value is guaranteed to succeed. */ case BIO_C_GET_WRITE_GUARANTEE: /* Threadsafe */ ret = (long)dgram_pair_ctrl_get_write_guarantee(bio); break; /* BIO_pending: Bytes available to read. */ case BIO_CTRL_PENDING: /* Threadsafe */ ret = (long)dgram_pair_ctrl_pending(bio); break; /* BIO_flush: No-op. */ case BIO_CTRL_FLUSH: /* Threadsafe */ break; /* BIO_dgram_get_no_trunc */ case BIO_CTRL_DGRAM_GET_NO_TRUNC: /* Non-threadsafe */ ret = (long)b->no_trunc; break; /* BIO_dgram_set_no_trunc */ case BIO_CTRL_DGRAM_SET_NO_TRUNC: /* Non-threadsafe */ b->no_trunc = (num > 0); break; /* BIO_dgram_get_local_addr_enable */ case BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE: /* Non-threadsafe */ *(int *)ptr = (int)dgram_pair_ctrl_get_local_addr_enable(bio); break; /* BIO_dgram_set_local_addr_enable */ case BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_set_local_addr_enable(bio, num); break; /* BIO_dgram_get_local_addr_cap: Can local addresses be supported? */ case BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_get_local_addr_cap(bio); break; /* BIO_dgram_get_effective_caps */ case BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS: /* Non-threadsafe */ /* BIO_dgram_get_caps */ case BIO_CTRL_DGRAM_GET_CAPS: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_get_caps(bio); break; /* BIO_dgram_set_caps */ case BIO_CTRL_DGRAM_SET_CAPS: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_set_caps(bio, (uint32_t)num); break; /* BIO_dgram_get_mtu */ case BIO_CTRL_DGRAM_GET_MTU: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_get_mtu(bio); break; /* BIO_dgram_set_mtu */ case BIO_CTRL_DGRAM_SET_MTU: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_set_mtu(bio, (uint32_t)num); break; /* * BIO_eof: Returns whether this half of the BIO pair is empty of data to * read. */ case BIO_CTRL_EOF: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_eof(bio); break; default: ret = 0; break; } return ret; } static long dgram_pair_ctrl(BIO *bio, int cmd, long num, void *ptr) { long ret = 1; switch (cmd) { /* * BIO_make_bio_pair: this is usually used by BIO_new_dgram_pair, though it * may be used manually after manually creating each half of a BIO pair * using BIO_new. This only needs to be called on one of the BIOs. */ case BIO_C_MAKE_BIO_PAIR: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_make_bio_pair(bio, (BIO *)ptr); break; /* * BIO_destroy_bio_pair: Manually disconnect two halves of a BIO pair so * that they are no longer peers. */ case BIO_C_DESTROY_BIO_PAIR: /* Non-threadsafe */ dgram_pair_ctrl_destroy_bio_pair(bio); break; /* BIO_dgram_get_effective_caps */ case BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS: /* Non-threadsafe */ ret = (long)dgram_pair_ctrl_get_effective_caps(bio); break; default: ret = dgram_mem_ctrl(bio, cmd, num, ptr); break; } return ret; } int BIO_new_bio_dgram_pair(BIO **pbio1, size_t writebuf1, BIO **pbio2, size_t writebuf2) { int ret = 0; long r; BIO *bio1 = NULL, *bio2 = NULL; bio1 = BIO_new(BIO_s_dgram_pair()); if (bio1 == NULL) goto err; bio2 = BIO_new(BIO_s_dgram_pair()); if (bio2 == NULL) goto err; if (writebuf1 > 0) { r = BIO_set_write_buf_size(bio1, writebuf1); if (r == 0) goto err; } if (writebuf2 > 0) { r = BIO_set_write_buf_size(bio2, writebuf2); if (r == 0) goto err; } r = BIO_make_bio_pair(bio1, bio2); if (r == 0) goto err; ret = 1; err: if (ret == 0) { BIO_free(bio1); bio1 = NULL; BIO_free(bio2); bio2 = NULL; } *pbio1 = bio1; *pbio2 = bio2; return ret; } /* Must hold peer write lock */ static size_t dgram_pair_read_inner(struct bio_dgram_pair_st *b, uint8_t *buf, size_t sz) { size_t total_read = 0; /* * We repeat pops from the ring buffer for as long as we have more * application *buffer to fill until we fail. We may not be able to pop * enough data to fill the buffer in one operation if the ring buffer wraps * around, but there may still be more data available. */ while (sz > 0) { uint8_t *src_buf = NULL; size_t src_len = 0; /* * There are two BIO instances, each with a ringbuf. We read from the * peer ringbuf and write to our own ringbuf. */ ring_buf_tail(&b->rbuf, &src_buf, &src_len); if (src_len == 0) break; if (src_len > sz) src_len = sz; if (buf != NULL) memcpy(buf, src_buf, src_len); ring_buf_pop(&b->rbuf, src_len); if (buf != NULL) buf += src_len; total_read += src_len; sz -= src_len; } return total_read; } /* * Must hold peer write lock. Returns number of bytes processed or negated BIO * response code. */ static ossl_ssize_t dgram_pair_read_actual(BIO *bio, char *buf, size_t sz, BIO_ADDR *local, BIO_ADDR *peer, int is_multi) { size_t l, trunc = 0, saved_idx, saved_count; struct bio_dgram_pair_st *b = bio->ptr, *readb; struct dgram_hdr hdr; if (!is_multi) BIO_clear_retry_flags(bio); if (!bio->init) return -BIO_R_UNINITIALIZED; if (!ossl_assert(b != NULL)) return -BIO_R_TRANSFER_ERROR; if (is_dgram_pair(b)) readb = b->peer->ptr; else readb = b; if (!ossl_assert(readb != NULL && readb->rbuf.start != NULL)) return -BIO_R_TRANSFER_ERROR; if (sz > 0 && buf == NULL) return -BIO_R_INVALID_ARGUMENT; /* If the caller wants to know the local address, it must be enabled */ if (local != NULL && b->local_addr_enable == 0) return -BIO_R_LOCAL_ADDR_NOT_AVAILABLE; /* Read the header. */ saved_idx = readb->rbuf.idx[1]; saved_count = readb->rbuf.count; l = dgram_pair_read_inner(readb, (uint8_t *)&hdr, sizeof(hdr)); if (l == 0) { /* Buffer was empty. */ if (!is_multi) BIO_set_retry_read(bio); return -BIO_R_NON_FATAL; } if (!ossl_assert(l == sizeof(hdr))) /* * This should not be possible as headers (and their following payloads) * should always be written atomically. */ return -BIO_R_BROKEN_PIPE; if (sz > hdr.len) { sz = hdr.len; } else if (sz < hdr.len) { /* Truncation is occurring. */ trunc = hdr.len - sz; if (b->no_trunc) { /* Restore original state. */ readb->rbuf.idx[1] = saved_idx; readb->rbuf.count = saved_count; return -BIO_R_NON_FATAL; } } l = dgram_pair_read_inner(readb, (uint8_t *)buf, sz); if (!ossl_assert(l == sz)) /* We were somehow not able to read the entire datagram. */ return -BIO_R_TRANSFER_ERROR; /* * If the datagram was truncated due to an inadequate buffer, discard the * remainder. */ if (trunc > 0 && !ossl_assert(dgram_pair_read_inner(readb, NULL, trunc) == trunc)) /* We were somehow not able to read/skip the entire datagram. */ return -BIO_R_TRANSFER_ERROR; if (local != NULL) *local = hdr.dst_addr; if (peer != NULL) *peer = hdr.src_addr; return (ossl_ssize_t)l; } /* Threadsafe */ static int dgram_pair_lock_both_write(struct bio_dgram_pair_st *a, struct bio_dgram_pair_st *b) { struct bio_dgram_pair_st *x, *y; x = (a->role == 1) ? a : b; y = (a->role == 1) ? b : a; if (!ossl_assert(a->role != b->role)) return 0; if (!ossl_assert(a != b && x != y)) return 0; if (CRYPTO_THREAD_write_lock(x->lock) == 0) return 0; if (CRYPTO_THREAD_write_lock(y->lock) == 0) { CRYPTO_THREAD_unlock(x->lock); return 0; } return 1; } static void dgram_pair_unlock_both(struct bio_dgram_pair_st *a, struct bio_dgram_pair_st *b) { CRYPTO_THREAD_unlock(a->lock); CRYPTO_THREAD_unlock(b->lock); } /* Threadsafe */ static int dgram_pair_read(BIO *bio, char *buf, int sz_) { int ret; ossl_ssize_t l; struct bio_dgram_pair_st *b = bio->ptr, *peerb; if (sz_ < 0) { ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT); return -1; } if (b->peer == NULL) { ERR_raise(ERR_LIB_BIO, BIO_R_BROKEN_PIPE); return -1; } peerb = b->peer->ptr; /* * For BIO_read we have to acquire both locks because we touch the retry * flags on the local bio. (This is avoided in the recvmmsg case as it does * not touch the retry flags.) */ if (dgram_pair_lock_both_write(peerb, b) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_UNABLE_TO_GET_WRITE_LOCK); return -1; } l = dgram_pair_read_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); if (l < 0) { if (l != -BIO_R_NON_FATAL) ERR_raise(ERR_LIB_BIO, -l); ret = -1; } else { ret = (int)l; } dgram_pair_unlock_both(peerb, b); return ret; } /* Threadsafe */ static int dgram_pair_recvmmsg(BIO *bio, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *num_processed) { int ret; ossl_ssize_t l; BIO_MSG *m; size_t i; struct bio_dgram_pair_st *b = bio->ptr, *readb; if (num_msg == 0) { *num_processed = 0; return 1; } if (!bio->init) { ERR_raise(ERR_LIB_BIO, BIO_R_BROKEN_PIPE); *num_processed = 0; return 0; } if (is_dgram_pair(b)) readb = b->peer->ptr; else readb = b; if (CRYPTO_THREAD_write_lock(readb->lock) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_UNABLE_TO_GET_WRITE_LOCK); *num_processed = 0; return 0; } for (i = 0; i < num_msg; ++i) { m = &BIO_MSG_N(msg, i); l = dgram_pair_read_actual(bio, m->data, m->data_len, m->local, m->peer, 1); if (l < 0) { *num_processed = i; if (i > 0) { ret = 1; } else { ERR_raise(ERR_LIB_BIO, -l); ret = 0; } goto out; } m->data_len = l; m->flags = 0; } *num_processed = i; ret = 1; out: CRYPTO_THREAD_unlock(readb->lock); return ret; } /* Threadsafe */ static int dgram_mem_read(BIO *bio, char *buf, int sz_) { int ret; ossl_ssize_t l; struct bio_dgram_pair_st *b = bio->ptr; if (sz_ < 0) { ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT); return -1; } if (CRYPTO_THREAD_write_lock(b->lock) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_UNABLE_TO_GET_WRITE_LOCK); return -1; } l = dgram_pair_read_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); if (l < 0) { if (l != -BIO_R_NON_FATAL) ERR_raise(ERR_LIB_BIO, -l); ret = -1; } else { ret = (int)l; } CRYPTO_THREAD_unlock(b->lock); return ret; } /* * Calculate the array growth based on the target size. * * The growth factor is a rational number and is defined by a numerator * and a denominator. According to Andrew Koenig in his paper "Why Are * Vectors Efficient?" from JOOP 11(5) 1998, this factor should be less * than the golden ratio (1.618...). * * We use an expansion factor of 8 / 5 = 1.6 */ static const size_t max_rbuf_size = SIZE_MAX / 2; /* unlimited in practice */ static ossl_inline size_t compute_rbuf_growth(size_t target, size_t current) { int err = 0; while (current < target) { if (current >= max_rbuf_size) return 0; current = safe_muldiv_size_t(current, 8, 5, &err); if (err) return 0; if (current >= max_rbuf_size) current = max_rbuf_size; } return current; } /* Must hold local write lock */ static size_t dgram_pair_write_inner(struct bio_dgram_pair_st *b, const uint8_t *buf, size_t sz) { size_t total_written = 0; /* * We repeat pushes to the ring buffer for as long as we have data until we * fail. We may not be able to push in one operation if the ring buffer * wraps around, but there may still be more room for data. */ while (sz > 0) { size_t dst_len; uint8_t *dst_buf; /* * There are two BIO instances, each with a ringbuf. We write to our own * ringbuf and read from the peer ringbuf. */ ring_buf_head(&b->rbuf, &dst_buf, &dst_len); if (dst_len == 0) { size_t new_len; if (!b->grows_on_write) /* resize only if size not set explicitly */ break; /* increase the size */ new_len = compute_rbuf_growth(b->req_buf_len + sz, b->req_buf_len); if (new_len == 0 || !ring_buf_resize(&b->rbuf, new_len)) break; b->req_buf_len = new_len; } if (dst_len > sz) dst_len = sz; memcpy(dst_buf, buf, dst_len); ring_buf_push(&b->rbuf, dst_len); buf += dst_len; sz -= dst_len; total_written += dst_len; } return total_written; } /* * Must hold local write lock. Returns number of bytes processed or negated BIO * response code. */ static ossl_ssize_t dgram_pair_write_actual(BIO *bio, const char *buf, size_t sz, const BIO_ADDR *local, const BIO_ADDR *peer, int is_multi) { static const BIO_ADDR zero_addr; size_t saved_idx, saved_count; struct bio_dgram_pair_st *b = bio->ptr, *readb; struct dgram_hdr hdr = {0}; if (!is_multi) BIO_clear_retry_flags(bio); if (!bio->init) return -BIO_R_UNINITIALIZED; if (!ossl_assert(b != NULL && b->rbuf.start != NULL)) return -BIO_R_TRANSFER_ERROR; if (sz > 0 && buf == NULL) return -BIO_R_INVALID_ARGUMENT; if (local != NULL && b->local_addr_enable == 0) return -BIO_R_LOCAL_ADDR_NOT_AVAILABLE; if (is_dgram_pair(b)) readb = b->peer->ptr; else readb = b; if (peer != NULL && (readb->cap & BIO_DGRAM_CAP_HANDLES_DST_ADDR) == 0) return -BIO_R_PEER_ADDR_NOT_AVAILABLE; hdr.len = sz; hdr.dst_addr = (peer != NULL ? *peer : zero_addr); hdr.src_addr = (local != NULL ? *local : zero_addr); saved_idx = b->rbuf.idx[0]; saved_count = b->rbuf.count; if (dgram_pair_write_inner(b, (const uint8_t *)&hdr, sizeof(hdr)) != sizeof(hdr) || dgram_pair_write_inner(b, (const uint8_t *)buf, sz) != sz) { /* * We were not able to push the header and the entirety of the payload * onto the ring buffer, so abort and roll back the ring buffer state. */ b->rbuf.idx[0] = saved_idx; b->rbuf.count = saved_count; if (!is_multi) BIO_set_retry_write(bio); return -BIO_R_NON_FATAL; } return sz; } /* Threadsafe */ static int dgram_pair_write(BIO *bio, const char *buf, int sz_) { int ret; ossl_ssize_t l; struct bio_dgram_pair_st *b = bio->ptr; if (sz_ < 0) { ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT); return -1; } if (CRYPTO_THREAD_write_lock(b->lock) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_UNABLE_TO_GET_WRITE_LOCK); return -1; } l = dgram_pair_write_actual(bio, buf, (size_t)sz_, NULL, NULL, 0); if (l < 0) { ERR_raise(ERR_LIB_BIO, -l); ret = -1; } else { ret = (int)l; } CRYPTO_THREAD_unlock(b->lock); return ret; } /* Threadsafe */ static int dgram_pair_sendmmsg(BIO *bio, BIO_MSG *msg, size_t stride, size_t num_msg, uint64_t flags, size_t *num_processed) { ossl_ssize_t ret, l; BIO_MSG *m; size_t i; struct bio_dgram_pair_st *b = bio->ptr; if (num_msg == 0) { *num_processed = 0; return 1; } if (CRYPTO_THREAD_write_lock(b->lock) == 0) { ERR_raise(ERR_LIB_BIO, ERR_R_UNABLE_TO_GET_WRITE_LOCK); *num_processed = 0; return 0; } for (i = 0; i < num_msg; ++i) { m = &BIO_MSG_N(msg, i); l = dgram_pair_write_actual(bio, m->data, m->data_len, m->local, m->peer, 1); if (l < 0) { *num_processed = i; if (i > 0) { ret = 1; } else { ERR_raise(ERR_LIB_BIO, -l); ret = 0; } goto out; } m->flags = 0; } *num_processed = i; ret = 1; out: CRYPTO_THREAD_unlock(b->lock); return ret; } #endif ```
```xml import { test, expect } from 'vitest' import { context } from '../test/helpers' import rename from './rename' test('unit:rename:normal', async () => { const ctx = context({ answers: { foo: 'caz' }, files: [ { path: 'original', contents: Buffer.from('') }, { path: '{foo}.txt', contents: Buffer.from('') }, { path: 'lib/{foo}.txt', contents: Buffer.from('') }, { path: '{foo}/{foo}.txt', contents: Buffer.from('') } ] }) await rename(ctx) const names = ctx.files.map(i => i.path) expect(names).toEqual(['original', 'caz.txt', 'lib/caz.txt', 'caz/caz.txt']) }) ```
Helen Venetia Vincent, Viscountess D'Abernon (née Duncombe; 6 March 1866 – 16 May 1954) was a British noblewoman, socialite and diarist. Early life Lady Helen was born at 20 Grosvenor Square, Mayfair, London, the daughter of William Duncombe and Mabel Violet Graham. The family seat was at Duncombe Park in Helmsley, North Yorkshire, England. Her father was elevated to the peerage as Baron Feversham in 1867 and again as Earl of Feversham in 1868. She and her sister, Hermione, Duchess of Leinster, were renowned as leading beauties in their circle. Marriage Helen married Sir Edgar Vincent, then a governor of the Imperial Ottoman Bank in Constantinople on 24 September 1890. In 1899 he was elected a Member of Parliament for Exeter. Lady Helen, in that period, was "the most celebrated hostess of her age and was 'by reason of her outstanding beauty, intelligence and charm, one of the most resplendent figures'". Activities and later years Helen was associated with "the Souls", a salon of noted intellectuals of the day which included Arthur Balfour, George Curzon, Henry James and Edith Wharton. She is believed to have been the model for the characters of Lady Thisbe Crowborough in Max Beerbohm's story Hilary Maltby and Stephen Braxton in Seven Men (1919) and for Lady Irene Silvester in Maurice Baring's story "A Luncheon Party" (1925). In 1904 during an extended visit to Venice, Lady Helen's portrait was painted by John Singer Sargent. That work is now part of the permanent collection of the Birmingham Museum of Art in Birmingham, Alabama, United States. During World War I Lady Helen trained as a nurse anaesthetist and treated thousands of patients. Many letters describing her war work were sent to her friend Teresa Hulton, later the 8th Lady Berwick of Attingham Park. Lady Helen accompanied her husband (created 1st Baron D'Abernon in 1914) as he served on the Interallied Mission to Poland and as the British Ambassador to the Weimar Republic in the early 1920s. During this time the Baroness kept a diary of her experiences, parts of which were published in 1946 as Red Cross and Berlin Embassy, 1915-1926: Extracts from the Diaries of Viscountess D'Abernon. At the end of his diplomatic mission, Sir Edgar was elevated to 1st Viscount D'Abernon on 1 January 1926, and then also succeeded his brother, Francis, as 16th Baronet of Stoke d'Abernon. The Vincents did not have children and Sir Edgar's titles died with him in 1941. Lady D'Abernon died at age 84 on 16 May 1954. References 1866 births 1954 deaths Daughters of British earls People from Mayfair British socialites D'Abernon
Ivan Vasilev Dyulgerov (; born 15 July 1999) is a Bulgarian professional footballer who plays as a goalkeeper for Cherno More Varna and the Bulgaria national team. Career A product of Cherno More's academy, Dyulgerov joined the first team as third choice goalkeeper in January 2016, following the departure of Iliya Nikolov. He made his league debut for Cherno More in a 3–1 away win over Neftochimic Burgas on 19 March 2017, playing the full 90 minutes. In the first half, he was booked for a foul against Ivan Valchanov in the penalty area, but he saved Galin Ivanov's penalty. Subsequently, Dyulgerov won the Man of the match award. Dyulgerov made his 100th appearance for the club in First League on 1 October 2023 against Lokomotiv Sofia, keeping his 44th league clean sheet. International career Dyulgerov was called-up for the Bulgaria U18 squad for a friendly against Georgia U19 on 11 June 2017. He made his debut coming on as substitute for Dimitar Sheytanov. On 12 September 2017, Dyulgerov made his debut for Bulgaria U19 in a friendly against Bosnia and Herzegovina U19. Dyulgerov made his debut for the Bulgarian under-21 team on 22 March 2019 in the starting eleven for the friendly against Northern Ireland U21. Career statistics Club References External links 1999 births Living people Bulgarian men's footballers Bulgaria men's youth international footballers Men's association football goalkeepers First Professional Football League (Bulgaria) players PFC Cherno More Varna players Footballers from Varna, Bulgaria
Harry Brown may refer to: Arts and entertainment Harry Joe Brown (1890–1972), American movie producer and theatre and film director Harry Brown (writer) (1917–1986), American screenwriter and novelist Harry Brown (journalist) (1930–2002), Canadian radio and television host Politics and law Harry Brown (Australian politician) (1863–1925), member of the WA Legislative Assembly Harry Brown (public servant) (1878–1967), Australian public servant Harry Knowlton Brown (1897–1974), politician from Alberta, Canada Harry Brown (American politician) (born 1955), member of the North Carolina Senate Sports Association football (soccer) Harry Brown (footballer, born 1883) (1883–1934), English inside forward for Bradford Park Avenue, Fulham, Northampton Town, Southampton, Newcastle United and West Bromwich Albion Harry Brown (footballer, born 1897) (1897–1958), English centre-forward who played for Queens Park Rangers and Sunderland Harry Brown (footballer, born 1907) (1907–1963), Scottish inside forward who played for Chesterfield, Darlington, Hibernian, Plymouth Argyle and Reading Harry Brown (footballer, born 1918) (1918–1963), English half-back who played for Hull City and Wolverhampton Wanderers Harry Brown (footballer, born 1924) (1924–1982), English goalkeeper who played for Derby County, Exeter City, Notts County, Plymouth Argyle and Queens Park Rangers Other sports Harry Brown (baseball) (fl. 1910s), American baseball player Harry Brown (Australian footballer) (1903–?), Australian rules footballer for St Kilda Harry Brown (basketball) (1948–2021), American-born Canadian basketball player and educator Others Harry Gunnison Brown (1880–1975), American economist Harry Bingham Brown (1883–1954), American pioneer aviator Harry W. Brown (VC) (1898–1917), Canadian recipient of the Victoria Cross Harry W. Brown (pilot) (1921–1991), American pilot at Pearl Harbor Other uses Harry Brown (film), 2009 film See also Harry Browne (1933–2006), American writer and politician Harry C. Browne (1878–1954), American actor, musician, and singer Henry Brown (disambiguation) Harold Brown (disambiguation) Harrison Brown (disambiguation)
Kalla Nottam (released internationally as The False Eye) is a 2019 Indian Malayalam language coming-of-age drama film directed by Rahul Riji Nair starring Vasudev, Suryadev, and Ansu. Cast Vasudev Sajeesh Marar as Vincent Suryadev Sajeesh Marar as Kishore Ansu Maria as Rosy Vinitha Koshy as Neenu Production The film was made without a script. Reception Sajin Shrijith of The New Indian Express opined that "Kalla Nottam is that rare coming-of-age drama which proves aesthetics don’t matter much when the content is strong. I initially expected it to be something innocent and light-hearted, but I found the slightly dark direction it took later so refreshing. I didn’t see some of the surprises coming. This is one of the best Malayalam films of this year". Cris of The News Minute wrote that "If the last 15 minutes or so of the short-length feature (1 hour 10 minutes) had been different, Kalla Nottam would have been a wonderful little package". Nirmal Jovial of The Week said that "Kalla Nottam is a brilliantly scripted film, executed with minimal resources. The finest performers (after the digital camera) are undoubtedly the three child artistes". G. Ragesh of onManorama wrote that "Its unconventional way of story-telling, made possible with an innovative cinematography, makes it an engaging watch even as unfolding a simple but relevant plot. Awards and nominations The film won the Best Feature Film in Malayalam at the National Film Awards. The film was nominated for Best Screenplay and Best Child Artist at the New York Indian Film Festival. Vasudev Sajeesh Marar won Best Child Artist at the Kerala State Film Awards. References
Mitsubishi Evolution may refer to: Mitsubishi Lancer Evolution Mitsubishi Pajero Evolution
Parviz Nasibov (; ; born 18 August 1998) is a Ukrainian Greco-Roman wrestler from Azerbaijan. He represented Ukraine at the 2020 Summer Olympics in Tokyo 2021, competing in Men's Greco-Roman 67 kg. He resides in Zaporizhzhia, Ukraine. References External links 1998 births Living people Ukrainian people of Azerbaijani descent Ukrainian male sport wrestlers Olympic wrestlers for Ukraine Wrestlers at the 2020 Summer Olympics People from Aghstafa District Medalists at the 2020 Summer Olympics Olympic medalists in wrestling Olympic silver medalists for Ukraine
```objective-c /* Do not modify this file. Changes will be overwritten. */ /* Generated automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-p7.h */ /* asn2wrs.py -b -L -C -p p7 -c ./p7.cnf -s ./packet-p7-template -D . -O ../.. MSAbstractService.asn MSGeneralAttributeTypes.asn MSAccessProtocol.asn MSUpperBounds.asn */ /* Input file: packet-p7-template.h */ #line 1 "./asn1/p7/packet-p7-template.h" /* packet-p7.h * Routines for X.413 (P7) packet dissection * Graeme Lunt 2007 * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * * This program is free software; you can redistribute it and/or * as published by the Free Software Foundation; either version 2 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef PACKET_P7_H #define PACKET_P7_H /*--- Included file: packet-p7-exp.h ---*/ #line 1 "./asn1/p7/packet-p7-exp.h" extern const value_string p7_SignatureStatus_vals[]; int dissect_p7_SequenceNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_p7_SignatureStatus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); /*--- End of included file: packet-p7-exp.h ---*/ #line 28 "./asn1/p7/packet-p7-template.h" #endif /* PACKET_P7_H */ ```
```swift import Foundation import ReactiveSwift extension DeletePaymentMethodEnvelope { static func from(_ data: GraphAPI.DeletePaymentSourceMutation.Data) -> DeletePaymentMethodEnvelope? { guard let storedCards = data.paymentSourceDelete?.user?.storedCards?.fragments.userStoredCardsFragment .nodes else { return nil } let allCards = storedCards.compactMap { card -> UserCreditCards.CreditCard? in guard let node = card else { return nil } return UserCreditCards.CreditCard( expirationDate: node.expirationDate, id: node.id, lastFour: node.lastFour, type: CreditCardType(rawValue: node.type.rawValue) ) } return DeletePaymentMethodEnvelope(storedCards: allCards) } static func producer( from data: GraphAPI.DeletePaymentSourceMutation .Data ) -> SignalProducer<DeletePaymentMethodEnvelope, ErrorEnvelope> { guard let envelope = DeletePaymentMethodEnvelope.from(data) else { return SignalProducer(error: ErrorEnvelope.couldNotParseJSON) } return SignalProducer(value: envelope) } } ```
```java /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * specific language governing permissions and limitations */ package io.ballerina.cli.cmd; import com.google.gson.Gson; import com.google.gson.JsonObject; import io.ballerina.projects.ProjectException; import io.ballerina.projects.Settings; import io.ballerina.projects.TomlDocument; import io.ballerina.projects.internal.ProjectFiles; import io.ballerina.projects.internal.SettingsBuilder; import io.ballerina.projects.util.ProjectConstants; import io.ballerina.projects.util.ProjectUtils; import org.apache.commons.io.FileUtils; import org.mockito.MockedStatic; import org.mockito.Mockito; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import org.wso2.ballerinalang.util.RepoUtils; import picocli.CommandLine; import java.io.BufferedReader; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Objects; import static io.ballerina.cli.cmd.CommandOutputUtils.getOutput; import static io.ballerina.projects.util.ProjectConstants.BALA_EXTENSION; /** * Push command tests. * * @since 2.0.0 */ //@PowerMockIgnore({"jdk.internal.reflect.*", "javax.net.*", "com.sun.*"}) public class PushCommandTest extends BaseCommandTest { private static final String VALID_PROJECT = "validApplicationProject"; private static final String POM_EXTENSION = ".pom"; private Path testResources; @BeforeClass public void setup() throws IOException { super.setup(); try { this.testResources = super.tmpDir.resolve("build-test-resources"); URI testResourcesURI = Objects.requireNonNull(getClass().getClassLoader().getResource("test-resources")) .toURI(); Files.walkFileTree(Paths.get(testResourcesURI), new BuildCommandTest.Copy(Paths.get(testResourcesURI), this.testResources)); } catch (URISyntaxException e) { Assert.fail("error loading resources"); } } @AfterMethod(alwaysRun = true) @Override public void afterMethod() throws IOException { super.afterMethod(); Path validBalProject = Paths.get("build").resolve("validProjectWithTarget"); ProjectUtils.deleteDirectory(validBalProject); validBalProject = Paths.get("build").resolve("tool-gayals"); ProjectUtils.deleteDirectory(validBalProject); } @Test(description = "Push package with invalid path") public void testPushWithInvalidPath() throws IOException { Path validBalProject = this.testResources.resolve(VALID_PROJECT); PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); String invalidPath = "tests"; new CommandLine(pushCommand).parseArgs(invalidPath); pushCommand.execute(); String buildLog = readOutput(true); String actual = buildLog.replace("\r", ""); String expected = "path provided for the bala file does not exist: " + invalidPath + "."; Assert.assertTrue(actual.contains(expected)); } @Test (description = "Push a package to a custom remote repository") public void testPushPackageCustom() throws IOException { String org = "luheerathan"; String packageName = "pact1"; String version = "0.1.0"; String expected = "Successfully pushed src/test/resources/test-resources/custom-repo/" + "luheerathan-pact1-any-0.1.0.bala to 'repo-push-pull' repository.\n"; Path mockRepo = Paths.get("build").resolve("ballerina-home").resolve("repositories").resolve("repo-push-pull"); Path balaPath = Paths.get("src", "test", "resources", "test-resources", "custom-repo", "luheerathan-pact1-any-0.1.0.bala"); PushCommand pushCommand = new PushCommand(null, printStream, printStream, false, balaPath); String[] args = { "--repository=repo-push-pull" }; new CommandLine(pushCommand).parseArgs(args); try (MockedStatic<RepoUtils> repoUtils = Mockito.mockStatic(RepoUtils.class, Mockito.CALLS_REAL_METHODS)) { repoUtils.when(RepoUtils::readSettings).thenReturn(readSettings(testResources.resolve("custom-repo") .resolve("Settings.toml"), mockRepo.toAbsolutePath().toString() .replace("\\", "/"))); pushCommand.execute(); } String buildLog = readOutput(true); String actual = buildLog.replace("\r", ""); Assert.assertEquals(actual.replace("\\", "/"), expected); String artifact = packageName + "-" + version + BALA_EXTENSION; String pomFile = packageName + "-" + version + POM_EXTENSION; String pushPullPath = mockRepo.resolve(org).resolve(packageName).resolve(version).toAbsolutePath().toString(); for (String ext : new String[]{".sha1", ".md5", ""}) { Assert.assertTrue(Paths.get(pushPullPath, artifact + ext).toFile().exists()); Assert.assertTrue(Paths.get(pushPullPath, pomFile + ext).toFile().exists()); } } @Test (description = "Push a package to a custom remote repository(not exist in Settings.toml)") public void testPushPackageNonExistingCustom() throws IOException { String expected = "ballerina: unsupported repository 'repo-push-pul' found. " + "Only 'local' repository and repositories mentioned in the Settings.toml are supported.\n"; Path mockRepo = Paths.get("build").resolve("ballerina-home").resolve("repositories").resolve("repo-push-pull"); Path balaPath = Paths.get("src", "test", "resources", "test-resources", "custom-repo", "luheerathan-pact1-any-0.1.0.bala"); PushCommand pushCommand = new PushCommand(null, printStream, printStream, false, balaPath); String[] args = { "--repository=repo-push-pul" }; new CommandLine(pushCommand).parseArgs(args); try (MockedStatic<RepoUtils> repoUtils = Mockito.mockStatic(RepoUtils.class, Mockito.CALLS_REAL_METHODS)) { repoUtils.when(RepoUtils::readSettings).thenReturn(readSettings(testResources.resolve("custom-repo") .resolve("Settings.toml"), mockRepo.toAbsolutePath().toString())); pushCommand.execute(); } String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); Assert.assertEquals(actual, expected); } private static Settings readSettings(Path settingsFilePath, String repoPath) { try { String settingString = Files.readString(settingsFilePath); settingString = settingString.replaceAll("REPO_PATH", repoPath); TomlDocument settingsTomlDocument = TomlDocument .from(String.valueOf(settingsFilePath.getFileName()), settingString); SettingsBuilder settingsBuilder = SettingsBuilder.from(settingsTomlDocument); return settingsBuilder.settings(); } catch (IOException e) { return Settings.from(); } } @Test(description = "Push package with invalid file extension") public void testPushWithInvalidFileExtension() throws IOException { Path validBalProject = this.testResources.resolve(VALID_PROJECT); PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); String invalidExtensionFilePath = this.testResources.resolve("non-bal-file") .resolve("hello_world.txt").toString(); new CommandLine(pushCommand).parseArgs(invalidExtensionFilePath); pushCommand.execute(); String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); String expected = "file provided is not a bala file: " + invalidExtensionFilePath + "."; Assert.assertTrue(actual.contains(expected)); } @Test(description = "Push package with custom path") public void testPushWithCustomPath() throws IOException { Path validBalProject = Paths.get("build").resolve("validProjectWithTarget"); FileUtils.copyDirectory( this.testResources.resolve("validProjectWithTarget").toFile(), validBalProject.toFile()); FileUtils.moveDirectory( validBalProject.resolve("target-dir").toFile(), validBalProject.resolve("custom").toFile()); Path customTargetDirBalaPath = validBalProject.resolve("custom").resolve("bala") .resolve("foo-winery-any-0.1.0.bala"); PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false, customTargetDirBalaPath); String[] args = { "--repository=local" }; new CommandLine(pushCommand).parseArgs(args); Path mockRepo = Paths.get("build").resolve("ballerina-home"); try (MockedStatic<RepoUtils> repoUtils = Mockito.mockStatic(RepoUtils.class)) { repoUtils.when(RepoUtils::createAndGetHomeReposPath).thenReturn(mockRepo); repoUtils.when(RepoUtils::getBallerinaShortVersion).thenReturn("1.0.0"); repoUtils.when(RepoUtils::readSettings).thenReturn(Settings.from()); pushCommand.execute(); } String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); String expected = "Successfully pushed " + customTargetDirBalaPath + " to 'local' repository."; Assert.assertTrue(actual.contains(expected)); try { ProjectFiles.validateBalaProjectPath(mockRepo.resolve("repositories").resolve("local").resolve("bala") .resolve("foo").resolve("winery").resolve("0.1.0").resolve("any")); } catch (ProjectException e) { Assert.fail(e.getMessage()); } } @Test(description = "Push a tool to local repository") public void testPushToolToLocal() throws IOException { Path validBalProject = Paths.get("build").resolve("tool-gayals"); FileUtils.copyDirectory( this.testResources.resolve("tool-gayals").toFile(), validBalProject.toFile()); FileUtils.moveDirectory( validBalProject.resolve("target-dir").toFile(), validBalProject.resolve("custom").toFile()); Path customTargetDirBalaPath = validBalProject.resolve("custom").resolve("bala") .resolve("gayaldassanayake-tool_gayal-java17-1.1.0.bala"); PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false, customTargetDirBalaPath); String[] args = { "--repository=local" }; new CommandLine(pushCommand).parseArgs(args); Path mockRepo = Paths.get("build").resolve("ballerina-home"); try (MockedStatic<RepoUtils> repoUtils = Mockito.mockStatic(RepoUtils.class)) { repoUtils.when(RepoUtils::createAndGetHomeReposPath).thenReturn(mockRepo); repoUtils.when(RepoUtils::getBallerinaShortVersion).thenReturn("1.0.0"); repoUtils.when(RepoUtils::readSettings).thenReturn(Settings.from()); pushCommand.execute(); } String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); String expected = "Successfully pushed " + customTargetDirBalaPath + " to 'local' repository."; Assert.assertTrue(actual.contains(expected)); try { ProjectFiles.validateBalaProjectPath(mockRepo.resolve("repositories").resolve("local") .resolve("bala").resolve("gayaldassanayake").resolve("tool_gayal") .resolve("1.1.0").resolve("java17")); } catch (ProjectException e) { Assert.fail(e.getMessage()); } Path localToolJsonPath = mockRepo.resolve("repositories").resolve("local").resolve("bala") .resolve("local-tools.json"); Assert.assertTrue(Files.exists(localToolJsonPath)); try (BufferedReader bufferedReader = Files.newBufferedReader(localToolJsonPath, StandardCharsets.UTF_8)) { JsonObject localToolJson = new Gson().fromJson(bufferedReader, JsonObject.class); JsonObject pkgDesc = localToolJson.get("luhee").getAsJsonObject(); Assert.assertEquals(pkgDesc.get("org").getAsString(), "gayaldassanayake"); Assert.assertEquals(pkgDesc.get("name").getAsString(), "tool_gayal"); } } @Test(description = "Push package without bala directory") public void testPushWithoutBalaDir() throws IOException { String expected = "cannot find bala file for the package: winery. Run " + "'bal pack' to compile and generate the bala."; Path validBalProject = this.testResources.resolve(VALID_PROJECT); PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(); pushCommand.execute(); String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); Assert.assertTrue(actual.contains(expected)); } @Test(description = "Push package without bala file") public void testPushWithoutBala() throws IOException { Path projectPath = this.testResources.resolve(VALID_PROJECT); System.setProperty("user.dir", projectPath.toString()); // Build project PackCommand packCommand = new PackCommand(projectPath, printStream, printStream, false, true); new CommandLine(packCommand).parseArgs(); packCommand.execute(); String buildLog = readOutput(true); Assert.assertEquals(buildLog.replaceAll("\r", ""), getOutput("compile-bal-project.txt")); Assert.assertTrue( projectPath.resolve("target").resolve("bala").resolve("foo-winery-any-0.1.0.bala").toFile().exists()); // Delete bala Assert.assertTrue( projectPath.resolve("target").resolve("bala").resolve("foo-winery-any-0.1.0.bala").toFile().delete()); // Push String expected = "cannot find bala file for the package: winery. Run " + "'bal pack' to compile and generate the bala."; PushCommand pushCommand = new PushCommand(projectPath, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(); pushCommand.execute(); buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); Assert.assertTrue(actual.contains(expected)); } @Test(description = "Test push command with argument and a help") public void testPushCommandArgAndHelp() throws IOException { Path validBalProject = this.testResources.resolve(VALID_PROJECT); // Test if no arguments was passed in String[] args = { "sample2", "--help" }; PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(args); pushCommand.execute(); Assert.assertTrue(readOutput().contains("ballerina-push - Push the Ballerina Archive (BALA)")); } @Test(description = "Test push command with help flag") public void testPushCommandWithHelp() throws IOException { Path validBalProject = this.testResources.resolve(VALID_PROJECT); // Test if no arguments was passed in String[] args = { "-h" }; PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(args); pushCommand.execute(); Assert.assertTrue(readOutput().contains("ballerina-push - Push the Ballerina Archive (BALA)")); } @Test public void testPushToCustomRepo() throws IOException { Path validBalProject = Paths.get("build").resolve("validProjectWithTarget"); FileUtils.copyDirectory( this.testResources.resolve("validProjectWithTarget").toFile(), validBalProject.toFile()); FileUtils.moveDirectory( validBalProject.resolve("target-dir").toFile(), validBalProject.resolve("target").toFile()); Path mockRepo = Paths.get("build").resolve("ballerina-home"); // Test if no arguments was passed in String[] args = { "--repository=local" }; PushCommand pushCommand = new PushCommand(validBalProject, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(args); try (MockedStatic<RepoUtils> repoUtils = Mockito.mockStatic(RepoUtils.class)) { repoUtils.when(RepoUtils::createAndGetHomeReposPath).thenReturn(mockRepo); repoUtils.when(RepoUtils::getBallerinaShortVersion).thenReturn("1.0.0"); repoUtils.when(RepoUtils::readSettings).thenReturn(Settings.from()); pushCommand.execute(); } try { ProjectFiles.validateBalaProjectPath(mockRepo.resolve("repositories").resolve("local").resolve("bala") .resolve("foo").resolve("winery").resolve("0.1.0").resolve("any")); } catch (ProjectException e) { Assert.fail(e.getMessage()); } } @Test public void testPushWithoutPackageMd() throws IOException { Path projectPath = this.testResources.resolve(VALID_PROJECT); System.setProperty("user.dir", projectPath.toString()); // Pack project PackCommand packCommand = new PackCommand(projectPath, printStream, printStream, false, true); new CommandLine(packCommand).parseArgs(); packCommand.execute(); Assert.assertTrue( projectPath.resolve("target").resolve("bala").resolve("foo-winery-any-0.1.0.bala").toFile().exists()); // Push String expected = "Package.md is missing in bala file"; PushCommand pushCommand = new PushCommand(projectPath, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(); pushCommand.execute(); String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); Assert.assertTrue(actual.contains(expected)); } @Test (enabled = false) public void testPushWithEmptyPackageMd() throws IOException { Path projectPath = this.testResources.resolve(VALID_PROJECT); System.setProperty("user.dir", projectPath.toString()); Files.createFile(projectPath.resolve(ProjectConstants.PACKAGE_MD_FILE_NAME)); // Pack project PackCommand packCommand = new PackCommand(projectPath, printStream, printStream, false, true); new CommandLine(packCommand).parseArgs(); packCommand.execute(); Assert.assertTrue( projectPath.resolve("target").resolve("bala").resolve("foo-winery-any-0.1.0.bala").toFile().exists()); Files.delete(projectPath.resolve(ProjectConstants.PACKAGE_MD_FILE_NAME)); // Push String expected = "md file cannot be empty"; PushCommand pushCommand = new PushCommand(projectPath, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(); pushCommand.execute(); String buildLog = readOutput(true); String actual = buildLog.replaceAll("\r", ""); Assert.assertTrue(actual.contains(expected)); } @Test public void testPushToAnUnsupportedRepo() throws IOException { Path projectPath = this.testResources.resolve("validLibraryProject"); // Build project PackCommand packCommand = new PackCommand(projectPath, printStream, printStream, false, true); new CommandLine(packCommand).parseArgs(); packCommand.execute(); Assert.assertTrue( projectPath.resolve("target").resolve("bala").resolve("foo-winery-any-0.1.0.bala").toFile().exists()); String[] args = { "--repository=stdlib.local" }; PushCommand pushCommand = new PushCommand(projectPath, printStream, printStream, false); new CommandLine(pushCommand).parseArgs(args); pushCommand.execute(); String errMsg = "unsupported repository 'stdlib.local' found. Only 'local' repository and repositories " + "mentioned in the Settings.toml are supported."; Assert.assertTrue(readOutput().contains(errMsg)); } } ```
Taherpur is a town and a notified area in Ranaghat subdivision of Nadia district in the Indian state of West Bengal. History Zamindars of Tahirpur Taherpur has been named after a certain Pathan fief-holder Tahir Khan. Kamdev Bhatta, a Brahmin of shandilya gotra defeated the Pathan fief-holder Tahir Khan and laid the foundation of the Taherpur zamindari during the independent Sultanate period (1338-1538) of Bengal. Kamdev descendant Raja Kangshanarayan of Taherpur organized the first grand autumn Durga Puja in Bengal. Kamdev Bhatta This Raj family from Bhatta Narayan to the immediate predecessor of Kamdev Bhatta used to cultivate religious philosophy and literature over the ages. But Kamdev Bhatta was a man of different nature. In spite of studying religious philosophy, he became skilled in shooting arrow, using sword and wrestling. Later he united anumber of youths and made them expert in physical exercise and weapon training. Kamdev Bhatta had the credit of organising a group of youths and in course of time these youths became a fighting force in the region. At that time, a man named Tahir Khan ruled that region. After his name the Pargana was named as Tahirpur. Utilizing the weakness of Tahir Khan, Kamdev Bhatta attacked him with his organized force and after defeating him occupied the whole of Tahirpur region. He got the approval of the then reigning emperor of Delhi. Taherpur Rajbari Geography Location Taherpur is located at . Area overview Nadia district is mostly alluvial plains lying to the east of Hooghly River, locally known as Bhagirathi. The alluvial plains are cut across by such distributaries as Jalangi, Churni and Ichhamati. With these rivers getting silted up, floods are a recurring feature. The Ranaghat subdivision has the Bhagirathi on the west, with Purba Bardhaman and Hooghly districts lying across the river. Topographically, Ranaghat subdivision is spread across the Krishnanagar-Santipur Plain, which occupies the central part of the district, and the Ranaghat-Chakdaha Plain, the low-lying area found in the south-eastern part of the district. The Churni separates the two plains. A portion of the east forms the boundary with Bangladesh. The lower portion of the east is covered by a portion of the North 24 Parganas district. The subdivision has achieved reasonably high urbanisation. 41.68% of the population lives in urban areas and 58.32% lives in rural areas. Transport Taherpur is well connected with district headquarters and Kolkata by road. Taherpur railway station is situated on the Ranaghat–Krishnanagar line. Civic administration Police station Rananghat and Taherpur police stations have jurisdiction over Ranaghat, Birnagar, Taherpur and Ranaghat I CD block. The total area covered by the Taherpur police station is 154.74 km2 and the population covered is 173,926 (2001 census). Demographics According to the 2011 Census of India, Taherpur (Notified Area + Out Growth) had a total population of 38,039, of which 19,410 (51%) were males and 18,629 (49%) were females. Population in the age range 0–6 years was 3,200. The total number of literate persons in Taherpur was 30,166 (86.59% of the population over 6 years). The following municipality, notified area, outgrowths and census towns were part of Shantipur Urban Agglomeration in 2011 census: Shantipur (M), Taherpur (NA), Taherpur (OG), Barasat (OG), Bhaduri (OG), Mahisdanga (OG), Phulia (CT), Patuli (CT), Badkulla (CT), Ghoralia (CT), Beharia and Gangni. India census, Taherpur had a population of 20,060. Males constitute 51% of the population and females 49%. Taherpur has an average literacy rate of 80%, higher than the national average of 59.5%: male literacy is 84%, and female literacy is 76%. In Taherpur, 9% of the population is under 6 years of age. References Cities and towns in Nadia district
```java package com.sunfusheng.marqueeview; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Typeface; import android.os.Build; import android.support.annotation.AnimRes; import android.support.annotation.FontRes; import android.support.v4.content.res.ResourcesCompat; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.view.View; import android.view.ViewTreeObserver; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.TextView; import android.widget.ViewFlipper; import java.util.ArrayList; import java.util.List; /** * Created by sunfusheng on 16/5/31. */ public class MarqueeView<T> extends ViewFlipper { private int interval = 3000; private boolean hasSetAnimDuration = false; private int animDuration = 1000; private int textSize = 14; private int textColor = 0xff000000; private boolean singleLine = false; private int gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL; private static final int GRAVITY_LEFT = 0; private static final int GRAVITY_CENTER = 1; private static final int GRAVITY_RIGHT = 2; private int direction = DIRECTION_BOTTOM_TO_TOP; private static final int DIRECTION_BOTTOM_TO_TOP = 0; private static final int DIRECTION_TOP_TO_BOTTOM = 1; private static final int DIRECTION_RIGHT_TO_LEFT = 2; private static final int DIRECTION_LEFT_TO_RIGHT = 3; private Typeface typeface; @AnimRes private int inAnimResId = R.anim.anim_bottom_in; @AnimRes private int outAnimResId = R.anim.anim_top_out; private int position; private List<T> messages = new ArrayList<>(); private OnItemClickListener onItemClickListener; public MarqueeView(Context context) { this(context, null); } public MarqueeView(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs, 0); } private void init(Context context, AttributeSet attrs, int defStyleAttr) { TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MarqueeViewStyle, defStyleAttr, 0); interval = typedArray.getInteger(R.styleable.MarqueeViewStyle_mvInterval, interval); hasSetAnimDuration = typedArray.hasValue(R.styleable.MarqueeViewStyle_mvAnimDuration); animDuration = typedArray.getInteger(R.styleable.MarqueeViewStyle_mvAnimDuration, animDuration); singleLine = typedArray.getBoolean(R.styleable.MarqueeViewStyle_mvSingleLine, false); if (typedArray.hasValue(R.styleable.MarqueeViewStyle_mvTextSize)) { textSize = (int) typedArray.getDimension(R.styleable.MarqueeViewStyle_mvTextSize, textSize); textSize = Utils.px2sp(context, textSize); } textColor = typedArray.getColor(R.styleable.MarqueeViewStyle_mvTextColor, textColor); @FontRes int fontRes = typedArray.getResourceId(R.styleable.MarqueeViewStyle_mvFont, 0); if (fontRes != 0) { typeface = ResourcesCompat.getFont(context, fontRes); } int gravityType = typedArray.getInt(R.styleable.MarqueeViewStyle_mvGravity, GRAVITY_LEFT); switch (gravityType) { case GRAVITY_LEFT: gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL; break; case GRAVITY_CENTER: gravity = Gravity.CENTER; break; case GRAVITY_RIGHT: gravity = Gravity.RIGHT | Gravity.CENTER_VERTICAL; break; } if (typedArray.hasValue(R.styleable.MarqueeViewStyle_mvDirection)) { direction = typedArray.getInt(R.styleable.MarqueeViewStyle_mvDirection, direction); switch (direction) { case DIRECTION_BOTTOM_TO_TOP: inAnimResId = R.anim.anim_bottom_in; outAnimResId = R.anim.anim_top_out; break; case DIRECTION_TOP_TO_BOTTOM: inAnimResId = R.anim.anim_top_in; outAnimResId = R.anim.anim_bottom_out; break; case DIRECTION_RIGHT_TO_LEFT: inAnimResId = R.anim.anim_right_in; outAnimResId = R.anim.anim_left_out; break; case DIRECTION_LEFT_TO_RIGHT: inAnimResId = R.anim.anim_left_in; outAnimResId = R.anim.anim_right_out; break; } } else { inAnimResId = R.anim.anim_bottom_in; outAnimResId = R.anim.anim_top_out; } typedArray.recycle(); setFlipInterval(interval); } /** * * * @param message */ public void startWithText(String message) { startWithText(message, inAnimResId, outAnimResId); } /** * * * @param message * @param inAnimResId resID * @param outAnimResID resID */ public void startWithText(final String message, final @AnimRes int inAnimResId, final @AnimRes int outAnimResID) { if (TextUtils.isEmpty(message)) return; getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { getViewTreeObserver().removeOnGlobalLayoutListener(this); } else { getViewTreeObserver().removeGlobalOnLayoutListener(this); } startWithFixedWidth(message, inAnimResId, outAnimResID); } }); } /** * * * @param message */ private void startWithFixedWidth(String message, @AnimRes int inAnimResId, @AnimRes int outAnimResID) { int messageLength = message.length(); int width = Utils.px2dip(getContext(), getWidth()); if (width == 0) { throw new RuntimeException("Please set the width of MarqueeView !"); } int limit = width / textSize; List list = new ArrayList(); if (messageLength <= limit) { list.add(message); } else { int size = messageLength / limit + (messageLength % limit != 0 ? 1 : 0); for (int i = 0; i < size; i++) { int startIndex = i * limit; int endIndex = ((i + 1) * limit >= messageLength ? messageLength : (i + 1) * limit); list.add(message.substring(startIndex, endIndex)); } } if (messages == null) { messages = new ArrayList<>(); } messages.clear(); messages.addAll(list); postStart(inAnimResId, outAnimResID); } /** * * * @param messages */ public void startWithList(List<T> messages) { startWithList(messages, inAnimResId, outAnimResId); } /** * * * @param messages * @param inAnimResId resID * @param outAnimResID resID */ public void startWithList(List<T> messages, @AnimRes int inAnimResId, @AnimRes int outAnimResID) { if (Utils.isEmpty(messages)) return; setMessages(messages); postStart(inAnimResId, outAnimResID); } private void postStart(final @AnimRes int inAnimResId, final @AnimRes int outAnimResID) { post(new Runnable() { @Override public void run() { start(inAnimResId, outAnimResID); } }); } private boolean isAnimStart = false; private void start(final @AnimRes int inAnimResId, final @AnimRes int outAnimResID) { removeAllViews(); clearAnimation(); // if (messages == null || messages.isEmpty()) { throw new RuntimeException("The messages cannot be empty!"); } position = 0; addView(createTextView(messages.get(position))); if (messages.size() > 1) { setInAndOutAnimation(inAnimResId, outAnimResID); startFlipping(); } if (getInAnimation() != null) { getInAnimation().setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { if (isAnimStart) { animation.cancel(); } isAnimStart = true; } @Override public void onAnimationEnd(Animation animation) { position++; if (position >= messages.size()) { position = 0; } View view = createTextView(messages.get(position)); if (view.getParent() == null) { addView(view); } isAnimStart = false; } @Override public void onAnimationRepeat(Animation animation) { } }); } } private TextView createTextView(T marqueeItem) { TextView textView = (TextView) getChildAt((getDisplayedChild() + 1) % 3); if (textView == null) { textView = new TextView(getContext()); textView.setGravity(gravity | Gravity.CENTER_VERTICAL); textView.setTextColor(textColor); textView.setTextSize(textSize); textView.setIncludeFontPadding(true); textView.setSingleLine(singleLine); if (singleLine) { textView.setMaxLines(1); textView.setEllipsize(TextUtils.TruncateAt.END); } if (typeface != null) { textView.setTypeface(typeface); } textView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (onItemClickListener != null) { onItemClickListener.onItemClick(getPosition(), (TextView) v); } } }); } CharSequence message = ""; if (marqueeItem instanceof CharSequence) { message = (CharSequence) marqueeItem; } else if (marqueeItem instanceof IMarqueeItem) { message = ((IMarqueeItem) marqueeItem).marqueeMessage(); } textView.setText(message); textView.setTag(position); return textView; } public int getPosition() { return (int) getCurrentView().getTag(); } public List<T> getMessages() { return messages; } public void setMessages(List<T> messages) { this.messages = messages; } public void setOnItemClickListener(OnItemClickListener onItemClickListener) { this.onItemClickListener = onItemClickListener; } public interface OnItemClickListener { void onItemClick(int position, TextView textView); } /** * * * @param inAnimResId resID * @param outAnimResID resID */ private void setInAndOutAnimation(@AnimRes int inAnimResId, @AnimRes int outAnimResID) { Animation inAnim = AnimationUtils.loadAnimation(getContext(), inAnimResId); if (hasSetAnimDuration) inAnim.setDuration(animDuration); setInAnimation(inAnim); Animation outAnim = AnimationUtils.loadAnimation(getContext(), outAnimResID); if (hasSetAnimDuration) outAnim.setDuration(animDuration); setOutAnimation(outAnim); } public void setTypeface(Typeface typeface) { this.typeface = typeface; } } ```
```shell #!/bin/bash #test:disabled set -euo pipefail source $(dirname $0)/../../utils.sh TEST_ID=$(generate_test_id) echo "TEST_ID = $TEST_ID" ROOT=$(dirname $0)/../../.. env=jvm-$TEST_ID fn_n=jvm-hello-n-$TEST_ID fn_p=jvm-hello-p-$TEST_ID cleanup() { echo "previous response" $? log "Cleaning up..." clean_resource_by_id $TEST_ID } if [ -z "${TEST_NOCLEANUP:-}" ]; then trap cleanup EXIT else log "TEST_NOCLEANUP is set; not cleaning up test artifacts afterwards." fi cd $ROOT/examples/jvm/java log "Creating the jar from application" #Using Docker to build Jar so that maven & other Java dependencies are not needed on CI server docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.5-jdk-8 mvn clean package -q log "Creating environment for Java" fission env create --name $env --image $JVM_RUNTIME_IMAGE --version 2 --keeparchive=true log "Creating pool manager & new deployment function for Java" fission fn create --name $fn_p --deploy target/hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar --env $env --entrypoint io.fission.HelloWorld fission fn create --name $fn_n --deploy target/hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar --env $env --executortype newdeploy --entrypoint io.fission.HelloWorld log "Creating route for pool manager function" fission route create --name $fn_p --function $fn_p --url /$fn_p --method GET log "Creating route for new deployment function" fission route create --name $fn_n --function $fn_n --url /$fn_n --method GET log "Waiting for router & pools to catch up" sleep 5 log "Testing pool manager function" timeout 60 bash -c "test_fn $fn_p 'Hello'" log "Testing new deployment function" timeout 60 bash -c "test_fn $fn_n 'Hello'" log "Test PASSED" ```
Union is the name of some places in the U.S. state of Wisconsin: Union, Burnett County, Wisconsin, a town Union, Door County, Wisconsin, a town Union, Eau Claire County, Wisconsin, a town Union (community), Eau Claire County, Wisconsin, an unincorporated community Union, Grant County, Wisconsin, an unincorporated community Union, Pierce County, Wisconsin, a town Union, Rock County, Wisconsin, a town Union (community), Rock County, Wisconsin, an unincorporated community Union, Vernon County, Wisconsin, a town Union, Waupaca County, Wisconsin, a town
Al-Arwsh (Sanaa) () is a sub-district located in the Al Haymah Al Kharijiyah District, Sana'a Governorate, Yemen. Al-Arwsh (Sanaa) had a population of 1300 according to the 2004 census. References Sub-districts in Al Haymah Al Kharijiyah District
The Lotte World Folk Museum is a museum in Seoul, South Korea. See also List of museums in South Korea Museums in Seoul Folk museums in South Korea
```objective-c /* e_os2.h */ /* ==================================================================== * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (path_to_url" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (path_to_url" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ #include <openssl/opensslconf.h> #ifndef HEADER_E_OS2_H # define HEADER_E_OS2_H #ifdef __cplusplus extern "C" { #endif /****************************************************************************** * Detect operating systems. This probably needs completing. * The result is that at least one OPENSSL_SYS_os macro should be defined. * However, if none is defined, Unix is assumed. **/ # define OPENSSL_SYS_UNIX /* ---------------------- Macintosh, before MacOS X ----------------------- */ # if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_MACINTOSH_CLASSIC # endif /* ---------------------- NetWare ----------------------------------------- */ # if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_NETWARE # endif /* --------------------- Microsoft operating systems ---------------------- */ /* * Note that MSDOS actually denotes 32-bit environments running on top of * MS-DOS, such as DJGPP one. */ # if defined(OPENSSL_SYSNAME_MSDOS) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_MSDOS # endif /* * For 32 bit environment, there seems to be the CygWin environment and then * all the others that try to do the same thing Microsoft does... */ # if defined(OPENSSL_SYSNAME_UWIN) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WIN32_UWIN # else # if defined(__CYGWIN__) || defined(OPENSSL_SYSNAME_CYGWIN) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WIN32_CYGWIN # else # if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WIN32 # endif # if defined(OPENSSL_SYSNAME_WINNT) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WINNT # endif # if defined(OPENSSL_SYSNAME_WINCE) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WINCE # endif # endif # endif /* Anything that tries to look like Microsoft is "Windows" */ # if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WINDOWS # ifndef OPENSSL_SYS_MSDOS # define OPENSSL_SYS_MSDOS # endif # endif /* * DLL settings. This part is a bit tough, because it's up to the * application implementor how he or she will link the application, so it * requires some macro to be used. */ # ifdef OPENSSL_SYS_WINDOWS # ifndef OPENSSL_OPT_WINDLL # if defined(_WINDLL) /* This is used when building OpenSSL to * indicate that DLL linkage should be used */ # define OPENSSL_OPT_WINDLL # endif # endif # endif /* ------------------------------- OpenVMS -------------------------------- */ # if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_VMS # if defined(__DECC) # define OPENSSL_SYS_VMS_DECC # elif defined(__DECCXX) # define OPENSSL_SYS_VMS_DECC # define OPENSSL_SYS_VMS_DECCXX # else # define OPENSSL_SYS_VMS_NODECC # endif # endif /* -------------------------------- OS/2 ---------------------------------- */ # if defined(__EMX__) || defined(__OS2__) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_OS2 # endif /* -------------------------------- Unix ---------------------------------- */ # ifdef OPENSSL_SYS_UNIX # if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX) # define OPENSSL_SYS_LINUX # endif # ifdef OPENSSL_SYSNAME_MPE # define OPENSSL_SYS_MPE # endif # ifdef OPENSSL_SYSNAME_SNI # define OPENSSL_SYS_SNI # endif # ifdef OPENSSL_SYSNAME_ULTRASPARC # define OPENSSL_SYS_ULTRASPARC # endif # ifdef OPENSSL_SYSNAME_NEWS4 # define OPENSSL_SYS_NEWS4 # endif # ifdef OPENSSL_SYSNAME_MACOSX # define OPENSSL_SYS_MACOSX # endif # ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY # define OPENSSL_SYS_MACOSX_RHAPSODY # define OPENSSL_SYS_MACOSX # endif # ifdef OPENSSL_SYSNAME_SUNOS # define OPENSSL_SYS_SUNOS # endif # if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) # define OPENSSL_SYS_CRAY # endif # if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) # define OPENSSL_SYS_AIX # endif # endif /* -------------------------------- VOS ----------------------------------- */ # if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS) # define OPENSSL_SYS_VOS # ifdef __HPPA__ # define OPENSSL_SYS_VOS_HPPA # endif # ifdef __IA32__ # define OPENSSL_SYS_VOS_IA32 # endif # endif /* ------------------------------ VxWorks --------------------------------- */ # ifdef OPENSSL_SYSNAME_VXWORKS # define OPENSSL_SYS_VXWORKS # endif /* -------------------------------- BeOS ---------------------------------- */ # if defined(__BEOS__) # define OPENSSL_SYS_BEOS # include <sys/socket.h> # if defined(BONE_VERSION) # define OPENSSL_SYS_BEOS_BONE # else # define OPENSSL_SYS_BEOS_R5 # endif # endif /** * That's it for OS-specific stuff *****************************************************************************/ /* Specials for I/O an exit */ # ifdef OPENSSL_SYS_MSDOS # define OPENSSL_UNISTD_IO <io.h> # define OPENSSL_DECLARE_EXIT extern void exit(int); # else # define OPENSSL_UNISTD_IO OPENSSL_UNISTD # define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ # endif /*- * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare * certain global symbols that, with some compilers under VMS, have to be * defined and declared explicitely with globaldef and globalref. * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare * DLL exports and imports for compilers under Win32. These are a little * more complicated to use. Basically, for any library that exports some * global variables, the following code must be present in the header file * that declares them, before OPENSSL_EXTERN is used: * * #ifdef SOME_BUILD_FLAG_MACRO * # undef OPENSSL_EXTERN * # define OPENSSL_EXTERN OPENSSL_EXPORT * #endif * * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL * have some generally sensible values, and for OPENSSL_EXTERN to have the * value OPENSSL_IMPORT. */ # if defined(OPENSSL_SYS_VMS_NODECC) # define OPENSSL_EXPORT globalref # define OPENSSL_IMPORT globalref # define OPENSSL_GLOBAL globaldef # elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) # define OPENSSL_EXPORT extern __declspec(dllexport) # define OPENSSL_IMPORT extern __declspec(dllimport) # define OPENSSL_GLOBAL # else # define OPENSSL_EXPORT extern # define OPENSSL_IMPORT extern # define OPENSSL_GLOBAL # endif # define OPENSSL_EXTERN OPENSSL_IMPORT /*- * Macros to allow global variables to be reached through function calls when * required (if a shared library version requires it, for example. * The way it's done allows definitions like this: * * // in foobar.c * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) * // in foobar.h * OPENSSL_DECLARE_GLOBAL(int,foobar); * #define foobar OPENSSL_GLOBAL_REF(foobar) */ # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \ type *_shadow_##name(void) \ { static type _hide_##name=value; return &_hide_##name; } # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) # else # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value; # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name # define OPENSSL_GLOBAL_REF(name) _shadow_##name # endif # if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE) # define ossl_ssize_t long # endif # ifdef OPENSSL_SYS_MSDOS # define ossl_ssize_t long # endif # if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS) # define ssize_t int # endif # if defined(__ultrix) && !defined(ssize_t) # define ossl_ssize_t int # endif # ifndef ossl_ssize_t # define ossl_ssize_t ssize_t # endif #ifdef __cplusplus } #endif #endif ```
```go package main import ( "fmt" "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/google/uuid" ) func createBucket(sess *session.Session, bucket *string) error { svc := s3.New(sess) _, err := svc.CreateBucket(&s3.CreateBucketInput{ Bucket: bucket, }) if err != nil { return err } err = svc.WaitUntilBucketExists(&s3.HeadBucketInput{ Bucket: bucket, }) if err != nil { return err } return nil } func createObject(sess *session.Session, bucket *string, key *string) error { svc := s3.New(sess) _, err := svc.PutObject(&s3.PutObjectInput{ Body: strings.NewReader("Hello World!"), Bucket: bucket, Key: key, }) if err != nil { fmt.Println("Got error putting object in bucket:") return err } return nil } func deleteBucket(sess *session.Session, bucket *string) error { svc := s3.New(sess) iter := s3manager.NewDeleteListIterator(svc, &s3.ListObjectsInput{ Bucket: bucket, }) err := s3manager.NewBatchDeleteWithClient(svc).Delete(aws.BackgroundContext(), iter) if err != nil { return err } _, err = svc.DeleteBucket(&s3.DeleteBucketInput{ Bucket: bucket, }) if err != nil { return err } err = svc.WaitUntilBucketNotExists(&s3.HeadBucketInput{ Bucket: bucket, }) if err != nil { return err } return nil } func TestListBuckets(t *testing.T) { thisTime := time.Now() nowString := thisTime.Format("2006-01-02 15:04:05 Monday") t.Log("Starting unit test at " + nowString) // Initialize a session that the SDK uses to load // credentials from the shared credentials file (~/.aws/credentials) sess := session.Must(session.NewSessionWithOptions(session.Options{ SharedConfigState: session.SharedConfigEnable, })) // Create a new bucket and add key to it id := uuid.New() bucket := "test-bucket-" + id.String() err := createBucket(sess, &bucket) if err != nil { t.Fatal(err) } // Get original list of objects result, err := GetObjects(sess, &bucket) if err != nil { t.Fatal(err) } numObjects := *result.KeyCount + int64(1) key := "TestFile.txt" err = createObject(sess, &bucket, &key) if err != nil { t.Fatal(err) } // Get new list of objects result, err = GetObjects(sess, &bucket) if err != nil { t.Fatal(err) } lenEqual := *result.KeyCount == numObjects if !lenEqual { t.Log("Did not get new key in new list") } foundKey := false for _, obj := range result.Contents { if *obj.Key == key { foundKey = true break } } if foundKey { t.Log("Found key in bucket") } else { t.Log("Did not find key in bucket") } err = deleteBucket(sess, &bucket) if err != nil { t.Log("You'll have to delete " + bucket + " yourself") } } ```
```c++ // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // #include "draco/material/material.h" #ifdef DRACO_TRANSCODER_SUPPORTED #include "draco/core/draco_test_utils.h" #include "draco/io/texture_io.h" namespace { TEST(MaterialTest, TestMaterialAccess) { // Tests that we can set and get material properties. draco::Material material; material.SetName("Superalloy"); ASSERT_EQ(material.GetName(), "Superalloy"); material.SetColorFactor(draco::Vector4f(1.f, 0.2f, 0.1f, 0.9f)); ASSERT_EQ(material.GetColorFactor(), draco::Vector4f(1.f, 0.2f, 0.1f, 0.9f)); material.SetMetallicFactor(0.3f); ASSERT_EQ(material.GetMetallicFactor(), 0.3f); material.SetRoughnessFactor(0.2f); ASSERT_EQ(material.GetRoughnessFactor(), 0.2f); material.SetEmissiveFactor(draco::Vector3f(0.2f, 0.f, 0.1f)); ASSERT_EQ(material.GetEmissiveFactor(), draco::Vector3f(0.2f, 0.f, 0.1f)); // Set and check the properties of material extensions. material.SetUnlit(true); ASSERT_TRUE(material.GetUnlit()); material.SetHasSheen(true); ASSERT_TRUE(material.HasSheen()); material.SetSheenColorFactor(draco::Vector3f(0.4f, 0.2f, 0.8f)); ASSERT_EQ(material.GetSheenColorFactor(), draco::Vector3f(0.4f, 0.2f, 0.8f)); material.SetSheenRoughnessFactor(0.428f); ASSERT_EQ(material.GetSheenRoughnessFactor(), 0.428f); material.SetHasTransmission(true); ASSERT_TRUE(material.HasTransmission()); material.SetTransmissionFactor(0.5f); ASSERT_EQ(material.GetTransmissionFactor(), 0.5f); material.SetHasClearcoat(true); ASSERT_TRUE(material.HasClearcoat()); material.SetClearcoatFactor(0.6f); ASSERT_EQ(material.GetClearcoatFactor(), 0.6f); material.SetClearcoatRoughnessFactor(0.7f); ASSERT_EQ(material.GetClearcoatRoughnessFactor(), 0.7f); material.SetHasVolume(true); ASSERT_TRUE(material.HasVolume()); material.SetThicknessFactor(0.8f); ASSERT_EQ(material.GetThicknessFactor(), 0.8f); material.SetAttenuationDistance(0.9f); ASSERT_EQ(material.GetAttenuationDistance(), 0.9f); material.SetAttenuationColor(draco::Vector3f(0.2f, 0.5f, 0.8f)); ASSERT_EQ(material.GetAttenuationColor(), draco::Vector3f(0.2f, 0.5f, 0.8f)); material.SetHasIor(true); ASSERT_TRUE(material.HasIor()); material.SetIor(1.1f); ASSERT_EQ(material.GetIor(), 1.1f); material.SetHasSpecular(true); ASSERT_TRUE(material.HasSpecular()); material.SetSpecularFactor(0.01f); ASSERT_EQ(material.GetSpecularFactor(), 0.01f); material.SetSpecularColorFactor(draco::Vector3f(0.4f, 1.f, 1.f)); ASSERT_EQ(material.GetSpecularColorFactor(), draco::Vector3f(0.4f, 1.f, 1.f)); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::COLOR), nullptr); ASSERT_EQ(material.NumTextureMaps(), 0); std::unique_ptr<draco::Texture> texture = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture, nullptr); material.SetTextureMap(std::move(texture), draco::TextureMap::COLOR, 0); ASSERT_NE(material.GetTextureMapByType(draco::TextureMap::COLOR), nullptr); ASSERT_EQ(material.NumTextureMaps(), 1); ASSERT_EQ(material.GetTextureMapByIndex(0), material.GetTextureMapByType(draco::TextureMap::COLOR)); std::unique_ptr<draco::Texture> texture2 = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture2, nullptr); material.SetTextureMap(std::move(texture2), draco::TextureMap::EMISSIVE, 1); ASSERT_NE(material.GetTextureMapByType(draco::TextureMap::EMISSIVE), nullptr); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::EMISSIVE) ->tex_coord_index(), 1); ASSERT_EQ(material.NumTextureMaps(), 2); // Try to add the emissive texture one more time. This should replace the // previous instance of the emissive texture on the material. std::unique_ptr<draco::Texture> texture3 = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture3, nullptr); material.SetTextureMap(std::move(texture2), draco::TextureMap::EMISSIVE, 2); ASSERT_EQ(material.NumTextureMaps(), 2); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::EMISSIVE) ->tex_coord_index(), 2); std::unique_ptr<draco::TextureMap> texture_map4(new draco::TextureMap()); std::unique_ptr<draco::Texture> texture4 = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); material.SetTextureMap(std::move(texture4), draco::TextureMap::ROUGHNESS, 0); ASSERT_EQ(material.NumTextureMaps(), 3); ASSERT_NE(material.GetTextureMapByType(draco::TextureMap::ROUGHNESS), nullptr); material.SetTransparencyMode(draco::Material::TRANSPARENCY_BLEND); ASSERT_EQ(material.GetTransparencyMode(), draco::Material::TRANSPARENCY_BLEND); material.SetAlphaCutoff(0.2f); ASSERT_EQ(material.GetAlphaCutoff(), 0.2f); material.SetNormalTextureScale(0.75f); ASSERT_EQ(material.GetNormalTextureScale(), 0.75f); material.ClearTextureMaps(); ASSERT_EQ(material.NumTextureMaps(), 0); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::COLOR), nullptr); // Metallic factor should be unchanged. ASSERT_EQ(material.GetMetallicFactor(), 0.3f); material.Clear(); // Metallic factor should be reset to default. ASSERT_NE(material.GetMetallicFactor(), 0.3f); ASSERT_EQ(material.GetDoubleSided(), false); material.SetDoubleSided(true); ASSERT_EQ(material.GetDoubleSided(), true); } TEST(MaterialTest, TestMaterialCopy) { draco::Material material; material.SetName("Antimatter"); material.SetColorFactor(draco::Vector4f(0.3f, 0.2f, 0.4f, 0.9f)); material.SetMetallicFactor(0.2f); material.SetRoughnessFactor(0.4f); material.SetEmissiveFactor(draco::Vector3f(0.3f, 0.1f, 0.2f)); material.SetTransparencyMode(draco::Material::TRANSPARENCY_MASK); material.SetAlphaCutoff(0.25f); material.SetDoubleSided(true); material.SetNormalTextureScale(0.75f); // Set the properties of material extensions. material.SetUnlit(true); material.SetHasSheen(true); material.SetSheenColorFactor(draco::Vector3f(0.4f, 0.2f, 0.8f)); material.SetSheenRoughnessFactor(0.428f); material.SetHasTransmission(true); material.SetTransmissionFactor(0.5f); material.SetHasClearcoat(true); material.SetClearcoatFactor(0.6f); material.SetClearcoatRoughnessFactor(0.7f); material.SetHasVolume(true); material.SetThicknessFactor(0.8f); material.SetAttenuationDistance(0.9f); material.SetAttenuationColor(draco::Vector3f(0.2f, 0.5f, 0.8f)); material.SetHasIor(true); material.SetIor(1.1f); material.SetHasSpecular(true); material.SetSpecularFactor(0.01f); material.SetSpecularColorFactor(draco::Vector3f(0.4f, 1.f, 1.f)); std::unique_ptr<draco::Texture> texture = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture, nullptr); material.SetTextureMap(std::move(texture), draco::TextureMap::EMISSIVE, 2); draco::Material new_material; new_material.Copy(material); ASSERT_EQ(material.GetName(), new_material.GetName()); ASSERT_EQ(material.GetColorFactor(), new_material.GetColorFactor()); ASSERT_EQ(material.GetMetallicFactor(), new_material.GetMetallicFactor()); ASSERT_EQ(material.GetRoughnessFactor(), new_material.GetRoughnessFactor()); ASSERT_EQ(material.GetEmissiveFactor(), new_material.GetEmissiveFactor()); ASSERT_EQ(material.GetTransparencyMode(), new_material.GetTransparencyMode()); ASSERT_EQ(material.GetAlphaCutoff(), new_material.GetAlphaCutoff()); ASSERT_EQ(material.GetDoubleSided(), new_material.GetDoubleSided()); ASSERT_EQ(material.GetNormalTextureScale(), new_material.GetNormalTextureScale()); // Check that the properties of material extensions have been copied. ASSERT_EQ(material.GetUnlit(), new_material.GetUnlit()); ASSERT_EQ(material.HasSheen(), new_material.HasSheen()); ASSERT_EQ(material.GetSheenColorFactor(), new_material.GetSheenColorFactor()); ASSERT_EQ(material.GetSheenRoughnessFactor(), new_material.GetSheenRoughnessFactor()); ASSERT_TRUE(material.HasTransmission()); ASSERT_EQ(material.GetTransmissionFactor(), new_material.GetTransmissionFactor()); ASSERT_TRUE(material.HasClearcoat()); ASSERT_EQ(material.GetClearcoatFactor(), new_material.GetClearcoatFactor()); ASSERT_EQ(material.GetClearcoatRoughnessFactor(), new_material.GetClearcoatRoughnessFactor()); ASSERT_TRUE(material.HasVolume()); ASSERT_EQ(material.GetThicknessFactor(), new_material.GetThicknessFactor()); ASSERT_EQ(material.GetAttenuationDistance(), new_material.GetAttenuationDistance()); ASSERT_EQ(material.GetAttenuationColor(), new_material.GetAttenuationColor()); ASSERT_TRUE(material.HasIor()); ASSERT_EQ(material.GetIor(), new_material.GetIor()); ASSERT_TRUE(material.HasSpecular()); ASSERT_EQ(material.GetSpecularFactor(), new_material.GetSpecularFactor()); ASSERT_EQ(material.GetSpecularColorFactor(), new_material.GetSpecularColorFactor()); for (int i = 0; i < draco::TextureMap::TEXTURE_TYPES_COUNT; ++i) { const draco::TextureMap::Type texture_map_type = static_cast<draco::TextureMap::Type>(i); if (material.GetTextureMapByType(texture_map_type) == nullptr) { ASSERT_EQ(new_material.GetTextureMapByType(texture_map_type), nullptr); continue; } if (material.GetTextureMapByType(texture_map_type)->texture() == nullptr) { ASSERT_EQ(new_material.GetTextureMapByType(texture_map_type)->texture(), nullptr); } else { ASSERT_NE(new_material.GetTextureMapByType(texture_map_type)->texture(), nullptr); ASSERT_EQ( material.GetTextureMapByType(texture_map_type)->tex_coord_index(), new_material.GetTextureMapByType(texture_map_type) ->tex_coord_index()); } } ASSERT_EQ(material.NumTextureMaps(), new_material.NumTextureMaps()); for (int i = 0; i < material.NumTextureMaps(); ++i) { const draco::TextureMap *const tm0 = material.GetTextureMapByIndex(i); const draco::TextureMap *const tm1 = new_material.GetTextureMapByIndex(i); ASSERT_NE(tm0, nullptr); ASSERT_NE(tm1, nullptr); ASSERT_EQ(tm0->type(), tm1->type()); } } TEST(MaterialTest, RemoveTextureMap) { // Tests that we can remove existing texture maps from a material. draco::Material material; // Add some dummy textures to the material. std::unique_ptr<draco::Texture> texture = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture, nullptr); material.SetTextureMap(std::move(texture), draco::TextureMap::COLOR, 0); std::unique_ptr<draco::Texture> texture_2 = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); material.SetTextureMap(std::move(texture), draco::TextureMap::EMISSIVE, 0); ASSERT_EQ(material.NumTextureMaps(), 2); // Try to delete the color texture. std::unique_ptr<draco::TextureMap> removed_texture = material.RemoveTextureMapByType(draco::TextureMap::COLOR); ASSERT_NE(removed_texture, nullptr); ASSERT_EQ(removed_texture->type(), draco::TextureMap::COLOR); ASSERT_EQ(material.NumTextureMaps(), 1); ASSERT_NE(material.GetTextureMapByType(draco::TextureMap::EMISSIVE), nullptr); ASSERT_EQ(material.GetTextureMapByIndex(0)->type(), draco::TextureMap::EMISSIVE); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::COLOR), nullptr); removed_texture = material.RemoveTextureMapByIndex(0); ASSERT_NE(removed_texture, nullptr); ASSERT_EQ(removed_texture->type(), draco::TextureMap::EMISSIVE); ASSERT_EQ(material.NumTextureMaps(), 0); ASSERT_EQ(material.GetTextureMapByType(draco::TextureMap::EMISSIVE), nullptr); } TEST(MaterialTest, SharedTexture) { // Tests adding shared textures. draco::Material material; // Add some dummy textures to the material. std::unique_ptr<draco::Texture> texture = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); ASSERT_NE(texture, nullptr); draco::Texture *texture_raw = texture.get(); material.SetTextureMap(std::move(texture), draco::TextureMap::COLOR, 0); DRACO_ASSERT_OK( material.SetTextureMap(texture_raw, draco::TextureMap::EMISSIVE, 0)); ASSERT_EQ(material.NumTextureMaps(), 2); // Read a new texture. texture = draco::ReadTextureFromFile(draco::GetTestFileFullPath("test.png")) .value(); // Texture is not owned by the material so we expect a failure. ASSERT_FALSE( material .SetTextureMap(texture.get(), draco::TextureMap::AMBIENT_OCCLUSION, 0) .ok()); } } // namespace #endif // DRACO_TRANSCODER_SUPPORTED ```
Hypsistarians, i.e. worshippers of the Hypsistos (, the "Most High" God), and similar variations of the term first appear in the writings of Gregory of Nazianzus (Orat. xviii, 5) and Gregory of Nyssa (Contra Eunom. ii), about AD 374. The term has been linked to a body of inscriptions that date from around 100 AD to around 400 AD, mostly small votive offerings, but also including altars and stelae, dedicated to Theos Hypsistos, or sometimes simply Hypsistos, mainly found in Asia Minor (Cappadocia, Bithynia and Pontus) and the Black Sea coasts that are today part of Russia. Some modern scholars identify the group, or groups, with God-fearers mentioned in the Acts of the Apostles, non-Jewish (gentile) sympathizers with Second Temple Judaism. History The name Hypsistarioi first occurs in Gregory of Nazianzus (Orat., xviii, 5) and the name Hypsistianoi in Gregory of Nyssa (Contra Eunom., II), about 374 CE. Gregory of Nazianzus describes a syncretic Jewish-pagan group that does not worship idols, reveres lamps and fire, and worships the Almighty (Pantokrator). They keep Sabbath and adhere to dietary restrictions, but they do not circumcise. Gregory of Nyssa adds that they refer to God as the Highest (Hypsistos) or Almighty (Pantokrator). Gregory of Nazianzus' description of this cult occurs in his eulogy for his father, who was a Hypsistarian before his conversion to Christianity. This cult may have formed as the native Cappadocian cult of Zeus Sabazios integrated with the cult of Jahve Sabaoth practiced by the numerous and intellectually predominant Jewish colonies, and that associations (sodalicia, thiasoi) of strict monotheists formed, who fraternized with the Jews, but who considered themselves free from the Law of Moses. A late 3rd century CE shrine in a wall of the ancient city of Oenoanda provides the strongest archaeological evidence for this cult. It is adorned with an inscription adapting a declaration of the Apollonian oracle in Didyma, describing the god as, "Self-begotten, un-taught, un-mothered, undisturbed, not permitting a name, many-named, dwelling in fire." Another inscription below the first dedicates a lantern to the Most High God. In addition, a great number of votive tablets and other inscriptions are evidence that referring to one or more gods as Most High (Hypsistos, often as Theos Hypsistos 'god most high', or as Zeus or Attis, but frequently unnamed) was widespread throughout Anatolia (cf. Acts 16:17, "these men are servants of the most high God" — oracle of the Pythia at Philippi). Contemporary Hellenistic use of hypsistos as a religious term appears to be derived from and compatible with the term as appears in the Septuagint, from a much earlier date. (Greek (hypsistos) translates Hebrew (elyon), meaning "highest". This term occurs more than fifty times as a substitution for the Tetragrammaton (the name of God) or in direct relation to God (most often in the Psalms, Daniel, and Sirach). The existence of Hypsistarians may have contributed to the astounding swiftness of the spread of Christianity in Asia Minor; yet not all of them accepted the new faith, and small communities of monotheists, neither Christians nor Jews, continued to exist, especially in Cappadocia. Persius (34-62) may have had Hypsistarians in view when he ridiculed such hybrid religionists in Satire v, 179–84, and Tertullian (c. 160 – c. 225 AD) seems to refer to them in Ad nationes, I, xiii. The claim that Hypsistarians continued to exist until the ninth century relies on a mistaken interpretation of Nicephorus Const., "Antirhet. adv. Const. Copr.", I, in Migne, PG, col. 209. Hypsistarians are probably referred to under the name Coelicoloe in a decree of the Emperors Honorius and Theodosius II (AD 408), in which their places of worship are transferred to the Christians. Mention by Goethe After describing his difficulties with mainstream religion, Goethe laments that Sources . References Jews and Judaism in the Roman Empire Ancient Mediterranean religions Hellenism and Christianity Hellenistic religion Monotheistic religions Second Temple period
```shell Extracting the `public key` from the `private key` Disable SSH password authentication Track SSH log-in attempts Best password generation utilities **SELinux** modes ```
Estola cuneata is a species of beetle in the family Cerambycidae. It was described by Stephan von Breuning in 1940. It is known from Brazil. References Estola Beetles described in 1940
Lord Francis Powerscourt is a fictional Victorian-Edwardian detective who has appeared in fifteen novels by the author David Dickinson. Background Powerscourt is descended from Irish aristocracy, his ancestral home is Powerscourt House in County Wicklow, Ireland. It is not clear whether he is properly Lord Powerscourt, i.e. a peer in his own right, or Lord Francis Powerscourt, i.e. the younger son of a high-ranking peer. Powerscourt's parents both died of Influenza while he was a child. Powerscourt was educated at Eton followed by Cambridge University. His early (and so far largely undocumented) career was with army intelligence in India and Afghanistan where he served with distinction. It is during these early years that Powerscourt discovers his talent for detection. His first wife and son drowned when their ship sunk in the Irish Sea. Powerscourt later remarried to Lady Lucy Hamilton and fathered two children, Olivia and Thomas, as well as becoming step father to Robert, Lady Hamilton's son from her first marriage. Twins Christopher and Elizabeth (known by her second name of Juliet) were also born and first appeared in "Death called to the Bar". Powerscourt is great friends with Lord Johnny Fitzgerald and Home Secretary and Prime Minister Lord Rosebery. Fitzgerald, who Powerscourt grew up with in Ireland, acts as an aide and confidant to Powerscourt and assists in his investigations. Both Powerscourt and Fitzgerald have saved each other's lives during their army service together. Books All 15 books in the Lord Francis Powerscourt series have been published by Constable & Robinson. Goodnight Sweet Prince (2002) 1892 - Investigation into the blackmailing and murder of Prince Eddy, the son of the Prince of Wales. Death and the Jubilee (2002) 1897 - Investigation of a headless corpse found floating in the Thames and the threat to Queen Victoria's Diamond Jubilee. Death of an Old Master (2004) 1899 - Investigation into the murder of a leading London art critic. Death of a Chancellor (2005) 1901 - Investigation into the murder of the Chancellor of Compton Cathedral. Death Called to the Bar (2006) 1902 - Investigation into the murder of the leading barrister Alexander Dauntsey. Death on the Nevskii Prospekt (2006) 1904 - Investigation into the murder of a British diplomat in St Petersburg. Death on the Holy Mountain (2009) 1905 - Investigation in Ireland of a series of art thefts from stately houses. Death of a Pilgrim (2010) 1905 - Investigation into a pilgrim killed in Le Puy-en-Velay, France. More deaths occur to pilgrims traveling to Santiago de Compostela, Spain. Death of a Wine Merchant (2010) Investigation into the murder of Randolph Colville, chairman of Colville Wines, at his son's wedding. His brother Cosmo is found standing next to the body, holding a gun, but refuses to say a word. Death in a Scarlet Coat (2011) Investigation into the death of the Earl of Candlesby found dead on his horse with a corner of his scarlet coat visible in the morning mist. Death at the Jesus Hospital (publication 2012) Investigation into three men found with their throats cut. All are connected to the Silkworkers, an ancient City of London livery company. Death of an Elgin Marble (publication 2014) The British Museum in Bloomsbury is home to one of the Caryatids, a statue of a maiden that acted as one of the six columns in a temple which stood on the Acropolis in ancient Athens. Lord Elgin had brought her to London in the nineteenth century, and even though now she was over 2,300 years old, she was still rather beautiful - and desirable. Which is why Lord Francis Powerscourt finds himself summoned by the British Museum to attend a most urgent matter. The Caryatid has been stolen and an inferior copy left in her place. Powerscourt agrees to handle the case discreetly - but then comes the first death: an employee of the British Museum is pushed under a rush hour train before he and the police can question him. What had he known about the statue's disappearance? And who would want such a priceless object? Powerscourt and his friend Johnny Fitzgerald undertake a mission that takes them deep into the heart of London's Greek community and the upper echelons of English society to uncover the bizarre truth of the vanishing lady... Death Comes to the Ballets Russes (2015) London, 1912, and the famed Ballet Russes have come to London to perform. Anticipation is high, for Diaghilev's troupe is renowned throughout Europe. At the end of their famed performance of Thamar at the Royal Opera House, the Georgian queen stabs her prince to death and throws him into the river. But life mirrors art when the prince is found truly dead, stabbed through the heart in the orchestra pit below stage. But the corpse is not the dancer in the programme. It is his understudy. Powerscourt is summoned to investigate. But who was the intended victim ? the understudy, or the star of the Ballets Russes? And the Ballets Russes are not the only Russian visitors in London this season. Lenin, Europe's most dangerous revolutionary, has sent some bank robbery money to be changed into pounds. There are stolen jewels from St Petersburg to be sold. And there are other darker forces abroad too and Powerscourt has to look death in the face before he can solve the mystery of Death at the Ballets Russes. Death Comes to Lynchester Close (2016) Lord Francis Powerscourt is visited at home in London by the Bishop of Lynchester who wants his advice about the suspect for the death of an aged parishioner. Powerscourt advises that discretion rather than accusation is the best way forward, but this is just the start of his association with the diocese of Lynchester. The death of the parishioner has left available a property in the cathedral close which traditionally the church rents out to a suitable tenant. Four worthy candidates are nominated...and then one of them, the retail king of the south of England, is found dead in the house, poisoned by strychnine. So once again Powerscourt is summoned by the bishop as this time there is no doubt of foul play. But there are many suspects from which to choose - there are the other candidates who want to live in that very desirable property...or could it be more complex than that? Very soon Powerscourt uncovers a trail of greed, deception and death which goes straight to the heart of the cathedral itself. Death at Melrose Hall (2017) A night of dancing that ends with the mysterious disappearance of a stable-boy - and Lord Francis Powerscourt is summoned to investigate. Spring 1914, and Jack Harper, current owner of Melrose Hall, has thrown a party for his eldest, Andrew, who is turning twenty-one. But the following morning there is no sign of Richard O'Connor. More than just a stable-boy, Richard acts as the legs of the paralyzed Jack Harper, pushing him around the estate in his wheelchair and sharing with him an affinity with the family's stable of thoroughbreds. The police aren't interested in the disappearance of a servant so Powerscourt is summoned. And then a body is discovered in the tackroom of one of the farms on the estate. Richard O'Connor has been shot through the head - but why would anyone want to shoot him? And what of Richard's unique ability - he can tell which horse is going to win the race. Did that lead to his death? Or was it the arrival of gangs at the local races, keen to enlist Richard into their crime syndicates? References Fictional private investigators
Saros cycle series 140 for solar eclipses occurs at the Moon's descending node, repeating every 18 years, 11 days, containing 71 events. All eclipses in this series occurs at the Moon's descending node. This solar saros is linked to Lunar Saros 133. Saros 140 Saros 140 It is a part of Saros cycle 140, repeating every 18 years, 11 days, containing 71 events. The series started with partial solar eclipse on April 16, 1512. It contains total eclipses from July 21, 1656 through November 9, 1836, hybrid eclipses from November 20, 1854 through December 23, 1908, and annular eclipses from January 3, 1927 through December 7, 2485. The series ends at member 71 as a partial eclipse on June 1, 2774. The longest duration of totality was 4 minutes, 10 seconds on August 12, 1692. Umbral eclipses Umbral eclipses (annular, total and hybrid) can be further classified as either: 1) Central (two limits), 2) Central (one limit) or 3) Non-Central (one limit). The statistical distribution of these classes in Saros series 140 appears in the following table. Events References http://eclipse.gsfc.nasa.gov/SEsaros/SEsaros140.html External links Saros cycle 140 - Information and visualization Solar saros series
```hack /* */ /* * This file is part of Scylla. * * Scylla is free software: you can redistribute it and/or modify * (at your option) any later version. * * Scylla is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with Scylla. If not, see <path_to_url */ #pragma once #include <seastar/core/sstring.hh> #include <seastar/core/future.hh> #include <seastar/core/distributed.hh> #include "auth/service.hh" #include "db/config.hh" #include "db/system_distributed_keyspace.hh" #include "database.hh" #include "log.hh" namespace db { class extensions; } extern logging::logger startlog; class bad_configuration_error : public std::exception {}; void init_storage_service(distributed<database>& db, sharded<auth::service>&, sharded<db::system_distributed_keyspace>&); struct init_scheduling_config { scheduling_group streaming; scheduling_group statement; scheduling_group gossip; }; void init_ms_fd_gossiper(sstring listen_address , uint16_t storage_port , uint16_t ssl_storage_port , bool tcp_nodelay_inter_dc , sstring ms_encrypt_what , sstring ms_trust_store , sstring ms_cert , sstring ms_key , sstring ms_tls_prio , bool ms_client_auth , sstring ms_compress , db::seed_provider_type seed_provider , size_t available_memory , init_scheduling_config scheduling_config , sstring cluster_name = "Test Cluster" , double phi = 8 , bool sltba = false); /** * Very simplistic config registry. Allows hooking in a config object * to the "main" sequence. */ class configurable { public: configurable() { // We auto register. Not that like cycle is assumed to be forever // and scope should be managed elsewhere. register_configurable(*this); } virtual ~configurable() {} // Hook to add command line options and/or add main config options virtual void append_options(db::config&, boost::program_options::options_description_easy_init&) {}; // Called after command line is parsed and db/config populated. // Hooked config can for example take this oppurtunity to load any file(s). virtual future<> initialize(const boost::program_options::variables_map&) { return make_ready_future(); } virtual future<> initialize(const boost::program_options::variables_map& map, const db::config& cfg, db::extensions& exts) { return initialize(map); } // visible for testing static std::vector<std::reference_wrapper<configurable>>& configurables(); static future<> init_all(const boost::program_options::variables_map&, const db::config&, db::extensions&); static future<> init_all(const db::config&, db::extensions&); static void append_all(db::config&, boost::program_options::options_description_easy_init&); private: static void register_configurable(configurable &); }; ```
Politisk Revy () was a Danish bi-weekly political magazine with new left tendency which existed between 1963 and 1987. The magazine was named after the 1920s critical magazine, Critical Revue. History Politisk Revy, a bi-weekly magazine, was founded in 1963 by Andreas Jorgensen, a left-wing politician. The other founders were Socialist People's Party members and journalists who had worked for defunct Dialogue magazine. Politisk Revy was based in Copenhagen and was published by København. The early the editors of the magazine included Andreas Jorgensen, Johan Fjord Jensen, Ulf Christiansen and Sven Skovmand who left the magazine after 1966. Ebbe Kløvedal Reich and Ole Grünbaum were two of its columnists following this period. The former also served as editor of the bi-weekly for one year at the end of the 1960s. Karen Jespersen, former interior minister, served as the editor of Politisk Revy from 1974 to 1977. Bente Hansen is another former editor-in-chief of the magazine. Politisk Revy reached its peak circulation in the 1970s with 5,000 copies. During this period the magazine was one of the alternative media together with Information, a newspaper, in Denmark. The magazine was closed in March 1987 due to low levels of circulation and shaky finances. In 1969 the magazine also began to publish books of which number was 507 until its disestablishment. Political leaning, content and censorship Politisk Ravy was not affiliated to any political party or organization. However, in the late 1960s and in the 1970s the magazine functioned as a forum for the new left in Denmark. In addition, people adopted the views of the new left in the country were organized around the magazine. The magazine provided a very theoretical approach towards the leftist ideas. From 1966 the magazine began to publish articles about the role of Cuba as a driving force in Third World revolutionary activities. Ebbe Kløvedal Reich's editorials in the magazine were mostly about the criticism of the Vietnam war. The Danish transition of the poems by Mahmoud Darwish, a Palestinian writer, were featured in Politisk Revy in 1967. It also contained many articles about the Palestinian crisis which led to its emergence as a leftist cause in Denmark. However, some contributors of Politisk Revy began to challenge the use of violence as a strategy by the Palestinian groups, particularly by the Popular Front for the Liberation of Palestine, after 1972. In 1969, the Danish police seized the magazine's forthcoming issue for allegedly containing secret military information. The magazine published an editorial in Autumn 1970, arguing that Greenland should have a socialist government. See also List of magazines in Denmark References 1963 establishments in Denmark 1987 disestablishments in Denmark Biweekly magazines Danish-language magazines Defunct magazines published in Denmark Defunct political magazines Magazines established in 1963 Magazines disestablished in 1987 Magazines published in Copenhagen Political magazines published in Denmark Socialist magazines Censorship in Denmark
```xml import { Signature, compareVersions } from "./signature"; import { LoadoutFile, signature } from "./loadout"; import { Widget, WidgetType } from "./widget"; import { Readout, migrateReadout } from "./readout"; import { Graph, migrateGraph } from "./graph"; export function migrateLoadout(file: LoadoutFile): void { if (file.signature.code !== signature.code) { throw new Error(`wrong signature code in preferences migration: ${file.signature.code}`); } if (compareVersions(file.signature.version, signature.version) > 0) { throw new Error(`error attempted migration from newer to older version: ${file.signature.version} => ${signature.version}`); } if (compareVersions(file.signature.version, signature.version) === 0) { console.warn(`migrateLoadout called but version up to date ${file.signature.version}`); return; } for (const widget of file.widgets) { if (widget.widgetType === WidgetType.Graph) { migrateGraph(widget as Graph, file.signature.version); } else if (widget.widgetType === WidgetType.Readout) { migrateReadout(widget as Readout, file.signature.version); } else { console.error('Unrecognized widget type in migrateLoadout'); } } } ```
Centaureidin is an O-methylated flavonol. It can be isolated from Tanacetum microphyllum, Achillea millefolium, Brickellia veronicaefolia, Bidens pilosa and Polymnia fruticosa. References O-methylated flavonols Flavonoids found in Asteraceae
```objective-c // // // This program is free software: you can redistribute it and/or modify // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // along with this program. If not, see <path_to_url // #import <Foundation/Foundation.h> @interface DHType : NSObject { NSString *humanType; NSString *humanTypePlural; NSArray *aliases; } @property (retain) NSString *humanType; @property (retain) NSString *humanTypePlural; @property (retain) NSArray *aliases; + (DHType *)typeWithHumanType:(NSString *)aHumanType humanPlural:(NSString *)aHumanTypePlural aliases:(id)someAliases; + (DHType *)typeWithHumanType:(NSString *)aHumanType humanPlural:(NSString *)aHumanTypePlural; @end ```
```javascript import { mount } from '@vue/test-utils' import { BSkeleton } from './skeleton' describe('skeleton', () => { it('default has root element of div, and default classes', async () => { const wrapper = mount(BSkeleton) expect(wrapper).toBeDefined() expect(wrapper.element.tagName).toBe('DIV') expect(wrapper.classes().length).toBe(3) expect(wrapper.classes()).toContain('b-skeleton') expect(wrapper.classes()).toContain('b-skeleton-text') expect(wrapper.classes()).toContain('b-skeleton-animate-wave') wrapper.destroy() }) it('has class `b-skeleton-button` when `type="button"` is set', async () => { const wrapper = mount(BSkeleton, { propsData: { type: 'button' } }) expect(wrapper).toBeDefined() expect(wrapper.classes()).toContain('b-skeleton-button') wrapper.destroy() }) it('has class `b-skeleton-animate-fade` when `animation="fade"` is set', async () => { const wrapper = mount(BSkeleton, { propsData: { animation: 'fade' } }) expect(wrapper).toBeDefined() expect(wrapper.classes()).toContain('b-skeleton-animate-fade') wrapper.destroy() }) it('has no animate class when `animation` prop has falsy value', async () => { const wrapper = mount(BSkeleton, { propsData: { animation: null } }) expect(wrapper).toBeDefined() expect(wrapper.classes()).not.toContain('b-skeleton-animate-wave') wrapper.destroy() }) it('has `width` style set when `width` prop is used', async () => { const wrapper = mount(BSkeleton, { propsData: { width: '50px' } }) expect(wrapper).toBeDefined() expect(wrapper.element.style.width).toBe('50px') wrapper.destroy() }) it('has `height` style set when `height` prop is used', async () => { const wrapper = mount(BSkeleton, { propsData: { height: '50px' } }) expect(wrapper).toBeDefined() expect(wrapper.element.style.height).toBe('50px') wrapper.destroy() }) it('has `width` and `height` styles set when `size` prop is used', async () => { const wrapper = mount(BSkeleton, { propsData: { size: '50px' } }) expect(wrapper).toBeDefined() expect(wrapper.element.style.height).toBe('50px') expect(wrapper.element.style.width).toBe('50px') wrapper.destroy() }) it('`size` prop overrules the `width` and `height` props', async () => { const wrapper = mount(BSkeleton, { propsData: { height: '25px', width: '40px', size: '50px' } }) expect(wrapper).toBeDefined() expect(wrapper.element.style.height).toBe('50px') expect(wrapper.element.style.width).toBe('50px') wrapper.destroy() }) it('has `bg-[variant]` class applied when `variant` prop is used', async () => { const wrapper = mount(BSkeleton, { propsData: { variant: 'primary' } }) expect(wrapper).toBeDefined() expect(wrapper.classes()).toContain('bg-primary') wrapper.destroy() }) }) ```
Octavia Nasr () (born 13 March 1966) is a Lebanese-American Rhetoric scholar and author whose research focuses on Yoga's identity and ethical code and how they apply to journalism and other fields. She is a certified yoga instructor who teaches in the U.S. and India. She was a war correspondent for Lebanon's LBCI in the 1980's. She served in various positions at CNN for twenty years until her departure in 2010 following a controversial Twitter posting related to cleric Mohammad Hussein Fadlallah. Career Nasr was born and raised in Lebanon in a Christian Maronite family to a Lebanese mother and Palestinian father who was born in Haifa and migrated to Lebanon with his family when he was 8 years old. Nasr completed her master's degree at Georgia State University in 2022. Her thesis, The Identity of Yoga: Contemporary Vs. Traditional Yogic Discourse, investigates yoga's modern postural identity. She links the truncation of yoga's limbs to teacher training curricula as set by the Yoga Alliance in the U.S. She offers a prescriptive curriculum to preserve yoga's traditional identity while building on its modern postural popularity. She founded Bridges Media Consulting in 2010 after her departure from CNN. In her role as Principal, she helps broadcasters and individuals be more diverse and make the best use of technology and the federated universe. As a certified yoga instructor, she teaches and lectures about yoga in the U.S. and India. For more than 20 years, Nasr covered major stories involving the Middle East, as an on-air and off-air expert for CNN’s global platforms. Her work at the network started just after Saddam Hussein’s invasion of Kuwait where she coordinated network coverage of the award-winning Gulf War coverage as part of CNN’s international assignment desk. Nasr won an Overseas Press Club Award in 2002 for CNN's coverage of 9-11 and its aftermath. In 2003, she managed a 15-member Arab desk which coordinated coverage of the Iraq War and was executive producer of CNN's Arab Voices. She received the Edward R. Murrow for Continuing Coverage of the 2006 war in Lebanon. She is the recipient of the 2006 Excellence in Journalism award from the Lebanese-American Chamber of Commerce and was awarded CNN World Report’s 2003 Achievement Award. Fadlallah comments controversy Following the death of Mohammad Hussein Fadlallah on 4 July 2010, Nasr tweeted, "Sad to hear of the passing of Sayyed Mohammad Hussein Fadlallah.. One of Hezbollah's giants I respect a lot..." Nasr fell victim of an astroturfing attack for this perceived show of sympathy and support for Hezbollah amid claims that her stated position was incompatible with her role at CNN as editor of news on the Middle East. In response to reactions to her comment, Nasr wrote on 6 July an explanation of what she meant with her tweet.I used the words "respect" and "sad" because to me as a Middle Eastern woman, Fadlallah took a contrarian and pioneering stand among Shia clerics on woman's rights. He called for the abolition of the tribal system of "honor killing." He called the practice primitive and non-productive. He warned Muslim men that abuse of women was against Islam.Nasr concluded her statement by saying: Sayyed Fadlallah. Revered across borders yet designated a terrorist. Not the kind of life to be commenting about in a brief tweet. It's something I deeply regret.A CNN spokesman responded saying that "CNN regrets any offense her Twitter message caused. It did not meet CNN’s editorial standards." The following day, on 7 July, an internal CNN memo announcing Nasr's departure, CNN International’s senior vice president for newsgathering, Parisa Khosravi, wrote, "We believe that her credibility in her position as senior editor for Middle Eastern affairs has been compromised going forward." On the Huffington Post, columnist Magda Abu-Fadil wrote about coordinated online efforts to protest Nasr's comments and push for her dismissal. In a 2012 interview, Nasr noted, "Without an upfront commitment from the employer to stand by and protect employees from astroturfing and negative publicity, my advice to employees is not to use social media on behalf of their employer, period." Reaction Articles and commentaries following Nasr's sacking have been divided. Thomas Friedman was among many who were troubled by the decision, writing in The New York Times that the decision undermined the network's credibility and sent the wrong signal to young people entering journalism. He wrote "I find Nasr's firing troubling." He questioned CNN's reaction by asking, "To begin with, what has gotten into us? One misplaced verb now and within hours you can have a digital lynch mob chasing after you—and your bosses scrambling for cover". Glen Greenwald in Salon.com wrote, "That message spawned an intense fit of protest from Far Right outlets, Thought Crime enforcers, and other neocon precincts, and CNN quickly (and characteristically) capitulated to that pressure by firing her." Greenwald referred to Fadlallah as "one of the Shiite world's most beloved religious figures", highlighting how the world viewed him including many in the west as shown in the Time Magazine's choice of Man of the year 2010 Fond Farewell. On the other hand, Mediaite's Dan Abrams asked "Can you imagine what would happen to a U.S. journalist expressing admiration for an Al Qaeda leader who had other, better, attributes?" Others expressed concern over what they viewed as similar incidents, most notably Hearst syndicated columnist Helen Thomas retiring under criticism one month earlier. Media outlets from around the world protested the firing and faulted CNN for its decision. Stephen Walt of NPR called it "a mistake for CNN." Many wrote in support of Nasr and warned that her firing constituted a new trend in the political climate for journalists and journalism covering politically sensitive issues in general, and the Middle East in particular. Those who agreed with CNN's decision stated that it had a right to enforce standards of objectivity in its reporting. Dr. James Zogby, the president of the Arab American Institute, said, "the very public nature of Nasr’s firing was unwise for a network attempting to build a global audience." Describing Nasr as "often the lone voice of reason" at CNN during Middle East crisis coverage, he warned that her firing sends a message "to Arabs around the world that their viewpoint doesn’t matter." Orthodox Rabbi Shmuley Boteach wrote: "For people like... Nasr..., an imam like Fadlallah who wants to kill Americans and Israelis but who is unexpectedly nice to women has taken a giant leap forward from the Dark Ages, deserving respect and praise. This attitude is, of course, not only deeply amoral and patronizing nonsense but historically false." In contrast, Time Person of the Year 2010 recognized Fadlallah and listed him under "Fond Farewells." Author Thanassis Cambanis, who interviewed Fadlallah for his book A Privilege to Die: Inside Hezbollah's Legions and Their Endless War Against Israel, explained that "by the time of his death (of natural causes), Fadlallah had broken with Hizballah and the toxic legacy of his early edicts." The author goes on to explain that Fadlallah "criticized Iran's clerical rule, supported women's rights and insisted on dialogue with the West." Cambanis concluded that "his passing marks a step backward for reform in the combustible world of Islamist militancy." Huffington Post article with title "CNN's Octavia Nasr: Another Victim of America's Thought Police" writes: "Since 9/11 America's redline has conflated terrorism and Israel's security, flattening all difference and particularity. As Stephen Walt and John Mearsheimer pointed out, this has dangerous consequences for both the implementation of policy and the policing of public thought (they were called anti-Semites for this)." While The Guardian writes: "Nasr is one of the more high-profile victims of a phenomenon known as "twittercide", comparing the incident with another controversy surrounding death of Fadlallah, namely a tribute to him which came from the UK ambassador to Beirut. Expressing a contrary opinion, Robert Fisk derided CNN and its credibility over the firing, saying "Poor old CNN goes on getting more cowardly by the hour. That's why no one cares about it any more." See also CNN controversies References External links Octavia Nasr's Thesis Repository Octavia Nasr's ORCID Author Page Octavia Nasr's Mastodon Octavia Nasr's Medium Writing and Archive Octavia Nasr's CNN Videos Living people People from Beirut Greek Orthodox Christians from Lebanon Eastern Orthodox Christians from Lebanon Palestinian Christians American people of Lebanese descent Middle Eastern Christians Lebanese American University alumni Georgia State University alumni American television reporters and correspondents Lebanese women journalists Lebanese journalists CNN people Journalistic scandals American women television journalists 1966 births 21st-century American women
```objective-c //===--- ByteCodeExprGen.h - Code generator for expressions -----*- C++ -*-===// // // See path_to_url for license information. // //===your_sha256_hash------===// // // Defines the constexpr bytecode compiler. // //===your_sha256_hash------===// #ifndef LLVM_CLANG_AST_INTERP_BYTECODEEXPRGEN_H #define LLVM_CLANG_AST_INTERP_BYTECODEEXPRGEN_H #include "ByteCodeEmitter.h" #include "EvalEmitter.h" #include "Pointer.h" #include "PrimType.h" #include "Record.h" #include "clang/AST/Decl.h" #include "clang/AST/Expr.h" #include "clang/AST/StmtVisitor.h" #include "clang/Basic/TargetInfo.h" namespace clang { class QualType; namespace interp { template <class Emitter> class LocalScope; template <class Emitter> class RecordScope; template <class Emitter> class VariableScope; template <class Emitter> class DeclScope; template <class Emitter> class OptionScope; template <class Emitter> class ArrayIndexScope; /// Compilation context for expressions. template <class Emitter> class ByteCodeExprGen : public ConstStmtVisitor<ByteCodeExprGen<Emitter>, bool>, public Emitter { protected: // Aliases for types defined in the emitter. using LabelTy = typename Emitter::LabelTy; using AddrTy = typename Emitter::AddrTy; /// Current compilation context. Context &Ctx; /// Program to link to. Program &P; public: /// Initializes the compiler and the backend emitter. template <typename... Tys> ByteCodeExprGen(Context &Ctx, Program &P, Tys &&... Args) : Emitter(Ctx, P, Args...), Ctx(Ctx), P(P) {} // Expression visitors - result returned on interp stack. bool VisitCastExpr(const CastExpr *E); bool VisitIntegerLiteral(const IntegerLiteral *E); bool VisitParenExpr(const ParenExpr *E); bool VisitBinaryOperator(const BinaryOperator *E); bool VisitPointerArithBinOp(const BinaryOperator *E); bool VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E); bool VisitCallExpr(const CallExpr *E); bool VisitCXXMemberCallExpr(const CXXMemberCallExpr *E); bool VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *E); bool VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *E); bool VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *E); bool VisitCXXThisExpr(const CXXThisExpr *E); bool VisitUnaryOperator(const UnaryOperator *E); bool VisitDeclRefExpr(const DeclRefExpr *E); bool VisitImplicitValueInitExpr(const ImplicitValueInitExpr *E); bool VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E); bool VisitArraySubscriptExpr(const ArraySubscriptExpr *E); bool VisitInitListExpr(const InitListExpr *E); bool VisitConstantExpr(const ConstantExpr *E); bool VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E); bool VisitMemberExpr(const MemberExpr *E); bool VisitArrayInitIndexExpr(const ArrayInitIndexExpr *E); bool VisitOpaqueValueExpr(const OpaqueValueExpr *E); bool VisitAbstractConditionalOperator(const AbstractConditionalOperator *E); bool VisitStringLiteral(const StringLiteral *E); bool VisitCharacterLiteral(const CharacterLiteral *E); bool VisitCompoundAssignOperator(const CompoundAssignOperator *E); protected: bool visitExpr(const Expr *E) override; bool visitDecl(const VarDecl *VD) override; protected: /// Emits scope cleanup instructions. void emitCleanup(); /// Returns a record type from a record or pointer type. const RecordType *getRecordTy(QualType Ty); /// Returns a record from a record or pointer type. Record *getRecord(QualType Ty); Record *getRecord(const RecordDecl *RD); // Returns a function for the given FunctionDecl. // If the function does not exist yet, it is compiled. const Function *getFunction(const FunctionDecl *FD); /// Classifies a type. std::optional<PrimType> classify(const Expr *E) const { return E->isGLValue() ? PT_Ptr : classify(E->getType()); } std::optional<PrimType> classify(QualType Ty) const { return Ctx.classify(Ty); } /// Classifies a known primitive type PrimType classifyPrim(QualType Ty) const { if (auto T = classify(Ty)) { return *T; } llvm_unreachable("not a primitive type"); } /// Evaluates an expression for side effects and discards the result. bool discard(const Expr *E); /// Evaluates an expression and places result on stack. bool visit(const Expr *E); /// Compiles an initializer. bool visitInitializer(const Expr *E); /// Compiles an array initializer. bool visitArrayInitializer(const Expr *Initializer); /// Compiles a record initializer. bool visitRecordInitializer(const Expr *Initializer); /// Creates and initializes a variable from the given decl. bool visitVarDecl(const VarDecl *VD); /// Visits an expression and converts it to a boolean. bool visitBool(const Expr *E); /// Visits an initializer for a local. bool visitLocalInitializer(const Expr *Init, unsigned I) { if (!this->emitGetPtrLocal(I, Init)) return false; if (!visitInitializer(Init)) return false; return this->emitPopPtr(Init); } /// Visits an initializer for a global. bool visitGlobalInitializer(const Expr *Init, unsigned I) { if (!this->emitGetPtrGlobal(I, Init)) return false; if (!visitInitializer(Init)) return false; return this->emitPopPtr(Init); } /// Visits a delegated initializer. bool visitThisInitializer(const Expr *I) { if (!this->emitThis(I)) return false; if (!visitInitializer(I)) return false; return this->emitPopPtr(I); } /// Creates a local primitive value. unsigned allocateLocalPrimitive(DeclTy &&Decl, PrimType Ty, bool IsMutable, bool IsExtended = false); /// Allocates a space storing a local given its type. std::optional<unsigned> allocateLocal(DeclTy &&Decl, bool IsExtended = false); private: friend class VariableScope<Emitter>; friend class LocalScope<Emitter>; friend class RecordScope<Emitter>; friend class DeclScope<Emitter>; friend class OptionScope<Emitter>; friend class ArrayIndexScope<Emitter>; /// Emits a zero initializer. bool visitZeroInitializer(PrimType T, const Expr *E); enum class DerefKind { /// Value is read and pushed to stack. Read, /// Direct method generates a value which is written. Returns pointer. Write, /// Direct method receives the value, pushes mutated value. Returns pointer. ReadWrite, }; /// Method to directly load a value. If the value can be fetched directly, /// the direct handler is called. Otherwise, a pointer is left on the stack /// and the indirect handler is expected to operate on that. bool dereference(const Expr *LV, DerefKind AK, llvm::function_ref<bool(PrimType)> Direct, llvm::function_ref<bool(PrimType)> Indirect); bool dereferenceParam(const Expr *LV, PrimType T, const ParmVarDecl *PD, DerefKind AK, llvm::function_ref<bool(PrimType)> Direct, llvm::function_ref<bool(PrimType)> Indirect); bool dereferenceVar(const Expr *LV, PrimType T, const VarDecl *PD, DerefKind AK, llvm::function_ref<bool(PrimType)> Direct, llvm::function_ref<bool(PrimType)> Indirect); /// Emits an APSInt constant. bool emitConst(const APSInt &Value, const Expr *E); bool emitConst(const APInt &Value, const Expr *E) { return emitConst(static_cast<APSInt>(Value), E); } /// Emits an integer constant. template <typename T> bool emitConst(T Value, const Expr *E); /// Returns the CXXRecordDecl for the type of the given expression, /// or nullptr if no such decl exists. const CXXRecordDecl *getRecordDecl(const Expr *E) const { QualType T = E->getType(); if (const auto *RD = T->getPointeeCXXRecordDecl()) return RD; return T->getAsCXXRecordDecl(); } /// Returns whether we should create a global variable for the /// given VarDecl. bool shouldBeGloballyIndexed(const VarDecl *VD) const { return VD->hasGlobalStorage() || VD->isConstexpr(); } protected: /// Variable to storage mapping. llvm::DenseMap<const ValueDecl *, Scope::Local> Locals; /// OpaqueValueExpr to location mapping. llvm::DenseMap<const OpaqueValueExpr *, unsigned> OpaqueExprs; /// Current scope. VariableScope<Emitter> *VarScope = nullptr; /// Current argument index. Needed to emit ArrayInitIndexExpr. std::optional<uint64_t> ArrayIndex; /// Flag indicating if return value is to be discarded. bool DiscardResult = false; }; extern template class ByteCodeExprGen<ByteCodeEmitter>; extern template class ByteCodeExprGen<EvalEmitter>; /// Scope chain managing the variable lifetimes. template <class Emitter> class VariableScope { public: VariableScope(ByteCodeExprGen<Emitter> *Ctx) : Ctx(Ctx), Parent(Ctx->VarScope) { Ctx->VarScope = this; } virtual ~VariableScope() { Ctx->VarScope = this->Parent; } void add(const Scope::Local &Local, bool IsExtended) { if (IsExtended) this->addExtended(Local); else this->addLocal(Local); } virtual void addLocal(const Scope::Local &Local) { if (this->Parent) this->Parent->addLocal(Local); } virtual void addExtended(const Scope::Local &Local) { if (this->Parent) this->Parent->addExtended(Local); } virtual void emitDestruction() {} VariableScope *getParent() { return Parent; } protected: /// ByteCodeExprGen instance. ByteCodeExprGen<Emitter> *Ctx; /// Link to the parent scope. VariableScope *Parent; }; /// Scope for local variables. /// /// When the scope is destroyed, instructions are emitted to tear down /// all variables declared in this scope. template <class Emitter> class LocalScope : public VariableScope<Emitter> { public: LocalScope(ByteCodeExprGen<Emitter> *Ctx) : VariableScope<Emitter>(Ctx) {} ~LocalScope() override { this->emitDestruction(); } void addLocal(const Scope::Local &Local) override { if (!Idx) { Idx = this->Ctx->Descriptors.size(); this->Ctx->Descriptors.emplace_back(); } this->Ctx->Descriptors[*Idx].emplace_back(Local); } void emitDestruction() override { if (!Idx) return; this->Ctx->emitDestroy(*Idx, SourceInfo{}); } protected: /// Index of the scope in the chain. std::optional<unsigned> Idx; }; /// Scope for storage declared in a compound statement. template <class Emitter> class BlockScope final : public LocalScope<Emitter> { public: BlockScope(ByteCodeExprGen<Emitter> *Ctx) : LocalScope<Emitter>(Ctx) {} void addExtended(const Scope::Local &Local) override { llvm_unreachable("Cannot create temporaries in full scopes"); } }; /// Expression scope which tracks potentially lifetime extended /// temporaries which are hoisted to the parent scope on exit. template <class Emitter> class ExprScope final : public LocalScope<Emitter> { public: ExprScope(ByteCodeExprGen<Emitter> *Ctx) : LocalScope<Emitter>(Ctx) {} void addExtended(const Scope::Local &Local) override { assert(this->Parent); this->Parent->addLocal(Local); } }; template <class Emitter> class ArrayIndexScope final { public: ArrayIndexScope(ByteCodeExprGen<Emitter> *Ctx, uint64_t Index) : Ctx(Ctx) { OldArrayIndex = Ctx->ArrayIndex; Ctx->ArrayIndex = Index; } ~ArrayIndexScope() { Ctx->ArrayIndex = OldArrayIndex; } private: ByteCodeExprGen<Emitter> *Ctx; std::optional<uint64_t> OldArrayIndex; }; } // namespace interp } // namespace clang #endif ```
Wachwani (Quechua wachwa Andean goose, Aymara -ni a suffix to indicate ownership, "the one with the Andean goose", Hispanicized spelling Huachhuani) is a mountain in the Andes of Peru, about high. It is situated in the Ayacucho Region, Parinacochas Province, Coracora District. References Mountains of Peru Mountains of Ayacucho Region
Massey Fucking Hall is a live album by Canadian rock band Japandroids, released on June 26, 2020 by ANTI-. It was recorded on October 24, 2017 at Massey Hall in Toronto during the Near to the Wild Heart of Life Tour. Background Japandroids' third album, Near to the Wild Heart of Life, was released on January 27, 2017. The band toured heavily in support of the album, performing over 150 shows in 23 countries between October 2016 and October 2018. On October 24, 2017, roughly halfway through the Near to the Wild Heart of Life Tour, their show at Massey Hall in Toronto was filmed and recorded for the concert film series Live At Massey Hall. The film was released on June 14, 2018. Release On May 27, 2020, Japandroids announced that their first live album Massey Fucking Hall would be released by Anti- on June 19, 2020 (digital) and October 2, 2020 (vinyl). The announcement came during the height of the COVID-19 pandemic, when virtually all live concerts and music festivals across North America were either canceled or postponed. On the timing of the release, drummer David Prowse stated: On June 10, 2020, it was announced that the digital release date had been pushed back to June 26, 2020 out of respect for Juneteenth, with the band stating that they "didn't want to take up space on such an important day". Reception Massey Fucking Hall was met with "generally favorable" reviews from critics. At Metacritic, which assigns a weighted average rating out of 100 to reviews from mainstream publications, this release received an average score of 68, based on 5 reviews. Aggregator Album of the Year gave the album a 72 out of 100 based on a critical consensus of 8 reviews. Track listing Personnel Japandroids Brian King – guitar, lead vocals David Prowse – drums, backup vocals References 2020 live albums Japandroids albums Anti- (record label) albums
```javascript function a(b) { for (b = 0;;); for (b of x); for (x of b); for (b in x); for (x in b); for (;; b++); for (;; b = 1); for (let a;;); for (let a of x); for (const a of x); for (let a in x); for (const a in x); for (let [a, d] of x); for (const [a, d] of x); for (let [a, d] in x); for (const [a, d] in x); for (let { c: { b: { a: c } } } = x;;); for (;; () => { let b = 1; }); } ```
Moses Taylor (January 11, 1806 – May 23, 1882) was a 19th-century New York merchant and banker and one of the wealthiest men of that century. At his death, his estate was reported to be worth $70 million, or about $ billion in today's dollars. He controlled the National City Bank of New York (later to become Citibank), the Delaware, Lackawanna & Western railroad, and the Moses Taylor & Co. import business, and he held numerous other investments in railroads and industry. Early life Taylor was born on January 11, 1806, to Jacob B. Taylor and Martha (née Brant) Taylor. His father was a close associate of John Jacob Astor and acted as his agent by purchasing New York real estate while concealing Astor's interest. Astor's relationship with the Taylor family provided Moses with an early advantage. Career At age 15, Taylor began working at J. D. Brown shippers. He soon moved to a clerk's position in the firm of Gardiner Greene Howland and Samuel Howland's firm G. G. & S. Howland Company of New York, a shipping and import firm that traded with South America. By 1832, at age 26, Taylor had sufficient wealth to marry, leave the Howland company, and start his own business as a sugar broker. As such he dealt with Cuban sugar growers, found buyers for their product, exchanged currency, and advised and assisted them with their investments. He nurtured relationships with those planters, who relied on him for loans and investments to support their plantations. Taylor never visited Cuba, but his friendship with Henry Augustus Coit, a prominent trader who was fluent in Spanish, enabled him to trade with the Cuban growers. Taylor soon discovered that loans and investments provided returns that were as good as, or better than, those from the sugar business, although the sugar trade remained a core source of income. By the 1840s his income was largely from interest and investments. By 1847, Taylor was listed as one of New York City's 25 millionaires. Banking and investments When the Panic of 1837 allowed Astor to take over what was then City Bank of New York (today known as Citibank), he named Taylor as director. Taylor himself had doubled his fortune during the panic, and brought his growing financial connections to the bank. He acquired equity in the bank and in 1855 became its president, operating it largely in support of his and his associates' businesses and investments. In the 1850s Taylor invested in iron and coal, and began purchasing interest in the Delaware, Lackawanna & Western railroad. When the Panic of 1857 brought the railroad to the brink of bankruptcy, Taylor obtained control by purchasing its outstanding shares for $5 a share. Within seven years the shares became worth $240, and the D. L. & W was one of the premier railroads of the country. By 1865 Taylor held 20,000 shares worth almost $50 million. Taylor held an interest in the New York, Newfoundland, and London Telegraph Company that Cyrus West Field had founded in 1854. After several failed attempts to lay the first transatlantic telegraph cable it was successful in 1866. Taylor also had controlling interest in the largest two of the seven gas companies in Manhattan, which were merged (after his death) to form the Consolidated Gas Company in 1884, eventually becoming Consolidated Edison. Taylor's Manhattan Gas Company and New York Gas Light Company were represented 45% of the merged Consolidated Gas, and his descendants remained some the largest individual shareholders of Consolidated Edison. Tammany Hall After the Civil War, during which he assisted the Union with financing its war debt, he continued to invest in iron, railroads, and real estate. His real estate holdings in New York brought him into close association with political power broker Boss Tweed of New York's Tammany Hall. Taylor sat in 1871 on a committee made up of New York's most influential and successful businessmen and signed his name to a report that commended Tweed's controller for his honesty and integrity. This report was considered a notorious whitewash. Personal life Taylor was married to Catharine Anne Wilson (1810–1892). Together, they were the parents of: Albertina Shelton Taylor (1833–1900), who married Percy Rivington Pyne (1820–1895) in 1855. Pyne, an assistant to Moses, became president of City Bank upon Moses' death. Mary Taylor (1837–1907), who married George Lewis (1833–1888) George Campbell Taylor (1837–1907) Katherine Wilson Taylor (1839–1925), who married Robert Winthrop Henry Augustus Coit Taylor (1841–1921), who married Charlotte Talbot Fearing (1845–1899) in 1868. After her death, he married Josephine Whitney Johnson (1849–1927) in 1903. Taylor left an estate worth $50 million upon his death in 1921, just a few months before the death of his nephew Moses Taylor Pyne. Taylor died in 1882 and although he owned a vault at the New York City Marble Cemetery that already contained members of his family, he was buried in Green-Wood Cemetery in Brooklyn, New York City. He left his fortune to his wife and children. Many of the Taylor family descendants were prominent in New York and Newport society and several prominent families of the early 20th century owed a substantial portion of their fortunes to the Taylor inheritances. Descendants Through his daughter Albertina, the Pynes family became a dynasty of bankers that survives to this day. Percy's son Moses Taylor Pyne was a benefactor of Princeton University who supported its development from a college into a university and left an estate worth $100 million at his death in 1921. Through his daughter Katherine, he was a grandfather of Hamilton Fish Kean (1862–1941), ancestor of the political Kean family which includes the former governor of New Jersey Thomas Kean. Legacy Not noted for philanthropy during his life, at its end in 1882 Taylor donated $250,000 to build a hospital in Scranton, Pennsylvania, to benefit his iron and coal workers, and workers of the D. L. & W railroad. The Moses Taylor hospital continues in operation today. References External links 1806 births 1882 deaths American bankers Place of birth missing American steel industry businesspeople 19th-century American businesspeople American businesspeople in shipping Businesspeople in the sugar industry American corporate directors American bank presidents American investors Burials at Green-Wood Cemetery Citigroup people
```python """ Project Euler Problem 234: path_to_url For any integer n, consider the three functions f1,n(x,y,z) = x^(n+1) + y^(n+1) - z^(n+1) f2,n(x,y,z) = (xy + yz + zx)*(x^(n-1) + y^(n-1) - z^(n-1)) f3,n(x,y,z) = xyz*(xn-2 + yn-2 - zn-2) and their combination fn(x,y,z) = f1,n(x,y,z) + f2,n(x,y,z) - f3,n(x,y,z) We call (x,y,z) a golden triple of order k if x, y, and z are all rational numbers of the form a / b with 0 < a < b k and there is (at least) one integer n, so that fn(x,y,z) = 0. Let s(x,y,z) = x + y + z. Let t = u / v be the sum of all distinct s(x,y,z) for all golden triples (x,y,z) of order 35. All the s(x,y,z) and t must be in reduced form. Find u + v. Solution: By expanding the brackets it is easy to show that fn(x, y, z) = (x + y + z) * (x^n + y^n - z^n). Since x,y,z are positive, the requirement fn(x, y, z) = 0 is fulfilled if and only if x^n + y^n = z^n. By Fermat's Last Theorem, this means that the absolute value of n can not exceed 2, i.e. n is in {-2, -1, 0, 1, 2}. We can eliminate n = 0 since then the equation would reduce to 1 + 1 = 1, for which there are no solutions. So all we have to do is iterate through the possible numerators and denominators of x and y, calculate the corresponding z, and check if the corresponding numerator and denominator are integer and satisfy 0 < z_num < z_den <= 0. We use a set "uniquq_s" to make sure there are no duplicates, and the fractions.Fraction class to make sure we get the right numerator and denominator. Reference: path_to_url """ from __future__ import annotations from fractions import Fraction from math import gcd, sqrt def is_sq(number: int) -> bool: """ Check if number is a perfect square. >>> is_sq(1) True >>> is_sq(1000001) False >>> is_sq(1000000) True """ sq: int = int(number**0.5) return number == sq * sq def add_three( x_num: int, x_den: int, y_num: int, y_den: int, z_num: int, z_den: int ) -> tuple[int, int]: """ Given the numerators and denominators of three fractions, return the numerator and denominator of their sum in lowest form. >>> add_three(1, 3, 1, 3, 1, 3) (1, 1) >>> add_three(2, 5, 4, 11, 12, 3) (262, 55) """ top: int = x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den bottom: int = x_den * y_den * z_den hcf: int = gcd(top, bottom) top //= hcf bottom //= hcf return top, bottom def solution(order: int = 35) -> int: """ Find the sum of the numerator and denominator of the sum of all s(x,y,z) for golden triples (x,y,z) of the given order. >>> solution(5) 296 >>> solution(10) 12519 >>> solution(20) 19408891927 """ unique_s: set = set() hcf: int total: Fraction = Fraction(0) fraction_sum: tuple[int, int] for x_num in range(1, order + 1): for x_den in range(x_num + 1, order + 1): for y_num in range(1, order + 1): for y_den in range(y_num + 1, order + 1): # n=1 z_num = x_num * y_den + x_den * y_num z_den = x_den * y_den hcf = gcd(z_num, z_den) z_num //= hcf z_den //= hcf if 0 < z_num < z_den <= order: fraction_sum = add_three( x_num, x_den, y_num, y_den, z_num, z_den ) unique_s.add(fraction_sum) # n=2 z_num = ( x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num ) z_den = x_den * x_den * y_den * y_den if is_sq(z_num) and is_sq(z_den): z_num = int(sqrt(z_num)) z_den = int(sqrt(z_den)) hcf = gcd(z_num, z_den) z_num //= hcf z_den //= hcf if 0 < z_num < z_den <= order: fraction_sum = add_three( x_num, x_den, y_num, y_den, z_num, z_den ) unique_s.add(fraction_sum) # n=-1 z_num = x_num * y_num z_den = x_den * y_num + x_num * y_den hcf = gcd(z_num, z_den) z_num //= hcf z_den //= hcf if 0 < z_num < z_den <= order: fraction_sum = add_three( x_num, x_den, y_num, y_den, z_num, z_den ) unique_s.add(fraction_sum) # n=2 z_num = x_num * x_num * y_num * y_num z_den = ( x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den ) if is_sq(z_num) and is_sq(z_den): z_num = int(sqrt(z_num)) z_den = int(sqrt(z_den)) hcf = gcd(z_num, z_den) z_num //= hcf z_den //= hcf if 0 < z_num < z_den <= order: fraction_sum = add_three( x_num, x_den, y_num, y_den, z_num, z_den ) unique_s.add(fraction_sum) for num, den in unique_s: total += Fraction(num, den) return total.denominator + total.numerator if __name__ == "__main__": print(f"{solution() = }") ```
The Japanese cormorant (Phalacrocorax capillatus), also known as Temminck's cormorant, is a cormorant native to the east Palearctic. The species occur from Taiwan, northwards through Korea and Japan, to the Russian Far East. It is migratory, and has been observed to dive to significant depths for food. It has a black body with a white throat and cheeks and a partially yellow bill. It is one of the species of cormorant that has been domesticated by fishermen in a tradition known in Japan as ukai (鵜飼) (literally meaning 'raising a cormorant'). It is called umiu (ウミウ sea cormorant) in Japanese. The Nagara River's well-known fishing masters work with this particular species to catch ayu. Footnotes References External links Japanese cormorant Birds of China Birds of Japan Birds of Korea Birds of Manchuria Japanese cormorant